(globalThis.wpRiseJsonp||=[]).push([["learn_main_tsx-node_modules_pnpm_moment_2_30_1_node_modules_moment_locale_sync_recursive_en"],{30349($c){$c.exports=function(oi){oi||(oi={});var __t,__p="";with(oi)__p+=`<style>
  :root {
    --color-theme-contrast-complementary-rgb: `+((__t=colorThemeContrastComplementaryRGB)==null?"":__t)+`;
    --color-theme-contrast-complementary: `+((__t=colorThemeContrastComplementary)==null?"":__t)+`;
    --color-theme-contrast-rgb: `+((__t=colorThemeContrastRGB)==null?"":__t)+`;
    --color-theme-contrast: `+((__t=colorThemeContrast)==null?"":__t)+`;
    --color-theme-rgb: `+((__t=colorThemeRGB)==null?"":__t)+`;
    --color-theme-tint: `+((__t=colorThemeTint)==null?"":__t)+`;
    --color-theme-transparent: `+((__t=colorThemeTransparent)==null?"":__t)+`;
    --color-theme: `+((__t=colorTheme)==null?"":__t)+`;
    --font-family-body: `+((__t=bodyTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;
    --font-family-head: `+((__t=headingTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;
    --font-family-ui: `+((__t=uiTypeface)==null?"":__t)+`, 'Noto Sans Myanmar', sans-serif;

    --mon-theme-font-body: var(--font-family-body);
    --mon-theme-font-heading: var(--font-family-head);
  }

  .brand--ui, .brand--ui * {
    font-family: var(--font-family-ui) !important;
  }

  .brand--beforeHead:before {
    font-family: var(--font-family-ui) !important;
  }

  .brand--afterHead:after {
    font-family: var(--font-family-ui) !important;
  }

  .brand--background {
    background-color: var(--color-theme) !important;
  }

  .brand--background-all * {
    background-color: var(--color-theme) !important;
  }

  .brand--border {
    border-color: var(--color-theme) !important;

    @media (forced-colors: active) {
      border-color: transparent !important;
    }
  }

  .brand--color {
    color: var(--color-theme) !important;
  }

  .brand--color-all * {
    color: var(--color-theme) !important;
  }

  .brand--shadow {
    box-shadow: 0 0 0 0.2rem var(--color-theme) !important;
  }

  .brand--shadow-all * {
    box-shadow: 0 0 0 0.2rem var(--color-theme) !important;
  }

  .brand--fill {
    fill: var(--color-theme) !important;
  }

  .brand--stroke {
    stroke: var(--color-theme) !important;
  }

  .brand--beforeBackground:before {
    background-color: var(--color-theme) !important;
  }

  .brand--beforeBorder:before {
    border-color: var(--color-theme) !important;
  }

  .brand--beforeColor:before {
    color: var(--color-theme) !important;
  }

  .brand--afterBackground:after {
    background-color: var(--color-theme) !important;
  }

  .brand--afterBorder:after {
    border-color: var(--color-theme) !important;
  }

  .brand--afterColor:after {
    color: var(--color-theme) !important;
  }

  /* should be applied to containers where links
     need to appear in brand color */
  .brand--linkColor a {
    color: var(--color-theme) !important;
    fill: var(--color-theme) !important;
  }

  /* should be applied to containers where links
     need to change to brand color on hover */
  .brand--linkColorHover a:hover {
    color: var(--color-theme) !important;
    fill: var(--color-theme) !important;
  }

  /* should be applied to any single element that
     needs to change color on hover */
  .brand--hoverColor:hover {
    color: var(--color-theme) !important;
  }

  .button.brand--background:hover { opacity: .65 !important; }

  .brandHover:hover {
    fill: var(--color-theme) !important;
  }


  @media (min-width: 47.9375em) { /* 768px */
    .brand--min768--background {
      background-color: var(--color-theme) !important;
    }

    .brand--min768--border {
      border-color: var(--color-theme) !important;
    }

    .brand--min768--color {
      color: var(--color-theme) !important;
    }
  }

  @media (max-width: 47.9375em) { /* 768px */
    .brand--max768--background {
      background-color: var(--color-theme) !important;
    }

    .brand--max768--border {
      border-color: var(--color-theme) !important;
    }

    .brand--max768--color {
      color: var(--color-theme) !important;
    }
  }
</style>
`;return __p}},20419($c,oi,p){"use strict";var Xo={};p.r(Xo),p.d(Xo,{callbackComponent:()=>hk,callbackPath:()=>R0,errorPath:()=>nk,getToken:()=>sk,initAuth:()=>v1,login:()=>p1,logout:()=>ur,onFetchTokensThunk:()=>mk,onSessionExpired:()=>ak,refreshSession:()=>rk,request:()=>g9});var s=p(30739),a0=p(22806),qo=p(39466),ri=p(16780),Qce=p(87190),Yce=p(11329),Zce=p(49563),Xce=p(4715),qce=p(75093),Jce=p(24072),ele=p(32023),tle=p(41405),nle=p(40409),sle=p(7093),ole=p(36877),rle=p(804),ale=p(67822),ile=p(49645),u=p(49860),Z4=p(33950),Re=p(90767),X4=p(84545),Vc=p(18398),fo=p(20496),q4=p(69618),J4=p(16422),eS=p(23851);const i0=u.createContext(null),c0=u.createContext(!1),ai=e=>(0,s.jsx)(c0.Provider,{value:!0,children:(0,s.jsx)(q4.A,{...e})});function og(e){return class extends u.Component{static displayName=`withStaleTransitionState(${e.displayName||e.name})`;static defaultProps={onEnter:()=>{},onEntered:()=>{},onEntering:()=>{},onExit:()=>{},onExited:()=>{},onExiting:()=>{}};nodeRef=u.createRef();onEnterDelegate;onEnteringDelegate;onEnteredDelegate;onExitDelegate;onExitingDelegate;onExitedDelegate;constructor(n){super(n),this.state={transitionState:null},this.onEnterDelegate=this.onTransition.bind(this,"enter"),this.onEnteringDelegate=this.onTransition.bind(this,"entering"),this.onEnteredDelegate=this.onTransition.bind(this,"entered"),this.onExitDelegate=this.onTransition.bind(this,"exit"),this.onExitingDelegate=this.onTransition.bind(this,"exiting"),this.onExitedDelegate=this.onTransition.bind(this,"exited")}onTransition=(n,...o)=>{this.setState({transitionState:n});const r="on"+n[0].toUpperCase()+n.slice(1),a=this.props[r];typeof a=="function"&&a(...o)};render(){return(0,s.jsx)(i0.Provider,{value:this.state.transitionState,children:(0,s.jsx)(e,{nodeRef:this.nodeRef,...this.props,onEnter:this.onEnterDelegate,onEntered:this.onEnteredDelegate,onEntering:this.onEnteringDelegate,onExit:this.onExitDelegate,onExited:this.onExitedDelegate,onExiting:this.onExitingDelegate})})}}}const rg=og(J4.Ay),Fs=og(eS.A);function tS(e){const t=u.useContext(c0),n=u.useContext(i0),o=u.useRef(e);return t&&n?.startsWith?.("exit")||(o.current=e),o.current}function nS(e){const t=n=>{const o=tS(n);return(0,s.jsx)(e,{...o,nodeRef:n.ref,ref:n.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const ag=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",sS=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",ig=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",oS=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",cg=e=>e!=null&&typeof e=="function",lg=(e,t)=>{const n=o=>lg(o,t);if(typeof e=="object"&&"type"in e&&typeof e.type=="string"){const o="meta"in e&&typeof e.meta=="object"?e.meta:void 0;return{...e,meta:{...o,origin:t}}}if("bimap"in e&&typeof e.bimap=="function")return e.bimap(n,n);if(ag(e))return e.map(n);if(ig(e))return e.then(n);if(cg(e))return function(r,a){return e(i=>r(n(i)),a)}};function rS(){return({dispatch:e,getState:t})=>n=>o=>{if(cg(o))return o(e,t);if(ig(o))return o.then(e);if(oS(o)){o.fork(e,e);return}return sS(o)?e(o.run()):ag(o)?o.map(e):n(o)}}function aS(){return[rS()]}var zc=p(49860);const iS=Vc.Zz;function cS(e,t){const n=(0,Vc.y$)(e,t,iS((0,Vc.Tw)(...aS()))),o=dS(),r=uS(),a=hS(),i=mS(),c=fS(),l=lS();return{Provider:fo.Kq,connect:o,connectBase:r,dispatch:n.dispatch,store:n,useDispatch:a,useDispatchWithOrigin:i,useSelector:c,useStore:l}}function lS(){return function(){return(0,fo.Pj)()}}function dS(){return function(t,n,o,r){return function(a){return(0,fo.Ng)(t,n,o,r)(nS(a))}}}function uS(){return function(t,n,o,r){return function(a){return(0,fo.Ng)(t,n,o,r)(a)}}}function hS(){return fo.wA}function mS(){return function(t){const n=(0,fo.wA)();return zc.useCallback(r=>n(lg(r,t)),[n,t])}}function fS(){return function(t,n=fo.bN){const o=zc.useContext(c0),r=zc.useContext(i0),a=zc.useRef(void 0),i=(0,X4.S)(),c=(0,fo.d4)(t,n),l=!i&&o&&r?.startsWith?.("exit");return l||(a.current=c),l&&a.current!==void 0?a.current:c}}var Vr=p(2469),pS=p(61017),Jo=p.n(pS),Ce=p(12742),gS;function vS(){return Ce.action}function cle(){return gS}var er=p(16397),CS=p(84268),Oe=p.n(CS),xS=p(14778),l0=p.n(xS),bS=p(863),Ee=p.n(bS),yS=p(18271),Jn=p.n(yS),SS=p(42117),d0=p.n(SS);const _c=l0()(d0()),dg=["a","b","blockquote","br","div","em","h1","h2","h3","h4","h5","h6","i","img","li","mark","ol","p","table","td","th","tbody","thead","tr","s","strong","span","sub","sup","u","ul","details","summary","rise-image","rise-math"],LS=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],TS=_c({allowedAttributes:{"*":["aria-*","class","colspan","id","rowspan","slot","style"],a:["data-external","data-link-type","data-link-destination","href","target","rel"],img:["alt","src"],ol:["start"],span:["data-*"],"rise-image":["key","src","width","height","originalwidth","originalheight"],"rise-math":["data-translate-attrs","long-description","short-description","tex"]},allowedClasses:["fr-*"],allowedSchemes:["data","http","https","mailto"],allowedTags:dg}),kS=_c({allowedAttributes:{iframe:LS},allowedTags:["iframe"],allowedSchemes:["http","https"]}),u0=Jn()(Ee(),TS,Oe()("")),ug=Jn()(Ee(),kS,Oe()("")),En=_c({allowedTags:[],allowedAttributes:[]}),lle=_c({allowedAttributes:{"*":["aria-*","class","colspan","rowspan","style"],a:["data-external","data-link-type","data-link-destination","href","target","rel"],ol:["start"],span:["data-*"],"rise-image":["key","src","width","height","originalwidth","originalheight"],"rise-math":["tex"]},allowedClasses:["fr-*"],allowedSchemes:["data","http","https","mailto"],allowedTags:dg.filter(e=>e!=="img")}),dle=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return En(t).replace(/\s{2,}/g," ")},{Runtime:qt}=window,Ne=e=>window.env?.[e],ule=!1,hle=null,hg="Rise 360",IS=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,gt=e=>{const t=e||"",n=qt?.resolvePath!=null?qt.resolvePath.bind(qt):IS;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:n(t)||t},ES=e=>qt?.resolveFontPath!=null?qt.resolveFontPath(e):`${e.default?Ne("CDN_URI"):Ne("CDN_USER_CONTENT_URI")}/${e.key}`,mg=()=>{qt?.exit!=null&&qt.exit()},NS=()=>qt?.isComplete!=null?qt.isComplete():null,ii=()=>qt?.isExport!=null?qt.isExport():!1;function jS(){if(qt?.isExport!=null){const e=window.partnerContent?.content;return qt.isExport()&&!!e}return!1}const fg=()=>{if(qt?.sendTouch!=null)return qt.sendTouch()};var wS=p(91208),Hs=p.n(wS),AS=p(94083),$s=p.n(AS),RS=p(55283),Uc=p.n(RS),PS=p(5763),vt=p.n(PS),MS=p(95825),Ss=p.n(MS),OS=p(82863),pg=p.n(OS),BS=p(57260),h0=p.n(BS),DS=p(37832),Ze=p.n(DS),FS=p(11802),qe=p.n(FS),HS=p(70087),es=p.n(HS);const $S=Hs(),Gc=Ze(),VS=$s(),gg=e=>Uc()(e),Wc=Jn(),Kc=e=>t=>{const n=e(t);return En(n==null?void 0:String(n))},vg=e=>t=>$S({[e]:n=>En(n==null?void 0:String(n))},t),zS=({startTime:e,stopTime:t})=>t-e,_S=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return Sg(e);case"MATCHING":return Eg(e);default:return zr(e)}},US=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return Sg(e);case"MATCHING":return Eg(e);case"MULTIPLE_CHOICE":return Lg(e);case"MULTIPLE_RESPONSE":return KS(e);default:return Lg(e)}},GS=({isUnfinished:e,item:t,itemProgress:n})=>{switch(t.type){case"FILL_IN_THE_BLANK":return WS(e)(n);case"MATCHING":return XS(t,e)(n);case"MULTIPLE_CHOICE":return Tg(t,e)(n);case"MULTIPLE_RESPONSE":return QS(t,e)(n);default:return Tg(t,e)(n)}},Cg=e=>[e],zr=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const n=e.shuffledAnswerIndices,o=[];return t.forEach((r,a)=>{const i=n[a];typeof i=="number"&&(o[i]=r)}),o.map(vg("title"))}return t.map(vg("title"))},m0=Kc(Ze()("id")),xg=Kc(Ze()("title")),bg=e=>t=>VS(n=>qe()("id",t,n),zr(e)),yg=e=>t=>pg()(t,zr(e)),Sg=e=>h0()("title",zr(e)),WS=e=>t=>Wc(Oe()(e),Oe()(""),Kc(n=>Gc("text",n)))(t),Lg=e=>e.correct==null?[]:bg(e)(e.correct),Tg=(e,t)=>n=>Wc(Oe()(t),Oe()([]),()=>{const o=Gc("selectedIndex",n);return o===void 0?[]:Cg(yg(e)(o))})(n),KS=e=>gg(vt()(bg(e),e.corrects??[])),QS=(e,t)=>n=>Wc(Oe()(t),Oe()([]),()=>{const o=Gc("selectedIndices",n)||[];return gg(o.map(r=>Cg(yg(e)(r))))})(n),kg=({sourceId:e,sourceTitle:t,targetId:n,targetTitle:o})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(n)}`,title:o}}),Ig=Kc(Ze()("matchTitle")),YS=e=>{const t=m0(e);return kg({sourceId:t,sourceTitle:xg(e),targetId:t,targetTitle:Ig(e)})},ZS=e=>(t,n)=>{const o=zr(e),r=o.find(i=>i?.id===n),a=o.find(i=>i?.id===t);return kg({sourceId:m0(r),sourceTitle:xg(r),targetId:m0(a),targetTitle:Ig(a)})},Eg=e=>vt()(YS,zr(e)),XS=(e,t)=>n=>Wc(Oe()(t),Oe()([]),()=>{const o=Gc("matches",n);return es()(Ss()(ZS(e),o??{}))})(n);var qS=p(61346),Ng=p.n(qS),JS=p(2766),jg=p.n(JS),e9=p(65213),tr=p.n(e9),wg,mle;const f0="_articulate_user_id",t9="_rise_authoring_api_session",Ag=()=>"_articulate_rise_",p0=(e,t)=>`${e}=${t}; domain=${Ne("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,n9=e=>document.cookie=p0(f0,e),s9=()=>document.cookie=`${p0(f0,"")}; Max-Age=-99999999`,o9=()=>document.cookie=`${p0(t9,"")}; Max-Age=-99999999`,nr=()=>jg().load(f0),Ct=()=>jg().load(Ag()),r9=()=>Ct()?tr()(Ct()).staff:!1,a9=()=>Ct()?wg(Ct())?.staffRoles||[]:[],i9=()=>Ct()?wg(Ct())?.content_team_admin:!1,fle=()=>a9().includes("content-team")||i9(),g0=()=>Ct()?tr()(Ct()).riseId||tr()(Ct()).sub||tr()(Ct()).aid:"",c9=()=>Ct()?tr()(Ct()).roles:[],l9=()=>Ct()?tr()(Ct()).tenantId:"",Rg=()=>Ct()?tr()(Ct()).subscription||{}:{},d9=()=>Rg().plan_id||"",u9=()=>Rg().status||"";var h9=p(31035),m9=p(82485),_r=p.n(m9);const f9=_r()(window.env,{ACCESS_COOKIE_NAME:Ag(),REDIRECT_URI:window.location.origin+"/auth-callback"}),po=(0,h9.A)(f9),Pg=po.closeSession,Ur=po.on,p9=po.off,g9=po.request,Mg=po.refreshSession,ci=po.resetSession,v9=po.getAuthorizationUrl,ple=po.fetch;var Vs=p(15264);const Qc=(e,t)=>((...n)=>{try{return e(...n)}catch(o){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(o),Vs.L2.addError(o),t(o)}}),C9=e=>{const t=e.getResponseHeader("content-type")||"",n=t.includes("application/json");if(!(n||t.includes("text/")))return e.response;try{const r=new TextDecoder("utf-8").decode(e.response);try{return n?JSON.parse(r):r}catch{return r}}catch{return e.response}};function x9(e,t){const n=t.indexOf(":"),o=t.substr(0,n).trim().toLowerCase(),r=t.substr(n+1).trim();return o&&(e[o]=e[o]?e[o]+", "+r:r),e}function b9(e){return e?e.split(`
`).reduce(x9,{}):{}}function Og(e){const t=[];for(const n in e){const o=e[n];if(!Array.isArray(o)){t.push(encodeURIComponent(n)+"="+encodeURIComponent(o));continue}for(const r of o)t.push(Og(r))}return t.join("&")}function v0(e){let t,n=!1;const o=new Promise(function r(a,i){const c=e.signal;if(c?.aborted){i(new DOMException("Aborted","AbortError"));return}const l=j=>{throw i(j),j},d=()=>{t.abort(),i(new DOMException("Aborted","AbortError"))},h=e.data;let m=Qc(e.deserialize??Ng(),l);const f=e.headers??{},v=e.json??!1,C=e.jwt??!1,g=e.token??null,b=e.method??"GET",x=e.reviewEnv??!1,y=e.onUploadProgress;let L=Qc(e.serialize??Ng(),l),S=e.url;const T=e.withCredentials??!1,k=e.file,E=e.timeout??3e3;t=new XMLHttpRequest;const I=setTimeout(()=>{t.abort(),i({error:"request timed out"})},E);if(v&&(m=Qc(JSON.parse,i),L=Qc(JSON.stringify,i),f["Content-Type"]="application/json"),b==="GET"&&h&&(S+="?"+Og(h)),C){const j=g||Ct();f.Authorization="Bearer "+j}c?.addEventListener("abort",d),t.withCredentials=T,t.addEventListener("abort",i),t.addEventListener("error",i),t.addEventListener("load",function(){t.status>=400?[401,403].includes(t.status)?n?i({error:"Unable to resume session",status:t.status}):ci().then(()=>{r(a,i),n=!0}).catch(j=>{Vs.L2.addError(j),i({error:"Unable to resume session",status:t.status})}):e.arrayBuffer?i(C9(t)):i(m(t.response)):(a({body:t.status===204?void 0:m(t.response),headers:b9(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d)),clearTimeout(I)}),t.upload&&typeof y=="function"&&t.upload.addEventListener("progress",y),t.open(b,S),e.arrayBuffer&&(t.responseType="arraybuffer");for(const j in f)t.setRequestHeader(j,f[j]);b!=="GET"&&h?t.send(L(h)):k?t.send(k):t.send()});return o.abort=(...r)=>t.abort(...r),o}function y9(e){return e.status===200||e.status===201?e.body:Promise.reject(e.body)}const Bg=(e,t=!0)=>t?`${e}s`:e;var C0=null;const gle=null,Dg=null,vle=(e,t="short")=>{const o=Object.keys(C0).reverse().find(c=>e>=C0[c]);if(!o)return`${e} ${Bg("byte",e>1)}`;const r=e/C0[o],a=r%1===0?r.toFixed(0):r.toFixed(2),i=t==="long"?Bg(Dg[o].long,r>1):Dg[o].short;return`${a} ${i}`};var S9=p(48319),L9=p.n(S9);const hn=e=>!!e&&e.type==="quiz",Ls=e=>!!e&&e.type==="blocks",xt=({courseProgress:e,lessonId:t,updatedLessonProgress:n})=>({...e,lessons:{...e.lessons,[t]:n}});function bt({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const o=t.lessons[e],r=n.lessons[e];if(o&&!L9()(o,r)&&(f8(o),T9({lessonId:e,courseProgress:t,prevCourseProgress:n})),k9({lessonId:e,prevCourseProgress:n,nextCourseProgress:t})){const a=Hg(n),i=Hg(t),c=i!==a,l={...t,percentComplete:i};return c&&(I9({courseProgress:l,lessonProgress:o}),l.percentComplete!=null&&g8(l.percentComplete)),l}return t}function T9({courseProgress:e,prevCourseProgress:t,lessonId:n}){const o=e.lessons?.[n],r=t.lessons?.[n];if(o?.percentComplete===100&&r?.percentComplete!==100){const a=Fg(o);a&&m8(a)}}function k9({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const o=t.lessons?.[e];if(!o)return!1;const r=n.lessons?.[e]?.percentComplete===100,a=o.percentComplete===100,i=r!==a,c=t.currentLesson!=null&&hn(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return i||c}function Fg(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(hn(e)){const{passed:n,score:o,passingScore:r=0}=e;return{id:t,...n!==void 0&&{passed:n},...o!==void 0&&{score:o},passingScore:r}}return{id:t}}function Hg(e){const{lessons:t={}}=e,n=Object.keys(t).length;if(n===0)return 0;const o=Object.values(t).filter(r=>r.isComplete).length;return Math.round(o/n*100)}function I9({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const n=Fg(t);n&&p8(e,n)}const E9=e=>e.reduce((t,n,o)=>("id"in n&&(t[n.id]={id:n.id,index:o}),t),{}),x0=e=>({...e,percentComplete:b0({items:e.items,key:"isComplete"})}),$g=e=>({...e,percentComplete:b0({items:e.items,key:"isComplete"})}),Vg=e=>({...e,percentViewed:b0({items:e.items,key:"isViewed"})});function Cle({itemId:e,isCorrect:t,progress:n}){const o={...n,items:{...n.items,[e]:{...n.items?.[e],id:e,index:n.items?.[e]?.index??0,isComplete:t,isViewed:t,...n.items?.[e].isCorrect===void 0?{isCorrect:t}:{}}}};o.items[e]?.isCorrect===!1&&(o.lastIncorrectCardId=e);const r=N9(o),a=r.percentComplete!==100?$g(r):r,i=Vg(a);return i.percentComplete===100?{...i,isComplete:!0}:i}function b0({items:e,key:t}){const n=e??{},o=Object.keys(n).length,r=Object.values(n).filter(a=>a?.[t]).length;return o===0?0:Math.round(r/o*100)}function N9(e){const n=Object.values(e.items||{}).filter(o=>o.isCorrect===!0).length;return{...e,correctlyAnswered:n}}var y0=p(66330),j9,w9;const Vt=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",zg=Array.isArray,xle=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),_g=(e,t,n)=>{const o={};for(const r in n)o[e(r)]=t(n[r]);return o},A9=e=>e.map(Ug),R9=e=>e.map(Gg),P9=e=>_g(j9,Ug,e),M9=e=>_g(w9,Gg,e),Ug=e=>Vt(e)?P9(e):zg(e)?A9(e):e,Gg=e=>Vt(e)?M9(e):zg(e)?R9(e):e,go=(e,t)=>{const n=new Set(t),o={};for(const r in e)n.has(r)||(o[r]=e[r]);return o},vo=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,o])=>t(n,o)));function Wg(e,t){const n=e.lessons[t];if(!Ls(n))return e;const o={...S0(n),id:t},r=xt({courseProgress:e,lessonId:t,updatedLessonProgress:o});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function O9(e,t){const{lessonId:n,blockId:o,itemId:r}=t,a=e.lessons[n];if(!Ls(a))return e;const i=a.items[o],c=G9({blockProgress:i,itemId:r}),l=sr({lessonProgress:a,blockId:o,updatedProgressBlock:c}),d=x0(l),h=xt({courseProgress:e,lessonId:n,updatedLessonProgress:d});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}function B9(e,t){const n=e.lessons[t];if(!Ls(n))return e;const o=K9(n),r=xt({courseProgress:e,lessonId:t,updatedLessonProgress:o});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function D9(e,{blockId:t,lessonId:n}){const o=e.lessons[n];if(!Ls(o))return e;const r=Q9(o.items[t]),a=sr({lessonProgress:o,blockId:t,updatedProgressBlock:r}),i=xt({courseProgress:e,lessonId:n,updatedLessonProgress:a});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:i})}function F9(e,t){const{lessonId:n,blockId:o,items:r}=t,a=e.lessons[n];if(!Ls(a))return e;const i=U9({blockId:o,lessonProgress:a,items:r}),c=xt({courseProgress:e,lessonId:n,updatedLessonProgress:i});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:c})}function H9(e,t){const{lessonId:n,blockId:o,itemId:r,audioVideoPlayhead:a}=t,i=e.lessons[n],c=i?.items?.[o];if(!Ls(i)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],audioVideoPlayhead:a},h={...c,items:{...c.items,[r]:d}},m=sr({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=xt({courseProgress:e,lessonId:n,updatedLessonProgress:m});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function $9(e,t){const{lessonId:n,blockId:o,itemId:r,isCorrect:a}=t,i=e.lessons[n];if(!Ls(i))return e;const c=Y9({itemId:r,isCorrect:a,blockProgress:i.items[o]}),l=x0(sr({lessonProgress:i,blockId:o,updatedProgressBlock:c})),d=xt({courseProgress:e,lessonId:n,updatedLessonProgress:l});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:d})}function V9(e,t){const{lessonId:n,blockId:o,itemId:r,response:a}=t,i=e.lessons[n],c=i?.items?.[o];if(!Ls(i)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],response:a},h={...c,items:{...c.items,[r]:d}},m=sr({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=xt({courseProgress:e,lessonId:n,updatedLessonProgress:m});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function z9(e,t){const{lessonId:n,blockId:o,isSubmitted:r}=t,a=e.lessons[n];if(!Ls(a))return e;const i=a?.items?.[o]??{},c=vo(i?.items??{},(m,f)=>[m,go(f,["response"])]),l={...i,items:c,isSubmitted:r},d=sr({lessonProgress:a,blockId:o,updatedProgressBlock:l}),h=xt({courseProgress:e,lessonId:n,updatedLessonProgress:d});return bt({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}const _9=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),S0=e=>{const t=vo(e.items,(n,o)=>{const r=vo(o.items??{},(a,i)=>[a,{...i,isComplete:!0,id:i.id,index:i.index}]);return[n,{...o,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},U9=({blockId:e,items:t,lessonProgress:n})=>{const o=n.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),a=vo(o.items??{},(d,h)=>{const m=r.has(d);return[d,{...h,isComplete:h.isComplete||m,id:h.id,index:h.index}]}),c=Object.keys(a).length===0||_9(a),l={...o,id:e,items:a,...c&&{isComplete:!0}};return W9(sr({lessonProgress:n,blockId:e,updatedProgressBlock:l}))},G9=({blockProgress:e,itemId:t})=>{if(!e.items)return e;const n=e.items[t];return{...e,items:{...e.items,[t]:{...n,retryAttemptCount:(n?.retryAttemptCount??0)+1}}}},W9=e=>{const t=x0(e);return t.percentComplete===100?{...t,isComplete:!0}:t},sr=({blockId:e,lessonProgress:t,updatedProgressBlock:n})=>({...t,items:{...t.items,[e]:n}}),K9=e=>{const t=vo(e.items,(n,o)=>{const r=vo(o.items??{},(a,i)=>[a,go(i,["isComplete","isCorrect","isViewed"])]);return[n,{id:o.id,index:o.index,items:r}]});return{...go(e,["isComplete","percentComplete"]),items:t}},Q9=e=>({...go(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:vo(e.items??{},(t,n)=>[t,go(n,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),Y9=({isCorrect:e,itemId:t,blockProgress:n})=>{if(!n.items)return n;const o=n.items[t],r={...o,isComplete:e,isViewed:e,...o?.isCorrect===void 0&&{isCorrect:e}},a={...n.items,[t]:r},i=Object.values(a).filter(m=>m.isCorrect).length,c={...n,items:a,correctlyAnswered:i,...!e&&{lastIncorrectCardId:t}},l=Vg(c),d=$g(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};function Kg(e){return e.trim()===""}var Z9=p(97115);const $=(0,Z9.setup)({el:"__",mod:"--",modValue:"-"}),X9=$("quiz"),q9=0,Gr=2,J9=e=>({start:e<Gr?0:e-Gr,end:e+Gr});function eL(e){return e+1}function tL(e){return e<q9+Gr}function nL(e,t){const{start:n,end:o}=J9(t);return{items:e.slice(n,o),startOffset:n}}function Yc({activeIndex:e,index:t}){return X9("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+Gr,future:t>e+Gr})}function sL(e,{lessonId:t,fromIndex:n,progressId:o}){const r=e.lessons[t];if(!hn(r))return e;const a=r.activeIndex??0;if(n!=null&&a!==n)return e;const i=o?(r.items[o]?.index??a)+1:a+1,c=Object.keys(r.items).length+1,l=Math.min(i,c),d={...r,activeIndex:l},h=xt({courseProgress:e,lessonId:t,updatedLessonProgress:d});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:h})}function oL(e,t){const n=e.lessons[t];if(!hn(n))return e;const o=Object.keys(n?.items)?.length,r={...n,activeIndex:o+1},a=xt({courseProgress:e,lessonId:t,updatedLessonProgress:r});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function rL(e,{lessonId:t,itemId:n}){const o=e.lessons[t];if(!hn(o))return e;const r=o.items[n];if(!r)return e;const a={...r,selectedIndices:[]},i=li({lessonProgress:o,itemId:n,updatedProgressQuizItem:a}),c=xt({courseProgress:e,lessonId:t,updatedLessonProgress:i});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function aL(e,{lessonId:t,lessonProgress:n}){return{...e,lessons:{...e.lessons,[t]:n}}}function iL(e,{lessonId:t,itemId:n,text:o}){const r=e.lessons[t];if(!hn(r))return e;const a=r.items[n];if(!a)return e;const i=typeof o=="string"&&Kg(o)?go(a,["text"]):{...a,text:o},c=li({lessonProgress:r,itemId:n,updatedProgressQuizItem:i}),l=xt({courseProgress:e,lessonId:t,updatedLessonProgress:c});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function cL(e,t){const n=e.lessons[t];if(!hn(n))return e;const o=vo(n.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),a={...go(n,["activeIndex","originalItemProgress","passed","percentComplete","questionList","questionsDrawn","reportResults","score"]),...n.passed!==!1&&{passed:n.passed},...n.isComplete!==!1&&{isComplete:n.isComplete},retryAttempts:(n.retryAttempts??0)+1,items:o},i=xt({courseProgress:e,lessonId:t,updatedLessonProgress:a});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function lL(e,{lessonId:t,itemId:n,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!hn(a))return e;const i=a.items[n];if(!i)return e;const c=r??i.shuffledAnswerIndices;if(o==null)return e;const l=Array.isArray(c)&&c[o]!=null?c[o]:o,d={...i,selectedIndex:l,...Array.isArray(c)&&{shuffledAnswerIndices:c}},h=li({lessonProgress:a,itemId:n,updatedProgressQuizItem:d}),m=xt({courseProgress:e,lessonId:t,updatedLessonProgress:h});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function dL(e,{lessonId:t,itemId:n,matches:o}){const r=e.lessons[t];if(!hn(r))return e;const a=r.items[n];if(!a)return e;const i={...a,matches:o},c=li({lessonProgress:r,itemId:n,updatedProgressQuizItem:i}),l=xt({courseProgress:e,lessonId:t,updatedLessonProgress:c});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function uL(e,{lessonId:t,timeRemaining:n}){const o=e.lessons[t];if(!hn(o))return e;const r={...o,timeRemaining:n},a=xt({courseProgress:e,lessonId:t,updatedLessonProgress:r});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function hL(e,{lessonId:t,itemId:n,isCorrect:o,finalRetryAttempt:r,passToContinue:a}){const i=e.lessons[t];if(!hn(i))return e;const c=i.passingScore??80,l=i.items[n];if(!l)return e;const d={...l,isCorrect:o,isComplete:!0},h={...i.items,[n]:d},m=Object.keys(h).length,f=Object.values(h).filter(y=>y.isCorrect).length,v=Object.values(h).filter(y=>y.isComplete).length,C=Math.round(f/m*100),g=Math.round(v/m*100);let b={...i,items:h,score:C,percentComplete:g};if(g===100){const y=C>=c,L=a?y:!0;$1(y,C,t,r),b={...b,passed:y,isComplete:L,reportResults:!0}}const x=xt({courseProgress:e,lessonId:t,updatedLessonProgress:b});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function mL(e,{lessonId:t,itemId:n,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!hn(a))return e;const i=a.items[n];if(!i)return e;const c=r??i.shuffledAnswerIndices;if(o==null)return e;const l=Array.isArray(c)&&c[o]!=null?c[o]:o,d=i.selectedIndices??[],m=d.includes(l)?d.filter(x=>x!==l):[...d,l],{selectedIndices:f,...v}=i,C=m.length>0?{...v,selectedIndices:m,...Array.isArray(c)&&{shuffledAnswerIndices:c}}:{...v,...Array.isArray(c)&&{shuffledAnswerIndices:c}},g=li({lessonProgress:a,itemId:n,updatedProgressQuizItem:C}),b=xt({courseProgress:e,lessonId:t,updatedLessonProgress:g});return bt({lessonId:t,prevCourseProgress:e,nextCourseProgress:b})}function li({itemId:e,lessonProgress:t,updatedProgressQuizItem:n}){return{...t,items:{...t.items,[e]:n}}}function fL(e,t){const{id:n,passed:o,passingScore:r,score:a,retryAttempts:i}=t,c=[o,i,a];if(!(c.length===3&&c.every(C=>C!=null)))return e;const d=e.lessons?.[n]?.items??{},h=Object.keys(d).length+1,m=e.lessons?.[n];if(!m)return e;const f={...m,isComplete:!0,activeIndex:h,reportResults:!0,passed:o,passingScore:r,percentComplete:100,retryAttempts:i,score:a};return{...e,lessons:{...e.lessons,[n]:f}}}function pL(e,{quizId:t,destinationId:n}){const o=Object.keys(e.lessons),r=o.findIndex(c=>c===t),a=o.findIndex(c=>c===n);return r===-1||a===-1||a<=r?e:o.slice(r+1,a).reduce((c,l)=>{const d=c.lessons[l];if(!d||d.isComplete)return c;const h=hn(d)?gL(d):S0(d),m=xt({courseProgress:c,lessonId:l,updatedLessonProgress:h});return bt({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function gL(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([n,o])=>[n,{...o,isComplete:!0,isCorrect:!0}]));return $1(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}var vL=p(58512),CL=p(2949),Be=p.n(CL),xL=p(309),Co=p.n(xL);const bL=e=>e!==void 0,Qg=Co()(bL,Be()(JSON.parse,vL.Base64.decode)),yL=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var SL=p(16109),ts=p.n(SL),LL=p(1554),zs=p.n(LL),TL=p(27494),yt=p.n(TL),kL=p(4656),Zc=p.n(kL),IL=p(22063),EL=p.n(IL),NL=p(85440),Yg=p.n(NL);const jL=["fromDashboard","locale","embed"];function wL(e,t){const n=typeof e=="function"?e(t):e;return typeof n=="string"?(0,Re.Rr)(n):n}function L0(e,t){const n=wL(e,t),o=new URLSearchParams(t?.search||""),r=new URLSearchParams(n?.search||"");for(const a of jL){const i=o.get(a);i&&!r.has(a)?r.set(a,i):r.has(a)&&!r.get(a)&&r.delete(a)}return{...n,search:r.toString()}}function Jt(){const e=(0,Re.Zp)(),t=(0,Re.zy)();return(0,u.useCallback)((n,o)=>{if(typeof n=="number")return e(n);const r=L0(n,t);return e(r,o)},[e,t])}function AL(e){function t(n){const o=(0,Re.zy)(),r=Jt(),a=(0,Re.g)(),[i]=(0,Re.ok)();return(0,s.jsx)(e,{...n,location:o,match:{params:a},navigate:r,queryParams:i})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}var RL=p(24277),PL=p.n(RL),Zg=p(64621),ML=p(72349),Xg=p.n(ML),OL=p(62220),T0=p.n(OL),BL=p(25784),xo=p.n(BL),DL=p(62197),Wr=p.n(DL),FL=p(18793),kt=p.n(FL),HL=p(6964),$L=p.n(HL),VL=p(77233),Xc=p.n(VL),Sle=p(67829),zL;function _L(...e){return Be()(...$L()(1,e))(Xc()(e))}function k0(e,...t){return kt()(...t)(e)}function Lle(e,...t){return zL(...t)(e)}const mn=()=>{};var UL=p(43734);const Tle="datadoghq.com",kle=Ne("SERVICE_ENV"),Ile=Ne("RISE_FRONTEND_SHA"),Ele=Ne("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",Nle=window.Cypress!=null,jle=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],qg={"Content-Type":"application/json"},GL=[(e,t)=>(t.Authorization=`Bearer ${gi()}`,JSON.stringify(e))],WL=Jn()(yt(),Ee(),xo()(["data","status","statusText"])),KL=kt()(xo()(["name","message","response"]),Hs()({response:WL})),QL=({baseURL:e,...t})=>Be()(_r()({headers:qg,transformRequest:GL}),_r()(t),Hs()({url:ts()(e)})),YL=({data:e,method:t,url:n})=>fetch(n,{body:JSON.stringify(e),headers:{...qg,Authorization:`Bearer ${gi()}`},keepalive:!0,method:t}).then(o=>o.json()).then(Wr()("data")),ZL=Jo().fromPromise(YL),XL=e=>({method:t,url:n})=>`${t}:${e}${n}`,qL=e=>{const t=new Error("Nil token detected");return Vs.L2.addError(t,e),Jo().Rejected(t)},JL=e=>t=>e.preRequest?e.preRequest(t):t,eT=e=>t=>e.postRequest?e.postRequest(t):t,tT=()=>yt()(gi()),nT=e=>(t,n)=>Xg()(t,XL(n),I0(vi,e)),I0=(e,t)=>n=>k0(n,JL(t),QL(t),Jn()(tT,qL,e),T0()(KL,Ze()("data")),eT(t)),sT=e=>({debounce:nT(e),send:I0(vi,e),sendWithKeepAlive:I0(ZL,e)}),oT=()=>document.visibilityState==="visible",rT=e=>Co()(oT,()=>e()),Jg=(e=>{document.addEventListener("visibilitychange",rT(e)),window.addEventListener("focus",()=>e())});p.dn(Jg);var aT=p(44113),fn=p.n(aT),iT=p(34469),Kr=p.n(iT),cT=p(92996),lT=p.n(cT),dT=p(14501),or=p.n(dT);const uT=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var hT;const e1=e=>{const t=e.user,n=t?.profile?.user_id,o=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:a}=uT(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:a,reach_user_id:void 0,a360_user_id:n,user_permissions:t?.permissions||[],session_id:e?.user?.session,subscription_id:t?.subscription?.subscription_id||o,tenant_id:o,risecom_billing_id:void 0,...t?.subscription?.plan&&{subscription:{plan:t.subscription.plan,trial_type:t.subscription.trial_type??null}},...e.ai?.subscription&&{ai:{plan:e.ai.subscription.plan,start_date:e.ai.subscription.start_date,end_date:e.ai.subscription.end_date,status:e.ai.subscription.status}},...e.l10nAuthoring?.subscription&&{localization:{end_date:e.l10nAuthoring.subscription.end_date,plan:e.l10nAuthoring.subscription.plan,start_date:e.l10nAuthoring.subscription.start_date,status:e.l10nAuthoring.subscription.status,billing_model:e.l10nAuthoring.subscription.billing_model}}}},Ale=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&hT(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},Rle=(e,t)=>{if(!t)return{};const n=e?.lessons?.[t];if(!n)return{};const o=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:n.type,lesson_position:o}},Ple=(e,t,n)=>{if(!t||!n)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const a=r.items.find(l=>l.id===n);if(!a)return{};const c=r.items.map(l=>l.id).indexOf(n)+1;return{block_id:n,block_type:a.type,block_variant:a.variant,block_family:a.family,block_position:c,block_created_via:a?.metadata?.createdVia??"manual"}},Mle=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:n,resourceType:o,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:n,interaction_set_task_resource_type:o,interaction_set_has_source_content:r}:{},mT=()=>{if(!navigator.userAgent)return"unknown";const t=new er.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},fT=()=>{if(!navigator.userAgent)return"unknown";const t=new er.UAParser(navigator.userAgent).getResult();return t.device?.model&&t.os?.version?t.os.version:t.browser?.version?t.browser.version:"unknown"},pT=()=>{if(!navigator.userAgent)return"desktop";const t=new er.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},gT=()=>{if(!navigator.userAgent)return"unknown";const t=new er.UAParser(navigator.userAgent).getResult();if(t.device?.vendor)return t.device.vendor;if(t.os?.name)switch(t.os.name){case"Mac OS":case"iOS":return"Apple";case"Windows":return"Microsoft";case"Android":return"Google"}return"unknown"},vT=()=>{if(!navigator.userAgent)return"unknown";const t=new er.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},t1=()=>{if(!navigator.userAgent)return"browser";const t=new er.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function CT(e){return"userAgentData"in e}const n1=()=>{if(CT(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},s1=()=>({name:mT(),version:fT(),type:pT(),manufacturer:gT(),model:vT()}),o1=()=>{const t=new URLSearchParams(window.location.search).get("query");return{referrer:document.referrer||null,search:t||null,url:window.location.href,path:window.location.pathname+window.location.search+window.location.hash}},r1=()=>navigator.userAgent||null,rr=(e,t=null)=>{const n={...e,context:{locale:navigator.language,device:s1(),channel:t1(),userAgentData:n1(),page:o1(),userAgent:r1(),...e.context},properties:{...t?e1(t):{},...e.properties}};return v0({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/analytics`,json:!0,data:n})},xT=Ne("SUBSCRIPTIONS_ENDPOINT"),bT=Ne("THREESIXTY_FRONTEND_URI"),yT=lT()(["error","status"],404),ST=Be()(Wr()("error"),Ze()("response")),LT=()=>window.location.href=bT,TT=[(e,t)=>(t.Authorization=`Bearer ${gi()}`,e)],kT=async e=>{const t=`${xT}/users/authorized_status`,n=await vi({transformRequest:TT,url:t}).toPromise().catch(ST),o=Be()(e,Yg()(a=>rr({event:"Unexpected Logout",payload:{category:"auth",data:a,detail:"Subscription Error"}})));return fn()([[yT,LT],[Kr()("error"),o],[or(),Ze()("data")]])(n)};var IT=p(40393),Mn=p.n(IT);function ns(e){return Mn()(e)}class ET extends Error{constructor(t="Assert Error",n){super(t,n)}}function Ble(e,t="Assertion Error"){if(!e)throw new ET(t)}const te={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},NT="#ff631e",Dle=3,Fle=17,Hle=32,$le=24,Vle=50,zle=.6,_le="right",jT="rounded",wT=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],Ule="#ffffff",Gle=h0()("color",wT),Wle="#000",Kle="#fff",Qle="Rise",ae=ns({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),di=ns({LARGE:null,MEDIUM:null,SMALL:null}),qc=ns({STEPPED:null,CONTINOUS:null}),E0=Mn()({NUMBERS:null,DOTS:null,NONE:null}),ar=ns({COMPACT:null,OVERLAY:null,SIDEBAR:null}),_s=Mn()({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),ir=Mn()({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),bo={FREE:"free",RESTRICTED:"restricted"},cr=Mn()({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),et=Mn()({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),ui=ns({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),Us=ns({FULL:null,FLOATING:null,FLOATING_FULL:null}),me=ns({ACCENT:null,CENTERED:null,CENTERED_ACCENT_TINT:null,CENTERED_OVERLAY:null,CENTERED_IMAGE:null,IMAGE:null,LEFT:null,LEFT_OVERLAY:null,SPLIT_LEFT:null,SPLIT_LEFT_IMAGE:null,SPLIT_RIGHT:null,SPLIT_RIGHT_IMAGE:null,TWO_THIRDS_LEFT_IMAGE:null,TWO_THIRDS_RIGHT_IMAGE:null,VIDEO:null,WHITE:null}),hi=ns({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),AT={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},Yle=!0,RT=hi.BOTTOM_RIGHT,Zle=[{text:"Top left",type:hi.TOP_LEFT},{text:"Top right",type:hi.TOP_RIGHT},{text:"Bottom left",type:hi.BOTTOM_LEFT},{text:"Bottom right",type:hi.BOTTOM_RIGHT}],Xle={default:[{text:"Centered",type:me.CENTERED},{text:"Centered overlay",type:me.CENTERED_OVERLAY},{text:"Left",type:me.LEFT},{text:"Left overlay",type:me.LEFT_OVERLAY},{text:"Split left image",type:me.SPLIT_LEFT_IMAGE},{text:"Split right image",type:me.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:me.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:me.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:me.CENTERED},{text:"Centered overlay",type:me.CENTERED_OVERLAY},{text:"Left",type:me.LEFT},{text:"Left overlay",type:me.LEFT_OVERLAY},{text:"Split left image",type:me.SPLIT_LEFT_IMAGE},{text:"Split right image",type:me.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:me.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:me.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:me.CENTERED},{text:"Centered overlay",type:me.CENTERED_OVERLAY},{text:"Left",type:me.LEFT},{text:"Left overlay",type:me.LEFT_OVERLAY},{text:"Split left",type:me.SPLIT_LEFT},{text:"Split right",type:me.SPLIT_RIGHT},{text:"Split left image",type:me.SPLIT_LEFT_IMAGE},{text:"Split right image",type:me.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:me.CENTERED},{text:"Centered overlay",type:me.CENTERED_OVERLAY},{text:"Centered image",type:me.CENTERED_IMAGE},{text:"Centered accent tint",type:me.CENTERED_ACCENT_TINT},{text:"Split left image",type:me.SPLIT_LEFT_IMAGE},{text:"Split right image",type:me.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:me.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:me.TWO_THIRDS_RIGHT_IMAGE}]},qle=null,Jle=null,ede=[{text:"Image",type:me.IMAGE},{text:"Accent",type:me.ACCENT},{text:"White",type:me.WHITE}],Qr={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"},ke=ns({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),PT=ns({ROUNDED:null,SQUARED:null}),MT=Mn()({ROUNDED:null,SQUARED:null}),OT=Mn()({FLOATING:null,FULL:null}),it=Mn()({ACCENT:null,DARK:null,LIGHT:null}),tde=[{value:ke.AUTO,label:"Auto"},{value:ke.DARK,label:"Dark"},{value:ke.LIGHT,label:"Light"}];var BT,DT;const a1=e=>e===l1,ss=e=>a1(e?.type),nde=e=>ss(e)&&e?.theme?.blockNavigationType===DT.STEPPED,FT=e=>BT(e)&&!!e.attachedToNextBlock;function sde(e){const t=[];let n=[];for(const o of e)n.push(o),FT(o.settings)||(t.push(n),n=[]);return n.length>0&&t.push(n),t}const ode=(e,t)=>n=>ss(n)?e:t,rde=e=>ss(e)?"microlearning":"course",HT=null,N0={guide:"Guide",presentation:"Presentation",video:"Video Training",scenario:"Scenario",microlearning:"Microlearning"},i1=e=>Object.prototype.hasOwnProperty.call(N0,e),Jc=e=>{const t=e?.outputType;return typeof t=="string"&&i1(t)?t:void 0},el=(e,t)=>e===l1&&t!==void 0,j0=e=>{const t=Jc(e?.experiments);return el(e?.type,t)&&t==="guide"},lr=e=>{const t=Jc(e?.experiments);return el(e?.type,t)&&t==="presentation"},Yr=e=>{const t=Jc(e?.experiments);return el(e?.type,t)&&t==="video"},tl=e=>{const t=Jc(e?.experiments);return el(e?.type,t)&&t==="scenario"},ade=({course:e,isCourseGenerationInProgress:t,isOnePage:n,lessonId:o})=>n&&!!o&&!t&&!lr(e)&&!tl(e)&&!Yr(e)&&!j0(e),$T=e=>typeof e=="string"&&i1(e)?N0[e]:N0.microlearning,ide=e=>e?HT.includes(e):!1;var VT,zT;const cde=null,On={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},nl={EDITOR:1,MANAGER:2,OWNER:3},_T={[nl.EDITOR]:"Author",[nl.MANAGER]:"Admin",[nl.OWNER]:"Owner"},lde=Object.values(nl).map(e=>({id:e,title:_T[e]})),dde=({name:e,isOnePage:t,outputType:n})=>{const o=t?zT(n):null,r={Admin:o?`${o} manager`:"Manager",Author:o?`${o} editor`:"Editor",Owner:o?`${o} owner`:"Owner"},a={Admin:o?`${o} manager`:"Course manager",Author:o?`${o} collaborator`:"Course collaborator",Owner:o?`${o} owner`:"Course owner"};return VT?r[e]:a[e]},ude="questionBanks",c1="2% 0px 2% 0px",hde=9,mde=13,fde=27,pde=32,gde=38,vde=40,xde=864e5*3,bde=100,l1="onePage",yo=Mn()({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),dr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},yde=Object.values(dr),Sde=null,St={DARK:"#000",LIGHT:"#fff"},w0={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},d1=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var UT;const Lde=e=>e.status==="active",GT=e=>e.status==="inactive",Tde=e=>e.plan==="individual",kde=e=>e.features?.enable_review===!0,WT=e=>e.features?.enable_rise===!0,Ide=e=>e.plan==="trial",KT=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,Ede=e=>e.plan==="team"||e.plan==="individual",Nde=e=>e.plan==="team"&&e.is_team_admin===!0,jde=e=>e.plan==="trial"&&e.is_team_admin===!0,wde=e=>{if(!e.end_date)return 0;const t=new Date(e.end_date);t.setUTCHours(0,0,0,0);const n=t.setDate(t.getDate()+1);return n&&(n.valueOf()-new Date().setUTCHours(0,0,0,0))/UT||0};var QT=p(7118),A0=p.n(QT),YT=p(13076),u1=p.n(YT),ZT=p(81233),mi=p.n(ZT),XT=p(66013),Nn=p.n(XT);const fi=(e,t)=>`${Ne("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,qT=e=>({large:fi(e,"large"),medium:fi(e,"medium"),micro:fi(e,"micro"),mini:fi(e,"mini"),small:fi(e,"small")}),JT=u1()({features:Nn()({},"features"),subscription:Zc()(["features"])}),ek=A0()([KT,GT,mi()(WT)]),tk="/auth-callback",h1="/auth-error",sl=()=>new Promise(e=>{if(!window.Osano)return e();if(window.Osano.cm.dialogOpen){const t=setTimeout(()=>{e()},1e4);window.Osano.cm.addEventListener("osano-cm-ui-changed",(n,o)=>{n==="dialog"&&o==="hide"&&(e(),clearTimeout(t))})}else e()}),R0=tk,nk=h1,sk=Ct,m1=()=>window.location.pathname===R0;let f1=!1,P0=!1;const ok=e=>{if(f1)return;const t=(0,Zg.A)();f1=!0,window.localStorage.setItem(t,e);const n=v9({client_id:Ne("OKTA_CLIENT_ID"),issuer:Ne("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${R0}`,response_mode:"fragment",scope:Ne("OIDC_SCOPE"),state:t,prompt:null});sl().then(()=>{window.location.href=n})},p1=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return ok(t)},rk=()=>Mg().catch(e=>{e.response?.status===404&&ur({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),ak=e=>(Ur("unauthorized",e),()=>{p9("unauthorized",e)}),ik=()=>{if(P0)return;const e=nr(),t=g0();yt()(e)?(rr({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),Vs.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),P0=!0,ur({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(rr({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),Vs.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),P0=!0,ci().then(()=>window.location.reload(!0)))},g1=async e=>{try{const[,t,n,o]=await ci(),{aid:r,content_team_admin:a}=o;if(rr({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),n9(r),m1()){e();return}const{first_name:i,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:qT(r),first_name:i,user_id:r,last_name:c,staff:d,content_team_admin:a},f={author:r,profile:m},v=()=>ur({onLogout:Oe()(null)}),C=b=>e({...f,...JT(b),launchdarkly:l,token:n}),g=await kT(v).then(Yg()(C)).catch(()=>e({...f,token:n}));if(ek(g)){rr({event:"Unexpected Logout",payload:{category:"auth",userId:nr(),subscription:g,detail:"Invalid Subscription"}}),Vs.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:nr(),detail:"Invalid Subscription"}),ur({onLogout:()=>window.location=`${Ne("THREESIXTY_FRONTEND_URI")}/rise`});return}Jg(ik)}catch(t){rr({event:"Unexpected Logout",payload:{category:"auth",userId:nr(),error:t,detail:"Error Resuming Session"}}),Vs.L2.addError(t,{type:"User Meta",userId:nr(),detail:"Error Resuming Session"}),ur({onLogout:()=>window.location.reload(!0)})}},v1=({onFetchTokens:e})=>{if(m1()){g1(e);return}const t=nr(),n=g0();if(yt()(t)||t!==n){sl().then(p1);return}g1(e)},ur=({onLogout:e,reason:t})=>{t&&rr({event:"Logout",payload:{category:"auth",userId:nr(),detail:t}});const n=Ne("RISE_AUTHORING_URI"),o=()=>sT({baseURL:n}).send({method:"DELETE",url:"/logout"}),r=()=>{s9(),o9(),Pg().then(e)};o().fork(a=>{console.error("Failed to log out of rise-authoring-api",a),r()},r)},ck=Be()(PL().parse,EL()(1,1/0)),lk=(e,t)=>{sl().then(()=>{const o=window.localStorage.getItem(t)||"/",r=o===e?"/":o;window.localStorage.removeItem(t),window.location.href=r})},dk=e=>()=>window.location.href=`${h1}?description=${e}`,uk=({location:e})=>()=>{const{hash:t,pathname:n}=e,{state:o,error:r,error_description:a}=ck(t);r?(Vs.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:a}),ur({onLogout:dk(a),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${a}`})):v1({onFetchTokens:()=>lk(n,o)})},hk=AL(e=>((0,u.useEffect)(uk(e),[]),null)),mk=({dispatch:e,loadProfileOKTA:t})=>n=>{const o=Zc()(["token"],n);Be()(e,t)(o)};var fk=p(76871),pk=p.n(fk),gk=p(43420),So=p.n(gk),vk=p(21239),Lt=p.n(vk),Ck=p(8119),C1=p.n(Ck),xk=p(53883),pi=p.n(xk);const ol=async()=>{await sl();const[e,t]=vt()(encodeURIComponent,C1()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},x1=()=>{window.location.href="/"},Rde=null,Pde=null,Mde=Ct,Ode=ol,bk=Pg,Bde=()=>Mg().catch(()=>bk()),Dde=()=>mn,yk=kt()(Nn()([],"roles"),pi()(So()("author"),x1)),b1=kt()(Lt()("",["subscription","status"]),pi()(So()(pk(),["active","in_trial","non_renewing"]),x1)),Sk=()=>window.location.reload(),Fde=async({onFetchTokens:e})=>{try{const[t,n]=await ci(),{launchdarkly:o,riseId:r,sub:a,staff:i,subscription:c}=n,l={staff:i,user_id:r||a};return b1(n),e({author:l.user_id,launchdarkly:o,profile:l,subscription:c,token:t}),Ur("change:roles",yk),Ur("change:status",b1),Ur("change:subdomain",Sk),Ur("unauthorized",ol),Ur("session:closed",ol),t}catch{ol()}};var Hde;const{callbackComponent:$de,callbackPath:Vde,getToken:gi,initAuth:zde,login:_de,logout:Ude,onSessionExpired:Gde,refreshSession:Wde,request:vi}=Xo;var y1,S1;const L1=`${Ne("RBC_URI")}/api/partner_content`,Lk=null,Tk=ts()(`${L1}/`),M0={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${gi()}`,e)],headers:{"Content-Type":"application/json"}},Yde=()=>S1({...M0,url:Lk}).toPromise().then(y1(["data","types"])),Zde=e=>S1({...M0,url:Tk(e)}).toPromise().then(y1(["data","content"])),kk=e=>vi({method:"POST",url:L1,data:JSON.stringify({ids:e}),...M0}).map(zs()(["data","content"]));var Ik=p(17193),Zr=p.n(Ik);const T1=Ne("SERVICE_ENV")==="prod",rl=T1?"com":"zone",Ek=kt()(JSON.stringify,Zr()(new RegExp(`https://images.riseusercontent.${rl}/`,"g"),`${Ne("IMAGES_URI")}/`),Zr()(new RegExp(`https://riseusercontent.${rl}/`,"g"),`${Ne("CDN_USER_CONTENT_URI")}/`),Zr()(new RegExp(`https://video.rise.${rl}/`,"g"),`https://video.riseusercontent.${rl}/`),Co()(Oe()(!T1),Zr()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var Nk=p(78219),jk=p.n(Nk),wk=p(47258),en=p.n(wk),Ak=p(5136),wt=p.n(Ak),Rk=p(15489),al=p.n(Rk),Pk=p(55066),k1=p.n(Pk);const Mk=xo(),O0=Ss(),B0=es(),D0=k1(),I1=_r(),Ci=Ze(),Ok=Hs(),F0=vt(),il=e=>e!=null&&typeof e=="object",Bk=e=>t=>yt()(t)?t:e(t),xi=e=>!!e,E1={a:["activeIndex",Ee()],vp:["audioVideoPlayhead",Number],c:["isComplete",xi],n:["correctlyAnswered",Ee()],p:["percentComplete",Ee()],r:["retryAttempts",Ee()],s:["score",Ee()],t:["currentTime",Ee()],v:["percentViewed",Ee()],rr:["reportResults",Ee()],pq:["passed",Ee()],ps:["passingScore",Ee()],qd:["questionsDrawn",Ee()],ql:["questionList",Bk(vt()(vt()(Ee())))],qt:["timeRemaining",Number]},Dk=e=>(t,n)=>{const[o,r]=E1[n];return en()(o,r(t),e)},N1=e=>(t,n)=>{const[o,r]=zk[n],a=n==="i"?H0(t)(Ci("items",e)):r(t);return{[o]:a}},Fk=e=>t=>{const n=e?.[String(t.index)];if(yt()(n))return t;const o=O0(N1(t),il(n)?n:{}),r=D0(B0(o).filter(a=>a!=null&&typeof a=="object"));return I1(t,r)},H0=e=>t=>F0(Fk(il(e)?e:{}),il(t)?t:{}),Hk=e=>{const t=O0(N1(null),il(e)?e:{});return D0(B0(t).filter(n=>n!=null&&typeof n=="object"))},$k=e=>t=>{const n=Ci("i",e),o=Ci("items",t),r=Mk(al()(E1),e),a=O0(Dk(t),r);let i=D0(B0(a).filter(l=>l!=null&&typeof l=="object"));if(wt()(n)||(i=en()("items",H0(n??{})(o),i)),i=I1(t,i),!!jk()([Kr()("ql"),qe()("qd",!0),()=>!yt()(n)])(e)){const l=F0(Hk,n??{});return en()("originalItemProgress",l,i)}return i},Vk=(e,t)=>{const n=Ci("lessons",t),o=a=>{const i=Ci(String(a.index),n);return yt()(i)?a:$k(i??{})(a)};if(wt()(n))return e;const r=Ok({lessons:a=>F0(o,a)},e);return en()("percentComplete",Nn()(0,"p",t),r)},zk={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",Ee()],c:["isComplete",xi],k:["isCorrect",xi],is:["isSubmitted",xi],v:["isViewed",xi],i:["items",H0],pv:["percentViewed",Ee()],m:["matches",Ee()],sr:["response",Ee()],r:["retryAttemptCount",Number],s:["selectedIndex",Ee()],x:["selectedIndices",Ee()],sa:["shuffledAnswerIndices",Ee()],t:["text",Ee()]};var _k=p(87396),Lo=p.n(_k),Uk=p(56890),j1=p.n(Uk);const w1=xo(),Gk=j1(),A1=Ss(),$0=es(),V0=k1(),z0=Ze(),Wk=vt(),Kk=e=>e!=null&&typeof e=="object",R1=e=>!!Lo()(yt(),wt())(e),Qk=e=>t=>yt()(t)?t:e(t),P1={activeIndex:["a",Ee()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ee()],currentTime:["t",Ee()],isComplete:["c",Number],passingScore:["ps",Ee()],percentComplete:["p",Ee()],percentViewed:["v",Ee()],retryAttempts:["r",Ee()],score:["s",Ee()],questionsDrawn:["qd",Ee()],questionList:["ql",Qk(vt()(vt()(Ee())))],reportResults:["rr",Ee()],passed:["pq",Ee()],timeRemaining:["qt",Number]},Yk=(e,t)=>{const[n,o]=O1[t];return{[n]:o(e)}},Zk=e=>{const t=w1(al()(O1),e),n=Gk(wt(),t),o=V0($0(A1(Yk,n)).filter(r=>r!=null&&typeof r=="object"));return wt()(o)?o:Wr()(String(z0("index",e)),o)},M1=e=>{const t=Wk(Zk,Kk(e)?e:{});return V0($0(t).filter(n=>n!=null&&typeof n=="object"))},Xk=(e,t)=>{const[n,o]=P1[t];return{[n]:o(e)}};function qk(e){const t=z0("items",e),n=z0("index",e),o=R1(t)?t:M1(t??{}),r=V0($0(A1(Xk,w1(al()(P1),e))).filter(i=>i!=null&&typeof i=="object")),a=R1(o)?r:en()("i",o,r);return Wr()(String(n),a)}const Jk=e=>Wr()("p",Nn()(0,"percentComplete",e)),O1={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ee()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",Ee()],isViewed:["v",Number],items:["i",M1],matches:["m",Ee()],percentViewed:["pv",Ee()],retryAttemptCount:["r",Number],selectedIndex:["s",Ee()],selectedIndices:["x",vt()(Number)],shuffledAnswerIndices:["sa",vt()(Number)],text:["t",Ee()],response:["sr",Ee()]},e8=e=>`${Ne("CDN_USER_CONTENT_URI")}/${e}`,t8=()=>!!window.shareId,B1=()=>!!window.contentId,D1=()=>!!window.snapshotId,n8=()=>!!window.shareId&&!!window.hasPassword,s8=B1()?Ek:e=>e,o8={fetch:()=>_0.isExport?.()||window.courseData||window.course?yL(Qg,{}):v0({method:"GET",url:window.shareId?`${Ne("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:B1()?`${Ne("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:D1()?`${Ne("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ne("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then(y9).then(t=>typeof t=="object"?t:Qg(t)).then(s8),fetchPartnerContent:e=>_0.isExport?.()||window.partnerContent?window.partnerContent.content:kk(e).toPromise(),getEnv:Ne,isPasswordProtected:n8,isShare:t8,isSnapshotPreview:D1,resolvePath:e8,verifySharePassword:e=>v0({method:"POST",url:`${Ne("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},r8=(e,{id:t,type:n,...o})=>n==="quiz"?fL(e,{id:t,...o}):Wg(e,t),a8=(e,t)=>e+((t||{}).c||0),i8=(e,t)=>(n,{id:o,type:r,...a})=>t.lessons[o]?{...n,...e(r8(t,{id:o,type:r,...a}).lessons[o])}:n,c8=(e,t,n)=>{const o=t.reduce(i8(e,n),{}),r=Object.keys(n.lessons||{}).length,a=Object.values(o).reduce(a8,0),i=Math.round(a/r*100);return{lessons:o,p:i}};window.Rise=Object.assign(window.Rise||{},{completeLessons:c8,decodeCourseProgress:Vk,encodeCourseProgress:Jk,encodeLessonProgress:qk});const _0={...o8,...window.Runtime??{}},Se=_0,l8=e=>Se.getMasteryScore!=null?Se.getMasteryScore(e):e.passingScore,d8=e=>{if(Se.onCreateHistory!=null)return Se.onCreateHistory(e)},F1=(e={},t)=>Se.fetch!=null?Promise.resolve(t==null?Se.fetch():Se.fetch(t)):Promise.resolve(e),u8=(e=[])=>{if(Se.fetchPartnerContent!=null)return Se.fetchPartnerContent(e)},h8=e=>{if(Se.bookmark!=null)return Se.bookmark(e)},H1=e=>Se.getProgress!=null?Se.getProgress(e):e,m8=e=>Se.setLessonComplete!=null?Se.setLessonComplete(e):e,f8=e=>Se.setLessonProgress!=null?Se.setLessonProgress(e):e,p8=(e,t)=>Se.setCourseProgress!=null?Se.setCourseProgress(e,t):e,g8=e=>{if(Se.finish!=null)return Se.finish(e)},$1=(e,t,n,o)=>{Se.finishQuiz!=null&&Se.finishQuiz(e,t,n,o)},v8=(e,t,n,o)=>{Se.finishStoryline!=null&&Se.finishStoryline(e,t,n,o)},V1=()=>Se.isComplete!=null?Se.isComplete():null,C8=()=>Se.isExport!=null?Se.isExport():!1;function z1(){if(Se.isExport!=null){const e=window.partnerContent?.content;return Se.isExport()&&!!e}return!1}const U0=()=>Se.isShare!=null?Se.isShare():!1,x8=()=>Se.isSnapshotPreview!=null?Se.isSnapshotPreview():!1,_1=()=>Se.isPasswordProtected!=null?Se.isPasswordProtected():!1,U1=e=>{const t=e||"";return Se.resolvePath!=null?t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:Se.resolvePath(t):t.startsWith("data:")||t.startsWith("http")||t.startsWith("//")?t:`/${t}`},b8=e=>Se.verifySharePassword!=null?Se.verifySharePassword(e):Promise.resolve({isValid:!0}),G1=e=>{if(Se.reportAnswer!=null){const{id:t,isCorrect:n,isUnfinished:o=!1,item:r,itemProgress:a,duration:i,retryAttempts:c,title:l}=e,{id:d,title:h,type:m}=r;return Se.reportAnswer({id:t,type:m,isCorrect:n,itemId:d,questionTitle:En(h),quizTitle:En(l),retryAttempts:c,answers:_S(r),correctResponse:US(r),response:GS({isUnfinished:o,item:r,itemProgress:a}),isUnfinished:o,latency:zS(i)})}return!1},W1=e=>{if(Se.startLesson!=null)return Se.startLesson(e)},y8=e=>{Se.startQuiz!=null&&Se.startQuiz(e)},cl=e=>{if(Se.endLesson!=null)return Se.endLesson(e)},S8=()=>{if(Se.getLocale!=null)return Se.getLocale()},L8=e=>{if(Se.setLocale!=null)return Se.setLocale(e)},{browser:K1,os:Q1}=new er.UAParser(window.navigator.userAgent).getResult(),T8=e=>{if(Se.sendTelemetry!=null)return Se.sendTelemetry({...e,browser:{name:K1.name??"",version:K1.version??""},os:{name:Q1.name??"",version:Q1.version??""}})};var Y1=p(99953),k8=p(94789),I8=p(96719),E8=p(51133),N8=p(79968),j8=p(56680),G0=p(19268),W0=p(29160),w8=p(27765);Y1.A.register(k8.A),Y1.A.register(I8.A);function Xr(...e){try{return(0,E8.Ay)(...e)}catch{return null}}const os=(e,t)=>{const n=Xr(t);return n==null?null:(0,W0.A)((0,G0.jh)(n,Xr("#ffffff"),e),{format:"hex",collapse:!1})},K0=e=>os(.9,e);var A8=p(45524),tn=p.n(A8),R8=p(17618),P8=p.n(R8),M8=p(3165),Q0=p.n(M8),Qt=p(19410);const O8=Be()(So()(".svg"),e=>e??"",Nn()("","originalUrl")),B8=Jn()(O8,Oe()({width:"500rem"}),Oe()({})),To=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},Z1=e=>To(e)||void 0,X1=e=>e?"img":void 0,q1=e=>kt()(Nn()("","originalUrl"),t=>t??"",Q0()("."),Xc(),tn()(e)),D8=q1("svg"),tue=q1("gif"),F8=/\.svg$/i,J1=e=>F8.test(e),H8=null,nue=e=>H8[e]||"left",$8=(e,t)=>{const n=P8()(e,t);return n.media.image.key===t.media.image.key&&Object.assign(n.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),n},V8=({src:e,alpha:t})=>({alpha:t,media:{image:{key:z8(e),src:e}}}),z8=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,_8=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),U8=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),ev=(e,t)=>(n,o)=>{const r=n[t];if(n?.theme){const a=o?o(r?.media):r?.media;if((0,Qt.uW)(a))return r;const i={...r,media:{...a}},c=V8(e(n.theme));return $8(i,c)}else return r},tv=ev(_8,"coverImage"),nv=ev(U8,"lessonHeaderImage"),sue=async e=>{const t=new Image;return t.src=e,await t.decode(),t},Qe={accentContrast:ke.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:ke.AUTO,blockBackgroundType:ae.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:PT.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:ke.AUTO,blockTextBackgroundType:ae.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:MT.ROUNDED,buttonNavigationStyle:OT.FULL,buttonScheme:ui.LIGHT,colorAccent:NT,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:me.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:ke.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:it.DARK,lessonHeaderSize:di.MEDIUM,lessonHeaderStyle:ae.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:_s.LIGHT,navigationType:ar.SIDEBAR,progressIndicatorStyle:et.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:te.RISE_CLASSIC},oue=null,G8=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","theme","uiTypeface"],W8=e=>e.theme?.colorAccent||e.color||Qe.colorAccent,sv=e=>e.theme?.navigationRestricted??Qe.navigationRestricted?bo.RESTRICTED:bo.FREE,ov=e=>e.theme?.sidebarStartsOpen??Qe.sidebarStartsOpen?Qr.OPEN:Qr.CLOSED,K8=e=>e.theme?.showLessonCount??e.showLessonCount??Qe.showLessonCount,Q8=({sidebarMode:e})=>e!==Qr.HIDDEN,Y8=({navigationMode:e})=>e===bo.RESTRICTED,Z8=({sidebarMode:e})=>e===Qr.OPEN,X8=e=>e.coverImage?.media?.image?_s.LIGHT_IMAGE:_s.LIGHT,q8=e=>e.coverImage?.media?.image?me.LEFT_OVERLAY:me.LEFT,Gs=(e,t)=>t[e]??t.theme?.[e]??Qe[e],rv=e=>{const t=ov(e),n=sv(e),o={allowSearch:Gs("allowSearch",e),animateBlockEntrance:Gs("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:Gs("compactShowLessonCount",e),coverImageDefault:null,coverPageType:q8(e),enableVideoPlaybackSpeed:Gs("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:Gs("markComplete",e),navigation:Q8({sidebarMode:t}),navigationSectionsExpanded:Gs("navigationSectionsExpanded",e),navigationRestricted:Y8({navigationMode:n}),navigationStyle:X8(e),showAuthor:Gs("showAuthor",e),showLessonCount:Gs("showLessonCount",e),showNavigationButtons:Gs("showNavigationButtons",e),sidebarStartsOpen:Z8({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...Qe,...o};return{...e,theme:{...r,isLegacyCourse:!0}}},Y0=e=>{const t=W8(e),n={allowSearch:e.theme?.allowSearch??Qe.allowSearch,animateBlockEntrance:e.theme?.animateBlockEntrance??Qe.animateBlockEntrance,buttonNavigationStyle:e.theme?.buttonNavigationStyle??Qe.buttonNavigationStyle,buttonScheme:e.theme?.buttonScheme??Qe.buttonScheme,color:t,colorAccentTint:t?K0(t):void 0,coverImage:tv(e),coverPageType:e.theme?.coverPageType??Qe.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??Qe.enableVideoPlaybackSpeed,lessonHeaderImage:nv(e),lessonHeaderSize:e.theme?.lessonHeaderSize??Qe.lessonHeaderSize,lessonHeaderStyle:e.theme?.lessonHeaderStyle??Qe.lessonHeaderStyle,markComplete:e.theme?.markLessonsComplete??Qe.markLessonsComplete,navigation:e.theme?.navigation??Qe.navigation,navigationSectionsExpanded:e.theme?.navigationSectionsExpanded??Qe.navigationSectionsExpanded,navigationMode:sv(e),navigationRestricted:e.theme?.navigationRestricted??Qe.navigationRestricted,navigationStyle:e.theme?.navigationStyle??Qe.navigationStyle,navigationType:e.theme?.navigationType??Qe.navigationType,progressIndicatorStyle:e.theme?.progressIndicatorStyle??et.THEME_DEFAULT,themeId:e.theme?.themeId??Qe.themeId,showAuthor:e.theme?.showAuthor??Qe.showAuthor,showLessonCount:K8(e),showStartButton:e.theme?.showStartButton??Qe.showStartButton,sidebarMode:ov(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??Qe.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??Qe.showNavigationButtons};return{...e,...n}},J8=({course:e,updates:t})=>{const n=Object.fromEntries(Object.entries(t||{}).filter(([r])=>G8.includes(r))),o={...e,...n};return Y0(o)},eI={padding:"medium",alignment:"left"},tI={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},rs=(e,t=0)=>`item_${e}_${t}`,ll=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),nI=e=>d1.some(t=>t===e),av=e=>ll(e)&&(typeof e.id=="string"||typeof e.id=="number")&&nI(e.type),bi=e=>Array.isArray(e)?e.filter(ll):[],iv=(e,t)=>[{id:rs(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],hr=e=>({...eI,...tI[e]??{}}),sI=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,cv=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const n={};for(const[o,r]of Object.entries(t))n[o]=sI(r);return n}return t}),oI=e=>["Introduction","Summary"].map((t,n)=>({id:rs(`${e}_process`,n),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),rI=(e,t)=>[{id:rs(`${t}_text`,0),paragraph:e}],aI=(e,t)=>[...oI(t),...e],iI=(e,t)=>[{id:rs(`${t}_video`,0),caption:"",media:e}],cI=(e=[],t)=>({family:"multimedia",id:rs(`${t}_embed`,0),items:e.length?e:iv("embed",t),media:{},settings:hr("embed"),type:"multimedia",variant:"embed"}),lI=(e,t,n)=>({family:"interactive-fullscreen",id:rs(`${n}_labeledgraphic`,0),items:e,media:t,settings:hr("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),dI=(e,t)=>({family:"interactive-fullscreen",id:rs(`${t}_process`,0),items:cv(e),media:{},settings:hr("process"),type:"interactive",variant:"process"}),uI=({items:e,piles:t},n)=>({family:"interactive-fullscreen",id:rs(`${n}_sorting`,0),items:e,media:{},piles:t,settings:hr("sorting"),type:"interactive",variant:"sorting"}),hI=(e,t)=>({family:"text",id:rs(`${t}_text`,0),items:cv(e),settings:hr("paragraph"),type:"text",variant:"paragraph"}),mI=(e,t)=>({family:"interactive-fullscreen",id:rs(`${t}_timeline`,0),items:e,media:{},settings:hr("timeline"),type:"interactive",variant:"timeline"}),fI=(e,t={},n)=>({family:"multimedia",id:rs(`${n}_video`,0),items:ll(e)&&e.video?iI(e,n):iv("video",n),media:{},settings:{...ll(t)?t:{},...hr("video")},type:"multimedia",variant:"video"}),pI=(e,t)=>{const n=bi(e.items);return cI(n.map(({icon:o,...r})=>r),t)},gI=(e,t)=>lI(bi(e.items).map(({hasMedia:n,...o})=>o),e.media,t),vI=(e,t)=>{const n=bi(e.items).map(o=>({...o,isHidden:!1,type:"step"}));return dI(aI(n,t),t)},CI=(e,t)=>mI(bi(e.items).map(({linePosition:n,...o})=>o),t),xI=(e,t)=>hI(rI(e,t),t),bI=(e,t)=>{const n=e.type;switch(n){case"embed":return pI(e,t);case"map":return gI(e,t);case"process":return vI(e,t);case"sorting":return uI({items:bi(e.items),piles:e.piles},t);case"timeline":return CI(e,t);case"screencast":case"slidecast":case"video":return fI(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${n}`)}},yI=e=>av(e),SI=e=>{if(!av(e))return e;const t=String(e.id),n={description:"",icon:"Article",type:"blocks"},o=[bI(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&o.unshift(xI(r,`${t}_desc`)),{...e,...n,items:o,media:{}}},lv=e=>`rise/rise-com/${e}`,dv=lv("FAVORITE_ADDED"),uv=lv("FAVORITE_REMOVED"),LI=()=>(0,Ce.action)(dv,void 0),TI=()=>(0,Ce.action)(uv,void 0),hv=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),mr=(e=>`rise/status/${e}`)("SET_LOADED"),kI=(e,t)=>({...e,...t}),II={connection:"connected",courseLoaded:!1,fatalError:!1,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},EI=(0,Ce.handle)(II,{[mr]:kI}),NI=(e=!1)=>(0,Ce.action)(mr,{fontsLoaded:e}),jI=(e=!1)=>(0,Ce.action)(mr,{courseLoaded:e}),wI=(e=!1)=>(0,Ce.action)(mr,{coverLoaded:e}),AI=(e=!1)=>(0,Ce.action)(mr,{notFound:e}),RI=(e=!1)=>(0,Ce.action)(mr,{fatalError:e}),mv=(e=!1)=>(0,Ce.action)(mr,{partnerContentLoaded:e}),PI=(e=[],t)=>t?.partnerContentId?e.concat(t.partnerContentId):e,MI=(e,t)=>t?.items?.reduce(PI,e)??e,OI=(e,t)=>t?.items?.reduce(MI,e)??e,BI=({course:e,lessons:t})=>{const n=t?.reduce(OI,[])||[],o=e?.partnerContentId||null,r=o?[o]:[],a=new Set([...n,...r]);return Array.from(a)},DI=e=>typeof e=="string"&&e.length>0,iue=`${Ne("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,cue=Mn()({ACTIVE:null,PREVIEW:null}),lue=({themeCoverImage:e,coverImageDefault:t})=>DI(t)?t:e,FI=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),pn={DRAW_FROM_QUESTION_BANK:"DRAW_FROM_QUESTION_BANK",FILL_IN_THE_BLANK:"FILL_IN_THE_BLANK",MATCHING:"MATCHING",MULTIPLE_CHOICE:"MULTIPLE_CHOICE",MULTIPLE_RESPONSE:"MULTIPLE_RESPONSE"},fr={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},HI={CONTINUE:"continue",NONE:""},Pe={ALL:"all",NONE:"none",INCORRECT:"incorrect"},due=10,uue=80,hue=500;var mue;const $I=fn()([[A0()([tn()(!0),tn()(Pe.ALL)]),Oe()(Pe.ALL)],[A0()([tn()(!1),tn()(Pe.NONE)]),Oe()(Pe.NONE)],[tn()(Pe.INCORRECT),Oe()(Pe.INCORRECT)],[or(),Oe()(Pe.ALL)]]),fue="draw from question bank",pue="fillin",gue="matching",vue="multiple choice",Cue="multiple response",xue=null;var VI=p(92324),Z0=p.n(VI);const X0={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},pr={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},gn=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,yi="progress-summary",fv=gn(yi),q0="lesson:",dl="#/lessons/",J0="/lessons/",bue=e=>`${dl}${e}`,yue=e=>e.startsWith(q0)||e.startsWith(dl)||e.startsWith(J0),Sue=e=>e.startsWith(q0)?e.slice(q0.length):e.startsWith(dl)?e.slice(dl.length).split("/")[0]:e.startsWith(J0)?e.slice(J0.length).split("/")[0]:e,zI=e=>e.type===X0.SECTION,_I=e=>e.type===X0.QUIZ,UI=e=>e.settings?.passToContinue===!0,pv=e=>e?.items?.find(t=>t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer),qr=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),GI=e=>e!=null&&e.type==="blocks",WI=e=>{const t=Z0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((n,o)=>(o!=null&&n.push(KI(o)),n),[])),t},KI=e=>{const t=Z0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var QI=p(11620),YI=p.n(QI);const gv="^1.8.0";class eh extends Error{}function ZI(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new eh("Missing Runtime.version");if(!YI()(e.version,gv))throw new eh(`Runtime.version ${e.version} does not satisfy ${gv}`)}catch(t){console.warn(t)}}const Jr="rise/course/LOAD_COURSE",XI="rise/course/UPDATE_COMPLETED_AT",ul="rise/course/UPDATE_COURSE_PREVIEW",vv="rise/course/UPDATE_LESSON_PREVIEW",th="rise/course/APPLY_CHANGESET";let nh;(async()=>{try{({applyReviewDataToManifest:nh}=await p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)))}catch{}})();const Si=vS(),qI=e=>{if("settings"in e&&e.settings&&Vt(e.settings)&&"revealAnswers"in e.settings){const n=e.settings;return{...e,settings:{...e.settings,revealAnswers:$I(n.revealAnswers)}}}return e},JI=e=>GI(e)?WI(e):e,Cv=e=>JI(qI(e)),eE=e=>({...e,lessons:e.lessons?.map(Cv)||[]}),tE=e=>{const t=e.lessons?.filter(n=>n.type!=="section")||[];return{...e,lessonsOnly:t}},nE=e=>e.theme==null,sE=e=>Y0(rv(e)),oE=e=>nE(e)?sE(e):Y0(e),rE=e=>FI(oE(e)),aE=(e,t)=>{let n=(0,Vr.TJ)(["course"],t,e).result;const o=(0,Vr.TJ)(["lessons"],t,n.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&n.mondrian&&nh&&(n={...n,mondrian:nh(n.mondrian,t)}),{...n,lessons:o}},iE=e=>({...e,lessons:e.lessons?.map(SI)||[]}),cE=(e,{completedAt:t,course:n,favoritedAt:o,riseComCurrentUser:r,riseComCourseId:a,riseComEnrollmentType:i,riseComLearningPathId:c})=>{const l=eE(n),d=tE(l),h={...d,theme:d.theme??rv(d).theme};return{...rE(h),completedAt:t,favoritedAt:o,riseComCourseId:a,riseComEnrollmentType:i,riseComCurrentUser:r,riseComLearningPathId:c}},lE=e=>({...e,favoritedAt:new Date}),dE=e=>({...e,favoritedAt:null}),uE=e=>({...e,completedAt:new Date().toISOString()}),hE={[dv]:lE,[uv]:dE,[Jr]:cE,[XI]:uE,[ul]:(e,{course:t})=>t,[vv]:(e,{lessons:t})=>({...e,lessons:t.map(Cv)}),[th]:aE},mE=(0,Ce.handle)({},hE),xv=e=>t=>{CE(t)?e(AI(!0)):t instanceof eh&&(e(RI(!0)),console.error(t))},fE=e=>t=>t([{type:hv,payload:e},mv(!0)]),pE=Jo().fromPromise(async(...e)=>await u8(...e)),gE=e=>e.length===0?mv(!0):pE(e).map(fE),vE=e=>hl(e)===401||sh(e)&&hl(e.response)===401,CE=e=>hl(e)===404||sh(e)&&hl(e.response)===404,hl=e=>sh(e)?e.status??e.statusCode:void 0,sh=e=>e!=null&&typeof e=="object",xE=e=>t=>{const{course:n}=t,o=iE(n),r=BI({course:o,lessons:o.lessons});e([Si(Jr,{...t,course:o,_originalLessons:n.lessons}),jI(!0),gE(r)])},bE=e=>async t=>{let n;try{ZI(window.Runtime),n=e?.password!=null?await F1(void 0,{password:e.password}):await F1()}catch(o){if(e?.onUnauthorized!=null&&vE(o)){e.onUnauthorized();return}e?.onError?.(),await xv(t)(o);return}e?.onAuthorized?.();try{xE(t)(n),T8(n)}catch(o){await xv(t)(o)}},yE=Si(Jr),SE=Si(ul),LE=Si(vv),TE=Si(th),kE=(e,{labelSet:t})=>({...e,...t}),IE=(0,Ce.handle)({},{[Jr]:kE}),Ws=e=>`rise/course/${e}`,bv=Ws("BLOCKS_LESSON_COMPLETE"),yv=Ws("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),Sv=Ws("BLOCKS_LESSON_RESET"),Lv=Ws("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),Tv=Ws("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),kv=Ws("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),Iv=Ws("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),Ev=Ws("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),Nv=Ws("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),ml=(0,Ce.action)(bv),EE=(0,Ce.action)(yv),NE=(0,Ce.action)(Sv),jE=(0,Ce.action)(Lv),fl=(0,Ce.action)(Tv),wE=(0,Ce.action)(kv),AE=(0,Ce.action)(Iv),RE=(0,Ce.action)(Ev),PE=(0,Ce.action)(Nv),Bn=e=>`rise/course/${e}`,jv=Bn("QUIZ_LESSON_ADVANCE_STEP"),wv=Bn("QUIZ_LESSON_APPLY_SKIP"),Av=Bn("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),Rv=Bn("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),Pv=Bn("QUIZ_LESSON_RESTART"),Mv=Bn("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),Ov=Bn("QUIZ_LESSON_SET_ANSWER_MATCHES"),Bv=Bn("QUIZ_LESSON_SET_ANSWER_TEXT"),Dv=Bn("QUIZ_LESSON_ADVANCE_TO_END"),Fv=Bn("QUIZ_LESSON_SET_TIME_REMAINING"),Hv=Bn("QUIZ_LESSON_SUBMIT_ANSWER"),$v=Bn("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),oh=(0,Ce.action)(jv),ME=(0,Ce.action)(Dv),Vv=(0,Ce.action)(Pv),OE=(0,Ce.action)(wv),zv=(0,Ce.action)(Mv),_v=(0,Ce.action)(Bv),Uv=(0,Ce.action)($v),BE=(0,Ce.action)(Fv),Gv=(0,Ce.action)(Ov),rh=(0,Ce.action)(Hv),DE=(0,Ce.action)(Av),FE=(0,Ce.action)(Rv),ah=e=>e&&typeof e=="object"&&e.type&&d1.includes(e.type),HE=(e,t)=>{const n=new Map;return e.forEach(o=>{if(yI(o)){const r=t.find(a=>String(a.id)===String(o.id));r&&r.type==="blocks"&&n.set(String(o.id),String(r.id))}}),n},$E=(e,t)=>{const n={id:String(e.id),index:e.index,type:"blocks",items:{}};return typeof e.isComplete=="boolean"&&(n.isComplete=e.isComplete),typeof e.percentComplete=="number"&&(n.percentComplete=e.percentComplete),t.type==="blocks"&&t.items&&t.items.forEach((o,r)=>{if(o?.id!=null&&(n.items[o.id]={id:o.id,index:r,isComplete:e.isComplete===!0&&r===0,items:o.items?{}:void 0},o.items&&Array.isArray(o.items))){const a={};o.items.forEach((i,c)=>{i?.id!=null&&(a[i.id]={id:i.id,index:c,isComplete:e.isComplete===!0})}),Object.keys(a).length>0&&(n.items[o.id].items=a)}}),n},VE=(e,t)=>{const n=new Set(t.map(r=>String(r.id))),o=[];return Object.values(e.lessons).forEach(r=>{ah(r)&&(n.has(String(r.id))||o.push(r))}),o},zE=(e,t,n)=>{const o={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},a=VE(e,n);o.totalLegacyLessons=a.length;const i=HE(t,n),c=[];return a.forEach(l=>{try{const d=i.get(String(l.id))||String(l.id),h=n.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=$E(l,h);r.lessons[String(h.id)]=m,String(l.id)!==String(h.id)&&delete r.lessons[String(l.id)],o.successfulMigrations++}else c.push(String(l.id)),o.failedMigrations++}catch(d){console.warn(`Failed to migrate legacy lesson progress for lesson ${l.id}:`,d),c.push(String(l.id)),o.failedMigrations++}}),{migratedProgress:r,orphanedLessonIds:c,migrationSummary:o}},Wv=e=>Object.values(e.lessons).some(ah),Lue=e=>{let t=0,n=0;const o=[];return Object.values(e.lessons).forEach(r=>{n++,ah(r)&&(t++,o.includes(r.type)||o.push(r.type))}),{legacyCount:t,totalCount:n,legacyTypes:o,hasLegacyProgress:t>0}},_E=(e,t,n)=>{if(!Wv(e))return e;const o=zE(e,t,n);return o.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",o.orphanedLessonIds),o.migratedProgress},ih=e=>`rise/course/${e}`,Kv=ih("BOOKMARK_LESSON"),UE=ih("LOAD_COURSE"),Qv=ih("PREVIEW_COMPLETE_PRECEDING_LESSONS"),GE=(0,Ce.action)(Kv),WE=(0,Ce.action)(Qv),KE={lessons:{},percentComplete:0},QE=(0,Ce.handle)(KE,{[bv]:Wg,[yv]:O9,[Sv]:B9,[Lv]:D9,[Tv]:F9,[kv]:H9,[Iv]:$9,[Ev]:V9,[Nv]:z9,[jv]:sL,[Dv]:oL,[wv]:pL,[Av]:rL,[Rv]:aL,[Pv]:cL,[Mv]:lL,[Ov]:dL,[Bv]:iL,[Fv]:uL,[Hv]:hL,[$v]:mL,[Kv]:ZE,[UE]:YE,[Qv]:XE});function YE(e,t){const n=t.course?.lessons??[],o=t._originalLessons??n,r=H1(n7(n));if(typeof r!="object"||r===null)return e;const a={...e,...r};return Wv(e)&&o!==n?_E(a,o,n):a}function ZE(e,t){return h8(t),{...e,currentLesson:t}}function XE(e,{targetLessonId:t,lessons:n}){const o=e.lessons[t];if(!o)return e;let r=o.index;for(const i of n){if(i.type!=="quiz")continue;const c=e.lessons[i.id];if(!c||c.index>=r)continue;const l=i.settings;if(!l?.skipLessonsIfPassed||!l.skipToLessonId)continue;const d=e.lessons[l.skipToLessonId];d&&d.index>r&&(r=d.index)}const a=Object.fromEntries(Object.entries(e.lessons).map(([i,c])=>c.index>=r||c.isComplete?[i,c]:[i,qE(c)]));return{...e,lessons:a}}function qE(e){return Ls(e)?S0(e):hn(e)?JE(e):e}function JE(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([o,r])=>[o,{...r,isComplete:!0,isCorrect:!0}])),n=Object.keys(t).length;return{...e,items:t,activeIndex:n+1,isComplete:!0,passed:!0,passingScore:e.passingScore??80,percentComplete:100,reportResults:!0,score:100}}const e7=({index:e,lessonId:t,settings:n,type:o})=>o==="quiz"?{id:t,index:e,type:o,items:{},passingScore:Number(n?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function t7(e){return e.type==="quiz"&&"settings"in e}function n7(e){return{lessons:e.reduce((n,o,r)=>t7(o)?Yv({index:r,items:o.items,lessonId:o.id,lessonProgress:n,settings:o.settings,type:o.type}):o.type==="blocks"||o.type==="slide"?Yv({index:r,items:o.items,lessonId:o.id,lessonProgress:n,type:"blocks"}):n,{})}}function Yv(e){const{lessonId:t,index:n,items:o,lessonProgress:r={},settings:a,type:i}=e,c=e7({lessonId:t,index:n,settings:a,type:i});if(o.length===0)return{...r,[t]:c};const l=i==="quiz"?o7(o):s7(o);return{...r,[t]:{...c,items:l}}}function s7(e){return e.reduce((t,n,o)=>{const r=n.id,a=n.items??[],i=E9(a);return t[r]={id:r,index:o,items:i},t},{})}function o7(e){return e.reduce((t,n,o)=>(t[n.id]={id:n.id,index:o},t),{})}var r7=p(73481),ea=p.n(r7),a7=p(27563),i7=p.n(a7),Tue=p(31212),Zv,Xv;const ch=5e3,c7=vt()(l0()(ts())(":n3,n4,i4,n7,n9")),l7=Be()(ea()(","),al()),d7=(e,t)=>{const n=new FontFace(t.name,e,{family:t.name,style:t.style,weight:t.weight});return n.load().then(()=>document.fonts.add(n))},u7=(e,t)=>{const n=document.createElement("style");return n.innerText=`@font-face { font-family: '${t.name}'; src: ${e}; font-weight: ${t.weight}; font-style: ${t.style}; }`,document.head.appendChild(n),new(i7())(t.name,{style:t.style,weight:t.weight}).load()},h7=e=>{const t=`url(${ES(e)}) format('woff')`;return("fonts"in document?d7:u7)(t,e)},qv=(e,t)=>{const n=Promise.all(e.map(h7));let o;const r=new Promise(a=>{o=setTimeout(a,ch)});return Promise.race([n,r]).catch(a=>{console.error("Failed to load learn course fonts:",{fonts:e,error:a.message||a})}).finally(()=>{clearTimeout(o),t()})},Iue=({baseUri:e,typefaces:t,onLoad:n,onError:o})=>{const r=Zv(t).join(", ");return Xv.load({active:n,fontinactive:(a,i)=>{console.error("Individual font failed to load:",{familyName:a,fvd:i,typefaces:t})},inactive:()=>{console.error("Failed to load course fonts:",{typefaces:t,typefaceList:r}),o?.(),n?.()},timeout:ch,custom:{families:c7(Zv(t)),urls:[`${e}/course_fonts.css?typefaceIds=${l7(t)}`]}})},Eue=()=>Xv.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:ch}),m7=(e,{fonts:t})=>[...e,...t],f7=(e,{fonts:t})=>t,p7=(0,Ce.handle)([],{[Jr]:m7,[ul]:f7}),g7=e=>t=>{qv(e,()=>{t(NI(!0))})},v7={isPreview:window.viewType==="preview"},Jv=((e=v7)=>e);p.dn(Jv);const eC="rise/l10n/TOGGLE_LOCALE_SELECTOR",tC=(e,{l10n:t})=>t?{...e,...t}:e,C7=(e,t)=>(0,Vr.TJ)(["l10n"],t,e).result,lh=(0,Ce.action)(eC),x7=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},b7=(0,Ce.handle)(null,{[Jr]:tC,[ul]:tC,[th]:C7,[eC]:x7});var y7=p(50333),dh=p.n(y7);const S7=dh()(2,e=>T0()((0,Ce.error)(e),(0,Ce.action)(e))),{RiseDotCom:Ks}=window,Li=e=>Ks&&Ks[e],nC=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),L7=()=>{Li("exit")&&Ks?.exit?.()},sC=(...e)=>{Li("on")&&Ks?.on?.(...e)},oC=(...e)=>{Li("off")&&Ks?.off?.(...e)},T7=(...e)=>{Li("goToLearn")&&Ks?.goToLearn?.(...e)},k7=(...e)=>Ks?.downloadCertificate?.(...e)??nC("downloadCertificate"),I7=(...e)=>{if(Li("downloadCertificateCancel"))return Ks?.downloadCertificateCancel?.(...e)},E7=(...e)=>Ks?.fetchLpUpNext?.(...e)??nC("fetchLpUpNext"),rC="rise/learningPathUpNext/FETCH_LP_UP_NEXT",aC="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",N7={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},j7=e=>!("id"in e),w7=(e,t)=>{const n=j7(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:n,lpHasFailedQuiz:t.lpHasFailedQuiz,nextCourse:n?{}:t}},A7=e=>({...e,isPending:!0}),jue=(0,Ce.handle)(N7,{[rC]:(0,Ce.onSuccess)(w7),[aC]:A7}),R7=e=>[(0,Ce.action)(aC),S7(rC)(Jo().fromPromise(E7)(e))],P7=(e,t)=>{const n=e.content.findIndex(r=>r.id===t.id),o=[...e.content];return n===-1?o.push(t):o[n]=t,{...e,content:o}},M7=(e,t)=>t.reduce(P7,e),O7={[hv]:M7},B7=(0,Ce.handle)({content:[]},O7),iC="rise/search/RESET_SEARCH",cC="rise/search/SET_SEARCH_ACTIVE",lC="rise/search/SET_SEARCH_ACTIVE_LESSONS",dC="rise/search/SET_SEARCH_TRANSLATIONS",uC="rise/search/SET_SEARCH_LESSONS",hC="rise/search/SET_SEARCH_TERM",mC={active:!1,activeLessons:[],translations:{},lessons:[],term:null},D7=(e,t)=>t?{...mC,active:e.active}:e,F7=(e,t)=>({...e,active:t}),H7=(e,t)=>({...e,activeLessons:t}),$7=(e,t)=>({...e,translations:t}),V7=(e,t)=>({...e,lessons:t}),z7=(e,t)=>({...e,term:t}),_7=(0,Ce.handle)(mC,{[iC]:D7,[cC]:F7,[lC]:H7,[dC]:$7,[uC]:V7,[hC]:z7}),ta=e=>(0,Ce.action)(e),fC=ta(iC),Ti=ta(cC),pC=ta(lC),gC=ta(dC),vC=ta(uC),gr=ta(hC),uh=e=>`rise/sessionPreferences/${e}`,CC=uh("LOAD_SESSION_PREFERENCES"),xC=uh("SET_PREFERS_KEYBOARD_NAVIGATION"),U7=uh("SET_STARTING_COURSE_LESSON_SELECTED"),G7={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},W7=(e,t)=>({...e,prefersKeyboardNavigation:t}),K7=(e,t)=>({...e,startedCourseWithLessonSelected:t}),Q7=(0,Ce.handle)(G7,{[CC]:(e,t)=>({...e,...t}),[xC]:W7,[U7]:K7}),Y7=()=>(0,Ce.action)(CC,null),Z7=(0,Ce.action)(xC),hh=ts()("rise/transcriptPanel/"),bC=hh("OPEN_TRANSCRIPT_PANEL"),yC=hh("CLOSE_TRANSCRIPT_PANEL"),SC=hh("UPDATE_TRANSCRIPT_PANEL"),X7={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},q7=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,LC=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),J7=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:LC():e,eN={[bC]:q7,[yC]:LC,[SC]:J7},tN=(0,Ce.handle)(X7,eN),TC=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),nN={skipToNavButton:null},sN=(0,Ce.handle)(nN,{[TC]:(e,t)=>({...e,skipToNavButton:t})}),mh=(0,Ce.action)(TC);var Aue;const oN={},rN=(0,Vc.HY)({course:mE,courseLabels:IE,courseProgress:QE,fonts:p7,global:Jv,l10n:b7,partnerContent:B7,search:_7,sessionPreferences:Q7,status:EI,transcriptPanel:tN,ui:sN,...oN}),{Provider:aN,dispatch:jn,store:kC,useDispatch:ot,useSelector:pe}=cS(rN),IC="_course_token",fh=new URLSearchParams(window.location.hash.substr(1)),EC=fh.get(IC);EC&&(fh.delete(IC),window.history.replaceState(null,null,`#${fh.toString()}`));const iN=e=>{const{data:{method:t,id:n,jsonrpc:o}}=e;if(o==="2.0"&&t==="getBearerToken"){const r=EC||Ct();navigator.serviceWorker.ready.then(a=>{a.active.postMessage({id:n,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",iN);const NC=(0,u.createContext)({});function cN(e,{type:t,message:n}){switch(t){case"polite":return{...e,politeMessage1:e.alternatePolite?n:"",politeMessage2:e.alternatePolite?"":n,alternatePolite:!e.alternatePolite};case"assertive":return{...e,assertiveMessage1:e.alternateAssertive?n:"",assertiveMessage2:e.alternateAssertive?"":n,alternateAssertive:!e.alternateAssertive};default:return{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}}}function pl({ariaLive:e,message:t}){return(0,s.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-always",role:"log",children:t})}function lN({children:e}){const[{politeMessage1:t,politeMessage2:n,assertiveMessage1:o,assertiveMessage2:r},a]=(0,u.useReducer)(cN,{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}),i=(0,u.useMemo)(()=>({announcePolite:c=>{a({type:"polite",message:c})},announceAssertive:c=>{a({type:"assertive",message:c})},clearAnnouncements:()=>{a({type:"clear"})}}),[a]);return(0,s.jsxs)(NC.Provider,{value:i,children:[(0,s.jsx)(pl,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,s.jsx)(pl,{ariaLive:"polite",id:"polite-announcer2",message:n}),(0,s.jsx)(pl,{ariaLive:"assertive",id:"assertive-announcer1",message:o}),(0,s.jsx)(pl,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function Ts(){return(0,u.useContext)(NC)}var ze=p(32926);const jC={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},wC=e=>e?.type===jC.QUIZ,gl=e=>e?.type===jC.QUIZ,ph=({locales:e,course:t,locale:n})=>!!(e?.find(a=>a.locale===n)?.rightToLeft||t?.experiments?.rtl),AC=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function dN({children:e,currentLocale:t,setCurrentLocale:n}){const o=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:n}),[t,n]);return(0,s.jsx)(AC.Provider,{value:o,children:e})}function tt(){return(0,u.useContext)(AC)}function uN(e){const t=n=>{const o=tt();return(0,s.jsx)(e,{...n,...o})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const ki=(e,t,n)=>(0,Qt.uW)(e)&&t?n?.[t]?.[e.l10nId]:void 0,vl=(e,t,n,o)=>{if(!(0,Qt.uW)(e))return e;if(!t||!n||!o)return;const r=ki(e,t,o);if(r!==void 0)return r;const a=ki(e,n,o);if(a!==void 0)return a;const i=RC(e,o);return i.length>0?i[0].value:void 0},gh=new WeakMap,vh=(e,t)=>{if(e&&t in e)return e[t]},Ch=(e,t,n,o)=>{if(!t||!n||!o||!e)return e;if(typeof e=="object"){const d=gh.get(e)?.get(o);if(d&&d.locale===t&&d.defaultLocale===n)return d.result}const r=o[t],a=o[n],i=Object.values(o).filter(d=>d!==r&&d!==a);function c(d){let h;if(h=vh(r,d),h!==void 0||(h=vh(a,d),h!==void 0))return h;for(const m of i)if(h=vh(m,d),h!==void 0)return h}let l;if(!Array.isArray(e)&&typeof e=="object"&&typeof e.l10nId=="string")l=c(e.l10nId);else{l=structuredClone(e);for(const{mutate:d,l10nId:h}of(0,Vr.pr)(l))d(c(h))}if(typeof e=="object"){let d=gh.get(e);d||(d=new WeakMap,gh.set(e,d)),d.set(o,{locale:t,defaultLocale:n,result:l})}return l},Rue=(e,t,n)=>Ch(e,t,na(n),ko(n)),Pue=(e,t,n)=>vl(e,t,na(n),ko(n)),Mue=(e,t,n)=>ki(e,t,ko(n));function Oue(e,t){return t?.find(n=>n.locale===e)}function hN(e){return e?.l10n?.locales??[]}function na(e){return e?.l10n?.defaultLocale}function mN(e,t){const n=na(t);return!!(e&&n&&e!==n)}function ko(e){return e?.l10n?.translations??{}}function RC(e,t){return(0,Qt.uW)(e)?Object.keys(t).flatMap(n=>{const o=ki(e,n,t);return o?{locale:n,value:o}:[]}):[]}const Bue=(e,t)=>RC(e,ko(t)),At=e=>(0,Qt.uW)(e)?e.l10nId:void 0;function fN(e){return e?.l10n?.localeSelectorOptions}function xh(e){return e?.l10n?.languageCodeMetadata}function pN(e){return e?.l10n?.showLocaleSelector}function bh(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const n=Xr(e);if(n==null)return null;const o=n.alpha??1,r=Xr(t),a=o<1&&r!=null?(0,G0.jh)(r,{...n,alpha:1},o,{space:"srgb"}):n;return(0,w8.A)(a,"srgb")}function gN(e,t){const n=bh(t);if(n==null)return 1;const o=bh(e,(0,W0.A)(n));return o==null?1:(0,N8.A)(o,n,"WCAG21")}const Dn=e=>e==null?ke.DARK:gN("#fff",e)>=4.5?ke.LIGHT:ke.DARK,yh=(0,u.createContext)(null);yh.displayName="CourseContext";const Sh=(0,u.createContext)(!1);Sh.displayName="PresentationContext";function vN({children:e,course:t,courseProgress:n,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:n,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}),[t,n,o,r,a,i,c]);return(0,s.jsx)(yh.Provider,{value:l,children:(0,s.jsx)(Sh.Provider,{value:lr(t),children:e})})}function sa(){return(0,u.useContext)(yh)}function ks(){return(0,u.useContext)(Sh)}function He(){return sa()?.course}function PC(){return Me(He()?.title)}function It(){const{labels:e}=sa()??{};return e}function Lh(){return sa().search}function MC(e){const o=He()?.theme?.accentContrast;return typeof o!="string"?ke.LIGHT:o===ke.AUTO?Dn(e):o}function Ii(){const e=He();return e?.theme?.colorAccent??e?.color}function Th(){const{currentLocale:e}=tt(),t=Cl(),n=He();return n?ph({course:n,locales:t,locale:e}):!1}function Due(){const{lessons:e}=sa();return e}const Ei=(0,u.createContext)({l10n:null});Ei.displayName="TranslationContext";const kh=(0,u.createContext)({l10n:null});kh.displayName="LocalesContext";function ct(){const{currentLocale:e}=tt(),t=Fn(),n=xl();return(0,u.useCallback)(o=>vl(o,e,t,n),[e,t,n])}function OC(){const{currentLocale:e}=tt(),t=Fn(),n=xl();return(0,u.useCallback)(o=>Ch(o,e,t,n),[e,t,n])}function Me(e,t){const{currentLocale:n}=tt(),o=Fn();let r=xl();const a=xN();return a&&Object.keys(a).length&&n&&r&&(r={...r,[n]:a}),vl(e,t??n,o,r)}function CN(e){const{currentLocale:t}=tt(),n=Fn(),o=xl();return(0,u.useMemo)(()=>Ch(e,t,n,o),[t,n,e,o])}function oa(){return(0,u.use)(kh)}function Cl(){const e=oa();return hN(e)}function Fn(){const e=oa();return na(e)}function xl(){const e=(0,u.use)(Ei);return ko(e)}function xN(){return sa()?.search?.translations}function bN(){const e=(0,u.use)(Ei);return pN(e)}function yN(){const e=(0,u.use)(Ei);return fN(e)}const SN=()=>(0,ze.Mz)(t=>t,(t,n)=>n,(t,n,o)=>na(o),(t,n,o)=>ko(o),vl);function lt(e){const{currentLocale:t}=tt(),n=(0,u.useMemo)(()=>SN(),[]);return pe(o=>n(e,t,o))}const LN=(0,ze.Mz)(e=>e,(e,t)=>ko(t),(e,t)=>t?.[e]);function BC(){const{currentLocale:e}=tt();return pe(t=>LN(e,t))}const TN=(0,ze.Mz)(e=>e.course?.title,na,ko,(e,t,n)=>{if(e)return ki(e,t,n)});function kN(){return pe(TN)}function bl(){return pe(e=>e.l10n)}var IN=p(49860);function DC(e){return e?.search}function Io(){return pe(DC)}function EN(e){return DC(e)?.activeLessons}const NN=(0,ze.Mz)(EN,e=>e?e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{}):{});function jN(){return(0,ze.Mz)(e=>e,(e,t)=>NN(t),(e,t)=>t?.[e])}function wN(e){const t=IN.useMemo(()=>jN(),[]);return pe(n=>t(e,n))}function Yt(e){return e.course}function de(){return pe(Yt)}function AN(e){return Yt(e)?.navigationMode}function Ih(e){return Yt(e)?.trackingQuizId}function ra(){const e=de();return lt(e?.title)}function RN(e){return Yt(e)?.type}function PN(){return pe(e=>RN(e))}function FC(e){const t=Yt(e);return ss(t)}function MN(){return pe(FC)}function ON(e){const t=Yt(e);return Yr(t)}function BN(){return pe(ON)}const DN=e=>e.filter(t=>t.type!=="section");function vr(){const e=de(),t=Io();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:DN(t.lessons)}:e,[e,t?.active,t?.lessons])}const FN=(0,ze.Mz)(Yt,e=>(e?.lessons??[]).filter(wC).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function Eh(e){const t=AN(e);return FN(e)?bo.RESTRICTED:t??bo.FREE}function yl(){return pe(Eh)}function HN(e){return Yt(e)?.theme?.buttonNavigationStyle??Qe.buttonNavigationStyle}function $N(){return pe(HN)}function Nh(){const e=de();return e?.selectedAuthorId==="none"||!("authors"in(e??{}))?null:e?.selectedAuthorId?e?.authors?.find(t=>t.id===e.selectedAuthorId):e?.authors?.find(t=>t.id===e?.author)}function HC(){return de()?.theme?.coverImageColor??it.DARK}function $C(){return de()?.lessonsOnly?.[0]}function VN(){const e=de(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(n=>n.id===t)??null}function as(){const{currentLocale:e}=tt(),t=Cl(),n=de();return n?ph({course:n,locales:t,locale:e}):!1}function VC(){const t=de()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:n})=>n!=="section").length:0,[t])}class zN extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return console.error(t),{hasError:!0,error:t}}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:o}=this.props;return t||n?(0,s.jsx)(o,{}):this.props.children}}const _N=zN;var UN=p(39117),GN=p.n(UN),WN=p(85806),Cr=p.n(WN),KN=p(46280),QN=p.n(KN),YN=p(76781),Sl=p.n(YN),ZN=p(98105),Hn=p.n(ZN),XN=p(18828),Ll=p.n(XN),qN=p(71172),JN=p.n(qN),ej=p(41131),tj=p.n(ej);const zC=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},nj=({courseProgress:e,lesson:t,restrictingQuiz:n})=>{if(!e)return{};const o=c=>e.lessons[String(c)]?.index,r=o(t.id),a="id"in n?n.id:void 0,i=a!=null?o(a):void 0;return r!==void 0&&i!==void 0&&r>i?n:{}};var sj=p(99651),Eo=p.n(sj),oj=p(55803),rj=p.n(oj),aj=p(1069),jh=p.n(aj);const No=Ne("CDN_USER_CONTENT_URI"),_C=Ne("CDN_URI"),Ni=Kr()("useCrushedKey"),is=Ne("IMAGES_URI"),ij=jh()(/-stock[-_]image.jpg/),wh=Ne("RBC_IMAGES_URI"),cj=Ne("ASSETS_URI"),lj=jh()(new RegExp(`^${No}/review`)),UC=Ne("CDN_US_URI"),ji=e=>{const{crushedKey:t,key:n,useCrushedKey:o,src:r}=e;return Ni(e)?gt(o&&t?t:n):gt(r)},GC=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:n,key:o,useCrushedKey:r}=e;return is?Ni(e)&&r&&n?`${is}/${t}/${n}`:`${is}/${t}/${o}`:ji(e)},Fue=e=>`${No}/${e}`,Hue=e=>!e||!e.key?"":`${wh}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,$ue=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o}=e;return Ni(e)&&o?t?`${is}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${is}/f:jpg,b:fff,s:cover,w:340/${n}`},Ah=e=>GC(e,"f:png,a:retain,s:cover,t:true,w:340"),Vue=e=>GC(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),dt=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o,sourcedFrom:r}=e;if(!is)return ji(e);const a=r==="AI",i=r==="LIBRARY",c=r==="EXTRACTED";return ij(n)||a||i?`${is}/f:jpg,a:retain,b:fff,w:1680,q:90/${n}`:Ni(e)?o&&t?`${No}/${t}`:`${No}/${n}`:c&&e.src||lj(e.src)?e.src:`${is}/f:jpg|png,a:retain,b:fff/${n}`},zue=(e,t="src")=>{const{key:n,src:o,thumbnail:r,thumbnailKey:a}=e,i=No?`${No}/${n}`:ji({key:n,src:o}),c=No?`${No}/${a}`:ji({key:a,src:r});return t==="src"?i:c},_ue=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:o}=e;return Ni(e)&&o&&t?`${is}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${is}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${n}`},wi=({height:e,imageKey:t,width:n})=>{if(wh){const o=encodeURIComponent(t);return`${wh}/b:fff,f:jpg,s:cover,w:${n},h:${e}/${o}`}return gt(`partnerContent/${t}`)},dj=()=>{const e=cj||is,t="NBIC_logo_light_bulb.png";return e?`${e}/f:png,a:retain,s:cover,w:276,h:160/assets/rise/assets/partner-content/${t}`:gt(`partnerContent/${t}`)},uj=()=>{const e="NBIC_logo_blue.svg";return _C?`${_C}/assets/rise/assets/partner-content/${e}`:gt(`partnerContent/${e}`)},hj=e=>{const{key:t,src:n}=e;return UC?`${UC}/${t}`:ji({key:t,src:n})};var mj=p(28798);const Tl=({alpha:e,color:t,url:n})=>{const o=(0,mj.A)(t,e);return{backgroundImage:`linear-gradient(0deg,${o},${o}), url("${n}")`}};var Rh,Ph;const Gue=mi()(qe()("sidebarMode","hidden")),aa=({alpha:e,color:t=void 0,hasOverlay:n=!0,media:o={}})=>{const{image:r={}}=o,{key:a,src:i}=r,c=a?dt(r):i,l=t===it.LIGHT?"#fff":"#000";return c?n?Tl({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},jo=e=>[ir.DARK,ir.DARK_ACCENT,ir.DARK_IMAGE,cr.DARK,_s.DARK,_s.DARK_IMAGE].includes(e),fj=kt()(Ze()("lessons"),Eo()),pj=qe()("navigationMode",bo.RESTRICTED),gj=mi()(qe()("sidebarMode",Qr.HIDDEN)),vj=qe()("navigationType",ar.SIDEBAR),WC=qe()("navigationType",ar.COMPACT),Mh=Jn()(rj()(yt(),"navigation"),gj,qe()("navigation",!0)),Cj=({course:e,search:t,isMobile:n})=>ss(e)?!1:(vj(e)||WC(e)&&!!n)&&Mh(e)||t.active,xj=({course:e,isMobile:t})=>WC(e)&&Mh(e)&&!t,Ai=e=>[ir.DARK_IMAGE,ir.LIGHT_IMAGE,cr.DARK_IMAGE,cr.IMAGE,_s.DARK_IMAGE,_s.LIGHT_IMAGE].includes(e),bj=e=>[_s.DARK,_s.LIGHT].includes(e),yj=(e,t)=>{if(e===te.RISE_CLASSIC||e===te.HORIZON)switch(t){case me.SPLIT_LEFT_IMAGE:case me.SPLIT_RIGHT_IMAGE:case me.TWO_THIRDS_LEFT_IMAGE:case me.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===te.APEX)switch(t){case me.SPLIT_LEFT_IMAGE:case me.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},Wue=(e,t)=>{switch(e){case Rh.RISE_CLASSIC:case Rh.APEX:case Rh.HORIZON:return t===Ph.CENTERED_OVERLAY||t===Ph.LEFT_OVERLAY||t===Ph.IMAGE;default:return!1}},KC=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,cs=e=>!KC(e),kl=Ze(),Il=zs(),Oh=Lt(),QC=e=>$s()(t=>qr({settings:{asLesson:kl("asLesson",t.settings)??void 0},type:t.type??null}),kl("lessonsOnly",e)??[]),Sj=({course:e,courseProgress:t})=>Cr()(Lj(t),e?.lessonsOnly??[]),Lj=e=>t=>Ll()(t.id==null?void 0:Il(["lessons",t.id,"isComplete"],e)),Tj=({lesson:e,currentLesson:t})=>e&&qe()("id",e.id,t),kj=({course:e,lesson:t})=>qe()("id",t.id,Xc()(kl("lessonsOnly",e)??[])),YC=e=>e!=null&&e.type!=="section",Ij=({lesson:e,courseProgress:t})=>e?.id==null?!1:Oh(!1,["lessons",e.id,"isComplete"],t),ZC=({course:e,courseProgress:t,lesson:n,restrictingQuiz:o={}})=>{const r=n?.id==null?{}:nj({courseProgress:t,lesson:{id:n.id},restrictingQuiz:o}),a=pj(e),i=a||cs(r),c=Sj({course:e,courseProgress:t}),l=YC(n)&&Ll()(Ij({lesson:n,courseProgress:t}));return{isRestricted:i&&l&&Ll()(Tj({lesson:n,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:a,currentLesson:c}},Ej=({labels:e,restrictions:t})=>{const{lessonRestricted:n,quizRequirePassingScore:o}=e,{isRestrictedCourse:r,restrictingQuiz:a,currentLesson:i}=t,c=i&&GN()("id",a,i),l=a!=null&&typeof a=="object"?kl("title",a):void 0;return!r||r&&c?typeof l=="string"&&l?o.replace("quiz",`"${l}"`):o:n},XC=tj()((e,t)=>QN()(JN()(xo()(["id"],e||{})),t)),Nj=({course:e,lesson:t})=>Be()(Sl(),XC(t),QC)(e),qC=({course:e,lesson:t})=>{if(kj({course:e,lesson:t}))return;const n=e?.lessonsOnly??[];return n[Sl()(XC(t,n))]},jj=Be()(Hn(),QC),wj=e=>typeof e=="object"&&Object.keys(e).length>0,Aj=e=>e==null||e===!1,Rj=e=>Aj(e?.isComplete),Pj=e=>e.find(([,t])=>Rj(t)),Mj=e=>{const t=Object.entries(e),[n]=Pj(t)||[];return n},Oj=(e={},t)=>wj(e)?Mj(e):t==null?void 0:String(t),JC=(e,t,n)=>{if(!n)return{outOfAttempts:!1,quizPassed:!0};const o=Il(["lessons",n],e),r=Oh(-1,["settings","retryCount"],t),a=Oh(0,["retryAttempts"],o),i=Il(["passed"],o);return{outOfAttempts:Il(["isComplete"],o)&&Number(r)>-1&&Number(a)===Number(r),quizPassed:i}};function Bh(e){return e.courseProgress}function Bj(e){return e.courseProgress?.currentLesson??""}function Dj(e){return e.courseProgress?.percentComplete??0}const e2=(0,ze.Mz)(Ih,Yt,(e,t)=>{const{lessons:n}=t;return Array.isArray(n)?n.find(({id:o,type:r})=>r==="quiz"&&o===e)??null:null}),Fj=(0,ze.Mz)(Bh,e2,(e,t)=>t?JC(e,t,t.id):null);function t2(e){const t=Bh(e);return z1()?t?.percentComplete===100:!!V1()}function ia(e){return e.courseProgress?.lessons}function Ri(e,t){if(e!=null)return ia(t)?.[e]}function xr(){return pe(Bh)}function El(){return pe(Bj)}function ca(){return pe(Dj)}function Hj(){return pe(e2)}function Dh(){const e=pe(Fj);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function $j(){return pe(t2)}function wo(e){return pe(t=>Ri(e,t))}function Nl(e){const t=wo(e);if(t?.type==="quiz")return t}const Vj=(0,ze.Mz)(ia,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function zj(){return pe(Vj)}const n2=e=>e>9999?1:e,_j=({current:e,restart:t,restartValue:n})=>{const o=Number(n),r=n2(Number.isInteger(o)&&o>0?o:1),a=t?r:e+1;return n2(a)},Uj=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const n=t.settings??{},o=_j({current:e.currentNumber,restart:n.restartNumbering,restartValue:n.restartNumberingValue});return{map:{...e.map,[t.id]:o},currentNumber:o}}return e},s2=e=>zI(e),jl=e=>_I(e),Gj=e=>UI(e),Wj=e=>!!pv(e);function la(){return(0,ze.Mz)(e=>e,(e,t)=>i2(t),(e,t)=>t[String(e)])}function Rt(e){const t=(0,u.useMemo)(()=>la(),[]);return pe(n=>t(e,n))}function da(e){const t=Rt(e);return lt(t?.title)}function Kj(){const e=la();return(0,ze.Mz)(e,t=>s2(t))}function o2(){const e=wl();return(0,ze.Mz)(t=>t,(t,n)=>e(n),(t,n)=>Eh(n),(t,n)=>ew(n),(t,n)=>tw(n),(t,n)=>ia(n),(t,n,o,r,a,i)=>{const c=i?.[t],l=i?.[n];if(t!==n&&!c?.isComplete&&c?.index>l?.index){const d=i?.[r?.id]?.index??1/0,h=o==="restricted"?l?.index??1/0:i?.[a?.id]?.index??1/0;if(c?.index>Math.min(d,h))return h<d?o==="restricted"?{type:pr.ORDER}:{type:pr.KNOWLEDGE_CHECK}:{type:pr.QUIZ,data:r.title}}return null})}function Pi(e){const t=(0,u.useMemo)(()=>o2(),[]);return pe(n=>t(e,n))}function wl(){return(0,ze.Mz)(ia,Ih,(e,t)=>Oj(e,t))}function Qj(){const e=(0,u.useMemo)(()=>wl(),[]);return pe(t=>e(t))}function Yj(){const e=wl();return(0,ze.Mz)(e,i2,(t,n)=>{if(!(!t||!n[t]))return n[String(t)]})}function Zj(){const e=la();return(0,ze.Mz)(e,Ri,(t,n)=>{const o=n?.percentComplete??0,r=n?.isComplete??!1,a=n?.passed??!1;return o===100&&(!r||jl(t)&&!a)})}function r2(e){const t=(0,u.useMemo)(()=>Zj(),[]);return pe(n=>t(e,n))}function Xj(){const e=la();return(0,ze.Mz)(e,Ri,(t,n)=>{const o=n?.percentComplete??0,r=n?.isComplete??!1,a=n?.passed??!1;return o===100&&r&&(!jl(t)||a)})}function a2(e){const t=(0,u.useMemo)(()=>Xj(),[]);return pe(n=>t(e,n))}const Fh=(0,ze.Mz)(Yt,e=>e?.lessons??[]),i2=(0,ze.Mz)(Fh,e=>e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{})),ua=(0,ze.Mz)(Yt,e=>e?.lessonsOnly??[]),qj=(0,ze.Mz)(ua,e=>e.reduce((t,n,o)=>(t[n.id]=o+1,t),{}));function c2(){return pe(e=>qj(e))}const Hh=(0,ze.Mz)(ua,e=>e.filter(t=>qr(t))),l2=(0,ze.Mz)(Hh,e=>e.length),Jj=(0,ze.Mz)(Fh,e=>e.reduce((t,n)=>{const o=t[t.length-1];return s2(n)||o==null?t.push([n.id]):o.push(n.id),t},[])),ew=(0,ze.Mz)(ua,ia,(e,t)=>e.find(n=>jl(n)&&Gj(n)&&!t?.[n.id]?.isComplete)),tw=(0,ze.Mz)(ua,ia,(e,t)=>e.find(n=>!jl(n)&&Wj(n)&&!t?.[n.id]?.isComplete));function Al(e){const t=(0,u.useMemo)(Kj,[]);return pe(n=>t(e[0],n))}function $h(e){const t=(0,u.useMemo)(()=>la(),[]),n=(0,u.useMemo)(()=>o2(),[]),o=yl();return pe(r=>{const a=Yt(r),i=t(e,r),c=Ri(e,r),d=n(e,r)?.type!=null;return o!==bo.RESTRICTED&&a?.markComplete&&!d&&i?.type!==X0.QUIZ&&!0})}const Rl=(e,t)=>t.findIndex(n=>n.id===e);function d2(){return(0,ze.Mz)(e=>e,(e,t)=>ua(t),(e,t)=>{if(e===yi)return t[t.length-1];const o=Rl(e,t)-1;return t[o]})}function u2(){return(0,ze.Mz)(e=>e,(e,t)=>ua(t),(e,t)=>{const o=Rl(e,t)+1;return t[o]})}function h2(e){return(0,ze.Mz)((n,o)=>e(n,o),(n,o)=>Hh(o),(n,o)=>Rl(n?.id||"",o)+1)}function nw(){return h2(u2())}function sw(){return h2(d2())}function ow(e){const t=(0,u.useMemo)(()=>u2(),[]);return pe(n=>t(String(e),n))}function rw(e){const t=(0,u.useMemo)(()=>nw(),[]);return pe(n=>t(String(e),n))}function aw(e){return pe(t=>{if(!e)return 0;const n=Hh(t);return Rl(String(e),n)+1})}function Vh(){return pe(l2)}function Pl(){return pe(e=>Jj(e))}function iw(){const e=wl();return(0,ze.Mz)(t2,e,Ih,(t,n,o)=>{const r=!!n,a=o!=null;return t||!r&&!a})}function cw(){const e=(0,u.useMemo)(()=>iw(),[]);return pe(t=>e(t))}function lw(){const e=de(),t=xr();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const n=zC({course:e,courseProgress:t});return e.lessonsOnly.filter(o=>{const{isRestricted:r}=ZC({course:e,courseProgress:t,lesson:o,restrictingQuiz:n});return r}).map(o=>o.id)},[e,t])}const dw=e=>e?.items?.reduce?.(Uj,{map:{},currentNumber:0})?.map||{},uw=e=>{const t=(0,u.useMemo)(()=>la(),[]),n=pe(o=>t(e,o));return(0,u.useMemo)(()=>dw(n),[n])},hw=({blockId:e,lessonId:t})=>uw(t)?.[e];function mw(e){const n=de()?.lessonsOnly??[],o=n.findIndex(a=>a.id===e);return(o>=0?n[o+1]:void 0)?.id??null}function zh(e){const t=Rt(e),n=de(),o=t?.settings,r=n?.lessonsOnly;return(0,u.useMemo)(()=>{const a=o?.skipToLessonId,i=a&&r?.some(c=>c.id===a)?a:void 0;return{continueType:o?.continueType??"",retryCount:Number(o?.retryCount??-1),skipLessonsIfPassed:o?.skipLessonsIfPassed??!1,skipLessonsOptional:o?.skipLessonsOptional??!0,skipToLessonId:i}},[o,r])}function fw(){return pe(Fh)}function pw(e){const t=(0,u.useMemo)(()=>d2(),[]);return pe(n=>t(e,n))}function gw(e){const t=(0,u.useMemo)(()=>sw(),[]);return pe(n=>t(e,n))}function vw(){const e=(0,u.useMemo)(()=>Yj(),[]);return pe(e)}function m2(){const e=vw();return lt(e?.title)}const Kue="/:mode",Ml="/lessons/:lessonId",Ol="/lessons/:lessonId/:mode",Cw=e=>e==="iframe"||e==="preview";function Qs(){const e=(0,Re.RQ)(Ml),t=(0,Re.RQ)(Ol);return(e??t)?.params.lessonId}function xw(e){return e.courseLabels}function bw(){return pe(xw)}function yw(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function ye(){const{currentLocale:e}=tt();return pe(t=>yw(e,t))}function Sw({isCourseComplete:e,percentCourseComplete:t}){const n=ye()??{},{courseResume:o,courseStart:r,processStartAgain:a}=n;return{courseCTALabel:e?a:t>0?o:r}}function _h(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function f2(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return _h()&&!!t.get("locale")}const Lw=(0,u.lazy)(()=>p.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(p.t.bind(p,68789,23))),Tw=()=>{const{currentLocale:e}=tt(),t=CN(de()),n=as(),o=zj(),r=El(),a=Rt(Qs()),i=ye(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.tenantId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=lw(),m=async()=>{try{await ci()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,v=dt(f)||null,C=lt(t?.aiTutorConfig?.name)??null,[g,b]=(0,u.useState)(!1),x=`rise_ai_tutor_nudge_${d}`,y=(0,u.useCallback)(()=>{localStorage.setItem(x,"1")},[x]);(0,u.useEffect)(()=>{if(localStorage.getItem(x))return;let T=null;const k=setTimeout(()=>{const E=document.getElementById("page-wrap");if(!E)return;const I=()=>{if(localStorage.getItem(x)){E.removeEventListener("scroll",I);return}const{scrollTop:j,scrollHeight:P,clientHeight:N}=E,R=P-N,w=R>0?j/R:0;R<=0||w>=.75&&(localStorage.setItem(x,"1"),b(!0),E.removeEventListener("scroll",I))};E.addEventListener("scroll",I,{passive:!0}),T=()=>E.removeEventListener("scroll",I),I()},0);return()=>{clearTimeout(k),T?.()}},[d,x,r]);const L=o||a?.type==="quiz",S=L?i?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled while a quiz is in progress.":void 0;return(0,s.jsx)(Lw,{aiTutorImageUrl:v,aiTutorName:C,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:L,disabledReason:S,labels:i,onOpen:y,resetSession:m,resolveAssetUrl:U1,restrictedLessonIds:h,rtl:n,scrollTriggered:g,subscriptionId:l,userId:d})},kw=()=>{const e=de();return!_h()&&!!e?.settings?.aiTutorEnabled?(0,s.jsx)(_N,{FallbackComponent:()=>null,children:(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(Tw,{})})}):null},p2=(0,u.createContext)(null);function Iw({appType:e,children:t}){return(0,s.jsx)(p2.Provider,{value:e,children:t})}function Ew(){const e=(0,u.useContext)(p2);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function Uh(){return Ew()==="author"}const Gh=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function Bl({block:e,children:t}){const[n,o]=(0,u.useState)(e);return e!=null&&e!==n&&o(e),(0,s.jsx)(Gh.Provider,{value:n,children:(0,s.jsx)(Xh,{...n?.settings,children:t})})}const Que=Gh.Consumer;function Pt(){return(0,u.useContext)(Gh)}function Dl(e){return function(n){const o=Pt();return(0,s.jsx)(e,{...n,block:o})}}const Nw={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},Yue=null;function jw(e,t){if(!e||!t)return null;const n=Nw[e];if(!n)return null;const o=r=>r?t[r]:void 0;return{backgroundType:o(n.backgroundType),backgroundColor:o(n.backgroundColor),backgroundColorContrast:o(n.backgroundColorContrast),paddingStart:o(n.paddingStart),paddingEnd:o(n.paddingEnd),bodyFontSize:o(n.bodyFontSize),headingFontSize:o(n.headingFontSize),subheadingFontSize:o(n.subheadingFontSize),completionType:o(n.completionType),label:o(n.label),completeHint:o(n.completeHint)}}function Ao(){const e=Pt(),t=He(),n=e?.family,o=t?.theme;return(0,u.useMemo)(()=>jw(n,o),[n,o])}var ww=p(83490),Aw=p.n(ww);const Is=(e,t)=>{const n=Xr(t);return n==null?null:(0,W0.A)((0,G0.jh)(n,Xr("#000000"),e),{format:"hex",collapse:!1})};function Rw(e){if(e==null)return 0;const t=bh(e);return t==null?0:(0,j8.J1)(t)}const ut=ns({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),ha=e=>{const t=Rw(e);return t<=.01?ut.NEAR_BLACK:t<=.05?ut.DARK:t<=.35?ut.MED:ut.LIGHT},Pw=e=>{switch(ha(e)){case ut.NEAR_BLACK:return os(.1,e);case ut.DARK:return Is(.4,e);case ut.MED:return Is(.2,e);case ut.LIGHT:return os(.3,e)}};var Mw,Ow,Bw,Wh,g2,Ro;const v2=2,Zue=(e,t,n)=>e??t??n,C2=(e,t,n,o)=>e??t??n??o,$n=Mn()({WHITE:null,TRANSPARENT:null}),Dw={markerColorContrast:ke.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:ke.AUTO},Fw={knowledge:["knowledge"],knowledgeCheck:["draw from question bank","fillin","matching","multiple choice","multiple response"],flashcard:["flashcard","stack"],interactive:["accordion","tabs"],"interactive-fullscreen":["sorting","timeline","process"],multimedia:["attachment","embed","step"],quote:["carousel"],survey:["survey"]};function Hw(e,t){return Fw[e]?.includes(t)??!1}const $w={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function Kh(e,t){const n=$w[e]?.[t];return n==null?{}:{backgroundColor:n,backgroundType:ae.COLOR}}const Vw=null;function Xue(e,t){return Vw[e]?.includes(t)??!1?.1:.5}function zw(e){switch(e.backgroundType){case ae.COLOR:return e.backgroundColor;case ae.ACCENT:return e.courseColor;case ae.TINT:return K0(e.courseColor);case ae.LIGHT:return"#ffffff";case ae.GRAY:return"#fafafa";case ae.DARK:return"#303030";case ae.BLACK:return"#000000"}}const _w={multimedia:{embed(e){return{cardMode:e.showBorder===!1?$n.TRANSPARENT:$n.WHITE}}}};function Uw(e,t,n){return Gw(e,t,n)}function Gw(e,t,n){const o=Kh(e,t);if(n.v==null||n.v<v2){n=Ww(n);const l=o.backgroundColor,d=n.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(n=Aw()("backgroundColor",n))}const r=_w[e]?.[t]?.(n),a=n.backgroundColor&&n.backgroundType==null?{backgroundType:ae.COLOR}:{};return[{accentColor:null},Dw,r,n,a,{v:v2}].reduce((l,d)=>d==null?l:{...l,...j1()(KC,d)},{})}function Ww(e){return{...e,backgroundType:null,cardMode:null,v:1}}const Kw=null;function que(e,t){return!Kw[e]?.includes(t)}const Qw=null;function Jue(e,t){return!Qw[e]?.includes(t)}function Yw(e){return e===Bw.LIGHT?Ro.LIGHT:Ro.DARK}function Zw(e,t){if(t===Wh.AUTO){if(!e)return Ro.DARK;const n=Mw(e);return Ow(n)===Wh.DARK?Ro.DARK:Ro.LIGHT}else return t===Wh.LIGHT?Ro.LIGHT:Ro.DARK}function e0e(e,t,n,o,r){const a=e?.backgroundType;return e?.cardMode===$n.TRANSPARENT?a===g2.IMAGE?Yw(t?.overlayColor):o&&a!==g2.ACCENT?r:Zw(n,e?.customBackgroundColorContrast):o?r:Ro.DARK}const Xw=null;function t0e(e,t){return Xw[e]?.includes(t)??!1}const qw=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),Qh=(e,t)=>t!=null&&qw.test(t)?t:e;function zt(e){const{contrast:t=ke.AUTO,backgroundColor:n="#fff"}=e,o=Qh("#fff",n),r=Dn(o);return t===ke.DARK||t===ke.AUTO&&r===ke.DARK?St.DARK:St.LIGHT}const Jw=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??ae.LIGHT,eA=e=>e.effectiveBackgroundType===ae.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,tA=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??ke.AUTO,x2=e=>{const{family:t,variant:n,customBackgroundColorContrast:o}=e;return!o&&(t==="image"&&n!=="text aside"||t==="chart"||n==="sorting")},nA=e=>{const{backgroundType:t,backgroundColor:n,accentColor:o,customBackgroundColorContrast:r,accentContrast:a,family:i,variant:c}=e;if(!(t===ae.ACCENT||t===ae.COLOR))return null;const d=t===ae.ACCENT?o:n;let h;return t===ae.ACCENT?h=a:x2({family:i,variant:c,customBackgroundColorContrast:r})?h=Dn(n):h=r??ke.DARK,zt({backgroundColor:d??void 0,contrast:h})},sA=e=>nA(e)===St.LIGHT,oA=e=>{const t=e.blockBackgroundType!=null||e.familyBackgroundType!=null||e.courseBackgroundType!=null,n=e.blockCustomContrast!=null||e.familyBackgroundColorContrast!=null||e.courseBackgroundColorContrast!=null;return!t&&!n},rA=e=>{const{backgroundColor:t,family:n,variant:o,blockCustomContrast:r,familyBackgroundColorContrast:a,courseBackgroundColorContrast:i}=e,c=r??a??i??ke.AUTO,d=x2({family:n,variant:o,customBackgroundColorContrast:c})?Dn(t):c;return zt({backgroundColor:t??void 0,contrast:d})};var aA=p(73766),Fl=p.n(aA);const iA=e=>{const{effectiveBackgroundType:t,blockImage:n}=e;return t!==ae.IMAGE?null:n??null},cA=e=>Z1(e?.alt),lA=e=>{if(!e)return null;const{alpha:t,overlayColor:n=it.DARK}=e,o=dt(e),r=n===it.LIGHT?"#fff":"#000";return Tl({alpha:t,color:r,url:o})};function Vn(){const e=He(),t=Ao(),n=nn(),o=Pt(),r=o?Kh(o.family,o.variant):{};return Jw({blockBackgroundType:n?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}function dA(){return Vn().toLowerCase()}function Hl(){const e=Pt(),t=Vn(),n=e?.background,o=Me(n?.media)?.image;return iA({effectiveBackgroundType:t,blockImage:o})}function uA(){const e=Hl();return cA(e)}function hA(){const e=Hl();return lA(e)}function mA(){const e=Hl();return!!e&&e?.overlayColor===it.LIGHT}function fA(){const e=Pt(),t=e?.family,n=e?.variant,o=Hw(t,n),r=e?.settings?.cardMode??$n.WHITE;return o?r.toLowerCase():null}function pA(){const e=vn(),t=e?ha(e):ut.LIGHT;return Fl()(t.toLowerCase())}function gA(){const e=Pt(),t=He(),n=Ao();return tA({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function vA(){const e=He(),t=nn(),n=vn(),o=Pt(),r=Vn(),a=gA(),i=t.accentColor||e?.theme?.colorAccent;return sA({accentColor:i,accentContrast:e?.theme?.accentContrast,backgroundColor:n,backgroundType:r,customBackgroundColorContrast:a,family:o?.family,variant:o?.variant})}function CA(){const e=Pt(),t=He(),n=vn(),o=Ao();return rA({backgroundColor:n,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:o?.backgroundColorContrast,variant:e?.variant})}function xA(){const e=Pt(),t=He(),n=Ao();return oA({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:n?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function Yh(){const e=dA(),t=pA(),n=fA(),o=vA(),r=mA(),a=xA(),i=vn(),c=hA(),l=uA();return{backgroundColor:i,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:n,colorRange:t,isContrastLight:o,isLegacyBackground:a,isOverlayLight:r}}var b2=p(49860);const y2=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function nn(){return(0,u.useContext)(y2)}const bA="settings";function Zh(e){return t=>{const n=b2.forwardRef((o,r)=>{const a=nn(),i={...o,[e??bA]:a};return(0,s.jsx)(t,{...i,ref:r})});return n.displayName=`withBlockSettings(${t.displayName||t.name})`,n}}function vn(){const e=He(),t=nn(),n=Ao(),o=Vn(),r=Pt();if(t==null)return null;const a=r?Kh(r.family,r.variant):{},i=eA({effectiveBackgroundType:o,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:n?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:a.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:o,backgroundColor:i};return zw(c)}const yA="backgroundColor";function SA(e){return t=>{const n=b2.forwardRef((o,r)=>{const a=vn(),i={...o,[e??yA]:a};return(0,s.jsx)(t,{ref:r,...i})});return n.displayName=`withBackgroundColor(${t.displayName||t.name})`,n}}function Xh({children:e,...t}){const n=Pt(),o=nn(),r=Ii(),a=(0,u.useMemo)(()=>{const i=n==null?t:Uw(n.family,n.variant,t);return{courseColor:r,...o,...i}},[n,t,r,o]);return(0,s.jsx)(y2.Provider,{value:a,children:e})}var LA,TA,kA;const n0e=null;function IA({children:e,course:t}){return e}function s0e(e){return LA()&&(TA(e)===!1||kA(e))}var $l=p(49860);const Et=$("curtain"),EA={curtainLoading:"Your content is loading.",curtainOffline:"Your computer is offline.",curtainOfflineReconnecting:"Attempting to reconnect\u2026",curtainSessionTimedOut:"Your session has timed out.",curtainSessionTimedOutRefresh:"Refresh",curtainSessionTimedOutRestart:"Click refresh to restart your session.",curtainSomethingWrong:"Something went wrong.",curtainSomethingWrongRefresh:"Refresh",curtainSomethingWrongTryAgain:"Click to refresh and try again."},NA=({labels:e,loadingText:t,showHeader:n,status:o})=>{const r={...EA,...e},[a,i]=$l.useState(!1),c=()=>i(!0),l=$l.useRef(null);return $l.useEffect(()=>(l.current=setTimeout(c,1e4),()=>{l.current&&clearTimeout(l.current)}),[]),$l.useEffect(()=>{if(o==="error"){const d=new Error("There was a socket connection error. The renderReconnect curtain was displayed");UL.yf.logger.info(d.message,d)}},[o]),o==="fatalError"?(0,s.jsx)(wA,{labelCurtainSomethingWrong:r.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:r.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:r.curtainSomethingWrongTryAgain,showHeader:n}):o==="error"&&a?(0,s.jsx)(RA,{labelCurtainSessionTimedOut:r.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:r.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:r.curtainSessionTimedOutRestart,showHeader:n}):o==="error"?(0,s.jsx)(AA,{labelCurtainOffline:r.curtainOffline,labelCurtainOfflineReconnecting:r.curtainOfflineReconnecting,showHeader:n}):(0,s.jsx)(jA,{labelCurtainLoading:r.curtainLoading,showHeader:n,text:t})},S2=()=>window.location.reload(),jA=({labelCurtainLoading:e,showHeader:t,text:n})=>(0,s.jsx)("div",{className:Et("container",{"show-header":t}),children:(0,s.jsxs)("div",{className:Et(),children:[(0,s.jsx)("div",{className:Et("spinner")}),(0,s.jsx)("div",{className:Et("text"),children:n||e})]})}),wA=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:n,showHeader:o})=>(0,s.jsx)("div",{className:Et("container",{"show-header":o}),children:(0,s.jsxs)("div",{className:Et(),children:[(0,s.jsx)("div",{className:Et("title"),children:e}),(0,s.jsx)("div",{className:Et("description"),children:n}),(0,s.jsx)("button",{className:Et("button"),onClick:S2,type:"button",children:t})]})}),AA=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:n})=>(0,s.jsx)("div",{className:Et("container",{"show-header":n}),children:(0,s.jsxs)("div",{className:Et(),children:[(0,s.jsx)("div",{className:Et("spinner",{reconnect:!0})}),(0,s.jsx)("div",{className:Et("title"),children:e}),(0,s.jsx)("div",{className:Et("description"),children:t})]})}),RA=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:n,showHeader:o})=>(0,s.jsx)("div",{className:Et("container",{"show-header":o}),children:(0,s.jsxs)("div",{className:Et(),children:[(0,s.jsx)("div",{className:Et("title"),children:e}),(0,s.jsx)("div",{className:Et("description"),children:n}),(0,s.jsx)("button",{className:Et("button"),onClick:S2,type:"button",children:t})]})}),L2=NA,o0e=null;function PA({children:e}){return e}const Es={get isInstantLink(){return!!window.InstantLinks?.publicId}};var T2=p(1368),MA=p(99979),OA=p(52872),BA=p(8099),DA=p(15995),FA=p(24899),HA=p(91961),$A=p(31072),VA=p(97730),zA=p(7145),_A=p(44383),UA=p(56143),GA=p(53183),WA=p(78001),KA=p(52546),QA=p(2972),YA=p(13392),ZA=p(50408),XA=p(70552),qA=p(70720),JA=p(12544),eR=p(92873),tR=p(24945),nR=p(6918),sR=p(17518),oR=p(25532),rR=p(70836),aR=p(56303),iR=p(29415),cR=p(25130),lR=p(21606),dR=p(4893),uR=p(66343),hR=p(53119),mR=p(70482),fR=p(46584),pR=p(83867),gR=p(71265),vR=p(35082),CR=p(17745),xR=p(74499),bR=p(83644),yR=p(6556),SR=p(92584),LR=p(65421),TR=p(23721),kR=p(46832),IR=p(167),ER=p(89067),NR=p(48482),jR=p(58543),wR=p(65607),AR=p(12476),RR=p(59319),PR=p(3370),MR=p(11373),OR=p(35520),BR=p(5491),DR=p(81009),FR=p(47073),k2=p(16625),HR=p(59099),$R=p(23572),VR=p(73574),zR=p(12409),_R=p(11198),UR=p(8495),GR=p(85754),WR=p(93706),KR=p(32085),QR=p(60441),YR=p(83045),ZR=p(99419),XR=p(90698),qR=p(83704),JR=p(486),eP=p(60100),tP=p(47855),nP=p(64713),sP=p(43151),oP=p(14190),rP=p(98876),aP=p(7252),iP=p(41012),cP=p(81755),lP=p(12277),dP=p(52126),uP=p(31076),hP=p(64089),mP=p(80538),fP=p(63126),pP=p(93257),gP=p(49467),vP=p(33988),CP=p(15792),xP=p(24129),bP=p(83656),yP=p(82837),SP=p(51119),LP=p(62983),TP=p(34340),I2=p(36274),kP=p(86546),IP=p(88379),EP=p(67199),NP=p(41252),jP=p(61005),wP=p(56242),AP=p(28529),RP=p(76835),PP=p(63389),MP=p(17410),OP=p(78623),BP=p(76062),DP=p(96826),FP=p(95906),HP=p(39261),$P=p(2522),VP=p(51455),zP=p(83388),_P=p(87754),UP=p(33111),GP=p(23140),WP=p(17477),KP=p(44915),QP=p(34663),YP=p(94340),ZP=p(27266),XP=p(19751),qP=p(86558),JP=p(6636),eM=p(6322),tM=p(40855),nM=p(50101),sM=p(38993),oM=p(74125),rM=p(11122),aM=p(89729),iM=p(22249),cM=p(90657),lM=p(21971),dM=p(13603),uM=p(66865),hM=p(52064),mM=p(46358),fM=p(57371),pM=p(94579),gM=p(93044),vM=p(76368),CM=p(24862),xM=p(88987),bM=p(16992),yM=p(59828),SM=p(1673),LM=p(28294),TM=p(96930),kM=p(28251),E2=p(10473),IM=p(67203),EM=p(5888),NM=p(75562),jM=p(77466),wM=p(70340),AM=p(19818),RM=p(57395),PM=p(75815),MM=p(49539),OM=p(59964),BM=p(34589),DM=p(46976),FM=p(4251),HM=p(33445),$M=p(97062),VM=p(81438),zM=p(58708),_M=p(37420),UM=p(85036),GM=p(38159),WM=p(67331),KM=p(74792),QM=p(43537),YM=p(86883),ZM=p(6899),XM=p(11020),qM=p(82761),JM=p(38033),eO=p(10523),tO=p(80224),nO=p(94905),sO=p(88234),oO=p(51680);const rO={prefix:"fab",iconName:"rise-com",icon:[512,512,[],"e001","M248 3.34C111 3.34 0 114 0 252c0 137 111 248 248 248 137 0 248-111 248-248-.457-137-112-248-248-248zm0 421c-75.4 0-139-48-163-116l326 0c-23.8 67.7-88.2 116-163 116z"]},aO={prefix:"fab",iconName:"reach",icon:[182,182,[],"e001",["M181.97 99.3826C136.326 99.3826 99.3497 136.325 99.3497 181.926H35.1699C35.1699 100.912 100.881 35.2632 181.97 35.2632V99.3826Z","M41.5029 82.9278C64.4243 82.9278 83.0058 64.3638 83.0058 41.4639C83.0058 18.564 64.4243 0 41.5029 0C18.5815 0 0 18.564 0 41.4639C0 64.3638 18.5815 82.9278 41.5029 82.9278Z"]]},iO={prefix:"fab",iconName:"audio-plus",icon:[20,20,[],"e001","M1.5 8.75C1.5 8.34375 1.8125 8 2.25 8C2.65625 8 3 8.34375 3 8.75V10C3 12.2188 4.78125 14 7 14C7.71875 14 8.40625 13.8125 9 13.4688C9 13.5 9 13.5 9 13.5C9 14.0625 9.0625 14.5625 9.21875 15.0625C8.75 15.25 8.25 15.4062 7.75 15.4688V16.5H9.25C9.65625 16.5 10 16.8438 10 17.25C10 17.6875 9.65625 18 9.25 18H7H4.75C4.3125 18 4 17.6875 4 17.25C4 16.8438 4.3125 16.5 4.75 16.5H6.25V15.4688C3.5625 15.0938 1.5 12.8125 1.5 10V8.75ZM4 5C4 3.34375 5.34375 2 7 2C8.65625 2 10 3.34375 10 5V10C10 10.125 9.96875 10.25 9.96875 10.375C9.625 10.875 9.34375 11.4375 9.1875 12.0625C8.625 12.6562 7.84375 13 7 13C5.34375 13 4 11.6562 4 10V5ZM5.5 5V10C5.5 10.8438 6.15625 11.5 7 11.5C7.8125 11.5 8.5 10.8438 8.5 10V5C8.5 4.1875 7.8125 3.5 7 3.5C6.15625 3.5 5.5 4.1875 5.5 5ZM10 13.5C10 11.0312 12 9 14.5 9C16.9688 9 19 11.0312 19 13.5C19 16 16.9688 18 14.5 18C12 18 10 16 10 13.5ZM11 8.75C11 8.34375 11.3125 8 11.75 8C12.0312 8 12.2812 8.1875 12.4062 8.40625C11.875 8.625 11.4062 8.90625 11 9.28125V8.75ZM12 13.5C12 13.7812 12.2188 14 12.5 14H14V15.5C14 15.7812 14.2188 16 14.5 16C14.75 16 15 15.7812 15 15.5V14H16.5C16.75 14 17 13.7812 17 13.5C17 13.25 16.75 13 16.5 13H15V11.5C15 11.25 14.75 11 14.5 11C14.2188 11 14 11.25 14 11.5V13H12.5C12.2188 13 12 13.25 12 13.5Z"]},cO={prefix:"fab",iconName:"clone-plus",icon:[20,20,[],"e001","M4 16H11V14.5H13V16C13 17.1031 12.1031 18 11 18H4C2.89688 18 2 17.1031 2 16V9C2 7.89687 2.89688 7 4 7H5.5V9H4V16ZM7 11V4C7 2.89688 7.89687 2 9 2H16C17.1031 2 18 2.89688 18 4V11C18 12.1031 17.1031 13 16 13H9C7.89687 13 7 12.1031 7 11ZM12.5 4.5C12.0844 4.5 11.75 4.83437 11.75 5.25V6.75H10.25C9.83437 6.75 9.5 7.08437 9.5 7.5C9.5 7.91563 9.83437 8.25 10.25 8.25H11.75V9.75C11.75 10.1656 12.0844 10.5 12.5 10.5C12.9156 10.5 13.25 10.1656 13.25 9.75V8.25H14.75C15.1656 8.25 15.5 7.91563 15.5 7.5C15.5 7.08437 15.1656 6.75 14.75 6.75H13.25V5.25C13.25 4.83437 12.9156 4.5 12.5 4.5Z"]},lO={prefix:"fab",iconName:"flask-outline",icon:[20,20,[],"e001","M6 2.75C6 2.34375 6.34375 2 6.75 2H13.25C13.6562 2 14 2.34375 14 2.75C14 3.15625 13.6562 3.5 13.25 3.5H13V8.8125L16.7812 15.4062C16.9375 15.6562 17 15.9688 17 16.25C17 17.2188 16.2188 18 15.25 18H4.75C3.78125 18 3 17.2188 3 16.25C3 15.9688 3.09375 15.6562 3.21875 15.4062L7 8.8125V3.5H6.75C6.34375 3.5 6 3.15625 6 2.75ZM8.5 3.5V9C8.5 9.125 8.46875 9.25 8.40625 9.375L7.1875 11.5H12.8125L11.5938 9.375C11.5312 9.25 11.5 9.125 11.5 9V3.5H8.5ZM6.34375 13L4.53125 16.1562C4.5 16.1875 4.5 16.2188 4.5 16.25C4.5 16.4062 4.59375 16.5 4.75 16.5H15.25C15.4062 16.5 15.5 16.4062 15.5 16.25C15.5 16.2188 15.5 16.1875 15.4688 16.1562L13.6875 13H6.34375Z"]},dO={prefix:"fas",iconName:"language",icon:[640,640,[],"f1ab","M192 64C209.7 64 224 78.3 224 96L224 128L352 128C369.7 128 384 142.3 384 160C384 177.7 369.7 192 352 192L342.4 192L334 215.1C317.6 260.3 292.9 301.6 261.8 337.1C276 345.9 290.8 353.7 306.2 360.6L356.6 383L418.8 243C423.9 231.4 435.4 224 448 224C460.6 224 472.1 231.4 477.2 243L605.2 531C612.4 547.2 605.1 566.1 589 573.2C572.9 580.3 553.9 573.1 546.8 557L526.8 512L369.3 512L349.3 557C342.1 573.2 323.2 580.4 307.1 573.2C291 566 283.7 547.1 290.9 531L330.7 441.5L280.3 419.1C257.3 408.9 235.3 396.7 214.5 382.7C193.2 399.9 169.9 414.9 145 427.4L110.3 444.6C94.5 452.5 75.3 446.1 67.4 430.3C59.5 414.5 65.9 395.3 81.7 387.4L116.2 370.1C132.5 361.9 148 352.4 162.6 341.8C148.8 329.1 135.8 315.4 123.7 300.9L113.6 288.7C102.3 275.1 104.1 254.9 117.7 243.6C131.3 232.3 151.5 234.1 162.8 247.7L173 259.9C184.5 273.8 197.1 286.7 210.4 298.6C237.9 268.2 259.6 232.5 273.9 193.2L274.4 192L64.1 192C46.3 192 32 177.7 32 160C32 142.3 46.3 128 64 128L160 128L160 96C160 78.3 174.3 64 192 64zM448 334.8L397.7 448L498.3 448L448 334.8z"]},uO={"alert-circle-solid":GR.lE,"alert-circle":I2.lE,"alert-diamond":$P.xG,"angle-right":qR.vm,"arrow-down-from-line":eP.xZ,"arrow-down-to-bracket":tP.a_,"arrow-down-to-line":nP.yH,"arrow-down":JR.B0,"arrow-left":sP.Ce,"arrow-right-from-line":rP.Pe,"arrow-right":oP.dm,"arrow-rotate-left-light":QA.V3,"arrow-rotate-left":aP.V3,"arrow-up-from-bracket":cP.MN,"arrow-up-from-line":lP.s8,"arrow-up-right-from-square":dP.faArrowUpRightFromSquare,"arrow-up":iP.IN,"arrows-two-from-center":MA.A1,"arrows-two-to-center":OA.hL,"badge-check":vR.Zs,"bar-chart":uP.X8,bars:CR.ck,"bars-regular":hP.ck,"block-selector":QR.iH,"book-open":fP.Re,"book-sparkles":pP.E4,book:mP.LB,"browser-light":FA.c9,browser:gP.c9,building:BA.UR,"building-regular":DA.UR,"cards-blank":vP.Xm,"caret-down":bR.xB,"caret-right":yR.fU,"chart-column":gR.q9,"check-regular":ZR.e6,check:xR.e6,"chevron-down-solid":SR.Jt,"chevron-down":CP.Jt,"chevron-left-light":HA.Wz,"chevron-left-solid":TR.Wz,"chevron-left":xP.Wz,"chevron-right-light":$A.Xk,"chevron-right-solid":kR.Xk,"chevron-right":bP.Xk,"chevron-up-solid":LR.w2,"chevron-up":yP.w2,"circle-arrow-right":NR.Ni,"circle-arrow-up":ER.yi,"circle-check-regular":LP.QR,"circle-check-solid":jR.QR,"circle-check":aR.QR,"circle-dot":TP.pp,"circle-half-stroke":kP.B2,"circle-exclamation":I2.lE,"circle-info":IP.faCircleInfo,"circle-notch":jP.s4,"circle-plus-duotone":iR.q_,"circle-plus-regular":EP.q_,"circle-plus":wR.q_,"circle-small-solid":AR.ZP,"circle-small":NP.ZP,"circle-solid":IR.GE,"circle-x":RR.Ub,"circle-xmark":wP.bn,"circle-xmark-solid":PR.bn,"circle-xmark-duotone":cR.bn,circle:SP.GE,"clipboard-list-check":AP.S3,"clock-rotate-left":RP.Yj,clone:MP.$3,close:OP.yY,"closed-captioning":PP.UM,"code-fork-duotone":lR.zt,"code-fork-regular":BP.zt,code:sO.jT,comment:DP.DN,copy:FP.jP,crop:HP.K1,"edit-regular":VP.MT,"ellipsis-regular":zP.Dw,"ellipsis-vertical-regular":_P.nx,envelope:UP.y_,"external-link":GP.vM,"eye-slash":zA.k6,eye:VA.pS,"face-anguished":YA.xX,"face-anguished-regular":ZA.xX,"face-frown":XA.Ho,"face-frown-regular":qA.Ho,"face-grin-regular":JA.pj,"face-laugh":eR.ou,"face-laugh-regular":tR.ou,"face-meh":nR.Lz,"face-meh-regular":sR.Lz,"face-smile":oR.H8,"face-smile-regular":rR.H8,"file-audio":KP.qe,"file-duotone":dR.A4,"file-export-light":UA.o1,"file-export":QP.o1,"file-import":YP.$M,"file-lines":ZP.bL,"file-pdf-light":_A.O_,"file-pdf":XP.O_,file:WP.A4,"folder-image":qP.JK,"folder-open":uR.Uj,gear:JP.BH,globe:eM.Bw,"graduation-cap":tM.eS,"grid-2":nM.Qy,"grid-solid":MR.Qy,"grip-dots-vertical":sM.IM,"hand-pointer":oM.A8,"image-landscape":aM.oC,"image-portrait":iM.E4,image:rM.jb,"photo-film":cM._Z,"info-circle":lM.iW,"layers-solid":UR.qI,"link-simple-slash":hM.r2,"link-simple":uM.wi,"link-slash":mM.TH,link:dM.CQ,list:fM.IT,"list-check":pM.UN,"location-dot":WA.gK,"lock-keyhole-light":GA.Yp,lock:OR.DW,"magnifying-glass-plus":vM.bM,"magnifying-glass":gM.$U,megaphone:KR.OR,"message-quote":CM.ps,"minus-solid":BR.EZ,minus:xM.EZ,paintbrush:hR.ue,palette:bM.fy,paste:yM.R9,pause:SM.G1,"pause-solid":DR.G1,"pen-line":LM.pg,"pen-nib":kM.us,"pen-to-square":TM.faPenToSquare,"pencil-duotone":mR.zL,"pencil-regular":XR.zL,"pencil-thin":oO.zL,pencil:KA.zL,"play-regular":E2.ij,"play-solid":FR.ij,play:E2.ij,"flag-solid":k2.s6,flag:k2.s6,"plus-regular":IM.QL,plus:EM.TS,"quote-left":NM.$7,"rectangle-history-circle-plus":wM.Hu,"rectangle-regular":jM.vt,"rectangle-vertical-history":AM.Lt,rocket:RM.KM,"ruler-horizontal":PM.Si,"ruler-triangle":MM.cb,"sliders-simple":HR.AD,"sparkles-solid":$R.p7,sparkles:OM.p7,"spinner-third":BM.sq,"square-arrow-down":FM.Y1,"square-arrow-right":HM.mT,"square-arrow-up-right":$M.fL,"square-check-solid":VR.Dn,"square-check":VM.Dn,"square-duo":fR.Nf,"square-info":zM.Lg,"square-plus":_M.Vd,square:DM.Nf,"stopwatch-regular":UM.nw,table:GM.w9,tag:WM._2,text:KM.jw,"trash-can":YM.sj,trash:QM.yL,"triangle-exclamation":WR.JA,"user-group":zR.US,"users-regular":ZM.gd,users:pR.gd,video:XM.n2,volume:qM.eF,volumeHigh:JM.AI,volumeLow:eO.gN,volumeXmark:tO.H_,"wand-magic-sparkles":nO.Ys,"waveform-lines":YR.Wx,xmark:_R.Jy},hO={"audio-plus":iO,"clone-plus":cO,"flask-outline":lO,language:dO,reach:aO,"rise-com":rO},ue=(0,u.memo)(function({"aria-label":t,className:n,classNameIcon:o,color:r,"data-testid":a,name:i,rotation:c,spin:l,style:d,styleIcon:h}){return(0,s.jsx)("span",{className:n,"data-testid":a,style:{color:r,...d},children:(0,s.jsx)(T2.g,{"aria-label":t,className:o,icon:uO[i],rotation:c,spin:l,style:h})})}),r0e=(0,u.memo)(function({className:t,classNameIcon:n,color:o,name:r,style:a,styleIcon:i}){return(0,s.jsx)("span",{className:t,style:{color:o,...a},children:(0,s.jsx)(T2.g,{className:n,icon:hO[r],style:i})})}),mO=({value:e,fallback:t})=>{const n=Me(e),o=At(e);return t?(0,s.jsx)("span",{"data-l10n-id":o,children:n||t}):(0,s.jsx)("span",{"data-l10n-id":o,children:n})};function fO({value:e,children:t}){const n=Me(e);return t(n)}const Cn=mO,N2=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),pO=(e,t)=>{const n=e?.toLowerCase();try{return t?.[n]?.authorDisplayName??N2.of(e)}catch(o){return console.warn(`Language ${e} invalid`,o),e}},gO=(e,t)=>{try{return t?.[e]?.learnerDisplayName??N2.of(e)}catch(n){return console.warn(`Language ${e} invalid`,n),e}},qh=()=>{const e=oa(),t=xh(e);return(0,u.useCallback)(o=>pO(o,t),[t])},vO=()=>{const e=oa(),t=xh(e);return(0,u.useCallback)(o=>gO(o,t),[t])};var CO=p(42663);function sn(e){const{to:t,children:n}=e,o=(0,Re.zy)(),r=(0,u.useMemo)(()=>L0(t,o),[o,t]);return(0,s.jsx)(Re.N_,{...e,to:r,children:n})}function xO({children:e,locale:t,...n}){const o=(0,Re.zy)(),r=Fn(),a=(0,u.useMemo)(()=>{const i=t===r?"":t,c=new URLSearchParams(o.search);return c.set("locale",i),o.pathname+"?"+c.toString()+o.hash},[r,t,o]);return(0,s.jsx)(sn,{...n,to:a,children:e})}var Ns=p(48258),bO=p(92238),Vl=p.n(bO);const yO={keys:["End"],keyCode:Ns.KEY_END},SO={keys:["Enter"],keyCode:Ns.KEY_RETURN},LO={keys:["Home"],keyCode:Ns.KEY_HOME},TO={keys:["Tab"],keyCode:Ns.KEY_TAB},kO={keys:[" "],keyCode:Ns.KEY_SPACE},IO={keys:["Escape","Esc"],keyCode:Ns.KEY_ESCAPE},EO={keys:["ArrowUp"],keyCode:Ns.KEY_UP},NO={keys:["ArrowDown"],keyCode:Ns.KEY_DOWN},jO={keys:["ArrowLeft"],keyCode:Ns.KEY_LEFT},wO={keys:["ArrowRight"],keyCode:Ns.KEY_RIGHT},js=({keyCode:e,keys:t})=>n=>n.keyCode?n.keyCode===e:So()(n.key,t),AO=e=>e.altKey||e.ctrlKey||e.metaKey,RO=js(yO),ma=js(SO),PO=js(LO),zl=js(TO),Jh=js(kO),xn=js(IO),br=js(EO),yr=js(NO),Po=js(jO),Mo=js(wO),Mi=Lo()(Jh,ma),a0e=Lo()(zl,ma),MO=Lo()(Mo,br),OO=Lo()(Po,yr),BO=Lo()(br,yr),j2=Co()(Mi),w2=25,DO=Vl()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=w2)}),FO=Vl()((e,t,n)=>{t&&(n.preventDefault(),e.scrollTop+=w2)}),HO=(e,t)=>n=>{const o=FO(e,t),r=DO(e);fn()([[yr,o],[br,r]])(n)},ls=$("locales-dropdown"),$O=({backToStackCourseId:e,currentLocale:t,defaultLocale:n,isBcd:o,locales:r,message:a,onChange:i,optionType:c,renderLocaleBadge:l,showMessageIndicator:d})=>{const h=(0,u.useRef)(null),m=(0,u.useRef)(null),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),b=(0,u.useMemo)(()=>r.filter(k=>k.localeCode!==n),[n,r]),x=(0,u.useMemo)(()=>r.find(k=>k.localeCode===n),[n,r]),y=(0,u.useMemo)(()=>r.find(k=>k.localeCode===t),[t,r]);(0,u.useLayoutEffect)(()=>{f&&C&&(h.current?.querySelector(`[data-locale="${t}"]`)?.focus(),g(!1))},[f,C,t]),(0,u.useEffect)(()=>{const k=E=>{xn(E)&&(m.current?.focus(),v(!1)),zl(E)&&setTimeout(()=>{h.current.contains(document.activeElement)||v(!1)},0)};return f&&document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[f]);const L=(0,u.useCallback)(k=>{!f&&document.activeElement===k.currentTarget&&g(!0),v(!f)},[f]),S=(0,u.useCallback)(k=>{f&&!m.current?.contains(k?.target)&&v(!1)},[f]);(0,CO.A)(h,S),(0,u.useEffect)(()=>{const k=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&S()},0);return window.addEventListener("blur",k),()=>window.removeEventListener("blur",k)},[S]);const T=(0,u.useCallback)(k=>{document.activeElement===k.currentTarget&&m.current?.focus(),v(!1),i?.(k.currentTarget.getAttribute("data-locale"))},[i]);return(0,s.jsxs)("div",{className:ls({isBcd:o,isOpen:f}),children:[(0,s.jsx)("div",{className:ls("trigger-wrap"),children:(0,s.jsxs)("button",{className:ls("trigger"),onClick:L,ref:m,type:"button",children:[o&&d?(0,s.jsx)(ue,{className:ls("warning-icon"),name:"triangle-exclamation"}):(0,s.jsxs)(s.Fragment,{children:[d&&(0,s.jsx)("div",{className:ls("message-indicator")}),(0,s.jsx)(ue,{name:"globe"})]}),y.displayName,(0,s.jsx)(ue,{name:"chevron-down"})]})}),(0,s.jsxs)("div",{className:ls("contents"),ref:h,children:[a,(0,s.jsx)("div",{className:ls("grouping-header"),children:"Source"}),(0,s.jsx)(A2,{checked:n===t,locale:x,onClick:T,renderLocaleBadge:l,type:c}),(0,s.jsx)("div",{className:ls("grouping-header"),children:"Translations"}),b.map(k=>(0,s.jsx)(A2,{checked:k.localeCode===t,locale:k,onClick:T,renderLocaleBadge:l,type:c},k.localeCode)),e&&(0,s.jsx)("a",{className:ls("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},A2=({checked:e,locale:t,onClick:n,renderLocaleBadge:o,type:r})=>r==="link"?(0,s.jsxs)(xO,{className:ls("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:n,children:[o?.(t.localeCode,e),t.displayName]},t.localeCode):(0,s.jsxs)("button",{className:ls("option",{checked:e}),"data-locale":t.localeCode,onClick:n,type:"button",children:[o?.(t.localeCode,e),t.displayName]},t.localeCode),VO=({hideBackToStack:e,isBcd:t,...n})=>{const o=He(),{currentLocale:r}=tt(),a=Cl(),i=Fn(),c=qh(),l=!e&&!t?o?.id:void 0,d=(0,u.useMemo)(()=>a.map(h=>({localeCode:h.locale,displayName:c(h.locale)})),[c,a]);return(0,s.jsx)($O,{backToStackCourseId:l,currentLocale:r,defaultLocale:i,isBcd:t,locales:d,optionType:"link",...n})},R2=window.location.origin,zO=1e3,_O="course:ready",P2="localizedSharePreview:ready",UO="preview:selectLocale",em="localizedSharePreview:toggleCurtain",M2="localizedSharePreview:togglePreview",ds=$("localized-share-preview"),fa=!!window.frameElement,O2=e=>(0,Qt.HX)(e)&&U0(),B2=e=>O2(e)&&!fa,GO=(e,t)=>window.parent?.postMessage({type:e,data:t});let D2=null;const WO=({children:e,localesDropdown:t,title:n})=>(0,s.jsxs)("div",{className:ds("header"),dir:"ltr",children:[(0,s.jsxs)("div",{className:ds("header-title-dropdowns"),children:[(0,s.jsx)("div",{className:ds("header-title"),children:(0,s.jsx)("span",{className:ds("header-title-text"),children:(0,s.jsx)(Cn,{value:n})})}),t&&(0,s.jsx)("div",{className:ds("header-dropdowns"),children:t})]}),(0,s.jsx)("div",{className:ds("header-btn-group"),children:e})]}),KO=({children:e,className:t,disabled:n=!1,onClick:o})=>(0,s.jsx)("button",{className:["button button--default button--header-done",t,n?"button--disabled":void 0].filter(Boolean).join(" "),disabled:n,onClick:o,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),QO=({children:e})=>{const t=ot(),n=Jt(),o=(0,Re.zy)(),{currentLocale:r,setCurrentLocale:a}=tt(),i=Fn(),c=kN(),l=de(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||_1(),m=(0,u.useRef)(null),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),[b,x]=(0,u.useState)(!h),y=(0,u.useMemo)(()=>{const w=new URLSearchParams(window.location.search),A=new URLSearchParams;for(const O of["from"])w.has(O)&&A.set(O,w.get(O));const M=A.toString();return`${R2}/share/${window.shareId}${M?`?${M}`:""}#/?locale=${r}`},[]),[L,S]=(0,u.useState)(null),[T,k]=(0,u.useState)(r),[E,I]=(0,u.useState)(!1),[j,P]=(0,u.useState)(!fa),N=(w,A)=>m.current?.contentWindow.postMessage({type:w,data:A});(0,u.useEffect)(()=>{fa||N(UO,r)},[r]),(0,u.useEffect)(()=>{fa&&(GO(P2),setTimeout(()=>I(!0),0))},[]),(0,u.useEffect)(()=>{const w=A=>{if(A.origin!==R2)return;const O=A.data?.type,B=A.data?.data;if(fa)switch(O){case em:{P(B);break}case M2:{B?(k(r),S(o),t(lh(!0)),a(i),n("/",{replace:!0})):(t(lh(!1)),a(T),n(L.pathname+L.search+L.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(O){case _O:{P(!1);break}case P2:{x(!0);break}}};return window.addEventListener("message",w),()=>{window.removeEventListener("message",w)}},[i,t,n,r,o,T,L,a]);const R=(0,u.useCallback)(()=>{const w=!f;clearTimeout(D2),g(!0),N(em,!0),D2=setTimeout(()=>{g(!1),N(em,!1),v(w)},zO),setTimeout(()=>{N(M2,w)},0)},[f]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:ds("curtain",{hide:!j}),children:(0,s.jsx)(L2,{status:"loading"})}),fa?E&&e:(0,s.jsxs)("div",{className:ds(),children:[b&&(0,s.jsx)(WO,{localesDropdown:!f&&!C&&(0,s.jsx)(VO,{hideBackToStack:!0}),title:c,children:(0,s.jsx)(KO,{className:ds("preview-button"),disabled:C,onClick:R,children:f?"Close Learner Preview":(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ue,{className:ds("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,s.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:ds("iframe"),ref:m,src:y})]})]})},YO=(0,u.lazy)(()=>p.e("_b106").then(p.t.bind(p,63744,23))),ZO=({children:e})=>{const t=de(),{setCurrentLocale:n,currentLocale:o}=tt(),r=Me(t?.title),a=oa()?.l10n?.languageCodeMetadata??{},i=Object.entries(a).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(YO,{courseTitle:r,currentLocale:o,locales:i,setCurrentLocale:n,children:e})})};function XO({children:e}){const t=de();return t&&O2(t)?(0,s.jsx)(QO,{children:e}):Es.isInstantLink?(0,s.jsx)(ZO,{children:e}):(0,s.jsx)(s.Fragment,{children:e})}const tm=(0,u.createContext)(void 0);tm.displayName="RiseComPartnerTrackingContext";function qO({children:e,onTrack:t}){return(0,s.jsx)(tm.Provider,{value:t,children:e})}function F2(){return(0,u.useContext)(tm)}var JO=p(86150),eB=p.n(JO),tB=p(20152),nB=p.n(tB);class Ys{static get isChrome(){return!window||!window.navigator?!1:/Chrome/.test(window.navigator.userAgent)&&/Google Inc/.test(window.navigator.vendor)}static get isSafari(){return!window||!window.navigator?!1:/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor)&&!/CriOS/.test(window.navigator.userAgent)}static get isIphoneSafari(){if(!window||!window.navigator)return!1;const t=/iPhone|iPod/.test(window.navigator.userAgent)&&!window.MSStream,n=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),o=/CriOS/.test(window.navigator.userAgent);return t&&n&&!o}static get isSafari9(){if(!window||!window.navigator)return!1;const t=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),n=/version\/9./i.test(window.navigator.userAgent);return t&&n}static get isIe11(){return!!(window&&Object.hasOwnProperty.call(window,"ActiveXObject")&&!window.ActiveXObject)}static get isEdge(){return!window||!window.navigator?!1:/Edge/.test(window.navigator.userAgent)}static get isMobile(){return!window||!window.navigator?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static get isLocalFilesystem(){return!window||!window.navigator?!1:/file:/.test(window.location.protocol)}static get isFirefox(){return window?.navigator?.userAgent.includes("Firefox")??!1}static get isBrave(){return globalThis?.navigator?typeof globalThis.navigator.brave?.isBrave=="function":!1}static get isChromium(){if(!globalThis?.navigator)return!1;const t=globalThis.navigator.userAgentData?.brands;return t?.length?t.some(({brand:n})=>/Chromium/i.test(n)):/Chrome|CriOS/.test(globalThis.navigator.userAgent)}static get isGoogleChrome(){if(!globalThis?.navigator||this.isBrave)return!1;const t=globalThis.navigator.userAgentData?.brands;if(t?.length)return t.some(({brand:a})=>/Google Chrome/i.test(a));const{userAgent:n,vendor:o}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(n);return/Chrome/.test(n)&&/Google Inc/.test(o)&&!r}}const sB=l0()(ts()),H2=e=>t=>`${e}/${t.id}`,oB=(e,t)=>u1()({data:(0,Ce.action)(t),method:"POST",url:_L(sB(`/${t}`),Ze()("url"),e),...xo()(["headers","withCredentials"],e)}),rB=e=>(t,n)=>Xg()(t,H2(n),nm(e,n)),aB=e=>kt()(Lt()({},["response","data"]),pi()(Ze()("type"),(0,Ce.error)(e))),iB=(e,t)=>n=>e.postRequest?e.postRequest(t,n):n,$2=e=>t=>n=>o=>k0(o,oB(t,n),e,T0()(aB(n),Co()(Kr()("data"),Ze()("data"))),nB()(Jn()(Ze()("error"),Jo().Rejected,Jo().of)),iB(t,{type:n,payload:o})),cB=({url:e,method:t,data:n,headers:o})=>{if(Ys.isFirefox){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),a=window.navigator.sendBeacon(e,r);return Promise.resolve({type:n.type,payload:{...n.payload,queued:a}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...o},body:JSON.stringify(n),keepalive:!0}).then(r=>r.json()).then(Wr()("data"))},lB=Jo().fromPromise(cB),nm=dh()(3,$2(vi)),dB=dh()(3,$2(lB)),uB=e=>(t,n)=>eB()(t,H2(n),nm(e,n)),hB=e=>({debounce:rB(e),send:nm(e),fetchWithKeepAlive:dB(e),throttle:uB(e)}),mB=`${Ne("RISE_RUNTIME_URI")}/ducks`,fB=hB({headers:()=>({"x-rise-authoring-client":"67334bf59968e69ef79ce56f1fd30d1b21574dd1"}),postRequest:(e,t)=>t,url:mB,withCredentials:!0});var pB=p(17077),gB=p.n(pB);const u0e=gB()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:r9(),userRole:c9(),subId:l9(),subPlan:d9(),subStatus:u9()}}),vB=ts()("rise/track/")("TRACK");var m0e;const CB=e=>({...e,context:{locale:navigator.language,device:s1(),channel:t1(),userAgentData:n1(),page:o1(),userAgent:r1(),...e.context}}),xB=(e,t)=>({...e,properties:{...e1(t),...e.properties}}),V2=e=>(t,n)=>{const o=n(),r=g0();let a=CB(e);return a=xB(a,o),a.userId=a.userId??r,a.author=a.author??r,t(fB.send(vB)(a))};function bB({children:e}){const t=ot(),n=(0,u.useCallback)(o=>t(V2(o)),[t]);return(0,s.jsx)(qO,{onTrack:n,children:e})}var _l=p(49860);const z2=_l.createContext({typefaces:[]});function yB({addTypefaces:e,children:t,typefaces:n=[]}){SB(n);const o=_l.useMemo(()=>({addTypefaces:e,typefaces:n}),[e,n]);return(0,s.jsx)(z2.Provider,{value:o,children:t})}function f0e(){return _l.useContext(z2)}function SB(e){_l.useEffect(()=>{const t=new CSSStyleSheet;for(const n of e){const o=`[data-rise-typeface-id="${CSS.escape(n.id)}"] { font-family: "${CSS.escape(n.name)}"; }`;t.insertRule(o)}return t.insertRule('[data-rise-typeface-id="@@heading@@"] { font-family: var(--font-family-head); }'),t.insertRule('[data-rise-typeface-id="@@body@@"] { font-family: var(--font-family-body); }'),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(n=>n!==t)}},[e])}function LB(e){return e.fonts}function _2(){return pe(LB)}var TB=p(49860);function kB({children:e}){const t=_2(),n=TB.useMemo(()=>{const o=new Map;for(const r of t)o.set(r.id,{id:String(r.id),name:r.name,default:r.default});return Array.from(o.values())},[t]);return(0,s.jsx)(yB,{typefaces:n,children:e})}const Zs=({id:e="portal",childType:t="other",attributes:n}={})=>{const o=document.querySelector('dialog[open][aria-modal="true"]');let r,a;if(o!=null&&t!=="dialog"?(e=`${e}-dialog`,r=o.querySelector(`#${e}`),a=o):(r=document.querySelector(`#${e}`),a=document.body),r==null&&(r=document.createElement("div"),r.setAttribute("id",e),a.appendChild(r)),n)for(const[i,c]of Object.entries(n))r.setAttribute(i,c);return r},U2=Zs();function IB(e){e?e.appendChild(U2):document.body.appendChild(U2)}const G2=te.RISE_CLASSIC;function W2(e){switch(e){case te.RISE_CLASSIC:case te.APEX:case te.HORIZON:return e;default:return G2}}const sm=(0,u.createContext)(G2);sm.displayName="ThemeIdContext";function EB({children:e,themeId:t}){return(0,s.jsx)(sm,{value:t,children:e})}function ht(){return(0,u.useContext)(sm)}function NB(){const e=de();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function jB(){const e=Jt(),t=(0,Re.zy)(),n=(0,u.useRef)(e),o=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),a=(0,u.useRef)(null);n.current=e,a.current==null&&(a.current={push:(...i)=>n.current(...i),replace:i=>n.current(i,{replace:!0}),go:i=>n.current(i),goBack:()=>n.current(-1),goForward:()=>n.current(1),listen:i=>(o.current.add(i),()=>{o.current.delete(i)}),location:t}),(0,u.useEffect)(()=>{a.current&&d8(a.current)},[]),(0,u.useEffect)(()=>{if(!a.current)return;a.current.location=t,o.current.forEach(l=>l(t));const i=r.current,c=window.location.href;r.current=c,window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:i,newURL:c}))},[t])}var pa=p(59777),wB=p(75152),Tt=p.n(wB),AB=p(30349),RB=p.n(AB);const PB=pi()(jh()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),Oe()("#FFF")),MB=Hs()({color:PB}),OB=({accentContrast:e,bodyTypeface:t,color:n,headingTypeface:o,isLegacyCourse:r,uiTypeface:a})=>{const i=(0,u.useMemo)(()=>{const d=Dn(n),h=e??d;return!r&&(h===ke.DARK||h===ke.AUTO&&d===ke.DARK)?[St.DARK,St.LIGHT]:[St.LIGHT,St.DARK]},[e,n,r]),[c,l]=i;return(0,s.jsx)("div",{dangerouslySetInnerHTML:{__html:RB()({bodyTypeface:t,colorThemeRGB:(0,pa.A)(n)?.slice(0,3),colorTheme:n,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:(0,pa.A)(l)?.slice(0,3),colorThemeContrastRGB:(0,pa.A)(c)?.slice(0,3),colorThemeTint:K0(n),colorThemeTransparent:n+"1A",headingTypeface:o,uiTypeface:a})}})},om=Be()(OB,MB);om.displayName="Branding",om.propTypes={bodyTypeface:Tt().string,color:Tt().string.isRequired,headingTypeface:Tt().string,uiTypeface:Tt().string};const BB=(0,u.memo)(om),DB=e=>e?`${e} | ${hg}`:hg,Oi=e=>ii()?e:DB(e);function Sr({active:e=!0,children:t,title:n,isExplicit:o=!1}){const r=Oi(PC());return(0,s.jsxs)(s.Fragment,{children:[e&&(0,s.jsx)("title",{children:n??r},o?"explicit":"default"),t]})}const rm=$("not-found"),Ul=()=>(0,s.jsx)(Sr,{title:Oi(),children:(0,s.jsx)("div",{className:rm(),children:(0,s.jsxs)("div",{className:rm("copy"),children:[(0,s.jsx)("h1",{className:rm("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,s.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})});var K2,Q2,Gl;const Y2=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let v0e;function C0e(){}function FB(){return(0,u.useContext)(Y2)}function HB({children:e}){if(!Es.isInstantLink)return(0,s.jsx)(s.Fragment,{children:e});const t=void 0;return t==null?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(t,{children:e})})}function x0e({children:e,PasswordGate:t}){const n=window.InstantLinks?.isPasswordProtected?.()===!0,[o,r]=Q2(),[a,i]=Q2(n?"required":"authorized"),c=Gl(()=>{i("authorized")},[]),l=Gl(()=>{i("error")},[]),d=Gl(f=>{r(f),i("validating")},[]),h=Gl(()=>{i("unauthorized")},[]),m=a==="authorized"||a==="validating";return K2(t,{onSubmitPassword:d,status:a,children:K2(Y2.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:o,status:a},children:e})})}function $B(e){return e.partnerContent}function VB(){return pe($B)}function Z2(e){return e?.partnerContent?.content??[]}function Bi(){return pe(Z2)}const X2=(0,ze.Mz)(e=>Yt(e)?.selectedAuthorId,Z2,(e,t)=>t.find(n=>n.id===e)),zB=(0,ze.Mz)(e=>Yt(e)?.partnerContentId,X2,(e,t)=>e?t:void 0);function _B(){return pe(X2)}function Di(){return pe(zB)}function UB(){const e=_B();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function GB(){return Bi()?.[0]?.data?.authors}function WB(e,t){const n=bl(),{currentLocale:o}=tt(),r=o&&n?.localeLabelSets?.[o]?.labels||e,a=o&&n?.localeLabelSets?.[o]!=null?o:t;return{labels:r,labelsLocale:a}}function KB({children:e}){const t=de(),n=xr(),{labels:o,iso639Code:r}=bw(),a=VB(),i=Io(),c=t?.locale??r,{labels:l,labelsLocale:d}=WB(o,c);return(0,s.jsx)(vN,{course:t,courseProgress:n,labels:l,labelsLocale:d,partnerContent:a,search:i,children:e})}var QB=p(19560);function YB({children:e,l10n:t}){const n=(0,u.useMemo)(()=>({l10n:t==null?null:(0,QB.omit)(["locales","defaultLocale"],t)}),[t]),o=t?.locales,r=t?.defaultLocale,a=t?.localeSelectorOptions,i=t?.languageCodeMetadata,c=(0,u.useMemo)(()=>o==null||r==null?{l10n:null}:{l10n:{locales:o,defaultLocale:r,localeSelectorOptions:a,languageCodeMetadata:i}},[o,r,a,i]);return(0,s.jsx)(Ei.Provider,{value:n,children:(0,s.jsx)(kh.Provider,{value:c,children:e})})}function q2(e,t=window.location){const{defaultLocale:n,locales:o}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,Re.Rr)(t.hash.slice(1));r=new URLSearchParams(c.search).get("locale")}const a=new URL(window.location.href);return a.pathname.startsWith("/view-pdf/")&&(r=a.searchParams.get("locale")),o?.find(c=>c.locale===r)?.locale||n}function ZB({defaultLocale:e,locales:t}){const n=Jt(),o=(0,Re.zy)(),r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>q2({defaultLocale:e,locales:t},o),[e,t,o]),i=(0,u.useCallback)((c,l="replace")=>{const d=r.current,h=c===e?"":c,m=new URLSearchParams(d.search);m.set("locale",h);const f=d.pathname+"?"+m.toString()+d.hash;l==="push"?n(f):n(f,{replace:!0})},[e,n]);return{currentLocale:a,setCurrentLocale:i}}const J2=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function XB(e,t){const n=de(),o=bl(),r=pe(l=>l.courseLabels.iso639Code),a=n?.locale??r,i=o?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??a??""},[e,a]),(0,u.useEffect)(()=>{n&&ph({course:n,locales:i,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[n,i,e]);const c=(0,u.useCallback)(l=>{if(!J2(l.origin))return;const h=[l.data].flat().find(m=>m?.type==="preview:selectLocale");h&&t(h.data,"replace")},[t]);(0,u.useEffect)(()=>(window.addEventListener("message",c),()=>window.removeEventListener("message",c)),[c])}function qB({children:e}){const t=bl(),{currentLocale:n,setCurrentLocale:o}=ZB({defaultLocale:t?.defaultLocale,locales:t?.locales});return XB(n,o),(0,s.jsx)(YB,{l10n:t,children:(0,s.jsx)(dN,{currentLocale:n,setCurrentLocale:o,children:e})})}function JB(e){const t=e?.exportSettings?.webExportSettings,n=e?.exportSettings?.exportType==="raw",o=e?.exportSettings?.exportType==="lms";return!!(n&&t?.disableCoverPage||o&&e?.lmsOptions?.disableCoverPage)}function ex(e){return!Es.isInstantLink&&JB(e)}function eD(e){return j0(e)||Yr(e)||lr(e)||tl(e)?!0:ex(e)}const tx=(0,u.createContext)({translationHoveredPath:null});function tD(){return(0,u.use)(tx)}const nD=tx.Provider,nx="focus-lesson-content",b0e="preview-nav-to-first-lesson",y0e="preview-nav-to-cover-page",We="preview-nav-to-lesson-item",am="preview-nav-to-slide",S0e="preview-scroll-to-nav-prev",L0e="preview-scroll-to-header",im="preview-clear-state",Wl="preview-show-nav-prev",Kl="preview-show-nav-next",sx="preview-nav-open",ox="preview-nav-close",cm="preview-go-to-slide-index",rx="event-lesson-nav-prev-visible",lm="event-lesson-nav-prev-hidden",ax="event-lesson-nav-next-visible",dm="event-lesson-nav-next-hidden",Oo="block-search-reveal-item",um="data-change-path",hm="data-l10n-id",ix=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(hm)]:JSON.parse(e.getAttribute(um))};let Xs;const sD=()=>{const e=ga();e&&e.classList.add("selected")},Ql=()=>{ga()&&Xs&&Fi(Xs)},oD=(e,t)=>n=>{const o=document.elementsFromPoint(n.clientX,n.clientY),r=t?o.find(a=>a.getAttribute(hm)):o.find(a=>a.getAttribute(um));r!=null&&(e&&Xs!==r&&(Xs=r,e(ix(r,t))),Fi(r))},rD=(e,t)=>n=>{n.stopPropagation(),n.preventDefault();const o=document.elementsFromPoint(n.clientX,n.clientY),r=t?o.find(a=>a.getAttribute(hm)):o.find(a=>a.getAttribute(um));if(r){Fi(r),lx();const a=ix(r,t);a&&(e(a),sD())}},mm=()=>document.getElementById("target-container"),ga=()=>document.getElementById("target-highlight"),cx=()=>{if(mm())return;const t=document.createElement("div");t.classList.add("target-container"),t.id="target-container",document.body.appendChild(t);const n=document.createElement("div");n.classList.add("target-highlight"),n.id="target-highlight",t.appendChild(n)},lx=()=>{const e=ga();e&&e.classList.add("selected")},aD=({top:e,left:t,width:n,height:o})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return n<r&&(e=e-10,o=o+20,t=t-20,n=n+40),{top:e,left:t,width:n,height:o}},Fi=e=>{const{top:t,left:n,width:o,height:r}=aD(e.getBoundingClientRect()),a=ga();a&&(e!==Xs&&a.classList.contains("selected")&&a.classList.remove("selected"),a.classList.add("active"),Object.assign(a.style,{top:`${t}px`,left:`${n}px`,width:`${o}px`,height:`${r}px`}),Xs=e)},iD=()=>{window.removeEventListener("scroll",Ql,{capture:!0}),Yl()},Yl=()=>{ga()?.classList?.remove("active"),ga()?.classList?.remove("selected")};let va,Zl;const cD=({locale:e})=>({isActive:t},n)=>{const o=!!mm();if(t){if(va)return va;cx();const r=oD(n,e);let a;return va=new Promise((i,c)=>{a=rD(i,e),Zl=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",a,!0),window.addEventListener("resize",Yl,!0),window.addEventListener("scroll",Ql,!0)}).finally(()=>{va=null,Zl=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",a,!0),window.removeEventListener("resize",Yl,!0),window.removeEventListener("scroll",Ql,!0)}),va}else Yl(),mm()?.remove(),Xs=null;return o&&Zl!=null&&Zl(new Error("cancelled")),Promise.resolve()},lD=e=>{let t=e.findIndex(n=>n==="items");return t===-1?e:e.slice(0,t+2)},dx=e=>{const t=(0,Vr.Ce)(e);return t?t.type==="translation"||t.type==="caption"&&t.l10nId?document.querySelector(`[data-l10n-id='${t.l10nId}']`)??document.querySelector(`[data-l10n-id*='${t.l10nId}']`):document.querySelector(`[data-change-path='${JSON.stringify(lD(e))}']`):null},dD=e=>{cx(),window.addEventListener("scroll",Ql,{capture:!0}),document.body.classList.add("target-mode");const t=dx(e);t&&Fi(t)},uD=e=>{if(!va)return;const t=dx(e);t&&(Xs!==t&&(Xs=t),Fi(t),lx(),t.scrollIntoView({behavior:"smooth",block:"center"}))},hD=e=>["course",e],ux=(e,t)=>["lessons",{id:e},t],mD=(e,t)=>[...ux(e,"items"),{id:t}],Ca=e=>JSON.stringify(hD(e)),hx=(e,t)=>JSON.stringify(ux(e,t)),fD=(e,t)=>JSON.stringify(mD(e,t)),bn={STATUS:"targetMode:status",TOGGLE:"targetMode:toggle",FOCUS:"targetMode:focus",CLEAR:"targetMode:clear",SELECTED:"targetMode:selected",HOVERED:"targetMode:hovered",TRANSLATION_HOVERED:"targetMode:translationHovered",TRANSLATION_HOVER_CLEAR:"targetMode:translationHoverClear"},xa=(e,t)=>{const n={};for(let o=0;o<e.length;o++){const r=e[o];if(typeof r=="object"&&r.id){const a=e[o-1],i=a==="items"?t.shift():a.replace(/s$/,"");n[`${i??"item"}Id`]=r.id}}return n},pD=new Set(["preview:lessonUpdate","preview:navigate","preview:goToSlideIndex","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",bn.FOCUS,bn.TOGGLE,bn.CLEAR,bn.TRANSLATION_HOVERED,bn.TRANSLATION_HOVER_CLEAR]),gD=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function vD({course:e,fonts:t,l10n:n}){let o=!1;return qv(t,()=>{o||(jn(SE({course:e,fonts:t,l10n:n})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){o=!0}}}function CD(){let e=[],t=0;return n=>{clearTimeout(t);for(const o of n)e.push(o);t=window.setTimeout(()=>{const o=e;e=[],jn(TE(o))},15)}}function xD(){const e=Jt(),t=(0,Re.zy)(),n=pe(x=>x.course),[o,r]=(0,u.useState)(""),[a,i]=(0,u.useState)({translationHoveredPath:null}),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(!1),m=(0,u.useRef)(e);m.current=e;const f=(0,u.useRef)(t);f.current=t;const v=(0,u.useRef)(n);v.current=n;const C=(0,u.useRef)(null),g=(0,u.useRef)(CD()),b=(0,u.useRef)(t);return(0,u.useEffect)(()=>{b.current!==t&&(h(!0),b.current=t)},[t]),(0,u.useEffect)(()=>{if(d){const x=setTimeout(()=>{h(!1),l(!1)},0);return()=>clearTimeout(x)}},[d]),(0,u.useEffect)(()=>{const x=y=>{const{data:L,origin:S}=y;if(!J2(S))return;const T=m.current,E=f.current.pathname,I=v.current,j=I?.lessonsOnly,P=Array.isArray(L)?L:[L];for(const{type:N,data:R,options:w}of P)if(pD.has(N)){if(N===bn.TOGGLE&&window.targetMode?.(R,M=>{window.parent.postMessage({type:bn.HOVERED,data:M},"*")})?.then(M=>{window.parent.postMessage({type:bn.SELECTED,data:M},"*")}).catch(()=>{window.parent.postMessage({type:bn.SELECTED,data:[]},"*")}),N==="preview:update"&&r(R),N==="preview:themeUpdate"){C.current?.();const{course:A,l10n:M,fonts:O,theme:B}=R,D={...A,theme:B},H=J8({course:I,updates:D}),{cancel:V}=vD({course:H,fonts:O,l10n:M});C.current=V}if(N==="preview:navigate"){let{type:A,lessonId:M,itemId:O}=R;const{path:B,replace:D}=R,H=D?V=>T(V,{replace:!0}):T;if(gD(A,E)){if(Array.isArray(B)){const V=(0,Vr.Ce)(B);if(V)({type:A,lessonId:M,itemId:O}=V);else if(B[0]==="mondrian")for(const G of I?.lessons??[]){const _=G.items?.find(Y=>"blockumentId"in Y&&Y.blockumentId===B[1]);if(_){A="lesson",M=G.id,O=_.id;break}}else continue}if(A==="firstLesson"&&j?.[0])H(gn(j[0].id));else if(A==="cover"||A==="course")H("/");else if(A==="lesson"&&j?.find(({id:G})=>G===M)!=null){const G=gn(M),_=lr(I),Y=(0,Re.B6)(Ml,E)!=null||(0,Re.B6)(Ol,E)!=null,Z=G!==E&&!(_&&Y),W=()=>{_&&O==null&&B==null?window.dispatchEvent(new CustomEvent(am,{detail:{lessonId:M}})):(O!=null||B!=null)&&window.dispatchEvent(new CustomEvent(We,{detail:{lessonId:M,itemId:O,path:B}}))},F=_&&O==null&&B==null||O!=null||B!=null;Eh(kC.getState())===bo.RESTRICTED&&jn(WE({targetLessonId:M,lessons:I?.lessons??[]})),Z&&H(G),F&&(Z?setTimeout(W,1500):W())}}}if(N===bn.CLEAR&&window.dispatchEvent(new CustomEvent(im)),N==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(sx)),N==="preview:navClose"&&window.dispatchEvent(new CustomEvent(ox)),N==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(Wl)),N==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(Kl)),N==="preview:scrollto"&&typeof R.target=="string"){const A=document.querySelector(R.target);A&&A.scrollIntoView({behavior:"smooth",block:"start"})}N==="preview:goToSlideIndex"&&typeof R.slideIndex=="number"&&window.dispatchEvent(new CustomEvent(cm,{detail:{slideIndex:R.slideIndex}})),N==="preview:replace"&&jn(yE(R)),N==="preview:changeset"&&g.current(R),N===bn.FOCUS&&uD(R.path),N===bn.TRANSLATION_HOVERED&&(i({translationHoveredPath:R.path}),dD(R.path)),N===bn.TRANSLATION_HOVER_CLEAR&&(i({translationHoveredPath:null}),iD()),N==="preview:lessonUpdate"&&(jn(LE(R)),requestAnimationFrame(()=>{window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)})),N==="preview:selectLocale"&&w?.shouldRetainParentFocus&&l(!0)}};return window.addEventListener("message",x),()=>window.removeEventListener("message",x)},[]),{previewType:o,targetModeContext:a,didNavigate:d,shouldSkipAutoFocusOnNavigate:c}}const mx=(0,u.createContext)(null);function Hi(){const e=(0,u.useContext)(mx);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function bD({children:e}){const{previewType:t,targetModeContext:n,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=xD(),a=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}),[t,o,r]);return(0,s.jsx)(nD,{value:n,children:(0,s.jsx)(mx,{value:a,children:e})})}function fm({className:e,ref:t}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,s.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function yD({className:e}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"8",role:"img",viewBox:"0 0 16 8",width:"16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M1 5h11.6l-1.3 1.3c-.4.4-.4 1 0 1.4.2.2.4.3.7.3.3 0 .5-.1.7-.3l3-3c.4-.4.4-1 0-1.4l-3-3c-.4-.4-1-.4-1.4 0-.4.4-.4 1 0 1.4L12.6 3H1c-.6 0-1 .4-1 1s.4 1 1 1",fill:"currentColor",fillRule:"evenodd"})})}function fx({className:e,ref:t}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",height:"15",ref:t,role:"img",viewBox:"0 0 16 15",width:"16",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,s.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function Mt({children:e,className:t,height:n,width:o,viewBox:r}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e})}function SD(e){return(0,s.jsx)(Mt,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M0.666992 1.00002C0.666992 0.539783 1.04009 0.166687 1.50033 0.166687H14.0003C14.4606 0.166687 14.8337 0.539783 14.8337 1.00002C14.8337 1.46026 14.4606 1.83335 14.0003 1.83335H1.50033C1.04009 1.83335 0.666992 1.46026 0.666992 1.00002ZM0.666992 6.00002C0.666992 5.53978 1.04009 5.16669 1.50033 5.16669H16.5003C16.9606 5.16669 17.3337 5.53978 17.3337 6.00002C17.3337 6.46026 16.9606 6.83335 16.5003 6.83335H1.50033C1.04009 6.83335 0.666992 6.46026 0.666992 6.00002ZM0.666992 11C0.666992 10.5398 1.04009 10.1667 1.50033 10.1667H10.667C11.1272 10.1667 11.5003 10.5398 11.5003 11C11.5003 11.4603 11.1272 11.8334 10.667 11.8334H1.50033C1.04009 11.8334 0.666992 11.4603 0.666992 11Z",fill:"currentColor",fillRule:"evenodd"})})}function LD(e){return(0,s.jsx)(Mt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,s.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function TD(e){return(0,s.jsx)(Mt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,s.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function kD(e){return(0,s.jsxs)(Mt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,s.jsx)("path",{d:"M9.94535 6.125C9.1938 6.125 8.52385 6.6729 8.30039 7.48015C8.17194 7.9442 7.70954 8.21104 7.26759 8.07617C6.82564 7.94129 6.5715 7.45577 6.69996 6.99172C7.11282 5.50025 8.3916 4.375 9.94535 4.375C11.8499 4.375 13.3335 6.05606 13.3335 8.05C13.3335 9.7417 12.2656 11.2082 10.7787 11.6139V12.25C10.7787 12.7332 10.4056 13.125 9.94535 13.125C9.48511 13.125 9.11201 12.7332 9.11201 12.25V10.85C9.11201 10.3668 9.48511 9.975 9.94535 9.975C10.8628 9.975 11.6668 9.14886 11.6668 8.05C11.6668 6.95114 10.8628 6.125 9.94535 6.125Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M10.0002 14C9.53992 14 9.16683 14.3918 9.16683 14.875C9.16683 15.3582 9.53992 15.75 10.0002 15.75H10.0085C10.4687 15.75 10.8418 15.3582 10.8418 14.875C10.8418 14.3918 10.4687 14 10.0085 14H10.0002Z",fill:"currentColor"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M0.833496 3.55556C0.833496 2.01519 2.09493 0.875 3.51868 0.875H16.4816C17.9054 0.875 19.1668 2.01519 19.1668 3.55556V17.4444C19.1668 18.9848 17.9054 20.125 16.4816 20.125H3.51868C2.09493 20.125 0.833496 18.9848 0.833496 17.4444V3.55556ZM3.51868 2.625C2.89693 2.625 2.50016 3.10156 2.50016 3.55556V17.4444C2.50016 17.8984 2.89693 18.375 3.51868 18.375H16.4816C17.1034 18.375 17.5002 17.8984 17.5002 17.4444V3.55556C17.5002 3.10156 17.1034 2.625 16.4816 2.625H3.51868Z",fill:"currentColor",fillRule:"evenodd"})]})}function yn(e){return(0,s.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function px(e){return(0,s.jsx)(yn,{...e,fill:"none",viewBox:"1 1 18 18",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.99998 0.833336C4.93737 0.833336 0.833313 4.93739 0.833313 10C0.833313 15.0626 4.93737 19.1667 9.99998 19.1667C15.0626 19.1667 19.1666 15.0626 19.1666 10C19.1666 4.93739 15.0626 0.833336 9.99998 0.833336ZM13.0892 6.91075C13.4147 7.23618 13.4147 7.76382 13.0892 8.08926L11.1785 10L13.0892 11.9107C13.4147 12.2362 13.4147 12.7638 13.0892 13.0893C12.7638 13.4147 12.2362 13.4147 11.9107 13.0893L9.99998 11.1785L8.08923 13.0893C7.7638 13.4147 7.23616 13.4147 6.91072 13.0893C6.58529 12.7638 6.58529 12.2362 6.91072 11.9107L8.82147 10L6.91072 8.08926C6.58529 7.76382 6.58529 7.23618 6.91072 6.91075C7.23616 6.58531 7.7638 6.58531 8.08923 6.91075L9.99998 8.82149L11.9107 6.91075C12.2362 6.58531 12.7638 6.58531 13.0892 6.91075Z",fill:"black",fillRule:"evenodd"})})}function Xl(e){return(0,s.jsxs)(yn,{...e,fill:"none",viewBox:"0 0 18 18",children:[(0,s.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,s.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function ID(e){return(0,s.jsx)(Mt,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M5.325 9.01843C3.225 9.01843 1.5 7.37868 1.5 5.29172C1.5 3.20476 3.225 1.49048 5.325 1.49048C7.425 1.49048 9.15 3.20476 9.15 5.29172C9.15 7.37868 7.425 9.01843 5.325 9.01843ZM9.525 8.42236C10.2 7.52795 10.575 6.48447 10.575 5.29193C10.575 2.38509 8.25 0 5.325 0C2.4 0 0 2.38509 0 5.29193C0 8.19876 2.4 10.5839 5.325 10.5839C6.525 10.5839 7.65 10.2112 8.475 9.54037L10.725 11.7764C10.875 11.9255 11.1 12 11.25 12C11.4 12 11.625 11.9255 11.775 11.7764C12.075 11.4783 12.075 11.0311 11.775 10.7329L9.525 8.42236Z",fill:"currentColor",fillRule:"evenodd"})})}function ED(e){return(0,s.jsx)(Mt,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,s.jsx)("path",{d:"M5.56569 4.75592L8.76601 1.42259C9.27003 0.897618 8.91306 0 8.20027 0L1.79963 0C1.08683 0 0.729863 0.897618 1.23389 1.42259L4.43421 4.75592C4.74666 5.08136 5.25324 5.08136 5.56569 4.75592Z",fill:"currentColor"})})}function ND(e){return(0,s.jsxs)(Mt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,s.jsx)("path",{d:"M3.1665 6.08335C3.1665 4.01229 4.84544 2.33335 6.9165 2.33335C8.98757 2.33335 10.6665 4.01229 10.6665 6.08335C10.6665 6.37941 10.6324 6.66643 10.5681 6.9411C10.4634 7.38925 10.7417 7.83748 11.1899 7.94225C11.6381 8.04702 12.0863 7.76865 12.1911 7.3205C12.2841 6.92235 12.3332 6.50805 12.3332 6.08335C12.3332 3.09181 9.90805 0.666687 6.9165 0.666687C3.92496 0.666687 1.49984 3.09181 1.49984 6.08335C1.49984 6.46923 1.54032 6.84657 1.61756 7.21105C1.679 7.50095 1.76362 7.78236 1.86938 8.05316C1.97511 8.32389 2.10191 8.5839 2.24772 8.83119C2.48148 9.22764 2.99237 9.35953 3.38882 9.12577C3.78527 8.89201 3.91716 8.38112 3.6834 7.98467C3.58248 7.81352 3.49485 7.63379 3.42186 7.44688C3.34886 7.25994 3.29045 7.0657 3.24802 6.86551C3.1947 6.61395 3.1665 6.3524 3.1665 6.08335Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M9.18922 9.34412L14.8186 10.2697C16.2762 10.5117 17.3332 11.6819 17.3332 13.0521V16.6037C17.3332 17.0029 16.9837 17.3264 16.553 17.3264C16.122 17.3264 15.7728 17.0029 15.7728 16.6037V13.0521C15.7728 12.3826 15.2561 11.8108 14.5446 11.6926L8.30452 10.6667H8.30233C7.90851 10.6331 7.57585 10.2773 7.57585 9.8899V6.0524C7.57585 5.88733 7.48441 5.73325 7.33119 5.64046C7.17921 5.54853 6.99291 5.53668 6.82002 5.60606C6.63747 5.68035 6.51483 5.87085 6.51483 6.08044V15.3607C6.51483 15.6856 6.30169 15.9391 5.91441 16.0741C5.40325 16.2528 4.90988 16.0261 4.70516 15.7226L3.01346 13.2999C2.93513 13.1565 2.84963 13.09 2.68954 13.0406C2.59935 13.0249 2.47889 13.0408 2.37154 13.0906C2.2798 13.1394 2.22768 13.4826 2.38902 13.9902C2.41984 14.0542 3.0442 15.4844 3.27756 16.0189C3.32536 16.1284 3.35676 16.2003 3.36328 16.2152C3.47656 16.4494 3.49404 16.6994 3.40853 16.8957C3.33551 17.0631 3.1904 17.1911 2.98912 17.2663C2.893 17.3018 2.77099 17.3334 2.63742 17.3334C2.36124 17.3334 2.03826 17.1986 1.80702 16.6867L1.75272 16.5849C1.3289 15.6773 1.03464 14.952 0.90735 14.6382L0.905151 14.6328L0.896561 14.6115C0.87092 14.548 0.854463 14.5072 0.847419 14.4926C0.45609 13.3756 0.711983 12.3355 1.49527 11.8308C1.97428 11.5452 2.55316 11.4538 3.08867 11.5781C3.63572 11.7047 4.10288 12.0476 4.40371 12.5436L4.82936 13.2293V5.99429C4.82936 5.3563 5.1692 4.74981 5.7381 4.37228C6.30855 3.99359 7.0238 3.89848 7.69942 4.11153C8.55823 4.3824 9.13554 5.15654 9.13617 6.03881L9.18922 9.34412Z",fill:"currentColor"})]})}function jD(e){return(0,s.jsxs)(Mt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,s.jsx)("path",{clipRule:"evenodd",d:"M19.548 2.09234C19.8255 2.23518 20 2.52116 20 2.83331V11.1666C20 11.4788 19.8255 11.7648 19.548 11.9076C19.2704 12.0505 18.9363 12.0262 18.6823 11.8448L12.849 7.67809C12.63 7.52166 12.5 7.2691 12.5 6.99998C12.5 6.73085 12.63 6.47829 12.849 6.32187L18.6823 2.1552C18.9363 1.97376 19.2704 1.9495 19.548 2.09234ZM14.7671 6.99998L18.3333 9.54732V4.45264L14.7671 6.99998Z",fill:"currentColor",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2.5 1.99998C2.03976 1.99998 1.66667 2.37308 1.66667 2.83331V11.1666C1.66667 11.6269 2.03976 12 2.5 12H11.6667C12.1269 12 12.5 11.6269 12.5 11.1666V2.83331C12.5 2.37308 12.1269 1.99998 11.6667 1.99998H2.5ZM0 2.83331C0 1.4526 1.11929 0.333313 2.5 0.333313H11.6667C13.0474 0.333313 14.1667 1.4526 14.1667 2.83331V11.1666C14.1667 12.5474 13.0474 13.6666 11.6667 13.6666H2.5C1.11929 13.6666 0 12.5474 0 11.1666V2.83331Z",fill:"currentColor",fillRule:"evenodd"})]})}function wD(e){return(0,s.jsx)(Mt,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.78572 9.78572C9.5 10.0714 9.07143 10.0714 8.78571 9.78572L5 6.00001L1.21429 9.78572C0.928571 10.0714 0.500001 10.0714 0.214285 9.78572C-0.0714284 9.49999 -0.0714284 9.07144 0.214285 8.78571L4 5L0.214285 1.21429C-0.0714284 0.928564 -0.0714284 0.500007 0.214285 0.214279C0.357143 0.0714143 0.500001 0 0.714286 0C0.928571 0 1.07143 0.0714143 1.21429 0.214279L5 3.99999L8.78571 0.214279C8.92857 0.0714143 9.14286 0 9.28572 0C9.42857 0 9.64286 0.0714143 9.78572 0.214279C10.0714 0.500007 10.0714 0.928564 9.78572 1.21429L6 5L9.78572 8.78571C10.0714 9.07144 10.0714 9.49999 9.78572 9.78572Z",fill:"currentColor",fillRule:"evenodd"})})}const AD=({width:e="17",height:t="15",title:n="Book",desc:o="Book",focusable:r="false",className:a})=>(0,s.jsxs)("svg",{className:a,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:n}),(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{d:"M8.407 14.529a.68.68 0 0 1-.374 0L.506 12.553A.679.679 0 0 1 0 11.897V.679C0 .234.42-.09.851.023L8.22 1.957 15.589.023a.679.679 0 0 1 .851.656v11.218a.679.679 0 0 1-.506.656L8.407 14.53zM7.541 3.182L1.357 1.56v9.814l6.184 1.623V3.182zm1.358 0v9.814l6.184-1.623V1.56L8.899 3.182z",fill:"#FFF",fillRule:"nonzero"})]});var RD=p(40278),X=p.n(RD);const gx=({title:e="Pick One",desc:t="Pick One",width:n="16",height:o="14",className:r,focusable:a="false","aria-hidden":i})=>(0,s.jsxs)("svg",{"aria-hidden":i,className:X()("i i-pickOne",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsxs)("g",{fillRule:"evenodd",children:[(0,s.jsx)("path",{d:"M5.039 10.865A1.284 1.284 0 1 1 3.754 9.58v-1.6a2.884 2.884 0 1 0-.001 5.768 2.884 2.884 0 0 0 0-5.768v1.6c.71 0 1.286.575 1.286 1.285zM5.039 3.851a1.284 1.284 0 1 1-1.285-1.285v-1.6a2.884 2.884 0 1 0-.001 5.769 2.884 2.884 0 0 0 0-5.769v1.6c.71 0 1.286.575 1.286 1.285z",fillRule:"nonzero"}),(0,s.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),vx=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:n="15",height:o="15",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:X()("i i-fillInTheBlank",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("path",{d:"M2.488 8.246l5.25-5.25 1.4 1.4-5.25 5.25h-1.4v-1.4zm-.875 3.15h2.625a.794.794 0 0 0 .613-.262l6.125-6.125a.846.846 0 0 0 0-1.225L8.35 1.159a.846.846 0 0 0-1.225 0L1 7.284a.794.794 0 0 0-.263.612v2.625c0 .525.35.875.875.875zM.739 13.146h14v1.75h-14z"})]});function Cx({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",ref:t,viewBox:"0 0 13 13",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function PD(e){return(0,s.jsxs)(yn,{...e,fill:"none",viewBox:"0 3 16 10",children:[(0,s.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function xx(e){return(0,s.jsx)(Mt,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function bx(e){return(0,s.jsxs)(yn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,s.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function yx(e){return(0,s.jsxs)(yn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("path",{d:"M8.00085 5.20305L5.14081 8.06339C5.14079 8.06341 5.14077 8.06343 5.14075 8.06345C5.00146 8.20273 4.92319 8.39163 4.92314 8.58861V8.5887V9.93926C4.92314 10.1851 5.12244 10.3844 5.36829 10.3844H6.71884H6.71894C6.91593 10.3844 7.10484 10.3061 7.24413 10.1668C7.24414 10.1668 7.24415 10.1667 7.24416 10.1667L10.104 7.30664C10.104 7.30657 10.1041 7.3065 10.1042 7.30643L10.1042 7.30638C10.1043 7.30631 10.1044 7.30622 10.1044 7.30615L10.9465 6.46442C11.03 6.38095 11.0769 6.26773 11.0769 6.14966C11.0769 6.0316 11.03 5.91836 10.9466 5.83487L9.47304 4.36105C9.29924 4.18722 9.01746 4.18716 8.84359 4.36091L8.00111 5.20279C8.0011 5.2028 8.0011 5.2028 8.0011 5.2028L8.00085 5.20305Z",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"0.890284"}),(0,s.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function MD({className:e}){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,s.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function OD(e){return(0,s.jsxs)(yn,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,s.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,s.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,s.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function BD({className:e}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",viewBox:"0 0 10 7",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function DD(e){return(0,s.jsxs)(yn,{viewBox:"0 0 12 12",...e,children:[(0,s.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}function FD({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",height:"17",ref:t,role:"img",viewBox:"0 0 17 17",width:"17",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M8.029 16.2343L8.7361 16.9414L9.44321 16.2343L16.707 8.97048L15.2928 7.55627L9.73903 13.11L9.73903 1.99985L7.73903 1.99985L7.73904 13.1159L2.17939 7.55627L0.765176 8.97048L8.029 16.2343Z",fillRule:"evenodd"})})}function HD(e){return(0,s.jsx)(yn,{...e,viewBox:"0 0 16 8",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M1 5H12.6L11.3 6.3C10.9 6.7 10.9 7.3 11.3 7.7C11.5 7.9 11.7 8 12 8C12.3 8 12.5 7.9 12.7 7.7L15.7 4.7C16.1 4.3 16.1 3.7 15.7 3.3L12.7 0.3C12.3 -0.1 11.7 -0.1 11.3 0.3C10.9 0.7 10.9 1.3 11.3 1.7L12.6 3H1C0.4 3 0 3.4 0 4C0 4.6 0.4 5 1 5",fill:"currentColor",fillRule:"evenodd"})})}function $D({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",focusable:"false",ref:t,version:"1.1",viewBox:"0 0 17 17",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M8.971 0.7657L8.2639 0.0585938L7.55679 0.765701L0.292969 8.02952L1.70718 9.44374L7.26096 3.88995L7.26097 15.0002H9.26097L9.26096 3.88409L14.8206 9.44373L16.2348 8.02952L8.971 0.7657Z",fillRule:"evenodd"})})}function VD(e){return(0,s.jsx)(Mt,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function Sx(e){return(0,s.jsx)(Mt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M6.00008 7.91406L11.7072 2.20696L10.293 0.792742L6.00007 5.08564L1.70718 0.792742L0.292969 2.20696L6.00008 7.91406Z",fill:"currentColor",fillRule:"evenodd"})})}function zD(e){return(0,s.jsx)(Mt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M5.99992 0.0859375L0.292818 5.79304L1.70703 7.20726L5.99993 2.91436L10.2928 7.20726L11.707 5.79304L5.99992 0.0859375Z",fill:"currentColor",fillRule:"evenodd"})})}function _D(e){return(0,s.jsxs)(Mt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,s.jsx)("path",{d:"M9.94535 6.125C9.1938 6.125 8.52385 6.6729 8.30039 7.48015C8.17194 7.9442 7.70954 8.21104 7.26759 8.07617C6.82564 7.94129 6.5715 7.45577 6.69996 6.99172C7.11282 5.50025 8.3916 4.375 9.94535 4.375C11.8499 4.375 13.3335 6.05606 13.3335 8.05C13.3335 9.7417 12.2656 11.2082 10.7787 11.6139V12.25C10.7787 12.7332 10.4056 13.125 9.94535 13.125C9.48511 13.125 9.11201 12.7332 9.11201 12.25V10.85C9.11201 10.3668 9.48511 9.975 9.94535 9.975C10.8628 9.975 11.6668 9.14886 11.6668 8.05C11.6668 6.95114 10.8628 6.125 9.94535 6.125Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M10.0002 14C9.53992 14 9.16683 14.3918 9.16683 14.875C9.16683 15.3582 9.53992 15.75 10.0002 15.75H10.0085C10.4687 15.75 10.8418 15.3582 10.8418 14.875C10.8418 14.3918 10.4687 14 10.0085 14H10.0002Z",fill:"currentColor"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M0.833496 3.55556C0.833496 2.01519 2.09493 0.875 3.51868 0.875H16.4816C17.9054 0.875 19.1668 2.01519 19.1668 3.55556V17.4444C19.1668 18.9848 17.9054 20.125 16.4816 20.125H3.51868C2.09493 20.125 0.833496 18.9848 0.833496 17.4444V3.55556ZM3.51868 2.625C2.89693 2.625 2.50016 3.10156 2.50016 3.55556V17.4444C2.50016 17.8984 2.89693 18.375 3.51868 18.375H16.4816C17.1034 18.375 17.5002 17.8984 17.5002 17.4444V3.55556C17.5002 3.10156 17.1034 2.625 16.4816 2.625H3.51868Z",fill:"currentColor",fillRule:"evenodd"})]})}function UD(e){return(0,s.jsx)(Mt,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 6.51982C2 4.02359 4.02359 2 6.51982 2C9.01605 2 11.0396 4.02359 11.0396 6.51982C11.0396 9.01605 9.01605 11.0396 6.51982 11.0396C4.02359 11.0396 2 9.01605 2 6.51982ZM6.51982 0C2.91902 0 0 2.91902 0 6.51982C0 10.1206 2.91902 13.0396 6.51982 13.0396C8.06462 13.0396 9.48394 12.5024 10.6011 11.6045L13.9964 14.9998L15.4106 13.5856L11.9518 10.1268C12.6391 9.09384 13.0396 7.8536 13.0396 6.51982C13.0396 2.91902 10.1206 0 6.51982 0Z",fill:"currentColor",fillRule:"evenodd"})})}function GD(e){return(0,s.jsxs)(Mt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,s.jsx)("path",{d:"M3.1665 6.08335C3.1665 4.01229 4.84544 2.33335 6.9165 2.33335C8.98757 2.33335 10.6665 4.01229 10.6665 6.08335C10.6665 6.37941 10.6324 6.66643 10.5681 6.9411C10.4634 7.38925 10.7417 7.83748 11.1899 7.94225C11.6381 8.04702 12.0863 7.76865 12.1911 7.3205C12.2841 6.92235 12.3332 6.50805 12.3332 6.08335C12.3332 3.09181 9.90805 0.666687 6.9165 0.666687C3.92496 0.666687 1.49984 3.09181 1.49984 6.08335C1.49984 6.46923 1.54032 6.84657 1.61756 7.21105C1.679 7.50095 1.76362 7.78236 1.86938 8.05316C1.97511 8.32389 2.10191 8.5839 2.24772 8.83119C2.48148 9.22764 2.99237 9.35953 3.38882 9.12577C3.78527 8.89201 3.91716 8.38112 3.6834 7.98467C3.58248 7.81352 3.49485 7.63379 3.42186 7.44688C3.34886 7.25994 3.29045 7.0657 3.24802 6.86551C3.1947 6.61395 3.1665 6.3524 3.1665 6.08335Z",fill:"currentColor"}),(0,s.jsx)("path",{d:"M9.18922 9.34412L14.8186 10.2697C16.2762 10.5117 17.3332 11.6819 17.3332 13.0521V16.6037C17.3332 17.0029 16.9837 17.3264 16.553 17.3264C16.122 17.3264 15.7728 17.0029 15.7728 16.6037V13.0521C15.7728 12.3826 15.2561 11.8108 14.5446 11.6926L8.30452 10.6667H8.30233C7.90851 10.6331 7.57585 10.2773 7.57585 9.8899V6.0524C7.57585 5.88733 7.48441 5.73325 7.33119 5.64046C7.17921 5.54853 6.99291 5.53668 6.82002 5.60606C6.63747 5.68035 6.51483 5.87085 6.51483 6.08044V15.3607C6.51483 15.6856 6.30169 15.9391 5.91441 16.0741C5.40325 16.2528 4.90988 16.0261 4.70516 15.7226L3.01346 13.2999C2.93513 13.1565 2.84963 13.09 2.68954 13.0406C2.59935 13.0249 2.47889 13.0408 2.37154 13.0906C2.2798 13.1394 2.22768 13.4826 2.38902 13.9902C2.41984 14.0542 3.0442 15.4844 3.27756 16.0189C3.32536 16.1284 3.35676 16.2003 3.36328 16.2152C3.47656 16.4494 3.49404 16.6994 3.40853 16.8957C3.33551 17.0631 3.1904 17.1911 2.98912 17.2663C2.893 17.3018 2.77099 17.3334 2.63742 17.3334C2.36124 17.3334 2.03826 17.1986 1.80702 16.6867L1.75272 16.5849C1.3289 15.6773 1.03464 14.952 0.90735 14.6382L0.905151 14.6328L0.896561 14.6115C0.87092 14.548 0.854463 14.5072 0.847419 14.4926C0.45609 13.3756 0.711983 12.3355 1.49527 11.8308C1.97428 11.5452 2.55316 11.4538 3.08867 11.5781C3.63572 11.7047 4.10288 12.0476 4.40371 12.5436L4.82936 13.2293V5.99429C4.82936 5.3563 5.1692 4.74981 5.7381 4.37228C6.30855 3.99359 7.0238 3.89848 7.69942 4.11153C8.55823 4.3824 9.13554 5.15654 9.13617 6.03881L9.18922 9.34412Z",fill:"currentColor"})]})}function WD(e){return(0,s.jsxs)(Mt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,s.jsx)("path",{clipRule:"evenodd",d:"M19.548 2.09234C19.8255 2.23518 20 2.52116 20 2.83331V11.1666C20 11.4788 19.8255 11.7648 19.548 11.9076C19.2704 12.0505 18.9363 12.0262 18.6823 11.8448L12.849 7.67809C12.63 7.52166 12.5 7.2691 12.5 6.99998C12.5 6.73085 12.63 6.47829 12.849 6.32187L18.6823 2.1552C18.9363 1.97376 19.2704 1.9495 19.548 2.09234ZM14.7671 6.99998L18.3333 9.54732V4.45264L14.7671 6.99998Z",fill:"currentColor",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2.5 1.99998C2.03976 1.99998 1.66667 2.37308 1.66667 2.83331V11.1666C1.66667 11.6269 2.03976 12 2.5 12H11.6667C12.1269 12 12.5 11.6269 12.5 11.1666V2.83331C12.5 2.37308 12.1269 1.99998 11.6667 1.99998H2.5ZM0 2.83331C0 1.4526 1.11929 0.333313 2.5 0.333313H11.6667C13.0474 0.333313 14.1667 1.4526 14.1667 2.83331V11.1666C14.1667 12.5474 13.0474 13.6666 11.6667 13.6666H2.5C1.11929 13.6666 0 12.5474 0 11.1666V2.83331Z",fill:"currentColor",fillRule:"evenodd"})]})}function KD(e){return(0,s.jsx)(Mt,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,s.jsx)("path",{clipRule:"evenodd",d:"M13.4646 2.46462L11.8484 0.848376L7.00023 5.69652L2.15186 0.848143L0.535612 2.46439L5.38399 7.31276L0.534668 12.1621L2.15091 13.7783L7.00023 8.92901L11.8493 13.7781L13.4656 12.1619L8.61648 7.31276L13.4646 2.46462Z",fill:"currentColor",fillRule:"evenodd"})})}function Ot(e){return function(n){const o=ht(),r=e[o];return r?(0,s.jsx)(r,{...n}):null}}const Lx=Ot({[te.RISE_CLASSIC]:SD,[te.HORIZON]:null,[te.APEX]:VD}),ql=Ot({[te.RISE_CLASSIC]:fm,[te.HORIZON]:Cx,[te.APEX]:FD}),pm=Ot({[te.RISE_CLASSIC]:yD,[te.HORIZON]:PD,[te.APEX]:HD}),Tx=Ot({[te.RISE_CLASSIC]:fx,[te.HORIZON]:Cx,[te.APEX]:$D}),QD=Ot({[te.RISE_CLASSIC]:AD,[te.HORIZON]:null,[te.APEX]:null}),YD=Ot({[te.RISE_CLASSIC]:LD,[te.HORIZON]:xx,[te.APEX]:Sx}),ZD=Ot({[te.RISE_CLASSIC]:TD,[te.HORIZON]:xx,[te.APEX]:zD}),XD=Ot({[te.RISE_CLASSIC]:Xl,[te.HORIZON]:bx,[te.APEX]:Xl}),qD=Ot({[te.RISE_CLASSIC]:gx,[te.HORIZON]:yx,[te.APEX]:gx}),JD=Ot({[te.RISE_CLASSIC]:kD,[te.HORIZON]:null,[te.APEX]:_D}),eF=Ot({[te.RISE_CLASSIC]:px,[te.HORIZON]:OD,[te.APEX]:px}),tF=Ot({[te.RISE_CLASSIC]:Xl,[te.HORIZON]:bx,[te.APEX]:Xl}),nF=Ot({[te.RISE_CLASSIC]:vx,[te.HORIZON]:yx,[te.APEX]:vx}),$i=Ot({[te.RISE_CLASSIC]:ID,[te.HORIZON]:MD,[te.APEX]:UD}),kx=Ot({[te.RISE_CLASSIC]:ED,[te.HORIZON]:BD,[te.APEX]:Sx}),sF=Ot({[te.RISE_CLASSIC]:ND,[te.HORIZON]:null,[te.APEX]:GD}),oF=Ot({[te.RISE_CLASSIC]:jD,[te.HORIZON]:null,[te.APEX]:WD}),Jl=Ot({[te.RISE_CLASSIC]:wD,[te.HORIZON]:DD,[te.APEX]:KD}),ba=$("cover");function E0e(){const{categories:e}=de();return!Array.isArray(e)||e.length===0?null:(0,s.jsxs)("section",{className:ba("categories-section"),children:[(0,s.jsx)("h2",{className:ba("categories-title"),children:"Topics"}),(0,s.jsx)("ul",{className:ba("categories-list"),role:"list",children:e.map(t=>(0,s.jsxs)("li",{className:ba("categories-item"),role:"listitem",children:[(0,s.jsx)(QD,{className:ba("categories-icon")}),(0,s.jsx)("span",{className:ba("categories-item-wrap"),children:t})]},t))})]})}var rF=p(16186),aF=p(90245),Lr=p.n(aF),De=p(69980);const iF=`${Ne("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,cF=`${Ne("CDN_URI")}/assets/rise/assets/error_x.svg`,lF=`${Ne("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,Vi="downloading",ya="error",Tr="ok",gm="contained",Ix=({type:e})=>{const[t]=(0,u.useState)(()=>Lr()("certdownload-")),[n,o]=(0,u.useState)(Tr),r=(0,De.A)(n),a=(0,u.useRef)(null),i=ye(),c=`${t}-live`,l=e===gm?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{o(Vi)},[]);return(0,u.useEffect)(()=>(n===Vi&&r!==Vi&&k7().then(()=>{o(Tr)}).catch(h=>{(0,rF.FZ)(h)?o(Tr):o(ya)}),()=>{I7()}),[r,n]),(0,u.useEffect)(()=>{a.current&&(n===ya&&r!==ya||n===Tr&&(r===ya||r===Vi))&&a.current.focus()},[r,n]),(0,s.jsxs)("div",{className:l,children:[(0,s.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[n===Vi&&(0,s.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,s.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:lF,width:"15"}),i?.certificateDownloadInProgress||"Downloading..."]}),n===ya&&(0,s.jsxs)("span",{className:"certificateDownload__error",children:[(0,s.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:cF,width:"15"}),(0,s.jsx)("span",{className:"visually-hidden",children:i?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(n===Tr||n===ya)&&(0,s.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:a,type:"button",children:[n===Tr&&e===gm&&(0,s.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:iF,width:"15"}),n===Tr?i?.certificateDownload||"Download certificate":i?.certificateRetryDownload||"Retry download"]})]})},dF=()=>(0,s.jsx)(Ix,{type:gm}),uF=(0,u.memo)(Ix);var vm,hF;const N0e=({width:e="18",height:t="18",className:n})=>vm("svg",{"aria-hidden":"true",className:hF("i i-alert",n),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:vm("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:vm("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),j0e=null;function mF(e){return(0,s.jsxs)(yn,{viewBox:"0 0 16 12",...e,children:[(0,s.jsx)("path",{d:"M8.4148147,12 L1.05185184,12 C0.471229623,12 0,11.552 0,11 C0,10.448 0.471229623,10 1.05185184,10 L8.4148147,10 C8.99543692,10 9.46666654,10.448 9.46666654,11 C9.46666654,11.552 8.99543692,12 8.4148147,12"}),(0,s.jsx)("path",{d:"M12.2500002,2 L0.816666683,2 C0.365866674,2 0,1.552 0,1 C0,0.448 0.365866674,0 0.816666683,0 L12.2500002,0 C12.7008002,0 13.0666669,0.448 13.0666669,1 C13.0666669,1.552 12.7008002,2 12.2500002,2"}),(0,s.jsx)("path",{d:"M15,7 L1,7 C0.448,7 0,6.552 0,6 C0,5.448 0.448,5 1,5 L15,5 C15.552,5 16,5.448 16,6 C16,6.552 15.552,7 15,7"})]})}var fF,Ex,pF;const w0e=({width:e="24",height:t="16",leftMovement:n="0",className:o})=>fF("svg",{"aria-hidden":"true",className:pF("i i-alt",o),focusable:"false",height:t,style:{marginLeft:n},viewBox:"0 0 24 16",width:e,children:[Ex("path",{d:"M10.066 11.5H8.887a.545.545 0 0 1-.326-.092.476.476 0 0 1-.178-.236l-.387-1.144H5.503l-.387 1.143a.507.507 0 0 1-.175.228.505.505 0 0 1-.32.101H3.433l2.538-6.556h1.557l2.538 6.556zM5.854 8.993h1.791l-.603-1.795-.137-.403a10.24 10.24 0 0 1-.155-.502 8.943 8.943 0 0 1-.293.914l-.603 1.786zm6.962 1.292h2.43V11.5h-3.951V4.944h1.52v5.341zM20.7 4.944v1.205h-1.845V11.5h-1.52V6.15H15.49V4.942h5.211z"}),Ex("path",{d:"M1.5 1.994v12.012a.5.5 0 0 0 .505.494h19.99a.5.5 0 0 0 .505-.494V1.994a.5.5 0 0 0-.505-.494H2.005a.5.5 0 0 0-.505.494zm-1.5 0A2 2 0 0 1 2.005 0h19.99A2 2 0 0 1 24 1.994v12.012A2 2 0 0 1 21.995 16H2.005A2 2 0 0 1 0 14.006V1.994z",fillRule:"nonzero"})]}),A0e=null;var gF,ed,vF;const R0e=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:n="30",height:o="30",className:r,focusable:a="false"})=>gF("svg",{className:vF("i i-blockTemplateAllAuthors",r),focusable:a,height:o,viewBox:"0 0 30 30",width:n,children:[ed("title",{children:e}),ed("desc",{children:t}),ed("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),ed("path",{d:"M17.482 17.661a3.75 3.75 0 1 1 4.037 0 4.25 4.25 0 0 1 2.231 3.741.75.75 0 1 1-1.5 0 2.75 2.75 0 1 0-5.5 0 .75.75 0 1 1-1.5 0 4.25 4.25 0 0 1 2.232-3.741zm-8.915-3.947a3.75 3.75 0 1 1 3.866 0A4.25 4.25 0 0 1 14.75 17.5a.75.75 0 1 1-1.5 0 2.75 2.75 0 0 0-5.5 0 .75.75 0 1 1-1.5 0 4.25 4.25 0 0 1 2.317-3.786zm1.933-.964a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5zm9 4a2.25 2.25 0 1 0 0-4.5 2.25 2.25 0 0 0 0 4.5z",fill:"#8894A3"})]}),P0e=null;var td,us,CF;const M0e=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:n="112",height:o="112",className:r,focusable:a="false"})=>td("svg",{className:CF("i i-blockTemplateCheckMark",r),focusable:a,height:o,viewBox:"0 0 112 112",width:n,children:[us("title",{children:e}),us("desc",{children:t}),us("defs",{children:td("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[us("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),us("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),us("feColorMatrix",{in:"shadowBlurOuter1",result:"shadowMatrixOuter1",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"}),td("feMerge",{children:[us("feMergeNode",{in:"shadowMatrixOuter1"}),us("feMergeNode",{in:"SourceGraphic"})]})]})}),td("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[us("path",{className:"outer",d:"M36 65.096c16.07 0 29.096-13.027 29.096-29.096C65.096 19.93 52.069 6.904 36 6.904 19.93 6.904 6.904 19.931 6.904 36c0 16.07 13.027 29.096 29.096 29.096zM36 72C16.118 72 0 55.882 0 36S16.118 0 36 0s36 16.118 36 36-16.118 36-36 36z",fillRule:"nonzero"}),us("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),us("path",{className:"check",d:"M30.054 35.993a1.791 1.791 0 0 0-2.53 0 1.783 1.783 0 0 0 0 2.524l5.972 5.96a1.791 1.791 0 0 0 2.53 0l10.45-10.43a1.783 1.783 0 0 0 0-2.524 1.791 1.791 0 0 0-2.53 0l-9.185 9.167-4.707-4.697z",fillRule:"nonzero"})]})]}),O0e=null;var Nx,nd,xF;const B0e=({title:e="Folder Outline",desc:t="Outline of a folder",width:n="42",height:o="42",className:r,focusable:a="false"})=>Nx("svg",{className:xF("i i-blockTemplateFolder",r),focusable:a,height:o,viewBox:"0 0 42 42",width:n,children:[nd("title",{children:e}),nd("desc",{children:t}),Nx("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[nd("path",{d:"M34.043 6.971a.87.87 0 0 0-.87-.87h-17.53l.7.354-3.756-5.101a.87.87 0 0 0-.7-.354H1.87a.87.87 0 0 0-.87.87v34.434C1 38.894 3.067 41 5.626 41a.87.87 0 1 0 0-1.74c-1.59 0-2.887-1.32-2.887-2.956V1.87l-.87.87h10.018l-.7-.355 3.756 5.102a.87.87 0 0 0 .7.354h17.53l-.869-.87v7.652a.87.87 0 1 0 1.74 0V6.971z"}),nd("path",{d:"M9.116 36.348a2.906 2.906 0 0 1-2.899 2.913V41h30.145A4.645 4.645 0 0 0 41 36.348V14.913a.87.87 0 0 0-.87-.87H9.986a.87.87 0 0 0-.87.87v21.435zm.87-20.565H40.13l-.87-.87v21.435a2.906 2.906 0 0 1-2.898 2.913H6.217c-1.159 0-1.159 1.739 0 1.739a4.645 4.645 0 0 0 4.638-4.652V14.913l-.87.87z"})]})]}),D0e=null;var Cm,zi,bF;const F0e=({title:e="Captions",desc:t="Two capital letter C inside a square",width:n="24",height:o="16",className:r,focusable:a="false"})=>Cm("svg",{className:bF("i i-captions",r),focusable:a,height:o,viewBox:"0 0 24 16",width:n,children:[zi("title",{children:e}),zi("desc",{children:t}),Cm("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[zi("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),Cm("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[zi("tspan",{x:"4.222",y:"11.5",children:"C"})," ",zi("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),H0e=null;var yF,xm;const $0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>yF("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&xm("title",{children:i}),o&&xm("desc",{children:o}),xm("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm4-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),V0e=null;function jx(e){return(0,s.jsx)(yn,{viewBox:"0 0 11 8",...e,children:(0,s.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var SF,bm,LF;const z0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="21",role:a="img",title:i,width:c="21"})=>SF("svg",{"aria-hidden":e,"aria-label":t,className:LF("i i-checkMarkFilled",n),focusable:"false",height:r,role:a,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&bm("title",{children:i}),o&&bm("desc",{children:o}),bm("path",{d:"M10.074 20.959c-5.523 0-10-4.477-10-10s4.477-10 10-10 10 4.477 10 10-4.477 10-10 10zM7.077 10.523a.65.65 0 1 0-.919.919l2.546 2.545a.65.65 0 0 0 .919 0l4.454-4.454a.65.65 0 1 0-.919-.92L9.163 12.61l-2.086-2.086z"})]}),_0e=null;var wx,TF;function U0e(e){return wx(TF,{viewBox:"0 0 7 5",...e,children:wx("path",{d:"M3.104 3.896a.5.5 0 0 0 .707 0l2.543-2.542a.5.5 0 0 0-.708-.708L3.473 2.851 1.353.73a.5.5 0 1 0-.707.707l2.458 2.458Z"})})}var Ax,kF;const G0e=({width:e="16",height:t="16",className:n,focusable:o="false"})=>Ax("svg",{"aria-hidden":"true",className:kF("i i-chevronLeft",n),focusable:o,height:t,viewBox:"0 0 16 16",width:e,children:Ax("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),W0e=null,IF=({className:e,dataTestId:t})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:e,"data-testid":t,fill:"currentColor",focusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),EF=({className:e})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"currentColor",foocusable:"false",viewBox:"0 0 10 10",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M9.78572 9.78572C9.5 10.0714 9.07143 10.0714 8.78571 9.78572L5 6.00001L1.21429 9.78572C0.928571 10.0714 0.500001 10.0714 0.214285 9.78572C-0.0714284 9.49999 -0.0714284 9.07144 0.214285 8.78571L4 5L0.214285 1.21429C-0.0714284 0.928564 -0.0714284 0.500007 0.214285 0.214279C0.357143 0.0714143 0.500001 0 0.714286 0C0.928571 0 1.07143 0.0714143 1.21429 0.214279L5 3.99999L8.78571 0.214279C8.92857 0.0714143 9.14286 0 9.28572 0C9.42857 0 9.64286 0.0714143 9.78572 0.214279C10.0714 0.500007 10.0714 0.928564 9.78572 1.21429L6 5L9.78572 8.78571C10.0714 9.07144 10.0714 9.49999 9.78572 9.78572Z"})});var NF,zn;const Y0e=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="18",role:a="img",title:i,width:c="18"})=>NF("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&zn("title",{children:i}),o&&zn("desc",{children:o}),zn("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),zn("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),zn("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),Z0e=null;var jF,ym,wF;const X0e=({title:e="Copy",desc:t="A document stacked on top of another one",width:n="15",height:o="18",className:r=null,focusable:a="false"})=>jF("svg",{className:wF("i i-stack",r),focusable:a,height:o,viewBox:"0 0 15 18",width:n,children:[ym("title",{children:e}),ym("desc",{children:t}),ym("path",{d:"M14.7,4.1C14.7,4.1,14.7,4.1,14.7,4.1c0-0.1-0.1-0.2-0.1-0.2c0,0,0,0,0,0L11,0.4c0,0-0.1,0-0.1-0.1 c0,0-0.1,0-0.1-0.1c-0.1,0-0.2,0-0.2,0H3.5c-0.3,0-0.6,0.3-0.6,0.6v3h-2c-0.3,0-0.6,0.3-0.6,0.6v12.6c0,0.3,0.3,0.6,0.6,0.6h10.6 c0.3,0,0.6-0.3,0.6-0.6v-3h2c0.3,0,0.6-0.3,0.6-0.6V4.3C14.7,4.2,14.7,4.2,14.7,4.1z M11.2,2.4l1.4,1.3h-1.4V2.4z M9.9,7.3H8.6V6 L9.9,7.3z M7.9,8.6h2.9v7.9H1.5V5.1h5.8v2.8C7.3,8.3,7.6,8.6,7.9,8.6z M12.1,7.9c0-0.1,0-0.2,0-0.2c0,0,0,0,0,0 c0-0.1-0.1-0.1-0.1-0.2c0,0,0,0,0,0L8.4,4c0,0-0.1,0-0.1-0.1c0,0-0.1,0-0.1-0.1c-0.1,0-0.2,0-0.2,0H4.1V1.5H10v2.8 C10,4.7,10.2,5,10.6,5h2.9v7.9h-1.4V7.9z"})]}),q0e=null;var AF,Sm,RF;const J0e=e=>{const{className:t,desc:n="Crop",focusable:o="false",height:r="19",title:a="Crop",width:i="19"}=e,c={className:RF("i i-crop",t),focusable:o,height:r,viewBox:`0 0 ${i} ${r}`,width:i};return AF("svg",{...c,children:[Sm("title",{children:a}),Sm("desc",{children:n}),Sm("path",{d:"M15 13h3.003c.55 0 .997.444.997 1 0 .552-.453 1-.997 1H15v3.003c0 .55-.444.997-1 .997-.552 0-1-.453-1-.997V15H4.996A.995.995 0 0 1 4 14.004V6H.997A.996.996 0 0 1 0 5c0-.552.453-1 .997-1H4V.997C4 .447 4.444 0 5 0c.552 0 1 .453 1 .997V4h8.004c.55 0 .996.445.996.996V13zm-9 0h7V6H6v7z",fillRule:"evenodd"})]})},ehe=null;var PF,Lm,MF;const the=({"aria-hidden":e,"aria-label":t="Dash mark",className:n,desc:o,height:r="3",role:a="img",title:i,width:c="7"})=>PF("svg",{"aria-hidden":e,"aria-label":t,className:MF("i i-dashMark",n),focusable:"false",height:r,role:a,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Lm("title",{children:i}),o&&Lm("desc",{children:o}),Lm("rect",{height:"3",width:"7"})]}),nhe=null,OF=({title:e="DestinationArrow",desc:t="DestinationArrow",width:n="13",height:o="10",className:r,focusable:a="false"})=>(0,s.jsxs)("svg",{className:X()("i i-destinationArrow",r),focusable:a,height:o,viewBox:"0 0 13 10",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("path",{d:"M0 5c0 .345.264.625.59.625h10.393L7.855 8.933a.65.65 0 0 0 0 .884.573.573 0 0 0 .418.183.573.573 0 0 0 .418-.183l4.136-4.374a.66.66 0 0 0 0-.885L8.691.183a.568.568 0 0 0-.836 0 .65.65 0 0 0 0 .884l3.128 3.308H.591C.264 4.375 0 4.655 0 5"})]});var BF,ohe;class rhe extends null{render(){return BF("svg",{"aria-hidden":this.props.decorative,"aria-label":this.props.title,className:this.props.className,focusable:"false",height:this.props.height,role:this.props.role,version:"1.1",viewBox:this.props.viewBox,width:this.props.width,xmlns:"http://www.w3.org/2000/svg",children:this.props.children})}}const ahe=null;var Rx,DF;const ihe=({width:e=20,height:t=20,...n})=>Rx(DF,{height:t,width:e,...n,viewBox:"0 0 20 20",children:Rx("path",{d:"M10 0c5.523 0 10 4.477 10 10s-4.477 10-10 10S0 15.523 0 10 4.477 0 10 0zm2.634 7.679l-3.506 3.505-2.054-2.055a.7.7 0 00-.99.99l2.55 2.55a.7.7 0 00.99 0l4-4a.7.7 0 00-.99-.99z",fillRule:"evenodd"})}),che=null;var FF,Tm,HF;const lhe=({title:e="Vertical Dots",desc:t="Vertical Dots",width:n="4",height:o="24",className:r=null,focusable:a="false"})=>FF("svg",{className:HF("i i-dotsVertical",r),focusable:a,height:o,viewBox:"0 0 4 24",width:n,children:[Tm("title",{children:e}),Tm("desc",{children:t}),Tm("path",{d:"M2 24a2 2 0 1 1 0-4 2 2 0 0 1 0 4zm0-10a2 2 0 1 1 0-4 2 2 0 0 1 0 4zM2 4a2 2 0 1 1 0-4 2 2 0 0 1 0 4z",fillRule:"evenodd"})]}),dhe=null,$F=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:n="16",height:o="19",className:r,focusable:a="false"},i)=>(0,s.jsxs)("svg",{className:X()("i i-download",r),focusable:a,height:o,ref:i,viewBox:"0 0 16 19",width:n,children:[(0,s.jsx)("title",{children:e}),(0,s.jsx)("desc",{children:t}),(0,s.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,s.jsx)("path",{d:"M4.464 8.293A1 1 0 1 0 3.05 9.707l4.24 4.24c.4.4 1.028.392 1.42 0l4.24-4.24a1 1 0 1 0-1.414-1.414L8 4.757 4.464 8.293zm0 0L8 4.757l3.536 3.536L8 11.828 4.464 8.293z"}),(0,s.jsx)("path",{d:"M7 0h2v12H7z"})]}),VF=(0,u.forwardRef)($F);var zF,_i,_F;const uhe=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:n="51",height:o="51",className:r,focusable:a="false"})=>zF("svg",{className:_F("i i-downloadCircle",r),focusable:a,height:o,viewBox:"0 0 51 51",width:n,children:[_i("title",{children:e}),_i("desc",{children:t}),_i("g",{fill:"none",stroke:"none",children:_i("g",{fill:"#000",transform:"translate(-695, -227)",children:_i("path",{d:"M721,255.395113 L726.834932,249.560181 C727.225456,249.169656 727.858621,249.169656 728.249146,249.560181 C728.63967,249.950705 728.63967,250.58387 728.249146,250.974394 L720.824726,258.398814 C720.796316,258.436777 720.764856,258.473181 720.730347,258.507691 C720.339822,258.898215 719.706657,258.898215 719.316133,258.507691 L711.799485,250.991042 C711.408961,250.600518 711.408961,249.967353 711.799485,249.576829 C712.190009,249.186304 712.823174,249.186304 713.213699,249.576829 L719,255.36313 L719,240.783936 C719,240.231651 719.447715,239.783936 720,239.783936 C720.552285,239.783936 721,240.231651 721,240.783936 L721,255.395113 Z M720.059082,277.569336 C706.251963,277.569336 695.059082,266.376455 695.059082,252.569336 C695.059082,238.762217 706.251963,227.569336 720.059082,227.569336 C733.866201,227.569336 745.059082,238.762217 745.059082,252.569336 C745.059082,266.376455 733.866201,277.569336 720.059082,277.569336 Z M720.059082,275.569336 C732.761631,275.569336 743.059082,265.271885 743.059082,252.569336 C743.059082,239.866787 732.761631,229.569336 720.059082,229.569336 C707.356533,229.569336 697.059082,239.866787 697.059082,252.569336 C697.059082,265.271885 707.356533,275.569336 720.059082,275.569336 Z M712,264 C711.447715,264 711,263.552285 711,263 C711,262.447715 711.447715,262 712,262 L728,262 C728.552285,262 729,262.447715 729,263 C729,263.552285 728.552285,264 728,264 L712,264 Z"})})})]}),hhe=null;var UF,Ui,GF;const mhe=({title:e="More",desc:t="Three dots next to one another",width:n="16",height:o="4",className:r=null,focusable:a="false"})=>UF("svg",{className:GF("i",r),focusable:a,height:o,viewBox:"0 0 16 4",width:n,children:[Ui("title",{children:e}),Ui("desc",{children:t}),Ui("path",{d:"M8,0 C9.105,0 10,0.895 10,2 C10,3.105 9.105,4 8,4 C6.895,4 6,3.105 6,2 C6,0.895 6.895,0 8,0"}),Ui("path",{d:"M2,0 C3.105,0 4,0.895 4,2 C4,3.105 3.105,4 2,4 C0.895,4 0,3.105 0,2 C0,0.895 0.895,0 2,0"}),Ui("path",{d:"M14,0 C15.105,0 16,0.895 16,2 C16,3.105 15.105,4 14,4 C12.895,4 12,3.105 12,2 C12,0.895 12.895,0 14,0"})]}),fhe=null;var WF,km,KF;const phe=({title:e="Embed",desc:t="Embed icon",width:n="16",height:o="15",className:r,focusable:a="false"})=>WF("svg",{className:KF("i i-embed",r),focusable:a,height:o,viewBox:"0 0 16 15",width:n,children:[km("title",{children:e}),km("desc",{children:t}),km("path",{d:"M13.2 11.263l-1.4-1.4 2.3-2.3-2.3-2.3 1.4-1.4 3 3c.4.4.4 1 0 1.4l-3 3M3.8 11.263l-3-3c-.4-.4-.4-1 0-1.4l3-3 1.4 1.4-2.3 2.3 2.3 2.3-1.4 1.4M6.5 14.563c-.1 0-.2 0-.3-.1-.5-.2-.8-.7-.6-1.3l4-12c.2-.5.7-.8 1.3-.6.5.2.8.7.6 1.3l-4 12c-.2.4-.6.7-1 .7"})]}),ghe=null;var QF,sd,YF;const vhe=({title:e="Empty folder",desc:t="Empty folder",width:n="46",height:o="46",className:r,focusable:a="false"})=>QF("svg",{className:YF("i i-emptyFolder",r),focusable:a,height:o,viewBox:"0 0 46 46",width:n,children:[sd("title",{children:e}),sd("desc",{children:t}),sd("path",{d:"M38 6.867a1 1 0 0 0-1-1H16.84l.805.407-4.32-5.867A1 1 0 0 0 12.52 0H1a1 1 0 0 0-1 1v39.6C0 43.578 2.377 46 5.32 46a1 1 0 0 0 0-2C3.49 44 2 42.482 2 40.6V1L1 2h11.52l-.805-.407 4.32 5.867a1 1 0 0 0 .805.407H37l-1-1v8.8a1 1 0 0 0 2 0v-8.8z"}),sd("path",{d:"M9.333 40.65A3.341 3.341 0 0 1 6 44v2h34.667C43.613 46 46 43.604 46 40.65V16a1 1 0 0 0-1-1H10.333a1 1 0 0 0-1 1v24.65zm1-23.65H45l-1-1v24.65A3.341 3.341 0 0 1 40.667 44H6c-1.333 0-1.333 2 0 2 2.947 0 5.333-2.396 5.333-5.35V16l-1 1z"})]}),Che=null;var ZF,od,XF;const xhe=({title:e="End Slide",desc:t="End Slide",width:n="16",height:o="14",className:r,focusable:a="false"})=>ZF("svg",{className:XF("i i-end-slide",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,children:[od("title",{children:e}),od("desc",{children:t}),od("path",{d:"M6,0.6L4.6,2l4,4H0v2h8.6l-4,4L6,13.4l5.7-5.7c0.4-0.4,0.4-1,0-1.4L6,0.6",fillRule:"evenodd"}),od("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),bhe=null;var Px,rd,qF;const yhe=({title:e="Envelope",desc:t="Envelope",width:n="17",height:o="14",className:r,focusable:a="false"})=>Px("svg",{className:qF("i i-envelope",r),focusable:a,height:o,viewBox:"0 0 17 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[rd("title",{children:e}),rd("desc",{children:t}),Px("g",{fillRule:"nonzero",children:[rd("path",{d:"M8.5 7.316L1.341.634a.5.5 0 0 0-.682.732l7.5 7a.5.5 0 0 0 .682 0l7.5-7a.5.5 0 1 0-.682-.732L8.5 7.316z"}),rd("path",{d:"M1.5 1.5v11h14v-11h-14zM1 .5h15a.5.5 0 0 1 .5.5v12a.5.5 0 0 1-.5.5H1a.5.5 0 0 1-.5-.5V1A.5.5 0 0 1 1 .5z"})]})]}),She=null;var JF,ad,eH;const Lhe=({title:e="Error",desc:t="An x with a circle",width:n="50",height:o="50",className:r,focusable:a="false"})=>JF("svg",{className:eH("i i-error",r),focusable:a,height:o,viewBox:"0 0 50 50",width:n,children:[ad("title",{children:e}),ad("desc",{children:t}),ad("path",{d:"M25 50C11.193 50 0 38.807 0 25S11.193 0 25 0s25 11.193 25 25-11.193 25-25 25zm0-2c12.703 0 23-10.297 23-23S37.703 2 25 2 2 12.297 2 25s10.297 23 23 23z"}),ad("path",{d:"M31.679 18.321a1.036 1.036 0 0 0-1.5 0L24.5 24l-5.679-5.679a1.036 1.036 0 0 0-1.5 0 1.036 1.036 0 0 0 0 1.5L23 25.5l-5.679 5.679a1.036 1.036 0 0 0 0 1.5c.215.214.429.321.75.321.322 0 .536-.107.75-.321L24.5 27l5.679 5.679c.214.214.535.321.75.321.214 0 .535-.107.75-.321a1.036 1.036 0 0 0 0-1.5L26 25.5l5.679-5.679a1.036 1.036 0 0 0 0-1.5"})]}),The=null;var tH,id,nH;const khe=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:n="18",height:o="18",className:r,focusable:a="false"})=>tH("svg",{className:nH("i i-errorAlert",r),focusable:a,height:o,viewBox:"0 0 18 18",width:n,children:[id("title",{children:e}),id("desc",{children:t}),id("circle",{cx:"9",cy:"9",r:"9"}),id("path",{d:"M9.897 4v4.004c0 .425-.021.841-.063 1.25-.042.408-.098.84-.168 1.298H8.497c-.07-.457-.126-.89-.168-1.298a12.206 12.206 0 0 1-.063-1.25V4h1.631zM8 13.17c0-.145.027-.282.08-.413a.987.987 0 0 1 .225-.336 1.103 1.103 0 0 1 .759-.308 1.06 1.06 0 0 1 .749.308 1.06 1.06 0 0 1 .308.749 1.07 1.07 0 0 1-.308.749 1.077 1.077 0 0 1-.749.301 1.095 1.095 0 0 1-.76-.301.995.995 0 0 1-.223-.333A1.069 1.069 0 0 1 8 13.17z"})]}),Ihe=null,Mx=({"aria-hidden":e,"aria-label":t="X mark",className:n,dataTestId:o="x-mark",desc:r,height:a="10",overrideStyle:i=!1,role:c="img",title:l,width:d="10"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()(n,{"i i-exMark":!i}),"data-testid":o,focusable:"false",height:a,role:c,viewBox:"0 0 10 10",width:d,xmlns:"http://www.w3.org/2000/svg",children:[l&&(0,s.jsx)("title",{children:l}),r&&(0,s.jsx)("desc",{children:r}),(0,s.jsx)("path",{d:"M5,4.17,9.17,0,10,.83,5.83,5,10,9.17,9.17,10,5,5.83.83,10,0,9.17,4.17,5,0,.83.83,0Z"})]});var sH,cd,oH;const Nhe=({title:e="Export",desc:t="Export",width:n="12",height:o="15",className:r,focusable:a="false"})=>sH("svg",{className:oH("i i-export",r),focusable:a,height:o,viewBox:"0 0 12 15",width:n,children:[cd("title",{children:e}),cd("desc",{children:t}),cd("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),cd("rect",{height:"2",width:"10",x:"1",y:"12"})]}),jhe=null,Ox=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#DFE1E2",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,s.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),rH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#C3CEED",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M14.8355 26.9904C14.8355 27.5698 14.7346 28.1051 14.533 28.5964C14.335 29.0841 14.0545 29.5076 13.6915 29.8669C13.3285 30.2226 12.8903 30.5013 12.377 30.7029C11.8673 30.9009 11.3008 30.9999 10.6775 30.9999H7.56445V22.9864H10.6775C11.3008 22.9864 11.8673 23.0873 12.377 23.2889C12.8903 23.4906 13.3285 23.7693 13.6915 24.1249C14.0545 24.4806 14.335 24.9041 14.533 25.3954C14.7346 25.8831 14.8355 26.4148 14.8355 26.9904ZM12.9325 26.9904C12.9325 26.5944 12.8811 26.2369 12.7785 25.9179C12.6758 25.5989 12.5273 25.3294 12.333 25.1094C12.1423 24.8858 11.9076 24.7153 11.629 24.5979C11.3503 24.4769 11.0331 24.4164 10.6775 24.4164H9.43445V29.5699H10.6775C11.0331 29.5699 11.3503 29.5113 11.629 29.3939C11.9076 29.2729 12.1423 29.1024 12.333 28.8824C12.5273 28.6588 12.6758 28.3874 12.7785 28.0684C12.8811 27.7494 12.9325 27.3901 12.9325 26.9904Z",fill:"#0C3092"}),(0,s.jsx)("path",{d:"M24.6375 26.9904C24.6375 27.5698 24.5367 28.1088 24.335 28.6074C24.137 29.1061 23.8565 29.5406 23.4935 29.9109C23.1305 30.2776 22.6923 30.5654 22.179 30.7744C21.6693 30.9834 21.1028 31.0879 20.4795 31.0879C19.8562 31.0879 19.2878 30.9834 18.7745 30.7744C18.2612 30.5654 17.8212 30.2776 17.4545 29.9109C17.0915 29.5406 16.8092 29.1061 16.6075 28.6074C16.4095 28.1088 16.3105 27.5698 16.3105 26.9904C16.3105 26.4111 16.4095 25.8721 16.6075 25.3734C16.8092 24.8748 17.0915 24.4421 17.4545 24.0754C17.8212 23.7088 18.2612 23.4209 18.7745 23.2119C19.2878 23.0029 19.8562 22.8984 20.4795 22.8984C21.1028 22.8984 21.6693 23.0048 22.179 23.2174C22.6923 23.4264 23.1305 23.7143 23.4935 24.0809C23.8565 24.4476 24.137 24.8803 24.335 25.3789C24.5367 25.8776 24.6375 26.4148 24.6375 26.9904ZM22.7345 26.9904C22.7345 26.5944 22.6832 26.2388 22.5805 25.9234C22.4779 25.6044 22.3293 25.3349 22.135 25.1149C21.9443 24.8949 21.7097 24.7263 21.431 24.6089C21.1523 24.4916 20.8352 24.4329 20.4795 24.4329C20.1202 24.4329 19.7993 24.4916 19.517 24.6089C19.2383 24.7263 19.0018 24.8949 18.8075 25.1149C18.6168 25.3349 18.4702 25.6044 18.3675 25.9234C18.2648 26.2388 18.2135 26.5944 18.2135 26.9904C18.2135 27.3901 18.2648 27.7494 18.3675 28.0684C18.4702 28.3838 18.6168 28.6514 18.8075 28.8714C19.0018 29.0914 19.2383 29.2601 19.517 29.3774C19.7993 29.4911 20.1202 29.5479 20.4795 29.5479C20.8352 29.5479 21.1523 29.4911 21.431 29.3774C21.7097 29.2601 21.9443 29.0914 22.135 28.8714C22.3293 28.6514 22.4779 28.3838 22.5805 28.0684C22.6832 27.7494 22.7345 27.3901 22.7345 26.9904Z",fill:"#0C3092"}),(0,s.jsx)("path",{d:"M31.9109 28.9264C31.9549 28.9264 31.9989 28.9356 32.0429 28.9539C32.0869 28.9686 32.129 28.9961 32.1694 29.0364L32.9064 29.8119C32.5837 30.2336 32.1785 30.5526 31.6909 30.7689C31.2069 30.9816 30.633 31.0879 29.9694 31.0879C29.3607 31.0879 28.8144 30.9853 28.3304 30.7799C27.85 30.5709 27.4412 30.2849 27.1039 29.9219C26.7702 29.5553 26.5135 29.1226 26.3339 28.6239C26.1542 28.1216 26.0644 27.5771 26.0644 26.9904C26.0644 26.3928 26.167 25.8446 26.3724 25.3459C26.5777 24.8436 26.8637 24.4109 27.2304 24.0479C27.6007 23.6849 28.0425 23.4026 28.5559 23.2009C29.0692 22.9993 29.6357 22.8984 30.2554 22.8984C30.556 22.8984 30.8384 22.9259 31.1024 22.9809C31.37 23.0323 31.6194 23.1056 31.8504 23.2009C32.0814 23.2926 32.294 23.4044 32.4884 23.5364C32.6827 23.6648 32.855 23.8078 33.0054 23.9654L32.3784 24.8069C32.338 24.8583 32.2904 24.9059 32.2354 24.9499C32.1804 24.9903 32.1034 25.0104 32.0044 25.0104C31.9384 25.0104 31.876 24.9958 31.8174 24.9664C31.7587 24.9371 31.6964 24.9023 31.6304 24.8619C31.5644 24.8179 31.491 24.7721 31.4104 24.7244C31.3334 24.6731 31.2399 24.6273 31.1299 24.5869C31.0235 24.5429 30.897 24.5063 30.7504 24.4769C30.6074 24.4476 30.4387 24.4329 30.2444 24.4329C29.907 24.4329 29.599 24.4934 29.3204 24.6144C29.0417 24.7318 28.8015 24.9023 28.5999 25.1259C28.4019 25.3459 28.246 25.6136 28.1324 25.9289C28.0224 26.2443 27.9674 26.5981 27.9674 26.9904C27.9674 27.4011 28.0224 27.7659 28.1324 28.0849C28.246 28.4039 28.3982 28.6734 28.5889 28.8934C28.7832 29.1098 29.0087 29.2748 29.2654 29.3884C29.522 29.5021 29.797 29.5589 30.0904 29.5589C30.259 29.5589 30.413 29.5516 30.5524 29.5369C30.6917 29.5186 30.82 29.4893 30.9374 29.4489C31.0584 29.4086 31.172 29.3573 31.2784 29.2949C31.3884 29.2289 31.4984 29.1483 31.6084 29.0529C31.6524 29.0163 31.7 28.9869 31.7514 28.9649C31.8027 28.9393 31.8559 28.9264 31.9109 28.9264Z",fill:"#0C3092"})]}),aH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#F5D0CE",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M10.8678 28.3213V30.9998H9.00879V22.9863H11.8358C12.4005 22.9863 12.8845 23.0542 13.2878 23.1898C13.6948 23.3218 14.0285 23.5052 14.2888 23.7398C14.5528 23.9745 14.7471 24.2513 14.8718 24.5703C14.9965 24.8893 15.0588 25.234 15.0588 25.6043C15.0588 26.004 14.9946 26.3707 14.8663 26.7043C14.738 27.038 14.5418 27.324 14.2778 27.5623C14.0138 27.8007 13.6783 27.9877 13.2713 28.1233C12.868 28.2553 12.3895 28.3213 11.8358 28.3213H10.8678ZM10.8678 26.9188H11.8358C12.3198 26.9188 12.6681 26.8033 12.8808 26.5723C13.0935 26.3413 13.1998 26.0187 13.1998 25.6043C13.1998 25.421 13.1723 25.2542 13.1173 25.1038C13.0623 24.9535 12.978 24.8252 12.8643 24.7188C12.7543 24.6088 12.6131 24.5245 12.4408 24.4658C12.2721 24.4072 12.0705 24.3778 11.8358 24.3778H10.8678V26.9188Z",fill:"#771D18"}),(0,s.jsx)("path",{d:"M24.2944 26.9903C24.2944 27.5697 24.1936 28.105 23.9919 28.5963C23.7939 29.084 23.5134 29.5075 23.1504 29.8668C22.7874 30.2225 22.3493 30.5012 21.8359 30.7028C21.3263 30.9008 20.7598 30.9998 20.1364 30.9998H17.0234V22.9863H20.1364C20.7598 22.9863 21.3263 23.0872 21.8359 23.2888C22.3493 23.4905 22.7874 23.7692 23.1504 24.1248C23.5134 24.4805 23.7939 24.904 23.9919 25.3953C24.1936 25.883 24.2944 26.4147 24.2944 26.9903ZM22.3914 26.9903C22.3914 26.5943 22.3401 26.2368 22.2374 25.9178C22.1348 25.5988 21.9863 25.3293 21.7919 25.1093C21.6013 24.8857 21.3666 24.7152 21.0879 24.5978C20.8093 24.4768 20.4921 24.4163 20.1364 24.4163H18.8934V29.5698H20.1364C20.4921 29.5698 20.8093 29.5112 21.0879 29.3938C21.3666 29.2728 21.6013 29.1023 21.7919 28.8823C21.9863 28.6587 22.1348 28.3873 22.2374 28.0683C22.3401 27.7493 22.3914 27.39 22.3914 26.9903Z",fill:"#771D18"}),(0,s.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),iH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#FBDACC",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M11.2115 28.3213V30.9998H9.35254V22.9863H12.1795C12.7442 22.9863 13.2282 23.0542 13.6315 23.1898C14.0385 23.3218 14.3722 23.5052 14.6325 23.7398C14.8965 23.9745 15.0909 24.2513 15.2155 24.5703C15.3402 24.8893 15.4025 25.234 15.4025 25.6043C15.4025 26.004 15.3384 26.3707 15.21 26.7043C15.0817 27.038 14.8855 27.324 14.6215 27.5623C14.3575 27.8007 14.022 27.9877 13.615 28.1233C13.2117 28.2553 12.7332 28.3213 12.1795 28.3213H11.2115ZM11.2115 26.9188H12.1795C12.6635 26.9188 13.0119 26.8033 13.2245 26.5723C13.4372 26.3413 13.5435 26.0187 13.5435 25.6043C13.5435 25.421 13.516 25.2542 13.461 25.1038C13.406 24.9535 13.3217 24.8252 13.208 24.7188C13.098 24.6088 12.9569 24.5245 12.7845 24.4658C12.6159 24.4072 12.4142 24.3778 12.1795 24.3778H11.2115V26.9188Z",fill:"#7C2B0E"}),(0,s.jsx)("path",{d:"M19.2262 28.3213V30.9998H17.3672V22.9863H20.1942C20.7589 22.9863 21.2429 23.0542 21.6462 23.1898C22.0532 23.3218 22.3869 23.5052 22.6472 23.7398C22.9112 23.9745 23.1055 24.2513 23.2302 24.5703C23.3549 24.8893 23.4172 25.234 23.4172 25.6043C23.4172 26.004 23.353 26.3707 23.2247 26.7043C23.0964 27.038 22.9002 27.324 22.6362 27.5623C22.3722 27.8007 22.0367 27.9877 21.6297 28.1233C21.2264 28.2553 20.7479 28.3213 20.1942 28.3213H19.2262ZM19.2262 26.9188H20.1942C20.6782 26.9188 21.0265 26.8033 21.2392 26.5723C21.4519 26.3413 21.5582 26.0187 21.5582 25.6043C21.5582 25.421 21.5307 25.2542 21.4757 25.1038C21.4207 24.9535 21.3364 24.8252 21.2227 24.7188C21.1127 24.6088 20.9715 24.5245 20.7992 24.4658C20.6305 24.4072 20.4289 24.3778 20.1942 24.3778H19.2262V26.9188Z",fill:"#7C2B0E"}),(0,s.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),cH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#CFEAF8",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M11.6738 28.0355V31H9.81476V22.9865H12.4218C13.0011 22.9865 13.4943 23.047 13.9013 23.168C14.3119 23.2853 14.6456 23.4503 14.9023 23.663C15.1626 23.8757 15.3514 24.1268 15.4688 24.4165C15.5861 24.7062 15.6448 25.0215 15.6448 25.3625C15.6448 25.6228 15.6099 25.8685 15.5403 26.0995C15.4706 26.3305 15.3661 26.545 15.2268 26.743C15.0911 26.9373 14.9224 27.1115 14.7208 27.2655C14.5228 27.4195 14.2936 27.546 14.0333 27.645C14.1579 27.7073 14.2734 27.7843 14.3798 27.876C14.4898 27.9677 14.5851 28.0795 14.6658 28.2115L16.3708 31H14.6878C14.3761 31 14.1524 30.8827 14.0168 30.648L12.6858 28.3215C12.6271 28.2188 12.5574 28.1455 12.4768 28.1015C12.3998 28.0575 12.2898 28.0355 12.1468 28.0355H11.6738ZM11.6738 26.754H12.4218C12.6748 26.754 12.8893 26.7228 13.0653 26.6605C13.2449 26.5945 13.3916 26.5047 13.5053 26.391C13.6189 26.2773 13.7014 26.1453 13.7528 25.995C13.8041 25.841 13.8298 25.676 13.8298 25.5C13.8298 25.148 13.7143 24.873 13.4833 24.675C13.2559 24.477 12.9021 24.378 12.4218 24.378H11.6738V26.754Z",fill:"#144E6C"}),(0,s.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,s.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),lH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#D1E5D1",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M11.8861 26.8804L9.40564 22.9864H11.2646C11.3856 22.9864 11.4736 23.0029 11.5286 23.0359C11.5873 23.0653 11.6386 23.1166 11.6826 23.1899L13.2776 25.8904C13.296 25.8428 13.3161 25.7969 13.3381 25.7529C13.3638 25.7089 13.3913 25.6631 13.4206 25.6154L14.8176 23.2174C14.9093 23.0634 15.034 22.9864 15.1916 22.9864H16.9736L14.4601 26.7979L17.0286 30.9999H15.1696C15.0486 30.9999 14.9496 30.9706 14.8726 30.9119C14.7993 30.8533 14.7406 30.7836 14.6966 30.7029L13.0906 27.8979C13.0613 27.9786 13.0283 28.0483 12.9916 28.1069L11.4956 30.7029C11.4516 30.7799 11.393 30.8496 11.3196 30.9119C11.2463 30.9706 11.1546 30.9999 11.0446 30.9999H9.30664L11.8861 26.8804Z",fill:"#265026"}),(0,s.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,s.jsx)("path",{d:"M29.9128 24.6144C29.8578 24.7024 29.7991 24.7684 29.7368 24.8124C29.6781 24.8564 29.6011 24.8784 29.5058 24.8784C29.4215 24.8784 29.3298 24.8528 29.2308 24.8014C29.1355 24.7464 29.0255 24.6859 28.9008 24.6199C28.7798 24.5539 28.6405 24.4953 28.4828 24.4439C28.3251 24.3889 28.1455 24.3614 27.9438 24.3614C27.5955 24.3614 27.3351 24.4366 27.1628 24.5869C26.9941 24.7336 26.9098 24.9334 26.9098 25.1864C26.9098 25.3478 26.9611 25.4816 27.0638 25.5879C27.1665 25.6943 27.3003 25.7859 27.4653 25.8629C27.634 25.9399 27.8246 26.0114 28.0373 26.0774C28.2536 26.1398 28.4736 26.2113 28.6973 26.2919C28.921 26.3689 29.1391 26.4606 29.3518 26.5669C29.5681 26.6733 29.7588 26.8089 29.9238 26.9739C30.0925 27.1389 30.2281 27.3406 30.3308 27.5789C30.4335 27.8136 30.4848 28.0978 30.4848 28.4314C30.4848 28.8018 30.4206 29.1483 30.2923 29.4709C30.164 29.7936 29.977 30.0759 29.7313 30.3179C29.4893 30.5563 29.1886 30.7451 28.8293 30.8844C28.4736 31.0201 28.0685 31.0879 27.6138 31.0879C27.3645 31.0879 27.1096 31.0623 26.8493 31.0109C26.5926 30.9596 26.3433 30.8881 26.1013 30.7964C25.8593 30.7011 25.632 30.5893 25.4193 30.4609C25.2066 30.3326 25.0215 30.1896 24.8638 30.0319L25.4138 29.1629C25.4541 29.0969 25.511 29.0438 25.5843 29.0034C25.6576 28.9631 25.7365 28.9429 25.8208 28.9429C25.9308 28.9429 26.0408 28.9778 26.1508 29.0474C26.2645 29.1171 26.391 29.1941 26.5303 29.2784C26.6733 29.3628 26.8365 29.4398 27.0198 29.5094C27.2031 29.5791 27.4195 29.6139 27.6688 29.6139C28.0061 29.6139 28.2683 29.5406 28.4553 29.3939C28.6423 29.2436 28.7358 29.0071 28.7358 28.6844C28.7358 28.4974 28.6845 28.3453 28.5818 28.2279C28.4791 28.1106 28.3435 28.0134 28.1748 27.9364C28.0098 27.8594 27.821 27.7916 27.6083 27.7329C27.3956 27.6743 27.1775 27.6101 26.9538 27.5404C26.7301 27.4671 26.512 27.3791 26.2993 27.2764C26.0866 27.1701 25.896 27.0326 25.7273 26.8639C25.5623 26.6916 25.4285 26.4789 25.3258 26.2259C25.2231 25.9693 25.1718 25.6539 25.1718 25.2799C25.1718 24.9793 25.2323 24.6859 25.3533 24.3999C25.4743 24.1139 25.6521 23.8591 25.8868 23.6354C26.1215 23.4118 26.4093 23.2339 26.7503 23.1019C27.0913 22.9663 27.4818 22.8984 27.9218 22.8984C28.1675 22.8984 28.4058 22.9186 28.6368 22.9589C28.8715 22.9956 29.0933 23.0524 29.3023 23.1294C29.5113 23.2028 29.7056 23.2926 29.8853 23.3989C30.0686 23.5016 30.2318 23.6189 30.3748 23.7509L29.9128 24.6144Z",fill:"#265026"})]}),dH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M2 0C0.89543 0 0 0.89543 0 2V48C0 49.1046 0.895431 50 2 50H38C39.1046 50 40 49.1046 40 48V14L26 0H2Z",fill:"#CFEAF8",fillRule:"evenodd"}),(0,s.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,s.jsx)("path",{d:"M16.8968 22.9863V23.6573C16.8968 23.7527 16.8802 23.8462 16.8472 23.9378C16.8179 24.0295 16.7757 24.1157 16.7207 24.1963L12.9587 29.5698H16.7758V30.9998H10.5938V30.2848C10.5938 30.2005 10.6084 30.118 10.6377 30.0373C10.6671 29.953 10.7074 29.876 10.7587 29.8063L14.5317 24.4163H10.9017V22.9863H16.8968Z",fill:"#124F6E"}),(0,s.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,s.jsx)("path",{d:"M25.1301 28.3213V30.9998H23.2711V22.9863H26.0981C26.6627 22.9863 27.1467 23.0542 27.5501 23.1898C27.9571 23.3218 28.2907 23.5052 28.5511 23.7398C28.8151 23.9745 29.0094 24.2513 29.1341 24.5703C29.2587 24.8893 29.3211 25.234 29.3211 25.6043C29.3211 26.004 29.2569 26.3707 29.1286 26.7043C29.0002 27.038 28.8041 27.324 28.5401 27.5623C28.2761 27.8007 27.9406 27.9877 27.5336 28.1233C27.1302 28.2553 26.6517 28.3213 26.0981 28.3213H25.1301ZM25.1301 26.9188H26.0981C26.5821 26.9188 26.9304 26.8033 27.1431 26.5723C27.3557 26.3413 27.4621 26.0187 27.4621 25.6043C27.4621 25.421 27.4346 25.2542 27.3796 25.1038C27.3246 24.9535 27.2402 24.8252 27.1266 24.7188C27.0166 24.6088 26.8754 24.5245 26.7031 24.4658C26.5344 24.4072 26.3327 24.3778 26.0981 24.3778H25.1301V26.9188Z",fill:"#124F6E"})]});var uH,Im;const Dhe=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>uH("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Im("title",{children:i}),o&&Im("desc",{children:o}),Im("path",{d:"M11.793 2.793L9 0h7v7l-2.793-2.793-2.5 2.5a.997.997 0 0 1-1.414 0 1 1 0 0 1 0-1.414l2.5-2.5zm-5.086 6.5a1 1 0 0 1 0 1.414l-2.5 2.5L7 16H0V9l2.793 2.793 2.5-2.5a1 1 0 0 1 1.414 0zm-2.5-6.5l2.5 2.5a1 1 0 1 1-1.414 1.414l-2.5-2.5L0 7V0h7L4.207 2.793zm5.086 6.5a1 1 0 0 1 1.414 0l2.5 2.5L16 9v7H9l2.793-2.793-2.5-2.5a1 1 0 0 1 0-1.414z",fill:"currentColor",fillRule:"evenodd"})]}),Fhe=null;var hH,Em,mH;const Hhe=({title:e="Hidden",desc:t="Eye crossed out",width:n="16",height:o="14",className:r=null,focusable:a="false"})=>hH("svg",{className:mH("i i-hidden",r),focusable:a,height:o,viewBox:"0 0 16 14",width:n,children:[Em("title",{children:e}),Em("desc",{children:t}),Em("path",{d:"M15.9,6.3c-0.1-0.1-1-1.8-2.7-3.3l1.3-1.3c0.4-0.4,0.4-1,0-1.4s-1-0.4-1.4,0l-1.6,1.6c-1-0.6-2.2-1-3.6-1 c-4.8,0-7.7,5.3-7.9,5.5C0,6.6,0,7,0.1,7.3c0.1,0.1,1,1.8,2.7,3.3l-1,1c-0.4,0.4-0.4,1,0,1.4c0.2,0.2,0.5,0.3,0.7,0.3S3,13.2,3.2,13 l1.2-1.2c1,0.6,2.2,1,3.6,1h0c4.7,0,7.7-5.3,7.9-5.5C16,7,16,6.6,15.9,6.3z M2.2,6.8c0.8-1.2,3-4,5.8-4c0.7,0,1.4,0.2,2.1,0.5 L8.5,4.9C8.4,4.8,8.2,4.8,8,4.8c-1.1,0-1.9,0.9-2,2c0,0.2,0,0.4,0.1,0.5L4.2,9.2C3.3,8.3,2.6,7.4,2.2,6.8z M8,10.8 c-0.7,0-1.4-0.2-2.1-0.5l1.6-1.6c0.2,0,0.3,0.1,0.5,0.1c0,0,0.1,0,0.1,0c1.1,0,2-0.9,2-2c0-0.2,0-0.3-0.1-0.5l1.8-1.8 c1,0.8,1.7,1.8,2,2.4C13,8,10.8,10.8,8,10.8z"})]}),$he=null;var fH,ld,pH;const Vhe=({title:e="Label Set",desc:t="Label Set",width:n="17",height:o="17",className:r,focusable:a="false"})=>fH("svg",{className:pH("i i-labelSet",r),focusable:a,height:o,viewBox:"0 0 18 18",width:n,children:[ld("title",{children:e}),ld("desc",{children:t}),ld("path",{d:"M17.63,9.76,8.24.37A.59.59,0,0,0,7.83.2h-7A.59.59,0,0,0,.2.78v7a.59.59,0,0,0,.17.42l9.39,9.39a.59.59,0,0,0,.83,0l7-7A.59.59,0,0,0,17.63,9.76ZM1.37,7.58V1.37H7.58l8.8,8.8-6.21,6.21Z"}),ld("path",{d:"M5.48,3.33A2.15,2.15,0,1,0,7.63,5.48,2.15,2.15,0,0,0,5.48,3.33Zm0,3.13a1,1,0,1,1,1-1A1,1,0,0,1,5.48,6.46Z"})]}),zhe=null;var gH,Nm;const _he=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>gH("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Nm("title",{children:i}),o&&Nm("desc",{children:o}),Nm("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm1-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),Uhe=null;var vH,jm,CH;const Ghe=({title:e="Matching",desc:t="Two rows of stacked squares",width:n="15",height:o="15",className:r,focusable:a="false"})=>vH("svg",{className:CH("i i-matching",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[jm("title",{children:e}),jm("desc",{children:t}),jm("path",{d:"M4.814 4.975H2.19V2.35h2.625v2.625zM5.69.6H1.314C.79.6.44.95.44 1.475V5.85c0 .525.35.875.875.875H5.69c.525 0 .875-.35.875-.875V1.475C6.564.95 6.214.6 5.69.6zM12.69 4.975h-2.626V2.35h2.625v2.625zM13.563.6H9.19c-.525 0-.875.35-.875.875V5.85c0 .525.35.875.875.875h4.375c.525 0 .875-.35.875-.875V1.475c0-.525-.35-.875-.875-.875zM4.814 12.85H2.19v-2.625h2.625v2.625zm.875-4.375H1.314c-.525 0-.875.35-.875.875v4.375c0 .525.35.875.875.875H5.69c.525 0 .875-.35.875-.875V9.35c0-.525-.35-.875-.875-.875zM12.69 12.85h-2.626v-2.625h2.625v2.625zm.874-4.375H9.19c-.525 0-.875.35-.875.875v4.375c0 .525.35.875.875.875h4.375c.525 0 .875-.35.875-.875V9.35c0-.525-.35-.875-.875-.875z"})]}),Whe=null;var xH,dd,bH;const Khe=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:n="16",height:o="16",className:r,focusable:a="false"})=>xH("svg",{className:bH("i i-multipleChoice",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[dd("title",{children:e}),dd("desc",{children:t}),dd("path",{d:"M8 16A8 8 0 1 1 8 0a8 8 0 0 1 0 16zm0-2A6 6 0 1 0 8 2a6 6 0 0 0 0 12z"}),dd("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),Qhe=null;var yH,wm,SH;const Yhe=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:n="16",height:o="16",className:r,focusable:a="false"})=>yH("svg",{className:SH("i i-multipleResponse",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[wm("title",{children:e}),wm("desc",{children:t}),wm("path",{d:"M15.142.332c.6 0 1 .4 1 1v14c0 .6-.4 1-1 1h-14c-.6 0-1-.4-1-1v-14c0-.6.4-1 1-1h14zm-1 14v-12h-12v12h12zm-7.978-3.308l-2-2-.707-.708L4.87 6.902l.707.707 1.3 1.3 3.317-3.33.707-.708 1.414 1.414-.707.707-4.03 4.032-.708.707-.707-.707z"})]}),Zhe=null;var LH,ud,TH;const Xhe=({title:e="New Slide",desc:t="New Slide",width:n="16",height:o="16",className:r,focusable:a="false"})=>LH("svg",{className:TH("i i-new-slide",r),focusable:a,height:o,viewBox:"0 0 16 16",width:n,children:[ud("title",{children:e}),ud("desc",{children:t}),ud("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),ud("path",{d:"M14,14H2V2h12V14z M15,0H1C0.4,0,0,0.4,0,1v14c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V1C15.9,0.4,15.5,0,15,0z",fillRule:"evenodd"})]}),qhe=null;var kH,Am,IH;const Jhe=({title:e="Next Slide",desc:t="Next Slide",width:n="16",height:o="13.4",className:r,focusable:a="false"})=>kH("svg",{className:IH("i i-next-slide",r),focusable:a,height:o,viewBox:"0 0 16 13.4",width:n,children:[Am("title",{children:e}),Am("desc",{children:t}),Am("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),eme=null;var EH,Gi,NH;const tme=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:n="20",height:o="16",className:r,focusable:a="false"})=>EH("svg",{className:NH("i",r),focusable:a,height:o,viewBox:"0 0 20 16",width:n,children:[Gi("title",{children:e}),Gi("desc",{children:t}),Gi("path",{d:"M3.23,12.35 L3.94,11.64 C2.73771334,10.6447807 1.76251115,9.40361431 1.08,8 C2.47,5 5.96,2 9.99,2 C11.0161024,2.00843654 12.0323067,2.20151536 12.99,2.57 L13.76,1.8 C12.5726697,1.28490674 11.2941824,1.01288817 10,1 C5.61,1 1.52,4.28 0,8 C0.716531693,9.68559192 1.82365735,11.1766125 3.23,12.35 L3.23,12.35 Z"}),Gi("path",{d:"M16.77,3.65 L16.06,4.36 C17.2622867,5.35521926 18.2374889,6.59638569 18.92,8 C17.53,11 14.04,14 10.01,14 C8.9838976,13.9915635 7.96769327,13.7984846 7.01,13.43 L6.24,14.2 C7.43352094,14.717712 8.71907199,14.9897863 10.02,15 C14.41,15 18.5,11.72 20.02,8 C19.297748,6.3123309 18.1836278,4.82112397 16.77,3.65 L16.77,3.65 Z"}),Gi("rect",{height:"1.41",transform:"translate(9.992148, 7.999769) rotate(-45.000000) translate(-9.992148, -7.999769) ",width:"21.21",x:"-0.61285173",y:"7.29476926"})]}),nme=null;var jH,Rm,wH;const sme=({title:e="Edit",desc:t="Pencil",width:n="11",height:o="11",className:r,focusable:a="false"})=>jH("svg",{className:wH("i i-pencil",r),focusable:a,height:o,viewBox:"0 0 10 10",width:n,children:[Rm("title",{children:e}),Rm("desc",{children:t}),Rm("path",{d:"M8.19.19a.6.6,0,0,0-.87,0L0,7.5V10H2.5L9.81,2.69a.6.6,0,0,0,0-.87Z"})]}),ome=null;var AH,Pm;const rme=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>AH("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Pm("title",{children:i}),o&&Pm("desc",{children:o}),Pm("path",{clipRule:"evenodd",d:"M12.668 2.11458C12.5079 2.11458 12.3494 2.14611 12.2015 2.20737C12.0536 2.26863 11.9192 2.35842 11.8061 2.47161L2.93124 11.3464L2.2848 13.7167L4.6551 13.0703L13.5299 4.19546C13.6431 4.08227 13.7329 3.9479 13.7941 3.80001C13.8554 3.65212 13.8869 3.49361 13.8869 3.33353C13.8869 3.17346 13.8554 3.01495 13.7941 2.86706C13.7329 2.71917 13.6431 2.5848 13.5299 2.47161C13.4167 2.35842 13.2823 2.26863 13.1345 2.20737C12.9866 2.14611 12.8281 2.11458 12.668 2.11458ZM11.6913 0.975531C12.0009 0.847267 12.3328 0.78125 12.668 0.78125C13.0032 0.78125 13.335 0.847267 13.6447 0.975531C13.9544 1.1038 14.2357 1.2918 14.4727 1.5288C14.7097 1.7658 14.8977 2.04716 15.026 2.35682C15.1543 2.66648 15.2203 2.99837 15.2203 3.33353C15.2203 3.6687 15.1543 4.00059 15.026 4.31025C14.8977 4.61991 14.7097 4.90127 14.4727 5.13827L5.47272 14.1383C5.39069 14.2203 5.28866 14.2795 5.17673 14.31L1.51006 15.31C1.27925 15.373 1.03241 15.3074 0.863246 15.1383C0.69408 14.9691 0.628527 14.7223 0.691475 14.4915L1.69148 10.8248C1.722 10.7129 1.78121 10.6108 1.86325 10.5288L10.8632 1.5288C11.1002 1.2918 11.3816 1.1038 11.6913 0.975531Z",fill:"currentColor",fillRule:"evenodd"})]}),ame=null;class Mm extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${Lr()()}`,this.pathId=`person-unknown-path-${Lr()()}`}render(){const{title:t="Person Unknown",desc:n,width:o="38",height:r="38",className:a,decorative:i,focusable:c="false"}=this.props;return(0,s.jsxs)("svg",{"aria-hidden":i,className:X()("i i-person-unknown",a),focusable:c,height:r,viewBox:"0 0 38 38",width:o,children:[t&&(0,s.jsx)("title",{children:t}),n&&(0,s.jsx)("desc",{children:n}),(0,s.jsx)("defs",{children:(0,s.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,s.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,s.jsx)("use",{href:`#${this.pathId}`})}),(0,s.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,s.jsx)("path",{d:"M15.1239928,24 C12.6645753,22.6352711 11,20.0120267 11,17 C11,12.581722 14.581722,9 19,9 C23.418278,9 27,12.581722 27,17 C27,20.0120267 25.3354247,22.6352711 22.8760072,24 L23,24 C27.4182847,24 31,27.5817153 31,32 L31,43 C31,43.5522847 30.5522847,44 30,44 L8,44 C7.44771525,44 7,43.5522847 7,43 L7,32 C7,27.5817153 10.5817153,24 15,24 L15.1239928,24 Z",fill:"#ADAEAF",fillRule:"nonzero",mask:`url(#${this.maskId})`})]})]})}}function RH(e){return(0,s.jsxs)(yn,{viewBox:"0 0 16 16",...e,children:[(0,s.jsx)("path",{d:"M14,14 L2,14 L2,2 L14,2 L14,14 Z M15,0 L1,0 C0.4,0 0,0.4 0,1 L0,15 C0,15.6 0.4,16 1,16 L15,16 C15.6,16 16,15.6 16,15 L16,1 C16,0.4 15.6,0 15,0 L15,0 Z"}),(0,s.jsx)("path",{d:"M7.9997,11 C8.5517,11 8.9997,11.448 8.9997,12 C8.9997,12.552 8.5517,13 7.9997,13 C7.4477,13 6.9997,12.552 6.9997,12 C6.9997,11.448 7.4477,11 7.9997,11"}),(0,s.jsx)("path",{d:"M7.0997,5.5 C7.2997,5.2 7.5997,5 7.9997,5 C8.5997,5 8.9997,5.4 8.9997,6 C8.9997,6.3 8.8997,6.4 8.3997,6.7 C7.7997,7.1 6.9997,7.7 6.9997,9 L6.9997,10 L8.9997,10 L8.9997,9 C8.9997,8.8 8.9997,8.7 9.4997,8.4 C10.0997,8 10.9997,7.4 10.9997,6 C10.9997,4.3 9.6997,3 7.9997,3 C6.8997,3 5.8997,3.6 5.3997,4.5 L4.8997,5.4 L6.5997,6.4 L7.0997,5.5 Z"})]})}var PH,Om;const ime=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>PH("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Om("title",{children:i}),o&&Om("desc",{children:o}),Om("path",{d:"M0 0h16v2H0V0zm0 13h16v2H0v-2zm7-9h8a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1z",fill:"currentColor",fillRule:"evenodd"})]}),cme=null;function MH(e){return(0,s.jsx)(yn,{viewBox:"0 0 23 17",...e,children:(0,s.jsx)("path",{d:"M19.347 8.275l1.88 1.714a.727.727 0 0 0 .98-1.074l-3.225-2.941a.727.727 0 0 0-1.027.047l-2.94 3.224a.727.727 0 0 0 1.075.98l1.802-1.976a6.545 6.545 0 0 1-11.56 4.288.727.727 0 1 0-1.114.935 8 8 0 0 0 14.129-5.197zm-16.039.162l-1.79-1.633a.727.727 0 1 0-.98 1.074l3.223 2.94c.297.272.757.25 1.028-.046l2.94-3.224a.727.727 0 0 0-1.075-.98L4.768 8.636a6.545 6.545 0 0 1 11.555-4.482.727.727 0 1 0 1.114-.936A8 8 0 0 0 3.308 8.437z",fillRule:"nonzero"})})}var Bx,OH;const lme=({width:e="16",height:t="16",className:n})=>Bx("svg",{"aria-hidden":"true",className:OH("i i-search",n),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:Bx("path",{d:"M15.2,12.8l-2.9-2.9c0.5-1,0.9-2,0.9-3.2c0-3.6-2.9-6.5-6.5-6.5c-3.6,0-6.5,2.9-6.5,6.5s2.9,6.5,6.5,6.5c1.7,0,3.2-0.6,4.4-1.7l2.8,2.8c0.4,0.4,1,0.4,1.4,0C15.6,13.8,15.6,13.2,15.2,12.8z M6.7,11.2c-2.5,0-4.5-2-4.5-4.5s2-4.5,4.5-4.5s4.5,2,4.5,4.5S9.1,11.2,6.7,11.2z"})}),dme=null;var Dx,Sa,BH;const ume=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:n="21",height:o="20",className:r,focusable:a="false"})=>Dx("svg",{className:BH("i i-spinner",r),focusable:a,height:o,viewBox:"0 0 21 20",width:n,children:[Sa("title",{children:e}),Sa("desc",{children:t}),Sa("defs",{children:Dx("radialGradient",{cx:"89.364%",cy:"24.157%",fx:"89.364%",fy:"24.157%",gradientTransform:"rotate(69.991 .842 .205) scale(1 .69785)",id:"spinner-radial-gradient",r:"45.607%",children:[Sa("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),Sa("stop",{offset:"100%",stopColor:"#979797"})]})}),Sa("path",{d:"M74.5 3c-5.523 0-10 4.477-10 10s4.477 10 10 10 10-4.477 10-10a9.957 9.957 0 0 0-1.477-5.233 1 1 0 0 0-1.703 1.048A8 8 0 1 1 74.5 5a1 1 0 0 0 0-2z",fill:"url(#spinner-radial-gradient)",fillRule:"nonzero",transform:"rotate(-159 42.222 17.43)"})]}),hme=null;function DH(e){return(0,s.jsxs)(yn,{viewBox:"0 0 15 16",...e,children:[(0,s.jsx)("path",{d:"M8.69169169,1.65459164 C7.42998802,0.732912554 5.79691384,0.425404591 4.21164279,0.810071145 C2.01180284,1.34426767 0.429519485,3.32166778 0.449238273,5.51223961 C0.454317355,6.09008425 0.560978072,6.64511922 0.766531499,7.16185651 C0.884545458,7.45866364 1.19914976,7.66620336 1.53138146,7.66620336 C1.60756769,7.66620336 1.72289272,7.66620336 1.80027403,7.62903206 C2.21496611,7.48682371 2.41812939,7.05879065 2.26276924,6.65638325 C2.09725092,6.18836289 2.02345485,5.8315748 2.02345485,5.49928598 C2.02345485,4.55873965 2.44860388,3.66071502 3.19044858,3.03527987 C3.94334777,2.40027029 4.91763516,2.10993997 5.93524413,2.21694824 C6.90415367,2.31888769 7.79388929,2.81901053 8.37648985,3.58890684 C8.96058425,4.36077436 9.17300938,5.31962473 8.9590904,6.21962057 C8.94235931,6.29002074 8.92204298,6.35957612 8.89754388,6.42913149 C8.84436291,6.5969655 8.8709534,6.79042518 8.97074242,6.9599488 C9.07979329,7.14524206 9.26204269,7.2823816 9.47088259,7.33616734 C9.67285078,7.38770027 9.89573284,7.36517221 10.0812687,7.27308878 C10.2742738,7.17762614 10.4108115,7.01936655 10.4654863,6.83041248 C10.6062067,6.40012662 10.6773139,5.94111748 10.6773139,5.4666203 C10.6773139,3.96597018 9.95369412,2.57655233 8.69169169,1.65459164"}),(0,s.jsx)("path",{d:"M12.4033641,9.43002363 L7.46962051,8.60458861 L7.42312479,5.65704834 C7.42257778,4.87028142 6.91659487,4.17992696 6.16391111,3.93838024 C5.57177436,3.74839098 4.94490256,3.83320301 4.44493675,4.1709044 C3.94633846,4.50757465 3.64849231,5.04841246 3.64849231,5.61734909 L3.64849231,12.0692503 L3.27543248,11.4577787 C3.01177436,11.0154157 2.60233846,10.7096799 2.12288547,10.5967691 C1.65355214,10.4859205 1.14620171,10.5673813 0.72637265,10.8220752 C0.0398769231,11.2721719 -0.184396581,12.1996907 0.158577778,13.1957809 C0.165415385,13.210217 0.18237265,13.2532675 0.209176068,13.3208077 C0.319671795,13.5979291 0.578406838,14.2475532 0.952013675,15.0616455 L0.999603419,15.1523867 C1.20227009,15.608928 1.48534701,15.7290569 1.72739829,15.7290569 C1.84445812,15.7290569 1.95139829,15.7009581 2.03563761,15.6692503 C2.21204786,15.6022256 2.33922735,15.4880258 2.40322735,15.3387669 C2.47816752,15.1637293 2.46285128,14.9407433 2.36356923,14.7319356 C2.32992821,14.653826 1.5422359,12.8165757 1.50968889,12.7477465 C1.36828718,12.295072 1.41396239,11.9890784 1.49437265,11.9455124 C1.58845812,11.9011729 1.69403077,11.8869946 1.7730735,11.9009151 C1.9133812,11.9449968 1.98832137,12.0042879 2.05697094,12.1321504 L3.53963761,14.292666 C3.71905641,14.5633426 4.15146667,14.7654479 4.59946667,14.6061353 C4.93888547,14.4857487 5.12568889,14.2596692 5.12568889,13.9699162 L5.12568889,5.69416971 C5.12568889,5.5072739 5.23317607,5.33739205 5.39317607,5.27114071 C5.54469744,5.20927175 5.70797949,5.21984103 5.84117607,5.3018174 C5.97546667,5.38456713 6.05560342,5.52196778 6.05560342,5.66916434 L6.05560342,9.09129108 C6.05560342,9.4367261 6.34715897,9.7540623 6.69232137,9.78396563 L6.6942359,9.78396563 L12.1632274,10.6988528 C12.7868171,10.8042879 13.2397402,11.3141912 13.2397402,11.9112266 L13.2397402,15.0784017 C13.2397402,15.434406 13.5457915,15.72287 13.9235009,15.72287 C14.3009368,15.72287 14.6072615,15.434406 14.6072615,15.0784017 L14.6072615,11.9112266 C14.6072615,10.6893147 13.6809026,9.64579162 12.4033641,9.43002363"})]})}var FH,Bm,HH;const mme=({title:e="Remove",desc:t="Trash can",width:n="10",height:o="13",className:r=null,focusable:a="false"})=>FH("svg",{className:HH("i i-trash",r),focusable:a,height:o,viewBox:"0 0 10 13",width:n,children:[Bm("title",{children:e}),Bm("desc",{children:t}),Bm("path",{d:"M9.28713712,12.0991694 C9.28713712,12.4960933 8.96564674,12.814808 8.57149855,12.814808 L1.42899128,12.814808 C1.03500637,12.814808 0.714169089,12.4960933 0.714169089,12.0991694 L0.714169089,4.9568254 L9.28713712,4.9568254 L9.28713712,12.0991694 L9.28713712,12.0991694 Z M10,3.33274903 L0,3.33274903 L0,2.62053925 C0,2.22508485 0.319367795,1.90571706 0.714169089,1.90571706 L2.85830911,1.90571706 L2.85830911,1.19220107 C2.85830911,0.798052883 3.17702381,0.4765625 3.5724782,0.4765625 L6.42948111,0.4765625 C6.82346602,0.4765625 7.1436502,0.798052883 7.1436502,1.19220107 L7.1436502,1.90571706 L9.28713712,1.90571706 C9.68046893,1.90571706 10,2.22524813 10,2.62053925 L10,3.33274903 L10,3.33274903 Z"})]}),fme=null;var $H,La;const pme=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="16",role:a="img",title:i,width:c="14"})=>$H("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&La("title",{children:i}),o&&La("desc",{children:o}),La("path",{clipRule:"evenodd",d:"M0.332031 4.00033C0.332031 3.63214 0.630508 3.33366 0.998698 3.33366H12.9987C13.3669 3.33366 13.6654 3.63214 13.6654 4.00033C13.6654 4.36852 13.3669 4.66699 12.9987 4.66699H0.998698C0.630508 4.66699 0.332031 4.36852 0.332031 4.00033Z",fill:"currentColor",fillRule:"evenodd"}),La("path",{clipRule:"evenodd",d:"M5.66536 2.00033C5.48855 2.00033 5.31898 2.07056 5.19396 2.19559C5.06894 2.32061 4.9987 2.49018 4.9987 2.66699V3.33366H8.9987V2.66699C8.9987 2.49018 8.92846 2.32061 8.80344 2.19559C8.67841 2.07056 8.50884 2.00033 8.33203 2.00033H5.66536ZM10.332 3.33366V2.66699C10.332 2.13656 10.1213 1.62785 9.74624 1.25278C9.37117 0.877706 8.86246 0.666992 8.33203 0.666992H5.66536C5.13493 0.666992 4.62622 0.877706 4.25115 1.25278C3.87608 1.62785 3.66536 2.13656 3.66536 2.66699V3.33366H2.33203C1.96384 3.33366 1.66536 3.63214 1.66536 4.00033V13.3337C1.66536 13.8641 1.87608 14.3728 2.25115 14.7479C2.62622 15.1229 3.13493 15.3337 3.66536 15.3337H10.332C10.8625 15.3337 11.3712 15.1229 11.7462 14.7479C12.1213 14.3728 12.332 13.8641 12.332 13.3337V4.00033C12.332 3.63214 12.0336 3.33366 11.6654 3.33366H10.332ZM2.9987 4.66699V13.3337C2.9987 13.5105 3.06894 13.68 3.19396 13.8051C3.31898 13.9301 3.48855 14.0003 3.66536 14.0003H10.332C10.5088 14.0003 10.6784 13.9301 10.8034 13.8051C10.9285 13.68 10.9987 13.5105 10.9987 13.3337V4.66699H2.9987Z",fill:"currentColor",fillRule:"evenodd"}),La("path",{clipRule:"evenodd",d:"M5.66536 6.66699C6.03355 6.66699 6.33203 6.96547 6.33203 7.33366V11.3337C6.33203 11.7018 6.03355 12.0003 5.66536 12.0003C5.29717 12.0003 4.9987 11.7018 4.9987 11.3337V7.33366C4.9987 6.96547 5.29717 6.66699 5.66536 6.66699Z",fill:"currentColor",fillRule:"evenodd"}),La("path",{clipRule:"evenodd",d:"M8.33203 6.66699C8.70022 6.66699 8.9987 6.96547 8.9987 7.33366V11.3337C8.9987 11.7018 8.70022 12.0003 8.33203 12.0003C7.96384 12.0003 7.66536 11.7018 7.66536 11.3337V7.33366C7.66536 6.96547 7.96384 6.66699 8.33203 6.66699Z",fill:"currentColor",fillRule:"evenodd"})]}),gme=null;var VH,hd,zH;const vme=({title:e="Upload",desc:t="Upload icon",width:n="15",height:o="15",className:r="",focusable:a="false"})=>VH("svg",{className:zH("i",r),focusable:a,height:o,viewBox:"0 0 15 15",width:n,children:[hd("title",{children:e}),hd("desc",{children:t}),hd("polygon",{points:"6.52941176 3.52941176 6.52941176 9.70588235 8.29411765 9.70588235 8.29411765 3.52941176 10.4117647 3.52941176 7.41176471 0 4.41176471 3.52941176"}),hd("path",{d:"M14.0625,14.1176471 L0.9375,14.1176471 C0.375,14.1176471 0,13.7647059 0,13.2352941 L0,5.29411765 C0,4.76470588 0.375,4.41176471 0.9375,4.41176471 L3.75,4.41176471 L3.75,6.17647059 L1.875,6.17647059 L1.875,12.3529412 L13.125,12.3529412 L13.125,6.17647059 L11.25,6.17647059 L11.25,4.41176471 L14.0625,4.41176471 C14.625,4.41176471 15,4.76470588 15,5.29411765 L15,13.2352941 C15,13.7647059 14.625,14.1176471 14.0625,14.1176471"})]}),Cme=null;var _H,Wi;const xme=({"aria-hidden":e,"aria-label":t,className:n,desc:o,height:r="14",role:a="img",title:i,width:c="14"})=>_H("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Wi("title",{children:i}),o&&Wi("desc",{children:o}),Wi("path",{clipRule:"evenodd",d:"M1.00065 8.33301C1.36884 8.33301 1.66732 8.63148 1.66732 8.99967V11.6663C1.66732 11.8432 1.73756 12.0127 1.86258 12.1377C1.9876 12.2628 2.15717 12.333 2.33398 12.333H11.6673C11.8441 12.333 12.0137 12.2628 12.1387 12.1377C12.2637 12.0127 12.334 11.8432 12.334 11.6663V8.99967C12.334 8.63148 12.6325 8.33301 13.0007 8.33301C13.3688 8.33301 13.6673 8.63148 13.6673 8.99967V11.6663C13.6673 12.1968 13.4566 12.7055 13.0815 13.0806C12.7065 13.4556 12.1978 13.6663 11.6673 13.6663H2.33398C1.80355 13.6663 1.29484 13.4556 0.919771 13.0806C0.544698 12.7055 0.333984 12.1968 0.333984 11.6663V8.99967C0.333984 8.63148 0.632461 8.33301 1.00065 8.33301Z",fill:"currentColor",fillRule:"evenodd"}),Wi("path",{clipRule:"evenodd",d:"M6.52925 0.52827C6.7896 0.26792 7.21171 0.26792 7.47206 0.52827L10.8054 3.8616C11.0657 4.12195 11.0657 4.54406 10.8054 4.80441C10.545 5.06476 10.1229 5.06476 9.86258 4.80441L7.00065 1.94248L4.13872 4.80441C3.87837 5.06476 3.45626 5.06476 3.19591 4.80441C2.93556 4.54406 2.93556 4.12195 3.19591 3.8616L6.52925 0.52827Z",fill:"currentColor",fillRule:"evenodd"}),Wi("path",{clipRule:"evenodd",d:"M7.00065 0.333008C7.36884 0.333008 7.66732 0.631485 7.66732 0.999674V8.99967C7.66732 9.36786 7.36884 9.66634 7.00065 9.66634C6.63246 9.66634 6.33398 9.36786 6.33398 8.99967V0.999674C6.33398 0.631485 6.63246 0.333008 7.00065 0.333008Z",fill:"currentColor",fillRule:"evenodd"})]}),bme=null;var UH,md,GH;const yme=({title:e="UploadXml",desc:t="UploadXml",width:n="18",height:o="21",className:r,focusable:a="false"})=>UH("svg",{className:GH("i i-uploadXml",r),focusable:a,height:o,viewBox:"0 0 18 21",width:n,children:[md("title",{children:e}),md("desc",{children:t}),md("path",{d:"M15.88,1.2H1.6A.59.59,0,0,0,1,1.79V19.21a.59.59,0,0,0,.59.59H15.88a.59.59,0,0,0,.59-.59V1.79A.59.59,0,0,0,15.88,1.2Zm-.59,1.19V18.61H2.19V2.39Z"}),md("path",{d:"M5.14,10.13a.59.59,0,0,0,.84,0L8.13,8v6.48a.59.59,0,0,0,1.19,0V8l2.15,2.15a.59.59,0,0,0,.84-.84L9.14,6.12a.6.6,0,0,0-.84,0L5.14,9.29A.59.59,0,0,0,5.14,10.13Z"})]}),Sme=null;function WH(e){return(0,s.jsx)(yn,{viewBox:"0 0 16 12",...e,children:(0,s.jsx)("g",{transform:"translate(-1 -2)",children:(0,s.jsx)("path",{d:"M11,14 L2,14 C1.4,14 1,13.6 1,13 L1,3 C1,2.4 1.4,2 2,2 L11,2 C11.6,2 12,2.4 12,3 L12,4.5 L15.6,3 C16.3,2.8 17,3.3 17,4 L17,12 C17,12.7 16.3,13.2 15.6,12.9 L12,11.5 L12,13 C12,13.6 11.6,14 11,14 L11,14 L11,14 Z M3,12 L10,12 L10,10 C10,9.3 10.7,8.8 11.4,9.1 L15,10.6 L15,5.6 L11.4,7.1 C10.7,7.2 10,6.7 10,6 L10,4 L3,4 L3,12 L3,12 L3,12 Z"})})})}var Fx,fd,KH;const Lme=({title:e="Visible",desc:t="Eye",width:n="16",height:o="12",className:r=null,focusable:a="false"})=>Fx("svg",{className:KH("i i-visible",r),focusable:a,height:o,viewBox:"0 0 16 12",width:n,children:[fd("title",{children:e}),fd("desc",{children:t}),Fx("g",{children:[fd("path",{d:"M8 2c2.84 0 5.036 2.835 5.818 4-.784 1.166-2.98 4-5.818 4-2.84 0-5.038-2.838-5.819-4.001C2.958 4.835 5.146 2 8.001 2m0 10c4.706 0 7.743-5.284 7.87-5.508a1 1 0 0 0 .001-.98C15.746 5.287 12.732 0 8 0 3.245 0 .251 5.289.126 5.514a.998.998 0 0 0 .002.975C.254 6.713 3.27 12 8 12"}),fd("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),Tme=null,QH=({"aria-hidden":e,"aria-label":t,className:n,desc:o="",height:r="20",role:a="img",title:i="",style:c,width:l="20"})=>(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()("i i-xMarkFilled",n),focusable:"false",height:r,role:a,style:c,viewBox:"0 0 20 20",width:l,xmlns:"http://www.w3.org/2000/svg",children:[i&&(0,s.jsx)("title",{children:i}),o&&(0,s.jsx)("desc",{children:o}),(0,s.jsx)("path",{d:"M10 9.08L6.904 5.986a.65.65 0 1 0-.92.92L9.082 10l-3.096 3.096a.65.65 0 0 0 .92.92L10 10.918l3.096 3.096a.65.65 0 0 0 .92-.92L10.918 10l3.096-3.096a.65.65 0 1 0-.92-.92L10 9.082zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z"})]});var YH=p(78453),ZH=p.n(YH),XH=p(42997),qH=p.n(XH);const JH=kt()(ZH()({}),C1()(["first_name","last_name"]),ea()(" "),qH()),e$=({className:e,decorative:t,size:n,...o})=>{const r=zs()(["avatars","medium"],o),a=t?"":JH(o)||"Unknown User";return r?(0,s.jsx)("img",{alt:a,className:e||"user-avatar",src:r,style:{height:n,width:n}}):(0,s.jsx)(Mm,{decorative:t,height:n,title:a,width:n})},t$=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,pd=$("cover"),n$=uF,s$=e$;function Eme(){const{certificateDownload:e,riseComCurrentUser:t}=de(),n=ye(),o=cw(),a=Dh()?.quizPassed??!0;return!(o&&a&&!z1())||window.viewType==="preview"?null:(0,s.jsxs)("div",{className:pd("completed-info"),children:[(0,s.jsxs)("div",{className:pd("completed-info-avatar"),children:[(0,s.jsx)(s$,{...t??{},decorative:!0}),(0,s.jsx)("img",{alt:"",className:pd("completed-info-trophy"),src:t$})]}),(0,s.jsxs)("div",{className:pd("completed-info-label"),children:[(0,s.jsx)("span",{"aria-hidden":"true",children:n?.coverCompleted||"Completed"}),(0,s.jsx)("span",{className:"visually-hidden",children:n?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,s.jsx)(n$,{})]})}const Dm=$("cover");function o$(e,t,n){return e===1?t:n}function r$(){const e=VC(),t=ye(),n=o$(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,s.jsxs)("li",{className:Dm("num-lessons"),role:"listitem",children:[(0,s.jsx)("span",{className:Dm("num-lessons-value"),children:e}),"\xA0",(0,s.jsx)("span",{className:Dm("num-lessons-units"),children:n})]})}var a$=p(1841),hs=p.n(a$);const i$=36e5,Fm=$("cover");function c$(e){return Math.round(10*e)/10}function Hx(e,t,n){return e===1?t:n}function l$(){const{showTimeToComplete:e,timeToComplete:t}=de(),n=ye();if(!e)return null;const o=Number(t)>=i$,r=o?c$(hs().duration(t).asHours()):hs().duration(t).asMinutes(),a=o?Hx(r,n?.coverHour||"Hour",n?.coverHours||"Hours"):Hx(r,n?.coverMinute||"Minute",n?.coverMinutes||"Minutes");return(0,s.jsxs)("li",{className:Fm("time-to-complete"),role:"listitem",children:[(0,s.jsx)("span",{className:Fm("time-to-complete-value"),children:r}),"\xA0",(0,s.jsx)("span",{className:Fm("time-to-complete-units"),children:a})]})}const Hm=$("cover");function $x(){const e=ye();return null}const $m=e=>{if(!e)return"";const t=hs()(e),n=hs()(),o=hs()(n).add(24,"hours");return t.isBefore(n)?"Overdue":t.isBefore(o)?`Due in ${n.to(t,!0)}`:`Due ${t.format("MMM D")}`},d$=e=>hs()(e).isSameOrBefore(hs()().add(3,"d"),"days"),u$=$("cover");function h$(e){return typeof e=="object"&&e!=null}function m$(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function f$(e){if(!h$(e))return;const t=e.dueAt;return m$(t)?t:void 0}function Nme(){const e=vr(),t=f$(e),n=W2(e?.themeId??e?.theme?.themeId),o=$j(),r=Dh(),a=r==null||r.quizPassed||r.outOfAttempts,i=d$(t),c=n===te.RISE_CLASSIC?i?"brand--background":"brand--color":"",l=u$("due-date",{urgent:i}).mix(c);return!t||o&&a?null:(0,s.jsx)("div",{className:l,children:$m(t)})}const p$=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},jme=(e,t)=>{const n=p$(e);return t.find(({iso639Code:o})=>o===e)||t.find(({iso639Code:o})=>o===n)||t.find(({defaultId:o,defaultSet:r})=>r&&o===1)},Ta=({percent:e,label:t,isRTL:n})=>{if(t.includes("%")){const o=n?`%${e}`:`${e}%`;return t.replace("%",o)}return`${e} ${t}`},Vx=({failed:e,complete:t})=>{const n=ye();return(0,s.jsxs)("span",{className:"visually-hidden-always",children:[e?n?.a11yCoverRequirementFailed||"Requirement failed":t?n?.a11yCoverRequirementComplete||"Requirement complete":n?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},ms=$("cover");function Ame(){const e=de(),t=ye(),{trackingCompletionPercentage:n,trackingQuizId:o}=e;return n==null&&!o?null:(0,s.jsxs)("section",{className:ms("requirements-section"),children:[(0,s.jsx)("h2",{className:ms("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,s.jsxs)("ul",{className:ms("requirements-list"),children:[(0,s.jsx)(g$,{}),(0,s.jsx)(C$,{})]})]})}function g$(){const{trackingCompletionPercentage:e}=de(),t=VC(),n=ca(),o=ye();if(e==null)return null;const r=Math.ceil(e/100*t),a=r===t,i=n!=null&&n>=e,c=i?XD:qD;return(0,s.jsxs)("li",{className:ms("lesson-requirement"),role:"listitem",children:[(0,s.jsx)(c,{"aria-hidden":"true",className:ms("lesson-requirement-icon",{complete:i}).toString()}),(0,s.jsxs)("span",{className:ms("lesson-requirement-text"),children:[(0,s.jsx)(Vx,{complete:i}),a?o?.coverCompleteAllLessons||"Complete all lessons in this course":[o?.coverCompleteLessonsName||"Complete",r,o?.coverCompleteLessonsPreposition||"of",t,o?.coverCompleteLessonsInCourse||"lessons in this course"].join(" ")]})]})}const v$={passed:tF,failed:eF,requirement:nF};function C$(){const e=ye(),t=Hj(),n=Dh(),o=as(),r=lt(t?.title),a=t?.settings?.passingScore;if(!r||!n)return null;const{outOfAttempts:i,quizPassed:c}=n,l=!c&&i;let d="requirement";c?d="passed":l&&(d="failed");const h=v$[d],m=a!=null?Ta({percent:Number(a),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:o}):null;return(0,s.jsxs)("li",{className:ms("quiz-requirement"),role:"listitem",children:[(0,s.jsx)(h,{"aria-hidden":"true",className:ms("quiz-requirement-icon",{type:d}).toString()}),(0,s.jsxs)("span",{className:ms("quiz-requirement-text"),children:[(0,s.jsx)(Vx,{complete:c,failed:l}),r,a!=null&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{"aria-hidden":"true",className:ms("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,s.jsx)("div",{className:ms("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}function Vm(e,t){const n=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[o,r]=(0,u.useState)(n.matches);return(0,u.useEffect)(()=>{const a=n.addEventListener??n.addListener,i=n.removeEventListener??n.removeListener;return a.call(n,"change",c),()=>i.call(n,"change",c);function c(){r(n.matches)}},[n]),o}const x$="matches";function b$(e,t,n,o="withPxToEmMedia"){return r=>{function a(i){const c=Vm(e,t);return(0,s.jsx)(r,{...i,[n??x$]:c})}return a.displayName=`${o}(${r.displayName||r.name})`,a}}function Bt(e){return Vm("max-width",e-1)}function Rme(e){return Vm("min-width",e)}function y$(e,t,n){return b$("min-width",e,t,n)}const Ki=ts()("partner-content-course-author__"),S$=({partnerContentAuthors:e,darkText:t,isImage:n,learn:o,lesson:r,isOnePage:a,selectedContentId:i})=>{const c=Cr()(qe()("id",i),e),l=zs()(["data","authors"],c),h=(r?l:e).filter(g=>g.name),m=X()(Ki("author-container"),{[Ki("author-container-padding-top")]:t}),f=X()({[Ki("gray-text")]:!o&&!a}),v=X()(Ki("author-image")),C=g=>`url(${wi({width:"76",height:"76",imageKey:g.image})})`;return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,s.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(g=>(0,s.jsxs)("li",{className:Ki("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,s.jsx)("div",{"aria-hidden":"true",className:v,"data-testid":"partner-content-course-author-image",disabled:n,style:{backgroundImage:C(g)}}),(0,s.jsx)("span",{className:f,children:g.name})]},g.name))})]})},ka=$("cover"),Mme=()=>{const e=Nh();if(e==null)return null;const{avatar:t,authorName:n,title:o}=e;return(0,s.jsxs)("div",{className:ka("author-with-title"),children:[(0,s.jsx)(zx,{avatar:t}),(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:ka("author-name"),children:n}),(0,s.jsx)("div",{className:ka("author-title"),children:o})]})]})},zx=({avatar:e})=>{const t=ka("header-content-authors-avatar");return e?(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${gt(e)})`}}):(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,s.jsx)(Mm,{decorative:!0})})},L$=({className:e})=>{const{partnerContentId:t,selectedAuthorId:n,theme:o,themeId:r}=de(),{coverPageType:a}=o??{},{authorName:i,avatar:c}=Nh()??{},l=ye(),d=UB(),h=!!t&&d!=null,f=Bt(768)&&yj(r,a),v=a===me.LEFT_OVERLAY||a===me.CENTERED_OVERLAY||f;if(n==="none")return null;const C=i||"Unknown User",g=ka("header-content-authors").mix(e),b=ka("header-content-authors-name");return h?(0,s.jsx)("div",{className:g,"data-testid":"cover-authors",children:(0,s.jsx)(T$,{isImage:v,learn:!0,partnerContentAuthors:d})}):(0,s.jsxs)("div",{className:g,"data-testid":"cover-authors",children:[(0,s.jsx)(zx,{avatar:c}),(0,s.jsxs)("div",{className:b,"data-testid":"cover-header-content-authors-name",children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:l?.a11yAuthorPrefix}),(0,s.jsx)("span",{children:C})]})]})},T$=S$,ws=L$,k$=$("cover");function I$({className:e="",type:t,...n}){const o=ht(),r=X()(k$("details-content-heading",{type:t}).toString(),e,{"brand--ui":o===te.RISE_CLASSIC});return(0,s.jsx)("header",{...n,className:r})}const E$=$("cover");function N$({children:e,title:t,type:n}){const o=de(),{description:r,media:a,partnerContentId:i}=o??{},c=!!i,d=(a&&"image"in a?a.image?.key:null)!=null,m=n==="outline"?r?!d&&!c?"outline-no-logo":c&&!d?"outline-has-partner-content":c&&d?"outline-has-pc-and-logo":"outline":"outline-no-description":n;return(0,s.jsxs)("section",{className:E$("details-content-section",{type:m}),children:[t&&(0,s.jsx)(I$,{type:n,children:(0,s.jsx)("h2",{children:t})}),e]})}const j$=$("cover"),w$=({children:e,type:t})=>(0,s.jsx)("section",{className:j$("details-content-section",{type:t}),children:e});function gd(e){return ht()===te.HORIZON?(0,s.jsx)(N$,{...e}):(0,s.jsx)(w$,{...e})}const zm=e=>Dn(e)===ke.LIGHT;var Ome;const on=ts()("partner-content-book-info__"),_x=e=>{const{authors:t,backgroundColor:n,bookImage:o,bookTitle:r,buyLink:a,block:i,trackingInfo:c}=e,d=He()?.publishedAt,h=F2(),m=t.filter(I=>!wt()(I.name)),f=vt()(I=>I.name,m),v=f.length>1?ea()(" & ",f):f[0],C=v.slice(-1)==="s"?"":"s",g=zm(n),b=X()({[on("book-image-block")]:i&&!g},{[on("book-image-block")&&on("dark-theme-book-image")]:i&&g},{[on("book-image-course")]:!i}),x=on(i?"flex-block":"flex-course"),y=on(i?"image-container-block":"image-container-course"),L=X()(on("small-text"),{[on("dark-theme")]:g}),S=X()(on("black-text"),{[on("dark-theme")]:g}),T=X()(on("button"),{[on("dark-theme-button")]:g}),k=wi({height:"210",width:"140",imageKey:o}),E=(0,u.useCallback)(()=>{},[d,h,c]);return(0,s.jsxs)("section",{className:x,children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,s.jsx)("div",{"aria-hidden":"true",className:y,children:o?(0,s.jsx)("img",{alt:"",className:b,src:k}):(0,s.jsx)("div",{className:b})}),(0,s.jsxs)("div",{className:on("text-container"),children:[(0,s.jsxs)("p",{className:L,children:["From ",v,"'",C]}),(0,s.jsx)("p",{className:S,children:r}),(0,s.jsx)("a",{className:T,href:a,onClick:E,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var Dme;const _n=ts()("partner-content-partner-info__"),Ux=({backgroundColor:e,block:t,link:n,trackingInfo:o})=>{const a=He()?.publishedAt,i=F2(),c=t?dj():uj(),l=_n(t?"nbic-logo-light-bulb":"nbic-logo"),d=_n(t?"block-logo-container":"logo-container"),h=zm(e),m=X()(_n("small-text"),{[_n("dark-theme")]:h}),f=X()(_n("black-text"),{[_n("dark-theme")]:h}),v=X()(_n("button"),{[_n("dark-theme-button")]:h}),C=(0,u.useCallback)(()=>{},[a,i,o]);return(0,s.jsxs)("section",{className:_n("flex"),children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,s.jsx)("div",{"aria-hidden":"true",className:d,children:(0,s.jsx)("img",{alt:"",className:l,src:c})}),(0,s.jsxs)("div",{className:_n("text-container"),children:[(0,s.jsx)("p",{className:m,children:"In partnership with"}),(0,s.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,s.jsx)("a",{className:v,href:n,onClick:C,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},Ia=ts()("partner-content-author-card__"),Gx=e=>{const{partnerContent:t}=e,n=He(),{id:o,tenantId:r}=n??{},{data:a,type:i}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=a,v=c.filter(y=>y.name),C={courseId:o,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:i},g=X()(Ia("flex"),Ia("author-container")),b=y=>wi({width:"122",height:"122",imageKey:y}),x=(y,L)=>(0,s.jsx)("div",{"aria-hidden":"true",className:Ia("image-container"),children:y?(0,s.jsx)("img",{alt:L,className:Ia("author-image"),src:b(y)}):(0,s.jsx)("div",{className:Ia("author-image")})});return(0,s.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,s.jsx)("li",{role:"listitem",children:(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"Authors"}),v.map(y=>(0,s.jsxs)("li",{className:g,children:[x(y.image,y.name),(0,s.jsx)("p",{className:Ia("author-name-text"),children:y.name})]},y.name))]})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(_x,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:C})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(Ux,{link:f,trackingInfo:C})})]})},A$=$("cover");function R$({hasLogo:e}){const t=Di();if(!t)return null;const n=A$("details-content-aside",{logo:e});return(0,s.jsx)("div",{className:n,children:(0,s.jsx)(gd,{type:"partner-content",children:(0,s.jsx)(Gx,{partnerContent:t})})})}const P$=$("cover"),M$=({coursePartnerContent:e})=>(0,s.jsx)(gd,{type:"partner-content",children:(0,s.jsx)(Gx,{partnerContent:e})}),O$=({hasLogo:e})=>{const t=Di(),n=t!=null,o=P$("details-content-aside",{logo:e});return(0,s.jsxs)("div",{className:o,children:[!1,t&&(0,s.jsx)(M$,{coursePartnerContent:t}),!1,!1]})},B$=e=>ht()===te.HORIZON?(0,s.jsx)(R$,{...e}):(0,s.jsx)(O$,{...e});var D$=p(21077),Qi=p.n(D$);const Wx=Qi()(async()=>(await p.e("math").then(p.bind(p,8660))).browserAdaptor(),{promise:!0}),Kx=Qi()(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([p.e("math").then(p.t.bind(p,91036,23)),p.e("math").then(p.bind(p,15801))]);return new e({packages:t})}),Qx=Qi()(async()=>{const e=await p.e("math").then(p.t.bind(p,56260,23));return new e.SVG({fontCache:"local"})},{promise:!0}),Yx=Qi()(async()=>{const[e,t,n,{RegisterHTMLHandler:o},{mathjax:r}]=await Promise.all([Wx(),Kx(),Qx(),p.e("math").then(p.bind(p,33805)),p.e("math").then(p.bind(p,13067))]);return o(e),r.document(document,{InputJax:t,OutputJax:n})},{promise:!0}),F$=Qi()(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[n,o]=await Promise.all([Qx(),Yx()]),r=n.styleSheet(o);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{promise:!0});class H$ extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=F$(this.ownerDocument)}get longDescription(){return this.getAttribute("long-description")??null}set longDescription(t){t==null?this.removeAttribute("long-description"):this.setAttribute("long-description",t)}get shortDescription(){return this.getAttribute("short-description")??null}set shortDescription(t){t==null?this.removeAttribute("short-description"):this.setAttribute("short-description",t)}get tex(){return this.getAttribute("tex")??""}set tex(t){this.setAttribute("tex",t)}disconnectedCallback(){this._renderController?.abort()}attributeChangedCallback(t){t==="tex"?this._renderTex():this._renderAria()}async _renderTex(){this._renderController?.abort();const t=this._renderController=new AbortController,[n,o,r]=await Promise.all([Yx(),Wx(),Kx(),this._ready]);if(t.signal.aborted)return;r.reset();const{tex:a}=this,i=a.includes("begin{")?a:String.raw`\begin{align*}${a}\end{align*}`,c=n.convert(i),l=o.firstChild(c),d=document.evaluate("//@data-mjx-error",l,null,XPathResult.STRING_TYPE).stringValue;if(d.length>0){let h=d;if(d===String.raw`Missing \begin{align*} or extra \end{align*}`){const m=n.convert(a),f=o.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new $$("matherror",{bubbles:!1,composed:!1,detail:{errorMessage:h}})),this._anchor.replaceChildren()}else this._anchor.replaceChildren(l);await this._renderAria()}async _renderAria(){if(await this._ready,this._renderController?.signal.aborted||this.firstElementChild==null)return;const t=[this.shortDescription,this.longDescription].filter(n=>(n?.length??0)>0).join(`

`);this.firstElementChild.ariaLabel=t.trim().length===0?null:t}}customElements.define("rise-math",H$);class $$ extends CustomEvent{}var fs=p(63657);function _m(e){if(e==null)return{value:e};let t;if(typeof e=="string"?t=e:t=e.innerHTML,!t.includes("data-editor-id"))return{value:e};const n=t.match(/^<[^>]+data-editor-id=["']([^"']+)["'][^>]*>/);if(n){const o=n[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),a=r?r[1]:t;return{editorId:o,value:typeof e=="string"?a:e}}return{value:e}}const Zx=(e="")=>e.split(".").slice(-2).join("."),Xx=Be()(Zx,Ne),V$=e=>e.includes("#/lessons/"),Un=e=>{if(!e||z$(e)||V$(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),n=Zx(t);return n!==Xx("ARTICULATE_DOMAIN")&&n!==Xx("RISE_DOMAIN")}catch{return!1}},z$=e=>e?e.slice(0,7)==="mailto:":!1;function Yi(e,t){const n=[];if(e){let o=e.parentElement;for(;o&&(t?.limit==null||n.length<t.limit);){if(o===document.body){n.push(window);break}const r=window.getComputedStyle(o);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&n.push(o),o=o.parentElement}}return n}function qx(e){return Yi(e,{limit:1})[0]??null}var _$;function Um(){return document.getElementById("page-wrap")}const Vme=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},zme=e=>{const t=_$(["current","editor"],e);if(!t)return null;const n=t.value.length;return t.focus(),t.setSelectionRange(n,n),e};function Gm(e,t){const n=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return n.top>=0;if(t==="center"){if(n.height>o)return n.top<=0&&n.bottom>=o;const a=o/2,i=n.top+n.height/2,c=o*.25;return Math.abs(a-i)<c}return t==="end"?n.bottom<=o:n.top>=0&&n.left>=0&&n.bottom<=o&&n.right<=r}function U$(e,{behavior:t="smooth",offsetTop:n=0}={}){const o=qx(e);if(!o||!("getBoundingClientRect"in o)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-n),behavior:t})}else{const r=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top-r,i=Math.max(0,o.scrollTop+a-n);o.scrollTo({top:i,behavior:t})}}function _me(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function Wm({anchor:e,popover:t,positionX:n}){if(!e||!t)return null;const o=e.getBoundingClientRect(),a=window.getComputedStyle(e).direction==="rtl",i=window.getComputedStyle(t),c=parseFloat(i.marginTop),l=t.offsetWidth,d=window.visualViewport??{width:window.innerWidth,height:window.innerHeight},h=o.top+o.height+t.offsetHeight+c>d.height?o.top-(c*2+t.offsetHeight):o.top+o.height;let m;if(n==="center"){const f=o.left+o.width/2;m=a?d.width-f-l/2:f-l/2}else n==="right"?m=a?d.width-o.left-l:o.right-l:m=Math.min(a?d.width-o.right:o.left,d.width-l);return{left:m,top:h}}function Jx(e){const t=document.getElementById(e);try{return t?.matches(":popover-open")??!1}catch{return!1}}const Km=$("external-link-disabled-popover"),eb=12,Qm="external-link-disabled-popover--open",vd="external-link-disabled-popover-visibility-change",ps=e=>`trial-external-link-popover-${e}`;function Cd(e){return document.getElementById(ps(e))}function tb(e){const t=document.getElementById(e),n=Cd(e);if(!t||!n)return;const o=Wm({anchor:t,popover:n,positionX:"center"});if(!o)return;const r=window.visualViewport?.width??window.innerWidth,a=window.visualViewport?.height??window.innerHeight,i=Math.max(0,r-n.offsetWidth),c=Math.min(Math.max(0,o.left),i),l=window.getComputedStyle(t).direction==="rtl",d=l?-c:c,h=t.getBoundingClientRect(),m=Number.parseFloat(window.getComputedStyle(n).marginBlockStart)||0,f=h.top-(m*2+n.offsetHeight),v=h.bottom,C=h.top-m-n.offsetHeight>=0,g=h.bottom+m+n.offsetHeight<=a,b=C||!g&&h.top>=a-h.bottom,x=b?f:v,y=l?r-n.offsetWidth-c:c,L=h.left+h.width/2-y,S=l?n.offsetWidth-L:L,T=Math.min(Math.max(eb,S),n.offsetWidth-eb),k=b?"above":"below";n.dataset.placement=k,n.style.setProperty("--external-link-disabled-popover-tail-offset",`${T}px`),n.style.transform=`translate3d(${d}px, ${x}px, 0)`}function nb(e){const t=Cd(e);if(t)try{typeof t.showPopover=="function"?Jx(t.id)||t.showPopover():t.classList.add(Qm),tb(e),t.dispatchEvent(new window.Event(vd))}catch{}}function Ym(e){const t=Cd(e);if(t)try{typeof t.hidePopover=="function"?t.hidePopover():t.classList.remove(Qm),t.dispatchEvent(new window.Event(vd))}catch{}}function xd(e={}){const{delay:t=200}=e,n=u.useRef(new Map),o=u.useRef(new Map),r=u.useCallback(d=>{const h=o.current.get(d);if(h)return h;const m={focused:!1,hovered:!1};return o.current.set(d,m),m},[]),a=u.useCallback(d=>{const h=r(d);h.hovered=!0;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{nb(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),i=u.useCallback(d=>{const h=r(d);h.hovered=!1;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{!h.focused&&!h.hovered&&Ym(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),c=u.useCallback(d=>{const h=r(d);h.focused=!0;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),nb(d)},[r]),l=u.useCallback(d=>{const h=r(d);h.focused=!1;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),h.hovered||Ym(d)},[r]);return u.useEffect(()=>{const d=n.current,h=o.current;return()=>{d.forEach(m=>clearTimeout(m)),d.clear(),h.clear()}},[]),{handleMouseEnter:a,handleMouseLeave:i,handleFocus:c,handleBlur:l}}function G$(e){return t=>{const{handleMouseEnter:n,handleMouseLeave:o,handleFocus:r,handleBlur:a}=xd(),i=u.useId();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e,{...t,ariaDescribedBy:t.externalLinksDisabled?ps(i):void 0,attachmentId:i,onLinkBlur:a,onLinkFocus:r,onLinkMouseEnter:n,onLinkMouseLeave:o}),t.externalLinksDisabled&&(0,s.jsx)(bd,{anchorId:i})]})}}const bd=({anchorId:e})=>{const t=ps(e);return u.useEffect(()=>{const n=o=>{o.key==="Escape"&&Ym(e)};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e]),u.useEffect(()=>{const n=document.getElementById(e),o=Cd(e);if(!n||!o)return;const r=Yi(n);let a=null,i=null;const c=()=>{a==null&&(a=window.requestAnimationFrame(()=>{a=null,tb(e)}))},l=()=>{i?.abort(),i=null,a!=null&&(window.cancelAnimationFrame(a),a=null)},d=()=>{if(l(),o.classList.contains(Qm)||Jx(o.id)){i=new window.AbortController;const{signal:h}=i;for(const m of r)m.addEventListener("scroll",c,{passive:!0,signal:h});window.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("scroll",c,{passive:!0,signal:h})}};return o.addEventListener(vd,d),()=>{o.removeEventListener(vd,d),l()}},[e]),(0,s.jsxs)("div",{className:Km(),id:t,popover:"manual",role:"tooltip",children:[(0,s.jsx)("div",{className:Km("header"),children:"Subscribe to unlock full access"}),(0,s.jsx)("div",{className:Km("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})]})},W$=({allowTabNavigation:e=!0,className:t="","data-testid":n,id:o,ref:r,tagName:a="div",value:i})=>{const c=He(),l=c&&"externalLinksDisabled"in c?c.externalLinksDisabled:!1,d=It(),h=(0,u.useRef)(null),m=u.useId().replaceAll(":",""),f=Me(i),[v,C]=(0,u.useState)([]),{handleMouseEnter:g,handleMouseLeave:b,handleFocus:x,handleBlur:y}=xd(),{currentLocale:L}=tt(),S=Fn(),T=(0,u.useMemo)(()=>{const k=u0(f),E=Array.prototype.concat(tV,nV,Z$,Q$,Y$(L,S),l?X$(m):[],e?J$:q$,eV(d?.a11yNoticeLinkNewTab));return K$(E,k)},[e,L,S,m,l,d,f]);return(0,u.useLayoutEffect)(()=>{if(!l||!h.current){C([]);return}const k=[];h.current.querySelectorAll("[data-tooltip-target]").forEach((I,j)=>{const P=I.nextElementSibling;if(P?.hasAttribute("data-external")){const N=P.getAttribute("data-external-text")||"",R=P.getAttribute("data-external-id")||`link-${j}`;k.push({placeholder:I,text:N,id:R})}}),C(k)},[T,l]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":At(i),"data-testid":n,id:o,ref:k=>{h.current=k,typeof r=="function"?r(k):r&&(r.current=k)},children:(0,u.createElement)(a,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:T}),[T])})}),v.map(({placeholder:k,text:E,id:I})=>(0,s.jsxs)(u.Fragment,{children:[(0,fs.createPortal)((0,s.jsx)("span",{"aria-describedby":ps(I),className:"external-link-disabled-popover__anchor",id:I,onBlur:()=>y(I),onFocus:()=>x(I),onMouseEnter:()=>g(I),onMouseLeave:()=>b(I),role:"button",tabIndex:0,children:E}),k),(0,s.jsx)(bd,{anchorId:I})]},I))]})};function K$(e,t){const n=document.createElement("div");n.innerHTML=t;for(const o of e)o(n);return n.innerHTML}const sb=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function Q$(e){for(const t of e.querySelectorAll("a")){sb(t)?t.removeAttribute("target"):t.setAttribute("target","_blank");const o=new Set((t.getAttribute("rel")??"").split(/\s+/));o.delete("opener"),o.add("noopener"),o.add("noreferrer"),o.add("nofollow"),t.setAttribute("rel",Array.from(o).join(" "))}}function Y$(e,t){return n=>{if(!(!e||e===t)){for(const o of n.querySelectorAll("a"))if(sb(o)){const r=o.getAttribute("href");if(r){const a=r.includes("?")?"&":"?";o.setAttribute("href",`${r}${a}locale=${encodeURIComponent(e)}`)}}}}}function Z$(e){for(const t of e.querySelectorAll("table"))if(!t.parentElement.classList.contains("rise-table-wrap")){const n=document.createElement("div");n.className="rise-table-wrap",t.parentNode.replaceChild(n,t),n.appendChild(t)}}function X$(e){return t=>{let n=0;const o=[];for(const r of t.querySelectorAll("a"))if(Un(r.href)){const a=r.textContent||"",i=`external-link-anchor-${e}-${n++}`;r.removeAttribute("href"),r.removeAttribute("rel"),r.removeAttribute("target"),r.setAttribute("data-external",""),r.setAttribute("data-external-text",a),r.setAttribute("data-external-id",i),r.setAttribute("role","button"),r.style.display="none";const c=document.createElement("span");c.setAttribute("data-tooltip-target",""),r.parentNode?.insertBefore(c,r),o.push({placeholder:c,text:a,id:i})}return o}}function q$(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function J$(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function eV(e="(opens in a new tab)"){return t=>{for(const n of t.querySelectorAll('a[target="_blank"]')){const o=document.createElement("span");o.className="visually-hidden-always",o.textContent=e,n.appendChild(o)}}}function tV(e){return _m(e).value}function nV(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:n,longDescription:o}=t,r=t.querySelector('[slot="short-description"]'),a=t.querySelector('[slot="long-description"]');n==null&&r!=null&&(t.shortDescription=r.textContent),o==null&&a!=null&&(t.longDescription=a.textContent)}return e}const we=W$,Zm=e=>e==="<p><br></p>"?"":e,sV=()=>Bt(1200),ob=()=>Bt(480),oV=$("cover"),rV="MMMM D, YYYY";function rb({format:e=rV}){const{publishedAt:t}=de(),n=ye(),o=oV("details-content-published-at");if(!t)return null;const r=hs()(t);return r.isValid()?(0,s.jsxs)("div",{className:o,children:[n?.coverPublished||"Published"," ",r.format(e)]}):null}const yd=e=>e==null?{}:{locale:e},aV=e=>{switch(e.kind){case"artifactField":return{kind:e.kind,artifact:e.artifact,field:e.field,...yd(e.locale)};case"lessonField":return{kind:e.kind,artifact:e.artifact,lesson:e.lesson,field:e.field,...yd(e.locale)};case"block":return{kind:e.kind,artifact:e.artifact,block:e.block,...yd(e.locale)};case"question":return{kind:e.kind,artifact:e.artifact,lesson:e.lesson,question:e.question,...yd(e.locale)}}};var iV;const cV=$("comment-preview-anchor"),lV=$("comment-preview-target"),Xm=(0,u.createContext)(null);function Ume({children:e,...t}){return iV(Xm,{value:t,children:e})}function As({anchor:e,children:t,label:n,positioning:o="anchor"}){const r=(0,u.useContext)(Xm);if(r==null)return t??null;const a=lV({inset:e.kind==="block"||e.kind==="artifactField"&&e.field==="title"}),i=(0,s.jsx)("span",{className:a,children:(0,s.jsx)(r.CommentBubble,{label:n,tags:aV(uV(e,r))})}),c=cV({page:o==="page"});return t==null?i:(0,s.jsxs)("div",{className:c,children:[t,i]})}function dV(){return(0,u.useContext)(Xm)!=null}function uV(e,{courseId:t,locale:n}){switch(e.kind){case"artifactField":return{...e,artifact:t,locale:n};case"lessonField":return{...e,artifact:t,locale:n};case"block":return{...e,artifact:t,locale:n};case"question":return{...e,artifact:t,locale:n}}}const ab=$("cover");function hV(){const e=de(),t=sV(),n=Me(e?.description);if(!n)return null;const o=Ca("description"),r=(0,Qt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,s.jsx)("div",{...r,children:(0,s.jsxs)("section",{className:ab("details-content-section"),children:[t?(0,s.jsx)($x,{}):(0,s.jsx)(rb,{}),(0,s.jsx)(As,{anchor:{field:"description",kind:"artifactField"},label:"Comments on course description",children:(0,s.jsx)(we,{className:ab("details-content-description"),value:Zm(n)},"text")})]})})}const mV=()=>Bt(1200),Sd=()=>Bt(480),ib=$("cover");function fV(){const e=de(),t=mV(),n=Me(e?.description);if(!n)return null;const o=Ca("description"),r=(0,Qt.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,s.jsx)("div",{...r,children:(0,s.jsxs)("section",{className:ib("details-content-section"),children:[t&&(0,s.jsx)($x,{}),(0,s.jsx)(As,{anchor:{field:"description",kind:"artifactField"},label:"Comments on course description",children:(0,s.jsx)(we,{className:ib("details-content-description"),value:Zm(n)},"text")})]})})}const pV=$("cover"),gV=()=>{const e=de(),{navigation:t}=e,n=Me(e.description),o=t?"description":"description-no-outline";if(!n)return null;const r=Ca("description"),a=(0,Qt.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,s.jsx)(As,{anchor:{field:"description",kind:"artifactField"},label:"Comments on course description",children:(0,s.jsx)("div",{...a,children:(0,s.jsx)(gd,{type:o,children:(0,s.jsx)(we,{className:pV("details-content-description"),value:String(Zm(n))},"text")})})})},vV={[te.RISE_CLASSIC]:hV,[te.HORIZON]:gV,[te.APEX]:fV};function cb(){const e=ht(),t=vV[e];return(0,s.jsx)(t,{})}const lb=$("cover"),qm=({className:e=lb("details-logo"),imageClassName:t=lb("details-logo-image")})=>{const n=de()??{},o=Me(n.media)?.image??{},{height:r,key:a,width:i,scalar:c=w0.SMALL.value}=o,l={width:Number(i)*c,height:Number(r)*c};if(!a)return null;const d=dt(o);return(0,s.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,s.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:l.height,src:d,width:l.width})})};function CV({icon:e,...t}){switch(e){case On.ARTICLE:return(0,s.jsx)(mF,{...t});case On.INTERACTION:return(0,s.jsx)(DH,{...t});case On.QUIZ:return(0,s.jsx)(RH,{...t});case On.VIDEO:return(0,s.jsx)(WH,{...t});default:return(0,s.jsx)("i",{className:"icon icon-Master-02"})}}var kr=p(90313);function xV(e){const{to:t,children:n}=e,o=(0,Re.zy)(),r=(0,u.useMemo)(()=>L0(t,o),[o,t]);return(0,s.jsx)(Re.k2,{...e,to:r,children:n})}var rt=p(30433);function bV(e){return e instanceof CustomEvent}function db(e){document.dispatchEvent(new CustomEvent(nx,{detail:{lessonId:e}}))}function yV(e){(0,rt.A)(nx,t=>{bV(t)&&e(t)},document)}const ub=(0,u.createContext)(!1);function Ld({children:e,inert:t}){const n=Jm();return(0,s.jsx)(ub.Provider,{value:n||t,children:e})}function Jm(){return(0,u.useContext)(ub)}function hb(e,t){(0,u.useLayoutEffect)(()=>{let n=e.current;const o=Yi(n);for(const r of o)r?.addEventListener("scroll",t);return()=>{for(const r of o)r?.removeEventListener("scroll",t)}},[t,e])}function SV(e){return e?.sessionPreferences}function Zi(){return pe(SV)}const LV=({children:e,className:t="lesson-link-item-tooltip",dark:n,ref:o,visible:r})=>{const a=(0,u.useMemo)(()=>$(t),[t]),i=(0,s.jsx)("div",{"aria-hidden":"true",ref:o,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,s.jsx)("div",{style:{pointerEvents:"all"},children:(0,s.jsx)("div",{className:a({visible:r}),children:(0,s.jsx)("div",{className:a("inner",{dark:n,light:!n}),children:e})})})});return(0,fs.createPortal)(i,Zs())};function TV({labels:e,restriction:t,restrictionData:n}){if(t?.type===pr.QUIZ)return`${e?.quizRequirePassingScore}: "${n}"`;if(t?.type===pr.ORDER)return e?.lessonRestricted;if(t?.type===pr.KNOWLEDGE_CHECK)return e?.knowledgeCheckCorrectAnswerRequiredNav}function mb(e){const{children:t,className:n,dark:o,restriction:r,tooltipClassName:a,style:i}=e,{prefersKeyboardNavigation:c}=Zi()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=ye(),v=Jm(),[C,g]=(0,u.useState)(!1),b=(0,u.useCallback)(()=>g(!0),[]),x=(0,u.useCallback)(()=>g(!1),[]),y=(0,u.useCallback)(()=>{h.current!=null&&(clearTimeout(h.current),h.current=null),m.current!=null&&(clearTimeout(m.current),m.current=null)},[]),L=(0,u.useCallback)(()=>{h.current=setTimeout(b,0)},[b]),S=(0,u.useCallback)(()=>{y(),c===!0&&x()},[y,x,c]),T=(0,u.useCallback)(N=>{N instanceof KeyboardEvent&&xn(N)&&C&&(N.stopPropagation(),x())},[x,C]),k=(0,u.useCallback)(()=>{document.activeElement===l.current&&(m.current!=null&&(clearTimeout(m.current),m.current=null),b())},[b]),E=(0,u.useCallback)(()=>{m.current=setTimeout(x,150)},[x]),I=(0,u.useCallback)(()=>{if(C&&l.current&&d.current){const N=l.current.getBoundingClientRect(),R=d.current.offsetParent?.getBoundingClientRect()??N,{height:w,width:A}=N,M=N.left-R.left,O=N.top-R.top;Object.assign(d.current.style,{transform:`translate(${M}px, ${O}px)`,width:`${A}px`,height:`${w}px`})}},[C]);(0,u.useEffect)(()=>{v&&g(!1)},[v]),(0,u.useEffect)(()=>y,[y]),(0,u.useLayoutEffect)(()=>I(),[I]),(0,rt.A)("resize",I,window),(0,rt.A)("keydown",T,document),hb(l,x);const j=lt(r!=null&&r.type===pr.QUIZ?r.data:void 0),P=TV({labels:f,restriction:r,restrictionData:j});return(0,s.jsxs)("div",{"aria-disabled":!0,className:n,onBlur:S,onFocus:L,onMouseEnter:k,onMouseLeave:E,ref:l,role:"link",style:i,tabIndex:v?-1:0,children:[t,(0,s.jsx)("div",{className:"visually-hidden-always",children:f?.a11yRestrictedNav}),(0,s.jsx)("div",{className:"visually-hidden-always",children:P}),(0,s.jsx)(LV,{className:a,dark:o,ref:d,visible:C,children:P})]})}function kV(e){const{b:t,children:n,"data-direction":o,dark:r,isCurrentLesson:a,isTooltipEnabled:i,lessonId:c,onClick:l=()=>{},onBlur:d,onFocus:h,onHideProgressTooltip:m,onNavigate:f=()=>{},onShowProgressTooltip:v,restriction:C,showProgressDelay:g,style:b,tooltipClassName:x}=e,y=Jm(),T=(de()?.theme?.progressIndicatorStyle??et.THEME_DEFAULT)===et.THEME_DEFAULT,k=(0,u.useRef)(null),E=(0,u.useCallback)(D=>{l(D),a?(D.preventDefault(),db(c)):f(c)},[c,a,l,f]),[I,j]=(0,u.useState)(!1),P=(0,u.useCallback)(()=>{k.current!=null&&(clearTimeout(k.current),k.current=null)},[]),N=(0,u.useCallback)(D=>{!I&&i&&(g!=null?k.current=setTimeout(()=>{v?.()},g):v?.()),h?.(D)},[I,h,g,v,i]),R=(0,u.useCallback)(D=>{P(),i&&m?.(),d?.(D)},[P,i,d,m]),w=(0,u.useCallback)(D=>{i&&xn(D)&&m?.()},[m,i]),A=(0,u.useCallback)(()=>{i===!0&&j(!0)},[i]),M=(0,u.useCallback)(()=>{i===!0&&j(!1)},[i]);(0,u.useEffect)(()=>{if(!I)return;const D=()=>{j(!1)};return document.addEventListener("mouseup",D),()=>{document.removeEventListener("mouseup",D)}},[I]),(0,u.useEffect)(()=>P,[P]);const O=C?.type!=null,B=t("link",{active:a,restricted:O,"theme-default":T}).toString();return O?(0,s.jsx)(mb,{className:B,dark:r,restriction:C,style:b,tooltipClassName:x,children:n}):(0,s.jsx)(xV,{"aria-current":a?"page":void 0,className:B.toString(),"data-direction":o,"data-nav-item":"",onBlur:R,onClick:E,onFocus:N,onKeyDown:w,onMouseDown:A,onMouseUp:M,style:b,tabIndex:y?-1:void 0,to:gn(c),children:n})}function Xi(e){const{className:t="lesson-link-item",isCurrentLesson:n,last:o,lessonId:r,style:a}=e,i=(0,u.useMemo)(()=>$(t),[t]),c=Pi(String(r)),l=c?.type!=null,{isComplete:d=!1}=wo(r)??{},h=i({active:n,complete:d,last:o,restricted:l});return(0,s.jsx)("div",{className:h,children:(0,s.jsx)(kV,{...e,b:i,isCurrentLesson:n,restriction:c,style:a})})}function IV({className:e,cx:t,cy:n,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,Zg.A)()}`,m=(100-l)/100*(2*a);return(0,rt.A)("transitionend",r,d.current),(0,s.jsxs)("svg",{height:o,viewBox:`0 0 ${o} ${o}`,width:o,children:[(0,s.jsx)("defs",{children:(0,s.jsx)("mask",{id:h,children:(0,s.jsx)("rect",{fill:"white",height:2.3*a,width:2.3*a,x:"0",y:l===0?100:m})})}),(0,s.jsx)("circle",{className:e,cx:t,cy:n,fill:"none",mask:`url(#${h})`,r:a,ref:d,strokeLinecap:i,strokeWidth:c})]})}const ef=IV;function EV({className:e,cx:t,cy:n,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,transform:l,value:d=0}){const h=(0,u.useRef)(null),m=Math.PI*(Number(o)-Number(c)),f=m*(100-d)/100;return(0,rt.A)("transitionend",r,h.current),(0,s.jsx)("circle",{className:e,cx:t,cy:n,fill:"transparent",r:a,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:i,strokeWidth:c,transform:l})}const fb=EV;var tf=p(49860);const{COMPACT:NV,COVER:jV,OVERLAY:wV,SIDEBAR:AV}=yo,qi=$("progress-circle");function RV({"aria-hidden":e,"aria-label":t,isCurrent:n,isFailed:o,isPassed:r,scope:a,value:i}){const[c,l]=tf.useState(i===100),d=(0,De.A)(i),{theme:h}=de()??{},m=h?.progressIndicatorStyle??et.THEME_DEFAULT,f=a===jV,v=a===wV,C=m===et.THEME_DEFAULT,g=m===et.CIRCULAR_FILL,b=m===et.INCOMPLETE_COMPLETE,x=qi({compact:a===NV,cover:f,current:n,sidebar:a===AV,overlay:v}),y=qi("track",{"circular-fill":!v&&g,"incomplete-complete":f&&b}),L=qi("runner",{"circular-fill":g,done:c,failed:o,passed:r,unstarted:i===0}),S=qi("pass",{done:c,visible:r}),T=qi("fail",{done:c,visible:o}),k=tf.useMemo(()=>g||i===100?i:0,[g,i]);return tf.useEffect(()=>{if(i!==100&&d===100)l(!1);else if(i===100&&!c&&!b){const E=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,E)}else i===100&&!c&&b&&l(!0)},[c,b,d,i]),(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:x,fill:"none",focusable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:y,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),C?(0,s.jsx)(fb,{className:L,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:i}):(0,s.jsx)(ef,{className:L,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,s.jsx)("path",{className:S,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,s.jsx)("path",{className:T,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})}var nf=p(49860);const{COMPACT:PV,COVER:MV,OVERLAY:OV,SIDEBAR:BV}=yo,Ea=$("progress-circle");function DV({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:o,scope:r,value:a}){const[i,c]=nf.useState(a===100),l=(0,De.A)(a),{theme:d}=de()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===MV,f=r===OV,v=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,b=Ea("default",{failed:n,passed:o}),x=Ea({compact:r===PV,cover:m,overlay:f,sidebar:r===BV}),y=Ea("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),L=Ea("fill",{"circular-fill":C,done:i,failed:n,passed:o,unstarted:a===0}),S=Ea("pass",{done:i,visible:o}),T=Ea("fail",{done:i,visible:n}),k=nf.useMemo(()=>C||a===100?a:0,[C,a]);return nf.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const E=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,E)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]),(0,s.jsx)(s.Fragment,{children:v?(0,s.jsx)("svg",{"aria-hidden":e,"aria-label":t,className:b,focusable:"false",viewBox:"0 0 7 7",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:x,fill:"none",focusable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:y,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,s.jsx)(ef,{className:L,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:k}),(0,s.jsx)("path",{className:S,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,s.jsx)("path",{className:T,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})})}var Td=p(49860);const{COMPACT:FV,COVER:HV,OVERLAY:$V,SIDEBAR:VV}=yo,Ji=$("progress-circle");function zV({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:o,scope:r,value:a}){const[i,c]=Td.useState(a===100),l=(0,De.A)(a),{theme:d}=de()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===HV,f=r===$V,v=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,b=Ji({compact:r===FV,cover:m,sidebar:r===VV,overlay:f}),x=Ji("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),y=Ji("runner",{"circular-fill":C,done:i,failed:n,passed:o,unstarted:a===0}),L=Ji("pass",{done:i,visible:o}),S=Ji("fail",{done:i,visible:n}),T=Td.useMemo(()=>C||a===100?a:0,[C,a]);Td.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const E=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,E)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]);const k=Td.useCallback(()=>{a===100&&c(!0)},[a]);return(0,s.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:[(0,s.jsx)("circle",{className:x,cx:"7.5",cy:"7.5",fill:"transparent",r:"6.5",strokeWidth:"2",transform:"rotate(-89.9 7.5 7.5)"}),v?(0,s.jsx)(fb,{className:y,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeWidth:2,transform:"rotate(-89.9 7.5 7.5)",value:a}):(0,s.jsx)(ef,{className:y,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:k,r:6.5,strokeLinecap:"round",strokeWidth:2,value:T}),(0,s.jsx)("path",{className:L,d:"M11.3227 6.65905C11.6133 6.37599 11.6347 5.89413 11.3705 5.58277C11.1063 5.27141 10.6566 5.24847 10.366 5.53152L6.93323 8.87512L5.6338 7.60944C5.3432 7.32639 4.89345 7.34933 4.62927 7.66069C4.36509 7.97205 4.38651 8.45391 4.67711 8.73697L6.45488 10.4686C6.72611 10.7328 7.14034 10.7328 7.41157 10.4686L11.3227 6.65905Z"}),(0,s.jsx)("path",{className:S,clipRule:"evenodd",d:"M7.5 8.56157L8.84426 9.90564L9.90503 8.84473L8.56078 7.50066L9.90543 6.15582L8.84452 5.09504L7.49986 6.43988L6.15452 5.09473L5.09375 6.15564L6.43909 7.5008L5.09452 8.84555L6.15543 9.90632L7.5 8.56157Z",fillRule:"evenodd"})]})}const _V={[te.RISE_CLASSIC]:RV,[te.HORIZON]:DV,[te.APEX]:zV};function pb(e){const t=ht(),n=_V[t];return(0,s.jsx)(n,{...e})}var UV=p(79729),kd=p.n(UV);const gb=e=>t=>(e(t),t.preventDefault()),Bo=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},gs=e=>t=>{e(t),t.preventDefault(),Bo(t)},Id=$("lesson-progress"),{COMPACT:sf,COVER:ec,OVERLAY:of,SIDEBAR:tc}=yo;function GV({canComplete:e,color:t,hasRestriction:n,isComplete:o,isCurrentLesson:r,isDark:a,isEnabled:i,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:v=mn,onMarkReset:C=mn,onShowTooltip:g,percentComplete:b,progressGraphic:x,scope:y,labels:L}){const S=(0,u.useRef)(),T=(0,u.useRef)(),k=(0,u.useRef)(),E=(0,u.useRef)(),{theme:{progressIndicatorStyle:I=et.THEME_DEFAULT}}=He(),j=I===et.THEME_DEFAULT,P=Id({compact:y===sf,cover:y===ec&&!l,"legacy-cover":y===ec&&l,inactive:n,overlay:y===of,sidebar:y===tc&&!l,"legacy-sidebar":y===tc&&l,"theme-default":j}),N=Id("graphic",{compact:y===sf,cover:y===ec&&!l,"legacy-cover":y===ec&&l,overlay:y===of,sidebar:y===tc&&!l,"legacy-sidebar":y===tc&&l}),R=Id("tooltip",{legacy:l}).toString(),w=(0,u.useCallback)(()=>{o?C?.():v?.()},[o,v,C]),A=(0,u.useCallback)(H=>{kd()(f)&&xn(H)&&h&&f()},[f,h]),M=(0,u.useCallback)(()=>{clearTimeout(k.current),!n&&kd()(g)&&(T.current=setTimeout(g,600))},[n,g]),O=(0,u.useCallback)(()=>{clearTimeout(T.current),kd()(f)&&(k.current=setTimeout(f,150))},[f]),B=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const H=S.current.getBoundingClientRect(),V=E.current.offsetParent.getBoundingClientRect(),{height:G,width:_}=H,Y=H.left-V.left,se=H.top-V.top;Object.assign(E.current.style,{transform:`translate(${Y}px, ${se}px)`,width:`${_}px`,height:`${G}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>B(),[B]),(0,rt.A)("resize",B,window),(0,rt.A)("keydown",A,document),hb(S,O),e){const V=WV({labels:L,percentComplete:b,canReset:!0}),G=!i||!1,_=Id("action",{disabled:G});return(0,s.jsx)("span",{className:P,"data-testid":"lesson-progress",children:(0,s.jsx)("button",{"aria-label":V,className:_,disabled:G,onBlur:f,onClick:w,onFocus:g,type:"button",children:(0,s.jsxs)("span",{className:N,onMouseEnter:M,onMouseLeave:O,ref:S,children:[(0,s.jsx)(x,{"aria-hidden":"true",color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:y,value:b}),i&&!n&&(0,s.jsx)(vb,{className:R,dark:a,ref:E,scope:y,visible:h,children:V})]})})})}const D=KV({labels:L,isFailed:c,percentComplete:b});return(0,s.jsx)("span",{className:P,"data-testid":"lesson-progress",children:(0,s.jsxs)("span",{className:N,onMouseEnter:M,onMouseLeave:O,ref:S,children:[(0,s.jsx)(x,{"aria-label":D,color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:y,value:b}),i&&!n&&(0,s.jsx)(vb,{className:R,dark:a,ref:E,scope:y,visible:h,children:D})]})})}const vb=(0,u.forwardRef)((e,t)=>{const{children:n,className:o,dark:r,scope:a,visible:i}=e,c=(0,u.useMemo)(()=>$(o),[o]),l=c({compact:a===sf,cover:a===ec,overlay:a===of,sidebar:a===tc,visible:i}),d=c("inner",{dark:r,light:!r}),h=(0,s.jsx)("div",{"aria-hidden":"true",onClick:Bo,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,s.jsx)("div",{style:{pointerEvents:"all"},children:(0,s.jsx)("div",{className:l,children:(0,s.jsx)("div",{className:d,children:n})})})});return(0,fs.createPortal)(h,Zs())});function WV({labels:e,canReset:t,percentComplete:n}){const o=n===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieClickToComplete:i,progressPieClickToReset:c}=e;return o&&t?`${r}. ${c}`:n===100&&!t?r:n===0?`${a}. ${i}`:`${n}% ${r}. ${i}`}function KV({labels:e,isFailed:t,percentComplete:n}){const o=n===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieQuizFailed:i}=e;return t?i:o?r:n===0?a:`${n}% ${r}`}const Cb=u.memo(GV);function Ed({canComplete:e,id:t,isDark:n,isEnabled:o,isTooltipVisible:r,onHideTooltip:a,onShowTooltip:i,scope:c}){const l=ot(),{color:d,navigationStyle:h}=de(),m=wo(t),f=Qs(),v=r2(String(t)),C=a2(String(t)),g=Pi(String(t)),b=ye(),x=g?.type!=null,y=m?.isComplete,L=String(t)===f,S=m?.percentComplete??0,T=(0,u.useCallback)(()=>{l(ml(t))},[l,t]),k=(0,u.useCallback)(()=>{l(NE(t))},[l,t]);return(0,s.jsx)(Cb,{canComplete:e,color:d,hasRestriction:x,isComplete:y,isCurrentLesson:L,isDark:n,isEnabled:o,isFailed:v,isPassed:C,isTooltipVisible:r,labels:b,navigationStyle:h,onHideTooltip:a,onMarkComplete:T,onMarkReset:k,onShowTooltip:i,percentComplete:S,progressGraphic:pb,scope:c})}function QV({color:e,hasRestriction:t,isComplete:n,isCurrentLesson:o,isFailed:r,isPassed:a,isTooltipVisible:i,lessonTitle:c,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:v,labels:C}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"overview-list-item__progress",children:C&&(0,s.jsx)(Cb,{canComplete:!1,color:e,hasRestriction:t,isComplete:n,isCurrentLesson:o,isDark:!1,isEnabled:!0,isFailed:r,isPassed:a,isTooltipVisible:i,labels:C,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:v})}),(0,s.jsx)("span",{className:"overview-list-item__title",children:c})]})}const YV=matchMedia("(prefers-reduced-motion: reduce)");function rn(){return YV.matches}function xb(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("selector(html:active-view-transition-type(a))")}function bb(){return!(typeof document>"u"||!("startViewTransition"in document)||Ys.isFirefox&&!xb())}function ZV(e,t){if(!bb()||rn()){const n=e();return Promise.resolve(n)}return new Promise(n=>{try{const o=async()=>{await e()};(t!=null&&xb()?document.startViewTransition({update:o,types:[t]}):document.startViewTransition(o)).finished.then(()=>n()).catch(()=>n())}catch{const o=e();Promise.resolve(o).then(()=>n()).catch(()=>n())}})}const XV=3e3;function qV(){let e=0,t=0,n=null;const o=a=>{n==null||n.generation!==a||(clearTimeout(n.timeoutId),document.documentElement.classList.remove(`transition-${n.transitionType}`),n=null,t=0)};function r(a,i="default"){if(!bb()||rn())return n!=null&&o(n.generation),a(),Promise.resolve();n!=null&&o(n.generation);const l=++e;t=l;const d=setTimeout(()=>{o(l)},XV);return n={generation:l,transitionType:i,timeoutId:d},ZV(()=>{t===l&&document.documentElement.classList.add(`transition-${i}`),(0,fs.flushSync)(()=>{a()})},i).finally(()=>{t===l&&o(l)})}return{navigate:r,reset(){n!=null&&o(n.generation),e+=1,t=0},get isTransitioning(){return n!=null}}}const qs=qV().navigate,JV=$("overview-list-item");function ez({className:e,id:t,last:n}){const o=Jt(),r=ht(),a=Qs(),{color:i,navigationStyle:c}=de(),{icon:l,title:d}=Rt(t)??{},h=lt(d),m=wo(t),f=r2(t),v=a2(t),C=Pi(t),g=ye(),b=(0,Qt.uW)(d)?{"data-l10n-id":d.l10nId}:{"data-change-path":hx(t,"title")},x=m?.isComplete,y=m?.percentComplete??0,L=C?.type!=null,[S,T]=(0,u.useState)(!1),k=r===te.HORIZON?QV:tz,E=(0,u.useCallback)(()=>T(!0),[]),I=(0,u.useCallback)(()=>T(!1),[]);(0,u.useEffect)(()=>()=>{kr.Ay.Events.scrollEvent.remove("end")},[]);const j=n?"overview-list__li overview-list__li--last":"overview-list__li",P=X()(e,"overview-list-item"),N=(0,u.useCallback)(R=>{const{currentTarget:{hash:w}}=R;R.preventDefault(),kr.Ay.Events.scrollEvent.remove("end"),kr.Ay.Events.scrollEvent.register("end",()=>{qs(()=>{o(w.slice(1))},"cover-to-lesson"),kr.Ay.Events.scrollEvent.remove("end")}),kr.Ay.animateScroll.scrollTo(0,{containerId:"cover"})},[o]);return(0,s.jsx)("li",{...b,className:j,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,s.jsx)(Xi,{className:P,isTooltipEnabled:!0,lessonId:t,onBlur:I,onClick:N,onHideProgressTooltip:I,onShowProgressTooltip:E,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,s.jsx)(k,{color:i,hasRestriction:L,isComplete:x,isCurrentLesson:t===a,isFailed:f,isPassed:v,isTooltipVisible:S,labels:g,lessonIcon:l,lessonId:t,lessonTitle:h,navigationStyle:c,onHideTooltip:I,onShowTooltip:E,percentComplete:y,progressGraphic:pb,scope:yo.COVER})})})}function tz({isTooltipVisible:e,lessonIcon:t,lessonId:n,lessonTitle:o,onHideTooltip:r,onShowTooltip:a,scope:i}){const c=JV("progress-circle");return(0,s.jsxs)("div",{className:c,children:[(0,s.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,s.jsx)(CV,{icon:t??void 0})}),(0,s.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${n}`,children:o}),(0,s.jsx)(Ed,{canComplete:!1,id:n,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:a,scope:i})]})}const nz=$("overview-list"),sz=e=>e.reduce((t,n)=>(n.type==="section"?t.push([n]):t[t.length-1]?t[t.length-1].push(n):t.push([n]),t),[]),oz=({className:e="",...t})=>{const n=ht(),o=X()(e,"overview-list__section-title",{"brand--ui":n===te.RISE_CLASSIC});return(0,s.jsx)("h2",{...t,className:o})},rz=()=>{const e=fw(),t=ye(),n=sz(e);return(0,s.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:n.map((o,r)=>{const[a,...i]=o;if(!a)return null;const{title:c,type:l}=a,d=l==="section",h=d?i:o,m=nz("list",{sectionless:!d});return(0,s.jsxs)("section",{children:[d&&c&&(0,s.jsx)(oz,{children:(0,s.jsx)(Cn,{value:c})}),(0,s.jsx)("ol",{className:m,role:"list",children:h.map((f,v)=>(0,s.jsx)(ez,{id:f.id,last:h.length>1&&v===h.length-1},f.id))})]},r)})})},az=(0,u.memo)(rz),iz={[te.RISE_CLASSIC]:{SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"},[te.HORIZON]:{SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"},[te.APEX]:{SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"}};function cz({coverPageType:e="CENTERED",isTablet:t,themeId:n}){return t?iz[n][e]??e:e}function nc(){const e=de(),t=ht(),n=Bt(768);return cz({coverPageType:e.theme?.coverPageType??void 0,isTablet:n,themeId:t})}const lz=e=>Object.values(w0).find(t=>t.value==e);function dz(e){return(0,u.useMemo)(()=>lz(e)??w0.SMALL,[e])?.label.toLowerCase()}const Na=$("cover");function yb(e){return typeof e=="object"&&e!=null}function uz(e){return yb(e)}function hz(e){if(yb(e))return uz(e.image)?e.image:void 0}function mz(){const e=Bt(1200),t=ht(),n=nc(),o=t===te.APEX&&(n==="SPLIT_RIGHT"||n==="SPLIT_RIGHT_IMAGE"),{description:r,media:a,navigation:i,partnerContentId:c,publishedAt:l}=de(),h=!!Di(),m=hz(lt(a)),f=m!=null&&Object.keys(m).length>0,v=!!i,C=!r||!v,g=!r&&!v,b=!!h,x=Na("details",{"rise-com":!1,"rise-com-authoring":!1}),y=Na("details-content-wrap",{columns:b,logo:f}),L=Na("details-content",{"no-description-or-outline":C}),S=Na("details-logo",{centered:g,"no-description-or-outline":C,"has-partner-content":!!c}),T=b&&(0,s.jsx)(B$,{hasLogo:f}),k=dz(m?.scalar),E=Na("details-logo-image",{[k]:!0}),I=Na("details-description-outline");return(0,s.jsx)("section",{className:x,"data-testid":"cover-details",children:(0,s.jsxs)("div",{className:y,children:[!e&&o&&T,(0,s.jsxs)("div",{className:L,children:[(0,s.jsx)(qm,{className:S,imageClassName:E}),(0,s.jsxs)("div",{className:I,children:[r&&(0,s.jsx)(cb,{}),e&&T,v&&(0,s.jsx)(gd,{type:"outline",children:(0,s.jsx)(az,{})})]})]}),!e&&!o&&T]})})}const fz=(0,u.forwardRef)(function({children:t,disabled:n,onClick:o,to:r,...a},i){return n?(0,s.jsx)("a",{"aria-disabled":"true",ref:i,role:"link",...a,children:t}):(0,s.jsx)(sn,{onClick:o,ref:i,to:r,...a,children:t})}),Sb=$("cover"),an=()=>{const e=de(),{trackingQuizId:t,theme:n}=e,o=Jt(),r=window.viewType==="preview",a=$C(),i=Qj(),c=ca(),l=a?.id,d=n?.showStartButton??!0,h=jS()?c===100:NS(),f=i!=null?i:l,v=!r&&!1,{courseCTALabel:C}=Sw({isCourseComplete:h===!0,percentCourseComplete:c??0});if(!d||!C||f==null)return null;const g=["cover__header-content-action-link","overview__button-enrolled",v?"overview__start-again":void 0].filter(Boolean).join(" "),b=gn(f),x=y=>{y.preventDefault(),qs(()=>{o(b)},"cover-to-lesson")};return(0,s.jsx)("div",{className:Sb("header-content-action-wrapper"),children:(0,s.jsx)(fz,{className:g,onClick:x,to:b,children:(0,s.jsx)("span",{className:Sb("header-content-action-link-text"),children:C})})})},pz=$("cover"),Gn=({children:e})=>{const t=pz("header-content");return(0,s.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})},Ir=e=>{const t=He(),n=ct();return gz(t,e,n)},gz=(e,t,n)=>{const{media:o,alpha:r}=t==="coverImage"?tv(e,n):nv(e,n),a="image"in o?Z1(o?.image?.alt):void 0;return{alpha:r,ariaLabel:a,media:o,role:X1(a)}},vz=$("cover"),rf=()=>{const e=HC(),{alpha:t,ariaLabel:n,media:o,role:r}=Ir("coverImage"),a=vz("header-image"),i=aa({alpha:t,color:e,media:o});return(0,s.jsx)("div",{"aria-label":n,className:a,role:r,style:i??void 0})},Cz=$("cover"),af=({children:e})=>{const t=HC(),n=`overlay-${t.toLowerCase()}`,o=Cz("header-content",{[n]:!!t});return(0,s.jsxs)("div",{className:o,"data-testid":"cover-header-content",children:[e,(0,s.jsx)(rf,{})]})},xz=$("cover"),sc=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:n,media:o,role:r}=Ir("coverImage"),a=aa({alpha:t,hasOverlay:e,media:o}),i=xz("header-graphic",{"dot-com":!1});return(0,s.jsx)("div",{"aria-label":n,className:i,"data-testid":"cover-header-graphic",role:r,style:a??void 0})},bz=$("cover");function cn({children:e}){const t=!!Di(),n=bz("header-content-info",{rbc:t,"rise-com":!1});return(0,s.jsx)("div",{className:n,"data-testid":"cover-header-content-info",children:e})}const Js=$("cover");function yz({percentComplete:e}){const t=Sd(),n=as(),o=ye(),r=m2();return null}const Er=$("cover"),Sz=({percentComplete:e})=>{const t=as(),n=ye(),o=m2();return e===0||window.isPublicShare,null;const r=Ta({percent:e,label:n.progressSummaryPercentComplete,isRTL:t});return(0,s.jsxs)("div",{className:Er("progress"),children:[(0,s.jsx)("div",{className:Er("progress-text"),children:r}),(0,s.jsx)("div",{className:Er("progress-outer"),children:(0,s.jsx)("div",{className:Er("progress-inner"),style:{width:`${e}%`}})}),o&&(0,s.jsxs)("div",{className:Er("progress-next-lesson"),children:[(0,s.jsx)(pm,{className:Er("progress-next-lesson-icon").toString(),decorative:!0}),(0,s.jsx)("span",{"aria-hidden":"true",className:Er("progress-next-lesson-text"),children:o}),(0,s.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",o]})]})]})};function _t(){const e=ca()??0;return ht()===te.APEX?(0,s.jsx)(yz,{percentComplete:e}):(0,s.jsx)(Sz,{percentComplete:e})}const Lz=$("cover"),ln=()=>{const e=de(),t=Me(e.title),n=Lz("header-content-title"),o=Ca("title"),r=(0,Qt.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":o};return(0,s.jsx)(As,{anchor:{field:"title",kind:"artifactField"},label:"Comments on course title",children:(0,s.jsx)("h1",{...r,className:n,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})})},Tz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(af,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(_t,{}),(0,s.jsx)(an,{})]})})}),kz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(_t,{}),(0,s.jsx)(an,{})]})})}),Iz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(sc,{}),(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(_t,{}),(0,s.jsx)(an,{})]})})]}),Ez=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(_t,{}),(0,s.jsx)(an,{})]})}),(0,s.jsx)(sc,{})]});function Nz(){switch(nc()){default:case me.LEFT_OVERLAY:case me.CENTERED_OVERLAY:return(0,s.jsx)(Tz,{});case me.LEFT:case me.CENTERED:return(0,s.jsx)(kz,{});case me.SPLIT_LEFT_IMAGE:case me.TWO_THIRDS_LEFT_IMAGE:return(0,s.jsx)(Ez,{});case me.SPLIT_RIGHT_IMAGE:case me.TWO_THIRDS_RIGHT_IMAGE:return(0,s.jsx)(Iz,{})}}function jz(){return(0,s.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,s.jsx)(Nz,{})})}const wz=$("cover");function oc(){return(0,s.jsxs)("svg",{"aria-hidden":"true",className:wz("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,s.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}const Az=$("cover"),Rz=()=>null,Pz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(af,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(oc,{}),(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})})}),Mz=()=>(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(oc,{}),(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})})}),Oz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(sc,{}),(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(oc,{}),(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})})]}),Bz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(oc,{}),(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})}),(0,s.jsx)(sc,{})]}),Dz=()=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(oc,{}),(0,s.jsx)(ws,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})}),(0,s.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,s.jsx)(sc,{})})]});function Fz(){switch(nc()){default:case"CENTERED_IMAGE":return(0,s.jsx)(Dz,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,s.jsx)(Mz,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,s.jsx)(Bz,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,s.jsx)(Oz,{});case"CENTERED_OVERLAY":return(0,s.jsx)(Pz,{})}}function Hz(){return(0,s.jsxs)("header",{className:Az("header",{meta:!1}),"data-testid":"cover-header",children:[(0,s.jsx)(Fz,{}),(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(Rz,{})})]})}const Lb=$("cover");function Nd({accentColor:e,hasOverlay:t=!1,isShape:n=!1}){const{alpha:o,ariaLabel:r,media:a,role:i}=Ir("coverImage"),c=n?{backgroundColor:e}:aa({alpha:o,hasOverlay:t,media:a});return(0,s.jsx)("div",{className:Lb("header-graphic-container"),children:(0,s.jsx)("div",{"aria-label":r,className:Lb("header-graphic"),"data-testid":"cover-header-graphic",role:i,style:c??void 0})})}const Tb=e=>(0,s.jsx)(jd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.319,0.998 L1,0.899 V0 H0 V0.899 L0.192,0.98 C0.234,0.998,0.277,1,0.319,0.998"})})}),kb=e=>(0,s.jsx)(jd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.661,0.963 L1,0.804 V0 H0 V0.804 L0.339,0.963 C0.445,1,0.555,1,0.661,0.963"})})}),Ib=e=>(0,s.jsx)(jd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.481,0.991 L0.908,0.825 C0.99,0.793,1,0.694,0.982,0.616 L0.68,0.075 C0.636,-0.003,0.534,-0.023,0.465,0.033 L0.055,0.364 C-0.007,0.414,-0.017,0.505,0.031,0.568 L0.316,0.944 C0.355,0.995,0.422,1,0.481,0.991"})})}),Eb=e=>(0,s.jsx)(jd,{...e,children:(0,s.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,s.jsx)("path",{d:"M0.519,0.991 L0.093,0.825 C0.01,0.793,-0.025,0.694,0.019,0.616 L0.321,0.075 C0.364,-0.003,0.466,-0.023,0.536,0.033 L0.946,0.364 C1,0.414,1,0.505,0.97,0.568 L0.685,0.944 C0.646,0.995,0.579,1,0.519,0.991"})})}),$z={LEFT_OVERLAY:Tb,LEFT:Tb,CENTERED:kb,CENTERED_OVERLAY:kb,SPLIT_LEFT:Ib,SPLIT_LEFT_IMAGE:Ib,SPLIT_RIGHT:Eb,SPLIT_RIGHT_IMAGE:Eb},jd=({children:e,className:t="svgPath",height:n,width:o,viewBox:r})=>(0,s.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e});function Nr({className:e,coverPageType:t}){const n=t?$z[t]:null;return n?(0,s.jsx)(n,{className:e}):null}const Nb=$("cover"),ja=()=>(0,s.jsxs)("div",{className:Nb("author-published-wrap"),children:[(0,s.jsx)(ws,{}),(0,s.jsx)(rb,{})]}),Vz=({coverPageType:e})=>{const t=Sd();return(0,s.jsxs)(af,{children:[(0,s.jsx)(Nr,{coverPageType:e}),(0,s.jsxs)(cn,{children:[!t&&(0,s.jsx)(_t,{}),(0,s.jsx)(ja,{}),(0,s.jsx)(ln,{}),t&&(0,s.jsx)(_t,{}),(0,s.jsx)(an,{})]})]})},zz=({coverPageType:e})=>{const t=Sd();return(0,s.jsxs)(Gn,{children:[(0,s.jsx)(Nr,{coverPageType:e}),(0,s.jsxs)(cn,{children:[!t&&(0,s.jsx)(_t,{}),(0,s.jsx)(ja,{}),(0,s.jsx)(ln,{}),t&&(0,s.jsx)(_t,{}),(0,s.jsx)(an,{})]})]})},_z=({coverPageType:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Nr,{coverPageType:e}),(0,s.jsx)(Nd,{}),(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(ja,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})})]}),Uz=({accentColor:e,coverPageType:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(ja,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})}),(0,s.jsx)(Nr,{coverPageType:t}),(0,s.jsx)(Nd,{accentColor:e,isShape:!0})]}),Gz=({coverPageType:e})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(ja,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})}),(0,s.jsx)(Nr,{coverPageType:e}),(0,s.jsx)(Nd,{})]}),Wz=({accentColor:e,coverPageType:t})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Nr,{coverPageType:t}),(0,s.jsx)(Nd,{accentColor:e,isShape:!0}),(0,s.jsx)(Gn,{children:(0,s.jsxs)(cn,{children:[(0,s.jsx)(_t,{}),(0,s.jsx)(ja,{}),(0,s.jsx)(ln,{}),(0,s.jsx)(an,{})]})})]});function Kz(e){const t=nc(),n={...e,coverPageType:t};switch(t){default:case me.LEFT_OVERLAY:case me.CENTERED_OVERLAY:return(0,s.jsx)(Vz,{...n});case me.LEFT:case me.CENTERED:return(0,s.jsx)(zz,{...n});case me.SPLIT_LEFT:return(0,s.jsx)(Uz,{...n});case me.SPLIT_LEFT_IMAGE:return(0,s.jsx)(Gz,{...n});case me.SPLIT_RIGHT:return(0,s.jsx)(Wz,{...n});case me.SPLIT_RIGHT_IMAGE:return(0,s.jsx)(_z,{...n})}}function Qz(e){const n=!!!!Di();return(0,s.jsx)("header",{className:Nb("header",{"with-info":n}),"data-testid":"cover-header",children:(0,s.jsx)(Kz,{...e})})}const Yz={[te.RISE_CLASSIC]:jz,[te.HORIZON]:Hz,[te.APEX]:Qz};function Zz(){const e=ht(),t=Yz[e];return(0,s.jsx)(t,{})}const Xz=$("cover");function qz({children:e}){const t=ht(),n=nc(),o=Fl()(n);return(0,s.jsx)("div",{className:Xz({layout:o}),"data-testid":`cover-layout-${o}`,"data-theme-id":t,id:"cover",children:e})}const Jz=["[href]",'[tabindex]:not([tabindex=""])',"audio[controls]","button:not([disabled])","details:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","summary:not([disabled])","textarea:not([disabled])","video[controls]"].map(e=>`${e}:not([tabindex="-1"]):not([hidden]):not([aria-hidden="true"])`).join(", "),jb=(e,t=!1)=>n=>{const o=wb(n);if(o.length===0)return;const r=e>=o.length&&t?0:e;return pg()(r,o)},wb=e=>e?Array.from(e.querySelectorAll(Jz)).filter(t=>window.getComputedStyle(t).display!=="none"):[],Ab=jb(0),e_=jb(-1),cf=e=>Ab(e)?.focus?.();function t_(){const e=(0,u.useRef)(null);function t(n){const o=Ab(e.current),r=e_(e.current);zl(n)&&(n.shiftKey?document.activeElement===o&&(r.focus(),n.preventDefault()):document.activeElement===r&&(o.focus(),n.preventDefault()))}return(0,u.useEffect)(()=>{const n=e?.current;return n?.addEventListener("keydown",t),()=>{n?.removeEventListener("keydown",t)}},[]),e}var lf;const df=u.createContext(null);df.displayName="UndoManagerContext";function tfe(e){return lf(df.Provider,{value:e.undoManager,children:e.children})}function Rb(){return u.useContext(df)}function nfe(e){function t(n){const o=Rb();return lf(e,{...n,undoManager:o})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function Pb(){const e=Rb();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function sfe(e){function t(n){return Pb(),lf(e,{...n})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const Zt=$("modal"),uf=u.forwardRef((e,t)=>{const{children:n,className:o,"data-testid":r,darkOverlay:a,disableBackgroundScroll:i,disableCloseOnOverlayClick:c,disableCloseOnEscape:l=!1,focusFirstInput:d=!0,focusOnOpen:h=!0,footer:m,forceToTop:f=!1,fullscreen:v=!1,heading:C,hideCloseButton:g=!1,hideHeader:b=!1,skipDialogClose:x=!1,useTopLayer:y=!0,onCancel:L,onClose:S=mn,onClickBack:T,onCloseBubbles:k=!1,onOverlayClick:E,scroll:I=!1,subHeading:j,subText:P,width:N}=e;Pb();const R=t_(),w=(0,u.useRef)(null),A=(0,u.useCallback)(()=>{const D=R.current;!x&&D?.open&&D.close(),S()},[S,R,x]);(0,u.useEffect)(()=>{const D=H=>{xn(H)&&!l&&(H.preventDefault(),H.stopPropagation(),L?.(H),A())};return document.addEventListener("keydown",D,!k),()=>{document.removeEventListener("keydown",D,!k)}},[l,L,A,k]),(0,u.useEffect)(()=>{const D=R.current;if(D)return y?D.showModal():D.show(),h||setTimeout(()=>{D.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{D.close()}},[R,y,h]),(0,u.useEffect)(()=>{if(d&&R.current){const H=wb(R.current).find(G=>G.tagName==="INPUT"||G.tagName==="TEXTAREA"||G.tagName==="SELECT"),V=H||w?.current;V?.focus(),V instanceof HTMLTextAreaElement&&V.setSelectionRange(V.value.length,V.value.length)}},[d,R]),(0,u.useEffect)(()=>(i&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{i&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[i,R]);const M=Zt({"force-to-top":f}).mix(o),O=Zt("content",{"with-footer":!!m,"force-scroll":!!I}),B=Zt("overlay",{dark:!!a});return(0,s.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:M.toString(),"data-testid":r,onClose:A,ref:D=>{R.current=D,t&&(t.current=D)},role:"dialog",children:[(0,s.jsx)("div",{id:"modal-portal"}),(0,s.jsx)("div",{className:B,onClick:c?void 0:E||A}),(0,s.jsxs)("div",{className:Zt("dialog",{fullscreen:v}),style:N&&!v?{width:N}:{},children:[(!b||!g)&&(0,s.jsxs)("div",{className:Zt("heading-wrapper"),children:[(0,s.jsxs)("div",{className:Zt("heading-flexbox"),children:[!b&&(0,s.jsxs)("div",{className:Zt("header"),children:[T&&(0,s.jsx)("button",{"aria-label":"back to previous page",className:Zt("back"),onClick:T,type:"button",children:(0,s.jsx)(ue,{className:Zt("back-icon"),name:"arrow-left"})}),(0,s.jsxs)("h1",{className:Zt("heading"),id:"modal-heading",children:[C,(0,s.jsx)("span",{className:Zt("subheading"),children:j})]})]}),!g&&(0,s.jsx)("button",{"aria-label":"close dialog",className:Zt("close"),onClick:A,ref:w,type:"button",children:(0,s.jsx)(ue,{className:Zt("close-icon"),name:"close"})})]}),P?(0,s.jsx)("h2",{className:Zt("subtitle"),children:P}):[]]}),(0,s.jsx)("div",{className:O,children:n}),m&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Zt("footer-shadow")}),(0,s.jsx)("div",{className:Zt("footer"),children:m})]})]})]})}),Do=$("locale-selector"),hf=({onClose:e})=>{const t=(0,Re.zy)(),n=de(),o=bN(),r=Cl(),a=yN(),i=a?.length?a:o&&r?r?.map(T=>T.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(i?.length||0)>1,h=(0,De.A)(d),m=lt(n?.title),{currentLocale:f,setCurrentLocale:v}=tt(),C=vO(),g=ye(),[b,x]=(0,u.useState)(!1),y=(0,u.useCallback)(T=>{L8(T),v(T)},[v]),L=()=>{jn(lh(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>{if(!i||b||o===void 0||!r)return;if(i.length===1){y(i[0]),x(!0);return}const T=H1(void 0),k=S8()??"";if(k!==""){y(k),x(!0),l(!1);return}T?.p==null&&k===""?l(!0):(l(!1),L());const I=(navigator.language??"en-US").toLowerCase(),j=i.find(P=>P.toLowerCase()===I);y(j?I:i[0]),x(!0)},[i,t,y,b,o,r,l]);const S=T=>{T.preventDefault();const k=T.target.value;y(k)};return!d||o===void 0||!r?null:(0,s.jsx)(Fs,{classNames:"modal",timeout:400,children:(0,s.jsx)(uf,{className:Do("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:L,children:(0,s.jsxs)("div",{className:Do("container"),children:[(0,s.jsx)("div",{className:Do("heading"),children:g.l10nChooseLanguage}),(0,s.jsx)("div",{className:Do("course-title"),children:m}),(0,s.jsx)("div",{className:Do("selector"),children:(0,s.jsx)("select",{onChange:S,value:f,children:i.map(T=>(0,s.jsx)("option",{value:T,children:C(T)},T))})}),(0,s.jsx)("div",{className:Do("footer"),children:(0,s.jsx)("button",{className:Do("continue-button"),onClick:L,type:"button",children:(0,s.jsx)("span",{className:Do("continue-button-label"),children:g.l10nChooseLanguageContinue})})})]})})})},n_=$("cover-container"),Mb=()=>document.querySelector("h1")?.focus({preventScroll:!0});function s_(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=Hi(),o=ye()?.overviewPageTitleSuffix,r=ra();return(0,u.useEffect)(()=>{t||e&&Mb()},[e,t]),(0,s.jsxs)(Sr,{title:Oi(`${r} - ${o}`),children:[(0,s.jsx)("main",{children:(0,s.jsx)("div",{className:n_({}),children:(0,s.jsxs)(qz,{children:[(0,s.jsx)(Zz,{}),(0,s.jsx)(mz,{})]})})}),(0,s.jsx)(hf,{onClose:Mb})]})}const o_=s_,r_=/^([^/\s]+)\/([^/\s]+)$/;function a_(e){const t=r_.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function afe(e,t){return`${e}/${t}`}const rc="blockId";function ife(e,t){return`#/lessons/${e}?${rc}=${t}`}const i_=/^#\/lessons\/([^/?#]+)\?(.+)$/;function c_(e){const t=i_.exec(e.trim());if(!t)return null;const n=new URLSearchParams(t[2]).get(rc);return n?{lessonId:decodeURIComponent(t[1]),blockId:n}:null}const Ob=(0,u.createContext)(void 0);function wd(){const e=(0,u.useContext)(Ob);return e||(console.warn("useMediaContext must be used within a MediaProvider"),{mode:"readonly",openTranscript:null,closeTranscript:null,onTranscriptUpdate:null,lessonId:"",uploadAudio:null,aiEnabled:!1,aiWriterContext:void 0,removeMediaRecordType:void 0,removeItemMedia:void 0,handleOpenMediaModal:void 0,showAssetLibraryDialog:void 0,hideAssetLibraryDialog:void 0,handleDelete:void 0})}function Bb(e){function t(n){const o=wd();return(0,s.jsx)(e,{...n,...o})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function l_({children:e,lessonId:t,mode:n="readonly",openTranscript:o,closeTranscript:r,onTranscriptUpdate:a,disableTranscriptButton:i=!1}){const c={mode:n,lessonId:t||"",openTranscript:o||null,closeTranscript:r||null,onTranscriptUpdate:a||null,disableTranscriptButton:i,uploadAudio:null,aiEnabled:!1,aiWriterContext:void 0,removeMediaRecordType:void 0,removeItemMedia:void 0,handleOpenMediaModal:void 0,showAssetLibraryDialog:void 0,hideAssetLibraryDialog:void 0,handleDelete:void 0};return(0,s.jsx)(Ob.Provider,{value:c,children:e})}const Db=(0,u.createContext)(void 0),d_=Db.Provider;function ac(){return(0,u.useContext)(Db)}function u_({children:e}){const t=pe(n=>n.transcriptPanel);return(0,s.jsx)(d_,{value:t,children:e})}const Fb=(0,Ce.action)(bC),ic=(0,Ce.action)(yC),mf=(0,Ce.action)(SC);function vs(e){return e.refs?Fl()("audio-id__refs_"+e.refs.toLowerCase()):""}function ff(e){if(e)return`audio-transcript--${e}`}function Hb(e){if(e)return`audio-player-transcript-toggle--${e}`}const $b=$("course-exit");function Vb(e){const t=ye(),{className:n,lmsOptions:o,style:r}=e;return o?.enableExitCourse?(0,s.jsx)("div",{className:$b("wrapper"),children:(0,s.jsx)("button",{className:$b("button").mix(n),onClick:mg,style:r,type:"button",children:t?.courseExit})}):null}const h_=960;function cc(){return Bt(h_)}function m_(){const e=He(),t=cc(),n=Lh();return Cj({course:e,isMobile:t,search:n})}function f_(){const e=He(),t=cc();return xj({course:e,isMobile:t})}const pf=$("nav-control"),p_=()=>{const[e,t]=(0,u.useState)(!1);return(0,rt.A)(rx,()=>t(!0)),(0,rt.A)(lm,()=>t(!1)),e},g_=({"aria-controls":e,isNavOpen:t,toggleNav:n,hideNav:o})=>{const{buttonNavigationStyle:r,lmsOptions:a,showNavigationButtons:i,...c}=de(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=ye(),f=cc(),v=El(),C=p_(),g=(0,u.useMemo)(()=>c.lessons?.find(k=>k.id===v),[c.lessons,v]),b=g?.type==="quiz"&&!!g.settings?.timer,x=a?.enableExitCourse,y=b||x,L=c.navigationType===ar.COMPACT,S=L?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const E=document.querySelector(".lesson-nav--previous")?.clientHeight??60,I=!i||r===Us.FLOATING&&!f;function j({target:P}){const N=P instanceof HTMLElement?P.scrollTop:0,R=E-N;h(R)}return C&&!I?l.current.scrollTop===0?h(E):l.current.addEventListener("scroll",j):h(0),()=>l.current.removeEventListener("scroll",j)},[r,f,C,i]);const T=(0,u.useCallback)(()=>{const k=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),E=k instanceof HTMLElement?k:null;if(l.current&&E){const I=l.current.offsetWidth-l.current.clientWidth||0;E.style.maxWidth=`calc(100% - ${I}px)`}},[]);return(0,u.useLayoutEffect)(()=>{y&&T()},[y,T]),(0,s.jsx)("div",{className:pf("wrapper"),children:(0,s.jsxs)("div",{className:pf("menu",{"is-timed-quiz":b,"nav-off":o,"top-nav-bar":y}),style:{marginTop:d},children:[!o&&(!L||f)&&(0,s.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:pf("button"),onClick:n,type:"button",children:(0,s.jsx)(ue,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,s.jsx)(Vb,{className:S,lmsOptions:a})]})})},gf=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:n=0,runnerClass:o,trackClass:r})=>(0,s.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,s.jsx)("div",{className:o,style:{width:`${n}%`}})}),Fo=$("nav-compact"),v_=e=>{const{lessonPosition:t,labelLessonName:n,labelLessonPreposition:o,totalLessons:r}=e;return t<=0?null:(0,s.jsx)("div",{className:Fo("header-counter"),"data-testid":"nav-compact-counter",children:`${n} ${t} ${o} ${r}`})},C_=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:o,percentComplete:r,percentCompleteText:a,navExpanded:i}=e;return(0,s.jsxs)("div",{className:Fo("header-progress"),"data-testid":"nav-compact-progress",children:[(0,s.jsx)("div",{className:n,children:a}),(0,s.jsx)(gf,{"aria-hidden":i,"aria-label":a,progress:r,runnerClass:t,trackClass:o})]})},x_=({closeNav:e,isExpanded:t,openNav:n})=>{const o=Jt(),r=ot(),a=vr(),i=de(),c=ra(),l=ca(),d=ye(),h=Io(),m=yl(),f=El(),v=c2(),C=(0,u.useMemo)(()=>i?.lessonsOnly?.length??0,[i?.lessonsOnly]),g=(0,u.useMemo)(()=>v[f]??-1,[v,f]),b=a?.navigationStyle,x=(0,u.useMemo)(()=>Ai(b),[b]),y=(0,u.useCallback)(()=>{t?e():n()},[t,n,e]),L=a?.exportSettings?.webExportSettings,S=!Es.isInstantLink&&(a?.lmsOptions?.disableCoverPage||L?.disableCoverPage),T=(0,u.useCallback)(se=>{se.preventDefault(),qs(()=>{o("/")},"lesson-to-cover")},[o]),I=`${as()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:j,ariaLabel:P,media:N,role:R}=Ir("coverImage"),w=(0,u.useMemo)(()=>aa({alpha:j,color:a?.theme?.coverImageColor??void 0,media:N}),[j,a?.theme?.coverImageColor,N]),A=Fo("header",{collapsed:!t}),M=Fo("header-image",{collapsed:!t}),O="nav-compact__header-inner",B="nav-compact__header-control",D=Fo("header-title-link",{collapsed:!t}),H=Fo("header-progress-text",{collapsed:!t}),V=Fo("header-progress-track",{collapsed:!t}),G=Fo("header-progress-runner",{collapsed:!t}),_="nav-compact__header-strip",Y=(0,u.useCallback)(()=>{r(Ti(!h?.active))},[r,h?.active]);return(0,s.jsxs)("section",{"aria-label":"Course Information",className:A,"data-testid":"nav-compact-header",children:[x&&w&&(0,s.jsx)("div",{"aria-label":P,className:M,role:R,style:w}),(0,s.jsxs)("div",{className:O,children:[(0,s.jsxs)("div",{className:_,children:[(0,s.jsxs)("div",{className:"nav-compact__header-controls",children:[a?.allowSearch&&m!=="restricted"&&t&&(0,s.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${B} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:Y,type:"button",children:(0,s.jsx)($i,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,s.jsxs)("button",{"aria-controls":"nav-compact-outline","aria-expanded":t,"aria-label":t?d?.a11yNavigationMenuClose:d?.a11yNavigationMenuOpen,className:`${B} nav-compact__header-toggle`,"data-testid":"nav-compact-toggle",onClick:y,type:"button",children:[t&&(0,s.jsx)(YD,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,s.jsx)(ZD,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,s.jsx)(v_,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:g,totalLessons:C})]}),(0,s.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:S?(0,s.jsx)("span",{className:D,children:c}):(0,s.jsx)(sn,{className:D,onClick:T,to:"/",children:c})}),(0,s.jsx)(C_,{classProgressRunner:G,classProgressText:H,classProgressTrack:V,navExpanded:t,percentComplete:l,percentCompleteText:I})]})]})};var b_=p(75810),y_=p.n(b_),S_=p(514),L_=p.n(S_),T_=p(99227),k_=p.n(T_),I_,E_,N_,j_,w_;function zb(e,t,n="..."){const o=e?e.toString():"";return o.length>t?o.substr(0,t-1)+n:o}const ufe=e=>w_(t=>E_(t)>e,N_(0,e)),A_=new RegExp(/^[0-9]+$/),R_=e=>A_.test(e),P_=e=>e>=0,M_=e=>e<=100,hfe=e=>e==="",mfe=e=>R_(e)&&M_(e)&&P_(e),ffe=e=>String(Number(e)),_b=Be()(ea()(""),y_()(L_(),0)),pfe=Be()(ea()(" "),vt()(_b),Q0()(" ")),Ub=Be()(ea()(" "),Q0()(/(?=[A-Z]|^)/)),gfe=e=>e?I_(_b,j_,Ub)(e):"",vfe=Be()(k_(),Ub);function Gb({id:e,isEnabled:t,isSectionLesson:n,last:o}){const{navigationStyle:r}=de(),{settings:a}=Rt(e)??{},i=da(e),c=Qs(),l=$h(String(e)),d=(0,u.useMemo)(()=>jo(r),[r]),h=String(e)===c,m=a?.isGeneratingAIContent===!0,f=zb(i||"",45),[v,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),b=(0,u.useCallback)(()=>C(!1),[]),x=n?"nav-compact__outline-section-item":"nav-compact__outline-item",y=`${x}__link`,L=(0,s.jsx)(Ed,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:v,onHideTooltip:b,onShowTooltip:g,scope:yo.COMPACT});return(0,s.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,s.jsx)("div",{className:x,children:(0,s.jsx)("span",{"aria-disabled":"true",className:`${y} ${y}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(Xi,{className:x,dark:d,isCurrentLesson:h,isTooltipEnabled:!l,last:o,lessonId:e,onHideProgressTooltip:b,onShowProgressTooltip:g,showProgressDelay:0,tooltipClassName:`${x}-tooltip`,children:[f,!l&&L]}),l&&L]})})}const O_=$("nav-compact"),B_=({id:e})=>{const t=Rt(e),n=lt(t?.title),o=O_("outline-section-empty");return(0,s.jsx)("div",{className:o,children:(0,s.jsx)("span",{children:n})})};var wa=p(49860);const D_=({index:e,isEnabled:t,lessonIds:n,id:o})=>{const r=de(),a=r?.theme,i=r?.themeId,c=a?.navigationSectionsExpanded??!0,l=Rt(String(o)),d=lt(l?.title),[h,m]=wa.useState(c);wa.useEffect(()=>{m(c)},[c]);const[f,v]=wa.useState(),C=wa.useRef(null),g=`sublistCompact-${e}`,b=String(i),x=h?"nav-compact__outline-section-toggle-icon":"nav-compact__outline-section-toggle-icon nav-compact__outline-section-toggle-icon--collapsed",y=h?"nav-compact__outline-section-list":"nav-compact__outline-section-list nav-compact__outline-section-list--collapsed",L=h?"nav-compact__outline-section-toggle":"nav-compact__outline-section-toggle nav-compact__outline-section-toggle--collapsed",S=wa.useCallback(()=>{m(T=>!T)},[]);return wa.useLayoutEffect(()=>{const T=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[n.length,b]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:L,onClick:S,tabIndex:t?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,s.jsx)(kx,{className:x})]}),(0,s.jsx)(Ld,{inert:!h,children:(0,s.jsx)("ol",{"aria-hidden":h?void 0:!0,className:y,id:g,ref:C,role:"list",style:{maxHeight:f},children:n.map((T,k)=>(0,s.jsx)(Gb,{id:T,isEnabled:t&&h,isSectionLesson:!0,last:k===n.length-1},T))})})]})},F_=({index:e,isEnabled:t,lessonIds:n})=>{const[o,...r]=n,a="nav-compact__outline-item nav-compact__outline-section";return wt()(r)?(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(B_,{id:o})}):(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(D_,{id:o,index:e,isEnabled:t,lessonIds:r})})},H_=({index:e,isEnabled:t,lessonIds:n})=>Al(n)?(0,s.jsx)(F_,{index:e,isEnabled:t,lessonIds:n}):n.map((r,a)=>(0,s.jsx)(Gb,{id:r,isEnabled:t,isSectionLesson:!1,last:a===n.length-1},r)),$_=({className:e="",isEnabled:t})=>{const n=Pl(),o=ye(),r=ht(),a=[e,r===te.RISE_CLASSIC?"brand--ui":void 0,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,s.jsx)("section",{"aria-label":o?.a11yRegionNavOverview,className:a,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:cs(n)&&(0,s.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:n.map((i,c)=>wt()(i)?null:(0,s.jsx)(H_,{index:c,isEnabled:t,lessonIds:i},c))})})};var V_=p(49860);const z_=()=>{const[e,t]=V_.useState(!1);return(0,rt.A)(ax,()=>t(!0)),(0,rt.A)(dm,()=>t(!1)),e},Wb=$("nav-compact"),Kb="nav-content-compact",__=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:n},o)=>{const r=vr(),{navigationStyle:a,theme:i}=r??{},c=i?.coverImageColor,l=i?.progressIndicatorStyle,d=pe(S=>S.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(S.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>jo(a),[a]),m=(0,u.useMemo)(()=>a===ir.LIGHT_ACCENT||a===ir.DARK_ACCENT,[a]),f=z_(),v=(0,u.useMemo)(()=>Ai(a),[a]),C=l===et.CIRCULAR_FILL,g=l===et.INCOMPLETE_COMPLETE,b=(0,u.useMemo)(()=>v&&c===it.LIGHT,[v,c]),x=Wb({accent:m,dark:h,light:!h,"image-dark-overlay":v&&!b,"image-light-overlay":v&&b,"progress-circular-fill":C,"progress-incomplete-complete":g,collapsed:!t,navNextIsVisible:f}),y=Wb("wrap",{collapsed:!t}),L={transform:`translateY(${d}px)`};return(0,s.jsx)("div",{className:x,"data-testid":"nav-compact",id:Kb,ref:o,style:L,children:(0,s.jsxs)("div",{className:y,children:[(0,s.jsx)(x_,{closeNav:e,isExpanded:t,openNav:n}),(0,s.jsx)(Ld,{inert:!t,children:(0,s.jsx)($_,{isEnabled:t})})]})})});function Qb(e,t){const[n,o]=(0,u.useState)(null),{root:r,rootMargin:a,threshold:i}=t;return(0,u.useEffect)(()=>{if(e&&typeof IntersectionObserver=="function"){const c=new IntersectionObserver(l=>{o(l[0])},{root:r,rootMargin:a,threshold:i});return c.observe(e),()=>{o(null),c.disconnect()}}return()=>{}},[e,r,a,i]),n}const U_={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},Yb=Object.assign((0,u.createContext)(U_),{displayName:"OverlayNavControlContext"});function G_(e){const{children:t,closeNav:n,openNav:o}=e,[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>{a(!0)},[]),c=(0,u.useCallback)(()=>{a(!1)},[]);return(0,s.jsx)(Yb.Provider,{value:{closeNav:n,openNav:o,openSearch:i,closeSearch:c,searchActive:r},children:t})}const Ad=()=>(0,u.useContext)(Yb),Rd=$("nav-overlay"),W_=({className:e})=>{const t=ye(),n=as(),o=ca(),a=`${n?`%${o}`:`${o}%`} ${t?.lessonComplete??""}`,i=Rd("header-progress-runner"),c=Rd("header-progress-text"),l=Rd("header-progress-track");return(0,s.jsxs)("div",{className:Rd("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,s.jsx)(gf,{"aria-hidden":!0,progress:o,runnerClass:i,trackClass:l}),(0,s.jsx)("div",{className:c,children:a})]})},eo=$("nav-overlay"),K_=()=>{const e=de(),t=Jt(),n=ra(),{allowSearch:o,lmsOptions:r}=e,a=yl(),i=ye(),c=Ad(),l=(0,u.useRef)(null),d=eo("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Es.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=v=>{v.preventDefault(),qs(()=>{t("/")},"lesson-to-cover")};return(0,s.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,s.jsxs)("div",{className:eo("header-container"),children:[(0,s.jsxs)("div",{className:eo("header-controls"),children:[(0,s.jsx)("button",{"aria-label":i?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,s.jsx)(Jl,{className:eo("header-close-icon")})}),o&&a!=="restricted"&&(0,s.jsx)("button",{"aria-label":i?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,s.jsx)($i,{className:eo("header-search-icon")})})]}),(0,s.jsxs)("div",{className:eo("header-title-progress-container"),children:[(0,s.jsx)("h1",{className:eo("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,s.jsx)("span",{className:eo("header-title"),children:n}):(0,s.jsx)(sn,{className:eo("header-title-link"),onClick:f,to:"/",children:n})}),(0,s.jsx)(W_,{})]})]})})},Q_={[On.ARTICLE]:Lx,[On.INTERACTION]:sF,[On.QUIZ]:JD,[On.VIDEO]:oF},Pd=({className:e,icon:t})=>{const n=Q_[t]??Lx;return(0,s.jsx)(n,{className:e,icon:t})},to=$("nav-overlay"),Zb=({first:e,id:t,isEnabled:n,isSectionLesson:o,last:r})=>{const{navigationStyle:a}=de(),{icon:i,settings:c}=Rt(t)??{},l=da(t),d=Ad(),h=$h(String(t)),m=jo(a),f=c?.isGeneratingAIContent===!0,v=to("outline-item",{section:o}),C=`${to("outline-item")}__link`,g=to("outline-item-link-icon",{quiz:i==="Quiz"}),b=(0,u.useCallback)(()=>{d.closeNav()},[d]),[x,y]=(0,u.useState)(!1),L=(0,u.useCallback)(()=>y(!0),[]),S=(0,u.useCallback)(()=>y(!1),[]),T=(0,s.jsx)(Ed,{canComplete:h,id:t,isDark:m,isEnabled:n,isTooltipVisible:x,onHideTooltip:S,onShowTooltip:L,scope:yo.OVERLAY});return(0,s.jsx)("li",{className:to("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,s.jsx)("div",{className:v.toString(),children:(0,s.jsxs)("span",{"aria-disabled":"true",className:`${C} ${C}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,s.jsx)("span",{className:to("outline-icon-wrap"),children:(0,s.jsx)(Pd,{className:g,icon:i??On.ARTICLE})}),(0,s.jsx)("span",{className:to("outline-lesson-title"),children:l})]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(Xi,{className:v.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:S,onNavigate:b,onShowProgressTooltip:L,showProgressDelay:null,tooltipClassName:to("outline-item-tooltip").toString(),children:[(0,s.jsx)("span",{className:to("outline-icon-wrap"),children:(0,s.jsx)(Pd,{className:g,icon:i??On.ARTICLE})}),(0,s.jsx)("span",{className:to("outline-lesson-title"),children:l}),!h&&T]}),h&&T]})})},Y_=$("nav-overlay"),Z_=({id:e})=>{const t=Rt(e),n=lt(t?.title);return(0,s.jsx)("span",{className:Y_("outline-section-text"),children:n})},Xb=$("nav-overlay"),X_=({isEnabled:e,lessonIds:t})=>{const n=(0,u.useRef)(null);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Xb("outline-section-divider")}),(0,s.jsx)("ol",{className:Xb("outline-section-list"),ref:n,role:"list",children:t.map((o,r)=>(0,s.jsx)(Zb,{id:o,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},o))})]})},q_=$("nav-overlay"),J_=({index:e,isEnabled:t,lessonIds:n})=>{const[o,...r]=n,a=q_("outline-item").mix("nav-overlay__outline-section");return wt()(r)?(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(Z_,{id:o})}):(0,s.jsx)("li",{className:a,role:"listitem",children:(0,s.jsx)(X_,{index:e,isEnabled:t,lessonIds:r})})},eU=({index:e,isEnabled:t,lessonIds:n})=>{const o=Al(n),r=da(n[0]),a=$("nav-overlay");return o?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:a("outline-section-text"),children:r}),(0,s.jsx)("ol",{className:a("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,s.jsx)(J_,{index:e,isEnabled:t,lessonIds:n})})]}):n.map((i,c)=>(0,s.jsx)(Zb,{first:c===0,id:i,isEnabled:t,isSectionLesson:!1,last:c===n.length-1},i))},tU=$("nav-overlay"),nU=({isEnabled:e})=>{const t=Pl(),n=ye();return(0,s.jsx)("section",{"aria-label":n?.a11yRegionNavOverview,className:tU("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:cs(t)&&(0,s.jsx)(s.Fragment,{children:t.map((o,r)=>wt()(o)?null:(0,s.jsx)(eU,{index:r,isEnabled:e,lessonIds:o},`lessonIdGroup-${r}`))})})};var sU=p(40002),Md=p.n(sU),jr=p(61082),oU=p(68848),Od=p.n(oU);const vf=Array.isArray,qb=e=>typeof e=="number",Bd=e=>!yt()(e)&&typeof e=="object",Cf=e=>typeof e=="string",rU=(e,t,n)=>(o,r)=>{const a=So()(r,e);if((0,Qt.uW)(o)){const i=n[o.l10nId];return typeof i!="string"?!1:!wt()(Od()(t,(0,jr.htmlDecode)(i)))}else return Bd(o)?Jb(e,t,n)(o):a&&Cf(o)?!wt()(Od()(t,(0,jr.htmlDecode)(o))):!1},Jb=(e,t,n)=>o=>{const r=Ss()(rU(e,t,n),o);return So()(!0,es()(r))},aU=Jb;var iU=p(49306),xf=p.n(iU),cU=p(39767),bf=p.n(cU);const lU=xf(),dU=en(),uU=(e,t,n)=>(o,r)=>{const a=So()(r,e);if(vf(o))return es()(yf(e,t,n)(o));if((0,Qt.uW)(o)){const i=n[o.l10nId];return typeof i!="string"?0:Hn()(Od()(t,(0,jr.htmlDecode)(i)))}else return Bd(o)?yf(e,t,n)(o):a&&Cf(o)?Hn()(Od()(t,(0,jr.htmlDecode)(o))):0},yf=(e,t,n)=>o=>Ss()(uU(e,t,n),o),Sf=e=>{if(vf(e))return vt()(Sf,e);if(Bd(e))return Sf(es()(e));if(qb(e))return e},hU=(e,t,n)=>o=>{const r=yf(e,t,n)(o),a=vt()(Sf,es()(r)),i=Uc()(a).filter(qb),c=bf()(lU,0,i);return dU("results",c,o)},mU=(e,t,n)=>(o,r)=>{const a=So()(r,e);return vf(o)?es()(Lf(e,t,n)(o)):Bd(o)?Lf(e,t,n)(o):a&&Cf(o)?Zr()(t,n,o):o},Lf=(e,t,n)=>o=>Ss()(mU(e,t,n),o),e3=Lf,t3=(e,t,n,o,r)=>{const a=["caption","code","description","heading","message","name","paragraph","title"];if(wt()(e))return!1;const i=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${i})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=e3(a,c,l),h=e3(Object.keys(n),c,l),m=vt()(x=>{const y=d(x);return Array.isArray(y)?x:{...x,...y}},t),f=o?o(e):{},v=h(n),C=x=>f[x.id]>0||aU(a,c,n)(x),g=x=>hU(a,c,n)(x),b=vt()(g,$s()(C,t));b.forEach(x=>{x.results+=f[x.id]??0}),r(e,b,Array.isArray(v)?n:v,m)};function fU(e){if(!e)return!0;for(const t in e)return!1;return!0}function n3(){const{lessons:e,mondrian:t}=de(),{currentLocale:n}=tt(),[o,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{fU(t)||p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)).then(a=>r(()=>a.searchItemsByLesson))},[t]),(0,u.useCallback)(a=>o?.(a,e,t,n)??{},[o,e,t,n])}const pU=kr.Ay.animateScroll,Wn=$("nav-overlay"),gU=()=>{const e=ot(),t=BC(),n=Ad(),{lessons:o}=de(),[r,a]=(0,u.useState)(""),i=n3(),c=(0,u.useRef)(null),l=ye(),d=Wn("search-close-btn"),h=Wn("search-clear-btn"),m=(0,u.useCallback)(()=>{n.closeSearch(),n.closeNav(),e([fC(!0),Ti(!1),gr(null)])},[e,n]),f=(0,u.useCallback)(()=>{a(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const v=(0,u.useCallback)(b=>{xn(b)&&!Md()(r)?(b.preventDefault(),a(""),e(gr(null))):xn(b)&&Md()(r)&&m()},[e,m,r]);(0,rt.A)("keydown",v);const C=(0,u.useCallback)(b=>{a(b.target.value)},[]),g=(0,u.useCallback)(b=>{if(b.preventDefault(),r){const x=(y,L,S,T)=>{e([gr(y),pC(L),gC(S),vC(T),Ti(!0)]),pU.scrollToTop({duration:500,smooth:!0})};n.closeNav(),n.closeSearch(),t3(r,o,t??{},i,x)}},[r,i,n,o,t,e]);return(0,s.jsxs)("div",{className:Wn("search"),"data-testid":"nav-overlay-search-container",children:[(0,s.jsx)("div",{className:Wn("search-header"),children:(0,s.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,s.jsx)(Jl,{className:Wn("search-close-icon")})})}),(0,s.jsx)("div",{className:Wn("search-body"),children:(0,s.jsxs)("form",{autoComplete:"off",onSubmit:g,children:[(0,s.jsxs)("div",{className:Wn("search-container"),children:[(0,s.jsx)($i,{className:Wn("search-icon")}),(0,s.jsx)("input",{"aria-label":l?.a11ySearchInput,className:Wn("search-input").mix("brand--ui"),"data-testid":"nav-overlay-search-input",name:"search",onChange:C,placeholder:l?.search,ref:c,type:"input",value:r}),r&&(0,s.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,s.jsx)(Jl,{className:Wn("search-clear-icon").toString()})})]}),(0,s.jsx)("div",{className:Wn("search-actions"),children:(0,s.jsx)("button",{className:Wn("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},Tf=$("nav-overlay"),s3="nav-content-overlay",vU=({isExpanded:e,outlineRef:t})=>{const o=Pl()[0],r=Al(o),a=Tf("body",{section:r});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(K_,{}),(0,s.jsx)("div",{className:a,ref:t,children:(0,s.jsx)(nU,{isEnabled:e})})]})},CU=({children:e,isImage:t,hasStickyHeader:n})=>{const o=Tf("content",{graphic:t,"has-sticky-header":n});return(0,s.jsxs)("div",{className:o,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,s.jsx)(rf,{})]})},xU=({isExpanded:e})=>{const t=(0,u.useRef)(null),[n,o]=(0,u.useState)(null),r=de(),a=Ad(),i=(0,De.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===cr.ACCENT,m=c===cr.TINT,f=jo(c),v=c===cr.GRAY,C=c===cr.LIGHT,g=Ai(c),b=l===et.CIRCULAR_FILL,x=l===et.INCOMPLETE_COMPLETE,[y,L]=(0,u.useState)(!0),{isIntersecting:S=!1}=Qb(n,{root:t?.current,threshold:1})||{},T=(0,De.A)(S),k=(0,u.useMemo)(()=>g&&d===it.LIGHT,[g,d]),E=Tf({"accent-tint":m,accent:h,dark:f,gray:v,"image-dark-overlay":g&&!k,"image-light-overlay":g&&k,light:C,"progress-circular-fill":b,"progress-incomplete-complete":x,closing:i&&!e});return(0,u.useEffect)(()=>{e?t.current?.showModal():setTimeout(()=>{t.current?.close()},500)},[e]),(0,u.useEffect)(()=>{const I=j=>{xn(j)&&!a.searchActive&&(j.preventDefault(),a.closeNav())};return e?document.addEventListener("keydown",I):document.removeEventListener("keydown",I),()=>{document.removeEventListener("keydown",I)}},[e,a]),(0,u.useEffect)(()=>{!y&&S?L(!0):T&&!S&&L(!1)},[S,y,T,L]),(0,s.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:E,"data-testid":"nav-overlay",id:s3,ref:t,children:(0,s.jsx)(CU,{hasStickyHeader:y,isImage:g,children:a.searchActive?(0,s.jsx)(gU,{}):(0,s.jsx)(vU,{isExpanded:e,outlineRef:o})})})},lc=$("nav-sidebar-search"),bU=({className:e="",isEnabled:t})=>{const n=ot(),o=BC(),r=(0,De.A)(t),{lessons:a}=de(),i=Io(),c=ye(),l=(0,u.useRef)(null),d=lc({disabled:!t}).mix(e),h=lc("icon"),m=lc("input"),f=lc("close"),v=lc("close-icon"),C=i?.term,g=!t,[b,x]=(0,u.useState)(""),y=n3(),L=(0,u.useCallback)(()=>{n([fC(!0),Ti(!1),gr(null)]),x("")},[n]),S=(0,u.useCallback)(E=>{xn(E)&&!Md()(b)?(E.preventDefault(),x(""),n(gr(null))):xn(E)&&Md()(b)&&L()},[n,L,b]),T=(0,u.useCallback)(E=>{C!=null&&n(gr(null)),x(E.target.value)},[n,C]),k=(0,u.useCallback)(E=>{E.preventDefault(),t3(b,a,o??{},y,(j,P,N,R)=>n([gr(j),pC(P),gC(N),vC(R)]))},[n,a,o,b,y]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{C&&C!==b&&x(C)},[b,C]),(0,s.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:k,children:[(0,s.jsx)($i,{className:h}),(0,s.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:g,name:"search",onChange:T,onKeyDown:S,placeholder:c?.search,ref:l,type:"search",value:b}),(0,s.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:L,type:"reset",children:(0,s.jsx)(Jl,{className:v})})]})},kf=new WeakMap,o3=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)kf.get(t.target)?.(t)})});function Dd(e,t){(0,u.useEffect)(()=>{if(e)return kf.set(e,t),()=>kf.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return o3.observe(e),()=>o3.unobserve(e)},[e])}const Kn=$("nav-sidebar-header"),yU=$("nav-sidebar-header-ghost"),SU=()=>pe(e=>e.ui.skipToNavButton?.offsetHeight??0),LU=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e,i=ht(),c=(0,s.jsx)("div",{className:n,children:a});return(0,s.jsxs)("div",{className:Kn("progress"),"data-testid":"nav-sidebar-progress",children:[i===te.APEX&&c,(0,s.jsx)(gf,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o}),i!==te.APEX&&c]})},TU=({className:e,isCompact:t,isEnabled:n,navRefWidth:o,setIsCompact:r})=>{const a=ot(),i=Jt(),[c,l]=(0,u.useState)(""),[d,h]=(0,u.useState)({height:0,width:0}),[m,f]=(0,u.useState)(d),[v,C]=(0,u.useState)(d),g=SU(),[b,x]=(0,u.useState)(null),y=(0,u.useRef)(null),L=(0,u.useRef)(null),[S,T]=(0,u.useState)(null),k=de(),E=ra(),I=ye(),j=ca(),P=Io(),N=ob(),R=as(),w=yl(),A=k?.exportSettings?.webExportSettings,M=!Es.isInstantLink&&(k?.lmsOptions?.disableCoverPage||A?.disableCoverPage),O=k?.allowSearch&&w!=="restricted",B=k?.theme?.coverImageColor,D=k?.navigationStyle,H=(0,u.useMemo)(()=>Ai(D),[D]),V=!!f_(),G=(0,De.A)(P),_=(P?.active||V)??!1,[Y,se]=(0,u.useState)(!0),[Z,W]=(0,u.useState)(null),F=Kn({compact:t,searching:_,transition:Y}).mix(e),z=Kn("inner",{compact:t}),Q=Kn("content",{compact:t,hidden:_}),K=Kn("graphic",{image:H}),q=Kn("progress-runner"),ee=Kn("progress-text",{compact:t}),J=Kn("progress-track"),ne=Kn("search-area",{hidden:!_}),oe=Kn("search-btn",{hidden:_}),xe=Kn("search-icon"),U=Kn("title",{compact:t}),ie=yU({compact:t,searching:_}),he=`${R?`%${j}`:`${j}%`} ${I?.lessonComplete}`,ve=n&&!_?void 0:-1,be=n&&!_?void 0:-1,{alpha:le,media:je}=Ir("coverImage"),Wt=(0,u.useMemo)(()=>{const Te={};return H&&Object.assign(Te,aa({alpha:le,color:B??void 0,media:je})),_&&(Te.height=m.height),Te},[le,B,je,H,_,m.height]),Ht=(0,u.useMemo)(()=>{const Te={};return t&&(Te.bottom=`calc(100% - ${g}px)`,Te.width=o||0,Te.transition="width 0.3s",n||(Te.transition="width 0.3s",Te.width="0rem")),d.height&&(Te.height=d.height,Te.overflow="hidden",t&&(Te.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),Te},[t,n,o,d.height,g]);(0,u.useEffect)(()=>{l(t&&N?zb(E??"",45):E)},[E,t,N]);const $t=_?void 0:{height:v.height},Kt=(0,u.useCallback)(()=>{f(d),a(Ti(!0))},[a,d]),Pn=(0,u.useCallback)(Te=>{Te.preventDefault(),qs(()=>{i("/")},"lesson-to-cover")},[i]);(0,u.useLayoutEffect)(()=>{W(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:Ye=!1}=Qb(b,{root:Z,threshold:0})||{},Nt=(0,De.A)(Ye);(0,u.useEffect)(()=>{const Te=S!=null&&window.innerHeight*.4>=S.offsetHeight;Nt&&!Ye&&Te?r(!0):!Nt&&Ye&&r(!1)},[Ye,Nt,S,r]);const jt=(0,u.useCallback)(({target:Te})=>{const Ve={height:Te?.scrollHeight??0,width:o??0};h(Ve),f(Ve),t||C(Ve)},[t,o]);Dd(S,jt),(0,u.useLayoutEffect)(()=>{const Te=Z?.scrollTop??0;(Z||Te>0)&&Z&&(Z.scrollTop=0);const Ve={height:S?.scrollHeight??0,width:o??0};h(Ve),f(Ve),C(Ve)},[Z,o,S]),(0,u.useEffect)(()=>{O&&G?.active&&!P?.active&&y?.current?.focus()},[O,P,G]),(0,u.useEffect)(()=>{_?se(!0):t&&se(!1)},[_,t]);const Xe=(0,u.useCallback)(Te=>{const Ve=Te.target;if(!(Ve instanceof HTMLElement)||!Ve.hasAttribute("data-nav-item")||!t||!S||!Z)return;const mo=S.getBoundingClientRect(),bs=Ve.getBoundingClientRect();mo.bottom>bs.top&&(Z.scrollTop-=mo.height-bs.top+5)},[Z,t,S]);return(0,rt.A)("focusin",Xe,Z),(0,u.useEffect)(()=>l(E),[E]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:ie,ref:x,style:$t}),(0,s.jsx)("div",{className:F,"data-testid":"nav-sidebar-header",ref:L,style:Ht,children:(0,s.jsxs)("div",{className:z,ref:T,children:[(0,s.jsx)("div",{className:K,style:Wt}),O&&(0,s.jsx)("button",{"aria-label":I?.a11ySearchOpen,className:oe,onClick:Kt,tabIndex:ve,type:"button",children:(0,s.jsx)($i,{className:xe})}),(0,s.jsx)("div",{className:ne,children:(0,s.jsx)(bU,{isEnabled:n&&_})}),(0,s.jsxs)("div",{className:Q,children:[M?(0,s.jsx)("span",{className:U,"data-testid":"nav-sidebar-title",tabIndex:be,children:c}):(0,s.jsx)(sn,{className:U,"data-testid":"nav-sidebar-title",onClick:Pn,tabIndex:be,to:"/",children:c}),(0,s.jsx)(LU,{classProgressRunner:q,classProgressText:ee,classProgressTrack:J,percentComplete:j,percentCompleteText:he})]})]})})]})},kU=$("nav-sidebar");function r3({closeNav:e,id:t,isEnabled:n,isSectionLesson:o,last:r}){const{navigationStyle:a}=de(),{icon:i,settings:c}=Rt(t)??{},l=da(t),d=Qs(),h=cc(),m=$h(String(t)),f=String(t)===d,v=c?.isGeneratingAIContent===!0,C=(0,u.useMemo)(()=>jo(a),[a]),g=o?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",b=`${g}__link`,x=`${g}-link-icon`,y=(0,s.jsx)(Pd,{className:x,icon:i??On.ARTICLE}),[L,S]=(0,u.useState)(!1),T=(0,u.useCallback)(()=>S(!0),[]),k=(0,u.useCallback)(()=>S(!1),[]),E=(0,s.jsx)(Ed,{canComplete:m,id:t,isDark:C,isEnabled:n,isTooltipVisible:L,onHideTooltip:k,onShowTooltip:T,scope:yo.SIDEBAR}),I=()=>{e&&h&&e()};return(0,s.jsx)("li",{className:kU("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:v?(0,s.jsx)("div",{className:g,children:(0,s.jsxs)("span",{"aria-disabled":"true",className:`${b} ${b}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[y,l]})}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(Xi,{className:g,dark:C,isCurrentLesson:f,isTooltipEnabled:!m,lessonId:t,onHideProgressTooltip:k,onNavigate:I,onShowProgressTooltip:T,showProgressDelay:0,tooltipClassName:`${g}-tooltip`,children:[y,l,!m&&E]}),m&&E]})})}const IU=({id:e})=>{const t=Rt(e),n=lt(t?.title);return(0,s.jsx)("span",{className:"nav-sidebar__outline-section-text",children:n})};var Aa=p(49860);const EU=({closeNav:e,id:t,index:n,isEnabled:o,lessonIds:r})=>{const a=de(),i=a?.theme,c=a?.themeId,l=i?.navigationSectionsExpanded??!0,d=da(String(t)),[h,m]=Aa.useState(l);Aa.useEffect(()=>{m(l)},[l]);const[f,v]=Aa.useState(),C=Aa.useRef(null),g=`sidebar-sublist-${n}`,b=C.current?.clientWidth,x=String(c),y=h?"nav-sidebar__outline-section-toggle-icon":"nav-sidebar__outline-section-toggle-icon nav-sidebar__outline-section-toggle-icon--collapsed",L=h?"nav-sidebar__outline-section-list":"nav-sidebar__outline-section-list nav-sidebar__outline-section-list--collapsed",S=Aa.useCallback(()=>{m(T=>!T)},[]);return Aa.useLayoutEffect(()=>{const T=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(T)}},[r.length,b,x]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:S,tabIndex:o?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,s.jsx)(kx,{className:y})]}),(0,s.jsx)(Ld,{inert:!h,children:(0,s.jsx)("ol",{"aria-hidden":h?void 0:!0,className:L,id:g,ref:C,role:"list",style:{maxHeight:f},children:r.map((T,k)=>(0,s.jsx)(r3,{closeNav:e,id:T,isEnabled:o&&h,isSectionLesson:!0,last:k===r.length-1},T))})})]})},NU=({closeNav:e,index:t,isEnabled:n,lessonIds:o})=>{const[r,...a]=o,i="nav-sidebar__outline-item nav-sidebar__outline-section";return wt()(a)?(0,s.jsx)("li",{className:i,role:"listitem",children:(0,s.jsx)(IU,{id:r})}):(0,s.jsx)("li",{className:i,role:"listitem",children:(0,s.jsx)(EU,{closeNav:e,id:r,index:t,isEnabled:n,lessonIds:a})})},jU=({closeNav:e,index:t,isEnabled:n,lessonIds:o})=>Al(o.map(String))?(0,s.jsx)(NU,{closeNav:e,index:t,isEnabled:n,lessonIds:o}):o.map((a,i)=>(0,s.jsx)(r3,{closeNav:e,id:a,isEnabled:n,isSectionLesson:!1,last:i===o.length-1},a)),wU=({className:e="",closeNav:t,isEnabled:n})=>{const o=Pl(),[r,a]=(0,u.useState)(!n),i=ye(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"nav-sidebar__outline--hidden":void 0,Ys.isSafari?"nav-sidebar__outline--safari":void 0].filter(Boolean).join(" "),h=["nav-sidebar__outline-list",n?void 0:"nav-sidebar__outline-list--disabled",r?"nav-sidebar__outline-list--hidden":void 0].filter(Boolean).join(" ");return(0,u.useEffect)(()=>(n?(clearTimeout(l.current??void 0),a(!1)):l.current=setTimeout(()=>{a(!0)},350),()=>{clearTimeout(l.current??void 0)}),[n]),(0,s.jsx)("section",{"aria-label":i?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:cs(o)&&(0,s.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:o.map((m,f)=>wt()(m)?null:(0,s.jsx)(jU,{closeNav:t,index:f,isEnabled:n,lessonIds:m},f))})})};var AU=p(4374);const Ra=$("nav-sidebar-result"),a3=({result:e})=>{const t=ye(),n=e?.icon??On.ARTICLE,o=lt(e?.title),r=e?.results??0,a=r===1?t?.result:t?.results,i=Ra("icon"),c=Ra("title"),l=Ra("count");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Pd,{className:i,icon:n}),(0,s.jsx)("span",{className:c,children:o}),(0,s.jsx)("span",{className:l,children:`${r} ${a}`})]})},RU=({id:e,index:t,isEnabled:n,onSelectResult:o})=>{const r=de(),a=(0,Re.RQ)(Ml),i=(0,Re.RQ)(Ol),c=a??i,l=wN(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,v=n?void 0:-1,C={animationDelay:`${t/10}s`},g=l?.id,b=Pi(g==null?void 0:String(g)),x=(0,u.useMemo)(()=>jo(f),[f]),y=Ra(),L=Ra("inner",{active:d}),S=Ra("link",{dark:x,light:!x});return(0,s.jsx)("li",{className:y,role:"listitem",style:C,children:(0,s.jsx)("div",{className:L,style:{color:m},children:n&&b==null?(0,s.jsx)(sn,{"aria-current":h,className:S,onClick:o,tabIndex:v,to:gn(e),children:(0,s.jsx)(a3,{result:l})}):(0,s.jsx)(mb,{className:S,restriction:b,tooltipClassName:"lesson-nav-link-tooltip",children:(0,s.jsx)(a3,{result:l})})})})},Fd=$("nav-sidebar-results"),PU=[],MU=({closeNav:e,isEnabled:t})=>{const{announcePolite:n}=Ts(),o=de(),r=Io(),a=ye(),c=(r?.activeLessons??PU).filter(YC),l=r?.term,d=cs(c),h=(0,AU.A)(l),m=a?.noResults??"",f=o?.navigationStyle,v=(0,u.useMemo)(()=>jo(f),[f]),C=Fd(),g=Fd("message",{dark:v,light:!v}),b=Fd("term"),x=Fd("list"),y=Bt(960),L=u.useCallback(()=>{y&&e()},[e,y]);return(0,u.useEffect)(()=>{if(h){const S=c.length===1?a?.result:a?.results,T=d?`${c.length} ${S}`:`${a?.noResults} ${l}`;n?.(T)}},[n,d,h,c,a,l]),(0,s.jsxs)("div",{className:C,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,s.jsxs)("div",{className:g,children:[m," ",(0,s.jsxs)("span",{className:b,children:['"',l,'"']})]}),d&&h&&(0,s.jsx)("ol",{className:x,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((S,T)=>(0,s.jsx)(RU,{id:S.id,index:T,isEnabled:t,onSelectResult:L},S.id))})]})},Hd=$("nav-sidebar"),i3="nav-content-sidebar",OU=({isExpanded:e,closeNav:t})=>{const n=de(),o=Io(),[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(0),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=n?.color,m=n?.theme?.coverImageColor,f=n?.isLegacyCourse,v=n?.navigationStyle,C=n?.theme?.accentContrast,g=n?.theme?.progressIndicatorStyle,b=o?.active??!1,x=b||e?void 0:"true";(0,u.useLayoutEffect)(()=>{l&&l?.current&&c(l.current?.scrollWidth)},[r,e,l,b,c]);const y=(0,u.useMemo)(()=>bj(v),[v]),L=(0,u.useMemo)(()=>jo(v),[v]),S=(0,u.useMemo)(()=>Ai(v),[v]),T=S&&m===it.LIGHT,k=Dn(h),E=g===et.CIRCULAR_FILL,I=g===et.INCOMPLETE_COMPLETE,j=C?C===ke.DARK||C===ke.AUTO&&k===ke.DARK:k===ke.DARK,P=Hd("header"),N=Hd("body"),R=Hd("content"),w=Hd({accent:y,"dark-contrast":!S&&j,"light-contrast":!S&&!j,"legacy-pre-themes":f,"image-dark-overlay":S&&!T,"image-light-overlay":S&&T,"progress-circular-fill":E,"progress-incomplete-complete":I,collapsed:!e,dark:L,light:!L,searching:b});return(0,s.jsx)(Ld,{inert:!e,children:(0,s.jsx)(ai,{children:(0,s.jsx)(rg,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,s.jsx)("div",{"aria-hidden":x,className:w,"data-testid":"nav-sidebar",ref:d,children:(0,s.jsxs)("div",{className:R,"data-nav-scrollable":!0,id:i3,children:[(0,s.jsx)(TU,{className:P,isCompact:r,isEnabled:e,navRefWidth:i,setIsCompact:a}),(0,s.jsxs)("div",{className:N,"data-testid":"nav-sidebar-body",ref:l,children:[(0,s.jsx)(wU,{closeNav:t,isEnabled:e&&!b}),(0,s.jsx)(MU,{closeNav:t,isEnabled:e&&b})]})]})})})})})},wr={x:null,y:null},$d={passive:!0};function c3({children:e,onSwipeDown:t,onSwipeLeft:n,onSwipeRight:o,onSwipeUp:r,onShouldRecognizeGesture:a=()=>!0,thresholdX:i=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(wr),[m,f]=(0,u.useState)(wr),v=(0,u.useCallback)(x=>{const y=x.touches?.length??0,L=x.targetTouches[0],S=a?a():!0;y==1&&L&&S?h({x:L.clientX,y:L.clientY}):h(wr)},[a]),C=(0,u.useCallback)(x=>{const y=x.targetTouches[0];y&&f({x:y.clientX,y:y.clientY})},[]),g=(0,u.useCallback)(()=>{h(wr),f(wr)},[]),b=(0,u.useCallback)(x=>{const y=x.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||y>0)return;const L=m.x-d.x,S=m.y-d.y;Math.abs(L)>Math.abs(S)?Math.abs(L)>i&&(L<0?n?.():o?.()):Math.abs(S)>c&&(S<0?r?.():t?.()),h(wr),f(wr)},[t,n,o,r,i,c,m,d]);return(0,rt.A)("touchstart",v,l.current,$d),(0,rt.A)("touchcancel",g,l.current,$d),(0,rt.A)("touchmove",C,l.current,$d),(0,rt.A)("touchend",b,l.current,$d),(0,s.jsx)("div",{ref:l,children:e})}c3.propTypes={children:Tt().oneOfType([Tt().arrayOf(Tt().element),Tt().element]).isRequired,onShouldRecognizeGesture:Tt().func,onSwipeDown:Tt().func,onSwipeLeft:Tt().func,onSwipeRight:Tt().func,onSwipeUp:Tt().func,thresholdX:Tt().number.isRequired,thresholdY:Tt().number.isRequired};function Vd({isEnabled:e=!0,...t}){return e?(0,s.jsx)(c3,{...t}):(0,s.jsx)("div",{children:t.children})}Vd.propTypes={children:Tt().oneOfType([Tt().arrayOf(Tt().element),Tt().element]).isRequired,isEnabled:Tt().bool.isRequired};const zd={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},BU=[zd.TABLET_PORTRAIT,zd.TABLET_LANDSCAPE,zd.MOBILE_PORTRAIT,zd.MOBILE_LANDSCAPE],dc=e=>BU.includes(e),DU=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,n=dc(e);return t||n},[e]),If=(0,u.createContext)({isCourseNavOpen:!1});If.displayName="CourseNavigationContext";function FU(e){const{children:t,isCourseNavOpen:n}=e;return(0,s.jsx)(If.Provider,{value:{isCourseNavOpen:n},children:t})}function HU(){return(0,u.useContext)(If)}const l3=$("course-navigation"),{COMPACT:_d,OVERLAY:Ef,SIDEBAR:Ar}=ar,$U={[_d]:Kb,[Ar]:i3,[Ef]:s3},VU=({hasSearchResults:e,courseNavType:t,openNav:n,closeNav:o})=>{const[r,a]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===Ar)?(o(),a(!1)):r&&t===Ef?n():a(e)},[e,t,n,o,r]),r},zU=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:n,isTablet:o,openNav:r,closeNav:a})=>{const[i,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===Ar&&t&&(!i&&o&&n?a():i===!0&&!o&&!n&&r(),c(o))},[e,t,n,o,r,a,i])},_U=({beginWithSidebarOpen:e,children:t,closeNav:n,courseNavType:o,isNavOpen:r,isTablet:a,lessonNavType:i,openNav:c,previewType:l,toggleNav:d,hideNav:h})=>{const m=(0,u.useRef)(null),f=(0,u.useRef)(null),{active:v=!1}=Io()??{},C=ye(),g=VU({hasSearchResults:v,courseNavType:o,openNav:c,closeNav:n}),b=(0,u.useMemo)(()=>g||o===_d&&a?Ar:o,[o,g,a]);zU({activeNavType:b,beginWithSidebarOpen:e,closeNav:n,openNav:c,isNavOpen:r,isTablet:a}),(0,u.useEffect)(()=>{const k=I=>{I.relatedTarget instanceof Node&&f.current?.contains(I.relatedTarget)===!0&&n()},E=()=>{f.current?.removeEventListener("click",n),f.current?.removeEventListener("keypress",n),f.current?.removeEventListener("blur",k,!0)};return b===_d&&r?(f.current?.addEventListener("click",n),f.current?.addEventListener("keypress",n),f.current?.addEventListener("blur",k,!0)):E(),E},[b,r,n]);const x=DU(l),y=(0,u.useCallback)(()=>{const k=b===ar.SIDEBAR;x&&k&&r&&n()},[n,r,x,b]),L=(0,u.useMemo)(()=>b!=null?$U[b]:void 0,[b]),S=l3(b?.toLowerCase()??null,{"nav-open":r,"search-open":v&&r,"course-nav-type":o?.toLowerCase()}),T=l3("lessonNav",{type:i?.toLowerCase()});return(0,s.jsx)(FU,{isCourseNavOpen:r,children:(0,s.jsx)("div",{className:S,children:(0,s.jsx)(Vd,{isEnabled:b===ar.SIDEBAR,onSwipeLeft:y,children:(0,s.jsxs)("div",{className:T,children:[(0,s.jsxs)("nav",{"aria-label":C?.a11yRegionNavLesson,children:[(0,s.jsx)(g_,{"aria-controls":L,hideNav:h,isNavOpen:r,toggleNav:d}),b===Ar&&(0,s.jsx)(OU,{closeNav:n,isExpanded:r}),b===_d&&(0,s.jsx)(__,{closeNav:n,isExpanded:r,openNav:c,ref:m}),b===Ef&&(0,s.jsx)(G_,{closeNav:n,openNav:c,children:(0,s.jsx)(xU,{isExpanded:r})})]}),(0,s.jsx)("div",{ref:f,children:t})]})})})})},UU=({children:e,isLessonOnlyEmbed:t,...n})=>{const{buttonNavigationStyle:o,navigationType:r,lmsOptions:a,...i}=de(),c=cc(),l=Mh(i)===!0,d=!c,h=i.sidebarMode===Qr.OPEN,m=l&&r===Ar&&h&&d,f=ss(i),v=f&&i?.theme?.blockNavigationType===qc.CONTINOUS,[C,g]=(0,u.useState)(m),b=(0,u.useCallback)(()=>{g(!0)},[]),x=(0,u.useCallback)(()=>{g(!1)},[]),y=(0,u.useCallback)(()=>C?x():b(),[C,x,b]);(0,rt.A)(sx,b),(0,rt.A)(ox,x);const L=f||t===!0,S=L?"fixed-course-exit":void 0,T=v?{marginInlineEnd:"2rem"}:void 0,k=l?r:void 0;return L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Vb,{className:S,lmsOptions:a,style:T}),e]}):(0,s.jsx)(_U,{...n,beginWithSidebarOpen:h,closeNav:x,courseNavType:k,hideNav:!l,isNavOpen:C,isTablet:c,lessonNavType:o,openNav:b,toggleNav:y,children:e})};var d3=p(26665);const Pa=e=>e===Us.FLOATING||e===Us.FLOATING_FULL;function Rr(){const e=$N();return Bt(480)&&e===Us.FLOATING?Us.FLOATING_FULL:e}function u3({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const GU=$("lesson-nav");function WU(e){const{children:t,finish:n,lessonId:o,onFocus:r}=e,a=Jt();if(o!=null)return(0,s.jsx)(Xi,{className:"lesson-nav-link","data-direction":e["data-direction"],lessonId:o,onFocus:r,tooltipClassName:"lesson-nav-link-tooltip",children:t});const i=n?fv:"/",c=l=>{if(l.preventDefault(),i==="/"){qs(()=>{a(i)},"lesson-to-cover");return}a(i)};return(0,s.jsx)("span",{className:"lesson-nav-link",children:(0,s.jsx)(sn,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:c,onFocus:r,to:i,children:t})})}function Ma({children:e,className:t,direction:n,finish:o,navLessonId:r,onFocus:a,ref:i,restrictionType:c}){const d=vr()?.theme?.buttonScheme,h=c!=null,m=Rr(),v={className:GU(null,{[n]:!0,accent:d===ui.ACCENT,dark:d===ui.DARK,floating:m===Us.FLOATING,"floating-full":m===Us.FLOATING_FULL,finish:o,full:m===Us.FULL,light:d===ui.LIGHT,restricted:h,tint:d===ui.TINT}).mix(t),[`data-${n}-lesson`]:!0};return(0,s.jsx)("div",{ref:i,...v,children:(0,s.jsx)(WU,{"data-direction":n,finish:o,lessonId:r,onFocus:a,children:e})})}const h3=$("lesson-nav");function KU({allowTooltip:e,lessonNameLabel:t,nextLesson:n,nextLessonNumber:o,onFocus:r,ref:a,restrictionData:i,restrictionType:c}){const l=n?.id,d=Rr(),h=Pa(d),f=qr(n)&&l,v=Me(n?.title)||"",C=h?fm:u3,g=f?`${t} ${o} - `:"",b=h&&f?`${t} ${o}`:`${g}${v}`;return(0,s.jsxs)(Ma,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:a,restrictionData:i,restrictionType:c,children:[(0,s.jsx)("span",{className:h3("link-text").mix("brand--ui"),children:b}),(0,s.jsx)(C,{className:h3("link-icon")})]})}function QU(e){const t=ye(),n=ow(e),o=rw(e),r=Vh(),a=n?.id,i=Pi(a),c=lt(i?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:n,nextLessonNumber:o,restrictionData:a?c:void 0,restrictionType:a?i?.type:void 0,totalLessons:r}}const Ud=$("lesson-nav");function YU({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:n,nextLesson:o,nextLessonNumber:r,onFocus:a,ref:i,restrictionData:c,restrictionType:l,totalLessons:d}){const h=o?.id,m=Rr(),f=Pa(m),C=o&&qr(o)&&h,g=Me(o?.title)||"",b=C?`${r} ${n} ${d} \u2014 ${g}`:g,x=f&&C?`${t} ${r}`:b;return(0,s.jsx)(Ma,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:a,ref:i,restrictionData:c,restrictionType:l,children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Ud("link-text"),children:x}),(0,s.jsx)(ql,{className:Ud("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ql,{className:Ud("link-icon")}),(0,s.jsx)("span",{className:Ud("link-text"),children:x})]})})}function m3({lessonId:e,...t}){const n=QU(e);return ht()===te.RISE_CLASSIC?(0,s.jsx)(KU,{...t,lessonNameLabel:n.lessonNameLabel,nextLesson:n.nextLesson,nextLessonNumber:n.nextLessonNumber,restrictionData:n.restrictionData,restrictionType:n.restrictionType}):(0,s.jsx)(YU,{...t,...n})}const f3=$("lesson-nav");function ZU({allowTooltip:e,courseFinishLabel:t,onFocus:n,restrictionData:o,restrictionType:r,ref:a}){const i=Rr(),c=Pa(i),l=c?fm:u3;return(0,s.jsxs)(Ma,{allowTooltip:e,direction:"next",finish:!0,isFloating:c,onFocus:n,ref:a,restrictionData:o,restrictionType:r,children:[(0,s.jsx)("span",{className:f3("link-text").mix("brand--ui"),children:t}),(0,s.jsx)(l,{className:f3("link-icon")})]})}const Gd=$("lesson-nav");function XU({allowTooltip:e,courseFinishLabel:t,onFocus:n,ref:o,restrictionData:r,restrictionType:a}){const i=Rr(),c=Pa(i);return(0,s.jsx)(Ma,{allowTooltip:e,direction:"next",finish:!0,onFocus:n,ref:o,restrictionData:r,restrictionType:a,children:c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Gd("link-text"),children:t}),(0,s.jsx)(ql,{className:Gd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ql,{className:Gd("link-icon")}),(0,s.jsx)("span",{className:Gd("link-text"),children:t})]})})}function Nf(e){const n=ye()?.courseFinish??"Finish";return ht()===te.RISE_CLASSIC?(0,s.jsx)(ZU,{...e,courseFinishLabel:n}):(0,s.jsx)(XU,{...e,courseFinishLabel:n})}function qU({className:e,ref:t}){return(0,s.jsx)("svg",{"aria-hidden":"true",className:e,fill:"none",focusable:"false",ref:t,viewBox:"0 0 15 16",xmlns:"http://www.w3.org/2000/svg",children:(0,s.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const Wd=$("lesson-nav");function JU({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:o,onFocus:r,previousLesson:a,previousLessonNumber:i,ref:c}){const l=a?.id,d=Rr(),h=Pa(d),f=qr(a)&&l,v=Me(a?.title)||n,C=h?fx:qU,g=f?`${o} ${i} - ${v}`:v,b=f&&h?`${o} ${i}`:g;return(0,s.jsx)(Ma,{allowTooltip:e,className:t,direction:"previous",isFloating:h,navLessonId:l,onFocus:r,ref:c,children:h?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Wd("link-text").mix("brand--ui"),children:b}),(0,s.jsx)(C,{className:Wd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(C,{className:Wd("link-icon")}),(0,s.jsx)("span",{className:Wd("link-text").mix("brand--ui"),children:b})]})})}const Kd=$("lesson-nav");function eG({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:o,lessonPrepositionLabel:r,onFocus:a,previousLesson:i,previousLessonNumber:c,ref:l,totalLessons:d}){const h=i?.id,m=Rr(),f=Pa(m),C=qr(i)&&h!=null,g=lt(i?.title)??n,b=C?`${c} ${r} ${d} \u2014 ${g}`:g,x=f&&C?`${o} ${c}`:b;return(0,s.jsx)(Ma,{allowTooltip:e,className:t,direction:"previous",navLessonId:h,onFocus:a,ref:l,children:f?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:Kd("link-text"),children:x}),(0,s.jsx)(Tx,{className:Kd("link-icon")})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Tx,{className:Kd("link-icon")}),(0,s.jsx)("span",{className:Kd("link-text"),children:x})]})})}function jf({lessonId:e,...t}){const n=pw(e),o=gw(e),r=Vh(),a=ye();return ht()===te.RISE_CLASSIC?(0,s.jsx)(JU,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,previousLesson:n,previousLessonNumber:o}):(0,s.jsx)(eG,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,lessonPrepositionLabel:a?.lessonPreposition,previousLesson:n,previousLessonNumber:o,totalLessons:r})}const tG={threshold:0},Qd=(e,t)=>{const[n,o]=(0,u.useState)(!1),r=(0,u.useRef)(null);return(0,u.useEffect)(()=>{r.current&&r.current.disconnect(),r.current=new IntersectionObserver(([i])=>{o(i.isIntersecting)},t||tG);const{current:a}=r;return e.current?a.observe(e.current):o(!1),()=>{a.disconnect()}},[e,t]),n},p3=$("navButtonsFull"),nG=({isVisible:e})=>{(0,d3.A)(()=>window.dispatchEvent(new CustomEvent(lm))),(0,u.useEffect)(()=>{const t=e?rx:lm;window.dispatchEvent(new CustomEvent(t))},[e])},sG=({isVisible:e})=>{(0,d3.A)(()=>window.dispatchEvent(new CustomEvent(dm))),(0,u.useEffect)(()=>{const t=e?ax:dm;window.dispatchEvent(new CustomEvent(t))},[e])},oG=({children:e,hideNavToHome:t,isTransitioning:n=!1,navNextEnabled:o,navFinishEnabled:r})=>{const a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=Qs(),h=Qd(i),m=Qd(c),f=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),v=(0,u.useCallback)(()=>{const g=a.current?.scrollHeight;a.current?.scrollTo({top:g,behavior:"smooth"})},[]);(0,rt.A)(Wl,f),(0,rt.A)(Kl,v),nG({isVisible:h}),sG({isVisible:m}),(0,u.useEffect)(()=>{if(!n&&i.current){const b=(i.current?.clientHeight??0)+1;a.current?.scrollTo({top:b})}},[n]);const C=p3("navPrev",{visible:h,hide:n});return(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:(0,s.jsxs)("div",{className:p3(),children:[!t&&d&&(0,s.jsx)("div",{className:C,children:(0,s.jsx)(jf,{lessonId:d,ref:i})}),e,o&&d&&(0,s.jsx)(m3,{lessonId:d,ref:c}),r&&(0,s.jsx)(Nf,{lessonId:d,ref:l})]})})};var uc=p(62736);const hc=$("navButtonsFloating"),g3=({transitionIn:e,buttonType:t,children:n})=>{const o=(0,u.useRef)(null),r={entered:hc(t,{entered:!0}),exiting:hc(t,{exiting:!0}),exited:hc(t,{exited:!0})};return(0,s.jsx)(rg,{in:e,nodeRef:o,timeout:250,children:a=>(0,s.jsx)("div",{className:r[a],ref:o,children:n})})},v3={threshold:.2},rG=({topRef:e,bottomRef:t,pageWrapRef:n,isTransitioning:o})=>{const r=Qd(e,v3),a=Qd(t,v3),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)(o),m=(0,u.useCallback)(()=>{n.current?.scrollTo({top:2,behavior:"smooth"})},[n]);return(0,uc.A)(m),(0,u.useEffect)(()=>{const f=h.current;h.current=o,f&&!o&&m()},[o,m]),(0,u.useEffect)(()=>{c(a&&!o),d(r&&!o)},[a,r,o]),{showPrev:l,showNext:i}},aG=({children:e,isCurrentLessonQuiz:t,isTransitioning:n=!1,navNextEnabled:o,hideNavToHome:r,navFinishEnabled:a})=>{const i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=Qs(),{showNext:v,showPrev:C}=rG({topRef:h,bottomRef:m,pageWrapRef:i,isTransitioning:n}),g=(0,u.useCallback)(()=>{i.current?.scrollTo({top:0,behavior:"smooth"})},[]),b=(0,u.useCallback)(()=>{const x=i.current?.scrollHeight;i.current?.scrollTo({top:x,behavior:"smooth"})},[]);return(0,rt.A)(Wl,g),(0,rt.A)(Kl,b),(0,u.useEffect)(()=>{t&&(o||a)&&b()},[t,o,a,b]),(0,s.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:i,children:[(0,s.jsx)("div",{className:hc("top"),ref:h}),!r&&f&&(0,s.jsx)(g3,{buttonType:"prev",transitionIn:C,children:(0,s.jsx)(jf,{lessonId:f,onFocus:g,ref:c})}),e,(0,s.jsx)(g3,{buttonType:"next",transitionIn:v&&!!(o||a),children:o&&f?(0,s.jsx)(m3,{lessonId:f,onFocus:b,ref:l}):a?(0,s.jsx)(Nf,{lessonId:f,onFocus:b,ref:d}):null}),(0,s.jsx)("div",{className:hc("bottom"),ref:m})]})},C3=(0,u.createContext)("present"),x3=(0,u.createContext)(!0);function iG({status:e,mediaActive:t,children:n}){return(0,s.jsx)(C3.Provider,{value:e,children:(0,s.jsx)(x3.Provider,{value:t,children:n})})}function wf(){return(0,u.useContext)(C3)}function cG(){return(0,u.useContext)(x3)}function Yd(e){return{finished:e.finished,cancel:()=>e.cancel(),progress:()=>{const t=e.effect?.getComputedTiming().progress;return typeof t=="number"?t:null}}}function b3(e,t,n,o){return{key:e,instanceId:o,status:t,direction:n}}function lG(e,t,n){const o=e.generation+1,r=e.items.find(l=>l.key===t);let a;r!=null?a={...r,status:"entering",direction:n}:a=b3(t,"entering",n,o);const i=e.items.filter(l=>l.key!==t).map(l=>({...l,status:"exiting",direction:n})),c=i.length>1?i.slice(0,1):i;return{currentKey:t,generation:o,items:[a,...c]}}function dG(e,t,n,o){return o==="exit"?{...e,items:e.items.filter(r=>!(r.key===t&&r.instanceId===n))}:{...e,items:e.items.map(r=>r.key===t&&r.instanceId===n?{...r,status:"present"}:r)}}function uG(e,t){switch(t.type){case"ROUTE_CHANGED":return lG(e,t.nextKey,t.direction);case"ITEM_FINISHED":return t.generation!==e.generation?e:dG(e,t.key,t.instanceId,t.phase)}}const y3="(prefers-reduced-motion: reduce)";function hG(e){if(typeof window>"u"||!window.matchMedia)return()=>{};const t=window.matchMedia(y3);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function mG(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(y3).matches}const fG=()=>!1;function pG(e){return(e.find(n=>n.status==="exiting")??e.find(n=>n.status==="present")??e[0])?.instanceId??null}function S3({current:e,animate:t,getDirection:n,reducedMotion:o,initialStatus:r="present",initialDirection:a="forward",animationTimeoutMs:i=1500,onEntered:c,onExited:l}){const d=(0,u.useSyncExternalStore)(hG,mG,fG),h=o??d,[m,f]=(0,u.useReducer)(uG,e,T=>({currentKey:T,generation:0,items:[b3(T,r,a,0)]}));m.currentKey!==e&&f({type:"ROUTE_CHANGED",nextKey:e,direction:n(m.currentKey,e)});const v=(0,u.useRef)(new Map),C=(0,u.useRef)(new Map),g=T=>{let k=v.current.get(T);return k||(k=E=>{E?C.current.set(T,E):C.current.delete(T)},v.current.set(T,k)),k},b=(0,u.useRef)(new Map),x=(0,u.useRef)(new Map),y=(0,u.useRef)(c),L=(0,u.useRef)(l);y.current=c,L.current=l;const S=(0,u.useRef)([]);return(0,u.useEffect)(()=>{const T=S.current;if(T.length!==0){S.current=[];for(const k of T)try{k.type==="enter"?y.current?.(k.key,k.instanceId):L.current?.(k.key,k.instanceId)}catch(E){console.error("useTransitionPresence callback threw:",E)}}},[m.items]),(0,u.useLayoutEffect)(()=>{const T=I=>{const j=x.current.get(I);j!=null&&(clearTimeout(j),x.current.delete(I))},k=(I,j,P,N)=>{T(j),f({type:"ITEM_FINISHED",key:I,instanceId:j,phase:P,generation:N}),S.current.push({type:P==="enter"?"enter":"exit",key:I,instanceId:j})},E=new Set(m.items.map(I=>I.instanceId));for(const[I,j]of Array.from(b.current.entries()))E.has(I)||(j.handle.cancel(),b.current.delete(I),T(I));m.items.forEach(I=>{if(I.status==="present")return;const j=I.status==="entering"?"enter":"exit",P=b.current.get(I.instanceId);if(P&&P.phase===j&&P.generation===m.generation&&P.reducedMotion===h)return;let N=null;P&&(P.phase!==j&&P.direction!==I.direction&&(N=P.handle.progress?.()??null),P.handle.cancel(),b.current.delete(I.instanceId),T(I.instanceId));const R=m.generation,w=C.current.get(I.instanceId);if(!w){k(I.key,I.instanceId,j,R);return}const A=t(w,{phase:j,direction:I.direction,reducedMotion:h,fromProgress:N});if(!A){k(I.key,I.instanceId,j,R);return}b.current.set(I.instanceId,{handle:A,phase:j,direction:I.direction,generation:R,instanceId:I.instanceId,reducedMotion:h});const M=setTimeout(()=>{const O=b.current.get(I.instanceId);O?.handle===A&&O.generation===R&&(O.handle.cancel(),b.current.delete(I.instanceId),k(I.key,I.instanceId,j,R))},i);x.current.set(I.instanceId,M),Promise.resolve(A.finished).then(()=>{const O=b.current.get(I.instanceId);O?.handle===A&&O.generation===R&&(b.current.delete(I.instanceId),k(I.key,I.instanceId,j,R))},()=>{const O=b.current.get(I.instanceId);O?.handle===A&&O.generation===R&&(b.current.delete(I.instanceId),k(I.key,I.instanceId,j,R))})})},[m.items,m.generation,t,h,i]),(0,u.useEffect)(()=>{const T=new Set(m.items.map(k=>k.instanceId));for(const k of Array.from(v.current.keys()))T.has(k)||v.current.delete(k)},[m.items]),(0,u.useEffect)(()=>()=>{b.current.forEach(({handle:T})=>T.cancel()),b.current.clear(),x.current.forEach(T=>clearTimeout(T)),x.current.clear()},[]),{presence:m.items.map(T=>({key:T.key,instanceId:T.instanceId,status:T.status,direction:T.direction,ref:g(T.instanceId)})),isTransitioning:m.items.some(T=>T.status!=="present"),mediaOwnerInstanceId:pG(m.items)}}const Af=750,L3=300,gG=59.9375,vG="ease",T3="100vh",Jfe=Af+L3+750,CG=e=>e.querySelector(".page__wrapper")??e,xG=e=>{const t=document.getElementById("page-wrap"),n=t?.scrollTop??0;t&&(t.scrollTop=0),e.scrollTop=n},bG=()=>typeof window<"u"&&window.matchMedia(`(max-width: ${gG}em)`).matches?L3:0,k3=(e,t,n)=>{t!=null&&(e.currentTime=n+(1-t)*Af)},yG=(e,{phase:t,direction:n,reducedMotion:o,fromProgress:r})=>{if(t==="exit"&&xG(e),o)return null;const a=t==="enter"?CG(e):e;if(typeof a.animate!="function")return null;const i=bG(),c={duration:Af,easing:vG,fill:t==="exit"?"forwards":"auto",delay:i};if(t==="exit"){const h=n==="forward"?"-100%":"100%",m=a.animate([{transform:"translate3d(0, 0, 0)",opacity:1},{transform:`translate3d(0, ${h}, 0)`,opacity:.5}],c);return k3(m,r,i),Yd(m)}const l=n==="forward"?"100%":"-100%",d=a.animate([{height:T3,transform:`translate3d(0, ${l}, 0)`},{height:T3,transform:"translate3d(0, 0, 0)"}],c);return k3(d,r,i),Yd(d)},I3=(e,t)=>e===yi?1/0:t.findIndex(n=>String(n.id)===String(e));function SG(e,t,n){if(e===null||e===t)return"forward";const o=I3(e,n);return I3(t,n)>o?"forward":"backward"}function LG({children:e,currentLessonId:t,lessons:n,onLessonEntered:o,onTransitioningChange:r}){const a=(0,u.useRef)(new Map);a.current.set(t,e);const{presence:i,isTransitioning:c,mediaOwnerInstanceId:l}=S3({current:t,animate:yG,getDirection:(h,m)=>SG(h,m,n),animationTimeoutMs:1800,onEntered:h=>{o?.(String(h))}});(0,u.useEffect)(()=>{r?.(c)},[c,r]);const d=new Set(i.map(h=>String(h.key)));for(const h of a.current.keys())d.has(h)||a.current.delete(h);return(0,s.jsx)(s.Fragment,{children:i.map(h=>{const m=String(h.key),f=h.status==="present";return(0,s.jsx)("div",{"aria-hidden":!f,"data-direction":h.direction,"data-lesson-transition":!0,"data-state":h.status,inert:f?void 0:!0,ref:h.ref,children:(0,s.jsx)(iG,{mediaActive:h.instanceId===l,status:h.status,children:a.current.get(m)})},h.instanceId)})})}var TG=p(87467),E3=p.n(TG),kG=p(89858),Rf=p.n(kG);const IG=Rf()(qe()("family","continue"),qe()("variant","continue")),EG=Be()(E3()(IG),Nn()([],"items")),{FULL:NG,FLOATING:N3}=Us,jG=$("lessonNavigation"),wG=({children:e})=>{const t=(0,u.useRef)(null);return(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},AG=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,RG=(e=[])=>e.reduce(AG,0),PG=({children:e,isLessonOnlyEmbed:t,onLessonEntered:n})=>{const o=de(),r=o.buttonNavigationStyle,{showNavigationButtons:a,lessonsOnly:i,lmsOptions:c}=o,l=(0,u.useRef)(null),d=Bt(480),h=Qs(),m=Rt(h),f=wo(h),[v,C]=(0,u.useState)(r),[g,b]=(0,u.useState)(!1),x=i?.[0]?.id,y=o.exportSettings?.webExportSettings?.disableCoverPage===!0,L=!Es.isInstantLink&&(c?.disableCoverPage===!0||y)&&x===h,S=!Es.isInstantLink&&c?.disableCoverPage===!0,T=c?.disableCoverPage===!0?L:S;(0,u.useEffect)(()=>{r!==v&&(C(r),window.dispatchEvent(new CustomEvent(Wl)))},[r,v]);const k=m!=null&&m.type!=null?m:void 0,E=k!=null&&(EG(k)||pv(k))?f?.isComplete===!0:!0,I=k?.type==="quiz",j=f?.type==="quiz"?f.activeIndex:void 0,P=I&&j!=null&&j===RG(k.items)+1,{skipLessonsIfPassed:N,skipLessonsOptional:R,skipToLessonId:w}=zh(h),A=f?.type==="quiz"&&f.passed===!0,M=I&&A&&N&&!R&&!!w,O=I&&!P||k?.settings?.continueType==="continue"||M,B=m!=null?qC({course:o,lesson:m}):void 0,D=B!=null&&B!==!1,H=h===yi,V=window.isPublicShare===!0,G=D&&t!==!0&&E&&!O&&!H,_=!D&&E&&!1,Y=jG("wrapper",{full:r===NG||d,floating:r===N3&&!d}),Z=a!==!0||t===!0?wG:r===N3&&!d?aG:oG;(0,u.useEffect)(()=>{const z=document.querySelector(".page__content");z&&z.classList.add("page__content--preview-nav")},[Z]);const W=o?.lessons??[],F=h?(0,s.jsx)(LG,{currentLessonId:h,lessons:W,onLessonEntered:n,onTransitioningChange:b,children:e}):e;return(0,s.jsx)("div",{className:Y,ref:l,children:(0,s.jsx)(Z,{hideNavToHome:T,isTransitioning:g,navFinishEnabled:_,navNextEnabled:G,children:F})})};var MG=p(97954),OG=p(45114),BG=p.n(OG);function DG(e){return e==="a"?46.5:7.6}function FG(e){return e==="d"?2:3.2}function HG(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function j3(e){switch(e){case"b":return 95;case"background":return 52;default:return 76}}function Pf(e){switch(e){case"a":case"b":case"carousel":default:return 6.4;case"c":return 18.6;case"d":return 8;case"background":return 6}}function $G(e){return .3}function tpe(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function VG(e){return e==="light"?"#fff":"#000"}function npe(e){switch(e){case"a":case"b":default:return[6.4,9.6,16];case"c":return[10,14.8,18.6];case"d":return[8,12,16];case"background":return[6,9.6,16];case"carousel":return[6.4,10,16]}}function spe(e){return e==="b"?[52,76,95]:[52,76,92]}function ope(e){return e==="a"?[30,76,92]:[52,76,92]}function rpe(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function ape(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function zG(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function Mf(e,t){switch(t){case 6:case 6.4:case 8:default:return"sm";case 9.6:case 12:case 14.8:return"med";case 16:case 18.6:return"lg";case 10:return e==="c"?"sm":"med"}}function _G(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function w3(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function A3(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function Zd(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function UG(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function GG(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function WG(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function KG(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function QG(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}const Ke=({value:e,className:t,allowTabNavigation:n=!0,tagName:o,id:r,emptyFallback:a=null})=>{const{value:i}=_m(Me(e));return i?(0,s.jsx)(we,{allowTabNavigation:n,className:t,id:r,tagName:o,value:e}):a};function YG(e,t){const{className:n="",tag:o="div",style:r={},...a}=e,{backgroundColor:i}=nn(),c=CA(),l=c===St.DARK?St.LIGHT:St.DARK;return i!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":(0,pa.A)(c)?.slice(0,3)}),(0,s.jsx)(o,{...a,className:n,ref:t,style:r})}const R3=(0,u.forwardRef)(YG),ZG=10,P3=e=>`${e}rem`,Of=e=>e!=null?`${e/ZG}rem`:void 0,XG=["image full","image text overlay","quote background"];function qG(e){const{family:t,variant:n,backgroundType:o,isOnlyBlockInStep:r,isOnePage:a}=e;if(!a||!r)return!1;if(o===ae.IMAGE)return!0;if(!t||!n)return!1;const i=`${t} ${n}`;return XG.some(c=>c===i)}const M3={paddingBottom:"0rem",paddingTop:"0rem"},JG=e=>{const{blockSettings:t,familyTheme:n,courseTheme:o,isFullWidthImage:r,isPresentation:a}=e;if(a)return{...M3,paddingLeft:"0rem",paddingRight:"0rem"};if(r)return M3;const i=P3(Number(C2(t?.paddingTop,n?.paddingStart,o?.blockPaddingStart,3)));return{paddingBottom:P3(Number(C2(t?.paddingBottom,n?.paddingEnd,o?.blockPaddingEnd,3))),paddingTop:i}},eW=e=>({"--rise-block-padding-top":e.paddingTop,"--rise-block-padding-bottom":e.paddingBottom,"--rise-block-padding-left":e.paddingLeft,"--rise-block-padding-right":e.paddingRight}),tW={},nW=e=>e?{bodyFontSize:Of(e.bodyFontSize),headingFontSize:Of(e.headingFontSize),subheadingFontSize:Of(e.subheadingFontSize)}:tW;function sW(){const e=Pt(),t=He(),n=Ao(),o=ss(t),r=qG({backgroundType:e?.settings?.backgroundType,family:e?.family,isOnePage:o,isOnlyBlockInStep:e?.isOnlyBlockInStep,variant:e?.variant});return JG({blockSettings:e?.settings,courseTheme:t?.theme,familyTheme:n,isFullWidthImage:r,isPresentation:lr(t)})}function oW(){const e=Ao();return nW(e)}function rW(){const e=sW();return{fontSize:oW(),padding:e}}const aW=Zc()(["settings"]),O3=$("block-wrapper"),iW=$("bg"),cW=(e,t)=>{const{children:n,className:o,defaultBackgroundColor:r="",style:a,tag:i,type:c,...l}=e,d=Pt(),h=Yh(),m=rW(),f=ks(),v=Qh(r,h.backgroundColor),C=v||"transparent",g=d?.className,b={...a,...h.backgroundImageCss,"--color-background":v,...m.fontSize.bodyFontSize&&{"--block-text-body-font-size":m.fontSize.bodyFontSize},...m.fontSize.headingFontSize&&{"--block-text-heading-font-size":m.fontSize.headingFontSize},...m.fontSize.subheadingFontSize&&{"--block-text-subheading-font-size":m.fontSize.subheadingFontSize},boxShadow:`0px 1px 0px ${C} `,...f?eW(m.padding):{paddingBottom:m.padding.paddingBottom,paddingTop:m.padding.paddingTop}},x=X()(o,{"bg--legacy-background":h.isLegacyBackground,[`block-${c}`]:!!c}),y=iW({card:h.cardMode,range:h.colorRange,type:h.backgroundTypeLowercase,"overlay-light":h.isOverlayLight,"contrast-light":h.isContrastLight}),L=g?O3({}).mix(y).mix(g):O3({}).mix(y),S=[x,L.toString()].join(" ");return(0,s.jsxs)(R3,{...aW(l),className:S,ref:t,style:b,tag:i,children:[(0,s.jsx)("span",{"aria-label":h.backgroundImageAlt,role:X1(h.backgroundImageAlt)}),n]})},Ae=(0,u.forwardRef)(cW);var lW=p(49860);function dW(e,t){const n=J1(e.src),o=e.width&&e.height&&!n,r=o?"async":void 0,a=o?"lazy":void 0,i=o?e.width:void 0,c=o?e.height:void 0;return(0,s.jsx)("img",{...e,decoding:r,height:c,loading:a,ref:t,width:i})}const Bf=lW.forwardRef(dW),B3=(0,u.createContext)(Bf);function uW({children:e,ImageEagerOrLazy:t}){return(0,s.jsx)(B3,{value:t,children:e})}function hW(){return(0,u.use)(B3)}function Sn(e){const t=hW();return(0,s.jsx)(t,{...e})}var mW=p(48518),cpe=p(50364);function D3(e){return(0,s.jsx)(mW.i,{IconUnzoom:pW,IconZoom:fW,...e})}const fW=()=>(0,s.jsx)(ue,{name:"arrows-two-from-center"}),pW=()=>(0,s.jsx)(ue,{name:"arrows-two-to-center"}),F3=$("block-text");function gW({children:e,item:t,labels:n}){const o="media"in t?t.media:void 0,r=Me(o)?.image,a=dt(r),i=To(r?.alt??""),l=Pt()?.settings,d=l?.images,h=l?.zoomOnClick,m=(0,u.useRef)(void 0);let f=(0,s.jsx)(Sn,{alt:i,"data-l10n-id":At(o),ref:m,src:a});return h&&(f=(0,s.jsx)(D3,{a11yNameButtonUnzoom:n?.a11yUnzoomImage,a11yNameButtonZoom:n?.a11yZoomImage,children:f})),(0,s.jsxs)("div",{className:F3("col"),children:[d&&r&&(0,s.jsx)("div",{className:F3("image"),children:f}),e]})}var vW=p(74753),CW=p.n(vW),xW=p(78723);const bW=$("portal-tooltip"),Ut={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},yW=(e,t,n)=>{const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=window.visualViewport;let i=n;(i===Ut.ABOVE||i===Ut.BELOW)&&(o.bottom-r.height<0&&(i=Ut.BELOW),r.height+o.top>a.height&&(i=Ut.ABOVE)),(i===Ut.LEFT||i===Ut.RIGHT)&&(r.left<0&&(i=Ut.RIGHT),r.width+o.left>a.width&&(i=Ut.LEFT));const c={left:0,right:0,top:0,bottom:0};i===Ut.ABOVE&&(c.top=o.top-r.height-25),i===Ut.BELOW&&(c.top=o.top+o.height),i===Ut.RIGHT&&(c.left=o.left+o.width+70),i===Ut.LEFT&&(c.left=o.left-r.width-25),(i===Ut.LEFT||i===Ut.RIGHT)&&(c.top=o.top-o.height/2),(i===Ut.ABOVE||i===Ut.BELOW)&&(c.left=o.left+o.width/2);const l=o.left+o.width/2,d=r.width/2+l>a.width,h=r.width/2>l;d?t.classList.add("portal-tooltip__tooltip--offset-right"):h&&t.classList.add("portal-tooltip__tooltip--offset-left"),Object.keys(c).map(m=>c[m]===0?t.style.removeProperty(m):t.style.setProperty(m,`${c[m]}px`)),t.classList.add(`portal-tooltip__tooltip--${i.toLowerCase()}`)};function SW({children:e,className:t,direction:n=Ut.ABOVE,elementFocused:o,exitAnimation:r=!0,message:a,style:i,renderInModalWhenPresent:c=!1}){const[l,d]=(0,u.useState)(!1),[h]=(0,u.useState)(!1),m=(0,u.useRef)(null),f=(0,u.useRef)(null),[v,C]=(0,xW.A)((()=>e)),g=(0,u.useCallback)(()=>d(!0),[d]),b=(0,u.useCallback)(()=>d(!1),[d]);return(0,u.useEffect)(()=>(document.addEventListener("scroll",g),document.addEventListener("scrollend",b),()=>{document.removeEventListener("scroll",g),document.removeEventListener("scrollend",b)})),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{ref:m,children:v}),a&&(C||h||o)&&!l&&(0,s.jsx)(Fs,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,s.jsx)(LW,{buttonRef:m,className:t,direction:n,elementFocused:o,hovering:C,message:a,portalRef:f,renderInModalWhenPresent:c,style:i})})]})}function LW({buttonRef:e,className:t,direction:n,elementFocused:o,hovering:r,message:a,portalRef:i,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>yW(e.current,i.current,n),[e,n,i]),h=(0,u.useCallback)(()=>{i.current&&d()},[i,d]),m=()=>{!r&&!o&&i.current&&(i.current.style=null)};return(0,uc.A)(h),(0,fs.createPortal)((0,s.jsx)("div",{"aria-hidden":!r||!o,className:bW("tooltip").mix(t).toString(),onTransitionEnd:m,ref:i,style:c,children:a}),l?Zs({id:"portal",childType:"other"}):document.getElementById("portal"))}const Ho=SW,H3=$("audio-player-actions"),TW=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onDelete:o,onTranscriptClick:r,onTranscriptClose:a})=>{const{mode:i,disableTranscriptButton:c}=wd(),l=ac(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=Me(n)?.audio?.transcript,C=(0,u.useCallback)(()=>h(!0),[]),g=(0,u.useCallback)(()=>h(!1),[]),b=(0,u.useCallback)(()=>f(!0),[]),x=(0,u.useCallback)(P=>{!(P.relatedTarget instanceof Element&&P.relatedTarget.closest(".transcript-panel")!==null)&&P.currentTarget.matches(":focus-visible")&&f(!0)},[]),y=(0,u.useCallback)(()=>f(!1),[]),L=It(),S=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,T=c?"Transcripts are only available in lesson previews":S?L?.audioHideTranscript:i==="edit"?"Edit transcript":L?.audioShowTranscript,k=(0,u.useCallback)(()=>{const P=document.getElementById(ff(e));P&&P.focus()},[e]),[E,I]=(0,u.useState)(!1);function j(){c||(S?a?.():(r?.(),I(!0)))}return(0,u.useEffect)(()=>{E&&(I(!1),k())},[E,k]),(0,s.jsxs)(s.Fragment,{children:[o&&(0,s.jsx)(Ho,{elementFocused:d,message:"Remove audio",children:(0,s.jsx)("button",{"aria-label":"Remove audio",className:H3("button",{condensed:t}),onBlur:g,onClick:o,onFocus:C,onMouseOut:g,onMouseOver:C,type:"button",children:(0,s.jsx)(ue,{name:"trash"})})}),(i==="edit"||v)&&(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Ho,{elementFocused:m,message:T,renderInModalWhenPresent:i==="readonly",style:{whiteSpace:"nowrap"},children:(0,s.jsx)("button",{"aria-disabled":c,"aria-label":T,className:H3("button",{condensed:t}),id:i==="readonly"?Hb(e):void 0,onBlur:y,onClick:j,onFocus:x,onMouseOut:y,onMouseOver:b,style:c?{opacity:.5}:void 0,type:"button",children:(0,s.jsx)(ue,{name:"file-audio"})})})})]})};var kW=p(29048);const $3="change";class IW extends kW.EventEmitter{_isMuted;_isPlaying;_playerId;constructor(t){super(),this.setMaxListeners(t)}get isPlaying(){return this._isPlaying}set isPlaying(t){this._isPlaying=t,this.emit("change")}set playerId(t){this._playerId=t}get playerId(){return this._playerId}pause(){this.isPlaying=!1}addChangeListener(t){this.on($3,t)}removeChangeListener(t){this.removeListener($3,t)}}const Le=new IW(1/0),EW=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),upe=.05,V3=$("audio-player-icon"),Pr=({x:e,width:t,height:n,y:o,pulseBaseHeight:r,pulseBaseY:a,pulseHeight:i,pulseY:c,delay:l="0s"})=>(0,s.jsx)("rect",{className:V3("bar"),height:n,rx:1,style:{"--base-height":`${n/10}rem`,"--base-y":`${o/10}rem`,"--pulse-base-height":r&&`${r/10}rem`,"--pulse-base-y":a&&`${a/10}rem`,"--pulse-height":`${i/10}rem`,"--pulse-y":`${c/10}rem`,"--delay":l},width:t,x:e,y:o}),z3=({animating:e})=>(0,s.jsx)("span",{className:V3({animating:e}),children:(0,s.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,s.jsx)(Pr,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,s.jsx)(Pr,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,s.jsx)(Pr,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,s.jsx)(Pr,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,s.jsx)(Pr,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,s.jsx)(Pr,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,s.jsx)(Pr,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var NW,_e=p(49860);const Xd=_e.createContext(null);function jW({children:e,isDisabled:t,onClose:n,onOpen:o,onSelect:r,positionX:a="left"}){const[i,c]=_e.useState(!1),l=(0,De.A)(i),[d,h]=_e.useState(null),m=_e.useRef(null),f=_e.useRef(null),v=_e.useRef(null),b=`${`menu-${_e.useId()}`}-content`,x=_e.useCallback(({direction:A,predFn:M=()=>!0})=>{if(!v.current)return;const O=Array.from(v.current.querySelectorAll('[role="menuitem"]')),B=O.length,D=O.findIndex(_=>_===document.activeElement);let H,V,G;switch(A){case"start":H=0,V=1;break;case"end":H=B-1,V=-1;break;case"backwards":H=D-1,V=-1;break;case"forwards":H=D+1,V=1;break;default:H=D+1,V=1}for(let _=0;_<=B;_++){H>=B?H=0:H<0&&(H=B-1);const Y=O[H];if(Y!=null&&RW(Y)&&M(Y)){G=Y;break}else H=H+V}G&&G.focus()},[]),y=_e.useCallback(()=>{x({direction:"start"})},[x]),L=_e.useCallback(()=>{x({direction:"end"})},[x]),S=_e.useCallback(()=>{x({direction:"backwards"})},[x]),T=_e.useCallback(()=>{x({direction:"forwards"})},[x]),k=_e.useCallback(A=>{x({direction:"forwards",predFn:M=>PW(M,A)})},[x]),E=_e.useCallback(()=>{i?c(!1):(c(!0),setTimeout(T,25))},[T,i]),I=_e.useCallback(()=>{f.current?.focus(),c(!1)},[]),j=_e.useCallback(()=>{c(!0),setTimeout(T,25)},[T]),P=_e.useCallback(()=>{c(!0),setTimeout(S,25)},[S]),N=_e.useCallback(()=>{const{left:A,top:M}=Wm({anchor:f.current,popover:v.current,positionX:a});h({transform:`translate3d(${A}px, ${M}px, 0)`,visibility:"visible"})},[a]),R=_e.useCallback(A=>{const M=A.currentTarget;_3(M)||(r?.(M.getAttribute("data-name")),I())},[I,r]),w=_e.useCallback(A=>{const M=A.key;if(A.altKey||A.ctrlKey||A.metaKey)return;let O=!1;if(A.shiftKey)M==="Tab"?S():M.trim()!==""&&k(M),O=!0;else switch(M){case" ":case"Enter":R(A),O=!0;break;case"Esc":case"Escape":I(),O=!0;break;case"ArrowUp":S(),O=!0;break;case"Tab":case"ArrowDown":T(),O=!0;break;case"Home":case"PageUp":y(),O=!0;break;case"End":case"PageDown":L(),O=!0;break;default:k(M);break}O&&(A.stopPropagation(),A.preventDefault())},[I,R,k,y,L,T,S]);return _e.useEffect(()=>{const A=M=>{i&&m.current!=null&&v.current!=null&&!m.current.contains(M.target)&&!v.current.contains(M.target)&&c(!1)};return i?document.addEventListener("click",A):document.removeEventListener("click",A),()=>{document.removeEventListener("click",A)}},[i]),_e.useEffect(()=>(i?window.addEventListener("resize",N):window.removeEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N,i]),_e.useEffect(()=>{const A=Yi(m.current);for(const M of A)i?M?.addEventListener("scroll",N,{passive:!0}):M?.removeEventListener("scroll",N);return()=>{for(const M of A)M?.removeEventListener("scroll",N)}},[N,i]),_e.useEffect(()=>{i?N():h(null)},[N,i]),_e.useEffect(()=>{if(l&&!i)n?.();else if(!l&&i&&(o?.(),m.current)){const A=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(A)}},[l,i,n,o]),_e.useEffect(()=>{const A=M=>{M.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",A),()=>{document.removeEventListener("menuopen",A)}},[]),(0,s.jsx)(Xd.Provider,{value:{htmlIdContent:b,isExpanded:i,onCloseFocusTrigger:I,onExpandFocusMenuItemNext:j,onExpandFocusMenuItemPrevious:P,onFocusMenuItemByPrefix:k,onFocusMenuItemFirst:y,onFocusMenuItemLast:L,onFocusMenuItemNext:T,onFocusMenuItemPrevious:S,onItemClick:R,onItemKeyDown:w,onTriggerClick:E,refContent:v,refTrigger:f,styleContent:d},children:(0,s.jsx)("div",{"aria-owns":b,inert:t?!0:void 0,ref:m,children:e})})}function wW({as:e,children:t,label:n,labelledBy:o,...r}){const{htmlIdContent:a,isExpanded:i,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=_e.useContext(Xd),f=_e.useCallback(C=>{let g=!1;switch(C.key){case" ":case"Enter":case"ArrowDown":case"Down":d(),g=!0;break;case"Esc":case"Escape":l(),g=!0;break;case"Up":case"ArrowUp":h(),g=!0;break;default:break}g&&(C.stopPropagation(),C.preventDefault())},[l,d,h]),v=e??"button";return(0,s.jsx)(v,{...r,"aria-controls":a,"aria-expanded":i,"aria-haspopup":"menu","aria-label":n,"aria-labelledby":o,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function AW({children:e,className:t}){const{htmlIdContent:n,isExpanded:o,refContent:r,styleContent:a}=_e.useContext(Xd);return o?fs.createPortal((0,s.jsx)("div",{className:t,"data-menu-content":"",hidden:o?void 0:!0,id:n,ref:r,role:"menu",style:a,children:e}),Zs()):null}function qd({children:e,className:t,isDisabled:n,name:o,tooltipId:r}){const{onItemClick:a,onItemKeyDown:i}=_e.useContext(Xd),c=_e.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,s.jsx)("button",{"aria-describedby":r,"aria-disabled":n,className:t,"data-menu-item":"","data-name":o,onClick:n?void 0:a,onKeyDown:i,onMouseOver:c,role:"menuitem",tabIndex:n?-1:void 0,type:"button",children:e})}function mpe({children:e}){return NW("span",{"data-menu-item-icon":"",children:e})}function _3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function RW(e){return e!=null&&e.tagName==="BUTTON"&&!_3(e)}function PW(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const Oa=$("audio-player-actions-condensed"),$o=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),MW=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onTranscriptClick:o,onTranscriptClose:r,item:a,side:i,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=wd(),v=ac(),C=Pt(),g=ct(),b=a&&"media"in a&&a.media?g(a.media):void 0,x=b&&"audio"in b?b.audio.aiAudioSettings:void 0,y=Fn(),L=qh(),S=y?L(y):"",[T,k]=(0,u.useState)(!1),E=(0,u.useCallback)(()=>k(!0),[]),I=(0,u.useCallback)(()=>k(!1),[]),j=x?.l10nAutoGenStatus==="reverted-to-source",P=d&&"audio"in b&&b.audio?.sourceType==="ai-audio"&&x?.l10nAutoGenStatus!=="unsupported-locale",N=It(),R=v?.audioPlayerIdOpen===e,w=R?N?.audioHideTranscript:l==="edit"?"Edit transcript":N?.audioShowTranscript;function A(O){switch(O){case $o.DeleteAudio:m(C.id,a,c);break;case $o.EditTranscript:R?r?.():o?.();break;case $o.EditAudio:h(C,a,c,i,{triggeredFrom:"block_audio_button"});break;case $o.RevertToSource:f(C.id,a);break}}const M=!!g(n)?.audio?.transcript;return h||m||M?(0,s.jsx)(Ho,{elementFocused:T,message:"Options",children:(0,s.jsxs)(jW,{onSelect:A,positionX:"left",children:[(0,s.jsx)(wW,{className:Oa("trigger",{condensed:t}),label:"Options",onBlur:I,onFocus:E,onMouseEnter:E,onMouseLeave:I,children:(0,s.jsx)(ue,{name:"ellipsis-regular"})}),(0,s.jsxs)(AW,{className:Oa("content"),children:[h?(0,s.jsx)(qd,{className:Oa("menu-item"),name:$o.EditAudio,children:"Edit audio"}):null,l==="edit"||M?(0,s.jsx)(qd,{className:Oa("menu-item"),name:$o.EditTranscript,children:w}):null,m&&C?.variant!=="audio"?(0,s.jsx)(qd,{className:Oa("menu-item"),name:$o.DeleteAudio,children:"Remove audio"}):null,f&&P?(0,s.jsx)(Ho,{message:j?"Audio currently synced to source":void 0,children:(0,s.jsxs)(qd,{className:Oa("menu-item"),isDisabled:j,name:$o.RevertToSource,children:["Revert to source audio (",S,")"]})}):null]})]})}):null};var OW,BW,Ue=p(49860);const mc=Ue.createContext(null);function DW({children:e,className:t,isDisabled:n,onClose:o,onItemActiveChange:r,onOpen:a,onSelect:i,portalArgs:c,positionX:l="left",value:d}){const[h,m]=Ue.useState(null),f=(0,De.A)(h),[v,C]=Ue.useState(!1),g=(0,De.A)(v),[b,x]=Ue.useState(null),y=Ue.useRef(null),L=Ue.useRef(null),S=Ue.useRef(null),k=`select-${Ue.useId()}`,E=`${k}-content`,I=h?.id,j=Ue.useCallback(M=>{const O=M.currentTarget;U3(O)||(C(!1),m(O),i(O.getAttribute("data-value")),M.stopPropagation())},[i]),P=Ue.useCallback(M=>{m(M)},[]),N=Ue.useCallback(()=>{C(M=>!M)},[]),R=Ue.useCallback(()=>{const{left:M,top:O}=Wm({anchor:L.current,popover:S.current,positionX:l}),H=window.getComputedStyle(L.current).direction==="rtl"?-M:M;x({transform:`translate3d(${H}px, ${O}px, 0)`,visibility:"visible",width:`${L.current?.offsetWidth}px`})},[l]),w=Ue.useCallback(M=>{const O=Array.from(S.current?.querySelectorAll("[data-select-item]")??[]),B=O.length,D=O.findIndex(G=>G.getAttribute("data-select-item")==="current");let H,V=D+1;for(let G=0;G<B;G++){V>=B&&(V=0);const _=O[G];if(_!=null&&!U3(_)&&VW(_,M)){H=G;break}else V=B-1}H&&(m(O[H]),O[H]?.scrollIntoView({block:"center"}))},[]),A=Ue.useCallback(M=>{const O=M.key;if(M.ctrlKey||M.metaKey)return;let B=!1;const D=Array.from(S.current?.querySelectorAll("[data-select-item]")??[]),H=D.findIndex(V=>V.getAttribute("data-select-item")==="current");if(v)if(O.length===1&&O!==" "&&!M.altKey&&!M.ctrlKey&&!M.metaKey)w(O);else switch(O){case" ":case"Enter":C(!1),D[H]!=null&&i(D[H].getAttribute("data-value")),B=!0;break;case"Esc":case"Escape":C(!1),m(D.find(V=>V.getAttribute("aria-selected")==="true")),B=!0;break;case"ArrowUp":M.altKey?(C(!1),D[H]!=null&&i(D[H].getAttribute("data-value")??"")):H>0&&(m(D[H-1]),D[H-1].scrollIntoView({block:"center"})),B=!0;break;case"ArrowDown":H<D.length-1&&(m(D[H+1]),D[H+1].scrollIntoView({block:"center"})),B=!0;break;case"Home":m(D[0]),D[0]?.scrollIntoView({block:"center"}),B=!0;break;case"End":m(D[D.length-1]),D[D.length-1]?.scrollIntoView({block:"center"}),B=!0;break;case"PageUp":m(D[0]),D[0]?.scrollIntoView({block:"center"}),B=!0;break;case"PageDown":m(D[D.length-1]),D[D.length-1]?.scrollIntoView({block:"center"}),B=!0;break;case"Tab":C(!1),D[H]!=null&&i(D[H].getAttribute("data-value"));break}else if(O.length===1&&O!==" "&&!M.altKey&&!M.ctrlKey&&!M.metaKey)C(!0),w(O);else switch(O){case" ":case"Enter":C(!0),B=!0;break;case"ArrowUp":C(!0),m(D[0]),B=!0;break;case"ArrowDown":C(!0),B=!0;break;case"Home":C(!0),m(D[0]),B=!0;break;case"End":C(!0),m(D[D.length-1]),B=!0;break}B&&(M.stopPropagation(),M.preventDefault())},[w,v,i]);return Ue.useEffect(()=>{const M=S.current?.querySelector('[data-select-item][aria-selected="true"]');m(M)},[]),Ue.useEffect(()=>{const M=S.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(M)},[d]),Ue.useEffect(()=>{const M=O=>{v&&y.current!=null&&S.current!=null&&!y.current.contains(O.target)&&!S.current.contains(O.target)&&C(!1)};return v?document.addEventListener("click",M):document.removeEventListener("click",M),()=>{document.removeEventListener("click",M)}},[v]),Ue.useEffect(()=>(v?window.addEventListener("resize",R):window.removeEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[R,v]),Ue.useEffect(()=>{const M=Yi(y.current);for(const O of M)v?O?.addEventListener("scroll",R,{passive:!0}):O?.removeEventListener("scroll",R);return()=>{for(const O of M)O?.removeEventListener("scroll",R)}},[R,v]),Ue.useEffect(()=>{v?R():x(null)},[R,v]),Ue.useEffect(()=>{v&&f!=null&&f!==h&&r?.({value:h.getAttribute("data-value")})},[v,f,h,r]),Ue.useEffect(()=>{if(g&&!v)o?.();else if(!g&&v&&(a?.(),y.current)){const M=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:y.current}});y.current.dispatchEvent(M)}},[g,v,o,a]),Ue.useEffect(()=>{const M=O=>{O.detail.target!==y.current&&C(!1)};return document.addEventListener("comboboxopen",M),()=>{document.removeEventListener("comboboxopen",M)}},[]),(0,s.jsx)(mc.Provider,{value:{activeEl:h,htmlIdActiveDescendant:I,htmlIdBase:k,htmlIdContent:E,isExpanded:v,onItemClick:j,onItemHover:P,onTriggerClick:N,onTriggerKeyDown:A,portalArgs:c,refContent:S,refTrigger:L,selectedValue:d,styleContent:b},children:(0,s.jsx)("div",{"aria-owns":E,className:t,inert:n?!0:void 0,ref:y,children:e})})}function FW({children:e,className:t,labelledBy:n,as:o,...r}){const{htmlIdActiveDescendant:a,htmlIdContent:i,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=Ue.useContext(mc),m=!!o,f=o??"button";return(0,s.jsxs)(f,{"aria-activedescendant":a,"aria-controls":i,"aria-expanded":c,"aria-haspopup":"listbox","aria-labelledby":n,className:t,"data-select-trigger":m?void 0:"",onClick:l,onKeyDown:d,ref:h,role:"combobox",type:"button",...r,children:[(0,s.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,s.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,s.jsx)(ue,{name:"chevron-up"}):(0,s.jsx)(ue,{name:"chevron-down"})})]})}function HW({children:e,className:t,label:n,labelledBy:o,style:r={}}){const{htmlIdContent:a,isExpanded:i,portalArgs:c,refContent:l,styleContent:d}=Ue.useContext(mc);return fs.createPortal((0,s.jsx)("div",{"aria-label":n,"aria-labelledby":o,className:t,"data-select-content":"",hidden:i?void 0:!0,id:a,ref:l,role:"listbox",style:{...d,...r},children:e}),Zs(c))}function ppe({children:e,className:t,labelText:n}){const{htmlIdBase:o}=Ue.useContext(mc),r=Ue.useId(),a=`${o}-group-label-${r}`;return OW("div",{"aria-labelledby":a,className:t,"data-select-group":"",role:"group",children:[BW("div",{"data-select-group-label":"",id:a,role:"presentation",children:n}),e]})}function $W({children:e,className:t,labelledBy:n,isDisabled:o,value:r}){const{activeEl:a,htmlIdBase:i,onItemClick:c,onItemHover:l,selectedValue:d}=Ue.useContext(mc),h=Ue.useRef(null),m=Ue.useId(),f=h.current===a,v=r===d,C=`${i}-option-${m}`,g=Ue.useCallback(()=>{l(h.current)},[l]);return(0,s.jsxs)("div",{"aria-disabled":o,"aria-labelledby":n,"aria-selected":v,className:t,"data-select-item":f?"current":"","data-value":r,id:C,onClick:o?void 0:c,onMouseEnter:g,ref:h,role:"option",children:[e,v&&(0,s.jsx)("span",{"data-select-item-selected":"",children:(0,s.jsx)(ue,{name:"check"})})]})}function U3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function VW(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const Df=$("playback-speed-menu"),zW=({onChange:e,condensed:t=!1,speed:n})=>{const o=It(),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>a(!0),[]),c=(0,u.useCallback)(()=>a(!1),[]);return(0,s.jsx)(Ho,{elementFocused:r,message:o?.audioPlaySpeed,children:(0,s.jsxs)(DW,{className:Df(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(n),children:[(0,s.jsxs)(FW,{"aria-label":o?.audioPlaySpeed,className:Df("trigger",{condensed:t}),labelledBy:void 0,onBlur:c,onFocus:i,onMouseEnter:i,onMouseLeave:c,children:[n,"x"]}),(0,s.jsx)(HW,{className:Df("content"),label:o?.audioPlaySpeed,children:EW.map((l,d)=>(0,s.jsx)($W,{value:String(l.value??""),children:l.label},d))})]})})};function _W(e=!1,t=200){const n=(0,u.useRef)(void 0),[o,r]=(0,u.useState)(e),a=(0,u.useCallback)(()=>{n.current&&clearTimeout(n.current),r(!0)},[]),i=(0,u.useCallback)(c=>{n.current&&clearTimeout(n.current),c?r(!1):n.current=setTimeout(()=>{r(!1)},t)},[t]);return(0,u.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{isActive:o,setActive:a,setInactive:i}}const Ff=$("audio-player-volume"),UW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function GW(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function WW({condensed:e=!1,muted:t,onChange:n,onMute:o,volume:r}){const a=It(),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),{isActive:d,setActive:h,setInactive:m}=_W(!1,200),f=t?0:r;function v(g){if(UW.includes(g.code)){const y=window.getComputedStyle(g.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",L=g.code==="ArrowUp"||g.code===y?Math.min(f+.05,1):Math.max(f-.05,0);n(L),g.stopPropagation(),g.preventDefault()}else g.code==="KeyM"&&(o(),g.stopPropagation(),g.preventDefault())}(0,u.useEffect)(()=>{l.current.style.setProperty("--slider-volume",`${f*100}%`)},[f]);const C=`${Math.round(f*100)}%`;return(0,s.jsxs)("div",{className:Ff(),onKeyDown:v,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:i,children:[(0,s.jsx)("button",{"aria-label":f<=0?a?.a11yMediaUnmute:a?.a11yMediaMute,className:Ff("button",{condensed:e}),onClick:o,ref:c,type:"button",children:(0,s.jsx)(ue,{name:GW(f,t)})}),(0,s.jsx)("input",{"aria-label":a?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":C,className:Ff("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:g=>n(g.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const wn=$("audio-player"),Jd=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,G3=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),n=Math.floor(e%3600/60),o=e%60;return{hours:t,minutes:n,seconds:o}},W3=e=>{const{minutes:t,seconds:n}=G3(e);let o="";return t>0&&(o+=`${new Intl.NumberFormat(void 0,{style:"unit",unit:"minute",unitDisplay:"long"}).format(t)} `),o+=new Intl.NumberFormat(void 0,{style:"unit",unit:"second",unitDisplay:"long"}).format(Math.round(n)),o},KW=e=>{const{hours:t,minutes:n,seconds:o}=G3(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const a=r(n,"0",2),i=r(o,"0",2);return t>0?`${t}:${a}:${i}`:`${n}:${i}`};class Ba extends u.Component{audio;play;playerControls;seekSlider;onDelete;constructor(t){super(t),this.state={condensed:!1,currentTime:0,playheadPositionSaveThrottle:0,playbackSpeed:1,playerExpanded:!0,shouldLoadPlayheadPosition:!0,volume:1,muted:!1,maxTime:t.audioVideoPlayhead||0,sliderPercent:0},this.handleChange=this.handleChange.bind(this),this.handleClickInsideAudioPlayer=this.handleClickInsideAudioPlayer.bind(this),this.onPlayClick=this.onPlayClick.bind(this),this.onTogglePlayer=this.onTogglePlayer.bind(this)}static defaultProps={allowTabNavigation:!0,mediaSrc:null,onEnd:()=>{},onLoad:()=>{},onPause:()=>{},onPlay:()=>{},onSeek:()=>{},shouldPause:!1,transcriptMedia:null};static timeMs(t){return Math.round(t*1e3)}keySeek(t){const{canRestrictSeek:n}=this.props,{currentTime:o,duration:r}=this.audio,{maxTime:a}=this.state;let i=o+t;n&&i>a&&(i=a);const c=Math.max(0,r-.01);this.audio.currentTime=t<0?Math.max(i,0):Math.min(i,c)}changeVolume=t=>{this.audio.volume=Math.round(t*100)/100,this.audio.muted=!1};muteToggle=()=>{this.audio.volume<=0?(this.audio.volume=1,this.audio.muted=!1):this.audio.muted=!this.audio.muted};changeVolumeDelta=t=>{const n=t<0?Math.max(this.audio.volume+t,0):Math.min(this.audio.volume+t,1);this.changeVolume(n)};componentDidMount(){Le.addChangeListener(this.handleChange)}componentDidUpdate(t,n){const r=this.props.activeIndex!=null&&this.props.itemIndex!=null&&t.activeIndex!==this.props.activeIndex&&this.props.activeIndex!==this.props.itemIndex;(!t.shouldPause&&this.props.shouldPause||r)&&(this.audio.pause(),Le.isPlaying&&Le.playerId===this.props.id&&Le.pause()),n.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:n}=this.props;Le.playerId===n&&Le.pause(),Le.removeChangeListener(this.handleChange),t&&t(Jd(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){Le.playerId===this.props.id?this.audio&&(Le.isPlaying&&this.audio.paused?this.audio.play():!Le.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):Le.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const n=new ResizeObserver(([o])=>{if(!o)return;const r=getComputedStyle(document.documentElement),a=parseFloat(r.fontSize)/10;this.setState({condensed:o.contentRect.width<300*a})});return this.setState({condensed:t.getBoundingClientRect().width<256}),n.observe(t),()=>{n.disconnect()}};render(){const{allowTabNavigation:t,id:n,isEditor:o,isOverlayAudio:r,labels:a,mediaSrc:i,mode:c,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m,item:f,side:v,refs:C,transcriptAudioPlayerIdOpen:g}=this.props,b=Le.isPlaying&&Le.playerId===n,{currentTime:x,playerExpanded:y}=this.state,L=this.audio?.duration??0,S=Number.isNaN(L)?0:L,T=Math.round(S-x),k=KW(T),E=W3(T),I=W3(x),j=t?0:-1,P=!o,{a11yGroupAudioPlayer:N,a11yMediaPlay:R,a11yMediaPause:w,a11yMediaSeek:A}=a??{},M=wn({overlay:r,collapsed:r&&!y,expanded:!r||y,"volume-slider-below":this.props.volumeSliderPosition==="below"}),O=o||c==="edit"?"Collapse audio player":a?.audioCollapsePlayer,B=o||c==="edit"?"Expand audio player":a?.audioExpandPlayer,D=y?O:B,H=vs({refs:C}),G=g===H?ff(g):void 0;return(0,s.jsx)("div",{className:wn("container"),"data-search-content-ignore":"",onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,s.jsxs)("div",{className:M,id:n,children:[P&&(0,s.jsx)("div",{className:wn("waveform"),children:r?(0,s.jsx)(Ho,{message:D,children:(0,s.jsx)("button",{"aria-label":D,className:wn("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,s.jsx)(z3,{animating:b})})}):(0,s.jsx)("div",{className:wn("waveform-icon",{disabled:!0}),children:(0,s.jsx)(z3,{animating:b})})}),(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":N,"aria-owns":G,className:wn("housing",{"with-border":P}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:j,children:[(0,s.jsxs)("div",{className:wn("play-timer-housing"),children:[(0,s.jsx)("button",{"aria-label":b?w:R,className:wn("play",{condensed:this.state.condensed}),onClick:this.onPlayClick,ref:_=>{this.play=_},tabIndex:j,type:"button",children:(0,s.jsx)(ue,{className:wn("icon"),name:b?"pause-solid":"play-solid"})}),(0,s.jsx)("input",{"aria-label":A,"aria-valuemax":S,"aria-valuemin":0,"aria-valuenow":x,"aria-valuetext":I,className:wn("seek-slider"),max:S,min:0,onChange:this.onSeekSliderChange.bind(this),ref:_=>{this.seekSlider=_},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:x}),(0,s.jsx)("div",{"aria-label":E,className:wn("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:k})]}),(0,s.jsxs)("div",{className:wn("player-controls"),ref:_=>{this.playerControls=_},children:[(0,s.jsx)(zW,{condensed:this.state.condensed,onChange:_=>{this.setState({playbackSpeed:_})},speed:this.state.playbackSpeed}),(0,s.jsx)(WW,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||o?(0,s.jsx)(TW,{audioPlayerId:H,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,s.jsx)(MW,{audioPlayerId:H,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:C,side:v,transcriptMedia:m})]})]}),(0,s.jsx)("audio",{className:wn("audio-element"),"data-testid":"audio-player-element",onEnded:this.onEnded.bind(this),onLoadedMetadata:this.onLoadedMetadata.bind(this),onPause:this.onAudioPlayPause,onPlay:this.onAudioPlayPause,onSeeked:this.onSeeked.bind(this),onTimeUpdate:this.onTimeUpdate.bind(this),onVolumeChange:this.onVolumeChangeHandler,ref:_=>{this.audio=_},src:gt(`${i}`)},"audio-"+n)]},`player-${n}`)})}onKeyDown(t){const o=gs(this.onPlayClick),r=gs(()=>this.keySeek(5)),a=gs(()=>this.keySeek(-5)),i=gs(()=>this.changeVolumeDelta(.05)),c=gs(()=>this.changeVolumeDelta(-.05)),l=gs(()=>this.muteToggle()),d=g=>g.target===this.play,h=g=>g.target===this.seekSlider,m=g=>this.playerControls===g.target||this.playerControls.contains(g.target),f=fn()([[Mi,o],[Mo,Bo],[Po,Bo],[yr,Bo],[br,Bo]]),v=fn()([[Mi,o],[MO,r],[OO,a]]),C=fn()([[Mi,o],[Mo,r],[Po,a],[br,i],[yr,c],[g=>g.code==="KeyM",l]]);fn()([[d,f],[h,v],[m,Bo],[or(),C]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:n}=this.props,{duration:o,paused:r}=this.audio;r&&n&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=o*n/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:n,onPause:o,onPlay:r,onTranscriptUpdate:a,recordMediaPlayheadPosition:i,refs:c,transcriptMedia:l}=this.props,{paused:d,currentTime:h,duration:m}=t.currentTarget;if(d)d&&Le.playerId===n&&(Le.isPlaying=!1,o(Ba.timeMs(h)),i&&i(Jd({currentTime:h,duration:m})));else{Le.playerId=n,Le.isPlaying=!0,r(Ba.timeMs(h));const f=vs({refs:c});a?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:n,muted:o}=t.currentTarget;this.setState({volume:n,muted:o})};onSeekSliderChange(t){const{canRestrictSeek:n}=this.props,{maxTime:o}=this.state;let r=t.currentTarget.valueAsNumber;n&&r>o&&(r=o),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:n,duration:o,muted:r,volume:a}=t.currentTarget,i=n/o*100;this.setState({currentTime:n,muted:r,volume:a,sliderPercent:i});const{onLoad:c}=this.props;c()}onEnded(t){const n=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:n.currentTime}),Le.isPlaying=!1,this.props.onEnd(Ba.timeMs(n.currentTime)),this.forceUpdate()}onSeeked(t){const{id:n,onSeek:o,recordMediaPlayheadPosition:r}=this.props,{currentTime:a,duration:i}=t.currentTarget;Le.isPlaying&&Le.playerId!==n&&(Le.isPlaying=!1),Le.playerId=n,o(Ba.timeMs(a)),r&&r(Jd({currentTime:a,duration:i}))}onTimeUpdate(t){const n=t.currentTarget,{recordMediaPlayheadPosition:o}=this.props,{currentTime:r,duration:a}=n,i=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/a*100;fg(),this.setState({currentTime:r,sliderPercent:c}),i%5===0&&this.state.playheadPositionSaveThrottle!==i&&o&&(o(Jd(n)),this.setState({playheadPositionSaveThrottle:i}))}onTogglePlayer(t){this.setState(({playerExpanded:n})=>({playerExpanded:!n})),t.preventDefault(),t.stopPropagation()}}const QW=Ba,no=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),YW=no(["uploading","processing","cropping","crushing"]),vpe=no(["canceled"]),K3=no(["complete"]),ZW=no(["cropping"]),XW=no(["crushing"]),qW=no(["uploading"]),JW=no(["processing"]),eK=no(["errored"]),Q3=no(["cropping","crushing","errored","processing","uploading"]);function tK(e){return e==null||typeof e!="object"?0:Object.values(e).filter(YW).length}function Cpe(e){return Math.round(e.loaded*100/e.total)}const xpe=e=>e?.file?.name||e?.opts?.filename||"";function bpe(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&tK(e)>0}const eu=e=>X()("upload-progress__wrapper",e),Y3=(0,u.createContext)(null);function Z3(){return(0,u.useContext)(Y3)}const ype=Y3.Provider;function nK(e){function t(n){const o=Z3();return o?(0,s.jsx)(e,{...n,getUpload:o.getUpload,handleUploadDismiss:o.handleUploadDismiss}):(0,s.jsx)(e,{...n})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const tu=({onClick:e,text:t})=>(0,s.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,s.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),Hf=20,fc=Hf/2,$f=fc-2,X3=+(2*Math.PI*$f).toFixed(3),sK=e=>X3*(100-e)/100;function q3({classes:e,percent:t}){return(0,s.jsxs)("svg",{className:X()("upload-progress__pie",e),focusable:"false",height:`${Hf}px`,width:`${Hf}px`,children:[(0,s.jsx)("circle",{className:"upload-progress__border",cx:fc,cy:fc,r:$f}),(0,s.jsx)("circle",{className:"upload-progress__progress",cx:fc,cy:fc,r:$f,strokeDasharray:X3,strokeDashoffset:sK(t)})]})}const oK=({text:e})=>(0,s.jsxs)("div",{className:"upload-progress",children:[(0,s.jsx)(q3,{classes:"upload-progress__pie--processing",percent:70}),(0,s.jsx)("div",{className:"upload-progress__text",children:e})]}),rK=({percentage:e,text:t="Uploading\u2026"})=>(0,s.jsxs)("div",{className:"upload-progress",children:[(0,s.jsx)(q3,{percent:e}),(0,s.jsx)("div",{className:"upload-progress__text",children:t})]}),Vf=({classes:e,jobId:t,onCancel:n,text:o})=>(0,s.jsxs)("div",{className:eu(e),children:[(0,s.jsx)(oK,{text:o}),t&&(0,s.jsx)(tu,{onClick:n,text:"Cancel"})]}),aK=({classes:e,onCancel:t,percentage:n,text:o})=>(0,s.jsxs)("div",{className:eu(e),children:[(0,s.jsx)(rK,{percentage:n,text:o}),(0,s.jsx)(tu,{onClick:t,text:"Cancel"})]}),iK=({message:e="Error"})=>(0,s.jsxs)("div",{className:"upload-error",children:[(0,s.jsx)(ue,{name:"circle-exclamation"}),(0,s.jsx)("div",{className:"upload-error__text",children:e})]}),cK=({classes:e,message:t,onClick:n})=>(0,s.jsxs)("div",{className:eu(e),children:[(0,s.jsx)(iK,{message:t}),(0,s.jsx)(tu,{onClick:n,text:"Dismiss"})]}),lK=({message:e="Success"})=>(0,s.jsxs)("div",{className:"upload-success",children:[(0,s.jsx)(ue,{name:"check-regular"}),(0,s.jsx)("div",{className:"upload-success__text",children:e})]}),dK=({classes:e,message:t,onClick:n})=>(0,s.jsxs)("div",{className:eu(e),children:[(0,s.jsx)(lK,{message:t}),n?(0,s.jsx)(tu,{onClick:n,text:"Dismiss"}):null]}),uK=e=>{const{classes:t,data:n={},errorMessage:o,jobId:r,progress:a,onCancelUpload:i,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return eK(e)?(0,s.jsx)(cK,{classes:t,message:o||n?.message,onClick:l}):qW(e)?(0,s.jsx)(aK,{classes:t,onCancel:i,percentage:a,text:`Uploading ${m}\u2026`}):JW(e)?(0,s.jsx)(Vf,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):XW(e)?(0,s.jsx)(Vf,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):ZW(e)?(0,s.jsx)(Vf,{classes:t,onCancel:c,text:"Cropping image\u2026"}):K3(e)&&h?(0,s.jsx)(dK,{classes:t,message:h,onClick:d}):(0,s.jsx)("div",{})},zf=$("audio-player"),hK=zf("upload-state");function J3({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:n,...o}){const r=Z3(),{mode:a}=wd(),i=ac(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&Q3(c),[c]),d=(0,De.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:v}=c,C=b=>()=>r?.handleUploadDismiss(b,c),g=zf({overlay:o.isOverlayAudio,static:o.isOverlayAudio});return(0,s.jsx)("div",{className:zf("container"),children:(0,s.jsx)("div",{className:g,children:(0,s.jsx)(uK,{classes:hK,errorMessage:v?.message,jobId:h,onCancelProcess:C("process"),onCancelUpload:C("upload"),onErrorDismiss:C("error"),progress:f,status:m,successMessage:"Processing\u2026",uploadType:"audio"})})})}return(0,s.jsx)(QW,{...o,mode:a,transcriptAudioPlayerIdOpen:i?.audioPlayerIdOpen??null,volumeSliderPosition:n})}var mK=p(91242),fK=p.n(mK),pK=p(22954),gK=p.n(pK);const vK={course:({courseId:e})=>`/authoring/${e}`,courseLocales:({courseId:e})=>`/manage/locales/${e}`,dashboard:"/manage/all-content",lesson:({courseId:e,lessonId:t})=>`/authoring/${e}/lesson/${t}`};function CK(){const t=He()?.id,n=Uh();return(0,u.useCallback)(o=>n&&t!=null?vK.lesson({courseId:t,lessonId:o}):gn(o),[t,n])}var xK=p(69419),bK=p(58016),yK=p.n(bK);const SK=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,LK=e=>typeof e=="string"&&e.replace(SK,""),Ln=yK()(LK,xK.J),TK="about:blank",kK=e=>{const t=e?.trim();if(!t)return null;const n=Ln(t);return n===TK?null:/^(https?:\/\/|mailto:)/i.test(n)||/^(\.?\/|[#?])/.test(n)?n:`http://${n.replace(/^\/\//,"")}`},Da=u.memo(({align:e,alt:t,allowTabNavigation:n=!0,cornerRadius:o,disableZoom:r,getLessonPath:a,height:i,l10nId:c,labels:l,link:d,maxHeight:h=380,onLoad:m,shouldFillWidth:f,src:v,width:C})=>{const g=CK(),b=a??g,x=To(t),y=d?.type==="url"&&d.destination?kK(d.destination):null,L=d?.type==="block"?a_(d.destination):null,S=d?.type==="lesson"&&!!d.destination||L!=null||!!y,T=n&&!r&&!S,k=X()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let E={};o!=null&&(E["--corner-radius"]=`${Number(o)}px`),C>0&&i>0&&i>h?(C=Math.round(C*h/i),i=h):h&&(!C||!i)&&(E={maxHeight:h});let I=(0,s.jsx)(Sn,{alt:x,className:k,"data-l10n-id":c,height:i,onLoad:m,src:v,style:E,width:C});return S&&d?d.type==="lesson"?I=(0,s.jsx)(sn,{className:"img__link",to:b(d.destination),children:I}):d.type==="block"&&L?I=(0,s.jsx)(sn,{className:"img__link",to:`${b(L.lessonId)}?blockId=${L.blockId}`,children:I}):y&&(I=(0,s.jsx)("a",{className:"img__link",href:y,rel:"noopener noreferrer nofollow",target:"_blank",children:I})):T&&(I=(0,s.jsx)(D3,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:I})),(0,s.jsx)("div",{className:"img",children:I})});var jpe=p(17897),IK=p(22294),EK=p.n(IK);const NK=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,jK=/\.[a-z]{2,}\.?$/i,wK=(e,t)=>e===0||e===10||e===127||e===100&&t>=64&&t<=127||e===169&&t===254||e===172&&t>=16&&t<=31||e===192&&t===168||e>=224,AK=e=>_f(e);function wpe(e){try{if(AK(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const _f=e=>{if(typeof e!="string")return!1;let t;try{t=e.startsWith("//")?new URL(e,"https://placeholder.invalid"):new URL(e)}catch{return!1}if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const{hostname:n}=t;if(!n)return!1;const o=NK.exec(n);return o?!wK(Number(o[1]),Number(o[2])):jK.test(n)},RK=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,PK=e=>{if(typeof e!="string")return!1;const t=RK.exec(e);return t?_f(t[1]):!1};var MK,OK,BK,DK,FK;const ey=en()("type","embed"),HK=EK()("type","embedType"),$K=Zr()(/http:/i,"https:"),VK=e=>({embedType:"iframe",originalUrl:e,src:e}),zK=e=>Mr(e.embed),Mr=e=>e?.embedType||e?.type,Ape=e=>BK([[DK,MK(ey,VK,$K)],[FK,OK(ey,HK,e)]]),Rpe=Lo()(Be()(PK,ug),_f),Ppe="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var Or=p(49860);const ty=e=>{const t=Ne("CDN_USER_CONTENT_URI"),n=new RegExp(Ne("CDN_URI"),"g");return ii()?e:n.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},_K=e=>{const t=new window.URL("https:"+e);return t.searchParams.set("src",t.searchParams.get("src")+"&disable-auto-focus=true"),t.toString().replace("https:","")},UK=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,GK=e=>UK.test(e),WK=/^\/\//,ny=e=>e?.replace(WK,"https://"),nu=e=>{try{if(e===!1)return e;const t=new URL(ny(e));if(t.host==="cdn.embedly.com"&&t.pathname==="/widgets/media.html"){const n=new URL("https://embed.articulateusercontent.com/media/");return n.search=t.search,n.searchParams.set("v","1"),n.href}return t.href}catch(t){const n=new Error("Could not parse embed url",{cause:t});return console.warn(n),e}},KK=Be()(nu,ny,Co()(GK,_K),Co()(Boolean,gt),Ln),QK=e=>{const{paddingBottom:t,ref:n,value:o}=e;return(0,s.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:Or.useMemo(()=>({__html:o}),[o]),ref:n,style:{paddingBottom:t}})};class YK extends Or.Component{player;refIframeContainer=Or.createRef();refIframePlayer=Or.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&Le.isPlaying&&(this.player?.pause(),Le.isPlaying=!1)}componentWillUnmount(){Mr(this.props.data)==="video"&&this.teardownPlayer()}handlePlayerReady=()=>{this.player&&(this.player.on("play",this.handlePlayerPlay),this.player.on("timeupdate",this.handlePlayerUpdate),this.setState({isReady:!0}),Le.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;Le.isPlaying&&Le.playerId!==t&&(Le.isPlaying=!1),Le.playerId=t,Le.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;Le.playerId===t&&(Le.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(fK()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{Le.isPlaying=!1,Le.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const n=o=>this.player.supports("method",o);return gK()(n)(t)};togglePlay=()=>{this.playerSupportsMethods(["play","pause"])&&this.player.on("ready",()=>{this.player.getPaused(t=>{t?this.player.play():this.player.pause()})})};keySeek=t=>{this.playerSupportsMethods(["getCurrentTime","setCurrentTime"])&&this.player.on("ready",()=>{this.player.getCurrentTime(n=>{this.player.setCurrentTime(n+t)})})};changeVolume=t=>{this.playerSupportsMethods(["getVolume","setVolume"])&&this.player.getVolume(n=>{this.player.setVolume(n+t)})};onKeyDown=t=>{const r=gs(this.togglePlay),a=gs(()=>this.keySeek(5)),i=gs(()=>this.keySeek(-5)),c=gs(()=>this.changeVolume(10)),l=gs(()=>this.changeVolume(-10));fn()([[Jh,r],[Mo,a],[Po,i],[br,c],[yr,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:n,externalLinksDisabled:o,onLinkBlur:r,onLinkFocus:a,onLinkMouseEnter:i,onLinkMouseLeave:c,showMetaData:l,data:d}=this.props,{providerUrl:h,provider:m,favicon:f}=d;if(!(l&&h))return null;const v=nu(Ln(h)),C=o&&Un(v),g=`${n}-provider`,b=C?"":void 0,x=C?void 0:v,y=C?void 0:"noopener noreferrer",L=C?"button":void 0,S=C?void 0:"_blank";return(0,s.jsx)("h2",{className:"embed__provider",children:(0,s.jsxs)("a",{"aria-describedby":C?ps(g):void 0,className:"brand--hoverColor","data-external":b,href:x,id:C?g:void 0,onBlur:C?()=>r?.(g):void 0,onFocus:C?()=>a?.(g):void 0,onMouseEnter:C?()=>i?.(g):void 0,onMouseLeave:C?()=>c?.(g):void 0,rel:y,role:L,style:C?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:S,children:[(0,s.jsx)(Sn,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,s.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:n,embedId:o,externalLinksDisabled:r,labels:a,onLinkBlur:i,onLinkFocus:c,onLinkMouseEnter:l,onLinkMouseLeave:d,showMetaData:h}=this.props,{src:m,title:f,description:v,provider:C}=n,g=Mr(n);if(!h&&g!=="link")return null;const b=nu(Ln(m)),x=r&&Un(b),y=`${o}-metadata-title`,L=`${o}-metadata-readmore`,S=T=>({"aria-describedby":x?ps(T):void 0,"data-external":x?"":void 0,href:x?void 0:b,id:x?T:void 0,onBlur:x?()=>i?.(T):void 0,onFocus:x?()=>c?.(T):void 0,onMouseEnter:x?()=>l?.(T):void 0,onMouseLeave:x?()=>d?.(T):void 0,rel:x?void 0:"noopener noreferrer nofollow",role:x?"button":void 0,style:x?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:x?void 0:"_blank"});return(0,s.jsxs)("div",{className:"embed__meta__content",children:[(0,s.jsx)("h2",{className:"embed__title",children:(0,s.jsx)("a",{className:"brand--hoverColor",...S(y),children:(0,s.jsx)(we,{value:f})})}),(0,s.jsx)(we,{className:"embed__description",value:v}),(0,s.jsxs)("a",{className:"embed__readMore brand--hoverColor",...S(L),children:[g==="link"?`${a?.embedReadMore} ${C}`:`${a?.embedViewOn} ${C}`,(0,s.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:n,embedId:o,externalLinksDisabled:r,isLesson:a,labels:i,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=n??{},{description:v,originalUrl:C,src:g,thumbnail:b,title:x}=n,y=Mr(n);if(y==="iframe"){const L=document.createElement("div");L.innerHTML=ug(g);const S=L.firstChild,T=S&&S.tagName&&S.tagName.toLowerCase()==="iframe";let k=100,E=32;if(this.props.isAuthoring&&f)return(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,s.jsx)("p",{className:"embed__relativeUrl--title",children:x}),(0,s.jsx)("p",{className:"embed__relativeUrl--url",children:C})]});if(T){const R=S.width.match(/%/),w=parseInt(S.width);S.src=Ln(S.src),k=R?700*(w/100):w||16,E=parseInt(S.height)}const I=E/k,j=T?`${I*100}%`:"3rem";let P=null;try{P=new URL(S.src)}catch{}if(P){const{hostname:R}=P,w=R==="typeform.com"||R.endsWith(".typeform.com"),A=R==="forms.office.com";w&&(P.searchParams.append("disable-auto-focus","true"),S.src=P.toString()),A&&(P.searchParams.append("embed","true"),S.src=P.toString())}const N=T?S.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,s.jsx)("div",{className:"embed__title embed--iframe__title",children:x}),(0,s.jsx)(QK,{paddingBottom:j,ref:this.refIframeContainer,value:N})]})}else if(a){const L=f?g:nu(Ln(g)),S=r&&Un(L),T=`${o}-lesson-title`,k=`${o}-lesson-url`,E=S?"":void 0,I=S?void 0:L,j=S?void 0:"noopener noreferrer nofollow",P=S?"button":void 0,N=S?void 0:"_blank";if(f){const R={"aria-describedby":S?ps(T):void 0,"data-external":S?"":void 0,href:L,id:S?T:void 0,onBlur:S?()=>c?.(T):void 0,onFocus:S?()=>l?.(T):void 0,onMouseEnter:S?()=>d?.(T):void 0,onMouseLeave:S?()=>h?.(T):void 0,rel:S?void 0:"noopener noreferrer nofollow",role:S?"button":void 0,tabIndex:t?0:-1,target:S?void 0:"_blank"};return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,s.jsx)("h2",{className:"embed__title",children:(0,s.jsx)("a",{className:"brand--hoverColor",...R,children:(0,s.jsx)(we,{value:x})})}),["link","photo"].includes(y)?(0,s.jsxs)("a",{"aria-describedby":S?ps(k):void 0,className:"embed__relativeUrl--url","data-external":E,href:I,id:S?k:void 0,onBlur:S?()=>c?.(k):void 0,onFocus:S?()=>l?.(k):void 0,onMouseEnter:S?()=>d?.(k):void 0,onMouseLeave:S?()=>h?.(k):void 0,rel:j,role:P,tabIndex:t?0:-1,target:N,children:[L,y==="photo"?(0,s.jsx)("div",{className:"embed__relativeUrl--image",children:(0,s.jsx)(Sn,{alt:b?x:"",className:"embed__img",src:L})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:b,title:x,type:y})]})}return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(y)?(0,s.jsx)("a",{"aria-describedby":S?ps(k):void 0,"data-external":E,href:I,id:S?k:void 0,onBlur:S?()=>c?.(k):void 0,onFocus:S?()=>l?.(k):void 0,onMouseEnter:S?()=>d?.(k):void 0,onMouseLeave:S?()=>h?.(k):void 0,rel:j,role:P,tabIndex:t?0:-1,target:N,children:(0,s.jsx)(Sn,{alt:b?x:"",className:"embed__img",src:ty(b)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:b,title:x,type:y}),this.renderMetaData()]})}else if(y==="link"){const L=f?g:Ln(g),S=f||r&&Un(L),T=`${o}-link-readmore`,k=S?"":void 0,E=S?void 0:L,I=S?void 0:"noopener noreferrer nofollow",j=S?"button":void 0,P=S?void 0:"_blank";return(0,s.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,s.jsx)(we,{className:"embed__title",value:x}),(0,s.jsx)(we,{className:"embed__description",value:v}),(0,s.jsx)("a",{"aria-describedby":r&&S?ps(T):void 0,className:"embed__readMore brand--hoverColor","data-external":k,href:E,id:S?T:void 0,onBlur:S?()=>c?.(T):void 0,onFocus:S?()=>l?.(T):void 0,onMouseEnter:S?()=>d?.(T):void 0,onMouseLeave:S?()=>h?.(T):void 0,rel:I,role:j,target:P,children:i?.embedReadMore})]})}else return(0,s.jsxs)("div",{className:"embed embed--media",children:[m?(0,s.jsx)(we,{"aria-hidden":!t,className:"embed__title",value:x}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:b,title:x,type:y})]})}renderEmbedIframe=t=>{const{allowTabNavigation:n,labels:o,src:r,thumbnail:a,title:i,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,s.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,s.jsx)(Da,{allowTabNavigation:n,labels:o,src:ty(a)})});{const d=Ys.isIe11||Ys.isEdge,h=X()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,s.jsxs)("figure",{"aria-hidden":!n,"aria-label":o?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:n?0:-1,children:[(0,s.jsx)("meta",{content:"origin",name:"referrer"}),(0,s.jsx)("iframe",{allowFullScreen:!0,className:"embed__media",frameBorder:"0",inert:n?void 0:!0,loading:"lazy",onLoad:this.setupPlayer,ref:this.refIframePlayer,scrolling:l?"yes":"no",src:l?r:KK(r),title:i})]})}}}const sy=e=>{const t=Uh(),n=He(),o=e.externalLinksDisabled??(n&&"externalLinksDisabled"in n?n.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:a,handleFocus:i,handleBlur:c}=xd(),[l,d]=Or.useState([]),h=Or.useId();return Or.useEffect(()=>{if(!o||!e.data){d([]);return}const m=[],{providerUrl:f,src:v,useRelativePath:C}=e.data,g=Mr(e.data);e.isLesson&&v&&Un(Ln(v))&&(m.push(`${h}-lesson-title`),["link","photo"].includes(g)&&m.push(`${h}-lesson-url`),g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),f&&Un(Ln(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&Un(Ln(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&v&&Un(Ln(v))&&g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),g==="link"&&(C||v&&Un(Ln(v)))&&m.push(`${h}-link-readmore`),d(m)},[o,e.data,e.showMetaData,e.isLesson,h]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(YK,{...e,embedId:h,externalLinksDisabled:o,isAuthoring:t,onLinkBlur:c,onLinkFocus:i,onLinkMouseEnter:r,onLinkMouseLeave:a}),l.map(m=>(0,s.jsx)(bd,{anchorId:m},m))]})};var ZK=p(63074);const Uf=e=>e.toString().padStart(2,"0");function su(e){const t=Math.floor(e),n=Math.floor(t/3600),o=Math.floor(t%3600/60),r=t%60;return n>0?`${n}:${Uf(o)}:${Uf(r)}`:`${o}:${Uf(r)}`}function Ope(e=[]){return e.map(({time:t,title:n})=>`${su(t)} ${n}`).join(`
`)}const XK=e=>{const[t,n,o]=e.split(":").reverse();return parseInt(t,10)+parseInt(n,10)*60+parseInt(o||"0",10)*3600},qK=/^(\d*:)?\d{1,2}:\d{2}$/,Bpe=(e,t)=>{const n=e.split(`
`).filter(r=>r.trim()!==""),o=[];for(const r of n){const[a,...i]=r.split(" ");if(!qK.test(a))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");o.push({time:XK(a),title:i.join(" ")})}if(o.length>0&&o[0].time!==0)throw new Error("Chapters must start at 0:00. Chapters will not display.");for(let r=1;r<o.length;r++)if(o[r].time<=o[r-1].time)throw new Error("Chapters are out of order. Chapters will not display.");if(t!=null){for(const r of o)if(r.time>=t)throw new Error("Timestamps must be within the video duration. Chapters will not display.");for(let r=0;r<o.length;r++)if((r<o.length-1?o[r+1].time:t)-o[r].time<10)throw new Error("Chapters must be at least 10 seconds long. Chapters will not display.")}return o},JK={hovered:null,setHovered:mn},Gf=(0,u.createContext)(null);function eQ({children:e}){const t=(0,u.useContext)(Gf),[n,o]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:n,setHovered:o}),[n]);return t!=null?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(Gf.Provider,{value:r,children:e})}const tQ=()=>(0,u.useContext)(Gf)??JK,nQ=.001,sQ=(e,t,n)=>e!=null&&e.kind===t&&Math.abs(e.time-n)<nQ,oy=$("video-seek-bar-overlay"),Wf=e=>Math.max(0,Math.min(100,e)),ry=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},oQ=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=e.map(o=>{const r=ry(o.time);return r==null||r>=t?null:{chapter:o,startTime:r}}).filter(o=>o!=null).sort((o,r)=>o.startTime-r.startTime);return n.map((o,r)=>{const a=n[r+1],i=a!=null?a.startTime:t;return i<=o.startTime?null:{chapter:o.chapter,endTime:i,leftPercent:Wf(o.startTime/t*100),startTime:o.startTime,widthPercent:Wf((i-o.startTime)/t*100)}}).filter(o=>o!=null)},rQ=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=new Set;return e.forEach(o=>{const r=ry(o);r==null||r>=t||n.add(r)}),[...n].sort((o,r)=>o-r).map(o=>({leftPercent:Wf(o/t*100),time:o}))};function aQ({chapters:e,checkpointTimesSeconds:t,durationSeconds:n,onSeekToTime:o}){const r=It(),a=u.useMemo(()=>oQ(e,n),[e,n]),i=u.useMemo(()=>rQ(t,n),[t,n]),{hovered:c,setHovered:l}=tQ(),d=r?.videoCheckpointDefaultTitle||"Checkpoint",h=u.useMemo(()=>{const m=a.filter(v=>v.leftPercent>0).map(v=>({kind:"chapter",element:"chapter",time:v.startTime,leftPercent:v.leftPercent,label:v.chapter.title,key:`chapter-${v.startTime}-${v.chapter.title}`})),f=i.map(v=>({kind:"checkpoint",element:"marker",time:v.time,leftPercent:v.leftPercent,label:`${d} ${su(v.time)}`,key:`checkpoint-${v.time}`}));return[...m,...f].sort((v,C)=>v.time-C.time||(v.kind===C.kind?0:v.kind==="chapter"?-1:1))},[a,i,d]);return h.length===0?null:(0,s.jsx)("div",{className:oy("markers"),role:"presentation",children:h.map(m=>(0,s.jsx)("button",{"aria-label":m.label,className:oy(m.element,{hovered:sQ(c,m.kind,m.time)}),onBlur:()=>l(null),onClick:()=>o?.(m.time),onFocus:()=>l({kind:m.kind,time:m.time}),onPointerEnter:()=>l({kind:m.kind,time:m.time}),onPointerLeave:()=>l(null),style:{left:`${m.leftPercent}%`},type:"button"},m.key))})}const iQ=()=>{const e=oa();return xh(e)},ay=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,cQ=e=>Object.entries(e).reduce((t,[,n])=>(n.ISO639_1&&(t.iso1Map[n.ISO639_1]=t.iso1Map[n.ISO639_1]||[],t.iso1Map[n.ISO639_1].push(n)),n.ISO639_3&&(t.iso3Map[n.ISO639_3]=t.iso3Map[n.ISO639_3]||[],t.iso3Map[n.ISO639_3].push(n)),t),{iso1Map:{},iso3Map:{}}),lQ=(e,t,n)=>{let o=e,r="",a=n??ay(e,t);return!a&&e.includes("-")&&([o,r]=e.split("-"),a=ay(o,t),a&&(e=o)),{languageCode:o,code:e,regionCode:r,standard:a??"Articulate"}},pc=(e,t,n={})=>{const{code:o,standard:r}=lQ(e.toLowerCase(),t,n.standard),{location:a,script:i,variant:c}=n;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=cQ(t),h=r==="ISO-639-1"?l[o]??null:d[o]??null;return h?h.length===1?h[0]:h.find(m=>{const f=c&&"variant"in m&&m.variant?m.variant.toLocaleLowerCase()===c.toLocaleLowerCase():!1,v=a&&"location"in m&&m.location?m.location.toLocaleLowerCase()===a.toLocaleLowerCase():!1,C=i&&"script"in m&&m.script?m.script.toLocaleLowerCase()===i.toLocaleLowerCase():!1;return f||v||C})||h[0]||null:null}return t[o]??null},Dpe=(e,t,n={})=>pc(e,t,{standard:"Articulate",...n})?.ISO639_1||null,Fpe=(e,t,n={})=>pc(e,t,{standard:"Articulate",...n})?.ISO639_3||null,Hpe=(e,t,n={})=>pc(e,t,{standard:"ISO-639-1",...n})?.code||null,$pe=(e,t,n={})=>pc(e,t,{standard:"ISO-639-3",...n})?.code||null,iy=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),cy=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),ly=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),dQ=(e,t)=>{const n=iy(e)&&iy(t)&&e.video.key===t.video.key,o=cy(e)&&cy(t)&&e.customVideo.src===t.customVideo.src,r=ly(e)&&ly(t)&&e.customVideo.key===t.customVideo.key;return n||o||r},uQ=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),hQ=e=>{const t=Fn(),{currentLocale:n}=tt(),o=Me(e,t),r=Me(e,n),a=iQ();return(0,u.useMemo)(()=>{if(!!(n&&n!==t)&&a&&dQ(o,r)&&uQ(r))return r.video.captions.find(l=>pc(l.code,a)?.code===n)?.id},[t,n,o,r,a])},mQ=2,fQ=0,pQ=()=>({previousTime:0,triggeredTimes:new Set}),gQ=(e,t,n)=>{const{previousTime:o}=n;t>o+mQ&&e.filter(a=>a<=t).forEach(a=>n.triggeredTimes.add(a)),t<o-fQ&&(n.triggeredTimes=new Set(e.filter(a=>a<=t))),n.previousTime=t;const r=e.find(a=>t>=a&&!n.triggeredTimes.has(a));return r==null?null:(n.triggeredTimes.add(r),r)};function vQ({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:n,onCheckpointReached:o}){const r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>Array.from(new Set(e)).sort((i,c)=>i-c),[e]);(0,u.useEffect)(()=>{if(!t||a.length===0)return;const i=n();if(i==null)return;const c=pQ();c.previousTime=i.currentTime,a.filter(f=>f<=i.currentTime).forEach(f=>c.triggeredTimes.add(f));let l=0;const d=()=>{const f=gQ(a,i.currentTime,c);f!=null&&r.current?.(f),l=requestAnimationFrame(d)},h=()=>{l===0&&(l=requestAnimationFrame(d))},m=()=>{l!==0&&(cancelAnimationFrame(l),l=0)};return i.addEventListener("play",h),i.addEventListener("playing",h),i.addEventListener("pause",m),i.addEventListener("ended",m),i.paused||h(),()=>{m(),i.removeEventListener("play",h),i.removeEventListener("playing",h),i.removeEventListener("pause",m),i.removeEventListener("ended",m)}},[n,t,a])}function dy(e){return Number.isFinite(e)&&e>0?e:0}function Kf({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:n,canRestrictSeek:o,captions:r,chapters:a=[],checkpointTimesSeconds:i=[],cornerRadius:c,id:l,media:d,onCheckpointReached:h,onLoad:m,poster:f,progressChanged:v,recordMediaPlayheadPosition:C,ref:g,shouldPause:b,src:x,style:y,subtitle:L,type:S}){const T=u.useRef(null),[k,E]=u.useState(0),I=u.useCallback(J=>{T.current=J,typeof g=="function"?g(J):g&&(g.current=J)},[g]),j=(0,De.A)(b),P=Uh(),N=It(),R=qh(),w=hQ(d),A=S==="customVideo",M=u.useCallback(()=>T.current?.containerElement?.querySelector("video")??null,[]),O=u.useCallback(J=>{T.current?.seekToTime(J)},[]),B=u.useCallback(J=>{fg(),E(dy(J.duration)),v?.(J)},[v]),D=u.useCallback(J=>{C?.(J)},[C]),H=u.useCallback(()=>{Le.playerId=l,Le.isPlaying=!0},[l]),V=u.useCallback(()=>{Le.playerId===l&&(Le.isPlaying=!1)},[l]),[G,_]=u.useState(!1),Y=u.useRef(!1),se=u.useCallback(()=>{_(!0);const J=T.current;if(J){const{duration:ne}=J.getProgress();E(dy(ne)),m?.({player:J})}},[m]);vQ({checkpointTimesSeconds:i,isLoaded:G,getMediaElement:M,onCheckpointReached:h}),u.useEffect(()=>{Y.current||G&&(t!=null&&t>0&&T.current?.seekToPercent(t),Y.current=!0)},[G,t]),u.useEffect(()=>{!j&&b&&T.current?.pause()},[j,b]),u.useEffect(()=>{const J=()=>{(!Le.isPlaying||Le.playerId!==l)&&T.current?.pause()};return Le.addChangeListener(J),()=>{Le.removeChangeListener(J)}},[l]);const Z=u.useMemo(()=>{const J=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(J==null&&y==null))return{...J,...y}},[c,y]),W=f==null?void 0:A?f:gt(f),F=G&&k>0&&(a.length>0||i.length>0),z=`${A?x:gt(x)}?v=1`,Q=A?"application/x-mpegURL":void 0,K=u.useMemo(()=>[{src:z,type:Q??"video/mp4"}],[z,Q]),q=u.useMemo(()=>{const J=[];if(r==null&&L&&J.push({kind:"captions",label:"English",src:A?L:gt(L),srcLang:"en"}),r!=null)for(const ne of r){const oe=ne.url||(ne.key!=null?gt(ne.key):void 0);oe&&J.push({default:ne.id===w?!0:void 0,kind:"captions",label:ne.name||R?.(ne.code)||ne.code,src:oe,srcLang:ne.code})}return J},[r,L,A,R,w]);return(0,s.jsx)(ZK.L,{crossOrigin:Ys.isLocalFilesystem?void 0:"anonymous",enableDownload:P,enablePlaybackSpeed:n??void 0,enableSeek:o==null?void 0:!o,inert:!e,labelBackToMoreOptions:N?.a11yMediaMoreOptionsBack,labelCaptions:N?.a11yMediaCaptions,labelCaptionsOff:N?.a11yMediaCaptionsOff,labelContainer:N?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:N?.a11yMediaCurrentTime,labelDownload:N?.a11yMediaDownload,labelDuration:N?.a11yMediaDuration,labelError:N?.a11yMediaErrorVideo,labelExitFullscreen:N?.a11yMediaExitFullscreen,labelExitPictureInPicture:N?.a11yMediaExitPictureInPicture,labelFullscreen:N?.a11yMediaFullscreen,labelMoreOptions:N?.a11yMediaMoreOptions,labelMute:N?.a11yMediaMute,labelPause:N?.a11yMediaPause,labelPictureInPicture:N?.a11yMediaPictureInPicture,labelPlay:N?.a11yMediaPlay,labelPlaybackRate:N?.a11yMediaPlaybackRate,labelPlaybackRateNormal:N?.a11yMediaPlaybackRateNormal,labelPlayVideo:N?.a11yMediaPlayVideo,labelReplay:N?.a11yMediaReplay,labelSeek:N?.a11yMediaSeek,labelSeekDisabled:N?.a11yMediaSeekDisabled,labelUnmute:N?.a11yMediaUnmute,labelVolume:N?.a11yMediaVolume,onPause:V,onPlay:H,onPlayheadSave:D,onReady:se,onTimeUpdate:B,poster:W,ref:I,seekOverlay:F?(0,s.jsx)(aQ,{chapters:a,checkpointTimesSeconds:i,durationSeconds:k,onSeekToTime:O}):null,sources:K,style:Z,timeUpdateInterval:1e3,tracks:q})}var CQ=p(49860);function at(e){const t=CQ.forwardRef((n,o)=>{const r=ct();return(0,s.jsx)(e,{...n,getL10nValue:r,ref:o})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var xQ=p(52329),uy=p.n(xQ),bQ=p(49508),yQ=p.n(bQ);const SQ=e=>({...e,courseId:e.courseId||zs()(["course","id"],e)}),LQ=e=>({...e,lessonId:e.lessonId||zs()(["lesson","id"],e)}),TQ=({id:e,courseId:t,lessonId:n,refs:o})=>e||(o&&n?`${n}-${o}`:n||t),Qf=Be()(TQ,LQ,SQ),Vpe=kt()(pi()(Ze()("id"),uy()("id",Qf)),Lo()(yQ()(Ze(),[Ze()("id"),Ze()("uploads")]),xo()(["id"])),uy()("isUploading",qe()("status","uploading")));function zpe(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const n=t[1]??"",o=t[2],r=encodeURIComponent(o);return`${n}${r}`}function kQ(e){return e.replace(/%2F/g,"/")}var IQ=p(49860);const Yf=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),ou=e=>Yf(e)&&!e.isProcessing&&!e.error,EQ=(e,t)=>t?.mediaType==="audio"?!!e&&(Yf(e)||Q3(t)||K3(t)&&!Yf(e)):ou(e),NQ=e=>Co()(Oe()(!!e),CW()(`-${e}`));class jQ extends IQ.Component{constructor(t){super(t),this.onTranscriptClick=this.onTranscriptClick.bind(this)}static get defaultProps(){return{defaultAlign:"left",media:{},index:"1",hasPadding:!0,opts:{},allowTabNavigation:!0,lessonNumber:1,getL10nValue:()=>{}}}onTranscriptClick(){const{block:t,blockId:n,openTranscript:o,refs:r}=this.props,a=t?.items?.length===1?t.items[0]:void 0,i=this.props.item??a;let c=n;try{t!=null&&typeof t=="object"&&!Array.isArray(t)?"blockId"in t?c=t.blockId:"id"in t&&(c=t.id):t?.id&&(c=t.id)}catch{c=n}let l="";try{i!=null&&typeof i=="object"&&!Array.isArray(i)&&"id"in i&&(l=String(i.id))}catch{l=""}const d=r??`items:${c||""}/items:${l}`;if((t||n)&&i&&o)return o({blockId:t?.id??n,item:i,refs:d})}renderAudio(t,n){const{activeIndex:o,allowTabNavigation:r,block:a,blockId:i,getL10nValue:c,index:l,isOverlayAudio:d,item:h,itemIndex:m,labels:f,lessonNumber:v,shouldPause:C,side:g}=this.props,{audio:b}=c(t),x=a&&typeof a=="object"&&"blockId"in a?a.blockId:a?.id||i||"",y=h&&typeof h=="object"&&"id"in h?h.id:"",L=this.props.refs??`items:${x}/items:${y}`,S=`audio-${v}-${l}`;return(0,s.jsx)(J3,{activeIndex:o,allowTabNavigation:r,id:S,isOverlayAudio:d,item:h,itemIndex:m,labels:f,mediaSrc:b.key,onTranscriptClick:this.onTranscriptClick,onTranscriptClose:this.props.closeTranscript??void 0,onTranscriptUpdate:this.props.onTranscriptUpdate,refs:L,shouldPause:b.pause||C,side:g,transcriptMedia:t,uploadId:n,volumeSliderPosition:this.props.volumeSliderPosition},S)}renderImage(t){const{allowTabNavigation:n,cornerRadius:o,defaultAlign:r,imageMaxHeight:a,index:i,labels:c,onLoad:l,opts:d}=this.props,h=t?.align??r,m=t?.dimensions,f=`image-${i}`,{disableZoom:v}=d??{};return(0,s.jsx)(Da,{align:h,allowTabNavigation:n,alt:t?.alt,cornerRadius:o,disableZoom:v,height:m?.height||m?.originalHeight,labels:c,link:t?.link,maxHeight:a,onLoad:l,shouldFillWidth:t?.fillWidth,src:dt(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,n){const{allowTabNavigation:o,blockId:r,lessonNumber:a,index:i,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?kQ(t.poster):t.poster,h=NQ(r)(`video-${a}-${i}-${d||""}`);return(0,s.jsx)(Kf,{allowTabNavigation:o,canAdjustPlaybackSpeed:c,captions:t.captions,id:h,media:n,poster:d,shouldPause:t.pause||l,src:t.key},h)}renderEmbed(t){const{allowTabNavigation:n,embedClass:o,labels:r,opts:a,shouldPause:i}=this.props,{fullEmbed:c,showMetaData:l=!0}=a,d=`embed-${this.props.index}`;return(0,s.jsx)("div",{className:o,children:(0,s.jsx)(sy,{allowTabNavigation:n,data:t,id:d,isLesson:c,labels:r,shouldPause:t.pause||i,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:n,item:o,lessonId:r,mediaType:a}=this.props,i=o&&typeof o=="object"&&"id"in o?o.id:"",c=this.props.refs??`items:${t??""}/items:${i}`,l=this.props.media,d=X()({"media-group":n}),{audio:h,embed:m,image:f,video:v}=this.props.getL10nValue(l)??{},C=Qf({lessonId:r,refs:c}),g=this.props.getUpload?this.props.getUpload(C):null;return(0,s.jsxs)("div",{className:d,"data-l10n-id":At(l),children:[(!a||a==="image")&&ou(f)&&this.renderImage(f),(!a||a==="audio")&&EQ(h,g)&&this.renderAudio(l,C),(!a||a==="video")&&ou(v)&&this.renderVideo(v,l),(!a||a==="embed")&&ou(m)&&this.renderEmbed(m)]})}}const Xt=nK(Dl(Bb(at(jQ))));function Cs(e,t,n,o){const a=t==="bottom"||!n&&t!=="top"?"bottom":"top",i={renderOrder:["text"],isOverlayAudio:!1};if(!e)return i;const c=!!e.audio,l=!!e.image,d=!!e.video,h=!!e.embed,m=l||d,f=()=>{const g=l?"image":"video",b={top:c?["audio","text",g]:["text",g],bottom:c?["text","audio",g]:["text",g],legacyTop:c?["audio",g,"text"]:[g,"text"],legacyBottom:c?[g,"text","audio"]:[g,"text"]};return n&&o==="timeline"&&!t?b.top:n&&o!=="timeline"?a==="bottom"?b.legacyBottom:b.legacyTop:a==="bottom"?b.bottom:b.top},v=()=>{const g={top:c?["audio","text","embed"]:["text","embed"],bottom:c?["text","embed","audio"]:["text","embed"],legacyTop:c?["audio","embed","text"]:["embed","text"],legacyBottom:c?["embed","text","audio"]:["embed","text"]};return n&&o==="timeline"&&!t?g.legacyTop:n&&o!=="timeline"?a==="bottom"?g.legacyBottom:g.legacyTop:a==="bottom"?g.bottom:g.top},C=()=>a==="bottom"?["text","audio"]:["audio","text"];return c&&!m&&!h?{...i,renderOrder:C()}:m&&!c&&!h?{...i,renderOrder:f()}:h&&!c&&!m?{...i,renderOrder:v()}:c&&m&&!h?o==="statement"?{...i,renderOrder:C()}:o==="labeled-graphic"||a==="top"||o==="process"?{...i,renderOrder:f(),audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video}}:{...i,renderOrder:e.video?["text","video","audio"]:["text","overlay"],audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video},isOverlayAudio:!e.video}:c&&h&&!m?{...i,renderOrder:v(),audioOnlyMedia:{audio:e.audio},embedOnlyMedia:{embed:e.embed}}:i}var wQ=p(49860);const Rs=$("block-text"),AQ=class extends wQ.Component{renderHeadingDelegate;renderTextDelegate;constructor(e){super(e),this.renderTextDelegate=this.renderText.bind(this),this.renderHeadingDelegate=this.renderHeading.bind(this)}static get defaultProps(){return{columns:1,heading:"",items:[],type:"onecol",getL10nValue:()=>{}}}getHeadingComponent=()=>{const{heading:e}=this.props;return e?e==="heading"?"h2":"h3":"div"};renderHeading(e){const t="heading"in e?e.heading:null;return(0,s.jsx)(we,{value:t})}renderText(e){const{labels:t,takingSnapshot:n,variant:o}=this.props,r=o?.includes("column"),a="paragraph"in e?e.paragraph:void 0;return r||n?(0,s.jsx)(gW,{item:e,labels:t,children:(0,s.jsx)(Ke,{value:a||""})}):(0,s.jsx)(Ke,{className:Rs("col"),value:a||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:n,heading:o,isLearner:r,items:a,labels:i,lessonId:c,media:l,settings:d,type:h,variant:m,renderText:f=this.renderTextDelegate,renderHeading:v=this.renderHeadingDelegate,getL10nValue:C}=this.props,g=C(l),b=Object.keys(g?.audio??{}).length>0,{audioPosition:x,entranceAnimation:y,cellPadding:L=1.5,tableWidth:S=76,textPadding:T=.8,textWidth:k=76}=d,E=m==="table",I=t===1,j=t>1,P=E?S:k,N=!E&&I,R=E,w=KG(L),A=QG(T),M=Zd(P),O=Rs({[h]:!N&&!R||j,[`${h}-custom-width`]:!j,[`${h}-custom-width-table-${M}`]:R,[`${h}-custom-width-text-${M}`]:N,[`heading-custom-text-padding-${A}`]:N,[`${h}-custom-cell-padding-${w}`]:R,"no-animation":!y,presentation:this.props.isPresentation}),B=t>2?Rs("container-wide"):Rs("container",{authoring:!r}),D=this.getHeadingComponent(),H=C(Array.isArray(l)?{}:l),V=Cs(H,x);return(0,s.jsx)(Ae,{className:O.toString(),defaultBackgroundColor:n,children:(0,s.jsxs)("div",{className:B,"data-block-id":e,"data-block-text":"",children:[(0,s.jsx)("div",{className:Rs("row"),children:o!==""?a.slice(0,1).map((G,_)=>(0,s.jsx)("div",{className:Rs("col"),children:(0,s.jsx)("div",{className:Rs("heading"),children:(0,s.jsx)(D,{children:v(G)})})},"id"in G?G.id:_)):null}),V.renderOrder.map((G,_)=>{if(G==="text")return(0,s.jsx)("div",{className:Rs("row"),children:h!=="heading"?a.slice(0,t).map((Y,se)=>(0,s.jsx)(u.Fragment,{children:f(Y)},"id"in Y?Y.id:se)):null},`text-${_}`);if(G==="audio"&&b){const Y=V.renderOrder.indexOf("audio")<V.renderOrder.indexOf("text");return(0,s.jsx)("div",{className:Rs("row",{media:!0,top:Y,bottom:!Y,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,s.jsx)("div",{className:Rs("col",{media:!0}),children:(0,s.jsx)(Xt,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:i,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${_}`)}})]})})}},Vo=e=>{const t=ct(),n=ks();return(0,s.jsx)(AQ,{...e,getL10nValue:t,isPresentation:n})},RQ=Vo,PQ=e=>(0,s.jsx)(Vo,{columns:2,type:"twocol",...e}),MQ=e=>(0,s.jsx)(Vo,{columns:3,type:"threecol",...e}),OQ=e=>(0,s.jsx)(Vo,{columns:4,type:"fourcol",...e}),BQ=e=>(0,s.jsx)(Vo,{heading:"heading",type:"heading",...e}),DQ=e=>(0,s.jsx)(Vo,{heading:"subheading",type:"heading",...e}),FQ=e=>(0,s.jsx)(Vo,{heading:"heading",...e}),HQ=e=>(0,s.jsx)(Vo,{heading:"subheading",...e});var gc=p(49860);const $Q=1e3,VQ={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},zQ=e=>{const{afterAnimatedIn:t,animateIn:n="fadeIn",children:o,className:r,duration:a=1,initiallyVisible:i,siblingDelay:c=0}=e,l=gc.useRef(null),[d,h]=gc.useState(!1);gc.useEffect(()=>{const f=l.current;if(i&&f){h(!0);return}if(d||!f||typeof window>"u")return;const v=Um(),C=new IntersectionObserver(([b])=>{b!=null&&(b.isIntersecting||b.intersectionRatio>0)&&(h(!0),C.unobserve(b.target))},{root:v,rootMargin:c1,threshold:0});C.observe(f);const g=setTimeout(()=>{h(b=>{if(b)return b;const x=l.current;if(!x)return b;const y=x.getBoundingClientRect(),L=v?.getBoundingClientRect(),S=L?.top??0,T=L?.bottom??window.innerHeight,k=(T-S)*.1;return y.bottom>S-k&&y.top<T+k?!0:b})},$Q);return()=>{C.disconnect(),clearTimeout(g)}},[i,d]),gc.useEffect(()=>{const f=l.current;if(!f||!t)return;const v=C=>{C.target instanceof Element&&C.target.parentElement===f&&C.propertyName==="opacity"&&t()};return f.addEventListener("transitionend",v),()=>{f.removeEventListener("transitionend",v)}},[t]),gc.useEffect(()=>{const f=l.current;if(!f||!Array.isArray(o))return;Array.from(f.children).forEach((C,g)=>{C instanceof HTMLElement&&C.style.setProperty("--idx",String(g))})},[o]);const m={"--scroll-animation-step":`${c}s`,"--scroll-animation-duration":n==="none"?"0s":`${a}s`,"--scroll-animation-from":VQ[n]??"translateY(0)"};return(0,s.jsx)("div",{className:X()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:o})},Fe=e=>{const{afterAnimatedIn:t,animateBlockEntrance:n,animateIn:o,children:r,className:a,duration:i,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&n&&!rn()?(0,s.jsx)(zQ,{afterAnimatedIn:t,animateIn:o,className:a,duration:i,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,s.jsx)("div",{children:r}):r},Upe="group",_Q="tablist",UQ="tabpanel",Gpe="tab",Wpe="radio",vc=({caption:e,editable:t,id:n,isOverlayType:o,getL10nValue:r})=>{const a=!!(!o&&!t&&r(e));return{figcaptionId:a?`figcaption-${n}`:void 0,isFigure:a,role:a?"figure":void 0,tagName:a?"figure":"div"}};var hy=p(49860);const GQ=hy.lazy(async()=>{const[e,t]=await Promise.all([p.e("ace").then(p.t.bind(p,87401,23)),p.e("ace").then(p.bind(p,92763)),p.e("ace").then(p.t.bind(p,2577,23)),p.e("ace").then(p.t.bind(p,5152,23)),p.e("ace").then(p.t.bind(p,50428,23)),p.e("ace").then(p.t.bind(p,14280,23)),p.e("ace").then(p.t.bind(p,50428,23)),p.e("ace").then(p.t.bind(p,19991,23)),p.e("ace").then(p.t.bind(p,60968,23)),p.e("ace").then(p.t.bind(p,91401,23)),p.e("ace").then(p.t.bind(p,64127,23)),p.e("ace").then(p.t.bind(p,30485,23)),p.e("ace").then(p.t.bind(p,95797,23)),p.e("ace").then(p.t.bind(p,82300,23)),p.e("ace").then(p.t.bind(p,86952,23)),p.e("ace").then(p.t.bind(p,44887,23)),p.e("ace").then(p.t.bind(p,98283,23)),p.e("ace").then(p.t.bind(p,14866,23)),p.e("ace").then(p.t.bind(p,95649,23)),p.e("ace").then(p.t.bind(p,2326,23)),p.e("ace").then(p.t.bind(p,93509,23)),p.e("ace").then(p.t.bind(p,9308,23))]);return{default:t.default}}),WQ=({classNames:e,code:t})=>{const[n,o]=(0,u.useState)(!1),{announcePolite:r}=Ts(),a=async()=>{const i=(0,jr.htmlDecode)(t);await navigator.clipboard.writeText(i),o(!0),setTimeout(()=>o(!1),1e3),r("Copied!")};return(0,s.jsx)("div",{className:e,children:(0,s.jsx)(Ho,{message:n?"Copied!":"Copy",children:(0,s.jsx)("button",{"aria-label":n?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:a,type:"button",children:(0,s.jsx)(ue,{name:n?"check":"copy"})})})})};class KQ extends hy.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,s.jsx)(Ke,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n="",getL10nValue:o,initiallyVisible:r,isLearner:a,items:i,labels:c,settings:l,renderCaption:d=this.renderCaptionDelegate}=this.props,{entranceAnimation:h,language:m,paddingBottom:f,paddingTop:v,snippetBackgroundColor:C,snippetColorContrast:g,theme:b,useAdvancedEditor:x,wrapWords:y}=l,L=X()("block-text block-text--code",{"block-text--padding-top":Number(v)===2,"block-text--padding-bottom":Number(f)===2,"block-text--no-animation":!h}),S={backgroundColor:C},T=C==="#fafafa"||yt()(C),k=g??ke.DARK;if(!T){const E=zt({backgroundColor:C,contrast:k});Object.assign(S,{"--color-snippet-contrast":E})}return(0,s.jsx)(Ae,{className:L,defaultBackgroundColor:n,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"block-text__container",children:i.slice(0,1).map(E=>{const I=vc({...E,getL10nValue:o});return(0,s.jsx)("div",{className:"block-text__row",children:(0,s.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,s.jsxs)("figure",{"aria-labelledby":I.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,s.jsx)(fO,{value:E.code,children:j=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(WQ,{classNames:"block-text__copy-button",code:j}),x?(0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(GQ,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(E.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:b,value:(0,jr.htmlDecode)(u0(j)),width:"100%",wrapEnabled:y})}):(0,s.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:u0(j)},dir:"ltr",style:S})]})}),E.caption&&(0,s.jsx)("figcaption",{id:I.figcaptionId,children:d(E)})]})})},E.id)})})})})}}const my=at(KQ);function QQ({accentColor:e,backgroundType:t,blockBackgroundColor:n,noteColor:o,imageBackgroundDefault:r="#ffffff"}){return o!=null&&o!==""?o:YQ({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:r})}function YQ({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:o="#ffffff"}){if(t!==ae.IMAGE&&n==null)return"#000000b3";switch(t){case ae.IMAGE:return o;case ae.LIGHT:case ae.GRAY:return os(.9,e);case ae.DARK:return"#494949";case ae.BLACK:return"#333333";default:{if(!n)return e;switch(ha(n)){case ut.LIGHT:return os(.3,n);case ut.MED:return Is(.2,n);case ut.DARK:case ut.NEAR_BLACK:return Is(.4,n);default:return e}}}}function ZQ(e,t){const n=nn(),{cardMode:o,className:r="",children:a,disabled:i=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=n,C=He()?.theme,g=Vn(),b=o??m??$n.WHITE,x=vn()??"#ffffff",y=b===$n.WHITE,L=g===ae.COLOR,S=g===ae.ACCENT,T=C?.accentContrast,k=g===ae.ACCENT||g===ae.COLOR,E=T===ke.AUTO&&S||f===ke.AUTO&&L,I=g===ae.COLOR?f:T,j=[r,"block-card"];if(y)j.push("bg--range-light","block-card--white");else if(i){j.push("block-card--disabled");const P=zt({backgroundColor:x,contrast:I});E&&(d["--color-text"]=P,d["--color-text-opposite"]=P===St.DARK?St.LIGHT:St.DARK)}else{j.push("block-card--transparent");const N=Pw(x)??x??"#ffffff";switch(g){case ae.LIGHT:case ae.GRAY:j.push("bg--range-light");break;case ae.IMAGE:j.push("bg--range-dark");break;case ae.DARK:case ae.BLACK:j.push("bg--range-dark"),d["--color-background-rgb"]=(0,pa.A)(N)?.slice(0,3);break;default:{const w=d["--color-background"]??(l?x:N),A=zt({backgroundColor:w,contrast:I});k&&A==St.LIGHT&&j.push("block-card--contrast-light");const M=ha(w);j.push(`bg--range-${Fl()(M.toLowerCase())}`),d["--color-background"]=w,d["--color-background-rgb"]=(0,pa.A)(w)?.slice(0,3);break}}}return(0,s.jsx)(c,{...h,className:j.join(" "),ref:t,style:d,children:a})}const Gt=(0,u.forwardRef)(ZQ);var XQ=p(49860);const An=$("block-statement");class qQ extends XQ.Component{renderTextDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}static get defaultProps(){return{items:[],type:"a",getL10nValue:()=>{}}}getEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":return"fadeIn";case"b":case"d":return"fadeInUp";case"c":return"fadeInRight";case"note":return"fadeInGrow"}}getEntranceAnimationDuration(){const{type:t}=this.props;switch(t){case"a":return 1;case"b":case"c":case"d":return .75;case"note":return .5}}renderText({blockId:t,getL10nValue:n,type:o,labels:r,lessonId:a,media:i,settings:c},{paragraph:l}){const d=o==="note",h=n(Array.isArray(i)?{}:i),m=!!h?.audio,f=Cs(h,c.audioPosition,!1,"statement"),v=(0,s.jsx)("div",{className:An("quote"),children:f.renderOrder.map((C,g)=>{if(C==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(Ke,{value:l})},`text-${g}`);if(C==="audio"&&m){const b=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,s.jsx)("div",{className:An("audio-container",{top:b,bottom:!b}),children:(0,s.jsx)(Xt,{blockId:t,hasPadding:!1,index:t,item:{media:i,id:t},labels:r,lessonId:a,media:i,mediaType:"audio",refs:`items:${t}`})},`audio-${g}`)}return null})});return d?(0,s.jsx)(oY,{getL10nValue:n,media:i,children:v}):v}render(){const{animateBlockEntrance:t,isLearner:n,items:o,renderText:r=this.renderTextDelegate,settings:a,type:i,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=FG(i),dividerSize:m=DG(i),noteIcon:f=!0,noteSize:v="sm",statementWidth:C=HG(i)}=a,g=UG(C),b=GG(h),x=WG(m),y=v,L=i==="a"||i==="b"||i==="d",S=i==="note",T=An({[i]:!0,[`${i}-custom-width-${g}`]:!0,[`${i}-divider-off`]:L&&!d,[`${i}-divider-padding-${b}`]:L&&d,[`${i}-divider-size-${x}`]:L&&d,[`note-size-${y}`]:S,[`note-size-${y}-no-icon`]:S&&!f,"no-animation":!l});return(0,s.jsx)(Ae,{className:T.toString(),children:(0,s.jsx)("div",{className:An("wrap"),children:(0,s.jsx)("div",{className:An("container"),children:(0,s.jsx)("div",{className:An("row"),children:o.slice(0,1).map(k=>(0,s.jsx)(Fe,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:n,children:(0,s.jsxs)("div",{className:An("col"),children:[(0,s.jsx)("div",{className:An("divider-top-container"),children:(0,s.jsx)("div",{className:An("divider-top")})}),r(this.props,k),(0,s.jsx)("div",{className:An("divider-bottom")})]})},k.id))})})})})}}const Cc=at(qQ),JQ=Cc,eY=e=>(0,s.jsx)(Cc,{type:"b",...e}),tY=e=>(0,s.jsx)(Cc,{type:"c",...e}),nY=e=>(0,s.jsx)(Cc,{type:"d",...e}),sY=e=>(0,s.jsx)(Cc,{type:"note",...e}),oY=({children:e,getL10nValue:t,media:n})=>{const o=nn(),{accentColor:r,cardMode:a,cornerRadius:i,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=o,m=o.noteColor,f=o.noteColorContrast,{theme:v}=He(),C=vn(),g=Vn(),b=g===ae.COLOR,x=g===ae.ACCENT,y=v?.accentContrast,L=g===ae.DARK||g===ae.BLACK,S=m!=null&&m!=="",k=b||x||L||S?$n.TRANSPARENT:a,E=S&&(f??ke.AUTO)===ke.AUTO||y===ke.AUTO&&x||l===ke.AUTO&&b,I=(0,u.useMemo)(()=>QQ({accentColor:r??c,backgroundType:g,blockBackgroundColor:C,noteColor:m,imageBackgroundDefault:""}),[r,g,C,c,m]),j=S?f??ke.AUTO:g===ae.COLOR?l:y,P=zt({backgroundColor:I,contrast:j}),N={"--color-background":I,...(E||S)&&{"--color-text":P},...i&&{"--corner-radius":`${Number(i)}px`},...h&&{"--color-theme-decorative":h},...S&&{"--color-theme":m}},R=An("note-icon",{off:!d}),A=(t?t(Array.isArray(n)?{}:n):void 0)?.image,M=A?.key&&Object.keys(A).length>0,O=M?D8(A)?gt(A.key):dt(A):null,B=()=>d?M&&O?(0,s.jsx)("div",{"aria-hidden":!0,className:An("note-icon__custom"),style:{WebkitMaskImage:`url('${O}')`,maskImage:`url('${O}')`}}):(0,s.jsx)(ue,{name:"circle-info"}):null;return(0,s.jsxs)(Gt,{cardMode:k,className:An("note-card"),style:N,children:[(0,s.jsx)("div",{className:R,children:B()}),e]})};var mt=p(49860);function fy({ariaLabel:e,children:t,className:n="carousel-controls-item-btn",isActive:o,onClick:r,onKeyDown:a}){return(0,s.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,s.jsx)("button",{"aria-current":o,"aria-label":e,className:n,onClick:r,onKeyDown:a,tabIndex:o?0:-1,type:"button",children:t})})}function ru({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:n="chevron-right-light",isInfinite:o=!0,isRTL:r=!1,labelCarousel:a="Carousel",labelCarouselRoleDesc:i="Carousel",labelSlideControls:c="Slide controls",labelSlideControlsGoToNext:l="Go to next slide",labelSlideControlsGoToPrevious:d="Go to previous slide",labelSlideControlsGoToSlide:h="Go to slide",labelSlideCounterPreposition:m="of",labelSlidePreposition:f="of",labelSlideRoleDesc:v="Slide",onChange:C,ref:g,renderSlideIndicator:b,shouldMouseEmulateTouch:x=!1,shouldUseCounter:y=!1,shouldUseGoToSlide:L=!0}){const S=mt.useId(),[T,k]=mt.useState(0),E=(0,De.A)(T)??0,I=mt.useRef(null),j=mt.useRef(null),P=mt.useRef(!1),N=mt.useRef(!1),R=mt.useRef(void 0),w=mt.useRef(void 0),A=`carousel-${S}`,M=mt.Children.count(e),O=(0,De.A)(M),B=mt.useMemo(()=>Array.from({length:M}),[M]),D=M>1;mt.useImperativeHandle(g,()=>({navigateToSlide:(Z,W=!0)=>{k(Z);const F=I.current?.children?.[Z]?.firstElementChild;W&&F?.focus()}}),[]);const H=mt.useCallback(({activeIndex:Z,dir:W})=>{const F=o?Z-1>=0?Z-1:M-1:Math.max(0,Z-1),z=o?Z+1<=M-1?Z+1:0:Math.min(M-1,Z+1);return W==="left"?r?z:F:r?F:z},[o,r,M]),V=mt.useCallback(()=>{k(Z=>H(r?{activeIndex:Z,dir:"right"}:{activeIndex:Z,dir:"left"}))},[H,r]),G=mt.useCallback(()=>{k(Z=>H(r?{activeIndex:Z,dir:"left"}:{activeIndex:Z,dir:"right"}))},[H,r]),_=mt.useCallback(Z=>{const W=I.current?.children?.[Z],F=I.current;if(W&&F){const z=W.getBoundingClientRect(),Q=F.getBoundingClientRect(),K=z.left+z.width/2,q=Q.left+Q.width/2,ee=K-q;F.scrollBy({left:ee,behavior:"smooth"})}},[]),Y=mt.useCallback(Z=>{let W=!1,F=T;switch(Z.key){case"ArrowLeft":W=!0,F=H({activeIndex:T,dir:"left"});break;case"ArrowRight":W=!0,F=H({activeIndex:T,dir:"right"});break;case"Home":W=!0,F=0;break;case"End":W=!0,F=M-1;break}W&&(Z.stopPropagation(),Z.preventDefault()),T!==F&&(I.current?.children?.[F]?.firstChild?.focus(),_(F),k(F))},[T,H,_,M]);mt.useEffect(()=>{E!==T&&C?.(T)},[T,C,E]),mt.useEffect(()=>{M<O&&T>M-1&&k(M-1)},[T,O,M]),mt.useEffect(()=>{const Z=ee=>{ee.target.tagName==="IMG"&&ee.preventDefault(),R.current=ee.screenX},W=ee=>{const J=window.visualViewport?.scale??1,ne=window.getSelection().toString()!=="";if(!N.current&&J<=1.01&&!ne&&R.current!=null){w.current=ee.screenX;const oe=w.current-R.current;Math.abs(oe)>50&&(window.getSelection().empty(),P.current=!0,R.current=void 0,w.current=void 0,oe<0?k(U=>H({activeIndex:U,dir:"right"})):k(U=>H({activeIndex:U,dir:"left"})))}},F=ee=>{P.current&&ee.stopPropagation(),P.current=!1,N.current=!1,R.current=void 0,w.current=void 0},z=ee=>{if(ee.touches.length>1){N.current=!0;return}ee.changedTouches.length===1&&ee.changedTouches[0]&&(R.current=ee.changedTouches[0].screenX)},Q=ee=>{const J=window.visualViewport?.scale??1,ne=window.getSelection().toString()!=="";if(!N.current&&J<=1.01&&!ne&&R.current!=null&&ee.changedTouches[0]){w.current=ee.changedTouches[0].screenX;const oe=w.current-R.current;Math.abs(oe)>50&&(P.current=!0,R.current=void 0,w.current=void 0,oe<0?k(U=>H({activeIndex:U,dir:"right"})):k(U=>H({activeIndex:U,dir:"left"})))}},K=()=>{P.current=!1,N.current=!1,R.current=void 0,w.current=void 0},q=j.current;return x&&(q?.addEventListener("mousedown",Z,{capture:!0}),q?.addEventListener("mousemove",W,{capture:!0}),q?.addEventListener("click",F,{capture:!0})),q?.addEventListener("touchstart",z,{passive:!0}),q?.addEventListener("touchmove",Q,{passive:!0}),q?.addEventListener("touchend",K,{passive:!0}),q?.addEventListener("touchcancel",K,{passive:!0}),()=>{x&&(q?.removeEventListener("mousedown",Z),q?.removeEventListener("mousemove",W),q?.removeEventListener("mouseup",K)),q?.removeEventListener("touchstart",z),q?.removeEventListener("touchmove",Q),q?.removeEventListener("touchend",K),q?.removeEventListener("touchcancel",K)}},[H,x,M]);const se=mt.useCallback(Z=>()=>{_(Z),k(Z)},[_]);return(0,s.jsxs)("div",{"aria-label":a,"aria-roledescription":i,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":T},children:[D&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[L&&(0,s.jsx)("ul",{className:"carousel-controls-items",ref:I,role:"list",children:B.map((Z,W)=>{const F=T===W,z=se(W);return b?b({index:W,isActive:F,onClick:z,onKeyDown:Y}):(0,s.jsx)(fy,{ariaLabel:h+" "+(W+1),isActive:F,onClick:z,onKeyDown:Y,children:(0,s.jsx)(ue,{className:"carousel-controls-item-btn-icon",name:F?"circle":"circle-solid"})},W)})}),(0,s.jsx)("button",{"aria-disabled":o?void 0:T===0,"aria-label":d,className:"carousel-controls-prev",onClick:!o&&T===0?void 0:V,type:"button",children:(0,s.jsx)(ue,{className:"carousel-controls-prev-icon",name:r?n:t})}),(0,s.jsx)("button",{"aria-disabled":o?void 0:T===M-1,"aria-label":l,className:"carousel-controls-next",onClick:!o&&T===M-1?void 0:G,type:"button",children:(0,s.jsx)(ue,{className:"carousel-controls-next-icon",name:r?t:n})}),y&&(0,s.jsxs)("div",{className:"carousel-controls-counter",children:[(0,s.jsx)("div",{className:"carousel-controls-counter-text",children:`${T+1} ${m} ${M}`}),(0,s.jsx)("div",{className:"carousel-controls-counter-line",children:(0,s.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((T+1)/M).toFixed(2))*100}%`}})})]})]})}),(0,s.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:j,children:mt.Children.map(e,(Z,W)=>{const F=`${A}-${W}-counter`;return(0,s.jsxs)("div",{"aria-labelledby":F,"aria-roledescription":v,className:"carousel-slide",hidden:T!==W,inert:T!==W,role:"group",children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:F,children:`${W+1} ${f} ${M}`}),Z]})})})]})}var xc=p(49860);const rY="div",py=xc.createContext(void 0);function aY({children:e,element:t,...n},o){const[r,a]=xc.useState(null);return(0,s.jsx)(py.Provider,{value:r,children:xc.createElement(t??rY,{...n,ref:o},e,(0,s.jsx)("div",{ref:a}))})}const bc=xc.forwardRef(aY);function Kpe(){return xc.useContext(py)}function Zf(e){const t=n=>{const o=Th();return(0,s.jsx)(e,{...n,isRTL:o})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const Qn=(e,t)=>e==null||t==null?e===t:String(e)===String(t),au=({blockId:e,carouselRef:t,children:n,items:o})=>{const r=(0,u.useRef)(null),a=t??r;return(0,u.useEffect)(()=>{const i=d=>{const h=o.findIndex(m=>Qn(m.id,d));h>=0&&a.current?.navigateToSlide?.(h,!1)},c=d=>{const{path:h}=d.detail,{blockId:m,cardId:f}=xa(h,["block","card"]);m===e&&i(f)},l=d=>{const{blockId:h,itemId:m}=d.detail;Qn(h,e)&&i(m)};return window.addEventListener(We,c),window.addEventListener(Oo,l),()=>{window.removeEventListener(We,c),window.removeEventListener(Oo,l)}},[o,e,a]),(0,s.jsx)(s.Fragment,{children:n({carouselRef:a})})},$e=$("block-quote"),yc=({avatar:e,alt:t,l10nId:n,showAvatar:o})=>o?(0,s.jsx)(Sn,{alt:To(t),className:$e("avatar"),"data-l10n-id":n,src:e}):null,gy=(e,{paragraph:t})=>{const n=t||"",o=$e("text",{blank:t===""}).toString();return(0,s.jsx)(Ke,{className:o,value:n})},vy=(e,{name:t})=>{const n=$e("caption",{blank:t===""}).toString();return(0,s.jsx)(Ke,{className:n,value:t})},Cy=({avatar:e,blockProps:t,getL10nValue:n,item:o,renderCaption:r,renderText:a})=>{const i=o?.avatar?.media,c=n(i)?.image,l=c?.alt,d=Ah(c),h=At(i);return(0,s.jsx)("div",{className:$e("slide"),children:(0,s.jsxs)("figure",{className:$e("figure"),children:[d&&e?(0,s.jsx)(yc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,s.jsx)("blockquote",{className:$e("quote-body"),children:a(t,o)}),(0,s.jsx)("figcaption",{children:r(t,o)})]})})},iY=({alt:e,animateBlockEntrance:t,avatar:n,children:o,l10nId:r,initiallyVisible:a,isAuthorBlank:i=!1,isLearner:c,showAvatar:l,type:d})=>{const h=$e("col",{"no-avatar":!n}),m=n?(0,s.jsx)("div",{className:$e("image"),children:(0,s.jsx)("div",{className:$e("avatar-wrap"),children:d==="c"?(0,s.jsx)(Fe,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:a,isLearner:c,children:(0,s.jsx)(yc,{alt:e,avatar:n,l10nId:r,showAvatar:l})}):(0,s.jsx)(yc,{alt:e,avatar:n,l10nId:r,showAvatar:l})})}):null;return(0,s.jsx)("div",{className:$e("container"),children:(0,s.jsx)("div",{className:$e("row"),children:(0,s.jsxs)("div",{className:h,children:[(0,s.jsx)("div",{className:$e("divider-top")}),(0,s.jsxs)("div",{className:$e("figure",{"no-author":i,"no-avatar":!i&&!l}),children:[m,o]}),(0,s.jsx)("div",{className:$e("divider-bottom")})]})})})},cY=({avatar:e,children:t,alt:n,l10nId:o,showAvatar:r})=>(0,s.jsx)("div",{className:$e("figure"),children:(0,s.jsx)("div",{className:$e("container"),children:(0,s.jsxs)("div",{className:$e("row"),children:[(0,s.jsx)("div",{className:$e("col"),children:e&&r?(0,s.jsx)(yc,{alt:n,avatar:e,l10nId:o,showAvatar:r}):null}),(0,s.jsx)("div",{className:$e("col"),children:t})]})})}),lY=({background:e,avatar:t,children:n,alt:o,l10nId:r,showAvatar:a})=>(0,s.jsx)("div",{className:$e("background"),style:{backgroundImage:e??""},children:(0,s.jsx)("div",{className:$e("container"),children:(0,s.jsx)("div",{className:$e("row"),children:(0,s.jsx)("div",{className:$e("col"),children:(0,s.jsxs)("div",{className:$e("figure"),children:[t&&a?(0,s.jsx)(yc,{alt:o,avatar:t,l10nId:r,showAvatar:a}):null,n]})})})})});class dY extends u.Component{renderTextDelegate;renderCaptionDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{editable:!1,items:[],type:"a",getL10nValue:()=>{}}}getQuoteEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":case"b":case"background":return"fadeInUp";case"d":case"c":return"fadeInRight"}}getBackgroundImageUrl(t,n){const o=t?.alpha??$G(n),r=dt(t),a=VG(n);return Tl({alpha:o,color:a,url:r})?.backgroundImage}renderText(t,{paragraph:n}){const o=n||"",r=$e("text",{blank:o===""}).toString();return(0,s.jsx)(Ke,{className:r,value:o})}renderCaption(t,{name:n}){const o=$e("caption",{blank:n===""}).toString();return(0,s.jsx)(Ke,{className:o,value:n})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:o,isLearner:r,items:a,settings:i,type:c,renderText:l=this.renderTextDelegate,renderCaption:d=this.renderCaptionDelegate}=this.props,h=92,{avatarSize:m=Pf(c),divider:f=!0,dividerSize:v=h,entranceAnimation:C,quoteAlignment:g="left",quoteIcon:b=!0,quotesInline:x,quotePadding:y=2,quoteWidth:L=j3(c)}=i,[S]=a,{avatar:T,background:k}=S,E=n(T?.media)?.image,I=Ah(E),j=E?.alt,P=At(T.media),N=n(k?.media)?.image,R=N?.overlayColor,w=this.getBackgroundImageUrl(N,R),A=i?.avatar??I!=="",M=I&&I!=="",O=c==="background",B=O&&R==="light",D=w3(L),H=A3(y),V=Mf(c,m),G=_G(v),_=c==="a",Y=c==="c"||O,se=c!=="b"&&!O,Z=S?.name==="",W=S?.paragraph==="",F=$e(null,{[c]:!0,[`${c}-custom-width-${D}`]:!0,[`${c}-divider-off`]:_&&!f,[`${c}-divider-size-${G}`]:_&&f,[`${c}-quote-padding-${H}`]:!0,[`${c}-align-${g}`]:O,[`${c}-${D}-no-avatar`]:!I||!A,[`${c}-avatar-size-${V}`]:A&&M,[`${c}-quote-icon-off`]:Y&&!b,[`${c}-legacy-quote-mark`]:se&&!x,[`${c}-overlay-legacy`]:!R,[`${c}-overlay-light`]:B,"no-animation":!C}).toString(),z=(0,s.jsx)("div",{className:$e("wrap",{blank:Z||W}),children:(0,s.jsx)(Fe,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:o,isLearner:r,siblingDelay:.15,children:(0,s.jsxs)("figure",{children:[(0,s.jsx)("blockquote",{children:l(this.props,S)}),(0,s.jsx)("figcaption",{children:d(this.props,S)})]})})});let Q;switch(c){case"d":Q=(0,s.jsx)(cY,{alt:j,avatar:I,initiallyVisible:o,l10nId:P,showAvatar:A,type:c,children:z});break;case"background":Q=(0,s.jsx)(lY,{alt:j,avatar:I,background:w,initiallyVisible:o,l10nId:P,showAvatar:A,type:c,children:z});break;default:Q=(0,s.jsx)(iY,{alt:j,animateBlockEntrance:t,avatar:I,initiallyVisible:o,isAuthorBlank:Z,isLearner:r,l10nId:P,showAvatar:A,type:c,children:z})}return(0,s.jsx)(Ae,{className:F,children:Q})}}const Sc=at(dY),xy=(e=>(0,s.jsx)(Sc,{...e}));p.dn(xy);const uY=e=>(0,s.jsx)(Sc,{type:"b",...e}),hY=e=>(0,s.jsx)(Sc,{type:"c",...e}),mY=e=>(0,s.jsx)(Sc,{type:"d",...e}),fY=e=>(0,s.jsx)(Sc,{type:"background",...e});class pY extends u.Component{static get defaultProps(){return{type:"carousel",items:[],onStep:Function.prototype,getL10nValue:()=>{}}}handleChangeCarousel=t=>{this.props.onStep?.(this.props.items[t])};render(){const{blockId:t,animateBlockEntrance:n,editable:o,getL10nValue:r,initiallyVisible:a=!1,isRTL:i,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:v=gy,renderCaption:C=vy,type:g}=this.props,{avatar:b=!0,avatarSize:x=Pf(g),entranceAnimation:y,quotesInline:L,quotePadding:S=2,quoteWidth:T=j3(g),showBorder:k=!0}=f,I=g!=="b"&&!(g==="background"),j=w3(T),P=A3(S),N=Mf(g,x),R=m==="mobile-portrait"||m==="mobile-landscape",w=$e({[g]:!0,[`${g}-custom-width-${j}`]:!0,[`${g}-quote-padding-${P}`]:!0,[`${g}-${j}-no-avatar`]:!b,[`${g}-avatar-size-${N}`]:b,[`${g}-legacy-quote-mark`]:!l&&I&&!L,"no-animation":!y,"hide-border":!k,editable:o}).toString(),A=d.map(M=>(0,s.jsx)(Cy,{avatar:b,blockProps:this.props,getL10nValue:r,item:M,renderCaption:C,renderText:v},M.id));return(0,s.jsx)("div",{className:$e("slider-container"),children:(0,s.jsx)(Ae,{className:w,children:(0,s.jsx)(bc,{className:$e("wrap"),children:(0,s.jsx)("div",{className:$e("container"),children:(0,s.jsx)("div",{className:$e("col"),children:(0,s.jsx)(Gt,{className:$e("box"),children:(0,s.jsx)(Fe,{animateBlockEntrance:n,animateIn:"fadeInUp",initiallyVisible:a,isLearner:c,children:(0,s.jsx)(au,{blockId:t,items:d,children:({carouselRef:M})=>(0,s.jsx)(ru,{isRTL:i,labelCarousel:h?.a11yBlockQuoteCarousel,labelCarouselRoleDesc:h?.a11yBlockQuoteCarouselRoleDescription,labelSlideControls:h?.a11yBlockQuoteCarouselSlideControls,labelSlideControlsGoToNext:h?.a11yBlockQuoteCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:h?.a11yBlockQuoteCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:h?.a11yBlockQuoteCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:h?.blocksPreposition,labelSlidePreposition:h?.a11yBlockQuoteCarouselSlidePreposition,labelSlideRoleDesc:h?.a11yBlockQuoteCarouselSlideRoleDescription,onChange:this.handleChangeCarousel,ref:M,shouldMouseEmulateTouch:R,children:A})})})})})})})})})}}const gY=Zf(at(pY)),iu=$("block-quote"),vY=e=>{const{animateBlockEntrance:t,initiallyVisible:n=!1,isLearner:o,items:r=[],settings:a,renderText:i=gy,renderCaption:c=vy,type:l="stacked"}=e,d=ct(),{avatar:h=!0,entranceAnimation:m}=a,f=a.avatarSize??Pf(l),v=Mf(l,f),C=iu({[l]:!0,[`${l}-avatar-size-${v}`]:!0,"no-animation":!m}).toString(),g=r.map(b=>(0,s.jsx)(Cy,{avatar:h,blockProps:e,getL10nValue:d,item:b,renderCaption:c,renderText:i},b.id));return(0,s.jsx)(Ae,{className:C,children:(0,s.jsx)(bc,{className:iu("wrap"),children:(0,s.jsx)("div",{className:iu("container"),children:(0,s.jsx)(Fe,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:n,isLearner:o,siblingDelay:.15,children:(0,s.jsx)("div",{className:iu("row"),children:g})})})})})};var by=p(49860);const Tn=$("block-list"),CY=class extends by.Component{static get defaultProps(){return{editable:!1,items:[],onStep:Function.prototype,type:"numbered",getL10nValue:()=>{}}}nextNumber(e){const{items:t}=this.props,o=t.length>0?t[e].number:null;let r;return!isNaN(o)&&o!==""&&(r=parseInt(o,10)+1),(r<1||r>99)&&(r=null),r}render(){const{animateBlockEntrance:e,blockId:t,defaultBackgroundColor:n,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,lessonId:d,media:h,onStep:m,settings:f,type:v}=this.props,{audioPosition:C,bulletPadding:g,entranceAnimation:b,listItemColor:x,listItemColorContrast:y,listWidth:L}=f,S=r(Array.isArray(h)?{}:h),T=Cs(S,C),k=zG(g),E=Zd(L),I=Tn({[v]:!0,[`${v}-custom-width-${E}`]:!0,[`${v}-bullet-padding-${k}`]:!0,"no-animation":!b,presentation:this.props.isPresentation}),j=v==="numbered"?"ol":"ul";return(0,s.jsx)(Ae,{className:I.toString(),defaultBackgroundColor:n,children:(0,s.jsx)("div",{className:Tn("container"),children:(0,s.jsx)("div",{className:Tn("row"),children:(0,s.jsx)(bc,{className:Tn("col"),children:(0,s.jsx)("div",{className:"blocks-list__container",children:T.renderOrder.map((P,N)=>{if(P==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(j,{className:Tn("list"),role:"list",children:(0,s.jsx)(Fe,{animateBlockEntrance:e,animateIn:"fadeInRight",className:Tn("animated-item").toString(),initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map((R,w)=>{const A={key:R.id,index:w,lessonId:d,blockId:t,type:v,editable:o,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:x,listItemColorContrast:y,...R};return this.props.renderItem?this.props.renderItem(A):(0,u.createElement)(xY,{...A,key:A.key})})})})},`text-${N}`);if(P==="audio")return(0,s.jsx)("div",{className:X()("block-list__media",{"audio-on-top":T.renderOrder[0]==="audio","audio-on-bottom":T.renderOrder[0]!=="audio"}),children:(0,s.jsx)(Xt,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${P}-${N}`)})})})})})})}};class xY extends by.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,s.jsx)(Ke,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,id:n,index:o,number:r,paragraph:a,editable:i,className:c,renderText:l=this.renderTextDelegate,style:d,listItemColor:h,listItemColorContrast:m}=this.props,f={allowTabNavigation:!0,className:"block-list__content brand--linkColor cursorAuto",editable:i,id:n,value:a};return(0,s.jsxs)("li",{className:X()("block-list__item",`block-list__item--${t}`,c),ref:v=>{this.animateRef=v},role:"listitem",style:d,children:[t==="numbered"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Tn("number"),style:h?{backgroundColor:h,color:zt({contrast:m||ke.AUTO,backgroundColor:h})}:void 0,children:r||o+1}),l(f)]}),t==="bulleted"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,s.jsx)(ue,{className:Tn("bullet"),name:"circle-solid",style:h?{color:h}:void 0}),l(f)]}),t==="icon"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:Tn("icon"),style:h?{"--color-background":h}:void 0,children:(0,s.jsx)("span",{"aria-hidden":"true",className:Tn("icon-glyph",{placeholder:!0}),children:"\u2B50\uFE0F"})}),l(f)]}),t==="checkboxes"&&(0,s.jsxs)("label",{className:Tn("option"),children:[(0,s.jsx)("input",{className:Tn("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,s.jsx)("div",{className:Tn("checkbox"),style:h?{borderColor:h,"--color-background":h}:void 0,children:(0,s.jsx)(ue,{className:Tn("checkbox__icon"),name:"check",style:h?{color:zt({contrast:m||ke.AUTO,backgroundColor:h})}:void 0})}),l(f)]})]})}}const cu=e=>{const t=ct(),n=ks();return(0,s.jsx)(CY,{...e,getL10nValue:t,isPresentation:n})},bY=cu,yY=e=>(0,s.jsx)(cu,{type:"checkboxes",...e}),SY=e=>(0,s.jsx)(cu,{type:"bulleted",...e}),LY=e=>(0,s.jsx)(cu,{type:"icon",...e});var Xf=p(49860);const qf=e=>["hero","full","aside"].includes(e);class TY extends Xf.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{type:"hero",editable:!1,getL10nValue:()=>{},lessonId:"",blockId:"",items:[]}}renderCaption(t,n){return(0,s.jsx)(Ke,{className:"block-image__caption",value:n})}render(){const{aiMagicIcon:t,aiOverlay:n,animateBlockEntrance:o,blockId:r,defaultBackgroundColor:a,editable:i,getL10nValue:c,initiallyVisible:l,isLearner:d,items:h,type:m,labels:f,lessonId:v,settings:C,renderCaption:g=this.renderCaptionDelegate}=this.props,{entranceAnimation:b,cornerRadius:x,zoomOnClick:y}=C,L=X()(`block-image block-image--${m}`,"block-image--flag-dimensions",{"block-image--no-animation":!b}),S=h[0],{id:T,caption:k}=S,{image:E,audio:I}=c(S.media)??{},j=E?.alt,P=dt(E),N=E?.dimensions,R=N?.width||N?.originalWidth,w=N?.height||N?.originalHeight,A=vc({caption:k,editable:i,id:T,getL10nValue:c}),M=!d&&!P,O=R&&w?R/w:void 0,B=E?.link?c(E.link.destination):void 0,D=E?.link&&typeof B=="string"?{type:E.link.type,destination:B}:void 0,H=X()("block-image__image",{"block-image__image--audio-overlay":!!I});return(0,s.jsx)(Ae,{className:L,defaultBackgroundColor:a,children:(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsx)("div",{className:"block-image__row",children:(0,s.jsx)("div",{className:"block-image__col",children:(0,s.jsx)(Fe,{animateBlockEntrance:o,initiallyVisible:l,isLearner:d,children:(0,s.jsxs)(A.tagName,{"aria-labelledby":A.figcaptionId,className:"block-image__figure",role:A.role,children:[(0,s.jsxs)("div",{className:H,children:[M?(0,s.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:O},children:[(0,s.jsx)("div",{children:t}),(0,s.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Da,{alt:j,cornerRadius:x,disableZoom:!y,height:w,l10nId:At(S.media),labels:f,link:D,maxHeight:m==="full"?380:900,src:P,width:R}),I&&qf(m)&&(0,s.jsx)(Xt,{blockId:r,cornerRadius:x,index:`${r}-${T}-0`,isOverlayAudio:!0,item:S,labels:f,lessonId:v,media:S.media,mediaType:"audio"})]}),n&&(0,s.jsx)("div",{className:"block-image__ai-overlay",children:n})]}),(i||k)&&(0,s.jsx)("figcaption",{id:A.figcaptionId,children:g(T,k)})]})})})})})})}}const kY=at(TY),IY=(e,t,n,o,r)=>t?r:(0,s.jsx)(Fe,{animateBlockEntrance:e,initiallyVisible:n,isLearner:o,children:r});class EY extends Xf.Component{renderCaptionDelegate;renderParagraphDelegate;constructor(t){super(t),this.renderParagraphDelegate=this.renderParagraph.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",type:"text-aside"}}renderParagraph(t,n){return(0,s.jsx)(Ke,{className:"block-image__text",value:n})}renderCaption(t,n){return(0,s.jsx)(Ke,{className:"block-image__caption",value:n})}renderImage(t,n,o,r){const{blockId:a,editable:i,lessonId:c,renderCaption:l=this.renderCaptionDelegate,getL10nValue:d}=this.props,h=d(o.media),m=h?.image,f=h?.audio,v=m?.alt,C=dt(m),g=m?.dimensions,b=g?.width||g?.originalWidth,x=g?.height||g?.originalHeight,y=vc({caption:n,editable:i,id:t,getL10nValue:d}),{animateBlockEntrance:L,initiallyVisible:S,isLearner:T,labels:k,settings:{cornerRadius:E,zoomOnClick:I}}=this.props,j=X()("block-image__image",{"block-image__image--audio-overlay":!!f}),P=m?.link?d(m.link.destination):void 0,N=m?.link&&typeof P=="string"?{type:m.link.type,destination:P}:void 0;return(0,s.jsx)(Fe,{animateBlockEntrance:L,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:S,isLearner:T,children:(0,s.jsxs)(y.tagName,{"aria-labelledby":y.figcaptionId,className:"block-image__figure",role:y.role,children:[(0,s.jsxs)("div",{className:j,children:[(0,s.jsx)(Da,{alt:v,cornerRadius:E,disableZoom:!I,height:x,l10nId:At(o?.media),labels:k,link:N,maxHeight:900,src:C,width:b}),f&&qf("aside")&&(0,s.jsx)(Xt,{blockId:a,cornerRadius:E,index:`${a}-${t}-0`,isOverlayAudio:!0,item:o,labels:k,lessonId:c,media:o.media,mediaType:"audio"})]}),(i||n)&&(0,s.jsx)("figcaption",{id:y.figcaptionId,children:l(t,n)})]})})}render(){const{defaultBackgroundColor:t,items:n,renderParagraph:o=this.renderParagraphDelegate,settings:r,type:a}=this.props,{entranceAnimation:i,imagePosition:c,imageSize:l}=r,d=c==="right",h=X()(`block-image block-image--${a}`,{"block-image--small":l==="small","block-image--large":l==="large","block-image--reverse":d,"block-image--no-animation":!i}),m=n[0],{id:f,caption:v}=m,C="paragraph"in m?m.paragraph:void 0;return(0,s.jsx)(Ae,{className:h,defaultBackgroundColor:t,children:(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsxs)("div",{className:"block-image__row",children:[(0,s.jsx)("div",{className:"block-image__col",children:d?o(f,C):this.renderImage(f,v,m,"left")}),(0,s.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,v,m,"right"):o(f,C)})]})})})}}const NY=at(EY);class jY extends Xf.Component{renderCaptionDelegate;renderOverlayDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.renderOverlayDelegate=this.renderOverlay.bind(this)}static get defaultProps(){return{blockId:"",editable:!1,getL10nValue:()=>{},items:[],lessonId:"",type:"full"}}renderCaption(t,n){return(0,s.jsx)(Ke,{className:"block-image__caption",value:n})}renderOverlay(t,n){return(0,s.jsx)(Ke,{className:"block-image__paragraph",value:n})}renderOverlayCaption(t,n){const{animateBlockEntrance:o,initiallyVisible:r,isLearner:a,renderOverlay:i=this.renderOverlayDelegate}=this.props;return(0,s.jsx)("div",{className:"block-image__container",children:(0,s.jsx)("div",{className:"block-image__row",children:(0,s.jsx)("div",{className:"block-image__col",children:(0,s.jsx)(Fe,{animateBlockEntrance:o,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:a,children:i(t,n)})})})})}render(){const{animateBlockEntrance:t,blockId:n,defaultBackgroundColor:o,editable:r,getL10nValue:a,initiallyVisible:i,isLearner:c,items:l,labels:d,lessonId:h,settings:m,type:f,renderCaption:v=this.renderCaptionDelegate}=this.props,{entranceAnimation:C,opacity:g,opacityColor:b}=m,x=Qh(m?.backgroundColor,o),y=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!C,"block-image--dark":zm(x)}),L={opacity:g||.6,backgroundColor:b||"transparent"},S=l[0],{id:T,caption:k}=S,E=a(S.media),I=E?.image,j=E?.audio,P=I?.key,N=dt(I),R=I?.dimensions,w=R?.width||R?.originalWidth,A=R?.height||R?.originalHeight,M=To(I?.alt),O=f==="overlay",B=vc({caption:k,editable:r,id:T,isOverlayType:O,getL10nValue:a});return(0,s.jsxs)(Ae,{"aria-labelledby":B.figcaptionId,className:y,defaultBackgroundColor:o,role:B.role,tag:B.tagName,children:[IY(t,O,i,c,(0,s.jsxs)("div",{className:"block-image__figure",children:[P&&(0,s.jsxs)("div",{className:"block-image__image","data-l10n-id":At(S?.media),style:{backgroundImage:`url('${N}')`},children:[(0,s.jsx)(Sn,{alt:M,height:A,src:N,width:w}),(0,s.jsx)("div",{className:"block-image__overlay",style:L}),j&&qf(f)&&(0,s.jsx)(Xt,{blockId:n,index:`${n}-${T}-0`,isOverlayAudio:!0,item:S,labels:d,lessonId:h,media:S.media,mediaType:"audio"})]}),O?this.renderOverlayCaption(T,k):null]})),!O&&(r||k)&&(0,s.jsx)("figcaption",{className:"block-image__container",id:B.figcaptionId,children:v(T,k)})]})}}const Jf=at(jY),wY=e=>(0,s.jsx)(Jf,{type:"overlay",...e}),AY=e=>(0,s.jsx)(Jf,{type:"banner",...e});var RY=p(49860);function yy(e){class t extends RY.Component{static displayName=`withGalleryCaption(${e.displayName||e.name})`;renderCaptionDelegate;constructor(o){super(o),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption(o,r,a=!0){return(0,s.jsx)(Ke,{allowTabNavigation:a,className:"block-gallery__caption",value:r})}render(){const{renderCaption:o=this.renderCaptionDelegate}=this.props;return(0,s.jsx)(e,{...this.props,renderCaption:o})}}return t}var lu=p(49860);const Sy=$("block-gallery-carousel");function PY({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:n,editable:o,initiallyVisible:r,isLearner:a,labels:i,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[v,C]=lu.useState(0),g=lu.useCallback(L=>{C(L),d?.(l[L])},[l,d]),b=h===dr.MOBILE_PORTRAIT||h===dr.MOBILE_LANDSCAPE,x=Sy({noAnimation:!f?.entranceAnimation||rn()}).toString(),y=Th();return(0,s.jsx)(Ae,{className:x,defaultBackgroundColor:n,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)(bc,{className:Sy("container").toString(),children:(0,s.jsx)(au,{blockId:e,items:l,children:({carouselRef:L})=>(0,s.jsx)(ru,{isRTL:y,labelCarousel:i?.a11yBlockImageCarousel,labelCarouselRoleDesc:i?.a11yBlockImageCarouselRoleDescription,labelSlideControls:i?.a11yBlockImageCarouselSlideControls,labelSlideControlsGoToNext:i?.a11yBlockImageCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:i?.a11yBlockImageCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:i?.a11yBlockImageCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:i?.blocksPreposition,labelSlidePreposition:i?.a11yBlockImageCarouselSlidePreposition,labelSlideRoleDesc:i?.a11yBlockImageCarouselSlideRoleDescription,onChange:g,ref:L,shouldMouseEmulateTouch:b,children:l.map((S,T)=>(0,s.jsx)(OY,{activeIndex:v,blockId:e,editable:o,index:T,item:S,labels:i,lessonId:c,renderCaption:m,settings:f},S.id))})})})})})}const MY=yy(PY),ep=$("block-gallery-carousel-item");function OY({activeIndex:e,blockId:t,editable:n,index:o,item:r,labels:a,lessonId:i,renderCaption:c,settings:l}){const[d,h]=lu.useState(!1),{image:m,audio:f}=Me(r.media),v=Me(m?.link?.destination),C=m?.dimensions,g=lu.useCallback(()=>{h(!0)},[]);return(0,s.jsxs)("figure",{className:ep(),children:[n&&!d&&(0,s.jsx)("div",{className:ep("loading"),children:"Loading image..."}),(0,s.jsxs)("div",{className:ep("image-container",{"audio-overlay":!!f}),children:[(0,s.jsx)(Da,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:C?.height||C?.originalHeight,l10nId:At(r?.media),labels:a,link:m?.link&&typeof v=="string"?{type:m.link.type,destination:v}:void 0,maxHeight:900,onLoad:g,src:dt(m),width:C?.width||C?.originalWidth}),f&&(0,s.jsx)(Xt,{blockId:t,cornerRadius:l?.cornerRadius,index:`${t}-${r.id}-${o}`,isOverlayAudio:!0,item:r,labels:a,lessonId:i,media:r.media,mediaType:"audio",shouldPause:e!==o})]}),(n||r.caption)&&(0,s.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const BY=({alt:e,cornerRadius:t,disableZoom:n,height:o,l10nId:r,labels:a,link:i,src:c,width:l})=>(0,s.jsx)("div",{className:"block-gallery__image",children:(0,s.jsx)(Da,{alt:e,cornerRadius:t,disableZoom:n,height:o,l10nId:r,labels:a,link:i,maxHeight:900,src:c,width:l})}),DY=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}};function FY(e){return(0,s.jsx)(MY,{...e})}class HY extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n,editable:o,getL10nValue:r,initiallyVisible:a,isLearner:i,items:c,labels:l,renderCaption:d,settings:h,width:m}=this.props,{entranceAnimation:f,cornerRadius:v,zoomOnClick:C}=h,g=X()(`block-gallery block-gallery--${DY(m)}`,{"block-gallery--no-animation":!f||rn()});return(0,s.jsx)(Ae,{className:g,defaultBackgroundColor:n,children:(0,s.jsx)("div",{className:"block-gallery__container",children:(0,s.jsx)("div",{className:"block-gallery__row",children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map(b=>{const{id:x}=b,y=b.caption,L=r(b.media)?.image,S=L?.alt,T=L?.key,k=L?.dimensions,E=k?.width||k?.originalWidth,I=k?.height||k?.originalHeight,j=dt(L),P=r(L?.link?.destination),N=vc({caption:y,editable:o,id:x,getL10nValue:this.props.getL10nValue});return(0,s.jsx)("div",{className:"block-gallery__col",children:(0,s.jsxs)(N.tagName,{"aria-labelledby":N.figcaptionId,className:"block-gallery__figure",role:N.role,children:[T&&(0,s.jsx)(BY,{alt:S,cornerRadius:v,disableZoom:!C,height:I,l10nId:At(b?.media),labels:l,link:L?.link&&typeof P=="string"?{type:L.link.type,destination:P}:void 0,src:j,width:E}),(o||y)&&(0,s.jsx)("figcaption",{id:N.figcaptionId,children:d(x,y)})]})},x)})})})})})}}const tp=yy(at(HY)),np=$("block-divider"),sp=({isLearner:e,labels:{numberedDividerGroup:t},number:n,settings:o,type:r="divider"})=>{const{entranceAnimation:a}=o,i=r==="numbered",l=np({authoring:!e,spacing:r==="spacing",numbered:i,"no-animation":!a}).toString(),d=i?(0,s.jsxs)("div",{className:np("wrap__number"),children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:t}),n]}):null;return(0,s.jsx)(Ae,{className:l,children:(0,s.jsx)("div",{className:np("wrap",{authoring:!e&&!i}),children:d})})},$Y=sp,VY=e=>(0,s.jsx)(sp,{type:"numbered",...e}),zY=e=>(0,s.jsx)(sp,{type:"spacing",...e});var _Y=p(30234),UY=p.n(_Y),GY=p(27689),Ly=p.n(GY),WY=p(60328),du=p.n(WY),KY=p(8907),uu=p.n(KY),hu=p(49860);const QY=30,Ty=Zh("blockSettings");class YY extends hu.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:n,editable:o,initiallyVisible:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,settings:h,enableVideoPlaybackSpeed:m}=this.props,{entranceAnimation:f,accordionBehavior:v="keepOpen"}=h,C=X()("blocks-accordion",{"blocks-accordion--no-animation":!f});return(0,s.jsx)(Ae,{className:C,"data-block-id":n,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"blocks-accordion__container",children:(0,s.jsx)("div",{className:"blocks-accordion__row",children:(0,s.jsx)("div",{className:"blocks-accordion__col",children:(0,s.jsx)(nZ,{blockId:n,editable:o,enableVideoPlaybackSpeed:m,items:i,keepOpen:v==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const ZY={isOpen:!1,isActive:!1},XY=e=>(t,{id:n})=>Object.assign({},t,{[n]:e[n]||ZY}),ky=(e,t)=>t.reduce(XY(e),{}),qY=(e,t)=>(n,o)=>{const r=e==o,a=r?!n.isOpen:n.isOpen,i=r&&!n.isOpen;return{isOpen:t?a:i,isActive:r}},JY=e=>(t,n)=>{const o=n==e;return{isOpen:o,isActive:o}},eZ=e=>(t,n)=>({isOpen:n==e,isActive:t.isActive});class tZ extends hu.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:n}=this.props;this.state={itemStatusMap:ky({},n)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(We,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(We,this.handleNavtoTab)}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(n===this.props.blockId){const r=this.props.items.findIndex(({id:h})=>h===o),{items:a,onStep:i}=this.props,{itemStatusMap:c}=this.state,l=a[r].id,d=JY(l);this.setState({itemStatusMap:Ss()(d,c)}),open&&i(a[r])}}UNSAFE_componentWillReceiveProps(t){const n=t.items,o=Hn()(n)!==Hn()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():o&&this.rebuildItemStatusMap(n)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:n}=this.props,o=UY()(a=>t[a.id].isOpen,n);if(!o)return;const r=eZ(o.id);this.setState({itemStatusMap:Ss()(r,t)})}rebuildItemStatusMap(t){const n=this.state.itemStatusMap;this.setState({itemStatusMap:ky(n,t)})}handleItemClick(t){const{items:n,keepOpen:o,onStep:r}=this.props,{itemStatusMap:a}=this.state,i=n[t].id,c=qY(i,o);this.setState({itemStatusMap:Ss()(c,a)}),open&&r(n[t])}render(){const{items:t,settings:n,editable:o,labels:r,lessonId:a,blockId:i,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=n,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,s.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,s.jsx)(oZ,{blockId:i,disableZoom:!d,editable:o,focused:l[m.id].isActive,index:f,item:{...m,enableVideoPlaybackSpeed:c},labels:r,lessonId:a,onClick:this.handleItemClick.bind(this,f),open:l[m.id].isOpen},m.id))})}}const nZ=Ty(tZ);class sZ extends hu.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=du()(),this.toggle=this.toggle.bind(this),this.renderDescription=this.renderDescription.bind(this),this.renderTitle=this.renderTitle.bind(this)}componentDidUpdate(t){if(!this.props.open)return;const n=this.content;if(n&&(n.classList.add("blocks-accordion__content--visible"),!t.open&&this.props.open&&!this.props.suppressAutoScrollOnOpen)){const o=n.parentElement,r=o?.getBoundingClientRect()?.top,a=r!=null&&r>0&&r<window.innerHeight,i=rn()?"instant":"smooth";a||o.scrollIntoView({behavior:i,block:"start"})}}toggle(t){const{blockId:n,index:o}=this.props,r=Le.playerId,a=new RegExp(`-${o}(?:-.+)?$`);open&&r&&r.includes(n.toString())&&a.test(r)&&Le.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:n}=this.props.item;return(0,s.jsx)(we,{className:"blocks-accordion__title",id:t,value:n})}renderDescription(t){const{description:n=""}=this.props.item;return(0,s.jsx)(Ke,{className:"blocks-accordion__description",value:n||""},t)}render(){const{blockId:t,blockSettings:n,editable:o,disableZoom:r,getL10nValue:a,index:i,item:c,focused:l,labels:d,lessonId:h,open:m,renderDescription:f=this.renderDescription,renderTitle:v=this.renderTitle}=this.props,{settings:C={},enableVideoPlaybackSpeed:g}=c,b=a(c.media)??{},x=Cs(b,n.audioPosition),y=Object.assign({},C,{disableZoom:r,fullEmbed:!0}),L=n?.backgroundType===ae.ACCENT||n?.backgroundType===ae.IMAGE,S=X()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),T=X()("blocks-accordion__header",{"blocks-accordion__header--editing":o,"brand--border":m&&l&&!L}),k=X()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!L}),E=`title-${this.id}`,I=`panel-${this.id}`,j=n?.headingLevel,P=j?`h${j}`:"h2";let N=(0,s.jsxs)("button",{"aria-controls":I,"aria-expanded":m,className:T,onClick:this.toggle,onKeyDown:!o&&j2(this.toggle)||void 0,type:"button",children:[v(E),(0,s.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,s.jsx)(ue,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return o&&(N=(0,s.jsxs)("div",{className:T,children:[v(E),(0,s.jsx)("button",{"aria-controls":I,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,s.jsx)(ue,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,s.jsxs)(Gt,{className:S,tag:"section",children:[(0,s.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,s.jsx)(P,{children:N})}),(0,s.jsx)("section",{"aria-labelledby":E,className:k,id:I,ref:R=>{this.content=R},children:x.renderOrder.map((R,w)=>{if(R==="text")return f(`text-${w}`);const A={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:g,opts:y,shouldPause:!m},M=Iy(b),O=M==="image-with-audio",B=O?"left":"center",H={audio:{media:x.audioOnlyMedia||b,isOverlayAudio:!1,index:`${t}-${i}-audio`,className:"blocks-accordion__audio"},image:{media:x.imageOnlyMedia||b,isOverlayAudio:!1,index:`${t}-${i}-image`,className:X()(`blocks-accordion__${M}`,{[`blocks-accordion__${M}--${B}`]:O})},video:{media:x.videoOnlyMedia||b,isOverlayAudio:!1,index:`${t}-${i}-video`,className:X()(`blocks-accordion__${M}`,{[`blocks-accordion__${M}--${B}`]:O})},embed:{media:x.embedOnlyMedia||b,isOverlayAudio:!1,index:`${t}-${i}-embed`,className:X()(`blocks-accordion__${M}`,{[`blocks-accordion__${M}--${B}`]:O})},overlay:{media:b,isOverlayAudio:!0,index:`${t}-${i}-overlay`,className:X()(`blocks-accordion__${M}`,{[`blocks-accordion__${M}--${B}`]:O})}}[R];if(!H)return null;const{className:V,...G}=H;return(0,s.jsx)("div",{className:X()(V,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,s.jsx)("div",{className:"blocks-accordion__figure",children:(0,s.jsx)(Xt,{...A,...G})})},`${R}-${w}`)})})]})}}const oZ=Ty(at(e=>(0,s.jsx)(sZ,{...e}))),Iy=e=>{const{image:t,embed:n,video:o,audio:r}=e;return t&&!r?"image":n&&!r?"embed":o?"video":r&&!t&&!n?"audio":t&&r?"image-with-audio":r&&n?"audio-and-embed":"image"};class rZ extends hu.Component{static get defaultProps(){return{items:[],activeIndex:0,getL10nValue:()=>{},lessonId:"",blockId:"",blockSettings:{},onStep:Function.prototype}}tabs;id;tabResize;tabScroll;arrowNextEl;arrowPrevEl;container;tabControls;tabsHeaderEl;constructor(t){super(t),this.renderDescription=this.renderDescription.bind(this);const n=this.props.activeIndex;this.state={activeIndex:n,activeTouch:!1,activeMouse:!1},this.tabs=[],this.id=du()(),this.handleNavtoTab=this.handleNavtoTab.bind(this),this.handleRevealItem=this.handleRevealItem.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=uu()(this.handleControls.bind(this),100)),window.addEventListener(We,this.handleNavtoTab),window.addEventListener(Oo,this.handleRevealItem),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=uu()(this.handleControls.bind(this),50))}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&(this.tabsHeaderEl.scrollIntoView({behavior:"smooth",block:"start"}),this.setState({activeIndex:this.props.items.findIndex(({id:r})=>r===o)},()=>{Gm(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}handleRevealItem(t){const{blockId:n,itemId:o}=t.detail;if(n!==this.props.blockId)return;const r=this.props.items.findIndex(({id:a})=>Qn(a,o));r>=0&&this.setState({activeIndex:r})}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(We,this.handleNavtoTab),window.removeEventListener(Oo,this.handleRevealItem)}setActive(t){this.setState({activeIndex:t});const{blockId:n}=this.props,o=Le.playerId;this.state.activeIndex!=t&&o&&o.includes(n.toString())&&Le.pause(),this.props.onStep?.(this.props.items[t])}handleControls(){const{isRTL:t}=this.props;this.tabsHeaderEl.offsetWidth===this.tabsHeaderEl.scrollWidth?(this.arrowPrevEl.classList.add("hidden"),this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("start"),this.tabControls.classList.add("end")):(this.tabsHeaderEl.scrollLeft===0?(this.arrowPrevEl.classList.add("hidden"),this.tabControls.classList.add("start")):(this.arrowPrevEl.classList.remove("hidden"),this.tabControls.classList.remove("start")),this.tabsHeaderEl.scrollLeft===(this.tabsHeaderEl.scrollWidth-this.tabsHeaderEl.offsetWidth)*(t?-1:1)?(this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("end")):(this.arrowNextEl.classList.remove("hidden"),this.tabControls.classList.remove("end")))}handleMouseEnter(){this.state.activeTouch||this.setState({activeMouse:!0})}handleMouseLeave(){this.setState({activeMouse:!1})}handleTouchStart(){this.setState({activeTouch:!0})}scrollTabs(t){const{isRTL:n}=this.props,o=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,i=(t==="next"?n?Ly():xf():n?xf():Ly())(r,o*.8);this.tabsHeaderEl.scrollTo({left:i,behavior:"smooth"})}arrowPrevInset(t){const n=this.arrowPrevEl.getBoundingClientRect(),o=n.right-t,r=n.left-t;return o+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,n){const{isRTL:o}=this.props;let r=!1,a;Po(n)?(r=!0,a=o?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Mo(n)&&(r=!0,a=o?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&n.preventDefault(),a!=null&&(this.tabs[a]?.focus(),this.setActive(a))}renderHeader(t,n){const{activeIndex:o,activeTouch:r,activeMouse:a}=this.state,i=this.tabsHeaderEl&&this.tabsHeaderEl.scrollWidth>this.tabsHeaderEl.clientWidth,c=X()("blocks-tabs__header-wrap",{touch:r,mouse:a&&i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,s.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:_Q,children:t.map(({title:l},d)=>{const h=t.length===1||d===o,m=t.length>1&&d+1===o,f=t.length>1&&d-1===o,v=X()("blocks-tabs__header-item",{"brand--color":h&&!n,"blocks-tabs__header-item--active":h,"blocks-tabs__header-item--before-active":m,"blocks-tabs__header-item--after-active":f}),C=`tab-${this.id}-${d}`,g=`tabpanel-${this.id}-${d}`;return(0,s.jsx)("button",{"aria-controls":g,"aria-selected":h,className:v,id:C,onClick:this.setActive.bind(this,d),onFocus:this.focusTab.bind(this),onKeyDown:this.handleTabKeyDown.bind(this,d),ref:b=>{this.tabs[d]=b},role:"tab",tabIndex:h?void 0:-1,type:"button",children:(0,s.jsx)(we,{value:l})},C)})}),(0,s.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,s.jsx)("div",{"aria-hidden":"true",className:"blocks-tabs__arrow blocks-tabs__arrow--prev brand--background",onClick:this.scrollTabs.bind(this,"previous"),ref:l=>{this.arrowPrevEl=l},children:(0,s.jsx)(ue,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,s.jsx)("div",{"aria-hidden":"true",className:"blocks-tabs__arrow blocks-tabs__arrow--next brand--background",onClick:this.scrollTabs.bind(this,"next"),ref:l=>{this.arrowNextEl=l},children:(0,s.jsx)(ue,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,s.jsx)(Ke,{className:"blocks-tabs__description",value:t})}renderItem(t,n,o){const{blockId:r,getL10nValue:a,labels:i,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===n,{settings:m={},enableVideoPlaybackSpeed:f}=t,v=a(t.media)??{},C=Cs(v,this.props.settings.audioPosition,!1),g=X()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),b=Object.assign({},m,{disableZoom:o,fullEmbed:!0}),x=`tabpanel-${this.id}-${n}`,y=`tab-${this.id}-${n}`,L=Iy(v),S=L==="image-with-audio",T=L==="audio-and-embed",k=S?v?.image?.align:"left",E=T?"embed-border":void 0;return(0,s.jsx)("div",{"aria-labelledby":y,className:g,id:x,role:UQ,tabIndex:h?0:void 0,children:C.renderOrder.map((I,j)=>{if(I==="text")return(0,s.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${j}`);const P={blockId:r,embedClass:E,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:i,lessonId:c,enableVideoPlaybackSpeed:f,opts:b,shouldPause:!h},R={audio:{media:C.audioOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-audio`,className:"blocks-tabs__audio"},image:{media:C.imageOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-image`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})},video:{media:C.videoOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-video`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})},embed:{media:C.embedOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${n}-embed`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})},overlay:{media:v,isOverlayAudio:!0,index:`${r}-${n}-overlay`,className:X()(`blocks-tabs__${L}`,{[`blocks-tabs__${L}--${k}`]:S})}}[I];if(!R)return null;const{className:w,...A}=R;return(0,s.jsx)("div",{className:X()(w,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,s.jsx)("div",{className:"blocks-tabs__figure",children:(0,s.jsx)(Xt,{...P,...A})})},`${I}-${j}`)})},x)}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,enableVideoPlaybackSpeed:i}=this.props,{backgroundType:c,cardMode:l,entranceAnimation:d,zoomOnClick:h}=a,m=X()("blocks-tabs",{"blocks-tabs--no-animation":!d}),f=r.length>0?r.slice(0,QY):[],v=l===$n.TRANSPARENT&&(c===ae.ACCENT||c===ae.IMAGE),C=X()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,s.jsx)(Ae,{className:m,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:C,children:(0,s.jsx)("div",{className:"blocks-tabs__row",children:(0,s.jsx)("div",{className:"blocks-tabs__col",children:(0,s.jsx)("div",{className:"blocks-tabs__wrapper",ref:g=>{this.container=g},children:(0,s.jsxs)(Gt,{children:[this.renderHeader(f,v),(0,s.jsx)("div",{className:"blocks-tabs__content",children:f.map((g,b)=>this.renderItem({...g,enableVideoPlaybackSpeed:i},b,!h))})]})})})})})})})}}const aZ=Zf(at(e=>(0,s.jsx)(rZ,{...e}))),iZ=Lt()(null,["payload","result"]),cZ=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},lZ=e=>e.meta?.version,Ey=e=>e.src??null,dZ=e=>e.processing,uZ=zs()(["payload","result","completion"]),hZ=Lt()(!1,["payload","result","score"]),mZ=Vl()((e,t)=>{if(!t)return!1;const{majorLimit:n,minorLimit:o}=e,[r,a]=t.split("."),i=parseInt(r)===n&&Number(a)>=o;return Number(r)>n||i}),fZ={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},pZ=e=>{const t=Eo()(e.split("-"));return fZ[t]},gZ=mZ({majorLimit:3,minorLimit:13}),vZ=(e,t,n,o)=>{const r=t&&pZ(n),a=r?`${e}${r}`:`${e}?rise=true`;if(o){const i=a.includes("?")?"&":"?";return`${a}${i}locale=${o}`}return a},Ny="about:blank",CZ="https://example.invalid",jy=new Set(["http:","https:"]),wy=e=>{if(e)try{const t=new URL(e);return jy.has(t.protocol)?t.href:void 0}catch{return}},xZ=()=>wy(Ne("CDN_USER_CONTENT_URI"))??wy(window.location.origin)??CZ,Ay=e=>{try{return jy.has(new URL(e,xZ()).protocol)}catch{return!1}},Ry=e=>{const t=Ln(e);return typeof t=="string"?t:""},bZ=e=>{const t=Ry(e);if(!t||t===Ny||!Ay(t))return;const n=Ry(gt(t));return n&&n!==Ny&&Ay(n)?n:void 0};var yZ=p(49860);class SZ extends yZ.Component{constructor(t){super(t),this.state={fullscreen:!1,reopenMenu:!1},this.iframe=null,this.canFullscreen=this.canFullscreen.bind(this),this.handleCourseUpdate=this.handleCourseUpdate.bind(this),this.handleFullscreenEnter=this.handleFullscreenEnter.bind(this),this.handleFullscreenExit=this.handleFullscreenExit.bind(this),this.handleMessages=this.handleMessages.bind(this),this.renderItem=this.renderItem.bind(this)}iframe;static get defaultProps(){return{getL10nValue:()=>{},isLesson:!1,onStep:Function.prototype,hasManySlBlocks:Function.prototype,previewType:""}}UNSAFE_componentWillMount(){window.addEventListener("message",this.handleMessages)}componentWillUnmount(){window.removeEventListener("message",this.handleMessages)}componentDidMount(){const{getL10nValue:t,items:n,onStep:o}=this.props,r=Eo()(n),a=t(r?.media)?.storyline??{},i=lZ(a);gZ(i)||o(r)}canFullscreen(t){const{blockId:n,hasManySlBlocks:o}=this.props,{windowName:r}=t;return n===r||!o()}handleMessages(t){const{data:n}=t,{type:o}=n,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[o];r&&r(n)}handleCourseUpdate(t){const{items:n,onFinishStoryline:o,onStep:r,blockId:a}=this.props,i=Eo()(n),{windowName:c}=t;if(a===c&&uZ(t)){const{score:l,success:d}=iZ(t);if(hZ(t)){const h=l.scaled*100;o?.(a,d,!0,h)}else o?.(a,!0,!1);r(i)}}handleFullscreenEnter(t){const{menuOpen:n,handleStorylineFullscreen:o}=this.props;this.canFullscreen(t)&&(n&&o(!0),this.setState({fullscreen:!0,reopenMenu:n}))}handleFullscreenExit(t){const{handleStorylineFullscreen:n}=this.props,{reopenMenu:o}=this.state;this.canFullscreen(t)&&(o&&n(!1),this.setState({fullscreen:!1,reopenMenu:!1}))}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:o,isLesson:r,isLearner:a,isOnlyBlockInStep:i,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=Eo()(c),f=n(m?.media)?.storyline??{},{mediaWidth:v="0"}=d,C=i?{}:{display:r&&!Ey(f)?"none":"block"},g=X()("blocks-storyline__wrapper",{"blocks-storyline__wrapper--small":v==="0","blocks-storyline__wrapper--medium":v==="1","blocks-storyline__wrapper--full":v==="2","blocks-storyline__wrapper--snapshot":h});return(0,s.jsx)(Ae,{className:"blocks-storyline",style:C,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:o,isLearner:a,children:(0,s.jsx)("div",{"aria-label":l,className:g,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return dZ(t)?this.renderProcessing():Ey(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const n=cZ(t),o=`${Ne("CDN_USER_CONTENT_URI")}/${n}`;return(0,s.jsx)("img",{alt:"Thumbnail",src:o})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:n}=this.state,{blockId:o,currentLocale:r,isLesson:a,previewType:i,settings:c}=this.props,{cornerRadius:l}=c,{src:d,meta:h,title:m}=t,{player:f}=h,v=vZ(d,a,i,r),C=bZ(v),b={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},x=X()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":n});return(0,s.jsx)("div",{className:"blocks-storyline__item",style:b,children:(0,s.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:x,loading:"lazy",name:o.toString(),ref:y=>{this.iframe=y},src:C,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const LZ=uN(at(SZ));var TZ=p(77533),op=p.n(TZ);const Py=":focus{outline: none}",kZ=":focus:not(:focus-visible){outline: none}",My="focus-ring-style",rp=()=>document.getElementById(My)||IZ(),IZ=()=>{const e=document.createElement("style");return e.id=My,document.head.appendChild(e),e},EZ=0,NZ=-1,jZ=e=>{const t=rp();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=Py},0),e?.(!1)}),window.addEventListener("keydown",n=>{wZ(n,e)})},wZ=(e,t)=>{const n=e.target,o=rp();(zl(e)||Mi(e)&&!n.classList.contains("ignore-prefers"))&&(o.innerHTML="",t?.(!0))},Oy=({focusVisible:e}={})=>rp().innerHTML=e?kZ:Py,AZ=e=>e?EZ:NZ,By=({list:e,index:t})=>{t>=0&&t<Hn()(e)&&e[t].focus()},RZ=({list:e,currentIndex:t})=>{const n=Sl()(t||0),o=n<Hn()(e)?n:0;return By({list:e,index:o}),o},PZ=({list:e,currentIndex:t})=>{const n=op()(t||Hn()(e));return By({list:e,index:n}),n};var Dy=p(49860);const mu=$("blocks-button"),Fy=jT,MZ=({description:e})=>(0,s.jsx)(we,{className:mu("description"),value:e}),OZ=({color:e,destination:t,editBlock:n,handleNavigate:o,isEditable:r,label:a,type:i})=>{const c=PC(),l=He()?.externalLinksDisabled,d=He()?.theme,h=Ii(),{mode:m}=(0,Re.g)(),f=nn(),v=It(),C=Me(t),g=(0,jr.htmlDecode)(En(Me(a))),b=i==="email",x=i==="exit-course",y=i==="lesson",L=i==="relative-url",S=mu("button"),T=!e||e===""||e===h,k=e??h,E={},I=MC(h),j=T&&d?.accentContrast===ke.AUTO?ke.AUTO:I,P=f?.buttonColorContrast??j,N=f?.buttonRadius??null,R=f?.buttonWidth??null,w=zt({backgroundColor:k,contrast:P});Object.assign(E,{...!T&&{"--color-button-bg":k},...!T&&{"--color-button-text":w},...!T&&{"--color-button-border":"transparent"},...N!=null&&{"--radius-button":`${Number(N)}px`},...R!=null&&{"--width-button":`${Number(R)}rem`}});const A=l&&Un(C),{handleMouseEnter:M,handleMouseLeave:O,handleFocus:B,handleBlur:D}=xd(),H=Dy.useId(),V=(0,u.useCallback)(()=>{if(r)n();else{if(A)return;if(x)return mg()}},[n,A,r,x]),G=(0,u.useCallback)(()=>{o(C)},[C,o]);if(r||A||x){const _=(0,s.jsx)("button",{"aria-describedby":A?ps(H):void 0,"aria-label":g,className:S,id:A?H:void 0,onBlur:A?()=>D(H):void 0,onClick:V,onFocus:A?()=>B(H):void 0,onKeyDown:j2(V),onMouseEnter:A?()=>M(H):void 0,onMouseLeave:A?()=>O(H):void 0,style:E,tabIndex:0,type:"button",children:g});return A?(0,s.jsxs)(s.Fragment,{children:[_,(0,s.jsx)(bd,{anchorId:H})]}):_}else if(y){const _=C?gn(C,m):"#";return(0,s.jsx)(sn,{"aria-label":g,className:S,onClick:G,style:E,to:_,children:g})}else{const _=L?C:Ln(C),Y=b?`mailto:${C}?subject=${c}`:_,se=Ys.isIphoneSafari?"_top":"_self",Z=b?se:"_blank",W=Z==="_blank",F=W?"noopener noreferrer nofollow":void 0,z=v?.a11yNoticeLinkNewTab||"(opens in a new tab)",Q=W?`${g} ${z}`:g;return(0,s.jsx)("a",{"aria-label":Q,className:S,href:Y,rel:F,style:E,tabIndex:0,target:Z,children:g})}},Hy=e=>{const{animateBlockEntrance:t,editable:n,editBlock:o=()=>{},handleNavigate:r,initiallyVisible:a,isLearner:i,items:c=[],renderDescription:l=MZ,settings:d}=e,{buttonAlignment:h="right",buttonColor:m,buttonShowDescription:f=!0,buttonStack:v,entranceAnimation:C}=d,g=mu(null,{"no-animation":!C,description:f==!0,center:h==="center",left:h==="left",right:h==="right",rounded:Fy==="rounded"}),b=c?.map(({id:x,description:y,...L})=>{const S=(0,s.jsx)(OZ,{...L,color:m,editBlock:o,handleNavigate:r,isEditable:n}),T=f&&l({id:x,description:y});return(0,s.jsx)("section",{className:mu("container"),children:h==="left"&&f?(0,s.jsxs)(s.Fragment,{children:[S,T]}):(0,s.jsxs)(s.Fragment,{children:[T,S]})},x)})??null;if(v){const{paddingBottom:x,paddingTop:y}=d,L={...y!=null&&{paddingTop:`${Number(y)}rem`},...x!=null&&{paddingBottom:`${Number(x)}rem`}};return(0,s.jsx)("div",{className:g.toString(),style:L,children:b})}return(0,s.jsx)(Ae,{className:g.toString(),children:(0,s.jsx)(Fe,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:a,isLearner:i,children:(0,s.jsx)("div",{className:"blocks-button",children:b})})})},BZ=Hy;class DZ extends Dy.Component{renderButtonDelegate;constructor(t){super(t),this.renderButtonDelegate=this.renderButton.bind(this)}static get defaultProps(){return{items:[],lessonId:"",blockId:"",editBlock:()=>{}}}renderButton(t,n){const{blockId:o,editable:r,editBlock:a,handleNavigate:i,isLearner:c,lessonId:l,initiallyVisible:d}=this.props;return(0,s.jsx)(Hy,{animateBlockEntrance:!1,blockId:o,editable:r,editBlock:a,handleNavigate:i,initiallyVisible:d,isLearner:c,items:[t],lessonId:l,settings:n,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,renderButton:i=this.renderButtonDelegate}=this.props,{entranceAnimation:c,buttonShowDescription:l=!0,buttonAlignment:d="right",buttonSpacing:h=3}=a,m=X()("blocks-buttonstack",{"blocks-buttonstack--no-animation":!c,"blocks-button--description":l==!0,"blocks-button--center":d==="center","blocks-button--left":d==="left","blocks-button--right":d==="right","blocks-button--rounded":Fy==="rounded"});return(0,s.jsx)(Ae,{className:m,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:r.map((f,v)=>{const C=v===0,g={buttonColor:a.buttonColor||this.props.color,buttonStyle:a.buttonStyle,buttonStack:!0,buttonShowDescription:l,buttonAlignment:d,...C?{}:{paddingTop:h}};return(0,s.jsx)(u.Fragment,{children:i(f,g)},f.id)})})})}}var FZ=p(73082),HZ=p.n(FZ);const fu=$("block-video");function $Z({item:e}){const t=ct(),{media:n}=e,o=t(n)??{},{customVideo:r={},tmp:a={},video:i={}}=o,c="poster"in i?i:{...i,...r},l=a.video&&"poster"in a.video?a.video:void 0,{poster:d}=ii()?c:l||c,h=d?gt(d):void 0;return(0,s.jsxs)("div",{className:fu("poster-container"),children:[(0,s.jsx)(Sn,{alt:"Video Poster",className:fu("poster"),src:h}),(0,s.jsx)("div",{className:fu("play-overlay"),children:(0,s.jsxs)("svg",{className:fu("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,s.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,s.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const $y=$("block-video");function VZ({mediaWidth:e}){const t=$y("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,s.jsx)("div",{className:t,children:(0,s.jsx)("div",{className:$y("placeholder")})})}const zZ=ts()("partner-content-block-card__"),Vy=e=>{const{backgroundColor:t,blockId:n,partnerContent:o}=e,r=He(),{id:a,tenantId:i}=r??{},{data:c,type:l}=o,{authors:d,bookImage:h,bookTitle:m,buyLink:f,internalId:v,nbicLink:C}=c,g={blockId:n,courseId:a,partnerContentId:v,tenantId:i,contentSubtype:l};return(0,s.jsxs)("section",{children:[(0,s.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,s.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(_x,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:g})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)("div",{className:zZ("divider")})}),(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(Ux,{backgroundColor:t,block:!0,link:C,trackingInfo:g})})]})]})};var ap=p(49860);const pu=$("block-video"),_Z={"--ov-width":"100%","--ov-max-height":"none"},UZ={"--ov-height":"100%","--ov-max-height":"none"};function GZ({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,cornerRadius:i,currentLocale:c,dataL10nId:l,enableVideoPlaybackSpeed:d,forwardSeekRestricted:h,id:m,isLoaded:f,item:v,lessonId:C,loadMedia:g,media:b,mediaWidth:x,onLoad:y,onProgressChanged:L,poster:S,recordMediaPlayheadPosition:T,renderCaption:k,renderPostVideoSlot:E,subtitle:I,type:j,videoKey:P,videoSrc:N}){const R=x==="2",[w,A]=ap.useState(null),M=pu("item",{small:x==="0",medium:x==="1",full:R}),O=ap.useCallback(({player:H})=>{const V=H.containerElement?.querySelector("video");if(V){const G=V.videoWidth/V.videoHeight>=1.7777777777777777;A(G?"landscape":"portrait")}y?.({player:H})},[y]),B=w==="landscape"?_Z:w==="portrait"?UZ:void 0,D=ap.useCallback(H=>{const V=pu("caption",{visible:f}).toString();return(0,s.jsx)(Ke,{className:V,value:H.caption})},[f]);return(0,s.jsxs)("div",{className:M,children:[(0,s.jsxs)("figure",{"data-l10n-id":l,children:[(0,s.jsx)("div",{className:pu("aspect-container"),"data-search-content-ignore":"",children:g&&(0,s.jsx)(Kf,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:d,canRestrictSeek:h,captions:a,cornerRadius:i,id:`${C}-${n}-${m}-${c}`,media:b,onLoad:O,poster:S,progressChanged:L,recordMediaPlayheadPosition:T,src:N,style:B,subtitle:I,type:P?"video":j},`${C}-${n}-${m}-${c}-${S||""}`)}),f&&(0,s.jsxs)(s.Fragment,{children:[E?.(),(0,s.jsx)("figcaption",{className:pu("wrapper"),children:(k??D)(v)})]})]}),r&&(0,s.jsx)(Vy,{backgroundColor:t,blockId:n,partnerContent:o})]})}const so=$("vt-chapter-strip");function WZ(e,t){for(let n=e.length-1;n>=0;n--)if(t>=e[n].time)return n;return-1}function KZ({chapters:e,currentTime:t,onSeek:n}){const o=It(),r=(0,u.useRef)(null),a=WZ(e,t);return(0,u.useEffect)(()=>{r.current?.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})},[a]),e.length===0?null:(0,s.jsxs)("div",{className:so(),children:[(0,s.jsx)("h2",{className:so("heading"),children:o?.videoChapters||"Chapters"}),(0,s.jsx)("ul",{className:so("list"),role:"list",children:e.map((i,c)=>{const l=c===a;return(0,s.jsx)("li",{className:so("item"),children:(0,s.jsxs)("button",{"aria-current":l?"true":void 0,className:so("button",{active:l}),onClick:()=>n?.(i.time),ref:l?r:void 0,type:"button",children:[(0,s.jsx)("span",{className:so("thumbwrap"),children:(i.thumbnailStatus==null||i.thumbnailStatus==="done")&&i.thumbnail&&(0,s.jsx)("img",{alt:"",className:so("thumb"),src:i.thumbnail})}),(0,s.jsx)("span",{className:so("time"),children:su(i.time)}),(0,s.jsx)("span",{className:so("title"),children:i.title})]})},`${i.time}-${c}`)})})]})}const QZ={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function YZ(e){return e.replace(/<c\.([^>]+)>/g,'<c class="$1">').replace(/<\/c\.[^>]*>/g,"</c>").replace(/<v\s+([^>]+)>/g,'<v title="$1">').replace(/<script[^>]*>(.*?)<\/script>/gi,"<!--SCRIPT_START-->$1<!--SCRIPT_END-->").replace(/<iframe[^>]*>(.*?)<\/iframe>/gi,"<!--IFRAME_START-->$1<!--IFRAME_END-->")}function ZZ(e){return e.replace(/<!--SCRIPT_START-->(.*?)<!--SCRIPT_END-->/g,"$1").replace(/<!--IFRAME_START-->(.*?)<!--IFRAME_END-->/g,"$1").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&amp;/g,"&")}function kn(e,t={}){if(!e)return"";let n;if(t.allowVTTTags!==!1){const o=YZ(e),r=d0()(o,QZ);n=ZZ(r)}else n=d0()(e,{allowedTags:[],allowedAttributes:{}});return t.preserveWhitespace||(n=n.replace(/\s+/g," ").trim()),n}function Lc(){return typeof window<"u"?window.crypto.randomUUID():`cue_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function XZ(e){return e.map(t=>({...t,stableId:t.stableId||Lc()}))}function zo(e){return e?/^(\d{2}:)?\d{2}:\d{2}\.\d{3}\s*-->\s*(\d{2}:)?\d{2}:\d{2}\.\d{3}/.test(e):!1}function zy(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,n,o,r,a]=t;return parseInt(n)*36e5+parseInt(o)*6e4+parseInt(r)*1e3+parseInt(a)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,n,o,r]=t;return parseInt(n)*6e4+parseInt(o)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function qZ(e,t=!1){const n=Math.round(e),o=Math.floor(n/36e5),r=Math.floor(n%36e5/6e4),a=Math.floor(n%6e4/1e3),i=n%1e3;if(t){const c=a.toString().padStart(2,"0");if(o>0){const l=r.toString().padStart(2,"0");return`${o}:${l}:${c}`}else return`${r}:${c}`}return`${o.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${a.toString().padStart(2,"0")}.${i.toString().padStart(3,"0")}`}function _y(e){const t={};if(!e)return t;const n=e.match(/\S+/g)||[];for(const o of n){const r=o.indexOf(":");if(r>0){const a=kn(o.substring(0,r),{allowVTTTags:!1}),i=kn(o.substring(r+1),{allowVTTTags:!1});t[a]=i}}return t}function JZ(e){const t=e.match(/^<v\s+/);if(t){let a=0,i=-1;for(let c=t[0].length;c<e.length;c++)if(e[c]==="<")a++;else if(e[c]===">")if(a===0){i=c;break}else a--;if(i!==-1){const c=e.substring(t[0].length,i).trim(),l=e.substring(i+1).trim();return{speaker:kn(c,{allowVTTTags:!1}),text:l}}}const n=e.match(/^<v>\s*(.*)$/s);if(n)return{text:n[1]};const o=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(o)return{speaker:kn(o[1].trim(),{allowVTTTags:!1}),text:o[2]};const r=e.match(/^([^:\n]+):\s*(.*)$/s);if(r&&r[1].length<50){const a=r[1].trim();if(!(/^\d+(\s+\w+)*\s+at\s+\d+$/.test(a)||/^\d{1,2}$/.test(a)||/\d+:\d+/.test(a)||/\bat\s+\d/.test(a)||/\bfrom\s+\d/.test(a)||/\bto\s+\d/.test(a)||/\d+\s*(AM|PM|am|pm)/.test(a)))return{speaker:kn(a,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function ip(e){return kn(e,{preserveWhitespace:!1,allowVTTTags:!0})}function eX(e){const t=kn(e.substring(6).trim(),{allowVTTTags:!1}),n=_y(t);return{id:n.id,width:n.width,lines:n.lines,regionanchor:n.regionanchor,viewportanchor:n.viewportanchor,scroll:n.scroll,...n}}function tX(e){const t=[...new Set(e.map(n=>n.speaker).filter(Boolean))];return{cueCount:e.length,speakerCount:t.length,speakers:t,lastModified:new Date}}function*nX(e){const t=e.cues,n=e.totalDuration;for(let o=0;o<t.length;o++){const r=t[o],a=o>0?t[o-1]:void 0,i=o<t.length-1?t[o+1]:void 0,c=a?Math.max(0,r.startTimeMs-a.endTimeMs):r.startTimeMs,l=i?Math.max(0,i.startTimeMs-r.endTimeMs):Math.max(0,n-r.endTimeMs),d=n>0?r.startTimeMs/n*100:0,h=n>0?r.endTimeMs/n*100:0,m=h-d;yield{cue:r,index:o,isFirst:o===0,isLast:o===t.length-1,previousCue:a,nextCue:i,gapBefore:c,gapAfter:l,relativeStartPercent:d,relativeEndPercent:h,relativeWidthPercent:m}}}function qpe(e){return Array.from(nX(e))}function sX(e,t,n,o,r,a,i,c){const l=[],d=/<v\s+([^>]+)>([^<]*)<\/v>/g;let h,m=0;for(;(h=d.exec(e))!==null;){const[g,b,x]=h,y={stableId:Lc(),startTime:t,endTime:n,startTimeMs:o,endTimeMs:r,duration:a,text:ip(x.trim()),settings:i,index:0,speaker:kn(b.trim(),{allowVTTTags:!1})};c&&(y.id=c),i.position&&(y.position=i.position),i.align&&(y.align=i.align),i.line&&(y.line=i.line),i.size&&(y.size=i.size),i.vertical&&(y.vertical=i.vertical),i.region&&(y.region=i.region),l.push(y),m=h.index+g.length}const f=/<v\s+([^>]+)>([^<]*)$/,C=e.substring(m).match(f);if(C){const[,g,b]=C,x={stableId:Lc(),startTime:t,endTime:n,startTimeMs:o,endTimeMs:r,duration:a,text:ip(b.trim()),settings:i,index:0,speaker:kn(g.trim(),{allowVTTTags:!1})};c&&(x.id=c),i.position&&(x.position=i.position),i.align&&(x.align=i.align),i.line&&(x.line=i.line),i.size&&(x.size=i.size),i.vertical&&(x.vertical=i.vertical),i.region&&(x.region=i.region),l.push(x)}return l}function oX(e,t){let n=t,o;!zo(e[n])&&zo(e[n+1])&&(o=kn(e[n],{allowVTTTags:!1}),n++);const r=e[n];if(!zo(r))return{cues:[],nextIndex:n+1};const a=r.match(/^((?:\d{2}:)?\d{2}:\d{2}\.\d{3})\s*-->\s*((?:\d{2}:)?\d{2}:\d{2}\.\d{3})(.*)$/);if(!a)return{cues:[],nextIndex:n+1};const[,i,c,l]=a,d=_y(l.trim());n++;const h=[];for(;n<e.length&&e[n]!==""&&!zo(e[n]);)h.push(e[n]),n++;const m=zy(i),f=zy(c),v=f-m,C=[];if(h.length===0){const g={stableId:Lc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:"",settings:d,index:0};o&&(g.id=o),d.position&&(g.position=d.position),d.align&&(g.align=d.align),d.line&&(g.line=d.line),d.size&&(g.size=d.size),d.vertical&&(g.vertical=d.vertical),d.region&&(g.region=d.region),C.push(g)}else for(const g of h)if(g.includes("<v ")&&(g.includes("</v>")||g.match(/<v\s+[^>]+>[^<]*$/))){const b=sX(g,i,c,m,f,v,d,o);C.push(...b)}else{const b=h.join(`
`),{text:x,speaker:y}=JZ(b),L={stableId:Lc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:ip(x),settings:d,index:0};o&&(L.id=o),y&&(L.speaker=y),d.position&&(L.position=d.position),d.align&&(L.align=d.align),d.line&&(L.line=d.line),d.size&&(L.size=d.size),d.vertical&&(L.vertical=d.vertical),d.region&&(L.region=d.region),C.push(L);break}return{cues:C,nextIndex:n}}function rX(e){const t=e.split(`
`).map(a=>a.trim()),n=t.find(a=>a.length>0);if(!n||!n.startsWith("WEBVTT"))throw new Error('Invalid WebVTT file: Must start with "WEBVTT"');const o={notes:[],styles:[],regions:[],cues:[],totalDuration:0,metadata:{cueCount:0,speakerCount:0,speakers:[],lastModified:new Date}};let r=0;for(;r<t.length&&t[r]==="";)r++;if(r<t.length&&t[r].startsWith("WEBVTT"))for(o.header=kn(t[r],{allowVTTTags:!1}),r++;r<t.length&&t[r]==="";)r++;else throw new Error("Invalid WebVTT file: Missing or malformed WEBVTT header");for(;r<t.length;){const a=t[r];if(a===""){r++;continue}if(a.startsWith("NOTE")){const i=[kn(a.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!zo(t[r]);)i.push(kn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.notes?.push(i.join(`
`));continue}if(a.startsWith("STYLE")){const i=[];for(r++;r<t.length&&t[r]!==""&&!zo(t[r]);)i.push(kn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.styles?.push(i.join(`
`));continue}if(a.startsWith("REGION")){const i=eX(a);o.regions?.push(i),r++;continue}if(zo(a)||zo(t[r+1])){const i=oX(t,r);i.cues&&i.cues.length>0&&o.cues.push(...i.cues),r=i.nextIndex;continue}r++}return o.cues=XZ(o.cues),o.cues.sort((a,i)=>a.startTimeMs-i.startTimeMs),o.cues.forEach((a,i)=>{a.index=i}),o.totalDuration=o.cues.length>0?Math.max(...o.cues.map(a=>a.endTimeMs)):0,o.metadata=tX(o.cues),o}function Jpe(e){let t="";if(e.header?t+=e.header.trim()+`
`:t+=`WEBVTT
`,t+=`
`,e.notes&&e.notes.length>0)for(const n of e.notes)t+="NOTE",n&&n.length>0&&(t+=" "+n),t+=`

`;if(e.styles&&e.styles.length>0)for(const n of e.styles)t+=`STYLE
`,t+=n.trim()+`

`;if(e.regions&&e.regions.length>0)for(const n of e.regions){t+="REGION";const o=[];for(const r in n)n[r]!==void 0&&n[r]!==null&&r!=="settings"&&o.push(`${r}:${n[r]}`);o.length>0&&(t+=" "+o.join(" ")),t+=`

`}for(const n of e.cues){n.id&&(t+=n.id+`
`),t+=`${n.startTime} --> ${n.endTime}`;const o=[];if(n.position&&o.push(`position:${n.position}`),n.align&&o.push(`align:${n.align}`),n.line&&o.push(`line:${n.line}`),n.size&&o.push(`size:${n.size}`),n.vertical&&o.push(`vertical:${n.vertical}`),n.region&&o.push(`region:${n.region}`),n.settings)for(const a in n.settings)n.settings[a]!==void 0&&n.settings[a]!==null&&!o.some(i=>i.startsWith(a+":"))&&o.push(`${a}:${n.settings[a]}`);o.length>0&&(t+=" "+o.join(" ")),t+=`
`;let r=n.text||"";n.speaker&&(r=`[${n.speaker}]: ${r}`),t+=r+`

`}return t.replace(/\s+$/,"")+`
`}const Tc=$("video-transcript-panel"),aX=({cue:e,isCurrent:t,onSeek:n,forwardSeekRestricted:o,maxTimeReached:r})=>{const a=(0,u.useCallback)(()=>{const c=e.startTimeMs/1e3;o&&c>r||n?.(c)},[e,n,o,r]),i=(0,u.useMemo)(()=>o&&e.startTimeMs/1e3>r,[o,e.startTimeMs,r]);return(0,s.jsxs)("button",{"aria-current":t?"true":void 0,"aria-disabled":i,className:Tc("line",{current:t,disabled:i}),onClick:i?void 0:a,tabIndex:i?-1:0,type:"button",children:[(0,s.jsx)("span",{className:Tc("timestamp"),children:qZ(e.startTimeMs,!0)}),(0,s.jsx)("span",{className:Tc("text"),children:e.text})]})},iX=({captions:e,currentTime:t=0,forwardSeekRestricted:n=!1,maxTimeReached:o=0,onSeek:r})=>{const[a,i]=(0,u.useState)([]);(0,u.useEffect)(()=>{if(!e||e.length===0)return;const l=new AbortController;return(async()=>{try{const h=e[0];if(!h)return;const m=h.url||(h.key?gt(h.key):null);if(!m)return;const f=await fetch(m,{signal:l.signal});if(!f.ok)return;const v=await f.text(),g=rX(v).cues.reduce((b,x)=>{const y=b[b.length-1];return y!=null&&Math.floor(y.startTimeMs/1e3)===Math.floor(x.startTimeMs/1e3)?(b[b.length-1]={...y,text:`${y.text} ${x.text}`,endTime:x.endTime,endTimeMs:x.endTimeMs,duration:x.endTimeMs-y.startTimeMs},b):(b.push(x),b)},[]);i(g)}catch(h){console.error("Error loading transcript:",h)}})(),()=>{l.abort()}},[e]);const c=(0,u.useMemo)(()=>{const l=t*1e3;return a.findIndex(d=>l>=d.startTimeMs&&l<d.endTimeMs)},[a,t]);return a.length===0?null:(0,s.jsx)("div",{className:Tc(),children:(0,s.jsx)("div",{className:Tc("lines"),children:a.map((l,d)=>(0,s.jsx)(aX,{cue:l,forwardSeekRestricted:n,isCurrent:d===c,maxTimeReached:o,onSeek:r},l.stableId))})})},cX=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",cp=1e3,lX=3,dX=/^\d+(?:\.\d+)?$/,Uy=/^\d+$/,uX=/^\d{2}(?:\.\d{1,3})?$/,gu=e=>{if(!Number.isFinite(e))return 0;const t=10**lX;return Math.max(0,Math.round(e*t)/t)},lp=e=>e.toString().padStart(2,"0"),hX=e=>e!=null&&typeof e=="object"?e.time:void 0,ege=e=>{const t=Math.round(gu(e)*cp),n=Math.floor(t/36e5),o=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),a=t%cp,i=a===0?"":`.${a.toString().padStart(3,"0")}`;return n>0?`${n}:${lp(o)}:${lp(r)}${i}`:`${Math.floor(t/6e4)}:${lp(r)}${i}`},mX=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[n,o,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(n!=null&&!Uy.test(n)||!Uy.test(o)||!uX.test(r))return null;const a=n==null?0:Number.parseInt(n,10),i=Number.parseInt(o,10),[c,l=""]=r.split("."),d=Number.parseInt(c,10);if(t.length===3&&i>=60||d>=60)return null;const h=l.length===0?0:Number.parseInt(l.padEnd(3,"0"),10)/cp;return gu(a*3600+i*60+d+h)},tge=e=>{const t=e.trim();return t.length===0?null:dX.test(t)?gu(Number.parseFloat(t)):mX(t)},oo=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return"timestamp";const n=Reflect.get(t,"settings");if(n==null||typeof n!="object")return"timestamp";const o=Reflect.get(n,"placement");return o==="start"||o==="end"?o:"timestamp"},nge=e=>oo(e)!=="timestamp",sge=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return!1;const n=Reflect.get(t,"settings");return n==null||typeof n!="object"?!1:Reflect.get(n,"required")===!0},oge=e=>e==="timestamp"?{}:{placement:e},ro=e=>{let t;e!=null&&"checkpoint"in e?t=hX(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const n=typeof t=="number"?t:Number.parseFloat(String(t));return gu(n)},fX=null,rge=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&fX.has(e.variant)),kc=(e,t,n)=>{if(e==null||typeof e!="object")return n;const o=Reflect.get(e,t);return typeof o=="string"&&o.trim().length>0?o:n},pX=(e,t)=>{if(typeof e=="string"){const n=e.trim();if(n.length>0)return n}return t},gX=e=>{const t=e.filter(o=>oo(o)==="timestamp").map((o,r)=>({id:o.checkpoint.id,time:ro(o),documentIndex:r})).sort((o,r)=>o.time-r.time||o.documentIndex-r.documentIndex),n=new Map;return t.forEach((o,r)=>{n.set(o.id,r+1)}),n},vX=e=>[...new Set(e.filter(t=>oo(t)==="timestamp").map(t=>ro(t)))].sort((t,n)=>t-n),age=(e,t)=>{const n=[...e].sort((o,r)=>ro(o)-ro(r)).find(o=>ro(o)>t);return{insertBeforeItemId:n?.checkpoint.id??null,insertAtEnd:n==null}},CX=e=>{const t=e[0]??null,n=t==null?e:e.slice(1),o=[],r=[];let a=null;n.forEach(c=>{if(cX(c)){a!=null&&r.push(a),a={checkpoint:c,blocks:[]};return}if(a!=null){a.blocks.push(c);return}o.push(c)}),a!=null&&r.push(a);const i=r.length===0?e:[...t==null?[]:[t],...o];return{videoBlock:t,leadingBlocks:o,checkpointGroups:r,inlineBlocks:i}},Ic=$("vt-learner-transcript");function xX({captions:e,currentTime:t,forwardSeekRestricted:n,maxTimeReached:o,onClose:r,onSeek:a}){const i=It(),c=(0,u.useRef)(null),l=(0,u.useRef)(null);return(0,u.useEffect)(()=>{const d=c.current?.querySelector('[aria-current="true"]');d!=null&&d!==l.current&&(l.current=d,d.scrollIntoView({behavior:"smooth",block:"center"}))},[t]),(0,s.jsxs)("aside",{className:Ic(),children:[(0,s.jsxs)("div",{className:Ic("head"),children:[(0,s.jsx)("h3",{className:Ic("title"),children:i?.videoTranscript||"Transcript"}),(0,s.jsx)("button",{"aria-label":kc(i,"videoHideTranscript","Hide transcript"),className:Ic("close"),onClick:r,type:"button",children:(0,s.jsx)(ue,{name:"xmark"})})]}),(0,s.jsx)("div",{className:Ic("scroll"),ref:c,children:(0,s.jsx)(iX,{captions:e,currentTime:t,forwardSeekRestricted:n,maxTimeReached:o,onSeek:a})})]})}const Gy=(0,u.createContext)(null),bX=Gy.Provider;function yX(){return(0,u.useContext)(Gy)}var SX,Wy,Ky,LX;function ige(){let e=null;const t=new Set;return{registerPlayer(n){e=n},onTimeUpdate(){t.forEach(n=>{n()})},getPosition(){return e?.getProgress().currentTime??0},getDuration(){return e?.getProgress().duration??0},subscribe(n){return t.add(n),()=>{t.delete(n)}},seekToTime(n){e?.seekToTime(n)}}}const TX=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,getDuration:()=>0,subscribe:()=>()=>{},seekToTime(){}}),Qy=(0,u.createContext)(TX),kX=Qy.Provider;function vu(){return(0,u.useContext)(Qy)}function cge(){const e=vu(),t=Wy(e);return t.current=e,Ky(()=>()=>t.current.getPosition(),[])}function lge(e){const t=vu();return LX(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function dge(){const e=vu(),t=Wy(e);return t.current=e,Ky(()=>n=>t.current.seekToTime(n),[])}function uge({store:e,children:t}){return SX(kX,{value:e,children:t})}var IX,EX;const Cu=[];function hge(){let e=Cu;const t=new Set;return{setChapters(n){n!==e&&(e=n,t.forEach(o=>{o()}))},getChapters(){return e},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}const NX=Object.freeze({setChapters(){},getChapters:()=>Cu,subscribe:()=>()=>{}}),Yy=(0,u.createContext)(NX),jX=Yy.Provider;function Zy(){return(0,u.useContext)(Yy)}function mge(){const e=Zy();return EX(e.subscribe,e.getChapters,()=>Cu)}function fge({store:e,children:t}){return IX(jX,{value:e,children:t})}const ao=$("block-video"),wX={"--ov-width":"100%","--ov-max-height":"none"},AX={"--ov-height":"100%","--ov-max-height":"none"};function RX({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,chapters:i,cornerRadius:c,currentLocale:l,dataL10nId:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,id:f,isLearner:v,isLoaded:C,item:g,lessonId:b,loadMedia:x,media:y,mediaWidth:L,onLoad:S,onProgressChanged:T,poster:k,recordMediaPlayheadPosition:E,renderCaption:I,renderPostVideoSlot:j,showChapters:P,subtitle:N,transcriptEnabled:R,type:w,videoKey:A,videoSrc:M,shouldPause:O}){const B=yX(),D=vu(),H=Zy(),[V,G]=(0,u.useState)(0),[_,Y]=(0,u.useState)(0),[se,Z]=(0,u.useState)(!1),[W,F]=(0,u.useState)(null),z=(0,u.useRef)(null),Q=It(),K=(0,u.useCallback)(le=>{G(le.currentTime),Y(je=>Math.max(je,le.currentTime)),D.onTimeUpdate(le.currentTime),T?.(le)},[T,D]),q=(0,u.useCallback)(le=>{const je=ao("caption",{visible:C});return(0,s.jsx)(Ke,{className:je,value:le.caption})},[C]),ee=(0,u.useCallback)(({player:le})=>{const je=le.containerElement?.querySelector("video");if(je){const Wt=je.videoWidth/je.videoHeight>=1.7777777777777777;F(Wt?"landscape":"portrait")}S?.({player:le})},[S]),J=W==="landscape"?wX:W==="portrait"?AX:void 0,ne=(0,u.useCallback)(le=>{z.current?.seekToTime(le)},[z]),oe=B?.setVideoPlayerRef,xe=(0,u.useCallback)(le=>{z.current=le,oe?.(le),D.registerPlayer(le)},[oe,D]),U=v&&P&&i!=null&&i.length>0,ie=v&&R&&a!=null&&a.length>0;(0,u.useEffect)(()=>{H.setChapters(i??Cu)},[H,i]);const ge=ao("item",{small:L==="0",medium:L==="1",full:L==="2","video-training":!0,"no-side-panel":!0}),he=B?.wrapVideo,ve=x?(0,s.jsx)(Kf,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:a,chapters:i,checkpointTimesSeconds:B?.checkpointMarkerTimes,cornerRadius:c,id:`${b}-${n}-${f}-${l}`,media:y,onCheckpointReached:B?.onCheckpointReached,onLoad:ee,poster:k,progressChanged:K,recordMediaPlayheadPosition:E,ref:xe,shouldPause:O,src:M,style:J,subtitle:N,type:A?"video":w},`${b}-${n}-${f}-${l}-${k||""}`):null;return(0,s.jsxs)("div",{className:ge,children:[(0,s.jsxs)("div",{className:ao("vt-layout",{"transcript-open":ie&&se}),children:[(0,s.jsxs)("div",{className:ao("vt-main"),children:[(0,s.jsxs)("figure",{"data-l10n-id":d,children:[(0,s.jsx)("div",{className:ao("figure-container"),children:he?he(ve):ve}),C&&(0,s.jsxs)(s.Fragment,{children:[j?.(),(0,s.jsx)("figcaption",{className:ao("wrapper"),children:(I??q)(g)})]})]}),ie&&!se&&(0,s.jsx)("div",{className:ao("vt-transcript-bar"),children:(0,s.jsxs)("button",{className:ao("vt-show-transcript"),onClick:()=>Z(!0),type:"button",children:[(0,s.jsx)(ue,{name:"closed-captioning"}),Q?.videoViewTranscript||"Show transcript"]})}),U&&(0,s.jsx)(KZ,{chapters:i??[],currentTime:V,onSeek:ne})]}),ie&&se&&(0,s.jsx)("div",{"aria-hidden":!0,className:ao("vt-transcript-spacer")})]}),ie&&se&&(0,s.jsx)(xX,{captions:a,currentTime:V,forwardSeekRestricted:m||!1,maxTimeReached:_,onClose:()=>Z(!1),onSeek:ne}),r&&(0,s.jsx)(Vy,{backgroundColor:t,blockId:n,partnerContent:o})]})}var dp=p(49860);function PX({backgroundColor:e,blockId:t,cornerRadius:n,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,headingLevel:a,isGeneratingChapters:i,isLearner:c,item:l,lessonId:d,loadMedia:h,mediaWidth:m,onStep:f,partnerContent:v,audioVideoPlayhead:C,recordMediaPlayheadPosition:g,renderCaption:b,renderPostVideoSlot:x,showChapters:y,transcriptEnabled:L,type:S,isVideoTraining:T,shouldPause:k}){const[E,I]=dp.useState(!1),{currentLocale:j}=tt(),P=ct(),{id:N,media:R,partnerContentId:w}=l,A=P(R)??{},{customVideo:M={},tmp:O={},video:B={}}=A,D="poster"in B?B:{...B,...M},H=O.video&&"poster"in O.video?O.video:void 0,{captions:V,chapters:G,key:_,poster:Y,src:se,subtitle:Z}=ii()?D:H||D,W=y?G??[]:[],F=_||se,Q=(Array.isArray(v)?v:v?.content)?.find(oe=>w!=null&&Vt(oe)&&"id"in oe&&oe.id===w),K=Q!=null&&Vt(Q),q=Vt(R)&&"l10nId"in R?R.l10nId:void 0,ee=dp.useCallback(()=>{I(!0)},[]),J=dp.useCallback(({percentComplete:oe})=>{oe>=100&&f?.({id:N})},[N,f]);if(!F)return(0,s.jsx)(VZ,{mediaWidth:m});const ne={audioVideoPlayhead:C,backgroundColor:e,blockId:t,blockPartnerContent:Q,blockPartnerContentExists:K,captions:V,chapters:W,cornerRadius:n,currentLocale:j,dataL10nId:q,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,id:N,isLoaded:E,item:l,lessonId:d,loadMedia:h,media:R,mediaWidth:m,onLoad:ee,onProgressChanged:J,poster:Y,recordMediaPlayheadPosition:g,renderCaption:b,renderPostVideoSlot:x,subtitle:Z,type:S,videoKey:_,videoSrc:F,shouldPause:k};return T?(0,s.jsx)(RX,{...ne,chapters:W,headingLevel:a,isGeneratingChapters:i,isLearner:c,showChapters:y,transcriptEnabled:L},_):(0,s.jsx)(GZ,{...ne},_)}const MX=$("block-video");function up({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:o,isDragPreview:r,isLearner:a,isSidebarPreview:i,items:c,lessonId:l,loadMedia:d,onStep:h,partnerContent:m,progress:f,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,settings:b,takingSnapshot:x,type:y,isGeneratingChapters:L,isVideoTraining:S,shouldPause:T}){const k=ks(),E=c?.[0];if(E==null)return null;const I=MX({"no-animation":!b?.entranceAnimation,presentation:k}).toString(),j=S?"2":"1",P=x||r||i;return(0,s.jsx)(Ae,{className:I,children:(0,s.jsx)(Fe,{animateBlockEntrance:e,initiallyVisible:o,isLearner:a,children:P?(0,s.jsx)($Z,{item:E}):(0,s.jsx)(eQ,{children:(0,s.jsx)(PX,{audioVideoPlayhead:f?.items?.[t]?.items?.[E.id]?.audioVideoPlayhead??0,backgroundColor:b?.backgroundColor,blockId:t,cornerRadius:b?.cornerRadius,enableVideoPlaybackSpeed:n,forwardSeekRestricted:b?.forwardSeekRestricted&&!f?.isComplete,headingLevel:b?.headingLevel,isGeneratingChapters:L,isLearner:a,isVideoTraining:S,item:E,lessonId:l,loadMedia:d,mediaWidth:b?.mediaWidth??j,onStep:h,partnerContent:m,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,shouldPause:T,showChapters:!!b?.showChapters,transcriptEnabled:!!b?.showTranscript,type:y})})})})}var hp=p(49860);const xu=$("block-audio"),mp=$("block-embed"),Rn=$("block-attachment");class OX extends hp.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.onLoad=this.onLoad.bind(this),this.state={loaded:!1}}static get defaultProps(){return{audioVideoPlayhead:0,blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",onStep:()=>{},recordMediaPlayheadPosition:()=>{}}}renderCaption({caption:t}){const{loaded:n}=this.state,o=xu("caption",{hidden:!n}).toString();return(0,s.jsx)(Ke,{className:o,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:n,getL10nValue:o,labels:r,lessonId:a,loadMedia:i,progress:c,recordMediaPlayheadPosition:l,renderCaption:d=this.renderCaptionDelegate,settings:h}=this.props,m="forwardSeekRestricted"in h?h.forwardSeekRestricted:!1,f=t.media,v=o(f)??{},{id:C}=t,g=v?.tmp?.audio?.key||v?.audio?.key,b=`${a}-${n}-${C}`,x=Lt()(0,["items",n,"items",C,"audioVideoPlayhead"],c),y=Qf({lessonId:a,refs:`items:${n}/items:${C}`});return(0,s.jsxs)("div",{className:xu("item"),children:[i&&(0,s.jsx)(J3,{audioVideoPlayhead:x,canRestrictSeek:!!m&&!c?.isComplete,id:b,item:t,labels:r,mediaSrc:g,onAIUploadFinish:this.props.onAIUploadFinish,onEnd:this.handleOnEnd.bind(this,C),onLoad:this.onLoad,onTranscriptClick:this.onTranscriptClick.bind(this,t),onTranscriptClose:this.props.closeTranscript,onTranscriptUpdate:this.props.onTranscriptUpdate??void 0,recordMediaPlayheadPosition:l,refs:`items:${n}/items:${C}`,transcriptMedia:f,uploadId:y},b),d(t)]},C)}handleOnEnd(t){this.props.onStep({id:t})}onTranscriptClick(t){const{blockId:n}=this.props;return this.props.openTranscript?.({blockId:n,item:t,refs:`items:${n}/items:${t.id}`})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a}=this.props,{entranceAnimation:i}=a,c=xu({"no-animation":!i,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,s.jsx)(Ae,{className:c,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:xu("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const BX=Bb(at(OX));function DX(e){const t=ks();return(0,s.jsx)(BX,{...e,isPresentation:t})}class FX extends hp.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,n){const{id:o,settings:r={}}=t,a=this.props.getL10nValue(t.media)??{},i="embed"in a?a.embed:void 0,{loadMedia:c,labels:l,settings:d}=this.props,{showMetaData:h}=r,{cardMode:m,showBorder:f=!0}=d,v=mp("item",{border:f}).toString();return(0,s.jsx)(Gt,{className:v,disabled:!f&&m==$n.TRANSPARENT,tag:"section",children:c&&(0,s.jsx)(sy,{data:i,id:`${n}-${o}`,isLesson:!0,labels:l,showMetaData:h})},o)}render(){const{animateBlockEntrance:t,blockId:n,getL10nValue:o,initiallyVisible:r,isLearner:a,items:i,settings:c}=this.props,{entranceAnimation:l,mediaWidth:d="0"}=c,h=o(i?.[0]?.media);if(!h)return null;const m=zK(h)!=="link",f=mp({"no-animation":!l,presentation:this.props.isPresentation}).toString(),v=mp("wrapper",{medium:m&&d==="1",full:m&&d==="2"}),C=i.length>0?i.slice(0,1):[];return(0,s.jsx)(Ae,{className:f,children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:v,children:C.map(g=>this.renderItem(g,n))})})})}}const HX=at(Zh()(FX));function $X(e){const t=ks();return(0,s.jsx)(HX,{...e,isPresentation:t})}class VX extends hp.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o}=this.props;return(0,s.jsx)(Ae,{children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:"block-text--onecol",children:(0,s.jsx)("div",{className:"block-text__container",children:(0,s.jsx)("div",{className:"block-text__row",children:(0,s.jsx)("div",{className:"block-text__col",children:this.renderAttachment(this.attachment)})})})})})})}renderAttachment(t){return t.key?this.renderDownload(t):this.renderNoFile()}renderDownload({key:t,mimeType:n,originalUrl:o,size:r}){const{ariaDescribedBy:a,attachmentId:i,blockId:c,externalLinksDisabled:l,onLinkBlur:d,onLinkFocus:h,onLinkMouseEnter:m,onLinkMouseLeave:f}=this.props,v=gt(t),C=l?"":void 0,g=l?void 0:v,b=l?void 0:"noopener noreferrer nofollow",x=l?"button":void 0,y=l?0:void 0,L=l?void 0:"_blank",S=Rn({}).mix("brandHover").toString(),T=Rn("info");return(0,s.jsxs)(Gt,{"aria-describedby":a,"aria-labelledby":`attachment-name-${c} attachment-icon-${c}`,className:S,"data-external":C,download:o,href:g,id:l?i:void 0,onBlur:l?()=>d?.(i):void 0,onFocus:l?()=>h?.(i):void 0,onMouseEnter:l?()=>m?.(i):void 0,onMouseLeave:l?()=>f?.(i):void 0,rel:b,role:x,tabIndex:y,tag:"a",target:L,children:[(0,s.jsxs)("div",{className:Rn("main"),children:[(0,s.jsx)("div",{className:Rn("icon"),id:`attachment-icon-${c}`,children:this.fileIcon(n)}),(0,s.jsxs)("div",{className:T,children:[(0,s.jsx)(we,{className:Rn("title").toString(),id:`attachment-name-${c}`,value:o}),(0,s.jsx)("div",{className:Rn("size").toString(),children:HZ()(r,{round:1})})]})]}),(0,s.jsx)("div",{className:Rn("rest"),children:(0,s.jsx)(VF,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=Rn({none:!0}).toString(),n=Rn("info");return(0,s.jsx)(Gt,{className:t,children:(0,s.jsxs)("div",{className:Rn("main"),children:[(0,s.jsx)("div",{className:Rn("icon"),children:(0,s.jsx)(Ox,{"aria-label":"File"})}),(0,s.jsxs)("div",{className:n,children:[(0,s.jsx)("div",{className:Rn("title").toString(),children:"File Attachment Block"}),(0,s.jsx)("div",{className:Rn("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:n}=this.props,o=/excel|spreadsheet/,r=/pdf/,a=/word/,i=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return o.test(t)?(0,s.jsx)(lH,{"aria-label":n?.a11yExcelIcon}):r.test(t)?(0,s.jsx)(aH,{"aria-label":n?.a11yPDFIcon}):a.test(t)?(0,s.jsx)(rH,{"aria-label":n?.a11yWordIcon}):i.test(t)?(0,s.jsx)(iH,{"aria-label":n?.a11yPPTIcon}):c.test(t)?(0,s.jsx)(cH,{"aria-label":n?.a11yRTFIcon}):l.test(t)?(0,s.jsx)(dH,{"aria-label":n?.a11yZipIcon}):(0,s.jsx)(Ox,{"aria-label":n?.a11yFileIcon})}}function zX(e){const t=Zh()(e),n=at(t),o=G$(n);function r(a){const i=He(),c=a.externalLinksDisabled??(i&&"externalLinksDisabled"in i?i.externalLinksDisabled:!1);return(0,s.jsx)(o,{...a,externalLinksDisabled:c})}return r}const _X=zX(VX),xs=$("block-step"),UX=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Me(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,b=d==="video"&&f.video;if(!v&&!C&&!g&&!b&&!(d==="image-with-audio"&&r))return;const y=f.embed?Mr(f.embed):void 0,L=!!f.image,S=!!f.audio,T=L?f.image.align:"center",k=xs("media",{audio:S&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":S&&!r&&h==="bottom",linkEmbed:y==="link",videoEmbed:y==="video",visual:!r&&L||!yt()(f.video)}),E=m||{};return(0,s.jsx)("div",{className:k,children:(0,s.jsx)(Xt,{blockId:t,enableVideoPlaybackSpeed:o,index:`${a.id}`,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...E},shouldPause:!0})})},GX=e=>{const{headingLevel:t,innerRef:n,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=o,f=xs({active:r}),v=!!o.step,C=!!o.title,g=t||2,b=`h${g}`,x=`h${g+1}`,y=Me(o.media),L=Cs(y,i,!0,"timeline"),S=Me(o.description),T=(0,u.useMemo)(()=>!!Object.keys(y??{}).length||!!_m(S).value?.length,[y,S]),k=()=>{const E={audio:{item:{...o,media:L.audioOnlyMedia||y},mediaType:"audio"},image:{item:{...o,media:L.imageOnlyMedia||y},mediaType:"image"},video:{item:{...o,media:L.videoOnlyMedia||y},mediaType:"video"},embed:{item:{...o,media:L.embedOnlyMedia||y},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,s.jsx)(s.Fragment,{children:L.renderOrder.map((I,j)=>{if(I==="text")return d?(0,s.jsx)("div",{className:xs("description"),children:d(o)},`text-${j}`):(0,s.jsx)(we,{className:xs("description"),value:o.description},`text-${j}`);if(!y||!a)return null;const P=E[I];return P?(0,u.createElement)(UX,{...e,...P,key:`${I}-${j}`}):null})})};return(0,s.jsx)(Ae,{children:(0,s.jsx)("div",{className:f,"data-id":m,ref:n,style:h,children:(0,s.jsx)(Gt,{className:xs("body"),onFocus:c,children:(0,s.jsxs)("div",{className:xs("main-wrap"),children:[(0,s.jsxs)("div",{className:xs("heading",{solo:!T}),children:[v&&(0,s.jsx)("div",{className:xs("step"),children:(0,s.jsx)(b,{children:(0,s.jsx)(Cn,{value:o.step})})}),(C||l)&&(0,s.jsx)("div",{className:xs("title"),children:l?l(o):(0,s.jsx)(x,{children:(0,s.jsx)(we,{value:o.title})})})]}),(0,s.jsx)("div",{className:xs("main"),children:k()})]})})})})},WX=e=>{const{id:t,settings:n,items:o,onEnter:r,enableVideoPlaybackSpeed:a,initiallyVisible:i,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=o[0],v=n.audioPosition,C=!(n.zoomOnClick??!0),g=n.headingLevel,b=(0,u.useCallback)((y,L)=>{r?.({id:t,payload:{activeIndex:y,itemId:L}})},[t,r]),x=(0,s.jsx)(GX,{audioPosition:v,blockId:t,disableZoom:C,enableVideoPlaybackSpeed:a,headingLevel:g,isActive:!0,item:f,labels:l,lessonId:d,lessonNumber:t,loadMedia:!0,onFocus:b,renderDescription:m,renderTitle:h,style:{"--block-step-padding-top":"1rem","--block-step-padding-bottom":"1rem","--block-step-corner-radius":n.cornerRadius!=null?`${n.cornerRadius}px`:"max(8px, 0.5em)"}});return c?(0,s.jsx)(Fe,{animateBlockEntrance:!0,className:xs("animate").toString(),initiallyVisible:i,isLearner:!0,children:x}):x},Xy=$("continue-btn"),bu=({children:e,className:t,href:n,onClick:o,text:r,testId:a="continue-btn"})=>{const i=t?`${Xy()} ${t}`:Xy();return n?(0,s.jsx)(sn,{className:i,"data-continue-btn":"","data-testid":a,onClick:o,to:n,children:e??(0,s.jsx)(Cn,{value:r})}):(0,s.jsx)("button",{className:i,"data-continue-btn":"","data-testid":a,onClick:o,type:"button",children:e??(0,s.jsx)(we,{value:r})})},qy=({bgType:e,text:t,iconType:n="locked"})=>{const o=X()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,s.jsxs)("div",{className:o,"data-continue-btn":"",children:[n==="locked"&&(0,s.jsx)(ue,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,s.jsx)("div",{className:"continue-hint__content",children:(0,s.jsx)(Cn,{value:t})})]})},fp=$("block-text");function KX({blockId:e,animateBlockEntrance:t,canContinue:n=!1,isComplete:o,isLearner:r,isLastBlock:a=!1,isOnlyBlockInStep:i,items:c=[],labels:l,onStep:d=()=>{},skipContinue:h=!1,initiallyVisible:m}){const v=(0,u.useRef)(null),C=(0,De.A)(o),[g,b]=u.useState(!1),{announcePolite:x}=Ts(),[y,L]=u.useState(!1),S=nn(),T=He(),k=Ii(),E=MC(k),I=Ao(),j=c[0],{id:P}=j,N=j.title??I?.label??Qe.blockContinueLabel,R=j.type??I?.completionType??Qe.blockContinueCompletionType,w=j.completeHint??I?.completeHint??Qe.blockContinueCompleteHint,A=!R||(h?y:n||i&&o),M=h||!o||i,O=S?.continueColor||k,B=!O||O===k,D=B&&T?.theme?.accentContrast===ke.AUTO?ke.AUTO:E,H=S?.continueColorContrast??D,V=S?.continueRadius??null,G=S?.continueWidth??76,_=zt({backgroundColor:O,contrast:H}),Y={...!B&&{"--color-button-bg":O},...!B&&{"--color-button-text":_},...!B&&{"--color-button-border":"transparent"},...V!=null&&{"--radius-button":`${Number(V)}px`},...G!=null&&{maxWidth:`${Number(G)}rem`}},se=(0,u.useCallback)(()=>{d({id:P}),b(!0),a?setTimeout(()=>{const Z=document.querySelector("[data-lesson-id]"),W=document.querySelector("main"),F=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),z=Z?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let Q=null;F?Q=F:z&&z!==v.current?.parentElement?Q=z:Z?Q=Z:W&&(Q=W),Q&&(Q.setAttribute("tabindex","-1"),Q.focus({preventScroll:!0}))},200):setTimeout(()=>{const Z=v.current;Z&&Z.focus()},100)},[P,d,a]);return(0,u.useEffect)(()=>{!C&&o&&(a||setTimeout(()=>{x?.(l?.a11yStatusAdditionalContent)},300))},[x,o,l,C,a]),(0,u.useEffect)(()=>{const Z=W=>{const{path:F}=W.detail,{blockId:z,buttonId:Q}=xa(W.detail.path,["block","button"]);if(e==z&&Q===j.id){const K=F.at(-1);K==="title"?L(!0):K==="completeHint"&&L(!1)}};return window.addEventListener(We,Z),()=>{window.removeEventListener(We,Z)}},[e,j.id]),(0,s.jsxs)(s.Fragment,{children:[M&&(0,s.jsx)(Ae,{children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,s.jsx)("div",{className:fp("container"),children:(0,s.jsx)("div",{className:fp("row"),children:(0,s.jsxs)("div",{className:fp("continue"),style:Y,children:[A&&(0,s.jsx)(bu,{onClick:se,text:N}),!A&&(0,s.jsx)(qy,{text:w})]})})})})}),g&&(0,s.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:v,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}var QX=p(15384),yu=p.n(QX);const YX=$("flashcard"),ZX="block-search-current",XX="flashcard-side--front",Jy="flashcard-side--back",qX=60,JX=8;class eq extends u.PureComponent{static defaultProps={allowTabNavigation:!0,backType:"description",forceFlipped:!1,frontType:"description",getL10nValue:()=>{},onFlip:Function.prototype,onStep:Function.prototype,settingShowHint:!0};state={areSidesReady:!0,flipped:!1,hasFlippedOnce:!1,isMounted:!1,suppressFlipFocus:!1};cardRef=(0,u.createRef)();revealSettleTimer=void 0;render(){const{cardRef:t,handleFlip:n,handleSideReady:o,handleTouchEnd:r,props:{activeIndex:a,allowTabNavigation:i,backDescription:c,backMedia:l,backType:d,block:h,forceFlipped:m,frontDescription:f,frontMedia:v,frontType:C,id:g,index:b,isHidden:x,labels:y,lessonId:L,prefersKeyboardNavigation:S,settingShowHint:T,size:k,type:E,wrapElement:I,wrapRole:j},state:{areSidesReady:P,flipped:N,isMounted:R,suppressFlipFocus:w}}=this,A=m||N,M=YX({large:k==="large",small:k==="small",flipped:A,stack:E==="stack"});return(0,s.jsxs)(I,{"aria-hidden":!i,className:M,onClick:n,onTouchEnd:r,ref:t,role:j,children:[(0,s.jsx)(Gt,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:E,description:f,index:b,isActiveSide:!A,isAriaHidden:A&&R&&P,isFlipped:A,isHidden:x,itemId:g,labels:y,lessonId:L,media:v,onFlip:n,onReady:o,prefersKeyboardNavigation:S,settingShowHint:T,side:"front",size:k,suppressFlipFocus:w,tag:t6,type:C}),(0,s.jsx)(Gt,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:E,description:c,index:b,isActiveSide:A,isAriaHidden:!A&&R&&P,isFlipped:A,isHidden:x,itemId:g,labels:y,lessonId:L,media:l,onFlip:n,onReady:o,prefersKeyboardNavigation:S,settingShowHint:T,side:"back",size:k,suppressFlipFocus:w,tag:tq,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(We,this.handleNavEvent),window.addEventListener(Oo,this.handleRevealItem)}componentDidUpdate(t,n){const{props:{allowTabNavigation:o,id:r,onStep:a},state:{hasFlippedOnce:i}}=this;!n.hasFlippedOnce&&i&&a({id:r}),t.allowTabNavigation&&!o&&this.setState({flipped:!1})}componentWillUnmount(){this.clearRevealSettle(),window.removeEventListener(We,this.handleNavEvent),window.removeEventListener(Oo,this.handleRevealItem)}handleNavEvent=t=>{const{path:n}=t.detail,{cardId:o}=xa(n,["block","card"]);if(o===this.props.id){let r=!1;n.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!Gm(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleRevealItem=t=>{const{blockId:n,itemId:o}=t.detail;n!==this.props.blockId||!Qn(o,this.props.id)||(this.clearRevealSettle(),this.tryRevealFlip(0))};tryRevealFlip=t=>{const n=this.getActiveHighlightSide();if(n!=null){this.setState({areSidesReady:!0,flipped:n==="back",suppressFlipFocus:!0},()=>{this.setState({suppressFlipFocus:!1})});return}t>=JX||(this.revealSettleTimer=setTimeout(()=>{this.tryRevealFlip(t+1)},qX))};clearRevealSettle=()=>{clearTimeout(this.revealSettleTimer),this.revealSettleTimer=void 0};getActiveHighlightSide=()=>{const t=this.cardRef.current;if(t==null||typeof CSS>"u"||!("highlights"in CSS))return;const n=CSS.highlights.get(ZX);if(n!=null)for(const o of n){const{startContainer:r}=o,i=(r instanceof Element?r:r.parentElement)?.closest(`.${Jy}, .${XX}`);if(i!=null&&t.contains(i))return i.classList.contains(Jy)?"back":"front"}};handleFlip=t=>{const{block:n,index:o}=this.props,r=window.getSelection(),a=r.toString()&&this.cardRef.current?.contains(r.anchorNode);if(t.detail>1&&r.empty(),t&&t.target.closest("a")||a)return;const i=!this.state.flipped;this.setState({areSidesReady:!1,flipped:i,hasFlippedOnce:!0});const c=i?"back":"front",l=n?.items?.[o],d=l?.[c]?.media,h=`items:${n?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:vs({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,i)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const e6=Dl(at(eq)),Fa=$("flashcard-side"),Su=$("flashcard-side-flip");class Br extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:Br.descriptionActionTypes.INITIAL,isAtLongOverflowBottom:!1,isLong:!1,isLongOverflow:!1,isTooltipVisible:!1,scrollbarWidthOffset:void 0};id;constructor(t){super(t),this.handleMouseEnterAudio=this.handleMouseEnterAudio.bind(this),this.handleMouseLeaveAudio=this.handleMouseLeaveAudio.bind(this),this.id=(0,y0.uniqueId)("flashcard-side")}state=Br.initialState;longBottomObserver=void 0;readyTimeout=void 0;refDescription=(0,u.createRef)();refDescriptionBottom=(0,u.createRef)();refSide=(0,u.createRef)();refBtnTimeoutMouseLeave=(0,u.createRef)();checkDescriptionSizeDebounced;handleMouseEnterAudio=()=>{const{itemId:t,index:n,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${n}-${r}-flip-btn`);a&&o&&(a.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:n,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${n}-${r}-flip-btn`);a&&o&&(a.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:n,block:o,className:r,description:a,getL10nValue:i,index:c,itemId:l,media:d,isActiveSide:h,isAriaHidden:m,isFlipped:f,labels:v,lessonId:C,onFlip:g,prefersKeyboardNavigation:b,settingShowHint:x,side:y,size:L,style:S,type:T},refDescription:k,refDescriptionBottom:E,refSide:I,state:{isAtLongOverflowBottom:j,isLong:P,isLongOverflow:N,isTooltipVisible:R,scrollbarWidthOffset:w}}=this,A=y==="front",M=y==="back",O=L==="small",B=L==="large",D=T==="description",H=T==="fullimage",V=T==="image",G=A?v?.a11yBlockFlashcardFront:v?.a11yBlockFlashcardBack,_=`items:${o?.id}/items:${l}/${A?"front":"back"}`,Y=Fa({back:M,flipped:f,front:A,fullimage:H}).mix(r),{image:se,audio:Z}=i(d)??{},W=Fa("content",{small:O,large:B,front:A,fullimage:H,image:V,"long-overflow":N,"long-overflow-bottom":j,"has-audio":!!Z}),F=Su({"audio-expansion":!0}),z=Su("btn",{"visually-hidden":!x,"prefers-keyboard":b,round:!0}),Q=Su("icon"),K=Su("tooltip",{visible:R}),q=Fa("img",{small:O,large:B,centered:V,full:H}),ee=Fa("description",{"has-audio":!!Z,long:P&&!N,"long-overflow":N,short:!P,large:B}),J=Fa("description-bottom"),ne=w==null?void 0:{right:w},oe=se?.alt??`Image ${c+1}`,xe=dt(se),U=`${this.id}-click-to-flip-text`,ie=`${this.id}-image`,ge=`${this.id}-description`;return(0,s.jsxs)("div",{"aria-label":G,className:Y,inert:m,ref:I,role:"group",style:S,tabIndex:-1,children:[(0,s.jsxs)("div",{className:W,children:[(0,s.jsxs)("div",{className:F,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:ne,children:[(0,s.jsx)("button",{"aria-labelledby":`${U} ${ge} ${ie}`,className:z,id:`${l}-${c}-${y}-flip-btn`,onBlur:this.handleBtnBlur,onClick:g,onFocus:this.handleBtnFocus,tabIndex:n&&h?0:-1,type:"button",children:(0,s.jsx)(MH,{className:Q})}),(0,s.jsx)("div",{"aria-hidden":"true",className:K,id:U,onClick:Bo,children:v?.blocksClickToFlip})]}),(H||V)&&(0,s.jsx)(nq,{alt:oe,className:q,imageId:ie,l10nId:At(d),url:xe}),D&&(0,s.jsxs)("div",{className:ee,ref:k,tabIndex:h&&N?0:void 0,children:[(0,s.jsx)(we,{allowTabNavigation:n&&!m,id:ge,value:a}),N&&(0,s.jsx)("div",{className:J,ref:E})]})]}),Z&&(0,s.jsx)("div",{className:Fa("audio-player",{text:D,image:V}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,s.jsx)(Xt,{activeIndex:t,blockId:o.id,index:`${l}-${c}-${y}`,isOverlayAudio:H,item:{id:l,media:d},itemIndex:c,labels:v,lessonId:C,media:d,mediaType:"audio",refs:_,shouldPause:!h,side:y})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=yu()(this.checkDescriptionSize,250),window.addEventListener("resize",this.checkDescriptionSizeDebounced),document.addEventListener("keydown",this.handleDocumentKeyDown)}componentWillUnmount(){clearTimeout(this.readyTimeout),this.cleanupLongBottomObserver(),window.removeEventListener("resize",this.checkDescriptionSizeDebounced),document.removeEventListener("keydown",this.handleDocumentKeyDown)}componentDidUpdate(t,n){const{props:{allowTabNavigation:o,blockType:r,isFlipped:a,isActiveSide:i,isHidden:c,onReady:l,suppressFlipFocus:d,type:h}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==a&&(i&&o&&!d?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),h==="description"&&this.handleUpdatesDescription(t,n),r==="stack"&&i&&!t.allowTabNavigation&&o&&this.refSide.current?.focus?.()}handleBtnBlur=()=>{this.setState({isTooltipVisible:!1})};handleBtnFocus=()=>{this.setState({isTooltipVisible:!0})};handleBtnMouseEnter=()=>{clearTimeout(this.refBtnTimeoutMouseLeave.current),this.setState({isTooltipVisible:!0})};handleBtnMouseLeave=()=>{this.refBtnTimeoutMouseLeave.current=setTimeout(()=>{this.setState({isTooltipVisible:!1})},150)};handleDocumentKeyDown=t=>{xn(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,n)=>{const{props:{isFlipped:o,isActiveSide:r},state:{isLongOverflow:a}}=this;t.isFlipped!==o&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,n),!n.isLongOverflow&&a?(this.setLongBottomObserver(),this.setScrollbarWidth()):n.isLongOverflow&&!a&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,n)=>{const{INSERTING:o,DELETING:r}=Br.descriptionActionTypes,{props:{description:a,size:i,type:c,getL10nValue:l},state:{descriptionAction:d,isLong:h,isLongOverflow:m}}=this,f=l(a)?.length||0,v=l(t.description)?.length||0;d!==o&&f>v?this.setState({descriptionAction:o}):d!==r&&f<v?this.setState({descriptionAction:r}):(d!==n.descriptionAction||h!==n.isLong||m!==n.isLongOverflow||i!==t.size||c!==t.type||f!==v)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:n}=Br.descriptionActionTypes,{props:{size:o},refDescription:{current:r},state:{descriptionAction:a,isLong:i,isLongOverflow:c}}=this;if(!r)return;r&&r.scrollHeight>r.clientHeight?i&&!c?this.setState({isLongOverflow:!0}):!i&&!c&&this.setState({isLong:!0}):(a===n||o!==t.size)&&this.setState(Br.initialState)};scrollDescriptionToTop=()=>{const t=this.refDescription.current;this.state.isLong&&t&&(t.scrollTop=0)};setLongBottomObserver=()=>{const t=this.refDescriptionBottom.current;if(t&&this.longBottomObserver==null){const n=o=>{const r=o?.[0]?.isIntersecting??!1;this.setState({isAtLongOverflowBottom:!r})};this.longBottomObserver=new IntersectionObserver(n,{threshold:[0,1]}),this.longBottomObserver.observe(t)}};cleanupLongBottomObserver=()=>{this.longBottomObserver?.disconnect?.(),this.longBottomObserver=void 0};setScrollbarWidth=()=>{const t=this.refDescription.current;if(t){const n=t.offsetWidth-t.clientWidth;n>0&&this.setState({scrollbarWidthOffset:n})}}}const t6=Dl(at(e=>(0,s.jsx)(Br,{...e}))),tq=e=>{const{cardMode:t,customBackgroundColorContrast:n}=nn(),o=He()?.theme,r=Hl(),a=Vn(),c=a===ae.IMAGE&&r?.overlayColor===it.LIGHT,l=vn(),d=o?.accentContrast,h=d===ke.AUTO,m=(0,u.useMemo)(()=>{let v="#fafafa";if(t===$n.TRANSPARENT)switch(a){case ae.DARK:v="#525252";break;case ae.BLACK:v="#1a1a1a";break;case ae.IMAGE:c?v="rgba(0, 0, 0, 0.7)":v="rgba(255, 255, 255, 0.7)";break;case ae.ACCENT:case ae.COLOR:case ae.TINT:if(l!=null)switch(ha(l)){case ut.LIGHT:v=os(.5,l);break;case ut.MED:v=Is(.35,l);break;case ut.DARK:v=Is(.65,l);break;case ut.NEAR_BLACK:v=os(.1,l);break}}const C={"--color-background":v},g=a===ae.COLOR?n:d;if((a===ae.ACCENT||a===ae.COLOR)&&t===$n.TRANSPARENT&&h){const b=zt({backgroundColor:v,contrast:g});C["--color-text"]=b}return C},[l,a,t,n,h,c,d]),f={...e,style:m};return(0,s.jsx)(t6,{...f})},nq=({alt:e,className:t,imageId:n,l10nId:o,url:r})=>{const a=To(e);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sn,{alt:a,className:t,"data-l10n-id":o,id:n,src:r}),!a&&(0,s.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class sq extends u.Component{static defaultProps={editable:!1,isRTL:!1,items:[],onStep:()=>{},stack:!1};state={activeIndex:0,flipStateMap:{},prefersKeyboardNavigation:!0};render(){const{blockId:t,animateBlockEntrance:n,initiallyVisible:o,isHidden:r,isLearner:a,items:i,labels:c,lessonId:l,onStep:d,previewType:h,isRTL:m,settings:f,stack:v}=this.props,{activeIndex:C}=this.state,{prefersKeyboardNavigation:g}=this.state,{entranceAnimation:b,showHint:x}=f,y=X()("block-flashcards",{"block-flashcard--column":!v,"block-flashcard--stack":v,"block-flashcards--no-animation":!b}),S=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":i.length>2?"small":"large",T=h===dr.MOBILE_PORTRAIT||h===dr.MOBILE_LANDSCAPE;return(0,s.jsx)(Ae,{className:y,children:v?(0,s.jsx)(Fe,{animateBlockEntrance:n,initiallyVisible:o,isLearner:a,children:(0,s.jsx)("div",{className:"block-flashcard-carousel",children:(0,s.jsx)(au,{blockId:t,items:i,children:({carouselRef:k})=>(0,s.jsx)(ru,{iconNameLeft:"chevron-left",iconNameRight:"chevron-right",isInfinite:!1,isRTL:m,labelCarousel:c?.a11yBlockFlashcardStack,labelCarouselRoleDesc:c?.a11yBlockFlashcardStackRoleDescription,labelSlideControls:c?.a11yBlockFlashcardStackSlideControls,labelSlideControlsGoToNext:c?.a11yBlockFlashcardStackSlideControlsGoToNext,labelSlideControlsGoToPrevious:c?.a11yBlockFlashcardStackSlideControlsGoToPrevious,labelSlideControlsGoToSlide:c?.a11yBlockFlashcardStackSlideControlsGoToSlide,labelSlideCounterPreposition:c?.blocksPreposition,labelSlidePreposition:c?.a11yBlockFlashcardStackSlidePreposition,labelSlideRoleDesc:c?.a11yBlockFlashcardStackSlideRoleDescription,onChange:this.handleCarouselChange.bind(this),ref:k,shouldMouseEmulateTouch:T,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:i.map((E,I)=>(0,s.jsx)(e6,{activeIndex:C,backDescription:E?.back?.description,backMedia:E?.back?.media,backType:E?.back?.type,blockId:t,frontDescription:E?.front?.description,frontMedia:E?.front?.media,frontType:E?.front?.type,id:E?.id,index:I,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:g,settingShowHint:x,size:"large",type:"stack",wrapElement:"div"},E?.id))})})})}):(0,s.jsx)(Fe,{animateBlockEntrance:n,className:"block-flashcards__animation",initiallyVisible:o,isLearner:a,siblingDelay:.25,children:(0,s.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:i.map((k,E)=>(0,s.jsx)(e6,{activeIndex:C,backDescription:k?.back?.description,backMedia:k?.back?.media,backType:k?.back?.type,blockId:t,frontDescription:k?.front?.description,frontMedia:k?.front?.media,frontType:k?.front?.type,id:k?.id,index:E,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:g,settingShowHint:x,size:S,type:"grid",wrapElement:"li",wrapRole:"listitem"},k?.id))})})})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("mousedown",this.handleMouseDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("mousedown",this.handleMouseDown)}handleKeyDown=t=>{!this.state.prefersKeyboardNavigation&&!AO(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,n){this.setState(o=>({flipStateMap:{...o.flipStateMap,[t]:n}}))}handleCarouselChange(t){const{block:n,onTranscriptUpdate:o}=this.props,{flipStateMap:r}=this.state,a=r[t]?"back":"front",i=n.items?.[t],c=i?.[a]?.media,l=`items:${n?.id}/items:${i?.id}/${a}`;o?.({audioPlayerId:vs({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const n6=Zf(at(Dl(sq))),pp=$("pill-button");function s6({allowTabNavigation:e=!0,ariaLabel:t,children:n,className:o,href:r,onClick:a=()=>{},onFocus:i,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=pp({[h]:!0,[l]:!0}).mix(o),f=!e;return r?(0,s.jsx)(sn,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,tabIndex:e?void 0:-1,to:r,children:(0,s.jsx)("span",{className:pp("content"),children:n})}):(0,s.jsx)("button",{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,ref:c,tabIndex:e?void 0:-1,type:"button",children:(0,s.jsx)("span",{className:pp("content"),children:n})})}const o6=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:n=!1,onNext:o,onSubmit:r,quizNext:a,quizSubmit:i})=>{const c=t?!0:void 0,l=t?void 0:r,d=t?-1:void 0,h=t?void 0:!0,m=t?o:void 0,f=t?void 0:-1,v=(0,u.useRef)(null),C=(0,De.A)(t);(0,u.useEffect)(()=>{e&&!C&&t&&setTimeout(()=>{v.current?.focus?.({preventScroll:n})},0)},[e,t,n,C]);const g=X()("quiz-card__actions",{"quiz-card__actions--proceed":t}),b=X()("quiz-card__button","quiz-card__button--next","brand_ui",{"brand--background":t,"visually-hidden-always":!t});return(0,s.jsxs)("div",{className:g,children:[(0,s.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,s.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:i})}),(0,s.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,s.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,s.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:b,"data-testid":"quiz-next-button",onClick:m,ref:v,tabIndex:f,type:"button",children:a})})]})},oq=({children:e,isActive:t,isComplete:n,isTimedQuiz:o,style:r})=>(0,s.jsx)("div",{"aria-hidden":t?void 0:!0,className:rq({isActive:t,isComplete:n,isTimedQuiz:o}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,s.jsx)("div",{className:"quiz-card__container",children:(0,s.jsx)("div",{className:"quiz-card__row",children:(0,s.jsx)("div",{className:"quiz-card__main",children:e})})})}),rq=({isActive:e,isComplete:t,isTimedQuiz:n})=>X()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":n}),r6=oq,{FILL_IN_THE_BLANK:a6,MATCHING:aq,MULTIPLE_CHOICE:iq,MULTIPLE_RESPONSE:cq}=pn;function lq(e,t){return e.map(n=>String(t(n?.title)??"")).filter(Boolean).join(", ")}function dq(e,t,n){const o=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(n(o?.title)??"")}function uq(e,t,n){return String(n(e?.[t]?.title)??"")}function i6(e,t,n){return t.filter(e).reduce((o,r,a)=>{const i=String(n(r?.title)??"");return a===0?i:o+", "+i},"")}function hq(e,t,n){return i6(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,n)}function mq(e,t,n){return i6((r,a)=>t.includes(a),e,n)}function fq({answers:e,getL10nValue:t,selection:n,correctLabel:o,userLabel:r,matchLabel:a="Match Item: ",revealAnswers:i}){const c=Object.fromEntries(Object.entries(n).map(([l,d])=>[d,l]));return e.map((l,d)=>{const h=String(t(l?.title)??""),m=String(t(l?.matchTitle)??""),f=c?.[d],v=String(t(e?.[Number(f)]?.title)??"");return i===Pe.INCORRECT?`${a}${m}. ${r}: ${v}.`:`${a}${m}. ${o}: ${h}. ${r}: ${v}.`}).join(" ")}function gp({correctAnswer:e,selectedAnswer:t,correctLabel:n,userLabel:o,revealAnswers:r}){return!e||!t||r===Pe.NONE?"":r===Pe.INCORRECT?`${o}: ${En(t)}.`:`${n}: ${En(e)}. ${o}: ${En(t)}.`}function pq(e,t){return e.type===a6?t?.quizAcceptableResponses:t?.a11yCorrectLive}function gq({getL10nValue:e,isComplete:t,item:n,selection:o,labels:r,revealAnswers:a}){if(!n||!t)return null;const i=n?.answers??[],c=n?.correct,l=n?.corrects,d=pq(n,r),h=r?.a11yAnswerLive;switch(n.type){case aq:return fq({getL10nValue:e,answers:i,selection:o,correctLabel:d,userLabel:h,revealAnswers:a});case a6:return gp({correctAnswer:lq(i,e),selectedAnswer:o,correctLabel:d,userLabel:h,revealAnswers:a});case iq:return gp({correctAnswer:dq(i,c,e),selectedAnswer:uq(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a});case cq:return gp({correctAnswer:hq(l,i,e),selectedAnswer:mq(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a})}return null}const c6=({canProceed:e,feedbackRef:t,feedbackValue:n,isActive:o,isComplete:r,isCorrect:a,item:i,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:v}=Ts(),C=(0,De.A)(e),g=ct(),x=!!Me(n),y=a?l:d,L=(0,u.useCallback)(()=>{const k=gq({getL10nValue:g,isComplete:r,item:i,labels:c,revealAnswers:h,selection:m}),E=n?En(g(n)):"",I=y+". "+k+" "+E;let j;return I&&(j=setTimeout(()=>{f(I)},250)),()=>{clearTimeout(j)}},[f,n,g,r,i,c,y,h,m]);(0,u.useLayoutEffect)(()=>{!C&&e&&h!==Pe.NONE&&L()},[e,C,L,h]),(0,u.useEffect)(()=>v,[v]);const S=X()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":x}),T=X()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":a});return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{"aria-hidden":o?void 0:!0,className:S,ref:t,tabIndex:o?-1:void 0,children:(0,s.jsx)("div",{className:"quiz-card__main--feedback",children:(0,s.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,s.jsx)("div",{className:T,children:(0,s.jsx)("i",{"aria-hidden":"true",className:a?"icon icon-Master-05":"icon icon-Master-06"})}),(0,s.jsx)("div",{className:"quiz-card__feedback-label",children:y}),n&&(0,s.jsx)("div",{children:(0,s.jsx)(we,{allowTabNavigation:r&&o,className:"quiz-card__feedback-text",value:n})})]})})})})},{FILL_IN_THE_BLANK:vq}=pn,Cq=({children:e,type:t})=>(0,s.jsx)("div",{className:xq({type:t}),children:e}),xq=({type:e})=>X()("quiz-card__interactive",{"quiz-card__interactive--no-border":[vq].includes(e)}),l6=Cq,_o=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:n,index:o,isOverlayAudio:r,item:a,labels:i={},media:c,settings:l,shouldPause:d})=>c==null||!Object.keys(c).some(h=>h!=="tmp")?null:(0,s.jsx)("div",{className:"quiz-card__media",children:(0,s.jsx)(Xt,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:n,index:o,isOverlayAudio:r,item:a,labels:i,media:c,opts:l,shouldPause:d})}),yge=(e,t)=>n=>n>=e&&n<t,d6=e=>e<10?`0${e}`:String(e),bq=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),u6=e=>e.reduce((t,n)=>n==null||isNaN(n)?t:t+n,0),yq=(e,t)=>{const n=rn(),o=(0,De.A)(t);(0,u.useEffect)(()=>{!o&&t&&e&&kd()(e.focus)&&e.focus({preventScroll:n})},[t,n,o,e])},Lu=$("question-counter"),Sq=({isActive:e=!1,labels:t,questionLabel:n,questionNumber:o,totalQuestions:r})=>{const a=(0,u.useRef)(null);yq(a.current,e);const i=`${t?.quizQuestion} ${o} ${t?.lessonPreposition} ${r}`,c=`${d6(o)}/${d6(r)}`;return(0,s.jsx)("div",{className:Lu(),children:(0,s.jsxs)("h1",{"aria-label":i,className:Lu("heading"),ref:a,tabIndex:-1,children:[(0,s.jsx)("span",{"aria-hidden":"true",className:Lu("label"),children:n}),(0,s.jsx)("span",{"aria-hidden":"true",className:Lu("count"),children:c})]})})},Lq=$("question-title"),Tq=({allowTabNavigation:e,htmlId:t,value:n})=>(0,s.jsx)(we,{allowTabNavigation:e,className:Lq(),"data-testid":"quiz-question-title",id:t,value:n}),kq=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:n,errorMessageId:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:i,isCorrect:c=!1,labels:l,onEnterToSubmit:d=()=>{},onChange:h=()=>{},options:m,questionHtmlId:f="",quizAcceptableResponses:v="",quizAnswerPlaceholder:C,revealAnswers:g=Pe.NONE,value:b=""})=>{const x=(0,u.useRef)(null),[y]=(0,u.useState)(()=>Lr()("fitb-")),L=ct(),S=Iq({options:m,getL10nValue:L}),T=`${y}-feedback`,k=`${y}-acceptable`,E=`${y}-input`,I=i?`${T} ${k}`:o||void 0,j=i?void 0:C,P=e?0:-1,N=g===Pe.ALL||g===Pe.INCORRECT,R=g===Pe.ALL||c&&g===Pe.INCORRECT,w=c?t:r,M=t&&r&&{"--fa-primary-color":zt({backgroundColor:w,contrast:c?n:a}),"--fa-secondary-color":w},O=r&&{backgroundColor:zt({backgroundColor:r,contrast:a}),fill:r,borderRadius:"50%"},B=X()("quiz-fill__icon",{"quiz-fill__icon--visible":i}),D=X()("quiz-fill__options",{"quiz-fill__options--visible":i}),H=(0,u.useCallback)(Y=>{h(Y.currentTarget.value)},[h]),V=(0,u.useCallback)(Y=>{ma(Y)&&d(Y)},[d]),G=i?void 0:H,_=i?void 0:V;return(0,s.jsxs)("div",{className:"quiz-fill",children:[(0,s.jsxs)("div",{className:"quiz-fill__container",children:[(0,s.jsx)("input",{"aria-describedby":I,"aria-hidden":!e,"aria-invalid":o?!0:void 0,"aria-labelledby":f,"aria-readonly":i,"aria-required":"true",autoComplete:"off",className:"quiz-fill__input ignore-prefers",id:E,onChange:G,onKeyDown:_,placeholder:j,readOnly:i,ref:x,tabIndex:P,type:"text",value:b}),N&&(0,s.jsxs)("div",{className:B,id:T,children:[c&&(0,s.jsx)(ue,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...M}}),!c&&(0,s.jsx)(QH,{"aria-label":l?.quizIncorrect,style:O})]})]}),R&&i&&(0,s.jsx)("div",{className:D,id:k,children:(0,s.jsx)(we,{value:`${v}: ${S}`})})]})},Iq=({options:e,getL10nValue:t})=>e.map(o=>(t(o.title)??"").trim()).join(", "),h6=kq;function Eq({correctAnswerColor:e,correctAnswerColorContrast:t}){const n=It(),o=zt({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":o,"--fa-secondary-color":e}:void 0;return(0,s.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,s.jsx)(ue,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,s.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,s.jsx)("span",{className:"matching-results-item-feedback-text-result",children:n?.quizCorrect})})]})}var Ha=p(49860);function Nq({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:n,shouldRevealCorrectAnswer:o}){const[r,a]=Ha.useState(!0),[i,c]=Ha.useState(!1),l=Ha.useRef(null),h=`matching-text-${Ha.useId()}`,m=It(),f=(0,De.A)(e),v=Ha.useCallback(()=>{a(S=>!S)},[]);Ha.useLayoutEffect(()=>{if(f!==e){const S=l.current;S!=null&&S.scrollWidth>S.clientWidth&&c(!0)}},[f,e]);const C=zt({backgroundColor:t,contrast:n}),g=t?{"--fa-primary-color":C,"--fa-secondary-color":t}:void 0,b=X()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),x=X()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),y=X()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),L=X()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,s.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,s.jsx)(ue,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:g}),!o&&(0,s.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,s.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),o&&(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("span",{className:b,children:[(0,s.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),i&&(0,s.jsx)("button",{"aria-controls":h,"aria-expanded":!r,"aria-label":r?m?.a11yMatchingItemShowMore:m?.a11yMatchingItemShowLess,className:"matching-results-item-feedback-text-btn",onClick:v,type:"button",children:(0,s.jsx)(ue,{className:x,name:"caret-down",style:g})}),(0,s.jsx)("span",{className:y,children:(0,s.jsxs)("span",{className:L,id:h,ref:l,children:[m?.quizCorrect,": ",(0,s.jsx)(Cn,{value:e})]})})]})})]})}function jq({col1Id:e,col1Value:t,col2Id:n,col2Value:o,correctAnswerColor:r,correctAnswerColorContrast:a,correctAnswerValue:i,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===n,f=h!=="incorrect",v=h!=="none";return(0,s.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,s.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,s.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,s.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,s.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,s.jsx)("span",{className:"matching-results-item-piece-content",children:(0,s.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,s.jsx)(Cn,{value:t})})})]}),(0,s.jsxs)("div",{className:"matching-results-item-piece",children:[(0,s.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,s.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,s.jsx)("span",{className:"matching-results-item-piece-content",children:(0,s.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,s.jsx)(Cn,{value:o})})})]})]}),v&&m&&(0,s.jsx)(Eq,{correctAnswerColor:r,correctAnswerColorContrast:a}),v&&!m&&(0,s.jsx)(Nq,{correctAnswerValue:i,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function wq({answers:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,itemHeight:i,revealAnswers:c,rows:l}){return(0,s.jsx)("div",{className:"matching-results",children:(0,s.jsx)("ul",{className:"matching-results-list",role:"list",children:l.map((d,h)=>{const[m,f]=d,v=t==="freezeFirst"?e.find(C=>C.id===m.id)?.matchTitle:e.find(C=>C.id===f.id)?.title;return(0,s.jsx)(jq,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:n,correctAnswerColorContrast:o,correctAnswerValue:v,height:i,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,revealAnswers:c},h)})})})}function Aq(e){return Object.keys(e).length===0}function Rq(e,t){return t in e}function Pq(e,t){return Object.values(e).includes(t)}function vp(e,t){for(const n in e)if(e[n]===t)return n}function Mq(e,t,n){return{...e,[t]:n}}function Tu(e,t){return t in e?go(e,[t]):e}function Oq(e,t){const n=vp(e,t);return n===void 0?e:Tu(e,n)}function m6(e,t,n){let o=Tu(e,t);return o=Oq(o,n),Mq(o,t,n)}function Bq(e){return Object.keys(e).length}var Dq=p(22431),Cp=p.n(Dq);Cp().dynamicDrop(!0),Cp().pointerMoveTolerance(8);const Ps=Cp();var $a=p(49860);function Fq(e,{onStart:t,onMove:n,onEnd:o,isEnabled:r=!0}){const a=$a.useRef({x:0,y:0}),i=$a.useRef({x:0,y:0}),c=$a.useRef(!1),l=$a.useRef(null),d=$a.useRef(void 0);$a.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=qx(h);function m(){const f=l.current;return f instanceof Window?{x:window.scrollX,y:window.scrollY}:{x:f.scrollLeft,y:f.scrollTop}}return d.current=()=>{const f=m(),v=f.x-i.current.x,C=f.y-i.current.y;(v!==0||C!==0)&&(a.current.x+=v,a.current.y+=C,e.current&&(e.current.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,n?.({...a.current})),i.current=f)},Ps(h).draggable({inertia:!1,autoScroll:{container:l.current,distance:5,interval:10,margin:50},listeners:{start:()=>{a.current={x:0,y:0},i.current=m(),l.current?.addEventListener("scroll",d.current,{passive:!0}),t?.()},move:f=>{a.current.x+=f.dx,a.current.y+=f.dy,h.style.transform=`translate3d(${a.current.x}px, ${a.current.y}px, 0)`,n?.({...a.current})},end:()=>{a.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{o?.()},0)}}}),c.current=!0,()=>{Ps(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,n,o,r])}var f6=p(49860);function Hq(e,{isEnabled:t=!0,onDrop:n,onEnter:o,onLeave:r,overlap:a=.015}){const i=f6.useRef(!1);f6.useEffect(()=>{const c=e.current;if(!(!c||!t||i.current))return Ps(c).dropzone({overlap:a,listeners:{drop:()=>{n?.()},dragenter:()=>{o?.()},dragleave:()=>{r?.()}}}),i.current=!0,()=>{Ps(c).unset(),i.current=!1}},[e,n,o,r,t,a])}var Yn=p(49860);const p6=Yn.memo(function({col:t,height:n,id:o,index:r,isActive:a,isFrozen:i,isMatched:c,isMoved:l,onClick:d,onDragEnd:h,onDragStart:m,onDrop:f,onDropZoneEnter:v,onDropZoneLeave:C,onKeyDown:g,value:b,valueOtherColumnActive:x,valueOtherColumnMatch:y}){const[L,S]=Yn.useState(!1),T=Yn.useRef(null),k=Yn.useRef(null),E=It(),I=Yn.useCallback(()=>{d({col:t,id:o,value:b})},[t,o,d,b]),j=Yn.useCallback(()=>{S(!0),m({col:t,id:o,value:b})},[t,o,m,b]),P=Yn.useCallback(()=>{h(),S(!1)},[h]),N=Yn.useCallback(()=>{f({col:t,id:o,value:b})},[t,o,f,b]),R=Yn.useCallback(()=>{v({col:t,id:o,value:b})},[t,o,v,b]),w=Yn.useCallback(()=>{C()},[C]),A=Yn.useCallback(H=>{g(H,{col:t,index:r})},[t,r,g]);Yn.useEffect(()=>{t===1&&r===0||k.current?.setAttribute("tabindex","-1")},[]),Fq(T,{isEnabled:!i,onStart:j,onEnd:P}),Hq(T,{isEnabled:i,onDrop:N,onEnter:R,onLeave:w});const M=X()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),O=y==null?null:(0,s.jsxs)(s.Fragment,{children:[E?.a11yMatchingItemMatchedWith," ",(0,s.jsx)(Cn,{value:y})]}),B=x==null?(0,s.jsx)(s.Fragment,{children:E?.a11yMatchingItemSelectableItem}):(0,s.jsxs)(s.Fragment,{children:[E?.a11yMatchingItemMatchWith," ",(0,s.jsx)(Cn,{value:x})]}),D=X()("matching-interaction-item",{draggable:!i,"draggable--dragging":!i&&L,droppable:i});return(0,s.jsx)("li",{className:D,ref:T,role:"listitem",children:(0,s.jsxs)("button",{"aria-pressed":a||c?!0:void 0,className:M,"data-state":a?"active":void 0,onClick:L?void 0:I,onKeyDown:A,ref:k,style:n?{height:n}:void 0,type:"button",children:[i?(0,s.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,s.jsx)(ue,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,s.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,s.jsx)("span",{className:"matching-interaction-piece-content",children:(0,s.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,s.jsx)(Cn,{value:b})})}),(0,s.jsx)("span",{className:"visually-hidden-always",children:O}),(0,s.jsx)("span",{className:"visually-hidden-always",children:B})]},o)})});var Ge=p(49860);function $q({answers:e,columnBehavior:t,isActive:n,itemHeight:o,matches:r,onChange:a,onChangeItemHeight:i,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,De.A)(n),h=(0,De.A)(t),m=(0,De.A)(e),f=(0,De.A)(r),v=It(),[C,g]=Ge.useState(void 0),[b,x]=Ge.useState(void 0),[y,L]=Ge.useState(void 0),[S,T]=Ge.useState(!1),k=Ge.useRef(null),E=Ge.useRef(null),I=Ge.useRef(null),j=Ge.useRef(void 0),P=Ge.useRef(void 0),[N,R]=Ge.useState(()=>ku({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[w,A]=Ge.useState(()=>ku({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),M=Ge.useMemo(()=>e.map(z=>({col:1,id:z.id,value:z.title})).toSorted((z,Q)=>{const K=N.get(z.id)??1/0,q=N.get(Q.id)??1/0;return K-q}),[e,N]),O=Ge.useMemo(()=>e.map(z=>({col:2,id:z.id,value:z.matchTitle})).toSorted((z,Q)=>{const K=w.get(z.id)??1/0,q=w.get(Q.id)??1/0;return K-q}),[e,w]),B=Ge.useCallback(()=>{for(const F of k.current?.querySelectorAll('button:not([tabindex="-1"])')??[])F.setAttribute("tabindex","-1")},[]),D=Ge.useCallback(F=>{const z=Array.from(N),Q=Array.from(w);if(t==="freezeSecond"){const K=new Array(Q.length),q=z.map(ne=>ne[0]).filter(ne=>!(ne in F));for(const[ne,oe]of Object.entries(F)){const xe=w.get(oe);K[xe]=[ne,xe]}for(let ne=0;ne<K.length;ne++)if(K[ne]==null){const oe=q.shift();K[ne]=[oe,ne]}const ee=new Map(K),J=g6(N,ee);J.length>0&&x(J),R(ee)}else{const K=new Array(z.length),q=new Set(Object.values(F)),ee=Q.map(oe=>oe[0]).filter(oe=>!q.has(oe));for(const[oe,xe]of Object.entries(F)){const U=N.get(oe);K[U]=[xe,U]}for(let oe=0;oe<K.length;oe++)if(K[oe]==null){const xe=ee.shift();K[oe]=[xe,oe]}const J=new Map(K),ne=g6(w,J);ne.length>0&&L(ne),A(J)}},[t,N,w]),H=Ge.useCallback(F=>{j.current=F},[]),V=Ge.useCallback(()=>{P.current==null&&(j.current=void 0)},[]),G=Ge.useCallback(F=>{P.current=F},[]),_=Ge.useCallback(()=>{P.current=void 0},[]),Y=Ge.useCallback(F=>{const z=j.current;if(z!=null){const Q=F.col===1?F.id:z.id,K=F.col===1?z.id:F.id,q=m6(r,Q,K);j.current=void 0,P.current=void 0,a(q)}},[r,a]),se=Ge.useCallback(F=>{let z=null,Q=!1,K=C;if(F.col===1&&F.id in r)z=Tu(r,F.id),K=null;else if(F.col===2&&vp(r,F.id)){const q=vp(r,F.id);z=Tu(r,q),K=null}else C==null&&(K={col:F.col,id:F.id,value:F.value},Q=!0);if(C!=null)if(C.col===F.col)C.id===F.id?K=null:K={col:F.col,id:F.id,value:F.value};else{const q=F.col===1?F.id:C.id,ee=F.col===1?C.id:F.id;z=m6(r,q,ee),Q=!0,K=null}if(z!=null&&a(z),C!==K&&g(K),Q){const ee=(F.col===1?I:E).current?.querySelector('button:not([aria-pressed="true"])');ee&&(B(),ee.removeAttribute("tabindex"),ee.focus({preventScroll:!l}))}},[l,C,r,a,B]),Z=Ge.useCallback((F,{col:z,index:Q})=>{const K=F.currentTarget;let q=!1,ee=null;switch(F.key){case"ArrowUp":q=!0,ee=K.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":q=!0,ee=K.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":q=!0,ee=z===1?I.current?.children[Q]?.firstElementChild:void 0;break;case"ArrowLeft":q=!0,ee=z===2?E.current?.children[Q]?.firstElementChild:void 0;break;case"Home":q=!0,ee=K.closest("ul").firstElementChild.firstElementChild;break;case"End":q=!0,ee=K.closest("ul").lastElementChild.firstElementChild;break}q&&(F.preventDefault(),F.stopPropagation()),ee&&(B(),ee.removeAttribute("tabindex"),ee.focus())},[B]);Ge.useEffect(()=>{r!==f&&!Aq(r)&&D(r)},[D,r,f]),Ge.useEffect(()=>{const F=({shouldFocus:K})=>{const q=C.col===1?E:I;B();const ee=q.current.querySelector('button[data-state="active"]');ee?.removeAttribute("tabindex"),K&&ee?.focus(),g(null)},z=K=>{k.current?.contains(K.target)||F({shouldFocus:!1})},Q=K=>{xn(K)&&C!=null&&F({shouldFocus:!0})};return C==null?(document.removeEventListener("mousedown",z),document.removeEventListener("keydown",Q)):(document.addEventListener("mousedown",z),document.addEventListener("keydown",Q)),()=>{document.removeEventListener("mousedown",z),document.removeEventListener("keydown",Q)}},[C,B]);const W=Ge.useCallback(()=>{const F=Array.from(k.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if(F.length===0)return;const z=F[0].closest("button");let Q=0,K;if(z){const ee=window.getComputedStyle(z),J=parseFloat(ee.paddingBlockStart)+parseFloat(ee.paddingBlockEnd),ne=parseFloat(ee.borderTopWidth)+parseFloat(ee.borderBottomWidth);Q=J+ne,K=parseFloat(ee.minHeight)}const q=F.reduce((ee,J)=>Math.max(ee,J.scrollHeight+Q),0);K&&K>=q?i(void 0):i(q)},[i]);return Ge.useEffect(()=>{(!d&&n||m!==e)&&W()},[d,n,e,m,W]),Ge.useEffect(()=>{const F=k.current?.closest(".quiz-card");let z;return F!=null&&(z=new ResizeObserver(()=>{W()}),z.observe(F)),()=>{F!=null&&z!=null&&z.unobserve(F)}},[W]),Ge.useEffect(()=>{let F,z;return b&&(F=setTimeout(()=>{x(void 0)},1e3)),y&&(z=setTimeout(()=>{L(void 0)},1e3)),()=>{clearTimeout(F),clearTimeout(z)}},[b,y]),Ge.useEffect(()=>{S&&h!==t&&(a({}),D({}),g(void 0),R(ku({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),A(ku({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[S,t,h,e,a,D]),Ge.useEffect(()=>{if(M.length<=0)return;const F=M.map((z,Q)=>[z,O[Q]]);c(F)},[M,O,c]),Ge.useEffect(()=>{T(!0)},[]),(0,s.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:k,children:[(0,s.jsx)("ul",{"aria-label":v?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:E,role:"list",children:M.map((F,z)=>{const Q=Rq(r,F.id);return(0,s.jsx)(p6,{col:1,height:o,id:F.id,index:z,isActive:C?.col===1&&C?.id===F.id,isFrozen:t==="freezeFirst",isMatched:Q,isMoved:b?.map(K=>K.id).includes(F.id)??!1,onClick:se,onDragEnd:V,onDragStart:H,onDrop:Y,onDropZoneEnter:G,onDropZoneLeave:_,onKeyDown:Z,value:F.value,valueOtherColumnActive:C?.col===2?C?.value:void 0,valueOtherColumnMatch:Q?O[z]?.value:void 0},F.id)})}),(0,s.jsx)("ul",{"aria-label":v?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:I,role:"list",children:O.map((F,z)=>{const Q=Pq(r,F.id);return(0,s.jsx)(p6,{col:2,height:o,id:F.id,index:z,isActive:C?.col===2&&C?.id===F.id,isFrozen:t==="freezeSecond",isMatched:Q,isMoved:y?.map(K=>K.id).includes(F.id)??!1,onClick:se,onDragEnd:V,onDragStart:H,onDrop:Y,onDropZoneEnter:G,onDropZoneLeave:_,onKeyDown:Z,value:F.value,valueOtherColumnActive:C?.col===1?C?.value:void 0,valueOtherColumnMatch:Q?M[z]?.value:void 0},F.id)})})]})}const ku=({answers:e,columnBehavior:t,columnBehaviorToShuffle:n})=>{let o=e.map(r=>r.id);return t===n&&(o=(0,y0.shuffle)(o)),new Map(o.map((r,a)=>[r,a]))};function g6(e,t){const n=[];for(const[o,r]of e){const a=t.get(o);a!==r&&n.push({id:o,from:r,to:a})}return n}var Iu=p(49860);function v6({columnBehavior:e="freezeSecond",matches:t={},onChange:n=()=>{},revealAnswers:o="none",...r}){const[a,i]=Iu.useState([]),[c,l]=Iu.useState(void 0),d=Iu.useCallback(m=>{i(m)},[]),h=Iu.useCallback(m=>{l(m)},[]);return r.isComplete?(0,s.jsx)(wq,{...r,columnBehavior:e,itemHeight:c,revealAnswers:o,rows:a}):(0,s.jsx)($q,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:n,onChangeItemHeight:h,onChangeRows:d})}function C6(e){return e==null||e===-1}function Vq(e,t){return e===t}const zq=({allowTabNavigation:e=!1,color:t,correctId:n="",errorMessageId:o,isComplete:r,isCorrect:a=!1,isReduceMotion:i=!1,labels:c,onChange:l=()=>{},onEnterToSubmit:d=()=>{},options:h=[],questionHtmlId:m="",renderOptionText:f,isRetaking:v,revealAnswers:C=Pe.NONE,selectedIndex:g=-1,shouldFocusFirst:b,onFocusFirstComplete:x})=>{const y=C6(g);return(0,s.jsx)(bc,{"aria-invalid":o?!0:void 0,"aria-labelledby":[m,o].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((L,S,T)=>(0,s.jsx)(_q,{allowTabNavigation:e,color:t,id:L.id,index:S,isComplete:r,isCorrect:a,isCorrectOption:n===L.id,isFirst:S===0,isFresh:y,isLast:S===T.length-1,isReduceMotion:i,isRetaking:v,isSelected:!v&&Vq(g,S),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:x,questionHtmlId:m,renderOptionText:f,revealAnswers:C,shouldFocusFirst:b,title:L.title},L.id))})},_q=({allowTabNavigation:e,color:t,id:n,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isFresh:c,isSelected:l,isReduceMotion:d,labels:h,onChange:m,onEnterToSubmit:f,questionHtmlId:v,renderOptionText:C,isRetaking:g,revealAnswers:b,shouldFocusFirst:x,onFocusFirstComplete:y,title:L})=>{const[S]=(0,u.useState)(()=>Lr()("qmc-")),T=(0,u.useRef)(null),k=(0,De.A)(l),E=!!r,I=e&&(l||c&&o===0)?0:-1,j=b===Pe.ALL,P=b==Pe.INCORRECT,N=j||P&&a,R=j||P&&a||P&&!a&&l,w=r&&i&&N,A=r&&!i&&R,M=(w||A)&&!g,O=M?`${S}-result`:void 0,B=X()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":w,"is-incorrect":A,"is-selected":l}),D=X()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),H=X()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":w}),V=X()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":A}),G=X()("quiz-multiple-choice-option__border"),_=(0,u.useCallback)(W=>{ma(W)&&f(W)},[f]),Y=(0,u.useCallback)(()=>{m({selectedIndex:o})},[o,m]),se=(0,u.useCallback)(()=>{l&&m({selectedIndex:o})},[o,l,m]),Z=r?void 0:_;return(0,u.useEffect)(()=>{e&&T.current&&(!k&&l?T.current.focus({preventScroll:d}):x&&c&&o===0&&(T.current.focus({preventScroll:d}),y?.()))},[e,l,d,k,x,c,o,y]),(0,s.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,s.jsxs)("label",{"aria-describedby":O,className:B,ref:T,children:[(0,s.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:E,name:v,onChange:Y,onClick:r?void 0:se,onKeyDown:Z,tabIndex:I,type:"radio"}),(0,s.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,s.jsx)(IF,{className:D,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,s.jsx)(jx,{className:H,"data-testid":w?"correct-check-active":"correct-check"}),(0,s.jsx)(Mx,{"aria-hidden":"true",className:V,dataTestId:A?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,s.jsx)("div",{className:G}),(0,s.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:C({optionId:n,title:L})})]}),M&&(0,s.jsxs)("div",{className:"visually-hidden-always",id:O,children:[l&&i&&h?.a11yQuizReviewCorrectlySelected,l&&!i&&h?.a11yQuizReviewIncorrectlySelected,!l&&i&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!i&&h?.a11yQuizReviewCorrectlyUnselected]})]})},x6=zq;function Uq(e){return e.length===0}function Gq(e,t){return e.includes(t)}function Wq(e,t){return e.includes(t)?e.filter(n=>n!==t):[...e,t]}const Kq=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:n,isComplete:o,isCorrect:r=!1,labels:a,onChange:i=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=Pe.NONE,selectedIndices:v=[]})=>(0,s.jsx)("div",{"aria-labelledby":[d,n].filter(Boolean).join(" "),role:"group",children:(0,s.jsx)("ul",{children:l.map((C,g)=>(0,s.jsx)(Qq,{allowTabNavigation:e,errorMessageId:n,id:C.id,index:g,isComplete:o,isCorrect:r,isCorrectOption:t.includes(C.id),isRetaking:m,isSelected:!m&&Gq(v,g),labels:a,onChange:i,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:C.title},C.id))})}),Qq=({allowTabNavigation:e,errorMessageId:t,id:n,index:o,isComplete:r,isCorrect:a,isCorrectOption:i,isSelected:c,labels:l,onChange:d,onEnterToSubmit:h,renderOptionText:m,isRetaking:f,revealAnswers:v,title:C})=>{const[g]=(0,u.useState)(()=>Lr()("qmr-")),b=r&&v===Pe.ALL&&!f,x=b?`${g}-result`:void 0,y=!!r,L=e?0:-1,S=v===Pe.ALL,T=v==Pe.INCORRECT,k=S||T&&a||T&&!a&&c,E=X()("quiz-multiple-response-option",{"quiz-multiple-response-option--complete":r,"quiz-multiple-response-option--selected":c,"quiz-multiple-response-option--correct":r&&i&&k,"quiz-multiple-response-option--incorrect":r&&!i&&k}),I=X()("quiz-multiple-response-option__border"),j=(0,u.useCallback)(R=>{ma(R)&&h(R)},[h]),P=(0,u.useCallback)(()=>{d({optionIndex:o})},[o,d]),N=r?void 0:j;return(0,s.jsxs)("li",{children:[(0,s.jsxs)("label",{"aria-describedby":x,className:E,children:[(0,s.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:y,onChange:r?void 0:P,onKeyDown:N,tabIndex:L,type:"checkbox"}),(0,s.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,s.jsx)(jx,{className:"quiz-multiple-response-option__check"}),(0,s.jsx)(Mx,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,s.jsx)("div",{className:I}),(0,s.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({optionId:n,title:C})})]}),b&&(0,s.jsxs)("div",{className:"visually-hidden-always",id:x,children:[c&&i&&l?.a11yQuizReviewCorrectlyChecked,c&&!i&&l?.a11yQuizReviewIncorrectlyChecked,!c&&i&&l?.a11yQuizReviewIncorrectlyUnchecked,!c&&!i&&l?.a11yQuizReviewCorrectlyUnchecked]})]})},b6=Kq;var kge,Yq,Zq,Ige,Ege,Nge,jge;const Xq=$s()(qe()("correct",!0)),wge=e=>Yq(Zq(e),xp),qq=e=>({MATCHING:Ee(),FILL_IN_THE_BLANK:bp,MULTIPLE_CHOICE:Ee(),MULTIPLE_RESPONSE:Ee()})[e],xp=Be()(h0()("id"),Xq),Jq=Be()(Eo(),xp),bp=$s()(qe()("correct",!0)),eJ=Be()(Ze()("id"),Eo()),Age=null,{FILL_IN_THE_BLANK:tJ,MATCHING:y6,MULTIPLE_CHOICE:nJ,MULTIPLE_RESPONSE:sJ}=pn;function S6({type:e,text:t="",matches:n={},answersLength:o=0,selectedIndices:r=[],selectedIndex:a}){switch(e){case tJ:return!Kg(t);case y6:return Bq(n)===o;case sJ:return!Uq(r);case nJ:default:return!C6(a)}}function oJ({answered:e=!1,...t}){return e&&t.type!==y6?!1:S6(t)}function L6(e,t){const n=e.trim();return t?n:n.toLowerCase()}function T6({answers:e,text:t,caseSensitive:n=!1,getL10nValue:o}){if(!t)return!1;const r=L6(t,n);return e.some(a=>{const i=o(a.title);return typeof i!="string"?!1:L6(i,n)===r})}function k6(e){return Object.entries(e).every(([t,n])=>t===String(n))}function rJ(e){const t=e.answers??[],n=e.correct;if(n!=null)return t.findIndex(r=>r.id===n);const o=t.findIndex(r=>r.correct===!0);return o===-1?0:o}function I6({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:n,selectedIndex:o,shuffledAnswerIndices:r}){if(o==null||t&&!Array.isArray(r))return!1;const a=t&&!e?r.indexOf(o):o,i=rJ(n);return a===i}function aJ(e,t){return t.map(n=>e.indexOf(n))}function iJ(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function cJ(e){const t=e.answers??[],n=e.corrects??[];return n.length>0?n.map(a=>{const i=iJ(a);return t.findIndex(c=>c.id===i)}).filter(a=>a>=0).sort((a,i)=>a-i):t.map((r,a)=>r.correct===!0?a:-1).filter(r=>r>=0).sort((r,a)=>r-a)}function E6(e){return[...e].sort((t,n)=>t-n)}function N6({isShuffled:e=!1,item:t,selectedIndices:n,shuffledAnswerIndices:o}){if(!Array.isArray(n)||e&&!Array.isArray(o))return!1;const r=e?aJ(o,n):n,a=cJ(t),i=E6(r),c=E6(a);return i.length!==c.length?!1:i.every((l,d)=>l===c[d])}function j6({answers:e,feedback:t,feedbackCorrect:n,feedbackIncorrect:o,feedbackType:r,isCorrect:a,isShuffled:i=!1,selectedIndex:c,shuffledAnswerIndices:l}){switch(r){case"CHOICE":{if(c==null||!e)return;const d=i&&Array.isArray(l)?l.indexOf(c):c;return e[d]?.feedback}case"CORRECT_INCORRECT":return a?n:o;default:return t}}var lJ=p(31529),dJ=p.n(lJ),Rge=p(3572),uJ,w6,hJ,mJ,fJ;const A6="owner",pJ="manager",gJ="editor",Pge="viewer",R6=null,yp=({effectiveRole:e,requiredRole:t})=>{const n=w6(e,R6),o=w6(t,R6);return n>=o},vJ=e=>({editor:yp({effectiveRole:e,requiredRole:gJ}),manager:yp({effectiveRole:e,requiredRole:pJ}),owner:yp({effectiveRole:e,requiredRole:A6})}),Mge=(e,t,n)=>{const{authorId:o}=e,r=o===n,a=c=>r||c,i=CJ(t);return mJ(hJ(["canChangePermissions","canMoveTo"]),uJ({canDelete:a,canEdit:a,canMove:a,canRename:a,canUnshare:a}))(i)},CJ=e=>{const{effectiveRole:t,type:n}=e||[],o=n!==fJ?A6:t,{editor:r,manager:a,owner:i}=vJ(o);return{canChangePermissions:a,canCreate:r,canDelete:i,canEdit:r,canMove:a,canMoveTo:r,canRename:r,canUnshare:i}};var xJ,bJ,Ec,yJ,SJ,LJ,TJ,P6,Va,kJ,M6,O6,IJ,EJ,Nc,NJ,jJ,B6,wJ,Eu,AJ,RJ,D6,PJ,F6,MJ,OJ,za;const BJ={[pn.FILL_IN_THE_BLANK]:"fillin",[pn.MATCHING]:"matching",[pn.MULTIPLE_CHOICE]:"multiple choice",[pn.MULTIPLE_RESPONSE]:"multiple response"},Nu="personal",H6="team",Oge=500,Bge=null,Dge=null,$6=({questions:e=[],drawnQuestionIds:t=[]})=>{const n=a=>!t.some(i=>i.includes(a.id)),o=e.filter(n),r=Math.floor(Math.random()*o.length);return o[r]??null},DJ=e=>t=>t.type===Nu||F6({effectiveRole:t.effectiveRole,requiredRole:e}),FJ=({folders:e,requiredRole:t,teamAccount:n})=>za(e,D6,M6,Va(o=>DJ(t)&&(n||o.type===Nu))),Fge=({questionBanks:{folders:e,questionBanks:t},requiredRole:n=MJ,teamAccount:o,term:r})=>{if(r&&EJ(RJ(r)))return{folders:[],questionBanks:[]};const a=new RegExp("("+PJ(r)+")","i"),i=FJ({folders:e,requiredRole:n,teamAccount:o}),c=B6("id",i),l=Va(h=>h.title.match(a)&&!h.deleted,i),d=Va(h=>(Nc(h.folderId)||P6(h.folderId,c))&&h.title.match(a)&&!h.deleted,t);return{folders:l,questionBanks:d}},V6=(e,t,n=!1)=>za(t,IJ(Ec(!Nc(e)),wJ(e),jJ(D6,M6)),AJ(Eu("deleted",!n))),HJ=(e,t,n,o=!1)=>{const r=e===H6,a=e===Nu,i=za(V6(H6,n),B6("id")),c=l=>!Nc(l.folderId)&&P6(l.folderId,i);return za(t,Va(TJ([[Ec(o),l=>l.deleted],[Ec(r),l=>!l.deleted&&c(l)],[Ec(a),l=>!l.deleted&&!c(l)],[Ec(Nc(e)),l=>!l.deleted],[xJ,O6]])))},$J=({type:e})=>e===Nu,z6=({effectiveRole:e})=>F6({effectiveRole:e,requiredRole:OJ}),VJ=(e,t)=>({id:n})=>n?LJ(yJ(O6),NJ(bJ([Eu("folderId",n),Eu("authorId",e)])))(t):!1,zJ=(e,t,n,o)=>za(V6(t,e),Va(SJ([$J,z6,VJ(o,n)]))),_J=(e,t)=>n=>{if(Nc(n.folderId))return!0;const o=kJ(Eu("id",n.folderId),e);if(!o)return!1;const r=z6(o),a=n.authorId===t;return r||a},UJ=(e,t,n,o,r)=>za(HJ(e,t,n),Va(_J(o,r))),Hge=(e,t,n,o)=>{const r=zJ(e,n,t,o),a=UJ(n,t,e,r,o);return{folders:r,questionBanks:a}},GJ=(e,t,n=[])=>{const o=t[e],{parentId:r}=o||{},{type:a}=t?.[r]||{},i=o?[o,...n]:n;return!r||o.type!==a?i:GJ(r,t,i)},{FILL_IN_THE_BLANK:_a,MATCHING:ju,MULTIPLE_CHOICE:wu,MULTIPLE_RESPONSE:Au}=pn,WJ={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},KJ=Lt()(null,[0,"type"]),Sp=rn();class _6 extends u.Component{static get defaultProps(){return{items:[],lessonId:"",blockId:"",onStep:Function.prototype}}retakeAnimationStageOne;retakeAnimationStageTwo;feedbackRef;takeAgainRef;block;wrapper;id;constructor(t){super(t),this.state={errorIncomplete:!1,selectedAnswer:null,selectedIndices:[],chosen:!1,answered:!1,fillInText:"",matches:{},questionHtmlId:`q-${du()()}`},this.retakeAnimationStageOne=null,this.retakeAnimationStageTwo=null,this.feedbackRef=(0,u.createRef)(),this.takeAgainRef=(0,u.createRef)(),this.getSelection=this.getSelection.bind(this),this.handleFillIn=this.handleFillIn.bind(this),this.handleChoiceSelect=this.handleChoiceSelect.bind(this),this.handleMultipleResponseChange=this.handleMultipleResponseChange.bind(this),this.handleRetake=this.handleRetake.bind(this),this.renderQuestionTitle=this.renderQuestionTitle.bind(this),this.renderMultipleResponseOptionText=this.renderMultipleResponseOptionText.bind(this),this.renderMultipleChoiceOptionText=this.renderMultipleChoiceOptionText.bind(this),this.previewOnly__forceShowFeedback=this.previewOnly__forceShowFeedback.bind(this),this.previewOnly__clearOverrides=this.previewOnly__clearOverrides.bind(this),window.addEventListener(We,this.previewOnly__forceShowFeedback),window.addEventListener(im,this.previewOnly__clearOverrides),this.id=Lr()("kc-")}componentDidUpdate(t,n){n.answered&&!this.state.answered?this.getType()!==_a&&cf(this.wrapper):!n.answered&&this.state.answered&&setTimeout(()=>{this.takeAgainRef.current?this.takeAgainRef.current.focus():this.feedbackRef.current?.focus()},0)}componentWillUnmount(){this.retakeAnimationStageOne&&(clearTimeout(this.retakeAnimationStageOne),this.retakeAnimationStageOne=null),this.retakeAnimationStageTwo&&(clearTimeout(this.retakeAnimationStageTwo),this.retakeAnimationStageTwo=null),window.removeEventListener(We,this.previewOnly__forceShowFeedback),window.removeEventListener(im,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:n,path:o}=t.detail,{getL10nValue:r}=this.props;if(n!==this.props.blockId)return;const a=o.at(-1);if(typeof a=="string"&&a.startsWith?.("feedback")){const i=a==="feedbackCorrect",c=o.indexOf("answers"),l=o[c+1],d=c>-1&&typeof l!="string"?l.id:null,h={forceShowFeedback:!0,forceShowFeedbackCorrect:i,forceShowFeedbackMessage:""};if(d&&"answers"in this.props.items[0]){const m=this.props.items[0].answers.find(({id:v})=>v===d),f=m&&"feedback"in m?m?.feedback:void 0;h.forceShowFeedbackCorrect=m?.correct??!1,h.forceShowFeedbackMessage=r(f)}this.setState(h)}}previewOnly__clearOverrides(){this.setState({forceShowFeedback:!1,forceShowFeedbackCorrect:!1})}getSelection({item:t}){switch(t.type){case _a:return this.state.fillInText;case ju:return this.state.matches;case Au:return this.state.selectedIndices;case wu:default:return this.state.selectedAnswer}}handleMatchesChange=t=>{this.setState({errorIncomplete:!1,matches:t})};handleMultipleResponseChange({optionIndex:t}){const{selectedIndices:n}=this.state;this.setState({errorIncomplete:!1,selectedIndices:Wq(n,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:n}=this.state;n||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,n,o,r,a){if(!n){switch(this.setState({errorIncomplete:!0}),r.type){case _a:this.wrapper?.querySelector("input")?.focus();break;case Au:case wu:this.wrapper?.querySelector("input")?.focus();break;case ju:default:break}return}a?.preventDefault(),this.setState({answered:!0,isRetaking:!1}),o&&this.props.onStep({id:t})}handleFillIn(t){this.setState({errorIncomplete:!1,fillInText:t})}handleRetake(t){const{blockId:n,lessonId:o,settings:r}=this.props,{id:a}=t;this.setState({isRetaking:!0}),this.retakeAnimationStageOne=setTimeout(()=>{this.setState({answered:!1,chosen:!1,matches:{}},()=>{this.retakeAnimationStageOne=null})},400),this.retakeAnimationStageTwo=setTimeout(()=>{this.setState({fillInText:"",selectedAnswer:null,selectedIndices:[],isRetaking:!1,shouldFocusFirst:!0},()=>{!Sp&&this.getType()===_a&&cf(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:n,itemId:a,lessonId:o})},950)}resetErrorIncomplete(){this.state.errorIncomplete&&this.setState({errorIncomplete:!1})}resetShouldFocusFirst=()=>{this.state.shouldFocusFirst&&this.setState({shouldFocusFirst:!1})};renderQuestionTitle({title:t}){return(0,s.jsx)(Ke,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:n,errorIncomplete:o,isRetaking:r,selectedAnswer:a}=this.state,{blockId:i,enableVideoPlaybackSpeed:c,getL10nValue:l,labels:d,progress:h,renderQuestionTitle:m=this.renderQuestionTitle,settings:f}=this.props,{quizCorrect:v,quizIncorrect:C,quizRequireAnswer:g,quizSubmit:b,quizTakeAgain:x}=d,{id:y,type:L}=t,S=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},T=l("media"in t?t.media:{}),k=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),E=this.getCanSubmit({item:t}),I=f?.requireCorrectAnswer?k:!0,j=this.onSubmit.bind(this,y,E,I,t),P=this.getFeedback({item:t,isCorrect:k,selectedAnswer:a}),N=this.getSelection({item:t}),{columnBehavior:R,correctAnswerColor:w,correctAnswerColorContrast:A,incorrectAnswerColor:M,incorrectAnswerColorContrast:O}=f,B=k?w:M,D=d.knowledgeCheckCorrectAnswerRequiredBlock,H=d.knowledgeCheckRetriesAttemptsRemaining,V=d.knowledgeCheckMaxRetriesReached,G=h?.items?.[i]?.items?.[y]?.retryAttemptCount??0,_=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||G<f?.retryCount),Y=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-G:-1,se=!k,Z={"--color-feedback-icon":B,"--color-matching-feedback-bubble-bg":M,"--color-multiple-choice-complete-border":M,"--color-multiple-choice-correct-border":w,"--color-multiple-response-correct-border":w,"--color-multiple-response-incorrect-border":M,"--color-multiple-response-option-check":n?w:void 0,"--color-quiz-option-check":w,"--color-x-fill":M},F=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!_)?Pe.ALL:Pe.INCORRECT,z=X()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":n,"block-knowledge__retake-container--active-attempts-left":n&&!r&&Y>0}),Q=X()("block-knowledge__retake",{"block-knowledge__retake--active":n&&!r&&_}),K=X()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":n&&!r&&_&&Y>0}),q=X()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":n&&!r&&!_}),ee=!!T?.image,J=!!T?.audio,ne=!!T?.video,oe=!!T?.embed;let xe=null;J&&ee?xe=(0,s.jsx)(_o,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-audio`,isOverlayAudio:!0,item:t,labels:d,media:T,settings:S}):J&&(ne||oe)?xe=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_o,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-audio`,item:t,labels:d,media:{audio:T.audio},settings:S}),(0,s.jsx)(_o,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-video`,item:t,labels:d,media:ne?{video:T.video}:{embed:T.embed},settings:S})]}):xe=(0,s.jsx)(_o,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${y}-audio`,item:t,labels:d,media:T,settings:S});const U=X()("block-knowledge__media",{"block-knowledge__image-with-audio":J&&ee});return(0,s.jsxs)(r6,{isActive:!0,style:Z,children:[f?.requireCorrectAnswer&&(n&&!k||!n)&&(0,s.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,s.jsx)(ue,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),D]}),m(t),(0,s.jsx)("div",{className:U,children:xe}),(0,s.jsx)(l6,{type:L,children:this.renderType({columnBehavior:R,correctAnswerColor:w,correctAnswerColorContrast:A,incorrectAnswerColor:M,incorrectAnswerColorContrast:O,isCorrect:k,item:t,onSubmit:j})}),(0,s.jsx)("div",{"aria-live":"assertive",children:o&&(0,s.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,s.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,s.jsx)(ue,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,s.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:g})]})}),(0,s.jsx)(o6,{canProceed:n,canSubmit:E,isReduceMotion:Sp,onSubmit:j,quizSubmit:b}),(0,s.jsx)(c6,{canProceed:this.state.forceShowFeedback||n,feedbackRef:this.feedbackRef,feedbackValue:P,isActive:n,isComplete:n,isCorrect:k,item:t,labels:d,quizCorrect:v,quizIncorrect:C,revealAnswers:F,selection:N}),(0,s.jsxs)("div",{"aria-hidden":!n,className:z,children:[se&&(0,s.jsxs)(s.Fragment,{children:[_?(0,s.jsxs)(s6,{allowTabNavigation:n,className:Q,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"arrow-rotate-left"}),x]}):null,Y>0&&(0,s.jsxs)("div",{className:K,children:[H," ",Y]})]}),!_&&!k&&(0,s.jsx)("div",{className:q,children:V})]})]},y)}getIsCorrect({item:t}){const{fillInText:n,matches:o,selectedAnswer:r,selectedIndices:a}=this.state,{type:i}=t,c="answers"in t?t.answers:void 0,l="isCaseSensitive"in t?t.isCaseSensitive:!1;switch(i){case _a:return T6({answers:bp(c),text:n,caseSensitive:l,getL10nValue:this.props.getL10nValue});case ju:return k6(o);case Au:return N6({item:{answers:c},selectedIndices:a});case wu:default:return I6({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return KJ(t)}getCanSubmit({item:t}){const n="answers"in t?t.answers:void 0,{answered:o,fillInText:r,matches:a,selectedAnswer:i,selectedIndices:c}=this.state;return oJ({type:t.type,text:r,matches:a,answersLength:n?.length??0,selectedIndices:c,selectedIndex:i,answered:o})}getFeedback({item:t,isCorrect:n,selectedAnswer:o}){if(this.state.forceShowFeedbackMessage)return this.state.forceShowFeedbackMessage;const r="feedback"in t?t.feedback:void 0,a="feedbackCorrect"in t?t.feedbackCorrect:void 0,i="feedbackIncorrect"in t?t.feedbackIncorrect:void 0,c="feedbackType"in t?t.feedbackType:void 0,l="answers"in t?t.answers:void 0,d=this.state.forceShowFeedbackCorrect??n;return j6({answers:l,feedback:r,feedbackCorrect:a,feedbackIncorrect:i,feedbackType:c,isCorrect:d,selectedIndex:typeof o=="number"?o:null})}getTypeLabel(){const{labels:t}=this.props,n=this.getType(),o=WJ[n];return o?t?.[o]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:n}){return(0,s.jsx)(Ke,{className:"cursorAuto",value:n})}renderMultipleChoiceOptionText(t,{title:n}){return(0,s.jsx)(Ke,{className:"quiz-multiple-choice-option__label cursorAuto",value:n})}renderType({columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isCorrect:i,item:c,onSubmit:l}){const{isHidden:d,labels:h,prefersKeyboardNavigation:m,renderMultipleResponseOptionText:f=this.renderMultipleResponseOptionText,renderMultipleChoiceOptionText:v=this.renderMultipleChoiceOptionText,settings:C,progress:g,blockId:b}=this.props,{answered:x,fillInText:y,isRetaking:L,matches:S,selectedAnswer:T,selectedIndices:k,shouldFocusFirst:E,questionHtmlId:I}=this.state,{id:j,type:P}=c,N="answers"in c?c.answers:[],{quizAcceptableResponses:R,quizAnswerPlaceholder:w}=h,A=g?.items?.[b]?.items?.[j]?.retryAttemptCount??0,M=C?.retryCount!==0&&(C?.retryCount==null||C?.retryCount===-1||A<C?.retryCount),B=C?.revealCorrectAnswers!==!1&&(C.retryCount==null||C.retryCount===-1||!M)?Pe.ALL:Pe.INCORRECT,D=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(P){case _a:return(0,s.jsx)(h6,{allowTabNavigation:!0,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:D,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:x,isCorrect:i,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:bp(N),questionHtmlId:I,quizAcceptableResponses:R,quizAnswerPlaceholder:w,revealAnswers:B,value:y});case ju:return(0,s.jsx)(v6,{answers:qq(P)(N),columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isActive:!d,isComplete:x,matches:S,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:B});case Au:return(0,s.jsx)(b6,{allowTabNavigation:!0,correctIds:xp(N),errorMessageId:D,isComplete:x,isCorrect:i,isRetaking:L,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:N,questionHtmlId:I,renderOptionText:f.bind(this,c),revealAnswers:B,selectedIndices:k});case wu:default:return(0,s.jsx)(x6,{allowTabNavigation:!0,correctId:Jq(N)||eJ(N),errorMessageId:D,isComplete:x,isCorrect:i,isReduceMotion:Sp,isRetaking:L,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:N,questionHtmlId:I,renderOptionText:v.bind(this,c),revealAnswers:B,selectedIndex:T,shouldFocusFirst:E})}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,items:r,settings:a,variant:i}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=a,m=Zd(h),f=X()("block-knowledge",{"block-knowledge--answered":c,"block-knowledge--no-animation":!d,"block-knowledge--retake":l}),v=X()("block-knowledge__wrapper",`block-knowledge__wrapper--${i}`,{[`block-knowledge__container--custom-width-${m}`]:!0}),C=Array.isArray(r)&&r.length>0?r.slice(0,1):[];return(0,s.jsx)(Ae,{className:f,"data-testid":"block-kc-card",ref:g=>{this.block=g},style:this.getStyle(),children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{className:"block-knowledge__container",children:(0,s.jsx)("div",{className:"block-knowledge__row",children:(0,s.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,s.jsx)(Gt,{"aria-label":this.getTypeLabel(),className:v,"data-testid":"block-knowledge-wrapper",ref:g=>{this.wrapper=g},children:C.map(g=>this.renderQuestion(g))})})})})})})}getStyle(){const{backgroundColor:t,settings:n}=this.props;if(n?.cardMode===$n.TRANSPARENT)switch(n?.backgroundType){case ae.ACCENT:case ae.COLOR:case ae.TINT:if(t)switch(ha(t)){case ut.LIGHT:return{"--color-background-choice-hover":os(.5,t),"--color-background-feedback-frame":os(.5,t)};case ut.MED:return{"--color-background-choice-hover":Is(.3,t),"--color-background-feedback-frame":Is(.3,t)};case ut.DARK:return{"--color-background-choice-hover":Is(.6,t),"--color-background-feedback-frame":Is(.6,t)};case ut.NEAR_BLACK:return{"--color-background-choice-hover":os(.15,t),"--color-background-feedback-frame":os(.15,t)}}}}}const QJ=e=>{const{blockId:t,items:[n]}=e,{questions:o}=n,[r,a]=(0,u.useState)(()=>$6({questions:o}));(0,u.useEffect)(()=>{if(!o)return;const c=l=>{const{path:d}=l.detail;if(d[d.indexOf("items")+1]?.id!==t)return;const m=d[d.lastIndexOf("questions")+1]?.id;if(m===r?.id)return;const f=o.find(({id:v})=>v===m);f&&a(f)};return window.addEventListener(We,c),()=>window.removeEventListener(We,c)},[t,r,o]);const i=(0,u.useMemo)(()=>r?{variant:BJ[r.type],items:[r]}:{},[r]);return r?(0,s.jsx)(_6,{...e,...i}):(0,s.jsx)("div",{})},YJ=e=>e.variant==="draw from question bank",Ua=e=>{const t=vn()??"",n=nn(),o=ct(),r={...e,backgroundColor:t,getL10nValue:o,blockSettings:n};return YJ(r)?(0,s.jsx)(QJ,{...r}):(0,s.jsx)(_6,{...r})};var ZJ=p(83854),XJ=p.n(ZJ);class qJ extends u.Component{refWrap;refBubbleTitle;refDialog;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(0,u.createRef)(),this.refDialog=(0,u.createRef)(),this.renderOverflowMask=this.renderOverflowMask.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNextClick=this.handleNextClick.bind(this),this.handlePreviousClick=this.handlePreviousClick.bind(this),this.portal=Zs()}static defaultProps={allowNav:!0,onClose:()=>{},onNextClick:()=>{},onPreviousClick:()=>{}};componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.contentRef.removeEventListener("scroll",this.scrollRef)}UNSAFE_componentWillReceiveProps(t){t.isActive&&setTimeout(this.renderOverflowMask,100)}componentDidUpdate(t){if(!t.isActive&&this.props.isActive?this.contentRef.scrollTop=0:t.isActive&&!this.props.isActive&&this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef),this.props.forceNonModal&&this.props.isActive){const n=this.refDialog.current;n!=null&&!n.open&&(n.open=!0)}if(!t.isActive&&this.props.isActive){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.props.suppressFocus||this.refBubbleTitle.current?.focus?.();const n=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:vs({refs:`items:${this.props.blockId}/items:${this.props.item?.id}`}),transcriptMedia:n})}else t.isActive&&!this.props.isActive&&(document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown))}render(){const{accentColor:t,allowNav:n,description:o,forceNonModal:r,headingLevel:a,htmlId:i,isActive:c,isMobile:l,media:d,title:h,x:m,y:f}=this.props,v=a?`h${a}`:"h2",C=X()("bubble",{"bubble--active":c}),g=eee({x:m,y:f}),b=tee({hasOverflow:this.state.hasOverflow,x:m,y:f}),x={borderBottomColor:t},y=`${i}-title`,L=()=>{if(!d)return(0,s.jsx)(we,{allowTabNavigation:c,className:"bubble__description",value:o});const T=this.props.getL10nValue(d)??{},k=Cs(T,this.props.audioPosition,!0,"labeled-graphic"),E={blockId:this.props.blockId,hasPadding:!1,imageMaxHeight:1e3,item:this.props.item,labels:this.props.labels,lessonId:this.props.lessonId,enableVideoPlaybackSpeed:this.props.enableVideoPlaybackSpeed,opts:this.props.mediaOpts,refs:`items:${this.props.blockId}/items:${this.props.item?.id}`,shouldPause:!c},I={audio:{media:k.audioOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:k.imageOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:k.videoOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:k.embedOnlyMedia||T,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:T,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,s.jsx)(s.Fragment,{children:k.renderOrder.map((j,P)=>{if(j==="text")return(0,s.jsx)(we,{allowTabNavigation:c,className:"bubble__description",value:o},`text-${P}`);const N=I[j];return!N||j==="embed"&&!c?null:(0,s.jsx)("div",{className:"bubble__media",children:(0,s.jsx)("div",{className:"bubble__figure",children:(0,s.jsx)("div",{className:X()({"labeled-graphic-bubble-media-container--audio-bottom":j==="audio"&&this.props.audioPosition==="bottom"}),children:(0,s.jsx)(Xt,{...E,...N})})})},`${j}-${P}`)})})},S=(0,s.jsx)("div",{className:C,ref:this.refWrap,style:g,children:(0,s.jsxs)("dialog",{"aria-hidden":!c,"aria-labelledby":y,"aria-modal":l&&!r,className:b,id:i,onKeyDown:this.handleKeyDown,ref:this.refDialog,style:x,children:[(0,s.jsx)(v,{className:"bubble__title",id:y,ref:this.refBubbleTitle,tabIndex:-1,children:(0,s.jsx)(Cn,{value:h})}),(0,s.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,s.jsx)(EF,{className:"bubble__close-icon"})}),(0,s.jsx)("div",{className:"bubble__content",ref:T=>{this.contentRef=T},children:L()}),n&&this.renderControls()]})});return l?(0,fs.createPortal)((0,s.jsx)(R3,{children:S}),this.portal):S}renderControls(){const{accentColor:t,labels:n}=this.props,o={"--color-lg-accent":t};return(0,s.jsxs)("div",{className:"bubble__controls",style:o,children:[(0,s.jsx)("button",{"aria-label":n?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,s.jsx)("i",{className:"icon icon-chevron-left"})}),(0,s.jsx)("button",{"aria-label":n?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,s.jsx)("i",{className:"icon icon-chevron-right"})})]})}renderOverflowMask(){if(!this.contentRef)return;const t=this.contentRef,n=t.offsetHeight;t.scrollHeight>n?(t.addEventListener("scroll",this.scrollRef=uu()(this.handleScroll,50)),this.setState({hasOverflow:!0}),this.scrollRef()):(t.removeEventListener("scroll",this.scrollRef),this.setState({hasOverflow:!1}))}handleDocumentClick=t=>{if(!this.props.isActive)return;const n=t.composedPath();if(!(this.refWrap.current!=null&&n.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>n.includes(r)))){if(this.props.forceNonModal){const r=document.querySelector(".block-search");if(r!=null&&n.includes(r))return}this.props.onClose({shouldFocusMarker:!1})}};handleDocumentKeyDown=t=>{xn(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:n,onNextClick:o,onPreviousClick:r}=this.props,a=HO(this.contentRef,this.state.hasOverflow),i=XJ()(Oe()(n));fn()([[i(Po),r],[i(Mo),o],[BO,a]])(t)}handleCloseClick=()=>{this.props.onClose()};handleNextClick(t){this.props.onNextClick(t)}handlePreviousClick(t){this.props.onPreviousClick(t)}handleScroll(){const t=this.contentRef,n=t.scrollTop,o=t.scrollHeight,r=t.offsetHeight;n>=o-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}}function JJ(e){const t=ct(),n=Bt(768);return(0,s.jsx)(qJ,{...e,getL10nValue:t,isMobile:n})}const eee=({x:e,y:t})=>{const n={top:"initial",bottom:"initial",left:"0",right:"0"};return e>50?n.right=100-e+"%":n.left=e+"%",t>50?n.bottom=100-t+"%":n.top=t+"%",n},tee=({hasOverflow:e,x:t,y:n})=>{const o=t<50;let r="top";return n>33&&(r=n>66?"bottom":"middle"),X()("bubble__body","bg--range-light",{"bubble__body--has-overflow":e,"bubble__body--left":o,"bubble__body--right":!o,"bubble__body--top":r==="top","bubble__body--middle":r==="middle","bubble__body--bottom":r==="bottom"})};var nee=p(49860);const see=e=>new URL(e).pathname.slice(1)+new URL(e).search;class oee extends nee.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:n,cornerRadius:o,editable:r,editingDisabled:a,getL10nValue:i,imageLoaded:c,media:l,onCreateMarker:d,onShowAltDialog:h}=this.props,{style:m}=this.state,f=i(l)?.image??{},{alt:v,dimensions:C,key:g,src:b}=f,x=!!f.alt,y=To(v),L=B8(f),S=X()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!a,"labeled-graphic-canvas__figure--editing-disabled":r&&a});let T;g?T=dt(f):b&&(T=dt({key:see(b),...f}));const k=X()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":J1(T)}),E={...m,...o!=null&&{"--corner-radius":`${Number(o)}px`}},I=(0,s.jsx)(Sn,{alt:y,className:k,"data-l10n-id":At(l),height:C?.height||C?.originalHeight,onClick:d,onLoad:()=>this.setState({style:L}),ref:j=>{this.imageEl=j},src:T,style:E,width:C?.width||C?.originalWidth});return(0,s.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,s.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,s.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,s.jsxs)("figure",{className:S,children:[x&&r&&(0,s.jsx)(Ho,{message:"Edit alt text",children:(0,s.jsx)("div",{className:"item-media__tooltip",children:(0,s.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&I,(0,s.jsx)("ol",{role:"list",children:n})]})})})})}}const ree=at(oee),aee={"01":"a11yLabeledGraphicIconPlus","02":"a11yLabeledGraphicIconDot","03":"a11yLabeledGraphicIconInformation","04":"a11yLabeledGraphicIconQuestion","05":"a11yLabeledGraphicIconCheck","06":"a11yLabeledGraphicIconX","07":"a11yLabeledGraphicIconHeart","08":"a11yLabeledGraphicIconPin","09":"a11yLabeledGraphicIconArrowLeft",10:"a11yLabeledGraphicIconArrowRight",11:"a11yLabeledGraphicIconArrowUp",12:"a11yLabeledGraphicIconArrowDown",13:"a11yLabeledGraphicIconArrowUpLeft",14:"a11yLabeledGraphicIconArrowUpRight",15:"a11yLabeledGraphicIconArrowDownLeft",16:"a11yLabeledGraphicIconArrowDownRight",17:"1",18:"2",19:"3",20:"4",21:"5",22:"6",23:"7",24:"8",25:"9",26:"0"},iee=(e,t)=>{const n=aee[t];return n?.startsWith("a11y")?e?.[n]||"":n||""};var cee=p(49860);const U6=$("labeled-graphic-marker");class lee extends cee.Component{marker;onMouseMove;onMouseLeave;constructor(t){super(t),this.state={dragging:!1,hovering:!1,isComplete:!1,isDragged:!1,offsetX:0,offsetY:0,wasDragged:!1},this.onClick=this.onClick.bind(this)}parentCanvasElement(){return this.marker.parentElement.parentElement.parentElement}componentDidMount(){const t=this.parentCanvasElement();t.addEventListener("mousemove",this.onMouseMove=n=>{this.onItemDrag(n)}),t.addEventListener("mouseleave",this.onMouseLeave=n=>{this.onItemRelease(n)})}componentWillUnmount(){const t=this.parentCanvasElement();t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseleave",this.onMouseLeave)}UNSAFE_componentWillReceiveProps(t){const{isSelected:n,useLocalStateForCompletion:o}=t;n&&o&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:n,title:o,viewed:r})=>{const{labels:a}=this.props;return[].concat(n||[]).concat(o||[]).concat(t||[]).concat(r?a?.a11yLabeledGraphicViewed:a?.a11yLabeledGraphicUnviewed).join(", ")};render(){const{accentColor:t,ariaControls:n,hasSearchMatch:o,icon:r,isActive:a,isComplete:i,isLessonBlocksList:c,isSelected:l,isVisible:d,labels:h,markerColor:m,markerColorContrast:f,onFocus:v,styles:C,useLocalStateForCompletion:g}=this.props,b=this.props.getL10nValue(this.props.title),x=iee(h,r),y=g?this.state.isComplete:i,L=!!m,S=Dn(m),k=zt({backgroundColor:m,contrast:f??S}),E=L?m:"#ffffff",I=L?k:t,j=this.buildMarkerLabel({icon:x,label:h&&h.a11yLabeledGraphicButtonMarker||"",title:b,viewed:y}),P=U6({active:l,dragged:this.state.isDragged,visible:d,complete:y,"search-match":o}),N={...C,"--color-lg-accent":E,"--color-lg-font":I},R=U6("pin",{selected:l,disabled:c});return(0,s.jsx)("button",{"aria-controls":n,"aria-expanded":a,"aria-label":j,className:P,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:v,onMouseDown:this.onItemGrab.bind(this),onMouseEnter:this.onHover.bind(this),onMouseLeave:this.onLeave.bind(this),onMouseUp:this.onItemRelease.bind(this),ref:w=>{this.marker=w},style:N,type:"button",children:(0,s.jsx)("span",{className:R,children:(0,s.jsx)("i",{className:`icon icon-Master-${r}`})})})}focus(){this.marker&&this.marker.focus&&this.marker.focus()}onHover(){this.state.wasDragged&&this.props.onHover(),this.setState({hovering:!0})}onLeave(){this.props.onLeave(),this.setState({hovering:!1})}onClick(){const{editable:t,itemId:n,onClick:o,parentId:r}=this.props,a="labeledGraphicMarkerClick",i={detail:{itemId:n,parentId:r}},c=new CustomEvent(a,i);document.dispatchEvent(c),t||o()}onItemGrab(t){const{editable:n}=this.props;if(!n)return;const o=this.marker.getBoundingClientRect(),r=o.left-t.clientX+this.marker.offsetWidth/2,a=o.top-t.clientY+this.marker.offsetHeight/2;this.setState({posX:t.clientX,posY:t.clientY,offsetX:r,offsetY:a,isDragged:!0})}onItemDrag(t){if(this.state.isDragged){const n=t.clientX-this.state.posX,o=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${n}px, ${o}px, 0)`}}onItemRelease(t){const{editable:n}=this.props,o={isDragged:!1};this.marker.style.transform="translate3d(0, 0, 0)",this.state.isDragged&&this.state.posX===t.clientX&&this.state.posY===t.clientY?this.props.onClick():n&&t.currentTarget instanceof HTMLElement&&t.currentTarget.classList.contains("labeled-graphic-marker")?this.props.onSetPosition(t,this.state.offsetX,this.state.offsetY):this.state.isDragged&&(o.offsetX=0,o.offsetY=0),this.setState(o)}}const dee=at(lee);class uee extends u.Component{static get defaultProps(){return{animateBlockEntrance:!1,editable:!0,getL10nValue:(t=>t),markerDelay:0,onClose:Function.prototype,onCreateMarker:Function.prototype,onItemClear:Function.prototype,onItemHint:Function.prototype,onItemSelected:Function.prototype,onNextClick:Function.prototype,onPreviousClick:Function.prototype,onSetMarkerPosition:Function.prototype,showBubbles:!0}}markerRefs;timeout;entranceDoneTimeout;canvas;constructor(t){super(t);const{isLearner:n}=t;this.afterAnimatedIn=this.afterAnimatedIn.bind(this),this.createMarker=this.createMarker.bind(this),this.onBubbleClose=this.onBubbleClose.bind(this),this.onMarkerFocus=this.onMarkerFocus.bind(this),this.markerRefs={},this.state={showMarkers:!n||rn()}}componentDidMount(){const{isBlock:t,isLearner:n,isPreview:o,markerDelay:r}=this.props;n&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),o?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:n,blockId:o,color:r,canvasClassNames:a,disableCreateMarker:i,editable:c,getL10nValue:l,imageLoaded:d=!0,isBlock:h,isLearner:m,isLessonBlocksList:f,isPreview:v,initiallyVisible:C,items:g,labels:b,lessonId:x,media:y,onItemClear:L,onItemHint:S,onItemSelected:T,onNextClick:k,onPreviousClick:E,onShowAltDialog:I,parentId:j,progress:P,searchMatchedItemIds:N,selected:R,settings:w={},showBubbles:A,suppressBubbleFocus:M,enableVideoPlaybackSpeed:O,forceBubbleNonModal:B}=this.props,{cornerRadius:D,headingLevel:H,markerColor:V,markerColorContrast:G}=w,{showMarkers:_}=this.state,se=V||(t||r),Z=X()("map-item",{"map-item--animated":!c}),W=n?"fadeIn":"none",F=n?1:0,z=g.length>1,Q=new Set(N?.map(String)??[]);return(0,s.jsx)(u.Fragment,{children:(0,s.jsx)(Fe,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!v,animateIn:W,duration:v?0:F,initiallyVisible:C,isLearner:m,children:(0,s.jsx)(ree,{canvasClassNames:a,cornerRadius:D,editable:c,editingDisabled:i,imageLoaded:d,media:y,onCreateMarker:this.createMarker,onShowAltDialog:I,ref:K=>{this.canvas=K},children:g.map((K,q)=>{const{description:ee,id:J,icon:ne,media:oe,title:xe}=K,U=l(K.x),ie=l(K.y),ge={top:ie+"%",left:U+"%"},he=zs()(["items",J,"isComplete"],P),ve=Qn(R,J),be=Q.has(String(J)),le=`bubble-${o}-${J}`;return(0,s.jsxs)("li",{className:Z,role:"listitem",children:[(0,s.jsx)(dee,{accentColor:se,ariaControls:le,editable:c,hasSearchMatch:be,icon:ne,isActive:ve,isComplete:he,isLessonBlocksList:f,isSelected:ve,isVisible:_,itemId:J,labels:b,markerColor:V,markerColorContrast:G,onClick:()=>{T(J)},onFocus:this.onMarkerFocus(J),onHover:()=>{S()},onLeave:()=>{L()},onSetPosition:this.onSetPosition.bind(this,K),parentId:j,ref:je=>{this.markerRefs[J]=je},styles:ge,title:xe,useLocalStateForCompletion:h},J),!c&&A&&(0,s.jsx)(JJ,{accentColor:se,allowNav:z,audioPosition:w.audioPosition,blockId:o,description:ee,enableVideoPlaybackSpeed:O,forceNonModal:B,headingLevel:H,htmlId:le,index:q,isActive:ve,item:K,labels:b,lessonId:x,media:oe,mediaOpts:{disableZoom:!w.zoomOnClick},onClose:this.onBubbleClose(J),onNextClick:()=>{k(q)},onPreviousClick:()=>{E(q)},suppressFocus:M,title:xe,x:Number(U),y:Number(ie)},le)]},J)})})})})}createMarker(t){const{disableCreateMarker:n,editable:o,onCreateMarker:r}=this.props;if(!o||n)return;const{x:a,y:i}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:du()(),isActive:!1,title:"",x:String(a),y:String(i)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:n}=this.props;return(o={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];o.shouldFocusMarker&&r?.focus?.(),n(t)}}onMarkerFocus(t){return()=>{const{onClose:n,selected:o}=this.props;o&&o!==t&&n()}}onSetPosition(t,n,o,r){if(!this.props.editable)return;const{lesson:a,onSetMarkerPosition:i}=this.props,{id:c,items:l}=a,{x:d,y:h}=this.findItemCoordinates({e:n,offsetX:o,offsetY:r}),m={x:String(d),y:String(h)};(0,Qt.uW)(t.x)&&(0,Qt.uW)(t.y)?(this.props.updateL10n({l10n:t.x,value:m.x}),this.props.updateL10n({l10n:t.y,value:m.y})):i({itemId:t.id,lessonId:c,items:l,payload:m})}findItemCoordinates({e:t,offsetX:n=0,offsetY:o=0}){const r=this.canvas.imageEl.getBoundingClientRect(),a=20,i=this.findItemCoordinate({clientPos:t.clientX,clientOffset:n,rectSubtractor:r.left,rectDivisor:r.width,validOffsetAmount:a}),c=this.findItemCoordinate({clientPos:t.clientY,clientOffset:o,rectSubtractor:r.top,rectDivisor:r.height,validOffsetAmount:a});return{x:i,y:c}}findItemCoordinate({clientPos:t,clientOffset:n,rectSubtractor:o,rectDivisor:r,validOffsetAmount:a}){const i=a/r*100,c=100-i;let l=(t+n-o)/r*100;return l>c?l=c:l<i&&(l=i),l}afterAnimatedIn(){const{isBlock:t}=this.props;t&&this.setState({showMarkers:!0})}}const hee=at(uee);var mee=p(49860);const fee=e=>{e.open=!0};class pee extends mee.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={forceBubbleNonModal:!1,imageLoaded:!1,searchMatchedItemIds:[],suppressBubbleFocus:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.handleRevealItem=this.handleRevealItem.bind(this),this.onItemSelected=this.onItemSelected.bind(this),this.onNextClick=this.onNextClick.bind(this),this.onPreviousClick=this.onPreviousClick.bind(this),this.setImageLoaded=this.setImageLoaded.bind(this)}componentDidMount(){this.loadImage(),this.props.readOnly||document.addEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.addEventListener(We,this.handleNavEvent),window.addEventListener(Oo,this.handleRevealItem)}handleNavEvent(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&this.state.selectedItemId!==o&&this.onItemSelected(o)}handleRevealItem(t){const{items:n}=this.props,{blockId:o,itemId:r,matchingItemIds:a=[r]}=t.detail;if(!Qn(o,this.props.blockId))return;const i=n.find(d=>Qn(d.id,r));if(!i)return;const c=n.filter(d=>a.some(h=>Qn(d.id,h))).map(d=>d.id);c.some(d=>Qn(d,i.id))||c.push(i.id);const{selectedItemId:l}=this.state;l!=null&&!Qn(l,i.id)&&this.getBubble(l)?.close(),this.setState({forceBubbleNonModal:!0,searchMatchedItemIds:c,selectedItemId:i.id,suppressBubbleFocus:!0},()=>{const d=this.getBubble(i.id);d!=null&&!d.open&&fee(d),this.setState({suppressBubbleFocus:!1})})}getBubble(t){return document.getElementById(`bubble-${this.props.blockId}-${t}`)}componentDidUpdate(t){const{isMobile:n}=this.props,{forceBubbleNonModal:o,selectedItemId:r}=this.state;t.isMobile===n||r==null||o||(this.getBubble(r)?.close(),this.openBubble(r))}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(We,this.handleNavEvent),window.removeEventListener(Oo,this.handleRevealItem)}render(){const{forceBubbleNonModal:t,imageLoaded:n,searchMatchedItemIds:o,suppressBubbleFocus:r}=this.state,{initiallyVisible:a,isLessonBlocksList:i,isPreview:c,items:l,labels:d,parentId:h,settings:m={}}=this.props,{mediaWidth:f="2"}=m,v=c?l[0].id:this.state.selectedItemId,C=X()("view-labeled-graphic",{"view-labeled-graphic--small":f==="0","view-labeled-graphic--medium":f==="1","view-labeled-graphic--full":f==="2"});return(0,s.jsx)("div",{"aria-label":d?.a11yLabeledGraphicBlock,className:C,role:"group",children:(0,s.jsx)(hee,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,forceBubbleNonModal:t,imageLoaded:n,initiallyVisible:a,isLessonBlocksList:i,labels:d,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:h,searchMatchedItemIds:o,selected:v,suppressBubbleFocus:r})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:n,src:o}=t??{};if(!n&&!o)return;const r=setTimeout(this.setImageLoaded,1e3),a=new Image,i=n?dt(t):o;a.src=i,a.onload=()=>{clearTimeout(r),this.setImageLoaded()}}getCanvasClassNames(){return X()("labeled-graphic-canvas",{"labeled-graphic-canvas--visible":this.state.imageLoaded})}onNextClick(t){const{blockId:n,items:o}=this.props,r=Ze()("id",o[Sl()(t)]||o[0]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:n,items:o}=this.props,r=Ze()("id",o[op()(t)]||o[op()(Hn()(o))]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}clearSearchReveal(t){const{selectedItemId:n}=this.state;n!=null&&this.getBubble(n)?.close(),this.setState({forceBubbleNonModal:!1,searchMatchedItemIds:[],selectedItemId:void 0},t)}onItemSelected(t){const{editBlock:n,items:o,onItemSelected:r,onStep:a}=this.props,{forceBubbleNonModal:i,selectedItemId:c}=this.state;if(!(n&&window.matchMedia("(max-width: 768px)").matches)){if(i){const l=Qn(c,t);this.clearSearchReveal(()=>{l?r(t):this.onItemSelected(t)});return}c===t?this.closeOpenedBubble():(this.openBubble(t),Be()(a,Cr()(l=>l.id===t))(o)),r(t)}}handleMarkerClick(t){const{itemId:n,parentId:o}=t.detail,{selectedItemId:r}=this.state;(o!==this.props.parentId||r!==n)&&this.closeOpenedBubble()}openBubble(t,{forceNonModal:n=!1}={}){const{blockId:o}=this.props;this.setState({forceBubbleNonModal:n,selectedItemId:t});const r=document.getElementById(`bubble-${o}-${t}`);!r||r.open||(!n&&this.props.isMobile&&typeof r.showModal=="function"?r.showModal():r.show())}closeOpenedBubble(t=this.state.selectedItemId){t!=null&&(this.getBubble(t)?.close(),this.setState(n=>{const o=Qn(n.selectedItemId,t);return{forceBubbleNonModal:o?!1:n.forceBubbleNonModal,searchMatchedItemIds:o?[]:n.searchMatchedItemIds,selectedItemId:o?void 0:n.selectedItemId}}))}}function gee(e){const t=ct(),n=Bt(768);return(0,s.jsx)(pee,{...e,getL10nValue:t,isMobile:n})}const vee=e=>{const{blockId:t,progress:n,isLessonBlocksList:o=!1}=e,r=zs()(["items",t],n);return(0,s.jsx)(Ae,{className:"block-labeled-graphic",children:(0,s.jsx)(gee,{...e,editable:!1,isBlock:!0,isLessonBlocksList:o,parentId:t,progress:r})})},fe=$("block-survey"),Lp={2:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],3:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],4:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"good",icon:"face-smile",defaultLabel:"Good"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}],5:[{value:"bad",icon:"face-anguished",defaultLabel:"Bad"},{value:"poor",icon:"face-frown",defaultLabel:"Poor"},{value:"fair",icon:"face-meh",defaultLabel:"Fair"},{value:"good",icon:"face-smile",defaultLabel:"Good"},{value:"great",icon:"face-laugh",defaultLabel:"Great"}]},G6=Lp[5].map(e=>e.defaultLabel),Ru=e=>{const t=Q6(e.labels?.length);return Lp[t]??Lp[Pu]},W6=(e,t)=>{const n=Ru(e).findIndex(o=>o.value===t);return n===-1?void 0:n+1},Cee=(e,t)=>Ru(e)[t-1]?.value,xee=2,bee=10,K6=5,yee=7,Pu=3,See=5,Q6=e=>e===2||e===3||e===4||e===5?e:Pu,jc=null,zge=e=>(jc[e]??jc[Pu]).map(t=>G6[t]),_ge=(e,t)=>{const n=Q6(e?.length),o=jc[n]??jc[Pu],r=jc[t],a=[...G6];return e?.forEach((i,c)=>{const l=o[c];l!==void 0&&(a[l]=i)}),r.map(i=>a[i])},Ga=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",Lee=(e,t,n)=>{const o=n?.items?.[e]?.items??{};return t.reduce((r,a)=>{const i=o?.[a.id]?.response;if(i==null)return r;if(a.questionType==="RATING"){const c=Cee(a,Number(i));c!=null&&(r[a.id]=c)}else r[a.id]=String(i);return r},{})},Tee=(e,t)=>t?.items?.[e]?.isSubmitted??!1,Y6=(e,t)=>(0,s.jsx)(Ke,{className:"block-survey__question-title",id:t,value:e.question}),kee=e=>(0,s.jsx)(Ke,{value:e.startLabel}),Iee=e=>(0,s.jsx)(Ke,{value:e.endLabel}),Eee=(e,t)=>(0,s.jsx)(Ke,{className:"block-survey__rating-label",value:e.labels?.[t]});function Nee({animateBlockEntrance:e,blockId:t,initiallyVisible:n,isLearner:o,items:r=[],labels:a,onSurveySubmitted:i=mn,onSurveyPartialResponse:c=mn,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=Iee,renderLinearScaleStartLabel:v=kee,renderQuestionTitle:C=Y6,renderRatingLabel:g=Eee,settings:b={},title:x}){const y=ct(),[L,S]=(0,u.useState)(()=>Lee(t,r,m)),[T,k]=(0,u.useState)(()=>Tee(t,m)),[E,I]=(0,u.useState)(!1),[j,P]=(0,u.useState)(!1),[N,R]=(0,u.useState)(new Set),[w,A]=(0,u.useState)(0),M=(0,u.useRef)(null),O=(0,u.useRef)(null),B=(0,u.useRef)(!1),D=(0,u.useCallback)(U=>{O.current=U},[]),{announcePolite:H}=Ts(),V=(0,De.A)(T),G=b.cardMode==="TRANSPARENT",_=`validation-error-${t}`,Y=b.surveyWidth??76,se=Zd(Y),Z=(0,u.useCallback)((U,ie)=>{S(ve=>({...ve,[U]:ie}));const ge=r.find(ve=>ve.id===U),he=ge?.questionType==="RATING"?W6(ge,ie):void 0;c({itemId:U,response:he}),N.has(U)&&(R(be=>{const le=new Set(be);return le.delete(U),le}),r.find(be=>be.id===U)&&r.filter(le=>le.isRequired&&le.id!==U&&Ga(L[le.id])).length===0&&P(!1))},[N,r,c,L]),W=(0,u.useCallback)((U,ie)=>{S(ge=>({...ge,[U]:ie})),c({itemId:U,response:ie}),N.has(U)&&(R(he=>{const ve=new Set(he);return ve.delete(U),ve}),r.filter(he=>he.isRequired&&he.id!==U&&Ga(L[he.id])).length===0&&P(!1))},[N,r,c,L]),F=(0,u.useCallback)((U,ie)=>{S(ge=>{const he=ge[U],ve=Array.isArray(he)?he:[],be=ve.includes(ie)?ve.filter(le=>le!==ie):[...ve,ie];return{...ge,[U]:be}}),N.has(U)&&(R(he=>{const ve=new Set(he);return ve.delete(U),ve}),r.filter(he=>he.isRequired&&he.id!==U&&Ga(L[he.id])).length===0&&P(!1))},[N,r,L]),z=(0,u.useCallback)((U,ie)=>{S(ge=>({...ge,[U]:ie})),c({itemId:U,response:Number(ie)}),N.has(U)&&(R(he=>{const ve=new Set(he);return ve.delete(U),ve}),r.find(he=>he.id===U)&&r.filter(ve=>ve.isRequired&&ve.id!==U&&Ga(L[ve.id])).length===0&&P(!1))},[N,r,c,L]),Q=(0,u.useCallback)((U,ie,ge)=>{if(ge&&ie.length>ge)return;const he=L[U]||"",ve=ge&&ie.length===ge&&he.length<ge;S(be=>({...be,[U]:ie})),c({itemId:U,response:ie}),ve&&H(`Character limit reached. ${ge} characters maximum.`),N.has(U)&&ie.trim()!==""&&(R(le=>{const je=new Set(le);return je.delete(U),je}),r.filter(le=>le.isRequired&&le.id!==U&&Ga(L[le.id])).length===0&&P(!1))},[H,r,c,L,N]),K=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}I(!0);try{const U=r.flatMap(ie=>{const ge=L[ie.id],he=Array.isArray(ge)?"":ge||"",ve=y(ie.question)??"",be={id:String(t),lessonId:String(l),itemId:ie.id,questionTitle:En(String(ve)),surveyTitle:En(String(y(x)??"")),isUnfinished:!1};if(ie.questionType==="RATING"){const le=W6(ie,he);if(le===void 0)return[];const je=Ru(ie),Wt=Object.fromEntries(je.map((Ht,$t)=>[$t+1,y(ie.labels?.[$t])??Ht.defaultLabel]));return[{...be,ratingOptions:Wt,type:ie.questionType,response:le}]}if(ie.questionType==="LINEAR_SCALE")return[{...be,type:"LINEAR_SCALE",response:he===""?void 0:Number(he)}];if(ie.questionType==="MULTIPLE_CHOICE"||ie.questionType==="MULTIPLE_RESPONSE"){const le=ie.choices??[],Wt=(Array.isArray(ge)?ge:ge?[ge]:[]).flatMap(Ht=>{const $t=le.find(Kt=>Kt.id===Ht);return $t?[{id:$t.id,title:En(String(y($t.title)??""))}]:[]});return[{...be,type:ie.questionType,response:Wt}]}return[{...be,type:ie.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:he}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.reportUngradedAnswers(U),r.forEach(ie=>d?.({id:ie.id})),h?.(L),k(!0),i()}catch(U){console.error("Failed to submit survey:",U)}finally{I(!1)}},[t,l,r,L,d,h,x,y,i]),q=(0,u.useCallback)(U=>{if(U.preventDefault(),E)return;const ge=r.filter(he=>he.isRequired).filter(he=>Ga(L[he.id]));if(ge.length>0){P(!0),R(new Set(ge.map(he=>he.id))),B.current=!0,A(he=>he+1);return}K()},[E,K,r,L]);(0,u.useEffect)(()=>{B.current&&O.current&&(O.current.focus(),B.current=!1)},[w]),(0,u.useEffect)(()=>{!V&&T&&M.current&&M.current.focus()},[T,V]);const ee=(0,u.useRef)(null),J=(0,u.useRef)(new Map),ne=(0,u.useCallback)((U,ie)=>{const ge=J.current;ie?ge.set(String(U),ie):ge.delete(String(U))},[]),oe=C!==Y6;(0,u.useEffect)(()=>{if(!oe)return;const U=ee.current;if(!U)return;const ie=`.${String(fe("question-text"))}`,ge=he=>{if(he.button!==0)return;const ve=he.target;if(!(ve instanceof HTMLElement))return;const be=ve.closest(ie);if(!(be instanceof HTMLElement)||ve.closest('[contenteditable="true"]'))return;const le=be.dataset.surveyItemId,je=le==null?void 0:J.current.get(le);je&&(he.preventDefault(),je.setFocus())};return U.addEventListener("mousedown",ge),()=>U.removeEventListener("mousedown",ge)},[oe]);const xe=(U,ie)=>{const ge=L[U.id]||"",he=`survey-q-${U.id}`,ve=`${he}-char-count`,be=`${he}-error`,le=N.has(U.id),je=le&&ie===r.findIndex(Ye=>N.has(Ye.id));if(U.questionType==="LINEAR_SCALE"){const Ye=Math.min(bee,Math.max(xee,U.scaleMax??See)),Nt=Array.from({length:Ye},(Te,Ve)=>Ve+1),jt=fe("linear-scale-options",{wide:Ye<=K6,medium:Ye>K6&&Ye<=yee}),Xe=fe("linear-scale",{error:le});return(0,s.jsxs)("fieldset",{"aria-describedby":le?be:void 0,className:fe("question",{error:le}),ref:je?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(U.id),children:[C(U,he,ne),U.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsxs)("div",{className:Xe,children:[(0,s.jsx)("div",{className:fe("linear-scale-label"),children:v(U)}),(0,s.jsx)("div",{className:jt,children:Nt.map(Te=>{const Ve=ge===String(Te);return(0,s.jsxs)("label",{className:fe("linear-scale-option"),children:[(0,s.jsx)("span",{className:fe("linear-scale-number"),children:Te}),(0,s.jsx)("div",{className:fe("linear-scale-indicator"),children:(0,s.jsx)(ue,{className:fe("linear-scale-dot",{active:Ve}),"data-testid":Ve?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,s.jsx)("input",{checked:Ve,className:fe("linear-scale-input"),name:`survey-${U.id}`,onChange:()=>z(U.id,String(Te)),type:"radio",value:String(Te)})]},Te)})}),(0,s.jsx)("div",{className:fe("linear-scale-label"),children:f(U)})]})}),le&&(0,s.jsxs)("div",{className:fe("error-message"),id:be,children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},U.id)}if(U.questionType==="RATING"){const Ye=Ru(U).map((Te,Ve)=>({value:Te.value,label:U.labels?.[Ve],icon:Te.icon})),Nt=fe("question",{error:le}),jt=fe("rating-options",{error:le}),Xe=le?be:void 0;return(0,s.jsxs)("fieldset",{"aria-describedby":Xe,className:Nt,ref:je?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(U.id),children:[C(U,he,ne),U.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsx)("div",{className:jt,children:Ye.map((Te,Ve)=>{const mo=ge===Te.value,bs=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("input",{checked:mo,className:fe("rating-input"),name:`survey-${U.id}`,onChange:()=>Z(U.id,Te.value),type:"radio",value:Te.value}),(0,s.jsx)(ue,{"aria-hidden":"true",className:fe("rating-icon"),name:Te.icon}),g(U,Ve)]}),ys=fe("rating-option",{selected:mo,error:le,"two-options":Ye.length===2,"three-options":Ye.length===3,"four-options":Ye.length===4,"five-options":Ye.length===5});return G?(0,s.jsx)(Gt,{cardMode:"WHITE",className:ys,tag:"label",children:bs},Te.value):(0,s.jsx)("label",{className:ys,children:bs},Te.value)})})}),le&&(0,s.jsxs)("div",{className:fe("error-message"),id:be,children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},U.id)}if(U.questionType==="MULTIPLE_CHOICE"){const Ye=U.choices??[],Nt=fe("choices",{error:le});return(0,s.jsxs)("fieldset",{"aria-describedby":le?be:void 0,className:fe("question",{error:le}),ref:je?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(U.id),children:[C(U,he,ne),U.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsx)("ul",{className:Nt,children:Ye.map(jt=>{const Xe=ge===jt.id;return(0,s.jsx)("li",{className:fe("choice"),children:(0,s.jsxs)("label",{className:fe("choice-option",{selected:Xe}),children:[(0,s.jsx)("input",{checked:Xe,className:fe("choice-input"),name:`survey-${U.id}`,onChange:()=>W(U.id,jt.id),type:"radio",value:jt.id}),(0,s.jsx)("span",{"aria-hidden":"true",className:fe("choice-indicator"),children:(0,s.jsx)(ue,{className:fe("choice-dot",{active:Xe}),name:"circle-solid"})}),(0,s.jsx)("span",{className:fe("choice-text"),children:(0,s.jsx)(Ke,{allowTabNavigation:!1,value:jt.title})})]})},jt.id)})})}),le&&(0,s.jsxs)("div",{className:fe("error-message"),id:be,children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleChoiceRequired]})]},U.id)}if(U.questionType==="MULTIPLE_RESPONSE"){const Ye=U.choices??[],Nt=L[U.id],jt=Array.isArray(Nt)?Nt:[],Xe=fe("choices",{error:le});return(0,s.jsxs)("fieldset",{"aria-describedby":le?be:void 0,className:fe("question",{error:le}),ref:je?D:void 0,tabIndex:-1,children:[(0,s.jsxs)("legend",{className:fe("question-text"),"data-survey-item-id":String(U.id),children:[C(U,he,ne),U.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsx)("ul",{className:Xe,children:Ye.map(Te=>{const Ve=jt.includes(Te.id);return(0,s.jsx)("li",{className:fe("choice"),children:(0,s.jsxs)("label",{className:fe("choice-option",{selected:Ve}),children:[(0,s.jsx)("input",{checked:Ve,className:fe("choice-input"),name:`survey-${U.id}`,onChange:()=>F(U.id,Te.id),type:"checkbox",value:Te.id}),(0,s.jsx)("span",{"aria-hidden":"true",className:fe("choice-indicator",{checkbox:!0}),children:(0,s.jsx)(ue,{className:fe("choice-check",{active:Ve}),name:"check"})}),(0,s.jsx)("span",{className:fe("choice-text"),children:(0,s.jsx)(Ke,{allowTabNavigation:!1,value:Te.title})})]})},Te.id)})})}),le&&(0,s.jsxs)("div",{className:fe("error-message"),id:be,children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleResponseRequired]})]},U.id)}const Wt=Array.isArray(ge)?"":ge,Ht=fe("question",{error:le}),$t=fe("text-input",{error:le}),Kt=U.questionType==="SHORT_RESPONSE"||U.questionType==="LONG_RESPONSE"?U.maxLength:void 0,Pn=[le?be:null,Kt?ve:null].filter(Boolean).join(" ")||void 0;return(0,s.jsxs)("div",{className:Ht,children:[(0,s.jsxs)("div",{className:fe("question-text"),"data-survey-item-id":String(U.id),children:[C(U,he,ne),U.isRequired&&(0,s.jsxs)("span",{className:fe("required-indicator"),children:[" ",(0,s.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,s.jsx)("div",{className:fe("interactive"),children:(0,s.jsxs)("div",{className:fe("text-response"),children:[(0,s.jsx)("textarea",{"aria-describedby":Pn,"aria-invalid":le?!0:void 0,"aria-labelledby":he,"aria-required":U.isRequired?!0:void 0,className:$t,maxLength:Kt,onChange:Ye=>Q(U.id,Ye.target.value,Kt),ref:je?D:void 0,rows:U.questionType==="LONG_RESPONSE"?4:2,value:Wt}),Kt&&(0,s.jsxs)("div",{className:fe("character-count"),children:[(0,s.jsxs)("span",{"aria-hidden":"true",children:[Wt.length," / ",Kt]}),(0,s.jsx)("span",{className:"visually-hidden-always",id:ve,children:`${a.a11yBlockSurveyCharCount} ${Wt.length} ${a.a11yPreposition} ${Kt}`})]})]})}),le&&(0,s.jsxs)("div",{className:fe("error-message"),id:be,children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyFreeResponseRequired]})]},U.id)};return(0,s.jsx)(Xh,{...b,children:(0,s.jsx)(Ae,{className:fe(),children:(0,s.jsx)(Fe,{animateBlockEntrance:e,initiallyVisible:n,isLearner:o,children:(0,s.jsx)("div",{children:(0,s.jsx)(Gt,{className:fe("container",{[`custom-width-${se}`]:!0}),children:T?(0,s.jsx)("div",{className:fe("confirmation"),ref:M,tabIndex:-1,children:(0,s.jsxs)("p",{className:fe("confirmation-text"),children:[(0,s.jsx)(ue,{name:"circle-check-regular"})," ",a.surveyConfirmation]})}):(0,s.jsxs)("form",{noValidate:!0,onSubmit:q,children:[x&&(0,s.jsx)(Ke,{className:fe("title"),tagName:"h2",value:x}),(0,s.jsx)("div",{className:fe("questions"),ref:ee,children:r.map((U,ie)=>xe(U,ie))}),(0,s.jsxs)("div",{className:fe("actions"),children:[(0,s.jsx)("div",{className:fe("validation-error",{visible:j}),id:`validation-error-${t}`,role:"alert",children:j&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyValidationError]})}),(0,s.jsx)("div",{className:`${fe("submit")} brand--ui`,children:(0,s.jsx)("button",{"aria-describedby":j?_:void 0,className:fe("submit-button"),"data-testid":"survey-submit-button",disabled:E,type:"submit",children:E?a.surveySubmitting:a.surveySubmit})})]})]})})})})})})}const Tp=$("block-process-card"),Z6=({icon:e,isOverlayAudio:t=!1,onClick:n,text:o,variant:r})=>{const a=`${r}-btn`;return(0,s.jsxs)("button",{className:Tp(a,{"audio-overlay":t}),onClick:n,type:"button",children:[(0,s.jsx)("span",{className:Tp(`${a}-text`),children:o}),(0,s.jsx)(ue,{classNameIcon:Tp(`${a}-icon`),name:e})]})},jee=$("block-process-card"),wee=({activeIndex:e,enableVideoPlaybackSpeed:t,id:n,index:o,isIntroStep:r=!1,isOverlayAudio:a=!1,item:i,labels:c,lessonId:l,media:d,onMediaLoad:h,settingZoomOnClick:m})=>{const{image:f}=d??{},v=a?f?.align??"center":"center",C=jee("media",{legacy:!1,"audio-overlay":a,[`audio-overlay-${v}`]:a,"intro-step":r}),g=e===o;return(0,s.jsx)("div",{className:C,children:(0,s.jsx)(Xt,{activeIndex:e,blockId:n,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${n}-${o}`,isOverlayAudio:a,item:i,itemIndex:o,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!g})})};var kp=p(49860);const Uo=$("block-process-card"),Aee=({text:e})=>{const t=kp.useRef(null),{isInView:n}=Ree({ref:t,threshold:.75});return(0,s.jsxs)("div",{className:Uo("swipe-badge",{animate:n}),ref:t,children:[(0,s.jsx)("span",{className:Uo("swipe-badge-text"),children:e}),(0,s.jsx)(ue,{className:Uo("swipe-badge-icon"),name:"chevron-right-solid"})]})};function Ree({ref:e,rootMargin:t="0px",threshold:n=.1}){const[o,r]=kp.useState(!1);return kp.useEffect(()=>{if(!e.current||o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&(r(!0),a.disconnect())},{rootMargin:t,threshold:n});return a.observe(e.current),()=>a.disconnect()},[o,e,t,n]),{isInView:o}}const Pee=({activeIndex:e,className:t,description:n,enableVideoPlaybackSpeed:o,hasIntro:r,id:a,index:i,item:c,labels:l,lessonId:d,media:h,onClickRestart:m,onClickStart:f,settingAudioPosition:v,settingHeadingLevel:C=2,settingShowStepLabel:g=!0,settingStepLabel:b,settingZoomOnClick:x,showSwipeBadge:y,style:L,title:S,totalSteps:T,type:k})=>{const E=`h${C}`,I=k==="intro",j=k==="summary",P=k==="step",N=r?i:i+1,R=Me(b)||l.processStepName,w=Me(Array.isArray(h)?{}:h),A=Cs(w,v,!0,"process"),M=()=>{if(!h)return null;const O={activeIndex:e,blockId:a,enableVideoPlaybackSpeed:o,id:a,index:i,isIntroStep:I,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:x,item:c},B={audio:{media:A.audioOnlyMedia||w,isOverlayAudio:!1},image:{media:A.imageOnlyMedia||w,isOverlayAudio:!1},video:{media:A.videoOnlyMedia||w},embed:{media:A.embedOnlyMedia||w,isOverlayAudio:!1},overlay:{media:w,isOverlayAudio:!1}};return A.renderOrder.map((D,H)=>{if(D==="text")return(0,s.jsx)(we,{className:Uo("description"),value:n},`text-${H}`);const V=B[D];return V?(0,s.jsx)(wee,{...O,...V},`${D}-${H}`):null})};return(0,s.jsxs)("div",{className:Uo(null,{[k]:!0}).mix(t),style:L,children:[P&&g&&(0,s.jsx)("div",{className:Uo("number"),children:`${R} ${N}`}),(0,s.jsx)("div",{className:Uo("title"),children:(0,s.jsx)(E,{children:(0,s.jsx)(we,{value:S})})}),M(),!h&&(0,s.jsx)(we,{className:Uo("description"),value:n}),I&&T>1&&(0,s.jsx)(Z6,{icon:"chevron-right-solid",isOverlayAudio:A.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),j&&T>1&&(0,s.jsx)(Z6,{icon:"arrow-rotate-left",isOverlayAudio:A.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),y&&P&&(0,s.jsx)(Aee,{text:l.processSwipe})]})};var Ms=p(49860);const Mee=$("block-process-carousel"),X6=e=>e?.type==="intro",Ip=e=>e?.type==="summary",Ep=e=>e?.type==="step",q6=e=>e?.isHidden,Oee=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:n,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,onStep:l,onTranscriptUpdate:d,previewType:h,processRef:m,settings:{audioPosition:f,headingLevel:v,stepLabel:C,showStepLabel:g,zoomOnClick:b}})=>{const x=Bt(480),y=Th(),L=ct(),S=Ms.useRef(null),[T,k]=Ms.useState(0),[E,I]=Ms.useState(!1),j=Ms.useMemo(()=>h===dr.MOBILE_PORTRAIT||h===dr.MOBILE_LANDSCAPE,[h]),P=Ms.useMemo(()=>{const V=a.filter(se=>!q6(se)),G=V.find(X6),_=V.find(Ip),Y=V.filter(Ep);return[G,...Y,_].filter(Boolean)},[a]),N=Ms.useMemo(()=>P.findIndex((V,G)=>Ep(V)&&(Ep(P[G+1])||Ip(P[G+1]))),[P]),R=X6(P[0]),w=Ip(P[P.length-1]),A=!!h;Ms.useEffect(()=>{l&&(a.forEach(V=>q6(V)&&l(V)),P.length>0&&l(P[0]))},[]);const M=Ms.useCallback(()=>{S.current?.navigateToSlide?.(0)},[]),O=Ms.useCallback(()=>{S.current?.navigateToSlide?.(1)},[]),B=Ms.useCallback(V=>{if(k(V),m.current){const Y=m.current.closest("[data-block-id]")??m.current;U$(Y,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}V!==N&&!E&&I(!0),l?.(P[V]);const G=P[V]?.media;L(G)?.audio&&d?.({audioPlayerId:vs({refs:`items:${n}/items:${P[V]?.id}`}),transcriptMedia:G})},[P,N,L,E,n,l,d,m]),D=({index:V,isActive:G,onClick:_,onKeyDown:Y})=>{const se=R&&V===0,Z=w&&V===P.length-1,W=R?V:V+1;let F,z;se?(F=i?.a11yBlockProcessSlideControlsIntroduction,z=(0,s.jsx)(ue,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):Z?(F=i?.a11yBlockProcessSlideControlsSummary,z=(0,s.jsx)(ue,{name:"check-regular"})):(F=W.toString(),z=W.toString());const Q=`${i?.a11yBlockProcessSlideControlsGoToSlide} ${F}`;return(0,s.jsx)(fy,{"aria-label":Q,ariaLabel:Q,className:"carousel-controls-item-btn",isActive:G,onClick:_,onKeyDown:Y,children:z},V)},H=e?"fadeIn":"none";return(0,s.jsx)(Fe,{animateBlockEntrance:A,animateIn:H,duration:A&&e?1:0,initiallyVisible:o,isLearner:r,children:(0,s.jsx)("div",{className:Mee(),children:(0,s.jsx)(au,{blockId:n,carouselRef:S,items:P,children:()=>(0,s.jsx)(ru,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:y,labelCarousel:i?.a11yBlockProcessCarousel,labelCarouselRoleDesc:i?.a11yBlockProcessRoleDescription,labelSlideControls:i?.a11yBlockProcessSlideControls,labelSlideControlsGoToNext:i?.a11yBlockProcessSlideControlsGoToNext,labelSlideControlsGoToPrevious:i?.a11yBlockProcessSlideControlsGoToPrevious,labelSlideControlsGoToSlide:i?.a11yBlockProcessSlideControlsGoToSlide,labelSlideCounterPreposition:i?.blocksPreposition,labelSlidePreposition:i?.a11yBlockProcessSlidePreposition,labelSlideRoleDesc:i?.a11yBlockProcessSlideRoleDescription,onChange:B,ref:S,renderSlideIndicator:D,shouldMouseEmulateTouch:j,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:P.map((V,G)=>(0,s.jsx)(Gt,{activeIndex:T,description:V.description,enableVideoPlaybackSpeed:t,hasIntro:R,id:n,index:G,isHidden:V.isHidden,item:V,labels:i,lessonId:c,media:V.media,onClickRestart:M,onClickStart:O,settingAudioPosition:f,settingHeadingLevel:v,settingShowStepLabel:g,settingStepLabel:C,settingZoomOnClick:b,showSwipeBadge:x&&!E&&G===N,tag:Pee,title:V.title,totalSteps:P.length,type:V.type},V.id))})})})})};var Bee=p(49860);const Dee=e=>{const{blockId:t}=e,n=Bee.useRef(null);return(0,s.jsx)(Ae,{className:"block-process",ref:n,children:(0,s.jsx)(Oee,{id:t,processRef:n,...e})})};var Fee=p(58516),Hee=p.n(Fee),$ee=p(67731),J6=p.n($ee),Vee=p(89955),e5=p.n(Vee),zee=p(50195),_ee=p.n(zee),Uee=p(18352),Go=p.n(Uee);const t5=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),Gee=(e,t)=>{const n=e.responses[e.response],o={emotion:t.emotion,goTo:t.goTo,nextSlide:t.nextSlide},r="action"in t?{action:t.action}:{};return{...o,...r,description:n?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},Wee=e=>[t5(e)],Kee=e=>{const t=!!e.responses[e.response],n=t5(e),o=Gee(e,n);return t?[n,o]:[o]},Qee=e=>e.hasFeedback?[e,...Kee(e)]:e.response!=null?[e,...Wee(e)]:[e],Yee=(e,t)=>{if(!t)return;const{scene:n,slide:o}=t,r=e.findIndex(c=>c.id===n),i=(e[r]?.slides||[]).findIndex(c=>c.id===o);return{scene:r,slide:i}},n5=Vl()(Yee);var Zee=p(14172),Xee=p.n(Zee);const qee=kt()(Ze()("filters"),$s()(qe()("name","rise_emotion")),mi()(wt())),Jee=kt()(Ze()("filters"),Cr()(qe()("name","rise_emotion")),Ze()("value")),s5=e=>new URL(e).pathname.slice(1),ete=e=>kt()(en()("key",s5(e.src)),en()("thumbnailKey",s5(e.thumbnail)))(e),tte=kt()(Ze()("poses"),$s()(qee),vt()(e=>[Jee(e),e]),Xee(),Ss()(ete));var Gge,Os=p(49860);const Np=e=>e===-1?null:e,nte=e=>Jn()(yt(),Ee(),e),o5=mi()(yt()),Wa=Rf()(o5,cs),r5=Hee()(bf()),a5=nte(hj),jp=e=>Eo()(e);class ste extends Os.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=Os.createRef();responseItemRef=Os.createRef();scenarioRef=Os.createRef();blockContentRef=Os.createRef();endRef=Os.createRef();textRef=Os.createRef();refs=Os.createRef();dynamicRefs=Os.createRef();fadeObservers=new Map;shouldFocus=!1;constructor(t){super(t);const n={activeScene:0,activeSlide:0,initiated:!1,prevScene:0,prevSlide:0,resizes:0,slides:{}};this.refs.current={},this.state=t.initialState||n,this.fetchCharacters=this.fetchCharacters.bind(this),this.fetchCharacterPose=this.fetchCharacterPose.bind(this),this.getCharacterPose=this.getCharacterPose.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.onClick=this.onClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onInit=this.onInit.bind(this),this.onResize=this.onResize.bind(this),this.onResponseClick=this.onResponseClick.bind(this),this.onTryAgainClick=this.onTryAgainClick.bind(this),this.renderBackground=this.renderBackground.bind(this),this.renderButton=this.renderButton.bind(this),this.renderDetails=this.renderDetails.bind(this),this.renderDialogues=this.renderDialogues.bind(this),this.renderEnd=this.renderEnd.bind(this),this.renderPose=this.renderPose.bind(this),this.renderResponse=this.renderResponse.bind(this),this.renderText=this.renderText.bind(this),this.renderAudioMedia=this.renderAudioMedia.bind(this),this.renderDialogueWithAudioPositioning=this.renderDialogueWithAudioPositioning.bind(this),this.renderTextWithAudioPositioning=this.renderTextWithAudioPositioning.bind(this),this.resetSlide=this.resetSlide.bind(this),this.resetSlides=this.resetSlides.bind(this),this.setNextSlide=this.setNextSlide.bind(this),this.dynamicRefs.current={},this.setupFadeObserver=this.setupFadeObserver.bind(this)}setupFadeObserver(t){if(!t)return;const n=this.fadeObservers.get(t);n&&(n.observer.disconnect(),t.removeEventListener("scroll",n.scrollHandler),this.fadeObservers.delete(t));const o=Array.from(t.children).find(d=>d.className.includes("-bottom"));if(!o)return;const r=t.parentElement?.classList.contains("scenario-block__dialogue__bubble")||t.parentElement?.classList.contains("scenario-block__dialogue__pane")?t.parentElement:t,a=()=>{const{scrollHeight:d,clientHeight:h}=t;return d>h+2},i=d=>{const h=d?.[0]?.isIntersecting??!1,m=a();m?r.classList.add("has-overflow"):r.classList.remove("has-overflow"),!h&&m?r.classList.add("show-fade"):r.classList.remove("show-fade")},c=new IntersectionObserver(i,{root:t,threshold:[0,1]}),l=()=>{};this.fadeObservers.set(t,{observer:c,scrollHandler:l}),c.observe(o)}componentDidMount(){const{initialState:t,items:n}=this.props,o=Be()(Kr()("poses"),Nn()({},"character"),jp);Wa(n)&&!o(n)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(We,this.handleNavEvent)}handleNavEvent(t){const{path:n}=t.detail,{blockId:o,sceneId:r,slideId:a,responseId:i}=xa(n,["block","scene"]),c=n.at(-1)==="feedback";if(o!==this.props.blockId)return;const l=Np(this.props.items.findIndex(m=>m.id===r)),d=l!==null?Np(this.props.items[l].slides.findIndex(m=>m.id===a)):null,h=d!==null?Np(this.props.items[l].slides[d].responses.findIndex(m=>m.id===i)):null;this.setState({activeScene:l??0,activeSlide:d??0},()=>{l!==null&&d!==null&&this.setState({slides:{...this.state.slides,[`${l}.${d}`]:{...this.state.slides[`${l}.${d}`],hasFeedback:c,response:h}}})})}componentDidUpdate(){const{items:t,onStep:n}=this.props,{activeScene:o,activeSlide:r}=this.state,a=Lt()([],[o,"slides"],t),i=Lt()(null,[r,"goTo"],a),c=Lt()(null,[r,"type"],a);if(n&&(i==="end"&&c==="text"||!i&&!c)&&e5()(n,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():cf(this.scenarioRef.current)}this.fadeObservers.forEach(({observer:m,scrollHandler:f},v)=>{document.contains(v)||(m.disconnect(),v.removeEventListener("scroll",f),this.fadeObservers.delete(v))})}componentWillUnmount(){clearTimeout(this.continueRef),clearTimeout(this.feedbackRef),clearTimeout(this.resetRef),window.removeEventListener("resize",this.onResize),window.removeEventListener(We,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:n},o)=>{t.disconnect(),o.removeEventListener("scroll",n)}),this.fadeObservers.clear()}getActiveScene(){return this.getScene(this.state.activeScene)}getScene(t){const{items:n}=this.props;return n&&t>=0&&t<n.length?n[t]:null}fetchCharacterPose(t,n){const o=this.getScene(t),r=o?.slides,a=r&&n>=0&&n<r.length;if(!o||!r||!a)return{name:"",pose:null};const{character:i}=o,c=r[n],l=`${t}.${n}`,d=[l,"response"],h=[l,"hasFeedback"],m=Lt()(null,d,this.state.slides),f=Lt()(!1,h,this.state.slides),v=Nn()("neutral","emotion",c),C=Jn()(Oe()(f),Lt()(v,["responses",m,"emotion"]),Oe()(v)),g=kt()(Lt()(i?.poses?.neutral,["poses",C(c)]),a5);return{name:i?.name||"",pose:g(i)}}fetchCharacters(){const{getCharacter:t,items:n,onItemUpdate:o}=this.props,r=xo()(["id","name","poses","src"]),a=c=>l=>o({itemId:c,payload:{character:l}}),i=({character:c,id:l})=>Wa(c)&&t(c.id).then(d=>en()("poses",tte(d),d)).then(r).then(a(l));n.map(i)}isCharacterHidden(){const{items:t}=this.props,{activeScene:n,activeSlide:o}=this.state,a=this.getActiveScene()?.slides?.[o],i=o===null,c=t[n];return i?!(c?.slidesHaveCharacterByDefault??!1):a&&!a.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:n,activeSlide:o,prevScene:r,prevSlide:a}=this.state,i=Lt()([],[n,"slides"],t),c=Lt()(!0,[o,"hasCharacter"],i);return o5(r)&&Ll()(c)?this.fetchCharacterPose(r,a):this.fetchCharacterPose(n,o)}onClick(t,n){const{items:o,onStep:r}=this.props,{activeScene:a,activeSlide:i}=this.state,c=this.getActiveScene()?.slides,l=Nn()(null,"type",c?.[i])==="dialogue",d=a===o.length-1,h=i===(c?.length??0)-1,m={activeSlide:i+1},f={activeScene:a+1,activeSlide:0},v={activeSlide:null},C={activeScene:0,activeSlide:0},g=kt()(n5(o),S=>({activeScene:S.scene,activeSlide:S.slide})),b=fn()([[Oe()(h&&d),Oe()(v)],[Oe()(h&&!d),Oe()(f)],[or(),Oe()(m)]]),x=Jn()(Oe()(l),Oe()(v),Oe()(C)),y=fn()([[tn()("slide"),Go()(g,[n])],[tn()("next"),b],[tn()("end"),x]]),L=()=>this.continueRef=setTimeout(this.setNextSlide,300);this.resetRef=setTimeout(this.resetSlide.bind(this,a,i),0),this.setState({prevScene:a,prevSlide:i}),this.setState(y(t),L),t==="end"&&this.resetSlides(),t==="end"&&r&&e5()(r,o)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}onResponseClick(t,n){const{activeScene:o,activeSlide:r,slides:a}=this.state,{getL10nValue:i,lessonId:c,blockId:l}=this.props,d=`${o}.${r}`,h=en()("response",t),m=en()("hasFeedback",!0),f=Hs()({[`${d}`]:h}),v=Hs()({[`${d}`]:m});n.media&&i(n.media)?.audio&&Le.playerId===`audio-${c}-${l}`&&Le.pause();const g=Be()(v,f);this.setState({slides:f(a)},()=>{this.shouldFocus=!0,this.setState({slides:g(a)})})}onTryAgainClick(){const{activeScene:t,activeSlide:n,slides:o}=this.state,r=`${t}.${n}`,a=J6()({hasFeedback:null,response:null}),i=Hs()({[`${r}`]:a});this.setState({slides:i(o)})}render(){const{blockId:t,getL10nValue:n,isPDF:o,items:r,labels:a}=this.props,{activeScene:i,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=Be()(cs,Nn()({},"character"),jp),f=Be()(Kr()("poses"),Nn()({},"character"),jp),v=Be()(es(),Lt()({},["character","poses"])),C=Be()(Uc(),es(),vt()(v)),g=this.isCharacterHidden(),b=X()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":Ys.isMobile,"scenario-block--loading":m(r)&&!f(r),"scenario-block--character-hidden":g}),x=`scenario-live-${t}`,y={"aria-label":a?.a11yGroupScenario,"aria-describedby":x,className:b,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},L=dt(n(r?.[0].background?.media)?.image),S=fn()([[yt(),this.renderEnd],[qe()("type","dialogue"),this.renderDialogues],[qe()("type","text"),this.renderText],[or(),Oe()(null)]]),T=X()("scenario-block__character",{"scenario-block__character--hidden":g}),k=`${i}.${c}`,E=this.state.slides[k],I=E?.hasFeedback?h?.responses?.[E?.response]?.alt:h?.alt,j=n(I);return(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{...y,"data-l10n-id":At(I),children:[(0,s.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:x,children:j}),(0,s.jsx)("div",{className:"scenario-block__spinner"}),(0,s.jsx)("div",{className:"scenario-block__background-wrapper",children:Wa(r)&&r.map(this.renderBackground)}),L&&(0,s.jsx)(Sn,{alt:"",onLoad:this.onInit,src:L}),(0,s.jsxs)("div",{className:"scenario-block__inner",children:[(0,s.jsx)("div",{className:T,children:f(r)&&C(r).map(this.renderPose)}),(0,s.jsx)(ai,{children:Wa(r)&&S(h)})]})]}),o&&h&&this.renderDetails(h)]})}renderBackground(t,n){const{activeScene:o}=this.state,{id:r,blurBackground:a}=t,i=this.props.getL10nValue(t?.background?.media)?.image,c=X()("scenario-block__background",{"scenario-block__background--active":o===n,"scenario-block__background--blur":a??!0}),l=dt(i);return l?(0,s.jsx)(Sn,{alt:"",className:c,src:l},r):(0,s.jsx)(s.Fragment,{})}renderButton(t){const{labels:n}=this.props,{scenarioContinue:o,scenarioTryAgain:r}=n,{goTo:a,nextSlide:i}=t,c="action"in t?t.action:void 0,l={appear:!0,classNames:"scenario-block__dialogue__button-",nodeRef:this.buttonRef,timeout:{enter:0,exit:1e3}},d=c==="tryAgain"?(0,s.jsxs)("span",{children:[r," ",(0,s.jsx)("i",{className:"icon icon-reload"})]}):(0,s.jsx)("span",{children:o}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?Be()(this.onFocus,this.onTryAgainClick):Be()(this.onFocus,Go()(this.onClick,[a,i]))};return(0,s.jsx)(ai,{children:(0,s.jsx)(Fs,{...l,children:(0,s.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:n}=this.props,{activeScene:o,activeSlide:r}=this.state,{responses:a,type:i}=t,c=(m,f)=>(0,s.jsxs)("span",{children:[m," ",(0,s.jsx)(OF,{})," ",f]},m),l=kt()(n5(n),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:v})=>fn()([[tn()("next"),Go()(c,[m,"Next Slide"])],[tn()("end"),Go()(c,[m,"End of Scenario"])],[or(),Go()(c,[m,l(v||{})])]])(f),h=i==="text"?d("Continue",t):a.map((m,f)=>d(f,m));return(0,s.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,s.jsxs)("h3",{children:["Scene ",o+1," Slide ",r+1]}),h]})}renderDialogue(t,n,o){const{description:r,id:a,hasCharacter:i}=n,c="type"in n?n.type:void 0,{count:l,firstKey:d,hasFeedback:h,slide:m,totalDialogues:f}=t,v=o===0?a:o,C=o===1?d:o-1,g=o===0&&l===1,b=o===l,x=c==="dialogue"&&(g||b),y=this.dynamicRefs.current[`dialogue-${v}`],L=b&&this.dynamicRefs.current[`dialogue-${C}`],S=y&&y.offsetHeight,T=b&&L&&L.offsetHeight,k=h?30:0,E=window.innerWidth<480?20:30,I=E*2+60+T-k,j=E+60-k,P=_ee()(S+k-60),N=Os.createRef(),{settings:R,getL10nValue:w}=this.props,A=R?.audioPosition,M=w(m.media),O=Cs(M,A),B=O.renderOrder.indexOf("audio")<O.renderOrder.indexOf("text"),D=!!M?.audio,H=h&&o===f-1,V=X()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":H,"scenario-block__dialogue--done":o<l-1,"scenario-block__dialogue--audio-top":B&&D}),G=fn()([[Oe()(g),Oe()(null)],[tn()(l),Oe()({top:`${I}px`})],[tn()(l-1),Oe()({top:`${j}px`})],[tn()(l-2),Oe()({top:`${P}px`})],[or(),Oe()({top:`-${S+30}px`})]]),_={className:V,ref:z=>{this.dynamicRefs.current[`dialogue-${v}`]=z},style:G(o)},Y={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:N,key:o,timeout:{enter:400,exit:400}},se=X()({"scenario-block__dialogue__bubble":i||c==="response","scenario-block__dialogue__pane":!i}),Z=this.props.getL10nValue(r)||"",W=c!=="response"&&!H&&D&&B&&(0,s.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),F=(0,s.jsxs)("div",{className:se,"data-scenario-focus":x?"":void 0,tabIndex:x?-1:void 0,children:[W,(0,s.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!H?this.renderDialogueWithAudioPositioning(m,Z,O):(0,s.jsx)(we,{value:Z}),(0,s.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,s.jsx)(Fs,{...Y,children:(0,s.jsx)("div",{children:(0,s.jsx)("div",{..._,children:Wa(r)&&F})})})}renderDialogues(t){const{activeScene:n,activeSlide:o,slides:r}=this.state,{id:a,responses:i}=t,c=`${n}.${o}`,l=r[c]||{},h=Be()(Uc(),Qee,_r()(l))(t),{hasFeedback:m,response:f}=l,{feedback:v}=i[f]||{},C=yt()(f)&&cs(i),g=m?h.length-1:h.length,b=(g===1&&wt()(i)||g===2&&cs(i))&&m,x={count:g,firstKey:Lt()(null,[0,"id"],h),hasFeedback:m&&Wa(v),slide:t,totalDialogues:h.length},y={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},L=(0,s.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,s.jsx)(ai,{component:"ol",role:"list",children:i.map((S,T)=>this.renderResponse(S,t,T))})})})});return(0,s.jsx)(Fs,{...y,children:(0,s.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,s.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,s.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,s.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,s.jsx)(ai,{children:h.map(this.renderDialogue.bind(this,x))})})}),C&&L,b&&this.renderButton(h[g-1])]})})},a)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:n,scenarioStartOver:o}=t,r=Be()(this.onFocus,Go()(this.onClick,["end",null])),a=X()(["scenario-block__text","scenario-block__text--end","scenario-block__content"]),i={classNames:"scenario-block__content-",nodeRef:this.endRef,timeout:{enter:0,exit:400}};return(0,s.jsx)(Fs,{...i,children:(0,s.jsx)("div",{className:a,children:(0,s.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,s.jsx)("div",{className:"scenario-block__text__title",children:(0,s.jsx)("h2",{children:n})}),(0,s.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,s.jsx)("span",{children:o}),(0,s.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,n){const{pose:o}=this.getCharacterPose(),{filters:r,id:a}=t,i=a5(t),c=Rf()(qe()("name","style")),l=c(qe()("value","left_aligned")),d=c(qe()("value","right_aligned")),h=X()("scenario-block__character__inner",{"scenario-block__character__inner--active":o===i,"scenario-block__character__inner--right":Cr()(d,r),"scenario-block__character__inner--left":Cr()(l,r)});return(0,s.jsx)("div",{className:h,"data-pose-id":a,children:(0,s.jsx)(Sn,{alt:"",src:i})},`pose-${n}-${a}`)}renderResponse({description:t},n,o){const{isPDF:r}=this.props,a=r?rte:Be()(this.onFocus,Go()(this.onResponseClick,[o,n])),i=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const b=g.getBoundingClientRect();if(v.clientX>b.right-16){v.preventDefault();return}}a(v)},c=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const b=g.getBoundingClientRect();v.clientX>b.right-16?g.classList.add("hovering-scrollbar"):g.classList.remove("hovering-scrollbar")}},l=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");g&&g.classList.remove("hovering-scrollbar")},d=X()(["scenario-block__response",`scenario-block__response--${o}`]),h=X()("scenario-block__response-item",`scenario-block__response-item--${o}`),m={appear:!0,classNames:"scenario-block__response-item-",nodeRef:this.responseItemRef,timeout:{enter:0,exit:1e3}},f=(0,s.jsx)("button",{className:d,onClick:i,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,s.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,s.jsx)("div",{className:"scenario-block__response__number",children:o+1}),(0,s.jsx)(we,{value:t}),(0,s.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,s.jsx)(Fs,{...m,children:(0,s.jsx)("li",{className:h,role:"listitem",children:f})},o)}renderText(t){const{description:n,goTo:o,hasCharacter:r,id:a,nextSlide:i}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(n)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:v}=d,C=!n&&(c||"").length<22,g=h?.audioPosition,b=m(t.media),x=Cs(b,g),y=x.renderOrder.indexOf("audio")<x.renderOrder.indexOf("text"),L=!!b?.audio,S=X()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":C,"scenario-block__text--audio-top":y&&L}),T={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},k=h?.headingLevel,E=k?`h${k}`:"h2",I=`scenario-title-${a}`,j=`scenario-description-${a}`,P=`${I} ${j}`,N=X()("scenario-block__text__inner",{"scenario-block__text__inner--end":o==="end"}),R=X()("scenario-block__text__title",{"scenario-block__text__title--end":o==="end"}),w=(0,s.jsx)("div",{className:R,"data-l10n-id":At(t.title),id:I,children:(0,s.jsx)(E,{children:c})}),A=L&&y&&(0,s.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),M=(0,s.jsx)("div",{className:"scenario-block__text__description",id:j,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,x)}),O=Be()(this.onFocus,Go()(this.onClick,[o,i])),B=(0,s.jsx)("button",{"aria-describedby":P,className:"scenario-block__text__continue",onClick:O,type:"button",children:(0,s.jsx)("span",{children:f})}),D=(0,s.jsxs)("button",{"aria-describedby":P,className:"scenario-block__text__end",onClick:O,type:"button",children:[(0,s.jsx)("span",{children:v}),(0,s.jsx)("i",{className:"icon icon-reload"})]});return(0,s.jsx)(Fs,{...T,children:(0,s.jsx)("div",{className:S,children:(0,s.jsxs)("div",{className:N,"data-scenario-focus":"",tabIndex:-1,children:[c&&w,A,n&&M,o==="end"?D:B]})},a)},a)}renderAudioMedia(t){const{blockId:n,getL10nValue:o,labels:r,lessonId:a,items:i,settings:c}=this.props,l=o(t.media),d=i?.[this.state.activeScene];return l?(0,s.jsx)(Xt,{blockId:n,index:n,item:t,labels:r,lessonId:a,lessonNumber:a,media:l,refs:`items:${n}/items:${d.id}/slides:${t.id}`,shouldPause:t.type!=="dialogue",volumeSliderPosition:c?.audioPosition==="top"?"below":"above"}):null}renderDialogueWithAudioPositioning(t,n,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,s.jsxs)(s.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(we,{value:n})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,s.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,s.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,n,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,s.jsxs)(s.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,s.jsx)("div",{children:(0,s.jsx)(we,{value:n})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,s.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,s.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,n){const{slides:o}=this.state,r=`${t}.${n}`,a={hasFeedback:!1,response:null};this.setState({slides:en()(r,a,o)})}resetSlides(){const{items:t}=this.props,n=r=>(a,i,c)=>{const{type:l,responses:d=[]}=i,h=l==="dialogue"&&d.length===0;return en()(`${r}.${c}`,{hasFeedback:h,response:null},a)},o=(r,a,i)=>kt()(Nn()([],"slides"),r5(n(i),{}),J6()(r))(a);this.setState({slides:r5(o,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:n,slides:o}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:a=[],type:i}=r[n]||{},c=`${t}.${n}`,l=en()("hasFeedback",!0),d=Hs()({[c]:l});i==="dialogue"&&wt()(a)&&(this.shouldFocus=!0,this.setState({slides:d(o)}))}shouldComponentUpdate(t,n){return t.items!==this.props.items||t.settings!==this.props.settings||n.activeScene!==this.state.activeScene||n.activeSlide!==this.state.activeSlide||n.initiated!==this.state.initiated||n.resizes!==this.state.resizes||n.slides!==this.state.slides||t.labels!==this.props.labels}}const ote=e=>{const t=ct();return(0,s.jsx)(ste,{...e,getL10nValue:t})};function rte(){}var ate=p(49860);class ite extends ate.Component{render(){const{animateBlockEntrance:t,isLearner:n,previewType:o,initiallyVisible:r}=this.props,a=!yt()(o),l={animateBlockEntrance:a,animateIn:t?"fadeIn":"none",duration:a&&t?1:0,initiallyVisible:r,isLearner:n};return(0,s.jsx)(Ae,{className:"block-scenario",children:(0,s.jsx)(Fe,{...l,children:(0,s.jsx)(ote,{...this.props})})})}}var cte=p(4594),Mu=p.n(cte);function lte(e){e&&(e.addEventListener("touchstart",Wo,!0),e.addEventListener("touchmove",Wo,!0),e.addEventListener("touchcancel",Wo,!0),e.addEventListener("touchend",Wo,!0))}function dte(e){e&&(e.removeEventListener("touchstart",Wo,!0),e.removeEventListener("touchmove",Wo,!0),e.removeEventListener("touchcancel",Wo,!0),e.removeEventListener("touchend",Wo,!0))}function Wo(e){e?.stopPropagation?.()}const Ka=$("playing-card"),i5=({id:e,isDeckTopCard:t,title:n,ref:o})=>{const[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)({x:0,y:0}),[h,m]=(0,u.useState)(!0),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(0),b=It(),x=ct(),y=nn(),L=(0,u.useRef)(null),S=(0,u.useRef)(null),T=(0,u.useRef)(void 0),k=(0,u.useRef)(void 0),E=(0,u.useRef)(!1),I=(0,u.useCallback)(()=>{const{innerWidth:D}=window,H=L.current&&L.current.scrollHeight>L.current.clientHeight,V=D<C;H&&D>C&&g(D),v(H||V)},[C]),j=(0,u.useRef)(()=>{a(!0),c(!1)}),P=(0,u.useRef)(()=>{a(!1)});(0,u.useImperativeHandle)(o,()=>({onStartSortAttempt:j.current,onEndSortAttempt:P.current})),(0,u.useEffect)(()=>{const D=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(D)},[]),(0,u.useEffect)(()=>{const D=S.current;if(!D)return;const H=()=>{a(!0),c(!1)},V=({dx:_,dy:Y})=>{d(se=>({x:se.x+_,y:se.y+Y}))},G=()=>{a(!1)};return j.current=H,P.current=G,lte(D),Ps(D).draggable({inertia:!0,autoScroll:!1,modifiers:[Ps.modifiers.snap({targets:[(_,Y)=>({x:_,y:Y})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",H).on("dragmove",V).on("dragend",G),I(),T.current=yu()(I,250),window.addEventListener("resize",T.current),()=>{dte(D),Ps(D).off("dragstart",H).off("dragmove",V).off("dragend",G),T.current&&(T.current.cancel(),window.removeEventListener("resize",T.current)),clearTimeout(k.current)}},[I]),(0,u.useEffect)(()=>{I()},[e,I]),(0,u.useEffect)(()=>{const D=E.current;E.current=r,D&&!r&&(c(!0),clearTimeout(k.current),k.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const N=y?.backgroundType===ae.ACCENT||y?.backgroundType===ae.IMAGE,R=`translate3d(${l.x}px, ${l.y}px, 0)`,w={WebkitTransform:R,transform:R},A=Ka("title",{"is-max-length":f}),M=Ka({draggable:!0,moving:r,fail:i,reset:h}),O=N?Ka("content"):Ka("content").mix("brand--border"),B=x(n)??"";return(0,s.jsxs)("div",{"aria-hidden":!t,className:M,id:e.toString(),onMouseDown:D=>{D.preventDefault()},ref:S,style:w,children:[t&&(0,s.jsx)("div",{className:"visually-hidden-always",children:`${b?.a11ySortingCurrentItem}: ${B}`}),(0,s.jsxs)(Gt,{"aria-hidden":"true",className:O,children:[(0,s.jsx)(we,{className:A,id:`card-title-${e}`,ref:L,value:n}),(0,s.jsx)("div",{className:Ka("handle")}),(0,s.jsx)("div",{className:Ka("status"),children:(0,s.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},Ou=$("restart-button");function ute({allowTabNavigation:e=!0,onClick:t,onFocus:n=mn,ref:o,text:r}){const a=Ou({}).mix("button");return(0,s.jsx)("button",{"aria-hidden":!e,className:a,"data-testid":"quiz-take-again-button",onClick:t,onFocus:n,ref:o,tabIndex:AZ(e),type:"button",children:(0,s.jsxs)("div",{className:Ou("content"),children:[(0,s.jsx)("span",{className:Ou("text").mix("brand--ui"),children:r}),(0,s.jsx)("i",{"aria-hidden":"true",className:Ou("icon").mix("icon").mix("icon-reload")})]})})}const hte=ute,wc=$("deck"),mte=e=>e?.percentViewed===100,fte=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,pte=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),gte=({count:e,items:t,id:n,onReplay:o,progress:r,ref:a})=>{const i=It(),c=(0,u.useRef)([]),l=(0,u.useRef)(null);(0,u.useImperativeHandle)(a,()=>({startKeyDrop(){c.current[0]?.onStartSortAttempt()},endKeyDrop(){c.current[0]?.onEndSortAttempt()},focusReplayButton(){l.current?.focus()}}));const d=mte(r),h=fte(r,e),m=()=>{o?.({id:n})};return(0,s.jsxs)("div",{className:wc({complete:r?.percentViewed===100}),children:[(0,s.jsx)("div",{className:wc("spacer")}),d&&(0,s.jsxs)("div",{className:wc("cardholder"),children:[(0,s.jsxs)("div",{className:wc("title").mix("brand--ui"),children:[h," ",i?.sortingCardsCorrect]}),(0,s.jsx)(hte,{allowTabNavigation:d,onClick:m,ref:l,text:i?.sortingReplay??""})]}),(0,s.jsx)("div",{className:wc("content"),children:t.map((f,v)=>(0,s.jsx)(i5,{id:f.id,isDeckTopCard:c.current[v]===c.current[0],isIncorrect:pte(f,r),ref:C=>{c.current[v]=C},title:f.title},f.id))})]})},Dr=$("pile"),vte=({id:e,lessonId:t,deckTopCard:n,nextCard:o,isComplete:r=!1,onCardDrop:a,onNavigateToNext:i,onNavigateToPrevious:c,onKeyDropStart:l,onKeyDropEnd:d,title:h,ref:m})=>{const[f,v]=(0,u.useState)(void 0),[C,g]=(0,u.useState)(!1),[b,x]=(0,u.useState)(!0),[y,L]=(0,u.useState)(!1),[S,T]=(0,u.useState)(!1),[k,E]=(0,u.useState)(0),I=(0,u.useRef)(null),j=(0,u.useRef)(null),P=(0,u.useRef)(null),N=(0,u.useRef)(void 0),R=(0,u.useRef)(void 0),w=(0,u.useRef)(void 0),A=(0,u.useRef)(void 0),M=(0,u.useRef)(void 0),O=It(),B=ct(),{announcePolite:D}=Ts(),H=(0,u.useEffectEvent)(()=>{if(r||!n)return;const K=n.id.toString(),q=n.pileId===e;a?.({id:t,itemId:K,isCorrect:q});const ee=B(n.title)??"",J=B(h)??"";if(q){clearTimeout(R.current),clearTimeout(w.current),clearTimeout(A.current),v(n),g(!0),x(!1),D(`${O?.a11ySortingCorrect}. ${ee}, ${O?.a11ySortingCategory}: ${J}`);const ne=B(o?.title)??"";ne&&(A.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${ne}`)},500)),R.current=setTimeout(()=>{v(void 0),g(!1)},1500),w.current=setTimeout(()=>{x(!0)},1300)}else clearTimeout(R.current),clearTimeout(w.current),clearTimeout(A.current),v(void 0),g(!1),x(!0),D(O?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){j.current?.focus()}}));const V=(0,u.useCallback)(()=>{const{innerWidth:K}=window,q=I.current&&I.current.scrollHeight>(I.current.offsetParent?.clientHeight??0),ee=K<k;q&&K>k&&E(K),T(q||ee)},[k]),G=(0,u.useCallback)(()=>{if(r||!n)return;l?.();const K=n.id.toString(),q=n.pileId===e;a?.({id:t,itemId:K,isCorrect:q});const ee=B(n.title)??"",J=B(h)??"";if(q){clearTimeout(R.current),clearTimeout(w.current),clearTimeout(A.current),v(n),g(!0),x(!1),D(`${O?.a11ySortingCorrect}. ${ee}, ${O?.a11ySortingCategory}: ${J}`);const ne=B(o?.title)??"";ne&&(A.current=setTimeout(()=>{D(`${O?.a11ySortingNextItem}. ${ne}`)},500)),R.current=setTimeout(()=>{v(void 0),g(!1)},1500),w.current=setTimeout(()=>{x(!0)},1300)}else clearTimeout(R.current),clearTimeout(w.current),clearTimeout(A.current),v(void 0),g(!1),x(!0),D(O?.a11ySortingIncorrect??"")},[r,n,o,e,t,O,h,B,l,a,D]),_=(0,u.useCallback)(K=>{Po(K)?gb(()=>c?.())(K):Mo(K)&&gb(()=>i?.())(K)},[c,i]),Y=(0,u.useCallback)(()=>{r||(G(),clearTimeout(M.current),M.current=setTimeout(()=>d?.(),100))},[G,d,r]),se=(0,u.useCallback)(()=>{L(!0)},[]),Z=(0,u.useCallback)(()=>{L(!1)},[]);(0,u.useEffect)(()=>{const K=P.current;if(!K)return;const q=ne=>{const oe=Ps.getElementRect(ne.target),xe={x:oe.left+oe.width/2,y:oe.top+oe.height/2};ne.draggable.draggable({snap:{targets:[xe]}})},ee=ne=>{ne.draggable.draggable({snap:{targets:[(oe,xe)=>({x:oe,y:xe})]}})},J=ne=>{ne.draggable.draggable({snap:{targets:[(oe,xe)=>({x:oe,y:xe})]}}),ne.stopPropagation?.(),ne.preventDefault?.(),H()};return Ps(K).dropzone({overlap:"pointer"}).on("dragenter",q).on("dragleave",ee).on("drop",J),V(),N.current=yu()(V,250),window.addEventListener("resize",N.current),()=>{Ps(K).off("dragenter",q).off("dragleave",ee).off("drop",J),clearTimeout(R.current),clearTimeout(w.current),clearTimeout(A.current),clearTimeout(M.current),N.current&&(N.current.cancel(),window.removeEventListener("resize",N.current))}},[]);const W=X()(Dr(),{"drop-success":C,complete:r}),F=X()(Dr("content"),{"drop-animating":!b&&!y}),z=Dr("title",{"is-max-length":S}),Q=B(h)??O?.a11ySortingCategories??"Categories";return(0,s.jsx)("div",{className:W,ref:P,children:(0,s.jsx)("div",{className:Dr("wrapwrap"),children:(0,s.jsxs)(Gt,{className:Dr("wrap"),overrideBackground:!0,children:[(0,s.jsx)("div",{"aria-hidden":"true",className:Dr("message"),children:(0,s.jsx)(we,{className:z,ref:I,value:h})}),(0,s.jsx)("button",{"aria-disabled":r,"aria-label":Q,className:F,disabled:r,onBlur:Z,onClick:Y,onFocus:se,onKeyDown:_,ref:j,type:"button",children:f&&(0,s.jsx)(i5,{id:f.id,title:f.title})}),(0,s.jsx)("div",{className:Dr("background")})]})})})},wp=$("sorting"),Cte=(e,t)=>!t||!t.items?e:e.filter(n=>!t.items?.[n.id]?.isViewed),xte=({id:e,items:t,piles:n,onCardDrop:o,onReplay:r,progress:a})=>{const[i,c]=(0,u.useState)(()=>Mu()(t)),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)([]),m=(0,u.useRef)(null),f=(0,u.useRef)(a?.retryAttempts),v=(0,u.useRef)(a?.percentViewed),C=(0,u.useRef)(void 0),g=(0,u.useRef)(void 0),b=(0,u.useRef)(void 0),x=It(),y=ct(),{announcePolite:L}=Ts(),S=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),T=(0,u.useEffectEvent)(()=>{const R=a?.correctlyAnswered??0,w=t.length;L(`${R} ${x?.a11ySortingCompleteOf} ${w} ${x?.a11ySortingComplete}`)}),k=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const R=w=>{const{blockId:A,cardId:M}=xa(w.detail.path,["block","card"]);e!==A||!M||c(O=>{const B=O.find(H=>H.id===M),D=O.filter(H=>H.id!==M);return B?[B,...D]:O})};return window.addEventListener(We,R),()=>{window.removeEventListener(We,R)}},[e]),(0,u.useEffect)(()=>{const R=a?.retryAttempts,w=f.current;return R!==w?(f.current=R,c(Mu()(t)),clearTimeout(C.current),C.current=setTimeout(()=>{S()},100)):c(A=>{const M=t.filter(D=>!A.find(H=>H.id===D.id));return[...A.filter(D=>t.find(H=>H.id===D.id)).map(D=>{const H=t.find(V=>V.id===D.id);return H?{...D,...H}:D}),...M]}),()=>{clearTimeout(C.current)}},[t,a?.retryAttempts]),(0,u.useEffect)(()=>{const R=a?.percentViewed,w=v.current;return R===100&&w!==100&&(d(!0),clearTimeout(g.current),g.current=setTimeout(()=>{T()},500),clearTimeout(b.current),b.current=setTimeout(()=>{k()},100)),R!==100&&w===100&&d(!1),v.current=R,()=>{clearTimeout(g.current),clearTimeout(b.current)}},[L,a?.correctlyAnswered,a?.percentViewed,t.length]);const E=Cte(i,a),I=x?.sortingLandmark??"",j=E?.[0],P=j?y(j.title)??"":"",N=l?x?.a11ySortingCategoriesComplete:P?`${x?.a11ySortingCategories}. ${P}`:x?.a11ySortingCategories;return(0,s.jsxs)("div",{"aria-label":I,className:wp(),role:"group",children:[(0,s.jsx)("div",{className:wp("row"),children:(0,s.jsx)(gte,{count:i.length,id:e,items:E,onReplay:r,progress:a,ref:m})}),(0,s.jsx)("ul",{"aria-label":N,className:wp("row"),role:"list",children:n.map((R,w)=>(0,s.jsx)("li",{role:"listitem",children:(0,s.jsx)(vte,{deckTopCard:E?.[0],id:R.id,isComplete:l,lessonId:e,nextCard:E?.[1],onCardDrop:o,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>RZ({list:h.current,currentIndex:w}),onNavigateToPrevious:()=>PZ({list:h.current,currentIndex:w}),ref:A=>{h.current[w]=A},title:R.title})},R.id))})]})},c5=()=>()=>{},bte=e=>{const{animateBlockEntrance:t,blockId:n,initiallyVisible:o,items:r,onCardDrop:a=c5,onReplay:i=c5,piles:c,progress:l}=e;return(0,s.jsx)(Ae,{type:"sorting-activity",children:(0,s.jsx)(Fe,{animateBlockEntrance:t,initiallyVisible:o,isLearner:!0,children:(0,s.jsx)(xte,{id:n,items:r,onCardDrop:a(e),onReplay:i(e),piles:c,progress:Lt()({},["items",n],l)})})})};class yte extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1,prevScope:t.scope}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}static getDerivedStateFromProps(t,n){return n.prevScope!==t.scope?{hasError:!1,error:void 0,prevScope:t.scope}:n}componentDidCatch(t){Vs.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:o}=this.props;return t||n?(0,s.jsx)(o,{}):this.props.children}}const l5=yte,Ste=[{name:"Abkhazian",code:"ab"},{name:"Afar",code:"aa"},{name:"Afrikaans",code:"af"},{name:"Akan",code:"ak"},{name:"Albanian",code:"sq"},{name:"American Sign Language",code:"sgn-us"},{name:"Amharic",code:"am"},{name:"Arabic",code:"ar"},{name:"Aramaic",code:"sam"},{name:"Armenian",code:"hy"},{name:"Assamese",code:"as"},{name:"Aymara",code:"ay"},{name:"Azerbaijani",code:"az"},{name:"Bangla",code:"bn"},{name:"Bashkir",code:"ba"},{name:"Basque",code:"eu"},{name:"Belarusian",code:"be"},{name:"Bhojpuri",code:"bho"},{name:"Bislama",code:"bi"},{name:"Bosnian",code:"bs"},{name:"Breton",code:"br"},{name:"Bulgarian",code:"bg"},{name:"Burmese",code:"my"},{name:"Cantonese (Hong Kong)",code:"yue"},{name:"Catalan",code:"ca"},{name:"Cherokee",code:"chr"},{name:"Chinese",code:"zh"},{name:"Chinese (China)",code:"zh-cn"},{name:"Chinese (Hong Kong)",code:"zh-hk"},{name:"Chinese (Simplified)",code:"zh-hans"},{name:"Chinese (Singapore)",code:"zh-sg"},{name:"Chinese (Taiwan)",code:"zh-tw"},{name:"Chinese (Traditional)",code:"zh-hant"},{name:"Choctaw",code:"cho"},{name:"Corsican",code:"co"},{name:"Croatian",code:"hr"},{name:"Czech",code:"cs"},{name:"Danish",code:"da"},{name:"Dutch",code:"nl"},{name:"Dutch (Belgium)",code:"nl-be"},{name:"Dutch (Netherlands)",code:"nl-nl"},{name:"Dzongkha",code:"dz"},{name:"English",code:"en"},{name:"English (Canada)",code:"en-ca"},{name:"English (Ireland)",code:"en-ie"},{name:"English (United Kingdom)",code:"en-gb"},{name:"English (United States)",code:"en-us"},{name:"Esperanto",code:"eo"},{name:"Estonian",code:"et"},{name:"Faroese",code:"fo"},{name:"Fijian",code:"fj"},{name:"Filipino",code:"fil"},{name:"Finnish",code:"fi"},{name:"French",code:"fr"},{name:"French (Belgium)",code:"fr-be"},{name:"French (Canada)",code:"fr-ca"},{name:"French (France)",code:"fr-fr"},{name:"French (Switzerland)",code:"fr-ch"},{name:"Fulah",code:"ff"},{name:"Galician",code:"gl"},{name:"Georgian",code:"ka"},{name:"German",code:"de"},{name:"German (Austria)",code:"de-at"},{name:"German (Germany)",code:"de-de"},{name:"German (Switzerland)",code:"de-ch"},{name:"Greek",code:"el"},{name:"Guarani",code:"gn"},{name:"Gujarati",code:"gu"},{name:"Haitian Creole",code:"ht"},{name:"Hakka Chinese",code:"hak"},{name:"Hakka Chinese (Taiwan)",code:"htia"},{name:"Hausa",code:"ha"},{name:"Hebrew",code:"he"},{name:"Hindi",code:"hi"},{name:"Hungarian",code:"hu"},{name:"Icelandic",code:"is"},{name:"Igbo",code:"ig"},{name:"Indonesian",code:"id"},{name:"Interlingua",code:"ia"},{name:"Interlingue",code:"ie"},{name:"Inuktitut",code:"iu"},{name:"Inupiaq",code:"ipk"},{name:"Irish",code:"ga"},{name:"Italian",code:"it"},{name:"Japanese",code:"ja"},{name:"Javanese",code:"jv"},{name:"Kalaallisut",code:"kl"},{name:"Kannada",code:"kn"},{name:"Kashmiri",code:"ks"},{name:"Kazakh",code:"kk"},{name:"Khmer",code:"km"},{name:"Kinyarwanda",code:"rw"},{name:"Klingon",code:"tlh"},{name:"Korean",code:"ko"},{name:"Kurdish",code:"ku"},{name:"Kyrgyz",code:"ky"},{name:"Lao",code:"lo"},{name:"Latin",code:"la"},{name:"Latvian",code:"lv"},{name:"Lingala",code:"ln"},{name:"Lithuanian",code:"lt"},{name:"Luxembourgish",code:"lb"},{name:"Macedonian",code:"mk"},{name:"Malagasy",code:"mg"},{name:"Malay",code:"ms"},{name:"Malayalam",code:"ml"},{name:"Maltese",code:"mt"},{name:"Manipuri",code:"mni"},{name:"Maori",code:"mi"},{name:"Marathi",code:"mr"},{name:"Masai",code:"mas"},{name:"Min Nan Chinese",code:"nan"},{name:"Min Nan Chinese (Taiwan)",code:"nan-tw"},{name:"Mizo",code:"lus"},{name:"Mongolian",code:"mn"},{name:"Nauru",code:"na"},{name:"Navajo",code:"nv"},{name:"Nepali",code:"ne"},{name:"Norwegian",code:"no"},{name:"Norwegian Bokm\xE5l",code:"nb"},{name:"Nyanja",code:"ny"},{name:"Occitan",code:"oc"},{name:"Odia",code:"or"},{name:"Oromo",code:"om"},{name:"Pashto",code:"ps"},{name:"Persian",code:"fa"},{name:"Persian (Afghanistan)",code:"fa-af"},{name:"Persian (Farsi)",code:"fa-ir"},{name:"Persian (Iran)",code:"pes"},{name:"Polish",code:"pl"},{name:"Portuguese",code:"pt"},{name:"Portuguese (Brazil)",code:"pt-br"},{name:"Portuguese (Portugal)",code:"pt-pt"},{name:"Punjabi",code:"pa"},{name:"Quechua",code:"qu"},{name:"Romanian",code:"ro"},{name:"Romansh",code:"rm"},{name:"Rundi",code:"rn"},{name:"Russian",code:"ru"},{name:"Samoan",code:"sm"},{name:"Sango",code:"sg"},{name:"Sanskrit",code:"sa"},{name:"Sardinian",code:"sc"},{name:"Scottish Gaelic",code:"gd"},{name:"Serbian",code:"sr"},{name:"Serbian (Cyrillic)",code:"sr-ba"},{name:"Serbian (Latin)",code:"sr-sp"},{name:"Sherdukpen",code:"sdp"},{name:"Shona",code:"sn"},{name:"Sicilian",code:"scn"},{name:"Sindhi",code:"sd"},{name:"Sinhala",code:"si"},{name:"Slovak",code:"sk"},{name:"Slovenian",code:"sl"},{name:"Somali",code:"so"},{name:"Southern Sotho",code:"st"},{name:"Spanish",code:"es"},{name:"Spanish (Latin America)",code:"es-419"},{name:"Spanish (Mexico)",code:"es-mx"},{name:"Spanish (Spain)",code:"es-es"},{name:"Spanish (United States)",code:"es-us"},{name:"Sundanese",code:"su"},{name:"Swahili",code:"sw"},{name:"Swati",code:"ss"},{name:"Swedish",code:"sv"},{name:"Tagalog",code:"tl"},{name:"Tajik",code:"tg"},{name:"Tamil",code:"ta"},{name:"Tatar",code:"tt"},{name:"Telugu",code:"te"},{name:"Tetum",code:"tet"},{name:"Thai",code:"th"},{name:"Tibetan",code:"bo"},{name:"Tigrinya",code:"ti"},{name:"Tongan",code:"to"},{name:"Tsonga",code:"ts"},{name:"Tswana",code:"tn"},{name:"Turkish",code:"tr"},{name:"Ukrainian",code:"uk"},{name:"Urdu",code:"ur"},{name:"Uzbek",code:"uz"},{name:"Vietnamese",code:"vi"},{name:"Volap\xFCk",code:"vo"},{name:"Voro",code:"vor"},{name:"Welsh",code:"cy"},{name:"Western Frisian",code:"fy"},{name:"Wolof",code:"wo"},{name:"Xhosa",code:"xh"},{name:"Yiddish",code:"yi"},{name:"Yoruba",code:"yo"},{name:"Zulu",code:"zu"}],Lte=(0,u.lazy)(()=>p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23))),Tte={subscribe(e,t){const n=`mondrian:${e}`,o=()=>{Le.isPlaying&&Le.playerId!==n&&t()};return Le.addChangeListener(o),()=>{Le.removeChangeListener(o)}},play(e){const t=`mondrian:${e}`;Le.playerId=t,Le.isPlaying=!0}};function kte(e){const t={};return e.backgroundType==="IMAGE"&&(t["--color-background"]="transparent"),t.maxWidth=(e.contentWidth??9999)+"rem",t.minWidth="0",t.margin="0 auto",t.width="100%",t}function Ite({blockumentId:e,manifest:t}){let n=920,o=600;try{const r=t.blockuments?.[e];if(r){const a=t.items?.[r.children[0]?.id];if(a){const i=a.states[a.initialState];if(i){const c=i.width.value,l=i.height.value;typeof c=="number"&&typeof l=="number"&&(n=c,o=l)}}}}catch{}return(0,s.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:o,width:n})}function Ete({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:n,isLearner:o=!1,settings:r,onStep:a,onTranscriptClose:i,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=He(),f=m.mondrian,v=Lh(),C={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:Un},{currentLocale:g}=tt(),b=Fn(),x=tD(),y=(0,u.useMemo)(()=>({active:g,source:b}),[g,b]),L=(0,u.useCallback)(j=>h?.audioPlayerIdOpen===vs({refs:`items:${n}/items:${j}`}),[n,h?.audioPlayerIdOpen]),S=(0,u.useCallback)(({refocusTarget:j,itemId:P,transcript:N})=>{L(P)?i?.():c?.({audioPlayerId:vs({refs:`items:${n}/items:${P}`}),focusing:!0,refocusTarget:j,transcriptMedia:{mondrianTranscript:N}})},[n,L,i,c]),T=(0,u.useCallback)(({itemId:j,transcript:P})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:vs({refs:`items:${n}/items:${j}`}),transcriptMedia:{mondrianTranscript:P}})},[n,l,h]),k=(0,u.useCallback)(j=>{l?.({audioPlayerId:vs({refs:`items:${n}/items:${j}`}),focusing:!0})},[n,l]),E=(0,u.useMemo)(()=>({isPanelOpenForItem:L,focusPanel:k,togglePanel:S,updateTranscript:T}),[k,L,S,T]),I=(0,u.useCallback)(j=>{if(a)for(const P of Object.values(j))P.progress>=100&&a({id:P.itemId})},[a]);return(0,s.jsx)(Ae,{children:(0,s.jsx)(l5,{FallbackComponent:wte,children:(0,s.jsx)(Fe,{animateBlockEntrance:e,initiallyVisible:t,isLearner:o,children:(0,s.jsx)("div",{style:kte(r),children:(0,s.jsx)(u.Suspense,{fallback:(0,s.jsx)(Ite,{blockumentId:n,manifest:f}),children:(0,s.jsx)(Lte,{blockumentId:n,hoveredItemPath:x.translationHoveredPath,labels:d,languages:Ste,linkRenderConfig:C,locale:y,manifest:f,mediaStoreAdapter:Tte,onMediaProgress:I,runtimeInterface:window.Runtime,searchTerm:v?.term,transcriptPanelAdapter:E})})})})})})}const Nte=(0,u.memo)(Ete,jte);function jte(e,t){return e.blockumentId===t.blockumentId&&e.settings.backgroundType===t.settings.backgroundType&&e.settings.contentWidth===t.settings.contentWidth&&e.labels===t.labels&&e.transcriptPanelState?.audioPlayerIdOpen===t.transcriptPanelState?.audioPlayerIdOpen}function wte(){return null}const Ate=$("block-ai-scenario"),Rte=(0,u.lazy)(()=>p.e("webpack_container_remote_ai_scenario_learner-player-react").then(p.t.bind(p,58812,23)));function Pte({scenarioId:e,onExit:t}){const{currentLocale:n}=tt(),o=Fn(),r=He(),a=(0,u.useMemo)(()=>({active:n,source:o}),[n,o]),i=r?.aiScenarios,c=e&&d5(i)?i[e]:void 0,l=d5(c)?c:void 0;return(0,s.jsx)(Ae,{className:Ate("wrapper"),children:(0,s.jsx)(l5,{FallbackComponent:Ote,children:(0,s.jsx)(u.Suspense,{children:(0,s.jsx)(Rte,{l10n:l?.l10n,locale:a,locales:l?.locales,onExit:t,scenario:l?.data,source:l?.source,sourceLocale:l?.sourceLocale})})})})}const Mte=(0,u.memo)(Pte);function d5(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ote(){return null}var u5=p(67750),nt=p(49860);const Dt=$("block-code"),Bte=`${Ne("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function h5(e,t){const n=m5(u5.parse(e.data));for(const o of n)if(o.type==="notification")t[o.method]?.(o.params);else throw new Error(`Unsupported RPC type "${o.type}"`)}function*m5(e){if(Array.isArray(e))for(const t of e)yield*m5(t);else yield e}function f5(e,t,n){return nt.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",a=>{a.origin===window.origin&&t!=null&&e.current&&a.source===e.current.contentWindow&&h5(a,t)},{signal:r.signal}),()=>r.abort()},[t,e]),nt.useCallback(r=>{e.current?.contentWindow?.postMessage(r,n)},[e,n])}const Dte=(e,t,n)=>f5(e,n,window.origin),Fte=(e,t,n)=>f5(e,n,"*"),Hte=(e,t,n)=>{const[o,r]=nt.useState(()=>new BroadcastChannel(t));return nt.useEffect(()=>()=>o.close(),[o]),nt.useEffect(()=>{o.name!==t&&r(new BroadcastChannel(t))},[o,t]),nt.useEffect(()=>{const i=new AbortController;return o.addEventListener("message",c=>h5(c,n),{signal:i.signal}),()=>i.abort()},[o,n]),nt.useCallback(i=>{o.postMessage(i)},[o])},$te=ii()?Ys.isLocalFilesystem?Fte:Hte:Dte,Vte=window.location.origin==="";function zte(e){let t=Vte?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function _te(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const Ute={0:"small",1:"medium",2:"full"};function Gte({editBlock:e,errors:t,isDragPreview:n,isLearn:o,isSidebarPreview:r,items:a,labels:i,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=nt.useRef(null),C=He()?.htmlBlocksDisabled,g=n||r||!!h,[b]=a,x=Me(b.srcdoc),y=Me(b.media),L=y?.sandbox?.src==null?void 0:`${y.sandbox.src}/index.html`,S=m?.autoResize===!0,T=m?.width??"0",[k,E]=nt.useState("-1px");nt.useEffect(()=>{S||E(_te(m?.height))},[S,m?.height]);const[I,j]=nt.useState(0),[P,N]=nt.useState(!1),[R,w]=nt.useState(!1),[A]=nt.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),M=zte(A),O=nt.useCallback(()=>{d?.({id:b.id})},[b.id,d]),B=nt.useCallback(({message:W})=>{l?.({message:W}),w(!0),console.error("Sandbox Error",W)},[l,w]),D=nt.useCallback(()=>{c?.(),w(!1),j(W=>W+1)},[c]),H=nt.useCallback(()=>{N(I>0)},[I]),V=nt.useCallback(({height:W})=>{S&&E(`${W}px`)},[S]),G=nt.useMemo(()=>({oncomplete:O,onerror:B,onload:H,onready:D,onresize:V}),[O,B,D,H,V]),_=$te(f,A,G),Y=nt.useCallback((W,F)=>{if(f==null&&I===0)throw new Error("Attempted to send message to sandbox before it is ready");const z=u5.format.notification(W,F);_(z)},[I,f,_]),se=nt.useCallback(()=>{window.location.reload()},[]),Z=nt.useCallback(()=>{e?.()},[e]);return nt.useEffect(()=>{I&&Y("onupdate",{autoResize:S,src:L,srcDoc:x})},[S,I,Y,L,x]),o&&t!=null||R?(0,s.jsx)(Ae,{children:(0,s.jsxs)("div",{className:Dt("error-general",{learn:o}),children:[(0,s.jsx)("div",{className:Dt("error-message"),children:"Something went wrong"}),(0,s.jsx)("div",{className:Dt("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,s.jsx)("button",{className:Dt("error-button"),onClick:se,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,s.jsx)(Ae,{children:t[404]?(0,s.jsxs)("div",{className:Dt("error-404"),children:[(0,s.jsx)("div",{className:Dt("error-message"),children:"We couldn\u2019t find your file"}),(0,s.jsx)("div",{className:Dt("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,s.jsx)("button",{className:Dt("error-button"),onClick:Z,type:"button",children:"Retry upload"})]}):(0,s.jsxs)("div",{className:Dt("error-general"),children:[(0,s.jsx)("div",{className:Dt("error-message"),children:"Something went wrong"}),(0,s.jsxs)("div",{className:Dt("error-message-subtitle"),children:["Try refreshing the page or entering your code again. If the issue isn't fixed,"," ",(0,s.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,s.jsx)("button",{className:Dt("error-button"),onClick:se,type:"button",children:"Refresh page"})]})}):C&&!g?(0,s.jsx)(Ae,{children:(0,s.jsx)("div",{className:Dt("restricted"),children:(0,s.jsxs)("div",{className:Dt("restricted-card"),children:[(0,s.jsx)(Bf,{alt:"",className:Dt("restricted-icon"),src:Bte}),(0,s.jsx)("div",{className:Dt("restricted-title"),children:"Subscribe to unlock full access"}),(0,s.jsx)("div",{className:Dt("restricted-message"),children:"To protect learners from phishing, scams, or malicious redirects, code blocks are disabled when sharing with Quick Share during your trial."})]})})}):(0,s.jsx)(Ae,{children:(0,s.jsx)("iframe",{allow:"fullscreen",className:Dt({"auto-resize":S,loaded:g||P,width:Ute[T]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:S?"no":void 0,src:M,style:{"--block-html-height":k},title:i?.a11yBlockCode},A)})}const Ko=$("timeline-card"),Wte=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Me(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,b=d==="video"&&f.video;if(!v&&!C&&!g&&!b&&!(d==="image-with-audio"&&r))return;const y=f.embed?Mr(f.embed):void 0,L=!!f.image,S=!!f.audio,T=L?f.image.align:"center",k=Ko("media",{audio:S&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${T}`]:r&&!!T,"audio-on-bottom":S&&!r&&h==="bottom",linkEmbed:y==="link",videoEmbed:y==="video",visual:!r&&L||!yt()(f.video)}),E=m||{};return(0,s.jsx)("div",{className:k,children:(0,s.jsx)(Xt,{blockId:t,enableVideoPlaybackSpeed:o,index:`${a.id}`,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...E}})})},Kte=e=>{const{headingLevel:t,innerRef:n,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c}=e,{id:l}=o,d=Ko({active:r}),h=!!o.date,m=!!o.title,f=t||2,v=`h${f}`,C=`h${f+1}`,g=Me(o.media)??{},b=Cs(g,i,!0,"timeline"),x=()=>{if(!g||!a)return null;const y={audio:{item:{...o,media:b.audioOnlyMedia||g},mediaType:"audio"},image:{item:{...o,media:b.imageOnlyMedia||g},mediaType:"image"},video:{item:{...o,media:b.videoOnlyMedia||g},mediaType:"video"},embed:{item:{...o,media:b.embedOnlyMedia||g},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,s.jsx)(s.Fragment,{children:b.renderOrder.map((L,S)=>{if(L==="text")return(0,s.jsx)(we,{className:Ko("description"),value:o.description},`text-${S}`);const T=y[L];return T?(0,u.createElement)(Wte,{...e,...T,key:`${L}-${S}`}):null})})};return(0,s.jsx)("div",{className:d,"data-id":l,ref:n,children:(0,s.jsx)(Gt,{className:Ko("body"),onFocus:c,children:(0,s.jsx)("div",{className:Ko("main-wrap"),children:(0,s.jsxs)("div",{className:Ko("main"),children:[h&&(0,s.jsx)("div",{className:Ko("date"),children:(0,s.jsx)(v,{children:(0,s.jsx)(Cn,{value:o.date})})}),m&&(0,s.jsx)("div",{className:Ko("title"),children:(0,s.jsx)(C,{children:(0,s.jsx)(Cn,{value:o.title})})}),x()]})})})})},Ac=$("timeline"),Qte=e=>{const{audioPosition:t,disableZoom:n,enableVideoPlaybackSpeed:o,headingLevel:r,id:a,initiallyVisible:i,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,v=(0,s.jsx)(Kte,{audioPosition:t,blockId:a,disableZoom:n,enableVideoPlaybackSpeed:o,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:a,loadMedia:!0,onFocus:f});return c?l?(0,s.jsx)(Fe,{animateBlockEntrance:!0,className:Ac("animate").toString(),initiallyVisible:i,isLearner:!0,children:v}):v:null},Yte=e=>{const{id:t,items:n,labels:o,onEnter:r=Function.prototype,settings:a={}}=e,i=(0,u.useRef)(null),c=(0,u.useCallback)((l,d)=>{r({id:t,payload:{activeIndex:l,itemId:d}})},[t,r]);return(0,u.useEffect)(()=>{function l(d){const{blockId:h,cardId:m}=xa(d.detail.path,["block","card"]);if(h!==t)return;const f=i.current.querySelector(`[data-id="${m}"]`);f&&!Gm(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(We,l),()=>{window.removeEventListener(We,l)}}),(0,s.jsx)("div",{"aria-label":o?.a11yBlockTimeline,className:"page__content-container",ref:i,role:"group",children:(0,s.jsx)("div",{className:Ac("wrapper"),children:(0,s.jsx)("div",{className:Ac(),children:(0,s.jsx)("ul",{className:Ac("container"),role:"list",children:n.map((l,d)=>(0,s.jsx)("li",{className:Ac("card-wrapper"),role:"listitem",children:Qte({index:d,item:l,onFocus:c,...e,disableZoom:!a.zoomOnClick,headingLevel:a.headingLevel,audioPosition:a.audioPosition})},d))})})})})},Zte=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,settings:l})=>(0,s.jsx)(Fe,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:o,isLearner:r,children:(0,s.jsx)(Ae,{type:"timeline",children:(0,s.jsx)(Yte,{enableVideoPlaybackSpeed:n,id:t,initiallyVisible:o,isBlock:!0,isLearner:r,items:a,labels:i,lessonId:c,settings:l})})}),Qo=$("block-sequence"),Xte=({label:e})=>(0,s.jsx)("span",{className:Qo("indicator-label"),children:Me(e)??""}),qte=e=>(0,s.jsx)(Xte,{label:e.label}),Jte=e=>(0,s.jsx)(we,{className:Qo("description").toString(),value:e.description}),ene=e=>{const{color:t,defaultBackgroundColor:n,items:o,renderDescription:r=Jte,renderLabel:a=qte,variant:i}=e,c=t?{"--block-sequence-color":t,"--block-sequence-on-color":Dn(t)===ke.LIGHT?"#fff":"#000"}:void 0;return(0,s.jsx)(Ae,{className:Qo({[i]:!0}).toString(),defaultBackgroundColor:n,style:c,children:(0,s.jsx)("div",{className:Qo("container"),children:(0,s.jsx)("ol",{className:Qo("list"),"data-step-count":o.length,children:o.map((l,d)=>(0,s.jsxs)("li",{className:Qo("step"),"data-step-id":l.id,children:[(0,s.jsx)("div",{className:Qo("indicator"),children:a(l,d)}),(0,s.jsx)("div",{className:Qo("text"),children:r(l,d)})]},l.id))})})})},Bs=$("block-team"),tne=e=>(0,s.jsx)(we,{className:Bs("name").toString(),value:e.name}),nne=e=>(0,s.jsx)(we,{className:Bs("role").toString(),value:e.description}),sne=({item:e,index:t,renderName:n,renderDescription:o})=>{const r=e.avatar?.image,a=Ah(r);return(0,s.jsxs)("li",{className:Bs("card"),children:[(0,s.jsx)("div",{className:Bs("avatar-wrap"),children:a?(0,s.jsx)(Sn,{alt:To(r?.alt),className:Bs("avatar").toString(),src:a}):(0,s.jsx)("div",{className:Bs("avatar",{placeholder:!0}).toString()})}),(0,s.jsxs)("div",{className:Bs("body"),children:[n(e,t),o(e,t)]})]})},one=e=>{const{defaultBackgroundColor:t,items:n,renderName:o=tne,renderDescription:r=nne}=e;return(0,s.jsx)(Ae,{className:Bs().toString(),defaultBackgroundColor:t,children:(0,s.jsx)("div",{className:Bs("container"),children:(0,s.jsx)("ul",{className:Bs("list"),"data-count":n.length,children:n.map((a,i)=>(0,s.jsx)(sne,{index:i,item:a,renderDescription:r,renderName:o},a.id))})})})},rne=e=>(0,s.jsx)("div",{className:"unsupported-block",...e,children:(0,s.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,s.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})});var In=p(30467),ane=p(28565),p5=p(84748),ine=p(94556),g5=p.n(ine);const r1e=(e,t)=>n=>{const o=n.findIndex(a=>a.id==t);if(o===-1)return n;const r=n.slice();return r[o]=e(n[o]),r},a1e=e=>t=>t.filter(n=>n.id!=e),i1e=(e,t)=>n=>{const o=n.slice(),[r]=o.splice(e,1);return o.splice(t,0,r),o};function cne(e,t){const n=[];for(const o of t)if(n.push(o),e(o))break;return n}const lne=e=>e.some(t=>t<0),v5=e=>Array.from(Array(e)),C5=(e,t)=>v5(t).map(()=>e),dne=(e,t,n,o)=>v5(n).map((r,a)=>a===o?t:e),c1e=(e,t,n)=>n.some(o=>o[e]==t);function l1e(e,t,n){if(t>=n.length)return n.slice(0);const o=Math.floor(t/2),r=Math.ceil(t/2),a=e-o,i=e+r;return i>n.length?n.slice(n.length-t):a>=0?n.slice(a,i):n.slice(0,t)}const Bu=(e,t)=>{const n=Math.min(e.length,t.length),o=new Array(n);for(let r=0;r<n;r++)o[r]=[e[r],t[r]];return o};var x5=p(93773);const une=matchMedia("(forced-colors: active)");function Rc(){return une.matches}const hne=({activeIndex:e,values:t,opts:n})=>{const{background:o,variant:r}=Pt(),{chartColor:a,lineCurve:i}=nn(),c=vn(),l=Ii(),d=n?.defaultFontColor,h=Vn(),m=h===ae.IMAGE,v=Me(o?.media)?.image?.overlayColor??it.DARK,C=Rc();let g=a??l,b=c||"#fff";!a&&h===ae.ACCENT||a===b?g=d:m&&(g=v===it.DARK?"#fff":"#000",b=v===it.DARK?"#000":"#fff"),C&&(g="Highlight",b="Canvas");let x=g,y=Array(t.length).fill(g);if(e!=null&&!C){const L=m&&v===it.LIGHT?.2:.7,S=(0,x5.A)(g,b,L);x=S,y=dne(S,g,t.length,e)}return r==="bar"?{backgroundColor:y,data:t,hoverBackgroundColor:y}:{borderColor:x,cubicInterpolationMode:i==="linear"?"default":"monotone",data:t,lineTension:i==="linear"?0:void 0,pointBackgroundColor:y,pointBorderColor:y,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:g,pointHoverBorderColor:g,pointHoverBorderWidth:0,pointRadius:4}};function mne({activeIndex:e,children:t,opts:n,values:o}){const r=hne({activeIndex:e,opts:n,values:o});return t(r)}class fne extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:n,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=X()("block-chart__cartesianLegendItem",{"block-chart__cartesianLegendItem--unfocused":i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,s.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${n}.`}),(0,s.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,s.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,s.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:a})]})]})}}const pne=fne,gne=({activeIndex:e,labels:t,letters:n,onEvent:o,values:r})=>{const a=Bu(n,Bu(t,r));return a.length===0?null:(0,s.jsx)("dl",{className:"block-chart__cartesianLegend",children:a.map(([i,[c,l]],d)=>(0,s.jsx)(pne,{activeIndex:e,identifier:i,index:d,label:c,onEvent:o,value:l},i))})},vne=(0,u.memo)(gne);function Cne(e){const t=this.getLabelForValue(e),n=15,o=t.split(" "),r=[];let a="";return o.forEach(i=>{(a+i).length>n?(r.push(a),a=i):a+=(a.length>0?" ":"")+i}),r.push(a),r}const xne={animation:{},barPercentage:.5,defaultFontFamily:'"lato", sans-serif',elements:{arc:{},bar:{},line:{borderWidth:2,fill:!1}},layout:{padding:{bottom:0,left:0,right:0,top:50}},maxBarThickness:60,plugins:{datalabels:{display:!1},legend:{display:!1,labels:{}},tooltip:{animation:!0,boxPadding:"14px 10px",callbacks:{label:()=>null,title:e=>{const{label:t,formattedValue:n}=e[0];return`${t}: ${n}`}},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom"}},responsive:!1,scales:{x:{border:{display:!1},grid:{display:!1,offset:!0},offset:!0,ticks:{autoSkip:!1,callback:Cne,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function bne({values:e,contrastColor:t}){const n=Pt(),o=Vn(),r=o===ae.IMAGE,a=(0,u.useMemo)(()=>lne(e),[e]);let i,c;const d=Me(n?.background?.media)?.image?.overlayColor??it.DARK,h=r&&d===it.LIGHT;switch(o){case ae.LIGHT:case ae.GRAY:case ae.TINT:[i,c]=["#e1e1e1","#c9c9c9"];break;case ae.DARK:case ae.BLACK:case ae.IMAGE:[i,c]=["#ffffff80","#ffffffe9"];break;case ae.ACCENT:case ae.COLOR:{[i,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([i,c]=["#00000080","#0000001a"]),a||(c=i),[i,c]}const yne=({onEvent:e,reduceMotion:t,shouldAnimate:n,values:o})=>{const r=vn(),{customBackgroundColorContrast:a}=nn(),i=He(),c=ks(),l=Ii(),d=i?.theme?.accentContrast,h=Vn(),m=h===ae.IMAGE,f=Pt(),v=Rc(),C=Dn(r),g=!a&&f?.family==="chart",b=a??ke.DARK,x=g?C:b,L=Me(f?.background?.media)?.image?.overlayColor??it.DARK,S=m&&L===it.LIGHT,T=h===ae.ACCENT||h===ae.COLOR,k=h===ae.ACCENT?l:r,E=h===ae.ACCENT?d:x,I=zt({backgroundColor:k,contrast:E}),[j,P]=bne({values:o,contrastColor:I}),N=(0,u.useCallback)(w=>v&&m?S?"#000000":"#FFFFFF":w.tick.value===0?P:j,[j,v,P,m,S]);return(0,u.useMemo)(()=>{let w="#000";if(v)m?w=S?"#000000":"#FFFFFF":w="FieldText";else{switch(h){case ae.DARK:case ae.BLACK:case ae.IMAGE:w="#fff";break}T&&(w=I),m&&S&&(w="#000")}const A=n&&!t?1e3:0;let M,O;v?m?(M=w,O=S?"#FFFFFF":"#000000"):(M="Highlight",O="HighlightText"):(M=w,O=w==="#000"||w==="#000000"||w===ke.DARK?"#FFFFFF":"#000000");const B=Z0()(xne);return B.maintainAspectRatio=!c,B.animation.duration=A,B.defaultFontColor=w,B.onClick=e,B.onHover=e,B.plugins.tooltip.animation=!t,B.plugins.tooltip.backgroundColor=M,B.plugins.tooltip.titleColor=O,v&&!m?(B.scales.x.grid.color="FieldText",B.scales.y.grid.color="FieldText"):(B.scales.x.grid.color=j,B.scales.y.grid.color=N),B.scales.x.ticks.color=w,B.scales.y.ticks.color=w,v&&(m?B.plugins.legend.labels.color=S?"#000000":"#FFFFFF":B.plugins.legend.labels.color="FieldText"),B},[h,I,j,T,v,m,S,e,c,t,N,n])};function Sne(e){const{children:t,onEvent:n,reduceMotion:o,shouldAnimate:r,values:a}=e,i=yne({onEvent:n,reduceMotion:o,shouldAnimate:r,values:a});return t(i)}var Lne=p(7173),Ap=p.n(Lne);const Tne=/<mark>|<\/mark>/gm,kne=e=>t=>{const n=e(t.type).replace(Tne,"")??"";return{label:Ap()(n,{length:30}),l10nId:At(t?.type)}},Ine=e=>parseFloat(e.value??"0"),b5=(e,t)=>({labels:e.map(kne(t)),values:e.map(Ine)});function Ene(e,t,n){const o=[];let r=0;return n.replace(e,function(...a){const i=a.length,c=a[0],l=a[i-1],d=a[i-2],h=l.slice(r,d),m=typeof t=="function"?t(...a):t;return o.push(h,m),r=d+c.length,""}),o.push(n.slice(r)),o}const Nne=(e,t)=>(0,s.jsx)("mark",{children:e},t),jne=(e,t)=>Ene(new RegExp(dJ()(t),"igm"),Nne,e),y5=(e,t,n)=>{const o=Ap()(t,{length:e});return n?jne(o,n):o};function wne(){const[e,t]=u.useState(null),n=u.useRef(null),{announcePolite:o}=Ts(),{labels:r}=sa()??{},{a11yBlockChartPreposition:a}=r??{},i=ks(),c=u.useCallback(C=>{t(C)},[]),l=u.useCallback(()=>{const C=n.current;if(!C)return;const g=i?C.canvas?.parentElement:null;if(g&&C.width){if(g.clientWidth>0){const b=g.clientWidth;let x=b*(C.height/C.width);g.clientHeight>0&&x>g.clientHeight&&(x=g.clientHeight),C.resize(b,x)}}else C.resize()},[i]),d=u.useCallback(()=>{n.current?.update()},[]),h=u.useCallback(()=>{l(),d()},[l,d]),m=u.useCallback(()=>{const C=n.current;if(C==null)return;const g=C.getDatasetMeta(0),b=g.data;if(!b?.length)return;const x=0,L=[{datasetIndex:0,element:g.data[x],index:x}];C.setActiveElements(L),C.tooltip?.setActiveElements(L,{x:0,y:0}),C.update(),c(x);const S=C.data.labels[x],T=C.data.datasets[0].data[x];setTimeout(()=>{o(`${x+1} ${a??""} ${b.length} - ${S}: ${T}`)},0)},[a,o,n,c]),f=u.useCallback(()=>{const C=n.current;if(C==null)return;const g=[];C.setActiveElements(g),C.tooltip?.setActiveElements(g,{x:0,y:0}),C.update(),c(null),o(null)},[o,n,c]),v=u.useCallback(C=>{const g=n.current;if(g==null)return;const b=g.getDatasetMeta(0),x=b.data;if(!x?.length)return;let y=!1,L=e;switch(C.key){case"ArrowLeft":y=!0,L=(e-1+x.length)%x.length;break;case"ArrowRight":y=!0,L=(e+1+x.length)%x.length;break;case"Home":y=!0,L=0;break;case"End":y=!0,L=x.length-1;break}if(y&&(C.stopPropagation(),C.preventDefault()),L!==e){const T=[{datasetIndex:0,element:b.data[L],index:L}];g.setActiveElements(T),g.tooltip?.setActiveElements(T,{x:0,y:0}),g.update(),c(L);const k=g.data.labels?.[L],E=g.data.datasets[0].data[L];o(`${L+1} ${a??""} ${x.length} - ${k}: ${E}`)}},[a,e,o,n,c]);return u.useEffect(()=>{l(),d()},[l,d]),u.useEffect(()=>{n.current&&n.current.update()},[e]),{activeIndex:e,chartRef:n,onBlur:f,onFocus:m,onKeyDown:v,onEvent:c,onResize:h}}function S5(e){const t=n=>{const{activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d}=wne();return(0,s.jsx)(e,{...n,activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d})};return t.displayName=`withChartEvents(${e.displayName||e.name})`,t}const Ane="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class Rne extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)(),this.state={labelYTop:"50%"}}componentDidMount(){this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}handleEvent=(t,n)=>{const o=n.length?n[0].index:null;this.props.onEvent(o)};handleResize=()=>{requestAnimationFrame(()=>{this.props.onResize(),this.setLabelYTop()})};setLabelYTop=()=>{const t=this.props.chartRef.current;if(t){const{bottom:n,top:o}=t?.scales?.y??{};g5()(n)&&g5()(o)&&this.setState({labelYTop:`${(n+o)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:n,getL10nValue:o,htmlIdBase:r,htmlIdTitle:a,onBlur:i,onFocus:c,onKeyDown:l,isDesktop:d,isVisible:h,items:m,itemsLabel:f,labels:v,onEvent:C,search:g,shouldAnimate:b,valuesLabel:x,variant:y},state:{labelYTop:L}}=this,S=y5(80,o(f),g),T=y5(30,o(x),g),k=b5(m,o),E=d?[]:Ane.slice(0,m.length),I=d?k.labels:E.map(A=>({label:A})),j=h?k.values:C5(0,m.length),P=`${r}-type`,N=`${r}-instructions`,R=I.map(A=>A.label),w=I.map(A=>A.l10nId).join(",");return(0,s.jsxs)("div",{className:"block-chart__cartesian",children:[(0,s.jsx)("p",{className:"visually-hidden-always",id:N,children:v?.a11yBlockChartInstructions}),(0,s.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[T&&cs(T)&&(0,s.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":At(x),style:{insetInlineEnd:L},children:[T,(0,s.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisY})]}),S&&cs(S)&&(0,s.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":At(f),children:[S,(0,s.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisX})]}),(0,s.jsx)(Sne,{onEvent:this.handleEvent,reduceMotion:rn(),shouldAnimate:b,values:j,children:A=>(0,s.jsx)(mne,{activeIndex:t,opts:A,values:j,children:M=>(0,s.jsxs)("div",{"aria-describedby":N,"aria-labelledby":`${a} ${P}`,className:"block-chart__cartesian-canvas-wrap",onBlur:i,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:P,children:y==="bar"?v?.a11yBlockChartBar:v?.a11yBlockChartLine}),(0,s.jsx)(p5.Chart,{"aria-hidden":"true",data:{labels:R,datasets:[M]},"data-l10n-id":w,options:A,ref:n,role:"presentation",type:y,updateMode:"default"})]})})})]}),!d&&(0,s.jsx)(vne,{activeIndex:t,labels:k.labels,letters:E,onEvent:C,values:j})]})}}function Pne(e){const t=at(e),n=y$(960,"isDesktop","Desktop")(t),o=S5(n);function r(a){const c=Lh()?.term??"";return(0,s.jsx)(o,{...a,search:c})}return r}const Mne=Pne(Rne),Rp=({valueType:e,value:t,values:n})=>e==="numeric"?String(t):bq(t/u6(n)),One=e=>{if(Rc())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return Dn(t)===ke.DARK?St.DARK:St.LIGHT},Bne=(e,t,n)=>Rp({valueType:e,value:t,values:n.dataset.data}),Dne=(e,t)=>{const{label:n,dataset:o,parsed:r}=t[0],a=Rp({valueType:e,value:r,values:o.data});return`${n}: ${a}`},Fne=(e,t)=>{const n=t.dataIndex,o=t.dataset.data??[1],r=o[n],a=e==null&&r/u6(o)>=.06;return e===n||a},Hne=({activeIndex:e,onEvent:t,reduceMotion:n,settings:{valueType:o},shouldAnimate:r})=>{const a=Rc();return{animation:{animateRotate:r&&!n,duration:r&&!n?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:One,display:Fne.bind(null,e),font:{size:12,weight:"bold"},formatter:Bne.bind(null,o)},legend:{display:!1,labels:a?{color:"FieldText"}:void 0},tooltip:{animation:!n,boxPadding:"14px 10px",callbacks:{label:()=>null,title:Dne.bind(null,o)},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:a?"Highlight":St.LIGHT,titleColor:a?"HighlightText":St.DARK}},responsive:!1,rotation:130}},$ne=({activeIndex:e,colors:t,hasBorder:n,values:o})=>{const r=vn(),a=Rc(),i=e==null?t:t.map((c,l)=>l===e?c:(0,x5.A)(c,r||"#fff",.5));return a?{backgroundColor:i,hoverBackgroundColor:i,borderWidth:.5,borderColor:"rgba(255, 255, 255, 0.3)",data:o}:{backgroundColor:i,hoverBackgroundColor:i,borderWidth:0,data:o,...n&&{borderWidth:1,borderColor:"#000"}}};function Vne({activeIndex:e,children:t,colors:n,hasBorder:o,values:r}){const a=$ne({activeIndex:e,colors:n,hasBorder:o,values:r});return t(a)}class zne extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:n,index:o,label:r,value:a}=this.props,i=t!=null&&t!==o,c=X()("block-chart__circleLegendItem",{"block-chart__circleLegendItem--unfocused":i});return(0,s.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,s.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,s.jsx)("svg",{"aria-hidden":"true",className:"block-chart__circleLegendSymbol","data-ignore":"contrast",fill:n,focusable:"false",role:"presentation",viewBox:"0 0 10 10",children:(0,s.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,s.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,s.jsx)("dd",{className:"visually-hidden-always",children:a})]})}}const _ne=zne,Une=({activeIndex:e,colors:t,hasBorder:n,labels:o,onEvent:r,values:a,valueType:i="numeric"})=>{const c=Bu(t,Bu(o,a));if(c.length===0)return null;const l=X()("block-chart__circleLegend",{"block-chart__circleLegend--border":n});return(0,s.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,s.jsx)(_ne,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:Rp({valueType:i,value:m,values:a})},h.label))})},Gne=(0,u.memo)(Une),Wne=(e,t)=>{const n=e.filter(a=>Number(a.value)>=0),o=b5(n,t),r=n.map(a=>a.color);return{...o,colors:r}};class Kne extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)()}componentDidMount(){this.resizeObserver=new ResizeObserver(this.props.onResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}buildOptions=()=>{const{activeIndex:t,settings:n,shouldAnimate:o}=this.props;return Hne({activeIndex:t,onEvent:this.handleEvent,reduceMotion:rn(),settings:n,shouldAnimate:o})};handleEvent=(t,n)=>{const o=n.length?n[0].index:null;this.props.onEvent(o)};render(){const{activeIndex:t,backgroundColor:n,chartRef:o,getL10nValue:r,htmlIdBase:a,htmlIdTitle:i,onBlur:c,onFocus:l,onKeyDown:d,isVisible:h,items:m,labels:f,onEvent:v,settings:C}=this.props,{colors:g,labels:b,values:x}=Wne(m,r),y=h?x:C5(0,m.length),L=this.buildOptions(),S=`${a}-type`,T=`${a}-instructions`,k=b.map(I=>I.label),E=g.includes(n);return(0,s.jsxs)("div",{className:"block-chart__circle",children:[(0,s.jsx)("p",{className:"visually-hidden-always",id:T,children:f?.a11yBlockChartInstructions}),(0,s.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,s.jsx)(Vne,{activeIndex:t,colors:g,hasBorder:E,values:y,children:I=>(0,s.jsxs)("div",{"aria-describedby":T,"aria-labelledby":`${i} ${S}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,s.jsx)("div",{className:"visually-hidden-always",id:S,children:f?.a11yBlockChartPie}),(0,s.jsx)(p5.Chart,{"aria-hidden":"true",data:{labels:k,datasets:[I]},options:L,ref:o,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,s.jsx)(Gne,{activeIndex:t,colors:g,hasBorder:E,labels:b,onEvent:v,values:y,valueType:C?.valueType})]})}}function Qne(e){const t=SA()(e),n=S5(t);return at(n)}const Yne=Qne(Kne);In.Chart.register(In.ArcElement,In.BarController,In.BarElement,In.CategoryScale,ane.default,In.Legend,In.Legend,In.LineController,In.LineElement,In.LinearScale,In.PieController,In.PointElement,In.Title,In.Tooltip);const Zne=e=>e.displayName||e.name||"Component";class Xne extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,y0.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||rn()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,s.jsx)(we,{value:t})};render(){const{props:{animateBlockEntrance:t,children:n,editable:o,initiallyVisible:r,isLearner:a,items:i,itemsLabel:c,labels:l,settings:d,title:h,valuesLabel:m,variant:f,renderTitle:v=this.renderTitle},state:{isVisible:C}}=this,g=d?.headingLevel,b=g?`h${g}`:"h2",x=this.id,y=`${x}-title`;return(0,s.jsx)(Ae,{className:this.props.isPresentation?"block-chart--presentation":void 0,type:"chart",children:(0,s.jsx)(Fe,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,s.jsx)("div",{className:"block-chart__container",children:(0,s.jsx)("div",{className:"block-chart__row",children:(0,s.jsx)("div",{className:"block-chart__rowInner",children:(0,s.jsxs)("figure",{children:[(!o&&h||o)&&(0,s.jsx)("figcaption",{children:(0,s.jsx)(b,{className:"block-chart__title",id:y,children:v()})}),(0,s.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(n),{htmlIdBase:x,htmlIdTitle:y,isVisible:C,items:i,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const qne=e=>{const t=ks();return(0,s.jsx)(Xne,{...e,isPresentation:t})};function L5(e){const t=n=>(0,s.jsx)(qne,{...n,children:(0,s.jsx)(e,{})});return t.displayName=`ChartWrap(${Zne(e)})`,t}var Jne=p(49860);const ese=L5(Mne),tse=L5(Yne),nse=$s()(qe()("variant","storyline")),sse=kt()(nse,Hn(),BG()(1));class ose extends Jne.Component{render(){const{dividerNumber:t,family:n,handleStorylineFullscreen:o,partnerContent:r,variant:a,enableVideoPlaybackSpeed:i,initiallyVisible:c}=this.props,d={...Zc()(["type","handleStorylineFullscreen","dividerNumber"],this.props),enableVideoPlaybackSpeed:i,partnerContent:r,initiallyVisible:c};return ce("text","paragraph",d)||ce("text","table",d)?(0,s.jsx)(RQ,{...d}):ce("text","heading paragraph",d)?(0,s.jsx)(FQ,{...d}):ce("text","subheading paragraph",d)?(0,s.jsx)(HQ,{...d}):ce("text","heading",d)?(0,s.jsx)(BQ,{...d}):ce("text","subheading",d)?(0,s.jsx)(DQ,{...d}):ce("text","two column",d)?(0,s.jsx)(PQ,{...d}):ce("text","three column",d)?(0,s.jsx)(MQ,{...d}):ce("text","four column",d)?(0,s.jsx)(OQ,{...d}):ce("text","code",d)?(0,s.jsx)(my,{...d}):ce("impact","a",d)?(0,s.jsx)(JQ,{...d}):ce("impact","b",d)?(0,s.jsx)(eY,{...d}):ce("impact","c",d)?(0,s.jsx)(tY,{...d}):ce("impact","d",d)?(0,s.jsx)(nY,{...d}):ce("impact","note",d)?(0,s.jsx)(sY,{...d}):ce("quote","a",d)?(0,s.jsx)(xy,{...d}):ce("quote","b",d)?(0,s.jsx)(uY,{...d}):ce("quote","c",d)?(0,s.jsx)(hY,{...d}):ce("quote","d",d)?(0,s.jsx)(mY,{...d}):ce("quote","background",d)?(0,s.jsx)(fY,{...d}):ce("quote","carousel",d)?(0,s.jsx)(gY,{...d}):ce("quote","stacked",d)?(0,s.jsx)(vY,{...d}):ce("list","numbered",d)?(0,s.jsx)(bY,{...d}):ce("list","checkboxes",d)?(0,s.jsx)(yY,{...d}):ce("list","bulleted",d)?(0,s.jsx)(SY,{...d}):ce("list","icon",d)?(0,s.jsx)(LY,{...d}):ce("image","hero",d)?(0,s.jsx)(kY,{...d}):ce("image","full",d)?(0,s.jsx)(Jf,{...d}):ce("image","text aside",d)?(0,s.jsx)(NY,{...d}):ce("image","text overlay",d)?(0,s.jsx)(wY,{...d}):ce("image","banner",d)?(0,s.jsx)(AY,{...d}):ce("gallery","centered",d)||ce("gallery","full",d)?(0,s.jsx)(FY,{...d}):ce("gallery","two column",d)?(0,s.jsx)(tp,{...d}):ce("gallery","three column",d)?(0,s.jsx)(tp,{width:3,...d}):ce("gallery","four column",d)?(0,s.jsx)(tp,{width:4,...d}):ce("divider","divider",d)?(0,s.jsx)($Y,{...d}):ce("divider","numbered divider",d)?(0,s.jsx)(VY,{number:t,...d}):ce("divider","spacing divider",d)?(0,s.jsx)(zY,{...d}):ce("360","storyline",d)?(0,s.jsx)(LZ,{...d,handleStorylineFullscreen:o,hasManySlBlocks:this.hasManySlBlocks.bind(this),isLesson:!0}):ce("interactive","accordion",d)?(0,s.jsx)(YY,{...d}):ce("interactive","tabs",d)?(0,s.jsx)(aZ,{...d}):ce("interactive-fullscreen","labeledgraphic",d)?(0,s.jsx)(vee,{...d}):ce("interactive-fullscreen","process",d)?(0,s.jsx)(Dee,{...d}):ce("interactive-fullscreen","scenario",d)?(0,s.jsx)(ite,{...d}):ce("interactive-fullscreen","sorting",d)?(0,s.jsx)(bte,{...d}):ce("buttons","button",d)?(0,s.jsx)(BZ,{...d}):ce("buttons","button stack",d)?(0,s.jsx)(DZ,{...d}):ce("flashcard","flashcard",d)?(0,s.jsx)(n6,{...d}):ce("flashcard","stack",d)?(0,s.jsx)(n6,{stack:!0,...d}):ce("knowledge","knowledge",d)?(0,s.jsx)(Ua,{...d}):ce("continue","continue",d)?(0,s.jsx)(KX,{...d}):ce("multimedia","step",d)?(0,s.jsx)(WX,{...d}):ce("multimedia","audio",d)?(0,s.jsx)(DX,{...d}):ce("multimedia","video",d)?(0,s.jsx)(up,{...d}):ce("multimedia","ai_avatar",d)?(0,s.jsx)(up,{...d}):ce("multimedia","custom video",d)?(0,s.jsx)(up,{...d,type:"customVideo"}):ce("multimedia","embed",d)?(0,s.jsx)($X,{...d}):ce("multimedia","attachment",d)?(0,s.jsx)(_X,{...d}):ce("multimedia","code",d)?(0,s.jsx)(my,{...d}):ce("knowledgeCheck","multiple choice",d)?(0,s.jsx)(Ua,{...d}):ce("knowledgeCheck","multiple response",d)?(0,s.jsx)(Ua,{...d}):ce("knowledgeCheck","fillin",d)?(0,s.jsx)(Ua,{...d}):ce("knowledgeCheck","matching",d)?(0,s.jsx)(Ua,{...d}):ce("knowledgeCheck","draw from question bank",d)?(0,s.jsx)(Ua,{...d}):ce("chart","bar",d)||ce("chart","line",d)?(0,s.jsx)(ese,{...d}):ce("chart","pie",d)?(0,s.jsx)(tse,{...d}):ce("interactive-fullscreen","timeline",d)?(0,s.jsx)(Zte,{...d}):ce("ai-scenario","ai-scenario",d)?(0,s.jsx)(Mte,{...d}):ce("mondrian","mondrian",d)?(0,s.jsx)(Nte,{...d}):ce("videoCheckpoint","videoCheckpoint",d)?null:ce("textToVideo","textToVideo",d)?(0,s.jsx)(rne,{}):ce("survey","survey",d)?(0,s.jsx)(Nee,{...d}):ce("sequence","arrows",d)||ce("sequence","pyramid",d)||ce("sequence","timeline",d)?(0,s.jsx)(ene,{...d}):ce("team","people",d)?(0,s.jsx)(one,{...d}):ce("html","inline",d)||ce("html","cdn",d)||ce("html","vibe",d)?(0,s.jsx)(Gte,{...d}):`Unknown type: ${n} ${a}`}hasManySlBlocks(){const{items:t}=this.props;return t&&sse(t)}}function rse(e){return(0,s.jsx)(Bl,{block:e,children:(0,s.jsx)(ose,{...e})})}function ce(e,t,n){return n.family===e&&n.variant===t}const ase=1e3,ise=150,cse="onscrollend"in window;function T5(e,t){const n=e.getBoundingClientRect(),o=t?.getBoundingClientRect(),r=o?.top??0,a=o?.bottom??window.innerHeight,i=(a-r)*.02,c=n.bottom>r-i&&n.top<a+i,l=n.bottom<r;return c||l}const Pp={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,n){const o=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:n}),o){this.scrollTarget=r;const a=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),ise)};cse?(this.scrollEndHandler=()=>this.checkAll(),this.scrollTarget.addEventListener("scrollend",this.scrollEndHandler),this.scrollHandler=a,this.scrollTarget.addEventListener("scroll",this.scrollHandler)):(this.scrollHandler=a,this.scrollTarget.addEventListener("scroll",this.scrollHandler))}},unregister(e){this.entries.delete(e),this.entries.size===0&&(this.scrollEndHandler&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scrollend",this.scrollEndHandler),this.scrollEndHandler=null),this.scrollHandler&&this.scrollTarget&&(this.scrollTarget.removeEventListener("scroll",this.scrollHandler),this.scrollHandler=null),this.scrollTarget=null,this.debounceTimer!=null&&(clearTimeout(this.debounceTimer),this.debounceTimer=null))},checkAll(){requestAnimationFrame(()=>{const e=[];for(const t of this.entries.values())T5(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},k5=({active:e=!0,children:t,onViewed:n})=>{const o=(0,u.useRef)(null),r=(0,u.useRef)(!1),a=(0,u.useRef)(n);return(0,u.useEffect)(()=>{a.current=n},[n]),(0,u.useEffect)(()=>{const i=o.current;if(!e||!i||r.current)return;let c=!0;const l=Um(),d=()=>{!c||r.current||(r.current=!0,h.disconnect(),clearTimeout(m),Pp.unregister(i),a.current())},h=new IntersectionObserver(([f])=>{f!=null&&(f.isIntersecting||f.intersectionRatio>0)&&d()},{root:l,rootMargin:c1,threshold:0});h.observe(i);const m=setTimeout(()=>{!r.current&&T5(i,l)&&d()},ase);return Pp.register(i,l,d),()=>{c=!1,h.disconnect(),clearTimeout(m),Pp.unregister(i)}},[e]),(0,s.jsx)("div",{ref:o,children:t})},lse=(0,u.memo)(function({active:t=!0,block:n,children:o,onViewed:r,onStep:a}){const i=(0,u.useCallback)(l=>{l!=null&&"id"in l&&l.id!=null&&!l.isDone&&a(l.id)},[a]),c=(0,u.useCallback)(()=>{if(!n.items?.length){r();return}if(!n.requiresInteraction){r();return}(dse.test(n.variant)||use.test(n.family))&&n.items.length>0&&i(n.items[0])},[n,i,r]);return(0,s.jsx)(k5,{active:t,onViewed:c,children:u.cloneElement(u.Children.only(o),{onStep:i})})}),dse=/tabs|carousel/,use=/gallery/,hse=["timeline"],mse=({family:e,variant:t})=>(/interactive|flashcard|knowledge|continue|360|survey/.test(e)||/carousel|centered|checkboxes|audio|video|storyline/.test(t))&&!hse.includes(t),fse=({family:e,settings:t})=>e==="html"&&t?.hasCustomCompletion,pse=({family:e,items:t})=>!!(e==="mondrian"&&t?.length),gse="draw from question bank",Mp=e=>{const{animateBlockEntrance:t,backgroundBefore:n,block:o,className:r,color:a,courseTitle:i,defaultBackgroundColor:c,enableVideoPlaybackSpeed:l,handleNavigate:d,hideBlock:h,index:m,isLastBlock:f,isOnlyBlockInStep:v,labels:C,lessonId:g,lessonProgress:b,loadMedia:x,observeProgress:y=!0,onContinue:L,partnerContent:S,prefersKeyboardNavigation:T,previewType:k}=e,{blockId:E,family:I,items:j=[],variant:P,settings:N}=o,R=`block-${E}`,w=ot(),A=BN(),M=dV(),O=hw({blockId:String(E),lessonId:String(g)}),B=(0,u.useCallback)(oe=>{const xe=P===gse?j[0]:Cr()(qe()("id",oe),j);w(fl({blockId:E,lessonId:g,items:[xe]})),I==="continue"&&L(E,oe)},[E,w,I,j,g,L,P]),D=(0,u.useCallback)(()=>{w(fl({blockId:E,lessonId:g,items:j}))},[E,w,j,g]),H=(0,u.useCallback)(oe=>{const xe=j?.[0],U=xe&&"id"in xe?xe.id:void 0;U&&w(wE({blockId:E,itemId:U,lessonId:g,audioVideoPlayhead:oe}))},[E,w,g,j]),V=(0,u.useCallback)(()=>{w(PE({blockId:E,lessonId:g,isSubmitted:!0}))},[E,w,g]),G=(0,u.useCallback)(({itemId:oe,response:xe})=>{w(RE({blockId:E,itemId:oe,lessonId:g,response:xe}))},[E,w,g]),_=(0,u.useCallback)(oe=>{w(EE(oe))},[w]),Y=(0,u.useCallback)(()=>({itemId:oe,isCorrect:xe})=>w(AE({itemId:oe,lessonId:g,blockId:E,isCorrect:xe})),[E,w,g]),se=(0,u.useCallback)(()=>()=>w(jE({lessonId:g,blockId:E})),[E,w,g]),Z=ac(),W=(0,u.useCallback)(oe=>{w(Fb(oe))},[w]),F=(0,u.useCallback)(()=>{w(ic())},[w]),z=(0,u.useCallback)(oe=>{w(mf(oe))},[w]),Q=(0,u.useCallback)(()=>{w(ml(g))},[w,g]),K={...o,animateBlockEntrance:t,className:r?.toString(),color:a,courseTitle:i,defaultBackgroundColor:c,dividerNumber:O,enableVideoPlaybackSpeed:l,handleNavigate:d,onExit:Q,onFinishStoryline:v8,onSurveySubmitted:V,onSurveyPartialResponse:G,initiallyVisible:m===0,isHidden:h,isLastBlock:f,isLearn:!0,isLearner:!0,isOnlyBlockInStep:v,isVideoTraining:A,labels:C,lessonId:g,loadMedia:x,onCardDrop:Y,onReplay:se,onRetryAttempt:_,onTranscriptClose:F,onTranscriptOpen:W,onTranscriptUpdate:z,partnerContent:S,prefersKeyboardNavigation:T,previewType:k,progress:b,recordMediaPlayheadPosition:H,transcriptPanelState:Z},q=mse({family:I,variant:P})||fse({family:I,settings:N})||pse({family:I,items:j}),ee=fD(g,E),J=["noOutline",r,M?"comment-preview-anchor":void 0,h?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),ne=(0,s.jsx)(rse,{...K});return(0,s.jsxs)("div",{className:J,"data-block-family":I,"data-block-id":E,"data-change-path":ee,children:[n,q?(0,s.jsx)(lse,{active:y,block:o,onStep:B,onViewed:D,children:ne}):(0,s.jsx)(k5,{active:y,onViewed:D,children:ne}),(0,s.jsx)(As,{anchor:{block:String(E),kind:"block"},label:"Comments on block"})]},R)},Du=Lt(),Op=_r(),vse=Ze(),Cse=({slides:e,currentSlide:t},n)=>(t.push(n),n.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),I5=e=>{const{slides:t}=bf()(Cse,{slides:[],currentSlide:[]},e);return t};function Bp(e,t,n,o){if(e.length){const a=e.slice(-1)[0];if(!Qa(a.id,n))return e}const r=cne(xse(n),t.slice(e.length)).map(bse(o));return r.length?Bp(e.concat(r),t,n,o):e}const Qa=(e,t)=>e==null?!1:Du(!1,["items",e,"isComplete"],t),xse=e=>({family:t,items:n})=>{const o=Du({},0,n);return t==="continue"&&!Qa(o.id,e)},bse=e=>(t,n,o)=>{const r=o.slice(-1)[0]||{},{family:a}=r,i=a==="continue"?Du(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer?Op(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!i||i==="completeBlock"&&n!==o.length-1&&n!==o.length-2)?t:Op(t,{requiresInteraction:!0})};function E5({id:e,...t},n,o,r,a){if(t.family==="continue"){const i=Du(void 0,["items",0,"type"],t)??a?.blockContinueCompletionType??"";return Op({blockId:e,...t},{skipContinue:r,canContinue:yse({continueType:i,blocks:n,progress:o}),lessonProgress:o,isComplete:Qa(e,o)})}return{blockId:e,...t}}const yse=({continueType:e,blocks:t,progress:n})=>{switch(e){case"completeAll":return tn()(Hn()(t),kse(n));case"completeBlock":return t.length===0?!0:Qa(Ise(t),n);default:return!0}},Sse=e=>es()(vse("items",e)??{}),Lse=e=>Tse(Sse(e??{})),Tse=e=>$s()(t=>qe()("isComplete",!0,t),e),kse=e=>Hn()(Lse(e)),Ise=e=>Xc()(e)?.id,Ese=({family:e,variant:t,isComplete:n,requiresInteraction:o})=>e==="continue"&&t==="continue"&&!!o&&!n,Nse=(e,t)=>!!e.find(o=>{if(o?.family==="knowledgeCheck"&&o?.settings?.requireCorrectAnswer)return o.id==null?!0:!t?.items?.[o.id]?.isComplete}),jse=e=>e.length===0?!1:E3()(t=>!!Ese(t),e),wse=(e,t)=>e.length===0?!1:Nse(e,t),Ase=({blocks:e,lessonProgress:t})=>e.findIndex(n=>{const o=n.id==null?void 0:t?.items?.[n.id],r=o&&o?.isComplete==null;return n?.family==="knowledgeCheck"&&n?.settings?.requireCorrectAnswer&&r}),N5=({blocks:e,lessonProgress:t,currentBlockIndex:n})=>{const o=Ase({blocks:e,lessonProgress:t});return o>-1&&n>o},j5=(e,t,n)=>{const o=e.findIndex(r=>r.id===t);return o<=0?[]:e.slice(0,o).filter(r=>r.family==="continue"&&!Qa(r.id,n))},Rse=(e,t)=>{const n=["embed","video","full"],o=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&o.includes(e)||t!=null&&n.includes(t)};function w5(e){const t=(0,u.useRef)(e);t.current=e,(0,u.useEffect)(()=>{const n=o=>{if(o.defaultPrevented||o.button!==0||o.altKey||o.ctrlKey||o.metaKey||o.shiftKey)return;const r=o.target;if(!(r instanceof Element))return;const a=r.closest("a")?.getAttribute("href");if(a==null)return;const i=c_(a);i!=null&&t.current(i)};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[])}function Pse(e,t,n){if(!e||!t||!_h())return!1;if(mN(n,{l10n:t}))return!0;const{locales:o,defaultLocale:r}=t,a=o.find(i=>i.locale===r)?.id;return!!(a&&a!==e)}function A5(){const{currentLocale:e}=tt(),t=pe(o=>o.course?.defaultLocaleId),n=pe(o=>o.l10n);return Pse(t??null,n,e)}const Mse=e=>e==="center"||e==="end"||e==="nearest"||e==="start",Ose=e=>Vt(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||Mse(e.align)),Bse=e=>Vt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function Dse({animateBlockEntrance:e,blocks:t,className:n,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,isLessonEntering:c,isLessonExiting:l,labels:d,lessonId:h,lessonProgress:m,loadMedia:f,observeProgress:v=!0,nextLesson:C,partnerContent:g,prefersKeyboardNavigation:b,previewType:x}){const y=(0,u.useRef)(null),L=(0,u.useRef)(null),S=(0,u.useRef)(null),[T,k]=(0,u.useState)(null),[,E]=(0,u.useState)(0),[I,j]=(0,u.useState)(!1),P=(0,u.useRef)(null),[N]=(0,Re.ok)(),R=N.get(rc),w=pe(F=>F.course?.theme),A=pe(FC),M=A5()||I,O=(0,u.useRef)(l),B=(0,u.useRef)(c),D=(0,u.useRef)(h),H=(0,u.useRef)(t);O.current=l,B.current=c,D.current=h,H.current=t;const V=(0,u.useCallback)((F,z="start")=>{const Q=H.current.find(K=>String(K.id)===String(F));return Q==null?!1:(P.current?.(),S.current={blockId:Q.id,align:z},k(Q.id),E(K=>K+1),!0)},[]);w5(({lessonId:F,blockId:z})=>{F===D.current&&V(z)}),(0,u.useEffect)(()=>{const F=z=>{if(z.origin!==window.location.origin)return;(Array.isArray(z.data)?z.data:[z.data]).forEach(K=>{Vt(K)&&K.type==="preview:lessonUpdate"&&j(!0)})};return window.addEventListener("message",F),()=>window.removeEventListener("message",F)},[]),(0,u.useEffect)(()=>{const F=z=>{if(O.current||!(z instanceof CustomEvent))return;const Q=z.detail;if(!Ose(Q)||Q.lessonId!==D.current)return;const K=Q.itemId,q=Q.align??"nearest";if(K==null){P.current?.(),y.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"});return}V(K,q)};return window.addEventListener(We,F),()=>window.removeEventListener(We,F)},[V]),(0,u.useEffect)(()=>{P.current?.(),(R==null||!V(R))&&(S.current=null,k(null))},[R,h,V]),(0,u.useEffect)(()=>()=>P.current?.(),[]),(0,u.useEffect)(()=>{if(M||T==null)return;j5(t,T,m).forEach(z=>{jn(fl({blockId:z.id,items:z.items??[],lessonId:h}))})},[M,T,t,m,h]),(0,u.useLayoutEffect)(()=>{const F=S.current;if(F==null||B.current)return;const z=document.querySelector(".page-wrap"),Q=z?.querySelector(`[data-block-id="${F.blockId}"]`);z==null||Q==null||(S.current=null,F.align==="start"?G(z,Q):Q.scrollIntoView({behavior:"smooth",block:F.align}))}),(0,u.useLayoutEffect)(()=>{_()});function G(F,z){P.current?.();const Q=()=>{let U=0,ie=z;for(;ie instanceof HTMLElement&&ie!==F&&F.contains(ie);)U+=ie.offsetTop,ie=ie.offsetParent;return U},K=()=>{const U=Q();Math.abs(F.scrollTop-U)>1&&(F.scrollTop=U)};let q=0,ee=!1;const J=()=>{ee||(ee=!0,cancelAnimationFrame(q),window.clearTimeout(oe),F.removeEventListener("wheel",J,ne),F.removeEventListener("touchstart",J,ne),F.removeEventListener("pointerdown",J,ne),window.removeEventListener("keydown",J,!0),P.current===J&&(P.current=null))},ne={capture:!0,passive:!0};F.addEventListener("wheel",J,ne),F.addEventListener("touchstart",J,ne),F.addEventListener("pointerdown",J,ne),window.addEventListener("keydown",J,!0);const oe=window.setTimeout(J,2500),xe=()=>{ee||(K(),q=requestAnimationFrame(xe))};P.current=J,q=requestAnimationFrame(xe)}function _(){if(L.current){const z=t.findIndex(K=>K.id===L.current)+1,Q=t[z]?.id??null;if(Q){const K=document.querySelector(".page-wrap"),q=K?.querySelector(`[data-block-id="${Q}"]`),ee=q?q.getBoundingClientRect().top:0;kr.Ay.animateScroll.scrollTo(ee+(K?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}L.current=null}}const Y=(0,u.useCallback)((F,z)=>{Qa(z,m)||(L.current=F),F===t[t.length-1]?.id&&C&&(jn(ml(h)),i?.(C))},[i,t,h,m,C]),se=M?t:(()=>{const F=Bp([],t,m,w);return Array.isArray(F)?F.filter(z=>Vt(z)&&(typeof z.id=="string"||typeof z.id=="number")):t})(),Z=T==null?-1:se.findIndex(F=>F.id===T),W=["blocks-lesson",n,A?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,s.jsx)("section",{className:W,ref:y,children:se.map((F,z,Q)=>{const K=E5(F,Q.slice(0,-1),m,M,w);if(!Bse(K))return null;const q=K,ee=Q.length-1,ne=q.family==="continue"?F.id===t[t.length-1]?.id:z===ee,oe=Z!==-1&&z<=Z,xe=!I&&!oe&&N5({blocks:se,lessonProgress:m,currentBlockIndex:z});return(0,s.jsx)(Mp,{animateBlockEntrance:e,block:q,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,hideBlock:xe,index:z,isLastBlock:ne,labels:d,lessonId:h,lessonProgress:m,loadMedia:f,observeProgress:v,onContinue:Y,partnerContent:g,prefersKeyboardNavigation:b,previewType:x},q.blockId)}).filter(MG.A)})}const Dp=Dse;function Fu({children:e,lessonId:t}){const n=(0,u.useRef)(null),o=(0,u.useCallback)(r=>{const a=r.detail?.lessonId;a!=null&&String(a)!==String(t)||n.current?.focus?.()},[t]);return yV(o),(0,s.jsx)("main",{className:"lesson-main",ref:n,tabIndex:-1,children:e})}const Fse=({animateBlockEntrance:e,color:t,courseTitle:n,data:o,enableVideoPlaybackSpeed:r,handleNavigate:a,labels:i,lessonHeader:c,lessonHeaderWrapClasses:l,lessonHeaderWrapStyles:d,lessonProgress:h,loadMedia:m,observeProgress:f,isLessonEntering:v,isLessonExiting:C,nextLesson:g,prefersKeyboardNavigation:b,previewType:x,hideLessonHeaders:y})=>{const L=Bi(),{id:S,items:T}=o,k={animateBlockEntrance:e,blocks:T,color:t,courseTitle:n,enableVideoPlaybackSpeed:r,handleNavigate:a,labels:i,lessonId:S,lessonProgress:h,loadMedia:m,observeProgress:f,isLessonEntering:v,isLessonExiting:C,nextLesson:g,partnerContent:L,previewType:x,prefersKeyboardNavigation:b};return(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsxs)(Fu,{lessonId:S,children:[(0,s.jsx)("div",{className:l,inert:y,style:d,children:c}),(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(Dp,{...k})})]})})})},Hse=10;function $se(){const e=(0,u.useRef)(null),[t,n]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let o=null;const r=()=>{const i=e.current;if(!i||!o)return;const c=o.scrollTop,l=i.getBoundingClientRect().top+c,d=c>l&&c>0;n(h=>h===d?h:d)},a=setTimeout(()=>{o=Um(),o?.addEventListener("scroll",r,{passive:!0})},Hse);return()=>{clearTimeout(a),o?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const R5=$("progress"),Vse=$("lesson-progress-wrapper"),zse=()=>!!document.querySelector(".lesson--preview"),_se=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??-1,o=e?.length??0;return n===-1?0:n+1===o?100:e?.[n]?.linePosition?.replace("%","")??"0"},Use=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??0,o=e?.length??0;return n>o?100:Math.round(n/o*100)},Gse=e=>{const{lessonProgress:t,type:n}=e;switch(n){case"process":return Use(e);case"sorting":return t?.percentViewed??0;case"timeline":return _se(e);default:return t?.percentComplete??0}},Wse=e=>{const{type:t,items:n,sidebarAvailable:o,isCourseNavOpen:r,isMobile:a}=e,{isSticky:i,refProgressWrap:c}=$se(),[l]=(0,u.useState)(Zs),d=r,h=r&&a,m=zse(),f=Vse({visible:i&&!h}).mix(d&&o&&!m?"lesson--open":"").mix(o&&h&&!m?"lesson--open-mobile":"").toString(),v=R5({timeline:t==="timeline",video:t==="video"}).toString(),C=Gse(e),g=t==="timeline"&&n&&n.map(x=>{const y=parseInt(String(C))>=parseInt(x.linePosition?.slice(0,-1)??"0"),L=R5("marker",{active:y}).mix(y?"brand--background":"").toString();return(0,s.jsx)("div",{className:L,style:{left:x.linePosition}},x.id)}),b=(0,s.jsx)("div",{className:"progress-wrap",children:(0,s.jsx)("div",{className:v,children:(0,s.jsxs)("div",{className:"progress__container",children:[(0,s.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${C}% * var(--dir-x)),0px,0px)`}}),g]})})});return(0,s.jsxs)("div",{ref:c,children:[b,(0,fs.createPortal)((0,s.jsx)("div",{"aria-hidden":"true",className:f,children:b}),l)]})},Kse=e=>{const t=m_(),{isCourseNavOpen:n}=HU(),o=Bt(480);return(0,s.jsx)(Wse,{...e,isCourseNavOpen:n,isMobile:o,sidebarAvailable:t})};function P5(e){return ht()===te.RISE_CLASSIC?(0,s.jsx)(Kse,{...e}):null}const Qse=e=>e===HI.CONTINUE,Yse=({canShowContinue:e,isExport:t,isRiseCom:n,nextLesson:o})=>e&&n&&!o&&!t,Zse=e=>Vt(e)&&"id"in e&&"type"in e,Xse=(e,t)=>t.startsWith(`${e}-`)?t.slice(e.length+1):void 0,qse=(e,t)=>{const n=Xse(String(e.id),t);return n==null?void 0:e.questions.find(o=>String(o.id)===n)},Jse=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((n,o)=>t[n]?.id!==t[o]?.id),eoe=(e,t,n)=>{if(!Array.isArray(e)||!Array.isArray(t)||!n)return!1;const o=e.map(i=>t[i]),r=t.findIndex(i=>i.id===n),a=o.findIndex(i=>i.id===n);return r===a},toe=({lesson:e,question:t})=>{const n=String(t.id);for(const o of e?.items??[])if(Zse(o)){if(o.type===pn.DRAW_FROM_QUESTION_BANK){const r=qse(o,n);if(r)return r}else if(String(o.id)===n)return o}};function noe({settings:e}){const t=ot();return(0,u.useMemo)(()=>({onChoiceSelect:n=>{t(zv(n))},onFillInChange:n=>{t(_v(n))},onMatchSet:n=>{t(Gv(n))},onResponseToggle:n=>{t(Uv(n))},onSetIndex:n=>{t(oh(n))},onSubmit:n=>{const{skipLessonsIfPassed:o,skipToLessonId:r}=e||{};return t(rh({...n,passToContinue:n.passToContinue??!1,skipLessonsIfPassed:o??void 0,skipToLessonId:r??void 0}))}}),[t,e])}function M5(e){return e.type===pn.DRAW_FROM_QUESTION_BANK}function soe(e){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(n=>typeof n=="number"&&Number.isInteger(n)&&n>=0))}function ooe(e){return f2()?e.questions.length:Math.min(e.drawCount??0,e.questions.length)}function roe(e,t){if(!soe(t)||t.length!==e.length)return;const n=[];for(const[o,r]of e.entries()){const a=t[o];if(!(a.length===ooe(r)&&new Set(a).size===a.length&&a.every(c=>r.questions[c]!=null)))return;n.push(aoe(r,a))}return n}function Fp(e,t){return{...t,drawn:!0,id:`${e.id}-${t.id}`}}function aoe(e,t){const n=t.map(o=>({question:e.questions[o],idx:o})).filter(o=>o.question!=null);return{items:n.map(({question:o})=>Fp(e,o)),indices:n.map(({idx:o})=>o)}}function ioe(e){const{questions:t}=e;if(f2())return{items:t.map(i=>Fp(e,i)),indices:t.map((i,c)=>c)};const n=e.drawCount,o=[],r=[],a=[];for(let i=0;i<n;i++){const c=$6({questions:t,drawnQuestionIds:o});if(!c)break;r.push(Fp(e,c)),a.push(t.findIndex(l=>l.id===c.id)),o.push(String(c.id))}return{items:r,indices:a}}function coe({sourceItems:e,progress:t,lessonId:n}){const o=e.filter(M5),r=t?.questionsDrawn?roe(o,t.questionList):void 0,a=r?O5(e,r):void 0,i=r!==void 0&&a!==void 0&&loe(t,a),c=i?r:o.map(ioe),l=O5(e,c),d=o.length>0?c.map(f=>f.indices):void 0,h=t?.questionsDrawn&&o.length>0&&!i?{...t,items:{},originalItemProgress:void 0}:t,m=doe({items:l,progress:h,questionIndexList:d});return{concreteItems:l,drawPayload:{lessonId:n,lessonProgress:m}}}function O5(e,t){let n=0;return e.flatMap(o=>M5(o)?t[n++].items:[o])}function loe(e,t){if(!e)return!0;const n=new Map(Object.values(e.items).map(r=>[r.index,r])),o=e.originalItemProgress;return t.every((r,a)=>{const i=n.get(a),c=o?.[a];return c!==void 0?String(c.id)===String(r.id):i===void 0||String(i.id)===String(r.id)})}function doe({items:e,progress:t,questionIndexList:n}){const o=t?.items??{},r=t?.originalItemProgress,a=new Map(Object.values(o).map(c=>[c.index,c])),i=Object.fromEntries(e.map((c,l)=>{const d=r?.[l]??{},h=a.get(l);return[c.id,{...d,...h,id:c.id,index:l}]}));return{...t,questionsDrawn:!0,questionList:n??t?.questionList,items:i}}function Hp(e,t){return!!t[e.id]?.isComplete}function uoe({items:e,progress:t}){const n=t?.items??{};return[...e.filter(o=>Hp(o,n)),...Mu()(e.filter(o=>!Hp(o,n)))]}function hoe(e){const t=e.answers??[],n=Mu()(t),o=n.map(r=>t.findIndex(a=>a.id===r.id));return Object.assign({},e,{answers:n,shuffledAnswerIndices:o})}function B5({items:e,settings:t,progress:n}){const o=t?.randomizeQuestionOrder?uoe({items:e,progress:n}):e;if(!t?.shuffleAnswerChoices)return o;const r=n?.items??{};return o.map(a=>Hp(a,r)?a:hoe(a))}function moe({lessonId:e,sourceItems:t,progress:n,settings:o}){const{concreteItems:r,drawPayload:a}=coe({sourceItems:t,progress:n,lessonId:e});return{resolvedItems:B5({items:r,settings:o??void 0,progress:a.lessonProgress}),drawPayload:a}}function y1e(e){return B5({items:e.items,settings:e.settings,progress:e.progress})}const foe=e=>e!=null&&e.type!=null&&e.type!=="section";function S1e({lessonIds:e,lessons:t}){return!Array.isArray(e)||!t?!1:e.some((n,o)=>{const r=t[n];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(o+1).some(a=>foe(t[a]))})}function poe(e,t){const n=Rt(e),o=gl(n)?n.settings:void 0,r=e?l8({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>o&&{...o,passingScore:r??o?.passingScore??80},[o,r])}const Hu=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function D5(){const[e,t]=(0,u.useState)(Hu?.matches??!1);return(0,u.useEffect)(()=>{if(!Hu)return;const n=o=>t(o.matches);return Hu.addEventListener("change",n),()=>Hu.removeEventListener("change",n)},[]),e}function goe({lessonId:e}){const t=ot(),n=Rt(e),o=gl(n)?n:void 0,r=Nl(e),a=(0,u.useMemo)(()=>o?.items??[],[o?.items]),i=poe(e,r),[{resolvedItems:c,drawPayload:l}]=(0,u.useState)(()=>moe({lessonId:e,progress:r,settings:i,sourceItems:a}));(0,u.useLayoutEffect)(()=>{t(FE({...l,lessonId:e}))},[]);const d=r?.activeIndex??0,h=D5();return voe({activeIndex:d,isReduceMotion:h,progress:r,resolvedItems:c,settings:i,sourceItems:a}),{activeIndex:d,progress:r,resolvedItems:c,retryAttempts:r?.retryAttempts??0,settings:i,sourceItems:a}}function voe({activeIndex:e,isReduceMotion:t,progress:n,resolvedItems:o,settings:r,sourceItems:a}){const i=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const Coe=e=>e.length===3,xoe=e=>{const t=e.findIndex(n=>n==="answers");return t===-1?null:e[t+1]?.id},boe=e=>{const t=e.findIndex(n=>n==="questions");return t===-1?null:e[t+1]?.id},yoe=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},Soe=({items:e,itemId:t,questionBankQuestionId:n})=>{const o=e.find(({id:r})=>r===t);return o?"questions"in o?n?o.questions.find(({id:r})=>r===n):null:o:null},Loe=(e,t,n)=>{const o=n==="feedbackCorrect";return e?[e]:n==="feedback"?t.answers.slice(0,1):n==="feedbackIncorrect"&&t.type==="FILL_IN_THE_BLANK"?[{title:""}]:t.answers.filter(r=>"correct"in r?r.correct===o:"corrects"in t?t.corrects.includes(r.id)===o:t.answers)},Toe=({lessonId:e,items:t})=>{const n=ot(),o=(0,u.useCallback)(({lessonId:a,progressId:i,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":n(zv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":n(Uv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":n(_v({lessonId:a,itemId:i,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":n(Gv({lessonId:a,itemId:i,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[n]),r=(0,u.useCallback)(({detail:a})=>{const{lessonId:i,path:c}=a,l=String(a.itemId);if(i!==e)return;if(Coe(c)){n(Vv(e));return}const d=boe(c),h=Soe({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(n(oh({lessonId:e,progressId:m})),yoe(c)){const f=xoe(c),v=f?h.answers.find(({id:x})=>x===f)??null:null,C=c.at(-1),g=C==="feedbackCorrect",b=Loe(v,h,C);h.type==="MULTIPLE_RESPONSE"&&n(DE({lessonId:e,itemId:m})),b.forEach(x=>{o({lessonId:e,question:h,progressId:m,answer:x},g)}),n(rh({finalRetryAttempt:!1,lessonId:e,isCorrect:g,itemId:m,passToContinue:!0}))}},[n,e,t,o]);(0,u.useEffect)(()=>(window.addEventListener(We,r),()=>{window.removeEventListener(We,r)}),[r])},koe=$("quiz-item");function Ioe({activeIndex:e,children:t,index:n,isActive:o,isComplete:r,isCorrect:a,isTimedQuiz:i,settings:c}){const l=c?.correctAnswerColor??void 0,d=c?.incorrectAnswerColor??void 0,f={"--color-feedback-icon":a?l:d,"--color-matching-feedback-bubble-bg":d,"--color-multiple-choice-complete-border":d,"--color-multiple-choice-correct-border":l,"--color-multiple-response-correct-border":l,"--color-multiple-response-incorrect-border":d,"--color-multiple-response-option-check":r?l:void 0,"--color-quiz-option-check":l,"--color-x-fill":d};return(0,s.jsx)("div",{className:Yc({activeIndex:e,index:n}),"data-testid":"quiz-item-card",inert:o?void 0:!0,children:(0,s.jsx)("div",{className:koe("content"),children:(0,s.jsx)(r6,{isActive:o,isComplete:r,isTimedQuiz:!!i,style:f,children:(0,s.jsx)("div",{hidden:!o&&!r,children:t})})})})}const Eoe=$("quiz-card");function Noe({blockId:e,enableVideoPlaybackSpeed:t,index:n,isActive:o,item:r,labels:a,media:i}){const c=ct();if(!i)return null;const l=c(i),{audio:d,image:h,video:m,embed:f}=l??{},v={allowTabNavigation:o,blockId:e,enableVideoPlaybackSpeed:t,item:r,labels:a};return d&&h?(0,s.jsx)("div",{className:`${Eoe("media",{"image-with-audio":!0})}`,children:(0,s.jsx)(_o,{...v,index:String(n),isOverlayAudio:!0,media:i})}):d&&(m||f)?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_o,{...v,index:`${n}-audio`,media:{audio:d}}),(0,s.jsx)(_o,{...v,index:String(n),media:m?{video:m}:{embed:f},shouldPause:!o})]}):(0,s.jsx)(_o,{...v,index:String(n),media:i,shouldPause:!o})}function F5(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(o=>t.indexOf(o)).filter(o=>o!==-1);const n=t.indexOf(e);return n===-1?void 0:n}const{FILL_IN_THE_BLANK:joe,MATCHING:woe,MULTIPLE_CHOICE:Aoe,MULTIPLE_RESPONSE:Roe}=pn;function Poe({color:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,isShuffled:f,item:v,itemProgress:C,labels:g,onChoiceSelect:b,onFillInChange:x,onMatchSet:y,onResponseToggle:L,onSubmit:S,prefersKeyboardNavigation:T,questionHtmlId:k,quizAcceptableResponses:E,quizAnswerPlaceholder:I,revealAnswers:j}){const{answers:P,type:N}=v,R=c&&!l,w=P??[],A=("correct"in v?v.correct:void 0)??"",M=("corrects"in v?v.corrects:void 0)??[],O=C?.text??"",B=C?.matches??{},D=(0,u.useCallback)(({title:V})=>(0,s.jsx)(we,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:V}),[c]),H=(0,u.useCallback)(({title:V})=>(0,s.jsx)(we,{allowTabNavigation:c,tagName:"span",value:V}),[c]);switch(N){case joe:return(0,s.jsx)(h6,{allowTabNavigation:c,correctAnswerColor:n,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isComplete:l,isCorrect:d,labels:g,onChange:x,onEnterToSubmit:S,options:w,questionHtmlId:k,quizAcceptableResponses:E,quizAnswerPlaceholder:I,revealAnswers:j,value:O});case woe:return(0,s.jsx)(v6,{answers:w,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:o,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,matches:B,onChange:y,prefersKeyboardNavigation:T,revealAnswers:j});case Roe:{const V=C?.selectedIndices,G=C?.shuffledAnswerIndices??[],_=f?F5(V,G):V;return(0,s.jsx)(b6,{allowTabNavigation:c,correctIds:M,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:g,onChange:L,onEnterToSubmit:S,options:w,questionHtmlId:k,renderOptionText:H,revealAnswers:j,selectedIndices:_??[]})}case Aoe:default:{const V=C?.selectedIndex,G=C?.shuffledAnswerIndices??[],_=f?F5(V,G):V;return(0,s.jsx)(x6,{allowTabNavigation:R,color:e,correctId:A,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:g,onChange:b,onEnterToSubmit:S,options:w,questionHtmlId:k,renderOptionText:D,revealAnswers:j,selectedIndex:_??-1})}}}const Fr=$("quiz-card");function Moe({color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:o,interaction:r,isQuestionBankQuiz:a,isReduceMotion:i,isShuffled:c,item:l,items:d,labels:h,lessonId:m,onTakeAgain:f,prefersKeyboardNavigation:v,progress:C,settings:g,showNextButton:b}){const{canProceed:x,canSubmit:y,errorIncomplete:L,feedbackRef:S,errorMessageId:T,feedbackValue:k,handleChoiceSelect:E,handleFillInChange:I,handleMatchSet:j,handleNextFeedbackClick:P,handleResponseToggle:N,handleSubmit:R,handleTakeAgain:w,isActive:A,isComplete:M,isCorrect:O,isRetaking:B,itemProgress:D,quizItemHtmlId:H,selection:V,wrapperRef:G}=r,_=n?o+1:o,Y=g?.revealAnswers===!0?Pe.ALL:g?.revealAnswers??Pe.NONE,se=`q-${l.id}`,Z=l.settings,W=g?.correctAnswerColor??void 0,F=g?.correctAnswerColorContrast??void 0,z=g?.incorrectAnswerColor??void 0,Q=g?.incorrectAnswerColorContrast??void 0,K=h?.quizQuestion??"",q=h?.quizAcceptableResponses??"",ee=h?.quizAnswerPlaceholder??"",J=h?.quizCorrect??"",ne=h?.quizIncorrect??"",oe=h?.quizSubmit??"",xe=C?.percentComplete===100&&a?h?.quizRestart??"":h?.quizNext??"";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Sq,{isActive:A,labels:h,questionLabel:K,questionNumber:o+1,totalQuestions:d.length}),(0,s.jsx)(As,{anchor:{kind:"question",lesson:String(m),question:String(l.id)},label:"Comments on quiz question",children:(0,s.jsx)(Tq,{allowTabNavigation:A,htmlId:se,value:l.title})}),(0,s.jsx)(Noe,{blockId:l.id,enableVideoPlaybackSpeed:t,index:_,isActive:A,item:l,labels:h,media:l.media}),(0,s.jsx)(l6,{type:l.type,children:(0,s.jsx)("div",{ref:G,children:(0,s.jsx)(Poe,{canSubmit:y,color:e,columnBehavior:Z?.columnBehavior,correctAnswerColor:W,correctAnswerColorContrast:F,errorMessageId:T,incorrectAnswerColor:z,incorrectAnswerColorContrast:Q,isActive:A,isComplete:M,isCorrect:O,isReduceMotion:i,isRetaking:B,isShuffled:c,item:l,itemProgress:D,labels:h,onChoiceSelect:E,onFillInChange:I,onMatchSet:j,onResponseToggle:N,onSubmit:R,prefersKeyboardNavigation:v,questionHtmlId:se,quizAcceptableResponses:q,quizAnswerPlaceholder:ee,revealAnswers:Y})})}),(0,s.jsx)("div",{"aria-live":"assertive",children:L&&(0,s.jsxs)("div",{className:`${Fr("validations")}`,"data-testid":"quiz-validation-error",children:[(0,s.jsx)(ue,{className:`${Fr("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,s.jsx)("span",{id:`${H}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,s.jsx)(c6,{canProceed:x,feedbackRef:S,feedbackValue:k,isActive:A,isComplete:M,isCorrect:O,item:l,labels:h,quizCorrect:J,quizIncorrect:ne,revealAnswers:Y,selection:V}),(0,s.jsx)(o6,{allowNext:!f,canProceed:x,canSubmit:y,isReduceMotion:i,onNext:b?P:void 0,onSubmit:R,quizNext:xe,quizSubmit:oe}),f&&(0,s.jsx)("div",{className:`${Fr("retake-container",{active:M})}`,children:(0,s.jsx)("button",{className:`${Fr("retake",{active:M})}`,onClick:w,type:"button",children:(0,s.jsxs)("div",{className:`${Fr("retake-content")}`,children:[(0,s.jsx)("div",{className:`${Fr("retake-text")}`,children:"TAKE AGAIN"}),(0,s.jsx)("i",{className:`${Fr("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:H5,MATCHING:$5,MULTIPLE_CHOICE:V5,MULTIPLE_RESPONSE:z5}=pn;function Ooe(e,t){return e?.items?.[t]??{}}function Boe(e,t,n,o,r){switch(e.type){case H5:return T6({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case $5:return k6(t.matches??{});case z5:return N6({isShuffled:n,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case V5:default:return I6({isCorrectAnswerUnshuffled:o,isShuffled:n,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function Doe(e,t){switch(e.type){case H5:return t.text;case $5:return t.matches;case z5:return t.selectedIndices;case V5:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:Foe,MATCHING:Hoe,MULTIPLE_CHOICE:$oe,MULTIPLE_RESPONSE:Voe}=pn;function zoe({hasStart:e=!1,id:t,index:n,isCorrectAnswerUnshuffled:o=!1,isShuffled:r=!1,item:a,onChoiceSelect:i,onFillInChange:c,onMatchSet:l,onResponseToggle:d,onTakeAgain:h,progress:m,reportAnswer:f,retryAttempts:v=0,setNextIndex:C,settings:g,submitAction:b,title:x}){const y=ct(),L=OC(),[S,T]=(0,u.useState)(!1),[k,E]=(0,u.useState)(Date.now),[I,j]=(0,u.useState)(!1),P=(0,u.useRef)(null),N=(0,u.useRef)(null),R=(0,u.useId)(),w=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:a,itemId:String(a.id),itemProgress:{},retryAttempts:v,revealAnswers:Pe.NONE,settings:g,startTime:k,title:x}),A=e?n+1:n,M=m?.activeIndex??0,O=A===M,B=Ooe(m,a.id),D=B?.isComplete??!1,H=Boe(a,B,r,o,y),V=g?.revealAnswers===!0?Pe.ALL:g?.revealAnswers??Pe.NONE,G=V===Pe.ALL||V===Pe.INCORRECT,_=O&&D&&G,Y=O&&!D&&S6({answersLength:a.answers?.length??0,matches:B?.matches,selectedIndex:B?.selectedIndex,selectedIndices:B?.selectedIndices,text:B?.text,type:a.type});w.current={canSubmit:Y,isCorrect:H,item:a,itemId:String(a.id),itemProgress:B,retryAttempts:v,revealAnswers:V,settings:g,startTime:k,title:x};const se=B?.selectedIndex,Z=j6({answers:a.answers,feedback:"feedback"in a?a.feedback:void 0,feedbackCorrect:"feedbackCorrect"in a?a.feedbackCorrect:void 0,feedbackIncorrect:"feedbackIncorrect"in a?a.feedbackIncorrect:void 0,feedbackType:"feedbackType"in a?a.feedbackType:void 0,isCorrect:H,isShuffled:r,selectedIndex:se,shuffledAnswerIndices:a.shuffledAnswerIndices}),W=Doe(a,B),F=S?`${R}-error-incomplete-message`:void 0,z=(0,u.useCallback)(()=>{T(!1)},[]),Q=String(a.id),K=(0,u.useCallback)(({selectedIndex:ve})=>{z(),i?.({lessonId:t,itemId:Q,selectedIndex:ve,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,Q,a.shuffledAnswerIndices,i,z]),q=(0,u.useCallback)(ve=>{z(),c?.({lessonId:t,itemId:Q,text:ve})},[t,Q,c,z]),ee=(0,u.useCallback)(ve=>{z(),l?.({lessonId:t,itemId:Q,matches:ve})},[t,Q,l,z]),J=(0,u.useCallback)(({optionIndex:ve})=>{z(),d?.({lessonId:t,itemId:Q,selectedIndex:ve,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,Q,a.shuffledAnswerIndices,d,z]),ne=(0,u.useCallback)((ve=()=>{},be)=>{be&&ve(be),C?.({fromIndex:M,lessonId:t})},[M,t,C]),oe=(0,u.useCallback)((ve,be)=>{Le.pause(),ne(ve??(()=>{}),be)},[ne]),xe=(0,u.useCallback)(()=>{O&&oe()},[O,oe]),U=(0,u.useCallback)(ve=>{ve.preventDefault();const{canSubmit:be,isCorrect:le,item:je,itemId:Wt,itemProgress:Ht,retryAttempts:$t,revealAnswers:Kt,settings:Pn,startTime:Ye,title:Nt}=w.current;if(!be){switch(T(!0),je.type){case Foe:case Voe:case $oe:N.current?.querySelector("input")?.focus();break;case Hoe:N.current?.querySelector("button")?.focus();break;default:break}return}w.current.canSubmit=!1;const jt={startTime:Ye,stopTime:Date.now()},{passToContinue:Xe}=Pn??{},Te=Pn?.retryCount??-1,Ve=parseInt(String(Te),10),mo=parseInt(String($t),10),bs=Ve===mo,ys=L({duration:jt,id:t,isCorrect:le,item:je,itemProgress:Ht,retryAttempts:$t,title:Nt});f?.(ys);const e0={finalRetryAttempt:bs,lessonId:t,isCorrect:le,itemId:Wt,passToContinue:Xe,revealAnswers:Kt};if(Kt===Pe.ALL||Kt===Pe.INCORRECT){b?.(e0);return}oe(b,e0)},[L,oe,t,f,b]),ie=(0,u.useCallback)(()=>{j(!0),setTimeout(()=>{h?.(),j(!1)},50)},[h]),ge=(0,De.A)(O)??!1,he=(0,De.A)(D)??!1;return(0,u.useEffect)(()=>{!ge&&O&&E(Date.now())},[O,ge]),{activeIndex:M,canProceed:_,canSubmit:Y,feedbackRef:P,errorIncomplete:S,errorMessageId:F,feedbackValue:Z,handleChoiceSelect:K,handleFillInChange:q,handleMatchSet:ee,handleNextFeedbackClick:xe,handleResponseToggle:J,handleSubmit:U,handleTakeAgain:ie,isActive:O,isComplete:D,isCorrect:H,isRetaking:I,itemProgress:B,prevIsActive:ge,prevIsComplete:he,quizItemHtmlId:R,selection:W,wrapperRef:N}}const _oe=3;function Uoe({feedbackRef:e,isActive:t,isComplete:n,isReduceMotion:o,prevIsActive:r,prevIsComplete:a,quizTop:i,revealAnswers:c,scrollId:l}){const d=(0,u.useRef)(void 0);(0,u.useEffect)(()=>()=>{clearTimeout(d.current)},[]),(0,u.useEffect)(()=>{if(!r&&t){const h=i??_oe,m=o?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:h,behavior:m})}},[t,r,o,i,l]),(0,u.useEffect)(()=>{if(!(!t||c===Pe.NONE||o))return!a&&n&&(clearTimeout(d.current),d.current=setTimeout(()=>{const h=e.current;if(!h)return;const m=h.offsetHeight+h.offsetTop,f=o?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:m,behavior:f})},750)),()=>{clearTimeout(d.current)}},[e,t,n,o,a,c,l])}const Goe=$("quiz-item");function Woe({color:e,enableVideoPlaybackSpeed:t,hasStart:n=!1,id:o,index:r,isCard:a=!1,isCorrectAnswerUnshuffled:i,isQuestionBankQuiz:c=!1,isShuffled:l=!1,isTimedQuiz:d,item:h,items:m,labels:f={},onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:b,onTakeAgain:x,prefersKeyboardNavigation:y,progress:L,quizTop:S,reportAnswer:T,retryAttempts:k=0,scrollId:E,setNextIndex:I,settings:j={revealAnswers:Pe.ALL},showNextButton:P=!0,submitAction:N,title:R}){const w=D5(),A=zoe({hasStart:n,id:o,index:r,isCorrectAnswerUnshuffled:i,isShuffled:l,item:h,onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:b,onTakeAgain:x,progress:L,reportAnswer:T,retryAttempts:k,setNextIndex:I,settings:j,submitAction:N,title:R}),{activeIndex:M,feedbackRef:O,isActive:B,isComplete:D,isCorrect:H,prevIsActive:V,prevIsComplete:G}=A,_=j?.revealAnswers===!0?Pe.ALL:j?.revealAnswers??Pe.NONE;Uoe({feedbackRef:O,isActive:B,isComplete:D,isReduceMotion:w,prevIsComplete:G,prevIsActive:V,quizTop:S,revealAnswers:_,scrollId:E});const Y=(0,s.jsx)(Moe,{color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:r,interaction:A,isQuestionBankQuiz:c,isReduceMotion:w,isShuffled:l,item:h,items:m,labels:f,lessonId:o,onTakeAgain:x,prefersKeyboardNavigation:y,progress:L,settings:j,showNextButton:P});return a?(0,s.jsx)(Ioe,{activeIndex:M,index:n?r+1:r,isActive:B,isComplete:D,isCorrect:H,isTimedQuiz:d,settings:j,children:Y}):(0,s.jsx)("div",{className:Goe("wrap"),children:Y})}const st=$("odometer"),_5=300,U5=700,Koe=300,Qoe=500,$u=200,Yoe=170,G5=145,Zn=$u/2,Xn=Yoe/2,Pc=70,W5=1.5,Zoe=2.5,Xoe=225,qoe=135,K5=270,$p=7,Ya={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},Yo={size:12,topOffset:-3,bottomOffset:21};function Joe(e){return e<.5?16*e**5:1+16*(e-1)**5}function ere(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function Vu({angle:e,centerX:t,centerY:n,radius:o}){const r=(e-90)*Math.PI/180;return{x:t+o*Math.cos(r),y:n+o*Math.sin(r)}}function Vp({centerX:e,centerY:t,counterClockwise:n=!1,endAngle:o,radius:r,startAngle:a}){const i=Vu({angle:a,centerX:e,centerY:t,radius:r}),c=Vu({centerX:e,centerY:t,radius:r,angle:o}),d=Math.abs(o-a)>180?"1":"0",h=n?"0":"1";return`M ${i.x} ${i.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function Q5(e,t,n){return t+n*K5*e/100}function tre({hasPassed:e,isResultsVisible:t,isRTL:n,onAnimationDone:o,passingLabel:r,passingScore:a,score:i=0,scoreLabel:c,shouldAnimate:l}){const[d,h]=(0,u.useState)(0),[m,f]=(0,u.useState)(0),[v,C]=(0,u.useState)(!1),b=`hatch-pattern${(0,u.useId)()}`,x=(0,u.useRef)(null),y=(0,u.useRef)(!1),L=(0,u.useRef)([]),S=(0,u.useCallback)(()=>{L.current.forEach(clearTimeout),L.current=[]},[]),T=(0,u.useCallback)(()=>{x.current!==null&&(cancelAnimationFrame(x.current),x.current=null),S()},[S]);(0,u.useEffect)(()=>{t||(T(),y.current=!1,h(0),f(0),C(!1))},[t,T]),(0,u.useEffect)(()=>{if(!t||!l||y.current)return;y.current=!0;const Y=i,se=setTimeout(()=>{let Z=null;const W=F=>{Z===null&&(Z=F);const z=F-Z,Q=Math.min(z/U5,1),K=Joe(Q),q=ere(Q);if(f(K),h(Math.round(q*Y)),Q<1)x.current=requestAnimationFrame(W);else{f(1),h(Y);const ee=setTimeout(()=>{C(!0);const J=setTimeout(()=>{o?.()},Qoe);L.current.push(J)},Koe-_5-U5);L.current.push(ee)}};x.current=requestAnimationFrame(W)},_5);L.current.push(se)},[t,l,i,o]),(0,u.useEffect)(()=>()=>{T()},[T]);const k=n?qoe:Xoe,E=n?-1:1,I=Q5(a,k,E),j=Q5(m*i,k,E),P=k+E*K5,N=Vu({centerX:Zn,centerY:Xn,radius:Pc,angle:j}),R=Vu({centerX:Zn,centerY:Xn,radius:Pc,angle:I}),w=m*i>=a,A=n?`%${a}`:`${a}%`,M=n?`%${d}`:`${d}%`,O=`${c} ${n?`%${i}`:`${i}%`}`,B=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:st("pass-mark-label"),children:r}),(0,s.jsx)("div",{className:st("pass-mark-percent"),children:A})]}),D=Vp({centerX:Zn,centerY:Xn,counterClockwise:n,radius:Pc,startAngle:k,endAngle:P}),H=Vp({centerX:Zn,centerY:Xn,counterClockwise:n,radius:Pc+3,startAngle:I,endAngle:P}),V=m>0?Vp({centerX:Zn,centerY:Xn,counterClockwise:n,radius:Pc,startAngle:k,endAngle:j}):"",G={x:R.x+(n?-13:13),y:R.y-13},_={x:G.x+(n?-13:13),y:G.y};return(0,s.jsxs)("div",{className:st(),children:[(0,s.jsxs)("svg",{"aria-hidden":"true",className:st("svg"),viewBox:`0 0 ${$u} ${G5}`,children:[(0,s.jsx)("defs",{children:(0,s.jsx)("pattern",{height:"1.5",id:b,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,s.jsx)("line",{className:st("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,s.jsx)("path",{className:st("passing-zone"),d:H,fill:"none",stroke:`url(#${b})`,strokeWidth:"6"}),(0,s.jsxs)("g",{className:st("pass-mark-lines"),children:[(0,s.jsx)("line",{className:st("pass-mark-line"),x1:R.x,x2:G.x,y1:R.y,y2:G.y}),(0,s.jsx)("line",{className:st("pass-mark-line"),x1:G.x,x2:_.x,y1:G.y,y2:_.y})]}),(0,s.jsx)("path",{className:st("track"),d:D,fill:"none",strokeWidth:W5}),V&&(0,s.jsx)("path",{className:st("progress",{passing:w}),d:V,fill:"none",strokeWidth:W5}),m>0&&(0,s.jsx)("circle",{className:st("dot",{passing:w}),cx:N.x,cy:N.y,r:Zoe}),v&&(0,s.jsx)("g",{className:st("result-icon"),children:e?(0,s.jsx)("path",{className:st("checkmark"),d:`M ${Zn+Ya.start.dx} ${Xn+Ya.start.dy} L ${Zn+Ya.mid.dx} ${Xn+Ya.mid.dy} L ${Zn+Ya.end.dx} ${Xn+Ya.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:$p}):(0,s.jsxs)("g",{className:st("x-mark"),children:[(0,s.jsx)("path",{className:st("x-line",{first:!0}),d:`M ${Zn-Yo.size} ${Xn+Yo.topOffset} L ${Zn+Yo.size} ${Xn+Yo.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:$p}),(0,s.jsx)("path",{className:st("x-line",{second:!0}),d:`M ${Zn+Yo.size} ${Xn+Yo.topOffset} L ${Zn-Yo.size} ${Xn+Yo.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:$p})]})})]}),(0,s.jsxs)("div",{className:st("score",{pass:v&&e,fail:v&&!e}),children:[(0,s.jsx)("div",{className:st("score-label"),children:c}),(0,s.jsx)("div",{className:st("pass-label"),children:O}),(0,s.jsx)("div",{className:st("fail-label"),children:O}),(0,s.jsx)("div",{className:st("score-percent",{hidden:v}),children:M})]}),(0,s.jsx)("div",{className:st("pass-mark"),style:{"--pass-mark-x":`${(n?$u-_.x:_.x)/$u*100}%`,"--pass-mark-y":`${(_.y+3)/G5*100}%`},children:B}),(0,s.jsx)("div",{className:st("pass-mark-mobile"),children:B})]})}const Y5=(0,u.createContext)({handleExpiredQuiz:mn,hideTimer:mn,quizTime:0,resetQuizTimer:mn,timerDuration:0,timerHidden:!1,timerRunning:!1});function nre({children:e,handleExpiredQuiz:t=()=>{},isTimedQuiz:n,courseProgress:o,setQuizLessonTimeRemaining:r=()=>{},timerDuration:a=10}){const i=(0,u.useRef)(void 0),[c,l]=(0,u.useState)(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),[v,C]=(0,u.useState)(),g=(0,u.useMemo)(()=>Number(a),[a]),{activeIndex:b,endIndex:x,lessonId:y,lessonProgress:L,startIndex:S}=(0,u.useMemo)(()=>{const O=o?.currentLesson,B=o?.lessons?.[O],D=B?.activeIndex||0,H=Object.keys(B?.items||{}).length+1;return{activeIndex:D,lessonId:O,endIndex:H,lessonProgress:B,startIndex:0}},[o]),T=(0,De.A)(y),k=(0,De.A)(b),E=(0,u.useCallback)(()=>{l(g*60)},[g]),I=(0,u.useCallback)(()=>{l(O=>O-1)},[l]),j=(0,u.useCallback)(()=>{h(!0),i.current||(i.current=setInterval(I,1e3))},[I,h]),P=(0,u.useCallback)(O=>{f(O!==void 0?O:!m)},[m]),N=(0,u.useCallback)(()=>{h(!1),i.current&&(i.current=clearInterval(i.current))},[h]),R=(0,u.useCallback)(()=>{c&&v!==void 0&&r({lessonId:v,timeRemaining:c})},[v,c,r]),w=(0,u.useCallback)(()=>{R(),l(void 0)},[l,R]),A=(0,u.useCallback)(()=>l(L.timeRemaining||g*60),[L,g,l]);(0,u.useEffect)(()=>{if(!n)return;const O=T!==y,B=O&&c,D=O&&n;n&&!O&&v!==y&&C(y),B&&w(),D&&A()},[n,v,y,T,c,A,w]),(0,u.useEffect)(()=>{if(n)switch(b){case S:N();break;case x:E(),N();break;default:j(),k!==b&&T===y&&R()}},[b,x,n,y,k,T,E,S,j,N,R]),(0,u.useEffect)(()=>{n&&c<1&&N()},[n,c,N]),(0,u.useEffect)(()=>()=>N(),[N]);const M=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:P,quizTime:c,resetQuizTimer:E,timerDuration:g,timerHidden:m,timerRunning:d}),[t,P,c,E,g,m,d]);return(0,s.jsx)(Y5.Provider,{value:M,children:e})}const Z5=()=>(0,u.useContext)(Y5),sre=e=>e.isTimedQuiz?(0,s.jsx)(nre,{...e,children:e.children}):(0,s.jsx)(s.Fragment,{children:e.children}),ore={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function rre(e){const t=de(),n=xr(),o=Rt(e??""),r=(0,u.useMemo)(()=>{if(!t||!n||!o)return ore;const l=zC({course:t,courseProgress:n});return ZC({course:t,courseProgress:n,lesson:o,restrictingQuiz:l})},[t,n,o]),{restrictingQuiz:a}=r,i="title"in a?a.title:void 0,c=lt(i);return(0,u.useMemo)(()=>i?{...r,restrictingQuiz:{...a,title:c}}:r,[r,a,i,c])}const X5=$("quiz-results");function are({skipToLessonId:e}){const t=ye(),n=aw(e),o=Vh(),{lessonPreposition:r,quizSkipAhead:a}=t??{},i=n>0&&a&&r?`${a} ${n} ${r} ${o}`:a;return i?(0,s.jsxs)(bu,{className:"continue-btn--flex",href:gn(e),testId:"quiz-skip-ahead-btn",children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"arrow-right-from-line"}),i]}):null}function ire({isFooterVisible:e,isResultsVisible:t,lessonId:n,onTryAgainFocus:o}){const r=ot(),a=Nl(n),{passed:i=!1,retryAttempts:c=0}=a??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=zh(n),{resetQuizTimer:v}=Z5(),C=Qse(l),g=ye(),b=mw(n),x=rre(b),{isRestricted:y}=x,{courseFinish:L,quizContinue:S,quizTakeAgain:T}=g??{},k=h&&i&&!!f,E=C,I=Yse({canShowContinue:E,isExport:C8(),isRiseCom:!1,nextLesson:b}),j=(0,u.useCallback)(()=>{v(),r(Vv(n))},[r,v,n]),P=E&&y&&b&&g&&(0,s.jsx)(qy,{bgType:"transparent",text:Ej({labels:g,restrictions:x})}),N=E&&!y&&b&&(!k||m)&&S&&(0,s.jsx)(bu,{className:k?"continue-btn--outline":void 0,href:gn(b),text:S}),R=I&&L&&(0,s.jsx)(bu,{href:fv,text:L}),w=(d===-1||c<d)&&(0,s.jsxs)(s6,{allowTabNavigation:t,onClick:j,onFocus:o,size:"lg",testId:"quiz-take-again-button",children:[(0,s.jsx)(ue,{"aria-hidden":"true",name:"arrow-rotate-left"}),T]});return(0,s.jsx)("div",{className:X5("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,s.jsxs)("div",{className:X5("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[k&&(0,s.jsx)(are,{skipToLessonId:f}),P,N,R,w]})})}const Za=$("quiz-results");function cre({lessonId:e,questionCount:t}){const n=ot(),o=Nl(e),{activeIndex:r=0,passed:a=!1,passingScore:i=80,reportResults:c=!1,score:l=0}=o??{},d=ye(),h=as(),{skipLessonsIfPassed:m,skipToLessonId:f}=zh(e),[v,C]=(0,u.useState)(!1),g=t+1===r,b=(0,u.useRef)(g),x=(0,u.useRef)(void 0),y=(0,u.useRef)(void 0),L=(0,u.useRef)(null),S=(0,u.useId)(),{a11yQuizFailed:T="",a11yQuizPassed:k="",quizPassing:E="",quizResults:I="",quizScore:j=""}=d??{},P=`quiz-results-desc-${S}`,N=(0,u.useCallback)(()=>{y.current=setTimeout(()=>{C(!0),window.dispatchEvent(new CustomEvent(Kl))},500)},[]),R=(0,u.useCallback)(()=>{clearTimeout(y.current),y.current=void 0,C(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(y.current)},[]),(0,u.useEffect)(()=>{g!==b.current&&(g?L.current?.focus():C(!1),b.current=g)},[g]),(0,u.useEffect)(()=>{if(!g||!a||!m||!f){x.current=void 0;return}const w=`${e}:${f}`;x.current!==w&&(x.current=w,n(OE({quizId:e,destinationId:f})))},[n,a,g,e,m,f]),(0,s.jsx)("div",{className:Za(),children:(0,s.jsx)("div",{className:Za("container"),children:(0,s.jsxs)("div",{className:Za("content",{active:g}),"data-testid":"quiz-results",children:[(0,s.jsxs)("div",{className:Za("header"),children:[(0,s.jsx)("h1",{"aria-describedby":P,className:Za("label").mix("noOutline"),ref:L,tabIndex:-1,children:I}),(0,s.jsxs)("div",{className:"visually-hidden-always",id:P,children:[(0,s.jsx)("div",{children:`${E}: ${i}%`}),(0,s.jsx)("div",{children:`${j}: ${l}%`}),(0,s.jsx)("div",{children:a?k:T})]})]}),(0,s.jsx)("div",{"aria-hidden":"true",className:Za("results"),children:(0,s.jsx)(tre,{hasPassed:a,isResultsVisible:g,isRTL:h,onAnimationDone:N,passingLabel:E,passingScore:i,score:l,scoreLabel:j,shouldAnimate:c})}),(0,s.jsx)(ire,{isFooterVisible:v,isResultsVisible:g,lessonId:e,onTryAgainFocus:R})]})})})}const Mc=$("callout");function lre({icon:e,title:t,children:n}){return(0,s.jsxs)("div",{className:Mc(),role:"status",children:[(0,s.jsx)(ue,{className:Mc("icon"),name:e}),(0,s.jsxs)("div",{className:Mc("content"),children:[(0,s.jsx)("p",{className:Mc("title"),children:t}),(0,s.jsx)("div",{className:Mc("body"),children:n})]})]})}const dre=5,ure=15,hre=30,mre=60,fre=180,q5=300,J5=600,e4=120,pre=e=>e<=dre?{regularInterval:mre,lowTimeThreshold:e4}:e<=ure?{regularInterval:fre,lowTimeThreshold:e4}:e<=hre?{regularInterval:q5,lowTimeThreshold:q5}:{regularInterval:J5,lowTimeThreshold:J5},gre=(e,t,n,o)=>{const r=Math.floor(o/60),a=o%60,i=r===1?e:t;if(r>0&&a>0)return`${n}: ${r} ${i} and ${a} seconds`;if(r>0&&a===0)return`${n}: ${r} ${i}`;if(r===0&&a>0)return`${n}: ${a} seconds`};var Ds=p(49860);const dn=$("quiz-timer"),zp=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,vre=e=>{const t=Math.floor(e/60),n=e%60;return zp(t,n)},t4=e=>{const t=Math.floor(e/60),n=e%60;return zp(t,n)},Cre=e=>zp(e,0),n4=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:n=!1,isEndScreenActive:o=!1,labelQuizTimerElapsed:r,labelQuizTimerExpired:a,labelQuizTimerExpiredAction:i,labelQuizTimerExpiredMessage:c,labelQuizTimerHide:l,labelQuizTimerLimit:d,labelQuizTimerMinute:h,labelQuizTimerMinutePlural:m,labelQuizTimerRemaining:f,labelQuizTimerShow:v,timerDisplay:C=fr.REMAINING,timerEnabled:g=!1})=>{const[b,x]=Ds.useState(!1),[y,L]=Ds.useState(""),S=Ds.useRef(null),T=Ds.useRef(!1),{hideTimer:k,quizTime:E,timerDuration:I,timerHidden:j,timerRunning:P,handleExpiredQuiz:N}=Z5(),R=I*60,{isCover:w,isHeader:A,isHidden:M}=Ds.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:C===fr.HIDE_TIMER}),[e,C]),O=n&&!w,B=Ds.useMemo(()=>pre(I),[I]),D=Ds.useMemo(()=>({expired:a||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[a,h,m,f]),H=()=>{x(!1),N()},V=Ds.useCallback(()=>{const{regularInterval:se,lowTimeThreshold:Z}=B,W=E<=Z&&E>0&&!T.current,F=S.current!==null&&S.current-E>=se,z=S.current===null;if(W||F){W&&(T.current=!0),S.current=E;const Q=gre(D.minute,D.minutePlural,D.remaining,E);L(Q)}z&&(S.current=E)},[B,E,D]);if(Ds.useEffect(()=>{g&&E!==0&&(w||V())},[V,w,g,P,E]),Ds.useEffect(()=>{if(!g||E!==0||n)return;const se=setTimeout(()=>{x(!0)},1200);return()=>clearTimeout(se)},[E,g,n]),!g||O||o)return null;const G={"header-area":A,"cover-area":w,"hide-timer":M,"exit-course":t},_={display:[w,A&&!n].some(Ee())?null:"none"},Y=()=>({[fr.SUMMARY]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:dn("label"),children:[d,":"]}),(0,s.jsxs)("div",{className:dn("value"),children:[I," ",I===1?h:m]})]}),[fr.REMAINING]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:dn("label"),children:[f,":"]}),(0,s.jsx)("div",{className:dn("value"),children:vre(E)})]}),[fr.ELAPSED]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:dn("label"),children:[r,":"]}),(0,s.jsx)("div",{className:dn("value"),children:t4(R-E)})]}),[fr.ELAPSED_TOTAL]:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:dn("label"),children:[r,":"]}),(0,s.jsxs)("div",{className:dn("value"),children:[t4(R-E)," /"," ",Cre(I)]})]})})[w?fr.SUMMARY:C];return(0,s.jsxs)("div",{className:dn(G),"data-testid":"quiz-timer",style:_,children:[E!==0&&(0,s.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:y}),E===0&&(0,s.jsx)("div",{className:"visually-hidden",role:"alert",children:a||"Time expired"}),A&&j?(0,s.jsxs)("button",{className:dn("hide"),onClick:()=>k(!1),type:"button",children:[(0,s.jsx)(ue,{className:dn("icon"),name:"stopwatch-regular"}),v]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:dn("time"),children:[(0,s.jsx)(ue,{className:dn("icon"),name:"stopwatch-regular"}),(0,s.jsx)("div",{className:dn("desc"),children:Y()})]}),A&&(0,s.jsx)("button",{className:dn("hide"),onClick:()=>k(!0),type:"button",children:l})]}),!w&&b&&fs.createPortal((0,s.jsxs)(uf,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroundScroll:!0,heading:a,hideCloseButton:!0,onCancel:H,onClose:H,onOverlayClick:()=>{},children:[(0,s.jsx)("p",{children:c}),(0,s.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:H,type:"button",children:i})]}),Zs({childType:"dialog"}))]})},qn=$("quiz-start"),xre=e=>(e?.retryAttempts??0)>0;function s4({lessonId:e,isActive:t,hasQuestions:n=!0}){const o=ot(),r=(0,u.useRef)(null),a=Nl(e),i=ye(),c=de(),l=Nh(),d=Rt(e),h=c2(),m=pe(l2),f=l?.authorName,v=l?.avatar,C=c?.theme?.showAuthor??!1,g=c?.theme?.showLessonCount??!1,b=h[e]??0,x=lt(d?.description),y=lt(d?.title),L=wf()==="exiting",S=d?.settings?.timer,T=d?.settings?.asLesson!==!1,{a11yAuthorPrefix:k="",lessonName:E="",lessonPreposition:I="",quizStart:j="",quizTakeAgain:P="",quizTimerElapsed:N="",quizTimerExpired:R="",quizTimerExpiredAction:w="",quizTimerExpiredMessage:A="",quizTimerHide:M="",quizTimerLimit:O="",quizTimerMinute:B="",quizTimerMinutePlural:D="",quizTimerRemaining:H="",quizTimerShow:V=""}=i??{},G=xre(a),_=t&&G,Y=G?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{_&&r.current?.focus()},[_]);const se=()=>{y8(e),o(oh({lessonId:e,fromIndex:0}))},Z=G?P:j;return(0,s.jsx)("div",{"aria-hidden":!t,className:qn(),children:(0,s.jsx)("div",{className:qn("container"),children:(0,s.jsxs)("div",{className:qn("content"),children:[(0,s.jsxs)("div",{className:qn("header"),children:[(0,s.jsx)("div",{className:qn("counter"),children:T&&g&&(0,s.jsx)("div",{className:qn("count"),children:`${E} ${b} ${I} ${m}`})}),(0,s.jsx)(As,{anchor:{field:"title",kind:"lessonField",lesson:String(e)},label:"Comments on quiz title",children:(0,s.jsx)("h1",{ref:r,tabIndex:-1,children:(0,s.jsx)(we,{className:qn("title"),value:y})})}),C&&v&&f?(0,s.jsxs)("div",{className:qn("author"),children:[(0,s.jsx)("img",{alt:"",src:U1(v)}),(0,s.jsxs)("span",{className:"visually-hidden",children:[k," ",f]}),(0,s.jsx)("span",{"aria-hidden":"true",children:f})]}):null]}),n&&S&&!L&&(0,s.jsx)(n4,{area:"cover",exitCourseEnabled:c?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:N,labelQuizTimerExpired:R,labelQuizTimerExpiredAction:w,labelQuizTimerExpiredMessage:A,labelQuizTimerHide:M,labelQuizTimerLimit:O,labelQuizTimerMinute:B,labelQuizTimerMinutePlural:D,labelQuizTimerRemaining:H,labelQuizTimerShow:V,timerEnabled:S}),(0,s.jsx)(As,{anchor:{field:"description",kind:"lessonField",lesson:String(e)},label:"Comments on quiz description",children:(0,s.jsx)(we,{allowTabNavigation:t,className:qn("description"),value:x})}),n?(0,s.jsxs)("button",{className:qn("start-button"),"data-testid":Y,onClick:t?se:mn,tabIndex:t?void 0:-1,type:"button",children:[(0,s.jsx)("span",{className:qn("start-button-text"),children:Z}),(0,s.jsx)(ue,{className:qn("start-button-icon"),name:"chevron-right-solid"})]}):(0,s.jsx)(lre,{icon:"circle-exclamation",title:"No questions found",children:"This quiz has no questions. Contact your admin for help."})]})})})}function bre(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const n=document.querySelector("[data-previous-lesson]");if(!n)return;t(n.clientHeight);const o=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return o.observe(n),()=>{o.disconnect()}},[]),e}const zu=$("quiz");function yre({lessonId:e}){const t=Rt(e);return!e||!gl(t)?null:(0,s.jsx)(Sre,{lessonId:e})}function Sre({lessonId:e}){const t=de(),n=t?.color,o=ye(),r=wf()==="exiting",i=Zi()?.prefersKeyboardNavigation??!1,c=da(e)??"",{activeIndex:l,progress:d,resolvedItems:h,retryAttempts:m,settings:f,sourceItems:v}=goe({lessonId:e}),C=noe({settings:f}),g=bre();Toe({lessonId:e,items:v});const b=eL(h.length),x=tL(l),{items:y,startOffset:L}=nL(h,l);return h.length===0?(0,s.jsx)("section",{className:zu(),"data-quiz":!0,"data-testid":"quiz",children:(0,s.jsx)("div",{className:zu("wrap"),children:(0,s.jsx)("div",{className:Yc({activeIndex:0,index:0}),children:(0,s.jsx)(s4,{hasQuestions:!1,isActive:!0,lessonId:e})})})}):(0,s.jsxs)("section",{className:zu(),"data-quiz":!0,"data-testid":"quiz",children:[f?.timer&&!r&&(0,s.jsx)(n4,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:l===b,isStartScreenActive:l===0,labelQuizTimerElapsed:o?.quizTimerElapsed,labelQuizTimerExpired:o?.quizTimerExpired,labelQuizTimerExpiredAction:o?.quizTimerExpiredAction,labelQuizTimerExpiredMessage:o?.quizTimerExpiredMessage,labelQuizTimerHide:o?.quizTimerHide,labelQuizTimerLimit:o?.quizTimerLimit,labelQuizTimerMinute:o?.quizTimerMinute,labelQuizTimerMinutePlural:o?.quizTimerMinutePlural,labelQuizTimerRemaining:o?.quizTimerRemaining,labelQuizTimerShow:o?.quizTimerShow,timerDisplay:f?.timerDisplay??void 0,timerEnabled:f?.timer}),(0,s.jsxs)("div",{className:zu("wrap"),children:[x&&(0,s.jsx)("div",{className:Yc({activeIndex:l,index:0}),children:(0,s.jsx)(s4,{isActive:l===0,lessonId:e})}),y.map((S,T)=>{const k=S.type===pn.MULTIPLE_CHOICE;return(0,s.jsx)(Woe,{color:n,hasStart:!0,id:e,index:T+L,isCard:!0,isCorrectAnswerUnshuffled:k?eoe(S.shuffledAnswerIndices,S.answers,S.correct):void 0,isShuffled:Jse(S.shuffledAnswerIndices,S.answers),isTimedQuiz:f?.timer,item:S,items:h,labels:o??{},onChoiceSelect:C.onChoiceSelect,onFillInChange:C.onFillInChange,onMatchSet:C.onMatchSet,onResponseToggle:C.onResponseToggle,prefersKeyboardNavigation:i,progress:d,quizTop:g,reportAnswer:G1,retryAttempts:m,scrollId:"page-wrap",setNextIndex:C.onSetIndex,settings:f??void 0,submitAction:C.onSubmit,title:c},`item-${S.id}`)}),(0,s.jsx)("div",{className:Yc({activeIndex:l,index:b}),inert:b===l?void 0:!0,children:(0,s.jsx)(cre,{lessonId:e,questionCount:h.length})})]})]})}function Lre({lessonProgress:e}){const t=e?.id;return(0,s.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper",children:(0,s.jsx)(Fu,{lessonId:t,children:(0,s.jsxs)("div",{className:"page__content",children:[(0,s.jsx)(P5,{lessonProgress:e,type:"quiz"}),(0,s.jsx)(yre,{lessonId:t},`${t??""}-${e?.retryAttempts??0}`)]})})})})}const _u=$("lesson-header"),io=({avatar:e,authorName:t,className:n=""})=>{const o=ye();return(0,s.jsxs)("div",{className:_u("author").mix(n),children:[(0,s.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?gt(e):void 0}),(0,s.jsx)("span",{className:"visually-hidden-always",children:o?.a11yAuthorPrefix}),(0,s.jsx)("span",{className:"lesson-header__author-name",children:t})]})},Uu=({showPartnerContent:e=!1})=>(0,s.jsx)("div",{className:_u("author",{"partner-content":e})}),co=()=>(0,s.jsx)("div",{className:"lesson-header__counter"}),lo=({lessonName:e,lessonPreposition:t,totalLessons:n,lessonNumber:o,showPartnerContent:r=!1})=>{const{lmsOptions:a}=de();return(0,s.jsx)("div",{className:_u("counter",{"partner-content":r}),children:(0,s.jsx)("div",{className:_u("count",{"exit-button-enabled":a?.enableExitCourse}),children:`${e} ${o} ${t} ${n}`})})},Xa=({description:e})=>(0,s.jsx)(we,{className:"lesson-header__description",value:e}),Tre=({children:e})=>(0,s.jsx)("div",{className:"lesson-header__grouped-row",children:e}),kre=({ariaLabel:e,imgRole:t,children:n,sectionStyles:o,topWrapClassName:r})=>(0,s.jsxs)("header",{className:"page__header",children:[(0,s.jsx)("div",{className:"page__header-limit",children:(0,s.jsx)("div",{className:"page__header-container",children:(0,s.jsx)("div",{className:"lesson-header__row",children:(0,s.jsx)("div",{className:"lesson-header__main",children:(0,s.jsx)("div",{className:"lesson-header",children:(0,s.jsx)("div",{className:r,children:n})})})})})}),(0,s.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:o})]}),uo=({title:e,id:t})=>{const n=hx(t,"title"),o=(0,s.jsx)("h1",{className:"lesson-header__title","data-change-path":n,tabIndex:-1,children:(0,s.jsx)(we,{value:e})});return t==null?o:(0,s.jsx)(As,{anchor:{field:"title",kind:"lessonField",lesson:String(t)},label:"Comments on lesson title",children:o})},Zo=$("lesson-header"),o4=e=>`url(${wi({width:76,height:76,imageKey:e.image})})`,_p=({partnerContentAuthors:e})=>{const t=e.map(o=>o.name).join(", "),n=e.length===1;return(0,s.jsxs)("div",{className:Zo("partner-content",{mobile:!0}),children:[(0,s.jsx)("div",{className:Zo("partner-content-author",{single:n}),children:e.map(o=>(0,s.jsx)("div",{className:Zo("partner-content-author-img",{single:n}),style:{backgroundImage:o4(o)}},o.name))}),(0,s.jsx)("span",{"aria-hidden":"true",className:Zo("author-name"),children:t})]})},qa=({partnerContentAuthors:e})=>{const t=ye();return(0,s.jsx)("div",{className:Zo("partner-content"),children:e.map(n=>(0,s.jsxs)("div",{className:Zo("partner-content-author"),children:[(0,s.jsx)("div",{className:Zo("partner-content-author-img"),style:{backgroundImage:o4(n)}}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",n.name]}),(0,s.jsx)("span",{"aria-hidden":"true",className:Zo("author-name"),children:n.name})]})]},n.name))})};var r4=p(49860);const Ja=$("lesson-header"),Ire=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,v=t&&e&&c&&!f,C=v||f||l,g=l&&(v||f);return(0,s.jsxs)("div",{className:Ja("content"),children:[C&&(0,s.jsxs)("div",{className:Ja("info-row"),children:[v?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Uu,{}),f&&(0,s.jsx)(qa,{partnerContentAuthors:i}),g&&(0,s.jsx)("span",{"aria-hidden":"true",className:Ja("info-row--divider"),children:"|"}),l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{})]}),(0,s.jsxs)("div",{className:Ja("title-wrapper",{"no-info":!C}),children:[(0,s.jsx)(uo,{id:m,title:d}),n&&(0,s.jsx)(Xa,{description:n,id:m})]})]})},Ere=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=r4.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,s.jsxs)("div",{className:Ja("content"),children:[l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{}),v&&(0,s.jsx)(io,{authorName:e,avatar:t}),c&&f&&(0,s.jsx)(_p,{partnerContentAuthors:i}),(0,s.jsx)(uo,{id:m,title:d}),n&&(0,s.jsx)(Xa,{description:n,id:m})]})},Nre=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=r4.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,s.jsxs)("div",{className:Ja("content"),children:[l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{}),(0,s.jsx)(uo,{id:m,title:d}),v?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Uu,{showPartnerContent:f}),c&&f&&(0,s.jsx)(qa,{partnerContentAuthors:i}),n&&(0,s.jsx)(Xa,{description:n,id:m})]})};function jre(e){const t=ob();return e.lessonHeaderSize===di.SMALL&&!t?(0,s.jsx)(Ire,{...e}):t?(0,s.jsx)(Ere,{...e}):(0,s.jsx)(Nre,{...e})}const wre=()=>Bt(480);var a4=p(49860);const Up=$("lesson-header"),Are=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null&&i,f=t&&e&&i&&!m,v=f||m||c,C=c&&(f||m);return(0,s.jsxs)("div",{className:Up("content"),children:[v&&(0,s.jsxs)("div",{className:Up("info-row"),children:[f?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Uu,{}),m&&(0,s.jsx)(qa,{partnerContentAuthors:a}),C&&(0,s.jsx)("span",{"aria-hidden":"true",className:Up("info-row--divider"),children:"|"}),c?(0,s.jsx)(lo,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(co,{})]}),(0,s.jsx)("div",{children:(0,s.jsx)(uo,{id:h,title:l})})]})},Rre=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=a4.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,s.jsxs)(s.Fragment,{children:[c?(0,s.jsx)(lo,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(co,{}),f&&(0,s.jsx)(io,{authorName:e,avatar:t}),i&&m&&(0,s.jsx)(_p,{partnerContentAuthors:a}),(0,s.jsx)(uo,{id:h,title:l})]})},Pre=({authorName:e,avatar:t,lessonName:n,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=a4.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,s.jsxs)(s.Fragment,{children:[f?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Uu,{}),i&&m&&(0,s.jsx)(qa,{partnerContentAuthors:a}),(0,s.jsx)(uo,{id:h,title:l}),c?(0,s.jsx)(lo,{lessonName:n,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,s.jsx)(co,{})]})};function Mre(e){const t=wre();return e.lessonHeaderSize===di.SMALL&&!t?(0,s.jsx)(Are,{...e}):t?(0,s.jsx)(Rre,{...e}):(0,s.jsx)(Pre,{...e})}var i4=p(49860);const Gu=$("lesson-header"),Gp=()=>(0,s.jsx)("div",{className:Gu("author--hidden")}),Ore=({authorName:e,avatar:t,description:n,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null&&c,v=t&&e&&c&&!f,C=v||f||l,g=l&&(v||f);return(0,s.jsxs)("div",{className:Gu("content"),children:[C&&(0,s.jsxs)("div",{className:Gu("info-row"),children:[v?(0,s.jsx)(io,{authorName:e,avatar:t}):(0,s.jsx)(Gp,{}),f&&(0,s.jsx)(qa,{partnerContentAuthors:i}),g&&(0,s.jsx)("span",{"aria-hidden":"true",className:Gu("info-row--divider"),children:"|"}),l?(0,s.jsx)(lo,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,s.jsx)(co,{})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)(uo,{id:m,title:d}),n&&(0,s.jsx)(Xa,{description:n,id:m})]})]})},Bre=e=>{const{authorName:t,avatar:n,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,v=c!=null,C=i4.useMemo(()=>n&&t&&l&&!v,[n,t,l,v]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(uo,{id:f,title:h}),(0,s.jsxs)(Tre,{children:[C?(0,s.jsx)(io,{authorName:t,avatar:n}):(0,s.jsx)(Gp,{}),l&&v&&(0,s.jsx)(qa,{partnerContentAuthors:c}),d?(0,s.jsx)(lo,{lessonName:r,lessonNumber:a,lessonPreposition:i,showPartnerContent:v,totalLessons:m}):(0,s.jsx)(co,{})]}),o&&(0,s.jsx)(Xa,{description:o,id:f})]})},Dre=e=>{const{authorName:t,avatar:n,description:o,lessonName:r,lessonNumber:a,lessonPreposition:i,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,v=c!=null,C=i4.useMemo(()=>n&&t&&l&&!v,[n,t,l,v]);return(0,s.jsxs)(s.Fragment,{children:[d?(0,s.jsx)(lo,{lessonName:r,lessonNumber:a,lessonPreposition:i,totalLessons:m}):(0,s.jsx)(co,{}),C?(0,s.jsx)(io,{authorName:t,avatar:n}):(0,s.jsx)(Gp,{}),l&&v&&(0,s.jsx)(_p,{partnerContentAuthors:c}),(0,s.jsx)(uo,{id:f,title:h}),o&&(0,s.jsx)(Xa,{description:o,id:f})]})};function Fre(e){const t=Sd();return e.lessonHeaderSize===di.SMALL&&!t?(0,s.jsx)(Ore,{...e}):t?(0,s.jsx)(Dre,{...e}):(0,s.jsx)(Bre,{...e})}const Hre={[te.RISE_CLASSIC]:jre,[te.HORIZON]:Mre,[te.APEX]:Fre};function $re(e){const t=ht(),n=Hre[t];return(0,s.jsx)(n,{...e})}const Vre=$("lesson-header"),zre=({authorName:e,avatar:t,children:n,description:o,labels:{lessonName:r,lessonPreposition:a},lessonHeaderImageColor:i,lessonHeaderSize:c,lessonHeaderStyle:l,lessonId:d,partnerContentAuthors:h,totalLessons:m,lessonNumber:f,showAuthor:v,showLessonCount:C,title:g})=>{const b=PN(),x=a1(b),y=l===ae.IMAGE,L=Vre("top-wrap"),{alpha:S,ariaLabel:T,media:k,role:E}=Ir("lessonHeaderImage"),I=k?.image,j=(0,u.useMemo)(()=>{if(I&&y){const P=i===it.LIGHT?"#fff":"#000";return Tl({alpha:S,color:P,url:dt(I)})}},[I,y,i,S]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(kre,{ariaLabel:y?T:void 0,imgRole:y?E:void 0,sectionStyles:j,topWrapClassName:L,children:(0,s.jsx)($re,{authorName:e,avatar:t,description:o,lessonHeaderSize:c,lessonId:d,lessonName:r,lessonNumber:f,lessonPreposition:a,partnerContentAuthors:h,showAuthor:v,showLessonCount:C&&!x,title:g,totalLessons:m})}),n]})};function _re(e){const t=e?.customColorLessonHeaderContrast,n=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const o=Dn(n),r=t??o;return(r===ke.AUTO?o:r)===ke.DARK?St.DARK:St.LIGHT},[t,n])}var Ure=p(89464),Wp=p.n(Ure);p.dn(c4);function c4({authors:e,lessonAuthor:t,courseAuthor:n,selectedAuthorId:o}){if(o==="none")return{};if(o){const r=Wp()(e,{id:o});if(r)return r}if(t){const r=Wp()(e,{id:t});if(r)return r}if(n){const r=Wp()(e,{id:n});if(r)return r}return{}}const{LARGE:Gre,SMALL:Wre}=di,{ACCENT:Kre,BLACK:Qre,COLOR:l4,DARK:Yre,GRAY:Zre,IMAGE:d4,LIGHT:Xre,TINT:qre}=ae,Jre=$("lesson-header-wrap");function eae({handleNavigate:e,isLessonEntering:t,isLessonExiting:n,isMobileHeader:o,lesson:r,lessonProgress:a,loadMedia:i,observeProgress:c=!0}){const l=vr(),d=ye(),h=Bi(),m=Zi(),{previewType:f}=Hi(),v=_re(l?.theme);if(!l||!d||r.type!=="blocks"&&r.type!=="quiz")return null;if(r.type==="quiz")return(0,s.jsx)(Lre,{lessonProgress:a?.type==="quiz"?a:void 0});const C=qC({course:l,lesson:r}),g=typeof C=="object"&&C!==null&&"id"in C&&(typeof C.id=="string"||typeof C.id=="number")?String(C.id):null,b=Nj({course:l,lesson:r}),x=jj(l),{author:y,selectedAuthorId:L}=r,{prefersKeyboardNavigation:S}=m??{},{authors:T,color:k,enableVideoPlaybackSpeed:E,showLessonCount:I,theme:j}=l,{hideLessonHeaders:P,lessonHeaderColor:N,lessonHeaderImageColor:R,lessonHeaderSize:w,lessonHeaderStyle:A,navigationType:M,showAuthor:O}=j??{},D=h.find(F=>F.id===L)?.data?.authors,H=c4({authors:T,lessonAuthor:y,courseAuthor:l.author,selectedAuthorId:L}),{avatar:V,authorName:G}=H,_=(0,s.jsx)(zre,{authorName:G,avatar:V,description:r.description,labels:d,lessonHeaderImageColor:R,lessonHeaderSize:w,lessonHeaderStyle:A,lessonId:r.id,lessonNumber:b,partnerContentAuthors:D,showAuthor:O,showLessonCount:I,title:r.title,totalLessons:x,children:(0,s.jsx)(P5,{id:r.id,items:r.items,lessonProgress:a,navigationType:M,scrollPosition:0,type:r.type})}),se=`image-${(R??it.DARK).toLowerCase()}`,Z=Jre({[se]:A===d4,accent:A===Kre,black:A===Qre,collapsed:P,custom:A===l4,dark:A===Yre,gray:A===Zre,image:A===d4,large:w===Gre&&!o,light:A===Xre,mobile:o,small:w===Wre&&!o,tint:A===qre,"video-training":Yr(l)}),W=A===l4?{"--lesson-header-contrast-color":v,"--color-background":N}:{};return(0,s.jsx)(Fse,{animateBlockEntrance:l.animateBlockEntrance??!1,color:k??"",courseTitle:l.title,data:r,enableVideoPlaybackSpeed:E??!1,handleNavigate:e,hideLessonHeaders:P??void 0,isLessonEntering:t,isLessonExiting:n,labels:d,lessonHeader:_,lessonHeaderWrapClasses:Z,lessonHeaderWrapStyles:W,lessonProgress:a?.type==="blocks"?a:void 0,loadMedia:i,nextLesson:g,observeProgress:c,prefersKeyboardNavigation:S,previewType:f})}const tae=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:n="Completion Requirement",labelPercentCompletion:o="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:a="Requirement completed, check mark",labelA11yRequirementNotCompleted:i="Requirement not completed, empty square"})=>{const c=as();if(t==null)return null;const l=Ta({percent:t,label:o,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,s.jsxs)("div",{className:"progress-summary__requirement",children:[(0,s.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,s.jsx)("h2",{className:"progress-summary__requirement-title",children:n}),(0,s.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,s.jsx)("div",{children:l}),(0,s.jsxs)("div",{children:[r,"\xA0",(0,s.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,s.jsx)(u4,{labelA11yRequirementCompleted:a,labelA11yRequirementNotCompleted:i,requirementMet:e!=null&&t<=e})]})},nae=({outOfAttempts:e,quizPassed:t,quizPassingScore:n=100,quizScore:o,quizTitle:r,trackingQuizId:a,labelQuizRequirement:i="Quiz Requirement",labelScoreOf:c="Score of",labelScoreOfPreposition:l="% on",labelViewQuiz:d="View quiz",labelYouScored:h="You scored",labelNoAttemptsRemaining:m="No attempts remaining.",labelA11yRequirementCompleted:f="Requirement completed, check mark",labelA11yRequirementNotCompleted:v="Requirement not completed, empty square"})=>{const C=as();if(!a)return null;const g=Ta({percent:n,label:l,isRTL:C});return(0,s.jsxs)("div",{className:"progress-summary__requirement",children:[(0,s.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,s.jsx)("h2",{className:"progress-summary__requirement-title",children:i}),(0,s.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,s.jsxs)("div",{children:[c," ",g," ",r]}),o==null?(0,s.jsx)("div",{children:(0,s.jsx)(sn,{className:"progress-summary__requirement-stats-link brand--color",to:gn(a),children:d})}):(0,s.jsxs)("div",{children:[h,"\xA0",(0,s.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[o,"%"]})]})]}),e&&(0,s.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,s.jsx)(u4,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:v,requirementMet:t})]})},u4=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:n})=>e?(0,s.jsx)(ue,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,s.jsx)("div",{"aria-label":n,className:"progress-summary__requirement-checkbox-empty",role:"img"}),sae=({dueAt:e})=>e?(0,s.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:$m(e)}):null;var oae=p(22043),rae=p.n(oae);const aae=900,iae=1e4;function cae(){const[e,t]=(0,u.useState)(!1),[n,o]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const a=setTimeout(()=>{t(!0),r=setTimeout(()=>o(!1),iae)},aae);return()=>{clearTimeout(a),clearTimeout(r)}},[]),{recycle:n,run:e}}const lae=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],dae=()=>{const{recycle:e,run:t}=cae(),n=(0,u.useRef)(null);return(0,s.jsx)("div",{className:"progress-summary__confetti",children:(0,s.jsx)(rae(),{canvasRef:n,colors:lae,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var uae=p(72804);const h4=$("progress-summary-card"),hae=({completeLabel:e,isComplete:t,isUrgent:n,completedDate:o,labelDue:r})=>t?(0,s.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,s.jsx)("span",{className:"progress-summary-card__completed-date",children:o})]}):r?(0,s.jsx)("div",{className:["progress-summary-card__due-label",n?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,mae=({cardImageKey:e=null,className:t,color:n="#ff6602",completedAt:o=null,coverImageKey:r=null,disable:a=!1,durationHidden:i=!1,enrolledAt:c=null,hidden:l=!1,imagesUri:d="",isLearningPath:h=!1,isUrgent:m=!1,labelAssignedToMe:f="",labelDue:v="",labelDuration:C="",labelLearningPath:g="",onClick:b=mn,progress:x=0,title:y=""})=>{const L=ye(),S=as(),T=o!==null,k=(0,u.useCallback)(()=>{a||b?.()},[a,b]),E=(0,u.useCallback)(M=>{Jh(M)&&M.preventDefault(),!a&&ma(M)&&b?.()},[a,b]),I=Ta({percent:Math.round(x),label:L?.progressSummaryPercentComplete||"% Complete",isRTL:S}),j=e||r,P=L?.progressSummaryCompleted||"Completed: ",N=o===null?"":`${hs()(new Date(o)).format("MM/DD/YY")}`,R=h4("card",{disabled:a}),w=["progress-summary-card__title-button",t].filter(Boolean).join(" "),A=h4("image-overlay",{"not-started":!(x||T),"in-progress-completed":x||T});return(0,s.jsxs)("div",{"aria-hidden":l,className:R,onClick:k,children:[(0,s.jsxs)("div",{className:"progress-summary-card__content",children:[(0,s.jsx)("button",{"aria-disabled":a,className:w,onKeyDown:E,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,s.jsx)("span",{className:"progress-summary-card__title",children:y||L?.progressSummaryNoTitle||"(No Title)"})}),(0,s.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,s.jsx)("div",{className:"progress-summary-card__hide",children:g}),c&&(0,s.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!x&&!a&&!o&&(0,s.jsx)("span",{className:"progress-summary-card__hide",children:I}),!i&&!T&&(0,s.jsx)("div",{className:"progress-summary-card__duration",children:C}),(0,s.jsx)(hae,{completedDate:N,completeLabel:P,isComplete:T,isUrgent:m,labelDue:v})]})]}),(0,s.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,s.jsx)(uae.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:j,imagesUri:d,s:"cover",style:{backgroundColor:n},w:300}),(0,s.jsx)("div",{className:A}),(0,s.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!x&&!a&&!T&&(0,s.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,s.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,s.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${x}%`}})})})})]})]})},fae=Ne("IMAGES_URI"),m4=(e,t)=>e===1?t:t.concat("s"),Kp=e=>e?.course?.course?.lessons??[],pae=e=>t=>Kp(t).find(n=>n.type!=="section"&&n.id!=null&&!e.includes(n.id)),gae=e=>{const t=Kp(e),{trackingQuizId:n,score:o}=e??{};if(n&&t.length){const r=t.find(({id:i})=>i===n),{settings:{passingScore:a}={}}=r??{};return Number(o)<Number(a)?r:!1}},vae=e=>Kp(e).find(t=>t.type!=="section"),Cae=(e,t)=>(pae(e)(t)||gae(t)||vae(t))?.id??"",xae=e=>{const t=hs().duration(e),n=t.hours(),o=t.minutes(),r=`${n} ${m4(n,"hr")}`,a=`${o} min`;return n>=100?"100+ hrs":n>0&&o>0?[r,a].join(" "):n>0?r:a},bae=({color:e,learningPathId:t})=>{const{learningPathComplete:n,isSuccess:o,nextCourse:r}=pe(b=>b.learningPathUpNext??{}),{dueAt:a,courseId:i="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=ye(),f=(0,u.useMemo)(()=>Cae(l,r),[r,l]),v=r?.color??e,C={cardImageKey:r?.cardImageKey,color:v,coverImageKey:r?.coverImageKey,progress:r?.progress,score:r?.score??void 0,title:r?.title},g=(0,u.useCallback)(()=>{d==="PACKAGE"?(window.top.sessionStorage.setItem("upNextCourseId",i),window.top.location.assign(`/learning-path/${t}`)):T7(`${i}/lessons/${f}`)},[i,t,f,d]);return o&&!n&&(0,s.jsx)("div",{className:"progress-summary__lp-next",children:(0,s.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,s.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,s.jsx)(ue,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,s.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,s.jsx)(mae,{imagesUri:fae,labelCount:`${c} ${m4(c,"lesson")}`,labelDue:$m(a),labelDuration:xae(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:g,...C})})]})})},yae=`${Ne("CDN_URI")}/assets/rise/assets/trophy.svg`,Sae=e=>Object.values(e).filter(({isComplete:t})=>t).length,Lae=e=>{const{color:t,course:n={},courseProgress:o={},lessons:r=[]}=e,a=ot(),{learningPathComplete:i,lpHasFailedQuiz:c}=pe(F=>F.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=o,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:v=[],riseComCourseId:C,riseComLearningPathId:g,trackingCompletionPercentage:b,trackingQuizId:x}=n,y=ra(),L=ye(),S=L??{},T=b==null&&x==null,k=T?d===100:V1(),E=v.length,I=Sae(l),j=(0,u.useCallback)(()=>{a(R7({courseId:C,learningPathId:g}))},[a,C,g]);(0,u.useEffect)(()=>{g&&j()},[]);const P=(0,u.useMemo)(()=>k?n.completedAt?n.completedAt:new Date:null,[n.completedAt,k]),N=(0,u.useMemo)(()=>r.find(F=>F.type==="quiz"&&F.id===x),[x,r]),R=lt(N?.title),w=(0,u.useMemo)(()=>Number(N?.settings?.passingScore??100),[N]),A=x?o.lessons?.[x]:void 0,M=A?.passed??null,O=(0,u.useMemo)(()=>A?.percentComplete===100?A.score??null:null,[A]),B=JC(o,N,x),D=typeof B=="object"&&B!==null&&"outOfAttempts"in B&&B.outOfAttempts===!0,H=x?M:!0,V=rn(),G=T?"progress-summary progress-summary__no-req":"progress-summary",_=ss(n),Y=`You've completed ${I} of ${E} lessons.`,Z=_?k?"Complete":"Incomplete":Y,W=String(Oi(y+" - Progress Summary"));return(0,s.jsx)(Sr,{title:W,children:(0,s.jsxs)("div",{className:G,children:[k&&f&&H&&!V&&(0,s.jsx)(dae,{}),(0,s.jsxs)("header",{className:"progress-summary__header",children:[(0,s.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,children:k&&!T&&H?L?.progressSummaryCongratulations||"Congratulations!":L?.progressSummary||"Progress Summary"}),T?(0,s.jsx)("div",{className:"progress-summary__lessons-completed",children:Z}):k?(0,s.jsxs)("div",{className:"progress-summary__header-completion-date",children:[H&&(0,s.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:yae}),hs()(P).format("MMMM Do, YYYY")]}):(0,s.jsx)(sae,{dueAt:h})]}),(0,s.jsxs)("section",{className:"progress-summary__section",children:[!T&&k&&(0,s.jsx)("div",{className:"progress-summary__requirements-met",children:L?.progressSummaryRequirementsMet||"You've met all the requirements."}),T?!g&&(0,s.jsxs)(sn,{className:"progress-summary__start-over",to:"/",children:[L?.progressSummaryStartOver||"Start Over",(0,s.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,s.jsxs)("div",{className:"progress-summary__requirements",children:[(0,s.jsx)(tae,{labelA11yRequirementCompleted:L?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:L?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:S.progressSummaryCompletionRequirement,labelPercentCompletion:S.progressSummaryPercentCompletion,labelYouCompleted:S.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:b}),(0,s.jsx)(nae,{labelA11yRequirementCompleted:L?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:L?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:S.progressSummaryNoAttemptsRemaining,labelQuizRequirement:S.progressSummaryQuizRequirement,labelScoreOf:S.progressSummaryScoreOf,labelScoreOfPreposition:S.progressSummaryScoreOfPreposition,labelViewQuiz:S.progressSummaryViewQuiz,labelYouScored:S.progressSummaryYouScored,outOfAttempts:D,quizPassed:M,quizPassingScore:w,quizScore:O,quizTitle:R,trackingQuizId:x})]}),(k||T)&&(0,s.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,s.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:L7,role:"link",type:"button",children:L?.progressSummaryBackToLearning||"Back to my learning"}),k&&(!g&&m||g&&i)&&m&&H&&!c&&(0,s.jsx)("span",{className:"progress-summary__completion-control",children:(0,s.jsx)(dF,{})})]})]}),k&&!!g&&(0,s.jsx)(bae,{color:t,learningPathId:g})]})})},f4=({contentClassName:e,lessonId:t,...n})=>(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsx)(Fu,{lessonId:t,children:(0,s.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,s.jsx)(Lae,{...n})})})})});function Tae({content:e,handleNavigate:t,isMobileHeader:n,lessonId:o,lessonProgress:r}){const a=vr(),i=xr(),c=ct(),l=ye(),d=wf(),h=cG(),m=(0,u.useRef)(!1),f=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(d==="exiting"){m.current=!1;const L=f.current;L!=null&&(f.current=null,cl(L));return}m.current||(m.current=!0,e.kind==="lesson"&&(W1(o),f.current=o,jn(GE(o))))},[e.kind,o,d]),(0,u.useEffect)(()=>()=>{const L=f.current;L!=null&&cl(L)},[]);const v=c(a?.title),C=e.kind==="progress-summary"?l?.progressSummary??"":e.kind==="lesson"?c(e.lesson.title):"",g=d==="entering",b=d==="exiting",x=d==="present",y=e.kind==="progress-summary"?(0,s.jsx)(f4,{course:a,courseProgress:i,lessonId:o,lessons:a?.lessonsOnly}):e.kind==="lesson"?(0,s.jsx)(eae,{handleNavigate:t,isLessonEntering:g,isLessonExiting:b,isMobileHeader:n,lesson:e.lesson,lessonProgress:r,loadMedia:h,observeProgress:x}):null;return(0,s.jsx)(Sr,{active:!b,title:Oi(`${C} - ${v}`),children:(0,s.jsx)("div",{className:"page","data-lesson-id":o,children:y})})}var Wu=p(57990),kae=p(19055),Iae=p.n(kae);const p4=$("blocks-slide-indicator-tooltip"),Eae=({disabled:e,left:t,ref:n,text:o,top:r,visible:a})=>{let i=(0,s.jsx)("span",{"aria-hidden":"true",children:o});return e&&(i=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ue,{classNameIcon:p4("icon"),name:"lock"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,s.jsx)("div",{"aria-hidden":!a,className:p4("wrapper",{disabled:e,visible:a}),ref:n,role:"tooltip",style:{left:t,top:r},children:i})},Ku=$("blocks-slide-indicator"),Nae=({active:e,blockNavigationStyle:t,disabled:n,numberOfSlides:o,onKeyDown:r,onClick:a,ref:i,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=Zi()??{},[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(void 0),b=t===E0.NUMBERS,x=c+1,y=`${x} / ${o}`,L=e?`Step ${x} of ${o}, current step`:`Go to step ${x} of ${o}`,S=(0,u.useRef)(null);S.current||=document.getElementById("portal");const T=(0,u.useCallback)(()=>{if(v.current&&C.current){const B=v.current.getBoundingClientRect(),D=C.current.getBoundingClientRect(),H=B.left-D.width-18,V=Math.round(B.top-D.height/2+B.height/2);f({left:H,top:V})}},[]),k=(0,u.useCallback)(()=>{g.current=setTimeout(()=>{T(),h(!0)},300)},[T]),E=(0,u.useCallback)(()=>{clearTimeout(g.current),h(!1)},[]),I=(0,u.useCallback)(()=>{a(c)},[a,c]),j=(0,u.useCallback)(B=>{xn(B)&&h(!1),r(B)},[r]),P=(0,u.useCallback)(()=>{k()},[k]),N=(0,s.jsx)(Eae,{disabled:n,left:m?.left,ref:C,text:y,top:m?.top,visible:d}),R=Ku("button",{active:e,disabled:n,numbers:b}),w=Ku("wrapper"),A=Ku("circle",{active:e,disabled:n}),M=Ku("number",{active:e,disabled:n}),O=b?(0,s.jsx)("span",{"aria-hidden":"true",className:M,children:x}):(0,s.jsx)(ue,{classNameIcon:A,name:"circle-solid"});return(0,s.jsxs)("div",{className:w,ref:i,children:[(0,s.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":n,"aria-label":L+(n?" (unavailable until previous content is completed)":""),className:R,"data-control":"",onBlur:E,onClick:n?void 0:I,onFocus:l?P:void 0,onKeyDown:j,onMouseEnter:k,onMouseLeave:E,ref:v,type:"button",children:O}),S.current&&(0,fs.createPortal)(N,S.current)]})},Hr=$("blocks-slide-controls"),g4=38,jae=8,wae=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:n,onGoToCover:o,onSlideClick:r,slideDisabledState:a,previewType:i})=>{const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=(0,u.useCallback)(x=>{let y=!1,L=-1;if(br(x)||Po(x)){if(e-1>=0)L=e-1;else{o();return}y=!0}else yr(x)||Mo(x)?(e+1<=n-1&&(L=e+1),y=!0):PO(x)?(L=0,y=!0):RO(x)&&(L=n-1,a[L]&&(L=a.findLastIndex(S=>!S)),y=!0);L>=0&&!a[L]&&r(L),y&&(x.stopPropagation(),x.preventDefault())},[e,n,o,r,a]);(0,u.useEffect)(()=>{const x=c.current,y=l.current;if(x&&y){const L=x.getBoundingClientRect(),S=y.getBoundingClientRect(),T=L.bottom-g4,k=L.top+g4;S.bottom>T?x.scrollBy({top:S.bottom-T,left:0,behavior:"smooth"}):S.top<k&&x.scrollBy({top:S.top-k,left:0,behavior:"smooth"})}},[e]);const C=(0,u.useCallback)(()=>{const x=c.current;x&&(h(x.scrollTop>jae),f(x.clientHeight+x.scrollTop<x.scrollHeight))},[]);(0,uc.A)(C);const g=(0,u.useCallback)(yu()(C,100),[C]);Dd(c.current,C);const b=Hr({"touch-preview":dc(i)});return(0,s.jsx)("div",{className:b,children:(0,s.jsx)("div",{className:Hr("page-control-wrapper"),children:(0,s.jsxs)("div",{className:Hr("page-control-inner-wrapper"),children:[(0,s.jsx)("div",{className:Hr("page-control"),onScroll:g,ref:c,children:(0,s.jsx)("div",{className:Hr("slide-dot-wrapper"),children:Iae()(x=>{const y=x===e;return(0,s.jsx)(Nae,{active:y,blockNavigationStyle:t,disabled:a[x],numberOfSlides:n,onClick:r,onKeyDown:v,ref:y?l:null,slideIndex:x},x)},n)})}),(0,s.jsx)("div",{className:Hr("overlay-top",{visible:d})}),(0,s.jsx)("div",{className:Hr("overlay-bottom",{visible:m})})]})})})};var Aae;const Rae=1024,Pae=16/9,v4=Rae/Pae,Mae=e=>typeof e=="string"||typeof e=="number",Oae=e=>Aae(e)&&e.type==="slide"&&Array.isArray(e.items),Oc=e=>{if(!(!Vt(e)||!Vt(e.experiments)))return e.experiments},Bae=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(Mae).map(n=>t[String(n)]).filter(Oae),B1e=(e,t)=>Bae(e,t).map(n=>n.id),Dae=e=>Oc(e)?.showTitle!==!1,C4=e=>Oc(e)?.imageTextLayout,x4=e=>e!==void 0&&e!=="fullBleed",Fae=e=>x4(C4(e)),Hae=e=>Fae(e)&&Oc(e)?.showDescription!==!1,$ae=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isFullWidthBleed:e==="fullBleed",isOverlay:e==="overlay"}),Vae=e=>Oc(e)?.titleVariant,D1e=e=>e&&Oc(e)?.speakerNotes||"",b4=$("presentation-logo"),zae=()=>{const e=de(),t=ks(),n=e?.theme?.showLogo??!0;if(!t||n===!1)return null;const o=e?.theme?.logoPosition??RT;return(0,s.jsx)(qm,{className:b4({[AT[o]]:!0}),imageClassName:b4("image")})};function _ae(e,{designHeight:t,fit:n="width"}={}){const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(1),i=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{const l=o.current;if(!l)return;const d=(f,v)=>{const C=f>0?f/e:1,g=n==="contain"&&t?Math.min(C,v>0?v/t:1):C;a(b=>b===g?b:g)},h=l.getBoundingClientRect();d(h.width,h.height);const m=new ResizeObserver(f=>{i.current!=null&&cancelAnimationFrame(i.current),i.current=requestAnimationFrame(()=>{const v=f[0];v&&d(v.contentRect.width,v.contentRect.height)})});return m.observe(l),()=>{m.disconnect(),i.current!=null&&cancelAnimationFrame(i.current)}},[e,t,n]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:n==="contain"?"center":"top left"};return{containerRef:o,scale:r,scaleStyle:c}}const y4=$("presentation-slide-frame");function Uae({children:e}){const{containerRef:t,scaleStyle:n}=_ae(1024,{designHeight:v4,fit:"contain"});return(0,s.jsx)("div",{className:y4(),ref:t,children:(0,s.jsx)("div",{className:y4("canvas"),style:{width:1024,height:v4,...n},children:e})})}const ft=$("blocks-lesson-slide"),Qp="#fff",Gae=e=>Vt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",Wae=e=>Vt(e)&&(typeof e.id=="string"||typeof e.id=="number"),Yp=e=>{const t={...e,id:e.id??e.blockId};return Wae(t)?t:null},Kae=["image full","image text overlay","quote background"],Qae=({className:e,hasSingleBlock:t})=>{const n=Vn(),{backgroundImageCss:o}=Yh(),r=vn()||Qp,a=n===ae.IMAGE;return t&&a?null:(0,s.jsx)("div",{className:e,style:a&&o?{backgroundImage:o.backgroundImage}:{background:r}})},S4=({className:e})=>{const t=Vn(),{backgroundImageCss:n}=Yh(),o=vn()||Qp,r=t===ae.IMAGE;return(0,s.jsx)("div",{className:e,style:r&&n?{backgroundImage:n.backgroundImage}:{background:o}})},L4=({className:e,showTitle:t,title:n,titleClassName:o,showDescription:r,description:a})=>!t&&!r?null:(0,s.jsxs)("div",{className:e,children:[t&&(0,s.jsx)(we,{className:o,tagName:"h1",value:n}),r&&(0,s.jsx)(we,{className:ft("lesson-description").toString(),value:a})]}),Yae=({backgroundCovers:e,composition:t,header:n,overlayText:o,renderedBlocks:r,isPresentationCourse:a,isMultimediaSlide:i,isChartSlide:c})=>{if(t?.isFullWidthBleed)return(0,s.jsxs)(s.Fragment,{children:[n,(0,s.jsx)("div",{className:ft("full-image"),children:r})]});if(t?.isOverlay)return(0,s.jsxs)("div",{className:ft("composition",{overlay:!0,bleed:!0}),children:[(0,s.jsx)("div",{className:ft("composition-image"),children:r}),o]});if(t){const l=t.imagePosition==="left"?["image","text"]:["text","image"];return(0,s.jsx)("div",{className:ft("composition",{bleed:t.isFullBleed,"image-left":t.imagePosition==="left","image-right":t.imagePosition==="right"}),children:l.map(d=>d==="image"?(0,s.jsx)("div",{className:ft("composition-image"),children:r},"image"):(0,s.jsx)("div",{className:ft("composition-text"),children:n},"text"))})}return a?(0,s.jsxs)(s.Fragment,{children:[n,i||c?r:(0,s.jsx)("div",{className:ft("body"),children:r})]}):(0,s.jsxs)(s.Fragment,{children:[n,(0,s.jsxs)("div",{className:ft("blocks-container"),children:[e,r]})]})};function Zae(e,t,n){if(n)return ft("connected-blocks");const o=t.blocks?.find(l=>l.settings?.backgroundType===ae.IMAGE),r=e.settings?.backgroundType===ae.IMAGE,a=Rse(e.family??"",e.variant??"");return ft("connected-blocks",{"min-half-height":o&&(r&&!a)})}const Xae=({loadMedia:e,onContinue:t,prefersKeyboardNavigation:n,previewType:o,ref:r,revealTargetBlockId:a,slide:i})=>{const c=de(),l=Qs()??"",d=ye(),h=Bi(),m=wo(l),f=m?.type==="blocks"?m:void 0,{animateBlockEntrance:v,color:C,title:g,enableVideoPlaybackSpeed:b}=c,x=i?.lastBlock,y=(0,u.useCallback)(ie=>{ie===x?.id&&t()},[x,t]);if(!i)return null;const{blocks:L,lessonTitle:S,lessonDescription:T,shouldShowAnimation:k=v,shouldShowTitle:E=!0,shouldShowDescription:I=!0,imageTextLayout:j,titleVariant:P}=i,N=a==null?-1:L.findIndex(ie=>String(ie.id??ie.blockId)===String(a)),R=lr(c),w=R&&!j?i.blocks?.[0]?.family:void 0,A=ft("inner",{presentation:R}),M=ft("lesson-title",{heading:P==="heading",subheading:P==="subheading"}).toString(),O=ft("lesson",{slides:!0,"touch-preview":dc(o),media:w==="multimedia",chart:w==="chart"}).toString(),B=i.blocks.length===1,{settings:D,type:H,variant:V}=i.blocks?.[0]??{},G=!B||R?"none":D?.backgroundType===ae.IMAGE?"image-background":Kae.includes(`${H} ${V}`)?"legacy":"none",_=G!=="none"?ft("full-width-image",{legacy:G==="legacy",background:G==="image-background"}):null,Y=E&&S,se=x4(j)&&I&&T,Z=(0,s.jsx)(L4,{className:ft("lesson-header").toString(),description:T,showDescription:!!se,showTitle:!!Y,title:S,titleClassName:M}),W=(0,s.jsx)(L4,{className:ft("composition-overlay-text").toString(),description:T,showDescription:!!se,showTitle:!!Y,title:S,titleClassName:M}),F=j?$ae(j):void 0,z=!F&&k,Q=L.map((ie,ge)=>{const he=N!==-1&&ge<=N;return B||he?!1:N5({blocks:i.blocks,lessonProgress:f,currentBlockIndex:ge})}),K=L.map((ie,ge)=>{const he=Q[ge],ve=_||Zae(ie,i,R),be={...ie,blockId:ie.blockId??ie.id};if(!Gae(be))return null;const le=be,je=Yp(ie),Wt=le.blockId===x?.id,Ht=!R&&!_&&je?(0,s.jsx)(Bl,{block:je,children:(0,s.jsx)(Qae,{className:ft("block-background"),hasSingleBlock:B})}):null;return(0,s.jsx)(Mp,{animateBlockEntrance:z,backgroundBefore:Ht,block:le,className:ve,color:C,courseTitle:g,defaultBackgroundColor:Qp,enableVideoPlaybackSpeed:b,hideBlock:he,index:ge,isLastBlock:Wt,isOnlyBlockInStep:B,labels:d,lessonId:l,lessonProgress:f,loadMedia:e,onContinue:y,partnerContent:h,prefersKeyboardNavigation:n,previewType:o},le.blockId)}),q=L.filter((ie,ge)=>!Q[ge]),ee=!R&&!_&&q.length>=3,J=ee?Yp(q[0]):null,ne=ee?Yp(q[q.length-1]):null,oe=J&&ne?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Bl,{block:J,children:(0,s.jsx)(S4,{className:ft("background-top-cover")})}),(0,s.jsx)(Bl,{block:ne,children:(0,s.jsx)(S4,{className:ft("background-bottom-cover")})})]}):null,xe=(0,s.jsx)(Yae,{backgroundCovers:oe,composition:F,header:Z,isChartSlide:w==="chart",isMultimediaSlide:w==="multimedia",isPresentationCourse:R,overlayText:W,renderedBlocks:K}),U=(0,s.jsxs)("div",{className:A,children:[(0,s.jsx)("div",{className:O,ref:r,children:xe}),(0,s.jsx)(zae,{})]});return R?(0,s.jsx)(Uae,{children:U}):(0,s.jsx)("div",{className:ft("wrapper"),children:U})},Qu=625,qae=100;function Jae({isPresentationCourse:e,reduceMotion:t}){return(t||e?.01:Qu)+qae}const T4="ease",k4=(e,t)=>{t!=null&&(e.currentTime=(1-t)*Qu)},eie=(e,{phase:t,direction:n,reducedMotion:o,fromProgress:r})=>{if(o||typeof e.animate!="function")return null;if(t==="enter"){const c=n==="forward"?"100vh":"-100%",l=e.animate([{opacity:0,transform:`translateY(${c})`},{opacity:1,transform:"translateY(0)"}],{duration:Qu,easing:T4});return k4(l,r),Yd(l)}const a=n==="forward"?"-100vh":"100%",i=e.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${a})`}],{duration:Qu,easing:T4,fill:"forwards"});return k4(i,r),Yd(i)};function tie({currentLessonRef:e,isPresentationCourse:t,numberOfSlides:n,onContinue:o,onCurrentLessonElChange:r,onSlideEntered:a,onTransitioningChange:i,prefersKeyboardNavigation:c,previewType:l,revealTargetBlockId:d,slideIndex:h,slides:m}){const f=(0,u.useRef)(0),v=(0,u.useRef)(h),C=(0,u.useCallback)(L=>{e.current=L,r?.(L)},[e,r]);v.current!==h&&(f.current=e.current?.getBoundingClientRect()?.top??0,v.current=h);const g=m.length>0?Math.max(0,Math.min(h,m.length-1)):0,{presence:b,isTransitioning:x,mediaOwnerInstanceId:y}=S3({current:g,animate:(L,S)=>t?null:eie(L,S),getDirection:(L,S)=>S>L?"forward":"backward",initialStatus:"present",animationTimeoutMs:825,onEntered:()=>{a()}});return(0,u.useEffect)(()=>{i(x)},[x,i]),(0,s.jsxs)(s.Fragment,{children:[b.map(L=>{const S=m[L.key],T=L.status==="exiting";return(0,s.jsx)("div",{ref:L.ref,style:T?{insetInline:0,position:"absolute",top:f.current,zIndex:0}:{position:"relative",zIndex:1},children:(0,s.jsx)(Xae,{loadMedia:L.instanceId===y,onContinue:o,prefersKeyboardNavigation:c,previewType:l,ref:T?void 0:C,revealTargetBlockId:T?void 0:d,slide:S})},L.instanceId)}),(0,s.jsx)("div",{className:"visually-hidden-always",id:"step-counter",style:{insetBlockStart:0},children:n>0&&`Step ${g+1} of ${n}`})]})}var Bc=p(49860);const nie=50,sie=1e3,oie=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:n,timeoutDuration:o=sie})=>{const[r,a]=Bc.useState(!1),i=Bc.useRef(void 0),c=Bc.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>a(!1),o)},[o]),l=Bc.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<nie?(i.current&&clearTimeout(i.current),a(!1)):c();else if(h>100){const m=d.deltaY>0?e:t;a(!0),c(),m()}},[c,r,e,t]);Bc.useEffect(()=>{if(!(!n||!t||!e))return n.addEventListener("wheel",l,{passive:!0}),()=>{i.current&&clearTimeout(i.current),n?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,n])},rie="rise-presenter-sync",V1e="presenterMode",aie="slide",iie="NAVIGATE_TO_SLIDE",cie="SLIDE_CHANGE",z1e="PRESENTER_VIEW_EXIT";function lie(e){const t=new URLSearchParams(e).get(aie);if(t==null)return 0;const n=Number(t);return Number.isFinite(n)&&n>=0?n:0}function die(){const e=window.location.hash.split("?")[1]||"";return lie(e)}var _1e;const Ft=$("lesson-one-page-slides"),uie=$("page-wrap"),Yu=e=>e,hie=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}},mie=e=>Vt(e)&&(typeof e.id=="string"||typeof e.id=="number");function Zp(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("type"),o=e.getAttribute("role"),r=e.tabIndex,a=t==="button"||["div","span"].includes(t)&&(o==="button"||r===0),i=t==="input"&&["radio","text"].includes(n??"")||t==="textarea"||o==="radio",c=["audio","video"].includes(t),l=o==="tab",d=document.querySelector(".quiz-card__interactive")?.contains?.(e)??!1;return a||i||c||l||d}const fie=["button","checkbox","color","file","hidden","image","radio","range","reset","submit"];function I4(e){if(Zp(e))return!0;if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("role"),o=e.getAttribute("type");return e.isContentEditable||n==="textbox"||t==="input"&&!fie.includes(o??"")||(n==="slider"||n==="spinbutton"||t==="input"&&o==="range")}const E4=(e,t)=>(n,o,r)=>E5(n,r.slice(0,-1),e,void 0,t),pie=(e,t)=>({disabled:n,slides:o},r)=>{const a=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),i=r[r.length-1],c=n||jse(a)||wse(a,t),l={blocks:a,lastBlock:i,disabled:n};return{disabled:c,slides:[...o,l]}},Zu=e=>{let t=!1,n=!1;if(e){const{clientHeight:o,scrollHeight:r,scrollTop:a}=e,i=Math.max(0,a),c=r-i;t=c===r,n=c-5<=o}return{isAtTop:t,isAtBottom:n}},gie=/,? +/,vie=[],Cie=({lessonProgress:e,prefersKeyboardNavigation:t,previewType:n})=>{const{announcePolite:o,clearAnnouncements:r}=Ts(),a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),[l,d]=(0,u.useState)(null),[h,m]=(0,u.useState)(null),f=(0,u.useCallback)(re=>{c.current=re,d(re)},[]),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(null),b=(0,u.useRef)(null),x=(0,u.useRef)(null),y=(0,u.useRef)(null),L=(0,u.useRef)(0),S=(0,u.useRef)(0),T=(0,u.useRef)(void 0),k=Jt(),E=ot(),[I,j]=(0,u.useState)(()=>die()),[P,N]=(0,u.useState)(null),[R,w]=(0,u.useState)(!1),[A,M]=(0,u.useState)(!1),[O,B]=(0,u.useState)(!1),D=(0,De.A)(A),H=(0,De.A)(O),V=rn(),{lessons:G,..._}=de()||{},Y=lr(_),se=hie(_?.theme)||E0.DOTS,Z=G?.[0],W=Z?.items||vie,F=A5()||R;(0,u.useEffect)(()=>{const re=Ie=>{if(Ie.origin!==window.location.origin)return;(Array.isArray(Ie.data)?Ie.data:[Ie.data]).forEach(pt=>{Vt(pt)&&pt.type==="preview:lessonUpdate"&&w(!0)})};return window.addEventListener("message",re),()=>window.removeEventListener("message",re)},[]);const z=(0,u.useCallback)(()=>{const re=(c.current?.scrollHeight??0)>(c.current?.clientHeight??0),{isAtBottom:Ie}=Zu(c.current),Je=re&&!A&&!Ie;Je!=O&&B(Je)},[O,A]);Dd(h,z),(0,u.useLayoutEffect)(z,[A]);const Q=(0,u.useCallback)(()=>{c.current?.scrollTo({top:0})},[]);(0,u.useLayoutEffect)(()=>{Q()},[I,Q]);const K=(0,u.useRef)(null),[,q]=(0,u.useState)(0),ee=(0,u.useCallback)(re=>{K.current=re,q(Ie=>Ie+1)},[]);(0,u.useLayoutEffect)(()=>{const re=K.current;if(re==null)return;const Ie=c.current,Je=Ie?.querySelector(`[data-block-id="${re}"]`);if(Ie==null||Je==null)return;K.current=null;let pt=0,un=Je;for(;un instanceof HTMLElement&&un!==Ie&&Ie.contains(un);)pt+=un.offsetTop,un=un.offsetParent;Ie.scrollTo({top:pt})});const J=_?.theme,ne=(0,u.useMemo)(()=>{const Je=(F?W:Bp([],W,e,J)).map(E4(e,J)).filter(pt=>pt!==null);return Object.fromEntries(Je.map(pt=>[pt.blockId,pt]))},[W,e,J,F]),oe=(0,u.useCallback)(re=>{const Ie={disabled:!1,slides:[]},{slides:Je}=re.reduce(pie(ne,e),Ie);return Je},[ne,e]),xe=(0,u.useMemo)(()=>Y?(G??[]).filter(re=>re?.type==="slide"):[],[Y,G]),U=(0,u.useMemo)(()=>Y?xe.map(re=>{const Ie=re.items.map(E4(e,J));return{blocks:Ie,lastBlock:Ie[Ie.length-1],lessonTitle:re?.title,lessonDescription:re?.description,shouldShowTitle:Dae(re),shouldShowDescription:Hae(re),shouldShowAnimation:re?.experiments?.showAnimation??!0,imageTextLayout:C4(re),titleVariant:Vae(re),disabled:!1}}):k0(W,I5,oe),[Y,xe,W,oe,e,J]),ie=(0,u.useMemo)(()=>U.map(re=>re.disabled),[U]),ge=(0,u.useMemo)(()=>I5(W),[W]);(0,u.useEffect)(()=>{L.current=I},[I]),(0,u.useEffect)(()=>{S.current=U.length,U.length>0&&I>=U.length&&j(U.length-1)},[U.length,I]),(0,u.useEffect)(()=>{if(!Y)return;const re=xe[I];if(!re)return;const Ie=T.current;Ie!=null&&Ie!==re.id&&cl(Ie),W1(re.id),E(ml(re.id)),T.current=re.id},[I,Y,xe,E]),(0,u.useEffect)(()=>()=>{const re=T.current;re!=null&&cl(re)},[]),(0,u.useEffect)(()=>{if(!(!Y||typeof BroadcastChannel>"u"))try{x.current||(x.current=new BroadcastChannel(rie));const re=x.current,Ie=Je=>{if(Je.data.type===iie){const pt=Je.data.slideIndex,un=Math.min(pt,S.current-1);un>=0&&y.current&&y.current(un)}};return re.addEventListener("message",Ie),()=>{re.removeEventListener("message",Ie)}}catch{}},[Y,k]),(0,u.useEffect)(()=>{if(!(!Y||!x.current))try{x.current.postMessage({type:cie,slideIndex:I})}catch{}},[Y,I]),(0,u.useEffect)(()=>()=>{x.current?.close(),x.current=null},[]);const he=U.length,ve=he>0?Math.min(I,he-1):0,be=dc(n),le=se!==E0.NONE,je=he===0||ve===he-1,Wt=e?.isComplete,Ht=O||je?!Wt||!0:ie[ve+1],$t=!O&&!je,Kt=$t&&!Ht,Pn=je&&!0,Ye=(0,De.A)(Pn),Nt=O&&!je,jt=(0,u.useCallback)(uu()(z,100),[z]);(0,u.useEffect)(()=>{const re=c.current;return re?.addEventListener("scroll",jt,{passive:!0}),()=>re?.removeEventListener("scroll",jt)},[jt]),(0,u.useEffect)(()=>{document.activeElement===g.current?!H&&O?C.current?.focus({preventScroll:!0}):!Ye&&Pn&&b.current?.focus({preventScroll:!0}):document.activeElement===C.current&&H&&!O&&g.current?.focus({preventScroll:!0})},[O,H,Ye,D,Pn,A]),(0,uc.A)(()=>{Oy(),c.current?.focus?.()});const Xe=(0,u.useCallback)(re=>{const Ie=Math.max(0,Math.min(re,U.length-1));if(Ie===L.current){Q();return}j(Ie)},[Q,U.length]),Te=re=>{const Ie=ge.findIndex(pt=>pt.some(un=>String(un.id)===String(re)));if(Ie===-1)return;const Je=ge[Ie].find(pt=>String(pt.id)===String(re));N(Je?.id??re),ee(Je?.id??re),Z?.id!=null&&!F&&j5(W,Je?.id??re,e).forEach(un=>{mie(un)&&E(fl({blockId:un.id,items:un.items??[],lessonId:Z.id}))}),Ie!==I&&Xe(Ie)},Ve=(0,u.useRef)(Te);(0,u.useEffect)(()=>{Ve.current=Te});const[mo]=(0,Re.ok)(),bs=mo.get(rc);(0,u.useEffect)(()=>{bs!=null&&Ve.current(bs)},[bs]),w5(({lessonId:re,blockId:Ie})=>{(Z?.id==null||re===String(Z.id))&&Ve.current(Ie)});const ys=(0,u.useCallback)(()=>{A||(M(!0),qs(()=>{k("/")},"lesson-to-one-page-cover-stepped"))},[k,A]),e0=_?.exportSettings?.webExportSettings,Hc=Y||!!(!Es.isInstantLink&&(_?.lmsOptions?.disableCoverPage||e0?.disableCoverPage)),t0=I===0&&Hc,tg=(0,u.useCallback)(Hc?()=>Xe(0):ys,[Hc,Xe,ys]);(0,u.useEffect)(()=>{y.current=Xe},[Xe]);const n0=(0,u.useCallback)(()=>{A||(I>0?Xe(I-1):ys())},[Xe,I,A,ys]),s0=(0,u.useCallback)(()=>{A||Xe(I+1)},[Xe,k,je,I,A]),Dce=(0,u.useCallback)(()=>{(I<he-1||je&&!1)&&s0()},[je,I,he,s0]),Y4=(0,u.useCallback)(()=>{const re=c.current?.scrollTop??0,Ie=c.current?.clientHeight??0,Je=V?"instant":"smooth";c.current?.scrollTo({top:re+Ie,behavior:Je})},[V]),o0=(0,u.useCallback)(()=>{s0()},[s0]),Fce=(0,u.useCallback)(()=>{Y4()},[Y4]),Hce=(0,u.useCallback)(re=>{re===I||A||(Xe(re),queueMicrotask(()=>{v.current?.querySelectorAll("[data-control]")?.[re]?.focus?.()}))},[Xe,I,A]),$ce=(0,u.useCallback)(()=>{setTimeout(()=>{if(i.current&&v.current?.contains?.(document.activeElement)){const re=Ap()(i.current.innerText,{length:75,separator:gie});r(),o(`Content preview: ${re}`)}else c.current?.focus?.()},0)},[o,r]),ni=(0,u.useCallback)(()=>{if(be)return;const{isAtTop:re}=Zu(c.current);if(re){I===0?tg():n0();return}},[be,n0,I,tg]),si=(0,u.useCallback)(()=>{if(be||je||Ht)return;const{isAtBottom:re}=Zu(c.current);if(re){o0();return}},[je,Ht,be,o0]),Vce=(0,u.useCallback)(()=>{const{isAtBottom:re,isAtTop:Ie}=Zu(c.current),Je=document.documentElement.clientWidth===window.innerWidth;return(re||Ie)&&Je},[]),zce=(0,u.useCallback)(re=>{!v.current?.contains?.(document.activeElement)&&!Zp(re.target)&&ni()},[ni]),_ce=(0,u.useCallback)(re=>{!v.current?.contains?.(document.activeElement)&&!Zp(re.target)&&si()},[si]),Uce=(0,u.useCallback)(re=>{Y&&!v.current?.contains?.(document.activeElement)&&!I4(re.target)&&ni()},[Y,ni]),Gce=(0,u.useCallback)(re=>{Y&&!v.current?.contains?.(document.activeElement)&&!I4(re.target)&&si()},[Y,si]),r0=(0,u.useCallback)(re=>{re===-1||re===I||Xe(re)},[Xe,I]),ng=(0,u.useCallback)(re=>{const Ie=xe.findIndex(({id:Je})=>String(Je)===re.detail.lessonId);r0(Ie)},[r0,xe]),sg=(0,u.useCallback)(re=>{if(!Y){Ve.current(re.detail.itemId);return}const Ie=U.findIndex(Je=>Je.blocks.some(pt=>("blockId"in pt?pt.blockId:pt.id)===re.detail.itemId));r0(Ie)},[Y,r0,U]);(0,u.useEffect)(()=>(window.addEventListener(am,ng),window.addEventListener(We,sg),()=>{window.removeEventListener(am,ng),window.removeEventListener(We,sg)}),[sg,ng]),(0,u.useEffect)(()=>{const re=Ie=>{y.current?.(Ie.detail.slideIndex)};return window.addEventListener(cm,re),()=>window.removeEventListener(cm,re)},[]),(0,Wu.A)("ArrowUp",Yu,zce),(0,Wu.A)("ArrowDown",Yu,_ce),(0,Wu.A)("ArrowLeft",Yu,Uce),(0,Wu.A)("ArrowRight",Yu,Gce),oie({target:l,onSwipeUpHandler:ni,onSwipeDownHandler:si,timeoutDuration:Jae({isPresentationCourse:Y,reduceMotion:V})});const Wce=Ft("gradient",{visible:O}),Kce=(0,s.jsxs)("nav",{"aria-label":"Slide navigation",className:Ft("presentation-controls"),ref:v,children:[(0,s.jsxs)("button",{"aria-disabled":I===0&&Hc,className:Ft("presentation-btn"),onClick:I===0&&Hc?void 0:n0,type:"button",children:[(0,s.jsx)(ue,{classNameIcon:Ft("presentation-arrow-icon"),name:"chevron-left"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,s.jsx)("span",{"aria-hidden":!0,className:Ft("counter"),children:`${ve+1} / ${he}`}),(0,s.jsxs)("button",{"aria-disabled":!Kt,className:Ft("presentation-btn"),onClick:Kt?o0:void 0,ref:g,type:"button",children:[(0,s.jsx)(ue,{classNameIcon:Ft("presentation-arrow-icon"),name:"chevron-right"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,s.jsx)("div",{className:Ft({}),children:(0,s.jsx)("div",{className:uie({transitioning:A}),id:"page-wrap",ref:f,tabIndex:-1,children:(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper",children:(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(Sr,{children:(0,s.jsxs)("div",{"data-lesson-id":Z?.id,children:[Y?Kce:(0,s.jsxs)("nav",{"aria-label":"Step navigation",className:Ft("controls",{"touch-preview":be}),ref:v,children:[(0,s.jsxs)("button",{"aria-disabled":t0,"aria-hidden":t0,className:Ft("prev-btn",{"touch-preview":be}),onClick:t0?void 0:n0,tabIndex:t0?-1:void 0,type:"button",children:[(0,s.jsx)(ue,{classNameIcon:Ft("arrow-icon",{"touch-preview":be}),name:"arrow-up"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),le&&(0,s.jsx)(wae,{activeSlideIndex:I,blockNavigationStyle:se,numberOfSlides:he,onGoToCover:ys,onSlideClick:Hce,previewType:n,slideDisabledState:ie}),(0,s.jsxs)("div",{className:Ft("next-btns"),children:[(0,s.jsxs)("button",{"aria-disabled":!Nt,"aria-hidden":!Nt,className:Ft("page-down-btn",{"touch-preview":be}),onClick:Nt?Fce:void 0,ref:C,tabIndex:Nt?void 0:-1,type:"button",children:[(0,s.jsx)(ue,{classNameIcon:Ft("arrow-icon",{"touch-preview":be}),name:"arrow-down"}),(0,s.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!O&&(0,s.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),je&&(0,s.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,s.jsxs)("button",{"aria-disabled":Ht,"aria-hidden":!$t,className:Ft("next-btn",{"touch-preview":be}),onClick:!$t||Ht?void 0:o0,ref:g,tabIndex:$t?void 0:-1,type:"button",children:[(0,s.jsx)(ue,{classNameIcon:Ft("arrow-icon",{"touch-preview":be}),name:"arrow-down"}),(0,s.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",Ht&&(0,s.jsx)("span",{children:"(disabled until content is completed)"}),je&&(0,s.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,s.jsxs)("button",{"aria-disabled":!Pn,"aria-hidden":!Pn,className:Ft("restart-btn",{"touch-preview":be}),onClick:Pn?tg:void 0,ref:b,tabIndex:je?void 0:-1,type:"button",children:[(0,s.jsx)(ue,{classNameIcon:Ft("restart-icon",{"touch-preview":be}),name:"arrow-rotate-left"}),(0,s.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,s.jsxs)(Vd,{onShouldRecognizeGesture:Vce,onSwipeDown:ni,onSwipeUp:si,children:[(0,s.jsx)("main",{"aria-describedby":"step-counter",ref:i,tabIndex:0,children:(0,s.jsx)(tie,{currentLessonRef:a,isPresentationCourse:Y,numberOfSlides:he,onContinue:Dce,onCurrentLessonElChange:m,onSlideEntered:$ce,onTransitioningChange:M,prefersKeyboardNavigation:t,previewType:n,revealTargetBlockId:P,slideIndex:ve,slides:U})}),(0,s.jsx)("div",{className:Wce})]})]})})})})})})})},Dc=$("video-checkpoint-player");function xie({activeGroup:e,animateBlockEntrance:t,checkpointGroups:n,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,hasQueuedCheckpoints:c=!1,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,onCheckpointCompleted:f,onCheckpointDismissed:v,partnerContent:C,prefersKeyboardNavigation:g,previewType:b}){const x=(0,u.useRef)(!1),y=(0,u.useMemo)(()=>gX(n),[n]),L=(0,u.useCallback)(()=>{e==null||x.current||(x.current=!0,f?.(e))},[e,f]),S=(0,u.useCallback)(()=>{x.current||(x.current=!0,v?.())},[v]);if((0,u.useEffect)(()=>{e!=null&&(x.current=!1)},[e]),e==null)return null;const T=ro(e),k=su(T),E=oo(e),I=E!=="timestamp",j=y.get(e.checkpoint.id),P=I?kc(l,E==="start"?"videoCheckpointStart":"videoCheckpointDone",E==="start"?"Start video":"Done"):`${l?.videoCheckpointDefaultTitle||"Checkpoint"} ${j??""}`,N=pX(e.checkpoint?.title,P),R=e.blocks??[];let w;c?w=kc(l,"videoCheckpointContinue","Continue"):E==="start"?w=kc(l,"videoCheckpointStartDismiss","Start video"):E==="end"?w=kc(l,"videoCheckpointDone","Done"):w=l?.videoCheckpointResume||"Resume video";const A=N;return(0,s.jsx)(uf,{className:Dc(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",footer:(0,s.jsxs)("button",{"aria-label":`${w} \u2014 ${N}`,className:Dc("resume"),onClick:L,type:"button",children:[w,(0,s.jsx)(pm,{className:Dc("resume-icon"),decorative:"true"})]}),heading:A,onCancel:E==="timestamp"?L:void 0,onClose:E==="end"?L:S,subText:I?void 0:`${l?.videoCheckpointPausedAt||"Paused at"} ${k}`,children:(0,s.jsx)("div",{className:Dc("blocks"),"data-testid":"video-checkpoint-content",children:R.length===0?(0,s.jsx)("p",{className:Dc("empty"),children:l?.videoCheckpointNoContent||"No content added to this checkpoint."}):R.map((M,O)=>(0,s.jsx)(Mp,{animateBlockEntrance:t,block:{...M,blockId:M.id},color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,hideBlock:!1,index:O,isLastBlock:O===R.length-1,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,onContinue:mn,partnerContent:C,prefersKeyboardNavigation:g,previewType:b},`checkpoint-overlay-${M.id}`))})})}const N4=(e,t,n)=>{jn(V2({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:ro(t),checkpoint_placement:oo(t),lesson_id:n}}))},bie=e=>e?.containerElement?.querySelector("video")??null;function yie(e,t){const n=(0,u.useRef)(null),[o,r]=(0,u.useState)(null),a=(0,u.useRef)([]),[i,c]=(0,u.useState)(!1),{startGroups:l,endGroups:d}=(0,u.useMemo)(()=>{const T=[],k=[];return e.forEach(E=>{const I=oo(E);I==="start"?T.push(E):I==="end"&&k.push(E)}),{startGroups:T,endGroups:k}},[e]),h=(0,u.useMemo)(()=>vX(e),[e]),m=(0,u.useCallback)(T=>{oo(T)==="timestamp"&&n.current?.seekToTime?.(ro(T)),n.current?.pause?.(),r(T),N4("Video Checkpoint Viewed",T,t)},[t]),f=(0,u.useCallback)(T=>{if(T.length===0)return;const[k,...E]=T;a.current=E,c(E.length>0),m(k)},[m]),v=(0,u.useCallback)(T=>{N4("Video Checkpoint Completed",T,t);const k=a.current.shift();if(k!=null){c(a.current.length>0),m(k);return}c(!1),r(null);const E=oo(T);(E==="timestamp"||E==="start")&&n.current?.play?.()},[t,m]),C=(0,u.useCallback)(()=>{a.current=[],c(!1),r(null)},[]),g=(0,u.useRef)(!1);(0,u.useEffect)(()=>{g.current||l.length===0||(g.current=!0,f(l))},[l,f]);const b=(0,u.useRef)(d);b.current=d;const x=(0,u.useRef)(null),y=(0,u.useRef)(null),L=(0,u.useRef)(!1);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:h,setVideoPlayerRef:T=>{n.current=T,x.current!=null&&y.current!=null&&(x.current.removeEventListener("ended",y.current),x.current=null,y.current=null);const k=bie(T);if(k!=null){const E=()=>{L.current||(L.current=!0,f(b.current))};k.addEventListener("ended",E),x.current=k,y.current=E}},onCheckpointReached:T=>{const k=e.filter(E=>oo(E)==="timestamp"&&ro(E)===T);f(k)}}),[h,e,f]),activeCheckpointGroup:o,hasQueuedCheckpoints:i,handleCheckpointCompleted:v,handleCheckpointDismissed:C}}function Sie({animateBlockEntrance:e,checkpointGroups:t,children:n,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,labels:c,lessonId:l,lessonProgress:d,loadMedia:h,partnerContent:m,prefersKeyboardNavigation:f,previewType:v}){const{contextValue:C,activeCheckpointGroup:g,hasQueuedCheckpoints:b,handleCheckpointCompleted:x,handleCheckpointDismissed:y}=yie(t,l);return(0,s.jsxs)(bX,{value:C,children:[n,t.length>0&&(0,s.jsx)(xie,{activeGroup:g,animateBlockEntrance:e,checkpointGroups:t,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,hasQueuedCheckpoints:b,labels:c,lessonId:l,lessonProgress:d,loadMedia:h,onCheckpointCompleted:x,onCheckpointDismissed:y,partnerContent:m,prefersKeyboardNavigation:f,previewType:v})]})}const Lie=Sie;function Tie(e){const{inlineBlocks:t,checkpointGroups:n}=(0,u.useMemo)(()=>CX(e.blocks),[e.blocks]);return(0,s.jsx)(Lie,{...e,checkpointGroups:n,children:(0,s.jsx)(Dp,{...e,blocks:t})})}const kie=Tie,j4=$("blocks-lesson-restart-button"),Iie=({className:e,onClick:t})=>{const n=j4.mix(e);return(0,s.jsx)("button",{className:n,onClick:t,type:"button",children:(0,s.jsx)(ue,{classNameIcon:j4("icon"),name:"arrow-rotate-left"})})},ei=$("one-page-authors");function Eie({className:e}){const t=ye(),n=$C(),o=VN(),r=GB();if(!o)return null;const a=n?.isPartnerContentAuthor&&r!=null,i=ei({}).mix(e);return a?(0,s.jsx)("div",{className:i,children:(0,s.jsx)("ul",{className:ei("list"),role:"list",children:r.map((c,l)=>(0,s.jsxs)("li",{className:ei("item"),role:"listitem",children:[(0,s.jsx)(w4,{avatarUrl:c?.image?wi({width:76,height:76,imageKey:c.image}):void 0}),(0,s.jsx)(A4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,s.jsxs)("div",{className:i,children:[(0,s.jsx)(w4,{avatarUrl:gt(o.avatar)}),(0,s.jsx)(A4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:o.authorName})]})}function w4({avatarUrl:e}){return e?(0,s.jsx)("div",{className:ei("avatar"),style:{backgroundImage:`url(${e})`}}):(0,s.jsx)("div",{className:ei("avatar-fallback"),children:(0,s.jsx)(Mm,{decorative:!0})})}function A4({a11yAuthorPrefix:e,name:t}){const n=t||"Unknown User",o=ei("name");return(0,s.jsxs)("div",{className:o.toString(),children:[(0,s.jsx)("span",{className:"visually-hidden-always",children:e}),(0,s.jsx)("span",{children:n})]})}const R4=Eie,Nie=$("one-page-title"),P4=({className:e,htmlId:t})=>{const n=de(),o=Me(n?.title),r=Ca("title"),a=(0,Qt.uW)(n?.title)?{"data-l10n-id":n?.title?.l10nId}:{"data-change-path":r},i=Nie({}).mix(e);return(0,s.jsx)(As,{anchor:{field:"title",kind:"artifactField"},label:"Comments on course title",positioning:"page",children:(0,s.jsx)("h1",{...a,className:i,id:t,tabIndex:-1,children:o})})},Fc=$("one-page-lesson-header-info");function jie(){const e=de(),t=Fc({});return(0,s.jsxs)("div",{className:t,children:[(j0(e)||tl(e))&&(0,s.jsx)(qm,{className:Fc("logo"),imageClassName:Fc("logo-image")}),(0,s.jsx)(P4,{className:Fc("title").toString()}),Yr(e)&&(0,s.jsx)(cb,{}),(0,s.jsx)(R4,{className:Fc("authors").toString()})]})}const wie=jie,Xu=$("one-page-lesson-header"),Aie=$("page"),Rie=Xu("main").mix("lesson-header__main"),Pie=Xu("container").mix(Aie("header-container")),Mie=()=>{const e=de(),t=ht(),n=e?.coverPageType,{alpha:o,ariaLabel:r,media:a,role:i}=Ir("coverImage"),c=e?.theme?.coverImageColor,l=n===me.WHITE,d=n===me.IMAGE,h=n===me.ACCENT,m=n===me.VIDEO,f=c===it.LIGHT,v=Xu({accent:h,image:d,white:l||m,video:m,"overlay-light":d&&f}),C=d?aa({alpha:o,color:c??void 0,media:a})??void 0:void 0;return(0,s.jsxs)("header",{className:v,children:[d&&C&&(0,s.jsx)("div",{"aria-label":r,className:Xu("background-image"),role:i,style:C}),(0,s.jsx)("div",{className:Pie,children:(0,s.jsx)("div",{className:Rie,children:(0,s.jsx)(wie,{})})}),t===te.APEX&&(0,s.jsx)(Nr,{coverPageType:"LEFT"})]})},Oie=$("lesson-one-page-scroll"),Bie=({previewType:e,prefersKeyboardNavigation:t,lessonProgress:n})=>{const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(!1),{lessons:i,...c}=de(),{lmsOptions:l}=c,d=ra(),h=ye(),m=Jt(),f=i?.[0],v=f?.type==="blocks"?f:void 0,C=f?.id??"",g=Bi(),b=v?.items??[],x=n?.type==="blocks"?n:void 0,y=Yr(c),L=tl(c),S=y?kie:Dp,T=n?.isComplete&&!0&&!y&&!L,k=n?.isComplete&&!1,E=c?.exportSettings?.webExportSettings,I=!Es.isInstantLink&&(l?.disableCoverPage||E?.disableCoverPage),j=(0,u.useCallback)(()=>{r||(I?o.current?.scrollTo({top:0,behavior:rn()?"instant":"smooth"}):(a(!0),qs(()=>{m("/")},"lesson-to-one-page-cover-continuous").finally(()=>{a(!1)})))},[m,I,r]);return(0,s.jsx)("div",{className:Oie(),children:(0,s.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:o,children:(0,s.jsx)("div",{className:"page","data-page":!0,children:(0,s.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,s.jsxs)(Fu,{lessonId:C,children:[(0,s.jsx)(Mie,{}),(0,s.jsx)("div",{className:"page__content",children:(0,s.jsx)(Sr,{children:(0,s.jsxs)("div",{"data-lesson-id":f?.id,children:[(0,s.jsx)(S,{animateBlockEntrance:c?.animateBlockEntrance,blocks:b,className:void 0,color:c?.color,courseTitle:d,enableVideoPlaybackSpeed:c?.enableVideoPlaybackSpeed,handleNavigate:void 0,isLessonEntering:void 0,isLessonExiting:void 0,labels:h,lessonId:C,lessonProgress:x,loadMedia:!0,nextLesson:void 0,partnerContent:g,prefersKeyboardNavigation:t,previewType:e}),T&&(0,s.jsx)(Iie,{className:void 0,onClick:j}),k&&(0,s.jsx)(Nf,{lessonId:C})]})})})]})})})})})},M4=$("microlearning-progress-summary"),Die=$("page-wrap"),Fie=({course:e,courseProgress:t,isStepped:n,lesson:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),[i,c]=(0,u.useState)(!1),l=M4("content",{stepped:n,mounted:i}).toString();return(0,uc.A)(()=>{const d=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,s.jsxs)("div",{className:Die(),id:"page-wrap",ref:r,children:[(0,s.jsx)(jf,{className:M4("previous").toString(),lessonId:o?.id??"",ref:a}),(0,s.jsx)(f4,{contentClassName:l,course:e,courseProgress:t,lessonId:o?.id??""})]})},Hie=({isProgressSummary:e,lessonProgress:t})=>{const n=de(),o=xr(),r=Zi()?.prefersKeyboardNavigation??!1,{previewType:a}=Hi(),i=n?.theme?.blockNavigationType===qc.STEPPED;return e?(0,s.jsx)(Fie,{course:n,courseProgress:o,isStepped:i,lesson:void 0}):i?(0,s.jsx)(Cie,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a}):(0,s.jsx)(Bie,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a})};var $ie=p(49860);function O4(){const e=ot();return $ie.useMemo(()=>({advanceQuizLessonToEnd:t=>e(ME(t)),submitQuizAnswer:t=>e(rh(t)),setQuizLessonTimeRemaining:t=>e(BE(t))}),[e])}const B4=-1,Vie="MULTIPLE_CHOICE";function zie({allowedRetries:e,currentRetries:t}){return e===B4?!1:t>=e}function _ie({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:o,reportAnswer:r}){if(!e||!gl(e))return;const a=e.settings??{},i=a.passToContinue??!1,c=Number(a.retryCount??B4),l=Object.values(t?.items??{}).filter(d=>!d.isComplete);if(l.length>0){const d=t?.retryAttempts??0,h=zie({allowedRetries:c,currentRetries:d});l.forEach(m=>{const f=toe({lesson:e,question:m});if(f){const v=f.type||Vie,C=n({duration:{startTime:0,stopTime:0},id:e.id,isCorrect:!1,isUnfinished:!0,item:{id:String(f.id||""),title:String(f.title||""),type:v},itemProgress:m,retryAttempts:d,title:e.title});r(C)}o.submitQuizAnswer({finalRetryAttempt:h,isCorrect:!1,itemId:m.id,lessonId:e.id,passToContinue:i})})}o.advanceQuizLessonToEnd(e.id)}var Uie=p(49860);function Gie({lesson:e,lessonProgress:t,getL10nRecursive:n}){const o=O4();return Uie.useCallback(()=>{_ie({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:o,reportAnswer:G1})},[e,t,n,o])}var D4=p(49860);function Wie({children:e}){const t=xr(),n=El(),o=Rt(n),r=wo(n),a=OC(),{setQuizLessonTimeRemaining:i}=O4(),c=D4.useMemo(()=>r??{},[r]),l=Gie({lesson:o,lessonProgress:c,getL10nRecursive:a}),d=D4.useMemo(()=>wC(o)?o.settings:void 0,[o]),h=!!d?.timer,m=d?.timerDuration;return(0,s.jsx)(sre,{courseProgress:t,currentLessonId:n,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:i,timerDuration:m,children:e})}function Kie({lessonId:e}){const t=ot(),[n,o]=(0,u.useState)(null),r=ye(),a=(0,u.useCallback)(c=>{c.target instanceof HTMLElement&&t(mh({offsetHeight:c.target.offsetHeight}))},[t]);(0,u.useLayoutEffect)(()=>{if(n)return t(mh({offsetHeight:n.offsetHeight})),()=>{t(mh(null))}},[t,n]),Dd(n,a);const i=(0,u.useCallback)(()=>{db(e)},[e]);return(0,s.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:i,ref:o,type:"button",children:(0,s.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[r?.courseSkipToLesson,(0,s.jsx)(ue,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}var Qie=p(49860);const Yie=960,Xp=$("transcript-panel"),Zie=e=>{const{currentLocale:t}=tt();return(0,u.useMemo)(()=>e?"mondrianTranscript"in e?typeof e.mondrianTranscript=="string"?e.mondrianTranscript:(t?e.mondrianTranscript[t]:void 0)??e.mondrianTranscript.default:"tmp"in e&&e.tmp?.audio?.transcript||e.audio?.transcript:null,[e,t])};function Xie({enhancedLabels:e,lessonId:t,questionBankActiveIndex:n}){const o=ot(),{audioPlayerIdOpen:r,focusing:a,refocusTarget:i,transcriptMedia:c}=ac(),l=!!r,d=(0,u.useId)(),h=pe(W=>t?Ri(t,W):null),f=t?.startsWith("question-bank-")?n:h?.type==="quiz"?h.activeIndex:void 0,v=Bt(Yie),[C,g]=(0,u.useState)(0),[b,x]=(0,u.useState)(!1),[y,L]=(0,u.useState)(!1),S=(0,u.useRef)(!1),T=(0,u.useRef)(null),k=(0,u.useRef)(null),E=(0,u.useRef)(c),I=(0,u.useRef)(t),j=(0,u.useRef)(f),P=ye()||e,N=(0,u.useRef)(null),R=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),w=(0,u.useCallback)(W=>{const z=R.current.panelHeight,Q=performance.now();L(!0);const K=q=>{const ee=q-Q,J=Math.min(ee/300,1),ne=1-Math.pow(1-J,3),oe=z+(W-z)*ne;g(oe),R.current.panelHeight=oe,J<1?requestAnimationFrame(K):(L(!1),x(!1),R.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(K)},[x,L,g]),A=(0,u.useCallback)(W=>{const{startTime:F,startY:z,startHeight:Q}=R.current;if(!v||z===null)return;const K=z-(W?.clientY??W?.touches?.[0]?.clientY??0),q=Q+K;if(g(q),R.current.panelHeight=q,F!==null){const ee=performance.now()-F,J=K/ee;R.current.velocity=J}},[v]),M=(0,u.useCallback)(W=>{const{velocity:F}=R.current;if(!F)return;Object.assign(R.current,{startY:null,startHeight:null,startTime:null}),x(!1);const z=window.innerHeight*.66;let Q;Math.abs(F)>.5?Q=F>0?window.innerHeight:150:Q=C>=z?window.innerHeight:150,w(Q),W instanceof MouseEvent&&(window.removeEventListener("mousemove",A),window.removeEventListener("mouseup",M))},[w,C,A]),O=(0,u.useCallback)(W=>{!v||k.current.contains(W.target)||T.current.contains(W.target)||(Object.assign(R.current,{startY:W?.clientY??W?.touches?.[0]?.clientY??null,startHeight:N.current?.clientHeight??0,startTime:performance.now()}),x(!0),W.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",A),window.addEventListener("mouseup",M)))},[A,M,v,x]);(0,u.useEffect)(()=>{let W;const F=()=>{N?.current?.style&&(N.current.style.transition="none",N.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(K=>{K.style.transition="none"}))},z=()=>{clearTimeout(W),W=setTimeout(()=>{N?.current?.style&&(N.current.style.transition="",N.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(K=>{K.style.transition=""}))},200)};return window.addEventListener("resize",F),window.addEventListener("resize",z),()=>{window.removeEventListener("resize",F),window.removeEventListener("resize",z),clearTimeout(W)}},[]),(0,u.useEffect)(()=>{!l&&S.current&&g(0),a&&l&&N.current&&(N.current.focus(),o(mf({audioPlayerId:r,focusing:!1}))),S.current=l},[r,o,a,l]),(0,u.useEffect)(()=>{l&&c!==E.current&&(E.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&I.current!==t&&o(ic()),I.current=t},[t,l,o]),(0,u.useEffect)(()=>{l&&j.current!==f&&j.current!==void 0&&o(ic()),j.current=f},[f,l,o]);const B={role:"button",tabIndex:0,onMouseDown:O,onTouchStart:O,onTouchEnd:M,onTouchMove:A},[D,H]=Qie.useState(!1),V=Me(D?E.current:c),G=Zie(V);let _;l&&(_=ff(r));const Y=(0,u.useCallback)(()=>{const W=i??document.getElementById(Hb(r));return W?(W.focus(),!0):!1},[r,i]),se=(0,u.useCallback)(W=>{W.stopPropagation(),W.preventDefault(),o(ic()),Y()},[o,Y]),Z=(0,u.useCallback)(W=>{r&&W.key==="Escape"&&se(W)},[r,se]);return(0,s.jsx)(s.Fragment,{children:(0,s.jsx)(Fs,{classNames:"transcript-panel",in:l,nodeRef:N,onEnter:()=>H(!1),onEntered:()=>H(!1),onEntering:()=>H(!1),onExit:()=>H(!0),onExited:()=>H(!1),onExiting:()=>H(!0),timeout:300,unmountOnExit:!0,children:(0,s.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:Xp({isOpen:l,isAnimatingMobileSwipe:y,isDragging:b}).toString(),id:_,onKeyDown:Z,ref:N,style:v&&l?{height:`${C/10}rem`,minHeight:C>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,s.jsxs)("header",{...v?B:{},children:[(0,s.jsx)("h3",{id:d,ref:T,children:P?.audioTranscript}),(0,s.jsx)("button",{"aria-label":P?.audioHideTranscript,className:Xp("close-button"),onClick:se,ref:k,type:"button",children:(0,s.jsx)(ue,{name:"close"})})]}),(0,s.jsx)("section",{className:Xp("transcript-text",{"not-available":!G}),children:G||P?.audioNoTranscriptAvailable})]})})})}const qie=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function Jie(e){const t=Jt(),n=(0,u.useRef)(null);return(0,u.useEffect)(()=>{e&&n.current!==e&&(qie(e),n.current=e)},[e]),{handleNavigate:(0,u.useCallback)(r=>{t(gn(r))},[t])}}const ece=({content:e})=>{const t=de(),n=xr(),{didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=Hi(),a=(0,Re.g)(),i=(0,Re.zy)(),[c]=(0,Re.ok)(),l=c.get("embed")==="lesson-only",d=a.lessonId??"",h=c.get(rc);(0,u.useEffect)(()=>{!h||!d||window.dispatchEvent(new CustomEvent(We,{detail:{lessonId:d,itemId:h,path:["lessons",{id:d},"items",{id:h}],align:"start"}}))},[d,h]);const m=Bt(480),{handleNavigate:f}=Jie(d),v=ss(t),C=(0,u.useCallback)(E=>{if(v)return;const I=document.querySelector(`[data-lesson-id="${E}"]`);(t.theme?.hideLessonHeaders?I?.querySelector("main"):I?.querySelector("h1"))?.focus({preventScroll:!0})},[t,v]),g=(0,u.useRef)(d),b=(0,u.useRef)(!1);(0,u.useEffect)(()=>{b.current||d!==g.current||r||!o||(b.current=!0,C(d))},[o,C,d,r]);const x=l?"lesson lesson--preview":"lesson",y=ot(),L=(0,u.useCallback)(({item:E,refs:I})=>{if(!E)return;const j="media"in E?E.media:null;y(Fb({audioPlayerId:vs({refs:I}),transcriptMedia:j}))},[y]),S=(0,u.useCallback)(()=>{y(ic())},[y]),T=(0,u.useCallback)(E=>{y(mf(E))},[y]),k=wo(d);return(0,s.jsxs)(Wie,{children:[(0,s.jsxs)("div",{className:"page-lesson-wrap",children:[!v&&(0,s.jsx)(Kie,{lessonId:d}),(0,s.jsx)("div",{className:"page-lesson",children:(0,s.jsxs)(u_,{children:[(0,s.jsx)(l_,{closeTranscript:S,mode:"readonly",onTranscriptUpdate:T,openTranscript:L,children:(0,s.jsx)("div",{className:x,"data-lesson":!0,children:(0,s.jsx)("div",{className:"lesson__content",children:(0,s.jsx)("div",{className:"page-view",children:(0,s.jsx)(UU,{isLessonOnlyEmbed:l,children:v?(0,s.jsx)(Hie,{isProgressSummary:e.kind==="progress-summary",lessonProgress:k}):(0,s.jsx)(PG,{isLessonOnlyEmbed:l,onLessonEntered:C,children:(0,s.jsx)(Tae,{content:e,handleNavigate:f,isMobileHeader:m,lessonId:d,lessonProgress:k},i.pathname)})})})})})}),(0,s.jsx)(Xie,{lessonId:n?.currentLesson?.toString()})]})})]}),(0,s.jsx)(hf,{onClose:()=>C(d)})]})},qp=$("one-page-cover-info");function tce({htmlIdTitle:e}){const t=Ca("title");return(0,s.jsxs)("div",{className:qp(),"data-change-path":t,children:[(0,s.jsx)(P4,{className:qp("title").toString(),htmlId:e}),(0,s.jsx)(R4,{className:qp("authors").toString()})]})}const nce=tce,qu=$("one-page-cover"),sce=$("cover"),oce={passive:!0};function rce(e){return typeof e=="object"&&e!=null}function ace(e){return rce(e)&&(typeof e.id=="string"||typeof e.id=="number")}function ice({previewType:e}={}){const t=(0,u.useRef)(null),n=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=Jt(),a=ye(),{shouldSkipAutoFocusOnNavigate:i}=Hi(),c=(0,u.useRef)(i),l=pe(Yt),d=fj(l),h=ace(d)?d:void 0,m=(0,u.useCallback)(()=>{const w=h?.id;return w!=null?gn(w):null},[h?.id]),f=(0,u.useCallback)(()=>{const w=m();if(w!=null){const M=l?.theme?.blockNavigationType===qc.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";qs(()=>{r(w)},M)}},[l?.theme?.blockNavigationType,m,r]),v=(0,u.useRef)(f);v.current=f;const C=(0,u.useRef)(e);C.current=e;const g=(0,u.useCallback)(()=>{n.current?.focus?.()},[]);(0,u.useEffect)(()=>{Oy(),c.current||n.current?.focus?.()},[]),(0,u.useEffect)(()=>{const w=n.current;if(!w)return;const A=M=>{(M.key==="ArrowDown"||M.key==="ArrowRight")&&!o.current&&(o.current=!0,w.removeEventListener("keyup",A),v.current())};return w.addEventListener("keyup",A),()=>w.removeEventListener("keyup",A)},[]),(0,u.useEffect)(()=>{const w=A=>{dc(C.current)||o.current||A.deltaY>100&&(o.current=!0,document.removeEventListener("wheel",w),v.current())};return document.addEventListener("wheel",w,oce),()=>document.removeEventListener("wheel",w)},[]);const b=(0,u.useCallback)(w=>{const A=w.target;A instanceof Node&&!t.current?.contains?.(A)&&!o.current&&(o.current=!0,f())},[f]),x=(0,u.useCallback)(w=>{w.preventDefault(),o.current||(o.current=!0,f())},[f]),y=l?.coverPageType===me.WHITE,L=l?.coverPageType===me.VIDEO,S=l?.coverPageType===me.IMAGE,T=l?.coverPageType===me.ACCENT,k=l?.theme?.blockNavigationType===qc.STEPPED,E=l?.theme?.coverImageColor??it.DARK,I="title",P=`overlay-${E?.toLowerCase()}`,N=qu("wrapper",{[P]:S,accent:T,image:S,white:y||L,video:L}).mix(sce("header-content")),R=m();return(0,s.jsx)(Sr,{children:(0,s.jsxs)(Vd,{onSwipeUp:f,children:[(0,s.jsxs)("main",{className:N,ref:n,tabIndex:-1,children:[(0,s.jsx)(nce,{htmlIdTitle:I}),k&&(0,s.jsx)("div",{className:"visually-hidden-always",children:"To quickly navigate between steps, use the up and down arrow keys or the step navigation found on subsequent steps."}),R!=null&&(0,s.jsx)("div",{className:qu("start-wrapper"),onClick:b,children:(0,s.jsx)(sn,{"aria-label":a?.courseStart??"Start",className:qu("start-link"),onClick:x,ref:t,to:R,children:(0,s.jsx)(ue,{className:qu("start-icon"),name:"arrow-down"})})}),S&&(0,s.jsx)(rf,{})]}),(0,s.jsx)(hf,{onClose:g})]})})}const cce=ice;function lce({course:e,lessonId:t,progressSummaryEnabled:n}){if(n&&t===yi)return{kind:"progress-summary"};const o=e?.lessons?.find(r=>String(r.id)===t);return o?{kind:"lesson",lesson:o}:{kind:"not-found"}}function dce(){const e=de(),t=(0,Re.zy)(),n=ss(e),o=e?.lessonsOnly?.[0]?.id,r=o==null?void 0:gn(o),a=n?eD(e):ex(e),l=r!=null&&a?(0,s.jsx)(Re.C5,{replace:!0,to:{pathname:r,search:t.search}}):n?(0,s.jsx)(cce,{}):(0,s.jsx)(o_,{});return(0,s.jsxs)(Re.BV,{children:[(0,s.jsx)(Re.qh,{element:(0,s.jsx)(F4,{}),path:Ml}),(0,s.jsx)(Re.qh,{element:(0,s.jsx)(H4,{children:(0,s.jsx)(F4,{})}),path:Ol}),(0,s.jsx)(Re.qh,{element:l,index:!0}),(0,s.jsx)(Re.qh,{element:(0,s.jsx)(H4,{children:l}),path:"/:mode"}),(0,s.jsx)(Re.qh,{element:(0,s.jsx)(Ul,{}),path:"*"})]})}function F4(){const e=vr(),{lessonId:t=""}=(0,Re.g)(),n=lce({course:e,lessonId:t,progressSummaryEnabled:!1});return n.kind==="not-found"?(0,s.jsx)(Ul,{}):(0,s.jsx)(ece,{content:n})}function H4({children:e}){const{mode:t}=(0,Re.g)();return Cw(t)?e:(0,s.jsx)(Ul,{})}const ti=$("legacy-share-deprecation-banner"),uce=Date.UTC(2026,7,31),hce="https://community.articulate.com/discussions/discuss/rise-360-legacy-preview-links-will-be-disabled-on-august-31/1265175",$4="has-legacy-share-banner",V4="--legacy-share-banner-height",z4="legacyShareBannerDismissed";function mce(){try{return sessionStorage.getItem(z4)==="true"}catch{return!1}}function fce(){try{return sessionStorage.setItem(z4,"true"),!0}catch{return!1}}const pce=()=>(0,s.jsx)("svg",{"aria-hidden":"true",className:ti("icon"),focusable:"false",viewBox:"0 0 512 512",children:(0,s.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96 208l320 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16L96 304c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16z"})}),gce=()=>(0,s.jsx)("svg",{"aria-hidden":"true",className:ti("dismiss-icon"),focusable:"false",viewBox:"0 0 384 512",children:(0,s.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})});function vce(){const e=de(),[t,n]=(0,u.useState)(mce),o=(0,u.useRef)(null),r=!t&&U0()&&Date.now()<uce&&e!=null&&!B2(e),a=(0,u.useCallback)(()=>{fce(),n(!0)},[]);return(0,u.useEffect)(()=>{const i=document.getElementById("app"),c=o.current;if(!r||!i||!c)return;i.classList.add($4);const l=()=>{const{height:h}=c.getBoundingClientRect();i.style.setProperty(V4,`${h}px`)};l();const d=new ResizeObserver(l);return d.observe(c),()=>{d.disconnect(),i.classList.remove($4),i.style.removeProperty(V4)}},[r]),r?(0,s.jsxs)("div",{className:ti(),ref:o,role:"status",children:[(0,s.jsx)(pce,{}),(0,s.jsxs)("p",{className:ti("message"),children:["Access to this content will be"," ",(0,s.jsx)("a",{className:ti("link"),href:hce,rel:"noopener noreferrer",target:"_blank",children:"disabled on August 31, 2026"}),". Please contact your administrator and request the content be republished via Quick Share to maintain access."]}),(0,s.jsx)("button",{"aria-label":"Dismiss notice",className:ti("dismiss"),onClick:a,type:"button",children:(0,s.jsx)(gce,{})})]}):null}const Cce=vce;var ho=p(49860);const $r=$("share-password-dialog");function xce({failAttempt:e,onSubmit:t}){const n=pe(Yt),o=ho.useRef(null),r=ho.useRef(null),[a,i]=ho.useState(!1),c=ho.useRef(!1),{announceAssertive:l}=Ts();ho.useEffect(()=>{r.current?.showModal()},[]),ho.useEffect(()=>{e&&!c.current&&(i(!0),o.current&&(o.current.value=""),l("Incorrect password. Please try again.")),c.current=e},[l,e]),ho.useEffect(()=>{const v=r.current;if(!v)return;const C=()=>i(!1);return v.addEventListener("animationend",C),()=>{v.removeEventListener("animationend",C)}},[]);const d=ho.useCallback(v=>{v.preventDefault(),o.current&&t(o.current.value)},[t]),h=ho.useCallback(v=>{v.preventDefault()},[]),f=`You need a password to view this ${ss(n)?$T(n?.experiments?.outputType).toLocaleLowerCase():"course"}. If you don\u2019t know it, ask the person who shared this with you.`;return(0,s.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${$r({shaking:a})} brand--border`,onCancel:h,ref:r,children:[(0,s.jsx)("h1",{className:$r("heading"),id:"share-password-title",children:"Enter Password"}),(0,s.jsx)("p",{className:$r("instructions"),id:"share-password-instructions",children:f}),(0,s.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,s.jsxs)("form",{onSubmit:d,children:[(0,s.jsx)("label",{className:$r("label"),htmlFor:"share-password",children:"password"}),(0,s.jsx)("input",{className:$r("input"),id:"share-password",ref:o,type:"password"}),(0,s.jsx)("div",{className:$r("toolbar"),children:(0,s.jsx)("button",{className:`${$r("button")} brand--background`,type:"submit",children:"View"})})]})]})}const bce=xce;function yce(){const e=bl();(0,u.useEffect)(()=>{window.targetMode=cD({locale:q2(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:bn.STATUS,data:!!window.targetMode},"*"),jZ(n=>jn(Z7(n)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!x8()||(t.current=!0,window.parent.postMessage({type:"preview:snapshotLoaded",data:{defaultLocale:e.defaultLocale,locales:e.locales?.map(({locale:n})=>n)}}))},[e]),(0,u.useEffect)(()=>{const n=()=>jn(LI()),o=()=>jn(TI()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return sC("favoriteAdded",n),sC("favoriteRemoved",o),document.addEventListener("click",r),()=>{oC("favoriteAdded",n),oC("favoriteRemoved",o),document.removeEventListener("click",r)}},[])}function Sce(e){return e.status}function _4(){return pe(Sce)}function Lce({enabled:e=!0,onAuthorized:t,onError:n,onUnauthorized:o,password:r}){const a=ot();(0,u.useEffect)(()=>{e&&(a(bE({onAuthorized:t,onError:n,onUnauthorized:o,password:r})),a(Y7()))},[a,e,t,n,o,r])}function Tce(){const e=ot(),{courseLoaded:t,coverLoaded:n}=_4(),o=pe(i=>i.course?.coverImage?.media),r=lt(o),a=(0,u.useCallback)(()=>{e(wI(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!n){const i=r?.image,{key:c,src:l}=i||{};if(c||l){const d=c?dt(i):l,h=setTimeout(a,5e3),m=new Image;return m.src=d,m.onload=()=>{clearTimeout(h),a()},()=>{clearTimeout(h),m.onload=null}}else a()}},[t,n,r,a])}function kce(e={}){Lce(e),Tce();const t=ot(),n=_2(),o=pe(f=>f.courseLabels.labels),{courseLoaded:r,coverLoaded:a,fatalError:i,fontsLoaded:c,notFound:l,partnerContentLoaded:d}=_4(),h=(0,De.A)(r),m=r&&c&&a&&d;return(0,u.useEffect)(()=>{!h&&r&&!c&&(n??[]).length>0&&t(g7(n))},[t,h,r,c,n]),(0,u.useEffect)(()=>{if(!m||window.parent===window)return;window.parent.postMessage({type:"course:ready"},window.location.origin);const f=v=>{v.key==="Escape"&&window.parent.postMessage({type:"preview:escape"},window.location.origin)};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[m]),{isLoaded:!!m,notFound:!!l,fatalError:!!i,curtainLabels:o}}function Ice({course:e}){const[t,n]=(0,u.useState)(!0),[o,r]=(0,u.useState)(!1),a=e&&"hasPassword"in e?!!e.hasPassword:!1,i=!!(t&&U0()&&e&&!B2(e)&&(a||_1())),c=(0,u.useCallback)(l=>(r(!1),b8(l).then(({isValid:d})=>{d?n(!1):(r(!0),n(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:i,failAttempt:o,onSharePasswordSubmit:c}}function Ece(){return jB(),yce(),(0,s.jsxs)(bD,{children:[(0,s.jsx)(Cce,{}),(0,s.jsx)(HB,{children:(0,s.jsx)(PA,{children:(0,s.jsx)(Nce,{})})})]})}function Nce(){const{enabled:e,isActive:t,onAuthorized:n,onError:o,onUnauthorized:r,password:a}=FB(),{isLoaded:i,notFound:c,fatalError:l,curtainLabels:d}=kce({enabled:e,onAuthorized:t?n:void 0,onError:t?o:void 0,onUnauthorized:t?r:void 0,password:t?a:void 0}),h=de(),{showPasswordDialog:m,failAttempt:f,onSharePasswordSubmit:v}=Ice({course:h}),C=!t&&m;return c?(0,s.jsx)(Ul,{}):i?C?(0,s.jsx)(bce,{failAttempt:f,onSubmit:v}):h?(0,s.jsx)(jce,{course:h}):null:(0,s.jsx)(L2,{labels:d,status:l?"fatalError":"loading"})}function jce({course:e}){const t=MN(),n=NB(),o=W2(e.themeId),r=`theme ${o}${t?" one-page":""}`;return(0,s.jsx)(Iw,{appType:"learn",children:(0,s.jsx)(qB,{children:(0,s.jsx)(KB,{children:(0,s.jsx)(bB,{children:(0,s.jsx)(EB,{themeId:o,children:(0,s.jsx)(Xh,{children:(0,s.jsx)(kB,{children:(0,s.jsx)(IA,{course:e,children:(0,s.jsxs)("div",{className:r,id:"innerApp",ref:IB,children:[(0,s.jsx)(BB,{...n}),(0,s.jsxs)(XO,{children:[(0,s.jsx)(dce,{}),(0,s.jsx)(kw,{})]})]})})})})})})})})})}function wce({children:e}){return(0,s.jsx)(uW,{ImageEagerOrLazy:Bf,children:e})}var U4;const G4={"rise-course-navigation":!0},Ace={"ai-assistant-blocks":!0,"ai-text-to-video":!1,"ai-assistant-images":!0,"ai-assistant-magic-block-import":!0,"ai-assistant-enable":!0,"ai-assistant-thumbs-feedback-ui":!1,"ai-assistant-subscription-override":!1,"ai-assistant-next-gen-chat-prototype":!1,"ai-use-conversation-harness":!1,"experiment-business-creator-role":!1,"experiment-business-creator-video-training":!1,"rise-ai-avatar-prompt-testing":!1,"rise-com-360-upsell":!0,"ai-quiz-generation-toggle-prototype":!1,"ai-concept-to-course-images-disabled-override":!1,"rise-ai-scenario-practice-mode-enabled":!1},Jp=(0,u.createContext)(G4);Jp.displayName="FeatureFlagsContext";const{Provider:Rce}=Jp;function Pce({children:e,value:t}){const n=(0,u.useMemo)(()=>({...Ace,...t,...G4}),[t]);return(0,s.jsx)(Rce,{value:n,children:e})}function eg(){return(0,u.useContext)(Jp)}function Mce(e){return eg()[e]}function q1e(e){function t(n){const o=eg();return U4(e,{...n,flags:o})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function J1e(e,t){return function(n){const o=r=>{const a=Mce(e),i={...r,[t]:a};return U4(n,{...i})};return o.displayName=`withFeatureFlag(${n.displayName||n.name})`,o}}const W4=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});W4.displayName="On";const K4=({children:e})=>(0,s.jsx)(s.Fragment,{children:e});K4.displayName="Off";const Ju=({children:e,featureFlags:t})=>{const n=eg(),o=(0,u.useMemo)(()=>{const i=[].concat(t??[]);return i.length&&i.every(c=>n[c])},[t,n]),{on:r=null,off:a=null}=(0,u.useMemo)(()=>{const i={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case Ju.On.displayName:i.on=c;break;case Ju.Off.displayName:i.off=c;break;default:i.on=e}}),i},[e]);return o?r:a};Ju.On=W4,Ju.Off=K4;const Oce={};function Bce({children:e}){const n=de()?.features??Oce;return(0,s.jsx)(Pce,{value:n,children:e})}const Q4=document.getElementById("app");if(!Q4)throw new Error("Root element #app not found");(0,Z4.createRoot)(Q4).render((0,s.jsx)(u.Suspense,{fallback:null,children:(0,s.jsx)(aN,{store:kC,children:(0,s.jsx)(wce,{children:(0,s.jsx)(lN,{children:(0,s.jsx)(Bce,{children:(0,s.jsx)(Re.I9,{useTransitions:!1,children:(0,s.jsx)(Ece,{})})})})})})}))},31926($c,oi,p){const Xo={"./en-au":92292,"./en-au.js":92292,"./en-ca":98838,"./en-ca.js":98838,"./en-gb":65447,"./en-gb.js":65447,"./en-ie":31244,"./en-ie.js":31244,"./en-il":47451,"./en-il.js":47451,"./en-in":46045,"./en-in.js":46045,"./en-nz":73630,"./en-nz.js":73630,"./en-sg":33200,"./en-sg.js":33200};function s(qo){const ri=a0(qo);return p(ri)}function a0(qo){if(!p.o(Xo,qo)){const ri=new Error("Cannot find module '"+qo+"'");throw ri.code="MODULE_NOT_FOUND",ri}return Xo[qo]}s.keys=function(){return Object.keys(Xo)},s.resolve=a0,$c.exports=s,s.id=31926},38954(){}}]);
