(globalThis.wpRiseJsonp=globalThis.wpRiseJsonp||[]).push([["learn_main_tsx-node_modules_pnpm_moment_2_30_1_node_modules_moment_locale_sync_recursive_en"],{30349(Ac){Ac.exports=function(ei){ei||(ei={});var __t,__p="";with(ei)__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}},37917(Ac,ei,p){"use strict";var Ko={};p.r(Ko),p.d(Ko,{callbackComponent:()=>vL,callbackPath:()=>u0,errorPath:()=>iL,getToken:()=>cL,initAuth:()=>Y1,login:()=>K1,logout:()=>or,onFetchTokensThunk:()=>CL,onSessionExpired:()=>uL,refreshSession:()=>dL,request:()=>V9});var lo={};p.r(lo),p.d(lo,{CoverDescription:()=>kB,CoverDetailsContentHeading:()=>VH,CoverDueDate:()=>NB,CoverHeader:()=>ZF,CoverLayout:()=>JF,LessonHeader:()=>rH,LessonNavFinish:()=>fH,LessonNavNext:()=>pH,LessonNavPrevious:()=>vH,LessonProgressGraphic:()=>LH,NavCompactHeaderCounter:()=>zH,NavCompactHeaderProgress:()=>UH,NavCompactOutline:()=>_H,OverviewListItem:()=>GH,OverviewListSectionTitle:()=>WH,Progress:()=>$H});var Dr={};p.r(Dr),p.d(Dr,{AlignLeft:()=>YH,ArrowDown:()=>Lm,ArrowLeft:()=>KH,ArrowRight:()=>QH,ArrowUp:()=>Ax,Category:()=>HB,ChevronDown:()=>ZH,ChevronUp:()=>XH,Favorite:()=>Om,LessonsComplete:()=>nd,LessonsRequirement:()=>Bx,QuestionBox:()=>qH,QuizFailed:()=>Ox,QuizPassed:()=>nd,QuizRequirement:()=>sx,Search:()=>JH,ToggleDown:()=>e$,Touch:()=>t$,VideoCamera:()=>s$,X:()=>n$});var Ms={};p.r(Ms),p.d(Ms,{components:()=>lo,icons:()=>Dr});var uo={};p.r(uo),p.d(uo,{CoverCourseInfo:()=>a$,CoverDetailsSection:()=>d$,CoverHeader:()=>T$,CoverLayout:()=>N$,LessonHeader:()=>w$,LessonProgressGraphic:()=>O$,NavSidebarHeader:()=>B$,OverviewListItemLinkContent:()=>V$,Progress:()=>z$});var Ou={};p.r(Ou),p.d(Ou,{ArrowDown:()=>Gx,ArrowLeft:()=>_$,ArrowRight:()=>U$,ArrowUp:()=>Gx,ChevronDown:()=>Wx,ChevronUp:()=>Wx,Favorite:()=>Om,LessonsComplete:()=>Kx,LessonsRequirement:()=>Qx,QuizFailed:()=>W$,QuizPassed:()=>Kx,QuizRequirement:()=>Qx,Search:()=>G$,ToggleDown:()=>K$,X:()=>Q$});var Bu={};p.r(Bu),p.d(Bu,{components:()=>uo,icons:()=>Ou});var Du={};p.r(Du),p.d(Du,{CoverDescription:()=>X$,CoverDetails:()=>J$,CoverGraphic:()=>Ki,CoverHeader:()=>cV,CoverLayout:()=>uV,CoverProgress:()=>hV,CoverSVG:()=>Sr,LessonHeader:()=>gV,LessonProgressGraphic:()=>yV,NavSidebarHeaderProgress:()=>TV});var Fu={};p.r(Fu),p.d(Fu,{AlignLeft:()=>IV,ArrowDown:()=>LV,ArrowLeft:()=>kV,ArrowRight:()=>NV,ArrowUp:()=>EV,ChevronDown:()=>nb,ChevronUp:()=>jV,Favorite:()=>Om,LessonsComplete:()=>nd,LessonsRequirement:()=>Bx,QuestionBox:()=>wV,QuizFailed:()=>Ox,QuizPassed:()=>nd,QuizRequirement:()=>sx,Search:()=>AV,ToggleDown:()=>nb,Touch:()=>RV,VideoCamera:()=>PV,X:()=>MV});var Hu={};p.r(Hu),p.d(Hu,{components:()=>Du,icons:()=>Fu});var n=p(34158),qie=p(28900),Jie=p(19800),ece=p(46530),tce=p(53920),sce=p(94756),nce=p(53373),oce=p(73853),rce=p(34555),ace=p(81258),ice=p(84381),cce=p(90460),lce=p(30803),dce=p(42247),uce=p(21855),hce=p(79302),mce=p(76032),fce=p(96795),u=p(82920),y4=p(94265),we=p(2422),S4=p(55676),Rc=p(18398),ho=p(18442),T4=p(40412),L4=p(36202),k4=p(18484);const $u=u.createContext(null),Vu=u.createContext(!1),Qo=e=>(0,n.jsx)(Vu.Provider,{value:!0,children:(0,n.jsx)(T4.A,{...e})});function Bp(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(s){super(s),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=(s,...o)=>{this.setState({transitionState:s});const r="on"+s[0].toUpperCase()+s.slice(1),a=this.props[r];typeof a=="function"&&a(...o)};render(){return(0,n.jsx)($u.Provider,{value:this.state.transitionState,children:(0,n.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 Pc=Bp(L4.Ay),On=Bp(k4.A);function N4(e){const t=u.useContext(Vu),s=u.useContext($u),o=u.useRef(e);return t&&s?.startsWith?.("exit")||(o.current=e),o.current}function E4(e){const t=s=>{const o=N4(s);return(0,n.jsx)(e,{...o,nodeRef:s.ref,ref:s.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const Dp=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",I4=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",Fp=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",j4=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",Hp=e=>e!=null&&typeof e=="function",$p=(e,t)=>{const s=o=>$p(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(s,s);if(Dp(e))return e.map(s);if(Fp(e))return e.then(s);if(Hp(e))return function(r,a){return e(i=>r(s(i)),a)}};function w4(){return({dispatch:e,getState:t})=>s=>o=>{if(Hp(o))return o(e,t);if(Fp(o))return o.then(e);if(j4(o)){o.fork(e,e);return}return I4(o)?e(o.run()):Dp(o)?o.map(e):s(o)}}function A4(){return[w4()]}var Mc=p(82920);const R4=Rc.Zz;function P4(e,t){const s=(0,Rc.y$)(e,t,R4((0,Rc.Tw)(...A4()))),o=O4(),r=B4(),a=D4(),i=F4(),c=H4(),l=M4();return{Provider:ho.Kq,connect:o,connectBase:r,dispatch:s.dispatch,store:s,useDispatch:a,useDispatchWithOrigin:i,useSelector:c,useStore:l}}function M4(){return function(){return(0,ho.Pj)()}}function O4(){return function(t,s,o,r){return function(a){return(0,ho.Ng)(t,s,o,r)(E4(a))}}}function B4(){return function(t,s,o,r){return function(a){return(0,ho.Ng)(t,s,o,r)(a)}}}function D4(){return ho.wA}function F4(){return function(t){const s=(0,ho.wA)();return Mc.useCallback(r=>s($p(r,t)),[s,t])}}function H4(){return function(t,s=ho.bN){const o=Mc.useContext(Vu),r=Mc.useContext($u),a=Mc.useRef(void 0),i=(0,S4.S)(),c=(0,ho.d4)(t,s),l=!i&&o&&r?.startsWith?.("exit");return l||(a.current=c),l&&a.current!==void 0?a.current:c}}var Fr=p(62151),$4=p(81395),Yo=p.n($4),me=p(15368),V4;function z4(){return me.action}function pce(){return V4}var Zo=p(47371),U4=p(58166),Re=p.n(U4),_4=p(46776),zu=p.n(_4),G4=p(68325),Ne=p.n(G4),W4=p(94057),Zs=p.n(W4),K4=p(42117),Uu=p.n(K4);const Oc=zu()(Uu()),Vp=["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"],Q4=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],Y4=Oc({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:Vp}),Z4=Oc({allowedAttributes:{iframe:Q4},allowedTags:["iframe"],allowedSchemes:["http","https"]}),_u=Zs()(Ne(),Y4,Re()("")),zp=Zs()(Ne(),Z4,Re()("")),Ts=Oc({allowedTags:[],allowedAttributes:[]}),gce=Oc({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:Vp.filter(e=>e!=="img")}),vce=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return Ts(t).replace(/\s{2,}/g," ")},{Runtime:Zt}=window,Ee=e=>window.env?.[e],Cce=!1,xce=null,Up="Rise 360",X4=e=>`${Ee("CDN_USER_CONTENT_URI")}/${e}`,mt=e=>{const t=e||"",s=Zt?.resolvePath!=null?Zt.resolvePath.bind(Zt):X4;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:s(t)||t},q4=e=>Zt?.resolveFontPath!=null?Zt.resolveFontPath(e):`${e.default?Ee("CDN_URI"):Ee("CDN_USER_CONTENT_URI")}/${e.key}`,_p=()=>{Zt?.exit!=null&&Zt.exit()},J4=()=>Zt?.isComplete!=null?Zt.isComplete():null,ti=()=>Zt?.isExport!=null?Zt.isExport():!1;function e9(){if(Zt?.isExport!=null){const e=window.partnerContent?.content;return Zt.isExport()&&!!e}return!1}const Gp=()=>{if(Zt?.sendTouch!=null)return Zt.sendTouch()};var t9=p(19086),Bn=p.n(t9),s9=p(39405),Dn=p.n(s9),n9=p(49329),Bc=p.n(n9),o9=p(57065),ft=p.n(o9),r9=p(37223),vn=p.n(r9),a9=p(21217),Wp=p.n(a9),i9=p(11786),Gu=p.n(i9),c9=p(89658),Ze=p.n(c9),l9=p(2572),qe=p.n(l9),d9=p(70057),Xs=p.n(d9);const u9=Bn(),Dc=Ze(),h9=Dn(),Kp=e=>Bc()(e),Fc=Zs(),Hc=e=>t=>{const s=e(t);return Ts(s==null?void 0:String(s))},Qp=e=>t=>u9({[e]:s=>Ts(s==null?void 0:String(s))},t),m9=({startTime:e,stopTime:t})=>t-e,f9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return Jp(e);case"MATCHING":return o1(e);default:return Hr(e)}},p9=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return Jp(e);case"MATCHING":return o1(e);case"MULTIPLE_CHOICE":return e1(e);case"MULTIPLE_RESPONSE":return C9(e);default:return e1(e)}},g9=({isUnfinished:e,item:t,itemProgress:s})=>{switch(t.type){case"FILL_IN_THE_BLANK":return v9(e)(s);case"MATCHING":return S9(t,e)(s);case"MULTIPLE_CHOICE":return t1(t,e)(s);case"MULTIPLE_RESPONSE":return x9(t,e)(s);default:return t1(t,e)(s)}},Yp=e=>[e],Hr=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const s=e.shuffledAnswerIndices,o=[];return t.forEach((r,a)=>{const i=s[a];typeof i=="number"&&(o[i]=r)}),o.map(Qp("title"))}return t.map(Qp("title"))},Wu=Hc(Ze()("id")),Zp=Hc(Ze()("title")),Xp=e=>t=>h9(s=>qe()("id",t,s),Hr(e)),qp=e=>t=>Wp()(t,Hr(e)),Jp=e=>Gu()("title",Hr(e)),v9=e=>t=>Fc(Re()(e),Re()(""),Hc(s=>Dc("text",s)))(t),e1=e=>e.correct==null?[]:Xp(e)(e.correct),t1=(e,t)=>s=>Fc(Re()(t),Re()([]),()=>{const o=Dc("selectedIndex",s);return o===void 0?[]:Yp(qp(e)(o))})(s),C9=e=>Kp(ft()(Xp(e),e.corrects??[])),x9=(e,t)=>s=>Fc(Re()(t),Re()([]),()=>{const o=Dc("selectedIndices",s)||[];return Kp(o.map(r=>Yp(qp(e)(r))))})(s),s1=({sourceId:e,sourceTitle:t,targetId:s,targetTitle:o})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(s)}`,title:o}}),n1=Hc(Ze()("matchTitle")),b9=e=>{const t=Wu(e);return s1({sourceId:t,sourceTitle:Zp(e),targetId:t,targetTitle:n1(e)})},y9=e=>(t,s)=>{const o=Hr(e),r=o.find(i=>i?.id===s),a=o.find(i=>i?.id===t);return s1({sourceId:Wu(r),sourceTitle:Zp(r),targetId:Wu(a),targetTitle:n1(a)})},o1=e=>ft()(b9,Hr(e)),S9=(e,t)=>s=>Fc(Re()(t),Re()([]),()=>{const o=Dc("matches",s);return Xs()(vn()(y9(e),o??{}))})(s);var T9=p(99552),r1=p.n(T9),L9=p(30208),a1=p.n(L9),k9=p(22775),Xo=p.n(k9),i1,bce;const Ku="_articulate_user_id",N9="_rise_authoring_api_session",c1=()=>"_articulate_rise_",Qu=(e,t)=>`${e}=${t}; domain=${Ee("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,E9=e=>document.cookie=Qu(Ku,e),I9=()=>document.cookie=`${Qu(Ku,"")}; Max-Age=-99999999`,j9=()=>document.cookie=`${Qu(N9,"")}; Max-Age=-99999999`,qo=()=>a1().load(Ku),pt=()=>a1().load(c1()),w9=()=>pt()?Xo()(pt()).staff:!1,A9=()=>pt()?i1(pt())?.staffRoles||[]:[],R9=()=>pt()?i1(pt())?.content_team_admin:!1,yce=()=>A9().includes("content-team")||R9(),Yu=()=>pt()?Xo()(pt()).riseId||Xo()(pt()).sub||Xo()(pt()).aid:"",P9=()=>pt()?Xo()(pt()).roles:[],M9=()=>pt()?Xo()(pt()).tenantId:"",l1=()=>pt()?Xo()(pt()).subscription||{}:{},O9=()=>l1().plan_id||"",B9=()=>l1().status||"";var D9=p(87266),F9=p(87155),Jo=p.n(F9);const H9=Jo()(window.env,{ACCESS_COOKIE_NAME:c1(),REDIRECT_URI:window.location.origin+"/auth-callback"}),mo=(0,D9.A)(H9),d1=mo.closeSession,$r=mo.on,$9=mo.off,V9=mo.request,u1=mo.refreshSession,si=mo.resetSession,z9=mo.getAuthorizationUrl,Sce=mo.fetch;var Fn=p(69476);const $c=(e,t)=>((...s)=>{try{return e(...s)}catch(o){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(o),Fn.L2.addError(o),t(o)}}),U9=e=>{const t=e.getResponseHeader("content-type")||"",s=t.includes("application/json");if(!(s||t.includes("text/")))return e.response;try{const r=new TextDecoder("utf-8").decode(e.response);try{return s?JSON.parse(r):r}catch{return r}}catch{return e.response}};function _9(e,t){const s=t.indexOf(":"),o=t.substr(0,s).trim().toLowerCase(),r=t.substr(s+1).trim();return o&&(e[o]=e[o]?e[o]+", "+r:r),e}function G9(e){return e?e.split(`
`).reduce(_9,{}):{}}function h1(e){const t=[];for(const s in e){const o=e[s];if(!Array.isArray(o)){t.push(encodeURIComponent(s)+"="+encodeURIComponent(o));continue}for(const r of o)t.push(h1(r))}return t.join("&")}function Zu(e){let t,s=!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=$c(e.deserialize??r1(),l);const f=e.headers??{},v=e.json??!1,C=e.jwt??!1,g=e.token??null,x=e.method??"GET",y=e.reviewEnv??!1,T=e.onUploadProgress;let S=$c(e.serialize??r1(),l),b=e.url;const L=e.withCredentials??!1,N=e.file,k=e.timeout??3e3;t=new XMLHttpRequest;const E=setTimeout(()=>{t.abort(),i({error:"request timed out"})},k);if(v&&(m=$c(JSON.parse,i),S=$c(JSON.stringify,i),f["Content-Type"]="application/json"),x==="GET"&&h&&(b+="?"+h1(h)),C){const j=g||pt();f.Authorization="Bearer "+j}c?.addEventListener("abort",d),t.withCredentials=L,t.addEventListener("abort",i),t.addEventListener("error",i),t.addEventListener("load",function(){t.status>=400?[401,403].includes(t.status)?s?i({error:"Unable to resume session",status:t.status}):si().then(()=>{r(a,i),s=!0}).catch(j=>{Fn.L2.addError(j),i({error:"Unable to resume session",status:t.status})}):e.arrayBuffer?i(U9(t)):i(m(t.response)):(a({body:t.status===204?void 0:m(t.response),headers:G9(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d)),clearTimeout(E)}),t.upload&&typeof T=="function"&&t.upload.addEventListener("progress",T),t.open(x,b),e.arrayBuffer&&(t.responseType="arraybuffer");for(const j in f)t.setRequestHeader(j,f[j]);x!=="GET"&&h?t.send(S(h)):N?t.send(N):t.send()});return o.abort=(...r)=>t.abort(...r),o}function W9(e){return e.status===200||e.status===201?e.body:Promise.reject(e.body)}const m1=(e,t=!0)=>t?`${e}s`:e;var Xu=null;const Tce=null,f1=null,Lce=(e,t="short")=>{const o=Object.keys(Xu).reverse().find(c=>e>=Xu[c]);if(!o)return`${e} ${m1("byte",e>1)}`;const r=e/Xu[o],a=r%1===0?r.toFixed(0):r.toFixed(2),i=t==="long"?m1(f1[o].long,r>1):f1[o].short;return`${a} ${i}`};var K9=p(12413),Q9=p.n(K9);const hs=e=>!!e&&e.type==="quiz",Cn=e=>!!e&&e.type==="blocks",gt=({courseProgress:e,lessonId:t,updatedLessonProgress:s})=>({...e,lessons:{...e.lessons,[t]:s}});function vt({lessonId:e,nextCourseProgress:t,prevCourseProgress:s}){const o=t.lessons[e],r=s.lessons[e];if(o&&!Q9()(o,r)&&(x8(o),Y9({lessonId:e,courseProgress:t,prevCourseProgress:s})),Z9({lessonId:e,prevCourseProgress:s,nextCourseProgress:t})){const a=g1(s),i=g1(t),c=i!==a,l={...t,percentComplete:i};return c&&(X9({courseProgress:l,lessonProgress:o}),l.percentComplete!=null&&y8(l.percentComplete)),l}return t}function Y9({courseProgress:e,prevCourseProgress:t,lessonId:s}){const o=e.lessons?.[s],r=t.lessons?.[s];if(o?.percentComplete===100&&r?.percentComplete!==100){const a=p1(o);a&&C8(a)}}function Z9({lessonId:e,nextCourseProgress:t,prevCourseProgress:s}){const o=t.lessons?.[e];if(!o)return!1;const r=s.lessons?.[e]?.percentComplete===100,a=o.percentComplete===100,i=r!==a,c=t.currentLesson!=null&&hs(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return i||c}function p1(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(hs(e)){const{passed:s,score:o,passingScore:r=0}=e;return{id:t,...s!==void 0&&{passed:s},...o!==void 0&&{score:o},passingScore:r}}return{id:t}}function g1(e){const{lessons:t={}}=e,s=Object.keys(t).length;if(s===0)return 0;const o=Object.values(t).filter(r=>r.isComplete).length;return Math.round(o/s*100)}function X9({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const s=p1(t);s&&b8(e,s)}const q9=e=>e.reduce((t,s,o)=>("id"in s&&(t[s.id]={id:s.id,index:o}),t),{}),qu=e=>({...e,percentComplete:Ju({items:e.items,key:"isComplete"})}),v1=e=>({...e,percentComplete:Ju({items:e.items,key:"isComplete"})}),C1=e=>({...e,percentViewed:Ju({items:e.items,key:"isViewed"})});function kce({itemId:e,isCorrect:t,progress:s}){const o={...s,items:{...s.items,[e]:{...s.items?.[e],id:e,index:s.items?.[e]?.index??0,isComplete:t,isViewed:t,...s.items?.[e].isCorrect===void 0?{isCorrect:t}:{}}}};o.items[e]?.isCorrect===!1&&(o.lastIncorrectCardId=e);const r=J9(o),a=r.percentComplete!==100?v1(r):r,i=C1(a);return i.percentComplete===100?{...i,isComplete:!0}:i}function Ju({items:e,key:t}){const s=e??{},o=Object.keys(s).length,r=Object.values(s).filter(a=>a?.[t]).length;return o===0?0:Math.round(r/o*100)}function J9(e){const s=Object.values(e.items||{}).filter(o=>o.isCorrect===!0).length;return{...e,correctlyAnswered:s}}var e0=p(44944),eS,tS;const Xt=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",x1=Array.isArray,Nce=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),b1=(e,t,s)=>{const o={};for(const r in s)o[e(r)]=t(s[r]);return o},sS=e=>e.map(y1),nS=e=>e.map(S1),oS=e=>b1(eS,y1,e),rS=e=>b1(tS,S1,e),y1=e=>Xt(e)?oS(e):x1(e)?sS(e):e,S1=e=>Xt(e)?rS(e):x1(e)?nS(e):e,Mt=(e,t)=>{const s=new Set(t),o={};for(const r in e)s.has(r)||(o[r]=e[r]);return o},fo=(e,t)=>Object.fromEntries(Object.entries(e).map(([s,o])=>t(s,o)));function T1(e,t){const s=e.lessons[t];if(!Cn(s))return e;const o={...t0(s),id:t},r=gt({courseProgress:e,lessonId:t,updatedLessonProgress:o});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function aS(e,t){const{lessonId:s,blockId:o,itemId:r}=t,a=e.lessons[s];if(!Cn(a))return e;const i=a.items[o],c=gS({blockProgress:i,itemId:r}),l=er({lessonProgress:a,blockId:o,updatedProgressBlock:c}),d=qu(l),h=gt({courseProgress:e,lessonId:s,updatedLessonProgress:d});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:h})}function iS(e,t){const s=e.lessons[t];if(!Cn(s))return e;const o=CS(s),r=gt({courseProgress:e,lessonId:t,updatedLessonProgress:o});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function cS(e,{blockId:t,lessonId:s}){const o=e.lessons[s];if(!Cn(o))return e;const r=xS(o.items[t]),a=er({lessonProgress:o,blockId:t,updatedProgressBlock:r}),i=gt({courseProgress:e,lessonId:s,updatedLessonProgress:a});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:i})}function lS(e,t){const{lessonId:s,blockId:o,items:r}=t,a=e.lessons[s];if(!Cn(a))return e;const i=pS({blockId:o,lessonProgress:a,items:r}),c=gt({courseProgress:e,lessonId:s,updatedLessonProgress:i});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:c})}function dS(e,t){const{lessonId:s,blockId:o,itemId:r,audioVideoPlayhead:a}=t,i=e.lessons[s],c=i?.items?.[o];if(!Cn(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=er({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=gt({courseProgress:e,lessonId:s,updatedLessonProgress:m});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:f})}function uS(e,t){const{lessonId:s,blockId:o,itemId:r,isCorrect:a}=t,i=e.lessons[s];if(!Cn(i))return e;const c=bS({itemId:r,isCorrect:a,blockProgress:i.items[o]}),l=qu(er({lessonProgress:i,blockId:o,updatedProgressBlock:c})),d=gt({courseProgress:e,lessonId:s,updatedLessonProgress:l});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:d})}function hS(e,t){const{lessonId:s,blockId:o,itemId:r,response:a}=t,i=e.lessons[s],c=i?.items?.[o];if(!Cn(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=er({lessonProgress:i,blockId:o,updatedProgressBlock:h}),f=gt({courseProgress:e,lessonId:s,updatedLessonProgress:m});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:f})}function mS(e,t){const{lessonId:s,blockId:o,isSubmitted:r}=t,a=e.lessons[s];if(!Cn(a))return e;const i=a?.items?.[o]??{},c=fo(i?.items??{},(m,f)=>[m,Mt(f,["response"])]),l={...i,items:c,isSubmitted:r},d=er({lessonProgress:a,blockId:o,updatedProgressBlock:l}),h=gt({courseProgress:e,lessonId:s,updatedLessonProgress:d});return vt({lessonId:s,prevCourseProgress:e,nextCourseProgress:h})}const fS=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),t0=e=>{const t=fo(e.items,(s,o)=>{const r=fo(o.items??{},(a,i)=>[a,{...i,isComplete:!0,id:i.id,index:i.index}]);return[s,{...o,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},pS=({blockId:e,items:t,lessonProgress:s})=>{const o=s.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),a=fo(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||fS(a),l={...o,id:e,items:a,...c&&{isComplete:!0}};return vS(er({lessonProgress:s,blockId:e,updatedProgressBlock:l}))},gS=({blockProgress:e,itemId:t})=>{if(!e.items)return e;const s=e.items[t];return{...e,items:{...e.items,[t]:{...s,retryAttemptCount:(s?.retryAttemptCount??0)+1}}}},vS=e=>{const t=qu(e);return t.percentComplete===100?{...t,isComplete:!0}:t},er=({blockId:e,lessonProgress:t,updatedProgressBlock:s})=>({...t,items:{...t.items,[e]:s}}),CS=e=>{const t=fo(e.items,(s,o)=>{const r=fo(o.items??{},(a,i)=>[a,Mt(i,["isComplete","isCorrect","isViewed"])]);return[s,{id:o.id,index:o.index,items:r}]});return{...Mt(e,["isComplete","percentComplete"]),items:t}},xS=e=>({...Mt(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:fo(e.items??{},(t,s)=>[t,Mt(s,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),bS=({isCorrect:e,itemId:t,blockProgress:s})=>{if(!s.items)return s;const o=s.items[t],r={...o,isComplete:e,isViewed:e,...o?.isCorrect===void 0&&{isCorrect:e}},a={...s.items,[t]:r},i=Object.values(a).filter(m=>m.isCorrect).length,c={...s,items:a,correctlyAnswered:i,...!e&&{lastIncorrectCardId:t}},l=C1(c),d=v1(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};function L1(e){return e.trim()===""}function yS(e,{lessonId:t,progressId:s}){const o=e.lessons[t];if(!hs(o))return e;const r=o.activeIndex??0,a=s?(o.items[s]?.index??r)+1:r+1,i=Object.keys(o.items).length+1,c=Math.min(a,i),l={...o,activeIndex:c},d=gt({courseProgress:e,lessonId:t,updatedLessonProgress:l});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:d})}function SS(e,t){const s=e.lessons[t];if(!hs(s))return e;const o=Object.keys(s?.items)?.length,r={...s,activeIndex:o+1},a=gt({courseProgress:e,lessonId:t,updatedLessonProgress:r});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function TS(e,{lessonId:t,itemId:s}){const o=e.lessons[t];if(!hs(o))return e;const r=o.items[s];if(!r)return e;const a={...r,selectedIndices:[]},i=ni({lessonProgress:o,itemId:s,updatedProgressQuizItem:a}),c=gt({courseProgress:e,lessonId:t,updatedLessonProgress:i});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function LS(e,{lessonId:t,lessonProgress:s}){return{...e,lessons:{...e.lessons,[t]:s}}}function kS(e,{lessonId:t,itemId:s,text:o}){const r=e.lessons[t];if(!hs(r))return e;const a=r.items[s];if(!a)return e;const i=typeof o=="string"&&L1(o)?Mt(a,["text"]):{...a,text:o},c=ni({lessonProgress:r,itemId:s,updatedProgressQuizItem:i}),l=gt({courseProgress:e,lessonId:t,updatedLessonProgress:c});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function NS(e,t){const s=e.lessons[t];if(!hs(s))return e;const o=fo(s.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),a={...Mt(s,["activeIndex","originalItemProgress","passed","percentComplete","questionList","questionsDrawn","reportResults","score"]),...s.passed!==!1&&{passed:s.passed},...s.isComplete!==!1&&{isComplete:s.isComplete},retryAttempts:(s.retryAttempts??0)+1,items:o},i=gt({courseProgress:e,lessonId:t,updatedLessonProgress:a});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function ES(e,{lessonId:t,itemId:s,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!hs(a))return e;const i=a.items[s];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=ni({lessonProgress:a,itemId:s,updatedProgressQuizItem:d}),m=gt({courseProgress:e,lessonId:t,updatedLessonProgress:h});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function IS(e,{lessonId:t,itemId:s,matches:o}){const r=e.lessons[t];if(!hs(r))return e;const a=r.items[s];if(!a)return e;const i={...a,matches:o},c=ni({lessonProgress:r,itemId:s,updatedProgressQuizItem:i}),l=gt({courseProgress:e,lessonId:t,updatedLessonProgress:c});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function jS(e,{lessonId:t,timeRemaining:s}){const o=e.lessons[t];if(!hs(o))return e;const r={...o,timeRemaining:s},a=gt({courseProgress:e,lessonId:t,updatedLessonProgress:r});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function wS(e,{lessonId:t,itemId:s,isCorrect:o,finalRetryAttempt:r,passToContinue:a}){const i=e.lessons[t];if(!hs(i))return e;const c=i.passingScore??80,l=i.items[s];if(!l)return e;const d={...l,isCorrect:o,isComplete:!0},h={...i.items,[s]:d},m=Object.keys(h).length,f=Object.values(h).filter(T=>T.isCorrect).length,v=Object.values(h).filter(T=>T.isComplete).length,C=Math.round(f/m*100),g=Math.round(v/m*100);let x={...i,items:h,score:C,percentComplete:g};if(g===100){const T=C>=c,S=a?T:!0;Cg(T,C,t,r),x={...x,passed:T,isComplete:S,reportResults:!0}}const y=gt({courseProgress:e,lessonId:t,updatedLessonProgress:x});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:y})}function AS(e,{lessonId:t,itemId:s,selectedIndex:o,shuffledAnswerIndices:r}){const a=e.lessons[t];if(!hs(a))return e;const i=a.items[s];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(y=>y!==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=ni({lessonProgress:a,itemId:s,updatedProgressQuizItem:C}),x=gt({courseProgress:e,lessonId:t,updatedLessonProgress:g});return vt({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function ni({itemId:e,lessonProgress:t,updatedProgressQuizItem:s}){return{...t,items:{...t.items,[e]:s}}}function RS(e,t){const{id:s,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?.[s]?.items??{},h=Object.keys(d).length+1,m=e.lessons?.[s];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,[s]:f}}}function PS(e,{quizId:t,destinationId:s}){const o=Object.keys(e.lessons),r=o.findIndex(c=>c===t),a=o.findIndex(c=>c===s);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=hs(d)?MS(d):t0(d),m=gt({courseProgress:c,lessonId:l,updatedLessonProgress:h});return vt({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function MS(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([s,o])=>[s,{...o,isComplete:!0,isCorrect:!0}]));return Cg(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}var OS=p(74278),BS=p(43923),Pe=p.n(BS),DS=p(3911),po=p.n(DS);const FS=e=>e!==void 0,k1=po()(FS,Pe()(JSON.parse,OS.Base64.decode)),HS=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var $S=p(72231),qs=p.n($S),VS=p(43396),Hn=p.n(VS),zS=p(56724),Ct=p.n(zS),US=p(51390),Vr=p.n(US),_S=p(869),GS=p.n(_S),WS=p(62910),N1=p.n(WS);const KS=["fromDashboard","locale","embed"];function QS(e,t){const s=typeof e=="function"?e(t):e;return typeof s=="string"?(0,we.Rr)(s):s}function s0(e,t){const s=QS(e,t),o=new URLSearchParams(t?.search||""),r=new URLSearchParams(s?.search||"");for(const a of KS){const i=o.get(a);i&&!r.has(a)?r.set(a,i):r.has(a)&&!r.get(a)&&r.delete(a)}return{...s,search:r.toString()}}function qt(){const e=(0,we.Zp)(),t=(0,we.zy)();return(0,u.useCallback)((s,o)=>{if(typeof s=="number")return e(s);const r=s0(s,t);return e(r,o)},[e,t])}function YS(e){function t(s){const o=(0,we.zy)(),r=qt(),a=(0,we.g)(),[i]=(0,we.ok)();return(0,n.jsx)(e,{...s,location:o,match:{params:a},navigate:r,queryParams:i})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}var ZS=p(85547),XS=p.n(ZS),E1=p(17734),qS=p(12387),I1=p.n(qS),JS=p(84218),n0=p.n(JS),eT=p(6778),go=p.n(eT),tT=p(90767),zr=p.n(tT),sT=p(63203),St=p.n(sT),nT=p(50306),oT=p.n(nT),rT=p(82247),Vc=p.n(rT),jce=p(12227),aT;function iT(...e){return Pe()(...oT()(1,e))(Vc()(e))}function o0(e,...t){return St()(...t)(e)}function wce(e,...t){return aT(...t)(e)}const Jt=()=>{};var cT=p(68294);const Ace="datadoghq.com",Rce=Ee("SERVICE_ENV"),Pce=Ee("RISE_FRONTEND_SHA"),Mce=Ee("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",Oce=window.Cypress!=null,Bce=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],j1={"Content-Type":"application/json"},lT=[(e,t)=>(t.Authorization=`Bearer ${ii()}`,JSON.stringify(e))],dT=Zs()(Ct(),Ne(),go()(["data","status","statusText"])),uT=St()(go()(["name","message","response"]),Bn()({response:dT})),hT=({baseURL:e,...t})=>Pe()(Jo()({headers:j1,transformRequest:lT}),Jo()(t),Bn()({url:qs()(e)})),mT=({data:e,method:t,url:s})=>fetch(s,{body:JSON.stringify(e),headers:{...j1,Authorization:`Bearer ${ii()}`},keepalive:!0,method:t}).then(o=>o.json()).then(zr()("data")),fT=Yo().fromPromise(mT),pT=e=>({method:t,url:s})=>`${t}:${e}${s}`,gT=e=>{const t=new Error("Nil token detected");return Fn.L2.addError(t,e),Yo().Rejected(t)},vT=e=>t=>e.preRequest?e.preRequest(t):t,CT=e=>t=>e.postRequest?e.postRequest(t):t,xT=()=>Ct()(ii()),bT=e=>(t,s)=>I1()(t,pT(s),r0(ci,e)),r0=(e,t)=>s=>o0(s,vT(t),hT(t),Zs()(xT,gT,e),n0()(uT,Ze()("data")),CT(t)),yT=e=>({debounce:bT(e),send:r0(ci,e),sendWithKeepAlive:r0(fT,e)}),ST=()=>document.visibilityState==="visible",TT=e=>po()(ST,()=>e()),w1=(e=>{document.addEventListener("visibilitychange",TT(e)),window.addEventListener("focus",()=>e())});p.dn(w1);var LT=p(42431),ms=p.n(LT),kT=p(37159),Ur=p.n(kT),NT=p(13758),ET=p.n(NT),IT=p(21435),tr=p.n(IT);const jT=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var wT;const A1=e=>{const t=e.user,s=t?.profile?.user_id,o=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:a}=jT(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:a,reach_user_id:void 0,a360_user_id:s,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}}}},Fce=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&wT(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},Hce=(e,t)=>{if(!t)return{};const s=e?.lessons?.[t];if(!s)return{};const o=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:s.type,lesson_position:o}},$ce=(e,t,s)=>{if(!t||!s)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const a=r.items.find(l=>l.id===s);if(!a)return{};const c=r.items.map(l=>l.id).indexOf(s)+1;return{block_id:s,block_type:a.type,block_variant:a.variant,block_family:a.family,block_position:c,block_created_via:a?.metadata?.createdVia??"manual"}},Vce=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:s,resourceType:o,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:s,interaction_set_task_resource_type:o,interaction_set_has_source_content:r}:{},AT=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},RT=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.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 Zo.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},MT=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.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"},OT=()=>{if(!navigator.userAgent)return"unknown";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},R1=()=>{if(!navigator.userAgent)return"browser";const t=new Zo.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function BT(e){return"userAgentData"in e}const P1=()=>{if(BT(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},M1=()=>({name:AT(),version:RT(),type:PT(),manufacturer:MT(),model:OT()}),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}},B1=()=>navigator.userAgent||null,sr=(e,t=null)=>{const s={...e,context:{locale:navigator.language,device:M1(),channel:R1(),userAgentData:P1(),page:O1(),userAgent:B1(),...e.context},properties:{...t?A1(t):{},...e.properties}};return Zu({method:"POST",url:`${Ee("RISE_RUNTIME_URI")}/analytics`,json:!0,data:s})},DT=Ee("SUBSCRIPTIONS_ENDPOINT"),FT=Ee("THREESIXTY_FRONTEND_URI"),HT=ET()(["error","status"],404),$T=Pe()(zr()("error"),Ze()("response")),VT=()=>window.location.href=FT,zT=[(e,t)=>(t.Authorization=`Bearer ${ii()}`,e)],UT=async e=>{const t=`${DT}/users/authorized_status`,s=await ci({transformRequest:zT,url:t}).toPromise().catch($T),o=Pe()(e,N1()(a=>sr({event:"Unexpected Logout",payload:{category:"auth",data:a,detail:"Subscription Error"}})));return ms()([[HT,VT],[Ur()("error"),o],[tr(),Ze()("data")]])(s)};var _T=p(61915),Os=p.n(_T);const D1=e=>e===V1,vo=e=>D1(e?.type),Uce=(e,t)=>s=>vo(s)?e:t,GT=null,a0={guide:"Guide",presentation:"Presentation",video:"Video Training",scenario:"Scenario",microlearning:"Microlearning"},F1=e=>Object.prototype.hasOwnProperty.call(a0,e),zc=e=>{const t=e?.outputType;return typeof t=="string"&&F1(t)?t:void 0},Uc=(e,t)=>e===V1&&t!==void 0,H1=e=>{const t=zc(e?.experiments);return Uc(e?.type,t)&&t==="guide"},_r=e=>{const t=zc(e?.experiments);return Uc(e?.type,t)&&t==="presentation"},i0=e=>{const t=zc(e?.experiments);return Uc(e?.type,t)&&t==="video"},c0=e=>{const t=zc(e?.experiments);return Uc(e?.type,t)&&t==="scenario"},_ce=e=>typeof e=="string"&&F1(e)?a0[e]:a0.microlearning,Gce=e=>e?GT.includes(e):!1;var WT,KT;const Wce=null,Bs={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},_c={EDITOR:1,MANAGER:2,OWNER:3},QT={[_c.EDITOR]:"Author",[_c.MANAGER]:"Admin",[_c.OWNER]:"Owner"},Kce=Object.values(_c).map(e=>({id:e,title:QT[e]})),Qce=({name:e,isOnePage:t,outputType:s})=>{const o=t?KT(s):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 WT?r[e]:a[e]},Yce="questionBanks",$1="2% 0px 2% 0px",Zce=9,Xce=13,qce=27,Jce=32,ele=38,tle=40,nle=864e5*3,ole=100,V1="onePage",Js={UP:"up",DOWN:"down"},Co=Os()({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),nr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},rle=Object.values(nr),ale=null,xt={DARK:"#000",LIGHT:"#fff"},l0={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},z1=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var YT;const ile=e=>e.status==="active",ZT=e=>e.status==="inactive",cle=e=>e.plan==="individual",lle=e=>e.features?.enable_review===!0,XT=e=>e.features?.enable_rise===!0,dle=e=>e.plan==="trial",qT=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,ule=e=>e.plan==="team"||e.plan==="individual",hle=e=>e.plan==="team"&&e.is_team_admin===!0,mle=e=>e.plan==="trial"&&e.is_team_admin===!0,fle=e=>{if(!e.end_date)return 0;const t=new Date(e.end_date);t.setUTCHours(0,0,0,0);const s=t.setDate(t.getDate()+1);return s&&(s.valueOf()-new Date().setUTCHours(0,0,0,0))/YT||0};var JT=p(75928),d0=p.n(JT),eL=p(34370),U1=p.n(eL),tL=p(59783),oi=p.n(tL),sL=p(47951),Ls=p.n(sL);const ri=(e,t)=>`${Ee("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,nL=e=>({large:ri(e,"large"),medium:ri(e,"medium"),micro:ri(e,"micro"),mini:ri(e,"mini"),small:ri(e,"small")}),oL=U1()({features:Ls()({},"features"),subscription:Vr()(["features"])}),rL=d0()([qT,ZT,oi()(XT)]),aL="/auth-callback",_1="/auth-error",Gc=()=>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",(s,o)=>{s==="dialog"&&o==="hide"&&(e(),clearTimeout(t))})}else e()}),u0=aL,iL=_1,cL=pt,G1=()=>window.location.pathname===u0;let W1=!1,h0=!1;const lL=e=>{if(W1)return;const t=(0,E1.A)();W1=!0,window.localStorage.setItem(t,e);const s=z9({client_id:Ee("OKTA_CLIENT_ID"),issuer:Ee("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${u0}`,response_mode:"fragment",scope:Ee("OIDC_SCOPE"),state:t,prompt:null});Gc().then(()=>{window.location.href=s})},K1=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return lL(t)},dL=()=>u1().catch(e=>{e.response?.status===404&&or({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),uL=e=>($r("unauthorized",e),()=>{$9("unauthorized",e)}),hL=()=>{if(h0)return;const e=qo(),t=Yu();Ct()(e)?(sr({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),Fn.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),h0=!0,or({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(sr({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),Fn.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),h0=!0,si().then(()=>window.location.reload(!0)))},Q1=async e=>{try{const[,t,s,o]=await si(),{aid:r,content_team_admin:a}=o;if(sr({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),E9(r),G1()){e();return}const{first_name:i,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:nL(r),first_name:i,user_id:r,last_name:c,staff:d,content_team_admin:a},f={author:r,profile:m},v=()=>or({onLogout:Re()(null)}),C=x=>e({...f,...oL(x),launchdarkly:l,token:s}),g=await UT(v).then(N1()(C)).catch(()=>e({...f,token:s}));if(rL(g)){sr({event:"Unexpected Logout",payload:{category:"auth",userId:qo(),subscription:g,detail:"Invalid Subscription"}}),Fn.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:qo(),detail:"Invalid Subscription"}),or({onLogout:()=>window.location=`${Ee("THREESIXTY_FRONTEND_URI")}/rise`});return}w1(hL)}catch(t){sr({event:"Unexpected Logout",payload:{category:"auth",userId:qo(),error:t,detail:"Error Resuming Session"}}),Fn.L2.addError(t,{type:"User Meta",userId:qo(),detail:"Error Resuming Session"}),or({onLogout:()=>window.location.reload(!0)})}},Y1=({onFetchTokens:e})=>{if(G1()){Q1(e);return}const t=qo(),s=Yu();if(Ct()(t)||t!==s){Gc().then(K1);return}Q1(e)},or=({onLogout:e,reason:t})=>{t&&sr({event:"Logout",payload:{category:"auth",userId:qo(),detail:t}});const s=Ee("RISE_AUTHORING_URI"),o=()=>yT({baseURL:s}).send({method:"DELETE",url:"/logout"}),r=()=>{I9(),j9(),d1().then(e)};o().fork(a=>{console.error("Failed to log out of rise-authoring-api",a),r()},r)},mL=Pe()(XS().parse,GS()(1,1/0)),fL=(e,t)=>{Gc().then(()=>{const o=window.localStorage.getItem(t)||"/",r=o===e?"/":o;window.localStorage.removeItem(t),window.location.href=r})},pL=e=>()=>window.location.href=`${_1}?description=${e}`,gL=({location:e})=>()=>{const{hash:t,pathname:s}=e,{state:o,error:r,error_description:a}=mL(t);r?(Fn.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:a}),or({onLogout:pL(a),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${a}`})):Y1({onFetchTokens:()=>fL(s,o)})},vL=YS(e=>((0,u.useEffect)(gL(e),[]),null)),CL=({dispatch:e,loadProfileOKTA:t})=>s=>{const o=Vr()(["token"],s);Pe()(e,t)(o)};var xL=p(49497),bL=p.n(xL),yL=p(77786),xo=p.n(yL),SL=p(93361),bt=p.n(SL),TL=p(29545),Z1=p.n(TL),LL=p(77177),ai=p.n(LL);const Wc=async()=>{await Gc();const[e,t]=ft()(encodeURIComponent,Z1()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},X1=()=>{window.location.href="/"},gle=null,vle=null,Cle=pt,xle=Wc,kL=d1,ble=()=>u1().catch(()=>kL()),yle=()=>Jt,NL=St()(Ls()([],"roles"),ai()(xo()("author"),X1)),q1=St()(bt()("",["subscription","status"]),ai()(xo()(bL(),["active","in_trial","non_renewing"]),X1)),EL=()=>window.location.reload(),Sle=async({onFetchTokens:e})=>{try{const[t,s]=await si(),{launchdarkly:o,riseId:r,sub:a,staff:i,subscription:c}=s,l={staff:i,user_id:r||a};return q1(s),e({author:l.user_id,launchdarkly:o,profile:l,subscription:c,token:t}),$r("change:roles",NL),$r("change:status",q1),$r("change:subdomain",EL),$r("unauthorized",Wc),$r("session:closed",Wc),t}catch{Wc()}};var Tle;const{callbackComponent:Lle,callbackPath:kle,getToken:ii,initAuth:Nle,login:Ele,logout:Ile,onSessionExpired:jle,refreshSession:wle,request:ci}=Ko;var J1,eg;const tg=`${Ee("RBC_URI")}/api/partner_content`,IL=null,jL=qs()(`${tg}/`),m0={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${ii()}`,e)],headers:{"Content-Type":"application/json"}},Ple=()=>eg({...m0,url:IL}).toPromise().then(J1(["data","types"])),Mle=e=>eg({...m0,url:jL(e)}).toPromise().then(J1(["data","content"])),wL=e=>ci({method:"POST",url:tg,data:JSON.stringify({ids:e}),...m0}).map(Hn()(["data","content"]));var AL=p(97759),Gr=p.n(AL);const sg=Ee("SERVICE_ENV")==="prod",Kc=sg?"com":"zone",RL=St()(JSON.stringify,Gr()(new RegExp(`https://images.riseusercontent.${Kc}/`,"g"),`${Ee("IMAGES_URI")}/`),Gr()(new RegExp(`https://riseusercontent.${Kc}/`,"g"),`${Ee("CDN_USER_CONTENT_URI")}/`),Gr()(new RegExp(`https://video.rise.${Kc}/`,"g"),`https://video.riseusercontent.${Kc}/`),po()(Re()(!sg),Gr()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var PL=p(59969),ML=p.n(PL),OL=p(27728),es=p.n(OL),BL=p(49946),Nt=p.n(BL),DL=p(56187),Qc=p.n(DL),FL=p(77980),ng=p.n(FL);const HL=go(),f0=vn(),p0=Xs(),g0=ng(),og=Jo(),li=Ze(),$L=Bn(),v0=ft(),Yc=e=>e!=null&&typeof e=="object",VL=e=>t=>Ct()(t)?t:e(t),di=e=>!!e,rg={a:["activeIndex",Ne()],vp:["audioVideoPlayhead",Number],c:["isComplete",di],n:["correctlyAnswered",Ne()],p:["percentComplete",Ne()],r:["retryAttempts",Ne()],s:["score",Ne()],t:["currentTime",Ne()],v:["percentViewed",Ne()],rr:["reportResults",Ne()],pq:["passed",Ne()],ps:["passingScore",Ne()],qd:["questionsDrawn",Ne()],ql:["questionList",VL(ft()(ft()(Ne())))],qt:["timeRemaining",Number]},zL=e=>(t,s)=>{const[o,r]=rg[s];return es()(o,r(t),e)},ag=e=>(t,s)=>{const[o,r]=KL[s],a=s==="i"?C0(t)(li("items",e)):r(t);return{[o]:a}},UL=e=>t=>{const s=e?.[String(t.index)];if(Ct()(s))return t;const o=f0(ag(t),Yc(s)?s:{}),r=g0(p0(o).filter(a=>a!=null&&typeof a=="object"));return og(t,r)},C0=e=>t=>v0(UL(Yc(e)?e:{}),Yc(t)?t:{}),_L=e=>{const t=f0(ag(null),Yc(e)?e:{});return g0(p0(t).filter(s=>s!=null&&typeof s=="object"))},GL=e=>t=>{const s=li("i",e),o=li("items",t),r=HL(Qc()(rg),e),a=f0(zL(t),r);let i=g0(p0(a).filter(l=>l!=null&&typeof l=="object"));if(Nt()(s)||(i=es()("items",C0(s??{})(o),i)),i=og(t,i),!!ML()([Ur()("ql"),qe()("qd",!0),()=>!Ct()(s)])(e)){const l=v0(_L,s??{});return es()("originalItemProgress",l,i)}return i},WL=(e,t)=>{const s=li("lessons",t),o=a=>{const i=li(String(a.index),s);return Ct()(i)?a:GL(i??{})(a)};if(Nt()(s))return e;const r=$L({lessons:a=>v0(o,a)},e);return es()("percentComplete",Ls()(0,"p",t),r)},KL={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",Ne()],c:["isComplete",di],k:["isCorrect",di],is:["isSubmitted",di],v:["isViewed",di],i:["items",C0],pv:["percentViewed",Ne()],m:["matches",Ne()],sr:["response",Ne()],r:["retryAttemptCount",Number],s:["selectedIndex",Ne()],x:["selectedIndices",Ne()],sa:["shuffledAnswerIndices",Ne()],t:["text",Ne()]};var QL=p(39906),bo=p.n(QL),YL=p(88120),ig=p.n(YL);const cg=go(),ZL=ig(),lg=vn(),x0=Xs(),b0=ng(),y0=Ze(),XL=ft(),qL=e=>e!=null&&typeof e=="object",dg=e=>!!bo()(Ct(),Nt())(e),JL=e=>t=>Ct()(t)?t:e(t),ug={activeIndex:["a",Ne()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ne()],currentTime:["t",Ne()],isComplete:["c",Number],passingScore:["ps",Ne()],percentComplete:["p",Ne()],percentViewed:["v",Ne()],retryAttempts:["r",Ne()],score:["s",Ne()],questionsDrawn:["qd",Ne()],questionList:["ql",JL(ft()(ft()(Ne())))],reportResults:["rr",Ne()],passed:["pq",Ne()],timeRemaining:["qt",Number]},e8=(e,t)=>{const[s,o]=mg[t];return{[s]:o(e)}},t8=e=>{const t=cg(Qc()(mg),e),s=ZL(Nt(),t),o=b0(x0(lg(e8,s)).filter(r=>r!=null&&typeof r=="object"));return Nt()(o)?o:zr()(String(y0("index",e)),o)},hg=e=>{const t=XL(t8,qL(e)?e:{});return b0(x0(t).filter(s=>s!=null&&typeof s=="object"))},s8=(e,t)=>{const[s,o]=ug[t];return{[s]:o(e)}};function n8(e){const t=y0("items",e),s=y0("index",e),o=dg(t)?t:hg(t??{}),r=b0(x0(lg(s8,cg(Qc()(ug),e))).filter(i=>i!=null&&typeof i=="object")),a=dg(o)?r:es()("i",o,r);return zr()(String(s),a)}const o8=e=>zr()("p",Ls()(0,"percentComplete",e)),mg={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",Ne()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",Ne()],isViewed:["v",Number],items:["i",hg],matches:["m",Ne()],percentViewed:["pv",Ne()],retryAttemptCount:["r",Number],selectedIndex:["s",Ne()],selectedIndices:["x",ft()(Number)],shuffledAnswerIndices:["sa",ft()(Number)],text:["t",Ne()],response:["sr",Ne()]},r8=e=>`${Ee("CDN_USER_CONTENT_URI")}/${e}`,a8=()=>!!window.shareId,fg=()=>!!window.contentId,pg=()=>!!window.snapshotId,i8=()=>!!window.shareId&&!!window.hasPassword,c8=fg()?RL:e=>e,l8={fetch:()=>S0.isExport?.()||window.courseData||window.course?HS(k1,{}):Zu({method:"GET",url:window.shareId?`${Ee("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:fg()?`${Ee("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:pg()?`${Ee("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ee("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then(W9).then(t=>typeof t=="object"?t:k1(t)).then(c8),fetchPartnerContent:e=>S0.isExport?.()||window.partnerContent?window.partnerContent.content:wL(e).toPromise(),getEnv:Ee,isPasswordProtected:i8,isShare:a8,isSnapshotPreview:pg,resolvePath:r8,verifySharePassword:e=>Zu({method:"POST",url:`${Ee("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},d8=(e,{id:t,type:s,...o})=>s==="quiz"?RS(e,{id:t,...o}):T1(e,t),u8=(e,t)=>e+((t||{}).c||0),h8=(e,t)=>(s,{id:o,type:r,...a})=>t.lessons[o]?{...s,...e(d8(t,{id:o,type:r,...a}).lessons[o])}:s,m8=(e,t,s)=>{const o=t.reduce(h8(e,s),{}),r=Object.keys(s.lessons||{}).length,a=Object.values(o).reduce(u8,0),i=Math.round(a/r*100);return{lessons:o,p:i}};window.Rise=Object.assign(window.Rise||{},{completeLessons:m8,decodeCourseProgress:WL,encodeCourseProgress:o8,encodeLessonProgress:n8});const S0={...l8,...window.Runtime??{}},Se=S0,f8=e=>Se.getMasteryScore!=null?Se.getMasteryScore(e):e.passingScore,p8=e=>{if(Se.onCreateHistory!=null)return Se.onCreateHistory(e)},gg=(e={},t)=>Se.fetch!=null?Promise.resolve(t==null?Se.fetch():Se.fetch(t)):Promise.resolve(e),g8=(e=[])=>{if(Se.fetchPartnerContent!=null)return Se.fetchPartnerContent(e)},v8=e=>{if(Se.bookmark!=null)return Se.bookmark(e)},vg=e=>Se.getProgress!=null?Se.getProgress(e):e,C8=e=>Se.setLessonComplete!=null?Se.setLessonComplete(e):e,x8=e=>Se.setLessonProgress!=null?Se.setLessonProgress(e):e,b8=(e,t)=>Se.setCourseProgress!=null?Se.setCourseProgress(e,t):e,y8=e=>{if(Se.finish!=null)return Se.finish(e)},Cg=(e,t,s,o)=>{Se.finishQuiz!=null&&Se.finishQuiz(e,t,s,o)},S8=(e,t,s,o)=>{Se.finishStoryline!=null&&Se.finishStoryline(e,t,s,o)},xg=()=>Se.isComplete!=null?Se.isComplete():null,T8=()=>Se.isExport!=null?Se.isExport():!1;function bg(){if(Se.isExport!=null){const e=window.partnerContent?.content;return Se.isExport()&&!!e}return!1}const yg=()=>Se.isShare!=null?Se.isShare():!1,L8=()=>Se.isSnapshotPreview!=null?Se.isSnapshotPreview():!1,Sg=()=>Se.isPasswordProtected!=null?Se.isPasswordProtected():!1,Tg=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}`},k8=e=>Se.verifySharePassword!=null?Se.verifySharePassword(e):Promise.resolve({isValid:!0}),Lg=e=>{if(Se.reportAnswer!=null){const{id:t,isCorrect:s,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:s,itemId:d,questionTitle:Ts(h),quizTitle:Ts(l),retryAttempts:c,answers:f9(r),correctResponse:p9(r),response:g9({isUnfinished:o,item:r,itemProgress:a}),isUnfinished:o,latency:m9(i)})}return!1},kg=e=>{if(Se.startLesson!=null)return Se.startLesson(e)},N8=()=>{if(Se.getLocale!=null)return Se.getLocale()},E8=e=>{if(Se.setLocale!=null)return Se.setLocale(e)},{browser:Ng,os:Eg}=new Zo.UAParser(window.navigator.userAgent).getResult(),I8=e=>{if(Se.sendTelemetry!=null)return Se.sendTelemetry({...e,browser:{name:Ng.name??"",version:Ng.version??""},os:{name:Eg.name??"",version:Eg.version??""}})};var Ig=p(70080),j8=p(99931),w8=p(99914),A8=p(35450),R8=p(93063),P8=p(56747),T0=p(29411),L0=p(211),M8=p(47688);Ig.A.register(j8.A),Ig.A.register(w8.A);function Wr(...e){try{return(0,A8.Ay)(...e)}catch{return null}}const en=(e,t)=>{const s=Wr(t);return s==null?null:(0,L0.A)((0,T0.jh)(s,Wr("#ffffff"),e),{format:"hex",collapse:!1})},k0=e=>en(.9,e);var O8=p(51962),ts=p.n(O8),B8=p(23492),D8=p.n(B8),F8=p(78399),N0=p.n(F8),_t=p(65787);const H8=Pe()(xo()(".svg"),e=>e??"",Ls()("","originalUrl")),$8=Zs()(H8,Re()({width:"500rem"}),Re()({})),yo=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},jg=e=>yo(e)||void 0,wg=e=>e?"img":void 0,Ag=e=>St()(Ls()("","originalUrl"),t=>t??"",N0()("."),Vc(),ts()(e)),V8=Ag("svg"),Hle=Ag("gif"),z8=/\.svg$/i,Rg=e=>z8.test(e),U8=null,$le=e=>U8[e]||"left",_8=(e,t)=>{const s=D8()(e,t);return s.media.image.key===t.media.image.key&&Object.assign(s.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),s},G8=({src:e,alpha:t})=>({alpha:t,media:{image:{key:W8(e),src:e}}}),W8=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,K8=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),Q8=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),Pg=(e,t)=>(s,o)=>{const r=s[t];if(s?.theme){const a=o?o(r?.media):r?.media;if((0,_t.uW)(a))return r;const i={...r,media:{...a}},c=G8(e(s.theme));return _8(i,c)}else return r},Mg=Pg(K8,"coverImage"),Og=Pg(Q8,"lessonHeaderImage"),Vle=async e=>{const t=new Image;return t.src=e,await t.decode(),t};function tn(e){return Os()(e)}class Y8 extends Error{constructor(t="Assert Error",s){super(t,s)}}function zle(e,t="Assertion Error"){if(!e)throw new Y8(t)}const Zc={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},Z8="#ff631e",Ule=3,_le=17,Gle=32,Wle=24,Kle=50,Qle=.6,Yle="right",X8="rounded",q8=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],Zle="#ffffff",Xle=Gu()("color",q8),qle="#000",Jle="#fff",ede="Rise",se=tn({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),ui=tn({LARGE:null,MEDIUM:null,SMALL:null}),Xc=tn({STEPPED:null,CONTINOUS:null}),E0=Os()({NUMBERS:null,DOTS:null,NONE:null}),rr=tn({COMPACT:null,OVERLAY:null,SIDEBAR:null}),$n=Os()({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),ar=Os()({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),So={FREE:"free",RESTRICTED:"restricted"},ir=Os()({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),et=Os()({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),hi=tn({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),Vn=tn({FULL:null,FLOATING:null,FLOATING_FULL:null}),ce=tn({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}),mi=tn({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),J8={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},tde=!0,ek=mi.BOTTOM_RIGHT,sde=[{text:"Top left",type:mi.TOP_LEFT},{text:"Top right",type:mi.TOP_RIGHT},{text:"Bottom left",type:mi.BOTTOM_LEFT},{text:"Bottom right",type:mi.BOTTOM_RIGHT}],nde={default:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Left",type:ce.LEFT},{text:"Left overlay",type:ce.LEFT_OVERLAY},{text:"Split left",type:ce.SPLIT_LEFT},{text:"Split right",type:ce.SPLIT_RIGHT},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:ce.CENTERED},{text:"Centered overlay",type:ce.CENTERED_OVERLAY},{text:"Centered image",type:ce.CENTERED_IMAGE},{text:"Centered accent tint",type:ce.CENTERED_ACCENT_TINT},{text:"Split left image",type:ce.SPLIT_LEFT_IMAGE},{text:"Split right image",type:ce.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:ce.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:ce.TWO_THIRDS_RIGHT_IMAGE}]},ode=null,rde=null,ade=[{text:"Image",type:ce.IMAGE},{text:"Accent",type:ce.ACCENT},{text:"White",type:ce.WHITE}],Kr={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"},be=tn({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),tk=tn({ROUNDED:null,SQUARED:null}),sk=Os()({ROUNDED:null,SQUARED:null}),nk=Os()({FLOATING:null,FULL:null}),nt=Os()({ACCENT:null,DARK:null,LIGHT:null}),ide=[{value:be.AUTO,label:"Auto"},{value:be.DARK,label:"Dark"},{value:be.LIGHT,label:"Light"}],Qe={accentContrast:be.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:be.AUTO,blockBackgroundType:se.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:tk.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:be.AUTO,blockTextBackgroundType:se.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:sk.ROUNDED,buttonNavigationStyle:nk.FULL,buttonScheme:hi.LIGHT,colorAccent:Z8,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:ce.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:be.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:nt.DARK,lessonHeaderSize:ui.MEDIUM,lessonHeaderStyle:se.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:$n.LIGHT,navigationType:rr.SIDEBAR,progressIndicatorStyle:et.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:Zc.RISE_CLASSIC},cde=null,ok=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","theme","uiTypeface"],rk=e=>e.theme?.colorAccent||e.color||Qe.colorAccent,Bg=e=>e.theme?.navigationRestricted??Qe.navigationRestricted?So.RESTRICTED:So.FREE,Dg=e=>e.theme?.sidebarStartsOpen??Qe.sidebarStartsOpen?Kr.OPEN:Kr.CLOSED,ak=e=>e.theme?.showLessonCount??e.showLessonCount??Qe.showLessonCount,ik=({sidebarMode:e})=>e!==Kr.HIDDEN,ck=({navigationMode:e})=>e===So.RESTRICTED,lk=({sidebarMode:e})=>e===Kr.OPEN,dk=e=>e.coverImage?.media?.image?$n.LIGHT_IMAGE:$n.LIGHT,uk=e=>e.coverImage?.media?.image?ce.LEFT_OVERLAY:ce.LEFT,zn=(e,t)=>t[e]??t.theme?.[e]??Qe[e],Fg=e=>{const t=Dg(e),s=Bg(e),o={allowSearch:zn("allowSearch",e),animateBlockEntrance:zn("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:zn("compactShowLessonCount",e),coverImageDefault:null,coverPageType:uk(e),enableVideoPlaybackSpeed:zn("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:zn("markComplete",e),navigation:ik({sidebarMode:t}),navigationSectionsExpanded:zn("navigationSectionsExpanded",e),navigationRestricted:ck({navigationMode:s}),navigationStyle:dk(e),showAuthor:zn("showAuthor",e),showLessonCount:zn("showLessonCount",e),showNavigationButtons:zn("showNavigationButtons",e),sidebarStartsOpen:lk({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...Qe,...o};return{...e,theme:{...r,isLegacyCourse:!0}}},I0=e=>{const t=rk(e),s={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:Mg(e),coverPageType:e.theme?.coverPageType??Qe.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??Qe.enableVideoPlaybackSpeed,lessonHeaderImage:Og(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:Bg(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:ak(e),showStartButton:e.theme?.showStartButton??Qe.showStartButton,sidebarMode:Dg(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??Qe.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??Qe.showNavigationButtons};return{...e,...s}},hk=({course:e,updates:t})=>{const s=Object.fromEntries(Object.entries(t||{}).filter(([r])=>ok.includes(r))),o={...e,...s};return I0(o)},mk={padding:"medium",alignment:"left"},fk={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},sn=(e,t=0)=>`item_${e}_${t}`,qc=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),pk=e=>z1.some(t=>t===e),Hg=e=>qc(e)&&(typeof e.id=="string"||typeof e.id=="number")&&pk(e.type),fi=e=>Array.isArray(e)?e.filter(qc):[],$g=(e,t)=>[{id:sn(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],cr=e=>({...mk,...fk[e]??{}}),gk=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,Vg=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const s={};for(const[o,r]of Object.entries(t))s[o]=gk(r);return s}return t}),vk=e=>["Introduction","Summary"].map((t,s)=>({id:sn(`${e}_process`,s),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),Ck=(e,t)=>[{id:sn(`${t}_text`,0),paragraph:e}],xk=(e,t)=>[...vk(t),...e],bk=(e,t)=>[{id:sn(`${t}_video`,0),caption:"",media:e}],yk=(e=[],t)=>({family:"multimedia",id:sn(`${t}_embed`,0),items:e.length?e:$g("embed",t),media:{},settings:cr("embed"),type:"multimedia",variant:"embed"}),Sk=(e,t,s)=>({family:"interactive-fullscreen",id:sn(`${s}_labeledgraphic`,0),items:e,media:t,settings:cr("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),Tk=(e,t)=>({family:"interactive-fullscreen",id:sn(`${t}_process`,0),items:Vg(e),media:{},settings:cr("process"),type:"interactive",variant:"process"}),Lk=({items:e,piles:t},s)=>({family:"interactive-fullscreen",id:sn(`${s}_sorting`,0),items:e,media:{},piles:t,settings:cr("sorting"),type:"interactive",variant:"sorting"}),kk=(e,t)=>({family:"text",id:sn(`${t}_text`,0),items:Vg(e),settings:cr("paragraph"),type:"text",variant:"paragraph"}),Nk=(e,t)=>({family:"interactive-fullscreen",id:sn(`${t}_timeline`,0),items:e,media:{},settings:cr("timeline"),type:"interactive",variant:"timeline"}),Ek=(e,t={},s)=>({family:"multimedia",id:sn(`${s}_video`,0),items:qc(e)&&e.video?bk(e,s):$g("video",s),media:{},settings:{...qc(t)?t:{},...cr("video")},type:"multimedia",variant:"video"}),Ik=(e,t)=>{const s=fi(e.items);return yk(s.map(({icon:o,...r})=>r),t)},jk=(e,t)=>Sk(fi(e.items).map(({hasMedia:s,...o})=>o),e.media,t),wk=(e,t)=>{const s=fi(e.items).map(o=>({...o,isHidden:!1,type:"step"}));return Tk(xk(s,t),t)},Ak=(e,t)=>Nk(fi(e.items).map(({linePosition:s,...o})=>o),t),Rk=(e,t)=>kk(Ck(e,t),t),Pk=(e,t)=>{const s=e.type;switch(s){case"embed":return Ik(e,t);case"map":return jk(e,t);case"process":return wk(e,t);case"sorting":return Lk({items:fi(e.items),piles:e.piles},t);case"timeline":return Ak(e,t);case"screencast":case"slidecast":case"video":return Ek(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${s}`)}},Mk=e=>Hg(e),Ok=e=>{if(!Hg(e))return e;const t=String(e.id),s={description:"",icon:"Article",type:"blocks"},o=[Pk(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&o.unshift(Rk(r,`${t}_desc`)),{...e,...s,items:o,media:{}}},zg=e=>`rise/rise-com/${e}`,Ug=zg("FAVORITE_ADDED"),_g=zg("FAVORITE_REMOVED"),Bk=()=>(0,me.action)(Ug,void 0),Dk=()=>(0,me.action)(_g,void 0),Gg=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),lr=(e=>`rise/status/${e}`)("SET_LOADED"),Fk=(e,t)=>({...e,...t}),Hk={connection:"connected",courseLoaded:!1,fatalError:!1,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},$k=(0,me.handle)(Hk,{[lr]:Fk}),Vk=(e=!1)=>(0,me.action)(lr,{fontsLoaded:e}),zk=(e=!1)=>(0,me.action)(lr,{courseLoaded:e}),Uk=(e=!1)=>(0,me.action)(lr,{coverLoaded:e}),_k=(e=!1)=>(0,me.action)(lr,{notFound:e}),Gk=(e=!1)=>(0,me.action)(lr,{fatalError:e}),Wg=(e=!1)=>(0,me.action)(lr,{partnerContentLoaded:e}),Wk=(e=[],t)=>t?.partnerContentId?e.concat(t.partnerContentId):e,Kk=(e,t)=>t?.items?.reduce(Wk,e)??e,Qk=(e,t)=>t?.items?.reduce(Kk,e)??e,Yk=({course:e,lessons:t})=>{const s=t?.reduce(Qk,[])||[],o=e?.partnerContentId||null,r=o?[o]:[],a=new Set([...s,...r]);return Array.from(a)},Zk=e=>typeof e=="string"&&e.length>0,ude=`${Ee("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,hde=Os()({ACTIVE:null,PREVIEW:null}),mde=({themeCoverImage:e,coverImageDefault:t})=>Zk(t)?t:e,Xk=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),ss={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"},dr={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},qk={CONTINUE:"continue",NONE:""},je={ALL:"all",NONE:"none",INCORRECT:"incorrect"},fde=10,pde=80,gde=500;var vde;const Jk=ms()([[d0()([ts()(!0),ts()(je.ALL)]),Re()(je.ALL)],[d0()([ts()(!1),ts()(je.NONE)]),Re()(je.NONE)],[ts()(je.INCORRECT),Re()(je.INCORRECT)],[tr(),Re()(je.ALL)]]),Cde="draw from question bank",xde="fillin",bde="matching",yde="multiple choice",Sde="multiple response",Tde=null;var e7=p(47874),j0=p.n(e7);const w0={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},Qr={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},ks=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,Kg="/lessons/progress-summary",A0="lesson:",Jc="#/lessons/",R0="/lessons/",Lde=e=>`${Jc}${e}`,kde=e=>e.startsWith(A0)||e.startsWith(Jc)||e.startsWith(R0),Nde=e=>e.startsWith(A0)?e.slice(A0.length):e.startsWith(Jc)?e.slice(Jc.length).split("/")[0]:e.startsWith(R0)?e.slice(R0.length).split("/")[0]:e,t7=e=>e.type===w0.SECTION,s7=e=>e.type===w0.QUIZ,n7=e=>e.settings?.passToContinue===!0,Qg=e=>e?.items?.find(t=>t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer),Yr=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),o7=e=>e!=null&&e.type==="blocks",r7=e=>{const t=j0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((s,o)=>(o!=null&&s.push(a7(o)),s),[])),t},a7=e=>{const t=j0()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var i7=p(69098),c7=p.n(i7);const Yg="^1.6.0";class P0 extends Error{}function l7(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new P0("Missing Runtime.version");if(!c7()(e.version,Yg))throw new P0(`Runtime.version ${e.version} does not satisfy ${Yg}`)}catch(t){console.warn(t)}}const Zr="rise/course/LOAD_COURSE",d7="rise/course/UPDATE_COMPLETED_AT",el="rise/course/UPDATE_COURSE_PREVIEW",Zg="rise/course/UPDATE_LESSON_PREVIEW",M0="rise/course/APPLY_CHANGESET";let O0;(async()=>{try{({applyReviewDataToManifest:O0}=await p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23)))}catch{}})();const pi=z4(),u7=e=>{if("settings"in e&&e.settings&&Xt(e.settings)&&"revealAnswers"in e.settings){const s=e.settings;return{...e,settings:{...e.settings,revealAnswers:Jk(s.revealAnswers)}}}return e},h7=e=>o7(e)?r7(e):e,Xg=e=>h7(u7(e)),m7=e=>({...e,lessons:e.lessons?.map(Xg)||[]}),f7=e=>{const t=e.lessons?.filter(s=>s.type!=="section")||[];return{...e,lessonsOnly:t}},p7=e=>e.theme==null,g7=e=>I0(Fg(e)),v7=e=>p7(e)?g7(e):I0(e),C7=e=>Xk(v7(e)),x7=(e,t)=>{let s=(0,Fr.TJ)(["course"],t,e).result;const o=(0,Fr.TJ)(["lessons"],t,s.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&s.mondrian&&O0&&(s={...s,mondrian:O0(s.mondrian,t)}),{...s,lessons:o}},b7=e=>({...e,lessons:e.lessons?.map(Ok)||[]}),y7=(e,{completedAt:t,course:s,favoritedAt:o,riseComCurrentUser:r,riseComCourseId:a,riseComEnrollmentType:i,riseComLearningPathId:c})=>{const l=m7(s),d=f7(l),h={...d,theme:d.theme??Fg(d).theme};return{...C7(h),completedAt:t,favoritedAt:o,riseComCourseId:a,riseComEnrollmentType:i,riseComCurrentUser:r,riseComLearningPathId:c}},S7=e=>({...e,favoritedAt:new Date}),T7=e=>({...e,favoritedAt:null}),L7=e=>({...e,completedAt:new Date().toISOString()}),k7={[Ug]:S7,[_g]:T7,[Zr]:y7,[d7]:L7,[el]:(e,{course:t})=>t,[Zg]:(e,{lessons:t})=>({...e,lessons:t.map(Xg)}),[M0]:x7},N7=(0,me.handle)({},k7),qg=e=>t=>{A7(t)?e(_k(!0)):t instanceof P0&&(e(Gk(!0)),console.error(t))},E7=e=>t=>t([{type:Gg,payload:e},Wg(!0)]),I7=Yo().fromPromise(async(...e)=>await g8(...e)),j7=e=>e.length===0?Wg(!0):I7(e).map(E7),w7=e=>tl(e)===401||B0(e)&&tl(e.response)===401,A7=e=>tl(e)===404||B0(e)&&tl(e.response)===404,tl=e=>B0(e)?e.status??e.statusCode:void 0,B0=e=>e!=null&&typeof e=="object",R7=e=>t=>{const{course:s}=t,o=b7(s),r=Yk({course:o,lessons:o.lessons});e([pi(Zr,{...t,course:o,_originalLessons:s.lessons}),zk(!0),j7(r)])},P7=e=>async t=>{let s;try{l7(window.Runtime),s=e?.password!=null?await gg(void 0,{password:e.password}):await gg()}catch(o){if(e?.onUnauthorized!=null&&w7(o)){e.onUnauthorized();return}e?.onError?.(),await qg(t)(o);return}e?.onAuthorized?.();try{R7(t)(s),I8(s)}catch(o){await qg(t)(o)}},M7=pi(Zr),O7=pi(el),B7=pi(Zg),D7=pi(M0),F7=(e,{labelSet:t})=>({...e,...t}),H7=(0,me.handle)({},{[Zr]:F7}),Un=e=>`rise/course/${e}`,Jg=Un("BLOCKS_LESSON_COMPLETE"),ev=Un("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),tv=Un("BLOCKS_LESSON_RESET"),sv=Un("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),nv=Un("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),ov=Un("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),rv=Un("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),av=Un("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),iv=Un("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),sl=(0,me.action)(Jg),$7=(0,me.action)(ev),V7=(0,me.action)(tv),z7=(0,me.action)(sv),cv=(0,me.action)(nv),U7=(0,me.action)(ov),_7=(0,me.action)(rv),G7=(0,me.action)(av),W7=(0,me.action)(iv),Ds=e=>`rise/course/${e}`,lv=Ds("QUIZ_LESSON_ADVANCE_STEP"),dv=Ds("QUIZ_LESSON_APPLY_SKIP"),uv=Ds("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),hv=Ds("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),mv=Ds("QUIZ_LESSON_RESTART"),fv=Ds("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),pv=Ds("QUIZ_LESSON_SET_ANSWER_MATCHES"),gv=Ds("QUIZ_LESSON_SET_ANSWER_TEXT"),vv=Ds("QUIZ_LESSON_ADVANCE_TO_END"),Cv=Ds("QUIZ_LESSON_SET_TIME_REMAINING"),xv=Ds("QUIZ_LESSON_SUBMIT_ANSWER"),bv=Ds("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),D0=(0,me.action)(lv),K7=(0,me.action)(vv),yv=(0,me.action)(mv),Q7=(0,me.action)(dv),Sv=(0,me.action)(fv),Tv=(0,me.action)(gv),Lv=(0,me.action)(bv),Y7=(0,me.action)(Cv),kv=(0,me.action)(pv),F0=(0,me.action)(xv),Z7=(0,me.action)(uv),X7=(0,me.action)(hv),H0=e=>e&&typeof e=="object"&&e.type&&z1.includes(e.type),q7=(e,t)=>{const s=new Map;return e.forEach(o=>{if(Mk(o)){const r=t.find(a=>String(a.id)===String(o.id));r&&r.type==="blocks"&&s.set(String(o.id),String(r.id))}}),s},J7=(e,t)=>{const s={id:String(e.id),index:e.index,type:"blocks",items:{}};return typeof e.isComplete=="boolean"&&(s.isComplete=e.isComplete),typeof e.percentComplete=="number"&&(s.percentComplete=e.percentComplete),t.type==="blocks"&&t.items&&t.items.forEach((o,r)=>{if(o?.id!=null&&(s.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&&(s.items[o.id].items=a)}}),s},eN=(e,t)=>{const s=new Set(t.map(r=>String(r.id))),o=[];return Object.values(e.lessons).forEach(r=>{H0(r)&&(s.has(String(r.id))||o.push(r))}),o},tN=(e,t,s)=>{const o={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},a=eN(e,s);o.totalLegacyLessons=a.length;const i=q7(t,s),c=[];return a.forEach(l=>{try{const d=i.get(String(l.id))||String(l.id),h=s.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=J7(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}},Nv=e=>Object.values(e.lessons).some(H0),Ede=e=>{let t=0,s=0;const o=[];return Object.values(e.lessons).forEach(r=>{s++,H0(r)&&(t++,o.includes(r.type)||o.push(r.type))}),{legacyCount:t,totalCount:s,legacyTypes:o,hasLegacyProgress:t>0}},sN=(e,t,s)=>{if(!Nv(e))return e;const o=tN(e,t,s);return o.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",o.orphanedLessonIds),o.migratedProgress},$0=e=>`rise/course/${e}`,Ev=$0("BOOKMARK_LESSON"),nN=$0("LOAD_COURSE"),Iv=$0("PREVIEW_COMPLETE_PRECEDING_LESSONS"),oN=(0,me.action)(Ev),rN=(0,me.action)(Iv),aN={lessons:{},percentComplete:0},iN=(0,me.handle)(aN,{[Jg]:T1,[ev]:aS,[tv]:iS,[sv]:cS,[nv]:lS,[ov]:dS,[rv]:uS,[av]:hS,[iv]:mS,[lv]:yS,[vv]:SS,[dv]:PS,[uv]:TS,[hv]:LS,[mv]:NS,[fv]:ES,[pv]:IS,[gv]:kS,[Cv]:jS,[xv]:wS,[bv]:AS,[Ev]:lN,[nN]:cN,[Iv]:dN});function cN(e,t){const s=t.course?.lessons??[],o=t._originalLessons??s,r=vg(pN(s));if(typeof r!="object"||r===null)return e;const a={...e,...r};return Nv(e)&&o!==s?sN(a,o,s):a}function lN(e,t){return v8(t),{...e,currentLesson:t}}function dN(e,{targetLessonId:t,lessons:s}){const o=e.lessons[t];if(!o)return e;let r=o.index;for(const i of s){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,uN(c)]));return{...e,lessons:a}}function uN(e){return Cn(e)?t0(e):hs(e)?hN(e):e}function hN(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([o,r])=>[o,{...r,isComplete:!0,isCorrect:!0}])),s=Object.keys(t).length;return{...e,items:t,activeIndex:s+1,isComplete:!0,passed:!0,passingScore:e.passingScore??80,percentComplete:100,reportResults:!0,score:100}}const mN=({index:e,lessonId:t,settings:s,type:o})=>o==="quiz"?{id:t,index:e,type:o,items:{},passingScore:Number(s?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function fN(e){return e.type==="quiz"&&"settings"in e}function pN(e){return{lessons:e.reduce((s,o,r)=>fN(o)?jv({index:r,items:o.items,lessonId:o.id,lessonProgress:s,settings:o.settings,type:o.type}):o.type==="blocks"||o.type==="slide"?jv({index:r,items:o.items,lessonId:o.id,lessonProgress:s,type:"blocks"}):s,{})}}function jv(e){const{lessonId:t,index:s,items:o,lessonProgress:r={},settings:a,type:i}=e,c=mN({lessonId:t,index:s,settings:a,type:i});if(o.length===0)return{...r,[t]:c};const l=i==="quiz"?vN(o):gN(o);return{...r,[t]:{...c,items:l}}}function gN(e){return e.reduce((t,s,o)=>{const r=s.id,a=s.items??[],i=q9(a);return t[r]={id:r,index:o,items:i},t},{})}function vN(e){return e.reduce((t,s,o)=>(t[s.id]={id:s.id,index:o},t),{})}var CN=p(65191),Xr=p.n(CN),xN=p(62981),bN=p.n(xN),Ide=p(55066),wv,Av;const V0=5e3,yN=ft()(zu()(qs())(":n3,n4,i4,n7,n9")),SN=Pe()(Xr()(","),Qc()),TN=(e,t)=>{const s=new FontFace(t.name,e,{family:t.name,style:t.style,weight:t.weight});return s.load().then(()=>document.fonts.add(s))},LN=(e,t)=>{const s=document.createElement("style");return s.innerText=`@font-face { font-family: '${t.name}'; src: ${e}; font-weight: ${t.weight}; font-style: ${t.style}; }`,document.head.appendChild(s),new(bN())(t.name,{style:t.style,weight:t.weight}).load()},kN=e=>{const t=`url(${q4(e)}) format('woff')`;return("fonts"in document?TN:LN)(t,e)},Rv=(e,t)=>{const s=Promise.all(e.map(kN));let o;const r=new Promise(a=>{o=setTimeout(a,V0)});return Promise.race([s,r]).catch(a=>{console.error("Failed to load learn course fonts:",{fonts:e,error:a.message||a})}).finally(()=>{clearTimeout(o),t()})},wde=({baseUri:e,typefaces:t,onLoad:s,onError:o})=>{const r=wv(t).join(", ");return Av.load({active:s,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?.(),s?.()},timeout:V0,custom:{families:yN(wv(t)),urls:[`${e}/course_fonts.css?typefaceIds=${SN(t)}`]}})},Ade=()=>Av.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:V0}),NN=(e,{fonts:t})=>[...e,...t],EN=(e,{fonts:t})=>t,IN=(0,me.handle)([],{[Zr]:NN,[el]:EN}),jN=e=>t=>{Rv(e,()=>{t(Vk(!0))})},wN={isPreview:window.viewType==="preview"},Pv=((e=wN)=>e);p.dn(Pv);const Mv="rise/l10n/TOGGLE_LOCALE_SELECTOR",Ov=(e,{l10n:t})=>t?{...e,...t}:e,AN=(e,t)=>(0,Fr.TJ)(["l10n"],t,e).result,z0=(0,me.action)(Mv),RN=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},PN=(0,me.handle)(null,{[Zr]:Ov,[el]:Ov,[M0]:AN,[Mv]:RN});var MN=p(4051),U0=p.n(MN);const ON=U0()(2,e=>n0()((0,me.error)(e),(0,me.action)(e))),{RiseDotCom:_n}=window,gi=e=>_n&&_n[e],Bv=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),BN=()=>{gi("exit")&&_n?.exit?.()},Dv=(...e)=>{gi("on")&&_n?.on?.(...e)},Fv=(...e)=>{gi("off")&&_n?.off?.(...e)},DN=(...e)=>{gi("goToLearn")&&_n?.goToLearn?.(...e)},FN=(...e)=>_n?.downloadCertificate?.(...e)??Bv("downloadCertificate"),HN=(...e)=>{if(gi("downloadCertificateCancel"))return _n?.downloadCertificateCancel?.(...e)},$N=(...e)=>_n?.fetchLpUpNext?.(...e)??Bv("fetchLpUpNext"),Hv="rise/learningPathUpNext/FETCH_LP_UP_NEXT",$v="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",VN={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},zN=e=>!("id"in e),UN=(e,t)=>{const s=zN(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:s,lpHasFailedQuiz:t.lpHasFailedQuiz,nextCourse:s?{}:t}},_N=e=>({...e,isPending:!0}),Pde=(0,me.handle)(VN,{[Hv]:(0,me.onSuccess)(UN),[$v]:_N}),GN=e=>[(0,me.action)($v),ON(Hv)(Yo().fromPromise($N)(e))],WN=(e,t)=>{const s=e.content.findIndex(r=>r.id===t.id),o=[...e.content];return s===-1?o.push(t):o[s]=t,{...e,content:o}},KN=(e,t)=>t.reduce(WN,e),QN={[Gg]:KN},YN=(0,me.handle)({content:[]},QN),Vv="rise/search/RESET_SEARCH",zv="rise/search/SET_SEARCH_ACTIVE",Uv="rise/search/SET_SEARCH_ACTIVE_LESSONS",_v="rise/search/SET_SEARCH_TRANSLATIONS",Gv="rise/search/SET_SEARCH_LESSONS",Wv="rise/search/SET_SEARCH_TERM",Kv={active:!1,activeLessons:[],translations:{},lessons:[],term:null},ZN=(e,t)=>t?{...Kv,active:e.active}:e,XN=(e,t)=>({...e,active:t}),qN=(e,t)=>({...e,activeLessons:t}),JN=(e,t)=>({...e,translations:t}),eE=(e,t)=>({...e,lessons:t}),tE=(e,t)=>({...e,term:t}),sE=(0,me.handle)(Kv,{[Vv]:ZN,[zv]:XN,[Uv]:qN,[_v]:JN,[Gv]:eE,[Wv]:tE}),qr=e=>(0,me.action)(e),Qv=qr(Vv),vi=qr(zv),Yv=qr(Uv),Zv=qr(_v),Xv=qr(Gv),ur=qr(Wv),_0=e=>`rise/sessionPreferences/${e}`,qv=_0("LOAD_SESSION_PREFERENCES"),Jv=_0("SET_PREFERS_KEYBOARD_NAVIGATION"),nE=_0("SET_STARTING_COURSE_LESSON_SELECTED"),oE={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},rE=(e,t)=>({...e,prefersKeyboardNavigation:t}),aE=(e,t)=>({...e,startedCourseWithLessonSelected:t}),iE=(0,me.handle)(oE,{[qv]:(e,t)=>({...e,...t}),[Jv]:rE,[nE]:aE}),cE=()=>(0,me.action)(qv,null),lE=(0,me.action)(Jv),eC="rise/slidesUI/SET_SLIDE_DIRECTION",tC="rise/slidesUI/SET_EXITING_SLIDE_OFFSET",dE={slideDirection:Js.UP,exitingSlideOffset:0},uE=(0,me.handle)(dE,{[eC]:(e,t)=>({...e,slideDirection:t}),[tC]:(e,t)=>({...e,exitingSlideOffset:t})}),hr=(0,me.action)(eC),hE=(0,me.action)(tC),G0=qs()("rise/transcriptPanel/"),sC=G0("OPEN_TRANSCRIPT_PANEL"),nC=G0("CLOSE_TRANSCRIPT_PANEL"),oC=G0("UPDATE_TRANSCRIPT_PANEL"),mE={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},fE=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,rC=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),pE=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:rC():e,gE={[sC]:fE,[nC]:rC,[oC]:pE},vE=(0,me.handle)(mE,gE),aC=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),CE={skipToNavButton:null},xE=(0,me.handle)(CE,{[aC]:(e,t)=>({...e,skipToNavButton:t})}),W0=(0,me.action)(aC);var Ode;const bE={},yE=(0,Rc.HY)({course:N7,courseLabels:H7,courseProgress:iN,fonts:IN,global:Pv,l10n:PN,partnerContent:YN,search:sE,sessionPreferences:iE,slidesUI:uE,status:$k,transcriptPanel:vE,ui:xE,...bE}),{Provider:SE,dispatch:fs,store:iC,useDispatch:rt,useSelector:le}=P4(yE),cC="_course_token",K0=new URLSearchParams(window.location.hash.substr(1)),lC=K0.get(cC);lC&&(K0.delete(cC),window.history.replaceState(null,null,`#${K0.toString()}`));const TE=e=>{const{data:{method:t,id:s,jsonrpc:o}}=e;if(o==="2.0"&&t==="getBearerToken"){const r=lC||pt();navigator.serviceWorker.ready.then(a=>{a.active.postMessage({id:s,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",TE);const dC=(0,u.createContext)({});function LE(e,{type:t,message:s}){switch(t){case"polite":return{...e,politeMessage1:e.alternatePolite?s:"",politeMessage2:e.alternatePolite?"":s,alternatePolite:!e.alternatePolite};case"assertive":return{...e,assertiveMessage1:e.alternateAssertive?s:"",assertiveMessage2:e.alternateAssertive?"":s,alternateAssertive:!e.alternateAssertive};default:return{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}}}function nl({ariaLive:e,message:t}){return(0,n.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-always",role:"log",children:t})}function kE({children:e}){const[{politeMessage1:t,politeMessage2:s,assertiveMessage1:o,assertiveMessage2:r},a]=(0,u.useReducer)(LE,{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,n.jsxs)(dC.Provider,{value:i,children:[(0,n.jsx)(nl,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,n.jsx)(nl,{ariaLive:"polite",id:"polite-announcer2",message:s}),(0,n.jsx)(nl,{ariaLive:"assertive",id:"assertive-announcer1",message:o}),(0,n.jsx)(nl,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function xn(){return(0,u.useContext)(dC)}var Ve=p(12140);const uC={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},hC=e=>e?.type===uC.QUIZ,Q0=e=>e?.type===uC.QUIZ,Y0=({locales:e,course:t,locale:s})=>!!(e?.find(a=>a.locale===s)?.rightToLeft||t?.experiments?.rtl),mC=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function NE({children:e,currentLocale:t,setCurrentLocale:s}){const o=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:s}),[t,s]);return(0,n.jsx)(mC.Provider,{value:o,children:e})}function ot(){return(0,u.useContext)(mC)}function EE(e){const t=s=>{const o=ot();return(0,n.jsx)(e,{...s,...o})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const Ci=(e,t,s)=>(0,_t.uW)(e)&&t?s?.[t]?.[e.l10nId]:void 0,ol=(e,t,s,o)=>{if(!(0,_t.uW)(e))return e;if(!t||!s||!o)return;const r=Ci(e,t,o);if(r!==void 0)return r;const a=Ci(e,s,o);if(a!==void 0)return a;const i=fC(e,o);return i.length>0?i[0].value:void 0},Z0=new WeakMap,X0=(e,t)=>{if(e&&t in e)return e[t]},q0=(e,t,s,o)=>{if(!t||!s||!o||!e)return e;if(typeof e=="object"){const d=Z0.get(e)?.get(o);if(d&&d.locale===t&&d.defaultLocale===s)return d.result}const r=o[t],a=o[s],i=Object.values(o).filter(d=>d!==r&&d!==a);function c(d){let h;if(h=X0(r,d),h!==void 0||(h=X0(a,d),h!==void 0))return h;for(const m of i)if(h=X0(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,Fr.pr)(l))d(c(h))}if(typeof e=="object"){let d=Z0.get(e);d||(d=new WeakMap,Z0.set(e,d)),d.set(o,{locale:t,defaultLocale:s,result:l})}return l},Bde=(e,t,s)=>q0(e,t,Jr(s),To(s)),Dde=(e,t,s)=>ol(e,t,Jr(s),To(s)),Fde=(e,t,s)=>Ci(e,t,To(s));function Hde(e,t){return t?.find(s=>s.locale===e)}function IE(e){return e?.l10n?.locales??[]}function Jr(e){return e?.l10n?.defaultLocale}function jE(e,t){const s=Jr(t);return!!(e&&s&&e!==s)}function To(e){return e?.l10n?.translations??{}}function fC(e,t){return(0,_t.uW)(e)?Object.keys(t).flatMap(s=>{const o=Ci(e,s,t);return o?{locale:s,value:o}:[]}):[]}const $de=(e,t)=>fC(e,To(t)),Et=e=>(0,_t.uW)(e)?e.l10nId:void 0;function wE(e){return e?.l10n?.localeSelectorOptions}function J0(e){return e?.l10n?.languageCodeMetadata}function AE(e){return e?.l10n?.showLocaleSelector}function eh(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const s=Wr(e);if(s==null)return null;const o=s.alpha??1,r=Wr(t),a=o<1&&r!=null?(0,T0.jh)(r,{...s,alpha:1},o,{space:"srgb"}):s;return(0,M8.A)(a,"srgb")}function RE(e,t){const s=eh(t);if(s==null)return 1;const o=eh(e,(0,L0.A)(s));return o==null?1:(0,R8.A)(o,s,"WCAG21")}const Ns=e=>e==null?be.DARK:RE("#fff",e)>=4.5?be.LIGHT:be.DARK,th=(0,u.createContext)(null);th.displayName="CourseContext";const sh=(0,u.createContext)(!1);sh.displayName="PresentationContext";function PE({children:e,course:t,courseProgress:s,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:s,labels:o,labelsLocale:r,lessons:a,partnerContent:i,search:c}),[t,s,o,r,a,i,c]);return(0,n.jsx)(th.Provider,{value:l,children:(0,n.jsx)(sh.Provider,{value:_r(t),children:e})})}function ea(){return(0,u.useContext)(th)}function nh(){return(0,u.useContext)(sh)}function Fe(){return ea()?.course}function pC(){return Ae(Fe()?.title)}function It(){const{labels:e}=ea()??{};return e}function oh(){return ea().search}function gC(e){const o=Fe()?.theme?.accentContrast;return typeof o!="string"?be.LIGHT:o===be.AUTO?Ns(e):o}function xi(){const e=Fe();return e?.theme?.colorAccent??e?.color}function rh(){const{currentLocale:e}=ot(),t=rl(),s=Fe();return s?Y0({course:s,locales:t,locale:e}):!1}function Vde(){const{lessons:e}=ea();return e}const bi=(0,u.createContext)({l10n:null});bi.displayName="TranslationContext";const ah=(0,u.createContext)({l10n:null});ah.displayName="LocalesContext";function jt(){const{currentLocale:e}=ot(),t=nn(),s=al();return(0,u.useCallback)(o=>ol(o,e,t,s),[e,t,s])}function vC(){const{currentLocale:e}=ot(),t=nn(),s=al();return(0,u.useCallback)(o=>q0(o,e,t,s),[e,t,s])}function Ae(e,t){const{currentLocale:s}=ot(),o=nn();let r=al();const a=OE();return a&&Object.keys(a).length&&s&&r&&(r={...r,[s]:a}),ol(e,t??s,o,r)}function ME(e){const{currentLocale:t}=ot(),s=nn(),o=al();return(0,u.useMemo)(()=>q0(e,t,s,o),[t,s,e,o])}function ta(){return(0,u.use)(ah)}function rl(){const e=ta();return IE(e)}function nn(){const e=ta();return Jr(e)}function al(){const e=(0,u.use)(bi);return To(e)}function OE(){return ea()?.search?.translations}function BE(){const e=(0,u.use)(bi);return AE(e)}function DE(){const e=(0,u.use)(bi);return wE(e)}const FE=()=>(0,Ve.Mz)(t=>t,(t,s)=>s,(t,s,o)=>Jr(o),(t,s,o)=>To(o),ol);function at(e){const{currentLocale:t}=ot(),s=(0,u.useMemo)(()=>FE(),[]);return le(o=>s(e,t,o))}const HE=(0,Ve.Mz)(e=>e,(e,t)=>To(t),(e,t)=>t?.[e]);function CC(){const{currentLocale:e}=ot();return le(t=>HE(e,t))}const $E=(0,Ve.Mz)(e=>e.course?.title,Jr,To,(e,t,s)=>{if(e)return Ci(e,t,s)});function VE(){return le($E)}function il(){return le(e=>e.l10n)}var zE=p(82920);function xC(e){return e?.search}function Lo(){return le(xC)}function UE(e){return xC(e)?.activeLessons}const _E=(0,Ve.Mz)(UE,e=>e?e.reduce((t,s)=>(s?.id&&(t[s.id]=s),t),{}):{});function GE(){return(0,Ve.Mz)(e=>e,(e,t)=>_E(t),(e,t)=>t?.[e])}function WE(e){const t=zE.useMemo(()=>GE(),[]);return le(s=>t(e,s))}function ns(e){return e.course}function re(){return le(ns)}function KE(e){return ns(e)?.navigationMode}function ih(e){return ns(e)?.trackingQuizId}function sa(){const e=re();return at(e?.title)}function QE(e){return ns(e)?.type}function YE(){return le(e=>QE(e))}function ch(e){const t=ns(e);return vo(t)}function ZE(){return le(ch)}function XE(e){const t=ns(e);return i0(t)}function qE(){return le(XE)}const JE=e=>e.filter(t=>t.type!=="section");function mr(){const e=re(),t=Lo();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:JE(t.lessons)}:e,[e,t?.active,t?.lessons])}const eI=(0,Ve.Mz)(ns,e=>(e?.lessons??[]).filter(hC).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function lh(e){const t=KE(e);return eI(e)?So.RESTRICTED:t??So.FREE}function cl(){return le(lh)}function tI(e){return ns(e)?.theme?.buttonNavigationStyle??Qe.buttonNavigationStyle}function sI(){return le(tI)}function dh(){const e=re();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 bC(){return re()?.theme?.coverImageColor??nt.DARK}function yC(){return re()?.lessonsOnly?.[0]}function nI(){const e=re(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(s=>s.id===t)??null}function on(){const{currentLocale:e}=ot(),t=rl(),s=re();return s?Y0({course:s,locales:t,locale:e}):!1}function SC(){const t=re()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:s})=>s!=="section").length:0,[t])}class oI 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:s}=this.state,{FallbackComponent:o}=this.props;return t||s?(0,n.jsx)(o,{}):this.props.children}}const rI=oI;var aI=p(3199),iI=p.n(aI),cI=p(13840),fr=p.n(cI),lI=p(37754),dI=p.n(lI),uI=p(27315),ll=p.n(uI),hI=p(97491),Fs=p.n(hI),mI=p(80690),dl=p.n(mI),fI=p(85434),pI=p.n(fI),gI=p(40889),vI=p.n(gI);const TC=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},CI=({courseProgress:e,lesson:t,restrictingQuiz:s})=>{if(!e)return{};const o=c=>e.lessons[String(c)]?.index,r=o(t.id),a="id"in s?s.id:void 0,i=a!=null?o(a):void 0;return r!==void 0&&i!==void 0&&r>i?s:{}};var xI=p(37373),ko=p.n(xI),bI=p(94209),yI=p.n(bI),SI=p(26507),uh=p.n(SI);const No=Ee("CDN_USER_CONTENT_URI"),LC=Ee("CDN_URI"),yi=Ur()("useCrushedKey"),rn=Ee("IMAGES_URI"),TI=uh()(/-stock[-_]image.jpg/),hh=Ee("RBC_IMAGES_URI"),LI=Ee("ASSETS_URI"),kI=uh()(new RegExp(`^${No}/review`)),kC=Ee("CDN_US_URI"),Si=e=>{const{crushedKey:t,key:s,useCrushedKey:o,src:r}=e;return yi(e)?mt(o&&t?t:s):mt(r)},NC=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:s,key:o,useCrushedKey:r}=e;return rn?yi(e)&&r&&s?`${rn}/${t}/${s}`:`${rn}/${t}/${o}`:Si(e)},zde=e=>`${No}/${e}`,Ude=e=>!e||!e.key?"":`${hh}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,_de=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:s,useCrushedKey:o}=e;return yi(e)&&o?t?`${rn}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${rn}/f:jpg,b:fff,s:cover,w:340/${s}`},mh=e=>NC(e,"f:png,a:retain,s:cover,t:true,w:340"),Gde=e=>NC(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),it=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:s,useCrushedKey:o,sourcedFrom:r}=e;if(!rn)return Si(e);const a=r==="AI",i=r==="LIBRARY",c=r==="EXTRACTED";return TI(s)||a||i?`${rn}/f:jpg,a:retain,b:fff,w:1680,q:90/${s}`:yi(e)?o&&t?`${No}/${t}`:`${No}/${s}`:c&&e.src||kI(e.src)?e.src:`${rn}/f:jpg|png,a:retain,b:fff/${s}`},Wde=(e,t="src")=>{const{key:s,src:o,thumbnail:r,thumbnailKey:a}=e,i=No?`${No}/${s}`:Si({key:s,src:o}),c=No?`${No}/${a}`:Si({key:a,src:r});return t==="src"?i:c},Kde=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:s,useCrushedKey:o}=e;return yi(e)&&o&&t?`${rn}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${rn}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${s}`},Ti=({height:e,imageKey:t,width:s})=>{if(hh){const o=encodeURIComponent(t);return`${hh}/b:fff,f:jpg,s:cover,w:${s},h:${e}/${o}`}return mt(`partnerContent/${t}`)},NI=()=>{const e=LI||rn,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}`:mt(`partnerContent/${t}`)},EI=()=>{const e="NBIC_logo_blue.svg";return LC?`${LC}/assets/rise/assets/partner-content/${e}`:mt(`partnerContent/${e}`)},II=e=>{const{key:t,src:s}=e;return kC?`${kC}/${t}`:Si({key:t,src:s})};var jI=p(17945);const ul=({alpha:e,color:t,url:s})=>{const o=(0,jI.A)(t,e);return{backgroundImage:`linear-gradient(0deg,${o},${o}), url("${s}")`}};var fh,ph;const Yde=oi()(qe()("sidebarMode","hidden")),na=({alpha:e,color:t=void 0,hasOverlay:s=!0,media:o={}})=>{const{image:r={}}=o,{key:a,src:i}=r,c=a?it(r):i,l=t===nt.LIGHT?"#fff":"#000";return c?s?ul({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},Eo=e=>[ar.DARK,ar.DARK_ACCENT,ar.DARK_IMAGE,ir.DARK,$n.DARK,$n.DARK_IMAGE].includes(e),wI=St()(Ze()("lessons"),ko()),AI=qe()("navigationMode",So.RESTRICTED),RI=oi()(qe()("sidebarMode",Kr.HIDDEN)),PI=qe()("navigationType",rr.SIDEBAR),EC=qe()("navigationType",rr.COMPACT),gh=Zs()(yI()(Ct(),"navigation"),RI,qe()("navigation",!0)),MI=({course:e,search:t,isMobile:s})=>vo(e)?!1:(PI(e)||EC(e)&&!!s)&&gh(e)||t.active,OI=({course:e,isMobile:t})=>EC(e)&&gh(e)&&!t,Li=e=>[ar.DARK_IMAGE,ar.LIGHT_IMAGE,ir.DARK_IMAGE,ir.IMAGE,$n.DARK_IMAGE,$n.LIGHT_IMAGE].includes(e),BI=e=>[$n.DARK,$n.LIGHT].includes(e),DI=(e,t)=>{if(e===Zc.RISE_CLASSIC||e===Zc.HORIZON)switch(t){case ce.SPLIT_LEFT_IMAGE:case ce.SPLIT_RIGHT_IMAGE:case ce.TWO_THIRDS_LEFT_IMAGE:case ce.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===Zc.APEX)switch(t){case ce.SPLIT_LEFT_IMAGE:case ce.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},Zde=(e,t)=>{switch(e){case fh.RISE_CLASSIC:case fh.APEX:case fh.HORIZON:return t===ph.CENTERED_OVERLAY||t===ph.LEFT_OVERLAY||t===ph.IMAGE;default:return!1}},IC=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,an=e=>!IC(e),hl=Ze(),ml=Hn(),vh=bt(),jC=e=>Dn()(t=>Yr({settings:{asLesson:hl("asLesson",t.settings)??void 0},type:t.type??null}),hl("lessonsOnly",e)??[]),FI=({course:e,courseProgress:t})=>fr()(HI(t),e?.lessonsOnly??[]),HI=e=>t=>dl()(t.id==null?void 0:ml(["lessons",t.id,"isComplete"],e)),$I=({lesson:e,currentLesson:t})=>e&&qe()("id",e.id,t),VI=({course:e,lesson:t})=>qe()("id",t.id,Vc()(hl("lessonsOnly",e)??[])),wC=e=>e!=null&&e.type!=="section",zI=({lesson:e,courseProgress:t})=>e?.id==null?!1:vh(!1,["lessons",e.id,"isComplete"],t),AC=({course:e,courseProgress:t,lesson:s,restrictingQuiz:o={}})=>{const r=s?.id==null?{}:CI({courseProgress:t,lesson:{id:s.id},restrictingQuiz:o}),a=AI(e),i=a||an(r),c=FI({course:e,courseProgress:t}),l=wC(s)&&dl()(zI({lesson:s,courseProgress:t}));return{isRestricted:i&&l&&dl()($I({lesson:s,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:a,currentLesson:c}},UI=({labels:e,restrictions:t})=>{const{lessonRestricted:s,quizRequirePassingScore:o}=e,{isRestrictedCourse:r,restrictingQuiz:a,currentLesson:i}=t,c=i&&iI()("id",a,i),l=a!=null&&typeof a=="object"?hl("title",a):void 0;return!r||r&&c?typeof l=="string"&&l?o.replace("quiz",`"${l}"`):o:s},RC=vI()((e,t)=>dI()(pI()(go()(["id"],e||{})),t)),_I=({course:e,lesson:t})=>Pe()(ll(),RC(t),jC)(e),PC=({course:e,lesson:t})=>{if(VI({course:e,lesson:t}))return;const s=e?.lessonsOnly??[];return s[ll()(RC(t,s))]},GI=Pe()(Fs(),jC),WI=e=>typeof e=="object"&&Object.keys(e).length>0,KI=e=>e==null||e===!1,QI=e=>KI(e?.isComplete),YI=e=>e.find(([,t])=>QI(t)),ZI=e=>{const t=Object.entries(e),[s]=YI(t)||[];return s},XI=(e={},t)=>WI(e)?ZI(e):t==null?void 0:String(t),MC=(e,t,s)=>{if(!s)return{outOfAttempts:!1,quizPassed:!0};const o=ml(["lessons",s],e),r=vh(-1,["settings","retryCount"],t),a=vh(0,["retryAttempts"],o),i=ml(["passed"],o);return{outOfAttempts:ml(["isComplete"],o)&&Number(r)>-1&&Number(a)===Number(r),quizPassed:i}};function Ch(e){return e.courseProgress}function qI(e){return e.courseProgress?.currentLesson??""}function JI(e){return e.courseProgress?.percentComplete??0}const OC=(0,Ve.Mz)(ih,ns,(e,t)=>{const{lessons:s}=t;return Array.isArray(s)?s.find(({id:o,type:r})=>r==="quiz"&&o===e)??null:null}),ej=(0,Ve.Mz)(Ch,OC,(e,t)=>t?MC(e,t,t.id):null);function BC(e){const t=Ch(e);return bg()?t?.percentComplete===100:!!xg()}function oa(e){return e.courseProgress?.lessons}function ki(e,t){if(e!=null)return oa(t)?.[e]}function pr(){return le(Ch)}function fl(){return le(qI)}function ra(){return le(JI)}function tj(){return le(OC)}function xh(){const e=le(ej);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function sj(){return le(BC)}function Io(e){return le(t=>ki(e,t))}function pl(e){const t=Io(e);if(t?.type==="quiz")return t}const nj=(0,Ve.Mz)(oa,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function oj(){return le(nj)}const DC=e=>e>9999?1:e,rj=({current:e,restart:t,restartValue:s})=>{const o=Number(s),r=DC(Number.isInteger(o)&&o>0?o:1),a=t?r:e+1;return DC(a)},aj=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const s=t.settings??{},o=rj({current:e.currentNumber,restart:s.restartNumbering,restartValue:s.restartNumberingValue});return{map:{...e.map,[t.id]:o},currentNumber:o}}return e},FC=e=>t7(e),gl=e=>s7(e),ij=e=>n7(e),cj=e=>!!Qg(e);function aa(){return(0,Ve.Mz)(e=>e,(e,t)=>zC(t),(e,t)=>t[String(e)])}function Ot(e){const t=(0,u.useMemo)(()=>aa(),[]);return le(s=>t(e,s))}function ia(e){const t=Ot(e);return at(t?.title)}function lj(){const e=aa();return(0,Ve.Mz)(e,t=>FC(t))}function HC(){const e=vl();return(0,Ve.Mz)(t=>t,(t,s)=>e(s),(t,s)=>lh(s),(t,s)=>gj(s),(t,s)=>vj(s),(t,s)=>oa(s),(t,s,o,r,a,i)=>{const c=i?.[t],l=i?.[s];if(t!==s&&!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:Qr.ORDER}:{type:Qr.KNOWLEDGE_CHECK}:{type:Qr.QUIZ,data:r.title}}return null})}function Ni(e){const t=(0,u.useMemo)(()=>HC(),[]);return le(s=>t(e,s))}function vl(){return(0,Ve.Mz)(oa,ih,(e,t)=>XI(e,t))}function dj(){const e=(0,u.useMemo)(()=>vl(),[]);return le(t=>e(t))}function uj(){const e=vl();return(0,Ve.Mz)(e,zC,(t,s)=>{if(!(!t||!s[t]))return s[String(t)]})}function hj(){const e=aa();return(0,Ve.Mz)(e,ki,(t,s)=>{const o=s?.percentComplete??0,r=s?.isComplete??!1,a=s?.passed??!1;return o===100&&(!r||gl(t)&&!a)})}function $C(e){const t=(0,u.useMemo)(()=>hj(),[]);return le(s=>t(e,s))}function mj(){const e=aa();return(0,Ve.Mz)(e,ki,(t,s)=>{const o=s?.percentComplete??0,r=s?.isComplete??!1,a=s?.passed??!1;return o===100&&r&&(!gl(t)||a)})}function VC(e){const t=(0,u.useMemo)(()=>mj(),[]);return le(s=>t(e,s))}const bh=(0,Ve.Mz)(ns,e=>e?.lessons??[]),zC=(0,Ve.Mz)(bh,e=>e.reduce((t,s)=>(s?.id&&(t[s.id]=s),t),{})),ca=(0,Ve.Mz)(ns,e=>e?.lessonsOnly??[]),fj=(0,Ve.Mz)(ca,e=>e.reduce((t,s,o)=>(t[s.id]=o+1,t),{}));function UC(){return le(e=>fj(e))}const yh=(0,Ve.Mz)(ca,e=>e.filter(t=>Yr(t))),_C=(0,Ve.Mz)(yh,e=>e.length),pj=(0,Ve.Mz)(bh,e=>e.reduce((t,s)=>{const o=t[t.length-1];return FC(s)||o==null?t.push([s.id]):o.push(s.id),t},[])),gj=(0,Ve.Mz)(ca,oa,(e,t)=>e.find(s=>gl(s)&&ij(s)&&!t?.[s.id]?.isComplete)),vj=(0,Ve.Mz)(ca,oa,(e,t)=>e.find(s=>!gl(s)&&cj(s)&&!t?.[s.id]?.isComplete));function Cl(e){const t=(0,u.useMemo)(lj,[]);return le(s=>t(e[0],s))}function Sh(e){const t=(0,u.useMemo)(()=>aa(),[]),s=(0,u.useMemo)(()=>HC(),[]),o=cl();return le(r=>{const a=ns(r),i=t(e,r),c=ki(e,r),d=s(e,r)?.type!=null;return o!==So.RESTRICTED&&a?.markComplete&&!d&&i?.type!==w0.QUIZ&&!0})}const xl=(e,t)=>t.findIndex(s=>s.id===e);function GC(){return(0,Ve.Mz)(e=>e,(e,t)=>ca(t),(e,t)=>{if(e==="progress-summary")return t[t.length-1];const o=xl(e,t)-1;return t[o]})}function WC(){return(0,Ve.Mz)(e=>e,(e,t)=>ca(t),(e,t)=>{const o=xl(e,t)+1;return t[o]})}function KC(e){return(0,Ve.Mz)((s,o)=>e(s,o),(s,o)=>yh(o),(s,o)=>xl(s?.id||"",o)+1)}function Cj(){return KC(WC())}function xj(){return KC(GC())}function bj(e){const t=(0,u.useMemo)(()=>WC(),[]);return le(s=>t(String(e),s))}function yj(e){const t=(0,u.useMemo)(()=>Cj(),[]);return le(s=>t(String(e),s))}function Sj(e){return le(t=>{if(!e)return 0;const s=yh(t);return xl(String(e),s)+1})}function Th(){return le(_C)}function bl(){return le(e=>pj(e))}function Tj(){const e=vl();return(0,Ve.Mz)(BC,e,ih,(t,s,o)=>{const r=!!s,a=o!=null;return t||!r&&!a})}function Lj(){const e=(0,u.useMemo)(()=>Tj(),[]);return le(t=>e(t))}function kj(){const e=re(),t=pr();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const s=TC({course:e,courseProgress:t});return e.lessonsOnly.filter(o=>{const{isRestricted:r}=AC({course:e,courseProgress:t,lesson:o,restrictingQuiz:s});return r}).map(o=>o.id)},[e,t])}const Nj=e=>e?.items?.reduce?.(aj,{map:{},currentNumber:0})?.map||{},Ej=e=>{const t=(0,u.useMemo)(()=>aa(),[]),s=le(o=>t(e,o));return(0,u.useMemo)(()=>Nj(s),[s])},Ij=({blockId:e,lessonId:t})=>Ej(t)?.[e];function jj(e){const s=re()?.lessonsOnly??[],o=s.findIndex(a=>a.id===e);return(o>=0?s[o+1]:void 0)?.id??null}function Lh(e){const t=Ot(e),s=re(),o=t?.settings,r=s?.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 wj(){return le(bh)}function Aj(e){const t=(0,u.useMemo)(()=>GC(),[]);return le(s=>t(e,s))}function Rj(e){const t=(0,u.useMemo)(()=>xj(),[]);return le(s=>t(e,s))}function Pj(){const e=(0,u.useMemo)(()=>uj(),[]);return le(e)}function QC(){const e=Pj();return at(e?.title)}const Xde="/:mode",kh="/lessons/:lessonId",Nh="/lessons/:lessonId/:mode",Mj=e=>e==="iframe"||e==="preview";function Es(){const e=(0,we.RQ)(kh),t=(0,we.RQ)(Nh);return(e??t)?.params.lessonId}function Oj(e){return e.courseLabels}function Bj(){return le(Oj)}function Dj(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function Ce(){const{currentLocale:e}=ot();return le(t=>Dj(e,t))}function Fj({isCourseComplete:e,percentCourseComplete:t}){const s=Ce()??{},{courseResume:o,courseStart:r,processStartAgain:a}=s;return{courseCTALabel:e?a:t>0?o:r}}function Eh(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function YC(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return Eh()&&!!t.get("locale")}const Hj=(0,u.lazy)(()=>p.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(p.t.bind(p,68789,23))),$j=()=>{const{currentLocale:e}=ot(),t=ME(re()),s=on(),o=oj(),r=fl(),a=Ot(Es()),i=Ce(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.tenantId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=kj(),m=async()=>{try{await si()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,v=it(f)||null,C=at(t?.aiTutorConfig?.name)??null,[g,x]=(0,u.useState)(!1),y=`rise_ai_tutor_nudge_${d}`,T=(0,u.useCallback)(()=>{localStorage.setItem(y,"1")},[y]);(0,u.useEffect)(()=>{if(localStorage.getItem(y))return;let L=null;const N=setTimeout(()=>{const k=document.getElementById("page-wrap");if(!k)return;const E=()=>{if(localStorage.getItem(y)){k.removeEventListener("scroll",E);return}const{scrollTop:j,scrollHeight:A,clientHeight:I}=k,w=A-I,O=w>0?j/w:0;w<=0||O>=.75&&(localStorage.setItem(y,"1"),x(!0),k.removeEventListener("scroll",E))};k.addEventListener("scroll",E,{passive:!0}),L=()=>k.removeEventListener("scroll",E),E()},0);return()=>{clearTimeout(N),L?.()}},[d,y,r]);const S=o||a?.type==="quiz",b=S?i?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled while a quiz is in progress.":void 0;return(0,n.jsx)(Hj,{aiTutorImageUrl:v,aiTutorName:C,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:S,disabledReason:b,labels:i,onOpen:T,resetSession:m,resolveAssetUrl:Tg,restrictedLessonIds:h,rtl:s,scrollTriggered:g,subscriptionId:l,userId:d})},Vj=()=>{const e=re();return!Eh()&&!!e?.settings?.aiTutorEnabled?(0,n.jsx)(rI,{FallbackComponent:()=>null,children:(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)($j,{})})}):null},ZC=(0,u.createContext)(null);function zj({appType:e,children:t}){return(0,n.jsx)(ZC.Provider,{value:e,children:t})}function Uj(){const e=(0,u.useContext)(ZC);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function Ih(){return Uj()==="author"}const jh=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function wh({block:e,children:t}){const[s,o]=(0,u.useState)(e);return e!=null&&e!==s&&o(e),(0,n.jsx)(jh.Provider,{value:s,children:(0,n.jsx)(Oh,{...s?.settings,children:t})})}const qde=jh.Consumer;function wt(){return(0,u.useContext)(jh)}function yl(e){return function(s){const o=wt();return(0,n.jsx)(e,{...s,block:o})}}const _j={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},Jde=null;function Gj(e,t){if(!e||!t)return null;const s=_j[e];if(!s)return null;const o=r=>r?t[r]:void 0;return{backgroundType:o(s.backgroundType),backgroundColor:o(s.backgroundColor),backgroundColorContrast:o(s.backgroundColorContrast),paddingStart:o(s.paddingStart),paddingEnd:o(s.paddingEnd),bodyFontSize:o(s.bodyFontSize),headingFontSize:o(s.headingFontSize),subheadingFontSize:o(s.subheadingFontSize),completionType:o(s.completionType),label:o(s.label),completeHint:o(s.completeHint)}}function jo(){const e=wt(),t=Fe(),s=e?.family,o=t?.theme;return(0,u.useMemo)(()=>Gj(s,o),[s,o])}var Wj=p(20348),Kj=p.n(Wj);const bn=(e,t)=>{const s=Wr(t);return s==null?null:(0,L0.A)((0,T0.jh)(s,Wr("#000000"),e),{format:"hex",collapse:!1})};function Qj(e){if(e==null)return 0;const t=eh(e);return t==null?0:(0,P8.J1)(t)}const ct=tn({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),la=e=>{const t=Qj(e);return t<=.01?ct.NEAR_BLACK:t<=.05?ct.DARK:t<=.35?ct.MED:ct.LIGHT},Yj=e=>{switch(la(e)){case ct.NEAR_BLACK:return en(.1,e);case ct.DARK:return bn(.4,e);case ct.MED:return bn(.2,e);case ct.LIGHT:return en(.3,e)}};var Zj,Xj,qj,Ah,XC,wo;const qC=2,eue=(e,t,s)=>e??t??s,JC=(e,t,s,o)=>e??t??s??o,Hs=Os()({WHITE:null,TRANSPARENT:null}),Jj={markerColorContrast:be.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:be.AUTO},ew={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 tw(e,t){return ew[e]?.includes(t)??!1}const sw={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function Rh(e,t){const s=sw[e]?.[t];return s==null?{}:{backgroundColor:s,backgroundType:se.COLOR}}const nw=null;function tue(e,t){return nw[e]?.includes(t)??!1?.1:.5}function ow(e){switch(e.backgroundType){case se.COLOR:return e.backgroundColor;case se.ACCENT:return e.courseColor;case se.TINT:return k0(e.courseColor);case se.LIGHT:return"#ffffff";case se.GRAY:return"#fafafa";case se.DARK:return"#303030";case se.BLACK:return"#000000"}}const rw={multimedia:{embed(e){return{cardMode:e.showBorder===!1?Hs.TRANSPARENT:Hs.WHITE}}}};function aw(e,t,s){return iw(e,t,s)}function iw(e,t,s){const o=Rh(e,t);if(s.v==null||s.v<qC){s=cw(s);const l=o.backgroundColor,d=s.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(s=Kj()("backgroundColor",s))}const r=rw[e]?.[t]?.(s),a=s.backgroundColor&&s.backgroundType==null?{backgroundType:se.COLOR}:{};return[{accentColor:null},Jj,r,s,a,{v:qC}].reduce((l,d)=>d==null?l:{...l,...ig()(IC,d)},{})}function cw(e){return{...e,backgroundType:null,cardMode:null,v:1}}const lw=null;function sue(e,t){return!lw[e]?.includes(t)}const dw=null;function nue(e,t){return!dw[e]?.includes(t)}function uw(e){return e===qj.LIGHT?wo.LIGHT:wo.DARK}function hw(e,t){if(t===Ah.AUTO){if(!e)return wo.DARK;const s=Zj(e);return Xj(s)===Ah.DARK?wo.DARK:wo.LIGHT}else return t===Ah.LIGHT?wo.LIGHT:wo.DARK}function oue(e,t,s,o,r){const a=e?.backgroundType;return e?.cardMode===Hs.TRANSPARENT?a===XC.IMAGE?uw(t?.overlayColor):o&&a!==XC.ACCENT?r:hw(s,e?.customBackgroundColorContrast):o?r:wo.DARK}const mw=null;function rue(e,t){return mw[e]?.includes(t)??!1}const fw=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),Ph=(e,t)=>t!=null&&fw.test(t)?t:e;function Bt(e){const{contrast:t=be.AUTO,backgroundColor:s="#fff"}=e,o=Ph("#fff",s),r=Ns(o);return t===be.DARK||t===be.AUTO&&r===be.DARK?xt.DARK:xt.LIGHT}const pw=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??se.LIGHT,gw=e=>e.effectiveBackgroundType===se.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,vw=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??be.AUTO,e2=e=>{const{family:t,variant:s,customBackgroundColorContrast:o}=e;return!o&&(t==="image"&&s!=="text aside"||t==="chart"||s==="sorting")},Cw=e=>{const{backgroundType:t,backgroundColor:s,accentColor:o,customBackgroundColorContrast:r,accentContrast:a,family:i,variant:c}=e;if(!(t===se.ACCENT||t===se.COLOR))return null;const d=t===se.ACCENT?o:s;let h;return t===se.ACCENT?h=a:e2({family:i,variant:c,customBackgroundColorContrast:r})?h=Ns(s):h=r??be.DARK,Bt({backgroundColor:d??void 0,contrast:h})},xw=e=>Cw(e)===xt.LIGHT,bw=e=>{const t=e.blockBackgroundType!=null||e.familyBackgroundType!=null||e.courseBackgroundType!=null,s=e.blockCustomContrast!=null||e.familyBackgroundColorContrast!=null||e.courseBackgroundColorContrast!=null;return!t&&!s},yw=e=>{const{backgroundColor:t,family:s,variant:o,blockCustomContrast:r,familyBackgroundColorContrast:a,courseBackgroundColorContrast:i}=e,c=r??a??i??be.AUTO,d=e2({family:s,variant:o,customBackgroundColorContrast:c})?Ns(t):c;return Bt({backgroundColor:t??void 0,contrast:d})};var Sw=p(81884),da=p.n(Sw);const Tw=e=>{const{effectiveBackgroundType:t,blockImage:s}=e;return t!==se.IMAGE?null:s??null},Lw=e=>jg(e?.alt),kw=e=>{if(!e)return null;const{alpha:t,overlayColor:s=nt.DARK}=e,o=it(e),r=s===nt.LIGHT?"#fff":"#000";return ul({alpha:t,color:r,url:o})};function yn(){const e=Fe(),t=jo(),s=os(),o=wt(),r=o?Rh(o.family,o.variant):{};return pw({blockBackgroundType:s?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}function Nw(){return yn().toLowerCase()}function Sl(){const e=wt(),t=yn(),s=e?.background,o=Ae(s?.media)?.image;return Tw({effectiveBackgroundType:t,blockImage:o})}function Ew(){const e=Sl();return Lw(e)}function Iw(){const e=Sl();return kw(e)}function jw(){const e=Sl();return!!e&&e?.overlayColor===nt.LIGHT}function ww(){const e=wt(),t=e?.family,s=e?.variant,o=tw(t,s),r=e?.settings?.cardMode??Hs.WHITE;return o?r.toLowerCase():null}function Aw(){const e=Is(),t=e?la(e):ct.LIGHT;return da()(t.toLowerCase())}function Rw(){const e=wt(),t=Fe(),s=jo();return vw({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:s?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function Pw(){const e=Fe(),t=os(),s=Is(),o=wt(),r=yn(),a=Rw(),i=t.accentColor||e?.theme?.colorAccent;return xw({accentColor:i,accentContrast:e?.theme?.accentContrast,backgroundColor:s,backgroundType:r,customBackgroundColorContrast:a,family:o?.family,variant:o?.variant})}function Mw(){const e=wt(),t=Fe(),s=Is(),o=jo();return yw({backgroundColor:s,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:o?.backgroundColorContrast,variant:e?.variant})}function Ow(){const e=wt(),t=Fe(),s=jo();return bw({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:s?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:s?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function Bw(){const e=Nw(),t=Aw(),s=ww(),o=Pw(),r=jw(),a=Ow(),i=Is(),c=Iw(),l=Ew();return{backgroundColor:i,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:s,colorRange:t,isContrastLight:o,isLegacyBackground:a,isOverlayLight:r}}var t2=p(82920);const s2=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function os(){return(0,u.useContext)(s2)}const Dw="settings";function Mh(e){return t=>{const s=t2.forwardRef((o,r)=>{const a=os(),i={...o,[e??Dw]:a};return(0,n.jsx)(t,{...i,ref:r})});return s.displayName=`withBlockSettings(${t.displayName||t.name})`,s}}function Is(){const e=Fe(),t=os(),s=jo(),o=yn(),r=wt();if(t==null)return null;const a=r?Rh(r.family,r.variant):{},i=gw({effectiveBackgroundType:o,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:s?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:a.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:o,backgroundColor:i};return ow(c)}const Fw="backgroundColor";function Hw(e){return t=>{const s=t2.forwardRef((o,r)=>{const a=Is(),i={...o,[e??Fw]:a};return(0,n.jsx)(t,{ref:r,...i})});return s.displayName=`withBackgroundColor(${t.displayName||t.name})`,s}}function Oh({children:e,...t}){const s=wt(),o=os(),r=xi(),a=(0,u.useMemo)(()=>{const i=s==null?t:aw(s.family,s.variant,t);return{courseColor:r,...o,...i}},[s,t,r,o]);return(0,n.jsx)(s2.Provider,{value:a,children:e})}const Sn={get isInstantLink(){return!!window.InstantLinks?.publicId}};var $w=p(46505);const $=(0,$w.setup)({el:"__",mod:"--",modValue:"-"});var Tl=p(82920);const Tt=$("curtain"),Vw={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."},zw=({labels:e,loadingText:t,showHeader:s,status:o})=>{const r={...Vw,...e},[a,i]=Tl.useState(!1),c=()=>i(!0),l=Tl.useRef(null);return Tl.useEffect(()=>(l.current=setTimeout(c,1e4),()=>{l.current&&clearTimeout(l.current)}),[]),Tl.useEffect(()=>{if(o==="error"){const d=new Error("There was a socket connection error. The renderReconnect curtain was displayed");cT.yf.logger.info(d.message,d)}},[o]),o==="fatalError"?(0,n.jsx)(_w,{labelCurtainSomethingWrong:r.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:r.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:r.curtainSomethingWrongTryAgain,showHeader:s}):o==="error"&&a?(0,n.jsx)(Ww,{labelCurtainSessionTimedOut:r.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:r.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:r.curtainSessionTimedOutRestart,showHeader:s}):o==="error"?(0,n.jsx)(Gw,{labelCurtainOffline:r.curtainOffline,labelCurtainOfflineReconnecting:r.curtainOfflineReconnecting,showHeader:s}):(0,n.jsx)(Uw,{labelCurtainLoading:r.curtainLoading,showHeader:s,text:t})},n2=()=>window.location.reload(),Uw=({labelCurtainLoading:e,showHeader:t,text:s})=>(0,n.jsx)("div",{className:Tt("container",{"show-header":t}),children:(0,n.jsxs)("div",{className:Tt(),children:[(0,n.jsx)("div",{className:Tt("spinner")}),(0,n.jsx)("div",{className:Tt("text"),children:s||e})]})}),_w=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:s,showHeader:o})=>(0,n.jsx)("div",{className:Tt("container",{"show-header":o}),children:(0,n.jsxs)("div",{className:Tt(),children:[(0,n.jsx)("div",{className:Tt("title"),children:e}),(0,n.jsx)("div",{className:Tt("description"),children:s}),(0,n.jsx)("button",{className:Tt("button"),onClick:n2,type:"button",children:t})]})}),Gw=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:s})=>(0,n.jsx)("div",{className:Tt("container",{"show-header":s}),children:(0,n.jsxs)("div",{className:Tt(),children:[(0,n.jsx)("div",{className:Tt("spinner",{reconnect:!0})}),(0,n.jsx)("div",{className:Tt("title"),children:e}),(0,n.jsx)("div",{className:Tt("description"),children:t})]})}),Ww=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:s,showHeader:o})=>(0,n.jsx)("div",{className:Tt("container",{"show-header":o}),children:(0,n.jsxs)("div",{className:Tt(),children:[(0,n.jsx)("div",{className:Tt("title"),children:e}),(0,n.jsx)("div",{className:Tt("description"),children:s}),(0,n.jsx)("button",{className:Tt("button"),onClick:n2,type:"button",children:t})]})}),o2=zw;var r2=p(74512),Kw=p(10489),Qw=p(91902),Yw=p(96545),Zw=p(92529),Xw=p(92937),qw=p(66039),Jw=p(64246),eA=p(40136),tA=p(64171),sA=p(63365),nA=p(79965),oA=p(56401),rA=p(90147),aA=p(39636),iA=p(17534),cA=p(67234),lA=p(23026),dA=p(60218),uA=p(54666),hA=p(21270),mA=p(94835),fA=p(45635),pA=p(71812),gA=p(28916),vA=p(28054),CA=p(59590),xA=p(14133),bA=p(99841),yA=p(42716),SA=p(29400),TA=p(94043),LA=p(82765),kA=p(7769),NA=p(84404),EA=p(130),IA=p(11413),jA=p(72539),wA=p(96464),AA=p(68687),RA=p(35941),PA=p(15238),MA=p(98446),OA=p(14198),BA=p(23095),DA=p(49951),FA=p(78942),HA=p(33789),$A=p(34133),VA=p(45160),zA=p(73181),UA=p(23561),_A=p(36402),GA=p(9065),WA=p(31444),KA=p(68303),QA=p(78718),YA=p(99881),ZA=p(53683),XA=p(69131),a2=p(50987),qA=p(70473),JA=p(3718),eR=p(9544),tR=p(66307),sR=p(83692),nR=p(62585),oR=p(55424),rR=p(23007),aR=p(81591),iR=p(20783),cR=p(12461),lR=p(37956),dR=p(69386),uR=p(30304),hR=p(79366),mR=p(76361),fR=p(53419),pR=p(53745),gR=p(51992),vR=p(98414),CR=p(64142),xR=p(79205),bR=p(2545),yR=p(43779),SR=p(72108),TR=p(18558),LR=p(40615),kR=p(56444),NR=p(8240),ER=p(81499),IR=p(69369),jR=p(10934),wR=p(48206),AR=p(66407),RR=p(198),PR=p(67151),MR=p(8917),OR=p(11653),BR=p(56562),i2=p(83176),DR=p(91732),FR=p(2197),HR=p(60689),$R=p(17482),VR=p(88667),zR=p(36108),UR=p(78891),_R=p(29813),GR=p(65663),WR=p(8820),KR=p(37185),QR=p(71656),YR=p(7772),ZR=p(77868),XR=p(78387),qR=p(67296),JR=p(60345),eP=p(17438),tP=p(98312),sP=p(99717),nP=p(12478),oP=p(81163),rP=p(2585),aP=p(82669),iP=p(71386),cP=p(47932),lP=p(97493),dP=p(40908),uP=p(26854),hP=p(42300),mP=p(12241),fP=p(12615),pP=p(47519),gP=p(35739),vP=p(90300),CP=p(76595),xP=p(35359),bP=p(79963),yP=p(53765),SP=p(43237),TP=p(39143),LP=p(72314),kP=p(42692),NP=p(39729),EP=p(58513),IP=p(69554),jP=p(95970),wP=p(8848),AP=p(90113),RP=p(33750),PP=p(35926),MP=p(24443),OP=p(37116),BP=p(88552),DP=p(15081),c2=p(3331),FP=p(1177),HP=p(81538),$P=p(22400),VP=p(2120),zP=p(70626),UP=p(47556),_P=p(89509),GP=p(69545),WP=p(18445),KP=p(47230),QP=p(80883),YP=p(92434),ZP=p(27397),XP=p(87423),qP=p(69112),JP=p(976),eM=p(82386),tM=p(30466),sM=p(21258),nM=p(34265),oM=p(93085),rM=p(9554),aM=p(65039),iM=p(30325),cM=p(73541),lM=p(54674),dM=p(26371),uM=p(8791),hM=p(77145),mM=p(16918),fM=p(25543),pM=p(24108),gM=p(24618);const vM={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"]},CM={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"]]},xM={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"]},bM={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"]},yM={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"]},SM={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"]},TM={"alert-circle-solid":oR.lE,"alert-circle":i2.lE,"alert-diamond":qR.xG,"angle-right":dR.vm,"arrow-down-from-line":hR.xZ,"arrow-down-to-bracket":mR.a_,"arrow-down-to-line":fR.yH,"arrow-down":uR.B0,"arrow-left":pR.Ce,"arrow-right-from-line":vR.Pe,"arrow-right":gR.dm,"arrow-rotate-left-light":iA.V3,"arrow-rotate-left":CR.V3,"arrow-up-from-bracket":bR.MN,"arrow-up-from-line":yR.s8,"arrow-up-right-from-square":SR.faArrowUpRightFromSquare,"arrow-up":xR.IN,"arrows-two-from-center":Kw.A1,"arrows-two-to-center":Qw.hL,"badge-check":wA.Zs,"bar-chart":TR.X8,bars:AA.ck,"bars-regular":LR.ck,"block-selector":aR.iH,"book-open":NR.Re,"book-sparkles":ER.E4,book:kR.LB,"browser-light":Xw.c9,browser:IR.c9,building:Yw.UR,"building-regular":Zw.UR,"cards-blank":jR.Xm,"caret-down":PA.xB,"caret-right":MA.fU,"chart-column":jA.q9,"check-regular":cR.e6,check:RA.e6,"chevron-down-solid":OA.Jt,"chevron-down":wR.Jt,"chevron-left-light":qw.Wz,"chevron-left-solid":DA.Wz,"chevron-left":AR.Wz,"chevron-right-light":Jw.Xk,"chevron-right-solid":FA.Xk,"chevron-right":RR.Xk,"chevron-up-solid":BA.w2,"chevron-up":PR.w2,"circle-arrow-right":VA.Ni,"circle-arrow-up":$A.yi,"circle-check-regular":OR.QR,"circle-check-solid":zA.QR,"circle-check":xA.QR,"circle-dot":BR.pp,"circle-half-stroke":DR.B2,"circle-exclamation":i2.lE,"circle-info":FR.faCircleInfo,"circle-notch":VR.s4,"circle-plus-duotone":bA.q_,"circle-plus-regular":HR.q_,"circle-plus":UA.q_,"circle-small-solid":_A.ZP,"circle-small":$R.ZP,"circle-solid":HA.GE,"circle-x":GA.Ub,"circle-xmark":zR.bn,"circle-xmark-solid":WA.bn,"circle-xmark-duotone":yA.bn,circle:MR.GE,"clipboard-list-check":UR.S3,"clock-rotate-left":_R.Yj,clone:WR.$3,close:KR.yY,"closed-captioning":GR.UM,"code-fork-duotone":SA.zt,"code-fork-regular":QR.zt,code:pM.jT,comment:YR.DN,copy:ZR.jP,crop:XR.K1,"edit-regular":JR.MT,"ellipsis-regular":eP.Dw,"ellipsis-vertical-regular":tP.nx,envelope:sP.y_,"external-link":nP.vM,"eye-slash":tA.k6,eye:eA.pS,"face-anguished":cA.xX,"face-anguished-regular":lA.xX,"face-frown":dA.Ho,"face-frown-regular":uA.Ho,"face-grin-regular":hA.pj,"face-laugh":mA.ou,"face-laugh-regular":fA.ou,"face-meh":pA.Lz,"face-meh-regular":gA.Lz,"face-smile":vA.H8,"face-smile-regular":CA.H8,"file-audio":rP.qe,"file-duotone":TA.A4,"file-export-light":nA.o1,"file-export":aP.o1,"file-import":iP.$M,"file-lines":cP.bL,"file-pdf-light":sA.O_,"file-pdf":lP.O_,file:oP.A4,"folder-image":dP.JK,"folder-open":LA.Uj,gear:uP.BH,globe:hP.Bw,"graduation-cap":mP.eS,"grid-2":fP.Qy,"grid-solid":KA.Qy,"grip-dots-vertical":pP.IM,"hand-pointer":gP.A8,"image-landscape":CP.oC,"image-portrait":xP.E4,image:vP.jb,"photo-film":bP._Z,"info-circle":yP.iW,"layers-solid":nR.qI,"link-simple-slash":LP.r2,"link-simple":TP.wi,"link-slash":kP.TH,link:SP.CQ,list:NP.IT,"list-check":EP.UN,"location-dot":rA.gK,"lock-keyhole-light":oA.Yp,lock:QA.DW,"magnifying-glass-plus":jP.bM,"magnifying-glass":IP.$U,megaphone:rR.OR,"message-quote":wP.ps,"minus-solid":YA.EZ,minus:AP.EZ,paintbrush:kA.ue,palette:RP.fy,paste:PP.R9,pause:MP.G1,"pause-solid":ZA.G1,"pen-line":OP.pg,"pen-nib":DP.us,"pen-to-square":BP.faPenToSquare,"pencil-duotone":NA.zL,"pencil-regular":lR.zL,"pencil-thin":gM.zL,pencil:aA.zL,"play-regular":c2.ij,"play-solid":XA.ij,play:c2.ij,"flag-solid":a2.s6,flag:a2.s6,"plus-regular":FP.QL,plus:HP.TS,"quote-left":$P.$7,"rectangle-history-circle-plus":zP.Hu,"rectangle-regular":VP.vt,"rectangle-vertical-history":UP.Lt,rocket:_P.KM,"ruler-horizontal":GP.Si,"ruler-triangle":WP.cb,"sliders-simple":qA.AD,"sparkles-solid":JA.p7,sparkles:KP.p7,"spinner-third":QP.sq,"square-arrow-down":ZP.Y1,"square-arrow-right":XP.mT,"square-arrow-up-right":qP.fL,"square-check-solid":eR.Dn,"square-check":JP.Dn,"square-duo":EA.Nf,"square-info":eM.Lg,"square-plus":tM.Vd,square:YP.Nf,"stopwatch-regular":sM.nw,table:nM.w9,tag:oM._2,text:rM.jw,"trash-can":iM.sj,trash:aM.yL,"user-group":tR.US,"users-regular":cM.gd,users:IA.gd,video:lM.n2,volume:dM.eF,volumeHigh:uM.AI,volumeLow:hM.gN,volumeXmark:mM.H_,"wand-magic-sparkles":fM.Ys,"waveform-lines":iR.Wx,xmark:sR.Jy},LM={"audio-plus":xM,"clone-plus":bM,"flask-outline":yM,language:SM,reach:CM,"rise-com":vM},ie=(0,u.memo)(function({"aria-label":t,className:s,classNameIcon:o,color:r,"data-testid":a,name:i,rotation:c,spin:l,style:d,styleIcon:h}){return(0,n.jsx)("span",{className:s,"data-testid":a,style:{color:r,...d},children:(0,n.jsx)(r2.g,{"aria-label":t,className:o,icon:TM[i],rotation:c,spin:l,style:h})})}),aue=(0,u.memo)(function({className:t,classNameIcon:s,color:o,name:r,style:a,styleIcon:i}){return(0,n.jsx)("span",{className:t,style:{color:o,...a},children:(0,n.jsx)(r2.g,{className:s,icon:LM[r],style:i})})}),kM=({value:e,fallback:t})=>{const s=Ae(e),o=Et(e);return t?(0,n.jsx)("span",{"data-l10n-id":o,children:s||t}):(0,n.jsx)("span",{"data-l10n-id":o,children:s})};function NM({value:e,children:t}){const s=Ae(e);return t(s)}const ps=kM,l2=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),EM=(e,t)=>{const s=e?.toLowerCase();try{return t?.[s]?.authorDisplayName??l2.of(e)}catch(o){return console.warn(`Language ${e} invalid`,o),e}},IM=(e,t)=>{try{return t?.[e]?.learnerDisplayName??l2.of(e)}catch(s){return console.warn(`Language ${e} invalid`,s),e}},Bh=()=>{const e=ta(),t=J0(e);return(0,u.useCallback)(o=>EM(o,t),[t])},jM=()=>{const e=ta(),t=J0(e);return(0,u.useCallback)(o=>IM(o,t),[t])};var wM=p(27526);function rs(e){const{to:t,children:s}=e,o=(0,we.zy)(),r=(0,u.useMemo)(()=>s0(t,o),[o,t]);return(0,n.jsx)(we.N_,{...e,to:r,children:s})}function AM({children:e,locale:t,...s}){const o=(0,we.zy)(),r=nn(),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,n.jsx)(rs,{...s,to:a,children:e})}var Tn=p(63572),RM=p(21208),Ll=p.n(RM);const PM={keys:["End"],keyCode:Tn.KEY_END},MM={keys:["Enter"],keyCode:Tn.KEY_RETURN},OM={keys:["Home"],keyCode:Tn.KEY_HOME},BM={keys:["Tab"],keyCode:Tn.KEY_TAB},DM={keys:[" "],keyCode:Tn.KEY_SPACE},FM={keys:["Escape","Esc"],keyCode:Tn.KEY_ESCAPE},HM={keys:["ArrowUp"],keyCode:Tn.KEY_UP},$M={keys:["ArrowDown"],keyCode:Tn.KEY_DOWN},VM={keys:["ArrowLeft"],keyCode:Tn.KEY_LEFT},zM={keys:["ArrowRight"],keyCode:Tn.KEY_RIGHT},Ln=({keyCode:e,keys:t})=>s=>s.keyCode?s.keyCode===e:xo()(s.key,t),UM=e=>e.altKey||e.ctrlKey||e.metaKey,d2=Ln(PM),ua=Ln(MM),u2=Ln(OM),kl=Ln(BM),Dh=Ln(DM),gs=Ln(FM),gr=Ln(HM),vr=Ln($M),Gn=Ln(VM),Wn=Ln(zM),Ei=bo()(Dh,ua),iue=bo()(kl,ua),_M=bo()(Wn,gr),GM=bo()(Gn,vr),WM=bo()(gr,vr),h2=po()(Ei),m2=25,KM=Ll()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=m2)}),QM=Ll()((e,t,s)=>{t&&(s.preventDefault(),e.scrollTop+=m2)}),YM=(e,t)=>s=>{const o=QM(e,t),r=KM(e);ms()([[vr,o],[gr,r]])(s)},kn=$("locales-dropdown"),ZM=({backToStackCourseId:e,currentLocale:t,defaultLocale:s,locales:o,message:r,onChange:a,optionType:i,showMessageIndicator:c})=>{const l=(0,u.useRef)(null),d=(0,u.useRef)(null),[h,m]=(0,u.useState)(!1),[f,v]=(0,u.useState)(!1),C=(0,u.useMemo)(()=>o.filter(b=>b.localeCode!==s),[s,o]),g=(0,u.useMemo)(()=>o.find(b=>b.localeCode===s),[s,o]),x=(0,u.useMemo)(()=>o.find(b=>b.localeCode===t),[t,o]);(0,u.useLayoutEffect)(()=>{h&&f&&(l.current?.querySelector(`[data-locale="${t}"]`)?.focus(),v(!1))},[h,f,t]),(0,u.useEffect)(()=>{const b=L=>{gs(L)&&(d.current?.focus(),m(!1)),kl(L)&&setTimeout(()=>{l.current.contains(document.activeElement)||m(!1)},0)};return h&&document.addEventListener("keydown",b),()=>{document.removeEventListener("keydown",b)}},[h]);const y=(0,u.useCallback)(b=>{!h&&document.activeElement===b.currentTarget&&v(!0),m(!h)},[h]),T=(0,u.useCallback)(b=>{h&&!d.current?.contains(b?.target)&&m(!1)},[h]);(0,wM.A)(l,T),(0,u.useEffect)(()=>{const b=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&T()},0);return window.addEventListener("blur",b),()=>window.removeEventListener("blur",b)},[T]);const S=(0,u.useCallback)(b=>{document.activeElement===b.currentTarget&&d.current?.focus(),m(!1),a?.(b.currentTarget.getAttribute("data-locale"))},[a]);return(0,n.jsxs)("div",{className:kn({isOpen:h}),children:[(0,n.jsx)("div",{className:kn("trigger-wrap"),children:(0,n.jsxs)("button",{className:kn("trigger"),onClick:y,ref:d,type:"button",children:[c&&(0,n.jsx)("div",{className:kn("message-indicator")}),(0,n.jsx)(ie,{name:"globe"}),x.displayName,(0,n.jsx)(ie,{name:"chevron-down"})]})}),(0,n.jsxs)("div",{className:kn("contents"),ref:l,children:[r,(0,n.jsx)("div",{className:kn("grouping-header"),children:"Source"}),(0,n.jsx)(f2,{checked:s===t,locale:g,onClick:S,type:i}),(0,n.jsx)("div",{className:kn("grouping-header"),children:"Translations"}),C.map(b=>(0,n.jsx)(f2,{checked:b.localeCode===t,locale:b,onClick:S,type:i},b.localeCode)),e&&(0,n.jsx)("a",{className:kn("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},f2=({checked:e,locale:t,onClick:s,type:o})=>o==="link"?(0,n.jsx)(AM,{className:kn("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:s,children:t.displayName},t.localeCode):(0,n.jsx)("button",{className:kn("option",{checked:e}),"data-locale":t.localeCode,onClick:s,type:"button",children:t.displayName},t.localeCode),XM=({hideBackToStack:e,...t})=>{const s=Fe(),{currentLocale:o}=ot(),r=rl(),a=nn(),i=Bh(),c=e?void 0:s?.id,l=(0,u.useMemo)(()=>r.map(d=>({localeCode:d.locale,displayName:i(d.locale)})),[i,r]);return(0,n.jsx)(ZM,{backToStackCourseId:c,currentLocale:o,defaultLocale:a,locales:l,optionType:"link",...t})},p2=window.location.origin,qM=1e3,JM="course:ready",g2="localizedSharePreview:ready",eO="preview:selectLocale",Fh="localizedSharePreview:toggleCurtain",v2="localizedSharePreview:togglePreview",cn=$("localized-share-preview"),ha=!!window.frameElement,C2=e=>(0,_t.HX)(e)&&yg(),tO=e=>C2(e)&&!ha,sO=(e,t)=>window.parent?.postMessage({type:e,data:t});let x2=null;const nO=({children:e,localesDropdown:t,title:s})=>(0,n.jsxs)("div",{className:cn("header"),dir:"ltr",children:[(0,n.jsxs)("div",{className:cn("header-title-dropdowns"),children:[(0,n.jsx)("div",{className:cn("header-title"),children:(0,n.jsx)("span",{className:cn("header-title-text"),children:(0,n.jsx)(ps,{value:s})})}),t&&(0,n.jsx)("div",{className:cn("header-dropdowns"),children:t})]}),(0,n.jsx)("div",{className:cn("header-btn-group"),children:e})]}),oO=({children:e,className:t,disabled:s=!1,onClick:o})=>(0,n.jsx)("button",{className:["button button--default button--header-done",t,s?"button--disabled":void 0].filter(Boolean).join(" "),disabled:s,onClick:o,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),rO=({children:e})=>{const t=rt(),s=qt(),o=(0,we.zy)(),{currentLocale:r,setCurrentLocale:a}=ot(),i=nn(),c=VE(),l=re(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||Sg(),m=(0,u.useRef)(null),[f,v]=(0,u.useState)(!1),[C,g]=(0,u.useState)(!1),[x,y]=(0,u.useState)(!h),T=(0,u.useMemo)(()=>{const O=new URLSearchParams(window.location.search),R=new URLSearchParams;for(const M of["from"])O.has(M)&&R.set(M,O.get(M));const P=R.toString();return`${p2}/share/${window.shareId}${P?`?${P}`:""}#/?locale=${r}`},[]),[S,b]=(0,u.useState)(null),[L,N]=(0,u.useState)(r),[k,E]=(0,u.useState)(!1),[j,A]=(0,u.useState)(!ha),I=(O,R)=>m.current?.contentWindow.postMessage({type:O,data:R});(0,u.useEffect)(()=>{ha||I(eO,r)},[r]),(0,u.useEffect)(()=>{ha&&(sO(g2),setTimeout(()=>E(!0),0))},[]),(0,u.useEffect)(()=>{const O=R=>{if(R.origin!==p2)return;const M=R.data?.type,H=R.data?.data;if(ha)switch(M){case Fh:{A(H);break}case v2:{H?(N(r),b(o),t(z0(!0)),a(i),s("/",{replace:!0})):(t(z0(!1)),a(L),s(S.pathname+S.search+S.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(M){case JM:{A(!1);break}case g2:{y(!0);break}}};return window.addEventListener("message",O),()=>{window.removeEventListener("message",O)}},[i,t,s,r,o,L,S,a]);const w=(0,u.useCallback)(()=>{const O=!f;clearTimeout(x2),g(!0),I(Fh,!0),x2=setTimeout(()=>{g(!1),I(Fh,!1),v(O)},qM),setTimeout(()=>{I(v2,O)},0)},[f]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:cn("curtain",{hide:!j}),children:(0,n.jsx)(o2,{status:"loading"})}),ha?k&&e:(0,n.jsxs)("div",{className:cn(),children:[x&&(0,n.jsx)(nO,{localesDropdown:!f&&!C&&(0,n.jsx)(XM,{hideBackToStack:!0}),title:c,children:(0,n.jsx)(oO,{className:cn("preview-button"),disabled:C,onClick:w,children:f?"Close Learner Preview":(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ie,{className:cn("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,n.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:cn("iframe"),ref:m,src:T})]})]})},aO=(0,u.lazy)(()=>p.e("_b106").then(p.t.bind(p,63744,23))),iO=({children:e})=>{const t=re(),{setCurrentLocale:s,currentLocale:o}=ot(),r=Ae(t?.title),a=ta()?.l10n?.languageCodeMetadata??{},i=Object.entries(a).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(aO,{courseTitle:r,currentLocale:o,locales:i,setCurrentLocale:s,children:e})})};function cO({children:e}){const t=re();return t&&C2(t)?(0,n.jsx)(rO,{children:e}):Sn.isInstantLink?(0,n.jsx)(iO,{children:e}):(0,n.jsx)(n.Fragment,{children:e})}const Hh=(0,u.createContext)(void 0);Hh.displayName="RiseComPartnerTrackingContext";function lO({children:e,onTrack:t}){return(0,n.jsx)(Hh.Provider,{value:t,children:e})}function b2(){return(0,u.useContext)(Hh)}var dO=p(24332),uO=p.n(dO),hO=p(53802),mO=p.n(hO);class Kn{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,s=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),o=/CriOS/.test(window.navigator.userAgent);return t&&s&&!o}static get isSafari9(){if(!window||!window.navigator)return!1;const t=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),s=/version\/9./i.test(window.navigator.userAgent);return t&&s}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:s})=>/Chromium/i.test(s)):/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:s,vendor:o}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(s);return/Chrome/.test(s)&&/Google Inc/.test(o)&&!r}}const fO=zu()(qs()),y2=e=>t=>`${e}/${t.id}`,pO=(e,t)=>U1()({data:(0,me.action)(t),method:"POST",url:iT(fO(`/${t}`),Ze()("url"),e),...go()(["headers","withCredentials"],e)}),gO=e=>(t,s)=>I1()(t,y2(s),$h(e,s)),vO=e=>St()(bt()({},["response","data"]),ai()(Ze()("type"),(0,me.error)(e))),CO=(e,t)=>s=>e.postRequest?e.postRequest(t,s):s,S2=e=>t=>s=>o=>o0(o,pO(t,s),e,n0()(vO(s),po()(Ur()("data"),Ze()("data"))),mO()(Zs()(Ze()("error"),Yo().Rejected,Yo().of)),CO(t,{type:s,payload:o})),xO=({url:e,method:t,data:s,headers:o})=>{if(Kn.isFirefox){const r=new Blob([JSON.stringify(s)],{type:"application/json"}),a=window.navigator.sendBeacon(e,r);return Promise.resolve({type:s.type,payload:{...s.payload,queued:a}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...o},body:JSON.stringify(s),keepalive:!0}).then(r=>r.json()).then(zr()("data"))},bO=Yo().fromPromise(xO),$h=U0()(3,S2(ci)),yO=U0()(3,S2(bO)),SO=e=>(t,s)=>uO()(t,y2(s),$h(e,s)),TO=e=>({debounce:gO(e),send:$h(e),fetchWithKeepAlive:yO(e),throttle:SO(e)}),LO=`${Ee("RISE_RUNTIME_URI")}/ducks`,kO=TO({headers:()=>({"x-rise-authoring-client":"a7d8d308aff38697a7281803768d2855f37032c8"}),postRequest:(e,t)=>t,url:LO,withCredentials:!0});var NO=p(5951),EO=p.n(NO);const hue=EO()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:w9(),userRole:P9(),subId:M9(),subPlan:O9(),subStatus:B9()}}),IO=qs()("rise/track/")("TRACK");var fue;const jO=e=>({...e,context:{locale:navigator.language,device:M1(),channel:R1(),userAgentData:P1(),page:O1(),userAgent:B1(),...e.context}}),wO=(e,t)=>({...e,properties:{...A1(t),...e.properties}}),T2=e=>(t,s)=>{const o=s(),r=Yu();let a=jO(e);return a=wO(a,o),a.userId=a.userId??r,a.author=a.author??r,t(kO.send(IO)(a))};function AO({children:e}){const t=rt(),s=(0,u.useCallback)(o=>t(T2(o)),[t]);return(0,n.jsx)(lO,{onTrack:s,children:e})}var L2,k2,Nl;const N2=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let pue;function gue(){}function RO(){return(0,u.useContext)(N2)}function PO({children:e}){if(!Sn.isInstantLink)return(0,n.jsx)(n.Fragment,{children:e});const t=void 0;return t==null?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(t,{children:e})})}function vue({children:e,PasswordGate:t}){const s=window.InstantLinks?.isPasswordProtected?.()===!0,[o,r]=k2(),[a,i]=k2(s?"required":"authorized"),c=Nl(()=>{i("authorized")},[]),l=Nl(()=>{i("error")},[]),d=Nl(f=>{r(f),i("validating")},[]),h=Nl(()=>{i("unauthorized")},[]),m=a==="authorized"||a==="validating";return L2(t,{onSubmitPassword:d,status:a,children:L2(N2.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:o,status:a},children:e})})}const Ao=({id:e="portal",childType:t="other",attributes:s}={})=>{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)),s)for(const[i,c]of Object.entries(s))r.setAttribute(i,c);return r},E2=Ao();function MO(e){e?e.appendChild(E2):document.body.appendChild(E2)}function OO(e){return function({Default:s,className:o,...r}){const a=`brand--${e}`,i=o?`${o} ${a}`:a;return(0,n.jsx)(s,{...r,className:i})}}const ma=OO("ui"),Vh=e=>e==="<p><br></p>"?"":e,zh="data-change-path",Uh="data-l10n-id",I2=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(Uh)]:JSON.parse(e.getAttribute(zh))};let Qn;const BO=()=>{const e=fa();e&&e.classList.add("selected")},El=()=>{fa()&&Qn&&Ii(Qn)},DO=(e,t)=>s=>{const o=document.elementsFromPoint(s.clientX,s.clientY),r=t?o.find(a=>a.getAttribute(Uh)):o.find(a=>a.getAttribute(zh));r!=null&&(e&&Qn!==r&&(Qn=r,e(I2(r,t))),Ii(r))},FO=(e,t)=>s=>{s.stopPropagation(),s.preventDefault();const o=document.elementsFromPoint(s.clientX,s.clientY),r=t?o.find(a=>a.getAttribute(Uh)):o.find(a=>a.getAttribute(zh));if(r){Ii(r),w2();const a=I2(r,t);a&&(e(a),BO())}},_h=()=>document.getElementById("target-container"),fa=()=>document.getElementById("target-highlight"),j2=()=>{if(_h())return;const t=document.createElement("div");t.classList.add("target-container"),t.id="target-container",document.body.appendChild(t);const s=document.createElement("div");s.classList.add("target-highlight"),s.id="target-highlight",t.appendChild(s)},w2=()=>{const e=fa();e&&e.classList.add("selected")},HO=({top:e,left:t,width:s,height:o})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return s<r&&(e=e-10,o=o+20,t=t-20,s=s+40),{top:e,left:t,width:s,height:o}},Ii=e=>{const{top:t,left:s,width:o,height:r}=HO(e.getBoundingClientRect()),a=fa();a&&(e!==Qn&&a.classList.contains("selected")&&a.classList.remove("selected"),a.classList.add("active"),Object.assign(a.style,{top:`${t}px`,left:`${s}px`,width:`${o}px`,height:`${r}px`}),Qn=e)},$O=()=>{window.removeEventListener("scroll",El,{capture:!0}),Il()},Il=()=>{fa()?.classList?.remove("active"),fa()?.classList?.remove("selected")};let pa,jl;const VO=({locale:e})=>({isActive:t},s)=>{const o=!!_h();if(t){if(pa)return pa;j2();const r=DO(s,e);let a;return pa=new Promise((i,c)=>{a=FO(i,e),jl=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",a,!0),window.addEventListener("resize",Il,!0),window.addEventListener("scroll",El,!0)}).finally(()=>{pa=null,jl=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",a,!0),window.removeEventListener("resize",Il,!0),window.removeEventListener("scroll",El,!0)}),pa}else Il(),_h()?.remove(),Qn=null;return o&&jl!=null&&jl(new Error("cancelled")),Promise.resolve()},zO=e=>{let t=e.findIndex(s=>s==="items");return t===-1?e:e.slice(0,t+2)},A2=e=>{const t=(0,Fr.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(zO(e))}']`):null},UO=e=>{j2(),window.addEventListener("scroll",El,{capture:!0}),document.body.classList.add("target-mode");const t=A2(e);t&&Ii(t)},_O=e=>{if(!pa)return;const t=A2(e);t&&(Qn!==t&&(Qn=t),Ii(t),w2(),t.scrollIntoView({behavior:"smooth",block:"center"}))},GO=e=>["course",e],R2=(e,t)=>["lessons",{id:e},t],WO=(e,t)=>[...R2(e,"items"),{id:t}],ga=e=>JSON.stringify(GO(e)),P2=(e,t)=>JSON.stringify(R2(e,t)),KO=(e,t)=>JSON.stringify(WO(e,t)),vs={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"},va=(e,t)=>{const s={};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$/,"");s[`${i??"item"}Id`]=r.id}}return s};function Gh(e,t){const s=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[o,r]=(0,u.useState)(s.matches);return(0,u.useEffect)(()=>{const a=s.addEventListener??s.addListener,i=s.removeEventListener??s.removeListener;return a.call(s,"change",c),()=>i.call(s,"change",c);function c(){r(s.matches)}},[s]),o}const QO="matches";function YO(e,t,s,o="withPxToEmMedia"){return r=>{function a(i){const c=Gh(e,t);return(0,n.jsx)(r,{...i,[s??QO]:c})}return a.displayName=`${o}(${r.displayName||r.name})`,a}}function Lt(e){return Gh("max-width",e-1)}function Cue(e){return Gh("min-width",e)}function ZO(e,t,s){return YO("min-width",e,t,s)}const XO=()=>Lt(1200),qO=()=>Lt(768),Wh=()=>Lt(480),Kh=$("cover");function JO(e,t,s){return e===1?t:s}function eB(){const e=SC(),t=Ce(),s=JO(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,n.jsxs)("li",{className:Kh("num-lessons"),role:"listitem",children:[(0,n.jsx)("span",{className:Kh("num-lessons-value"),children:e}),"\xA0",(0,n.jsx)("span",{className:Kh("num-lessons-units"),children:s})]})}var tB=p(39031),ln=p.n(tB);const sB=36e5,Qh=$("cover");function nB(e){return Math.round(10*e)/10}function M2(e,t,s){return e===1?t:s}function oB(){const{showTimeToComplete:e,timeToComplete:t}=re(),s=Ce();if(!e)return null;const o=Number(t)>=sB,r=o?nB(ln().duration(t).asHours()):ln().duration(t).asMinutes(),a=o?M2(r,s?.coverHour||"Hour",s?.coverHours||"Hours"):M2(r,s?.coverMinute||"Minute",s?.coverMinutes||"Minutes");return(0,n.jsxs)("li",{className:Qh("time-to-complete"),role:"listitem",children:[(0,n.jsx)("span",{className:Qh("time-to-complete-value"),children:r}),"\xA0",(0,n.jsx)("span",{className:Qh("time-to-complete-units"),children:a})]})}const Yh=$("cover");function O2(){const e=Ce();return null}const rB=$("cover"),aB="MMMM D, YYYY";function B2({format:e=aB}){const{publishedAt:t}=re(),s=Ce(),o=rB("details-content-published-at");if(!t)return null;const r=ln()(t);return r.isValid()?(0,n.jsxs)("div",{className:o,children:[s?.coverPublished||"Published"," ",r.format(e)]}):null}var iB=p(21135),ji=p.n(iB);const D2=ji()(async()=>(await p.e("math").then(p.bind(p,79078))).browserAdaptor(),{promise:!0}),F2=ji()(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([p.e("math").then(p.t.bind(p,33710,23)),p.e("math").then(p.bind(p,18415))]);return new e({packages:t})}),H2=ji()(async()=>{const e=await p.e("math").then(p.t.bind(p,83390,23));return new e.SVG({fontCache:"local"})},{promise:!0}),$2=ji()(async()=>{const[e,t,s,{RegisterHTMLHandler:o},{mathjax:r}]=await Promise.all([D2(),F2(),H2(),p.e("math").then(p.bind(p,81991)),p.e("math").then(p.bind(p,55633))]);return o(e),r.document(document,{InputJax:t,OutputJax:s})},{promise:!0}),cB=ji()(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[s,o]=await Promise.all([H2(),$2()]),r=s.styleSheet(o);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{promise:!0});class lB extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=cB(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,[s,o,r]=await Promise.all([$2(),D2(),F2(),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=s.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=s.convert(a),f=o.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new dB("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(s=>(s?.length??0)>0).join(`

`);this.firstElementChild.ariaLabel=t.trim().length===0?null:t}}customElements.define("rise-math",lB);class dB extends CustomEvent{}var Nn=p(55116);function Zh(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 s=t.match(/^<[^>]+data-editor-id=["']([^"']+)["'][^>]*>/);if(s){const o=s[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),a=r?r[1]:t;return{editorId:o,value:typeof e=="string"?a:e}}return{value:e}}const V2=(e="")=>e.split(".").slice(-2).join("."),z2=Pe()(V2,Ee),uB=e=>e.includes("#/lessons/"),$s=e=>{if(!e||hB(e)||uB(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),s=V2(t);return s!==z2("ARTICULATE_DOMAIN")&&s!==z2("RISE_DOMAIN")}catch{return!1}},hB=e=>e?e.slice(0,7)==="mailto:":!1;var dn=p(4631);const Xh=$("external-link-disabled-popover");function wl(e={}){const{delay:t=200}=e,s=u.useRef(new Map),o=u.useCallback(c=>{const l=s.current.get(c);l&&clearTimeout(l);const d=setTimeout(()=>{const h=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(h,"show"),s.current.delete(c)},t);s.current.set(c,d)},[t]),r=u.useCallback(c=>{const l=s.current.get(c);l&&clearTimeout(l);const d=setTimeout(()=>{const h=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(h,"hide"),s.current.delete(c)},t);s.current.set(c,d)},[t]),a=u.useCallback(c=>{const l=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(l,"show")},[]),i=u.useCallback(c=>{const l=`trial-external-link-popover-${c}`;dn.ArcPopover.handlePopover(l,"hide")},[]);return u.useEffect(()=>{const c=s.current;return()=>{c.forEach(l=>clearTimeout(l)),c.clear()}},[]),{handleMouseEnter:o,handleMouseLeave:r,handleFocus:a,handleBlur:i}}function mB(e){return t=>{const{handleMouseEnter:s,handleMouseLeave:o,handleFocus:r,handleBlur:a}=wl(),i=u.useId();return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e,{...t,attachmentId:i,onLinkBlur:a,onLinkFocus:r,onLinkMouseEnter:s,onLinkMouseLeave:o}),t.externalLinksDisabled&&(0,n.jsx)(Al,{anchorId:i})]})}}const Al=({anchorId:e})=>{const t=`trial-external-link-popover-${e}`;return u.useEffect(()=>{const s=o=>{o.key==="Escape"&&dn.ArcPopover.handlePopover(t,"hide")};return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[t]),(0,n.jsx)(dn.ArcPopover,{alternateAnchorId:e,anchorAt:"top-center",boundary:"flip",className:Xh(),hasTail:!0,headerSlot:(0,n.jsx)("div",{className:Xh("header"),children:"Subscribe to unlock full access"}),hidePopoverButton:!0,id:t,offset:8,popover:"manual",variant:"common",children:(0,n.jsx)("div",{className:Xh("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})})},fB=({allowTabNavigation:e=!0,className:t="","data-testid":s,id:o,ref:r,tagName:a="div",value:i})=>{const c=Fe(),l=c&&"externalLinksDisabled"in c?c.externalLinksDisabled:!1,d=It(),h=(0,u.useRef)(null),m=Ae(i),[f,v]=(0,u.useState)([]),{handleMouseEnter:C,handleMouseLeave:g,handleFocus:x,handleBlur:y}=wl(),{currentLocale:T}=ot(),S=nn(),b=(0,u.useMemo)(()=>{const L=_u(m),N=Array.prototype.concat(TB,LB,CB,gB,vB(T,S),l?xB:[],e?yB:bB,SB(d?.a11yNoticeLinkNewTab));return pB(N,L)},[e,T,S,l,d,m]);return(0,u.useLayoutEffect)(()=>{if(!l||!h.current){v([]);return}const L=[];h.current.querySelectorAll("[data-tooltip-target]").forEach((k,E)=>{const j=k.nextElementSibling;if(j?.hasAttribute("data-external")){const A=j.getAttribute("data-external-text")||"",I=j.getAttribute("data-external-id")||`link-${E}`;L.push({placeholder:k,text:A,id:I})}}),v(L)},[b,l]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":Et(i),"data-testid":s,id:o,ref:L=>{h.current=L,typeof r=="function"?r(L):r&&(r.current=L)},children:(0,u.createElement)(a,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:b}),[b])})}),f.map(({placeholder:L,text:N,id:k})=>(0,n.jsxs)(u.Fragment,{children:[(0,Nn.createPortal)((0,n.jsx)("span",{id:k,onBlur:()=>y(k),onFocus:()=>x(k),onMouseEnter:()=>C(k),onMouseLeave:()=>g(k),role:"button",style:{cursor:"pointer",color:"var(--arc-color-text-disabled)",textDecoration:"underline"},tabIndex:0,children:N}),L),(0,n.jsx)(Al,{anchorId:k})]},k))]})};function pB(e,t){const s=document.createElement("div");s.innerHTML=t;for(const o of e)o(s);return s.innerHTML}const U2=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function gB(e){for(const t of e.querySelectorAll("a")){U2(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 vB(e,t){return s=>{if(!(!e||e===t)){for(const o of s.querySelectorAll("a"))if(U2(o)){const r=o.getAttribute("href");if(r){const a=r.includes("?")?"&":"?";o.setAttribute("href",`${r}${a}locale=${encodeURIComponent(e)}`)}}}}}function CB(e){for(const t of e.querySelectorAll("table"))if(!t.parentElement.classList.contains("rise-table-wrap")){const s=document.createElement("div");s.className="rise-table-wrap",t.parentNode.replaceChild(s,t),s.appendChild(t)}}function xB(e){let t=0;const s=[];for(const o of e.querySelectorAll("a"))if($s(o.href)){const r=o.textContent||"",a=`external-link-anchor-${Date.now()}-${t++}`;o.removeAttribute("href"),o.removeAttribute("rel"),o.removeAttribute("target"),o.setAttribute("data-external",""),o.setAttribute("data-external-text",r),o.setAttribute("data-external-id",a),o.setAttribute("role","button"),o.style.display="none";const i=document.createElement("span");i.setAttribute("data-tooltip-target",""),o.parentNode?.insertBefore(i,o),s.push({placeholder:i,text:r,id:a})}return s}function bB(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function yB(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function SB(e="(opens in a new tab)"){return t=>{for(const s of t.querySelectorAll('a[target="_blank"]')){const o=document.createElement("span");o.className="visually-hidden-always",o.textContent=e,s.appendChild(o)}}}function TB(e){return Zh(e).value}function LB(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:s,longDescription:o}=t,r=t.querySelector('[slot="short-description"]'),a=t.querySelector('[slot="long-description"]');s==null&&r!=null&&(t.shortDescription=r.textContent),o==null&&a!=null&&(t.longDescription=a.textContent)}return e}const ke=fB,_2=$("cover");function kB(){const e=re(),t=XO(),s=Ae(e?.description);if(!s)return null;const o=ga("description"),r=(0,_t.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,n.jsx)("div",{...r,children:(0,n.jsxs)("section",{className:_2("details-content-section"),children:[t?(0,n.jsx)(O2,{}):(0,n.jsx)(B2,{}),(0,n.jsx)(ke,{className:_2("details-content-description"),value:Vh(s)},"text")]})})}const qh=e=>{if(!e)return"";const t=ln()(e),s=ln()(),o=ln()(s).add(24,"hours");return t.isBefore(s)?"Overdue":t.isBefore(o)?`Due in ${s.to(t,!0)}`:`Due ${t.format("MMM D")}`},G2=e=>ln()(e).isSameOrBefore(ln()().add(3,"d"),"days");function NB({Default:e,...t}){const{dueAt:s}=t,r=s&&G2(s)?"brand--background":"brand--color";return(0,n.jsx)(e,{...t,className:r})}const EB=(0,u.forwardRef)(function({children:t,disabled:s,onClick:o,to:r,...a},i){return s?(0,n.jsx)("a",{"aria-disabled":"true",ref:i,role:"link",...a,children:t}):(0,n.jsx)(rs,{onClick:o,ref:i,to:r,...a,children:t})});function IB(){return!(typeof document>"u"||!("startViewTransition"in document)||Kn.isFirefox)}function jB(e){if(!IB()){const t=e();return Promise.resolve(t)}return new Promise(t=>{try{document.startViewTransition(async()=>{await e()}).finished.then(()=>t()).catch(()=>t())}catch{const s=e();Promise.resolve(s).then(()=>t()).catch(()=>t())}})}let Jh=!1;function Yn(e,t="default"){return Jh?Promise.resolve():(Jh=!0,jB(()=>{document.documentElement.classList.add(`transition-${t}`),e()}).then(()=>{document.documentElement.classList.remove(`transition-${t}`)}).finally(()=>{Jh=!1}))}const W2=$("cover"),as=Oe("CoverAction",()=>{const e=re(),{trackingQuizId:t,theme:s}=e,o=qt(),r=window.viewType==="preview",a=yC(),i=dj(),c=ra(),l=a?.id,d=s?.showStartButton??!0,h=e9()?c===100:J4(),f=i!=null?i:l,v=!r&&!1,{courseCTALabel:C}=Fj({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(" "),x=ks(f),y=T=>{T.preventDefault(),Yn(()=>{o(x)},"cover-to-lesson")};return(0,n.jsx)("div",{className:W2("header-content-action-wrapper"),children:(0,n.jsx)(EB,{className:g,onClick:y,to:x,children:(0,n.jsx)("span",{className:W2("header-content-action-link-text"),children:C})})})});var wB=p(25048),X=p.n(wB),em,AB;const Sue=({width:e="18",height:t="18",className:s})=>em("svg",{"aria-hidden":"true",className:AB("i i-alert",s),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:em("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:em("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),Tue=null;function Gt(e){return(0,n.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function RB(e){return(0,n.jsxs)(Gt,{viewBox:"0 0 16 12",...e,children:[(0,n.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,n.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,n.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 PB,K2,MB;const Lue=({width:e="24",height:t="16",leftMovement:s="0",className:o})=>PB("svg",{"aria-hidden":"true",className:MB("i i-alt",o),focusable:"false",height:t,style:{marginLeft:s},viewBox:"0 0 24 16",width:e,children:[K2("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"}),K2("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"})]}),kue=null;var OB,Rl,BB;const Nue=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:s="30",height:o="30",className:r,focusable:a="false"})=>OB("svg",{className:BB("i i-blockTemplateAllAuthors",r),focusable:a,height:o,viewBox:"0 0 30 30",width:s,children:[Rl("title",{children:e}),Rl("desc",{children:t}),Rl("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),Rl("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"})]}),Eue=null;var Pl,un,DB;const Iue=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:s="112",height:o="112",className:r,focusable:a="false"})=>Pl("svg",{className:DB("i i-blockTemplateCheckMark",r),focusable:a,height:o,viewBox:"0 0 112 112",width:s,children:[un("title",{children:e}),un("desc",{children:t}),un("defs",{children:Pl("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[un("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),un("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),un("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"}),Pl("feMerge",{children:[un("feMergeNode",{in:"shadowMatrixOuter1"}),un("feMergeNode",{in:"SourceGraphic"})]})]})}),Pl("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[un("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"}),un("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),un("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"})]})]}),jue=null;var Q2,Ml,FB;const wue=({title:e="Folder Outline",desc:t="Outline of a folder",width:s="42",height:o="42",className:r,focusable:a="false"})=>Q2("svg",{className:FB("i i-blockTemplateFolder",r),focusable:a,height:o,viewBox:"0 0 42 42",width:s,children:[Ml("title",{children:e}),Ml("desc",{children:t}),Q2("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[Ml("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"}),Ml("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"})]})]}),Aue=null,HB=({width:e="17",height:t="15",title:s="Book",desc:o="Book",focusable:r="false",className:a})=>(0,n.jsxs)("svg",{className:a,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:s}),(0,n.jsx)("desc",{children:o}),(0,n.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 tm,wi,$B;const Pue=({title:e="Captions",desc:t="Two capital letter C inside a square",width:s="24",height:o="16",className:r,focusable:a="false"})=>tm("svg",{className:$B("i i-captions",r),focusable:a,height:o,viewBox:"0 0 24 16",width:s,children:[wi("title",{children:e}),wi("desc",{children:t}),tm("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[wi("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),tm("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[wi("tspan",{x:"4.222",y:"11.5",children:"C"})," ",wi("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),Mue=null;var VB,sm;const Oue=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>VB("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&sm("title",{children:i}),o&&sm("desc",{children:o}),sm("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"})]}),Bue=null;function Y2(e){return(0,n.jsx)(Gt,{viewBox:"0 0 11 8",...e,children:(0,n.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var zB,nm,UB;const Due=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="21",role:a="img",title:i,width:c="21"})=>zB("svg",{"aria-hidden":e,"aria-label":t,className:UB("i i-checkMarkFilled",s),focusable:"false",height:r,role:a,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&nm("title",{children:i}),o&&nm("desc",{children:o}),nm("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"})]}),Fue=null;var Z2,_B;function Hue(e){return Z2(_B,{viewBox:"0 0 7 5",...e,children:Z2("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 X2,GB;const $ue=({width:e="16",height:t="16",className:s,focusable:o="false"})=>X2("svg",{"aria-hidden":"true",className:GB("i i-chevronLeft",s),focusable:o,height:t,viewBox:"0 0 16 16",width:e,children:X2("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),Vue=null,WB=({className:e,dataTestId:t})=>(0,n.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,n.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),KB=({className:e})=>(0,n.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,n.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 QB,Vs;const _ue=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="18",role:a="img",title:i,width:c="18"})=>QB("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Vs("title",{children:i}),o&&Vs("desc",{children:o}),Vs("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),Vs("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),Vs("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),Gue=null;var YB,om,ZB;const Wue=({title:e="Copy",desc:t="A document stacked on top of another one",width:s="15",height:o="18",className:r=null,focusable:a="false"})=>YB("svg",{className:ZB("i i-stack",r),focusable:a,height:o,viewBox:"0 0 15 18",width:s,children:[om("title",{children:e}),om("desc",{children:t}),om("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"})]}),Kue=null;var XB,rm,qB;const Que=e=>{const{className:t,desc:s="Crop",focusable:o="false",height:r="19",title:a="Crop",width:i="19"}=e,c={className:qB("i i-crop",t),focusable:o,height:r,viewBox:`0 0 ${i} ${r}`,width:i};return XB("svg",{...c,children:[rm("title",{children:a}),rm("desc",{children:s}),rm("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"})]})},Yue=null;var JB,am,eD;const Zue=({"aria-hidden":e,"aria-label":t="Dash mark",className:s,desc:o,height:r="3",role:a="img",title:i,width:c="7"})=>JB("svg",{"aria-hidden":e,"aria-label":t,className:eD("i i-dashMark",s),focusable:"false",height:r,role:a,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&am("title",{children:i}),o&&am("desc",{children:o}),am("rect",{height:"3",width:"7"})]}),Xue=null,tD=({title:e="DestinationArrow",desc:t="DestinationArrow",width:s="13",height:o="10",className:r,focusable:a="false"})=>(0,n.jsxs)("svg",{className:X()("i i-destinationArrow",r),focusable:a,height:o,viewBox:"0 0 13 10",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.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 sD,Jue;class e0e extends null{render(){return sD("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 t0e=null;var q2,nD;const s0e=({width:e=20,height:t=20,...s})=>q2(nD,{height:t,width:e,...s,viewBox:"0 0 20 20",children:q2("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"})}),n0e=null;var oD,im,rD;const o0e=({title:e="Vertical Dots",desc:t="Vertical Dots",width:s="4",height:o="24",className:r=null,focusable:a="false"})=>oD("svg",{className:rD("i i-dotsVertical",r),focusable:a,height:o,viewBox:"0 0 4 24",width:s,children:[im("title",{children:e}),im("desc",{children:t}),im("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"})]}),r0e=null,aD=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:s="16",height:o="19",className:r,focusable:a="false"},i)=>(0,n.jsxs)("svg",{className:X()("i i-download",r),focusable:a,height:o,ref:i,viewBox:"0 0 16 19",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,n.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,n.jsx)("path",{d:"M7 0h2v12H7z"})]}),iD=(0,u.forwardRef)(aD);var cD,Ai,lD;const a0e=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:s="51",height:o="51",className:r,focusable:a="false"})=>cD("svg",{className:lD("i i-downloadCircle",r),focusable:a,height:o,viewBox:"0 0 51 51",width:s,children:[Ai("title",{children:e}),Ai("desc",{children:t}),Ai("g",{fill:"none",stroke:"none",children:Ai("g",{fill:"#000",transform:"translate(-695, -227)",children:Ai("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"})})})]}),i0e=null;var dD,Ri,uD;const c0e=({title:e="More",desc:t="Three dots next to one another",width:s="16",height:o="4",className:r=null,focusable:a="false"})=>dD("svg",{className:uD("i",r),focusable:a,height:o,viewBox:"0 0 16 4",width:s,children:[Ri("title",{children:e}),Ri("desc",{children:t}),Ri("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"}),Ri("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"}),Ri("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"})]}),l0e=null;var hD,cm,mD;const d0e=({title:e="Embed",desc:t="Embed icon",width:s="16",height:o="15",className:r,focusable:a="false"})=>hD("svg",{className:mD("i i-embed",r),focusable:a,height:o,viewBox:"0 0 16 15",width:s,children:[cm("title",{children:e}),cm("desc",{children:t}),cm("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"})]}),u0e=null;var fD,Ol,pD;const h0e=({title:e="Empty folder",desc:t="Empty folder",width:s="46",height:o="46",className:r,focusable:a="false"})=>fD("svg",{className:pD("i i-emptyFolder",r),focusable:a,height:o,viewBox:"0 0 46 46",width:s,children:[Ol("title",{children:e}),Ol("desc",{children:t}),Ol("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"}),Ol("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"})]}),m0e=null;var gD,Bl,vD;const f0e=({title:e="End Slide",desc:t="End Slide",width:s="16",height:o="14",className:r,focusable:a="false"})=>gD("svg",{className:vD("i i-end-slide",r),focusable:a,height:o,viewBox:"0 0 16 14",width:s,children:[Bl("title",{children:e}),Bl("desc",{children:t}),Bl("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"}),Bl("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),p0e=null;var J2,Dl,CD;const g0e=({title:e="Envelope",desc:t="Envelope",width:s="17",height:o="14",className:r,focusable:a="false"})=>J2("svg",{className:CD("i i-envelope",r),focusable:a,height:o,viewBox:"0 0 17 14",width:s,xmlns:"http://www.w3.org/2000/svg",children:[Dl("title",{children:e}),Dl("desc",{children:t}),J2("g",{fillRule:"nonzero",children:[Dl("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"}),Dl("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"})]})]}),v0e=null;var xD,Fl,bD;const C0e=({title:e="Error",desc:t="An x with a circle",width:s="50",height:o="50",className:r,focusable:a="false"})=>xD("svg",{className:bD("i i-error",r),focusable:a,height:o,viewBox:"0 0 50 50",width:s,children:[Fl("title",{children:e}),Fl("desc",{children:t}),Fl("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"}),Fl("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"})]}),x0e=null;var yD,Hl,SD;const b0e=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:s="18",height:o="18",className:r,focusable:a="false"})=>yD("svg",{className:SD("i i-errorAlert",r),focusable:a,height:o,viewBox:"0 0 18 18",width:s,children:[Hl("title",{children:e}),Hl("desc",{children:t}),Hl("circle",{cx:"9",cy:"9",r:"9"}),Hl("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"})]}),y0e=null,ex=({"aria-hidden":e,"aria-label":t="X mark",className:s,dataTestId:o="x-mark",desc:r,height:a="10",overrideStyle:i=!1,role:c="img",title:l,width:d="10"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()(s,{"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,n.jsx)("title",{children:l}),r&&(0,n.jsx)("desc",{children:r}),(0,n.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 TD,$l,LD;const T0e=({title:e="Export",desc:t="Export",width:s="12",height:o="15",className:r,focusable:a="false"})=>TD("svg",{className:LD("i i-export",r),focusable:a,height:o,viewBox:"0 0 12 15",width:s,children:[$l("title",{children:e}),$l("desc",{children:t}),$l("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),$l("rect",{height:"2",width:"10",x:"1",y:"12"})]}),L0e=null,tx=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,n.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,n.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,n.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,n.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),kD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,n.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,n.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,n.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"})]}),ND=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,n.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,n.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,n.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),ED=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,n.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,n.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,n.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),ID=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,n.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,n.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,n.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),jD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,n.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,n.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,n.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"})]}),wD=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="50",role:a="img",title:i="",width:c="40"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:s,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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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,n.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,n.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,n.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,n.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"})]}),sx=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:s="15",height:o="15",className:r,focusable:a="false"})=>(0,n.jsxs)("svg",{className:X()("i i-fillInTheBlank",r),focusable:a,height:o,viewBox:"0 0 15 15",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.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"})]});var AD,lm;const P0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>AD("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&lm("title",{children:i}),o&&lm("desc",{children:o}),lm("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"})]}),M0e=null;var RD,dm,PD;const O0e=({title:e="Hidden",desc:t="Eye crossed out",width:s="16",height:o="14",className:r=null,focusable:a="false"})=>RD("svg",{className:PD("i i-hidden",r),focusable:a,height:o,viewBox:"0 0 16 14",width:s,children:[dm("title",{children:e}),dm("desc",{children:t}),dm("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"})]}),B0e=null;var MD,Vl,OD;const D0e=({title:e="Label Set",desc:t="Label Set",width:s="17",height:o="17",className:r,focusable:a="false"})=>MD("svg",{className:OD("i i-labelSet",r),focusable:a,height:o,viewBox:"0 0 18 18",width:s,children:[Vl("title",{children:e}),Vl("desc",{children:t}),Vl("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"}),Vl("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"})]}),F0e=null;var BD,um;const H0e=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>BD("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&um("title",{children:i}),o&&um("desc",{children:o}),um("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"})]}),$0e=null;var DD,hm,FD;const V0e=({title:e="Matching",desc:t="Two rows of stacked squares",width:s="15",height:o="15",className:r,focusable:a="false"})=>DD("svg",{className:FD("i i-matching",r),focusable:a,height:o,viewBox:"0 0 15 15",width:s,children:[hm("title",{children:e}),hm("desc",{children:t}),hm("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"})]}),z0e=null;var HD,zl,$D;const U0e=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:s="16",height:o="16",className:r,focusable:a="false"})=>HD("svg",{className:$D("i i-multipleChoice",r),focusable:a,height:o,viewBox:"0 0 16 16",width:s,children:[zl("title",{children:e}),zl("desc",{children:t}),zl("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"}),zl("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),_0e=null;var VD,mm,zD;const G0e=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:s="16",height:o="16",className:r,focusable:a="false"})=>VD("svg",{className:zD("i i-multipleResponse",r),focusable:a,height:o,viewBox:"0 0 16 16",width:s,children:[mm("title",{children:e}),mm("desc",{children:t}),mm("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"})]}),W0e=null;var UD,Ul,_D;const K0e=({title:e="New Slide",desc:t="New Slide",width:s="16",height:o="16",className:r,focusable:a="false"})=>UD("svg",{className:_D("i i-new-slide",r),focusable:a,height:o,viewBox:"0 0 16 16",width:s,children:[Ul("title",{children:e}),Ul("desc",{children:t}),Ul("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),Ul("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"})]}),Q0e=null;var GD,fm,WD;const Y0e=({title:e="Next Slide",desc:t="Next Slide",width:s="16",height:o="13.4",className:r,focusable:a="false"})=>GD("svg",{className:WD("i i-next-slide",r),focusable:a,height:o,viewBox:"0 0 16 13.4",width:s,children:[fm("title",{children:e}),fm("desc",{children:t}),fm("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),Z0e=null;var KD,Pi,QD;const X0e=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:s="20",height:o="16",className:r,focusable:a="false"})=>KD("svg",{className:QD("i",r),focusable:a,height:o,viewBox:"0 0 20 16",width:s,children:[Pi("title",{children:e}),Pi("desc",{children:t}),Pi("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"}),Pi("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"}),Pi("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"})]}),q0e=null;var YD,pm,ZD;const J0e=({title:e="Edit",desc:t="Pencil",width:s="11",height:o="11",className:r,focusable:a="false"})=>YD("svg",{className:ZD("i i-pencil",r),focusable:a,height:o,viewBox:"0 0 10 10",width:s,children:[pm("title",{children:e}),pm("desc",{children:t}),pm("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"})]}),ehe=null;var XD,gm;const the=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="16",role:a="img",title:i,width:c="16"})=>XD("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&gm("title",{children:i}),o&&gm("desc",{children:o}),gm("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"})]}),she=null;var qD=p(61919),Cr=p.n(qD);class vm extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${Cr()()}`,this.pathId=`person-unknown-path-${Cr()()}`}render(){const{title:t="Person Unknown",desc:s,width:o="38",height:r="38",className:a,decorative:i,focusable:c="false"}=this.props;return(0,n.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,n.jsx)("title",{children:t}),s&&(0,n.jsx)("desc",{children:s}),(0,n.jsx)("defs",{children:(0,n.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,n.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,n.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,n.jsx)("use",{href:`#${this.pathId}`})}),(0,n.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,n.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 JD(e){return(0,n.jsxs)(Gt,{viewBox:"0 0 16 16",...e,children:[(0,n.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,n.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,n.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 eF,Cm;const nhe=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="15",role:a="img",title:i,width:c="16"})=>eF("svg",{"aria-hidden":e,"aria-label":t,className:s,focusable:"false",height:r,role:a,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Cm("title",{children:i}),o&&Cm("desc",{children:o}),Cm("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"})]}),ohe=null;function tF(e){return(0,n.jsx)(Gt,{viewBox:"0 0 23 17",...e,children:(0,n.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 nx,sF;const rhe=({width:e="16",height:t="16",className:s})=>nx("svg",{"aria-hidden":"true",className:sF("i i-search",s),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:nx("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"})}),ahe=null,ox=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:s="21",height:o="20",className:r,focusable:a="false"})=>(0,n.jsxs)("svg",{className:X()("i i-spinner",r),focusable:a,height:o,viewBox:"0 0 21 20",width:s,children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsx)("defs",{children:(0,n.jsxs)("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:[(0,n.jsx)("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),(0,n.jsx)("stop",{offset:"100%",stopColor:"#979797"})]})}),(0,n.jsx)("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)"})]});function nF(e){return(0,n.jsxs)(Gt,{viewBox:"0 0 15 16",...e,children:[(0,n.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,n.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 oF,xm,rF;const che=({title:e="Remove",desc:t="Trash can",width:s="10",height:o="13",className:r=null,focusable:a="false"})=>oF("svg",{className:rF("i i-trash",r),focusable:a,height:o,viewBox:"0 0 10 13",width:s,children:[xm("title",{children:e}),xm("desc",{children:t}),xm("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"})]}),lhe=null;var aF,Ca;const dhe=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="16",role:a="img",title:i,width:c="14"})=>aF("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Ca("title",{children:i}),o&&Ca("desc",{children:o}),Ca("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"}),Ca("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"}),Ca("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"}),Ca("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"})]}),uhe=null;var iF,_l,cF;const hhe=({title:e="Upload",desc:t="Upload icon",width:s="15",height:o="15",className:r="",focusable:a="false"})=>iF("svg",{className:cF("i",r),focusable:a,height:o,viewBox:"0 0 15 15",width:s,children:[_l("title",{children:e}),_l("desc",{children:t}),_l("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"}),_l("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"})]}),mhe=null;var lF,Mi;const fhe=({"aria-hidden":e,"aria-label":t,className:s,desc:o,height:r="14",role:a="img",title:i,width:c="14"})=>lF("svg",{"aria-hidden":e,"aria-label":t,className:s,fill:"none",focusable:"false",height:r,role:a,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[i&&Mi("title",{children:i}),o&&Mi("desc",{children:o}),Mi("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"}),Mi("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"}),Mi("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"})]}),phe=null;var dF,Gl,uF;const ghe=({title:e="UploadXml",desc:t="UploadXml",width:s="18",height:o="21",className:r,focusable:a="false"})=>dF("svg",{className:uF("i i-uploadXml",r),focusable:a,height:o,viewBox:"0 0 18 21",width:s,children:[Gl("title",{children:e}),Gl("desc",{children:t}),Gl("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"}),Gl("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"})]}),vhe=null;function hF(e){return(0,n.jsx)(Gt,{viewBox:"0 0 16 12",...e,children:(0,n.jsx)("g",{transform:"translate(-1 -2)",children:(0,n.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 rx,Wl,mF;const Che=({title:e="Visible",desc:t="Eye",width:s="16",height:o="12",className:r=null,focusable:a="false"})=>rx("svg",{className:mF("i i-visible",r),focusable:a,height:o,viewBox:"0 0 16 12",width:s,children:[Wl("title",{children:e}),Wl("desc",{children:t}),rx("g",{children:[Wl("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"}),Wl("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),xhe=null,fF=({"aria-hidden":e,"aria-label":t,className:s,desc:o="",height:r="20",role:a="img",title:i="",style:c,width:l="20"})=>(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()("i i-xMarkFilled",s),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,n.jsx)("title",{children:i}),o&&(0,n.jsx)("desc",{children:o}),(0,n.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"})]}),Oi=qs()("partner-content-course-author__"),pF=({partnerContentAuthors:e,darkText:t,isImage:s,learn:o,lesson:r,isOnePage:a,selectedContentId:i})=>{const c=fr()(qe()("id",i),e),l=Hn()(["data","authors"],c),h=(r?l:e).filter(g=>g.name),m=X()(Oi("author-container"),{[Oi("author-container-padding-top")]:t}),f=X()({[Oi("gray-text")]:!o&&!a}),v=X()(Oi("author-image")),C=g=>`url(${Ti({width:"76",height:"76",imageKey:g.image})})`;return(0,n.jsxs)("section",{children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,n.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(g=>(0,n.jsxs)("li",{className:Oi("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,n.jsx)("div",{"aria-hidden":"true",className:v,"data-testid":"partner-content-course-author-image",disabled:s,style:{backgroundImage:C(g)}}),(0,n.jsx)("span",{className:f,children:g.name})]},g.name))})]})};function gF(e){return e.partnerContent}function vF(){return le(gF)}function ax(e){return e?.partnerContent?.content??[]}function Bi(){return le(ax)}const ix=(0,Ve.Mz)(e=>ns(e)?.selectedAuthorId,ax,(e,t)=>t.find(s=>s.id===e)),CF=(0,Ve.Mz)(e=>ns(e)?.partnerContentId,ix,(e,t)=>e?t:void 0);function xF(){return le(ix)}function Di(){return le(CF)}function bF(){const e=xF();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function yF(){return Bi()?.[0]?.data?.authors}const xa=$("cover"),She=()=>{const e=dh();if(e==null)return null;const{avatar:t,authorName:s,title:o}=e;return(0,n.jsxs)("div",{className:xa("author-with-title"),children:[(0,n.jsx)(cx,{avatar:t}),(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:xa("author-name"),children:s}),(0,n.jsx)("div",{className:xa("author-title"),children:o})]})]})},cx=({avatar:e})=>{const t=xa("header-content-authors-avatar");return e?(0,n.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${mt(e)})`}}):(0,n.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,n.jsx)(vm,{decorative:!0})})},SF=({className:e})=>{const{partnerContentId:t,selectedAuthorId:s,theme:o,themeId:r}=re(),{coverPageType:a}=o??{},{authorName:i,avatar:c}=dh()??{},l=Ce(),d=bF(),h=!!t&&d!=null,f=Lt(768)&&DI(r,a),v=a===ce.LEFT_OVERLAY||a===ce.CENTERED_OVERLAY||f;if(s==="none")return null;const C=i||"Unknown User",g=xa("header-content-authors").mix(e),x=xa("header-content-authors-name");return h?(0,n.jsx)("div",{className:g,"data-testid":"cover-authors",children:(0,n.jsx)(TF,{isImage:v,learn:!0,partnerContentAuthors:d})}):(0,n.jsxs)("div",{className:g,"data-testid":"cover-authors",children:[(0,n.jsx)(cx,{avatar:c}),(0,n.jsxs)("div",{className:x,"data-testid":"cover-header-content-authors-name",children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:l?.a11yAuthorPrefix}),(0,n.jsx)("span",{children:C})]})]})},TF=pF,En=Oe("CoverAuthors",SF),LF=$("cover"),zs=Oe("CoverContentNoImage",({children:e})=>{const t=LF("header-content");return(0,n.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})}),xr=e=>{const t=Fe(),s=jt();return kF(t,e,s)},kF=(e,t,s)=>{const{media:o,alpha:r}=t==="coverImage"?Mg(e,s):Og(e,s),a="image"in o?jg(o?.image?.alt):void 0;return{alpha:r,ariaLabel:a,media:o,role:wg(a)}},NF=$("cover"),bm=()=>{const e=bC(),{alpha:t,ariaLabel:s,media:o,role:r}=xr("coverImage"),a=NF("header-image"),i=na({alpha:t,color:e,media:o});return(0,n.jsx)("div",{"aria-label":s,className:a,role:r,style:i??void 0})},EF=$("cover"),ym=({children:e})=>{const t=bC(),s=`overlay-${t.toLowerCase()}`,o=EF("header-content",{[s]:!!t});return(0,n.jsxs)("div",{className:o,"data-testid":"cover-header-content",children:[e,(0,n.jsx)(bm,{})]})},IF=$("cover"),Fi=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:s,media:o,role:r}=xr("coverImage"),a=na({alpha:t,hasOverlay:e,media:o}),i=IF("header-graphic",{"dot-com":!1});return(0,n.jsx)("div",{"aria-label":s,className:i,"data-testid":"cover-header-graphic",role:r,style:a??void 0})},jF=$("cover");function is({children:e}){const t=!!Di(),s=jF("header-content-info",{rbc:t,"rise-com":!1});return(0,n.jsx)("div",{className:s,"data-testid":"cover-header-content-info",children:e})}const lx=At("AlignLeft"),Kl=At("ArrowDown"),Sm=At("ArrowRight"),dx=At("ArrowUp"),wF=At("Category"),AF=At("ChevronDown"),RF=At("ChevronUp"),PF=At("LessonsComplete"),MF=At("LessonsRequirement"),OF=At("QuestionBox"),BF=At("QuizFailed"),DF=At("QuizPassed"),FF=At("QuizRequirement"),Hi=At("Search"),ux=At("ToggleDown"),HF=At("Touch"),$F=At("VideoCamera"),Ql=At("X"),VF=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},Ehe=(e,t)=>{const s=VF(e);return t.find(({iso639Code:o})=>o===e)||t.find(({iso639Code:o})=>o===s)||t.find(({defaultId:o,defaultSet:r})=>r&&o===1)},ba=({percent:e,label:t,isRTL:s})=>{if(t.includes("%")){const o=s?`%${e}`:`${e}%`;return t.replace("%",o)}return`${e} ${t}`},br=$("cover"),zF=Oe("CoverProgress",({percentComplete:e})=>{const t=on(),s=Ce(),o=QC();return e===0||window.isPublicShare,null;const r=ba({percent:e,label:s.progressSummaryPercentComplete,isRTL:t});return(0,n.jsxs)("div",{className:br("progress"),children:[(0,n.jsx)("div",{className:br("progress-text"),children:r}),(0,n.jsx)("div",{className:br("progress-outer"),children:(0,n.jsx)("div",{className:br("progress-inner"),style:{width:`${e}%`}})}),o&&(0,n.jsxs)("div",{className:br("progress-next-lesson"),children:[(0,n.jsx)(Sm,{className:br("progress-next-lesson-icon").toString(),decorative:!0}),(0,n.jsx)("span",{"aria-hidden":"true",className:br("progress-next-lesson-text"),children:o}),(0,n.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",o]})]})]})});function Dt(){const e=ra();return(0,n.jsx)(zF,{percentComplete:e})}const UF=$("cover"),cs=Oe("CoverTitle",()=>{const e=re(),t=Ae(e.title),s=UF("header-content-title"),o=ga("title"),r=(0,_t.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":o};return(0,n.jsx)("h1",{...r,className:s,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})}),_F={SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"};function hx(){const e=re(),t=qO(),s=e?.theme?.coverPageType||"CENTERED";return t?_F[s]??s:s}const GF=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ym,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(Dt,{}),(0,n.jsx)(as,{})]})})}),WF=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(Dt,{}),(0,n.jsx)(as,{})]})})}),KF=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Fi,{}),(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(Dt,{}),(0,n.jsx)(as,{})]})})]}),QF=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(Dt,{}),(0,n.jsx)(as,{})]})}),(0,n.jsx)(Fi,{})]});function YF(){switch(hx()){default:case ce.LEFT_OVERLAY:case ce.CENTERED_OVERLAY:return(0,n.jsx)(GF,{});case ce.LEFT:case ce.CENTERED:return(0,n.jsx)(WF,{});case ce.SPLIT_LEFT_IMAGE:case ce.TWO_THIRDS_LEFT_IMAGE:return(0,n.jsx)(QF,{});case ce.SPLIT_RIGHT_IMAGE:case ce.TWO_THIRDS_RIGHT_IMAGE:return(0,n.jsx)(KF,{})}}function ZF(){return(0,n.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,n.jsx)(YF,{})})}var XF=p(82920);const qF=$("cover");function JF({children:e}){const t=re(),{themeId:s}=t?.theme??{},o=hx(),r=XF.useMemo(()=>da()(o),[o]),a=qF({layout:r});return(0,n.jsx)("div",{className:a,"data-testid":`cover-layout-${r}`,"data-theme-id":s,id:"cover",children:e})}const Yl=$("lesson-header"),Zn=Oe("LessonHeaderAuthor",({avatar:e,authorName:t,className:s=""})=>{const o=Ce();return(0,n.jsxs)("div",{className:Yl("author").mix(s),children:[(0,n.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?mt(e):void 0}),(0,n.jsx)("span",{className:"visually-hidden-always",children:o?.a11yAuthorPrefix}),(0,n.jsx)("span",{className:"lesson-header__author-name",children:t})]})}),Zl=({showPartnerContent:e=!1})=>(0,n.jsx)("div",{className:Yl("author",{"partner-content":e})}),Xn=()=>(0,n.jsx)("div",{className:"lesson-header__counter"}),qn=({lessonName:e,lessonPreposition:t,totalLessons:s,lessonNumber:o,showPartnerContent:r=!1})=>{const{lmsOptions:a}=re();return(0,n.jsx)("div",{className:Yl("counter",{"partner-content":r}),children:(0,n.jsx)("div",{className:Yl("count",{"exit-button-enabled":a?.enableExitCourse}),children:`${e} ${o} ${t} ${s}`})})},ya=({description:e})=>(0,n.jsx)(ke,{className:"lesson-header__description",value:e}),eH=({children:e})=>(0,n.jsx)("div",{className:"lesson-header__grouped-row",children:e}),tH=({ariaLabel:e,imgRole:t,children:s,sectionStyles:o,topWrapClassName:r})=>(0,n.jsxs)("header",{className:"page__header",children:[(0,n.jsx)("div",{className:"page__header-limit",children:(0,n.jsx)("div",{className:"page__header-container",children:(0,n.jsx)("div",{className:"lesson-header__row",children:(0,n.jsx)("div",{className:"lesson-header__main",children:(0,n.jsx)("div",{className:"lesson-header",children:(0,n.jsx)("div",{className:r,children:s})})})})})}),(0,n.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:o})]}),Jn=({title:e,id:t})=>{const s=P2(t,"title");return(0,n.jsx)("h1",{className:"lesson-header__title","data-change-path":s,tabIndex:-1,children:(0,n.jsx)(ke,{value:e})})},Ro=$("lesson-header"),mx=e=>`url(${Ti({width:76,height:76,imageKey:e.image})})`,Tm=({partnerContentAuthors:e})=>{const t=e.map(o=>o.name).join(", "),s=e.length===1;return(0,n.jsxs)("div",{className:Ro("partner-content",{mobile:!0}),children:[(0,n.jsx)("div",{className:Ro("partner-content-author",{single:s}),children:e.map(o=>(0,n.jsx)("div",{className:Ro("partner-content-author-img",{single:s}),style:{backgroundImage:mx(o)}},o.name))}),(0,n.jsx)("span",{"aria-hidden":"true",className:Ro("author-name"),children:t})]})},Sa=({partnerContentAuthors:e})=>{const t=Ce();return(0,n.jsx)("div",{className:Ro("partner-content"),children:e.map(s=>(0,n.jsxs)("div",{className:Ro("partner-content-author"),children:[(0,n.jsx)("div",{className:Ro("partner-content-author-img"),style:{backgroundImage:mx(s)}}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",s.name]}),(0,n.jsx)("span",{"aria-hidden":"true",className:Ro("author-name"),children:s.name})]})]},s.name))})};var fx=p(82920);const Ta=$("lesson-header"),sH=({authorName:e,avatar:t,description:s,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,n.jsxs)("div",{className:Ta("content"),children:[C&&(0,n.jsxs)("div",{className:Ta("info-row"),children:[v?(0,n.jsx)(Zn,{authorName:e,avatar:t}):(0,n.jsx)(Zl,{}),f&&(0,n.jsx)(Sa,{partnerContentAuthors:i}),g&&(0,n.jsx)("span",{"aria-hidden":"true",className:Ta("info-row--divider"),children:"|"}),l?(0,n.jsx)(qn,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Xn,{})]}),(0,n.jsxs)("div",{className:Ta("title-wrapper",{"no-info":!C}),children:[(0,n.jsx)(Jn,{id:m,title:d}),s&&(0,n.jsx)(ya,{description:s})]})]})},nH=({authorName:e,avatar:t,description:s,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=fx.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,n.jsxs)("div",{className:Ta("content"),children:[l?(0,n.jsx)(qn,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Xn,{}),v&&(0,n.jsx)(Zn,{authorName:e,avatar:t}),c&&f&&(0,n.jsx)(Tm,{partnerContentAuthors:i}),(0,n.jsx)(Jn,{id:m,title:d}),s&&(0,n.jsx)(ya,{description:s})]})},oH=({authorName:e,avatar:t,description:s,lessonName:o,lessonNumber:r,lessonPreposition:a,partnerContentAuthors:i,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=i!=null,v=fx.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,n.jsxs)("div",{className:Ta("content"),children:[l?(0,n.jsx)(qn,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Xn,{}),(0,n.jsx)(Jn,{id:m,title:d}),v?(0,n.jsx)(Zn,{authorName:e,avatar:t}):(0,n.jsx)(Zl,{showPartnerContent:f}),c&&f&&(0,n.jsx)(Sa,{partnerContentAuthors:i}),s&&(0,n.jsx)(ya,{description:s})]})};function rH(e){const t=Wh();return e.lessonHeaderSize===ui.SMALL&&!t?(0,n.jsx)(sH,{...e}):t?(0,n.jsx)(nH,{...e}):(0,n.jsx)(oH,{...e})}const La=e=>e===Vn.FLOATING||e===Vn.FLOATING_FULL;function yr(){const e=sI();return Lt(480)&&e===Vn.FLOATING?Vn.FLOATING_FULL:e}function Lm({className:e,ref:t}){return(0,n.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,n.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,n.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function px({className:e,ref:t}){return(0,n.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,n.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function aH(e){const{to:t,children:s}=e,o=(0,we.zy)(),r=(0,u.useMemo)(()=>s0(t,o),[o,t]);return(0,n.jsx)(we.k2,{...e,to:r,children:s})}var Je=p(59928);const gx="focus-lesson-content",Rhe="preview-nav-to-first-lesson",Phe="preview-nav-to-cover-page",Ge="preview-nav-to-lesson-item",Mhe="preview-scroll-to-nav-prev",Ohe="preview-scroll-to-header",km="preview-clear-state",Xl="preview-show-nav-prev",ql="preview-show-nav-next",vx="preview-nav-open",Cx="preview-nav-close",xx="event-lesson-transition-start",bx="event-lesson-transition-end",yx="event-lesson-nav-prev-visible",Nm="event-lesson-nav-prev-hidden",Sx="event-lesson-nav-next-visible",Em="event-lesson-nav-next-hidden",Im=new WeakMap,Tx=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)Im.get(t.target)?.(t)})});function Jl(e,t){(0,u.useEffect)(()=>{if(e)return Im.set(e,t),()=>Im.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return Tx.observe(e),()=>Tx.unobserve(e)},[e])}function iH(){const e=rt(),[t,s]=(0,u.useState)(null),o=Ce(),r=(0,u.useCallback)(a=>{a.target instanceof HTMLElement&&e(W0({offsetHeight:a.target.offsetHeight}))},[e]);return(0,u.useLayoutEffect)(()=>{if(t)return e(W0({offsetHeight:t.offsetHeight})),()=>{e(W0(null))}},[e,t]),Jl(t,r),(0,n.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:Lx,ref:s,type:"button",children:(0,n.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[o?.courseSkipToLesson,(0,n.jsx)(ie,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}function cH(e){(0,Je.A)(gx,e,document)}function Lx(){document.dispatchEvent(new CustomEvent(gx))}function ed(e,t){const s=[];if(e){let o=e.parentElement;for(;o&&(t?.limit==null||s.length<t.limit);){if(o===document.body){s.push(window);break}const r=window.getComputedStyle(o);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&s.push(o),o=o.parentElement}}return s}function kx(e){return ed(e,{limit:1})[0]??null}function Nx(e,t){(0,u.useLayoutEffect)(()=>{let s=e.current;const o=ed(s);for(const r of o)r?.addEventListener("scroll",t);return()=>{for(const r of o)r?.removeEventListener("scroll",t)}},[t,e])}const Ex=(0,u.createContext)(!1);function td({children:e,inert:t}){const s=jm();return(0,n.jsx)(Ex.Provider,{value:s||t,children:e})}function jm(){return(0,u.useContext)(Ex)}function lH(e){return e?.sessionPreferences}function $i(){return le(lH)}const dH=(0,u.forwardRef)((e,t)=>{const{children:s,className:o="lesson-link-item-tooltip",dark:r,visible:a}=e,i=(0,u.useMemo)(()=>$(o),[o]),c=(0,n.jsx)("div",{"aria-hidden":"true",ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,n.jsx)("div",{style:{pointerEvents:"all"},children:(0,n.jsx)("div",{className:i({visible:a}),children:(0,n.jsx)("div",{className:i("inner",{dark:r,light:!r}),children:s})})})});return(0,Nn.createPortal)(c,document.getElementById("portal"))});function Ix(e){const{children:t,className:s,dark:o,restriction:r,tooltipClassName:a,style:i}=e,{prefersKeyboardNavigation:c}=$i()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=Ce(),f=jm(),[v,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),x=(0,u.useCallback)(()=>C(!1),[]),y=(0,u.useCallback)(()=>{setTimeout(g,0)},[g]),T=(0,u.useCallback)(()=>{c===!0&&x()},[x,c]),S=(0,u.useCallback)(j=>{gs(j)&&v&&(j.stopPropagation(),x())},[x,v]),b=(0,u.useCallback)(()=>{document.activeElement===l.current&&(h.current!=null&&clearTimeout(h.current),g())},[g]),L=(0,u.useCallback)(()=>{h.current=setTimeout(x,150)},[x]),N=(0,u.useCallback)(()=>{if(v&&l.current&&d.current){const j=l.current.getBoundingClientRect(),A=d.current.offsetParent?.getBoundingClientRect()??j,{height:I,width:w}=j,O=j.left-A.left,R=j.top-A.top;Object.assign(d.current.style,{transform:`translate(${O}px, ${R}px)`,width:`${w}px`,height:`${I}px`})}},[v]);(0,u.useEffect)(()=>{f&&C(!1)},[f]),(0,u.useLayoutEffect)(()=>N(),[N]),(0,Je.A)("resize",N,window),(0,Je.A)("keydown",S,document),Nx(l,x);const k=at(r?.data);let E;return r?.type===Qr.QUIZ?E=`${m?.quizRequirePassingScore}: "${k}"`:r?.type===Qr.ORDER?E=m?.lessonRestricted:r?.type===Qr.KNOWLEDGE_CHECK&&(E=m?.knowledgeCheckCorrectAnswerRequiredNav),(0,n.jsxs)("div",{"aria-disabled":!0,className:s,onBlur:T,onFocus:y,onMouseEnter:b,onMouseLeave:L,ref:l,role:"link",style:i,tabIndex:f?-1:0,children:[t,(0,n.jsx)("div",{className:"visually-hidden-always",children:m?.a11yRestrictedNav}),(0,n.jsx)("div",{className:"visually-hidden-always",children:E}),(0,n.jsx)(dH,{className:a,dark:o,ref:d,visible:v,children:E})]})}function uH(e){const{b:t,children:s,"data-direction":o,isCurrentLesson:r,isTooltipEnabled:a,lessonId:i,onClick:c=()=>{},onFocus:l,onHideProgressTooltip:d,onNavigate:h=()=>{},onShowProgressTooltip:m,restriction:f,showProgressDelay:v,style:C}=e,g=jm(),T=(re()?.theme?.progressIndicatorStyle??et.THEME_DEFAULT)===et.THEME_DEFAULT,S=(0,u.useCallback)(w=>{c(w),r?(w.preventDefault(),Lx()):h(i)},[i,r,c,h]),[b,L]=(0,u.useState)(!1),N=(0,u.useCallback)(w=>{!b&&a&&(v!=null?setTimeout(()=>m?.(),v):m?.()),l?.(w)},[b,l,v,m,a]),k=(0,u.useCallback)(w=>{a&&gs(w)&&d?.()},[d,a]),E=(0,u.useCallback)(()=>{a===!0&&L(!0)},[a]),j=(0,u.useCallback)(()=>{a===!0&&L(!1)},[a]),A=f?.type!=null,I=t("link",{active:r,restricted:A,"theme-default":T}).toString();return A?(0,n.jsx)(Ix,{className:I,dark:e.dark,restriction:f,style:C,tooltipClassName:e.tooltipClassName,children:s}):(0,n.jsx)(aH,{"aria-current":"page",className:I.toString(),"data-direction":o,"data-nav-item":"",onBlur:a?d:void 0,onClick:S,onFocus:N,onKeyDown:k,onMouseDown:E,onMouseUp:j,style:C,tabIndex:g?-1:void 0,to:ks(i),children:s})}function Vi(e){const{className:t="lesson-link-item",isCurrentLesson:s,last:o,lessonId:r,style:a}=e,i=(0,u.useMemo)(()=>$(t),[t]),c=Ni(r),l=c?.type!=null,{isComplete:d=!1}=Io(r)??{},h=i({active:s,complete:d,last:o,restricted:l});return(0,n.jsx)("div",{className:h,children:(0,n.jsx)(uH,{...e,b:i,isCurrentLesson:s,restriction:c,style:a})})}const hH=$("lesson-nav");function mH(e){const{children:t,finish:s,lessonId:o,onFocus:r}=e,a=qt();if(o)return(0,n.jsx)(Vi,{className:"lesson-nav-link","data-direction":e["data-direction"],lessonId:String(o),onFocus:r,tooltipClassName:"lesson-nav-link-tooltip",children:t});const i=s?Kg:"/",c=l=>{l.preventDefault(),Yn(()=>{a(i)},i==="/"?"lesson-to-cover":"default")};return(0,n.jsx)("span",{className:"lesson-nav-link",children:(0,n.jsx)(rs,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:c,onFocus:r,to:i,children:t})})}function ka({children:e,className:t,direction:s,finish:o,navLessonId:r,onFocus:a,ref:i,restrictionType:c}){const d=mr()?.theme?.buttonScheme,h=c!=null,m=yr(),v={className:hH(null,{[s]:!0,accent:d===hi.ACCENT,dark:d===hi.DARK,floating:m===Vn.FLOATING,"floating-full":m===Vn.FLOATING_FULL,finish:o,full:m===Vn.FULL,light:d===hi.LIGHT,restricted:h,tint:d===hi.TINT}).mix(t),[`data-${s}-lesson`]:!0};return(0,n.jsx)("div",{ref:i,...v,children:(0,n.jsx)(mH,{"data-direction":s,finish:o,lessonId:r,onFocus:a,children:e})})}const jx=$("lesson-nav");function fH({allowTooltip:e,courseFinishLabel:t,onFocus:s,nextLesson:o,restrictionData:r,restrictionType:a,ref:i}){const c=o?.id,l=yr(),d=La(l),h=d?Lm:px;return(0,n.jsxs)(ka,{allowTooltip:e,direction:"next",finish:!0,isFloating:d,navLessonId:c,onFocus:s,ref:i,restrictionData:r,restrictionType:a,children:[(0,n.jsx)("span",{className:jx("link-text").mix("brand--ui"),children:t}),(0,n.jsx)(h,{className:jx("link-icon")})]})}const wx=$("lesson-nav");function pH({allowTooltip:e,lessonNameLabel:t,nextLesson:s,nextLessonNumber:o,onFocus:r,ref:a,restrictionData:i,restrictionType:c}){const l=s?.id,d=yr(),h=La(d),f=Yr(s)&&l,v=Ae(s?.title)||"",C=h?Lm:px,g=f?`${t} ${o} - `:"",x=h&&f?`${t} ${o}`:`${g}${v}`;return(0,n.jsxs)(ka,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:a,restrictionData:i,restrictionType:c,children:[(0,n.jsx)("span",{className:wx("link-text").mix("brand--ui"),children:x}),(0,n.jsx)(C,{className:wx("link-icon")})]})}function Ax({className:e,ref:t}){return(0,n.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,n.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,n.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function gH({className:e,ref:t}){return(0,n.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,n.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const sd=$("lesson-nav");function vH({allowTooltip:e,className:t,courseHomeLabel:s,lessonNameLabel:o,onFocus:r,previousLesson:a,previousLessonNumber:i,ref:c}){const l=a?.id,d=yr(),h=La(d),f=Yr(a)&&l,v=Ae(a?.title)||s,C=h?Ax:gH,g=f?`${o} ${i} - ${v}`:v,x=f&&h?`${o} ${i}`:g;return(0,n.jsx)(ka,{allowTooltip:e,className:t,direction:"previous",isFloating:h,navLessonId:l,onFocus:r,ref:c,children:h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:sd("link-text").mix("brand--ui"),children:x}),(0,n.jsx)(C,{className:sd("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(C,{className:sd("link-icon")}),(0,n.jsx)("span",{className:sd("link-text").mix("brand--ui"),children:x})]})})}var Me=p(70547);function CH({className:e,cx:t,cy:s,diameter:o,onTransitionEnd:r,r:a,strokeLinecap:i,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,E1.A)()}`,m=(100-l)/100*(2*a);return(0,Je.A)("transitionend",r,d.current),(0,n.jsxs)("svg",{height:o,viewBox:`0 0 ${o} ${o}`,width:o,children:[(0,n.jsx)("defs",{children:(0,n.jsx)("mask",{id:h,children:(0,n.jsx)("rect",{fill:"white",height:2.3*a,width:2.3*a,x:"0",y:l===0?100:m})})}),(0,n.jsx)("circle",{className:e,cx:t,cy:s,fill:"none",mask:`url(#${h})`,r:a,ref:d,strokeLinecap:i,strokeWidth:c})]})}const wm=CH;function xH({className:e,cx:t,cy:s,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,Je.A)("transitionend",r,h.current),(0,n.jsx)("circle",{className:e,cx:t,cy:s,fill:"transparent",r:a,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:i,strokeWidth:c,transform:l})}const Rx=xH;var Am=p(82920);const{COMPACT:bH,COVER:yH,OVERLAY:SH,SIDEBAR:TH}=Co,zi=$("progress-circle");function LH({"aria-hidden":e,"aria-label":t,isCurrent:s,isFailed:o,isPassed:r,scope:a,value:i}){const[c,l]=Am.useState(i===100),d=(0,Me.A)(i),{theme:h}=re()??{},m=h?.progressIndicatorStyle??et.THEME_DEFAULT,f=a===yH,v=a===SH,C=m===et.THEME_DEFAULT,g=m===et.CIRCULAR_FILL,x=m===et.INCOMPLETE_COMPLETE,y=zi({compact:a===bH,cover:f,current:s,sidebar:a===TH,overlay:v}),T=zi("track",{"circular-fill":!v&&g,"incomplete-complete":f&&x}),S=zi("runner",{"circular-fill":g,done:c,failed:o,passed:r,unstarted:i===0}),b=zi("pass",{done:c,visible:r}),L=zi("fail",{done:c,visible:o}),N=Am.useMemo(()=>g||i===100?i:0,[g,i]);return Am.useEffect(()=>{if(i!==100&&d===100)l(!1);else if(i===100&&!c&&!x){const k=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,k)}else i===100&&!c&&x&&l(!0)},[c,x,d,i]),(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:y,fill:"none",focusable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:T,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),C?(0,n.jsx)(Rx,{className:S,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:i}):(0,n.jsx)(wm,{className:S,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:N}),(0,n.jsx)("path",{className:b,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,n.jsx)("path",{className:L,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"})]})}const Rm=(0,u.createContext)({isCourseNavOpen:!1});Rm.displayName="CourseNavigationContext";function kH(e){const{children:t,isCourseNavOpen:s}=e;return(0,n.jsx)(Rm.Provider,{value:{isCourseNavOpen:s},children:t})}function NH(){return(0,u.useContext)(Rm)}var EH;function Pm(){return document.getElementById("page-wrap")}const Bhe=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},Dhe=e=>{const t=EH(["current","editor"],e);if(!t)return null;const s=t.value.length;return t.focus(),t.setSelectionRange(s,s),e};function Mm(e,t){const s=e.getBoundingClientRect(),o=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return s.top>=0;if(t==="center"){if(s.height>o)return s.top<=0&&s.bottom>=o;const a=o/2,i=s.top+s.height/2,c=o*.25;return Math.abs(a-i)<c}return t==="end"?s.bottom<=o:s.top>=0&&s.left>=0&&s.bottom<=o&&s.right<=r}function IH(e,{behavior:t="smooth",offsetTop:s=0}={}){const o=kx(e);if(!o||!("getBoundingClientRect"in o)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-s),behavior:t})}else{const r=o.getBoundingClientRect().top,a=e.getBoundingClientRect().top-r,i=Math.max(0,o.scrollTop+a-s);o.scrollTo({top:i,behavior:t})}}function Fhe(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function Px({anchor:e,popover:t,positionX:s}){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(s==="center"){const f=o.left+o.width/2;m=a?d.width-f-l/2:f-l/2}else s==="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}}const jH=10;function wH(){const e=(0,u.useRef)(null),[t,s]=(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;s(h=>h===d?h:d)},a=setTimeout(()=>{o=Pm(),o?.addEventListener("scroll",r,{passive:!0})},jH);return()=>{clearTimeout(a),o?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const AH=960;function Ui(){return Lt(AH)}function RH(){const e=Fe(),t=Ui(),s=oh();return MI({course:e,isMobile:t,search:s})}function PH(){const e=Fe(),t=Ui();return OI({course:e,isMobile:t})}const Mx=$("progress"),MH=$("lesson-progress-wrapper"),OH=()=>!!document.querySelector(".lesson--preview"),BH=({items:e,lessonProgress:t})=>{const s=t.activeIndex??-1,o=e?.length??0;return s===-1?0:s+1===o?100:e?.[s]?.linePosition?.replace("%","")??"0"},DH=({items:e,lessonProgress:t})=>{const s=t.activeIndex??0,o=e?.length??0;return s>o?100:Math.round(s/o*100)},FH=e=>{const{lessonProgress:t,type:s}=e;switch(s){case"process":return DH(e);case"sorting":return t.percentViewed??0;case"timeline":return BH(e);default:return t.percentComplete??0}},HH=e=>{const{type:t,items:s,sidebarAvailable:o,isCourseNavOpen:r,isMobile:a}=e,{isSticky:i,refProgressWrap:c}=wH(),[l]=(0,u.useState)(Ao),d=r,h=r&&a,m=OH(),f=MH({visible:i&&!h}).mix(d&&o&&!m?"lesson--open":"").mix(o&&h&&!m?"lesson--open-mobile":"").toString(),v=Mx({timeline:t==="timeline",video:t==="video"}).toString(),C=FH(e),g=t==="timeline"&&s&&s.map(y=>{const T=parseInt(String(C))>=parseInt(y.linePosition.slice(0,-1)),S=Mx("marker",{active:T}).mix(T?"brand--background":"").toString();return(0,n.jsx)("div",{className:S,style:{left:y.linePosition}},y.id)}),x=(0,n.jsx)("div",{className:"progress-wrap",children:(0,n.jsx)("div",{className:v,children:(0,n.jsxs)("div",{className:"progress__container",children:[(0,n.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${C}% * var(--dir-x)),0px,0px)`}}),g]})})});return(0,n.jsxs)("div",{ref:c,children:[x,(0,Nn.createPortal)((0,n.jsx)("div",{"aria-hidden":"true",className:f,children:x}),l)]})},$H=e=>{const t=RH(),{isCourseNavOpen:s}=NH(),o=Lt(480);return(0,n.jsx)(HH,{...e,isCourseNavOpen:s,isMobile:o,sidebarAvailable:t})},VH=ma,zH=ma,UH=ma,_H=ma,GH=ma,WH=ma;function kt({children:e,className:t,height:s,width:o,viewBox:r}){return(0,n.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:s,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e})}function KH(e){return(0,n.jsxs)(kt,{viewBox:"0 0 24 24",...e,children:[(0,n.jsx)("path",{d:"M1 10.9609L10 19.9609",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("path",{d:"M1 11.9609L10 2.96094",stroke:"currentColor",strokeWidth:"1.5"}),(0,n.jsx)("path",{d:"M2 11.5H23",stroke:"currentColor",strokeWidth:"1.5"})]})}function QH({className:e}){return(0,n.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,n.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 YH(e){return(0,n.jsx)(kt,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,n.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 ZH(e){return(0,n.jsx)(kt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,n.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function XH(e){return(0,n.jsx)(kt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,n.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function qH(e){return(0,n.jsxs)(kt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,n.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,n.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,n.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 Ox(e){const t=Mt(e,["Default"]);return(0,n.jsx)(Gt,{...t,fill:"none",viewBox:"1 1 18 18",children:(0,n.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 nd(e){const t=Mt(e,["Default"]);return(0,n.jsxs)(Gt,{...t,fill:"none",viewBox:"0 0 18 18",children:[(0,n.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,n.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function JH(e){return(0,n.jsx)(kt,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,n.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 e$(e){return(0,n.jsx)(kt,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,n.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 t$(e){return(0,n.jsxs)(kt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,n.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,n.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 s$(e){return(0,n.jsxs)(kt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,n.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,n.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 n$(e){return(0,n.jsx)(kt,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,n.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 Om=({className:e,decorative:t=!0,desc:s="Heart",focusable:o="false",height:r="16",isFilled:a=!0,title:i="Heart",width:c="16"})=>(0,n.jsxs)("svg",{"aria-hidden":t,className:X()(`i i-heart${a?"Filled":"Outline"}`,e),focusable:o,height:r,viewBox:"0 0 16 16",width:c,children:[(0,n.jsx)("title",{children:i}),(0,n.jsx)("desc",{children:s}),(0,n.jsx)("path",{d:"M11.15 1C9.838 1 8.7 1.7 8 2.75 7.3 1.7 6.162 1 4.85 1 2.75 1 1 2.75 1 4.85c0 3.85 7 9.538 7 9.538S15 8.7 15 4.85C15 2.75 13.25 1 11.15 1"})]}),Bx=({title:e="Pick One",desc:t="Pick One",width:s="16",height:o="14",className:r,focusable:a="false","aria-hidden":i})=>(0,n.jsxs)("svg",{"aria-hidden":i,className:X()("i i-pickOne",r),focusable:a,height:o,viewBox:"0 0 16 14",width:s,xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:e}),(0,n.jsx)("desc",{children:t}),(0,n.jsxs)("g",{fillRule:"evenodd",children:[(0,n.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,n.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),o$=$("cover"),od=Oe("CoverDetailsSection",({children:e,type:t})=>(0,n.jsx)("section",{className:o$("details-content-section",{type:t}),children:e})),Bm=e=>Ns(e)===be.LIGHT;var Uhe;const ls=qs()("partner-content-book-info__"),Dx=e=>{const{authors:t,backgroundColor:s,bookImage:o,bookTitle:r,buyLink:a,block:i,trackingInfo:c}=e,d=Fe()?.publishedAt,h=b2(),m=t.filter(E=>!Nt()(E.name)),f=ft()(E=>E.name,m),v=f.length>1?Xr()(" & ",f):f[0],C=v.slice(-1)==="s"?"":"s",g=Bm(s),x=X()({[ls("book-image-block")]:i&&!g},{[ls("book-image-block")&&ls("dark-theme-book-image")]:i&&g},{[ls("book-image-course")]:!i}),y=ls(i?"flex-block":"flex-course"),T=ls(i?"image-container-block":"image-container-course"),S=X()(ls("small-text"),{[ls("dark-theme")]:g}),b=X()(ls("black-text"),{[ls("dark-theme")]:g}),L=X()(ls("button"),{[ls("dark-theme-button")]:g}),N=Ti({height:"210",width:"140",imageKey:o}),k=(0,u.useCallback)(()=>{},[d,h,c]);return(0,n.jsxs)("section",{className:y,children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,n.jsx)("div",{"aria-hidden":"true",className:T,children:o?(0,n.jsx)("img",{alt:"",className:x,src:N}):(0,n.jsx)("div",{className:x})}),(0,n.jsxs)("div",{className:ls("text-container"),children:[(0,n.jsxs)("p",{className:S,children:["From ",v,"'",C]}),(0,n.jsx)("p",{className:b,children:r}),(0,n.jsx)("a",{className:L,href:a,onClick:k,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var Ghe;const Us=qs()("partner-content-partner-info__"),Fx=({backgroundColor:e,block:t,link:s,trackingInfo:o})=>{const a=Fe()?.publishedAt,i=b2(),c=t?NI():EI(),l=Us(t?"nbic-logo-light-bulb":"nbic-logo"),d=Us(t?"block-logo-container":"logo-container"),h=Bm(e),m=X()(Us("small-text"),{[Us("dark-theme")]:h}),f=X()(Us("black-text"),{[Us("dark-theme")]:h}),v=X()(Us("button"),{[Us("dark-theme-button")]:h}),C=(0,u.useCallback)(()=>{},[a,i,o]);return(0,n.jsxs)("section",{className:Us("flex"),children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,n.jsx)("div",{"aria-hidden":"true",className:d,children:(0,n.jsx)("img",{alt:"",className:l,src:c})}),(0,n.jsxs)("div",{className:Us("text-container"),children:[(0,n.jsx)("p",{className:m,children:"In partnership with"}),(0,n.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,n.jsx)("a",{className:v,href:s,onClick:C,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},Na=qs()("partner-content-author-card__"),Hx=e=>{const{partnerContent:t}=e,s=Fe(),{id:o,tenantId:r}=s??{},{data:a,type:i}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=a,v=c.filter(T=>T.name),C={courseId:o,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:i},g=X()(Na("flex"),Na("author-container")),x=T=>Ti({width:"122",height:"122",imageKey:T}),y=(T,S)=>(0,n.jsx)("div",{"aria-hidden":"true",className:Na("image-container"),children:T?(0,n.jsx)("img",{alt:S,className:Na("author-image"),src:x(T)}):(0,n.jsx)("div",{className:Na("author-image")})});return(0,n.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,n.jsx)("li",{role:"listitem",children:(0,n.jsxs)("section",{children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"Authors"}),v.map(T=>(0,n.jsxs)("li",{className:g,children:[y(T.image,T.name),(0,n.jsx)("p",{className:Na("author-name-text"),children:T.name})]},T.name))]})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Dx,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:C})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Fx,{link:f,trackingInfo:C})})]})},r$=$("cover");function a$({hasLogo:e}){const t=Di();if(!t)return null;const s=r$("details-content-aside",{logo:e});return(0,n.jsx)("div",{className:s,children:(0,n.jsx)(od,{type:"partner-content",children:(0,n.jsx)(Hx,{partnerContent:t})})})}const i$=$("cover"),c$=Oe("CoverDetailsContentHeading",({className:e="",type:t,...s})=>{const o=Vr()(["Default"],s);return(0,n.jsx)("header",{...o,className:i$("details-content-heading",{type:t}).mix(e)})}),l$=$("cover");function d$({children:e,title:t,type:s}){const o=re(),{description:r,media:a,partnerContentId:i}=o??{},c=!!i,d=(a&&"image"in a?a.image?.key:null)!=null,m=s==="outline"?r?!d&&!c?"outline-no-logo":c&&!d?"outline-has-partner-content":c&&d?"outline-has-pc-and-logo":"outline":"outline-no-description":s;return(0,n.jsxs)("section",{className:l$("details-content-section",{type:m}),children:[(0,n.jsx)(c$,{type:s,children:(0,n.jsx)("h2",{children:t})}),e]})}const u$=$("cover");function _i(){return(0,n.jsxs)("svg",{"aria-hidden":"true",className:u$("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}const h$=()=>Lt(480),m$=()=>Lt(768),f$={SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"};function $x(){const e=re(),t=m$(),s=e?.theme?.coverPageType||"CENTERED";return t?f$[s]??s:s}const p$=$("cover"),g$=()=>null,v$=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(ym,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(_i,{}),(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})})}),C$=()=>(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(_i,{}),(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})})}),x$=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Fi,{}),(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(_i,{}),(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})})]}),b$=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(_i,{}),(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})}),(0,n.jsx)(Fi,{})]}),y$=()=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(_i,{}),(0,n.jsx)(En,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})}),(0,n.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,n.jsx)(Fi,{})})]});function S$(){switch($x()){default:case"CENTERED_IMAGE":return(0,n.jsx)(y$,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,n.jsx)(C$,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,n.jsx)(b$,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,n.jsx)(x$,{});case"CENTERED_OVERLAY":return(0,n.jsx)(v$,{})}}function T$(){return(0,n.jsxs)("header",{className:p$("header",{meta:!1}),"data-testid":"cover-header",children:[(0,n.jsx)(S$,{}),(0,n.jsx)(u.Suspense,{children:(0,n.jsx)(g$,{})})]})}var L$=p(82920);const k$=$("cover");function N$({children:e}){const t=re(),{themeId:s}=t?.theme??{},o=$x(),r=L$.useMemo(()=>da()(o),[o]),a=k$(null,{layout:r});return(0,n.jsx)("div",{className:a,"data-testid":`cover-layout-${r}`,"data-theme-id":s,id:"cover",children:e})}var Vx=p(82920);const Dm=$("lesson-header"),E$=({authorName:e,avatar:t,lessonName:s,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,n.jsxs)("div",{className:Dm("content"),children:[v&&(0,n.jsxs)("div",{className:Dm("info-row"),children:[f?(0,n.jsx)(Zn,{authorName:e,avatar:t}):(0,n.jsx)(Zl,{}),m&&(0,n.jsx)(Sa,{partnerContentAuthors:a}),C&&(0,n.jsx)("span",{"aria-hidden":"true",className:Dm("info-row--divider"),children:"|"}),c?(0,n.jsx)(qn,{lessonName:s,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,n.jsx)(Xn,{})]}),(0,n.jsx)("div",{children:(0,n.jsx)(Jn,{id:h,title:l})})]})},I$=({authorName:e,avatar:t,lessonName:s,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=Vx.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,n.jsxs)(n.Fragment,{children:[c?(0,n.jsx)(qn,{lessonName:s,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,n.jsx)(Xn,{}),f&&(0,n.jsx)(Zn,{authorName:e,avatar:t}),i&&m&&(0,n.jsx)(Tm,{partnerContentAuthors:a}),(0,n.jsx)(Jn,{id:h,title:l})]})},j$=({authorName:e,avatar:t,lessonName:s,lessonNumber:o,lessonPreposition:r,partnerContentAuthors:a,showAuthor:i,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=a!=null,f=Vx.useMemo(()=>t&&e&&i&&!m,[t,e,i,m]);return(0,n.jsxs)(n.Fragment,{children:[f?(0,n.jsx)(Zn,{authorName:e,avatar:t}):(0,n.jsx)(Zl,{}),i&&m&&(0,n.jsx)(Sa,{partnerContentAuthors:a}),(0,n.jsx)(Jn,{id:h,title:l}),c?(0,n.jsx)(qn,{lessonName:s,lessonNumber:o,lessonPreposition:r,totalLessons:d}):(0,n.jsx)(Xn,{})]})};function w$(e){const t=h$();return e.lessonHeaderSize===ui.SMALL&&!t?(0,n.jsx)(E$,{...e}):t?(0,n.jsx)(I$,{...e}):(0,n.jsx)(j$,{...e})}var Fm=p(82920);const{COMPACT:A$,COVER:R$,OVERLAY:P$,SIDEBAR:M$}=Co,Ea=$("progress-circle");function O$({"aria-hidden":e,"aria-label":t,isFailed:s,isPassed:o,scope:r,value:a}){const[i,c]=Fm.useState(a===100),l=(0,Me.A)(a),{theme:d}=re()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===R$,f=r===P$,v=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,x=Ea("default",{failed:s,passed:o}),y=Ea({compact:r===A$,cover:m,overlay:f,sidebar:r===M$}),T=Ea("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),S=Ea("fill",{"circular-fill":C,done:i,failed:s,passed:o,unstarted:a===0}),b=Ea("pass",{done:i,visible:o}),L=Ea("fail",{done:i,visible:s}),N=Fm.useMemo(()=>C||a===100?a:0,[C,a]);return Fm.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const k=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,k)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]),(0,n.jsx)(n.Fragment,{children:v?(0,n.jsx)("svg",{"aria-hidden":e,"aria-label":t,className:x,focusable:"false",viewBox:"0 0 7 7",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:y,fill:"none",focusable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:T,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,n.jsx)(wm,{className:S,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:N}),(0,n.jsx)("path",{className:b,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,n.jsx)("path",{className:L,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"})]})})}function B$({Default:e,...t}){return(0,n.jsx)(e,{...t,hasOverlay:!1})}var D$=p(97127),rd=p.n(D$);const zx=e=>t=>(e(t),t.preventDefault()),Po=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},hn=e=>t=>{e(t),t.preventDefault(),Po(t)},ad=$("lesson-progress"),{COMPACT:Hm,COVER:Gi,OVERLAY:$m,SIDEBAR:Wi}=Co;function F$({canComplete:e,color:t,hasRestriction:s,isComplete:o,isCurrentLesson:r,isDark:a,isEnabled:i,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:v=Jt,onMarkReset:C=Jt,onShowTooltip:g,percentComplete:x,progressGraphic:y,scope:T,labels:S}){const b=(0,u.useRef)(),L=(0,u.useRef)(),N=(0,u.useRef)(),k=(0,u.useRef)(),{theme:{progressIndicatorStyle:E=et.THEME_DEFAULT}}=Fe(),j=E===et.THEME_DEFAULT,A=ad({compact:T===Hm,cover:T===Gi&&!l,"legacy-cover":T===Gi&&l,inactive:s,overlay:T===$m,sidebar:T===Wi&&!l,"legacy-sidebar":T===Wi&&l,"theme-default":j}),I=ad("graphic",{compact:T===Hm,cover:T===Gi&&!l,"legacy-cover":T===Gi&&l,overlay:T===$m,sidebar:T===Wi&&!l,"legacy-sidebar":T===Wi&&l}),w=ad("tooltip",{legacy:l}).toString(),O=(0,u.useCallback)(()=>{o?C?.():v?.()},[o,v,C]),R=(0,u.useCallback)(B=>{rd()(f)&&gs(B)&&h&&f()},[f,h]),P=(0,u.useCallback)(()=>{clearTimeout(N.current),!s&&rd()(g)&&(L.current=setTimeout(g,600))},[s,g]),M=(0,u.useCallback)(()=>{clearTimeout(L.current),rd()(f)&&(N.current=setTimeout(f,150))},[f]),H=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const B=b.current.getBoundingClientRect(),V=k.current.offsetParent.getBoundingClientRect(),{height:G,width:_}=B,Z=B.left-V.left,oe=B.top-V.top;Object.assign(k.current.style,{transform:`translate(${Z}px, ${oe}px)`,width:`${_}px`,height:`${G}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>H(),[H]),(0,Je.A)("resize",H,window),(0,Je.A)("keydown",R,document),Nx(b,M),e){const V=H$({labels:S,percentComplete:x,canReset:!0}),G=!i||!1,_=ad("action",{disabled:G});return(0,n.jsx)("span",{className:A,"data-testid":"lesson-progress",children:(0,n.jsx)("button",{"aria-label":V,className:_,disabled:G,onBlur:f,onClick:O,onFocus:g,type:"button",children:(0,n.jsxs)("span",{className:I,onMouseEnter:P,onMouseLeave:M,ref:b,children:[(0,n.jsx)(y,{"aria-hidden":"true",color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:T,value:x}),i&&!s&&(0,n.jsx)(Ux,{className:w,dark:a,ref:k,scope:T,visible:h,children:V})]})})})}const F=$$({labels:S,isFailed:c,percentComplete:x});return(0,n.jsx)("span",{className:A,"data-testid":"lesson-progress",children:(0,n.jsxs)("span",{className:I,onMouseEnter:P,onMouseLeave:M,ref:b,children:[(0,n.jsx)(y,{"aria-label":F,color:t,isCurrent:r,isDark:a,isFailed:c,isPassed:d,navigationStyle:m,scope:T,value:x}),i&&!s&&(0,n.jsx)(Ux,{className:w,dark:a,ref:k,scope:T,visible:h,children:F})]})})}const Ux=(0,u.forwardRef)((e,t)=>{const{children:s,className:o,dark:r,scope:a,visible:i}=e,c=(0,u.useMemo)(()=>$(o),[o]),l=c({compact:a===Hm,cover:a===Gi,overlay:a===$m,sidebar:a===Wi,visible:i}),d=c("inner",{dark:r,light:!r}),h=(0,n.jsx)("div",{"aria-hidden":"true",onClick:Po,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,n.jsx)("div",{style:{pointerEvents:"all"},children:(0,n.jsx)("div",{className:l,children:(0,n.jsx)("div",{className:d,children:s})})})});return(0,Nn.createPortal)(h,Ao())});function H$({labels:e,canReset:t,percentComplete:s}){const o=s===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieClickToComplete:i,progressPieClickToReset:c}=e;return o&&t?`${r}. ${c}`:s===100&&!t?r:s===0?`${a}. ${i}`:`${s}% ${r}. ${i}`}function $$({labels:e,isFailed:t,percentComplete:s}){const o=s===100,{progressPieCompleted:r,progressPieUnstarted:a,progressPieQuizFailed:i}=e;return t?i:o?r:s===0?a:`${s}% ${r}`}const _x=u.memo(F$);function V$({color:e,hasRestriction:t,isComplete:s,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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"overview-list-item__progress",children:(0,n.jsx)(_x,{canComplete:!1,color:e,hasRestriction:t,isComplete:s,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,n.jsx)("span",{className:"overview-list-item__title",children:c})]})}function z$(){return null}function Gx({className:e,ref:t}){return(0,n.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,n.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function U$(e){const t=Mt(e,["Default"]);return(0,n.jsxs)(Gt,{...t,fill:"none",viewBox:"0 3 16 10",children:[(0,n.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,n.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function _$(e){const t=Mt(e,["Default"]);return(0,n.jsx)(Gt,{viewBox:"0 0 25 16",...t,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M1.10699 7.7986L0.778547 7.50301L1.1236 7.22701L10.013 0.116623L10.4815 0.702312L2.42567 7.14593H24.4443V7.89593H2.3363L10.4981 15.2413L9.9964 15.7988L1.10699 7.7986Z",fill:"currentColor",fillRule:"evenodd"})})}function Wx(e){return(0,n.jsx)(kt,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function Kx(e){const t=Mt(e,["Default"]);return(0,n.jsxs)(Gt,{...t,fill:"none",viewBox:"0 0 16 16",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,n.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function Qx(e){const t=Mt(e,["Default"]);return(0,n.jsxs)(Gt,{...t,fill:"none",viewBox:"0 0 16 16",children:[(0,n.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,n.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function G$({className:e}){return(0,n.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,n.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function W$(e){const t=Mt(e,["Default"]);return(0,n.jsxs)(Gt,{...t,fill:"none",viewBox:"0 0 16 16",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,n.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,n.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function K$({className:e}){return(0,n.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,n.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function Q$(e){const t=Mt(e,["Default"]);return(0,n.jsxs)(Gt,{viewBox:"0 0 12 12",...t,children:[(0,n.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,n.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}const Y$=()=>Lt(1200),Z$=()=>Lt(768),Vm=()=>Lt(480),Yx=$("cover");function X$(){const e=re(),t=Y$(),s=Ae(e?.description);if(!s)return null;const o=ga("description"),r=(0,_t.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":o};return(0,n.jsx)("div",{...r,children:(0,n.jsxs)("section",{className:Yx("details-content-section"),children:[t&&(0,n.jsx)(O2,{}),(0,n.jsx)(ke,{className:Yx("details-content-description"),value:Vh(s)},"text")]})})}const q$={SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"};function zm(){const e=re(),t=Z$(),s=e?.theme?.coverPageType||"CENTERED";return t?q$[s]??s:s}function J$({Default:e,...t}){const s=zm(),o=["SPLIT_RIGHT","SPLIT_RIGHT_IMAGE"].includes(s);return(0,n.jsx)(e,{...t,reverseColumns:o})}const Zx=$("cover");function Ki({accentColor:e,hasOverlay:t=!1,isShape:s=!1}){const{alpha:o,ariaLabel:r,media:a,role:i}=xr("coverImage"),c=s?{backgroundColor:e}:na({alpha:o,hasOverlay:t,media:a});return(0,n.jsx)("div",{className:Zx("header-graphic-container"),children:(0,n.jsx)("div",{"aria-label":r,className:Zx("header-graphic"),"data-testid":"cover-header-graphic",role:i,style:c??void 0})})}const Xx=e=>(0,n.jsx)(id,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.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"})})}),qx=e=>(0,n.jsx)(id,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.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"})})}),Jx=e=>(0,n.jsx)(id,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.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,n.jsx)(id,{...e,children:(0,n.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,n.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"})})}),eV={LEFT_OVERLAY:Xx,LEFT:Xx,CENTERED:qx,CENTERED_OVERLAY:qx,SPLIT_LEFT:Jx,SPLIT_LEFT_IMAGE:Jx,SPLIT_RIGHT:eb,SPLIT_RIGHT_IMAGE:eb},id=({children:e,className:t="svgPath",height:s,width:o,viewBox:r})=>(0,n.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:s,viewBox:r,width:o,xmlns:"http://www.w3.org/2000/svg",children:e});function Sr({className:e,coverPageType:t}){const s=t?eV[t]:null;return s?(0,n.jsx)(s,{className:e}):null}const tb=$("cover"),Ia=()=>(0,n.jsxs)("div",{className:tb("author-published-wrap"),children:[(0,n.jsx)(En,{}),(0,n.jsx)(B2,{})]}),tV=({coverPageType:e})=>{const t=Vm();return(0,n.jsxs)(ym,{children:[(0,n.jsx)(Sr,{coverPageType:e}),(0,n.jsxs)(is,{children:[!t&&(0,n.jsx)(Dt,{}),(0,n.jsx)(Ia,{}),(0,n.jsx)(cs,{}),t&&(0,n.jsx)(Dt,{}),(0,n.jsx)(as,{})]})]})},sV=({coverPageType:e})=>{const t=Vm();return(0,n.jsxs)(zs,{children:[(0,n.jsx)(Sr,{coverPageType:e}),(0,n.jsxs)(is,{children:[!t&&(0,n.jsx)(Dt,{}),(0,n.jsx)(Ia,{}),(0,n.jsx)(cs,{}),t&&(0,n.jsx)(Dt,{}),(0,n.jsx)(as,{})]})]})},nV=({coverPageType:e})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Sr,{coverPageType:e}),(0,n.jsx)(Ki,{}),(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(Ia,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})})]}),oV=({accentColor:e,coverPageType:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(Ia,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})}),(0,n.jsx)(Sr,{coverPageType:t}),(0,n.jsx)(Ki,{accentColor:e,isShape:!0})]}),rV=({coverPageType:e})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(Ia,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})}),(0,n.jsx)(Sr,{coverPageType:e}),(0,n.jsx)(Ki,{})]}),aV=({accentColor:e,coverPageType:t})=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Sr,{coverPageType:t}),(0,n.jsx)(Ki,{accentColor:e,isShape:!0}),(0,n.jsx)(zs,{children:(0,n.jsxs)(is,{children:[(0,n.jsx)(Dt,{}),(0,n.jsx)(Ia,{}),(0,n.jsx)(cs,{}),(0,n.jsx)(as,{})]})})]});function iV(e){const t=zm(),s={...e,coverPageType:t};switch(t){default:case ce.LEFT_OVERLAY:case ce.CENTERED_OVERLAY:return(0,n.jsx)(tV,{...s});case ce.LEFT:case ce.CENTERED:return(0,n.jsx)(sV,{...s});case ce.SPLIT_LEFT:return(0,n.jsx)(oV,{...s});case ce.SPLIT_LEFT_IMAGE:return(0,n.jsx)(rV,{...s});case ce.SPLIT_RIGHT:return(0,n.jsx)(aV,{...s});case ce.SPLIT_RIGHT_IMAGE:return(0,n.jsx)(nV,{...s})}}function cV(e){const s=!!!!Di();return(0,n.jsx)("header",{className:tb("header",{"with-info":s}),"data-testid":"cover-header",children:(0,n.jsx)(iV,{...e})})}var lV=p(82920);const dV=$("cover");function uV({children:e}){const t=re(),{themeId:s}=t?.theme??{},o=zm(),r=lV.useMemo(()=>da()(o),[o]),a=dV(null,{layout:r});return(0,n.jsx)("div",{className:a,"data-testid":`cover-layout-${r}`,"data-theme-id":s,id:"cover",children:e})}const eo=$("cover");function hV({percentComplete:e}){const t=Vm(),s=on(),o=Ce(),r=QC();return null}var sb=p(82920);const cd=$("lesson-header"),Um=()=>(0,n.jsx)("div",{className:cd("author--hidden")}),mV=({authorName:e,avatar:t,description:s,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,n.jsxs)("div",{className:cd("content"),children:[C&&(0,n.jsxs)("div",{className:cd("info-row"),children:[v?(0,n.jsx)(Zn,{authorName:e,avatar:t}):(0,n.jsx)(Um,{}),f&&(0,n.jsx)(Sa,{partnerContentAuthors:i}),g&&(0,n.jsx)("span",{"aria-hidden":"true",className:cd("info-row--divider"),children:"|"}),l?(0,n.jsx)(qn,{lessonName:o,lessonNumber:r,lessonPreposition:a,totalLessons:h}):(0,n.jsx)(Xn,{})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)(Jn,{id:m,title:d}),s&&(0,n.jsx)(ya,{description:s})]})]})},fV=e=>{const{authorName:t,avatar:s,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=sb.useMemo(()=>s&&t&&l&&!v,[s,t,l,v]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Jn,{id:f,title:h}),(0,n.jsxs)(eH,{children:[C?(0,n.jsx)(Zn,{authorName:t,avatar:s}):(0,n.jsx)(Um,{}),l&&v&&(0,n.jsx)(Sa,{partnerContentAuthors:c}),d?(0,n.jsx)(qn,{lessonName:r,lessonNumber:a,lessonPreposition:i,showPartnerContent:v,totalLessons:m}):(0,n.jsx)(Xn,{})]}),o&&(0,n.jsx)(ya,{description:o})]})},pV=e=>{const{authorName:t,avatar:s,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=sb.useMemo(()=>s&&t&&l&&!v,[s,t,l,v]);return(0,n.jsxs)(n.Fragment,{children:[d?(0,n.jsx)(qn,{lessonName:r,lessonNumber:a,lessonPreposition:i,totalLessons:m}):(0,n.jsx)(Xn,{}),C?(0,n.jsx)(Zn,{authorName:t,avatar:s}):(0,n.jsx)(Um,{}),l&&v&&(0,n.jsx)(Tm,{partnerContentAuthors:c}),(0,n.jsx)(Jn,{id:f,title:h}),o&&(0,n.jsx)(ya,{description:o})]})};function gV(e){const t=Wh();return e.lessonHeaderSize===ui.SMALL&&!t?(0,n.jsx)(mV,{...e}):t?(0,n.jsx)(pV,{...e}):(0,n.jsx)(fV,{...e})}var ld=p(82920);const{COMPACT:vV,COVER:CV,OVERLAY:xV,SIDEBAR:bV}=Co,Qi=$("progress-circle");function yV({"aria-hidden":e,"aria-label":t,isFailed:s,isPassed:o,scope:r,value:a}){const[i,c]=ld.useState(a===100),l=(0,Me.A)(a),{theme:d}=re()??{},h=d?.progressIndicatorStyle??et.THEME_DEFAULT,m=r===CV,f=r===xV,v=h===et.THEME_DEFAULT,C=h===et.CIRCULAR_FILL,g=h===et.INCOMPLETE_COMPLETE,x=Qi({compact:r===vV,cover:m,sidebar:r===bV,overlay:f}),y=Qi("track",{"circular-fill":!f&&C,"incomplete-complete":m&&g}),T=Qi("runner",{"circular-fill":C,done:i,failed:s,passed:o,unstarted:a===0}),S=Qi("pass",{done:i,visible:o}),b=Qi("fail",{done:i,visible:s}),L=ld.useMemo(()=>C||a===100?a:0,[C,a]);ld.useEffect(()=>{if(a!==100&&l===100)c(!1);else if(a===100&&!i&&!g){const k=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,k)}else a===100&&!i&&g&&c(!0)},[i,g,l,a]);const N=ld.useCallback(()=>{a===100&&c(!0)},[a]);return(0,n.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:x,fill:"none",focusable:"false",role:"img",viewBox:"0 0 15 15",xmlns:"https://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:y,cx:"7.5",cy:"7.5",fill:"transparent",r:"6.5",strokeWidth:"2",transform:"rotate(-89.9 7.5 7.5)"}),v?(0,n.jsx)(Rx,{className:T,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:N,r:6.5,strokeWidth:2,transform:"rotate(-89.9 7.5 7.5)",value:a}):(0,n.jsx)(wm,{className:T,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:N,r:6.5,strokeLinecap:"round",strokeWidth:2,value:L}),(0,n.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,n.jsx)("path",{className:b,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 dd=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:s=0,runnerClass:o,trackClass:r})=>(0,n.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,n.jsx)("div",{className:o,style:{width:`${s}%`}})}),SV=$("nav-sidebar-header");function TV(e){const{classProgressRunner:t,classProgressText:s,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e;return(0,n.jsxs)("div",{className:SV("progress"),"data-testid":"nav-sidebar-progress",children:[(0,n.jsx)("div",{className:s,children:a}),(0,n.jsx)(dd,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o})]})}function LV({className:e,ref:t}){return(0,n.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,n.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 kV(e){return(0,n.jsx)(Gt,{...e,viewBox:"0 0 16 8",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M15,3H3.4l1.3-1.3c0.4-0.4,0.4-1,0-1.4C4.5,0.1,4.3,0,4,0S3.5,0.1,3.3,0.3l-3,3c-0.4,0.4-0.4,1,0,1.4l3,3c0.4,0.4,1,0.4,1.4,0c0.4-0.4,0.4-1,0-1.4L3.4,5H15c0.6,0,1-0.4,1-1S15.6,3,15,3",fill:"currentColor",fillRule:"evenodd"})})}function NV(e){const t=Mt(e,["Default"]);return(0,n.jsx)(Gt,{...t,viewBox:"0 0 16 8",children:(0,n.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 EV({className:e,ref:t}){return(0,n.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,n.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 IV(e){return(0,n.jsx)(kt,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function nb(e){return(0,n.jsx)(kt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,n.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 jV(e){return(0,n.jsx)(kt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,n.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 wV(e){return(0,n.jsxs)(kt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,n.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,n.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,n.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 AV(e){return(0,n.jsx)(kt,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,n.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 RV(e){return(0,n.jsxs)(kt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,n.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,n.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 PV(e){return(0,n.jsxs)(kt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,n.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,n.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 MV(e){return(0,n.jsx)(kt,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,n.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"})})}var ob=p(82920);const rb=Ms,OV={classic:Ms,default:Ms,imaginative:Bu,organic:Hu},ab=Object.assign(ob.createContext(rb),{displayName:"ThemeContext"});function BV(){return ob.useContext(ab)}function DV({themeId:e,...t}){return(0,n.jsx)(ab.Provider,{...t,value:OV[e]??rb})}function FV(e){return(0,n.jsx)(n.Fragment,{children:e.children})}function HV(){return null}function ib(e,t,s){function o(r){const i=BV()?.[e]?.[t]??s;return(0,n.jsx)(i,{...r,Default:s})}return o.displayName=`ThemeComponent(${t})`,o}function Oe(e,t=FV){return ib("components",e,t)}function At(e){return ib("icons",e,HV)}var ud=p(82920);const cb=ud.createContext({typefaces:[]});function $V({addTypefaces:e,children:t,typefaces:s=[]}){VV(s);const o=ud.useMemo(()=>({addTypefaces:e,typefaces:s}),[e,s]);return(0,n.jsx)(cb.Provider,{value:o,children:t})}function Zhe(){return ud.useContext(cb)}function VV(e){ud.useEffect(()=>{const t=new CSSStyleSheet;for(const s of e){const o=`[data-rise-typeface-id="${CSS.escape(s.id)}"] { font-family: "${CSS.escape(s.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(s=>s!==t)}},[e])}function zV(e){return e.fonts}function lb(){return le(zV)}var UV=p(82920);function _V({children:e}){const t=lb(),s=UV.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,n.jsx)($V,{typefaces:s,children:e})}function GV(){const e=re();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function WV(){const e=qt(),t=(0,we.zy)(),s=(0,u.useRef)(e),o=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),a=(0,u.useRef)(null);s.current=e,a.current==null&&(a.current={push:(...i)=>s.current(...i),replace:i=>s.current(i,{replace:!0}),go:i=>s.current(i),goBack:()=>s.current(-1),goForward:()=>s.current(1),listen:i=>(o.current.add(i),()=>{o.current.delete(i)}),location:t}),(0,u.useEffect)(()=>{a.current&&p8(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 ja=p(58893),KV=p(51246),yt=p.n(KV),QV=p(30349),YV=p.n(QV);const ZV=ai()(uh()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),Re()("#FFF")),XV=Bn()({color:ZV}),qV=({accentContrast:e,bodyTypeface:t,color:s,headingTypeface:o,isLegacyCourse:r,uiTypeface:a})=>{const i=(0,u.useMemo)(()=>{const d=Ns(s),h=e??d;return!r&&(h===be.DARK||h===be.AUTO&&d===be.DARK)?[xt.DARK,xt.LIGHT]:[xt.LIGHT,xt.DARK]},[e,s,r]),[c,l]=i;return(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:YV()({bodyTypeface:t,colorThemeRGB:(0,ja.A)(s)?.slice(0,3),colorTheme:s,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:(0,ja.A)(l)?.slice(0,3),colorThemeContrastRGB:(0,ja.A)(c)?.slice(0,3),colorThemeTint:k0(s),colorThemeTransparent:s+"1A",headingTypeface:o,uiTypeface:a})}})},_m=Pe()(qV,XV);_m.displayName="Branding",_m.propTypes={bodyTypeface:yt().string,color:yt().string.isRequired,headingTypeface:yt().string,uiTypeface:yt().string};const JV=(0,u.memo)(_m);function ez(e,t){const s=il(),{currentLocale:o}=ot(),r=o&&s?.localeLabelSets?.[o]?.labels||e,a=o&&s?.localeLabelSets?.[o]!=null?o:t;return{labels:r,labelsLocale:a}}function tz({children:e}){const t=re(),s=pr(),{labels:o,iso639Code:r}=Bj(),a=vF(),i=Lo(),c=t?.locale??r,{labels:l,labelsLocale:d}=ez(o,c);return(0,n.jsx)(PE,{course:t,courseProgress:s,labels:l,labelsLocale:d,partnerContent:a,search:i,children:e})}var sz=p(56050);function nz({children:e,l10n:t}){const s=(0,u.useMemo)(()=>({l10n:t==null?null:(0,sz.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,n.jsx)(bi.Provider,{value:s,children:(0,n.jsx)(ah.Provider,{value:c,children:e})})}function db(e,t=window.location){const{defaultLocale:s,locales:o}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,we.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||s}function oz({defaultLocale:e,locales:t}){const s=qt(),o=(0,we.zy)(),r=(0,u.useRef)(o);r.current=o;const a=(0,u.useMemo)(()=>db({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"?s(f):s(f,{replace:!0})},[e,s]);return{currentLocale:a,setCurrentLocale:i}}const ub=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function rz(e,t){const s=re(),o=il(),r=le(l=>l.courseLabels.iso639Code),a=s?.locale??r,i=o?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??a??""},[e,a]),(0,u.useEffect)(()=>{s&&Y0({course:s,locales:i,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[s,i,e]);const c=(0,u.useCallback)(l=>{if(!ub(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 az({children:e}){const t=il(),{currentLocale:s,setCurrentLocale:o}=oz({defaultLocale:t?.defaultLocale,locales:t?.locales});return rz(s,o),(0,n.jsx)(nz,{l10n:t,children:(0,n.jsx)(NE,{currentLocale:s,setCurrentLocale:o,children:e})})}function iz(e){const t=e?.exportSettings?.webExportSettings,s=e?.exportSettings?.exportType==="raw",o=e?.exportSettings?.exportType==="lms";return!!(s&&t?.disableCoverPage||o&&e?.lmsOptions?.disableCoverPage)}function hb(e){return!Sn.isInstantLink&&iz(e)}function cz(e){return H1(e)||i0(e)||_r(e)||c0(e)?!0:hb(e)}const lz=e=>e?`${e} | ${Up}`:Up,Yi=e=>ti()?e:lz(e);function Tr({children:e,title:t,isExplicit:s=!1}){const o=Yi(pC());return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("title",{children:t??o},s?"explicit":"default"),e]})}const Gm=$("not-found"),hd=()=>(0,n.jsx)(Tr,{title:Yi(),children:(0,n.jsx)("div",{className:Gm(),children:(0,n.jsxs)("div",{className:Gm("copy"),children:[(0,n.jsx)("h1",{className:Gm("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,n.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})}),mb=(0,u.createContext)({translationHoveredPath:null});function dz(){return(0,u.use)(mb)}const uz=mb.Provider,hz=new Set(["preview:lessonUpdate","preview:navigate","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",vs.FOCUS,vs.TOGGLE,vs.CLEAR,vs.TRANSLATION_HOVERED,vs.TRANSLATION_HOVER_CLEAR]),mz=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function fz({course:e,fonts:t,l10n:s}){let o=!1;return Rv(t,()=>{o||(fs(O7({course:e,fonts:t,l10n:s})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){o=!0}}}function pz(){let e=[],t=0;return s=>{clearTimeout(t);for(const o of s)e.push(o);t=window.setTimeout(()=>{const o=e;e=[],fs(D7(o))},15)}}function gz(){const e=qt(),t=(0,we.zy)(),s=le(y=>y.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)(s);v.current=s;const C=(0,u.useRef)(null),g=(0,u.useRef)(pz()),x=(0,u.useRef)(t);return(0,u.useEffect)(()=>{x.current!==t&&(h(!0),x.current=t)},[t]),(0,u.useEffect)(()=>{if(d){const y=setTimeout(()=>{h(!1),l(!1)},0);return()=>clearTimeout(y)}},[d]),(0,u.useEffect)(()=>{const y=T=>{const{data:S,origin:b}=T;if(!ub(b))return;const L=m.current,k=f.current.pathname,E=v.current,j=E?.lessonsOnly,A=Array.isArray(S)?S:[S];for(const{type:I,data:w,options:O}of A)if(hz.has(I)){if(I===vs.TOGGLE&&window.targetMode?.(w,P=>{window.parent.postMessage({type:vs.HOVERED,data:P},"*")})?.then(P=>{window.parent.postMessage({type:vs.SELECTED,data:P},"*")}).catch(()=>{window.parent.postMessage({type:vs.SELECTED,data:[]},"*")}),I==="preview:update"&&r(w),I==="preview:themeUpdate"){C.current?.();const{course:R,l10n:P,fonts:M,theme:H}=w,F={...R,theme:H},B=hk({course:E,updates:F}),{cancel:V}=fz({course:B,fonts:M,l10n:P});C.current=V}if(I==="preview:navigate"){let{type:R,lessonId:P,itemId:M}=w;const{path:H,replace:F}=w,B=F?V=>L(V,{replace:!0}):L;if(mz(R,k)){if(Array.isArray(H)){const V=(0,Fr.Ce)(H);if(V)({type:R,lessonId:P,itemId:M}=V);else if(H[0]==="mondrian")for(const G of E?.lessons??[]){const _=G.items?.find(Z=>"blockumentId"in Z&&Z.blockumentId===H[1]);if(_){R="lesson",P=G.id,M=_.id;break}}else continue}if(R==="firstLesson"&&j?.[0])B(ks(j[0].id));else if(R==="cover"||R==="course")B("/");else if(R==="lesson"&&j?.find(({id:G})=>G===P)!=null){const G=ks(P);if(lh(iC.getState())===So.RESTRICTED&&fs(rN({targetLessonId:P,lessons:E?.lessons??[]})),G!==k&&B(G),M||H){const Z=()=>{window.dispatchEvent(new CustomEvent(Ge,{detail:{lessonId:P,itemId:M,path:H}}))};G!==k?setTimeout(Z,1500):Z()}}}}if(I===vs.CLEAR&&window.dispatchEvent(new CustomEvent(km)),I==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(vx)),I==="preview:navClose"&&window.dispatchEvent(new CustomEvent(Cx)),I==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(Xl)),I==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(ql)),I==="preview:scrollto"&&typeof w.target=="string"){const R=document.querySelector(w.target);R&&R.scrollIntoView({behavior:"smooth",block:"start"})}I==="preview:replace"&&fs(M7(w)),I==="preview:changeset"&&g.current(w),I===vs.FOCUS&&_O(w.path),I===vs.TRANSLATION_HOVERED&&(i({translationHoveredPath:w.path}),UO(w.path)),I===vs.TRANSLATION_HOVER_CLEAR&&(i({translationHoveredPath:null}),$O()),I==="preview:lessonUpdate"&&(fs(B7(w)),window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)),I==="preview:selectLocale"&&O?.shouldRetainParentFocus&&l(!0)}};return window.addEventListener("message",y),()=>window.removeEventListener("message",y)},[]),{previewType:o,targetModeContext:a,didNavigate:d,shouldSkipAutoFocusOnNavigate:c}}const fb=(0,u.createContext)(null);function md(){const e=(0,u.useContext)(fb);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function vz({children:e}){const{previewType:t,targetModeContext:s,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}=gz(),a=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:o,shouldSkipAutoFocusOnNavigate:r}),[t,o,r]);return(0,n.jsx)(uz,{value:s,children:(0,n.jsx)(fb,{value:a,children:e})})}const wa=$("cover");function Jhe(){const{categories:e}=re();return!Array.isArray(e)||e.length===0?null:(0,n.jsxs)("section",{className:wa("categories-section"),children:[(0,n.jsx)("h2",{className:wa("categories-title"),children:"Topics"}),(0,n.jsx)("ul",{className:wa("categories-list"),role:"list",children:e.map(t=>(0,n.jsxs)("li",{className:wa("categories-item"),role:"listitem",children:[(0,n.jsx)(wF,{className:wa("categories-icon")}),(0,n.jsx)("span",{className:wa("categories-item-wrap"),children:t})]},t))})]})}var Cz=p(24756);const xz=`${Ee("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,bz=`${Ee("CDN_URI")}/assets/rise/assets/error_x.svg`,yz=`${Ee("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,Zi="downloading",Aa="error",Lr="ok",Wm="contained",pb=({type:e})=>{const[t]=(0,u.useState)(()=>Cr()("certdownload-")),[s,o]=(0,u.useState)(Lr),r=(0,Me.A)(s),a=(0,u.useRef)(null),i=Ce(),c=`${t}-live`,l=e===Wm?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{o(Zi)},[]);return(0,u.useEffect)(()=>(s===Zi&&r!==Zi&&FN().then(()=>{o(Lr)}).catch(h=>{(0,Cz.FZ)(h)?o(Lr):o(Aa)}),()=>{HN()}),[r,s]),(0,u.useEffect)(()=>{a.current&&(s===Aa&&r!==Aa||s===Lr&&(r===Aa||r===Zi))&&a.current.focus()},[r,s]),(0,n.jsxs)("div",{className:l,children:[(0,n.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[s===Zi&&(0,n.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,n.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:yz,width:"15"}),i?.certificateDownloadInProgress||"Downloading..."]}),s===Aa&&(0,n.jsxs)("span",{className:"certificateDownload__error",children:[(0,n.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:bz,width:"15"}),(0,n.jsx)("span",{className:"visually-hidden",children:i?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(s===Lr||s===Aa)&&(0,n.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:a,type:"button",children:[s===Lr&&e===Wm&&(0,n.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:xz,width:"15"}),s===Lr?i?.certificateDownload||"Download certificate":i?.certificateRetryDownload||"Retry download"]})]})},Sz=()=>(0,n.jsx)(pb,{type:Wm}),Tz=(0,u.memo)(pb);var Lz=p(39475),kz=p.n(Lz),Nz=p(28731),Ez=p.n(Nz);const Iz=St()(kz()({}),Z1()(["first_name","last_name"]),Xr()(" "),Ez()),jz=({className:e,decorative:t,size:s,...o})=>{const r=Hn()(["avatars","medium"],o),a=t?"":Iz(o)||"Unknown User";return r?(0,n.jsx)("img",{alt:a,className:e||"user-avatar",src:r,style:{height:s,width:s}}):(0,n.jsx)(vm,{decorative:t,height:s,title:a,width:s})},wz=`${Ee("CDN_URI")}/assets/rise/assets/trophy.svg`,fd=$("cover"),Az=Tz,Rz=jz;function tme(){const{certificateDownload:e,riseComCurrentUser:t}=re(),s=Ce(),o=Lj(),a=xh()?.quizPassed??!0;return!(o&&a&&!bg())||window.viewType==="preview"?null:(0,n.jsxs)("div",{className:fd("completed-info"),children:[(0,n.jsxs)("div",{className:fd("completed-info-avatar"),children:[(0,n.jsx)(Rz,{...t??{},decorative:!0}),(0,n.jsx)("img",{alt:"",className:fd("completed-info-trophy"),src:wz})]}),(0,n.jsxs)("div",{className:fd("completed-info-label"),children:[(0,n.jsx)("span",{"aria-hidden":"true",children:s?.coverCompleted||"Completed"}),(0,n.jsx)("span",{className:"visually-hidden",children:s?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,n.jsx)(Az,{})]})}const Pz=$("cover");function Mz(e){return typeof e=="object"&&e!=null}function Oz(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function Bz(e){if(!Mz(e))return;const t=e.dueAt;return Oz(t)?t:void 0}function Dz({className:e="",dueAt:t}){const s=sj(),o=xh(),r=o==null||o.quizPassed||o.outOfAttempts,a=G2(t),i=Pz("due-date",{urgent:a}).mix(e);return!t||s&&r?null:(0,n.jsx)("div",{className:i,children:qh(t)})}const Fz=Oe("CoverDueDate",Dz);function sme(e){const t=Bz(mr());return(0,n.jsx)(Fz,{...e,dueAt:t})}const gb=({failed:e,complete:t})=>{const s=Ce();return(0,n.jsxs)("span",{className:"visually-hidden-always",children:[e?s?.a11yCoverRequirementFailed||"Requirement failed":t?s?.a11yCoverRequirementComplete||"Requirement complete":s?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},mn=$("cover");function ome(){const e=re(),t=Ce(),{trackingCompletionPercentage:s,trackingQuizId:o}=e;return s==null&&!o?null:(0,n.jsxs)("section",{className:mn("requirements-section"),children:[(0,n.jsx)("h2",{className:mn("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,n.jsxs)("ul",{className:mn("requirements-list"),children:[(0,n.jsx)(Hz,{}),(0,n.jsx)(Vz,{})]})]})}function Hz(){const{trackingCompletionPercentage:e}=re(),t=SC(),s=ra(),o=Ce();if(e==null)return null;const r=Math.ceil(e/100*t),a=r===t,i=s!=null&&s>=e,c=i?PF:MF;return(0,n.jsxs)("li",{className:mn("lesson-requirement"),role:"listitem",children:[(0,n.jsx)(c,{"aria-hidden":"true",className:mn("lesson-requirement-icon",{complete:i}).toString()}),(0,n.jsxs)("span",{className:mn("lesson-requirement-text"),children:[(0,n.jsx)(gb,{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 $z={passed:DF,failed:BF,requirement:FF};function Vz(){const e=Ce(),t=tj(),s=xh(),o=on(),r=at(t?.title),a=t?.settings?.passingScore;if(!r||!s)return null;const{outOfAttempts:i,quizPassed:c}=s,l=!c&&i;let d="requirement";c?d="passed":l&&(d="failed");const h=$z[d],m=a!=null?ba({percent:Number(a),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:o}):null;return(0,n.jsxs)("li",{className:mn("quiz-requirement"),role:"listitem",children:[(0,n.jsx)(h,{"aria-hidden":"true",className:mn("quiz-requirement-icon",{type:d}).toString()}),(0,n.jsxs)("span",{className:mn("quiz-requirement-text"),children:[(0,n.jsx)(gb,{complete:c,failed:l}),r,a!=null&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{"aria-hidden":"true",className:mn("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,n.jsx)("div",{className:mn("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}const zz=$("cover"),Uz=({coursePartnerContent:e})=>(0,n.jsx)(od,{type:"partner-content",children:(0,n.jsx)(Hx,{partnerContent:e})}),_z=Oe("CoverCourseInfo",({hasLogo:e})=>{const t=Di(),s=t!=null,o=zz("details-content-aside",{logo:e});return(0,n.jsxs)("div",{className:o,children:[!1,t&&(0,n.jsx)(Uz,{coursePartnerContent:t}),!1,!1]})}),Gz=$("cover"),Wz=Oe("CoverDescription",()=>{const e=re(),{navigation:t}=e,s=Ae(e.description),o=t?"description":"description-no-outline";if(!s)return null;const r=ga("description"),a=(0,_t.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,n.jsx)("div",{...a,children:(0,n.jsx)(od,{type:o,children:(0,n.jsx)(ke,{className:Gz("details-content-description"),value:String(Vh(s))},"text")})})}),vb=$("cover"),Km=({className:e=vb("details-logo"),imageClassName:t=vb("details-logo-image")})=>{const s=re()??{},o=Ae(s.media)?.image??{},{height:r,key:a,width:i,scalar:c=l0.SMALL.value}=o,l={width:Number(i)*c,height:Number(r)*c};if(!a)return null;const d=it(o);return(0,n.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,n.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:l.height,src:d,width:l.width})})};function Kz({icon:e,...t}){switch(e){case Bs.ARTICLE:return(0,n.jsx)(RB,{...t});case Bs.INTERACTION:return(0,n.jsx)(nF,{...t});case Bs.QUIZ:return(0,n.jsx)(JD,{...t});case Bs.VIDEO:return(0,n.jsx)(hF,{...t});default:return(0,n.jsx)("i",{className:"icon icon-Master-02"})}}var Xi=p(31188);const Qz=Oe("LessonProgressGraphic");function pd({canComplete:e,id:t,isDark:s,isEnabled:o,isTooltipVisible:r,onHideTooltip:a,onShowTooltip:i,scope:c}){const{color:l,navigationStyle:d}=re(),h=Io(t),m=Es(),f=$C(t),v=VC(t),C=Ni(t),g=Ce(),x=C?.type!=null,y=h?.isComplete,T=t===m,S=h?.percentComplete??0,b=(0,u.useCallback)(()=>{fs(sl(t))},[t]),L=(0,u.useCallback)(()=>{fs(V7(t))},[t]);return(0,n.jsx)(_x,{canComplete:e,color:l,hasRestriction:x,isComplete:y,isCurrentLesson:T,isDark:s,isEnabled:o,isFailed:f,isPassed:v,isTooltipVisible:r,labels:g,navigationStyle:d,onHideTooltip:a,onMarkComplete:b,onMarkReset:L,onShowTooltip:i,percentComplete:S,progressGraphic:Qz,scope:c})}const Yz=$("overview-list-item");function Zz({className:e,id:t,last:s}){const o=qt(),r=Es(),{color:a,isLegacyCourse:i,navigationStyle:c,theme:l}=re(),{accentContrast:d}=l??{},{icon:h,title:m}=Ot(t)??{},f=at(m),v=Io(t),C=$C(t),g=VC(t),x=Ni(t),y=Ce(),T=(0,_t.uW)(m)?{"data-l10n-id":m.l10nId}:{"data-change-path":P2(t,"title")},S=v?.isComplete,b=v?.percentComplete??0,L=x?.type!=null,[N,k]=(0,u.useState)(!1),E=(0,u.useCallback)(()=>k(!0),[]),j=(0,u.useCallback)(()=>k(!1),[]),A=s?"overview-list__li overview-list__li--last":"overview-list__li",I=[e,"overview-list-item"].filter(Boolean).join(" "),w=(0,u.useCallback)(O=>{const{currentTarget:{hash:R}}=O;O.preventDefault(),Xi.Ay.Events.scrollEvent.register("end",()=>{Yn(()=>{o(R.slice(1))},"cover-to-lesson"),Xi.Ay.Events.scrollEvent.remove("end")}),Xi.Ay.animateScroll.scrollTo(0,{containerId:"overview"})},[o]);return(0,n.jsx)("li",{...T,className:A,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,n.jsx)(Vi,{className:I,isTooltipEnabled:!0,lessonId:t,onBlur:j,onClick:w,onHideProgressTooltip:j,onShowProgressTooltip:E,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,n.jsx)(Jz,{accentContrast:d,color:a,hasRestriction:L,isComplete:S,isCurrentLesson:t===r,isFailed:C,isLegacyCourse:i,isPassed:g,isTooltipVisible:N,labels:y,lessonIcon:h,lessonId:t,lessonTitle:f,navigationStyle:c,onHideTooltip:j,onShowTooltip:E,percentComplete:b,progressGraphic:Xz,scope:Co.COVER})})})}const Xz=Oe("LessonProgressGraphic");function qz({isTooltipVisible:e,lessonIcon:t,lessonId:s,lessonTitle:o,onHideTooltip:r,onShowTooltip:a,scope:i}){const c=Yz("progress-circle");return(0,n.jsxs)("div",{className:c,children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,n.jsx)(Kz,{icon:t??void 0})}),(0,n.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${s}`,children:o}),(0,n.jsx)(pd,{canComplete:!1,id:s,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:a,scope:i})]})}const Jz=Oe("OverviewListItemLinkContent",qz),eU=$("overview-list"),tU=e=>e.reduce((t,s)=>(s.type==="section"?t.push([s]):t[t.length-1]?t[t.length-1].push(s):t.push([s]),t),[]),sU=Oe("OverviewListSectionTitle",({className:e="",...t})=>{const s=Vr()(["Default"],t);return(0,n.jsx)("h2",{...s,className:`${e} overview-list__section-title`})}),nU=()=>{const e=wj(),t=Ce(),s=tU(e);return(0,n.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:s.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=eU("list",{sectionless:!d});return(0,n.jsxs)("section",{children:[d&&c&&(0,n.jsx)(sU,{children:(0,n.jsx)(ps,{value:c})}),(0,n.jsx)("ol",{className:m,role:"list",children:h.map((f,v)=>(0,n.jsx)(Zz,{id:f.id,last:h.length>1&&v===h.length-1},f.id))})]},r)})})},oU=(0,u.memo)(nU),rU=e=>Object.values(l0).find(t=>t.value==e);function aU(e){return(0,u.useMemo)(()=>rU(e)??l0.SMALL,[e])?.label.toLowerCase()}const Ra=$("cover");function Cb(e){return typeof e=="object"&&e!=null}function iU(e){return Cb(e)}function cU(e){if(Cb(e))return iU(e.image)?e.image:void 0}const lU=Oe("CoverDetails",({reverseColumns:e})=>{const t=Lt(1200),{description:s,media:o,navigation:r,partnerContentId:a,publishedAt:i}=re(),l=!!Di(),d=cU(at(o)),h=d!=null&&Object.keys(d).length>0,m=!!r,f=!s||!m,v=!s&&!m,C=!!l,g=Ra("details",{"rise-com":!1,"rise-com-authoring":!1}),x=Ra("details-content-wrap",{columns:C,logo:h}),y=Ra("details-content",{"no-description-or-outline":f}),T=Ra("details-logo",{centered:v,"no-description-or-outline":f,"has-partner-content":!!a}),S=C&&(0,n.jsx)(_z,{hasLogo:h}),b=aU(d?.scalar),L=Ra("details-logo-image",{[b]:!0}),N=Ra("details-description-outline");return(0,n.jsx)("section",{className:g,"data-testid":"cover-details",children:(0,n.jsxs)("div",{className:x,children:[!t&&e&&S,(0,n.jsxs)("div",{className:y,children:[(0,n.jsx)(Km,{className:T,imageClassName:L}),(0,n.jsxs)("div",{className:N,children:[s&&(0,n.jsx)(Wz,{}),t&&S,m&&(0,n.jsx)(od,{type:"outline",children:(0,n.jsx)(oU,{})})]})]}),!t&&!e&&S]})})}),dU=Oe("CoverHeader"),uU=Oe("CoverLayout"),hU=["[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(", "),xb=(e,t=!1)=>s=>{const o=bb(s);if(o.length===0)return;const r=e>=o.length&&t?0:e;return Wp()(r,o)},bb=e=>e?Array.from(e.querySelectorAll(hU)).filter(t=>window.getComputedStyle(t).display!=="none"):[],yb=xb(0),mU=xb(-1),Qm=e=>yb(e)?.focus?.();function fU(){const e=(0,u.useRef)(null);function t(s){const o=yb(e.current),r=mU(e.current);kl(s)&&(s.shiftKey?document.activeElement===o&&(r.focus(),s.preventDefault()):document.activeElement===r&&(o.focus(),s.preventDefault()))}return(0,u.useEffect)(()=>{const s=e?.current;return s?.addEventListener("keydown",t),()=>{s?.removeEventListener("keydown",t)}},[]),e}var Ym;const Zm=u.createContext(null);Zm.displayName="UndoManagerContext";function hme(e){return Ym(Zm.Provider,{value:e.undoManager,children:e.children})}function Sb(){return u.useContext(Zm)}function mme(e){function t(s){const o=Sb();return Ym(e,{...s,undoManager:o})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function Tb(){const e=Sb();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function fme(e){function t(s){return Tb(),Ym(e,{...s})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const Wt=$("modal"),gd=u.forwardRef((e,t)=>{const{children:s,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:x=!1,skipDialogClose:y=!1,useTopLayer:T=!0,onCancel:S,onClose:b=Jt,onClickBack:L,onCloseBubbles:N=!1,onOverlayClick:k,scroll:E=!1,subHeading:j,subText:A,width:I}=e;Tb();const w=fU(),O=(0,u.useRef)(null),R=(0,u.useCallback)(()=>{const F=w.current;!y&&F?.open&&F.close(),b()},[b,w,y]);(0,u.useEffect)(()=>{const F=B=>{gs(B)&&!l&&(B.preventDefault(),B.stopPropagation(),S?.(B),R())};return document.addEventListener("keydown",F,!N),()=>{document.removeEventListener("keydown",F,!N)}},[l,S,R,N]),(0,u.useEffect)(()=>{const F=w.current;if(F)return T?F.showModal():F.show(),h||setTimeout(()=>{F.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{F.close()}},[w,T,h]),(0,u.useEffect)(()=>{if(d&&w.current){const B=bb(w.current).find(G=>G.tagName==="INPUT"||G.tagName==="TEXTAREA"||G.tagName==="SELECT"),V=B||O?.current;V?.focus(),V instanceof HTMLTextAreaElement&&V.setSelectionRange(V.value.length,V.value.length)}},[d,w]),(0,u.useEffect)(()=>(i&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{i&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[i,w]);const P=Wt({"force-to-top":f}).mix(o),M=Wt("content",{"with-footer":!!m,"force-scroll":!!E}),H=Wt("overlay",{dark:!!a});return(0,n.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:P.toString(),"data-testid":r,onClose:R,ref:F=>{w.current=F,t&&(t.current=F)},role:"dialog",children:[(0,n.jsx)("div",{id:"modal-portal"}),(0,n.jsx)("div",{className:H,onClick:c?void 0:k||R}),(0,n.jsxs)("div",{className:Wt("dialog",{fullscreen:v}),style:I&&!v?{width:I}:{},children:[(!x||!g)&&(0,n.jsxs)("div",{className:Wt("heading-wrapper"),children:[(0,n.jsxs)("div",{className:Wt("heading-flexbox"),children:[!x&&(0,n.jsxs)("div",{className:Wt("header"),children:[L&&(0,n.jsx)("button",{"aria-label":"back to previous page",className:Wt("back"),onClick:L,type:"button",children:(0,n.jsx)(ie,{className:Wt("back-icon"),name:"arrow-left"})}),(0,n.jsxs)("h1",{className:Wt("heading"),id:"modal-heading",children:[C,(0,n.jsx)("span",{className:Wt("subheading"),children:j})]})]}),!g&&(0,n.jsx)("button",{"aria-label":"close dialog",className:Wt("close"),onClick:R,ref:O,type:"button",children:(0,n.jsx)(ie,{className:Wt("close-icon"),name:"close"})})]}),A?(0,n.jsx)("h2",{className:Wt("subtitle"),children:A}):[]]}),(0,n.jsx)("div",{className:M,children:s}),m&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:Wt("footer-shadow")}),(0,n.jsx)("div",{className:Wt("footer"),children:m})]})]})]})}),Pa=$("locale-selector"),Xm=({onClose:e})=>{const t=(0,we.zy)(),s=re(),o=BE(),r=rl(),a=DE(),i=a?.length?a:o&&r?r?.map(L=>L.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(i?.length||0)>1,h=(0,Me.A)(d),m=at(s?.title),{currentLocale:f,setCurrentLocale:v}=ot(),C=jM(),g=Ce(),[x,y]=(0,u.useState)(!1),T=(0,u.useCallback)(L=>{E8(L),v(L)},[v]),S=()=>{fs(z0(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>{if(!i||x||o===void 0||!r)return;if(i.length===1){T(i[0]),y(!0);return}const L=vg(void 0),N=N8()??"";if(N!==""){T(N),y(!0),l(!1);return}L?.p==null&&N===""?l(!0):(l(!1),S());const E=(navigator.language??"en-US").toLowerCase(),j=i.find(A=>A.toLowerCase()===E);T(j?E:i[0]),y(!0)},[i,t,T,x,o,r,l]);const b=L=>{L.preventDefault();const N=L.target.value;T(N)};return!d||o===void 0||!r?null:(0,n.jsx)(On,{classNames:"modal",timeout:400,children:(0,n.jsx)(gd,{className:Pa("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:S,children:(0,n.jsxs)("div",{className:Pa("container"),children:[(0,n.jsx)("div",{className:Pa("heading"),children:g.l10nChooseLanguage}),(0,n.jsx)("div",{className:Pa("course-title"),children:m}),(0,n.jsx)("div",{className:Pa("selector"),children:(0,n.jsx)("select",{onChange:b,value:f,children:i.map(L=>(0,n.jsx)("option",{value:L,children:C(L)},L))})}),(0,n.jsx)("div",{className:Pa("footer"),children:(0,n.jsx)(dn.ArcButton,{onClick:S,size:"lg",children:g.l10nChooseLanguageContinue})})]})})})},pU=$("cover-container"),Lb=()=>document.querySelector("h1")?.focus({preventScroll:!0});function gU(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=md(),o=Ce()?.overviewPageTitleSuffix,r=sa();return(0,u.useEffect)(()=>{t||e&&Lb()},[e,t]),(0,n.jsxs)(Tr,{title:Yi(`${r} - ${o}`),children:[(0,n.jsx)("main",{children:(0,n.jsx)("div",{className:pU({}),children:(0,n.jsxs)(uU,{children:[(0,n.jsx)(dU,{}),(0,n.jsx)(lU,{})]})})}),(0,n.jsx)(Xm,{onClose:Lb})]})}const vU=gU,CU=/^([^/\s]+)\/([^/\s]+)$/;function xU(e){const t=CU.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function vme(e,t){return`${e}/${t}`}const kb="blockId";function Cme(e,t){return`#/lessons/${e}?${kb}=${t}`}const Nb=(0,u.createContext)(void 0);function vd(){const e=(0,u.useContext)(Nb);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 Eb(e){function t(s){const o=vd();return(0,n.jsx)(e,{...s,...o})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function bU({children:e,lessonId:t,mode:s="readonly",openTranscript:o,closeTranscript:r,onTranscriptUpdate:a,disableTranscriptButton:i=!1}){const c={mode:s,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,n.jsx)(Nb.Provider,{value:c,children:e})}const Ib=(0,u.createContext)(void 0),yU=Ib.Provider;function qi(){return(0,u.useContext)(Ib)}function SU({children:e}){const t=le(s=>s.transcriptPanel);return(0,n.jsx)(yU,{value:t,children:e})}const jb=(0,me.action)(sC),Ji=(0,me.action)(nC),qm=(0,me.action)(oC);function fn(e){return e.refs?da()("audio-id__refs_"+e.refs.toLowerCase()):""}function Jm(e){if(e)return`audio-transcript--${e}`}function wb(e){if(e)return`audio-player-transcript-toggle--${e}`}const Ab=$("course-exit");function Rb(e){const t=Ce(),{className:s,lmsOptions:o,style:r}=e;return o?.enableExitCourse?(0,n.jsx)("div",{className:Ab("wrapper"),children:(0,n.jsx)("button",{className:Ab("button").mix(s),onClick:_p,style:r,type:"button",children:t?.courseExit})}):null}const ef=$("nav-control"),TU=()=>{const[e,t]=(0,u.useState)(!1);return(0,Je.A)(yx,()=>t(!0)),(0,Je.A)(Nm,()=>t(!1)),e},LU=({"aria-controls":e,isNavOpen:t,toggleNav:s,hideNav:o})=>{const{buttonNavigationStyle:r,lmsOptions:a,showNavigationButtons:i,...c}=re(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=Ce(),f=Ui(),v=fl(),C=TU(),g=(0,u.useMemo)(()=>c.lessons?.find(N=>N.id===v),[c.lessons,v]),x=g?.type==="quiz"&&!!g.settings?.timer,y=a?.enableExitCourse,T=x||y,S=c.navigationType===rr.COMPACT,b=S?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const k=document.querySelector(".lesson-nav--previous")?.clientHeight??60,E=!i||r===Vn.FLOATING&&!f;function j({target:A}){const I=A instanceof HTMLElement?A.scrollTop:0,w=k-I;h(w)}return C&&!E?l.current.scrollTop===0?h(k):l.current.addEventListener("scroll",j):h(0),()=>l.current.removeEventListener("scroll",j)},[r,f,C,i]);const L=(0,u.useCallback)(()=>{const N=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),k=N instanceof HTMLElement?N:null;if(l.current&&k){const E=l.current.offsetWidth-l.current.clientWidth||0;k.style.maxWidth=`calc(100% - ${E}px)`}},[]);return(0,u.useLayoutEffect)(()=>{T&&L()},[T,L]),(0,n.jsx)("div",{className:ef("wrapper"),children:(0,n.jsxs)("div",{className:ef("menu",{"is-timed-quiz":x,"nav-off":o,"top-nav-bar":T}),style:{marginTop:d},children:[!o&&(!S||f)&&(0,n.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:ef("button"),onClick:s,type:"button",children:(0,n.jsx)(ie,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,n.jsx)(Rb,{className:b,lmsOptions:a})]})})},Mo=$("nav-compact"),kU=Oe("NavCompactHeaderCounter",e=>{const{lessonPosition:t,labelLessonName:s,labelLessonPreposition:o,totalLessons:r}=e;return t<=0?null:(0,n.jsx)("div",{className:Mo("header-counter"),"data-testid":"nav-compact-counter",children:`${s} ${t} ${o} ${r}`})}),NU=Oe("NavCompactHeaderProgress",e=>{const{classProgressRunner:t,classProgressText:s,classProgressTrack:o,percentComplete:r,percentCompleteText:a,navExpanded:i}=e;return(0,n.jsxs)("div",{className:Mo("header-progress"),"data-testid":"nav-compact-progress",children:[(0,n.jsx)("div",{className:s,children:a}),(0,n.jsx)(dd,{"aria-hidden":i,"aria-label":a,progress:r,runnerClass:t,trackClass:o})]})}),EU=({closeNav:e,isExpanded:t,openNav:s})=>{const o=qt(),r=rt(),a=mr(),i=re(),c=sa(),l=ra(),d=Ce(),h=Lo(),m=cl(),f=fl(),v=UC(),C=(0,u.useMemo)(()=>i?.lessonsOnly?.length??0,[i?.lessonsOnly]),g=(0,u.useMemo)(()=>v[f]??-1,[v,f]),x=a?.navigationStyle,y=(0,u.useMemo)(()=>Li(x),[x]),T=(0,u.useCallback)(()=>{t?e():s()},[t,s,e]),S=a?.exportSettings?.webExportSettings,b=!Sn.isInstantLink&&(a?.lmsOptions?.disableCoverPage||S?.disableCoverPage),L=(0,u.useCallback)(oe=>{oe.preventDefault(),Yn(()=>{o("/")},"lesson-to-cover")},[o]),E=`${on()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:j,ariaLabel:A,media:I,role:w}=xr("coverImage"),O=(0,u.useMemo)(()=>na({alpha:j,color:a?.theme?.coverImageColor??void 0,media:I}),[j,a?.theme?.coverImageColor,I]),R=Mo("header",{collapsed:!t}),P=Mo("header-image",{collapsed:!t}),M="nav-compact__header-inner",H="nav-compact__header-control",F=Mo("header-title-link",{collapsed:!t}),B=Mo("header-progress-text",{collapsed:!t}),V=Mo("header-progress-track",{collapsed:!t}),G=Mo("header-progress-runner",{collapsed:!t}),_="nav-compact__header-strip",Z=(0,u.useCallback)(()=>{r(vi(!h?.active))},[r,h?.active]);return(0,n.jsxs)("section",{"aria-label":"Course Information",className:R,"data-testid":"nav-compact-header",children:[y&&O&&(0,n.jsx)("div",{"aria-label":A,className:P,role:w,style:O}),(0,n.jsxs)("div",{className:M,children:[(0,n.jsxs)("div",{className:_,children:[(0,n.jsxs)("div",{className:"nav-compact__header-controls",children:[a?.allowSearch&&m!=="restricted"&&t&&(0,n.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${H} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:Z,type:"button",children:(0,n.jsx)(Hi,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,n.jsxs)("button",{"aria-controls":"nav-compact-outline","aria-expanded":t,"aria-label":t?d?.a11yNavigationMenuClose:d?.a11yNavigationMenuOpen,className:`${H} nav-compact__header-toggle`,"data-testid":"nav-compact-toggle",onClick:T,type:"button",children:[t&&(0,n.jsx)(AF,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,n.jsx)(RF,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,n.jsx)(kU,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:g,totalLessons:C})]}),(0,n.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:b?(0,n.jsx)("span",{className:F,children:c}):(0,n.jsx)(rs,{className:F,onClick:L,to:"/",children:c})}),(0,n.jsx)(NU,{classProgressRunner:G,classProgressText:B,classProgressTrack:V,navExpanded:t,percentComplete:l,percentCompleteText:E})]})]})};var IU=p(65196),jU=p.n(IU),wU=p(34872),AU=p.n(wU),RU=p(98641),PU=p.n(RU),MU,OU,BU,DU,FU;function Pb(e,t,s="..."){const o=e?e.toString():"";return o.length>t?o.substr(0,t-1)+s:o}const Tme=e=>FU(t=>OU(t)>e,BU(0,e)),HU=new RegExp(/^[0-9]+$/),$U=e=>HU.test(e),VU=e=>e>=0,zU=e=>e<=100,Lme=e=>e==="",kme=e=>$U(e)&&zU(e)&&VU(e),Nme=e=>String(Number(e)),Mb=Pe()(Xr()(""),jU()(AU(),0)),Eme=Pe()(Xr()(" "),ft()(Mb),N0()(" ")),Ob=Pe()(Xr()(" "),N0()(/(?=[A-Z]|^)/)),Ime=e=>e?MU(Mb,DU,Ob)(e):"",jme=Pe()(PU(),Ob);function Bb({id:e,isEnabled:t,isSectionLesson:s,last:o}){const{navigationStyle:r}=re(),{settings:a}=Ot(e)??{},i=ia(e),c=Es(),l=Sh(e),d=(0,u.useMemo)(()=>Eo(r),[r]),h=e===c,m=a?.isGeneratingAIContent===!0,f=Pb(i||"",45),[v,C]=(0,u.useState)(!1),g=(0,u.useCallback)(()=>C(!0),[]),x=(0,u.useCallback)(()=>C(!1),[]),y=s?"nav-compact__outline-section-item":"nav-compact__outline-item",T=`${y}__link`,S=(0,n.jsx)(pd,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:v,onHideTooltip:x,onShowTooltip:g,scope:Co.COMPACT});return(0,n.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,n.jsx)("div",{className:y,children:(0,n.jsx)("span",{"aria-disabled":"true",className:`${T} ${T}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Vi,{className:y,dark:d,isCurrentLesson:h,isTooltipEnabled:!l,last:o,lessonId:e,onHideProgressTooltip:x,onShowProgressTooltip:g,showProgressDelay:0,tooltipClassName:`${y}-tooltip`,children:[f,!l&&S]}),l&&S]})})}const UU=$("nav-compact"),_U=({id:e})=>{const t=Ot(e),s=at(t?.title),o=UU("outline-section-empty");return(0,n.jsx)("div",{className:o,children:(0,n.jsx)("span",{children:s})})};var Ma=p(82920);const GU=({index:e,isEnabled:t,lessonIds:s,id:o})=>{const r=re(),a=r?.theme,i=r?.themeId,c=a?.navigationSectionsExpanded??!0,l=Ot(String(o)),d=at(l?.title),[h,m]=Ma.useState(c);Ma.useEffect(()=>{m(c)},[c]);const[f,v]=Ma.useState(),C=Ma.useRef(null),g=`sublistCompact-${e}`,x=String(i),y=h?"nav-compact__outline-section-toggle-icon":"nav-compact__outline-section-toggle-icon nav-compact__outline-section-toggle-icon--collapsed",T=h?"nav-compact__outline-section-list":"nav-compact__outline-section-list nav-compact__outline-section-list--collapsed",S=h?"nav-compact__outline-section-toggle":"nav-compact__outline-section-toggle nav-compact__outline-section-toggle--collapsed",b=Ma.useCallback(()=>{m(L=>!L)},[]);return Ma.useLayoutEffect(()=>{const L=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(L)}},[s.length,x]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:S,onClick:b,tabIndex:t?void 0:-1,type:"button",children:[(0,n.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,n.jsx)(ux,{className:y})]}),(0,n.jsx)(td,{inert:!h,children:(0,n.jsx)("ol",{"aria-hidden":h?void 0:!0,className:T,id:g,ref:C,role:"list",style:{maxHeight:f},children:s.map((L,N)=>(0,n.jsx)(Bb,{id:L,isEnabled:t&&h,isSectionLesson:!0,last:N===s.length-1},L))})})]})},WU=({index:e,isEnabled:t,lessonIds:s})=>{const[o,...r]=s,a="nav-compact__outline-item nav-compact__outline-section";return Nt()(r)?(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(_U,{id:o})}):(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(GU,{id:o,index:e,isEnabled:t,lessonIds:r})})},KU=({index:e,isEnabled:t,lessonIds:s})=>Cl(s)?(0,n.jsx)(WU,{index:e,isEnabled:t,lessonIds:s}):s.map((r,a)=>(0,n.jsx)(Bb,{id:r,isEnabled:t,isSectionLesson:!1,last:a===s.length-1},r)),QU=Oe("NavCompactOutline",({className:e="",isEnabled:t})=>{const s=bl(),o=Ce(),r=[e,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,n.jsx)("section",{"aria-label":o?.a11yRegionNavOverview,className:r,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:an(s)&&(0,n.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:s.map((a,i)=>Nt()(a)?null:(0,n.jsx)(KU,{index:i,isEnabled:t,lessonIds:a},i))})})});var YU=p(82920);const ZU=()=>{const[e,t]=YU.useState(!1);return(0,Je.A)(Sx,()=>t(!0)),(0,Je.A)(Em,()=>t(!1)),e},Db=$("nav-compact"),Fb="nav-content-compact",XU=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:s},o)=>{const r=mr(),{navigationStyle:a,theme:i}=r??{},c=i?.coverImageColor,l=i?.progressIndicatorStyle,d=le(b=>b.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(b.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>Eo(a),[a]),m=(0,u.useMemo)(()=>a===ar.LIGHT_ACCENT||a===ar.DARK_ACCENT,[a]),f=ZU(),v=(0,u.useMemo)(()=>Li(a),[a]),C=l===et.CIRCULAR_FILL,g=l===et.INCOMPLETE_COMPLETE,x=(0,u.useMemo)(()=>v&&c===nt.LIGHT,[v,c]),y=Db({accent:m,dark:h,light:!h,"image-dark-overlay":v&&!x,"image-light-overlay":v&&x,"progress-circular-fill":C,"progress-incomplete-complete":g,collapsed:!t,navNextIsVisible:f}),T=Db("wrap",{collapsed:!t}),S={transform:`translateY(${d}px)`};return(0,n.jsx)("div",{className:y,"data-testid":"nav-compact",id:Fb,ref:o,style:S,children:(0,n.jsxs)("div",{className:T,children:[(0,n.jsx)(EU,{closeNav:e,isExpanded:t,openNav:s}),(0,n.jsx)(td,{inert:!t,children:(0,n.jsx)(QU,{isEnabled:t})})]})})});function Hb(e,t){const[s,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]),s}const qU={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},$b=Object.assign((0,u.createContext)(qU),{displayName:"OverlayNavControlContext"});function JU(e){const{children:t,closeNav:s,openNav:o}=e,[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>{a(!0)},[]),c=(0,u.useCallback)(()=>{a(!1)},[]);return(0,n.jsx)($b.Provider,{value:{closeNav:s,openNav:o,openSearch:i,closeSearch:c,searchActive:r},children:t})}const Cd=()=>(0,u.useContext)($b),xd=$("nav-overlay"),e_=({className:e})=>{const t=Ce(),s=on(),o=ra(),a=`${s?`%${o}`:`${o}%`} ${t?.lessonComplete??""}`,i=xd("header-progress-runner"),c=xd("header-progress-text"),l=xd("header-progress-track");return(0,n.jsxs)("div",{className:xd("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,n.jsx)(dd,{"aria-hidden":!0,progress:o,runnerClass:i,trackClass:l}),(0,n.jsx)("div",{className:c,children:a})]})},to=$("nav-overlay"),t_=()=>{const e=re(),t=qt(),s=sa(),{allowSearch:o,lmsOptions:r}=e,a=cl(),i=Ce(),c=Cd(),l=(0,u.useRef)(null),d=to("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Sn.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=v=>{v.preventDefault(),Yn(()=>{t("/")},"lesson-to-cover")};return(0,n.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,n.jsxs)("div",{className:to("header-container"),children:[(0,n.jsxs)("div",{className:to("header-controls"),children:[(0,n.jsx)("button",{"aria-label":i?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,n.jsx)(Ql,{className:to("header-close-icon")})}),o&&a!=="restricted"&&(0,n.jsx)("button",{"aria-label":i?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,n.jsx)(Hi,{className:to("header-search-icon")})})]}),(0,n.jsxs)("div",{className:to("header-title-progress-container"),children:[(0,n.jsx)("h1",{className:to("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,n.jsx)("span",{className:to("header-title"),children:s}):(0,n.jsx)(rs,{className:to("header-title-link"),onClick:f,to:"/",children:s})}),(0,n.jsx)(e_,{})]})]})})},bd=({className:e,icon:t})=>{switch(t){case Bs.INTERACTION:return(0,n.jsx)(HF,{className:e,icon:t});case Bs.QUIZ:return(0,n.jsx)(OF,{className:e,icon:t});case Bs.VIDEO:return(0,n.jsx)($F,{className:e,icon:t});case Bs.ARTICLE:return(0,n.jsx)(lx,{className:e,icon:t});default:return(0,n.jsx)(lx,{className:e,icon:t})}},so=$("nav-overlay"),Vb=Oe("NavOverlayOutlineLesson",({first:e,id:t,isEnabled:s,isSectionLesson:o,last:r})=>{const{navigationStyle:a}=re(),{icon:i,settings:c}=Ot(t)??{},l=ia(t),d=Cd(),h=Sh(t),m=Eo(a),f=c?.isGeneratingAIContent===!0,v=so("outline-item",{section:o}),C=`${so("outline-item")}__link`,g=so("outline-item-link-icon",{quiz:i==="Quiz"}),x=(0,u.useCallback)(()=>{d.closeNav()},[d]),[y,T]=(0,u.useState)(!1),S=(0,u.useCallback)(()=>T(!0),[]),b=(0,u.useCallback)(()=>T(!1),[]),L=(0,n.jsx)(pd,{canComplete:h,id:t,isDark:m,isEnabled:s,isTooltipVisible:y,onHideTooltip:b,onShowTooltip:S,scope:Co.OVERLAY});return(0,n.jsx)("li",{className:so("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,n.jsx)("div",{className:v.toString(),children:(0,n.jsxs)("span",{"aria-disabled":"true",className:`${C} ${C}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,n.jsx)("span",{className:so("outline-icon-wrap"),children:(0,n.jsx)(bd,{className:g,icon:i??Bs.ARTICLE})}),(0,n.jsx)("span",{className:so("outline-lesson-title"),children:l})]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Vi,{className:v.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:b,onNavigate:x,onShowProgressTooltip:S,showProgressDelay:null,tooltipClassName:so("outline-item-tooltip").toString(),children:[(0,n.jsx)("span",{className:so("outline-icon-wrap"),children:(0,n.jsx)(bd,{className:g,icon:i??Bs.ARTICLE})}),(0,n.jsx)("span",{className:so("outline-lesson-title"),children:l}),!h&&L]}),h&&L]})})}),s_=$("nav-overlay"),n_=({id:e})=>{const t=Ot(e),s=at(t?.title);return(0,n.jsx)("span",{className:s_("outline-section-text"),children:s})},zb=$("nav-overlay"),o_=({isEnabled:e,lessonIds:t})=>{const s=(0,u.useRef)(null);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:zb("outline-section-divider")}),(0,n.jsx)("ol",{className:zb("outline-section-list"),ref:s,role:"list",children:t.map((o,r)=>(0,n.jsx)(Vb,{id:o,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},o))})]})},r_=$("nav-overlay"),a_=({index:e,isEnabled:t,lessonIds:s})=>{const[o,...r]=s,a=r_("outline-item").mix("nav-overlay__outline-section");return Nt()(r)?(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(n_,{id:o})}):(0,n.jsx)("li",{className:a,role:"listitem",children:(0,n.jsx)(o_,{index:e,isEnabled:t,lessonIds:r})})},i_=({index:e,isEnabled:t,lessonIds:s})=>{const o=Cl(s),r=ia(s[0]),a=$("nav-overlay");return o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:a("outline-section-text"),children:r}),(0,n.jsx)("ol",{className:a("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,n.jsx)(a_,{index:e,isEnabled:t,lessonIds:s})})]}):s.map((i,c)=>(0,n.jsx)(Vb,{first:c===0,id:i,isEnabled:t,isSectionLesson:!1,last:c===s.length-1},i))},c_=$("nav-overlay"),l_=Oe("NavOverlayOutline",({isEnabled:e})=>{const t=bl(),s=Ce();return(0,n.jsx)("section",{"aria-label":s?.a11yRegionNavOverview,className:c_("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:an(t)&&(0,n.jsx)(n.Fragment,{children:t.map((o,r)=>Nt()(o)?null:(0,n.jsx)(i_,{index:r,isEnabled:e,lessonIds:o},`lessonIdGroup-${r}`))})})});var d_=p(59776),yd=p.n(d_),kr=p(47100),u_=p(99962),Sd=p.n(u_);const tf=Array.isArray,Ub=e=>typeof e=="number",Td=e=>!Ct()(e)&&typeof e=="object",sf=e=>typeof e=="string",h_=(e,t,s)=>(o,r)=>{const a=xo()(r,e);if((0,_t.uW)(o)){const i=s[o.l10nId];return typeof i!="string"?!1:!Nt()(Sd()(t,(0,kr.htmlDecode)(i)))}else return Td(o)?_b(e,t,s)(o):a&&sf(o)?!Nt()(Sd()(t,(0,kr.htmlDecode)(o))):!1},_b=(e,t,s)=>o=>{const r=vn()(h_(e,t,s),o);return xo()(!0,Xs()(r))},m_=_b;var f_=p(89560),nf=p.n(f_),p_=p(79537),of=p.n(p_);const g_=nf(),v_=es(),C_=(e,t,s)=>(o,r)=>{const a=xo()(r,e);if(tf(o))return Xs()(rf(e,t,s)(o));if((0,_t.uW)(o)){const i=s[o.l10nId];return typeof i!="string"?0:Fs()(Sd()(t,(0,kr.htmlDecode)(i)))}else return Td(o)?rf(e,t,s)(o):a&&sf(o)?Fs()(Sd()(t,(0,kr.htmlDecode)(o))):0},rf=(e,t,s)=>o=>vn()(C_(e,t,s),o),af=e=>{if(tf(e))return ft()(af,e);if(Td(e))return af(Xs()(e));if(Ub(e))return e},x_=(e,t,s)=>o=>{const r=rf(e,t,s)(o),a=ft()(af,Xs()(r)),i=Bc()(a).filter(Ub),c=of()(g_,0,i);return v_("results",c,o)},b_=(e,t,s)=>(o,r)=>{const a=xo()(r,e);return tf(o)?Xs()(cf(e,t,s)(o)):Td(o)?cf(e,t,s)(o):a&&sf(o)?Gr()(t,s,o):o},cf=(e,t,s)=>o=>vn()(b_(e,t,s),o),Gb=cf,Wb=(e,t,s,o,r)=>{const a=["caption","code","description","heading","message","name","paragraph","title"];if(Nt()(e))return!1;const i=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${i})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=Gb(a,c,l),h=Gb(Object.keys(s),c,l),m=ft()(y=>{const T=d(y);return Array.isArray(T)?y:{...y,...T}},t),f=o?o(e):{},v=h(s),C=y=>f[y.id]>0||m_(a,c,s)(y),g=y=>x_(a,c,s)(y),x=ft()(g,Dn()(C,t));x.forEach(y=>{y.results+=f[y.id]??0}),r(e,x,Array.isArray(v)?s:v,m)};function y_(e){if(!e)return!0;for(const t in e)return!1;return!0}function Kb(){const{lessons:e,mondrian:t}=re(),{currentLocale:s}=ot(),[o,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{y_(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,s)??{},[o,e,t,s])}const S_=Xi.Ay.animateScroll,_s=$("nav-overlay"),T_=()=>{const e=rt(),t=CC(),s=Cd(),{lessons:o}=re(),[r,a]=(0,u.useState)(""),i=Kb(),c=(0,u.useRef)(null),l=Ce(),d=_s("search-close-btn"),h=_s("search-clear-btn"),m=(0,u.useCallback)(()=>{s.closeSearch(),s.closeNav(),e([Qv(!0),vi(!1),ur(null)])},[e,s]),f=(0,u.useCallback)(()=>{a(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const v=(0,u.useCallback)(x=>{gs(x)&&!yd()(r)?(x.preventDefault(),a(""),e(ur(null))):gs(x)&&yd()(r)&&m()},[e,m,r]);(0,Je.A)("keydown",v);const C=(0,u.useCallback)(x=>{a(x.target.value)},[]),g=(0,u.useCallback)(x=>{if(x.preventDefault(),r){const y=(T,S,b,L)=>{e([ur(T),Yv(S),Zv(b),Xv(L),vi(!0)]),S_.scrollToTop({duration:500,smooth:!0})};s.closeNav(),s.closeSearch(),Wb(r,o,t??{},i,y)}},[r,i,s,o,t,e]);return(0,n.jsxs)("div",{className:_s("search"),"data-testid":"nav-overlay-search-container",children:[(0,n.jsx)("div",{className:_s("search-header"),children:(0,n.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,n.jsx)(Ql,{className:_s("search-close-icon")})})}),(0,n.jsx)("div",{className:_s("search-body"),children:(0,n.jsxs)("form",{autoComplete:"off",onSubmit:g,children:[(0,n.jsxs)("div",{className:_s("search-container"),children:[(0,n.jsx)(Hi,{className:_s("search-icon")}),(0,n.jsx)("input",{"aria-label":l?.a11ySearchInput,className:_s("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,n.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,n.jsx)(Ql,{className:_s("search-clear-icon").toString()})})]}),(0,n.jsx)("div",{className:_s("search-actions"),children:(0,n.jsx)("button",{className:_s("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},lf=$("nav-overlay"),Qb="nav-content-overlay",L_=({isExpanded:e,outlineRef:t})=>{const o=bl()[0],r=Cl(o),a=lf("body",{section:r});return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t_,{}),(0,n.jsx)("div",{className:a,ref:t,children:(0,n.jsx)(l_,{isEnabled:e})})]})},k_=({children:e,isImage:t,hasStickyHeader:s})=>{const o=lf("content",{graphic:t,"has-sticky-header":s});return(0,n.jsxs)("div",{className:o,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,n.jsx)(bm,{})]})},N_=({isExpanded:e})=>{const t=(0,u.useRef)(null),[s,o]=(0,u.useState)(null),r=re(),a=Cd(),i=(0,Me.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===ir.ACCENT,m=c===ir.TINT,f=Eo(c),v=c===ir.GRAY,C=c===ir.LIGHT,g=Li(c),x=l===et.CIRCULAR_FILL,y=l===et.INCOMPLETE_COMPLETE,[T,S]=(0,u.useState)(!0),{isIntersecting:b=!1}=Hb(s,{root:t?.current,threshold:1})||{},L=(0,Me.A)(b),N=(0,u.useMemo)(()=>g&&d===nt.LIGHT,[g,d]),k=lf({"accent-tint":m,accent:h,dark:f,gray:v,"image-dark-overlay":g&&!N,"image-light-overlay":g&&N,light:C,"progress-circular-fill":x,"progress-incomplete-complete":y,closing:i&&!e});return(0,u.useEffect)(()=>{e?t.current?.showModal():setTimeout(()=>{t.current?.close()},500)},[e]),(0,u.useEffect)(()=>{const E=j=>{gs(j)&&!a.searchActive&&(j.preventDefault(),a.closeNav())};return e?document.addEventListener("keydown",E):document.removeEventListener("keydown",E),()=>{document.removeEventListener("keydown",E)}},[e,a]),(0,u.useEffect)(()=>{!T&&b?S(!0):L&&!b&&S(!1)},[b,T,L,S]),(0,n.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:k,"data-testid":"nav-overlay",id:Qb,ref:t,children:(0,n.jsx)(k_,{hasStickyHeader:T,isImage:g,children:a.searchActive?(0,n.jsx)(T_,{}):(0,n.jsx)(L_,{isExpanded:e,outlineRef:o})})})},ec=$("nav-sidebar-search"),E_=Oe("NavSidebarSearch",({className:e="",isEnabled:t})=>{const s=rt(),o=CC(),r=(0,Me.A)(t),{lessons:a}=re(),i=Lo(),c=Ce(),l=(0,u.useRef)(null),d=ec({disabled:!t}).mix(e),h=ec("icon"),m=ec("input"),f=ec("close"),v=ec("close-icon"),C=i?.term,g=!t,[x,y]=(0,u.useState)(""),T=Kb(),S=(0,u.useCallback)(()=>{s([Qv(!0),vi(!1),ur(null)]),y("")},[s]),b=(0,u.useCallback)(k=>{gs(k)&&!yd()(x)?(k.preventDefault(),y(""),s(ur(null))):gs(k)&&yd()(x)&&S()},[s,S,x]),L=(0,u.useCallback)(k=>{C!=null&&s(ur(null)),y(k.target.value)},[s,C]),N=(0,u.useCallback)(k=>{k.preventDefault(),Wb(x,a,o??{},T,(j,A,I,w)=>s([ur(j),Yv(A),Zv(I),Xv(w)]))},[s,a,o,x,T]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{C&&C!==x&&y(C)},[x,C]),(0,n.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:N,children:[(0,n.jsx)(Hi,{className:h}),(0,n.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:g,name:"search",onChange:L,onKeyDown:b,placeholder:c?.search,ref:l,type:"search",value:x}),(0,n.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:S,type:"reset",children:(0,n.jsx)(Ql,{className:v})})]})}),Gs=$("nav-sidebar-header"),I_=$("nav-sidebar-header-ghost"),j_=()=>le(e=>e.ui.skipToNavButton?.offsetHeight??0),w_=Oe("NavSidebarHeaderProgress",e=>{const{classProgressRunner:t,classProgressText:s,classProgressTrack:o,percentComplete:r,percentCompleteText:a}=e;return(0,n.jsxs)("div",{className:Gs("progress"),"data-testid":"nav-sidebar-progress",children:[(0,n.jsx)(dd,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:o}),(0,n.jsx)("div",{className:s,children:a})]})}),A_=Oe("NavSidebarHeader",({className:e,isCompact:t,isEnabled:s,navRefWidth:o,setIsCompact:r})=>{const a=rt(),i=qt(),[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=j_(),[x,y]=(0,u.useState)(null),T=(0,u.useRef)(null),S=(0,u.useRef)(null),[b,L]=(0,u.useState)(null),N=re(),k=sa(),E=Ce(),j=ra(),A=Lo(),I=Wh(),w=on(),O=cl(),R=N?.exportSettings?.webExportSettings,P=!Sn.isInstantLink&&(N?.lmsOptions?.disableCoverPage||R?.disableCoverPage),M=N?.allowSearch&&O!=="restricted",H=N?.theme?.coverImageColor,F=N?.navigationStyle,B=(0,u.useMemo)(()=>Li(F),[F]),V=!!PH(),G=(0,Me.A)(A),_=(A?.active||V)??!1,[Z,oe]=(0,u.useState)(!0),[Q,z]=(0,u.useState)(null),D=Gs({compact:t,searching:_,transition:Z}).mix(e),U=Gs("inner",{compact:t}),K=Gs("content",{compact:t,hidden:_}),Y=Gs("graphic",{image:B}),q=Gs("progress-runner"),ee=Gs("progress-text",{compact:t}),J=Gs("progress-track"),ne=Gs("search-area",{hidden:!_}),te=Gs("search-btn",{hidden:_}),Te=Gs("search-icon"),W=Gs("title",{compact:t}),ue=I_({compact:t,searching:_}),pe=`${w?`%${j}`:`${j}%`} ${E?.lessonComplete}`,he=s&&!_?void 0:-1,xe=s&&!_?void 0:-1,{alpha:ge,media:Ye}=xr("coverImage"),Vt=(0,u.useMemo)(()=>{const Le={};return B&&Object.assign(Le,na({alpha:ge,color:H??void 0,media:Ye})),_&&(Le.height=m.height),Le},[ge,H,Ye,B,_,m.height]),zt=(0,u.useMemo)(()=>{const Le={};return t&&(Le.bottom=`calc(100% - ${g}px)`,Le.width=o||0,Le.transition="width 0.3s",s||(Le.transition="width 0.3s",Le.width="0rem")),d.height&&(Le.height=d.height,Le.overflow="hidden",t&&(Le.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),Le},[t,s,o,d.height,g]);(0,u.useEffect)(()=>{l(t&&I?Pb(k??"",45):k)},[k,t,I]);const dt=_?void 0:{height:v.height},Qt=(0,u.useCallback)(()=>{f(d),a(vi(!0))},[a,d]),io=(0,u.useCallback)(Le=>{Le.preventDefault(),Yn(()=>{i("/")},"lesson-to-cover")},[i]);(0,u.useLayoutEffect)(()=>{z(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:Ke=!1}=Hb(x,{root:Q,threshold:0})||{},Yt=(0,Me.A)(Ke);(0,u.useEffect)(()=>{const Le=b!=null&&window.innerHeight*.4>=b.offsetHeight;Yt&&!Ke&&Le?r(!0):!Yt&&Ke&&r(!1)},[Ke,Yt,b,r]);const Ut=(0,u.useCallback)(({target:Le})=>{const $e={height:Le?.scrollHeight??0,width:o??0};h($e),f($e),t||C($e)},[t,o]);Jl(b,Ut),(0,u.useLayoutEffect)(()=>{const Le=Q?.scrollTop??0;(Q||Le>0)&&Q&&(Q.scrollTop=0);const $e={height:b?.scrollHeight??0,width:o??0};h($e),f($e),C($e)},[Q,o,b]),(0,u.useEffect)(()=>{M&&G?.active&&!A?.active&&T?.current?.focus()},[M,A,G]),(0,u.useEffect)(()=>{_?oe(!0):t&&oe(!1)},[_,t]);const us=(0,u.useCallback)(Le=>{const $e=Le.target;if(!($e instanceof HTMLElement)||!$e.hasAttribute("data-nav-item")||!t||!b||!Q)return;const Ys=b.getBoundingClientRect(),co=$e.getBoundingClientRect();Ys.bottom>co.top&&(Q.scrollTop-=Ys.height-co.top+5)},[Q,t,b]);return(0,Je.A)("focusin",us,Q),(0,u.useEffect)(()=>l(k),[k]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:ue,ref:y,style:dt}),(0,n.jsx)("div",{className:D,"data-testid":"nav-sidebar-header",ref:S,style:zt,children:(0,n.jsxs)("div",{className:U,ref:L,children:[(0,n.jsx)("div",{className:Y,style:Vt}),M&&(0,n.jsx)("button",{"aria-label":E?.a11ySearchOpen,className:te,onClick:Qt,tabIndex:he,type:"button",children:(0,n.jsx)(Hi,{className:Te})}),(0,n.jsx)("div",{className:ne,children:(0,n.jsx)(E_,{isEnabled:s&&_})}),(0,n.jsxs)("div",{className:K,children:[P?(0,n.jsx)("span",{className:W,"data-testid":"nav-sidebar-title",tabIndex:xe,children:c}):(0,n.jsx)(rs,{className:W,"data-testid":"nav-sidebar-title",onClick:io,tabIndex:xe,to:"/",children:c}),(0,n.jsx)(w_,{classProgressRunner:q,classProgressText:ee,classProgressTrack:J,percentComplete:j,percentCompleteText:pe})]})]})})]})}),R_=$("nav-sidebar");function Yb({closeNav:e,id:t,isEnabled:s,isSectionLesson:o,last:r}){const a=String(t),{navigationStyle:i}=re(),{icon:c,settings:l}=Ot(t)??{},d=ia(t),h=Es(),m=Ui(),f=Sh(a),v=a===h,C=l?.isGeneratingAIContent===!0,g=(0,u.useMemo)(()=>Eo(i),[i]),x=o?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",y=`${x}__link`,T=`${x}-link-icon`,S=(0,n.jsx)(bd,{className:T,icon:c??Bs.ARTICLE}),[b,L]=(0,u.useState)(!1),N=(0,u.useCallback)(()=>L(!0),[]),k=(0,u.useCallback)(()=>L(!1),[]),E=(0,n.jsx)(pd,{canComplete:f,id:a,isDark:g,isEnabled:s,isTooltipVisible:b,onHideTooltip:k,onShowTooltip:N,scope:Co.SIDEBAR}),j=()=>{e&&m&&e()};return(0,n.jsx)("li",{className:R_("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:C?(0,n.jsx)("div",{className:x,children:(0,n.jsxs)("span",{"aria-disabled":"true",className:`${y} ${y}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[S,d]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(Vi,{className:x,dark:g,isCurrentLesson:v,isTooltipEnabled:!f,lessonId:a,onHideProgressTooltip:k,onNavigate:j,onShowProgressTooltip:N,showProgressDelay:0,tooltipClassName:`${x}-tooltip`,children:[S,d,!f&&E]}),f&&E]})})}const P_=({id:e})=>{const t=Ot(e),s=at(t?.title);return(0,n.jsx)("span",{className:"nav-sidebar__outline-section-text",children:s})};var Oa=p(82920);const M_=({closeNav:e,id:t,index:s,isEnabled:o,lessonIds:r})=>{const a=re(),i=a?.theme,c=a?.themeId,l=i?.navigationSectionsExpanded??!0,d=ia(String(t)),[h,m]=Oa.useState(l);Oa.useEffect(()=>{m(l)},[l]);const[f,v]=Oa.useState(),C=Oa.useRef(null),g=`sidebar-sublist-${s}`,x=C.current?.clientWidth,y=String(c),T=h?"nav-sidebar__outline-section-toggle-icon":"nav-sidebar__outline-section-toggle-icon nav-sidebar__outline-section-toggle-icon--collapsed",S=h?"nav-sidebar__outline-section-list":"nav-sidebar__outline-section-list nav-sidebar__outline-section-list--collapsed",b=Oa.useCallback(()=>{m(L=>!L)},[]);return Oa.useLayoutEffect(()=>{const L=setTimeout(()=>{C.current&&v(C.current.scrollHeight)},0);return()=>{clearTimeout(L)}},[r.length,x,y]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{"aria-controls":g,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:b,tabIndex:o?void 0:-1,type:"button",children:[(0,n.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,n.jsx)(ux,{className:T})]}),(0,n.jsx)(td,{inert:!h,children:(0,n.jsx)("ol",{"aria-hidden":h?void 0:!0,className:S,id:g,ref:C,role:"list",style:{maxHeight:f},children:r.map((L,N)=>(0,n.jsx)(Yb,{closeNav:e,id:L,isEnabled:o&&h,isSectionLesson:!0,last:N===r.length-1},L))})})]})},O_=({closeNav:e,index:t,isEnabled:s,lessonIds:o})=>{const[r,...a]=o,i="nav-sidebar__outline-item nav-sidebar__outline-section";return Nt()(a)?(0,n.jsx)("li",{className:i,role:"listitem",children:(0,n.jsx)(P_,{id:r})}):(0,n.jsx)("li",{className:i,role:"listitem",children:(0,n.jsx)(M_,{closeNav:e,id:r,index:t,isEnabled:s,lessonIds:a})})},B_=({closeNav:e,index:t,isEnabled:s,lessonIds:o})=>Cl(o.map(String))?(0,n.jsx)(O_,{closeNav:e,index:t,isEnabled:s,lessonIds:o}):o.map((a,i)=>(0,n.jsx)(Yb,{closeNav:e,id:a,isEnabled:s,isSectionLesson:!1,last:i===o.length-1},a)),D_=Oe("NavSidebarOutline",({className:e="",closeNav:t,isEnabled:s})=>{const o=bl(),[r,a]=(0,u.useState)(!s),i=Ce(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"nav-sidebar__outline--hidden":void 0,Kn.isSafari?"nav-sidebar__outline--safari":void 0].filter(Boolean).join(" "),h=["nav-sidebar__outline-list",s?void 0:"nav-sidebar__outline-list--disabled",r?"nav-sidebar__outline-list--hidden":void 0].filter(Boolean).join(" ");return(0,u.useEffect)(()=>(s?(clearTimeout(l.current??void 0),a(!1)):l.current=setTimeout(()=>{a(!0)},350),()=>{clearTimeout(l.current??void 0)}),[s]),(0,n.jsx)("section",{"aria-label":i?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:an(o)&&(0,n.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:o.map((m,f)=>Nt()(m)?null:(0,n.jsx)(B_,{closeNav:t,index:f,isEnabled:s,lessonIds:m},f))})})});var F_=p(10036);const Ba=$("nav-sidebar-result"),Zb=({result:e})=>{const t=Ce(),s=e?.icon??Bs.ARTICLE,o=at(e?.title),r=e?.results??0,a=r===1?t?.result:t?.results,i=Ba("icon"),c=Ba("title"),l=Ba("count");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(bd,{className:i,icon:s}),(0,n.jsx)("span",{className:c,children:o}),(0,n.jsx)("span",{className:l,children:`${r} ${a}`})]})},H_=({id:e,index:t,isEnabled:s,onSelectResult:o})=>{const r=re(),a=(0,we.RQ)(kh),i=(0,we.RQ)(Nh),c=a??i,l=WE(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,v=s?void 0:-1,C={animationDelay:`${t/10}s`},g=l?.id,x=Ni(g==null?void 0:String(g)),y=(0,u.useMemo)(()=>Eo(f),[f]),T=Ba(),S=Ba("inner",{active:d}),b=Ba("link",{dark:y,light:!y});return(0,n.jsx)("li",{className:T,role:"listitem",style:C,children:(0,n.jsx)("div",{className:S,style:{color:m},children:s&&x==null?(0,n.jsx)(rs,{"aria-current":h,className:b,onClick:o,tabIndex:v,to:ks(e),children:(0,n.jsx)(Zb,{result:l})}):(0,n.jsx)(Ix,{className:b,restriction:x,tooltipClassName:"lesson-nav-link-tooltip",children:(0,n.jsx)(Zb,{result:l})})})})},Ld=$("nav-sidebar-results"),$_=[],V_=({closeNav:e,isEnabled:t})=>{const{announcePolite:s}=xn(),o=re(),r=Lo(),a=Ce(),c=(r?.activeLessons??$_).filter(wC),l=r?.term,d=an(c),h=(0,F_.A)(l),m=a?.noResults??"",f=o?.navigationStyle,v=(0,u.useMemo)(()=>Eo(f),[f]),C=Ld(),g=Ld("message",{dark:v,light:!v}),x=Ld("term"),y=Ld("list"),T=Lt(960),S=u.useCallback(()=>{T&&e()},[e,T]);return(0,u.useEffect)(()=>{if(h){const b=c.length===1?a?.result:a?.results,L=d?`${c.length} ${b}`:`${a?.noResults} ${l}`;s?.(L)}},[s,d,h,c,a,l]),(0,n.jsxs)("div",{className:C,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,n.jsxs)("div",{className:g,children:[m," ",(0,n.jsxs)("span",{className:x,children:['"',l,'"']})]}),d&&h&&(0,n.jsx)("ol",{className:y,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((b,L)=>(0,n.jsx)(H_,{id:b.id,index:L,isEnabled:t,onSelectResult:S},b.id))})]})},kd=$("nav-sidebar"),Xb="nav-content-sidebar",z_=({isExpanded:e,closeNav:t})=>{const s=re(),o=Lo(),[r,a]=(0,u.useState)(!1),[i,c]=(0,u.useState)(0),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=s?.color,m=s?.theme?.coverImageColor,f=s?.isLegacyCourse,v=s?.navigationStyle,C=s?.theme?.accentContrast,g=s?.theme?.progressIndicatorStyle,x=o?.active??!1,y=x||e?void 0:"true";(0,u.useLayoutEffect)(()=>{l&&l?.current&&c(l.current?.scrollWidth)},[r,e,l,x,c]);const T=(0,u.useMemo)(()=>BI(v),[v]),S=(0,u.useMemo)(()=>Eo(v),[v]),b=(0,u.useMemo)(()=>Li(v),[v]),L=b&&m===nt.LIGHT,N=Ns(h),k=g===et.CIRCULAR_FILL,E=g===et.INCOMPLETE_COMPLETE,j=C?C===be.DARK||C===be.AUTO&&N===be.DARK:N===be.DARK,A=kd("header"),I=kd("body"),w=kd("content"),O=kd({accent:T,"dark-contrast":!b&&j,"light-contrast":!b&&!j,"legacy-pre-themes":f,"image-dark-overlay":b&&!L,"image-light-overlay":b&&L,"progress-circular-fill":k,"progress-incomplete-complete":E,collapsed:!e,dark:S,light:!S,searching:x});return(0,n.jsx)(td,{inert:!e,children:(0,n.jsx)(Qo,{children:(0,n.jsx)(Pc,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,n.jsx)("div",{"aria-hidden":y,className:O,"data-testid":"nav-sidebar",ref:d,children:(0,n.jsxs)("div",{className:w,"data-nav-scrollable":!0,id:Xb,children:[(0,n.jsx)(A_,{className:A,isCompact:r,isEnabled:e,navRefWidth:i,setIsCompact:a}),(0,n.jsxs)("div",{className:I,"data-testid":"nav-sidebar-body",ref:l,children:[(0,n.jsx)(D_,{closeNav:t,isEnabled:e&&!x}),(0,n.jsx)(V_,{closeNav:t,isEnabled:e&&x})]})]})})})})})},Nr={x:null,y:null},Nd={passive:!0};function qb({children:e,onSwipeDown:t,onSwipeLeft:s,onSwipeRight:o,onSwipeUp:r,onShouldRecognizeGesture:a=()=>!0,thresholdX:i=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(Nr),[m,f]=(0,u.useState)(Nr),v=(0,u.useCallback)(y=>{const T=y.touches?.length??0,S=y.targetTouches[0],b=a?a():!0;T==1&&S&&b?h({x:S.clientX,y:S.clientY}):h(Nr)},[a]),C=(0,u.useCallback)(y=>{const T=y.targetTouches[0];T&&f({x:T.clientX,y:T.clientY})},[]),g=(0,u.useCallback)(()=>{h(Nr),f(Nr)},[]),x=(0,u.useCallback)(y=>{const T=y.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||T>0)return;const S=m.x-d.x,b=m.y-d.y;Math.abs(S)>Math.abs(b)?Math.abs(S)>i&&(S<0?s?.():o?.()):Math.abs(b)>c&&(b<0?r?.():t?.()),h(Nr),f(Nr)},[t,s,o,r,i,c,m,d]);return(0,Je.A)("touchstart",v,l.current,Nd),(0,Je.A)("touchcancel",g,l.current,Nd),(0,Je.A)("touchmove",C,l.current,Nd),(0,Je.A)("touchend",x,l.current,Nd),(0,n.jsx)("div",{ref:l,children:e})}qb.propTypes={children:yt().oneOfType([yt().arrayOf(yt().element),yt().element]).isRequired,onShouldRecognizeGesture:yt().func,onSwipeDown:yt().func,onSwipeLeft:yt().func,onSwipeRight:yt().func,onSwipeUp:yt().func,thresholdX:yt().number.isRequired,thresholdY:yt().number.isRequired};function Ed({isEnabled:e=!0,...t}){return e?(0,n.jsx)(qb,{...t}):(0,n.jsx)("div",{children:t.children})}Ed.propTypes={children:yt().oneOfType([yt().arrayOf(yt().element),yt().element]).isRequired,isEnabled:yt().bool.isRequired};const Id={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},U_=[Id.TABLET_PORTRAIT,Id.TABLET_LANDSCAPE,Id.MOBILE_PORTRAIT,Id.MOBILE_LANDSCAPE],tc=e=>U_.includes(e),__=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,s=tc(e);return t||s},[e]),Jb=$("course-navigation"),{COMPACT:jd,OVERLAY:df,SIDEBAR:Er}=rr,G_={[jd]:Fb,[Er]:Xb,[df]:Qb},W_=({hasSearchResults:e,courseNavType:t,openNav:s,closeNav:o})=>{const[r,a]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===Er)?(o(),a(!1)):r&&t===df?s():a(e)},[e,t,s,o,r]),r},K_=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:s,isTablet:o,openNav:r,closeNav:a})=>{const[i,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===Er&&t&&(!i&&o&&s?a():i===!0&&!o&&!s&&r(),c(o))},[e,t,s,o,r,a,i])},Q_=({beginWithSidebarOpen:e,children:t,closeNav:s,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}=Lo()??{},C=Ce(),g=W_({hasSearchResults:v,courseNavType:o,openNav:c,closeNav:s}),x=(0,u.useMemo)(()=>g||o===jd&&a?Er:o,[o,g,a]);K_({activeNavType:x,beginWithSidebarOpen:e,closeNav:s,openNav:c,isNavOpen:r,isTablet:a}),(0,u.useEffect)(()=>{const N=E=>{E.relatedTarget instanceof Node&&f.current?.contains(E.relatedTarget)===!0&&s()},k=()=>{f.current?.removeEventListener("click",s),f.current?.removeEventListener("keypress",s),f.current?.removeEventListener("blur",N,!0)};return x===jd&&r?(f.current?.addEventListener("click",s),f.current?.addEventListener("keypress",s),f.current?.addEventListener("blur",N,!0)):k(),k},[x,r,s]);const y=__(l),T=(0,u.useCallback)(()=>{const N=x===rr.SIDEBAR;y&&N&&r&&s()},[s,r,y,x]),S=(0,u.useMemo)(()=>x!=null?G_[x]:void 0,[x]),b=Jb(x?.toLowerCase()??null,{"nav-open":r,"search-open":v&&r,"course-nav-type":o?.toLowerCase()}),L=Jb("lessonNav",{type:i?.toLowerCase()});return(0,n.jsx)(kH,{isCourseNavOpen:r,children:(0,n.jsx)("div",{className:b,children:(0,n.jsx)(Ed,{isEnabled:x===rr.SIDEBAR,onSwipeLeft:T,children:(0,n.jsxs)("div",{className:L,children:[(0,n.jsxs)("nav",{"aria-label":C?.a11yRegionNavLesson,children:[(0,n.jsx)(LU,{"aria-controls":S,hideNav:h,isNavOpen:r,toggleNav:d}),x===Er&&(0,n.jsx)(z_,{closeNav:s,isExpanded:r}),x===jd&&(0,n.jsx)(XU,{closeNav:s,isExpanded:r,openNav:c,ref:m}),x===df&&(0,n.jsx)(JU,{closeNav:s,openNav:c,children:(0,n.jsx)(N_,{isExpanded:r})})]}),(0,n.jsx)("div",{ref:f,children:t})]})})})})},Y_=({children:e,isLessonOnlyEmbed:t,...s})=>{const{buttonNavigationStyle:o,navigationType:r,lmsOptions:a,...i}=re(),c=Ui(),l=gh(i)===!0,d=!c,h=i.sidebarMode===Kr.OPEN,m=l&&r===Er&&h&&d,f=vo(i),v=f&&i?.theme?.blockNavigationType===Xc.CONTINOUS,[C,g]=(0,u.useState)(m),x=(0,u.useCallback)(()=>{g(!0)},[]),y=(0,u.useCallback)(()=>{g(!1)},[]),T=(0,u.useCallback)(()=>C?y():x(),[C,y,x]);(0,Je.A)(vx,x),(0,Je.A)(Cx,y);const S=f||t===!0,b=S?"fixed-course-exit":void 0,L=v?{marginInlineEnd:"2rem"}:void 0,N=l?r:void 0;return S?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Rb,{className:b,lmsOptions:a,style:L}),e]}):(0,n.jsx)(Q_,{...s,beginWithSidebarOpen:h,closeNav:y,courseNavType:N,hideNav:!l,isNavOpen:C,isTablet:c,lessonNavType:o,openNav:x,toggleNav:T,children:e})};var e3=p(56668);function Z_(e){const t=Ce(),s=bj(e),o=yj(e),r=Th(),a=s?.id,i=Ni(a),c=at(i?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:s,nextLessonNumber:o,restrictionData:a?c:void 0,restrictionType:a?i?.type:void 0,totalLessons:r}}const wd=$("lesson-nav");function X_({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:s,nextLesson:o,nextLessonNumber:r,onFocus:a,ref:i,restrictionData:c,restrictionType:l,totalLessons:d}){const h=o?.id,m=yr(),f=La(m),C=o&&Yr(o)&&h,g=Ae(o?.title)||"",x=C?`${r} ${s} ${d} \u2014 ${g}`:g,y=f&&C?`${t} ${r}`:x;return(0,n.jsx)(ka,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:a,ref:i,restrictionData:c,restrictionType:l,children:f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:wd("link-text"),children:y}),(0,n.jsx)(Kl,{className:wd("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Kl,{className:wd("link-icon")}),(0,n.jsx)("span",{className:wd("link-text"),children:y})]})})}const q_=Oe("LessonNavNext",X_);function t3({lessonId:e,...t}){const s=Z_(e);return(0,n.jsx)(q_,{...t,...s})}const Ad=$("lesson-nav");function J_({allowTooltip:e,courseFinishLabel:t,onFocus:s,ref:o,restrictionData:r,restrictionType:a}){const i=yr(),c=La(i);return(0,n.jsx)(ka,{allowTooltip:e,direction:"next",finish:!0,onFocus:s,ref:o,restrictionData:r,restrictionType:a,children:c?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:Ad("link-text"),children:t}),(0,n.jsx)(Kl,{className:Ad("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Kl,{className:Ad("link-icon")}),(0,n.jsx)("span",{className:Ad("link-text"),children:t})]})})}const eG=Oe("LessonNavFinish",J_);function uf(e){const s=Ce()?.courseFinish??"Finish";return(0,n.jsx)(eG,{...e,courseFinishLabel:s})}const Rd=$("lesson-nav");function tG({allowTooltip:e,className:t,courseHomeLabel:s,lessonNameLabel:o,lessonPrepositionLabel:r,onFocus:a,previousLesson:i,previousLessonNumber:c,ref:l,totalLessons:d}){const h=i?.id,m=yr(),f=La(m),C=Yr(i)&&h!=null,g=at(i?.title)??s,x=C?`${c} ${r} ${d} \u2014 ${g}`:g,y=f&&C?`${o} ${c}`:x;return(0,n.jsx)(ka,{allowTooltip:e,className:t,direction:"previous",navLessonId:h,onFocus:a,ref:l,children:f?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:Rd("link-text"),children:y}),(0,n.jsx)(dx,{className:Rd("link-icon")})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(dx,{className:Rd("link-icon")}),(0,n.jsx)("span",{className:Rd("link-text"),children:y})]})})}const sG=Oe("LessonNavPrevious",tG);function hf({lessonId:e,...t}){const s=Aj(e),o=Rj(e),r=Th(),a=Ce();return(0,n.jsx)(sG,{...t,courseHomeLabel:a?.courseHome,lessonNameLabel:a?.lessonName,lessonPrepositionLabel:a?.lessonPreposition,previousLesson:s,previousLessonNumber:o,totalLessons:r})}const nG={threshold:0},Pd=(e,t)=>{const[s,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||nG);const{current:a}=r;return e.current?a.observe(e.current):o(!1),()=>{a.disconnect()}},[e,t]),s},s3=$("navButtonsFull"),oG=()=>{const[e,t]=(0,u.useState)(!1);return(0,Je.A)(xx,()=>t(!0)),(0,Je.A)(bx,()=>t(!1)),e},rG=({isVisible:e})=>{(0,e3.A)(()=>window.dispatchEvent(new CustomEvent(Nm))),(0,u.useEffect)(()=>{const t=e?yx:Nm;window.dispatchEvent(new CustomEvent(t))},[e])},aG=({isVisible:e})=>{(0,e3.A)(()=>window.dispatchEvent(new CustomEvent(Em))),(0,u.useEffect)(()=>{const t=e?Sx:Em;window.dispatchEvent(new CustomEvent(t))},[e])},iG=({children:e,hideNavToHome:t,navNextEnabled:s,navFinishEnabled:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),i=(0,u.useRef)(null),c=(0,u.useRef)(null),l=Es(),d=Pd(a),h=Pd(i),m=oG(),f=(0,u.useCallback)(()=>{r.current?.scrollTo({top:0,behavior:"smooth"})},[]),v=(0,u.useCallback)(()=>{const g=r.current?.scrollHeight;r.current?.scrollTo({top:g,behavior:"smooth"})},[]);(0,Je.A)(Xl,f),(0,Je.A)(ql,v),rG({isVisible:d}),aG({isVisible:h}),(0,u.useEffect)(()=>{if(!m&&a.current){const x=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:x})}},[m]);const C=s3("navPrev",{visible:d,hide:m});return(0,n.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:r,children:(0,n.jsxs)("div",{className:s3(),children:[!t&&l&&(0,n.jsx)("div",{className:C,children:(0,n.jsx)(hf,{lessonId:l,ref:a})}),e,s&&l&&(0,n.jsx)(t3,{lessonId:l,ref:i}),o&&(0,n.jsx)(uf,{lessonId:l,ref:c})]})})};var Md=p(32633);const sc=$("navButtonsFloating"),n3=({transitionIn:e,buttonType:t,children:s})=>{const o=(0,u.useRef)(null),r={entered:sc(t,{entered:!0}),exiting:sc(t,{exiting:!0}),exited:sc(t,{exited:!0})};return(0,n.jsx)(Pc,{in:e,nodeRef:o,timeout:250,children:a=>(0,n.jsx)("div",{className:r[a],ref:o,children:s})})},cG=250,o3={threshold:.2},lG=({topRef:e,bottomRef:t,pageWrapRef:s,currentLessonId:o})=>{const r=Pd(e,o3),a=Pd(t,o3),[i,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),[h,m]=(0,u.useState)(!1),f=(0,u.useCallback)(()=>{s.current?.scrollTo({top:2,behavior:"smooth"})},[s]);return(0,Md.A)(f),(0,u.useEffect)(()=>{c(!0);const v=setTimeout(()=>{f(),c(!1)},cG);return()=>{clearTimeout(v)}},[o,f]),(0,u.useEffect)(()=>{d(a&&!i),m(r&&!i)},[a,r,i]),{showPrev:h,showNext:l}},dG=({children:e,isCurrentLessonQuiz:t,navNextEnabled:s,hideNavToHome: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=(0,u.useRef)(null),h=(0,u.useRef)(null),m=Es(),{showNext:f,showPrev:v}=lG({topRef:d,bottomRef:h,pageWrapRef:a,currentLessonId:m}),C=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),g=(0,u.useCallback)(()=>{const x=a.current?.scrollHeight;a.current?.scrollTo({top:x,behavior:"smooth"})},[]);return(0,Je.A)(Xl,C),(0,Je.A)(ql,g),(0,u.useEffect)(()=>{t&&(s||r)&&g()},[t,s,r,g]),(0,n.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:[(0,n.jsx)("div",{className:sc("top"),ref:d}),!o&&m&&(0,n.jsx)(n3,{buttonType:"prev",transitionIn:v,children:(0,n.jsx)(hf,{lessonId:m,onFocus:C,ref:i})}),e,(0,n.jsx)(n3,{buttonType:"next",transitionIn:f&&!!(s||r),children:s&&m?(0,n.jsx)(t3,{lessonId:m,onFocus:g,ref:c}):r?(0,n.jsx)(uf,{lessonId:m,onFocus:g,ref:l}):null}),(0,n.jsx)("div",{className:sc("bottom"),ref:h})]})};var uG=p(789),r3=p.n(uG),hG=p(28676),mf=p.n(hG);const mG=mf()(qe()("family","continue"),qe()("variant","continue")),fG=Pe()(r3()(mG),Ls()([],"items"));var Od=p(82920);class pG extends Od.Component{nodeRef=Od.createRef();constructor(t){super(t),this.handleTransition=this.handleTransition.bind(this),this.onEnter=this.onEnter.bind(this),this.onEntered=this.onEntered.bind(this),this.onExit=this.onExit.bind(this),this.onExited=this.onExited.bind(this)}handleTransition(t){const s=this.transitionState;s==="entering"?this.onEnter(t):s==="exiting"&&this.onExit(t)}onEnter(t){const s=this.nodeRef.current;s&&s.componentWillEnter?s.componentWillEnter(t):t()}onEntered(){const t=this.nodeRef.current;t&&t.componentDidEnter&&t.componentDidEnter()}onExit(t){const s=this.nodeRef.current;s&&s.componentWillExit?s.componentWillExit(t):t()}onExited(){const t=this.nodeRef.current;t&&t.componentDidExit&&t.componentDidExit()}render(){const{children:t}=this.props;return(0,n.jsx)(Pc,{addEndListener:this.handleTransition,nodeRef:this.nodeRef,onEntered:this.onEntered,onExited:this.onExited,unmountOnExit:!0,...this.props,children:s=>(this.transitionState=s,t&&Od.cloneElement(Od.Children.only(t),{ref:this.nodeRef}))})}}const ff=(0,u.createContext)({visibleLessons:[],registerLesson:()=>{},unregisterLesson:()=>{}});ff.displayName="LessonContentContext";function gG({children:e}){const[t,s]=(0,u.useState)(()=>[]),o=(0,u.useCallback)(i=>{s(c=>c.concat(i))},[]),r=(0,u.useCallback)(i=>{s(c=>c.filter(l=>l!==i))},[]),a=(0,u.useMemo)(()=>({visibleLessons:t,registerLesson:o,unregisterLesson:r}),[t,o,r]);return(0,n.jsx)(ff.Provider,{value:a,children:e})}function vG(){return(0,u.useContext)(ff)}const{FULL:CG,FLOATING:a3}=Vn,xG=$("lessonNavigation"),bG=({children:e})=>{const t=(0,u.useRef)(null);return(0,n.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},yG=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,SG=(e=[])=>e.reduce(yG,0),TG=({children:e,isLessonOnlyEmbed:t})=>{const{pathname:s}=(0,we.zy)(),o=re(),r=o.buttonNavigationStyle,{showNavigationButtons:a,lessonsOnly:i,lmsOptions:c}=o,l=(0,u.useRef)(null),d=Lt(480),h=Es(),m=Ot(h),f=Io(h),[v,C]=(0,u.useState)(r),g=i?.[0]?.id,x=o.exportSettings?.webExportSettings?.disableCoverPage===!0,y=!Sn.isInstantLink&&(c?.disableCoverPage===!0||x)&&g===h,T=!Sn.isInstantLink&&c?.disableCoverPage===!0,S=c?.disableCoverPage===!0?y:T;(0,u.useEffect)(()=>{r!==v&&(C(r),window.dispatchEvent(new CustomEvent(Xl)))},[r,v]);const b=m!=null&&m.type!=null?m:void 0,L=b!=null&&(fG(b)||Qg(b))?f?.isComplete===!0:!0,N=b?.type==="quiz",k=f?.type==="quiz"?f.activeIndex:void 0,E=N&&k!=null&&k===SG(b.items)+1,{skipLessonsIfPassed:j,skipLessonsOptional:A,skipToLessonId:I}=Lh(h),w=f?.type==="quiz"&&f.passed===!0,O=N&&w&&j&&!A&&!!I,R=N&&!E||b?.settings?.continueType==="continue"||O,P=m!=null?PC({course:o,lesson:m}):void 0,M=P!=null&&P!==!1,H=h==="progress-summary",F=window.isPublicShare===!0,B=M&&t!==!0&&L&&!R&&!H,V=!M&&L&&!1,G=xG("wrapper",{full:r===CG||d,floating:r===a3&&!d}),Z=a!==!0||t===!0?bG:r===a3&&!d?dG:iG;return(0,u.useEffect)(()=>{const oe=document.querySelector(".page__content");oe&&oe.classList.add("page__content--preview-nav")},[Z]),(0,n.jsx)("div",{className:G,ref:l,children:(0,n.jsx)(Z,{hideNavToHome:S,navFinishEnabled:V,navNextEnabled:B,children:(0,n.jsx)(gG,{children:(0,n.jsx)(Qo,{component:"div",children:(0,n.jsx)(pG,{children:e},s)})})})})};function LG({didNavigate:e,hasTransitioned:t,onPageReady:s}){const o=(0,u.useRef)(!1);(0,u.useEffect)(()=>{e&&!o.current&&t&&s(),o.current=t},[e,t,s])}var kG=p(27462),NG=p(27824),EG=p.n(NG);function IG(e){return e==="a"?46.5:7.6}function jG(e){return e==="d"?2:3.2}function wG(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function i3(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 AG(e){return .3}function gfe(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function RG(e){return e==="light"?"#fff":"#000"}function vfe(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 Cfe(e){return e==="b"?[52,76,95]:[52,76,92]}function xfe(e){return e==="a"?[30,76,92]:[52,76,92]}function bfe(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function yfe(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function PG(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function gf(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 MG(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function c3(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function l3(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function Bd(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function OG(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function BG(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function DG(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function FG(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function HG(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}const We=({value:e,className:t,allowTabNavigation:s=!0,tagName:o,id:r})=>{const{value:a}=Zh(Ae(e));return a?(0,n.jsx)(ke,{allowTabNavigation:s,className:t,id:r,tagName:o,value:e}):null};function $G(e,t){const{className:s="",tag:o="div",style:r={},...a}=e,{backgroundColor:i}=os(),c=Mw(),l=c===xt.DARK?xt.LIGHT:xt.DARK;return i!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":(0,ja.A)(c)?.slice(0,3)}),(0,n.jsx)(o,{...a,className:s,ref:t,style:r})}const d3=(0,u.forwardRef)($G),VG=10,u3=e=>`${e}rem`,vf=e=>e!=null?`${e/VG}rem`:void 0,zG=["image full","image text overlay","quote background"];function UG(e){const{family:t,variant:s,backgroundType:o,isOnlyBlockInStep:r,isOnePage:a}=e;if(!a||!r)return!1;if(o===se.IMAGE)return!0;if(!t||!s)return!1;const i=`${t} ${s}`;return zG.some(c=>c===i)}const _G={paddingBottom:"0rem",paddingTop:"0rem"},GG=e=>{const{blockSettings:t,familyTheme:s,courseTheme:o,isFullWidthImage:r}=e;if(r)return _G;const a=u3(Number(JC(t?.paddingTop,s?.paddingStart,o?.blockPaddingStart,3)));return{paddingBottom:u3(Number(JC(t?.paddingBottom,s?.paddingEnd,o?.blockPaddingEnd,3))),paddingTop:a}},WG={},KG=e=>e?{bodyFontSize:vf(e.bodyFontSize),headingFontSize:vf(e.headingFontSize),subheadingFontSize:vf(e.subheadingFontSize)}:WG;function QG(){const e=wt(),t=Fe(),s=jo(),o=vo(t),r=UG({backgroundType:e?.settings?.backgroundType,family:e?.family,isOnePage:o,isOnlyBlockInStep:e?.isOnlyBlockInStep,variant:e?.variant});return GG({blockSettings:e?.settings,courseTheme:t?.theme,familyTheme:s,isFullWidthImage:r})}function YG(){const e=jo();return KG(e)}function ZG(){const e=QG();return{fontSize:YG(),padding:e}}const XG=Vr()(["settings"]),h3=$("block-wrapper"),qG=$("bg"),JG=(e,t)=>{const{children:s,className:o,defaultBackgroundColor:r="",style:a,tag:i,type:c,...l}=e,d=wt(),h=Bw(),m=ZG(),f=Ph(r,h.backgroundColor),v=f||"transparent",C=d?.className,g={...a,...h.backgroundImageCss,"--color-background":f,...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 ${v} `,paddingBottom:m.padding.paddingBottom,paddingTop:m.padding.paddingTop},x=X()(o,{"bg--legacy-background":h.isLegacyBackground,[`block-${c}`]:!!c}),y=qG({card:h.cardMode,range:h.colorRange,type:h.backgroundTypeLowercase,"overlay-light":h.isOverlayLight,"contrast-light":h.isContrastLight}),T=C?h3({}).mix(y).mix(C):h3({}).mix(y),S=[x,T.toString()].join(" ");return(0,n.jsxs)(d3,{...XG(l),className:S,ref:t,style:g,tag:i,children:[(0,n.jsx)("span",{"aria-label":h.backgroundImageAlt,role:wg(h.backgroundImageAlt)}),s]})},Ie=(0,u.forwardRef)(JG);var eW=p(82920);function tW(e,t){const s=Rg(e.src),o=e.width&&e.height&&!s,r=o?"async":void 0,a=o?"lazy":void 0,i=o?e.width:void 0,c=o?e.height:void 0;return(0,n.jsx)("img",{...e,decoding:r,height:c,loading:a,ref:t,width:i})}const Cf=eW.forwardRef(tW),m3=(0,u.createContext)(Cf);function sW({children:e,ImageEagerOrLazy:t}){return(0,n.jsx)(m3,{value:t,children:e})}function nW(){return(0,u.use)(m3)}function Cs(e){const t=nW();return(0,n.jsx)(t,{...e})}var oW=p(89342),Tfe=p(62586);function f3(e){return(0,n.jsx)(oW.i,{IconUnzoom:aW,IconZoom:rW,...e})}const rW=()=>(0,n.jsx)(ie,{name:"arrows-two-from-center"}),aW=()=>(0,n.jsx)(ie,{name:"arrows-two-to-center"}),p3=$("block-text");function iW({children:e,item:t,labels:s}){const o="media"in t?t.media:void 0,r=Ae(o)?.image,a=it(r),i=yo(r?.alt??""),l=wt()?.settings,d=l?.images,h=l?.zoomOnClick,m=(0,u.useRef)(void 0);let f=(0,n.jsx)(Cs,{alt:i,"data-l10n-id":Et(o),ref:m,src:a});return h&&(f=(0,n.jsx)(f3,{a11yNameButtonUnzoom:s?.a11yUnzoomImage,a11yNameButtonZoom:s?.a11yZoomImage,children:f})),(0,n.jsxs)("div",{className:p3("col"),children:[d&&r&&(0,n.jsx)("div",{className:p3("image"),children:f}),e]})}var cW=p(29639),lW=p.n(cW),dW=p(12842);const uW=$("portal-tooltip"),Ft={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},hW=(e,t,s)=>{const o=e.getBoundingClientRect(),r=t.getBoundingClientRect(),a=window.visualViewport;let i=s;(i===Ft.ABOVE||i===Ft.BELOW)&&(o.bottom-r.height<0&&(i=Ft.BELOW),r.height+o.top>a.height&&(i=Ft.ABOVE)),(i===Ft.LEFT||i===Ft.RIGHT)&&(r.left<0&&(i=Ft.RIGHT),r.width+o.left>a.width&&(i=Ft.LEFT));const c={left:0,right:0,top:0,bottom:0};i===Ft.ABOVE&&(c.top=o.top-r.height-25),i===Ft.BELOW&&(c.top=o.top+o.height),i===Ft.RIGHT&&(c.left=o.left+o.width+70),i===Ft.LEFT&&(c.left=o.left-r.width-25),(i===Ft.LEFT||i===Ft.RIGHT)&&(c.top=o.top-o.height/2),(i===Ft.ABOVE||i===Ft.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 mW({children:e,className:t,direction:s=Ft.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,dW.A)((()=>e)),g=(0,u.useCallback)(()=>d(!0),[d]),x=(0,u.useCallback)(()=>d(!1),[d]);return(0,u.useEffect)(()=>(document.addEventListener("scroll",g),document.addEventListener("scrollend",x),()=>{document.removeEventListener("scroll",g),document.removeEventListener("scrollend",x)})),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{ref:m,children:v}),a&&(C||h||o)&&!l&&(0,n.jsx)(On,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,n.jsx)(fW,{buttonRef:m,className:t,direction:s,elementFocused:o,hovering:C,message:a,portalRef:f,renderInModalWhenPresent:c,style:i})})]})}function fW({buttonRef:e,className:t,direction:s,elementFocused:o,hovering:r,message:a,portalRef:i,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>hW(e.current,i.current,s),[e,s,i]),h=(0,u.useCallback)(()=>{i.current&&d()},[i,d]),m=()=>{!r&&!o&&i.current&&(i.current.style=null)};return(0,Md.A)(h),(0,Nn.createPortal)((0,n.jsx)("div",{"aria-hidden":!r||!o,className:uW("tooltip").mix(t).toString(),onTransitionEnd:m,ref:i,style:c,children:a}),l?Ao({id:"portal",childType:"other"}):document.getElementById("portal"))}const Oo=mW,g3=$("audio-player-actions"),pW=({audioPlayerId:e,condensed:t=!1,transcriptMedia:s,onDelete:o,onTranscriptClick:r,onTranscriptClose:a})=>{const{mode:i,disableTranscriptButton:c}=vd(),l=qi(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),v=Ae(s)?.audio?.transcript,C=(0,u.useCallback)(()=>h(!0),[]),g=(0,u.useCallback)(()=>h(!1),[]),x=(0,u.useCallback)(()=>f(!0),[]),y=(0,u.useCallback)(()=>f(!1),[]),T=It(),S=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,b=c?"Transcripts are only available in lesson previews":S?T?.audioHideTranscript:i==="edit"?"Edit transcript":T?.audioShowTranscript,L=(0,u.useCallback)(()=>{const j=document.getElementById(Jm(e));j&&j.focus()},[e]),[N,k]=(0,u.useState)(!1);function E(){c||(S?a?.():(r?.(),k(!0)))}return(0,u.useEffect)(()=>{N&&(k(!1),L())},[N,L]),(0,n.jsxs)(n.Fragment,{children:[o&&(0,n.jsx)(Oo,{elementFocused:d,message:"Remove audio",children:(0,n.jsx)("button",{"aria-label":"Remove audio",className:g3("button",{condensed:t}),onBlur:g,onClick:o,onFocus:C,onMouseOut:g,onMouseOver:C,type:"button",children:(0,n.jsx)(ie,{name:"trash"})})}),(i==="edit"||v)&&(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(Oo,{elementFocused:m,message:b,renderInModalWhenPresent:i==="readonly",style:{whiteSpace:"nowrap"},children:(0,n.jsx)("button",{"aria-disabled":c,"aria-label":b,className:g3("button",{condensed:t}),id:i==="readonly"?wb(e):void 0,onBlur:y,onClick:E,onFocus:x,onMouseOut:y,onMouseOver:x,style:c?{opacity:.5}:void 0,type:"button",children:(0,n.jsx)(ie,{name:"file-audio"})})})})]})};var gW=p(10382);const v3="change";class vW extends gW.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(v3,t)}removeChangeListener(t){this.removeListener(v3,t)}}const ve=new vW(1/0),CW=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),Nfe=.05,C3=$("audio-player-icon"),Ir=({x:e,width:t,height:s,y:o,pulseBaseHeight:r,pulseBaseY:a,pulseHeight:i,pulseY:c,delay:l="0s"})=>(0,n.jsx)("rect",{className:C3("bar"),height:s,rx:1,style:{"--base-height":`${s/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}),x3=({animating:e})=>(0,n.jsx)("span",{className:C3({animating:e}),children:(0,n.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)(Ir,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,n.jsx)(Ir,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,n.jsx)(Ir,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,n.jsx)(Ir,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,n.jsx)(Ir,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,n.jsx)(Ir,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,n.jsx)(Ir,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var xW,ze=p(82920);const Dd=ze.createContext(null);function bW({children:e,isDisabled:t,onClose:s,onOpen:o,onSelect:r,positionX:a="left"}){const[i,c]=ze.useState(!1),l=(0,Me.A)(i),[d,h]=ze.useState(null),m=ze.useRef(null),f=ze.useRef(null),v=ze.useRef(null),x=`${`menu-${ze.useId()}`}-content`,y=ze.useCallback(({direction:R,predFn:P=()=>!0})=>{if(!v.current)return;const M=Array.from(v.current.querySelectorAll('[role="menuitem"]')),H=M.length,F=M.findIndex(_=>_===document.activeElement);let B,V,G;switch(R){case"start":B=0,V=1;break;case"end":B=H-1,V=-1;break;case"backwards":B=F-1,V=-1;break;case"forwards":B=F+1,V=1;break;default:B=F+1,V=1}for(let _=0;_<=H;_++){B>=H?B=0:B<0&&(B=H-1);const Z=M[B];if(Z!=null&&TW(Z)&&P(Z)){G=Z;break}else B=B+V}G&&G.focus()},[]),T=ze.useCallback(()=>{y({direction:"start"})},[y]),S=ze.useCallback(()=>{y({direction:"end"})},[y]),b=ze.useCallback(()=>{y({direction:"backwards"})},[y]),L=ze.useCallback(()=>{y({direction:"forwards"})},[y]),N=ze.useCallback(R=>{y({direction:"forwards",predFn:P=>LW(P,R)})},[y]),k=ze.useCallback(()=>{i?c(!1):(c(!0),setTimeout(L,25))},[L,i]),E=ze.useCallback(()=>{f.current?.focus(),c(!1)},[]),j=ze.useCallback(()=>{c(!0),setTimeout(L,25)},[L]),A=ze.useCallback(()=>{c(!0),setTimeout(b,25)},[b]),I=ze.useCallback(()=>{const{left:R,top:P}=Px({anchor:f.current,popover:v.current,positionX:a});h({transform:`translate3d(${R}px, ${P}px, 0)`,visibility:"visible"})},[a]),w=ze.useCallback(R=>{const P=R.currentTarget;b3(P)||(r?.(P.getAttribute("data-name")),E())},[E,r]),O=ze.useCallback(R=>{const P=R.key;if(R.altKey||R.ctrlKey||R.metaKey)return;let M=!1;if(R.shiftKey)P==="Tab"?b():P.trim()!==""&&N(P),M=!0;else switch(P){case" ":case"Enter":w(R),M=!0;break;case"Esc":case"Escape":E(),M=!0;break;case"ArrowUp":b(),M=!0;break;case"Tab":case"ArrowDown":L(),M=!0;break;case"Home":case"PageUp":T(),M=!0;break;case"End":case"PageDown":S(),M=!0;break;default:N(P);break}M&&(R.stopPropagation(),R.preventDefault())},[E,w,N,T,S,L,b]);return ze.useEffect(()=>{const R=P=>{i&&m.current!=null&&v.current!=null&&!m.current.contains(P.target)&&!v.current.contains(P.target)&&c(!1)};return i?document.addEventListener("click",R):document.removeEventListener("click",R),()=>{document.removeEventListener("click",R)}},[i]),ze.useEffect(()=>(i?window.addEventListener("resize",I):window.removeEventListener("resize",I),()=>{window.removeEventListener("resize",I)}),[I,i]),ze.useEffect(()=>{const R=ed(m.current);for(const P of R)i?P?.addEventListener("scroll",I,{passive:!0}):P?.removeEventListener("scroll",I);return()=>{for(const P of R)P?.removeEventListener("scroll",I)}},[I,i]),ze.useEffect(()=>{i?I():h(null)},[I,i]),ze.useEffect(()=>{if(l&&!i)s?.();else if(!l&&i&&(o?.(),m.current)){const R=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(R)}},[l,i,s,o]),ze.useEffect(()=>{const R=P=>{P.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",R),()=>{document.removeEventListener("menuopen",R)}},[]),(0,n.jsx)(Dd.Provider,{value:{htmlIdContent:x,isExpanded:i,onCloseFocusTrigger:E,onExpandFocusMenuItemNext:j,onExpandFocusMenuItemPrevious:A,onFocusMenuItemByPrefix:N,onFocusMenuItemFirst:T,onFocusMenuItemLast:S,onFocusMenuItemNext:L,onFocusMenuItemPrevious:b,onItemClick:w,onItemKeyDown:O,onTriggerClick:k,refContent:v,refTrigger:f,styleContent:d},children:(0,n.jsx)("div",{"aria-owns":x,inert:t?!0:void 0,ref:m,children:e})})}function yW({as:e,children:t,label:s,labelledBy:o,...r}){const{htmlIdContent:a,isExpanded:i,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=ze.useContext(Dd),f=ze.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,n.jsx)(v,{...r,"aria-controls":a,"aria-expanded":i,"aria-haspopup":"menu","aria-label":s,"aria-labelledby":o,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function SW({children:e,className:t}){const{htmlIdContent:s,isExpanded:o,refContent:r,styleContent:a}=ze.useContext(Dd);return o?Nn.createPortal((0,n.jsx)("div",{className:t,"data-menu-content":"",hidden:o?void 0:!0,id:s,ref:r,role:"menu",style:a,children:e}),Ao()):null}function Fd({children:e,className:t,isDisabled:s,name:o,tooltipId:r}){const{onItemClick:a,onItemKeyDown:i}=ze.useContext(Dd),c=ze.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,n.jsx)("button",{"aria-describedby":r,"aria-disabled":s,className:t,"data-menu-item":"","data-name":o,onClick:s?void 0:a,onKeyDown:i,onMouseOver:c,role:"menuitem",tabIndex:s?-1:void 0,type:"button",children:e})}function Ife({children:e}){return xW("span",{"data-menu-item-icon":"",children:e})}function b3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function TW(e){return e!=null&&e.tagName==="BUTTON"&&!b3(e)}function LW(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const Da=$("audio-player-actions-condensed"),Bo=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),kW=({audioPlayerId:e,condensed:t=!1,transcriptMedia:s,onTranscriptClick:o,onTranscriptClose:r,item:a,side:i,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=vd(),v=qi(),C=wt(),g=jt(),x=a&&"media"in a&&a.media?g(a.media):void 0,y=x&&"audio"in x?x.audio.aiAudioSettings:void 0,T=nn(),S=Bh(),b=T?S(T):"",[L,N]=(0,u.useState)(!1),k=(0,u.useCallback)(()=>N(!0),[]),E=(0,u.useCallback)(()=>N(!1),[]),j=y?.l10nAutoGenStatus==="reverted-to-source",A=d&&"audio"in x&&x.audio?.sourceType==="ai-audio"&&y?.l10nAutoGenStatus!=="unsupported-locale",I=It(),w=v?.audioPlayerIdOpen===e,O=w?I?.audioHideTranscript:l==="edit"?"Edit transcript":I?.audioShowTranscript;function R(M){switch(M){case Bo.DeleteAudio:m(C.id,a,c);break;case Bo.EditTranscript:w?r?.():o?.();break;case Bo.EditAudio:h(C,a,c,i,{triggeredFrom:"block_audio_button"});break;case Bo.RevertToSource:f(C.id,a);break}}const P=!!g(s)?.audio?.transcript;return h||m||P?(0,n.jsx)(Oo,{elementFocused:L,message:"Options",children:(0,n.jsxs)(bW,{onSelect:R,positionX:"left",children:[(0,n.jsx)(yW,{className:Da("trigger",{condensed:t}),label:"Options",onBlur:E,onFocus:k,onMouseEnter:k,onMouseLeave:E,children:(0,n.jsx)(ie,{name:"ellipsis-regular"})}),(0,n.jsxs)(SW,{className:Da("content"),children:[h?(0,n.jsx)(Fd,{className:Da("menu-item"),name:Bo.EditAudio,children:"Edit audio"}):null,l==="edit"||P?(0,n.jsx)(Fd,{className:Da("menu-item"),name:Bo.EditTranscript,children:O}):null,m&&C?.variant!=="audio"?(0,n.jsx)(Fd,{className:Da("menu-item"),name:Bo.DeleteAudio,children:"Remove audio"}):null,f&&A?(0,n.jsx)(Oo,{message:j?"Audio currently synced to source":void 0,children:(0,n.jsxs)(Fd,{className:Da("menu-item"),isDisabled:j,name:Bo.RevertToSource,children:["Revert to source audio (",b,")"]})}):null]})]})}):null};var NW,EW,Ue=p(82920);const nc=Ue.createContext(null);function IW({children:e,className:t,isDisabled:s,onClose:o,onItemActiveChange:r,onOpen:a,onSelect:i,portalArgs:c,positionX:l="left",value:d}){const[h,m]=Ue.useState(null),f=(0,Me.A)(h),[v,C]=Ue.useState(!1),g=(0,Me.A)(v),[x,y]=Ue.useState(null),T=Ue.useRef(null),S=Ue.useRef(null),b=Ue.useRef(null),N=`select-${Ue.useId()}`,k=`${N}-content`,E=h?.id,j=Ue.useCallback(P=>{const M=P.currentTarget;y3(M)||(C(!1),m(M),i(M.getAttribute("data-value")),P.stopPropagation())},[i]),A=Ue.useCallback(P=>{m(P)},[]),I=Ue.useCallback(()=>{C(P=>!P)},[]),w=Ue.useCallback(()=>{const{left:P,top:M}=Px({anchor:S.current,popover:b.current,positionX:l}),B=window.getComputedStyle(S.current).direction==="rtl"?-P:P;y({transform:`translate3d(${B}px, ${M}px, 0)`,visibility:"visible",width:`${S.current?.offsetWidth}px`})},[l]),O=Ue.useCallback(P=>{const M=Array.from(b.current?.querySelectorAll("[data-select-item]")??[]),H=M.length,F=M.findIndex(G=>G.getAttribute("data-select-item")==="current");let B,V=F+1;for(let G=0;G<H;G++){V>=H&&(V=0);const _=M[G];if(_!=null&&!y3(_)&&RW(_,P)){B=G;break}else V=H-1}B&&(m(M[B]),M[B]?.scrollIntoView({block:"center"}))},[]),R=Ue.useCallback(P=>{const M=P.key;if(P.ctrlKey||P.metaKey)return;let H=!1;const F=Array.from(b.current?.querySelectorAll("[data-select-item]")??[]),B=F.findIndex(V=>V.getAttribute("data-select-item")==="current");if(v)if(M.length===1&&M!==" "&&!P.altKey&&!P.ctrlKey&&!P.metaKey)O(M);else switch(M){case" ":case"Enter":C(!1),F[B]!=null&&i(F[B].getAttribute("data-value")),H=!0;break;case"Esc":case"Escape":C(!1),m(F.find(V=>V.getAttribute("aria-selected")==="true")),H=!0;break;case"ArrowUp":P.altKey?(C(!1),F[B]!=null&&i(F[B].getAttribute("data-value")??"")):B>0&&(m(F[B-1]),F[B-1].scrollIntoView({block:"center"})),H=!0;break;case"ArrowDown":B<F.length-1&&(m(F[B+1]),F[B+1].scrollIntoView({block:"center"})),H=!0;break;case"Home":m(F[0]),F[0]?.scrollIntoView({block:"center"}),H=!0;break;case"End":m(F[F.length-1]),F[F.length-1]?.scrollIntoView({block:"center"}),H=!0;break;case"PageUp":m(F[0]),F[0]?.scrollIntoView({block:"center"}),H=!0;break;case"PageDown":m(F[F.length-1]),F[F.length-1]?.scrollIntoView({block:"center"}),H=!0;break;case"Tab":C(!1),F[B]!=null&&i(F[B].getAttribute("data-value"));break}else if(M.length===1&&M!==" "&&!P.altKey&&!P.ctrlKey&&!P.metaKey)C(!0),O(M);else switch(M){case" ":case"Enter":C(!0),H=!0;break;case"ArrowUp":C(!0),m(F[0]),H=!0;break;case"ArrowDown":C(!0),H=!0;break;case"Home":C(!0),m(F[0]),H=!0;break;case"End":C(!0),m(F[F.length-1]),H=!0;break}H&&(P.stopPropagation(),P.preventDefault())},[O,v,i]);return Ue.useEffect(()=>{const P=b.current?.querySelector('[data-select-item][aria-selected="true"]');m(P)},[]),Ue.useEffect(()=>{const P=b.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(P)},[d]),Ue.useEffect(()=>{const P=M=>{v&&T.current!=null&&b.current!=null&&!T.current.contains(M.target)&&!b.current.contains(M.target)&&C(!1)};return v?document.addEventListener("click",P):document.removeEventListener("click",P),()=>{document.removeEventListener("click",P)}},[v]),Ue.useEffect(()=>(v?window.addEventListener("resize",w):window.removeEventListener("resize",w),()=>{window.removeEventListener("resize",w)}),[w,v]),Ue.useEffect(()=>{const P=ed(T.current);for(const M of P)v?M?.addEventListener("scroll",w,{passive:!0}):M?.removeEventListener("scroll",w);return()=>{for(const M of P)M?.removeEventListener("scroll",w)}},[w,v]),Ue.useEffect(()=>{v?w():y(null)},[w,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?.(),T.current)){const P=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:T.current}});T.current.dispatchEvent(P)}},[g,v,o,a]),Ue.useEffect(()=>{const P=M=>{M.detail.target!==T.current&&C(!1)};return document.addEventListener("comboboxopen",P),()=>{document.removeEventListener("comboboxopen",P)}},[]),(0,n.jsx)(nc.Provider,{value:{activeEl:h,htmlIdActiveDescendant:E,htmlIdBase:N,htmlIdContent:k,isExpanded:v,onItemClick:j,onItemHover:A,onTriggerClick:I,onTriggerKeyDown:R,portalArgs:c,refContent:b,refTrigger:S,selectedValue:d,styleContent:x},children:(0,n.jsx)("div",{"aria-owns":k,className:t,inert:s?!0:void 0,ref:T,children:e})})}function jW({children:e,className:t,labelledBy:s,as:o,...r}){const{htmlIdActiveDescendant:a,htmlIdContent:i,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=Ue.useContext(nc),m=!!o,f=o??"button";return(0,n.jsxs)(f,{"aria-activedescendant":a,"aria-controls":i,"aria-expanded":c,"aria-haspopup":"listbox","aria-labelledby":s,className:t,"data-select-trigger":m?void 0:"",onClick:l,onKeyDown:d,ref:h,role:"combobox",type:"button",...r,children:[(0,n.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,n.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,n.jsx)(ie,{name:"chevron-up"}):(0,n.jsx)(ie,{name:"chevron-down"})})]})}function wW({children:e,className:t,label:s,labelledBy:o,style:r={}}){const{htmlIdContent:a,isExpanded:i,portalArgs:c,refContent:l,styleContent:d}=Ue.useContext(nc);return Nn.createPortal((0,n.jsx)("div",{"aria-label":s,"aria-labelledby":o,className:t,"data-select-content":"",hidden:i?void 0:!0,id:a,ref:l,role:"listbox",style:{...d,...r},children:e}),Ao(c))}function wfe({children:e,className:t,labelText:s}){const{htmlIdBase:o}=Ue.useContext(nc),r=Ue.useId(),a=`${o}-group-label-${r}`;return NW("div",{"aria-labelledby":a,className:t,"data-select-group":"",role:"group",children:[EW("div",{"data-select-group-label":"",id:a,role:"presentation",children:s}),e]})}function AW({children:e,className:t,labelledBy:s,isDisabled:o,value:r}){const{activeEl:a,htmlIdBase:i,onItemClick:c,onItemHover:l,selectedValue:d}=Ue.useContext(nc),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,n.jsxs)("div",{"aria-disabled":o,"aria-labelledby":s,"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,n.jsx)("span",{"data-select-item-selected":"",children:(0,n.jsx)(ie,{name:"check"})})]})}function y3(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function RW(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const xf=$("playback-speed-menu"),PW=({onChange:e,condensed:t=!1,speed:s})=>{const o=It(),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)(()=>a(!0),[]),c=(0,u.useCallback)(()=>a(!1),[]);return(0,n.jsx)(Oo,{elementFocused:r,message:o?.audioPlaySpeed,children:(0,n.jsxs)(IW,{className:xf(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(s),children:[(0,n.jsxs)(jW,{"aria-label":o?.audioPlaySpeed,as:dn.ArcButton,className:xf("trigger"),hierarchy:"tertiary",labelledBy:void 0,layout:"hug",onBlur:c,onFocus:i,onMouseEnter:i,onMouseLeave:c,shape:"square",size:t?"sm":"md",children:[s,"x"]}),(0,n.jsx)(wW,{className:xf("content"),label:o?.audioPlaySpeed,children:CW.map((l,d)=>(0,n.jsx)(AW,{value:String(l.value??""),children:l.label},d))})]})})};function MW(e=!1,t=200){const s=(0,u.useRef)(void 0),[o,r]=(0,u.useState)(e),a=(0,u.useCallback)(()=>{s.current&&clearTimeout(s.current),r(!0)},[]),i=(0,u.useCallback)(c=>{s.current&&clearTimeout(s.current),c?r(!1):s.current=setTimeout(()=>{r(!1)},t)},[t]);return(0,u.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),{isActive:o,setActive:a,setInactive:i}}const bf=$("audio-player-volume"),OW=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function BW(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function DW({condensed:e=!1,muted:t,onChange:s,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}=MW(!1,200),f=t?0:r;function v(g){if(OW.includes(g.code)){const T=window.getComputedStyle(g.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",S=g.code==="ArrowUp"||g.code===T?Math.min(f+.05,1):Math.max(f-.05,0);s(S),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,n.jsxs)("div",{className:bf(),onKeyDown:v,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:i,children:[(0,n.jsx)("button",{"aria-label":f<=0?a?.a11yMediaUnmute:a?.a11yMediaMute,className:bf("button",{condensed:e}),onClick:o,ref:c,type:"button",children:(0,n.jsx)(ie,{name:BW(f,t)})}),(0,n.jsx)("input",{"aria-label":a?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":C,className:bf("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:g=>s(g.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const js=$("audio-player"),Hd=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,S3=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),s=Math.floor(e%3600/60),o=e%60;return{hours:t,minutes:s,seconds:o}},T3=e=>{const{minutes:t,seconds:s}=S3(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(s)),o},FW=e=>{const{hours:t,minutes:s,seconds:o}=S3(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const a=r(s,"0",2),i=r(o,"0",2);return t>0?`${t}:${a}:${i}`:`${s}:${i}`};class Fa 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:s}=this.props,{currentTime:o,duration:r}=this.audio,{maxTime:a}=this.state;let i=o+t;s&&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 s=t<0?Math.max(this.audio.volume+t,0):Math.min(this.audio.volume+t,1);this.changeVolume(s)};componentDidMount(){ve.addChangeListener(this.handleChange)}componentDidUpdate(t,s){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(),ve.isPlaying&&ve.playerId===this.props.id&&ve.pause()),s.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:s}=this.props;ve.playerId===s&&ve.pause(),ve.removeChangeListener(this.handleChange),t&&t(Hd(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){ve.playerId===this.props.id?this.audio&&(ve.isPlaying&&this.audio.paused?this.audio.play():!ve.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):ve.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const s=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}),s.observe(t),()=>{s.disconnect()}};render(){const{allowTabNavigation:t,id:s,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,x=ve.isPlaying&&ve.playerId===s,{currentTime:y,playerExpanded:T}=this.state,S=this.audio?.duration??0,b=Number.isNaN(S)?0:S,L=Math.round(b-y),N=FW(L),k=T3(L),E=T3(y),j=t?0:-1,A=!o,{a11yGroupAudioPlayer:I,a11yMediaPlay:w,a11yMediaPause:O,a11yMediaSeek:R}=a??{},P=js({overlay:r,collapsed:r&&!T,expanded:!r||T,"volume-slider-below":this.props.volumeSliderPosition==="below"}),M=o||c==="edit"?"Collapse audio player":a?.audioCollapsePlayer,H=o||c==="edit"?"Expand audio player":a?.audioExpandPlayer,F=T?M:H,B=fn({refs:C}),G=g===B?Jm(g):void 0;return(0,n.jsx)("div",{className:js("container"),onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,n.jsxs)("div",{className:P,id:s,children:[A&&(0,n.jsx)("div",{className:js("waveform"),children:r?(0,n.jsx)(Oo,{message:F,children:(0,n.jsx)("button",{"aria-label":F,className:js("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,n.jsx)(x3,{animating:x})})}):(0,n.jsx)("div",{className:js("waveform-icon",{disabled:!0}),children:(0,n.jsx)(x3,{animating:x})})}),(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":I,"aria-owns":G,className:js("housing",{"with-border":A}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:j,children:[(0,n.jsxs)("div",{className:js("play-timer-housing"),children:[(0,n.jsx)(dn.ArcButton,{"aria-label":x?O:w,className:js("play"),hierarchy:"tertiary",icon:(0,n.jsx)(ie,{className:js("icon"),name:x?"pause-solid":"play-solid"}),layout:"icon",onClick:this.onPlayClick,ref:_=>{this.play=_},shape:"square",size:this.state.condensed?"sm":"md",tabIndex:j,type:"button"}),(0,n.jsx)("input",{"aria-label":R,"aria-valuemax":b,"aria-valuemin":0,"aria-valuenow":y,"aria-valuetext":E,className:js("seek-slider"),max:b,min:0,onChange:this.onSeekSliderChange.bind(this),ref:_=>{this.seekSlider=_},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:y}),(0,n.jsx)("div",{"aria-label":k,className:js("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:N})]}),(0,n.jsxs)("div",{className:js("player-controls"),ref:_=>{this.playerControls=_},children:[(0,n.jsx)(PW,{condensed:this.state.condensed,onChange:_=>{this.setState({playbackSpeed:_})},speed:this.state.playbackSpeed}),(0,n.jsx)(DW,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||o?(0,n.jsx)(pW,{audioPlayerId:B,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,n.jsx)(kW,{audioPlayerId:B,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:C,side:v,transcriptMedia:m})]})]}),(0,n.jsx)("audio",{className:js("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:mt(`${i}`)},"audio-"+s)]},`player-${s}`)})}onKeyDown(t){const o=hn(this.onPlayClick),r=hn(()=>this.keySeek(5)),a=hn(()=>this.keySeek(-5)),i=hn(()=>this.changeVolumeDelta(.05)),c=hn(()=>this.changeVolumeDelta(-.05)),l=hn(()=>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=ms()([[Ei,o],[Wn,Po],[Gn,Po],[vr,Po],[gr,Po]]),v=ms()([[Ei,o],[_M,r],[GM,a]]),C=ms()([[Ei,o],[Wn,r],[Gn,a],[gr,i],[vr,c],[g=>g.code==="KeyM",l]]);ms()([[d,f],[h,v],[m,Po],[tr(),C]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:s}=this.props,{duration:o,paused:r}=this.audio;r&&s&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=o*s/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:s,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&&ve.playerId===s&&(ve.isPlaying=!1,o(Fa.timeMs(h)),i&&i(Hd({currentTime:h,duration:m})));else{ve.playerId=s,ve.isPlaying=!0,r(Fa.timeMs(h));const f=fn({refs:c});a?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:s,muted:o}=t.currentTarget;this.setState({volume:s,muted:o})};onSeekSliderChange(t){const{canRestrictSeek:s}=this.props,{maxTime:o}=this.state;let r=t.currentTarget.valueAsNumber;s&&r>o&&(r=o),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:s,duration:o,muted:r,volume:a}=t.currentTarget,i=s/o*100;this.setState({currentTime:s,muted:r,volume:a,sliderPercent:i});const{onLoad:c}=this.props;c()}onEnded(t){const s=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:s.currentTime}),ve.isPlaying=!1,this.props.onEnd(Fa.timeMs(s.currentTime)),this.forceUpdate()}onSeeked(t){const{id:s,onSeek:o,recordMediaPlayheadPosition:r}=this.props,{currentTime:a,duration:i}=t.currentTarget;ve.isPlaying&&ve.playerId!==s&&(ve.isPlaying=!1),ve.playerId=s,o(Fa.timeMs(a)),r&&r(Hd({currentTime:a,duration:i}))}onTimeUpdate(t){const s=t.currentTarget,{recordMediaPlayheadPosition:o}=this.props,{currentTime:r,duration:a}=s,i=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/a*100;Gp(),this.setState({currentTime:r,sliderPercent:c}),i%5===0&&this.state.playheadPositionSaveThrottle!==i&&o&&(o(Hd(s)),this.setState({playheadPositionSaveThrottle:i}))}onTogglePlayer(t){this.setState(({playerExpanded:s})=>({playerExpanded:!s})),t.preventDefault(),t.stopPropagation()}}const HW=Fa,no=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),$W=no(["uploading","processing","cropping","crushing"]),Rfe=no(["canceled"]),L3=no(["complete"]),VW=no(["cropping"]),zW=no(["crushing"]),UW=no(["uploading"]),_W=no(["processing"]),GW=no(["errored"]),k3=no(["cropping","crushing","errored","processing","uploading"]);function WW(e){return e==null||typeof e!="object"?0:Object.values(e).filter($W).length}function Pfe(e){return Math.round(e.loaded*100/e.total)}const Mfe=e=>e?.file?.name||e?.opts?.filename||"";function Ofe(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&WW(e)>0}const $d=e=>X()("upload-progress__wrapper",e),N3=(0,u.createContext)(null);function E3(){return(0,u.useContext)(N3)}const Bfe=N3.Provider;function KW(e){function t(s){const o=E3();return o?(0,n.jsx)(e,{...s,getUpload:o.getUpload,handleUploadDismiss:o.handleUploadDismiss}):(0,n.jsx)(e,{...s})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const Vd=({onClick:e,text:t})=>(0,n.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,n.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),yf=20,oc=yf/2,Sf=oc-2,I3=+(2*Math.PI*Sf).toFixed(3),QW=e=>I3*(100-e)/100;function j3({classes:e,percent:t}){return(0,n.jsxs)("svg",{className:X()("upload-progress__pie",e),focusable:"false",height:`${yf}px`,width:`${yf}px`,children:[(0,n.jsx)("circle",{className:"upload-progress__border",cx:oc,cy:oc,r:Sf}),(0,n.jsx)("circle",{className:"upload-progress__progress",cx:oc,cy:oc,r:Sf,strokeDasharray:I3,strokeDashoffset:QW(t)})]})}const YW=({text:e})=>(0,n.jsxs)("div",{className:"upload-progress",children:[(0,n.jsx)(j3,{classes:"upload-progress__pie--processing",percent:70}),(0,n.jsx)("div",{className:"upload-progress__text",children:e})]}),ZW=({percentage:e,text:t="Uploading\u2026"})=>(0,n.jsxs)("div",{className:"upload-progress",children:[(0,n.jsx)(j3,{percent:e}),(0,n.jsx)("div",{className:"upload-progress__text",children:t})]}),Tf=({classes:e,jobId:t,onCancel:s,text:o})=>(0,n.jsxs)("div",{className:$d(e),children:[(0,n.jsx)(YW,{text:o}),t&&(0,n.jsx)(Vd,{onClick:s,text:"Cancel"})]}),XW=({classes:e,onCancel:t,percentage:s,text:o})=>(0,n.jsxs)("div",{className:$d(e),children:[(0,n.jsx)(ZW,{percentage:s,text:o}),(0,n.jsx)(Vd,{onClick:t,text:"Cancel"})]}),qW=({message:e="Error"})=>(0,n.jsxs)("div",{className:"upload-error",children:[(0,n.jsx)(ie,{name:"circle-exclamation"}),(0,n.jsx)("div",{className:"upload-error__text",children:e})]}),JW=({classes:e,message:t,onClick:s})=>(0,n.jsxs)("div",{className:$d(e),children:[(0,n.jsx)(qW,{message:t}),(0,n.jsx)(Vd,{onClick:s,text:"Dismiss"})]}),eK=({message:e="Success"})=>(0,n.jsxs)("div",{className:"upload-success",children:[(0,n.jsx)(ie,{name:"check-regular"}),(0,n.jsx)("div",{className:"upload-success__text",children:e})]}),tK=({classes:e,message:t,onClick:s})=>(0,n.jsxs)("div",{className:$d(e),children:[(0,n.jsx)(eK,{message:t}),s?(0,n.jsx)(Vd,{onClick:s,text:"Dismiss"}):null]}),sK=e=>{const{classes:t,data:s={},errorMessage:o,jobId:r,progress:a,onCancelUpload:i,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return GW(e)?(0,n.jsx)(JW,{classes:t,message:o||s?.message,onClick:l}):UW(e)?(0,n.jsx)(XW,{classes:t,onCancel:i,percentage:a,text:`Uploading ${m}\u2026`}):_W(e)?(0,n.jsx)(Tf,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):zW(e)?(0,n.jsx)(Tf,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):VW(e)?(0,n.jsx)(Tf,{classes:t,onCancel:c,text:"Cropping image\u2026"}):L3(e)&&h?(0,n.jsx)(tK,{classes:t,message:h,onClick:d}):(0,n.jsx)("div",{})},Lf=$("audio-player"),nK=Lf("upload-state");function w3({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:s,...o}){const r=E3(),{mode:a}=vd(),i=qi(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&k3(c),[c]),d=(0,Me.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:v}=c,C=x=>()=>r?.handleUploadDismiss(x,c),g=Lf({overlay:o.isOverlayAudio,static:o.isOverlayAudio});return(0,n.jsx)("div",{className:Lf("container"),children:(0,n.jsx)("div",{className:g,children:(0,n.jsx)(sK,{classes:nK,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,n.jsx)(HW,{...o,mode:a,transcriptAudioPlayerIdOpen:i?.audioPlayerIdOpen??null,volumeSliderPosition:s})}var oK=p(88868),rK=p.n(oK),aK=p(56248),iK=p.n(aK);const cK={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 lK(){const t=Fe()?.id,s=Ih();return(0,u.useCallback)(o=>s&&t!=null?cK.lesson({courseId:t,lessonId:o}):ks(o),[t,s])}var dK=p(86309),uK=p(73426),hK=p.n(uK);const mK=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,fK=e=>typeof e=="string"&&e.replace(mK,""),xs=hK()(fK,dK.J),pK="about:blank",gK=e=>{const t=e?.trim();if(!t)return null;const s=xs(t);return s===pK?null:/^(https?:\/\/|mailto:)/i.test(s)||/^(\.?\/|[#?])/.test(s)?s:`http://${s.replace(/^\/\//,"")}`},Ha=u.memo(({align:e,alt:t,allowTabNavigation:s=!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=lK(),x=a??g,y=yo(t),T=d?.type==="url"&&d.destination?gK(d.destination):null,S=d?.type==="block"?xU(d.destination):null,b=d?.type==="lesson"&&!!d.destination||S!=null||!!T,L=s&&!r&&!b,N=X()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let k={};o!=null&&(k["--corner-radius"]=`${Number(o)}px`),C>0&&i>0&&i>h?(C=Math.round(C*h/i),i=h):h&&(!C||!i)&&(k={maxHeight:h});let E=(0,n.jsx)(Cs,{alt:y,className:N,"data-l10n-id":c,height:i,onLoad:m,src:v,style:k,width:C});return b&&d?d.type==="lesson"?E=(0,n.jsx)(rs,{className:"img__link",to:x(d.destination),children:E}):d.type==="block"&&S?E=(0,n.jsx)(rs,{className:"img__link",to:`${x(S.lessonId)}?blockId=${S.blockId}`,children:E}):T&&(E=(0,n.jsx)("a",{className:"img__link",href:T,rel:"noopener noreferrer nofollow",target:"_blank",children:E})):L&&(E=(0,n.jsx)(f3,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:E})),(0,n.jsx)("div",{className:"img",children:E})});var _fe=p(81651),vK=p(7776),CK=p.n(vK);const xK=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,bK=/\.[a-z]{2,}\.?$/i,yK=(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,SK=e=>kf(e);function Gfe(e){try{if(SK(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const kf=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:s}=t;if(!s)return!1;const o=xK.exec(s);return o?!yK(Number(o[1]),Number(o[2])):bK.test(s)},TK=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,LK=e=>{if(typeof e!="string")return!1;const t=TK.exec(e);return t?kf(t[1]):!1};var kK,NK,EK,IK,jK;const A3=es()("type","embed"),wK=CK()("type","embedType"),AK=Gr()(/http:/i,"https:"),RK=e=>({embedType:"iframe",originalUrl:e,src:e}),PK=e=>jr(e.embed),jr=e=>e?.embedType||e?.type,Wfe=e=>EK([[IK,kK(A3,RK,AK)],[jK,NK(A3,wK,e)]]),Kfe=bo()(Pe()(LK,zp),kf),Qfe="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var wr=p(82920);const R3=e=>{const t=Ee("CDN_USER_CONTENT_URI"),s=new RegExp(Ee("CDN_URI"),"g");return ti()?e:s.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},MK=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:","")},OK=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,BK=e=>OK.test(e),DK=/^\/\//,P3=e=>e?.replace(DK,"https://"),zd=e=>{try{if(e===!1)return e;const t=new URL(P3(e));if(t.host==="cdn.embedly.com"&&t.pathname==="/widgets/media.html"){const s=new URL("https://embed.articulateusercontent.com/media/");return s.search=t.search,s.searchParams.set("v","1"),s.href}return t.href}catch(t){const s=new Error("Could not parse embed url",{cause:t});return console.warn(s),e}},FK=Pe()(zd,P3,po()(BK,MK),po()(Boolean,mt),xs),HK=e=>{const{paddingBottom:t,ref:s,value:o}=e;return(0,n.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:wr.useMemo(()=>({__html:o}),[o]),ref:s,style:{paddingBottom:t}})};class $K extends wr.Component{player;refIframeContainer=wr.createRef();refIframePlayer=wr.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&ve.isPlaying&&(this.player?.pause(),ve.isPlaying=!1)}componentWillUnmount(){jr(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}),ve.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;ve.isPlaying&&ve.playerId!==t&&(ve.isPlaying=!1),ve.playerId=t,ve.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;ve.playerId===t&&(ve.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(rK()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{ve.isPlaying=!1,ve.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const s=o=>this.player.supports("method",o);return iK()(s)(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(s=>{this.player.setCurrentTime(s+t)})})};changeVolume=t=>{this.playerSupportsMethods(["getVolume","setVolume"])&&this.player.getVolume(s=>{this.player.setVolume(s+t)})};onKeyDown=t=>{const r=hn(this.togglePlay),a=hn(()=>this.keySeek(5)),i=hn(()=>this.keySeek(-5)),c=hn(()=>this.changeVolume(10)),l=hn(()=>this.changeVolume(-10));ms()([[Dh,r],[Wn,a],[Gn,i],[gr,c],[vr,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:s,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=zd(xs(h)),C=o&&$s(v),g=`${s}-provider`,x=C?"":void 0,y=C?void 0:v,T=C?void 0:"noopener noreferrer",S=C?"button":void 0,b=C?void 0:"_blank";return(0,n.jsx)("h2",{className:"embed__provider",children:(0,n.jsxs)("a",{className:"brand--hoverColor","data-external":x,href:y,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:T,role:S,style:C?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:b,children:[(0,n.jsx)(Cs,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,n.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:s,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}=s,g=jr(s);if(!h&&g!=="link")return null;const x=zd(xs(m)),y=r&&$s(x),T=`${o}-metadata-title`,S=`${o}-metadata-readmore`,b=L=>({"data-external":y?"":void 0,href:y?void 0:x,id:y?L:void 0,onBlur:y?()=>i?.(L):void 0,onFocus:y?()=>c?.(L):void 0,onMouseEnter:y?()=>l?.(L):void 0,onMouseLeave:y?()=>d?.(L):void 0,rel:y?void 0:"noopener noreferrer nofollow",role:y?"button":void 0,style:y?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:y?void 0:"_blank"});return(0,n.jsxs)("div",{className:"embed__meta__content",children:[(0,n.jsx)("h2",{className:"embed__title",children:(0,n.jsx)("a",{className:"brand--hoverColor",...b(T),children:(0,n.jsx)(ke,{value:f})})}),(0,n.jsx)(ke,{className:"embed__description",value:v}),(0,n.jsxs)("a",{className:"embed__readMore brand--hoverColor",...b(S),children:[g==="link"?`${a?.embedReadMore} ${C}`:`${a?.embedViewOn} ${C}`,(0,n.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:s,embedId:o,externalLinksDisabled:r,isLesson:a,labels:i,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=s??{},{description:v,originalUrl:C,src:g,thumbnail:x,title:y}=s,T=jr(s);if(T==="iframe"){const S=document.createElement("div");S.innerHTML=zp(g);const b=S.firstChild,L=b&&b.tagName&&b.tagName.toLowerCase()==="iframe";let N=100,k=32;if(this.props.isAuthoring&&f)return(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,n.jsx)("p",{className:"embed__relativeUrl--title",children:y}),(0,n.jsx)("p",{className:"embed__relativeUrl--url",children:C})]});if(L){const w=b.width.match(/%/),O=parseInt(b.width);b.src=xs(b.src),N=w?700*(O/100):O||16,k=parseInt(b.height)}const E=k/N,j=L?`${E*100}%`:"3rem";let A=null;try{A=new URL(b.src)}catch{}if(A){const{hostname:w}=A,O=w==="typeform.com"||w.endsWith(".typeform.com"),R=w==="forms.office.com";O&&(A.searchParams.append("disable-auto-focus","true"),b.src=A.toString()),R&&(A.searchParams.append("embed","true"),b.src=A.toString())}const I=L?b.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,n.jsx)("div",{className:"embed__title embed--iframe__title",children:y}),(0,n.jsx)(HK,{paddingBottom:j,ref:this.refIframeContainer,value:I})]})}else if(a){const S=f?g:zd(xs(g)),b=r&&$s(S),L=`${o}-lesson-title`,N=`${o}-lesson-url`,k=b?"":void 0,E=b?void 0:S,j=b?void 0:"noopener noreferrer nofollow",A=b?"button":void 0,I=b?void 0:"_blank";if(f){const w={"data-external":b?"":void 0,href:S,id:b?L:void 0,onBlur:b?()=>c?.(L):void 0,onFocus:b?()=>l?.(L):void 0,onMouseEnter:b?()=>d?.(L):void 0,onMouseLeave:b?()=>h?.(L):void 0,rel:b?void 0:"noopener noreferrer nofollow",role:b?"button":void 0,tabIndex:t?0:-1,target:b?void 0:"_blank"};return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,n.jsx)("h2",{className:"embed__title",children:(0,n.jsx)("a",{className:"brand--hoverColor",...w,children:(0,n.jsx)(ke,{value:y})})}),["link","photo"].includes(T)?(0,n.jsxs)("a",{className:"embed__relativeUrl--url","data-external":k,href:E,id:b?N:void 0,onBlur:b?()=>c?.(N):void 0,onFocus:b?()=>l?.(N):void 0,onMouseEnter:b?()=>d?.(N):void 0,onMouseLeave:b?()=>h?.(N):void 0,rel:j,role:A,tabIndex:t?0:-1,target:I,children:[S,T==="photo"?(0,n.jsx)("div",{className:"embed__relativeUrl--image",children:(0,n.jsx)(Cs,{alt:x?y:"",className:"embed__img",src:S})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:y,type:T})]})}return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(T)?(0,n.jsx)("a",{"data-external":k,href:E,id:b?N:void 0,onBlur:b?()=>c?.(N):void 0,onFocus:b?()=>l?.(N):void 0,onMouseEnter:b?()=>d?.(N):void 0,onMouseLeave:b?()=>h?.(N):void 0,rel:j,role:A,tabIndex:t?0:-1,target:I,children:(0,n.jsx)(Cs,{alt:x?y:"",className:"embed__img",src:R3(x)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:y,type:T}),this.renderMetaData()]})}else if(T==="link"){const S=f?g:xs(g),b=f||r&&$s(S),L=`${o}-link-readmore`,N=b?"":void 0,k=b?void 0:S,E=b?void 0:"noopener noreferrer nofollow",j=b?"button":void 0,A=b?void 0:"_blank";return(0,n.jsxs)("div",{"aria-hidden":!t,"aria-label":i?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,n.jsx)(ke,{className:"embed__title",value:y}),(0,n.jsx)(ke,{className:"embed__description",value:v}),(0,n.jsx)("a",{className:"embed__readMore brand--hoverColor","data-external":N,href:k,id:b?L:void 0,onBlur:b?()=>c?.(L):void 0,onFocus:b?()=>l?.(L):void 0,onMouseEnter:b?()=>d?.(L):void 0,onMouseLeave:b?()=>h?.(L):void 0,rel:E,role:j,target:A,children:i?.embedReadMore})]})}else return(0,n.jsxs)("div",{className:"embed embed--media",children:[m?(0,n.jsx)(ke,{"aria-hidden":!t,className:"embed__title",value:y}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:i,src:g,thumbnail:x,title:y,type:T})]})}renderEmbedIframe=t=>{const{allowTabNavigation:s,labels:o,src:r,thumbnail:a,title:i,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,n.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,n.jsx)(Ha,{allowTabNavigation:s,labels:o,src:R3(a)})});{const d=Kn.isIe11||Kn.isEdge,h=X()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,n.jsxs)("figure",{"aria-hidden":!s,"aria-label":o?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:s?0:-1,children:[(0,n.jsx)("meta",{content:"origin",name:"referrer"}),(0,n.jsx)("iframe",{allowFullScreen:!0,className:"embed__media",frameBorder:"0",inert:s?void 0:!0,loading:"lazy",onLoad:this.setupPlayer,ref:this.refIframePlayer,scrolling:l?"yes":"no",src:l?r:FK(r),title:i})]})}}}const M3=e=>{const t=Ih(),s=Fe(),o=e.externalLinksDisabled??(s&&"externalLinksDisabled"in s?s.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:a,handleFocus:i,handleBlur:c}=wl(),[l,d]=wr.useState([]),h=wr.useId();return wr.useEffect(()=>{if(!o||!e.data){d([]);return}const m=[],{providerUrl:f,src:v,useRelativePath:C}=e.data,g=jr(e.data);e.isLesson&&v&&$s(xs(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&&$s(xs(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&$s(xs(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&v&&$s(xs(v))&&g!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),g==="link"&&(C||v&&$s(xs(v)))&&m.push(`${h}-link-readmore`),d(m)},[o,e.data,e.showMetaData,e.isLesson,h]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)($K,{...e,embedId:h,externalLinksDisabled:o,isAuthoring:t,onLinkBlur:c,onLinkFocus:i,onLinkMouseEnter:r,onLinkMouseLeave:a}),l.map(m=>(0,n.jsx)(Al,{anchorId:m},m))]})};var VK=p(52974);const Nf=e=>e.toString().padStart(2,"0");function rc(e){const t=Math.floor(e),s=Math.floor(t/3600),o=Math.floor(t%3600/60),r=t%60;return s>0?`${s}:${Nf(o)}:${Nf(r)}`:`${o}:${Nf(r)}`}function Zfe(e=[]){return e.map(({time:t,title:s})=>`${rc(t)} ${s}`).join(`
`)}const zK=e=>{const[t,s,o]=e.split(":").reverse();return parseInt(t,10)+parseInt(s,10)*60+parseInt(o||"0",10)*3600},UK=/^(\d*:)?\d{1,2}:\d{2}$/,Xfe=(e,t)=>{const s=e.split(`
`).filter(r=>r.trim()!==""),o=[];for(const r of s){const[a,...i]=r.split(" ");if(!UK.test(a))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");o.push({time:zK(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},_K={hovered:null,setHovered:Jt},Ef=(0,u.createContext)(null);function GK({children:e}){const t=(0,u.useContext)(Ef),[s,o]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:s,setHovered:o}),[s]);return t!=null?(0,n.jsx)(n.Fragment,{children:e}):(0,n.jsx)(Ef.Provider,{value:r,children:e})}const O3=()=>(0,u.useContext)(Ef)??_K,WK=.001,If=(e,t,s)=>e!=null&&e.kind===t&&Math.abs(e.time-s)<WK,B3=$("video-seek-bar-overlay"),jf=e=>Math.max(0,Math.min(100,e)),D3=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},KK=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const s=e.map(o=>{const r=D3(o.time);return r==null||r>=t?null:{chapter:o,startTime:r}}).filter(o=>o!=null).sort((o,r)=>o.startTime-r.startTime);return s.map((o,r)=>{const a=s[r+1],i=a!=null?a.startTime:t;return i<=o.startTime?null:{chapter:o.chapter,endTime:i,leftPercent:jf(o.startTime/t*100),startTime:o.startTime,widthPercent:jf((i-o.startTime)/t*100)}}).filter(o=>o!=null)},QK=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const s=new Set;return e.forEach(o=>{const r=D3(o);r==null||r>=t||s.add(r)}),[...s].sort((o,r)=>o-r).map(o=>({leftPercent:jf(o/t*100),time:o}))};function YK({chapters:e,checkpointTimesSeconds:t,durationSeconds:s,onSeekToTime:o}){const r=It(),a=u.useMemo(()=>KK(e,s),[e,s]),i=u.useMemo(()=>QK(t,s),[t,s]),{hovered:c,setHovered:l}=O3(),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} ${rc(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,n.jsx)("div",{className:B3("markers"),role:"presentation",children:h.map(m=>(0,n.jsx)("button",{"aria-label":m.label,className:B3(m.element,{hovered:If(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 ZK=()=>{const e=ta();return J0(e)},F3=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,XK=e=>Object.entries(e).reduce((t,[,s])=>(s.ISO639_1&&(t.iso1Map[s.ISO639_1]=t.iso1Map[s.ISO639_1]||[],t.iso1Map[s.ISO639_1].push(s)),s.ISO639_3&&(t.iso3Map[s.ISO639_3]=t.iso3Map[s.ISO639_3]||[],t.iso3Map[s.ISO639_3].push(s)),t),{iso1Map:{},iso3Map:{}}),qK=(e,t,s)=>{let o=e,r="",a=s??F3(e,t);return!a&&e.includes("-")&&([o,r]=e.split("-"),a=F3(o,t),a&&(e=o)),{languageCode:o,code:e,regionCode:r,standard:a??"Articulate"}},ac=(e,t,s={})=>{const{code:o,standard:r}=qK(e.toLowerCase(),t,s.standard),{location:a,script:i,variant:c}=s;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=XK(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},qfe=(e,t,s={})=>ac(e,t,{standard:"Articulate",...s})?.ISO639_1||null,Jfe=(e,t,s={})=>ac(e,t,{standard:"Articulate",...s})?.ISO639_3||null,epe=(e,t,s={})=>ac(e,t,{standard:"ISO-639-1",...s})?.code||null,tpe=(e,t,s={})=>ac(e,t,{standard:"ISO-639-3",...s})?.code||null,H3=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),$3=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),V3=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),JK=(e,t)=>{const s=H3(e)&&H3(t)&&e.video.key===t.video.key,o=$3(e)&&$3(t)&&e.customVideo.src===t.customVideo.src,r=V3(e)&&V3(t)&&e.customVideo.key===t.customVideo.key;return s||o||r},eQ=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),tQ=e=>{const t=nn(),{currentLocale:s}=ot(),o=Ae(e,t),r=Ae(e,s),a=ZK();return(0,u.useMemo)(()=>{if(!!(s&&s!==t)&&a&&JK(o,r)&&eQ(r))return r.video.captions.find(l=>ac(l.code,a)?.code===s)?.id},[t,s,o,r,a])},sQ=2,nQ=1,oQ=()=>({previousTime:0,triggeredTimes:new Set}),rQ=(e,t,s)=>{const{previousTime:o}=s;t>o+sQ&&e.filter(a=>a<=t).forEach(a=>s.triggeredTimes.add(a)),t<o-nQ&&(s.triggeredTimes=new Set(e.filter(a=>a<=t))),s.previousTime=t;const r=e.find(a=>t>=a&&!s.triggeredTimes.has(a));return r==null?null:(s.triggeredTimes.add(r),r)};function aQ({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:s,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=s();if(i==null)return;const c=oQ();c.previousTime=i.currentTime,a.filter(f=>f<=i.currentTime).forEach(f=>c.triggeredTimes.add(f));let l=0;const d=()=>{const f=rQ(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)}},[s,t,a])}function z3(e){return Number.isFinite(e)&&e>0?e:0}function wf({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:s,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:x,src:y,style:T,subtitle:S,type:b}){const L=u.useRef(null),[N,k]=u.useState(0),E=u.useCallback(J=>{L.current=J,typeof g=="function"?g(J):g&&(g.current=J)},[g]),j=(0,Me.A)(x),A=Ih(),I=It(),w=Bh(),O=tQ(d),R=b==="customVideo",P=u.useCallback(()=>L.current?.containerElement?.querySelector("video")??null,[]),M=u.useCallback(J=>{L.current?.seekToTime(J)},[]),H=u.useCallback(J=>{Gp(),k(z3(J.duration)),v?.(J)},[v]),F=u.useCallback(J=>{C?.(J)},[C]),B=u.useCallback(()=>{ve.playerId=l,ve.isPlaying=!0},[l]),V=u.useCallback(()=>{ve.playerId===l&&(ve.isPlaying=!1)},[l]),[G,_]=u.useState(!1),Z=u.useRef(!1),oe=u.useCallback(()=>{_(!0);const J=L.current;if(J){const{duration:ne}=J.getProgress();k(z3(ne)),m?.({player:J})}},[m]);aQ({checkpointTimesSeconds:i,isLoaded:G,getMediaElement:P,onCheckpointReached:h}),u.useEffect(()=>{Z.current||G&&(t!=null&&t>0&&L.current?.seekToPercent(t),Z.current=!0)},[G,t]),u.useEffect(()=>{!j&&x&&L.current?.pause()},[j,x]),u.useEffect(()=>{const J=()=>{(!ve.isPlaying||ve.playerId!==l)&&L.current?.pause()};return ve.addChangeListener(J),()=>{ve.removeChangeListener(J)}},[l]);const Q=u.useMemo(()=>{const J=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(J==null&&T==null))return{...J,...T}},[c,T]),z=f==null?void 0:R?f:mt(f),D=G&&N>0&&(a.length>0||i.length>0),U=`${R?y:mt(y)}?v=1`,K=R?"application/x-mpegURL":void 0,Y=u.useMemo(()=>[{src:U,type:K??"video/mp4"}],[U,K]),q=u.useMemo(()=>{const J=[];if(r==null&&S&&J.push({kind:"captions",label:"English",src:R?S:mt(S),srcLang:"en"}),r!=null)for(const ne of r){const te=ne.url||(ne.key!=null?mt(ne.key):void 0);te&&J.push({default:ne.id===O?!0:void 0,kind:"captions",label:ne.name||w?.(ne.code)||ne.code,src:te,srcLang:ne.code})}return J},[r,S,R,w,O]);return(0,n.jsx)(VK.L,{crossOrigin:Kn.isLocalFilesystem?void 0:"anonymous",enableDownload:A,enablePlaybackSpeed:s??void 0,enableSeek:o==null?void 0:!o,inert:!e,labelBackToMoreOptions:I?.a11yMediaMoreOptionsBack,labelCaptions:I?.a11yMediaCaptions,labelCaptionsOff:I?.a11yMediaCaptionsOff,labelContainer:I?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:I?.a11yMediaCurrentTime,labelDownload:I?.a11yMediaDownload,labelDuration:I?.a11yMediaDuration,labelError:I?.a11yMediaErrorVideo,labelExitFullscreen:I?.a11yMediaExitFullscreen,labelExitPictureInPicture:I?.a11yMediaExitPictureInPicture,labelFullscreen:I?.a11yMediaFullscreen,labelMoreOptions:I?.a11yMediaMoreOptions,labelMute:I?.a11yMediaMute,labelPause:I?.a11yMediaPause,labelPictureInPicture:I?.a11yMediaPictureInPicture,labelPlay:I?.a11yMediaPlay,labelPlaybackRate:I?.a11yMediaPlaybackRate,labelPlaybackRateNormal:I?.a11yMediaPlaybackRateNormal,labelPlayVideo:I?.a11yMediaPlayVideo,labelReplay:I?.a11yMediaReplay,labelSeek:I?.a11yMediaSeek,labelSeekDisabled:I?.a11yMediaSeekDisabled,labelUnmute:I?.a11yMediaUnmute,labelVolume:I?.a11yMediaVolume,onPause:V,onPlay:B,onPlayheadSave:F,onReady:oe,onTimeUpdate:H,poster:z,ref:E,seekOverlay:D?(0,n.jsx)(YK,{chapters:a,checkpointTimesSeconds:i,durationSeconds:N,onSeekToTime:M}):null,sources:Y,style:Q,timeUpdateInterval:1e3,tracks:q})}var iQ=p(82920);function Xe(e){const t=iQ.forwardRef((s,o)=>{const r=jt();return(0,n.jsx)(e,{...s,getL10nValue:r,ref:o})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var cQ=p(65307),U3=p.n(cQ),lQ=p(54318),dQ=p.n(lQ);const uQ=e=>({...e,courseId:e.courseId||Hn()(["course","id"],e)}),hQ=e=>({...e,lessonId:e.lessonId||Hn()(["lesson","id"],e)}),mQ=({id:e,courseId:t,lessonId:s,refs:o})=>e||(o&&s?`${s}-${o}`:s||t),Af=Pe()(mQ,hQ,uQ),spe=St()(ai()(Ze()("id"),U3()("id",Af)),bo()(dQ()(Ze(),[Ze()("id"),Ze()("uploads")]),go()(["id"])),U3()("isUploading",qe()("status","uploading")));function npe(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const s=t[1]??"",o=t[2],r=encodeURIComponent(o);return`${s}${r}`}function fQ(e){return e.replace(/%2F/g,"/")}var pQ=p(82920);const Rf=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),Ud=e=>Rf(e)&&!e.isProcessing&&!e.error,gQ=(e,t)=>t?.mediaType==="audio"?!!e&&(Rf(e)||k3(t)||L3(t)&&!Rf(e)):Ud(e),vQ=e=>po()(Re()(!!e),lW()(`-${e}`));class CQ extends pQ.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:s,openTranscript:o,refs:r}=this.props,a=t?.items?.length===1?t.items[0]:void 0,i=this.props.item??a;let c=s;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=s}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||s)&&i&&o)return o({blockId:t?.id??s,item:i,refs:d})}renderAudio(t,s){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:x}=c(t),y=a&&typeof a=="object"&&"blockId"in a?a.blockId:a?.id||i||"",T=h&&typeof h=="object"&&"id"in h?h.id:"",S=this.props.refs??`items:${y}/items:${T}`,b=`audio-${v}-${l}`;return(0,n.jsx)(w3,{activeIndex:o,allowTabNavigation:r,id:b,isOverlayAudio:d,item:h,itemIndex:m,labels:f,mediaSrc:x.key,onTranscriptClick:this.onTranscriptClick,onTranscriptClose:this.props.closeTranscript??void 0,onTranscriptUpdate:this.props.onTranscriptUpdate,refs:S,shouldPause:x.pause||C,side:g,transcriptMedia:t,uploadId:s,volumeSliderPosition:this.props.volumeSliderPosition},b)}renderImage(t){const{allowTabNavigation:s,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,n.jsx)(Ha,{align:h,allowTabNavigation:s,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:it(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,s){const{allowTabNavigation:o,blockId:r,lessonNumber:a,index:i,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?fQ(t.poster):t.poster,h=vQ(r)(`video-${a}-${i}-${d||""}`);return(0,n.jsx)(wf,{allowTabNavigation:o,canAdjustPlaybackSpeed:c,captions:t.captions,id:h,media:s,poster:d,shouldPause:t.pause||l,src:t.key},h)}renderEmbed(t){const{allowTabNavigation:s,embedClass:o,labels:r,opts:a,shouldPause:i}=this.props,{fullEmbed:c,showMetaData:l=!0}=a,d=`embed-${this.props.index}`;return(0,n.jsx)("div",{className:o,children:(0,n.jsx)(M3,{allowTabNavigation:s,data:t,id:d,isLesson:c,labels:r,shouldPause:t.pause||i,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:s,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":s}),{audio:h,embed:m,image:f,video:v}=this.props.getL10nValue(l)??{},C=Af({lessonId:r,refs:c}),g=this.props.getUpload?this.props.getUpload(C):null;return(0,n.jsxs)("div",{className:d,"data-l10n-id":Et(l),children:[(!a||a==="image")&&Ud(f)&&this.renderImage(f),(!a||a==="audio")&&gQ(h,g)&&this.renderAudio(l,C),(!a||a==="video")&&Ud(v)&&this.renderVideo(v,l),(!a||a==="embed")&&Ud(m)&&this.renderEmbed(m)]})}}const Kt=KW(yl(Eb(Xe(CQ))));function pn(e,t,s,o){const a=t==="bottom"||!s&&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",x={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 s&&o==="timeline"&&!t?x.top:s&&o!=="timeline"?a==="bottom"?x.legacyBottom:x.legacyTop:a==="bottom"?x.bottom:x.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 s&&o==="timeline"&&!t?g.legacyTop:s&&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 xQ=p(82920);const In=$("block-text"),bQ=class extends xQ.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,n.jsx)(ke,{value:t})}renderText(e){const{labels:t,takingSnapshot:s,variant:o}=this.props,r=o?.includes("column"),a="paragraph"in e?e.paragraph:void 0;return r||s?(0,n.jsx)(iW,{item:e,labels:t,children:(0,n.jsx)(We,{value:a||""})}):(0,n.jsx)(We,{className:In("col"),value:a||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:s,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),x=Object.keys(g?.audio??{}).length>0,{audioPosition:y,entranceAnimation:T,cellPadding:S=1.5,tableWidth:b=76,textPadding:L=.8,textWidth:N=76}=d,k=m==="table",E=t===1,j=t>1,A=k?b:N,I=!k&&E,w=k,O=FG(S),R=HG(L),P=Bd(A),M=In({[h]:!I&&!w||j,[`${h}-custom-width`]:!j,[`${h}-custom-width-table-${P}`]:w,[`${h}-custom-width-text-${P}`]:I,[`heading-custom-text-padding-${R}`]:I,[`${h}-custom-cell-padding-${O}`]:w,"no-animation":!T}),H=t>2?In("container-wide"):In("container",{authoring:!r}),F=this.getHeadingComponent(),B=C(Array.isArray(l)?{}:l),V=pn(B,y);return(0,n.jsx)(Ie,{className:M.toString(),defaultBackgroundColor:s,children:(0,n.jsxs)("div",{className:H,"data-block-id":e,"data-block-text":"",children:[(0,n.jsx)("div",{className:In("row"),children:o!==""?a.slice(0,1).map((G,_)=>(0,n.jsx)("div",{className:In("col"),children:(0,n.jsx)("div",{className:In("heading"),children:(0,n.jsx)(F,{children:v(G)})})},"id"in G?G.id:_)):null}),V.renderOrder.map((G,_)=>{if(G==="text")return(0,n.jsx)("div",{className:In("row"),children:h!=="heading"?a.slice(0,t).map((Z,oe)=>(0,n.jsx)(u.Fragment,{children:f(Z)},"id"in Z?Z.id:oe)):null},`text-${_}`);if(G==="audio"&&x){const Z=V.renderOrder.indexOf("audio")<V.renderOrder.indexOf("text");return(0,n.jsx)("div",{className:In("row",{media:!0,top:Z,bottom:!Z,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,n.jsx)("div",{className:In("col",{media:!0}),children:(0,n.jsx)(Kt,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:i,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${_}`)}})]})})}},Do=Xe(bQ),yQ=Do,SQ=e=>(0,n.jsx)(Do,{columns:2,type:"twocol",...e}),TQ=e=>(0,n.jsx)(Do,{columns:3,type:"threecol",...e}),LQ=e=>(0,n.jsx)(Do,{columns:4,type:"fourcol",...e}),kQ=e=>(0,n.jsx)(Do,{heading:"heading",type:"heading",...e}),NQ=e=>(0,n.jsx)(Do,{heading:"subheading",type:"heading",...e}),EQ=e=>(0,n.jsx)(Do,{heading:"heading",...e}),IQ=e=>(0,n.jsx)(Do,{heading:"subheading",...e});var ic=p(82920);const jQ=1e3,wQ={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},AQ=e=>{const{afterAnimatedIn:t,animateIn:s="fadeIn",children:o,className:r,duration:a=1,initiallyVisible:i,siblingDelay:c=0}=e,l=ic.useRef(null),[d,h]=ic.useState(!1);ic.useEffect(()=>{const f=l.current;if(i&&f){h(!0);return}if(d||!f||typeof window>"u")return;const v=Pm(),C=new IntersectionObserver(([x])=>{x!=null&&(x.isIntersecting||x.intersectionRatio>0)&&(h(!0),C.unobserve(x.target))},{root:v,rootMargin:$1,threshold:0});C.observe(f);const g=setTimeout(()=>{h(x=>{if(x)return x;const y=l.current;if(!y)return x;const T=y.getBoundingClientRect(),S=v?.getBoundingClientRect(),b=S?.top??0,L=S?.bottom??window.innerHeight,N=(L-b)*.1;return T.bottom>b-N&&T.top<L+N?!0:x})},jQ);return()=>{C.disconnect(),clearTimeout(g)}},[i,d]),ic.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]),ic.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":s==="none"?"0s":`${a}s`,"--scroll-animation-from":wQ[s]??"translateY(0)"};return(0,n.jsx)("div",{className:X()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:o})},RQ=matchMedia("(prefers-reduced-motion: reduce)");function ws(){return RQ.matches}const Be=e=>{const{afterAnimatedIn:t,animateBlockEntrance:s,animateIn:o,children:r,className:a,duration:i,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&s&&!ws()?(0,n.jsx)(AQ,{afterAnimatedIn:t,animateIn:o,className:a,duration:i,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,n.jsx)("div",{children:r}):r},rpe="group",PQ="tablist",MQ="tabpanel",ape="tab",ipe="radio",cc=({caption:e,editable:t,id:s,isOverlayType:o,getL10nValue:r})=>{const a=!!(!o&&!t&&r(e));return{figcaptionId:a?`figcaption-${s}`:void 0,isFigure:a,role:a?"figure":void 0,tagName:a?"figure":"div"}};var _3=p(82920);const OQ=_3.lazy(async()=>{const[e,t]=await Promise.all([p.e("ace").then(p.t.bind(p,46036,23)),p.e("ace").then(p.bind(p,52104)),p.e("ace").then(p.t.bind(p,82091,23)),p.e("ace").then(p.t.bind(p,29614,23)),p.e("ace").then(p.t.bind(p,83546,23)),p.e("ace").then(p.t.bind(p,21994,23)),p.e("ace").then(p.t.bind(p,83546,23)),p.e("ace").then(p.t.bind(p,70989,23)),p.e("ace").then(p.t.bind(p,58242,23)),p.e("ace").then(p.t.bind(p,53567,23)),p.e("ace").then(p.t.bind(p,2433,23)),p.e("ace").then(p.t.bind(p,9603,23)),p.e("ace").then(p.t.bind(p,11507,23)),p.e("ace").then(p.t.bind(p,17146,23)),p.e("ace").then(p.t.bind(p,80170,23)),p.e("ace").then(p.t.bind(p,60681,23)),p.e("ace").then(p.t.bind(p,50661,23)),p.e("ace").then(p.t.bind(p,31628,23)),p.e("ace").then(p.t.bind(p,43159,23)),p.e("ace").then(p.t.bind(p,8916,23)),p.e("ace").then(p.t.bind(p,74243,23)),p.e("ace").then(p.t.bind(p,59014,23))]);return{default:t.default}}),BQ=({classNames:e,code:t})=>{const[s,o]=(0,u.useState)(!1),{announcePolite:r}=xn(),a=async()=>{const i=(0,kr.htmlDecode)(t);await navigator.clipboard.writeText(i),o(!0),setTimeout(()=>o(!1),1e3),r("Copied!")};return(0,n.jsx)("div",{className:e,children:(0,n.jsx)(Oo,{message:s?"Copied!":"Copy",children:(0,n.jsx)("button",{"aria-label":s?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:a,type:"button",children:(0,n.jsx)(ie,{name:s?"check":"copy"})})})})};class DQ extends _3.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,n.jsx)(We,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:s="",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:x,useAdvancedEditor:y,wrapWords:T}=l,S=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}),b={backgroundColor:C},L=C==="#fafafa"||Ct()(C),N=g??be.DARK;if(!L){const k=Bt({backgroundColor:C,contrast:N});Object.assign(b,{"--color-snippet-contrast":k})}return(0,n.jsx)(Ie,{className:S,defaultBackgroundColor:s,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:"block-text__container",children:i.slice(0,1).map(k=>{const E=cc({...k,getL10nValue:o});return(0,n.jsx)("div",{className:"block-text__row",children:(0,n.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,n.jsxs)("figure",{"aria-labelledby":E.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,n.jsx)(NM,{value:k.code,children:j=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(BQ,{classNames:"block-text__copy-button",code:j}),y?(0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(OQ,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(k.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:x,value:(0,kr.htmlDecode)(_u(j)),width:"100%",wrapEnabled:T})}):(0,n.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:_u(j)},dir:"ltr",style:b})]})}),k.caption&&(0,n.jsx)("figcaption",{id:E.figcaptionId,children:d(k)})]})})},k.id)})})})})}}const G3=Xe(DQ);function FQ({accentColor:e,backgroundType:t,blockBackgroundColor:s,noteColor:o,imageBackgroundDefault:r="#ffffff"}){return o!=null&&o!==""?o:HQ({accentColor:e,backgroundType:t,blockBackgroundColor:s,imageBackgroundDefault:r})}function HQ({accentColor:e,backgroundType:t,blockBackgroundColor:s,imageBackgroundDefault:o="#ffffff"}){if(t!==se.IMAGE&&s==null)return"#000000b3";switch(t){case se.IMAGE:return o;case se.LIGHT:case se.GRAY:return en(.9,e);case se.DARK:return"#494949";case se.BLACK:return"#333333";default:{if(!s)return e;switch(la(s)){case ct.LIGHT:return en(.3,s);case ct.MED:return bn(.2,s);case ct.DARK:case ct.NEAR_BLACK:return bn(.4,s);default:return e}}}}function $Q(e,t){const s=os(),{cardMode:o,className:r="",children:a,disabled:i=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=s,C=Fe()?.theme,g=yn(),x=o??m??Hs.WHITE,y=Is()??"#ffffff",T=x===Hs.WHITE,S=g===se.COLOR,b=g===se.ACCENT,L=C?.accentContrast,N=g===se.ACCENT||g===se.COLOR,k=L===be.AUTO&&b||f===be.AUTO&&S,E=g===se.COLOR?f:L,j=[r,"block-card"];if(T)j.push("bg--range-light","block-card--white");else if(i){j.push("block-card--disabled");const A=Bt({backgroundColor:y,contrast:E});k&&(d["--color-text"]=A,d["--color-text-opposite"]=A===xt.DARK?xt.LIGHT:xt.DARK)}else{j.push("block-card--transparent");const I=Yj(y)??y??"#ffffff";switch(g){case se.LIGHT:case se.GRAY:j.push("bg--range-light");break;case se.IMAGE:j.push("bg--range-dark");break;case se.DARK:case se.BLACK:j.push("bg--range-dark"),d["--color-background-rgb"]=(0,ja.A)(I)?.slice(0,3);break;default:{const O=d["--color-background"]??(l?y:I),R=Bt({backgroundColor:O,contrast:E});N&&R==xt.LIGHT&&j.push("block-card--contrast-light");const P=la(O);j.push(`bg--range-${da()(P.toLowerCase())}`),d["--color-background"]=O,d["--color-background-rgb"]=(0,ja.A)(O)?.slice(0,3);break}}}return(0,n.jsx)(c,{...h,className:j.join(" "),ref:t,style:d,children:a})}const Ht=(0,u.forwardRef)($Q);var VQ=p(82920);const As=$("block-statement");class zQ extends VQ.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:s,type:o,labels:r,lessonId:a,media:i,settings:c},{paragraph:l}){const d=o==="note",h=s(Array.isArray(i)?{}:i),m=!!h?.audio,f=pn(h,c.audioPosition,!1,"statement"),v=(0,n.jsx)("div",{className:As("quote"),children:f.renderOrder.map((C,g)=>{if(C==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(We,{value:l})},`text-${g}`);if(C==="audio"&&m){const x=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,n.jsx)("div",{className:As("audio-container",{top:x,bottom:!x}),children:(0,n.jsx)(Kt,{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,n.jsx)(QQ,{getL10nValue:s,media:i,children:v}):v}render(){const{animateBlockEntrance:t,isLearner:s,items:o,renderText:r=this.renderTextDelegate,settings:a,type:i,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=jG(i),dividerSize:m=IG(i),noteIcon:f=!0,noteSize:v="sm",statementWidth:C=wG(i)}=a,g=OG(C),x=BG(h),y=DG(m),T=v,S=i==="a"||i==="b"||i==="d",b=i==="note",L=As({[i]:!0,[`${i}-custom-width-${g}`]:!0,[`${i}-divider-off`]:S&&!d,[`${i}-divider-padding-${x}`]:S&&d,[`${i}-divider-size-${y}`]:S&&d,[`note-size-${T}`]:b,[`note-size-${T}-no-icon`]:b&&!f,"no-animation":!l});return(0,n.jsx)(Ie,{className:L.toString(),children:(0,n.jsx)("div",{className:As("wrap"),children:(0,n.jsx)("div",{className:As("container"),children:(0,n.jsx)("div",{className:As("row"),children:o.slice(0,1).map(N=>(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:s,children:(0,n.jsxs)("div",{className:As("col"),children:[(0,n.jsx)("div",{className:As("divider-top-container"),children:(0,n.jsx)("div",{className:As("divider-top")})}),r(this.props,N),(0,n.jsx)("div",{className:As("divider-bottom")})]})},N.id))})})})})}}const lc=Xe(zQ),UQ=lc,_Q=e=>(0,n.jsx)(lc,{type:"b",...e}),GQ=e=>(0,n.jsx)(lc,{type:"c",...e}),WQ=e=>(0,n.jsx)(lc,{type:"d",...e}),KQ=e=>(0,n.jsx)(lc,{type:"note",...e}),QQ=({children:e,getL10nValue:t,media:s})=>{const o=os(),{accentColor:r,cardMode:a,cornerRadius:i,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=o,m=o.noteColor,f=o.noteColorContrast,{theme:v}=Fe(),C=Is(),g=yn(),x=g===se.COLOR,y=g===se.ACCENT,T=v?.accentContrast,S=g===se.DARK||g===se.BLACK,b=m!=null&&m!=="",N=x||y||S||b?Hs.TRANSPARENT:a,k=b&&(f??be.AUTO)===be.AUTO||T===be.AUTO&&y||l===be.AUTO&&x,E=(0,u.useMemo)(()=>FQ({accentColor:r??c,backgroundType:g,blockBackgroundColor:C,noteColor:m,imageBackgroundDefault:""}),[r,g,C,c,m]),j=b?f??be.AUTO:g===se.COLOR?l:T,A=Bt({backgroundColor:E,contrast:j}),I={"--color-background":E,...(k||b)&&{"--color-text":A},...i&&{"--corner-radius":`${Number(i)}px`},...h&&{"--color-theme-decorative":h},...b&&{"--color-theme":m}},w=As("note-icon",{off:!d}),R=(t?t(Array.isArray(s)?{}:s):void 0)?.image,P=R?.key&&Object.keys(R).length>0,M=P?V8(R)?mt(R.key):it(R):null,H=()=>d?P&&M?(0,n.jsx)("div",{"aria-hidden":!0,className:As("note-icon__custom"),style:{WebkitMaskImage:`url('${M}')`,maskImage:`url('${M}')`}}):(0,n.jsx)(ie,{name:"circle-info"}):null;return(0,n.jsxs)(Ht,{cardMode:N,className:As("note-card"),style:I,children:[(0,n.jsx)("div",{className:w,children:H()}),e]})};var lt=p(82920);function W3({ariaLabel:e,children:t,className:s="carousel-controls-item-btn",isActive:o,onClick:r,onKeyDown:a}){return(0,n.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,n.jsx)("button",{"aria-current":o,"aria-label":e,className:s,onClick:r,onKeyDown:a,tabIndex:o?0:-1,type:"button",children:t})})}function _d({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:s="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:x,shouldMouseEmulateTouch:y=!1,shouldUseCounter:T=!1,shouldUseGoToSlide:S=!0}){const b=lt.useId(),[L,N]=lt.useState(0),k=(0,Me.A)(L)??0,E=lt.useRef(null),j=lt.useRef(null),A=lt.useRef(!1),I=lt.useRef(!1),w=lt.useRef(void 0),O=lt.useRef(void 0),R=`carousel-${b}`,P=lt.Children.count(e),M=(0,Me.A)(P),H=lt.useMemo(()=>Array.from({length:P}),[P]),F=P>1;lt.useImperativeHandle(g,()=>({navigateToSlide:(Q,z=!0)=>{N(Q);const D=E.current?.children?.[Q]?.firstElementChild;z&&D?.focus()}}),[]);const B=lt.useCallback(({activeIndex:Q,dir:z})=>{const D=o?Q-1>=0?Q-1:P-1:Math.max(0,Q-1),U=o?Q+1<=P-1?Q+1:0:Math.min(P-1,Q+1);return z==="left"?r?U:D:r?D:U},[o,r,P]),V=lt.useCallback(()=>{N(Q=>B(r?{activeIndex:Q,dir:"right"}:{activeIndex:Q,dir:"left"}))},[B,r]),G=lt.useCallback(()=>{N(Q=>B(r?{activeIndex:Q,dir:"left"}:{activeIndex:Q,dir:"right"}))},[B,r]),_=lt.useCallback(Q=>{const z=E.current?.children?.[Q],D=E.current;if(z&&D){const U=z.getBoundingClientRect(),K=D.getBoundingClientRect(),Y=U.left+U.width/2,q=K.left+K.width/2,ee=Y-q;D.scrollBy({left:ee,behavior:"smooth"})}},[]),Z=lt.useCallback(Q=>{let z=!1,D=L;switch(Q.key){case"ArrowLeft":z=!0,D=B({activeIndex:L,dir:"left"});break;case"ArrowRight":z=!0,D=B({activeIndex:L,dir:"right"});break;case"Home":z=!0,D=0;break;case"End":z=!0,D=P-1;break}z&&(Q.stopPropagation(),Q.preventDefault()),L!==D&&(E.current?.children?.[D]?.firstChild?.focus(),_(D),N(D))},[L,B,_,P]);lt.useEffect(()=>{k!==L&&C?.(L)},[L,C,k]),lt.useEffect(()=>{P<M&&L>P-1&&N(P-1)},[L,M,P]),lt.useEffect(()=>{const Q=ee=>{ee.target.tagName==="IMG"&&ee.preventDefault(),w.current=ee.screenX},z=ee=>{const J=window.visualViewport?.scale??1,ne=window.getSelection().toString()!=="";if(!I.current&&J<=1.01&&!ne&&w.current!=null){O.current=ee.screenX;const te=O.current-w.current;Math.abs(te)>50&&(window.getSelection().empty(),A.current=!0,w.current=void 0,O.current=void 0,te<0?N(W=>B({activeIndex:W,dir:"right"})):N(W=>B({activeIndex:W,dir:"left"})))}},D=ee=>{A.current&&ee.stopPropagation(),A.current=!1,I.current=!1,w.current=void 0,O.current=void 0},U=ee=>{if(ee.touches.length>1){I.current=!0;return}ee.changedTouches.length===1&&ee.changedTouches[0]&&(w.current=ee.changedTouches[0].screenX)},K=ee=>{const J=window.visualViewport?.scale??1,ne=window.getSelection().toString()!=="";if(!I.current&&J<=1.01&&!ne&&w.current!=null&&ee.changedTouches[0]){O.current=ee.changedTouches[0].screenX;const te=O.current-w.current;Math.abs(te)>50&&(A.current=!0,w.current=void 0,O.current=void 0,te<0?N(W=>B({activeIndex:W,dir:"right"})):N(W=>B({activeIndex:W,dir:"left"})))}},Y=()=>{A.current=!1,I.current=!1,w.current=void 0,O.current=void 0},q=j.current;return y&&(q?.addEventListener("mousedown",Q,{capture:!0}),q?.addEventListener("mousemove",z,{capture:!0}),q?.addEventListener("click",D,{capture:!0})),q?.addEventListener("touchstart",U,{passive:!0}),q?.addEventListener("touchmove",K,{passive:!0}),q?.addEventListener("touchend",Y,{passive:!0}),q?.addEventListener("touchcancel",Y,{passive:!0}),()=>{y&&(q?.removeEventListener("mousedown",Q),q?.removeEventListener("mousemove",z),q?.removeEventListener("mouseup",Y)),q?.removeEventListener("touchstart",U),q?.removeEventListener("touchmove",K),q?.removeEventListener("touchend",Y),q?.removeEventListener("touchcancel",Y)}},[B,y,P]);const oe=lt.useCallback(Q=>()=>{_(Q),N(Q)},[_]);return(0,n.jsxs)("div",{"aria-label":a,"aria-roledescription":i,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":L},children:[F&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[S&&(0,n.jsx)("ul",{className:"carousel-controls-items",ref:E,role:"list",children:H.map((Q,z)=>{const D=L===z,U=oe(z);return x?x({index:z,isActive:D,onClick:U,onKeyDown:Z}):(0,n.jsx)(W3,{ariaLabel:h+" "+(z+1),isActive:D,onClick:U,onKeyDown:Z,children:(0,n.jsx)(ie,{className:"carousel-controls-item-btn-icon",name:D?"circle":"circle-solid"})},z)})}),(0,n.jsx)("button",{"aria-disabled":o?void 0:L===0,"aria-label":d,className:"carousel-controls-prev",onClick:!o&&L===0?void 0:V,type:"button",children:(0,n.jsx)(ie,{className:"carousel-controls-prev-icon",name:r?s:t})}),(0,n.jsx)("button",{"aria-disabled":o?void 0:L===P-1,"aria-label":l,className:"carousel-controls-next",onClick:!o&&L===P-1?void 0:G,type:"button",children:(0,n.jsx)(ie,{className:"carousel-controls-next-icon",name:r?t:s})}),T&&(0,n.jsxs)("div",{className:"carousel-controls-counter",children:[(0,n.jsx)("div",{className:"carousel-controls-counter-text",children:`${L+1} ${m} ${P}`}),(0,n.jsx)("div",{className:"carousel-controls-counter-line",children:(0,n.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((L+1)/P).toFixed(2))*100}%`}})})]})]})}),(0,n.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:j,children:lt.Children.map(e,(Q,z)=>{const D=`${R}-${z}-counter`;return(0,n.jsxs)("div",{"aria-labelledby":D,"aria-roledescription":v,className:"carousel-slide",hidden:L!==z,inert:L!==z,role:"group",children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:D,children:`${z+1} ${f} ${P}`}),Q]})})})]})}var dc=p(82920);const YQ="div",K3=dc.createContext(void 0);function ZQ({children:e,element:t,...s},o){const[r,a]=dc.useState(null);return(0,n.jsx)(K3.Provider,{value:r,children:dc.createElement(t??YQ,{...s,ref:o},e,(0,n.jsx)("div",{ref:a}))})}const uc=dc.forwardRef(ZQ);function cpe(){return dc.useContext(K3)}function Pf(e){const t=s=>{const o=rh();return(0,n.jsx)(e,{...s,isRTL:o})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const Gd=({blockId:e,carouselRef:t,children:s,items:o})=>{const r=(0,u.useRef)(null),a=t??r;return(0,u.useEffect)(()=>{const i=c=>{const{path:l}=c.detail,{blockId:d,cardId:h}=va(l,["block","card"]);if(d===e){const m=o.findIndex(f=>f.id===h);m>=0&&a.current?.navigateToSlide?.(m,!1)}};return window.addEventListener(Ge,i),()=>{window.removeEventListener(Ge,i)}},[o,e,a]),(0,n.jsx)(n.Fragment,{children:s({carouselRef:t})})},He=$("block-quote"),hc=({avatar:e,alt:t,l10nId:s,showAvatar:o})=>o?(0,n.jsx)(Cs,{alt:yo(t),className:He("avatar"),"data-l10n-id":s,src:e}):null,Q3=(e,{paragraph:t})=>{const s=t||"",o=He("text",{blank:t===""}).toString();return(0,n.jsx)(We,{className:o,value:s})},Y3=(e,{name:t})=>{const s=He("caption",{blank:t===""}).toString();return(0,n.jsx)(We,{className:s,value:t})},Z3=({avatar:e,blockProps:t,getL10nValue:s,item:o,renderCaption:r,renderText:a})=>{const i=o?.avatar?.media,c=s(i)?.image,l=c?.alt,d=mh(c),h=Et(i);return(0,n.jsx)("div",{className:He("slide"),children:(0,n.jsxs)("figure",{className:He("figure"),children:[d&&e?(0,n.jsx)(hc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,n.jsx)("blockquote",{className:He("quote-body"),children:a(t,o)}),(0,n.jsx)("figcaption",{children:r(t,o)})]})})},XQ=({alt:e,animateBlockEntrance:t,avatar:s,children:o,l10nId:r,initiallyVisible:a,isAuthorBlank:i=!1,isLearner:c,showAvatar:l,type:d})=>{const h=He("col",{"no-avatar":!s}),m=s?(0,n.jsx)("div",{className:He("image"),children:(0,n.jsx)("div",{className:He("avatar-wrap"),children:d==="c"?(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:a,isLearner:c,children:(0,n.jsx)(hc,{alt:e,avatar:s,l10nId:r,showAvatar:l})}):(0,n.jsx)(hc,{alt:e,avatar:s,l10nId:r,showAvatar:l})})}):null;return(0,n.jsx)("div",{className:He("container"),children:(0,n.jsx)("div",{className:He("row"),children:(0,n.jsxs)("div",{className:h,children:[(0,n.jsx)("div",{className:He("divider-top")}),(0,n.jsxs)("div",{className:He("figure",{"no-author":i,"no-avatar":!i&&!l}),children:[m,o]}),(0,n.jsx)("div",{className:He("divider-bottom")})]})})})},qQ=({avatar:e,children:t,alt:s,l10nId:o,showAvatar:r})=>(0,n.jsx)("div",{className:He("figure"),children:(0,n.jsx)("div",{className:He("container"),children:(0,n.jsxs)("div",{className:He("row"),children:[(0,n.jsx)("div",{className:He("col"),children:e&&r?(0,n.jsx)(hc,{alt:s,avatar:e,l10nId:o,showAvatar:r}):null}),(0,n.jsx)("div",{className:He("col"),children:t})]})})}),JQ=({background:e,avatar:t,children:s,alt:o,l10nId:r,showAvatar:a})=>(0,n.jsx)("div",{className:He("background"),style:{backgroundImage:e??""},children:(0,n.jsx)("div",{className:He("container"),children:(0,n.jsx)("div",{className:He("row"),children:(0,n.jsx)("div",{className:He("col"),children:(0,n.jsxs)("div",{className:He("figure"),children:[t&&a?(0,n.jsx)(hc,{alt:o,avatar:t,l10nId:r,showAvatar:a}):null,s]})})})})});class eY 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,s){const o=t?.alpha??AG(s),r=it(t),a=RG(s);return ul({alpha:o,color:a,url:r})?.backgroundImage}renderText(t,{paragraph:s}){const o=s||"",r=He("text",{blank:o===""}).toString();return(0,n.jsx)(We,{className:r,value:o})}renderCaption(t,{name:s}){const o=He("caption",{blank:s===""}).toString();return(0,n.jsx)(We,{className:o,value:s})}render(){const{animateBlockEntrance:t,getL10nValue:s,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:x=!0,quotesInline:y,quotePadding:T=2,quoteWidth:S=i3(c)}=i,[b]=a,{avatar:L,background:N}=b,k=s(L?.media)?.image,E=mh(k),j=k?.alt,A=Et(L.media),I=s(N?.media)?.image,w=I?.overlayColor,O=this.getBackgroundImageUrl(I,w),R=i?.avatar??E!=="",P=E&&E!=="",M=c==="background",H=M&&w==="light",F=c3(S),B=l3(T),V=gf(c,m),G=MG(v),_=c==="a",Z=c==="c"||M,oe=c!=="b"&&!M,Q=b?.name==="",z=b?.paragraph==="",D=He(null,{[c]:!0,[`${c}-custom-width-${F}`]:!0,[`${c}-divider-off`]:_&&!f,[`${c}-divider-size-${G}`]:_&&f,[`${c}-quote-padding-${B}`]:!0,[`${c}-align-${g}`]:M,[`${c}-${F}-no-avatar`]:!E||!R,[`${c}-avatar-size-${V}`]:R&&P,[`${c}-quote-icon-off`]:Z&&!x,[`${c}-legacy-quote-mark`]:oe&&!y,[`${c}-overlay-legacy`]:!w,[`${c}-overlay-light`]:H,"no-animation":!C}).toString(),U=(0,n.jsx)("div",{className:He("wrap",{blank:Q||z}),children:(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:o,isLearner:r,siblingDelay:.15,children:(0,n.jsxs)("figure",{children:[(0,n.jsx)("blockquote",{children:l(this.props,b)}),(0,n.jsx)("figcaption",{children:d(this.props,b)})]})})});let K;switch(c){case"d":K=(0,n.jsx)(qQ,{alt:j,avatar:E,initiallyVisible:o,l10nId:A,showAvatar:R,type:c,children:U});break;case"background":K=(0,n.jsx)(JQ,{alt:j,avatar:E,background:O,initiallyVisible:o,l10nId:A,showAvatar:R,type:c,children:U});break;default:K=(0,n.jsx)(XQ,{alt:j,animateBlockEntrance:t,avatar:E,initiallyVisible:o,isAuthorBlank:Q,isLearner:r,l10nId:A,showAvatar:R,type:c,children:U})}return(0,n.jsx)(Ie,{className:D,children:K})}}const mc=Xe(eY),X3=(e=>(0,n.jsx)(mc,{...e}));p.dn(X3);const tY=e=>(0,n.jsx)(mc,{type:"b",...e}),sY=e=>(0,n.jsx)(mc,{type:"c",...e}),nY=e=>(0,n.jsx)(mc,{type:"d",...e}),oY=e=>(0,n.jsx)(mc,{type:"background",...e});class rY 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:s,editable:o,getL10nValue:r,initiallyVisible:a=!1,isRTL:i,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:v=Q3,renderCaption:C=Y3,type:g}=this.props,{avatar:x=!0,avatarSize:y=pf(g),entranceAnimation:T,quotesInline:S,quotePadding:b=2,quoteWidth:L=i3(g),showBorder:N=!0}=f,E=g!=="b"&&!(g==="background"),j=c3(L),A=l3(b),I=gf(g,y),w=m==="mobile-portrait"||m==="mobile-landscape",O=He({[g]:!0,[`${g}-custom-width-${j}`]:!0,[`${g}-quote-padding-${A}`]:!0,[`${g}-${j}-no-avatar`]:!x,[`${g}-avatar-size-${I}`]:x,[`${g}-legacy-quote-mark`]:!l&&E&&!S,"no-animation":!T,"hide-border":!N,editable:o}).toString(),R=d.map(P=>(0,n.jsx)(Z3,{avatar:x,blockProps:this.props,getL10nValue:r,item:P,renderCaption:C,renderText:v},P.id));return(0,n.jsx)("div",{className:He("slider-container"),children:(0,n.jsx)(Ie,{className:O,children:(0,n.jsx)(uc,{className:He("wrap"),children:(0,n.jsx)("div",{className:He("container"),children:(0,n.jsx)("div",{className:He("col"),children:(0,n.jsx)(Ht,{className:He("box"),children:(0,n.jsx)(Be,{animateBlockEntrance:s,animateIn:"fadeInUp",initiallyVisible:a,isLearner:c,children:(0,n.jsx)(Gd,{blockId:t,items:d,children:({carouselRef:P})=>(0,n.jsx)(_d,{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:P,shouldMouseEmulateTouch:w,children:R})})})})})})})})})}}const aY=Pf(Xe(rY)),Wd=$("block-quote"),iY=e=>{const{animateBlockEntrance:t,initiallyVisible:s=!1,isLearner:o,items:r=[],settings:a,renderText:i=Q3,renderCaption:c=Y3,type:l="stacked"}=e,d=jt(),{avatar:h=!0,entranceAnimation:m}=a,f=a.avatarSize??pf(l),v=gf(l,f),C=Wd({[l]:!0,[`${l}-avatar-size-${v}`]:!0,"no-animation":!m}).toString(),g=r.map(x=>(0,n.jsx)(Z3,{avatar:h,blockProps:e,getL10nValue:d,item:x,renderCaption:c,renderText:i},x.id));return(0,n.jsx)(Ie,{className:C,children:(0,n.jsx)(uc,{className:Wd("wrap"),children:(0,n.jsx)("div",{className:Wd("container"),children:(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:s,isLearner:o,siblingDelay:.15,children:(0,n.jsx)("div",{className:Wd("row"),children:g})})})})})};var q3=p(82920);const bs=$("block-list"),cY=class extends q3.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:s,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:x,listItemColor:y,listItemColorContrast:T,listWidth:S}=f,b=r(Array.isArray(h)?{}:h),L=pn(b,C),N=PG(g),k=Bd(S),E=bs({[v]:!0,[`${v}-custom-width-${k}`]:!0,[`${v}-bullet-padding-${N}`]:!0,"no-animation":!x}),j=v==="numbered"?"ol":"ul";return(0,n.jsx)(Ie,{className:E.toString(),defaultBackgroundColor:s,children:(0,n.jsx)("div",{className:bs("container"),children:(0,n.jsx)("div",{className:bs("row"),children:(0,n.jsx)(uc,{className:bs("col"),children:(0,n.jsx)("div",{className:"blocks-list__container",children:L.renderOrder.map((A,I)=>{if(A==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(j,{className:bs("list"),role:"list",children:(0,n.jsx)(Be,{animateBlockEntrance:e,animateIn:"fadeInRight",className:bs("animated-item").toString(),initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map((w,O)=>{const R={key:w.id,index:O,lessonId:d,blockId:t,type:v,editable:o,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:y,listItemColorContrast:T,...w};return this.props.renderItem?this.props.renderItem(R):(0,u.createElement)(lY,{...R,key:R.key})})})})},`text-${I}`);if(A==="audio")return(0,n.jsx)("div",{className:X()("block-list__media",{"audio-on-top":L.renderOrder[0]==="audio","audio-on-bottom":L.renderOrder[0]!=="audio"}),children:(0,n.jsx)(Kt,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${A}-${I}`)})})})})})})}};class lY extends q3.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,n.jsx)(We,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,id:s,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:s,value:a};return(0,n.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,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:bs("number"),style:h?{backgroundColor:h,color:Bt({contrast:m||be.AUTO,backgroundColor:h})}:void 0,children:r||o+1}),l(f)]}),t==="bulleted"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,n.jsx)(ie,{className:bs("bullet"),name:"circle-solid",style:h?{color:h}:void 0}),l(f)]}),t==="icon"&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:bs("icon"),style:h?{"--color-background":h}:void 0,children:(0,n.jsx)("span",{"aria-hidden":"true",className:bs("icon-glyph",{placeholder:!0}),children:"\u2B50\uFE0F"})}),l(f)]}),t==="checkboxes"&&(0,n.jsxs)("label",{className:bs("option"),children:[(0,n.jsx)("input",{className:bs("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,n.jsx)("div",{className:bs("checkbox"),style:h?{borderColor:h,"--color-background":h}:void 0,children:(0,n.jsx)(ie,{className:bs("checkbox__icon"),name:"check",style:h?{color:Bt({contrast:m||be.AUTO,backgroundColor:h})}:void 0})}),l(f)]})]})}}const dY=Xe(cY),Kd=e=>(0,n.jsx)(dY,{...e}),uY=Kd,hY=e=>(0,n.jsx)(Kd,{type:"checkboxes",...e}),mY=e=>(0,n.jsx)(Kd,{type:"bulleted",...e}),fY=e=>(0,n.jsx)(Kd,{type:"icon",...e});var Mf=p(82920);const Of=e=>["hero","full","aside"].includes(e);class pY extends Mf.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,s){return(0,n.jsx)(We,{className:"block-image__caption",value:s})}render(){const{aiMagicIcon:t,aiOverlay:s,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:x,cornerRadius:y,zoomOnClick:T}=C,S=X()(`block-image block-image--${m}`,"block-image--flag-dimensions",{"block-image--no-animation":!x}),b=h[0],{id:L,caption:N}=b,{image:k,audio:E}=c(b.media)??{},j=k?.alt,A=it(k),I=k?.dimensions,w=I?.width||I?.originalWidth,O=I?.height||I?.originalHeight,R=cc({caption:N,editable:i,id:L,getL10nValue:c}),P=!d&&!A,M=w&&O?w/O:void 0,H=k?.link?c(k.link.destination):void 0,F=k?.link&&typeof H=="string"?{type:k.link.type,destination:H}:void 0,B=X()("block-image__image",{"block-image__image--audio-overlay":!!E});return(0,n.jsx)(Ie,{className:S,defaultBackgroundColor:a,children:(0,n.jsx)("div",{className:"block-image__container",children:(0,n.jsx)("div",{className:"block-image__row",children:(0,n.jsx)("div",{className:"block-image__col",children:(0,n.jsx)(Be,{animateBlockEntrance:o,initiallyVisible:l,isLearner:d,children:(0,n.jsxs)(R.tagName,{"aria-labelledby":R.figcaptionId,className:"block-image__figure",role:R.role,children:[(0,n.jsxs)("div",{className:B,children:[P?(0,n.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:M},children:[(0,n.jsx)("div",{children:t}),(0,n.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ha,{alt:j,cornerRadius:y,disableZoom:!T,height:O,l10nId:Et(b.media),labels:f,link:F,maxHeight:m==="full"?380:900,src:A,width:w}),E&&Of(m)&&(0,n.jsx)(Kt,{blockId:r,cornerRadius:y,index:`${r}-${L}-0`,isOverlayAudio:!0,item:b,labels:f,lessonId:v,media:b.media,mediaType:"audio"})]}),s&&(0,n.jsx)("div",{className:"block-image__ai-overlay",children:s})]}),(i||N)&&(0,n.jsx)("figcaption",{id:R.figcaptionId,children:g(L,N)})]})})})})})})}}const gY=Xe(pY),vY=(e,t,s,o,r)=>t?r:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:s,isLearner:o,children:r});class CY extends Mf.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,s){return(0,n.jsx)(We,{className:"block-image__text",value:s})}renderCaption(t,s){return(0,n.jsx)(We,{className:"block-image__caption",value:s})}renderImage(t,s,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=it(m),g=m?.dimensions,x=g?.width||g?.originalWidth,y=g?.height||g?.originalHeight,T=cc({caption:s,editable:i,id:t,getL10nValue:d}),{animateBlockEntrance:S,initiallyVisible:b,isLearner:L,labels:N,settings:{cornerRadius:k,zoomOnClick:E}}=this.props,j=X()("block-image__image",{"block-image__image--audio-overlay":!!f}),A=m?.link?d(m.link.destination):void 0,I=m?.link&&typeof A=="string"?{type:m.link.type,destination:A}:void 0;return(0,n.jsx)(Be,{animateBlockEntrance:S,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:b,isLearner:L,children:(0,n.jsxs)(T.tagName,{"aria-labelledby":T.figcaptionId,className:"block-image__figure",role:T.role,children:[(0,n.jsxs)("div",{className:j,children:[(0,n.jsx)(Ha,{alt:v,cornerRadius:k,disableZoom:!E,height:y,l10nId:Et(o?.media),labels:N,link:I,maxHeight:900,src:C,width:x}),f&&Of("aside")&&(0,n.jsx)(Kt,{blockId:a,cornerRadius:k,index:`${a}-${t}-0`,isOverlayAudio:!0,item:o,labels:N,lessonId:c,media:o.media,mediaType:"audio"})]}),(i||s)&&(0,n.jsx)("figcaption",{id:T.figcaptionId,children:l(t,s)})]})})}render(){const{defaultBackgroundColor:t,items:s,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=s[0],{id:f,caption:v}=m,C="paragraph"in m?m.paragraph:void 0;return(0,n.jsx)(Ie,{className:h,defaultBackgroundColor:t,children:(0,n.jsx)("div",{className:"block-image__container",children:(0,n.jsxs)("div",{className:"block-image__row",children:[(0,n.jsx)("div",{className:"block-image__col",children:d?o(f,C):this.renderImage(f,v,m,"left")}),(0,n.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,v,m,"right"):o(f,C)})]})})})}}const xY=Xe(CY);class bY extends Mf.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,s){return(0,n.jsx)(We,{className:"block-image__caption",value:s})}renderOverlay(t,s){return(0,n.jsx)(We,{className:"block-image__paragraph",value:s})}renderOverlayCaption(t,s){const{animateBlockEntrance:o,initiallyVisible:r,isLearner:a,renderOverlay:i=this.renderOverlayDelegate}=this.props;return(0,n.jsx)("div",{className:"block-image__container",children:(0,n.jsx)("div",{className:"block-image__row",children:(0,n.jsx)("div",{className:"block-image__col",children:(0,n.jsx)(Be,{animateBlockEntrance:o,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:a,children:i(t,s)})})})})}render(){const{animateBlockEntrance:t,blockId:s,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:x}=m,y=Ph(m?.backgroundColor,o),T=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!C,"block-image--dark":Bm(y)}),S={opacity:g||.6,backgroundColor:x||"transparent"},b=l[0],{id:L,caption:N}=b,k=a(b.media),E=k?.image,j=k?.audio,A=E?.key,I=it(E),w=E?.dimensions,O=w?.width||w?.originalWidth,R=w?.height||w?.originalHeight,P=yo(E?.alt),M=f==="overlay",H=cc({caption:N,editable:r,id:L,isOverlayType:M,getL10nValue:a});return(0,n.jsxs)(Ie,{"aria-labelledby":H.figcaptionId,className:T,defaultBackgroundColor:o,role:H.role,tag:H.tagName,children:[vY(t,M,i,c,(0,n.jsxs)("div",{className:"block-image__figure",children:[A&&(0,n.jsxs)("div",{className:"block-image__image","data-l10n-id":Et(b?.media),style:{backgroundImage:`url('${I}')`},children:[(0,n.jsx)(Cs,{alt:P,height:R,src:I,width:O}),(0,n.jsx)("div",{className:"block-image__overlay",style:S}),j&&Of(f)&&(0,n.jsx)(Kt,{blockId:s,index:`${s}-${L}-0`,isOverlayAudio:!0,item:b,labels:d,lessonId:h,media:b.media,mediaType:"audio"})]}),M?this.renderOverlayCaption(L,N):null]})),!M&&(r||N)&&(0,n.jsx)("figcaption",{className:"block-image__container",id:H.figcaptionId,children:v(L,N)})]})}}const Bf=Xe(bY),yY=e=>(0,n.jsx)(Bf,{type:"overlay",...e}),SY=e=>(0,n.jsx)(Bf,{type:"banner",...e});var TY=p(82920);function J3(e){class t extends TY.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,n.jsx)(We,{allowTabNavigation:a,className:"block-gallery__caption",value:r})}render(){const{renderCaption:o=this.renderCaptionDelegate}=this.props;return(0,n.jsx)(e,{...this.props,renderCaption:o})}}return t}var Qd=p(82920);const ey=$("block-gallery-carousel");function LY({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:s,editable:o,initiallyVisible:r,isLearner:a,labels:i,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[v,C]=Qd.useState(0),g=Qd.useCallback(S=>{C(S),d?.(l[S])},[l,d]),x=h===nr.MOBILE_PORTRAIT||h===nr.MOBILE_LANDSCAPE,y=ey({noAnimation:!f?.entranceAnimation||ws()}).toString(),T=rh();return(0,n.jsx)(Ie,{className:y,defaultBackgroundColor:s,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)(uc,{className:ey("container").toString(),children:(0,n.jsx)(Gd,{blockId:e,items:l,children:({carouselRef:S})=>(0,n.jsx)(_d,{isRTL:T,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:S,shouldMouseEmulateTouch:x,children:l.map((b,L)=>(0,n.jsx)(NY,{activeIndex:v,blockId:e,editable:o,index:L,item:b,labels:i,lessonId:c,renderCaption:m,settings:f},b.id))})})})})})}const kY=J3(LY),Df=$("block-gallery-carousel-item");function NY({activeIndex:e,blockId:t,editable:s,index:o,item:r,labels:a,lessonId:i,renderCaption:c,settings:l}){const[d,h]=Qd.useState(!1),{image:m,audio:f}=Ae(r.media),v=Ae(m?.link?.destination),C=m?.dimensions,g=Qd.useCallback(()=>{h(!0)},[]);return(0,n.jsxs)("figure",{className:Df(),children:[s&&!d&&(0,n.jsx)("div",{className:Df("loading"),children:"Loading image..."}),(0,n.jsxs)("div",{className:Df("image-container",{"audio-overlay":!!f}),children:[(0,n.jsx)(Ha,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:C?.height||C?.originalHeight,l10nId:Et(r?.media),labels:a,link:m?.link&&typeof v=="string"?{type:m.link.type,destination:v}:void 0,maxHeight:900,onLoad:g,src:it(m),width:C?.width||C?.originalWidth}),f&&(0,n.jsx)(Kt,{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})]}),(s||r.caption)&&d&&(0,n.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const EY=({alt:e,cornerRadius:t,disableZoom:s,height:o,l10nId:r,labels:a,link:i,src:c,width:l})=>(0,n.jsx)("div",{className:"block-gallery__image",children:(0,n.jsx)(Ha,{alt:e,cornerRadius:t,disableZoom:s,height:o,l10nId:r,labels:a,link:i,maxHeight:900,src:c,width:l})}),IY=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}};function jY(e){return(0,n.jsx)(kY,{...e})}class wY extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}render(){const{animateBlockEntrance:t,defaultBackgroundColor:s,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--${IY(m)}`,{"block-gallery--no-animation":!f||ws()});return(0,n.jsx)(Ie,{className:g,defaultBackgroundColor:s,children:(0,n.jsx)("div",{className:"block-gallery__container",children:(0,n.jsx)("div",{className:"block-gallery__row",children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:a,isLearner:i,siblingDelay:.25,children:c.map(x=>{const{id:y}=x,T=x.caption,S=r(x.media)?.image,b=S?.alt,L=S?.key,N=S?.dimensions,k=N?.width||N?.originalWidth,E=N?.height||N?.originalHeight,j=it(S),A=r(S?.link?.destination),I=cc({caption:T,editable:o,id:y,getL10nValue:this.props.getL10nValue});return(0,n.jsx)("div",{className:"block-gallery__col",children:(0,n.jsxs)(I.tagName,{"aria-labelledby":I.figcaptionId,className:"block-gallery__figure",role:I.role,children:[L&&(0,n.jsx)(EY,{alt:b,cornerRadius:v,disableZoom:!C,height:E,l10nId:Et(x?.media),labels:l,link:S?.link&&typeof A=="string"?{type:S.link.type,destination:A}:void 0,src:j,width:k}),(o||T)&&(0,n.jsx)("figcaption",{id:I.figcaptionId,children:d(y,T)})]})},y)})})})})})}}const Ff=J3(Xe(wY)),Hf=$("block-divider"),$f=({isLearner:e,labels:{numberedDividerGroup:t},number:s,settings:o,type:r="divider"})=>{const{entranceAnimation:a}=o,i=r==="numbered",l=Hf({authoring:!e,spacing:r==="spacing",numbered:i,"no-animation":!a}).toString(),d=i?(0,n.jsxs)("div",{className:Hf("wrap__number"),children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:t}),s]}):null;return(0,n.jsx)(Ie,{className:l,children:(0,n.jsx)("div",{className:Hf("wrap",{authoring:!e&&!i}),children:d})})},AY=$f,RY=e=>(0,n.jsx)($f,{type:"numbered",...e}),PY=e=>(0,n.jsx)($f,{type:"spacing",...e});var MY=p(8608),OY=p.n(MY),BY=p(48451),ty=p.n(BY),DY=p(98334),Yd=p.n(DY),FY=p(99969),Zd=p.n(FY),Xd=p(82920);const HY=30,sy=Mh("blockSettings");class $Y extends Xd.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:s,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,n.jsx)(Ie,{className:C,"data-block-id":s,children:(0,n.jsx)(Be,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:"blocks-accordion__container",children:(0,n.jsx)("div",{className:"blocks-accordion__row",children:(0,n.jsx)("div",{className:"blocks-accordion__col",children:(0,n.jsx)(KY,{blockId:s,editable:o,enableVideoPlaybackSpeed:m,items:i,keepOpen:v==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const VY={isOpen:!1,isActive:!1},zY=e=>(t,{id:s})=>Object.assign({},t,{[s]:e[s]||VY}),ny=(e,t)=>t.reduce(zY(e),{}),UY=(e,t)=>(s,o)=>{const r=e==o,a=r?!s.isOpen:s.isOpen,i=r&&!s.isOpen;return{isOpen:t?a:i,isActive:r}},_Y=e=>(t,s)=>{const o=s==e;return{isOpen:o,isActive:o}},GY=e=>(t,s)=>({isOpen:s==e,isActive:t.isActive});class WY extends Xd.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:s}=this.props;this.state={itemStatusMap:ny({},s)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(Ge,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(Ge,this.handleNavtoTab)}handleNavtoTab(t){const s=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(s===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=_Y(l);this.setState({itemStatusMap:vn()(d,c)}),open&&i(a[r])}}UNSAFE_componentWillReceiveProps(t){const s=t.items,o=Fs()(s)!==Fs()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():o&&this.rebuildItemStatusMap(s)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:s}=this.props,o=OY()(a=>t[a.id].isOpen,s);if(!o)return;const r=GY(o.id);this.setState({itemStatusMap:vn()(r,t)})}rebuildItemStatusMap(t){const s=this.state.itemStatusMap;this.setState({itemStatusMap:ny(s,t)})}handleItemClick(t){const{items:s,keepOpen:o,onStep:r}=this.props,{itemStatusMap:a}=this.state,i=s[t].id,c=UY(i,o);this.setState({itemStatusMap:vn()(c,a)}),open&&r(s[t])}render(){const{items:t,settings:s,editable:o,labels:r,lessonId:a,blockId:i,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=s,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,n.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,n.jsx)(YY,{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 KY=sy(WY);class QY extends Xd.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=Yd()(),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 s=this.content;if(s&&(s.classList.add("blocks-accordion__content--visible"),!t.open&&this.props.open)){const o=s.parentElement,r=o?.getBoundingClientRect()?.top,a=r!=null&&r>0&&r<window.innerHeight,i=ws()?"instant":"smooth";a||o.scrollIntoView({behavior:i,block:"start"})}}toggle(t){const{blockId:s,index:o}=this.props,r=ve.playerId,a=new RegExp(`-${o}(?:-.+)?$`);open&&r&&r.includes(s.toString())&&a.test(r)&&ve.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:s}=this.props.item;return(0,n.jsx)(ke,{className:"blocks-accordion__title",id:t,value:s})}renderDescription(t){const{description:s=""}=this.props.item;return(0,n.jsx)(We,{className:"blocks-accordion__description",value:s||""},t)}render(){const{blockId:t,blockSettings:s,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,x=a(c.media)??{},y=pn(x,s.audioPosition),T=Object.assign({},C,{disableZoom:r,fullEmbed:!0}),S=s?.backgroundType===se.ACCENT||s?.backgroundType===se.IMAGE,b=X()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),L=X()("blocks-accordion__header",{"blocks-accordion__header--editing":o,"brand--border":m&&l&&!S}),N=X()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!S}),k=`title-${this.id}`,E=`panel-${this.id}`,j=s?.headingLevel,A=j?`h${j}`:"h2";let I=(0,n.jsxs)("button",{"aria-controls":E,"aria-expanded":m,className:L,onClick:this.toggle,onKeyDown:!o&&h2(this.toggle)||void 0,type:"button",children:[v(k),(0,n.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,n.jsx)(ie,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return o&&(I=(0,n.jsxs)("div",{className:L,children:[v(k),(0,n.jsx)("button",{"aria-controls":E,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,n.jsx)(ie,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,n.jsxs)(Ht,{className:b,tag:"section",children:[(0,n.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,n.jsx)(A,{children:I})}),(0,n.jsx)("section",{"aria-labelledby":k,className:N,id:E,ref:w=>{this.content=w},children:y.renderOrder.map((w,O)=>{if(w==="text")return f(`text-${O}`);const R={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:g,opts:T,shouldPause:!m},P=Vf(x),M=P==="image-with-audio",H=M?"left":"center",B={audio:{media:y.audioOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-audio`,className:"blocks-accordion__audio"},image:{media:y.imageOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-image`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})},video:{media:y.videoOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-video`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})},embed:{media:y.embedOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${i}-embed`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})},overlay:{media:x,isOverlayAudio:!0,index:`${t}-${i}-overlay`,className:X()(`blocks-accordion__${P}`,{[`blocks-accordion__${P}--${H}`]:M})}}[w];if(!B)return null;const{className:V,...G}=B;return(0,n.jsx)("div",{className:X()(V,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,n.jsx)("div",{className:"blocks-accordion__figure",children:(0,n.jsx)(Kt,{...R,...G})})},`${w}-${O}`)})})]})}getMediaContainerClasses(t,s){const o=this.props.getL10nValue(this.props.item.media)??{},r=Vf(o),a=r==="image-with-audio",i=a&&!Array.isArray(o)?o?.image?.align:"left";return X()("blocks-accordion__media",`blocks-accordion__${r}`,{[`blocks-accordion__${r}--${i}`]:a,"blocks-accordion__media-container":t,"blocks-accordion__media-container--audio-overlay":s})}}const YY=sy(Xe(e=>(0,n.jsx)(QY,{...e}))),Vf=e=>{const{image:t,embed:s,video:o,audio:r}=e;return t&&!r?"image":s&&!r?"embed":o?"video":r&&!t&&!s?"audio":t&&r?"image-with-audio":r&&s?"audio-and-embed":"image"};class ZY extends Xd.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 s=this.props.activeIndex;this.state={activeIndex:s,activeTouch:!1,activeMouse:!1},this.tabs=[],this.id=Yd()(),this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=Zd()(this.handleControls.bind(this),100)),window.addEventListener(Ge,this.handleNavtoTab),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=Zd()(this.handleControls.bind(this),50))}handleNavtoTab(t){const s=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;s===this.props.blockId&&(this.tabsHeaderEl.scrollIntoView({behavior:"smooth",block:"start"}),this.setState({activeIndex:this.props.items.findIndex(({id:r})=>r===o)},()=>{Mm(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(Ge,this.handleNavtoTab)}setActive(t){this.setState({activeIndex:t});const{blockId:s}=this.props,o=ve.playerId;this.state.activeIndex!=t&&o&&o.includes(s.toString())&&ve.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:s}=this.props,o=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,i=(t==="next"?s?ty():nf():s?nf():ty())(r,o*.8);this.tabsHeaderEl.scrollTo({left:i,behavior:"smooth"})}arrowPrevInset(t){const s=this.arrowPrevEl.getBoundingClientRect(),o=s.right-t,r=s.left-t;return o+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,s){const{isRTL:o}=this.props;let r=!1,a;Gn(s)?(r=!0,a=o?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Wn(s)&&(r=!0,a=o?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&s.preventDefault(),a!=null&&(this.tabs[a]?.focus(),this.setActive(a))}renderHeader(t,s){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,n.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,n.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:PQ,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&&!s,"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,n.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:x=>{this.tabs[d]=x},role:"tab",tabIndex:h?void 0:-1,type:"button",children:(0,n.jsx)(ke,{value:l})},C)})}),(0,n.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,n.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,n.jsx)(ie,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,n.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,n.jsx)(ie,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,n.jsx)(We,{className:"blocks-tabs__description",value:t})}renderItem(t,s,o){const{blockId:r,getL10nValue:a,labels:i,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===s,{settings:m={},enableVideoPlaybackSpeed:f}=t,v=a(t.media)??{},C=pn(v,this.props.settings.audioPosition,!1),g=X()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),x=Object.assign({},m,{disableZoom:o,fullEmbed:!0}),y=`tabpanel-${this.id}-${s}`,T=`tab-${this.id}-${s}`,S=Vf(v),b=S==="image-with-audio",L=S==="audio-and-embed",N=b?v?.image?.align:"left",k=L?"embed-border":void 0;return(0,n.jsx)("div",{"aria-labelledby":T,className:g,id:y,role:MQ,tabIndex:h?0:void 0,children:C.renderOrder.map((E,j)=>{if(E==="text")return(0,n.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${j}`);const A={blockId:r,embedClass:k,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:i,lessonId:c,enableVideoPlaybackSpeed:f,opts:x,shouldPause:!h},w={audio:{media:C.audioOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-audio`,className:"blocks-tabs__audio"},image:{media:C.imageOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-image`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${N}`]:b})},video:{media:C.videoOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-video`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${N}`]:b})},embed:{media:C.embedOnlyMedia||v,isOverlayAudio:!1,index:`${r}-${s}-embed`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${N}`]:b})},overlay:{media:v,isOverlayAudio:!0,index:`${r}-${s}-overlay`,className:X()(`blocks-tabs__${S}`,{[`blocks-tabs__${S}--${N}`]:b})}}[E];if(!w)return null;const{className:O,...R}=w;return(0,n.jsx)("div",{className:X()(O,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,n.jsx)("div",{className:"blocks-tabs__figure",children:(0,n.jsx)(Kt,{...A,...R})})},`${E}-${j}`)})},y)}render(){const{animateBlockEntrance:t,initiallyVisible:s,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,HY):[],v=l===Hs.TRANSPARENT&&(c===se.ACCENT||c===se.IMAGE),C=X()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,n.jsx)(Ie,{className:m,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:C,children:(0,n.jsx)("div",{className:"blocks-tabs__row",children:(0,n.jsx)("div",{className:"blocks-tabs__col",children:(0,n.jsx)("div",{className:"blocks-tabs__wrapper",ref:g=>{this.container=g},children:(0,n.jsxs)(Ht,{children:[this.renderHeader(f,v),(0,n.jsx)("div",{className:"blocks-tabs__content",children:f.map((g,x)=>this.renderItem({...g,enableVideoPlaybackSpeed:i},x,!h))})]})})})})})})})}}const XY=Pf(Xe(e=>(0,n.jsx)(ZY,{...e}))),qY=bt()(null,["payload","result"]),JY=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},eZ=e=>e.meta?.version,oy=e=>e.src??null,tZ=e=>e.processing,sZ=Hn()(["payload","result","completion"]),nZ=bt()(!1,["payload","result","score"]),oZ=Ll()((e,t)=>{if(!t)return!1;const{majorLimit:s,minorLimit:o}=e,[r,a]=t.split("."),i=parseInt(r)===s&&Number(a)>=o;return Number(r)>s||i}),rZ={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},aZ=e=>{const t=ko()(e.split("-"));return rZ[t]},iZ=oZ({majorLimit:3,minorLimit:13}),cZ=(e,t,s,o)=>{const r=t&&aZ(s),a=r?`${e}${r}`:`${e}?rise=true`;if(o){const i=a.includes("?")?"&":"?";return`${a}${i}locale=${o}`}return a},ry="about:blank",lZ="https://example.invalid",ay=new Set(["http:","https:"]),iy=e=>{if(e)try{const t=new URL(e);return ay.has(t.protocol)?t.href:void 0}catch{return}},dZ=()=>iy(Ee("CDN_USER_CONTENT_URI"))??iy(window.location.origin)??lZ,cy=e=>{try{return ay.has(new URL(e,dZ()).protocol)}catch{return!1}},ly=e=>{const t=xs(e);return typeof t=="string"?t:""},uZ=e=>{const t=ly(e);if(!t||t===ry||!cy(t))return;const s=ly(mt(t));return s&&s!==ry&&cy(s)?s:void 0};var hZ=p(82920);class mZ extends hZ.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:s,onStep:o}=this.props,r=ko()(s),a=t(r?.media)?.storyline??{},i=eZ(a);iZ(i)||o(r)}canFullscreen(t){const{blockId:s,hasManySlBlocks:o}=this.props,{windowName:r}=t;return s===r||!o()}handleMessages(t){const{data:s}=t,{type:o}=s,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[o];r&&r(s)}handleCourseUpdate(t){const{items:s,onFinishStoryline:o,onStep:r,blockId:a}=this.props,i=ko()(s),{windowName:c}=t;if(a===c&&sZ(t)){const{score:l,success:d}=qY(t);if(nZ(t)){const h=l.scaled*100;o?.(a,d,!0,h)}else o?.(a,!0,!1);r(i)}}handleFullscreenEnter(t){const{menuOpen:s,handleStorylineFullscreen:o}=this.props;this.canFullscreen(t)&&(s&&o(!0),this.setState({fullscreen:!0,reopenMenu:s}))}handleFullscreenExit(t){const{handleStorylineFullscreen:s}=this.props,{reopenMenu:o}=this.state;this.canFullscreen(t)&&(o&&s(!1),this.setState({fullscreen:!1,reopenMenu:!1}))}render(){const{animateBlockEntrance:t,getL10nValue:s,initiallyVisible:o,isLesson:r,isLearner:a,isOnlyBlockInStep:i,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=ko()(c),f=s(m?.media)?.storyline??{},{mediaWidth:v="0"}=d,C=i?{}:{display:r&&!oy(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,n.jsx)(Ie,{className:"blocks-storyline",style:C,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:o,isLearner:a,children:(0,n.jsx)("div",{"aria-label":l,className:g,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return tZ(t)?this.renderProcessing():oy(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const s=JY(t),o=`${Ee("CDN_USER_CONTENT_URI")}/${s}`;return(0,n.jsx)("img",{alt:"Thumbnail",src:o})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:s}=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=cZ(d,a,i,r),C=uZ(v),x={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},y=X()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":s});return(0,n.jsx)("div",{className:"blocks-storyline__item",style:x,children:(0,n.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:y,loading:"lazy",name:o.toString(),ref:T=>{this.iframe=T},src:C,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const fZ=EE(Xe(mZ));var pZ=p(27447),zf=p.n(pZ);const dy=":focus{outline: none}",gZ=":focus:not(:focus-visible){outline: none}",uy="focus-ring-style",Uf=()=>document.getElementById(uy)||vZ(),vZ=()=>{const e=document.createElement("style");return e.id=uy,document.head.appendChild(e),e},CZ=0,xZ=-1,bZ=e=>{const t=Uf();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=dy},0),e?.(!1)}),window.addEventListener("keydown",s=>{yZ(s,e)})},yZ=(e,t)=>{const s=e.target,o=Uf();(kl(e)||Ei(e)&&!s.classList.contains("ignore-prefers"))&&(o.innerHTML="",t?.(!0))},hy=({focusVisible:e}={})=>Uf().innerHTML=e?gZ:dy,SZ=e=>e?CZ:xZ,my=({list:e,index:t})=>{t>=0&&t<Fs()(e)&&e[t].focus()},TZ=({list:e,currentIndex:t})=>{const s=ll()(t||0),o=s<Fs()(e)?s:0;return my({list:e,index:o}),o},LZ=({list:e,currentIndex:t})=>{const s=zf()(t||Fs()(e));return my({list:e,index:s}),s};var fy=p(82920);const qd=$("blocks-button"),py=X8,kZ=({description:e})=>(0,n.jsx)(ke,{className:qd("description"),value:e}),NZ=({color:e,destination:t,editBlock:s,handleNavigate:o,isEditable:r,label:a,type:i})=>{const c=pC(),l=Fe()?.externalLinksDisabled,d=Fe()?.theme,h=xi(),{mode:m}=(0,we.g)(),f=os(),v=It(),C=Ae(t),g=(0,kr.htmlDecode)(Ts(Ae(a))),x=i==="email",y=i==="exit-course",T=i==="lesson",S=i==="relative-url",b=qd("button"),L=!e||e===""||e===h,N=e??h,k={},E=gC(h),j=L&&d?.accentContrast===be.AUTO?be.AUTO:E,A=f?.buttonColorContrast??j,I=f?.buttonRadius??null,w=f?.buttonWidth??null,O=Bt({backgroundColor:N,contrast:A});Object.assign(k,{...!L&&{"--color-button-bg":N},...!L&&{"--color-button-text":O},...!L&&{"--color-button-border":"transparent"},...I!=null&&{"--radius-button":`${Number(I)}px`},...w!=null&&{"--width-button":`${Number(w)}rem`}});const R=l&&$s(C),{handleMouseEnter:P,handleMouseLeave:M,handleFocus:H,handleBlur:F}=wl(),B=fy.useId(),V=(0,u.useCallback)(()=>{if(r)s();else{if(R)return;if(y)return _p()}},[s,R,r,y]),G=(0,u.useCallback)(()=>{o(C)},[C,o]);if(r||R||y){const _=(0,n.jsx)("button",{"aria-label":g,className:b,id:R?B:void 0,onBlur:R?()=>F(B):void 0,onClick:V,onFocus:R?()=>H(B):void 0,onKeyDown:h2(V),onMouseEnter:R?()=>P(B):void 0,onMouseLeave:R?()=>M(B):void 0,style:k,tabIndex:0,type:"button",children:g});return R?(0,n.jsxs)(n.Fragment,{children:[_,(0,n.jsx)(Al,{anchorId:B})]}):_}else if(T){const _=C?ks(C,m):"#";return(0,n.jsx)(rs,{"aria-label":g,className:b,onClick:G,style:k,to:_,children:g})}else{const _=S?C:xs(C),Z=x?`mailto:${C}?subject=${c}`:_,oe=Kn.isIphoneSafari?"_top":"_self",Q=x?oe:"_blank",z=Q==="_blank",D=z?"noopener noreferrer nofollow":void 0,U=v?.a11yNoticeLinkNewTab||"(opens in a new tab)",K=z?`${g} ${U}`:g;return(0,n.jsx)("a",{"aria-label":K,className:b,href:Z,rel:D,style:k,tabIndex:0,target:Q,children:g})}},gy=e=>{const{animateBlockEntrance:t,editable:s,editBlock:o=()=>{},handleNavigate:r,initiallyVisible:a,isLearner:i,items:c=[],renderDescription:l=kZ,settings:d}=e,{buttonAlignment:h="right",buttonColor:m,buttonShowDescription:f=!0,buttonStack:v,entranceAnimation:C}=d,g=qd(null,{"no-animation":!C,description:f==!0,center:h==="center",left:h==="left",right:h==="right",rounded:py==="rounded"}),x=c?.map(({id:y,description:T,...S})=>{const b=(0,n.jsx)(NZ,{...S,color:m,editBlock:o,handleNavigate:r,isEditable:s}),L=f&&l({id:y,description:T});return(0,n.jsx)("section",{className:qd("container"),children:h==="left"&&f?(0,n.jsxs)(n.Fragment,{children:[b,L]}):(0,n.jsxs)(n.Fragment,{children:[L,b]})},y)})??null;if(v){const{paddingBottom:y,paddingTop:T}=d,S={...T!=null&&{paddingTop:`${Number(T)}rem`},...y!=null&&{paddingBottom:`${Number(y)}rem`}};return(0,n.jsx)("div",{className:g.toString(),style:S,children:x})}return(0,n.jsx)(Ie,{className:g.toString(),children:(0,n.jsx)(Be,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:a,isLearner:i,children:(0,n.jsx)("div",{className:"blocks-button",children:x})})})},EZ=gy;class IZ extends fy.Component{renderButtonDelegate;constructor(t){super(t),this.renderButtonDelegate=this.renderButton.bind(this)}static get defaultProps(){return{items:[],lessonId:"",blockId:"",editBlock:()=>{}}}renderButton(t,s){const{blockId:o,editable:r,editBlock:a,handleNavigate:i,isLearner:c,lessonId:l,initiallyVisible:d}=this.props;return(0,n.jsx)(gy,{animateBlockEntrance:!1,blockId:o,editable:r,editBlock:a,handleNavigate:i,initiallyVisible:d,isLearner:c,items:[t],lessonId:l,settings:s,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:s,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":py==="rounded"});return(0,n.jsx)(Ie,{className:m,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,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,n.jsx)(u.Fragment,{children:i(f,g)},f.id)})})})}}var jZ=p(92496),wZ=p.n(jZ);const Jd=$("block-video");function AZ({item:e}){const t=jt(),{media:s}=e,o=t(s)??{},{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}=ti()?c:l||c,h=d?mt(d):void 0;return(0,n.jsxs)("div",{className:Jd("poster-container"),children:[(0,n.jsx)(Cs,{alt:"Video Poster",className:Jd("poster"),src:h}),(0,n.jsx)("div",{className:Jd("play-overlay"),children:(0,n.jsxs)("svg",{className:Jd("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,n.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const vy=$("block-video");function RZ({mediaWidth:e}){const t=vy("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,n.jsx)("div",{className:t,children:(0,n.jsx)("div",{className:vy("placeholder")})})}const PZ=qs()("partner-content-block-card__"),Cy=e=>{const{backgroundColor:t,blockId:s,partnerContent:o}=e,r=Fe(),{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:s,courseId:a,partnerContentId:v,tenantId:i,contentSubtype:l};return(0,n.jsxs)("section",{children:[(0,n.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,n.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Dx,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:g})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)("div",{className:PZ("divider")})}),(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Fx,{backgroundColor:t,block:!0,link:C,trackingInfo:g})})]})]})};var _f=p(82920);const eu=$("block-video"),MZ={"--ov-width":"100%","--ov-max-height":"none"},OZ={"--ov-height":"100%","--ov-max-height":"none"};function BZ({audioVideoPlayhead:e,backgroundColor:t,blockId:s,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:x,mediaWidth:y,onLoad:T,onProgressChanged:S,poster:b,recordMediaPlayheadPosition:L,renderCaption:N,renderPostVideoSlot:k,subtitle:E,type:j,videoKey:A,videoSrc:I}){const w=y==="2",[O,R]=_f.useState(null),P=eu("item",{small:y==="0",medium:y==="1",full:w}),M=_f.useCallback(({player:B})=>{const V=B.containerElement?.querySelector("video");if(V){const G=V.videoWidth/V.videoHeight>=1.7777777777777777;R(G?"landscape":"portrait")}T?.({player:B})},[T]),H=O==="landscape"?MZ:O==="portrait"?OZ:void 0,F=_f.useCallback(B=>{const V=eu("caption",{visible:f}).toString();return(0,n.jsx)(We,{className:V,value:B.caption})},[f]);return(0,n.jsxs)("div",{className:P,children:[(0,n.jsxs)("figure",{"data-l10n-id":l,children:[(0,n.jsx)("div",{className:eu("aspect-container"),children:g&&(0,n.jsx)(wf,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:d,canRestrictSeek:h,captions:a,cornerRadius:i,id:`${C}-${s}-${m}-${c}`,media:x,onLoad:M,poster:b,progressChanged:S,recordMediaPlayheadPosition:L,src:I,style:H,subtitle:E,type:A?"video":j},`${C}-${s}-${m}-${c}-${b||""}`)}),f&&(0,n.jsxs)(n.Fragment,{children:[k?.(),(0,n.jsx)("figcaption",{className:eu("wrapper"),children:(N??F)(v)})]})]}),r&&(0,n.jsx)(Cy,{backgroundColor:t,blockId:s,partnerContent:o})]})}const De=$("video-chapters-panel"),xy=e=>e.placement==="start"||e.placement==="end",DZ=(e,t)=>e.placement==="start"||e.placement==="end"?e.placement:`chapter-${e.time}-${t}`;function by({activeIndex:e,chapters:t,isGeneratingChapters:s,onCheckpointClick:o,onSeek:r,onAddStartCheckpoint:a,onAddEndCheckpoint:i,overview:c}){const l=(0,u.useRef)(null),d=It(),{hovered:h,setHovered:m}=O3(),[f,v]=(0,u.useState)(null),C=(0,u.useRef)(new Set);(0,u.useEffect)(()=>{if(c==null)return;const E=c.flatMap(A=>A.checkpoints??[]).map(A=>String(A.markerId)),j=E.filter(A=>!C.current.has(A));C.current=new Set(E),j.length>0&&v(j[j.length-1])},[c]);const[g,x]=(0,u.useState)(()=>new Set),y=(0,u.useCallback)(k=>{x(E=>{const j=new Set(E);return j.has(k)?j.delete(k):j.add(k),j})},[]),T=(0,u.useCallback)(k=>{const E=Number(k.currentTarget.dataset.time);Number.isNaN(E)||r?.(E)},[r]),S=(0,u.useCallback)(k=>{const{markerId:E}=k.currentTarget.dataset;E!=null&&(v(E),o?.(E))},[o]);(0,u.useEffect)(()=>{l.current&&l.current.scrollIntoView({behavior:"smooth",block:"nearest"})},[e]);const b=c!=null,L=c??t,N={};if(b){let k=0;L.forEach((E,j)=>{!xy(E)&&!E.isWholeVideoDefault&&(N[j]=++k)})}return L.length===0?s?(0,n.jsxs)("div",{className:De("empty-state"),children:[(0,n.jsx)(ox,{className:De("empty-state-spinner"),height:24,width:24}),(0,n.jsx)("p",{className:De("empty-state-title"),children:"Generating chapters\u2026"})]}):(0,n.jsxs)("div",{className:De("empty-state"),children:[(0,n.jsx)("i",{className:`fa-regular fa-clapperboard ${De("empty-state-icon")}`}),(0,n.jsx)("p",{className:De("empty-state-title"),children:d?.videoNoChapters||"No chapters yet"}),(0,n.jsx)("p",{className:De("empty-state-body"),children:d?.videoNoChaptersMessage||"Add timestamps in the block settings to organize your video."})]}):(0,n.jsx)("div",{className:De(),children:(0,n.jsx)("ul",{className:De("list"),role:"list",children:L.map((k,E)=>{const j=DZ(k,E),A=b&&xy(k),I=g.has(j),w=k.checkpoints??[];let O;k.placement==="start"?O=a:k.placement==="end"&&(O=i);const R=`video-outline-row-${j}`;return(0,n.jsxs)("li",{className:De("row",{bookend:A}),ref:E===e?l:void 0,children:[(0,n.jsxs)("div",{className:De("header"),children:[b&&(0,n.jsx)("button",{"aria-controls":R,"aria-expanded":!I,"aria-label":I?"Expand":"Collapse",className:De("disclosure"),onClick:()=>y(j),type:"button",children:(0,n.jsx)(ie,{name:I?"chevron-right":"chevron-down"})}),A?(0,n.jsxs)("div",{className:De("item",{bookend:!0}),children:[(0,n.jsx)("span",{"aria-hidden":"true",className:De("thumbnail",{bookend:!0}),children:(0,n.jsx)(ie,{name:k.placement==="end"?"flag":"play-solid"})}),(0,n.jsx)("span",{className:De("info"),children:(0,n.jsx)("span",{className:De("title"),children:k.title})}),k.subtitle!=null&&(0,n.jsx)("span",{className:De("bookend-subtitle"),children:k.subtitle})]}):(0,n.jsxs)("button",{"aria-current":E===e?"true":void 0,className:De("item",{active:E===e,highlighted:If(h,"chapter",k.time)}),"data-chapter-button":!0,"data-time":k.time,onBlur:()=>m(null),onClick:b?()=>y(j):T,onFocus:()=>m({kind:"chapter",time:k.time}),onMouseEnter:()=>m({kind:"chapter",time:k.time}),onMouseLeave:()=>m(null),type:"button",children:[(0,n.jsxs)("span",{className:De("thumbnail"),children:[(k.thumbnailStatus==null||k.thumbnailStatus==="done")&&k.thumbnail&&(0,n.jsx)("img",{alt:"",className:De("thumbnail-img"),src:k.thumbnail}),k.thumbnailStatus==="processing"&&(0,n.jsx)("span",{"aria-hidden":"true",children:(0,n.jsx)(ox,{className:De("thumbnail-spinner"),height:30,width:30})}),!b&&(0,n.jsx)("span",{className:De("timestamp"),children:rc(k.time)})]}),(0,n.jsxs)("span",{className:De("info"),children:[N[E]!=null&&(0,n.jsxs)("span",{className:De("eyebrow"),children:["Chapter ",N[E]]}),(0,n.jsx)("span",{className:De("title"),children:k.title})]}),b&&(0,n.jsx)("span",{className:De("chapter-timestamp"),children:rc(k.time)})]})]}),(0,n.jsxs)("div",{className:De("body"),hidden:I,id:R,children:[w.length>0&&(0,n.jsx)("ul",{className:De("checkpoints"),role:"list",children:w.map(P=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{className:De("checkpoint",{active:P.markerId===f,highlighted:!A&&If(h,"checkpoint",P.timeSeconds)}),"data-marker-id":P.markerId,onBlur:A?void 0:()=>m(null),onClick:S,onFocus:A?void 0:()=>m({kind:"checkpoint",time:P.timeSeconds}),onMouseEnter:A?void 0:()=>m({kind:"checkpoint",time:P.timeSeconds}),onMouseLeave:A?void 0:()=>m(null),type:"button",children:[(0,n.jsx)("span",{"aria-hidden":"true",className:De("checkpoint-icon"),children:(0,n.jsx)(ie,{name:"location-dot"})}),(0,n.jsxs)("span",{className:De("checkpoint-info"),children:[(0,n.jsx)("span",{className:De("checkpoint-title"),children:P.title}),(0,n.jsx)("span",{className:De("checkpoint-sub"),children:P.blockSummary})]}),!A&&(0,n.jsx)("span",{className:De("checkpoint-timestamp"),children:P.timestamp})]})},P.markerId))}),O&&(0,n.jsxs)("button",{className:De("add-checkpoint"),onClick:O,type:"button",children:[(0,n.jsx)(ie,{name:"plus"}),"Add checkpoint"]})]})]},j)})})})}const FZ={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function HZ(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 $Z(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 ys(e,t={}){if(!e)return"";let s;if(t.allowVTTTags!==!1){const o=HZ(e),r=Uu()(o,FZ);s=$Z(r)}else s=Uu()(e,{allowedTags:[],allowedAttributes:{}});return t.preserveWhitespace||(s=s.replace(/\s+/g," ").trim()),s}function fc(){return typeof window<"u"?window.crypto.randomUUID():`cue_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function VZ(e){return e.map(t=>({...t,stableId:t.stableId||fc()}))}function Fo(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 yy(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,s,o,r,a]=t;return parseInt(s)*36e5+parseInt(o)*6e4+parseInt(r)*1e3+parseInt(a)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,s,o,r]=t;return parseInt(s)*6e4+parseInt(o)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function zZ(e,t=!1){const s=Math.round(e),o=Math.floor(s/36e5),r=Math.floor(s%36e5/6e4),a=Math.floor(s%6e4/1e3),i=s%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 Sy(e){const t={};if(!e)return t;const s=e.match(/\S+/g)||[];for(const o of s){const r=o.indexOf(":");if(r>0){const a=ys(o.substring(0,r),{allowVTTTags:!1}),i=ys(o.substring(r+1),{allowVTTTags:!1});t[a]=i}}return t}function UZ(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:ys(c,{allowVTTTags:!1}),text:l}}}const s=e.match(/^<v>\s*(.*)$/s);if(s)return{text:s[1]};const o=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(o)return{speaker:ys(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:ys(a,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function Gf(e){return ys(e,{preserveWhitespace:!1,allowVTTTags:!0})}function _Z(e){const t=ys(e.substring(6).trim(),{allowVTTTags:!1}),s=Sy(t);return{id:s.id,width:s.width,lines:s.lines,regionanchor:s.regionanchor,viewportanchor:s.viewportanchor,scroll:s.scroll,...s}}function GZ(e){const t=[...new Set(e.map(s=>s.speaker).filter(Boolean))];return{cueCount:e.length,speakerCount:t.length,speakers:t,lastModified:new Date}}function*WZ(e){const t=e.cues,s=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,s-r.endTimeMs),d=s>0?r.startTimeMs/s*100:0,h=s>0?r.endTimeMs/s*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 mpe(e){return Array.from(WZ(e))}function KZ(e,t,s,o,r,a,i,c){const l=[],d=/<v\s+([^>]+)>([^<]*)<\/v>/g;let h,m=0;for(;(h=d.exec(e))!==null;){const[g,x,y]=h,T={stableId:fc(),startTime:t,endTime:s,startTimeMs:o,endTimeMs:r,duration:a,text:Gf(y.trim()),settings:i,index:0,speaker:ys(x.trim(),{allowVTTTags:!1})};c&&(T.id=c),i.position&&(T.position=i.position),i.align&&(T.align=i.align),i.line&&(T.line=i.line),i.size&&(T.size=i.size),i.vertical&&(T.vertical=i.vertical),i.region&&(T.region=i.region),l.push(T),m=h.index+g.length}const f=/<v\s+([^>]+)>([^<]*)$/,C=e.substring(m).match(f);if(C){const[,g,x]=C,y={stableId:fc(),startTime:t,endTime:s,startTimeMs:o,endTimeMs:r,duration:a,text:Gf(x.trim()),settings:i,index:0,speaker:ys(g.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)}return l}function QZ(e,t){let s=t,o;!Fo(e[s])&&Fo(e[s+1])&&(o=ys(e[s],{allowVTTTags:!1}),s++);const r=e[s];if(!Fo(r))return{cues:[],nextIndex:s+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:s+1};const[,i,c,l]=a,d=Sy(l.trim());s++;const h=[];for(;s<e.length&&e[s]!==""&&!Fo(e[s]);)h.push(e[s]),s++;const m=yy(i),f=yy(c),v=f-m,C=[];if(h.length===0){const g={stableId:fc(),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 x=KZ(g,i,c,m,f,v,d,o);C.push(...x)}else{const x=h.join(`
`),{text:y,speaker:T}=UZ(x),S={stableId:fc(),startTime:i,endTime:c,startTimeMs:m,endTimeMs:f,duration:v,text:Gf(y),settings:d,index:0};o&&(S.id=o),T&&(S.speaker=T),d.position&&(S.position=d.position),d.align&&(S.align=d.align),d.line&&(S.line=d.line),d.size&&(S.size=d.size),d.vertical&&(S.vertical=d.vertical),d.region&&(S.region=d.region),C.push(S);break}return{cues:C,nextIndex:s}}function YZ(e){const t=e.split(`
`).map(a=>a.trim()),s=t.find(a=>a.length>0);if(!s||!s.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=ys(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=[ys(a.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!Fo(t[r]);)i.push(ys(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]!==""&&!Fo(t[r]);)i.push(ys(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;o.styles?.push(i.join(`
`));continue}if(a.startsWith("REGION")){const i=_Z(a);o.regions?.push(i),r++;continue}if(Fo(a)||Fo(t[r+1])){const i=QZ(t,r);i.cues&&i.cues.length>0&&o.cues.push(...i.cues),r=i.nextIndex;continue}r++}return o.cues=VZ(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=GZ(o.cues),o}function fpe(e){let t="";if(e.header?t+=e.header.trim()+`
`:t+=`WEBVTT
`,t+=`
`,e.notes&&e.notes.length>0)for(const s of e.notes)t+="NOTE",s&&s.length>0&&(t+=" "+s),t+=`

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

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

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

`}return t.replace(/\s+$/,"")+`
`}const pc=$("video-transcript-panel"),ZZ=({cue:e,isCurrent:t,onSeek:s,forwardSeekRestricted:o,maxTimeReached:r})=>{const a=(0,u.useCallback)(()=>{const c=e.startTimeMs/1e3;o&&c>r||s?.(c)},[e,s,o,r]),i=(0,u.useMemo)(()=>o&&e.startTimeMs/1e3>r,[o,e.startTimeMs,r]);return(0,n.jsxs)("button",{"aria-current":t?"true":void 0,"aria-disabled":i,className:pc("line",{current:t,disabled:i}),onClick:i?void 0:a,tabIndex:i?-1:0,type:"button",children:[(0,n.jsx)("span",{className:pc("timestamp"),children:zZ(e.startTimeMs,!0)}),(0,n.jsx)("span",{className:pc("text"),children:e.text})]})},Ty=({captions:e,currentTime:t=0,forwardSeekRestricted:s=!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?mt(h.key):null);if(!m)return;const f=await fetch(m,{signal:l.signal});if(!f.ok)return;const v=await f.text(),C=YZ(v);i(C.cues)}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,n.jsx)("div",{className:pc(),children:(0,n.jsx)("div",{className:pc("lines"),children:a.map((l,d)=>(0,n.jsx)(ZZ,{cue:l,forwardSeekRestricted:s,isCurrent:d===c,maxTimeReached:o,onSeek:r},l.stableId))})})},Rs=$("video-side-panel");function XZ(e,t){for(let s=e.length-1;s>=0;s--)if(t>=e[s].time)return s;return-1}const Wf=4;function qZ({captions:e,chapters:t=[],cornerRadius:s,currentTime:o=0,forwardSeekRestricted:r=!1,headingLevel:a,isGeneratingChapters:i,isLearner:c=!1,maxTimeReached:l=0,onSeek:d,showChapters:h=!0,showTranscript:m=!0}){const f=It(),v=(0,u.useMemo)(()=>h&&(!c||t.length>0)||i,[t.length,i,c,h]),C=f?.videoChapters||"Chapters",g=(0,u.useMemo)(()=>{const D=[];return v&&D.push({id:"chapters",label:C}),m&&D.push({id:"transcript",label:f?.videoTranscript||"Transcript"}),D},[v,C,m,f]),[x,y]=(0,u.useState)(g[0]??null),[T,S]=(0,u.useState)(!1),[b,L]=(0,u.useState)(!1),N=(0,u.useRef)(null),k=(0,u.useRef)(null),E=(0,u.useRef)(null),j=(0,u.useRef)(!1),A=(0,u.useId)(),I=(0,u.useMemo)(()=>g.find(D=>D.id===x?.id)??g[0]??null,[g,x]),w=(0,u.useMemo)(()=>g.findIndex(D=>D.id===I?.id),[g,I]),O=(0,u.useCallback)(D=>{const U=D.currentTarget.dataset.tabId,K=g.find(Y=>Y.id===U);K&&y(K)},[g]),R=(0,u.useCallback)(D=>{const U=g.length-1;let K=null;Gn(D)?K=w===0?U:w-1:Wn(D)?K=w===U?0:w+1:u2(D)?K=0:d2(D)&&(K=U),K!==null&&(D.preventDefault(),y(g[K]),N.current?.querySelectorAll('[role="tab"]')[K]?.focus())},[w,g]);(0,u.useEffect)(()=>{g.length>0&&!g.some(D=>D.id===x?.id)&&y(g[0])},[g,x]);const P=Lt(768),M=(0,u.useCallback)(()=>S(!0),[]),H=(0,u.useCallback)(()=>S(!1),[]),F=(0,u.useCallback)(()=>L(D=>!D),[]);(0,u.useEffect)(()=>{let D=0;return b&&k.current?(j.current=!0,D=requestAnimationFrame(()=>{k.current?.querySelectorAll("[data-chapter-button]")?.[Wf]?.focus()})):!b&&j.current&&(D=requestAnimationFrame(()=>{E.current?.focus()})),()=>cancelAnimationFrame(D)},[b]);const B=(0,u.useMemo)(()=>XZ(t,o),[t,o]),V=b?t:t.slice(0,Wf),G=t.length>Wf,_=a??2,Z=`h${_}`,oe=s!=null?{"--side-panel-corner-radius":`${Number(s)}px`}:{};if(P)return(0,n.jsxs)("div",{className:Rs("mobile"),style:oe,children:[v&&(0,n.jsxs)("div",{className:Rs("mobile-section"),ref:k,children:[(0,n.jsx)(Z,{className:Rs("mobile-heading",{[`h${_}`]:!0}),children:C}),(0,n.jsx)(by,{activeIndex:B,chapters:V,isGeneratingChapters:i,onSeek:d}),G&&(0,n.jsxs)("button",{"aria-expanded":b,className:Rs("mobile-expand"),onClick:F,ref:E,type:"button",children:[b?f?.videoShowLessChapters||"Show less chapters":f?.videoShowMoreChapters||"Show more chapters",(0,n.jsx)("i",{"aria-hidden":"true",className:`fa-solid fa-chevron-${b?"up":"down"}`})]})]}),m&&(0,n.jsxs)("div",{className:Rs("mobile-section"),children:[(0,n.jsx)(Z,{className:Rs("mobile-heading",{[`h${_}`]:!0}),children:f?.videoTranscript||"Transcript"}),(0,n.jsxs)("button",{className:Rs("view-transcript-button"),onClick:M,type:"button",children:[(0,n.jsx)(ie,{name:"list"}),f?.videoViewTranscript||"View transcript"]}),T&&(0,n.jsx)(gd,{className:Rs("video-transcript-modal"),heading:f?.videoTranscript||"Transcript",onClose:H,children:(0,n.jsx)(Ty,{captions:e,currentTime:o,forwardSeekRestricted:r,maxTimeReached:l,onSeek:d})})]})]});const Q=D=>{const U={className:Rs("content"),hidden:I?.id!==D};return g.length<=1?U:{...U,"aria-labelledby":`tab-${D}-${A}`,id:`tabpanel-${D}-${A}`,role:"tabpanel",tabIndex:0}},z=g.length===1?(0,n.jsx)(Z,{className:Rs("title",{[`h${_}`]:!0}),children:g[0].label}):(0,n.jsx)("div",{"aria-label":f?.a11yBlockVideoSidePanelTablist,className:Rs("tabs"),ref:N,role:"tablist",children:g.map(D=>(0,n.jsx)("button",{"aria-controls":`tabpanel-${D.id}-${A}`,"aria-selected":I?.id===D.id,className:Rs("tab",{active:I?.id===D.id}),"data-tab-id":D.id,id:`tab-${D.id}-${A}`,onClick:O,onKeyDown:R,role:"tab",tabIndex:I?.id===D.id?0:-1,type:"button",children:D.label},D.id))});return(0,n.jsxs)("div",{className:Rs(),style:oe,children:[z,v&&(0,n.jsx)("div",{...Q("chapters"),children:(0,n.jsx)(by,{activeIndex:B,chapters:t,isGeneratingChapters:i,onSeek:d})}),m&&(0,n.jsx)("div",{...Q("transcript"),children:(0,n.jsx)(Ty,{captions:e,currentTime:o,forwardSeekRestricted:r,maxTimeReached:l,onSeek:d})})]})}const Ly=(0,u.createContext)(null),JZ=Ly.Provider;function eX(){return(0,u.useContext)(Ly)}var tX,ky,Ny,sX;function ppe(){let e=null;const t=new Set;return{registerPlayer(s){e=s},onTimeUpdate(){t.forEach(s=>{s()})},getPosition(){return e?.getProgress().currentTime??0},subscribe(s){return t.add(s),()=>{t.delete(s)}},seekToTime(s){e?.seekToTime(s)}}}const nX=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,subscribe:()=>()=>{},seekToTime(){}}),Ey=(0,u.createContext)(nX),oX=Ey.Provider;function tu(){return(0,u.useContext)(Ey)}function gpe(){const e=tu(),t=ky(e);return t.current=e,Ny(()=>()=>t.current.getPosition(),[])}function vpe(e){const t=tu();return sX(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function Cpe(){const e=tu(),t=ky(e);return t.current=e,Ny(()=>s=>t.current.seekToTime(s),[])}function xpe({store:e,children:t}){return tX(oX,{value:e,children:t})}var rX,aX;const su=[];function bpe(){let e=su;const t=new Set;return{setChapters(s){s!==e&&(e=s,t.forEach(o=>{o()}))},getChapters(){return e},subscribe(s){return t.add(s),()=>{t.delete(s)}}}}const iX=Object.freeze({setChapters(){},getChapters:()=>su,subscribe:()=>()=>{}}),Iy=(0,u.createContext)(iX),cX=Iy.Provider;function jy(){return(0,u.useContext)(Iy)}function ype(){const e=jy();return aX(e.subscribe,e.getChapters,()=>su)}function Spe({store:e,children:t}){return rX(cX,{value:e,children:t})}const gc=$("block-video");function lX({audioVideoPlayhead:e,backgroundColor:t,blockId:s,blockPartnerContent:o,blockPartnerContentExists:r,captions:a,chapters:i,cornerRadius:c,currentLocale:l,dataL10nId:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,headingLevel:f,id:v,isGeneratingChapters:C,isLearner:g,isLoaded:x,item:y,lessonId:T,loadMedia:S,media:b,mediaWidth:L,onLoad:N,onProgressChanged:k,poster:E,recordMediaPlayheadPosition:j,renderCaption:A,renderPostVideoSlot:I,showChapters:w,subtitle:O,transcriptEnabled:R,type:P,videoKey:M,videoSrc:H,shouldPause:F}){const B=eX(),V=tu(),G=jy(),[_,Z]=(0,u.useState)(0),[oe,Q]=(0,u.useState)(0),z=(0,u.useRef)(null),D=(0,u.useCallback)(W=>{Z(W.currentTime),Q(ue=>Math.max(ue,W.currentTime)),V.onTimeUpdate(W.currentTime),k?.(W)},[k,V]),U=(0,u.useCallback)(W=>{const ue=gc("caption",{visible:x}).toString();return(0,n.jsx)(We,{className:ue,value:W.caption})},[x]),K=(0,u.useCallback)(W=>{z.current?.seekToTime(W)},[z]),Y=B?.setVideoPlayerRef,q=(0,u.useCallback)(W=>{z.current=W,Y?.(W),V.registerPlayer(W)},[Y,V]),ee=R&&a&&a.length>0||w&&(!g||i&&i.length>0)||C;(0,u.useEffect)(()=>{G.setChapters(i??su)},[G,i]);const J=gc("item",{small:L==="0",medium:L==="1",full:L==="2","video-training":!0,"no-side-panel":!ee}),ne=B?.wrapVideo,te=S?(0,n.jsx)(wf,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:a,chapters:i,checkpointTimesSeconds:B?.checkpointMarkerTimes,cornerRadius:c,id:`${T}-${s}-${v}-${l}`,media:b,onCheckpointReached:B?.onCheckpointReached,onLoad:N,poster:E,progressChanged:D,recordMediaPlayheadPosition:j,ref:q,shouldPause:F,src:H,subtitle:O,type:M?"video":P},`${T}-${s}-${v}-${l}-${E||""}`):null;return(0,n.jsxs)("div",{className:J,children:[(0,n.jsxs)("figure",{"data-l10n-id":d,children:[(0,n.jsx)("div",{className:gc("figure-container"),children:ne?ne(te):te}),ee&&(0,n.jsx)("div",{className:gc("side-panel-wrapper"),children:(0,n.jsx)(qZ,{captions:a,chapters:i,cornerRadius:c,currentTime:_,forwardSeekRestricted:m||!1,headingLevel:f,isGeneratingChapters:C,isLearner:g,maxTimeReached:oe,onSeek:K,showChapters:w,showTranscript:R})}),x&&(0,n.jsxs)(n.Fragment,{children:[I?.(),(0,n.jsx)("figcaption",{className:gc("wrapper"),children:(A??U)(y)})]})]}),r&&(0,n.jsx)(Cy,{backgroundColor:t,blockId:s,partnerContent:o})]})}var Kf=p(82920);function dX({backgroundColor:e,blockId:t,cornerRadius:s,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:x,renderPostVideoSlot:y,showChapters:T,transcriptEnabled:S,type:b,isVideoTraining:L,shouldPause:N}){const[k,E]=Kf.useState(!1),{currentLocale:j}=ot(),A=jt(),{id:I,media:w,partnerContentId:O}=l,R=A(w)??{},{customVideo:P={},tmp:M={},video:H={}}=R,F="poster"in H?H:{...H,...P},B=M.video&&"poster"in M.video?M.video:void 0,{captions:V,chapters:G,key:_,poster:Z,src:oe,subtitle:Q}=ti()?F:B||F,z=T?G??[]:[],D=_||oe,K=(Array.isArray(v)?v:v?.content)?.find(te=>O!=null&&Xt(te)&&"id"in te&&te.id===O),Y=K!=null&&Xt(K),q=Xt(w)&&"l10nId"in w?w.l10nId:void 0,ee=Kf.useCallback(()=>{E(!0)},[]),J=Kf.useCallback(({percentComplete:te})=>{te>=100&&f?.({id:I})},[I,f]);if(!D)return(0,n.jsx)(RZ,{mediaWidth:m});const ne={audioVideoPlayhead:C,backgroundColor:e,blockId:t,blockPartnerContent:K,blockPartnerContentExists:Y,captions:V,chapters:z,cornerRadius:s,currentLocale:j,dataL10nId:q,enableVideoPlaybackSpeed:o,forwardSeekRestricted:r,id:I,isLoaded:k,item:l,lessonId:d,loadMedia:h,media:w,mediaWidth:m,onLoad:ee,onProgressChanged:J,poster:Z,recordMediaPlayheadPosition:g,renderCaption:x,renderPostVideoSlot:y,subtitle:Q,type:b,videoKey:_,videoSrc:D,shouldPause:N};return L?(0,n.jsx)(lX,{...ne,chapters:z,headingLevel:a,isGeneratingChapters:i,isLearner:c,showChapters:T,transcriptEnabled:S},_):(0,n.jsx)(BZ,{...ne},_)}const uX=$("block-video");function Qf({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:s,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:x,takingSnapshot:y,type:T,isGeneratingChapters:S,isVideoTraining:b,shouldPause:L}){const N=nh(),k=c?.[0];if(k==null)return null;const E=uX({"no-animation":!x?.entranceAnimation,presentation:N}).toString(),j=b?"2":"1",A=y||r||i;return(0,n.jsx)(Ie,{className:E,children:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:o,isLearner:a,children:A?(0,n.jsx)(AZ,{item:k}):(0,n.jsx)(GK,{children:(0,n.jsx)(dX,{audioVideoPlayhead:f?.items?.[t]?.items?.[k.id]?.audioVideoPlayhead??0,backgroundColor:x?.backgroundColor,blockId:t,cornerRadius:x?.cornerRadius,enableVideoPlaybackSpeed:s,forwardSeekRestricted:x?.forwardSeekRestricted&&!f?.isComplete,headingLevel:x?.headingLevel,isGeneratingChapters:S,isLearner:a,isVideoTraining:b,item:k,lessonId:l,loadMedia:d,mediaWidth:x?.mediaWidth??j,onStep:h,partnerContent:m,recordMediaPlayheadPosition:v,renderCaption:C,renderPostVideoSlot:g,shouldPause:L,showChapters:!!x?.showChapters,transcriptEnabled:!!x?.showTranscript,type:T})})})})}var Yf=p(82920);const nu=$("block-audio"),Zf=$("block-embed"),Ps=$("block-attachment");class hX extends Yf.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:s}=this.state,o=nu("caption",{hidden:!s}).toString();return(0,n.jsx)(We,{className:o,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:s,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,x=`${a}-${s}-${C}`,y=bt()(0,["items",s,"items",C,"audioVideoPlayhead"],c),T=Af({lessonId:a,refs:`items:${s}/items:${C}`});return(0,n.jsxs)("div",{className:nu("item"),children:[i&&(0,n.jsx)(w3,{audioVideoPlayhead:y,canRestrictSeek:!!m&&!c?.isComplete,id:x,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:${s}/items:${C}`,transcriptMedia:f,uploadId:T},x),d(t)]},C)}handleOnEnd(t){this.props.onStep({id:t})}onTranscriptClick(t){const{blockId:s}=this.props;return this.props.openTranscript?.({blockId:s,item:t,refs:`items:${s}/items:${t.id}`})}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,items:r,settings:a}=this.props,{entranceAnimation:i}=a,c=nu({"no-animation":!i,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,n.jsx)(Ie,{className:c,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:nu("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const mX=Eb(Xe(hX));function fX(e){const t=nh();return(0,n.jsx)(mX,{...e,isPresentation:t})}class pX extends Yf.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,s){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=Zf("item",{border:f}).toString();return(0,n.jsx)(Ht,{className:v,disabled:!f&&m==Hs.TRANSPARENT,tag:"section",children:c&&(0,n.jsx)(M3,{data:i,id:`${s}-${o}`,isLesson:!0,labels:l,showMetaData:h})},o)}render(){const{animateBlockEntrance:t,blockId:s,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=PK(h)!=="link",f=Zf({"no-animation":!l,presentation:this.props.isPresentation}).toString(),v=Zf("wrapper",{medium:m&&d==="1",full:m&&d==="2"}),C=i.length>0?i.slice(0,1):[];return(0,n.jsx)(Ie,{className:f,children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:v,children:C.map(g=>this.renderItem(g,s))})})})}}const gX=Xe(Mh()(pX));function vX(e){const t=nh();return(0,n.jsx)(gX,{...e,isPresentation:t})}class CX extends Yf.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o}=this.props;return(0,n.jsx)(Ie,{children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:"block-text--onecol",children:(0,n.jsx)("div",{className:"block-text__container",children:(0,n.jsx)("div",{className:"block-text__row",children:(0,n.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:s,originalUrl:o,size:r}){const{attachmentId:a,blockId:i,externalLinksDisabled:c,onLinkBlur:l,onLinkFocus:d,onLinkMouseEnter:h,onLinkMouseLeave:m}=this.props,f=mt(t),v=c?"":void 0,C=c?void 0:f,g=c?void 0:"noopener noreferrer nofollow",x=c?"button":void 0,y=c?0:void 0,T=c?void 0:"_blank",S=Ps({}).mix("brandHover").toString(),b=Ps("info");return(0,n.jsxs)(Ht,{"aria-labelledby":`attachment-name-${i} attachment-icon-${i}`,className:S,"data-external":v,download:o,href:C,id:c?a:void 0,onBlur:c?()=>l?.(a):void 0,onFocus:c?()=>d?.(a):void 0,onMouseEnter:c?()=>h?.(a):void 0,onMouseLeave:c?()=>m?.(a):void 0,rel:g,role:x,tabIndex:y,tag:"a",target:T,children:[(0,n.jsxs)("div",{className:Ps("main"),children:[(0,n.jsx)("div",{className:Ps("icon"),id:`attachment-icon-${i}`,children:this.fileIcon(s)}),(0,n.jsxs)("div",{className:b,children:[(0,n.jsx)(ke,{className:Ps("title").toString(),id:`attachment-name-${i}`,value:o}),(0,n.jsx)("div",{className:Ps("size").toString(),children:wZ()(r,{round:1})})]})]}),(0,n.jsx)("div",{className:Ps("rest"),children:(0,n.jsx)(iD,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=Ps({none:!0}).toString(),s=Ps("info");return(0,n.jsx)(Ht,{className:t,children:(0,n.jsxs)("div",{className:Ps("main"),children:[(0,n.jsx)("div",{className:Ps("icon"),children:(0,n.jsx)(tx,{"aria-label":"File"})}),(0,n.jsxs)("div",{className:s,children:[(0,n.jsx)("div",{className:Ps("title").toString(),children:"File Attachment Block"}),(0,n.jsx)("div",{className:Ps("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:s}=this.props,o=/excel|spreadsheet/,r=/pdf/,a=/word/,i=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return o.test(t)?(0,n.jsx)(jD,{"aria-label":s?.a11yExcelIcon}):r.test(t)?(0,n.jsx)(ND,{"aria-label":s?.a11yPDFIcon}):a.test(t)?(0,n.jsx)(kD,{"aria-label":s?.a11yWordIcon}):i.test(t)?(0,n.jsx)(ED,{"aria-label":s?.a11yPPTIcon}):c.test(t)?(0,n.jsx)(ID,{"aria-label":s?.a11yRTFIcon}):l.test(t)?(0,n.jsx)(wD,{"aria-label":s?.a11yZipIcon}):(0,n.jsx)(tx,{"aria-label":s?.a11yFileIcon})}}function xX(e){const t=Mh()(e),s=Xe(t),o=mB(s);function r(a){const i=Fe(),c=a.externalLinksDisabled??(i&&"externalLinksDisabled"in i?i.externalLinksDisabled:!1);return(0,n.jsx)(o,{...a,externalLinksDisabled:c})}return r}const bX=xX(CX),gn=$("block-step"),yX=e=>{const{blockId:t,disableZoom:s,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Ae(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!v&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const T=f.embed?jr(f.embed):void 0,S=!!f.image,b=!!f.audio,L=S?f.image.align:"center",N=gn("media",{audio:b&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${L}`]:r&&!!L,"audio-on-bottom":b&&!r&&h==="bottom",linkEmbed:T==="link",videoEmbed:T==="video",visual:!r&&S||!Ct()(f.video)}),k=m||{};return(0,n.jsx)("div",{className:N,children:(0,n.jsx)(Kt,{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:s,...k},shouldPause:!0})})},SX=e=>{const{headingLevel:t,innerRef:s,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=o,f=gn({active:r}),v=!!o.step,C=!!o.title,g=t||2,x=`h${g}`,y=`h${g+1}`,T=Ae(o.media),S=pn(T,i,!0,"timeline"),b=Ae(o.description),L=(0,u.useMemo)(()=>!!Object.keys(T??{}).length||!!Zh(b).value?.length,[T,b]),N=()=>{const k={audio:{item:{...o,media:S.audioOnlyMedia||T},mediaType:"audio"},image:{item:{...o,media:S.imageOnlyMedia||T},mediaType:"image"},video:{item:{...o,media:S.videoOnlyMedia||T},mediaType:"video"},embed:{item:{...o,media:S.embedOnlyMedia||T},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,n.jsx)(n.Fragment,{children:S.renderOrder.map((E,j)=>{if(E==="text")return d?(0,n.jsx)("div",{className:gn("description"),children:d(o)},`text-${j}`):(0,n.jsx)(ke,{className:gn("description"),value:o.description},`text-${j}`);if(!T||!a)return null;const A=k[E];return A?(0,u.createElement)(yX,{...e,...A,key:`${E}-${j}`}):null})})};return(0,n.jsx)(Ie,{children:(0,n.jsx)("div",{className:f,"data-id":m,ref:s,style:h,children:(0,n.jsx)(Ht,{className:gn("body"),onFocus:c,children:(0,n.jsxs)("div",{className:gn("main-wrap"),children:[(0,n.jsxs)("div",{className:gn("heading",{solo:!L}),children:[v&&(0,n.jsx)("div",{className:gn("step"),children:(0,n.jsx)(x,{children:(0,n.jsx)(ps,{value:o.step})})}),(C||l)&&(0,n.jsx)("div",{className:gn("title"),children:l?l(o):(0,n.jsx)(y,{children:(0,n.jsx)(ke,{value:o.title})})})]}),(0,n.jsx)("div",{className:gn("main"),children:N()})]})})})})},TX=e=>{const{id:t,settings:s,items:o,onEnter:r,enableVideoPlaybackSpeed:a,initiallyVisible:i,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=o[0],v=s.audioPosition,C=!(s.zoomOnClick??!0),g=s.headingLevel,x=(0,u.useCallback)((T,S)=>{r?.({id:t,payload:{activeIndex:T,itemId:S}})},[t,r]),y=(0,n.jsx)(SX,{audioPosition:v,blockId:t,disableZoom:C,enableVideoPlaybackSpeed:a,headingLevel:g,isActive:!0,item:f,labels:l,lessonId:d,lessonNumber:t,loadMedia:!0,onFocus:x,renderDescription:m,renderTitle:h,style:{"--block-step-padding-top":"1rem","--block-step-padding-bottom":"1rem","--block-step-corner-radius":s.cornerRadius!=null?`${s.cornerRadius}px`:"var(--arc-border-radius-lg)"}});return c?(0,n.jsx)(Be,{animateBlockEntrance:!0,className:gn("animate").toString(),initiallyVisible:i,isLearner:!0,children:y}):y},wy=$("continue-btn"),ou=({children:e,className:t,href:s,onClick:o,text:r,testId:a="continue-btn"})=>{const i=t?`${wy()} ${t}`:wy();return s?(0,n.jsx)(rs,{className:i,"data-continue-btn":"","data-testid":a,onClick:o,to:s,children:e??(0,n.jsx)(ps,{value:r})}):(0,n.jsx)("button",{className:i,"data-continue-btn":"","data-testid":a,onClick:o,type:"button",children:e??(0,n.jsx)(ke,{value:r})})},Ay=({bgType:e,text:t,iconType:s="locked"})=>{const o=X()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,n.jsxs)("div",{className:o,"data-continue-btn":"",children:[s==="locked"&&(0,n.jsx)(ie,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,n.jsx)("div",{className:"continue-hint__content",children:(0,n.jsx)(ps,{value:t})})]})},Xf=$("block-text");function LX({blockId:e,animateBlockEntrance:t,canContinue:s=!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,Me.A)(o),[g,x]=u.useState(!1),{announcePolite:y}=xn(),[T,S]=u.useState(!1),b=os(),L=Fe(),N=xi(),k=gC(N),E=jo(),j=c[0],{id:A}=j,I=j.title??E?.label??Qe.blockContinueLabel,w=j.type??E?.completionType??Qe.blockContinueCompletionType,O=j.completeHint??E?.completeHint??Qe.blockContinueCompleteHint,R=!w||(h?T:s||i&&o),P=h||!o||i,M=b?.continueColor||N,H=!M||M===N,F=H&&L?.theme?.accentContrast===be.AUTO?be.AUTO:k,B=b?.continueColorContrast??F,V=b?.continueRadius??null,G=b?.continueWidth??76,_=Bt({backgroundColor:M,contrast:B}),Z={...!H&&{"--color-button-bg":M},...!H&&{"--color-button-text":_},...!H&&{"--color-button-border":"transparent"},...V!=null&&{"--radius-button":`${Number(V)}px`},...G!=null&&{maxWidth:`${Number(G)}rem`}},oe=(0,u.useCallback)(()=>{d({id:A}),x(!0),a?setTimeout(()=>{const Q=document.querySelector("[data-lesson-id]"),z=document.querySelector("main"),D=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),U=Q?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let K=null;D?K=D:U&&U!==v.current?.parentElement?K=U:Q?K=Q:z&&(K=z),K&&(K.setAttribute("tabindex","-1"),K.focus({preventScroll:!0}))},200):setTimeout(()=>{const Q=v.current;Q&&Q.focus()},100)},[A,d,a]);return(0,u.useEffect)(()=>{!C&&o&&(a||setTimeout(()=>{y?.(l?.a11yStatusAdditionalContent)},300))},[y,o,l,C,a]),(0,u.useEffect)(()=>{const Q=z=>{const{path:D}=z.detail,{blockId:U,buttonId:K}=va(z.detail.path,["block","button"]);if(e==U&&K===j.id){const Y=D.at(-1);Y==="title"?S(!0):Y==="completeHint"&&S(!1)}};return window.addEventListener(Ge,Q),()=>{window.removeEventListener(Ge,Q)}},[e,j.id]),(0,n.jsxs)(n.Fragment,{children:[P&&(0,n.jsx)(Ie,{children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,n.jsx)("div",{className:Xf("container"),children:(0,n.jsx)("div",{className:Xf("row"),children:(0,n.jsxs)("div",{className:Xf("continue"),style:Z,children:[R&&(0,n.jsx)(ou,{onClick:oe,text:I}),!R&&(0,n.jsx)(Ay,{text:O})]})})})})}),g&&(0,n.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:v,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}var kX=p(70318),ru=p.n(kX);const NX=$("flashcard");class EX 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};cardRef=(0,u.createRef)();render(){const{cardRef:t,handleFlip:s,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:x,isHidden:y,labels:T,lessonId:S,prefersKeyboardNavigation:b,settingShowHint:L,size:N,type:k,wrapElement:E,wrapRole:j},state:{areSidesReady:A,flipped:I,isMounted:w}}=this,O=m||I,R=NX({large:N==="large",small:N==="small",flipped:O,stack:k==="stack"});return(0,n.jsxs)(E,{"aria-hidden":!i,className:R,onClick:s,onTouchEnd:r,ref:t,role:j,children:[(0,n.jsx)(Ht,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:k,description:f,index:x,isActiveSide:!O,isAriaHidden:O&&w&&A,isFlipped:O,isHidden:y,itemId:g,labels:T,lessonId:S,media:v,onFlip:s,onReady:o,prefersKeyboardNavigation:b,settingShowHint:L,side:"front",size:N,tag:Py,type:C}),(0,n.jsx)(Ht,{activeIndex:a,allowTabNavigation:i,blockId:h?.id,blockType:k,description:c,index:x,isActiveSide:O,isAriaHidden:!O&&w&&A,isFlipped:O,isHidden:y,itemId:g,labels:T,lessonId:S,media:l,onFlip:s,onReady:o,prefersKeyboardNavigation:b,settingShowHint:L,side:"back",size:N,tag:IX,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(Ge,this.handleNavEvent)}componentDidUpdate(t,s){const{props:{allowTabNavigation:o,id:r,onStep:a},state:{hasFlippedOnce:i}}=this;!s.hasFlippedOnce&&i&&a({id:r}),t.allowTabNavigation&&!o&&this.setState({flipped:!1})}componentWillUnmount(){window.removeEventListener(Ge,this.handleNavEvent)}handleNavEvent=t=>{const{path:s}=t.detail,{cardId:o}=va(s,["block","card"]);if(o===this.props.id){let r=!1;s.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!Mm(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleFlip=t=>{const{block:s,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=s?.items?.[o],d=l?.[c]?.media,h=`items:${s?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:fn({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,i)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const Ry=yl(Xe(EX)),$a=$("flashcard-side"),au=$("flashcard-side-flip");class Ar extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:Ar.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,e0.uniqueId)("flashcard-side")}state=Ar.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:s,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${s}-${r}-flip-btn`);a&&o&&(a.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:s,settingShowHint:o,side:r}=this.props,a=document.getElementById(`${t}-${s}-${r}-flip-btn`);a&&o&&(a.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:s,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:x,settingShowHint:y,side:T,size:S,style:b,type:L},refDescription:N,refDescriptionBottom:k,refSide:E,state:{isAtLongOverflowBottom:j,isLong:A,isLongOverflow:I,isTooltipVisible:w,scrollbarWidthOffset:O}}=this,R=T==="front",P=T==="back",M=S==="small",H=S==="large",F=L==="description",B=L==="fullimage",V=L==="image",G=R?v?.a11yBlockFlashcardFront:v?.a11yBlockFlashcardBack,_=`items:${o?.id}/items:${l}/${R?"front":"back"}`,Z=$a({back:P,flipped:f,front:R,fullimage:B}).mix(r),{image:oe,audio:Q}=i(d)??{},z=$a("content",{small:M,large:H,front:R,fullimage:B,image:V,"long-overflow":I,"long-overflow-bottom":j,"has-audio":!!Q}),D=au({"audio-expansion":!0}),U=au("btn",{"visually-hidden":!y,"prefers-keyboard":x,round:!0}),K=au("icon"),Y=au("tooltip",{visible:w}),q=$a("img",{small:M,large:H,centered:V,full:B}),ee=$a("description",{"has-audio":!!Q,long:A&&!I,"long-overflow":I,short:!A,large:H}),J=$a("description-bottom"),ne=O==null?void 0:{right:O},te=oe?.alt??`Image ${c+1}`,Te=it(oe),W=`${this.id}-click-to-flip-text`,ue=`${this.id}-image`,fe=`${this.id}-description`;return(0,n.jsxs)("div",{"aria-label":G,className:Z,inert:m,ref:E,role:"group",style:b,tabIndex:-1,children:[(0,n.jsxs)("div",{className:z,children:[(0,n.jsxs)("div",{className:D,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:ne,children:[(0,n.jsx)("button",{"aria-labelledby":`${W} ${fe} ${ue}`,className:U,id:`${l}-${c}-${T}-flip-btn`,onBlur:this.handleBtnBlur,onClick:g,onFocus:this.handleBtnFocus,tabIndex:s&&h?0:-1,type:"button",children:(0,n.jsx)(tF,{className:K})}),(0,n.jsx)("div",{"aria-hidden":"true",className:Y,id:W,onClick:Po,children:v?.blocksClickToFlip})]}),(B||V)&&(0,n.jsx)(jX,{alt:te,className:q,imageId:ue,l10nId:Et(d),url:Te}),F&&(0,n.jsxs)("div",{className:ee,ref:N,tabIndex:h&&I?0:void 0,children:[(0,n.jsx)(ke,{allowTabNavigation:s&&!m,id:fe,value:a}),I&&(0,n.jsx)("div",{className:J,ref:k})]})]}),Q&&(0,n.jsx)("div",{className:$a("audio-player",{text:F,image:V}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,n.jsx)(Kt,{activeIndex:t,blockId:o.id,index:`${l}-${c}-${T}`,isOverlayAudio:B,item:{id:l,media:d},itemIndex:c,labels:v,lessonId:C,media:d,mediaType:"audio",refs:_,shouldPause:!h,side:T})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=ru()(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,s){const{props:{allowTabNavigation:o,blockType:r,isFlipped:a,isActiveSide:i,isHidden:c,onReady:l,type:d}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==a&&(i&&o?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),d==="description"&&this.handleUpdatesDescription(t,s),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=>{gs(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,s)=>{const{props:{isFlipped:o,isActiveSide:r},state:{isLongOverflow:a}}=this;t.isFlipped!==o&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,s),!s.isLongOverflow&&a?(this.setLongBottomObserver(),this.setScrollbarWidth()):s.isLongOverflow&&!a&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,s)=>{const{INSERTING:o,DELETING:r}=Ar.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!==s.descriptionAction||h!==s.isLong||m!==s.isLongOverflow||i!==t.size||c!==t.type||f!==v)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:s}=Ar.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===s||o!==t.size)&&this.setState(Ar.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 s=o=>{const r=o?.[0]?.isIntersecting??!1;this.setState({isAtLongOverflowBottom:!r})};this.longBottomObserver=new IntersectionObserver(s,{threshold:[0,1]}),this.longBottomObserver.observe(t)}};cleanupLongBottomObserver=()=>{this.longBottomObserver?.disconnect?.(),this.longBottomObserver=void 0};setScrollbarWidth=()=>{const t=this.refDescription.current;if(t){const s=t.offsetWidth-t.clientWidth;s>0&&this.setState({scrollbarWidthOffset:s})}}}const Py=yl(Xe(e=>(0,n.jsx)(Ar,{...e}))),IX=e=>{const{cardMode:t,customBackgroundColorContrast:s}=os(),o=Fe()?.theme,r=Sl(),a=yn(),c=a===se.IMAGE&&r?.overlayColor===nt.LIGHT,l=Is(),d=o?.accentContrast,h=d===be.AUTO,m=(0,u.useMemo)(()=>{let v="#fafafa";if(t===Hs.TRANSPARENT)switch(a){case se.DARK:v="#525252";break;case se.BLACK:v="#1a1a1a";break;case se.IMAGE:c?v="rgba(0, 0, 0, 0.7)":v="rgba(255, 255, 255, 0.7)";break;case se.ACCENT:case se.COLOR:case se.TINT:if(l!=null)switch(la(l)){case ct.LIGHT:v=en(.5,l);break;case ct.MED:v=bn(.35,l);break;case ct.DARK:v=bn(.65,l);break;case ct.NEAR_BLACK:v=en(.1,l);break}}const C={"--color-background":v},g=a===se.COLOR?s:d;if((a===se.ACCENT||a===se.COLOR)&&t===Hs.TRANSPARENT&&h){const x=Bt({backgroundColor:v,contrast:g});C["--color-text"]=x}return C},[l,a,t,s,h,c,d]),f={...e,style:m};return(0,n.jsx)(Py,{...f})},jX=({alt:e,className:t,imageId:s,l10nId:o,url:r})=>{const a=yo(e);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Cs,{alt:a,className:t,"data-l10n-id":o,id:s,src:r}),!a&&(0,n.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class wX extends u.Component{static defaultProps={editable:!1,isRTL:!1,items:[],onStep:()=>{},stack:!1};state={activeIndex:0,flipStateMap:{},prefersKeyboardNavigation:!0};render(){const{blockId:t,animateBlockEntrance:s,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:x,showHint:y}=f,T=X()("block-flashcards",{"block-flashcard--column":!v,"block-flashcard--stack":v,"block-flashcards--no-animation":!x}),b=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":i.length>2?"small":"large",L=h===nr.MOBILE_PORTRAIT||h===nr.MOBILE_LANDSCAPE;return(0,n.jsx)(Ie,{className:T,children:v?(0,n.jsx)(Be,{animateBlockEntrance:s,initiallyVisible:o,isLearner:a,children:(0,n.jsx)("div",{className:"block-flashcard-carousel",children:(0,n.jsx)(Gd,{blockId:t,items:i,children:({carouselRef:N})=>(0,n.jsx)(_d,{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:N,shouldMouseEmulateTouch:L,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:i.map((k,E)=>(0,n.jsx)(Ry,{activeIndex:C,backDescription:k?.back?.description,backMedia:k?.back?.media,backType:k?.back?.type,frontDescription:k?.front?.description,frontMedia:k?.front?.media,frontType:k?.front?.type,id:k?.id,index:E,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:g,settingShowHint:y,size:"large",type:"stack",wrapElement:"div"},k?.id))})})})}):(0,n.jsx)(Be,{animateBlockEntrance:s,className:"block-flashcards__animation",initiallyVisible:o,isLearner:a,siblingDelay:.25,children:(0,n.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:i.map((N,k)=>(0,n.jsx)(Ry,{activeIndex:C,backDescription:N?.back?.description,backMedia:N?.back?.media,backType:N?.back?.type,blockId:t,frontDescription:N?.front?.description,frontMedia:N?.front?.media,frontType:N?.front?.type,id:N?.id,index:k,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:g,settingShowHint:y,size:b,type:"grid",wrapElement:"li",wrapRole:"listitem"},N?.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&&!UM(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,s){this.setState(o=>({flipStateMap:{...o.flipStateMap,[t]:s}}))}handleCarouselChange(t){const{block:s,onTranscriptUpdate:o}=this.props,{flipStateMap:r}=this.state,a=r[t]?"back":"front",i=s.items?.[t],c=i?.[a]?.media,l=`items:${s?.id}/items:${i?.id}/${a}`;o?.({audioPlayerId:fn({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const My=Pf(Xe(yl(wX))),qf=$("pill-button");function Oy({allowTabNavigation:e=!0,ariaLabel:t,children:s,className:o,href:r,onClick:a=()=>{},onFocus:i,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=qf({[h]:!0,[l]:!0}).mix(o),f=!e;return r?(0,n.jsx)(rs,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:a,onFocus:i,tabIndex:e?void 0:-1,to:r,children:(0,n.jsx)("span",{className:qf("content"),children:s})}):(0,n.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,n.jsx)("span",{className:qf("content"),children:s})})}const By=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:s=!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,Me.A)(t);(0,u.useEffect)(()=>{e&&!C&&t&&setTimeout(()=>{v.current?.focus?.({preventScroll:s})},0)},[e,t,s,C]);const g=X()("quiz-card__actions",{"quiz-card__actions--proceed":t}),x=X()("quiz-card__button","quiz-card__button--next","brand_ui",{"brand--background":t,"visually-hidden-always":!t});return(0,n.jsxs)("div",{className:g,children:[(0,n.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,n.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:i})}),(0,n.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,n.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,n.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:x,"data-testid":"quiz-next-button",onClick:m,ref:v,tabIndex:f,type:"button",children:a})})]})},AX=({children:e,isActive:t,isComplete:s,isTimedQuiz:o,style:r})=>(0,n.jsx)("div",{"aria-hidden":t?void 0:!0,className:RX({isActive:t,isComplete:s,isTimedQuiz:o}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,n.jsx)("div",{className:"quiz-card__container",children:(0,n.jsx)("div",{className:"quiz-card__row",children:(0,n.jsx)("div",{className:"quiz-card__main",children:e})})})}),RX=({isActive:e,isComplete:t,isTimedQuiz:s})=>X()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":s}),Dy=AX,{FILL_IN_THE_BLANK:Fy,MATCHING:PX,MULTIPLE_CHOICE:MX,MULTIPLE_RESPONSE:OX}=ss;function BX(e,t){return e.map(s=>String(t(s?.title)??"")).filter(Boolean).join(", ")}function DX(e,t,s){const o=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(s(o?.title)??"")}function FX(e,t,s){return String(s(e?.[t]?.title)??"")}function Hy(e,t,s){return t.filter(e).reduce((o,r,a)=>{const i=String(s(r?.title)??"");return a===0?i:o+", "+i},"")}function HX(e,t,s){return Hy(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,s)}function $X(e,t,s){return Hy((r,a)=>t.includes(a),e,s)}function VX({answers:e,getL10nValue:t,selection:s,correctLabel:o,userLabel:r,matchLabel:a="Match Item: ",revealAnswers:i}){const c=Object.fromEntries(Object.entries(s).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===je.INCORRECT?`${a}${m}. ${r}: ${v}.`:`${a}${m}. ${o}: ${h}. ${r}: ${v}.`}).join(" ")}function Jf({correctAnswer:e,selectedAnswer:t,correctLabel:s,userLabel:o,revealAnswers:r}){return!e||!t||r===je.NONE?"":r===je.INCORRECT?`${o}: ${Ts(t)}.`:`${s}: ${Ts(e)}. ${o}: ${Ts(t)}.`}function zX(e,t){return e.type===Fy?t?.quizAcceptableResponses:t?.a11yCorrectLive}function UX({getL10nValue:e,isComplete:t,item:s,selection:o,labels:r,revealAnswers:a}){if(!s||!t)return null;const i=s?.answers??[],c=s?.correct,l=s?.corrects,d=zX(s,r),h=r?.a11yAnswerLive;switch(s.type){case PX:return VX({getL10nValue:e,answers:i,selection:o,correctLabel:d,userLabel:h,revealAnswers:a});case Fy:return Jf({correctAnswer:BX(i,e),selectedAnswer:o,correctLabel:d,userLabel:h,revealAnswers:a});case MX:return Jf({correctAnswer:DX(i,c,e),selectedAnswer:FX(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a});case OX:return Jf({correctAnswer:HX(l,i,e),selectedAnswer:$X(i,o,e),correctLabel:d,userLabel:h,revealAnswers:a})}return null}const $y=({canProceed:e,feedbackRef:t,feedbackValue:s,isActive:o,isComplete:r,isCorrect:a,item:i,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:v}=xn(),C=(0,Me.A)(e),g=jt(),y=!!Ae(s),T=a?l:d,S=(0,u.useCallback)(()=>{const N=UX({getL10nValue:g,isComplete:r,item:i,labels:c,revealAnswers:h,selection:m}),k=s?Ts(g(s)):"",E=T+". "+N+" "+k;let j;return E&&(j=setTimeout(()=>{f(E)},250)),()=>{clearTimeout(j)}},[f,s,g,r,i,c,T,h,m]);(0,u.useLayoutEffect)(()=>{!C&&e&&h!==je.NONE&&S()},[e,C,S,h]),(0,u.useEffect)(()=>v,[v]);const b=X()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":y}),L=X()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":a});return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)("div",{"aria-hidden":o?void 0:!0,className:b,ref:t,tabIndex:o?-1:void 0,children:(0,n.jsx)("div",{className:"quiz-card__main--feedback",children:(0,n.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,n.jsx)("div",{className:L,children:(0,n.jsx)("i",{"aria-hidden":"true",className:a?"icon icon-Master-05":"icon icon-Master-06"})}),(0,n.jsx)("div",{className:"quiz-card__feedback-label",children:T}),s&&(0,n.jsx)("div",{children:(0,n.jsx)(ke,{allowTabNavigation:r&&o,className:"quiz-card__feedback-text",value:s})})]})})})})},{FILL_IN_THE_BLANK:_X}=ss,GX=({children:e,type:t})=>(0,n.jsx)("div",{className:WX({type:t}),children:e}),WX=({type:e})=>X()("quiz-card__interactive",{"quiz-card__interactive--no-border":[_X].includes(e)}),Vy=GX,Ho=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:s,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,n.jsx)("div",{className:"quiz-card__media",children:(0,n.jsx)(Kt,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:s,index:o,isOverlayAudio:r,item:a,labels:i,media:c,opts:l,shouldPause:d})}),jpe=(e,t)=>s=>s>=e&&s<t,zy=e=>e<10?`0${e}`:String(e),KX=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),Uy=e=>e.reduce((t,s)=>s==null||isNaN(s)?t:t+s,0),QX=(e,t)=>{const s=ws(),o=(0,Me.A)(t);(0,u.useEffect)(()=>{!o&&t&&e&&rd()(e.focus)&&e.focus({preventScroll:s})},[t,s,o,e])},iu=$("question-counter"),YX=({isActive:e=!1,labels:t,questionLabel:s,questionNumber:o,totalQuestions:r})=>{const a=(0,u.useRef)(null);QX(a.current,e);const i=`${t?.quizQuestion} ${o} ${t?.lessonPreposition} ${r}`,c=`${zy(o)}/${zy(r)}`;return(0,n.jsx)("div",{className:iu(),children:(0,n.jsxs)("h1",{"aria-label":i,className:iu("heading"),ref:a,tabIndex:-1,children:[(0,n.jsx)("span",{"aria-hidden":"true",className:iu("label"),children:s}),(0,n.jsx)("span",{"aria-hidden":"true",className:iu("count"),children:c})]})})},ZX=$("question-title"),XX=({allowTabNavigation:e,htmlId:t,value:s})=>(0,n.jsx)(ke,{allowTabNavigation:e,className:ZX(),"data-testid":"quiz-question-title",id:t,value:s}),qX=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:s,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=je.NONE,value:x=""})=>{const y=(0,u.useRef)(null),[T]=(0,u.useState)(()=>Cr()("fitb-")),S=jt(),b=JX({options:m,getL10nValue:S}),L=`${T}-feedback`,N=`${T}-acceptable`,k=`${T}-input`,E=i?`${L} ${N}`:o||void 0,j=i?void 0:C,A=e?0:-1,I=g===je.ALL||g===je.INCORRECT,w=g===je.ALL||c&&g===je.INCORRECT,O=c?t:r,P=t&&r&&{"--fa-primary-color":Bt({backgroundColor:O,contrast:c?s:a}),"--fa-secondary-color":O},M=r&&{backgroundColor:Bt({backgroundColor:r,contrast:a}),fill:r,borderRadius:"50%"},H=X()("quiz-fill__icon",{"quiz-fill__icon--visible":i}),F=X()("quiz-fill__options",{"quiz-fill__options--visible":i}),B=(0,u.useCallback)(Z=>{h(Z.currentTarget.value)},[h]),V=(0,u.useCallback)(Z=>{ua(Z)&&d(Z)},[d]),G=i?void 0:B,_=i?void 0:V;return(0,n.jsxs)("div",{className:"quiz-fill",children:[(0,n.jsxs)("div",{className:"quiz-fill__container",children:[(0,n.jsx)("input",{"aria-describedby":E,"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:k,onChange:G,onKeyDown:_,placeholder:j,readOnly:i,ref:y,tabIndex:A,type:"text",value:x}),I&&(0,n.jsxs)("div",{className:H,id:L,children:[c&&(0,n.jsx)(ie,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...P}}),!c&&(0,n.jsx)(fF,{"aria-label":l?.quizIncorrect,style:M})]})]}),w&&i&&(0,n.jsx)("div",{className:F,id:N,children:(0,n.jsx)(ke,{value:`${v}: ${b}`})})]})},JX=({options:e,getL10nValue:t})=>e.map(o=>(t(o.title)??"").trim()).join(", "),_y=qX;function eq({correctAnswerColor:e,correctAnswerColorContrast:t}){const s=It(),o=Bt({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":o,"--fa-secondary-color":e}:void 0;return(0,n.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,n.jsx)(ie,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,n.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,n.jsx)("span",{className:"matching-results-item-feedback-text-result",children:s?.quizCorrect})})]})}var Va=p(82920);function tq({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:s,shouldRevealCorrectAnswer:o}){const[r,a]=Va.useState(!0),[i,c]=Va.useState(!1),l=Va.useRef(null),h=`matching-text-${Va.useId()}`,m=It(),f=(0,Me.A)(e),v=Va.useCallback(()=>{a(b=>!b)},[]);Va.useLayoutEffect(()=>{if(f!==e){const b=l.current;b!=null&&b.scrollWidth>b.clientWidth&&c(!0)}},[f,e]);const C=Bt({backgroundColor:t,contrast:s}),g=t?{"--fa-primary-color":C,"--fa-secondary-color":t}:void 0,x=X()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),y=X()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),T=X()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),S=X()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,n.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,n.jsx)(ie,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:g}),!o&&(0,n.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,n.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),o&&(0,n.jsx)(n.Fragment,{children:(0,n.jsxs)("span",{className:x,children:[(0,n.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),i&&(0,n.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,n.jsx)(ie,{className:y,name:"caret-down",style:g})}),(0,n.jsx)("span",{className:T,children:(0,n.jsxs)("span",{className:S,id:h,ref:l,children:[m?.quizCorrect,": ",(0,n.jsx)(ps,{value:e})]})})]})})]})}function sq({col1Id:e,col1Value:t,col2Id:s,col2Value:o,correctAnswerColor:r,correctAnswerColorContrast:a,correctAnswerValue:i,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===s,f=h!=="incorrect",v=h!=="none";return(0,n.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,n.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,n.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,n.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,n.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,n.jsx)("span",{className:"matching-results-item-piece-content",children:(0,n.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,n.jsx)(ps,{value:t})})})]}),(0,n.jsxs)("div",{className:"matching-results-item-piece",children:[(0,n.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,n.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,n.jsx)("span",{className:"matching-results-item-piece-content",children:(0,n.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,n.jsx)(ps,{value:o})})})]})]}),v&&m&&(0,n.jsx)(eq,{correctAnswerColor:r,correctAnswerColorContrast:a}),v&&!m&&(0,n.jsx)(tq,{correctAnswerValue:i,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function nq({answers:e,columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,itemHeight:i,revealAnswers:c,rows:l}){return(0,n.jsx)("div",{className:"matching-results",children:(0,n.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,n.jsx)(sq,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:s,correctAnswerColorContrast:o,correctAnswerValue:v,height:i,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,revealAnswers:c},h)})})})}function oq(e){return Object.keys(e).length===0}function rq(e,t){return t in e}function aq(e,t){return Object.values(e).includes(t)}function ep(e,t){for(const s in e)if(e[s]===t)return s}function iq(e,t,s){return{...e,[t]:s}}function cu(e,t){return t in e?Mt(e,[t]):e}function cq(e,t){const s=ep(e,t);return s===void 0?e:cu(e,s)}function Gy(e,t,s){let o=cu(e,t);return o=cq(o,s),iq(o,t,s)}function lq(e){return Object.keys(e).length}var dq=p(93481),tp=p.n(dq);tp().dynamicDrop(!0),tp().pointerMoveTolerance(8);const jn=tp();var za=p(82920);function uq(e,{onStart:t,onMove:s,onEnd:o,isEnabled:r=!0}){const a=za.useRef({x:0,y:0}),i=za.useRef({x:0,y:0}),c=za.useRef(!1),l=za.useRef(null),d=za.useRef(void 0);za.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=kx(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)`,s?.({...a.current})),i.current=f)},jn(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)`,s?.({...a.current})},end:()=>{a.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{o?.()},0)}}}),c.current=!0,()=>{jn(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,s,o,r])}var Wy=p(82920);function hq(e,{isEnabled:t=!0,onDrop:s,onEnter:o,onLeave:r,overlap:a=.015}){const i=Wy.useRef(!1);Wy.useEffect(()=>{const c=e.current;if(!(!c||!t||i.current))return jn(c).dropzone({overlap:a,listeners:{drop:()=>{s?.()},dragenter:()=>{o?.()},dragleave:()=>{r?.()}}}),i.current=!0,()=>{jn(c).unset(),i.current=!1}},[e,s,o,r,t,a])}var Ws=p(82920);const Ky=Ws.memo(function({col:t,height:s,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:x,valueOtherColumnActive:y,valueOtherColumnMatch:T}){const[S,b]=Ws.useState(!1),L=Ws.useRef(null),N=Ws.useRef(null),k=It(),E=Ws.useCallback(()=>{d({col:t,id:o,value:x})},[t,o,d,x]),j=Ws.useCallback(()=>{b(!0),m({col:t,id:o,value:x})},[t,o,m,x]),A=Ws.useCallback(()=>{h(),b(!1)},[h]),I=Ws.useCallback(()=>{f({col:t,id:o,value:x})},[t,o,f,x]),w=Ws.useCallback(()=>{v({col:t,id:o,value:x})},[t,o,v,x]),O=Ws.useCallback(()=>{C()},[C]),R=Ws.useCallback(B=>{g(B,{col:t,index:r})},[t,r,g]);Ws.useEffect(()=>{t===1&&r===0||N.current?.setAttribute("tabindex","-1")},[]),uq(L,{isEnabled:!i,onStart:j,onEnd:A}),hq(L,{isEnabled:i,onDrop:I,onEnter:w,onLeave:O});const P=X()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),M=T==null?null:(0,n.jsxs)(n.Fragment,{children:[k?.a11yMatchingItemMatchedWith," ",(0,n.jsx)(ps,{value:T})]}),H=y==null?(0,n.jsx)(n.Fragment,{children:k?.a11yMatchingItemSelectableItem}):(0,n.jsxs)(n.Fragment,{children:[k?.a11yMatchingItemMatchWith," ",(0,n.jsx)(ps,{value:y})]}),F=X()("matching-interaction-item",{draggable:!i,"draggable--dragging":!i&&S,droppable:i});return(0,n.jsx)("li",{className:F,ref:L,role:"listitem",children:(0,n.jsxs)("button",{"aria-pressed":a||c?!0:void 0,className:P,"data-state":a?"active":void 0,onClick:S?void 0:E,onKeyDown:R,ref:N,style:s?{height:s}:void 0,type:"button",children:[i?(0,n.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,n.jsx)(ie,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,n.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,n.jsx)("span",{className:"matching-interaction-piece-content",children:(0,n.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,n.jsx)(ps,{value:x})})}),(0,n.jsx)("span",{className:"visually-hidden-always",children:M}),(0,n.jsx)("span",{className:"visually-hidden-always",children:H})]},o)})});var _e=p(82920);function mq({answers:e,columnBehavior:t,isActive:s,itemHeight:o,matches:r,onChange:a,onChangeItemHeight:i,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,Me.A)(s),h=(0,Me.A)(t),m=(0,Me.A)(e),f=(0,Me.A)(r),v=It(),[C,g]=_e.useState(void 0),[x,y]=_e.useState(void 0),[T,S]=_e.useState(void 0),[b,L]=_e.useState(!1),N=_e.useRef(null),k=_e.useRef(null),E=_e.useRef(null),j=_e.useRef(void 0),A=_e.useRef(void 0),[I,w]=_e.useState(()=>lu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[O,R]=_e.useState(()=>lu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),P=_e.useMemo(()=>e.map(U=>({col:1,id:U.id,value:U.title})).toSorted((U,K)=>{const Y=I.get(U.id)??1/0,q=I.get(K.id)??1/0;return Y-q}),[e,I]),M=_e.useMemo(()=>e.map(U=>({col:2,id:U.id,value:U.matchTitle})).toSorted((U,K)=>{const Y=O.get(U.id)??1/0,q=O.get(K.id)??1/0;return Y-q}),[e,O]),H=_e.useCallback(()=>{for(const D of N.current?.querySelectorAll('button:not([tabindex="-1"])')??[])D.setAttribute("tabindex","-1")},[]),F=_e.useCallback(D=>{const U=Array.from(I),K=Array.from(O);if(t==="freezeSecond"){const Y=new Array(K.length),q=U.map(ne=>ne[0]).filter(ne=>!(ne in D));for(const[ne,te]of Object.entries(D)){const Te=O.get(te);Y[Te]=[ne,Te]}for(let ne=0;ne<Y.length;ne++)if(Y[ne]==null){const te=q.shift();Y[ne]=[te,ne]}const ee=new Map(Y),J=Qy(I,ee);J.length>0&&y(J),w(ee)}else{const Y=new Array(U.length),q=new Set(Object.values(D)),ee=K.map(te=>te[0]).filter(te=>!q.has(te));for(const[te,Te]of Object.entries(D)){const W=I.get(te);Y[W]=[Te,W]}for(let te=0;te<Y.length;te++)if(Y[te]==null){const Te=ee.shift();Y[te]=[Te,te]}const J=new Map(Y),ne=Qy(O,J);ne.length>0&&S(ne),R(J)}},[t,I,O]),B=_e.useCallback(D=>{j.current=D},[]),V=_e.useCallback(()=>{A.current==null&&(j.current=void 0)},[]),G=_e.useCallback(D=>{A.current=D},[]),_=_e.useCallback(()=>{A.current=void 0},[]),Z=_e.useCallback(D=>{const U=j.current;if(U!=null){const K=D.col===1?D.id:U.id,Y=D.col===1?U.id:D.id,q=Gy(r,K,Y);j.current=void 0,A.current=void 0,a(q)}},[r,a]),oe=_e.useCallback(D=>{let U=null,K=!1,Y=C;if(D.col===1&&D.id in r)U=cu(r,D.id),Y=null;else if(D.col===2&&ep(r,D.id)){const q=ep(r,D.id);U=cu(r,q),Y=null}else C==null&&(Y={col:D.col,id:D.id,value:D.value},K=!0);if(C!=null)if(C.col===D.col)C.id===D.id?Y=null:Y={col:D.col,id:D.id,value:D.value};else{const q=D.col===1?D.id:C.id,ee=D.col===1?C.id:D.id;U=Gy(r,q,ee),K=!0,Y=null}if(U!=null&&a(U),C!==Y&&g(Y),K){const ee=(D.col===1?E:k).current?.querySelector('button:not([aria-pressed="true"])');ee&&(H(),ee.removeAttribute("tabindex"),ee.focus({preventScroll:!l}))}},[l,C,r,a,H]),Q=_e.useCallback((D,{col:U,index:K})=>{const Y=D.currentTarget;let q=!1,ee=null;switch(D.key){case"ArrowUp":q=!0,ee=Y.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":q=!0,ee=Y.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":q=!0,ee=U===1?E.current?.children[K]?.firstElementChild:void 0;break;case"ArrowLeft":q=!0,ee=U===2?k.current?.children[K]?.firstElementChild:void 0;break;case"Home":q=!0,ee=Y.closest("ul").firstElementChild.firstElementChild;break;case"End":q=!0,ee=Y.closest("ul").lastElementChild.firstElementChild;break}q&&(D.preventDefault(),D.stopPropagation()),ee&&(H(),ee.removeAttribute("tabindex"),ee.focus())},[H]);_e.useEffect(()=>{r!==f&&!oq(r)&&F(r)},[F,r,f]),_e.useEffect(()=>{const D=({shouldFocus:Y})=>{const q=C.col===1?k:E;H();const ee=q.current.querySelector('button[data-state="active"]');ee?.removeAttribute("tabindex"),Y&&ee?.focus(),g(null)},U=Y=>{N.current?.contains(Y.target)||D({shouldFocus:!1})},K=Y=>{gs(Y)&&C!=null&&D({shouldFocus:!0})};return C==null?(document.removeEventListener("mousedown",U),document.removeEventListener("keydown",K)):(document.addEventListener("mousedown",U),document.addEventListener("keydown",K)),()=>{document.removeEventListener("mousedown",U),document.removeEventListener("keydown",K)}},[C,H]);const z=_e.useCallback(()=>{const D=Array.from(N.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if(D.length===0)return;const U=D[0].closest("button");let K=0,Y;if(U){const ee=window.getComputedStyle(U),J=parseFloat(ee.paddingBlockStart)+parseFloat(ee.paddingBlockEnd),ne=parseFloat(ee.borderTopWidth)+parseFloat(ee.borderBottomWidth);K=J+ne,Y=parseFloat(ee.minHeight)}const q=D.reduce((ee,J)=>Math.max(ee,J.scrollHeight+K),0);Y&&Y>=q?i(void 0):i(q)},[i]);return _e.useEffect(()=>{(!d&&s||m!==e)&&z()},[d,s,e,m,z]),_e.useEffect(()=>{const D=N.current?.closest(".quiz-card");let U;return D!=null&&(U=new ResizeObserver(()=>{z()}),U.observe(D)),()=>{D!=null&&U!=null&&U.unobserve(D)}},[z]),_e.useEffect(()=>{let D,U;return x&&(D=setTimeout(()=>{y(void 0)},1e3)),T&&(U=setTimeout(()=>{S(void 0)},1e3)),()=>{clearTimeout(D),clearTimeout(U)}},[x,T]),_e.useEffect(()=>{b&&h!==t&&(a({}),F({}),g(void 0),w(lu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),R(lu({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[b,t,h,e,a,F]),_e.useEffect(()=>{if(P.length<=0)return;const D=P.map((U,K)=>[U,M[K]]);c(D)},[P,M,c]),_e.useEffect(()=>{L(!0)},[]),(0,n.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:N,children:[(0,n.jsx)("ul",{"aria-label":v?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:k,role:"list",children:P.map((D,U)=>{const K=rq(r,D.id);return(0,n.jsx)(Ky,{col:1,height:o,id:D.id,index:U,isActive:C?.col===1&&C?.id===D.id,isFrozen:t==="freezeFirst",isMatched:K,isMoved:x?.map(Y=>Y.id).includes(D.id)??!1,onClick:oe,onDragEnd:V,onDragStart:B,onDrop:Z,onDropZoneEnter:G,onDropZoneLeave:_,onKeyDown:Q,value:D.value,valueOtherColumnActive:C?.col===2?C?.value:void 0,valueOtherColumnMatch:K?M[U]?.value:void 0},D.id)})}),(0,n.jsx)("ul",{"aria-label":v?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:E,role:"list",children:M.map((D,U)=>{const K=aq(r,D.id);return(0,n.jsx)(Ky,{col:2,height:o,id:D.id,index:U,isActive:C?.col===2&&C?.id===D.id,isFrozen:t==="freezeSecond",isMatched:K,isMoved:T?.map(Y=>Y.id).includes(D.id)??!1,onClick:oe,onDragEnd:V,onDragStart:B,onDrop:Z,onDropZoneEnter:G,onDropZoneLeave:_,onKeyDown:Q,value:D.value,valueOtherColumnActive:C?.col===1?C?.value:void 0,valueOtherColumnMatch:K?P[U]?.value:void 0},D.id)})})]})}const lu=({answers:e,columnBehavior:t,columnBehaviorToShuffle:s})=>{let o=e.map(r=>r.id);return t===s&&(o=(0,e0.shuffle)(o)),new Map(o.map((r,a)=>[r,a]))};function Qy(e,t){const s=[];for(const[o,r]of e){const a=t.get(o);a!==r&&s.push({id:o,from:r,to:a})}return s}var du=p(82920);function Yy({columnBehavior:e="freezeSecond",matches:t={},onChange:s=()=>{},revealAnswers:o="none",...r}){const[a,i]=du.useState([]),[c,l]=du.useState(void 0),d=du.useCallback(m=>{i(m)},[]),h=du.useCallback(m=>{l(m)},[]);return r.isComplete?(0,n.jsx)(nq,{...r,columnBehavior:e,itemHeight:c,revealAnswers:o,rows:a}):(0,n.jsx)(mq,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:s,onChangeItemHeight:h,onChangeRows:d})}function Zy(e){return e==null||e===-1}function fq(e,t){return e===t}const pq=({allowTabNavigation:e=!1,color:t,correctId:s="",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=je.NONE,selectedIndex:g=-1,shouldFocusFirst:x,onFocusFirstComplete:y})=>{const T=Zy(g);return(0,n.jsx)(uc,{"aria-invalid":o?!0:void 0,"aria-labelledby":[m,o].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((S,b,L)=>(0,n.jsx)(gq,{allowTabNavigation:e,color:t,id:S.id,index:b,isComplete:r,isCorrect:a,isCorrectOption:s===S.id,isFirst:b===0,isFresh:T,isLast:b===L.length-1,isReduceMotion:i,isRetaking:v,isSelected:!v&&fq(g,b),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:y,questionHtmlId:m,renderOptionText:f,revealAnswers:C,shouldFocusFirst:x,title:S.title},S.id))})},gq=({allowTabNavigation:e,color:t,id:s,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:x,shouldFocusFirst:y,onFocusFirstComplete:T,title:S})=>{const[b]=(0,u.useState)(()=>Cr()("qmc-")),L=(0,u.useRef)(null),N=(0,Me.A)(l),k=!!r,E=e&&(l||c&&o===0)?0:-1,j=x===je.ALL,A=x==je.INCORRECT,I=j||A&&a,w=j||A&&a||A&&!a&&l,O=r&&i&&I,R=r&&!i&&w,P=(O||R)&&!g,M=P?`${b}-result`:void 0,H=X()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":O,"is-incorrect":R,"is-selected":l}),F=X()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),B=X()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":O}),V=X()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":R}),G=X()("quiz-multiple-choice-option__border"),_=(0,u.useCallback)(z=>{ua(z)&&f(z)},[f]),Z=(0,u.useCallback)(()=>{m({selectedIndex:o})},[o,m]),oe=(0,u.useCallback)(()=>{l&&m({selectedIndex:o})},[o,l,m]),Q=r?void 0:_;return(0,u.useEffect)(()=>{e&&L.current&&(!N&&l?L.current.focus({preventScroll:d}):y&&c&&o===0&&(L.current.focus({preventScroll:d}),T?.()))},[e,l,d,N,y,c,o,T]),(0,n.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,n.jsxs)("label",{"aria-describedby":M,className:H,ref:L,children:[(0,n.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:k,name:v,onChange:Z,onClick:r?void 0:oe,onKeyDown:Q,tabIndex:E,type:"radio"}),(0,n.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,n.jsx)(WB,{className:F,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,n.jsx)(Y2,{className:B,"data-testid":O?"correct-check-active":"correct-check"}),(0,n.jsx)(ex,{"aria-hidden":"true",className:V,dataTestId:R?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,n.jsx)("div",{className:G}),(0,n.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:C({optionId:s,title:S})})]}),P&&(0,n.jsxs)("div",{className:"visually-hidden-always",id:M,children:[l&&i&&h?.a11yQuizReviewCorrectlySelected,l&&!i&&h?.a11yQuizReviewIncorrectlySelected,!l&&i&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!i&&h?.a11yQuizReviewCorrectlyUnselected]})]})},Xy=pq;function vq(e){return e.length===0}function Cq(e,t){return e.includes(t)}function xq(e,t){return e.includes(t)?e.filter(s=>s!==t):[...e,t]}const bq=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:s,isComplete:o,isCorrect:r=!1,labels:a,onChange:i=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=je.NONE,selectedIndices:v=[]})=>(0,n.jsx)("div",{"aria-labelledby":[d,s].filter(Boolean).join(" "),role:"group",children:(0,n.jsx)("ul",{children:l.map((C,g)=>(0,n.jsx)(yq,{allowTabNavigation:e,errorMessageId:s,id:C.id,index:g,isComplete:o,isCorrect:r,isCorrectOption:t.includes(C.id),isRetaking:m,isSelected:!m&&Cq(v,g),labels:a,onChange:i,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:C.title},C.id))})}),yq=({allowTabNavigation:e,errorMessageId:t,id:s,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)(()=>Cr()("qmr-")),x=r&&v===je.ALL&&!f,y=x?`${g}-result`:void 0,T=!!r,S=e?0:-1,b=v===je.ALL,L=v==je.INCORRECT,N=b||L&&a||L&&!a&&c,k=X()("quiz-multiple-response-option",{"quiz-multiple-response-option--complete":r,"quiz-multiple-response-option--selected":c,"quiz-multiple-response-option--correct":r&&i&&N,"quiz-multiple-response-option--incorrect":r&&!i&&N}),E=X()("quiz-multiple-response-option__border"),j=(0,u.useCallback)(w=>{ua(w)&&h(w)},[h]),A=(0,u.useCallback)(()=>{d({optionIndex:o})},[o,d]),I=r?void 0:j;return(0,n.jsxs)("li",{children:[(0,n.jsxs)("label",{"aria-describedby":y,className:k,children:[(0,n.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:T,onChange:r?void 0:A,onKeyDown:I,tabIndex:S,type:"checkbox"}),(0,n.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,n.jsx)(Y2,{className:"quiz-multiple-response-option__check"}),(0,n.jsx)(ex,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,n.jsx)("div",{className:E}),(0,n.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({optionId:s,title:C})})]}),x&&(0,n.jsxs)("div",{className:"visually-hidden-always",id:y,children:[c&&i&&l?.a11yQuizReviewCorrectlyChecked,c&&!i&&l?.a11yQuizReviewIncorrectlyChecked,!c&&i&&l?.a11yQuizReviewIncorrectlyUnchecked,!c&&!i&&l?.a11yQuizReviewCorrectlyUnchecked]})]})},qy=bq;var Ppe,Sq,Tq,Mpe,Ope,Bpe,Dpe;const Lq=Dn()(qe()("correct",!0)),Fpe=e=>Sq(Tq(e),sp),kq=e=>({MATCHING:Ne(),FILL_IN_THE_BLANK:np,MULTIPLE_CHOICE:Ne(),MULTIPLE_RESPONSE:Ne()})[e],sp=Pe()(Gu()("id"),Lq),Nq=Pe()(ko(),sp),np=Dn()(qe()("correct",!0)),Eq=Pe()(Ze()("id"),ko()),Hpe=null,{FILL_IN_THE_BLANK:Iq,MATCHING:Jy,MULTIPLE_CHOICE:jq,MULTIPLE_RESPONSE:wq}=ss;function e6({type:e,text:t="",matches:s={},answersLength:o=0,selectedIndices:r=[],selectedIndex:a}){switch(e){case Iq:return!L1(t);case Jy:return lq(s)===o;case wq:return!vq(r);case jq:default:return!Zy(a)}}function Aq({answered:e=!1,...t}){return e&&t.type!==Jy?!1:e6(t)}function t6(e,t){const s=e.trim();return t?s:s.toLowerCase()}function s6({answers:e,text:t,caseSensitive:s=!1,getL10nValue:o}){if(!t)return!1;const r=t6(t,s);return e.some(a=>{const i=o(a.title);return typeof i!="string"?!1:t6(i,s)===r})}function n6(e){return Object.entries(e).every(([t,s])=>t===String(s))}function Rq(e){const t=e.answers??[],s=e.correct;if(s!=null)return t.findIndex(r=>r.id===s);const o=t.findIndex(r=>r.correct===!0);return o===-1?0:o}function o6({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:s,selectedIndex:o,shuffledAnswerIndices:r}){if(o==null||t&&!Array.isArray(r))return!1;const a=t&&!e?r.indexOf(o):o,i=Rq(s);return a===i}function Pq(e,t){return t.map(s=>e.indexOf(s))}function Mq(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function Oq(e){const t=e.answers??[],s=e.corrects??[];return s.length>0?s.map(a=>{const i=Mq(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 r6(e){return[...e].sort((t,s)=>t-s)}function a6({isShuffled:e=!1,item:t,selectedIndices:s,shuffledAnswerIndices:o}){if(!Array.isArray(s)||e&&!Array.isArray(o))return!1;const r=e?Pq(o,s):s,a=Oq(t),i=r6(r),c=r6(a);return i.length!==c.length?!1:i.every((l,d)=>l===c[d])}function i6({answers:e,feedback:t,feedbackCorrect:s,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?s:o;default:return t}}var Bq=p(19199),Dq=p.n(Bq),$pe=p(75318),Fq,c6,Hq,$q,Vq;const l6="owner",zq="manager",Uq="editor",Vpe="viewer",d6=null,op=({effectiveRole:e,requiredRole:t})=>{const s=c6(e,d6),o=c6(t,d6);return s>=o},_q=e=>({editor:op({effectiveRole:e,requiredRole:Uq}),manager:op({effectiveRole:e,requiredRole:zq}),owner:op({effectiveRole:e,requiredRole:l6})}),zpe=(e,t,s)=>{const{authorId:o}=e,r=o===s,a=c=>r||c,i=Gq(t);return $q(Hq(["canChangePermissions","canMoveTo"]),Fq({canDelete:a,canEdit:a,canMove:a,canRename:a,canUnshare:a}))(i)},Gq=e=>{const{effectiveRole:t,type:s}=e||[],o=s!==Vq?l6:t,{editor:r,manager:a,owner:i}=_q(o);return{canChangePermissions:a,canCreate:r,canDelete:i,canEdit:r,canMove:a,canMoveTo:r,canRename:r,canUnshare:i}};var Wq,Kq,vc,Qq,Yq,Zq,Xq,u6,Ua,qq,h6,m6,Jq,eJ,Cc,tJ,sJ,f6,nJ,uu,oJ,rJ,p6,aJ,g6,iJ,cJ,_a;const lJ={[ss.FILL_IN_THE_BLANK]:"fillin",[ss.MATCHING]:"matching",[ss.MULTIPLE_CHOICE]:"multiple choice",[ss.MULTIPLE_RESPONSE]:"multiple response"},hu="personal",v6="team",Upe=500,_pe=null,Gpe=null,C6=({questions:e=[],drawnQuestionIds:t=[]})=>{const s=a=>!t.some(i=>i.includes(a.id)),o=e.filter(s),r=Math.floor(Math.random()*o.length);return o[r]??null},dJ=e=>t=>t.type===hu||g6({effectiveRole:t.effectiveRole,requiredRole:e}),uJ=({folders:e,requiredRole:t,teamAccount:s})=>_a(e,p6,h6,Ua(o=>dJ(t)&&(s||o.type===hu))),Wpe=({questionBanks:{folders:e,questionBanks:t},requiredRole:s=iJ,teamAccount:o,term:r})=>{if(r&&eJ(rJ(r)))return{folders:[],questionBanks:[]};const a=new RegExp("("+aJ(r)+")","i"),i=uJ({folders:e,requiredRole:s,teamAccount:o}),c=f6("id",i),l=Ua(h=>h.title.match(a)&&!h.deleted,i),d=Ua(h=>(Cc(h.folderId)||u6(h.folderId,c))&&h.title.match(a)&&!h.deleted,t);return{folders:l,questionBanks:d}},x6=(e,t,s=!1)=>_a(t,Jq(vc(!Cc(e)),nJ(e),sJ(p6,h6)),oJ(uu("deleted",!s))),hJ=(e,t,s,o=!1)=>{const r=e===v6,a=e===hu,i=_a(x6(v6,s),f6("id")),c=l=>!Cc(l.folderId)&&u6(l.folderId,i);return _a(t,Ua(Xq([[vc(o),l=>l.deleted],[vc(r),l=>!l.deleted&&c(l)],[vc(a),l=>!l.deleted&&!c(l)],[vc(Cc(e)),l=>!l.deleted],[Wq,m6]])))},mJ=({type:e})=>e===hu,b6=({effectiveRole:e})=>g6({effectiveRole:e,requiredRole:cJ}),fJ=(e,t)=>({id:s})=>s?Zq(Qq(m6),tJ(Kq([uu("folderId",s),uu("authorId",e)])))(t):!1,pJ=(e,t,s,o)=>_a(x6(t,e),Ua(Yq([mJ,b6,fJ(o,s)]))),gJ=(e,t)=>s=>{if(Cc(s.folderId))return!0;const o=qq(uu("id",s.folderId),e);if(!o)return!1;const r=b6(o),a=s.authorId===t;return r||a},vJ=(e,t,s,o,r)=>_a(hJ(e,t,s),Ua(gJ(o,r))),Kpe=(e,t,s,o)=>{const r=pJ(e,s,t,o),a=vJ(s,t,e,r,o);return{folders:r,questionBanks:a}},CJ=(e,t,s=[])=>{const o=t[e],{parentId:r}=o||{},{type:a}=t?.[r]||{},i=o?[o,...s]:s;return!r||o.type!==a?i:CJ(r,t,i)},{FILL_IN_THE_BLANK:Ga,MATCHING:mu,MULTIPLE_CHOICE:fu,MULTIPLE_RESPONSE:pu}=ss,xJ={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},bJ=bt()(null,[0,"type"]),rp=ws();class y6 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-${Yd()()}`},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(Ge,this.previewOnly__forceShowFeedback),window.addEventListener(km,this.previewOnly__clearOverrides),this.id=Cr()("kc-")}componentDidUpdate(t,s){s.answered&&!this.state.answered?this.getType()!==Ga&&Qm(this.wrapper):!s.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(Ge,this.previewOnly__forceShowFeedback),window.removeEventListener(km,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:s,path:o}=t.detail,{getL10nValue:r}=this.props;if(s!==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 Ga:return this.state.fillInText;case mu:return this.state.matches;case pu:return this.state.selectedIndices;case fu:default:return this.state.selectedAnswer}}handleMatchesChange=t=>{this.setState({errorIncomplete:!1,matches:t})};handleMultipleResponseChange({optionIndex:t}){const{selectedIndices:s}=this.state;this.setState({errorIncomplete:!1,selectedIndices:xq(s,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:s}=this.state;s||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,s,o,r,a){if(!s){switch(this.setState({errorIncomplete:!0}),r.type){case Ga:this.wrapper?.querySelector("input")?.focus();break;case pu:case fu:this.wrapper?.querySelector("input")?.focus();break;case mu: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:s,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},()=>{!rp&&this.getType()===Ga&&Qm(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:s,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,n.jsx)(We,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:s,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:x,quizTakeAgain:y}=d,{id:T,type:S}=t,b=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},L=l("media"in t?t.media:{}),N=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),k=this.getCanSubmit({item:t}),E=f?.requireCorrectAnswer?N:!0,j=this.onSubmit.bind(this,T,k,E,t),A=this.getFeedback({item:t,isCorrect:N,selectedAnswer:a}),I=this.getSelection({item:t}),{columnBehavior:w,correctAnswerColor:O,correctAnswerColorContrast:R,incorrectAnswerColor:P,incorrectAnswerColorContrast:M}=f,H=N?O:P,F=d.knowledgeCheckCorrectAnswerRequiredBlock,B=d.knowledgeCheckRetriesAttemptsRemaining,V=d.knowledgeCheckMaxRetriesReached,G=h?.items?.[i]?.items?.[T]?.retryAttemptCount??0,_=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||G<f?.retryCount),Z=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-G:-1,oe=!N,Q={"--color-feedback-icon":H,"--color-matching-feedback-bubble-bg":P,"--color-multiple-choice-complete-border":P,"--color-multiple-choice-correct-border":O,"--color-multiple-response-correct-border":O,"--color-multiple-response-incorrect-border":P,"--color-multiple-response-option-check":s?O:void 0,"--color-quiz-option-check":O,"--color-x-fill":P},D=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!_)?je.ALL:je.INCORRECT,U=X()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":s,"block-knowledge__retake-container--active-attempts-left":s&&!r&&Z>0}),K=X()("block-knowledge__retake",{"block-knowledge__retake--active":s&&!r&&_}),Y=X()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":s&&!r&&_&&Z>0}),q=X()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":s&&!r&&!_}),ee=!!L?.image,J=!!L?.audio,ne=!!L?.video,te=!!L?.embed;let Te=null;J&&ee?Te=(0,n.jsx)(Ho,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-audio`,isOverlayAudio:!0,item:t,labels:d,media:L,settings:b}):J&&(ne||te)?Te=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ho,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-audio`,item:t,labels:d,media:{audio:L.audio},settings:b}),(0,n.jsx)(Ho,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-video`,item:t,labels:d,media:ne?{video:L.video}:{embed:L.embed},settings:b})]}):Te=(0,n.jsx)(Ho,{blockId:i,enableVideoPlaybackSpeed:c,index:`${i}-${T}-audio`,item:t,labels:d,media:L,settings:b});const W=X()("block-knowledge__media",{"block-knowledge__image-with-audio":J&&ee});return(0,n.jsxs)(Dy,{isActive:!0,style:Q,children:[f?.requireCorrectAnswer&&(s&&!N||!s)&&(0,n.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,n.jsx)(ie,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),F]}),m(t),(0,n.jsx)("div",{className:W,children:Te}),(0,n.jsx)(Vy,{type:S,children:this.renderType({columnBehavior:w,correctAnswerColor:O,correctAnswerColorContrast:R,incorrectAnswerColor:P,incorrectAnswerColorContrast:M,isCorrect:N,item:t,onSubmit:j})}),(0,n.jsx)("div",{"aria-live":"assertive",children:o&&(0,n.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,n.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,n.jsx)(ie,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,n.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:g})]})}),(0,n.jsx)(By,{canProceed:s,canSubmit:k,isReduceMotion:rp,onSubmit:j,quizSubmit:x}),(0,n.jsx)($y,{canProceed:this.state.forceShowFeedback||s,feedbackRef:this.feedbackRef,feedbackValue:A,isActive:s,isComplete:s,isCorrect:N,item:t,labels:d,quizCorrect:v,quizIncorrect:C,revealAnswers:D,selection:I}),(0,n.jsxs)("div",{"aria-hidden":!s,className:U,children:[oe&&(0,n.jsxs)(n.Fragment,{children:[_?(0,n.jsxs)(Oy,{allowTabNavigation:s,className:K,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"arrow-rotate-left"}),y]}):null,Z>0&&(0,n.jsxs)("div",{className:Y,children:[B," ",Z]})]}),!_&&!N&&(0,n.jsx)("div",{className:q,children:V})]})]},T)}getIsCorrect({item:t}){const{fillInText:s,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 Ga:return s6({answers:np(c),text:s,caseSensitive:l,getL10nValue:this.props.getL10nValue});case mu:return n6(o);case pu:return a6({item:{answers:c},selectedIndices:a});case fu:default:return o6({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return bJ(t)}getCanSubmit({item:t}){const s="answers"in t?t.answers:void 0,{answered:o,fillInText:r,matches:a,selectedAnswer:i,selectedIndices:c}=this.state;return Aq({type:t.type,text:r,matches:a,answersLength:s?.length??0,selectedIndices:c,selectedIndex:i,answered:o})}getFeedback({item:t,isCorrect:s,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??s;return i6({answers:l,feedback:r,feedbackCorrect:a,feedbackIncorrect:i,feedbackType:c,isCorrect:d,selectedIndex:typeof o=="number"?o:null})}getTypeLabel(){const{labels:t}=this.props,s=this.getType(),o=xJ[s];return o?t?.[o]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:s}){return(0,n.jsx)(We,{className:"cursorAuto",value:s})}renderMultipleChoiceOptionText(t,{title:s}){return(0,n.jsx)(We,{className:"quiz-multiple-choice-option__label cursorAuto",value:s})}renderType({columnBehavior:t,correctAnswerColor:s,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:x}=this.props,{answered:y,fillInText:T,isRetaking:S,matches:b,selectedAnswer:L,selectedIndices:N,shouldFocusFirst:k,questionHtmlId:E}=this.state,{id:j,type:A}=c,I="answers"in c?c.answers:[],{quizAcceptableResponses:w,quizAnswerPlaceholder:O}=h,R=g?.items?.[x]?.items?.[j]?.retryAttemptCount??0,P=C?.retryCount!==0&&(C?.retryCount==null||C?.retryCount===-1||R<C?.retryCount),H=C?.revealCorrectAnswers!==!1&&(C.retryCount==null||C.retryCount===-1||!P)?je.ALL:je.INCORRECT,F=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(A){case Ga:return(0,n.jsx)(_y,{allowTabNavigation:!0,correctAnswerColor:s,correctAnswerColorContrast:o,errorMessageId:F,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isComplete:y,isCorrect:i,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:np(I),questionHtmlId:E,quizAcceptableResponses:w,quizAnswerPlaceholder:O,revealAnswers:H,value:T});case mu:return(0,n.jsx)(Yy,{answers:kq(A)(I),columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:r,incorrectAnswerColorContrast:a,isActive:!d,isComplete:y,matches:b,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:H});case pu:return(0,n.jsx)(qy,{allowTabNavigation:!0,correctIds:sp(I),errorMessageId:F,isComplete:y,isCorrect:i,isRetaking:S,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:I,questionHtmlId:E,renderOptionText:f.bind(this,c),revealAnswers:H,selectedIndices:N});case fu:default:return(0,n.jsx)(Xy,{allowTabNavigation:!0,correctId:Nq(I)||Eq(I),errorMessageId:F,isComplete:y,isCorrect:i,isReduceMotion:rp,isRetaking:S,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:I,questionHtmlId:E,renderOptionText:v.bind(this,c),revealAnswers:H,selectedIndex:L,shouldFocusFirst:k})}}render(){const{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,items:r,settings:a,variant:i}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=a,m=Bd(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,n.jsx)(Ie,{className:f,"data-testid":"block-kc-card",ref:g=>{this.block=g},style:this.getStyle(),children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{className:"block-knowledge__container",children:(0,n.jsx)("div",{className:"block-knowledge__row",children:(0,n.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,n.jsx)(Ht,{"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:s}=this.props;if(s?.cardMode===Hs.TRANSPARENT)switch(s?.backgroundType){case se.ACCENT:case se.COLOR:case se.TINT:if(t)switch(la(t)){case ct.LIGHT:return{"--color-background-choice-hover":en(.5,t),"--color-background-feedback-frame":en(.5,t)};case ct.MED:return{"--color-background-choice-hover":bn(.3,t),"--color-background-feedback-frame":bn(.3,t)};case ct.DARK:return{"--color-background-choice-hover":bn(.6,t),"--color-background-feedback-frame":bn(.6,t)};case ct.NEAR_BLACK:return{"--color-background-choice-hover":en(.15,t),"--color-background-feedback-frame":en(.15,t)}}}}}const yJ=e=>{const{blockId:t,items:[s]}=e,{questions:o}=s,[r,a]=(0,u.useState)(()=>C6({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(Ge,c),()=>window.removeEventListener(Ge,c)},[t,r,o]);const i=(0,u.useMemo)(()=>r?{variant:lJ[r.type],items:[r]}:{},[r]);return r?(0,n.jsx)(y6,{...e,...i}):(0,n.jsx)("div",{})},SJ=e=>e.variant==="draw from question bank",Wa=e=>{const t=Is()??"",s=os(),o=jt(),r={...e,backgroundColor:t,getL10nValue:o,blockSettings:s};return SJ(r)?(0,n.jsx)(yJ,{...r}):(0,n.jsx)(y6,{...r})};var TJ=p(49976),LJ=p.n(TJ);class kJ extends u.Component{refWrap;refBubbleTitle;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(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=Ao()}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){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.contentRef.scrollTop=0,this.refBubbleTitle.current?.focus?.();const s=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:fn({refs:`items:${this.props.blockId}/items:${this.props.item?.id}`}),transcriptMedia:s})}else t.isActive&&!this.props.isActive&&(document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef))}render(){const{accentColor:t,allowNav:s,description:o,headingLevel:r,htmlId:a,isActive:i,media:c,title:l,x:d,y:h}=this.props,m=r?`h${r}`:"h2",f=X()("bubble",{"bubble--active":i}),v=EJ({x:d,y:h}),C=IJ({hasOverflow:this.state.hasOverflow,x:d,y:h}),g={borderBottomColor:t},x=`${a}-title`,y=()=>{if(!c)return(0,n.jsx)(ke,{allowTabNavigation:i,className:"bubble__description",value:o});const S=this.props.getL10nValue(c)??{},b=pn(S,this.props.audioPosition,!0,"labeled-graphic"),L={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:!i},N={audio:{media:b.audioOnlyMedia||S,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:b.imageOnlyMedia||S,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:b.videoOnlyMedia||S,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:b.embedOnlyMedia||S,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:S,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,n.jsx)(n.Fragment,{children:b.renderOrder.map((k,E)=>{if(k==="text")return(0,n.jsx)(ke,{allowTabNavigation:i,className:"bubble__description",value:o},`text-${E}`);const j=N[k];return!j||k==="embed"&&!i?null:(0,n.jsx)("div",{className:"bubble__media",children:(0,n.jsx)("div",{className:"bubble__figure",children:(0,n.jsx)("div",{className:X()({"labeled-graphic-bubble-media-container--audio-bottom":k==="audio"&&this.props.audioPosition==="bottom"}),children:(0,n.jsx)(Kt,{...L,...j})})})},`${k}-${E}`)})})},T=(0,n.jsx)("div",{className:f,ref:this.refWrap,style:v,children:(0,n.jsxs)("dialog",{"aria-hidden":!i,"aria-labelledby":x,"aria-modal":"false",className:C,id:a,onKeyDown:this.handleKeyDown,style:g,children:[(0,n.jsx)(m,{className:"bubble__title",id:x,ref:this.refBubbleTitle,tabIndex:-1,children:(0,n.jsx)(ps,{value:l})}),(0,n.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,n.jsx)(KB,{className:"bubble__close-icon"})}),(0,n.jsx)("div",{className:"bubble__content",ref:S=>{this.contentRef=S},children:y()}),s&&this.renderControls()]})});return window.matchMedia("(max-width: 767px)").matches?(0,Nn.createPortal)((0,n.jsx)(d3,{children:T}),this.portal):T}renderControls(){const{accentColor:t,labels:s}=this.props,o={"--color-lg-accent":t};return(0,n.jsxs)("div",{className:"bubble__controls",style:o,children:[(0,n.jsx)("button",{"aria-label":s?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,n.jsx)("i",{className:"icon icon-chevron-left"})}),(0,n.jsx)("button",{"aria-label":s?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,n.jsx)("i",{className:"icon icon-chevron-right"})})]})}renderOverflowMask(){if(!this.contentRef)return;const t=this.contentRef,s=t.offsetHeight;t.scrollHeight>s?(t.addEventListener("scroll",this.scrollRef=Zd()(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 s=t.composedPath();this.refWrap.current!=null&&s.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>s.includes(r))||this.props.onClose({shouldFocusMarker:!1})};handleDocumentKeyDown=t=>{gs(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:s,onNextClick:o,onPreviousClick:r}=this.props,a=YM(this.contentRef,this.state.hasOverflow),i=LJ()(Re()(s));ms()([[i(Gn),r],[i(Wn),o],[WM,a]])(t)}handleCloseClick=()=>{this.props.onClose()};handleNextClick(t){this.props.onNextClick(t)}handlePreviousClick(t){this.props.onPreviousClick(t)}handleScroll(){const t=this.contentRef,s=t.scrollTop,o=t.scrollHeight,r=t.offsetHeight;s>=o-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}getMediaContainerClasses(t,s){return X()({"labeled-graphic-bubble-media-container":t,"labeled-graphic-bubble-media-container--audio-overlay":s,"labeled-graphic-bubble-media-container--audio-on-bottom":t&&this.props.audioPosition==="bottom"})}}const NJ=Xe(kJ),EJ=({x:e,y:t})=>{const s={top:"initial",bottom:"initial",left:"0",right:"0"};return e>50?s.right=100-e+"%":s.left=e+"%",t>50?s.bottom=100-t+"%":s.top=t+"%",s},IJ=({hasOverflow:e,x:t,y:s})=>{const o=t<50;let r="top";return s>33&&(r=s>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 jJ=p(82920);const wJ=e=>new URL(e).pathname.slice(1)+new URL(e).search;class AJ extends jJ.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:s,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:x}=f,y=!!f.alt,T=yo(v),S=$8(f),b=X()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!a,"labeled-graphic-canvas__figure--editing-disabled":r&&a});let L;g?L=it(f):x&&(L=it({key:wJ(x),...f}));const N=X()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":Rg(L)}),k={...m,...o!=null&&{"--corner-radius":`${Number(o)}px`}},E=(0,n.jsx)(Cs,{alt:T,className:N,"data-l10n-id":Et(l),height:C?.height||C?.originalHeight,onClick:d,onLoad:()=>this.setState({style:S}),ref:j=>{this.imageEl=j},src:L,style:k,width:C?.width||C?.originalWidth});return(0,n.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,n.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,n.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,n.jsxs)("figure",{className:b,children:[y&&r&&(0,n.jsx)(Oo,{message:"Edit alt text",children:(0,n.jsx)("div",{className:"item-media__tooltip",children:(0,n.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&E,(0,n.jsx)("ol",{role:"list",children:s})]})})})})}}const RJ=Xe(AJ),PJ={"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"},MJ=(e,t)=>{const s=PJ[t];return s?.startsWith("a11y")?e?.[s]||"":s||""};var OJ=p(82920);const S6=$("labeled-graphic-marker");class BJ extends OJ.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=s=>{this.onItemDrag(s)}),t.addEventListener("mouseleave",this.onMouseLeave=s=>{this.onItemRelease(s)})}componentWillUnmount(){const t=this.parentCanvasElement();t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseleave",this.onMouseLeave)}UNSAFE_componentWillReceiveProps(t){const{isSelected:s,useLocalStateForCompletion:o}=t;s&&o&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:s,title:o,viewed:r})=>{const{labels:a}=this.props;return[].concat(s||[]).concat(o||[]).concat(t||[]).concat(r?a?.a11yLabeledGraphicViewed:a?.a11yLabeledGraphicUnviewed).join(", ")};render(){const{accentColor:t,ariaControls:s,icon:o,isActive:r,isComplete:a,isLessonBlocksList:i,isSelected:c,isVisible:l,labels:d,markerColor:h,markerColorContrast:m,onFocus:f,styles:v,useLocalStateForCompletion:C}=this.props,g=this.props.getL10nValue(this.props.title),x=MJ(d,o),y=C?this.state.isComplete:a,T=!!h,S=Ns(h),L=Bt({backgroundColor:h,contrast:m??S}),N=T?h:"#ffffff",k=T?L:t,E=this.buildMarkerLabel({icon:x,label:d&&d.a11yLabeledGraphicButtonMarker||"",title:g,viewed:y}),j=S6({active:c,dragged:this.state.isDragged,visible:l,complete:y}),A={...v,"--color-lg-accent":N,"--color-lg-font":k},I=S6("pin",{selected:c,disabled:i});return(0,n.jsx)("button",{"aria-controls":s,"aria-expanded":r,"aria-label":E,className:j,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:f,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:A,type:"button",children:(0,n.jsx)("span",{className:I,children:(0,n.jsx)("i",{className:`icon icon-Master-${o}`})})})}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:s,onClick:o,parentId:r}=this.props,a="labeledGraphicMarkerClick",i={detail:{itemId:s,parentId:r}},c=new CustomEvent(a,i);document.dispatchEvent(c),t||o()}onItemGrab(t){const{editable:s}=this.props;if(!s)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 s=t.clientX-this.state.posX,o=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${s}px, ${o}px, 0)`}}onItemRelease(t){const{editable:s}=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():s&&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 DJ=Xe(BJ);class FJ 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:s}=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:!s||ws()}}componentDidMount(){const{isBlock:t,isLearner:s,isPreview:o,markerDelay:r}=this.props;s&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),o?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:s,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:x,lessonId:y,media:T,onItemClear:S,onItemHint:b,onItemSelected:L,onNextClick:N,onPreviousClick:k,onShowAltDialog:E,parentId:j,progress:A,selected:I,settings:w={},showBubbles:O,enableVideoPlaybackSpeed:R}=this.props,{cornerRadius:P,headingLevel:M,markerColor:H,markerColorContrast:F}=w,{showMarkers:B}=this.state,G=H||(t||r),_=X()("map-item",{"map-item--animated":!c}),Z=s?"fadeIn":"none",oe=s?1:0,Q=g.length>1;return(0,n.jsx)(u.Fragment,{children:(0,n.jsx)(Be,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!v,animateIn:Z,duration:v?0:oe,initiallyVisible:C,isLearner:m,children:(0,n.jsx)(RJ,{canvasClassNames:a,cornerRadius:P,editable:c,editingDisabled:i,imageLoaded:d,media:T,onCreateMarker:this.createMarker,onShowAltDialog:E,ref:z=>{this.canvas=z},children:g.map((z,D)=>{const{description:U,id:K,icon:Y,media:q,title:ee}=z,J=l(z.x),ne=l(z.y),te={top:ne+"%",left:J+"%"},Te=Hn()(["items",K,"isComplete"],A),W=I===K,ue=`bubble-${o}-${K}`;return(0,n.jsxs)("li",{className:_,role:"listitem",children:[(0,n.jsx)(DJ,{accentColor:G,ariaControls:ue,editable:c,icon:Y,isActive:I===K,isComplete:Te,isLessonBlocksList:f,isSelected:W,isVisible:B,itemId:K,labels:x,markerColor:H,markerColorContrast:F,onClick:()=>{L(K)},onFocus:this.onMarkerFocus(K),onHover:()=>{b()},onLeave:()=>{S()},onSetPosition:this.onSetPosition.bind(this,z),parentId:j,ref:fe=>{this.markerRefs[K]=fe},styles:te,title:ee,useLocalStateForCompletion:h},K),!c&&O&&(0,n.jsx)(NJ,{accentColor:G,allowNav:Q,audioPosition:w.audioPosition,blockId:o,description:U,enableVideoPlaybackSpeed:R,headingLevel:M,htmlId:ue,index:D,isActive:W,item:z,labels:x,lessonId:y,media:q,mediaOpts:{disableZoom:!w.zoomOnClick},onClose:this.onBubbleClose(K),onNextClick:()=>{N(D)},onPreviousClick:()=>{k(D)},title:ee,x:Number(J),y:Number(ne)},ue)]},K)})})})})}createMarker(t){const{disableCreateMarker:s,editable:o,onCreateMarker:r}=this.props;if(!o||s)return;const{x:a,y:i}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:Yd()(),isActive:!1,title:"",x:String(a),y:String(i)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:s}=this.props;return(o={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];o.shouldFocusMarker&&r?.focus?.(),s()}}onMarkerFocus(t){return()=>{const{onClose:s,selected:o}=this.props;o&&o!==t&&s()}}onSetPosition(t,s,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:s,offsetX:o,offsetY:r}),m={x:String(d),y:String(h)};(0,_t.uW)(t.x)&&(0,_t.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:s=0,offsetY:o=0}){const r=this.canvas.imageEl.getBoundingClientRect(),a=20,i=this.findItemCoordinate({clientPos:t.clientX,clientOffset:s,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:s,rectSubtractor:o,rectDivisor:r,validOffsetAmount:a}){const i=a/r*100,c=100-i;let l=(t+s-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 HJ=Xe(FJ);var $J=p(82920);const T6="page-wrap--noscroll";class VJ extends $J.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={imageLoaded:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.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(Ge,this.handleNavEvent)}handleNavEvent(t){const s=t.detail.path[t.detail.path.indexOf("items")+1]?.id,o=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;s===this.props.blockId&&this.state.selectedItemId!==o&&this.onItemSelected(o)}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(Ge,this.handleNavEvent)}render(){const{imageLoaded:t}=this.state,{initiallyVisible:s,isLessonBlocksList:o,isPreview:r,items:a,labels:i,parentId:c,settings:l={}}=this.props,{mediaWidth:d="2"}=l,h=r?a[0].id:this.state.selectedItemId,m=X()("view-labeled-graphic",{"view-labeled-graphic--small":d==="0","view-labeled-graphic--medium":d==="1","view-labeled-graphic--full":d==="2"});return(0,n.jsx)("div",{"aria-label":i?.a11yLabeledGraphicBlock,className:m,role:"group",children:(0,n.jsx)(HJ,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,imageLoaded:t,initiallyVisible:s,isLessonBlocksList:o,labels:i,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:c,selected:h})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:s,src:o}=t??{};if(!s&&!o)return;const r=setTimeout(this.setImageLoaded,1e3),a=new Image,i=s?it(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:s,items:o}=this.props,r=Ze()("id",o[ll()(t)]||o[0]);document.querySelector(`dialog#bubble-${s}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:s,items:o}=this.props,r=Ze()("id",o[zf()(t)]||o[zf()(Fs()(o))]);document.querySelector(`dialog#bubble-${s}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onItemSelected(t){const{editBlock:s,items:o,onItemSelected:r,onStep:a}=this.props,{selectedItemId:i}=this.state;s&&window.matchMedia("(max-width: 768px)").matches||(i===t?this.closeOpenedBubble():(this.openBubble(t),Pe()(a,fr()(c=>c.id===t))(o)),r(t))}handleMarkerClick(t){const{itemId:s,parentId:o}=t.detail,{selectedItemId:r}=this.state;(o!==this.props.parentId||r!==s)&&this.closeOpenedBubble()}openBubble(t){const{blockId:s}=this.props;if(window.matchMedia("(max-width: 767px)").matches){const r=document.querySelector(".page-wrap");r&&r.classList.add(T6)}this.setState({selectedItemId:t}),document.getElementById(`bubble-${s}-${t}`).show()}closeOpenedBubble(){const{blockId:t}=this.props;if(window.matchMedia("(max-width: 767px)").matches){const o=document.querySelector(".page-wrap");o&&o.classList.remove(T6)}document.getElementById(`bubble-${t}-${this.state.selectedItemId}`)?.close(),this.setState({selectedItemId:void 0})}}const zJ=Xe(VJ),UJ=e=>{const{blockId:t,progress:s,isLessonBlocksList:o=!1}=e,r=Hn()(["items",t],s);return(0,n.jsx)(Ie,{className:"block-labeled-graphic",children:(0,n.jsx)(zJ,{...e,editable:!1,isBlock:!0,isLessonBlocksList:o,parentId:t,progress:r})})},de=$("block-survey"),ap={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"}]},L6=ap[5].map(e=>e.defaultLabel),gu=e=>{const t=E6(e.labels?.length);return ap[t]??ap[vu]},k6=(e,t)=>{const s=gu(e).findIndex(o=>o.value===t);return s===-1?void 0:s+1},_J=(e,t)=>gu(e)[t-1]?.value,GJ=2,WJ=10,N6=5,KJ=7,vu=3,QJ=5,E6=e=>e===2||e===3||e===4||e===5?e:vu,xc=null,Zpe=e=>(xc[e]??xc[vu]).map(t=>L6[t]),Xpe=(e,t)=>{const s=E6(e?.length),o=xc[s]??xc[vu],r=xc[t],a=[...L6];return e?.forEach((i,c)=>{const l=o[c];l!==void 0&&(a[l]=i)}),r.map(i=>a[i])},Ka=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",YJ=(e,t,s)=>{const o=s?.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=_J(a,Number(i));c!=null&&(r[a.id]=c)}else r[a.id]=String(i);return r},{})},ZJ=(e,t)=>t?.items?.[e]?.isSubmitted??!1,I6=(e,t)=>(0,n.jsx)(We,{className:"block-survey__question-title",id:t,value:e.question}),XJ=e=>(0,n.jsx)(We,{value:e.startLabel}),qJ=e=>(0,n.jsx)(We,{value:e.endLabel}),JJ=(e,t)=>(0,n.jsx)(We,{className:"block-survey__rating-label",value:e.labels?.[t]});function eee({animateBlockEntrance:e,blockId:t,initiallyVisible:s,isLearner:o,items:r=[],labels:a,onSurveySubmitted:i=Jt,onSurveyPartialResponse:c=Jt,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=qJ,renderLinearScaleStartLabel:v=XJ,renderQuestionTitle:C=I6,renderRatingLabel:g=JJ,settings:x={},title:y}){const T=jt(),[S,b]=(0,u.useState)(()=>YJ(t,r,m)),[L,N]=(0,u.useState)(()=>ZJ(t,m)),[k,E]=(0,u.useState)(!1),[j,A]=(0,u.useState)(!1),[I,w]=(0,u.useState)(new Set),[O,R]=(0,u.useState)(0),P=(0,u.useRef)(null),M=(0,u.useRef)(null),H=(0,u.useRef)(!1),F=(0,u.useCallback)(W=>{M.current=W},[]),{announcePolite:B}=xn(),V=(0,Me.A)(L),G=x.cardMode==="TRANSPARENT",_=`validation-error-${t}`,Z=x.surveyWidth??76,oe=Bd(Z),Q=(0,u.useCallback)((W,ue)=>{b(he=>({...he,[W]:ue}));const fe=r.find(he=>he.id===W),pe=fe?.questionType==="RATING"?k6(fe,ue):void 0;c({itemId:W,response:pe}),I.has(W)&&(w(xe=>{const ge=new Set(xe);return ge.delete(W),ge}),r.find(xe=>xe.id===W)&&r.filter(ge=>ge.isRequired&&ge.id!==W&&Ka(S[ge.id])).length===0&&A(!1))},[I,r,c,S]),z=(0,u.useCallback)((W,ue)=>{b(fe=>({...fe,[W]:ue})),c({itemId:W,response:ue}),I.has(W)&&(w(pe=>{const he=new Set(pe);return he.delete(W),he}),r.filter(pe=>pe.isRequired&&pe.id!==W&&Ka(S[pe.id])).length===0&&A(!1))},[I,r,c,S]),D=(0,u.useCallback)((W,ue)=>{b(fe=>{const pe=fe[W],he=Array.isArray(pe)?pe:[],xe=he.includes(ue)?he.filter(ge=>ge!==ue):[...he,ue];return{...fe,[W]:xe}}),I.has(W)&&(w(pe=>{const he=new Set(pe);return he.delete(W),he}),r.filter(pe=>pe.isRequired&&pe.id!==W&&Ka(S[pe.id])).length===0&&A(!1))},[I,r,S]),U=(0,u.useCallback)((W,ue)=>{b(fe=>({...fe,[W]:ue})),c({itemId:W,response:Number(ue)}),I.has(W)&&(w(pe=>{const he=new Set(pe);return he.delete(W),he}),r.find(pe=>pe.id===W)&&r.filter(he=>he.isRequired&&he.id!==W&&Ka(S[he.id])).length===0&&A(!1))},[I,r,c,S]),K=(0,u.useCallback)((W,ue,fe)=>{if(fe&&ue.length>fe)return;const pe=S[W]||"",he=fe&&ue.length===fe&&pe.length<fe;b(xe=>({...xe,[W]:ue})),c({itemId:W,response:ue}),he&&B(`Character limit reached. ${fe} characters maximum.`),I.has(W)&&ue.trim()!==""&&(w(ge=>{const Ye=new Set(ge);return Ye.delete(W),Ye}),r.filter(ge=>ge.isRequired&&ge.id!==W&&Ka(S[ge.id])).length===0&&A(!1))},[B,r,c,S,I]),Y=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}E(!0);try{const W=r.flatMap(ue=>{const fe=S[ue.id],pe=Array.isArray(fe)?"":fe||"",he=T(ue.question)??"",xe={id:String(t),lessonId:String(l),itemId:ue.id,questionTitle:Ts(String(he)),surveyTitle:Ts(String(T(y)??"")),isUnfinished:!1};if(ue.questionType==="RATING"){const ge=k6(ue,pe);if(ge===void 0)return[];const Ye=gu(ue),Vt=Object.fromEntries(Ye.map((zt,dt)=>[dt+1,T(ue.labels?.[dt])??zt.defaultLabel]));return[{...xe,ratingOptions:Vt,type:ue.questionType,response:ge}]}if(ue.questionType==="LINEAR_SCALE")return[{...xe,type:"LINEAR_SCALE",response:pe===""?void 0:Number(pe)}];if(ue.questionType==="MULTIPLE_CHOICE"||ue.questionType==="MULTIPLE_RESPONSE"){const ge=ue.choices??[],Vt=(Array.isArray(fe)?fe:fe?[fe]:[]).flatMap(zt=>{const dt=ge.find(Qt=>Qt.id===zt);return dt?[{id:dt.id,title:Ts(String(T(dt.title)??""))}]:[]});return[{...xe,type:ue.questionType,response:Vt}]}return[{...xe,type:ue.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:pe}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.reportUngradedAnswers(W),r.forEach(ue=>d?.({id:ue.id})),h?.(S),N(!0),i()}catch(W){console.error("Failed to submit survey:",W)}finally{E(!1)}},[t,l,r,S,d,h,y,T,i]),q=(0,u.useCallback)(W=>{if(W.preventDefault(),k)return;const fe=r.filter(pe=>pe.isRequired).filter(pe=>Ka(S[pe.id]));if(fe.length>0){A(!0),w(new Set(fe.map(pe=>pe.id))),H.current=!0,R(pe=>pe+1);return}Y()},[k,Y,r,S]);(0,u.useEffect)(()=>{H.current&&M.current&&(M.current.focus(),H.current=!1)},[O]),(0,u.useEffect)(()=>{!V&&L&&P.current&&P.current.focus()},[L,V]);const ee=(0,u.useRef)(null),J=(0,u.useRef)(new Map),ne=(0,u.useCallback)((W,ue)=>{const fe=J.current;ue?fe.set(String(W),ue):fe.delete(String(W))},[]),te=C!==I6;(0,u.useEffect)(()=>{if(!te)return;const W=ee.current;if(!W)return;const ue=`.${String(de("question-text"))}`,fe=pe=>{if(pe.button!==0)return;const he=pe.target;if(!(he instanceof HTMLElement))return;const xe=he.closest(ue);if(!(xe instanceof HTMLElement)||he.closest('[contenteditable="true"]'))return;const ge=xe.dataset.surveyItemId,Ye=ge==null?void 0:J.current.get(ge);Ye&&(pe.preventDefault(),Ye.setFocus())};return W.addEventListener("mousedown",fe),()=>W.removeEventListener("mousedown",fe)},[te]);const Te=(W,ue)=>{const fe=S[W.id]||"",pe=`survey-q-${W.id}`,he=`${pe}-char-count`,xe=`${pe}-error`,ge=I.has(W.id),Ye=ge&&ue===r.findIndex(Ke=>I.has(Ke.id));if(W.questionType==="LINEAR_SCALE"){const Ke=Math.min(WJ,Math.max(GJ,W.scaleMax??QJ)),Yt=Array.from({length:Ke},(Le,$e)=>$e+1),Ut=de("linear-scale-options",{wide:Ke<=N6,medium:Ke>N6&&Ke<=KJ}),us=de("linear-scale",{error:ge});return(0,n.jsxs)("fieldset",{"aria-describedby":ge?xe:void 0,className:de("question",{error:ge}),ref:Ye?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:de("question-text"),"data-survey-item-id":String(W.id),children:[C(W,pe,ne),W.isRequired&&(0,n.jsxs)("span",{className:de("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:de("interactive"),children:(0,n.jsxs)("div",{className:us,children:[(0,n.jsx)("div",{className:de("linear-scale-label"),children:v(W)}),(0,n.jsx)("div",{className:Ut,children:Yt.map(Le=>{const $e=fe===String(Le);return(0,n.jsxs)("label",{className:de("linear-scale-option"),children:[(0,n.jsx)("span",{className:de("linear-scale-number"),children:Le}),(0,n.jsx)("div",{className:de("linear-scale-indicator"),children:(0,n.jsx)(ie,{className:de("linear-scale-dot",{active:$e}),"data-testid":$e?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,n.jsx)("input",{checked:$e,className:de("linear-scale-input"),name:`survey-${W.id}`,onChange:()=>U(W.id,String(Le)),type:"radio",value:String(Le)})]},Le)})}),(0,n.jsx)("div",{className:de("linear-scale-label"),children:f(W)})]})}),ge&&(0,n.jsxs)("div",{className:de("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},W.id)}if(W.questionType==="RATING"){const Ke=gu(W).map((Le,$e)=>({value:Le.value,label:W.labels?.[$e],icon:Le.icon})),Yt=de("question",{error:ge}),Ut=de("rating-options",{error:ge}),us=ge?xe:void 0;return(0,n.jsxs)("fieldset",{"aria-describedby":us,className:Yt,ref:Ye?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:de("question-text"),"data-survey-item-id":String(W.id),children:[C(W,pe,ne),W.isRequired&&(0,n.jsxs)("span",{className:de("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:de("interactive"),children:(0,n.jsx)("div",{className:Ut,children:Ke.map((Le,$e)=>{const Ys=fe===Le.value,co=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("input",{checked:Ys,className:de("rating-input"),name:`survey-${W.id}`,onChange:()=>Q(W.id,Le.value),type:"radio",value:Le.value}),(0,n.jsx)(ie,{"aria-hidden":"true",className:de("rating-icon"),name:Le.icon}),g(W,$e)]}),Br=de("rating-option",{selected:Ys,error:ge,"two-options":Ke.length===2,"three-options":Ke.length===3,"four-options":Ke.length===4,"five-options":Ke.length===5});return G?(0,n.jsx)(Ht,{cardMode:"WHITE",className:Br,tag:"label",children:co},Le.value):(0,n.jsx)("label",{className:Br,children:co},Le.value)})})}),ge&&(0,n.jsxs)("div",{className:de("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyRatingRequired]})]},W.id)}if(W.questionType==="MULTIPLE_CHOICE"){const Ke=W.choices??[],Yt=de("choices",{error:ge});return(0,n.jsxs)("fieldset",{"aria-describedby":ge?xe:void 0,className:de("question",{error:ge}),ref:Ye?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:de("question-text"),"data-survey-item-id":String(W.id),children:[C(W,pe,ne),W.isRequired&&(0,n.jsxs)("span",{className:de("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:de("interactive"),children:(0,n.jsx)("ul",{className:Yt,children:Ke.map(Ut=>{const us=fe===Ut.id;return(0,n.jsx)("li",{className:de("choice"),children:(0,n.jsxs)("label",{className:de("choice-option",{selected:us}),children:[(0,n.jsx)("input",{checked:us,className:de("choice-input"),name:`survey-${W.id}`,onChange:()=>z(W.id,Ut.id),type:"radio",value:Ut.id}),(0,n.jsx)("span",{"aria-hidden":"true",className:de("choice-indicator"),children:(0,n.jsx)(ie,{className:de("choice-dot",{active:us}),name:"circle-solid"})}),(0,n.jsx)("span",{className:de("choice-text"),children:(0,n.jsx)(We,{allowTabNavigation:!1,value:Ut.title})})]})},Ut.id)})})}),ge&&(0,n.jsxs)("div",{className:de("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleChoiceRequired]})]},W.id)}if(W.questionType==="MULTIPLE_RESPONSE"){const Ke=W.choices??[],Yt=S[W.id],Ut=Array.isArray(Yt)?Yt:[],us=de("choices",{error:ge});return(0,n.jsxs)("fieldset",{"aria-describedby":ge?xe:void 0,className:de("question",{error:ge}),ref:Ye?F:void 0,tabIndex:-1,children:[(0,n.jsxs)("legend",{className:de("question-text"),"data-survey-item-id":String(W.id),children:[C(W,pe,ne),W.isRequired&&(0,n.jsxs)("span",{className:de("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:de("interactive"),children:(0,n.jsx)("ul",{className:us,children:Ke.map(Le=>{const $e=Ut.includes(Le.id);return(0,n.jsx)("li",{className:de("choice"),children:(0,n.jsxs)("label",{className:de("choice-option",{selected:$e}),children:[(0,n.jsx)("input",{checked:$e,className:de("choice-input"),name:`survey-${W.id}`,onChange:()=>D(W.id,Le.id),type:"checkbox",value:Le.id}),(0,n.jsx)("span",{"aria-hidden":"true",className:de("choice-indicator",{checkbox:!0}),children:(0,n.jsx)(ie,{className:de("choice-check",{active:$e}),name:"check"})}),(0,n.jsx)("span",{className:de("choice-text"),children:(0,n.jsx)(We,{allowTabNavigation:!1,value:Le.title})})]})},Le.id)})})}),ge&&(0,n.jsxs)("div",{className:de("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyMultipleResponseRequired]})]},W.id)}const Vt=Array.isArray(fe)?"":fe,zt=de("question",{error:ge}),dt=de("text-input",{error:ge}),Qt=W.questionType==="SHORT_RESPONSE"||W.questionType==="LONG_RESPONSE"?W.maxLength:void 0,io=[ge?xe:null,Qt?he:null].filter(Boolean).join(" ")||void 0;return(0,n.jsxs)("div",{className:zt,children:[(0,n.jsxs)("div",{className:de("question-text"),"data-survey-item-id":String(W.id),children:[C(W,pe,ne),W.isRequired&&(0,n.jsxs)("span",{className:de("required-indicator"),children:[" ",(0,n.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:a.surveyRequired})]})]}),(0,n.jsx)("div",{className:de("interactive"),children:(0,n.jsxs)("div",{className:de("text-response"),children:[(0,n.jsx)("textarea",{"aria-describedby":io,"aria-invalid":ge?!0:void 0,"aria-labelledby":pe,"aria-required":W.isRequired?!0:void 0,className:dt,maxLength:Qt,onChange:Ke=>K(W.id,Ke.target.value,Qt),ref:Ye?F:void 0,rows:W.questionType==="LONG_RESPONSE"?4:2,value:Vt}),Qt&&(0,n.jsxs)("div",{className:de("character-count"),children:[(0,n.jsxs)("span",{"aria-hidden":"true",children:[Vt.length," / ",Qt]}),(0,n.jsx)("span",{className:"visually-hidden-always",id:he,children:`${a.a11yBlockSurveyCharCount} ${Vt.length} ${a.a11yPreposition} ${Qt}`})]})]})}),ge&&(0,n.jsxs)("div",{className:de("error-message"),id:xe,children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyFreeResponseRequired]})]},W.id)};return(0,n.jsx)(Oh,{...x,children:(0,n.jsx)(Ie,{className:de(),children:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:s,isLearner:o,children:(0,n.jsx)("div",{children:(0,n.jsx)(Ht,{className:de("container",{[`custom-width-${oe}`]:!0}),children:L?(0,n.jsx)("div",{className:de("confirmation"),ref:P,tabIndex:-1,children:(0,n.jsxs)("p",{className:de("confirmation-text"),children:[(0,n.jsx)(ie,{name:"circle-check-regular"})," ",a.surveyConfirmation]})}):(0,n.jsxs)("form",{noValidate:!0,onSubmit:q,children:[y&&(0,n.jsx)(We,{className:de("title"),tagName:"h2",value:y}),(0,n.jsx)("div",{className:de("questions"),ref:ee,children:r.map((W,ue)=>Te(W,ue))}),(0,n.jsxs)("div",{className:de("actions"),children:[(0,n.jsx)("div",{className:de("validation-error",{visible:j}),id:`validation-error-${t}`,role:"alert",children:j&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"alert-circle"})," ",a.surveyValidationError]})}),(0,n.jsx)("div",{className:`${de("submit")} brand--ui`,children:(0,n.jsx)("button",{"aria-describedby":j?_:void 0,className:de("submit-button"),"data-testid":"survey-submit-button",disabled:k,type:"submit",children:k?a.surveySubmitting:a.surveySubmit})})]})]})})})})})})}const ip=$("block-process-card"),j6=({icon:e,isOverlayAudio:t=!1,onClick:s,text:o,variant:r})=>{const a=`${r}-btn`;return(0,n.jsxs)("button",{className:ip(a,{"audio-overlay":t}),onClick:s,type:"button",children:[(0,n.jsx)("span",{className:ip(`${a}-text`),children:o}),(0,n.jsx)(ie,{classNameIcon:ip(`${a}-icon`),name:e})]})},tee=$("block-process-card"),see=({activeIndex:e,enableVideoPlaybackSpeed:t,id:s,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=tee("media",{legacy:!1,"audio-overlay":a,[`audio-overlay-${v}`]:a,"intro-step":r}),g=e===o;return(0,n.jsx)("div",{className:C,children:(0,n.jsx)(Kt,{activeIndex:e,blockId:s,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${s}-${o}`,isOverlayAudio:a,item:i,itemIndex:o,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!g})})};var cp=p(82920);const $o=$("block-process-card"),nee=({text:e})=>{const t=cp.useRef(null),{isInView:s}=oee({ref:t,threshold:.75});return(0,n.jsxs)("div",{className:$o("swipe-badge",{animate:s}),ref:t,children:[(0,n.jsx)("span",{className:$o("swipe-badge-text"),children:e}),(0,n.jsx)(ie,{className:$o("swipe-badge-icon"),name:"chevron-right-solid"})]})};function oee({ref:e,rootMargin:t="0px",threshold:s=.1}){const[o,r]=cp.useState(!1);return cp.useEffect(()=>{if(!e.current||o)return;const a=new IntersectionObserver(([i])=>{i.isIntersecting&&(r(!0),a.disconnect())},{rootMargin:t,threshold:s});return a.observe(e.current),()=>a.disconnect()},[o,e,t,s]),{isInView:o}}const ree=({activeIndex:e,className:t,description:s,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:x,settingZoomOnClick:y,showSwipeBadge:T,style:S,title:b,totalSteps:L,type:N})=>{const k=`h${C}`,E=N==="intro",j=N==="summary",A=N==="step",I=r?i:i+1,w=Ae(x)||l.processStepName,O=Ae(Array.isArray(h)?{}:h),R=pn(O,v,!0,"process"),P=()=>{if(!h)return null;const M={activeIndex:e,blockId:a,enableVideoPlaybackSpeed:o,id:a,index:i,isIntroStep:E,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:y,item:c},H={audio:{media:R.audioOnlyMedia||O,isOverlayAudio:!1},image:{media:R.imageOnlyMedia||O,isOverlayAudio:!1},video:{media:R.videoOnlyMedia||O},embed:{media:R.embedOnlyMedia||O,isOverlayAudio:!1},overlay:{media:O,isOverlayAudio:!1}};return R.renderOrder.map((F,B)=>{if(F==="text")return(0,n.jsx)(ke,{className:$o("description"),value:s},`text-${B}`);const V=H[F];return V?(0,n.jsx)(see,{...M,...V},`${F}-${B}`):null})};return(0,n.jsxs)("div",{className:$o(null,{[N]:!0}).mix(t),style:S,children:[A&&g&&(0,n.jsx)("div",{className:$o("number"),children:`${w} ${I}`}),(0,n.jsx)("div",{className:$o("title"),children:(0,n.jsx)(k,{children:(0,n.jsx)(ke,{value:b})})}),P(),!h&&(0,n.jsx)(ke,{className:$o("description"),value:s}),E&&L>1&&(0,n.jsx)(j6,{icon:"chevron-right-solid",isOverlayAudio:R.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),j&&L>1&&(0,n.jsx)(j6,{icon:"arrow-rotate-left",isOverlayAudio:R.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),T&&A&&(0,n.jsx)(nee,{text:l.processSwipe})]})};var wn=p(82920);const aee=$("block-process-carousel"),w6=e=>e?.type==="intro",lp=e=>e?.type==="summary",dp=e=>e?.type==="step",A6=e=>e?.isHidden,iee=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:s,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:x}})=>{const y=Lt(480),T=rh(),S=jt(),b=wn.useRef(null),[L,N]=wn.useState(0),[k,E]=wn.useState(!1),j=wn.useMemo(()=>h===nr.MOBILE_PORTRAIT||h===nr.MOBILE_LANDSCAPE,[h]),A=wn.useMemo(()=>{const V=a.filter(oe=>!A6(oe)),G=V.find(w6),_=V.find(lp),Z=V.filter(dp);return[G,...Z,_].filter(Boolean)},[a]),I=wn.useMemo(()=>A.findIndex((V,G)=>dp(V)&&(dp(A[G+1])||lp(A[G+1]))),[A]),w=w6(A[0]),O=lp(A[A.length-1]),R=!!h;wn.useEffect(()=>{l&&(a.forEach(V=>A6(V)&&l(V)),A.length>0&&l(A[0]))},[]);const P=wn.useCallback(()=>{b.current?.navigateToSlide?.(0)},[]),M=wn.useCallback(()=>{b.current?.navigateToSlide?.(1)},[]),H=wn.useCallback(V=>{if(N(V),m.current){const Z=m.current.closest("[data-block-id]")??m.current;IH(Z,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}V!==I&&!k&&E(!0),l?.(A[V]);const G=A[V]?.media;S(G)?.audio&&d?.({audioPlayerId:fn({refs:`items:${s}/items:${A[V]?.id}`}),transcriptMedia:G})},[A,I,S,k,s,l,d,m]),F=({index:V,isActive:G,onClick:_,onKeyDown:Z})=>{const oe=w&&V===0,Q=O&&V===A.length-1,z=w?V:V+1;let D,U;oe?(D=i?.a11yBlockProcessSlideControlsIntroduction,U=(0,n.jsx)(ie,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):Q?(D=i?.a11yBlockProcessSlideControlsSummary,U=(0,n.jsx)(ie,{name:"check-regular"})):(D=z.toString(),U=z.toString());const K=`${i?.a11yBlockProcessSlideControlsGoToSlide} ${D}`;return(0,n.jsx)(W3,{"aria-label":K,ariaLabel:K,className:"carousel-controls-item-btn",isActive:G,onClick:_,onKeyDown:Z,children:U},V)},B=e?"fadeIn":"none";return(0,n.jsx)(Be,{animateBlockEntrance:R,animateIn:B,duration:R&&e?1:0,initiallyVisible:o,isLearner:r,children:(0,n.jsx)("div",{className:aee(),children:(0,n.jsx)(Gd,{blockId:s,carouselRef:b,items:A,children:()=>(0,n.jsx)(_d,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:T,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:H,ref:b,renderSlideIndicator:F,shouldMouseEmulateTouch:j,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:A.map((V,G)=>(0,n.jsx)(Ht,{activeIndex:L,description:V.description,enableVideoPlaybackSpeed:t,hasIntro:w,id:s,index:G,isHidden:V.isHidden,item:V,labels:i,lessonId:c,media:V.media,onClickRestart:P,onClickStart:M,settingAudioPosition:f,settingHeadingLevel:v,settingShowStepLabel:g,settingStepLabel:C,settingZoomOnClick:x,showSwipeBadge:y&&!k&&G===I,tag:ree,title:V.title,totalSteps:A.length,type:V.type},V.id))})})})})};var cee=p(82920);const lee=e=>{const{blockId:t}=e,s=cee.useRef(null);return(0,n.jsx)(Ie,{className:"block-process",ref:s,children:(0,n.jsx)(iee,{id:t,processRef:s,...e})})};var dee=p(11842),uee=p.n(dee),hee=p(41569),R6=p.n(hee),mee=p(61417),P6=p.n(mee),fee=p(10285),pee=p.n(fee),gee=p(39602),Vo=p.n(gee);const M6=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),vee=(e,t)=>{const s=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:s?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},Cee=e=>[M6(e)],xee=e=>{const t=!!e.responses[e.response],s=M6(e),o=vee(e,s);return t?[s,o]:[o]},bee=e=>e.hasFeedback?[e,...xee(e)]:e.response!=null?[e,...Cee(e)]:[e],yee=(e,t)=>{if(!t)return;const{scene:s,slide:o}=t,r=e.findIndex(c=>c.id===s),i=(e[r]?.slides||[]).findIndex(c=>c.id===o);return{scene:r,slide:i}},O6=Ll()(yee);var See=p(41182),Tee=p.n(See);const Lee=St()(Ze()("filters"),Dn()(qe()("name","rise_emotion")),oi()(Nt())),kee=St()(Ze()("filters"),fr()(qe()("name","rise_emotion")),Ze()("value")),B6=e=>new URL(e).pathname.slice(1),Nee=e=>St()(es()("key",B6(e.src)),es()("thumbnailKey",B6(e.thumbnail)))(e),Eee=St()(Ze()("poses"),Dn()(Lee),ft()(e=>[kee(e),e]),Tee(),vn()(Nee));var Jpe,An=p(82920);const up=e=>e===-1?null:e,Iee=e=>Zs()(Ct(),Ne(),e),D6=oi()(Ct()),Qa=mf()(D6,an),F6=uee()(of()),H6=Iee(II),hp=e=>ko()(e);class jee extends An.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=An.createRef();responseItemRef=An.createRef();scenarioRef=An.createRef();blockContentRef=An.createRef();endRef=An.createRef();textRef=An.createRef();refs=An.createRef();dynamicRefs=An.createRef();fadeObservers=new Map;shouldFocus=!1;constructor(t){super(t);const s={activeScene:0,activeSlide:0,initiated:!1,prevScene:0,prevSlide:0,resizes:0,slides:{}};this.refs.current={},this.state=t.initialState||s,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 s=this.fadeObservers.get(t);s&&(s.observer.disconnect(),t.removeEventListener("scroll",s.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:s}=this.props,o=Pe()(Ur()("poses"),Ls()({},"character"),hp);Qa(s)&&!o(s)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(Ge,this.handleNavEvent)}handleNavEvent(t){const{path:s}=t.detail,{blockId:o,sceneId:r,slideId:a,responseId:i}=va(s,["block","scene"]),c=s.at(-1)==="feedback";if(o!==this.props.blockId)return;const l=up(this.props.items.findIndex(m=>m.id===r)),d=l!==null?up(this.props.items[l].slides.findIndex(m=>m.id===a)):null,h=d!==null?up(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:s}=this.props,{activeScene:o,activeSlide:r}=this.state,a=bt()([],[o,"slides"],t),i=bt()(null,[r,"goTo"],a),c=bt()(null,[r,"type"],a);if(s&&(i==="end"&&c==="text"||!i&&!c)&&P6()(s,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():Qm(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(Ge,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:s},o)=>{t.disconnect(),o.removeEventListener("scroll",s)}),this.fadeObservers.clear()}getActiveScene(){return this.getScene(this.state.activeScene)}getScene(t){const{items:s}=this.props;return s&&t>=0&&t<s.length?s[t]:null}fetchCharacterPose(t,s){const o=this.getScene(t),r=o?.slides,a=r&&s>=0&&s<r.length;if(!o||!r||!a)return{name:"",pose:null};const{character:i}=o,c=r[s],l=`${t}.${s}`,d=[l,"response"],h=[l,"hasFeedback"],m=bt()(null,d,this.state.slides),f=bt()(!1,h,this.state.slides),v=Ls()("neutral","emotion",c),C=Zs()(Re()(f),bt()(v,["responses",m,"emotion"]),Re()(v)),g=St()(bt()(i?.poses?.neutral,["poses",C(c)]),H6);return{name:i?.name||"",pose:g(i)}}fetchCharacters(){const{getCharacter:t,items:s,onItemUpdate:o}=this.props,r=go()(["id","name","poses","src"]),a=c=>l=>o({itemId:c,payload:{character:l}}),i=({character:c,id:l})=>Qa(c)&&t(c.id).then(d=>es()("poses",Eee(d),d)).then(r).then(a(l));s.map(i)}isCharacterHidden(){const{items:t}=this.props,{activeScene:s,activeSlide:o}=this.state,a=this.getActiveScene()?.slides?.[o],i=o===null,c=t[s];return i?!(c?.slidesHaveCharacterByDefault??!1):a&&!a.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:s,activeSlide:o,prevScene:r,prevSlide:a}=this.state,i=bt()([],[s,"slides"],t),c=bt()(!0,[o,"hasCharacter"],i);return D6(r)&&dl()(c)?this.fetchCharacterPose(r,a):this.fetchCharacterPose(s,o)}onClick(t,s){const{items:o,onStep:r}=this.props,{activeScene:a,activeSlide:i}=this.state,c=this.getActiveScene()?.slides,l=Ls()(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=St()(O6(o),b=>({activeScene:b.scene,activeSlide:b.slide})),x=ms()([[Re()(h&&d),Re()(v)],[Re()(h&&!d),Re()(f)],[tr(),Re()(m)]]),y=Zs()(Re()(l),Re()(v),Re()(C)),T=ms()([[ts()("slide"),Vo()(g,[s])],[ts()("next"),x],[ts()("end"),y]]),S=()=>this.continueRef=setTimeout(this.setNextSlide,300);this.resetRef=setTimeout(this.resetSlide.bind(this,a,i),0),this.setState({prevScene:a,prevSlide:i}),this.setState(T(t),S),t==="end"&&this.resetSlides(),t==="end"&&r&&P6()(r,o)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}onResponseClick(t,s){const{activeScene:o,activeSlide:r,slides:a}=this.state,{getL10nValue:i,lessonId:c,blockId:l}=this.props,d=`${o}.${r}`,h=es()("response",t),m=es()("hasFeedback",!0),f=Bn()({[`${d}`]:h}),v=Bn()({[`${d}`]:m});s.media&&i(s.media)?.audio&&ve.playerId===`audio-${c}-${l}`&&ve.pause();const g=Pe()(v,f);this.setState({slides:f(a)},()=>{this.shouldFocus=!0,this.setState({slides:g(a)})})}onTryAgainClick(){const{activeScene:t,activeSlide:s,slides:o}=this.state,r=`${t}.${s}`,a=R6()({hasFeedback:null,response:null}),i=Bn()({[`${r}`]:a});this.setState({slides:i(o)})}render(){const{blockId:t,getL10nValue:s,isPDF:o,items:r,labels:a}=this.props,{activeScene:i,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=Pe()(an,Ls()({},"character"),hp),f=Pe()(Ur()("poses"),Ls()({},"character"),hp),v=Pe()(Xs(),bt()({},["character","poses"])),C=Pe()(Bc(),Xs(),ft()(v)),g=this.isCharacterHidden(),x=X()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":Kn.isMobile,"scenario-block--loading":m(r)&&!f(r),"scenario-block--character-hidden":g}),y=`scenario-live-${t}`,T={"aria-label":a?.a11yGroupScenario,"aria-describedby":y,className:x,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},S=it(s(r?.[0].background?.media)?.image),b=ms()([[Ct(),this.renderEnd],[qe()("type","dialogue"),this.renderDialogues],[qe()("type","text"),this.renderText],[tr(),Re()(null)]]),L=X()("scenario-block__character",{"scenario-block__character--hidden":g}),N=`${i}.${c}`,k=this.state.slides[N],E=k?.hasFeedback?h?.responses?.[k?.response]?.alt:h?.alt,j=s(E);return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{...T,"data-l10n-id":Et(E),children:[(0,n.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:y,children:j}),(0,n.jsx)("div",{className:"scenario-block__spinner"}),(0,n.jsx)("div",{className:"scenario-block__background-wrapper",children:Qa(r)&&r.map(this.renderBackground)}),S&&(0,n.jsx)(Cs,{alt:"",onLoad:this.onInit,src:S}),(0,n.jsxs)("div",{className:"scenario-block__inner",children:[(0,n.jsx)("div",{className:L,children:f(r)&&C(r).map(this.renderPose)}),(0,n.jsx)(Qo,{children:Qa(r)&&b(h)})]})]}),o&&h&&this.renderDetails(h)]})}renderBackground(t,s){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===s,"scenario-block__background--blur":a??!0}),l=it(i);return l?(0,n.jsx)(Cs,{alt:"",className:c,src:l},r):(0,n.jsx)(n.Fragment,{})}renderButton(t){const{labels:s}=this.props,{scenarioContinue:o,scenarioTryAgain:r}=s,{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,n.jsxs)("span",{children:[r," ",(0,n.jsx)("i",{className:"icon icon-reload"})]}):(0,n.jsx)("span",{children:o}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?Pe()(this.onFocus,this.onTryAgainClick):Pe()(this.onFocus,Vo()(this.onClick,[a,i]))};return(0,n.jsx)(Qo,{children:(0,n.jsx)(On,{...l,children:(0,n.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:s}=this.props,{activeScene:o,activeSlide:r}=this.state,{responses:a,type:i}=t,c=(m,f)=>(0,n.jsxs)("span",{children:[m," ",(0,n.jsx)(tD,{})," ",f]},m),l=St()(O6(s),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:v})=>ms()([[ts()("next"),Vo()(c,[m,"Next Slide"])],[ts()("end"),Vo()(c,[m,"End of Scenario"])],[tr(),Vo()(c,[m,l(v||{})])]])(f),h=i==="text"?d("Continue",t):a.map((m,f)=>d(f,m));return(0,n.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,n.jsxs)("h3",{children:["Scene ",o+1," Slide ",r+1]}),h]})}renderDialogue(t,s,o){const{description:r,id:a,hasCharacter:i}=s,c="type"in s?s.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,x=o===l,y=c==="dialogue"&&(g||x),T=this.dynamicRefs.current[`dialogue-${v}`],S=x&&this.dynamicRefs.current[`dialogue-${C}`],b=T&&T.offsetHeight,L=x&&S&&S.offsetHeight,N=h?30:0,k=window.innerWidth<480?20:30,E=k*2+60+L-N,j=k+60-N,A=pee()(b+N-60),I=An.createRef(),{settings:w,getL10nValue:O}=this.props,R=w?.audioPosition,P=O(m.media),M=pn(P,R),H=M.renderOrder.indexOf("audio")<M.renderOrder.indexOf("text"),F=!!P?.audio,B=h&&o===f-1,V=X()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":B,"scenario-block__dialogue--done":o<l-1,"scenario-block__dialogue--audio-top":H&&F}),G=ms()([[Re()(g),Re()(null)],[ts()(l),Re()({top:`${E}px`})],[ts()(l-1),Re()({top:`${j}px`})],[ts()(l-2),Re()({top:`${A}px`})],[tr(),Re()({top:`-${b+30}px`})]]),_={className:V,ref:U=>{this.dynamicRefs.current[`dialogue-${v}`]=U},style:G(o)},Z={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:I,key:o,timeout:{enter:400,exit:400}},oe=X()({"scenario-block__dialogue__bubble":i||c==="response","scenario-block__dialogue__pane":!i}),Q=this.props.getL10nValue(r)||"",z=c!=="response"&&!B&&F&&H&&(0,n.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),D=(0,n.jsxs)("div",{className:oe,"data-scenario-focus":y?"":void 0,tabIndex:y?-1:void 0,children:[z,(0,n.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!B?this.renderDialogueWithAudioPositioning(m,Q,M):(0,n.jsx)(ke,{value:Q}),(0,n.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,n.jsx)(On,{...Z,children:(0,n.jsx)("div",{children:(0,n.jsx)("div",{..._,children:Qa(r)&&D})})})}renderDialogues(t){const{activeScene:s,activeSlide:o,slides:r}=this.state,{id:a,responses:i}=t,c=`${s}.${o}`,l=r[c]||{},h=Pe()(Bc(),bee,Jo()(l))(t),{hasFeedback:m,response:f}=l,{feedback:v}=i[f]||{},C=Ct()(f)&&an(i),g=m?h.length-1:h.length,x=(g===1&&Nt()(i)||g===2&&an(i))&&m,y={count:g,firstKey:bt()(null,[0,"id"],h),hasFeedback:m&&Qa(v),slide:t,totalDialogues:h.length},T={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},S=(0,n.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,n.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,n.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,n.jsx)(Qo,{component:"ol",role:"list",children:i.map((b,L)=>this.renderResponse(b,t,L))})})})});return(0,n.jsx)(On,{...T,children:(0,n.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,n.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,n.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,n.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,n.jsx)(Qo,{children:h.map(this.renderDialogue.bind(this,y))})})}),C&&S,x&&this.renderButton(h[g-1])]})})},a)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:s,scenarioStartOver:o}=t,r=Pe()(this.onFocus,Vo()(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,n.jsx)(On,{...i,children:(0,n.jsx)("div",{className:a,children:(0,n.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,n.jsx)("div",{className:"scenario-block__text__title",children:(0,n.jsx)("h2",{children:s})}),(0,n.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,n.jsx)("span",{children:o}),(0,n.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,s){const{pose:o}=this.getCharacterPose(),{filters:r,id:a}=t,i=H6(t),c=mf()(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":fr()(d,r),"scenario-block__character__inner--left":fr()(l,r)});return(0,n.jsx)("div",{className:h,"data-pose-id":a,children:(0,n.jsx)(Cs,{alt:"",src:i})},`pose-${s}-${a}`)}renderResponse({description:t},s,o){const{isPDF:r}=this.props,a=r?Aee:Pe()(this.onFocus,Vo()(this.onResponseClick,[o,s])),i=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();if(v.clientX>x.right-16){v.preventDefault();return}}a(v)},c=v=>{const g=v.currentTarget.querySelector(".scenario-block__response__inner");if(g){const x=g.getBoundingClientRect();v.clientX>x.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,n.jsx)("button",{className:d,onClick:i,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,n.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,n.jsx)("div",{className:"scenario-block__response__number",children:o+1}),(0,n.jsx)(ke,{value:t}),(0,n.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,n.jsx)(On,{...m,children:(0,n.jsx)("li",{className:h,role:"listitem",children:f})},o)}renderText(t){const{description:s,goTo:o,hasCharacter:r,id:a,nextSlide:i}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(s)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:v}=d,C=!s&&(c||"").length<22,g=h?.audioPosition,x=m(t.media),y=pn(x,g),T=y.renderOrder.indexOf("audio")<y.renderOrder.indexOf("text"),S=!!x?.audio,b=X()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":C,"scenario-block__text--audio-top":T&&S}),L={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},N=h?.headingLevel,k=N?`h${N}`:"h2",E=`scenario-title-${a}`,j=`scenario-description-${a}`,A=`${E} ${j}`,I=X()("scenario-block__text__inner",{"scenario-block__text__inner--end":o==="end"}),w=X()("scenario-block__text__title",{"scenario-block__text__title--end":o==="end"}),O=(0,n.jsx)("div",{className:w,"data-l10n-id":Et(t.title),id:E,children:(0,n.jsx)(k,{children:c})}),R=S&&T&&(0,n.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),P=(0,n.jsx)("div",{className:"scenario-block__text__description",id:j,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,y)}),M=Pe()(this.onFocus,Vo()(this.onClick,[o,i])),H=(0,n.jsx)("button",{"aria-describedby":A,className:"scenario-block__text__continue",onClick:M,type:"button",children:(0,n.jsx)("span",{children:f})}),F=(0,n.jsxs)("button",{"aria-describedby":A,className:"scenario-block__text__end",onClick:M,type:"button",children:[(0,n.jsx)("span",{children:v}),(0,n.jsx)("i",{className:"icon icon-reload"})]});return(0,n.jsx)(On,{...L,children:(0,n.jsx)("div",{className:b,children:(0,n.jsxs)("div",{className:I,"data-scenario-focus":"",tabIndex:-1,children:[c&&O,R,s&&P,o==="end"?F:H]})},a)},a)}renderAudioMedia(t){const{blockId:s,getL10nValue:o,labels:r,lessonId:a,items:i,settings:c}=this.props,l=o(t.media),d=i?.[this.state.activeScene];return l?(0,n.jsx)(Kt,{blockId:s,index:s,item:t,labels:r,lessonId:a,lessonNumber:a,media:l,refs:`items:${s}/items:${d.id}/slides:${t.id}`,shouldPause:t.type!=="dialogue",volumeSliderPosition:c?.audioPosition==="top"?"below":"above"}):null}renderDialogueWithAudioPositioning(t,s,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,n.jsxs)(n.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(ke,{value:s})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,n.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,n.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,s,o){const r=o.renderOrder.indexOf("audio")<o.renderOrder.indexOf("text");return(0,n.jsxs)(n.Fragment,{children:[o.renderOrder.map((a,i)=>{if(a==="text")return(0,n.jsx)("div",{children:(0,n.jsx)(ke,{value:s})},`text-${i}`);if(a==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,n.jsx)("div",{children:c},`audio-${i}`):null}return null}),(0,n.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,s){const{slides:o}=this.state,r=`${t}.${s}`,a={hasFeedback:!1,response:null};this.setState({slides:es()(r,a,o)})}resetSlides(){const{items:t}=this.props,s=r=>(a,i,c)=>{const{type:l,responses:d=[]}=i,h=l==="dialogue"&&d.length===0;return es()(`${r}.${c}`,{hasFeedback:h,response:null},a)},o=(r,a,i)=>St()(Ls()([],"slides"),F6(s(i),{}),R6()(r))(a);this.setState({slides:F6(o,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:s,slides:o}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:a=[],type:i}=r[s]||{},c=`${t}.${s}`,l=es()("hasFeedback",!0),d=Bn()({[c]:l});i==="dialogue"&&Nt()(a)&&(this.shouldFocus=!0,this.setState({slides:d(o)}))}shouldComponentUpdate(t,s){return t.items!==this.props.items||t.settings!==this.props.settings||s.activeScene!==this.state.activeScene||s.activeSlide!==this.state.activeSlide||s.initiated!==this.state.initiated||s.resizes!==this.state.resizes||s.slides!==this.state.slides||t.labels!==this.props.labels}}const wee=e=>{const t=jt();return(0,n.jsx)(jee,{...e,getL10nValue:t})};function Aee(){}var Ree=p(82920);class Pee extends Ree.Component{render(){const{animateBlockEntrance:t,isLearner:s,previewType:o,initiallyVisible:r}=this.props,a=!Ct()(o),l={animateBlockEntrance:a,animateIn:t?"fadeIn":"none",duration:a&&t?1:0,initiallyVisible:r,isLearner:s};return(0,n.jsx)(Ie,{className:"block-scenario",children:(0,n.jsx)(Be,{...l,children:(0,n.jsx)(wee,{...this.props})})})}}var Mee=p(10608),Cu=p.n(Mee);function Oee(e){e&&(e.addEventListener("touchstart",zo,!0),e.addEventListener("touchmove",zo,!0),e.addEventListener("touchcancel",zo,!0),e.addEventListener("touchend",zo,!0))}function Bee(e){e&&(e.removeEventListener("touchstart",zo,!0),e.removeEventListener("touchmove",zo,!0),e.removeEventListener("touchcancel",zo,!0),e.removeEventListener("touchend",zo,!0))}function zo(e){e?.stopPropagation?.()}const Ya=$("playing-card"),$6=({id:e,isDeckTopCard:t,title:s,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),x=It(),y=jt(),T=os(),S=(0,u.useRef)(null),b=(0,u.useRef)(null),L=(0,u.useRef)(void 0),N=(0,u.useRef)(void 0),k=(0,u.useRef)(!1),E=(0,u.useCallback)(()=>{const{innerWidth:F}=window,B=S.current&&S.current.scrollHeight>S.current.clientHeight,V=F<C;B&&F>C&&g(F),v(B||V)},[C]),j=(0,u.useRef)(()=>{a(!0),c(!1)}),A=(0,u.useRef)(()=>{a(!1)});(0,u.useImperativeHandle)(o,()=>({onStartSortAttempt:j.current,onEndSortAttempt:A.current})),(0,u.useEffect)(()=>{const F=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(F)},[]),(0,u.useEffect)(()=>{const F=b.current;if(!F)return;const B=()=>{a(!0),c(!1)},V=({dx:_,dy:Z})=>{d(oe=>({x:oe.x+_,y:oe.y+Z}))},G=()=>{a(!1)};return j.current=B,A.current=G,Oee(F),jn(F).draggable({inertia:!0,autoScroll:!1,modifiers:[jn.modifiers.snap({targets:[(_,Z)=>({x:_,y:Z})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",B).on("dragmove",V).on("dragend",G),E(),L.current=ru()(E,250),window.addEventListener("resize",L.current),()=>{Bee(F),jn(F).off("dragstart",B).off("dragmove",V).off("dragend",G),L.current&&(L.current.cancel(),window.removeEventListener("resize",L.current)),clearTimeout(N.current)}},[E]),(0,u.useEffect)(()=>{E()},[e,E]),(0,u.useEffect)(()=>{const F=k.current;k.current=r,F&&!r&&(c(!0),clearTimeout(N.current),N.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const I=T?.backgroundType===se.ACCENT||T?.backgroundType===se.IMAGE,w=`translate3d(${l.x}px, ${l.y}px, 0)`,O={WebkitTransform:w,transform:w},R=Ya("title",{"is-max-length":f}),P=Ya({draggable:!0,moving:r,fail:i,reset:h}),M=I?Ya("content"):Ya("content").mix("brand--border"),H=y(s)??"";return(0,n.jsxs)("div",{"aria-hidden":!t,className:P,id:e.toString(),onMouseDown:F=>{F.preventDefault()},ref:b,style:O,children:[t&&(0,n.jsx)("div",{className:"visually-hidden-always",children:`${x?.a11ySortingCurrentItem}: ${H}`}),(0,n.jsxs)(Ht,{"aria-hidden":"true",className:M,children:[(0,n.jsx)(ke,{className:R,id:`card-title-${e}`,ref:S,value:s}),(0,n.jsx)("div",{className:Ya("handle")}),(0,n.jsx)("div",{className:Ya("status"),children:(0,n.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},xu=$("restart-button");function Dee({allowTabNavigation:e=!0,onClick:t,onFocus:s=Jt,ref:o,text:r}){const a=xu({}).mix("button");return(0,n.jsx)("button",{"aria-hidden":!e,className:a,"data-testid":"quiz-take-again-button",onClick:t,onFocus:s,ref:o,tabIndex:SZ(e),type:"button",children:(0,n.jsxs)("div",{className:xu("content"),children:[(0,n.jsx)("span",{className:xu("text").mix("brand--ui"),children:r}),(0,n.jsx)("i",{"aria-hidden":"true",className:xu("icon").mix("icon").mix("icon-reload")})]})})}const Fee=Dee,bc=$("deck"),Hee=e=>e?.percentViewed===100,$ee=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,Vee=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),zee=({count:e,items:t,id:s,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=Hee(r),h=$ee(r,e),m=()=>{o?.({id:s})};return(0,n.jsxs)("div",{className:bc({complete:r?.percentViewed===100}),children:[(0,n.jsx)("div",{className:bc("spacer")}),d&&(0,n.jsxs)("div",{className:bc("cardholder"),children:[(0,n.jsxs)("div",{className:bc("title").mix("brand--ui"),children:[h," ",i?.sortingCardsCorrect]}),(0,n.jsx)(Fee,{allowTabNavigation:d,onClick:m,ref:l,text:i?.sortingReplay??""})]}),(0,n.jsx)("div",{className:bc("content"),children:t.map((f,v)=>(0,n.jsx)($6,{id:f.id,isDeckTopCard:c.current[v]===c.current[0],isIncorrect:Vee(f,r),ref:C=>{c.current[v]=C},title:f.title},f.id))})]})},Rr=$("pile"),Uee=({id:e,lessonId:t,deckTopCard:s,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),[x,y]=(0,u.useState)(!0),[T,S]=(0,u.useState)(!1),[b,L]=(0,u.useState)(!1),[N,k]=(0,u.useState)(0),E=(0,u.useRef)(null),j=(0,u.useRef)(null),A=(0,u.useRef)(null),I=(0,u.useRef)(void 0),w=(0,u.useRef)(void 0),O=(0,u.useRef)(void 0),R=(0,u.useRef)(void 0),P=(0,u.useRef)(void 0),M=It(),H=jt(),{announcePolite:F}=xn(),B=(0,u.useEffectEvent)(()=>{if(r||!s)return;const Y=s.id.toString(),q=s.pileId===e;a?.({id:t,itemId:Y,isCorrect:q});const ee=H(s.title)??"",J=H(h)??"";if(q){clearTimeout(w.current),clearTimeout(O.current),clearTimeout(R.current),v(s),g(!0),y(!1),F(`${M?.a11ySortingCorrect}. ${ee}, ${M?.a11ySortingCategory}: ${J}`);const ne=H(o?.title)??"";ne&&(R.current=setTimeout(()=>{F(`${M?.a11ySortingNextItem}. ${ne}`)},500)),w.current=setTimeout(()=>{v(void 0),g(!1)},1500),O.current=setTimeout(()=>{y(!0)},1300)}else clearTimeout(w.current),clearTimeout(O.current),clearTimeout(R.current),v(void 0),g(!1),y(!0),F(M?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){j.current?.focus()}}));const V=(0,u.useCallback)(()=>{const{innerWidth:Y}=window,q=E.current&&E.current.scrollHeight>(E.current.offsetParent?.clientHeight??0),ee=Y<N;q&&Y>N&&k(Y),L(q||ee)},[N]),G=(0,u.useCallback)(()=>{if(r||!s)return;l?.();const Y=s.id.toString(),q=s.pileId===e;a?.({id:t,itemId:Y,isCorrect:q});const ee=H(s.title)??"",J=H(h)??"";if(q){clearTimeout(w.current),clearTimeout(O.current),clearTimeout(R.current),v(s),g(!0),y(!1),F(`${M?.a11ySortingCorrect}. ${ee}, ${M?.a11ySortingCategory}: ${J}`);const ne=H(o?.title)??"";ne&&(R.current=setTimeout(()=>{F(`${M?.a11ySortingNextItem}. ${ne}`)},500)),w.current=setTimeout(()=>{v(void 0),g(!1)},1500),O.current=setTimeout(()=>{y(!0)},1300)}else clearTimeout(w.current),clearTimeout(O.current),clearTimeout(R.current),v(void 0),g(!1),y(!0),F(M?.a11ySortingIncorrect??"")},[r,s,o,e,t,M,h,H,l,a,F]),_=(0,u.useCallback)(Y=>{Gn(Y)?zx(()=>c?.())(Y):Wn(Y)&&zx(()=>i?.())(Y)},[c,i]),Z=(0,u.useCallback)(()=>{r||(G(),clearTimeout(P.current),P.current=setTimeout(()=>d?.(),100))},[G,d,r]),oe=(0,u.useCallback)(()=>{S(!0)},[]),Q=(0,u.useCallback)(()=>{S(!1)},[]);(0,u.useEffect)(()=>{const Y=A.current;if(!Y)return;const q=ne=>{const te=jn.getElementRect(ne.target),Te={x:te.left+te.width/2,y:te.top+te.height/2};ne.draggable.draggable({snap:{targets:[Te]}})},ee=ne=>{ne.draggable.draggable({snap:{targets:[(te,Te)=>({x:te,y:Te})]}})},J=ne=>{ne.draggable.draggable({snap:{targets:[(te,Te)=>({x:te,y:Te})]}}),ne.stopPropagation?.(),ne.preventDefault?.(),B()};return jn(Y).dropzone({overlap:"pointer"}).on("dragenter",q).on("dragleave",ee).on("drop",J),V(),I.current=ru()(V,250),window.addEventListener("resize",I.current),()=>{jn(Y).off("dragenter",q).off("dragleave",ee).off("drop",J),clearTimeout(w.current),clearTimeout(O.current),clearTimeout(R.current),clearTimeout(P.current),I.current&&(I.current.cancel(),window.removeEventListener("resize",I.current))}},[]);const z=X()(Rr(),{"drop-success":C,complete:r}),D=X()(Rr("content"),{"drop-animating":!x&&!T}),U=Rr("title",{"is-max-length":b}),K=H(h)??M?.a11ySortingCategories??"Categories";return(0,n.jsx)("div",{className:z,ref:A,children:(0,n.jsx)("div",{className:Rr("wrapwrap"),children:(0,n.jsxs)(Ht,{className:Rr("wrap"),overrideBackground:!0,children:[(0,n.jsx)("div",{"aria-hidden":"true",className:Rr("message"),children:(0,n.jsx)(ke,{className:U,ref:E,value:h})}),(0,n.jsx)("button",{"aria-disabled":r,"aria-label":K,className:D,disabled:r,onBlur:Q,onClick:Z,onFocus:oe,onKeyDown:_,ref:j,type:"button",children:f&&(0,n.jsx)($6,{id:f.id,title:f.title})}),(0,n.jsx)("div",{className:Rr("background")})]})})})},mp=$("sorting"),_ee=(e,t)=>!t||!t.items?e:e.filter(s=>!t.items?.[s.id]?.isViewed),Gee=({id:e,items:t,piles:s,onCardDrop:o,onReplay:r,progress:a})=>{const[i,c]=(0,u.useState)(()=>Cu()(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),x=(0,u.useRef)(void 0),y=It(),T=jt(),{announcePolite:S}=xn(),b=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),L=(0,u.useEffectEvent)(()=>{const w=a?.correctlyAnswered??0,O=t.length;S(`${w} ${y?.a11ySortingCompleteOf} ${O} ${y?.a11ySortingComplete}`)}),N=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const w=O=>{const{blockId:R,cardId:P}=va(O.detail.path,["block","card"]);e!==R||!P||c(M=>{const H=M.find(B=>B.id===P),F=M.filter(B=>B.id!==P);return H?[H,...F]:M})};return window.addEventListener(Ge,w),()=>{window.removeEventListener(Ge,w)}},[e]),(0,u.useEffect)(()=>{const w=a?.retryAttempts,O=f.current;return w!==O?(f.current=w,c(Cu()(t)),clearTimeout(C.current),C.current=setTimeout(()=>{b()},100)):c(R=>{const P=t.filter(F=>!R.find(B=>B.id===F.id));return[...R.filter(F=>t.find(B=>B.id===F.id)).map(F=>{const B=t.find(V=>V.id===F.id);return B?{...F,...B}:F}),...P]}),()=>{clearTimeout(C.current)}},[t,a?.retryAttempts]),(0,u.useEffect)(()=>{const w=a?.percentViewed,O=v.current;return w===100&&O!==100&&(d(!0),clearTimeout(g.current),g.current=setTimeout(()=>{L()},500),clearTimeout(x.current),x.current=setTimeout(()=>{N()},100)),w!==100&&O===100&&d(!1),v.current=w,()=>{clearTimeout(g.current),clearTimeout(x.current)}},[S,a?.correctlyAnswered,a?.percentViewed,t.length]);const k=_ee(i,a),E=y?.sortingLandmark??"",j=k?.[0],A=j?T(j.title)??"":"",I=l?y?.a11ySortingCategoriesComplete:A?`${y?.a11ySortingCategories}. ${A}`:y?.a11ySortingCategories;return(0,n.jsxs)("div",{"aria-label":E,className:mp(),role:"group",children:[(0,n.jsx)("div",{className:mp("row"),children:(0,n.jsx)(zee,{count:i.length,id:e,items:k,onReplay:r,progress:a,ref:m})}),(0,n.jsx)("ul",{"aria-label":I,className:mp("row"),role:"list",children:s.map((w,O)=>(0,n.jsx)("li",{role:"listitem",children:(0,n.jsx)(Uee,{deckTopCard:k?.[0],id:w.id,isComplete:l,lessonId:e,nextCard:k?.[1],onCardDrop:o,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>TZ({list:h.current,currentIndex:O}),onNavigateToPrevious:()=>LZ({list:h.current,currentIndex:O}),ref:R=>{h.current[O]=R},title:w.title})},w.id))})]})},V6=()=>()=>{},Wee=e=>{const{animateBlockEntrance:t,blockId:s,initiallyVisible:o,items:r,onCardDrop:a=V6,onReplay:i=V6,piles:c,progress:l}=e;return(0,n.jsx)(Ie,{type:"sorting-activity",children:(0,n.jsx)(Be,{animateBlockEntrance:t,initiallyVisible:o,isLearner:!0,children:(0,n.jsx)(Gee,{id:s,items:r,onCardDrop:a(e),onReplay:i(e),piles:c,progress:bt()({},["items",s],l)})})})};class Kee 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,s){return s.prevScope!==t.scope?{hasError:!1,error:void 0,prevScope:t.scope}:s}componentDidCatch(t){Fn.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:s}=this.state,{FallbackComponent:o}=this.props;return t||s?(0,n.jsx)(o,{}):this.props.children}}const z6=Kee,Qee=[{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"}],Yee=(0,u.lazy)(()=>p.e("webpack_container_remote_mondrian_learn-react").then(p.t.bind(p,4246,23))),Zee={subscribe(e,t){const s=`mondrian:${e}`,o=()=>{ve.isPlaying&&ve.playerId!==s&&t()};return ve.addChangeListener(o),()=>{ve.removeChangeListener(o)}},play(e){const t=`mondrian:${e}`;ve.playerId=t,ve.isPlaying=!0}};function Xee(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 qee({blockumentId:e,manifest:t}){let s=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"&&(s=c,o=l)}}}}catch{}return(0,n.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:o,width:s})}function Jee({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:s,isLearner:o=!1,settings:r,onStep:a,onTranscriptClose:i,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=Fe(),f=m.mondrian,v=oh(),C={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:$s},{currentLocale:g}=ot(),x=nn(),y=dz(),T=(0,u.useMemo)(()=>({active:g,source:x}),[g,x]),S=(0,u.useCallback)(j=>h?.audioPlayerIdOpen===fn({refs:`items:${s}/items:${j}`}),[s,h?.audioPlayerIdOpen]),b=(0,u.useCallback)(({refocusTarget:j,itemId:A,transcript:I})=>{S(A)?i?.():c?.({audioPlayerId:fn({refs:`items:${s}/items:${A}`}),focusing:!0,refocusTarget:j,transcriptMedia:{mondrianTranscript:I}})},[s,S,i,c]),L=(0,u.useCallback)(({itemId:j,transcript:A})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:fn({refs:`items:${s}/items:${j}`}),transcriptMedia:{mondrianTranscript:A}})},[s,l,h]),N=(0,u.useCallback)(j=>{l?.({audioPlayerId:fn({refs:`items:${s}/items:${j}`}),focusing:!0})},[s,l]),k=(0,u.useMemo)(()=>({isPanelOpenForItem:S,focusPanel:N,togglePanel:b,updateTranscript:L}),[N,S,b,L]),E=(0,u.useCallback)(j=>{if(a)for(const A of Object.values(j))A.progress>=100&&a({id:A.itemId})},[a]);return(0,n.jsx)(Ie,{children:(0,n.jsx)(z6,{FallbackComponent:ste,children:(0,n.jsx)(Be,{animateBlockEntrance:e,initiallyVisible:t,isLearner:o,children:(0,n.jsx)("div",{style:Xee(r),children:(0,n.jsx)(u.Suspense,{fallback:(0,n.jsx)(qee,{blockumentId:s,manifest:f}),children:(0,n.jsx)(Yee,{blockumentId:s,hoveredItemPath:y.translationHoveredPath,labels:d,languages:Qee,linkRenderConfig:C,locale:T,manifest:f,mediaStoreAdapter:Zee,onMediaProgress:E,runtimeInterface:window.Runtime,searchTerm:v?.term,transcriptPanelAdapter:k})})})})})})}const ete=(0,u.memo)(Jee,tte);function tte(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 ste(){return null}const nte=$("block-ai-scenario"),ote=(0,u.lazy)(()=>p.e("webpack_container_remote_ai_scenario_learner-player-react").then(p.t.bind(p,58812,23)));function rte({scenarioId:e,onExit:t}){return(0,n.jsx)(Ie,{className:nte("wrapper"),children:(0,n.jsx)(z6,{FallbackComponent:ite,children:(0,n.jsx)(u.Suspense,{children:(0,n.jsx)(ote,{onExit:t,scenarioId:e})})})})}const ate=(0,u.memo)(rte);function ite(){return null}var U6=p(67750),tt=p(82920);const Rt=$("block-code"),cte=`${Ee("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function _6(e,t){const s=G6(U6.parse(e.data));for(const o of s)if(o.type==="notification")t[o.method]?.(o.params);else throw new Error(`Unsupported RPC type "${o.type}"`)}function*G6(e){if(Array.isArray(e))for(const t of e)yield*G6(t);else yield e}function W6(e,t,s){return tt.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",a=>{a.origin===window.origin&&t!=null&&e.current&&a.source===e.current.contentWindow&&_6(a,t)},{signal:r.signal}),()=>r.abort()},[t,e]),tt.useCallback(r=>{e.current?.contentWindow?.postMessage(r,s)},[e,s])}const lte=(e,t,s)=>W6(e,s,window.origin),dte=(e,t,s)=>W6(e,s,"*"),ute=(e,t,s)=>{const[o,r]=tt.useState(()=>new BroadcastChannel(t));return tt.useEffect(()=>()=>o.close(),[o]),tt.useEffect(()=>{o.name!==t&&r(new BroadcastChannel(t))},[o,t]),tt.useEffect(()=>{const i=new AbortController;return o.addEventListener("message",c=>_6(c,s),{signal:i.signal}),()=>i.abort()},[o,s]),tt.useCallback(i=>{o.postMessage(i)},[o])},hte=ti()?Kn.isLocalFilesystem?dte:ute:lte,mte=window.location.origin==="";function fte(e){let t=mte?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function pte(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const gte={0:"small",1:"medium",2:"full"};function vte({editBlock:e,errors:t,isDragPreview:s,isLearn:o,isSidebarPreview:r,items:a,labels:i,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=tt.useRef(null),C=Fe()?.htmlBlocksDisabled,g=s||r||!!h,[x]=a,y=Ae(x.srcdoc),T=Ae(x.media),S=T?.sandbox?.src==null?void 0:`${T.sandbox.src}/index.html`,b=m?.autoResize===!0,L=m?.width??"0",[N,k]=tt.useState("-1px");tt.useEffect(()=>{b||k(pte(m?.height))},[b,m?.height]);const[E,j]=tt.useState(0),[A,I]=tt.useState(!1),[w,O]=tt.useState(!1),[R]=tt.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),P=fte(R),M=tt.useCallback(()=>{d?.({id:x.id})},[x.id,d]),H=tt.useCallback(({message:z})=>{l?.({message:z}),O(!0),console.error("Sandbox Error",z)},[l,O]),F=tt.useCallback(()=>{c?.(),O(!1),j(z=>z+1)},[c]),B=tt.useCallback(()=>{I(E>0)},[E]),V=tt.useCallback(({height:z})=>{b&&k(`${z}px`)},[b]),G=tt.useMemo(()=>({oncomplete:M,onerror:H,onload:B,onready:F,onresize:V}),[M,H,F,B,V]),_=hte(f,R,G),Z=tt.useCallback((z,D)=>{if(f==null&&E===0)throw new Error("Attempted to send message to sandbox before it is ready");const U=U6.format.notification(z,D);_(U)},[E,f,_]),oe=tt.useCallback(()=>{window.location.reload()},[]),Q=tt.useCallback(()=>{e?.()},[e]);return tt.useEffect(()=>{E&&Z("onupdate",{autoResize:b,src:S,srcDoc:y})},[b,E,Z,S,y]),o&&t!=null||w?(0,n.jsx)(Ie,{children:(0,n.jsxs)("div",{className:Rt("error-general",{learn:o}),children:[(0,n.jsx)("div",{className:Rt("error-message"),children:"Something went wrong"}),(0,n.jsx)("div",{className:Rt("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,n.jsx)("button",{className:Rt("error-button"),onClick:oe,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,n.jsx)(Ie,{children:t[404]?(0,n.jsxs)("div",{className:Rt("error-404"),children:[(0,n.jsx)("div",{className:Rt("error-message"),children:"We couldn\u2019t find your file"}),(0,n.jsx)("div",{className:Rt("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,n.jsx)("button",{className:Rt("error-button"),onClick:Q,type:"button",children:"Retry upload"})]}):(0,n.jsxs)("div",{className:Rt("error-general"),children:[(0,n.jsx)("div",{className:Rt("error-message"),children:"Something went wrong"}),(0,n.jsxs)("div",{className:Rt("error-message-subtitle"),children:["Try refreshing the page or entering your code again. If the issue isn't fixed,"," ",(0,n.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,n.jsx)("button",{className:Rt("error-button"),onClick:oe,type:"button",children:"Refresh page"})]})}):C&&!g?(0,n.jsx)(Ie,{children:(0,n.jsx)("div",{className:Rt("restricted"),children:(0,n.jsxs)("div",{className:Rt("restricted-card"),children:[(0,n.jsx)(Cf,{alt:"",className:Rt("restricted-icon"),src:cte}),(0,n.jsx)("div",{className:Rt("restricted-title"),children:"Subscribe to unlock full access"}),(0,n.jsx)("div",{className:Rt("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,n.jsx)(Ie,{children:(0,n.jsx)("iframe",{allow:"fullscreen",className:Rt({"auto-resize":b,loaded:g||A,width:gte[L]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:b?"no":void 0,src:P,style:{"--block-html-height":N},title:i?.a11yBlockCode},R)})}const Uo=$("timeline-card"),Cte=e=>{const{blockId:t,disableZoom:s,enableVideoPlaybackSpeed:o,isOverlayAudio:r,item:a,labels:i,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=a,f=Ae(a.media)??{},v=d==="audio"&&f.audio,C=d==="embed"&&f.embed,g=d==="image"&&f.image,x=d==="video"&&f.video;if(!v&&!C&&!g&&!x&&!(d==="image-with-audio"&&r))return;const T=f.embed?jr(f.embed):void 0,S=!!f.image,b=!!f.audio,L=S?f.image.align:"center",N=Uo("media",{audio:b&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${L}`]:r&&!!L,"audio-on-bottom":b&&!r&&h==="bottom",linkEmbed:T==="link",videoEmbed:T==="video",visual:!r&&S||!Ct()(f.video)}),k=m||{};return(0,n.jsx)("div",{className:N,children:(0,n.jsx)(Kt,{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:s,...k}})})},xte=e=>{const{headingLevel:t,innerRef:s,item:o,isActive:r,loadMedia:a,audioPosition:i,onFocus:c}=e,{id:l}=o,d=Uo({active:r}),h=!!o.date,m=!!o.title,f=t||2,v=`h${f}`,C=`h${f+1}`,g=Ae(o.media)??{},x=pn(g,i,!0,"timeline"),y=()=>{if(!g||!a)return null;const T={audio:{item:{...o,media:x.audioOnlyMedia||g},mediaType:"audio"},image:{item:{...o,media:x.imageOnlyMedia||g},mediaType:"image"},video:{item:{...o,media:x.videoOnlyMedia||g},mediaType:"video"},embed:{item:{...o,media:x.embedOnlyMedia||g},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,n.jsx)(n.Fragment,{children:x.renderOrder.map((S,b)=>{if(S==="text")return(0,n.jsx)(ke,{className:Uo("description"),value:o.description},`text-${b}`);const L=T[S];return L?(0,u.createElement)(Cte,{...e,...L,key:`${S}-${b}`}):null})})};return(0,n.jsx)("div",{className:d,"data-id":l,ref:s,children:(0,n.jsx)(Ht,{className:Uo("body"),onFocus:c,children:(0,n.jsx)("div",{className:Uo("main-wrap"),children:(0,n.jsxs)("div",{className:Uo("main"),children:[h&&(0,n.jsx)("div",{className:Uo("date"),children:(0,n.jsx)(v,{children:(0,n.jsx)(ps,{value:o.date})})}),m&&(0,n.jsx)("div",{className:Uo("title"),children:(0,n.jsx)(C,{children:(0,n.jsx)(ps,{value:o.title})})}),y()]})})})})},yc=$("timeline"),bte=e=>{const{audioPosition:t,disableZoom:s,enableVideoPlaybackSpeed:o,headingLevel:r,id:a,initiallyVisible:i,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,v=(0,n.jsx)(xte,{audioPosition:t,blockId:a,disableZoom:s,enableVideoPlaybackSpeed:o,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:a,loadMedia:!0,onFocus:f});return c?l?(0,n.jsx)(Be,{animateBlockEntrance:!0,className:yc("animate").toString(),initiallyVisible:i,isLearner:!0,children:v}):v:null},yte=e=>{const{id:t,items:s,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}=va(d.detail.path,["block","card"]);if(h!==t)return;const f=i.current.querySelector(`[data-id="${m}"]`);f&&!Mm(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(Ge,l),()=>{window.removeEventListener(Ge,l)}}),(0,n.jsx)("div",{"aria-label":o?.a11yBlockTimeline,className:"page__content-container",ref:i,role:"group",children:(0,n.jsx)("div",{className:yc("wrapper"),children:(0,n.jsx)("div",{className:yc(),children:(0,n.jsx)("ul",{className:yc("container"),role:"list",children:s.map((l,d)=>(0,n.jsx)("li",{className:yc("card-wrapper"),role:"listitem",children:bte({index:d,item:l,onFocus:c,...e,disableZoom:!a.zoomOnClick,headingLevel:a.headingLevel,audioPosition:a.audioPosition})},d))})})})})},Ste=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:s,initiallyVisible:o,isLearner:r,items:a,labels:i,lessonId:c,settings:l})=>(0,n.jsx)(Be,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:o,isLearner:r,children:(0,n.jsx)(Ie,{type:"timeline",children:(0,n.jsx)(yte,{enableVideoPlaybackSpeed:s,id:t,initiallyVisible:o,isBlock:!0,isLearner:r,items:a,labels:i,lessonId:c,settings:l})})}),_o=$("block-sequence"),Tte=({label:e})=>(0,n.jsx)("span",{className:_o("indicator-label"),children:Ae(e)??""}),Lte=e=>(0,n.jsx)(Tte,{label:e.label}),kte=e=>(0,n.jsx)(ke,{className:_o("description").toString(),value:e.description}),Nte=e=>{const{color:t,defaultBackgroundColor:s,items:o,renderDescription:r=kte,renderLabel:a=Lte,variant:i}=e,c=t?{"--block-sequence-color":t,"--block-sequence-on-color":Ns(t)===be.LIGHT?"#fff":"#000"}:void 0;return(0,n.jsx)(Ie,{className:_o({[i]:!0}).toString(),defaultBackgroundColor:s,style:c,children:(0,n.jsx)("div",{className:_o("container"),children:(0,n.jsx)("ol",{className:_o("list"),"data-step-count":o.length,children:o.map((l,d)=>(0,n.jsxs)("li",{className:_o("step"),"data-step-id":l.id,children:[(0,n.jsx)("div",{className:_o("indicator"),children:a(l,d)}),(0,n.jsx)("div",{className:_o("text"),children:r(l,d)})]},l.id))})})})},Rn=$("block-team"),Ete=e=>(0,n.jsx)(ke,{className:Rn("name").toString(),value:e.name}),Ite=e=>(0,n.jsx)(ke,{className:Rn("role").toString(),value:e.description}),jte=({item:e,index:t,renderName:s,renderDescription:o})=>{const r=e.avatar?.image,a=mh(r);return(0,n.jsxs)("li",{className:Rn("card"),children:[(0,n.jsx)("div",{className:Rn("avatar-wrap"),children:a?(0,n.jsx)(Cs,{alt:yo(r?.alt),className:Rn("avatar").toString(),src:a}):(0,n.jsx)("div",{className:Rn("avatar",{placeholder:!0}).toString()})}),(0,n.jsxs)("div",{className:Rn("body"),children:[s(e,t),o(e,t)]})]})},wte=e=>{const{defaultBackgroundColor:t,items:s,renderName:o=Ete,renderDescription:r=Ite}=e;return(0,n.jsx)(Ie,{className:Rn().toString(),defaultBackgroundColor:t,children:(0,n.jsx)("div",{className:Rn("container"),children:(0,n.jsx)("ul",{className:Rn("list"),"data-count":s.length,children:s.map((a,i)=>(0,n.jsx)(jte,{index:i,item:a,renderDescription:r,renderName:o},a.id))})})})},Ate=e=>(0,n.jsx)("div",{className:"unsupported-block",...e,children:(0,n.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,n.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})});var Ss=p(30467),Rte=p(28565),K6=p(70721),Pte=p(90090),Q6=p.n(Pte);const m1e=(e,t)=>s=>{const o=s.findIndex(a=>a.id==t);if(o===-1)return s;const r=s.slice();return r[o]=e(s[o]),r},f1e=e=>t=>t.filter(s=>s.id!=e),p1e=(e,t)=>s=>{const o=s.slice(),[r]=o.splice(e,1);return o.splice(t,0,r),o};function Mte(e,t){const s=[];for(const o of t)if(s.push(o),e(o))break;return s}const Ote=e=>e.some(t=>t<0),Y6=e=>Array.from(Array(e)),Z6=(e,t)=>Y6(t).map(()=>e),Bte=(e,t,s,o)=>Y6(s).map((r,a)=>a===o?t:e),g1e=(e,t,s)=>s.some(o=>o[e]==t);function v1e(e,t,s){if(t>=s.length)return s.slice(0);const o=Math.floor(t/2),r=Math.ceil(t/2),a=e-o,i=e+r;return i>s.length?s.slice(s.length-t):a>=0?s.slice(a,i):s.slice(0,t)}const bu=(e,t)=>{const s=Math.min(e.length,t.length),o=new Array(s);for(let r=0;r<s;r++)o[r]=[e[r],t[r]];return o};var X6=p(94382);const Dte=matchMedia("(forced-colors: active)");function Sc(){return Dte.matches}const Fte=({activeIndex:e,values:t,opts:s})=>{const{background:o,variant:r}=wt(),{chartColor:a,lineCurve:i}=os(),c=Is(),l=xi(),d=s?.defaultFontColor,h=yn(),m=h===se.IMAGE,v=Ae(o?.media)?.image?.overlayColor??nt.DARK,C=Sc();let g=a??l,x=c||"#fff";!a&&h===se.ACCENT||a===x?g=d:m&&(g=v===nt.DARK?"#fff":"#000",x=v===nt.DARK?"#000":"#fff"),C&&(g="Highlight",x="Canvas");let y=g,T=Array(t.length).fill(g);if(e!=null&&!C){const S=m&&v===nt.LIGHT?.2:.7,b=(0,X6.A)(g,x,S);y=b,T=Bte(b,g,t.length,e)}return r==="bar"?{backgroundColor:T,data:t,hoverBackgroundColor:T}:{borderColor:y,cubicInterpolationMode:i==="linear"?"default":"monotone",data:t,lineTension:i==="linear"?0:void 0,pointBackgroundColor:T,pointBorderColor:T,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:g,pointHoverBorderColor:g,pointHoverBorderWidth:0,pointRadius:4}};function Hte({activeIndex:e,children:t,opts:s,values:o}){const r=Fte({activeIndex:e,opts:s,values:o});return t(r)}class $te extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:s,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,n.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,n.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${s}.`}),(0,n.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,n.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,n.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:a})]})]})}}const Vte=$te,zte=({activeIndex:e,labels:t,letters:s,onEvent:o,values:r})=>{const a=bu(s,bu(t,r));return a.length===0?null:(0,n.jsx)("dl",{className:"block-chart__cartesianLegend",children:a.map(([i,[c,l]],d)=>(0,n.jsx)(Vte,{activeIndex:e,identifier:i,index:d,label:c,onEvent:o,value:l},i))})},Ute=(0,u.memo)(zte);function _te(e){const t=this.getLabelForValue(e),s=15,o=t.split(" "),r=[];let a="";return o.forEach(i=>{(a+i).length>s?(r.push(a),a=i):a+=(a.length>0?" ":"")+i}),r.push(a),r}const Gte={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:s}=e[0];return`${t}: ${s}`}},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:_te,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function Wte({values:e,contrastColor:t}){const s=wt(),o=yn(),r=o===se.IMAGE,a=(0,u.useMemo)(()=>Ote(e),[e]);let i,c;const d=Ae(s?.background?.media)?.image?.overlayColor??nt.DARK,h=r&&d===nt.LIGHT;switch(o){case se.LIGHT:case se.GRAY:case se.TINT:[i,c]=["#e1e1e1","#c9c9c9"];break;case se.DARK:case se.BLACK:case se.IMAGE:[i,c]=["#ffffff80","#ffffffe9"];break;case se.ACCENT:case se.COLOR:{[i,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([i,c]=["#00000080","#0000001a"]),a||(c=i),[i,c]}const Kte=({onEvent:e,reduceMotion:t,shouldAnimate:s,values:o})=>{const r=Is(),{customBackgroundColorContrast:a}=os(),i=Fe(),c=xi(),l=i?.theme?.accentContrast,d=yn(),h=d===se.IMAGE,m=wt(),f=Sc(),v=Ns(r),C=!a&&m?.family==="chart",g=a??be.DARK,x=C?v:g,T=Ae(m?.background?.media)?.image?.overlayColor??nt.DARK,S=h&&T===nt.LIGHT,b=d===se.ACCENT||d===se.COLOR,L=d===se.ACCENT?c:r,N=d===se.ACCENT?l:x,k=Bt({backgroundColor:L,contrast:N}),[E,j]=Wte({values:o,contrastColor:k}),A=(0,u.useCallback)(w=>f&&h?S?"#000000":"#FFFFFF":w.tick.value===0?j:E,[E,f,j,h,S]);return(0,u.useMemo)(()=>{let w="#000";if(f)h?w=S?"#000000":"#FFFFFF":w="FieldText";else{switch(d){case se.DARK:case se.BLACK:case se.IMAGE:w="#fff";break}b&&(w=k),h&&S&&(w="#000")}const O=s&&!t?1e3:0;let R,P;f?h?(R=w,P=S?"#FFFFFF":"#000000"):(R="Highlight",P="HighlightText"):(R=w,P=w==="#000"||w==="#000000"||w===be.DARK?"#FFFFFF":"#000000");const M=j0()(Gte);return M.animation.duration=O,M.defaultFontColor=w,M.onClick=e,M.onHover=e,M.plugins.tooltip.animation=!t,M.plugins.tooltip.backgroundColor=R,M.plugins.tooltip.titleColor=P,f&&!h?(M.scales.x.grid.color="FieldText",M.scales.y.grid.color="FieldText"):(M.scales.x.grid.color=E,M.scales.y.grid.color=A),M.scales.x.ticks.color=w,M.scales.y.ticks.color=w,f&&(h?M.plugins.legend.labels.color=S?"#000000":"#FFFFFF":M.plugins.legend.labels.color="FieldText"),M},[d,k,E,b,f,h,S,e,t,A,s])};function Qte(e){const{children:t,onEvent:s,reduceMotion:o,shouldAnimate:r,values:a}=e,i=Kte({onEvent:s,reduceMotion:o,shouldAnimate:r,values:a});return t(i)}var Yte=p(29783),fp=p.n(Yte);const Zte=/<mark>|<\/mark>/gm,Xte=e=>t=>{const s=e(t.type).replace(Zte,"")??"";return{label:fp()(s,{length:30}),l10nId:Et(t?.type)}},qte=e=>parseFloat(e.value??"0"),q6=(e,t)=>({labels:e.map(Xte(t)),values:e.map(qte)});function Jte(e,t,s){const o=[];let r=0;return s.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(s.slice(r)),o}const ese=(e,t)=>(0,n.jsx)("mark",{children:e},t),tse=(e,t)=>Jte(new RegExp(Dq()(t),"igm"),ese,e),J6=(e,t,s)=>{const o=fp()(t,{length:e});return s?tse(o,s):o};function sse(){const[e,t]=u.useState(null),s=u.useRef(null),{announcePolite:o}=xn(),{labels:r,course:a}=ea()??{},{a11yBlockChartPreposition:i}=r??{},c=_r(a),l=u.useCallback(g=>{t(g)},[]),d=u.useCallback(()=>{const g=s.current;if(!g)return;const x=c?g.canvas?.parentElement:null;x&&g.width?g.resize(x.clientWidth,x.clientWidth*(g.height/g.width)):g.resize()},[c]),h=u.useCallback(()=>{s.current?.update()},[]),m=u.useCallback(()=>{d(),h()},[d,h]),f=u.useCallback(()=>{const g=s.current;if(g==null)return;const x=g.getDatasetMeta(0),y=x.data;if(!y?.length)return;const T=0,b=[{datasetIndex:0,element:x.data[T],index:T}];g.setActiveElements(b),g.tooltip?.setActiveElements(b,{x:0,y:0}),g.update(),l(T);const L=g.data.labels[T],N=g.data.datasets[0].data[T];setTimeout(()=>{o(`${T+1} ${i??""} ${y.length} - ${L}: ${N}`)},0)},[i,o,s,l]),v=u.useCallback(()=>{const g=s.current;if(g==null)return;const x=[];g.setActiveElements(x),g.tooltip?.setActiveElements(x,{x:0,y:0}),g.update(),l(null),o(null)},[o,s,l]),C=u.useCallback(g=>{const x=s.current;if(x==null)return;const y=x.getDatasetMeta(0),T=y.data;if(!T?.length)return;let S=!1,b=e;switch(g.key){case"ArrowLeft":S=!0,b=(e-1+T.length)%T.length;break;case"ArrowRight":S=!0,b=(e+1+T.length)%T.length;break;case"Home":S=!0,b=0;break;case"End":S=!0,b=T.length-1;break}if(S&&(g.stopPropagation(),g.preventDefault()),b!==e){const N=[{datasetIndex:0,element:y.data[b],index:b}];x.setActiveElements(N),x.tooltip?.setActiveElements(N,{x:0,y:0}),x.update(),l(b);const k=x.data.labels?.[b],E=x.data.datasets[0].data[b];o(`${b+1} ${i??""} ${T.length} - ${k}: ${E}`)}},[i,e,o,s,l]);return u.useEffect(()=>{d(),h()},[d,h]),u.useEffect(()=>{s.current&&s.current.update()},[e]),{activeIndex:e,chartRef:s,onBlur:v,onFocus:f,onKeyDown:C,onEvent:l,onResize:m}}function e5(e){const t=s=>{const{activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d}=sse();return(0,n.jsx)(e,{...s,activeIndex:o,chartRef:r,onBlur:a,onEvent:i,onFocus:c,onKeyDown:l,onResize:d})};return t.displayName=`withChartEvents(${e.displayName||e.name})`,t}const nse="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class ose 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,s)=>{const o=s.length?s[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:s,top:o}=t?.scales?.y??{};Q6()(s)&&Q6()(o)&&this.setState({labelYTop:`${(s+o)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:s,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:x,valuesLabel:y,variant:T},state:{labelYTop:S}}=this,b=J6(80,o(f),g),L=J6(30,o(y),g),N=q6(m,o),k=d?[]:nse.slice(0,m.length),E=d?N.labels:k.map(R=>({label:R})),j=h?N.values:Z6(0,m.length),A=`${r}-type`,I=`${r}-instructions`,w=E.map(R=>R.label),O=E.map(R=>R.l10nId).join(",");return(0,n.jsxs)("div",{className:"block-chart__cartesian",children:[(0,n.jsx)("p",{className:"visually-hidden-always",id:I,children:v?.a11yBlockChartInstructions}),(0,n.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[L&&an(L)&&(0,n.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":Et(y),style:{insetInlineEnd:S},children:[L,(0,n.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisY})]}),b&&an(b)&&(0,n.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":Et(f),children:[b,(0,n.jsx)("span",{className:"visually-hidden-always",children:v?.a11yBlockChartAxisX})]}),(0,n.jsx)(Qte,{onEvent:this.handleEvent,reduceMotion:ws(),shouldAnimate:x,values:j,children:R=>(0,n.jsx)(Hte,{activeIndex:t,opts:R,values:j,children:P=>(0,n.jsxs)("div",{"aria-describedby":I,"aria-labelledby":`${a} ${A}`,className:"block-chart__cartesian-canvas-wrap",onBlur:i,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:A,children:T==="bar"?v?.a11yBlockChartBar:v?.a11yBlockChartLine}),(0,n.jsx)(K6.Chart,{"aria-hidden":"true",data:{labels:w,datasets:[P]},"data-l10n-id":O,options:R,ref:s,role:"presentation",type:T,updateMode:"default"})]})})})]}),!d&&(0,n.jsx)(Ute,{activeIndex:t,labels:N.labels,letters:k,onEvent:C,values:j})]})}}function rse(e){const t=Xe(e),s=ZO(960,"isDesktop","Desktop")(t),o=e5(s);function r(a){const c=oh()?.term??"";return(0,n.jsx)(o,{...a,search:c})}return r}const ase=rse(ose),pp=({valueType:e,value:t,values:s})=>e==="numeric"?String(t):KX(t/Uy(s)),ise=e=>{if(Sc())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return Ns(t)===be.DARK?xt.DARK:xt.LIGHT},cse=(e,t,s)=>pp({valueType:e,value:t,values:s.dataset.data}),lse=(e,t)=>{const{label:s,dataset:o,parsed:r}=t[0],a=pp({valueType:e,value:r,values:o.data});return`${s}: ${a}`},dse=(e,t)=>{const s=t.dataIndex,o=t.dataset.data??[1],r=o[s],a=e==null&&r/Uy(o)>=.06;return e===s||a},use=({activeIndex:e,onEvent:t,reduceMotion:s,settings:{valueType:o},shouldAnimate:r})=>{const a=Sc();return{animation:{animateRotate:r&&!s,duration:r&&!s?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:ise,display:dse.bind(null,e),font:{size:12,weight:"bold"},formatter:cse.bind(null,o)},legend:{display:!1,labels:a?{color:"FieldText"}:void 0},tooltip:{animation:!s,boxPadding:"14px 10px",callbacks:{label:()=>null,title:lse.bind(null,o)},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:a?"Highlight":xt.LIGHT,titleColor:a?"HighlightText":xt.DARK}},responsive:!1,rotation:130}},hse=({activeIndex:e,colors:t,hasBorder:s,values:o})=>{const r=Is(),a=Sc(),i=e==null?t:t.map((c,l)=>l===e?c:(0,X6.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,...s&&{borderWidth:1,borderColor:"#000"}}};function mse({activeIndex:e,children:t,colors:s,hasBorder:o,values:r}){const a=hse({activeIndex:e,colors:s,hasBorder:o,values:r});return t(a)}class fse extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:s,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,n.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,n.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,n.jsx)("svg",{"aria-hidden":"true",className:"block-chart__circleLegendSymbol","data-ignore":"contrast",fill:s,focusable:"false",role:"presentation",viewBox:"0 0 10 10",children:(0,n.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,n.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,n.jsx)("dd",{className:"visually-hidden-always",children:a})]})}}const pse=fse,gse=({activeIndex:e,colors:t,hasBorder:s,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":s});return(0,n.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,n.jsx)(pse,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:pp({valueType:i,value:m,values:a})},h.label))})},vse=(0,u.memo)(gse),Cse=(e,t)=>{const s=e.filter(a=>Number(a.value)>=0),o=q6(s,t),r=s.map(a=>a.color);return{...o,colors:r}};class xse 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:s,shouldAnimate:o}=this.props;return use({activeIndex:t,onEvent:this.handleEvent,reduceMotion:ws(),settings:s,shouldAnimate:o})};handleEvent=(t,s)=>{const o=s.length?s[0].index:null;this.props.onEvent(o)};render(){const{activeIndex:t,backgroundColor:s,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:x,values:y}=Cse(m,r),T=h?y:Z6(0,m.length),S=this.buildOptions(),b=`${a}-type`,L=`${a}-instructions`,N=x.map(E=>E.label),k=g.includes(s);return(0,n.jsxs)("div",{className:"block-chart__circle",children:[(0,n.jsx)("p",{className:"visually-hidden-always",id:L,children:f?.a11yBlockChartInstructions}),(0,n.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,n.jsx)(mse,{activeIndex:t,colors:g,hasBorder:k,values:T,children:E=>(0,n.jsxs)("div",{"aria-describedby":L,"aria-labelledby":`${i} ${b}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:b,children:f?.a11yBlockChartPie}),(0,n.jsx)(K6.Chart,{"aria-hidden":"true",data:{labels:N,datasets:[E]},options:S,ref:o,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,n.jsx)(vse,{activeIndex:t,colors:g,hasBorder:k,labels:x,onEvent:v,values:T,valueType:C?.valueType})]})}}function bse(e){const t=Hw()(e),s=e5(t);return Xe(s)}const yse=bse(xse);Ss.Chart.register(Ss.ArcElement,Ss.BarController,Ss.BarElement,Ss.CategoryScale,Rte.default,Ss.Legend,Ss.Legend,Ss.LineController,Ss.LineElement,Ss.LinearScale,Ss.PieController,Ss.PointElement,Ss.Title,Ss.Tooltip);const Sse=e=>e.displayName||e.name||"Component";class Tse extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,e0.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||ws()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,n.jsx)(ke,{value:t})};render(){const{props:{animateBlockEntrance:t,children:s,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,x=g?`h${g}`:"h2",y=this.id,T=`${y}-title`;return(0,n.jsx)(Ie,{type:"chart",children:(0,n.jsx)(Be,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:a,children:(0,n.jsx)("div",{className:"block-chart__container",children:(0,n.jsx)("div",{className:"block-chart__row",children:(0,n.jsx)("div",{className:"block-chart__rowInner",children:(0,n.jsxs)("figure",{children:[(!o&&h||o)&&(0,n.jsx)("figcaption",{children:(0,n.jsx)(x,{className:"block-chart__title",id:T,children:v()})}),(0,n.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(s),{htmlIdBase:y,htmlIdTitle:T,isVisible:C,items:i,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const Lse=Tse;function t5(e){const t=s=>(0,n.jsx)(Lse,{...s,children:(0,n.jsx)(e,{})});return t.displayName=`ChartWrap(${Sse(e)})`,t}var kse=p(82920);const Nse=t5(ase),Ese=t5(yse),Ise=Dn()(qe()("variant","storyline")),jse=St()(Ise,Fs(),EG()(1));class wse extends kse.Component{render(){const{dividerNumber:t,family:s,handleStorylineFullscreen:o,partnerContent:r,variant:a,enableVideoPlaybackSpeed:i,initiallyVisible:c}=this.props,d={...Vr()(["type","handleStorylineFullscreen","dividerNumber"],this.props),enableVideoPlaybackSpeed:i,partnerContent:r,initiallyVisible:c};return ae("text","paragraph",d)||ae("text","table",d)?(0,n.jsx)(yQ,{...d}):ae("text","heading paragraph",d)?(0,n.jsx)(EQ,{...d}):ae("text","subheading paragraph",d)?(0,n.jsx)(IQ,{...d}):ae("text","heading",d)?(0,n.jsx)(kQ,{...d}):ae("text","subheading",d)?(0,n.jsx)(NQ,{...d}):ae("text","two column",d)?(0,n.jsx)(SQ,{...d}):ae("text","three column",d)?(0,n.jsx)(TQ,{...d}):ae("text","four column",d)?(0,n.jsx)(LQ,{...d}):ae("text","code",d)?(0,n.jsx)(G3,{...d}):ae("impact","a",d)?(0,n.jsx)(UQ,{...d}):ae("impact","b",d)?(0,n.jsx)(_Q,{...d}):ae("impact","c",d)?(0,n.jsx)(GQ,{...d}):ae("impact","d",d)?(0,n.jsx)(WQ,{...d}):ae("impact","note",d)?(0,n.jsx)(KQ,{...d}):ae("quote","a",d)?(0,n.jsx)(X3,{...d}):ae("quote","b",d)?(0,n.jsx)(tY,{...d}):ae("quote","c",d)?(0,n.jsx)(sY,{...d}):ae("quote","d",d)?(0,n.jsx)(nY,{...d}):ae("quote","background",d)?(0,n.jsx)(oY,{...d}):ae("quote","carousel",d)?(0,n.jsx)(aY,{...d}):ae("quote","stacked",d)?(0,n.jsx)(iY,{...d}):ae("list","numbered",d)?(0,n.jsx)(uY,{...d}):ae("list","checkboxes",d)?(0,n.jsx)(hY,{...d}):ae("list","bulleted",d)?(0,n.jsx)(mY,{...d}):ae("list","icon",d)?(0,n.jsx)(fY,{...d}):ae("image","hero",d)?(0,n.jsx)(gY,{...d}):ae("image","full",d)?(0,n.jsx)(Bf,{...d}):ae("image","text aside",d)?(0,n.jsx)(xY,{...d}):ae("image","text overlay",d)?(0,n.jsx)(yY,{...d}):ae("image","banner",d)?(0,n.jsx)(SY,{...d}):ae("gallery","centered",d)||ae("gallery","full",d)?(0,n.jsx)(jY,{...d}):ae("gallery","two column",d)?(0,n.jsx)(Ff,{...d}):ae("gallery","three column",d)?(0,n.jsx)(Ff,{width:3,...d}):ae("gallery","four column",d)?(0,n.jsx)(Ff,{width:4,...d}):ae("divider","divider",d)?(0,n.jsx)(AY,{...d}):ae("divider","numbered divider",d)?(0,n.jsx)(RY,{number:t,...d}):ae("divider","spacing divider",d)?(0,n.jsx)(PY,{...d}):ae("360","storyline",d)?(0,n.jsx)(fZ,{...d,handleStorylineFullscreen:o,hasManySlBlocks:this.hasManySlBlocks.bind(this),isLesson:!0}):ae("interactive","accordion",d)?(0,n.jsx)($Y,{...d}):ae("interactive","tabs",d)?(0,n.jsx)(XY,{...d}):ae("interactive-fullscreen","labeledgraphic",d)?(0,n.jsx)(UJ,{...d}):ae("interactive-fullscreen","process",d)?(0,n.jsx)(lee,{...d}):ae("interactive-fullscreen","scenario",d)?(0,n.jsx)(Pee,{...d}):ae("interactive-fullscreen","sorting",d)?(0,n.jsx)(Wee,{...d}):ae("buttons","button",d)?(0,n.jsx)(EZ,{...d}):ae("buttons","button stack",d)?(0,n.jsx)(IZ,{...d}):ae("flashcard","flashcard",d)?(0,n.jsx)(My,{...d}):ae("flashcard","stack",d)?(0,n.jsx)(My,{stack:!0,...d}):ae("knowledge","knowledge",d)?(0,n.jsx)(Wa,{...d}):ae("continue","continue",d)?(0,n.jsx)(LX,{...d}):ae("multimedia","step",d)?(0,n.jsx)(TX,{...d}):ae("multimedia","audio",d)?(0,n.jsx)(fX,{...d}):ae("multimedia","video",d)?(0,n.jsx)(Qf,{...d}):ae("multimedia","ai_avatar",d)?(0,n.jsx)(Qf,{...d}):ae("multimedia","custom video",d)?(0,n.jsx)(Qf,{...d,type:"customVideo"}):ae("multimedia","embed",d)?(0,n.jsx)(vX,{...d}):ae("multimedia","attachment",d)?(0,n.jsx)(bX,{...d}):ae("multimedia","code",d)?(0,n.jsx)(G3,{...d}):ae("knowledgeCheck","multiple choice",d)?(0,n.jsx)(Wa,{...d}):ae("knowledgeCheck","multiple response",d)?(0,n.jsx)(Wa,{...d}):ae("knowledgeCheck","fillin",d)?(0,n.jsx)(Wa,{...d}):ae("knowledgeCheck","matching",d)?(0,n.jsx)(Wa,{...d}):ae("knowledgeCheck","draw from question bank",d)?(0,n.jsx)(Wa,{...d}):ae("chart","bar",d)||ae("chart","line",d)?(0,n.jsx)(Nse,{...d}):ae("chart","pie",d)?(0,n.jsx)(Ese,{...d}):ae("interactive-fullscreen","timeline",d)?(0,n.jsx)(Ste,{...d}):ae("ai-scenario","ai-scenario",d)?(0,n.jsx)(ate,{...d}):ae("mondrian","mondrian",d)?(0,n.jsx)(ete,{...d}):ae("videoCheckpoint","videoCheckpoint",d)?null:ae("textToVideo","textToVideo",d)?(0,n.jsx)(Ate,{}):ae("survey","survey",d)?(0,n.jsx)(eee,{...d}):ae("sequence","arrows",d)||ae("sequence","pyramid",d)||ae("sequence","timeline",d)?(0,n.jsx)(Nte,{...d}):ae("team","people",d)?(0,n.jsx)(wte,{...d}):ae("html","inline",d)||ae("html","cdn",d)||ae("html","vibe",d)?(0,n.jsx)(vte,{...d}):`Unknown type: ${s} ${a}`}hasManySlBlocks(){const{items:t}=this.props;return t&&jse(t)}}function Ase(e){return(0,n.jsx)(wh,{block:e,children:(0,n.jsx)(wse,{...e})})}function ae(e,t,s){return s.family===e&&s.variant===t}const Rse=1e3,Pse=150,Mse="onscrollend"in window;function s5(e,t){const s=e.getBoundingClientRect(),o=t?.getBoundingClientRect(),r=o?.top??0,a=o?.bottom??window.innerHeight,i=(a-r)*.02,c=s.bottom>r-i&&s.top<a+i,l=s.bottom<r;return c||l}const gp={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,s){const o=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:s}),o){this.scrollTarget=r;const a=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),Pse)};Mse?(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())s5(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},n5=({children:e,onViewed:t})=>{const s=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=(0,u.useRef)(t);return(0,u.useEffect)(()=>{r.current=t},[t]),(0,u.useEffect)(()=>{const a=s.current;if(!a||o.current)return;const i=Pm(),c=()=>{o.current||(o.current=!0,l.disconnect(),clearTimeout(d),gp.unregister(a),r.current())},l=new IntersectionObserver(([h])=>{h!=null&&(h.isIntersecting||h.intersectionRatio>0)&&c()},{root:i,rootMargin:$1,threshold:0});l.observe(a);const d=setTimeout(()=>{!o.current&&s5(a,i)&&c()},Rse);return gp.register(a,i,c),()=>{l.disconnect(),clearTimeout(d),gp.unregister(a)}},[]),(0,n.jsx)("div",{ref:s,children:e})},Ose=(0,u.memo)(function({block:t,children:s,onViewed:o,onStep:r}){const a=(0,u.useCallback)(c=>{c!=null&&"id"in c&&c.id!=null&&!c.isDone&&r(c.id)},[r]),i=(0,u.useCallback)(()=>{if(!t.items?.length){o();return}if(!t.requiresInteraction){o();return}(Bse.test(t.variant)||Dse.test(t.family))&&t.items.length>0&&a(t.items[0])},[t,a,o]);return(0,n.jsx)(n5,{onViewed:i,children:u.cloneElement(u.Children.only(s),{onStep:a})})}),Bse=/tabs|carousel/,Dse=/gallery/,Fse=["timeline"],Hse=({family:e,variant:t})=>(/interactive|flashcard|knowledge|continue|360|survey/.test(e)||/carousel|centered|checkboxes|audio|video|storyline/.test(t))&&!Fse.includes(t),$se=({family:e,settings:t})=>e==="html"&&t?.hasCustomCompletion,Vse=({family:e,items:t})=>!!(e==="mondrian"&&t?.length),zse="draw from question bank",vp=e=>{const{animateBlockEntrance:t,block:s,className:o,color:r,courseTitle:a,defaultBackgroundColor:i,enableVideoPlaybackSpeed:c,handleNavigate:l,handleStorylineFullscreen:d,hideBlock:h,index:m,isLastBlock:f,isOnlyBlockInStep:v,labels:C,lessonId:g,lessonProgress:x,loadMedia:y,match:T,onContinue:S,partnerContent:b,prefersKeyboardNavigation:L,previewType:N,shouldPause:k}=e,{blockId:E,family:j,items:A=[],variant:I,settings:w}=s,O=`block-${E}`,R=rt(),P=qE(),M=Ij({blockId:String(E),lessonId:String(g)}),H=(0,u.useCallback)(te=>{const Te=I===zse?A[0]:fr()(qe()("id",te),A);R(cv({blockId:E,lessonId:g,items:[Te]})),j==="continue"&&S(E,te)},[E,R,j,A,g,S,I]),F=(0,u.useCallback)(()=>{R(cv({blockId:E,lessonId:g,items:A}))},[E,R,A,g]),B=(0,u.useCallback)(te=>{const Te=A?.[0],W=Te&&"id"in Te?Te.id:void 0;W&&R(U7({blockId:E,itemId:W,lessonId:g,audioVideoPlayhead:te}))},[E,R,g,A]),V=(0,u.useCallback)(()=>{R(W7({blockId:E,lessonId:g,isSubmitted:!0}))},[E,R,g]),G=(0,u.useCallback)(({itemId:te,response:Te})=>{R(G7({blockId:E,itemId:te,lessonId:g,response:Te}))},[E,R,g]),_=(0,u.useCallback)(te=>{R($7(te))},[R]),Z=(0,u.useCallback)(()=>({itemId:te,isCorrect:Te})=>R(_7({itemId:te,lessonId:g,blockId:E,isCorrect:Te})),[E,R,g]),oe=(0,u.useCallback)(()=>()=>R(z7({lessonId:g,blockId:E})),[E,R,g]),Q=qi(),z=(0,u.useCallback)(te=>{R(jb(te))},[R]),D=(0,u.useCallback)(()=>{R(Ji())},[R]),U=(0,u.useCallback)(te=>{R(qm(te))},[R]),K=(0,u.useCallback)(()=>{R(sl(g))},[R,g]),Y=Jo()(s,{animateBlockEntrance:t,className:o?.toString(),color:r,courseTitle:a,defaultBackgroundColor:i,dividerNumber:M,enableVideoPlaybackSpeed:c,family:j,handleNavigate:l,handleStorylineFullscreen:d,onExit:K,onFinishStoryline:S8,onSurveySubmitted:V,onSurveyPartialResponse:G,initiallyVisible:m===0,isHidden:h,isLastBlock:f,isLearn:!0,isLearner:!0,isOnlyBlockInStep:v,isVideoTraining:P,labels:C,lessonId:g,loadMedia:y,match:T,onCardDrop:Z,onReplay:oe,onRetryAttempt:_,onTranscriptClose:D,onTranscriptOpen:z,onTranscriptUpdate:U,originalVariant:void 0,partnerContent:b,prefersKeyboardNavigation:L,previewType:N,progress:x,recordMediaPlayheadPosition:B,shouldPause:k,transcriptPanelState:Q}),q=Hse({family:j,variant:I})||$se({family:j,settings:w})||Vse({family:j,items:A}),ee=KO(g,E),J=["noOutline",o,h?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),ne=(0,n.jsx)(Ase,{...Y});return(0,n.jsx)("div",{className:J,"data-block-id":E,"data-change-path":ee,children:q?(0,n.jsx)(Ose,{block:s,onStep:H,onViewed:F,children:ne}):(0,n.jsx)(n5,{onViewed:F,children:ne})},O)},yu=bt(),Cp=Jo(),Use=Ze(),_se=({slides:e,currentSlide:t},s)=>(t.push(s),s.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),Gse=e=>{const{slides:t}=of()(_se,{slides:[],currentSlide:[]},e);return t};function xp(e,t,s,o){if(e.length){const a=e.slice(-1)[0];if(!Tc(a.id,s))return e}const r=Mte(Wse(s),t.slice(e.length)).map(Kse(o));return r.length?xp(e.concat(r),t,s,o):e}const Tc=(e,t)=>e==null?!1:yu(!1,["items",e,"isComplete"],t),Wse=e=>({family:t,items:s})=>{const o=yu({},0,s);return t==="continue"&&!Tc(o.id,e)},Kse=e=>(t,s,o)=>{const r=o.slice(-1)[0]||{},{family:a}=r,i=a==="continue"?yu(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return t.family==="knowledgeCheck"&&t.settings?.requireCorrectAnswer?Cp(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!i||i==="completeBlock"&&s!==o.length-1&&s!==o.length-2)?t:Cp(t,{requiresInteraction:!0})};function o5({id:e,...t},s,o,r,a){if(t.family==="continue"){const i=yu(void 0,["items",0,"type"],t)??a?.blockContinueCompletionType??"";return Cp({blockId:e,...t},{skipContinue:r,canContinue:Qse({continueType:i,blocks:s,progress:o}),lessonProgress:o,isComplete:Tc(e,o)})}return{blockId:e,...t}}const Qse=({continueType:e,blocks:t,progress:s})=>{switch(e){case"completeAll":return ts()(Fs()(t),qse(s));case"completeBlock":return t.length===0?!0:Tc(Jse(t),s);default:return!0}},Yse=e=>Xs()(Use("items",e)??{}),Zse=e=>Xse(Yse(e??{})),Xse=e=>Dn()(t=>qe()("isComplete",!0,t),e),qse=e=>Fs()(Zse(e)),Jse=e=>Vc()(e)?.id,ene=({family:e,variant:t,isComplete:s,requiresInteraction:o})=>e==="continue"&&t==="continue"&&!!o&&!s,tne=(e,t)=>!!e.find(o=>{if(o?.family==="knowledgeCheck"&&o?.settings?.requireCorrectAnswer)return o.id==null?!0:!t?.items?.[o.id]?.isComplete}),sne=e=>e.length===0?!1:r3()(t=>!!ene(t),e),nne=(e,t)=>e.length===0?!1:tne(e,t),one=({blocks:e,lessonProgress:t})=>e.findIndex(s=>{const o=s.id==null?void 0:t?.items?.[s.id],r=o&&o?.isComplete==null;return s?.family==="knowledgeCheck"&&s?.settings?.requireCorrectAnswer&&r}),r5=({blocks:e,lessonProgress:t,currentBlockIndex:s})=>{const o=one({blocks:e,lessonProgress:t});return o>-1&&s>o},rne=(e,t)=>{const s=["embed","video","full"],o=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&o.includes(e)||t!=null&&s.includes(t)};function ane(e,t,s){if(!e||!t||!Eh())return!1;if(jE(s,{l10n:t}))return!0;const{locales:o,defaultLocale:r}=t,a=o.find(i=>i.locale===r)?.id;return a&&a!==e}const ine=e=>e==="center"||e==="end"||e==="nearest"||e==="start",cne=e=>Xt(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||ine(e.align)),lne=e=>Xt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function dne({animateBlockEntrance:e,blocks:t,className:s,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,isLessonEntering:l,isLessonExiting:d,labels:h,lessonId:m,lessonProgress:f,loadMedia:v,nextLesson:C,partnerContent:g,prefersKeyboardNavigation:x,previewType:y}){const T=(0,u.useRef)(null),S=(0,u.useRef)(null),b=(0,u.useRef)(null),[L,N]=(0,u.useState)(!1),{currentLocale:k}=ot(),E=(0,we.g)(),j=(0,u.useMemo)(()=>({params:E}),[E]),A=le(Q=>Q.course?.theme),I=le(ch),w=le(Q=>Q.course?.defaultLocaleId),O=le(Q=>Q.l10n),R=ane(w??null,O,k),P=(0,Me.A)(l),M=(0,u.useRef)(d),H=(0,u.useRef)(l),F=(0,u.useRef)(m);M.current=d,H.current=l,F.current=m,(0,u.useEffect)(()=>{const Q=z=>{if(z.origin!==window.location.origin)return;(Array.isArray(z.data)?z.data:[z.data]).forEach(U=>{Xt(U)&&U.type==="preview:lessonUpdate"&&N(!0)})};return window.addEventListener("message",Q),()=>window.removeEventListener("message",Q)},[]),(0,u.useEffect)(()=>{const Q=z=>{if(M.current||!(z instanceof CustomEvent))return;const D=z.detail;if(!cne(D)||D.lessonId!==F.current)return;const U=D.itemId,K=D.align??"nearest";U==null?T.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"}):H.current?b.current={blockId:U,align:K}:B(U,K)};return window.addEventListener(Ge,Q),()=>window.removeEventListener(Ge,Q)},[]),(0,u.useEffect)(()=>{if(P&&!l&&b.current!=null){const{blockId:Q,align:z}=b.current;B(Q,z),b.current=null}},[l,P]),(0,u.useLayoutEffect)(()=>{V()});function B(Q,z="nearest"){const U=document.querySelector(".page-wrap")?.querySelector(`[data-block-id="${Q}"]`);U?.scrollIntoView({behavior:"smooth",block:z})}function V(){if(S.current){const z=t.findIndex(U=>U.id===S.current)+1,D=t[z]?.id??null;if(D){const U=document.querySelector(".page-wrap"),K=U?.querySelector(`[data-block-id="${D}"]`),Y=K?K.getBoundingClientRect().top:0;Xi.Ay.animateScroll.scrollTo(Y+(U?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}S.current=null}}const G=(0,u.useCallback)((Q,z)=>{Tc(z,f)||(S.current=Q),Q===t[t.length-1]?.id&&C&&(fs(sl(m)),i?.(C))},[i,t,m,f,C]),_=R||L,Z=_?t:(()=>{const Q=xp([],t,f,A);return Array.isArray(Q)?Q.filter(z=>Xt(z)&&(typeof z.id=="string"||typeof z.id=="number")):t})(),oe=["blocks-lesson",s,I?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,n.jsx)("section",{className:oe,ref:T,children:Z.map((Q,z,D)=>{const U=o5(Q,D.slice(0,-1),f,_,A);if(!lne(U))return null;const K=U,Y=D.length-1,ee=K.family==="continue"?Q.id===t[t.length-1]?.id:z===Y,J=!L&&r5({blocks:Z,lessonProgress:f,currentBlockIndex:z});return(0,n.jsx)(vp,{animateBlockEntrance:e,block:K,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hideBlock:J,index:z,isLastBlock:ee,labels:h,lessonId:m,lessonProgress:f,loadMedia:v,match:j,onContinue:G,partnerContent:g,prefersKeyboardNavigation:x,previewType:y},K.blockId)}).filter(kG.A)})}const bp=dne;function Su({children:e}){const t=(0,u.useRef)(null),s=(0,u.useCallback)(()=>{t.current?.focus?.()},[]);return cH(s),(0,n.jsx)("main",{className:"lesson-main",ref:t,tabIndex:-1,children:e})}const une=({animateBlockEntrance:e,color:t,courseTitle:s,data:o,enableVideoPlaybackSpeed:r,handleNavigate:a,labels:i,lessonHeader:c,lessonHeaderWrapClasses:l,lessonHeaderWrapStyles:d,lessonProgress:h,loadMedia:m,match:f,nextLesson:v,prefersKeyboardNavigation:C,previewType:g,hideLessonHeaders:x})=>{const y=Bi(),{id:T,items:S,type:b}=o,L={animateBlockEntrance:e,blocks:S,color:t,courseTitle:s,enableVideoPlaybackSpeed:r,handleNavigate:a,handleStorylineFullscreen:Jt,isFirstLesson:!0,labels:i,lessonId:T,lessonProgress:h,loadMedia:m,match:f,nextLesson:v,partnerContent:y,previewType:g,prefersKeyboardNavigation:C,type:b};return(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,n.jsxs)(Su,{children:[(0,n.jsx)("div",{className:l,inert:x,style:d,children:c}),(0,n.jsx)("div",{className:"page__content",children:(0,n.jsx)(bp,{...L})})]})})})},a5=Oe("Progress"),hne=e=>e===qk.CONTINUE,mne=({canShowContinue:e,isExport:t,isRiseCom:s,nextLesson:o})=>e&&s&&!o&&!t,fne=e=>Xt(e)&&"id"in e&&"type"in e,pne=({item:e,question:t})=>{if(e.type===ss.DRAW_FROM_QUESTION_BANK){const s=String(t.id);return e.id===s.split("-")[0]}return e.id===t.id},gne=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((s,o)=>t[s]?.id!==t[o]?.id),vne=(e,t,s)=>{if(!Array.isArray(e)||!Array.isArray(t)||!s)return!1;const o=e.map(i=>t[i]),r=t.findIndex(i=>i.id===s),a=o.findIndex(i=>i.id===s);return r===a},Cne=({lesson:e,question:t})=>{const o=e?.items?.filter(fne)?.find(a=>pne({item:a,question:t}));if(o?.type!==ss.DRAW_FROM_QUESTION_BANK)return o;const r=String(t.id).split("-")[1];return o.questions.find(a=>a.id===r)},xne=$("quiz"),bne=0,Za=2,yne=e=>({start:e<Za?0:e-Za,end:e+Za});function Sne(e){return e+1}function Tne(e){return e<bne+Za}function Lne(e,t){const{start:s,end:o}=yne(t);return{items:e.slice(s,o),startOffset:s}}function yp({activeIndex:e,index:t}){return xne("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+Za,future:t>e+Za})}function kne({settings:e}){const t=rt();return(0,u.useMemo)(()=>({onChoiceSelect:s=>{t(Sv(s))},onFillInChange:s=>{t(Tv(s))},onMatchSet:s=>{t(kv(s))},onResponseToggle:s=>{t(Lv(s))},onSetIndex:s=>{t(D0(s))},onSubmit:s=>{const{skipLessonsIfPassed:o,skipToLessonId:r}=e||{};return t(F0({...s,passToContinue:s.passToContinue??!1,skipLessonsIfPassed:o??void 0,skipToLessonId:r??void 0}))}}),[t,e])}function i5(e){return e.type===ss.DRAW_FROM_QUESTION_BANK}function Nne(e){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(s=>typeof s=="number"&&Number.isInteger(s)&&s>=0))}function Ene(e){return YC()?e.questions.length:Math.min(e.drawCount??0,e.questions.length)}function Ine(e,t){if(!Nne(t)||t.length!==e.length)return;const s=[];for(const[o,r]of e.entries()){const a=t[o];if(!(a.length===Ene(r)&&new Set(a).size===a.length&&a.every(c=>r.questions[c]!=null)))return;s.push(jne(r,a))}return s}function Sp(e,t){return{...t,drawn:!0,id:`${e.id}-${t.id}`}}function jne(e,t){const s=t.map(o=>({question:e.questions[o],idx:o})).filter(o=>o.question!=null);return{items:s.map(({question:o})=>Sp(e,o)),indices:s.map(({idx:o})=>o)}}function wne(e){const{questions:t}=e;if(YC())return{items:t.map(i=>Sp(e,i)),indices:t.map((i,c)=>c)};const s=e.drawCount,o=[],r=[],a=[];for(let i=0;i<s;i++){const c=C6({questions:t,drawnQuestionIds:o});if(!c)break;r.push(Sp(e,c)),a.push(t.findIndex(l=>l.id===c.id)),o.push(String(c.id))}return{items:r,indices:a}}function Ane({sourceItems:e,progress:t,lessonId:s}){const o=e.filter(i5),r=t?.questionsDrawn?Ine(o,t.questionList):void 0,a=r?c5(e,r):void 0,i=r!==void 0&&a!==void 0&&Rne(t,a),c=i?r:o.map(wne),l=c5(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=Pne({items:l,progress:h,questionIndexList:d});return{concreteItems:l,drawPayload:{lessonId:s,lessonProgress:m}}}function c5(e,t){let s=0;return e.flatMap(o=>i5(o)?t[s++].items:[o])}function Rne(e,t){if(!e)return!0;const s=new Map(Object.values(e.items).map(r=>[r.index,r])),o=e.originalItemProgress;return t.every((r,a)=>{const i=s.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 Pne({items:e,progress:t,questionIndexList:s}){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:s??t?.questionList,items:i}}function Tp(e,t){return!!t[e.id]?.isComplete}function Mne({items:e,progress:t}){const s=t?.items??{};return[...e.filter(o=>Tp(o,s)),...Cu()(e.filter(o=>!Tp(o,s)))]}function One(e){const t=e.answers??[],s=Cu()(t),o=s.map(r=>t.findIndex(a=>a.id===r.id));return Object.assign({},e,{answers:s,shuffledAnswerIndices:o})}function l5({items:e,settings:t,progress:s}){const o=t?.randomizeQuestionOrder?Mne({items:e,progress:s}):e;if(!t?.shuffleAnswerChoices)return o;const r=s?.items??{};return o.map(a=>Tp(a,r)?a:One(a))}function Bne({lessonId:e,sourceItems:t,progress:s,settings:o}){const{concreteItems:r,drawPayload:a}=Ane({sourceItems:t,progress:s,lessonId:e});return{resolvedItems:l5({items:r,settings:o??void 0,progress:a.lessonProgress}),drawPayload:a}}function E1e(e){return l5({items:e.items,settings:e.settings,progress:e.progress})}const Dne=e=>e!=null&&e.type!=null&&e.type!=="section";function I1e({lessonIds:e,lessons:t}){return!Array.isArray(e)||!t?!1:e.some((s,o)=>{const r=t[s];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(o+1).some(a=>Dne(t[a]))})}function Fne(e,t){const s=Ot(e),o=Q0(s)?s.settings:void 0,r=e?f8({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>o&&{...o,passingScore:r??o?.passingScore??80},[o,r])}const Tu=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function d5(){const[e,t]=(0,u.useState)(Tu?.matches??!1);return(0,u.useEffect)(()=>{if(!Tu)return;const s=o=>t(o.matches);return Tu.addEventListener("change",s),()=>Tu.removeEventListener("change",s)},[]),e}function Hne({lessonId:e}){const t=rt(),s=Ot(e),o=Q0(s)?s:void 0,r=pl(e),a=(0,u.useMemo)(()=>o?.items??[],[o?.items]),i=Fne(e,r),[{resolvedItems:c,drawPayload:l}]=(0,u.useState)(()=>Bne({lessonId:e,progress:r,settings:i,sourceItems:a}));(0,u.useLayoutEffect)(()=>{t(X7({...l,lessonId:e}))},[]);const d=r?.activeIndex??0,h=d5();return $ne({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 $ne({activeIndex:e,isReduceMotion:t,progress:s,resolvedItems:o,settings:r,sourceItems:a}){const i=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const Vne=e=>e.length===3,zne=e=>{const t=e.findIndex(s=>s==="answers");return t===-1?null:e[t+1]?.id},Une=e=>{const t=e.findIndex(s=>s==="questions");return t===-1?null:e[t+1]?.id},_ne=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},Gne=({items:e,itemId:t,questionBankQuestionId:s})=>{const o=e.find(({id:r})=>r===t);return o?"questions"in o?s?o.questions.find(({id:r})=>r===s):null:o:null},Wne=(e,t,s)=>{const o=s==="feedbackCorrect";return e?[e]:s==="feedback"?t.answers.slice(0,1):s==="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)},Kne=({lessonId:e,items:t})=>{const s=rt(),o=(0,u.useCallback)(({lessonId:a,progressId:i,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":s(Sv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":s(Lv({lessonId:a,itemId:i,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":s(Tv({lessonId:a,itemId:i,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":s(kv({lessonId:a,itemId:i,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[s]),r=(0,u.useCallback)(({detail:a})=>{const{lessonId:i,path:c}=a,l=String(a.itemId);if(i!==e)return;if(Vne(c)){s(yv(e));return}const d=Une(c),h=Gne({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(s(D0({lessonId:e,progressId:m})),_ne(c)){const f=zne(c),v=f?h.answers.find(({id:y})=>y===f)??null:null,C=c.at(-1),g=C==="feedbackCorrect",x=Wne(v,h,C);h.type==="MULTIPLE_RESPONSE"&&s(Z7({lessonId:e,itemId:m})),x.forEach(y=>{o({lessonId:e,question:h,progressId:m,answer:y},g)}),s(F0({finalRetryAttempt:!1,lessonId:e,isCorrect:g,itemId:m,passToContinue:!0}))}},[s,e,t,o]);(0,u.useEffect)(()=>(window.addEventListener(Ge,r),()=>{window.removeEventListener(Ge,r)}),[r])},Qne=$("quiz-item");function Yne({activeIndex:e,children:t,index:s,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,n.jsx)("div",{className:yp({activeIndex:e,index:s}),"data-testid":"quiz-item-card",inert:o?void 0:!0,children:(0,n.jsx)("div",{className:Qne("content"),children:(0,n.jsx)(Dy,{isActive:o,isComplete:r,isTimedQuiz:!!i,style:f,children:(0,n.jsx)("div",{hidden:!o&&!r,children:t})})})})}const Zne=$("quiz-card");function Xne({blockId:e,enableVideoPlaybackSpeed:t,index:s,isActive:o,item:r,labels:a,media:i}){const c=jt();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,n.jsx)("div",{className:`${Zne("media",{"image-with-audio":!0})}`,children:(0,n.jsx)(Ho,{...v,index:String(s),isOverlayAudio:!0,media:i})}):d&&(m||f)?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(Ho,{...v,index:`${s}-audio`,media:{audio:d}}),(0,n.jsx)(Ho,{...v,index:String(s),media:m?{video:m}:{embed:f},shouldPause:!o})]}):(0,n.jsx)(Ho,{...v,index:String(s),media:i,shouldPause:!o})}function u5(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(o=>t.indexOf(o)).filter(o=>o!==-1);const s=t.indexOf(e);return s===-1?void 0:s}const{FILL_IN_THE_BLANK:qne,MATCHING:Jne,MULTIPLE_CHOICE:eoe,MULTIPLE_RESPONSE:toe}=ss;function soe({color:e,columnBehavior:t,correctAnswerColor:s,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:x,onFillInChange:y,onMatchSet:T,onResponseToggle:S,onSubmit:b,prefersKeyboardNavigation:L,questionHtmlId:N,quizAcceptableResponses:k,quizAnswerPlaceholder:E,revealAnswers:j}){const{answers:A,type:I}=v,w=c&&!l,O=A??[],R=("correct"in v?v.correct:void 0)??"",P=("corrects"in v?v.corrects:void 0)??[],M=C?.text??"",H=C?.matches??{},F=(0,u.useCallback)(({title:V})=>(0,n.jsx)(ke,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:V}),[c]),B=(0,u.useCallback)(({title:V})=>(0,n.jsx)(ke,{allowTabNavigation:c,tagName:"span",value:V}),[c]);switch(I){case qne:return(0,n.jsx)(_y,{allowTabNavigation:c,correctAnswerColor:s,correctAnswerColorContrast:o,errorMessageId:r,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isComplete:l,isCorrect:d,labels:g,onChange:y,onEnterToSubmit:b,options:O,questionHtmlId:N,quizAcceptableResponses:k,quizAnswerPlaceholder:E,revealAnswers:j,value:M});case Jne:return(0,n.jsx)(Yy,{answers:O,columnBehavior:t,correctAnswerColor:s,correctAnswerColorContrast:o,incorrectAnswerColor:a,incorrectAnswerColorContrast:i,isActive:c,isComplete:l,matches:H,onChange:T,prefersKeyboardNavigation:L,revealAnswers:j});case toe:{const V=C?.selectedIndices,G=C?.shuffledAnswerIndices??[],_=f?u5(V,G):V;return(0,n.jsx)(qy,{allowTabNavigation:c,correctIds:P,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:g,onChange:S,onEnterToSubmit:b,options:O,questionHtmlId:N,renderOptionText:B,revealAnswers:j,selectedIndices:_??[]})}case eoe:default:{const V=C?.selectedIndex,G=C?.shuffledAnswerIndices??[],_=f?u5(V,G):V;return(0,n.jsx)(Xy,{allowTabNavigation:w,color:e,correctId:R,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:g,onChange:x,onEnterToSubmit:b,options:O,questionHtmlId:N,renderOptionText:F,revealAnswers:j,selectedIndex:_??-1})}}}const Pr=$("quiz-card");function noe({color:e,enableVideoPlaybackSpeed:t,hasStart:s,index:o,interaction:r,isQuestionBankQuiz:a,isReduceMotion:i,isShuffled:c,item:l,items:d,labels:h,onTakeAgain:m,prefersKeyboardNavigation:f,progress:v,settings:C,showNextButton:g}){const{canProceed:x,canSubmit:y,errorIncomplete:T,feedbackRef:S,errorMessageId:b,feedbackValue:L,handleChoiceSelect:N,handleFillInChange:k,handleMatchSet:E,handleNextFeedbackClick:j,handleResponseToggle:A,handleSubmit:I,handleTakeAgain:w,isActive:O,isComplete:R,isCorrect:P,isRetaking:M,itemProgress:H,quizItemHtmlId:F,selection:B,wrapperRef:V}=r,G=s?o+1:o,_=C?.revealAnswers===!0?je.ALL:C?.revealAnswers??je.NONE,Z=`q-${l.id}`,oe=l.settings,Q=C?.correctAnswerColor??void 0,z=C?.correctAnswerColorContrast??void 0,D=C?.incorrectAnswerColor??void 0,U=C?.incorrectAnswerColorContrast??void 0,K=h?.quizQuestion??"",Y=h?.quizAcceptableResponses??"",q=h?.quizAnswerPlaceholder??"",ee=h?.quizCorrect??"",J=h?.quizIncorrect??"",ne=h?.quizSubmit??"",te=v?.percentComplete===100&&a?h?.quizRestart??"":h?.quizNext??"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(YX,{isActive:O,labels:h,questionLabel:K,questionNumber:o+1,totalQuestions:d.length}),(0,n.jsx)(XX,{allowTabNavigation:O,htmlId:Z,value:l.title}),(0,n.jsx)(Xne,{blockId:l.id,enableVideoPlaybackSpeed:t,index:G,isActive:O,item:l,labels:h,media:l.media}),(0,n.jsx)(Vy,{type:l.type,children:(0,n.jsx)("div",{ref:V,children:(0,n.jsx)(soe,{canSubmit:y,color:e,columnBehavior:oe?.columnBehavior,correctAnswerColor:Q,correctAnswerColorContrast:z,errorMessageId:b,incorrectAnswerColor:D,incorrectAnswerColorContrast:U,isActive:O,isComplete:R,isCorrect:P,isReduceMotion:i,isRetaking:M,isShuffled:c,item:l,itemProgress:H,labels:h,onChoiceSelect:N,onFillInChange:k,onMatchSet:E,onResponseToggle:A,onSubmit:I,prefersKeyboardNavigation:f,questionHtmlId:Z,quizAcceptableResponses:Y,quizAnswerPlaceholder:q,revealAnswers:_})})}),(0,n.jsx)("div",{"aria-live":"assertive",children:T&&(0,n.jsxs)("div",{className:`${Pr("validations")}`,"data-testid":"quiz-validation-error",children:[(0,n.jsx)(ie,{className:`${Pr("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,n.jsx)("span",{id:`${F}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,n.jsx)($y,{canProceed:x,feedbackRef:S,feedbackValue:L,isActive:O,isComplete:R,isCorrect:P,item:l,labels:h,quizCorrect:ee,quizIncorrect:J,revealAnswers:_,selection:B}),(0,n.jsx)(By,{allowNext:!m,canProceed:x,canSubmit:y,isReduceMotion:i,onNext:g?j:void 0,onSubmit:I,quizNext:te,quizSubmit:ne}),m&&(0,n.jsx)("div",{className:`${Pr("retake-container",{active:R})}`,children:(0,n.jsx)("button",{className:`${Pr("retake",{active:R})}`,onClick:w,type:"button",children:(0,n.jsxs)("div",{className:`${Pr("retake-content")}`,children:[(0,n.jsx)("div",{className:`${Pr("retake-text")}`,children:"TAKE AGAIN"}),(0,n.jsx)("i",{className:`${Pr("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:h5,MATCHING:m5,MULTIPLE_CHOICE:f5,MULTIPLE_RESPONSE:p5}=ss;function ooe(e,t){return e?.items?.[t]??{}}function roe(e,t,s,o,r){switch(e.type){case h5:return s6({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case m5:return n6(t.matches??{});case p5:return a6({isShuffled:s,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case f5:default:return o6({isCorrectAnswerUnshuffled:o,isShuffled:s,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function aoe(e,t){switch(e.type){case h5:return t.text;case m5:return t.matches;case p5:return t.selectedIndices;case f5:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:ioe,MATCHING:coe,MULTIPLE_CHOICE:loe,MULTIPLE_RESPONSE:doe}=ss;function uoe({hasStart:e=!1,id:t,index:s,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:x,title:y}){const T=jt(),S=vC(),[b,L]=(0,u.useState)(!1),[N,k]=(0,u.useState)(Date.now),[E,j]=(0,u.useState)(!1),A=(0,u.useRef)(null),I=(0,u.useRef)(null),w=(0,u.useId)(),O=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:a,itemId:String(a.id),itemProgress:{},retryAttempts:v,revealAnswers:je.NONE,settings:g,startTime:N,title:y}),R=e?s+1:s,P=m?.activeIndex??0,M=R===P,H=ooe(m,a.id),F=H?.isComplete??!1,B=roe(a,H,r,o,T),V=g?.revealAnswers===!0?je.ALL:g?.revealAnswers??je.NONE,G=V===je.ALL||V===je.INCORRECT,_=M&&F&&G,Z=M&&!F&&e6({answersLength:a.answers?.length??0,matches:H?.matches,selectedIndex:H?.selectedIndex,selectedIndices:H?.selectedIndices,text:H?.text,type:a.type});O.current={canSubmit:Z,isCorrect:B,item:a,itemId:String(a.id),itemProgress:H,retryAttempts:v,revealAnswers:V,settings:g,startTime:N,title:y};const oe=H?.selectedIndex,Q=i6({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:B,isShuffled:r,selectedIndex:oe,shuffledAnswerIndices:a.shuffledAnswerIndices}),z=aoe(a,H),D=b?`${w}-error-incomplete-message`:void 0,U=(0,u.useCallback)(()=>{L(!1)},[]),K=String(a.id),Y=(0,u.useCallback)(({selectedIndex:he})=>{U(),i?.({lessonId:t,itemId:K,selectedIndex:he,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,K,a.shuffledAnswerIndices,i,U]),q=(0,u.useCallback)(he=>{U(),c?.({lessonId:t,itemId:K,text:he})},[t,K,c,U]),ee=(0,u.useCallback)(he=>{U(),l?.({lessonId:t,itemId:K,matches:he})},[t,K,l,U]),J=(0,u.useCallback)(({optionIndex:he})=>{U(),d?.({lessonId:t,itemId:K,selectedIndex:he,shuffledAnswerIndices:a.shuffledAnswerIndices})},[t,K,a.shuffledAnswerIndices,d,U]),ne=(0,u.useCallback)((he=()=>{},xe)=>{xe&&he(xe),C?.({lessonId:t})},[t,C]),te=(0,u.useCallback)((he,xe)=>{ve.pause(),ne(he??(()=>{}),xe)},[ne]),Te=(0,u.useCallback)(()=>{M&&te()},[M,te]),W=(0,u.useCallback)(he=>{he.preventDefault();const{canSubmit:xe,isCorrect:ge,item:Ye,itemId:Vt,itemProgress:zt,retryAttempts:dt,revealAnswers:Qt,settings:io,startTime:Ke,title:Yt}=O.current;if(!xe){switch(L(!0),Ye.type){case ioe:case doe:case loe:I.current?.querySelector("input")?.focus();break;case coe:I.current?.querySelector("button")?.focus();break;default:break}return}O.current.canSubmit=!1;const Ut={startTime:Ke,stopTime:Date.now()},{passToContinue:us}=io??{},Le=io?.retryCount??-1,$e=parseInt(String(Le),10),Ys=parseInt(String(dt),10),co=$e===Ys,Br=S({duration:Ut,id:t,isCorrect:ge,item:Ye,itemProgress:zt,retryAttempts:dt,title:Yt});f?.(Br);const Mu={finalRetryAttempt:co,lessonId:t,isCorrect:ge,itemId:Vt,passToContinue:us,revealAnswers:Qt};if(Qt===je.ALL||Qt===je.INCORRECT){x?.(Mu);return}te(x,Mu)},[S,te,t,f,x]),ue=(0,u.useCallback)(()=>{j(!0),setTimeout(()=>{h?.(),j(!1)},50)},[h]),fe=(0,Me.A)(M)??!1,pe=(0,Me.A)(F)??!1;return(0,u.useEffect)(()=>{!fe&&M&&k(Date.now())},[M,fe]),{activeIndex:P,canProceed:_,canSubmit:Z,feedbackRef:A,errorIncomplete:b,errorMessageId:D,feedbackValue:Q,handleChoiceSelect:Y,handleFillInChange:q,handleMatchSet:ee,handleNextFeedbackClick:Te,handleResponseToggle:J,handleSubmit:W,handleTakeAgain:ue,isActive:M,isComplete:F,isCorrect:B,isRetaking:E,itemProgress:H,prevIsActive:fe,prevIsComplete:pe,quizItemHtmlId:w,selection:z,wrapperRef:I}}const hoe=3;function moe({feedbackRef:e,isActive:t,isComplete:s,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??hoe,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===je.NONE||o))return!a&&s&&(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,s,o,a,c,l])}const foe=$("quiz-item");function poe({color:e,enableVideoPlaybackSpeed:t,hasStart:s=!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:x,onTakeAgain:y,prefersKeyboardNavigation:T,progress:S,quizTop:b,reportAnswer:L,retryAttempts:N=0,scrollId:k,setNextIndex:E,settings:j={revealAnswers:je.ALL},showNextButton:A=!0,submitAction:I,title:w}){const O=d5(),R=uoe({hasStart:s,id:o,index:r,isCorrectAnswerUnshuffled:i,isShuffled:l,item:h,onChoiceSelect:v,onFillInChange:C,onMatchSet:g,onResponseToggle:x,onTakeAgain:y,progress:S,reportAnswer:L,retryAttempts:N,setNextIndex:E,settings:j,submitAction:I,title:w}),{activeIndex:P,feedbackRef:M,isActive:H,isComplete:F,isCorrect:B,prevIsActive:V,prevIsComplete:G}=R,_=j?.revealAnswers===!0?je.ALL:j?.revealAnswers??je.NONE;moe({feedbackRef:M,isActive:H,isComplete:F,isReduceMotion:O,prevIsComplete:G,prevIsActive:V,quizTop:b,revealAnswers:_,scrollId:k});const Z=(0,n.jsx)(noe,{color:e,enableVideoPlaybackSpeed:t,hasStart:s,index:r,interaction:R,isQuestionBankQuiz:c,isReduceMotion:O,isShuffled:l,item:h,items:m,labels:f,onTakeAgain:y,prefersKeyboardNavigation:T,progress:S,settings:j,showNextButton:A});return a?(0,n.jsx)(Yne,{activeIndex:P,index:s?r+1:r,isActive:H,isComplete:F,isCorrect:B,isTimedQuiz:d,settings:j,children:Z}):(0,n.jsx)("div",{className:foe("wrap"),children:Z})}const st=$("odometer"),g5=300,v5=700,goe=300,voe=500,Lu=200,Coe=170,C5=145,Ks=Lu/2,Qs=Coe/2,Lc=70,x5=1.5,xoe=2.5,boe=225,yoe=135,b5=270,Lp=7,Xa={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},Go={size:12,topOffset:-3,bottomOffset:21};function Soe(e){return e<.5?16*e**5:1+16*(e-1)**5}function Toe(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function ku({angle:e,centerX:t,centerY:s,radius:o}){const r=(e-90)*Math.PI/180;return{x:t+o*Math.cos(r),y:s+o*Math.sin(r)}}function kp({centerX:e,centerY:t,counterClockwise:s=!1,endAngle:o,radius:r,startAngle:a}){const i=ku({angle:a,centerX:e,centerY:t,radius:r}),c=ku({centerX:e,centerY:t,radius:r,angle:o}),d=Math.abs(o-a)>180?"1":"0",h=s?"0":"1";return`M ${i.x} ${i.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function y5(e,t,s){return t+s*b5*e/100}function Loe({hasPassed:e,isResultsVisible:t,isRTL:s,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),x=`hatch-pattern${(0,u.useId)()}`,y=(0,u.useRef)(null),T=(0,u.useRef)(!1),S=(0,u.useRef)([]),b=(0,u.useCallback)(()=>{S.current.forEach(clearTimeout),S.current=[]},[]),L=(0,u.useCallback)(()=>{y.current!==null&&(cancelAnimationFrame(y.current),y.current=null),b()},[b]);(0,u.useEffect)(()=>{t||(L(),T.current=!1,h(0),f(0),C(!1))},[t,L]),(0,u.useEffect)(()=>{if(!t||!l||T.current)return;T.current=!0;const Z=i,oe=setTimeout(()=>{let Q=null;const z=D=>{Q===null&&(Q=D);const U=D-Q,K=Math.min(U/v5,1),Y=Soe(K),q=Toe(K);if(f(Y),h(Math.round(q*Z)),K<1)y.current=requestAnimationFrame(z);else{f(1),h(Z);const ee=setTimeout(()=>{C(!0);const J=setTimeout(()=>{o?.()},voe);S.current.push(J)},goe-g5-v5);S.current.push(ee)}};y.current=requestAnimationFrame(z)},g5);S.current.push(oe)},[t,l,i,o]),(0,u.useEffect)(()=>()=>{L()},[L]);const N=s?yoe:boe,k=s?-1:1,E=y5(a,N,k),j=y5(m*i,N,k),A=N+k*b5,I=ku({centerX:Ks,centerY:Qs,radius:Lc,angle:j}),w=ku({centerX:Ks,centerY:Qs,radius:Lc,angle:E}),O=m*i>=a,R=s?`%${a}`:`${a}%`,P=s?`%${d}`:`${d}%`,M=`${c} ${s?`%${i}`:`${i}%`}`,H=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:st("pass-mark-label"),children:r}),(0,n.jsx)("div",{className:st("pass-mark-percent"),children:R})]}),F=kp({centerX:Ks,centerY:Qs,counterClockwise:s,radius:Lc,startAngle:N,endAngle:A}),B=kp({centerX:Ks,centerY:Qs,counterClockwise:s,radius:Lc+3,startAngle:E,endAngle:A}),V=m>0?kp({centerX:Ks,centerY:Qs,counterClockwise:s,radius:Lc,startAngle:N,endAngle:j}):"",G={x:w.x+(s?-13:13),y:w.y-13},_={x:G.x+(s?-13:13),y:G.y};return(0,n.jsxs)("div",{className:st(),children:[(0,n.jsxs)("svg",{"aria-hidden":"true",className:st("svg"),viewBox:`0 0 ${Lu} ${C5}`,children:[(0,n.jsx)("defs",{children:(0,n.jsx)("pattern",{height:"1.5",id:x,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,n.jsx)("line",{className:st("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,n.jsx)("path",{className:st("passing-zone"),d:B,fill:"none",stroke:`url(#${x})`,strokeWidth:"6"}),(0,n.jsxs)("g",{className:st("pass-mark-lines"),children:[(0,n.jsx)("line",{className:st("pass-mark-line"),x1:w.x,x2:G.x,y1:w.y,y2:G.y}),(0,n.jsx)("line",{className:st("pass-mark-line"),x1:G.x,x2:_.x,y1:G.y,y2:_.y})]}),(0,n.jsx)("path",{className:st("track"),d:F,fill:"none",strokeWidth:x5}),V&&(0,n.jsx)("path",{className:st("progress",{passing:O}),d:V,fill:"none",strokeWidth:x5}),m>0&&(0,n.jsx)("circle",{className:st("dot",{passing:O}),cx:I.x,cy:I.y,r:xoe}),v&&(0,n.jsx)("g",{className:st("result-icon"),children:e?(0,n.jsx)("path",{className:st("checkmark"),d:`M ${Ks+Xa.start.dx} ${Qs+Xa.start.dy} L ${Ks+Xa.mid.dx} ${Qs+Xa.mid.dy} L ${Ks+Xa.end.dx} ${Qs+Xa.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:Lp}):(0,n.jsxs)("g",{className:st("x-mark"),children:[(0,n.jsx)("path",{className:st("x-line",{first:!0}),d:`M ${Ks-Go.size} ${Qs+Go.topOffset} L ${Ks+Go.size} ${Qs+Go.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:Lp}),(0,n.jsx)("path",{className:st("x-line",{second:!0}),d:`M ${Ks+Go.size} ${Qs+Go.topOffset} L ${Ks-Go.size} ${Qs+Go.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:Lp})]})})]}),(0,n.jsxs)("div",{className:st("score",{pass:v&&e,fail:v&&!e}),children:[(0,n.jsx)("div",{className:st("score-label"),children:c}),(0,n.jsx)("div",{className:st("pass-label"),children:M}),(0,n.jsx)("div",{className:st("fail-label"),children:M}),(0,n.jsx)("div",{className:st("score-percent",{hidden:v}),children:P})]}),(0,n.jsx)("div",{className:st("pass-mark"),style:{"--pass-mark-x":`${(s?Lu-_.x:_.x)/Lu*100}%`,"--pass-mark-y":`${(_.y+3)/C5*100}%`},children:H}),(0,n.jsx)("div",{className:st("pass-mark-mobile"),children:H})]})}const S5=(0,u.createContext)({handleExpiredQuiz:Jt,hideTimer:Jt,quizTime:0,resetQuizTimer:Jt,timerDuration:0,timerHidden:!1,timerRunning:!1});function koe({children:e,handleExpiredQuiz:t=()=>{},isTimedQuiz:s,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:x,endIndex:y,lessonId:T,lessonProgress:S,startIndex:b}=(0,u.useMemo)(()=>{const M=o?.currentLesson,H=o?.lessons?.[M],F=H?.activeIndex||0,B=Object.keys(H?.items||{}).length+1;return{activeIndex:F,lessonId:M,endIndex:B,lessonProgress:H,startIndex:0}},[o]),L=(0,Me.A)(T),N=(0,Me.A)(x),k=(0,u.useCallback)(()=>{l(g*60)},[g]),E=(0,u.useCallback)(()=>{l(M=>M-1)},[l]),j=(0,u.useCallback)(()=>{h(!0),i.current||(i.current=setInterval(E,1e3))},[E,h]),A=(0,u.useCallback)(M=>{f(M!==void 0?M:!m)},[m]),I=(0,u.useCallback)(()=>{h(!1),i.current&&(i.current=clearInterval(i.current))},[h]),w=(0,u.useCallback)(()=>{c&&v!==void 0&&r({lessonId:v,timeRemaining:c})},[v,c,r]),O=(0,u.useCallback)(()=>{w(),l(void 0)},[l,w]),R=(0,u.useCallback)(()=>l(S.timeRemaining||g*60),[S,g,l]);(0,u.useEffect)(()=>{if(!s)return;const M=L!==T,H=M&&c,F=M&&s;s&&!M&&v!==T&&C(T),H&&O(),F&&R()},[s,v,T,L,c,R,O]),(0,u.useEffect)(()=>{if(s)switch(x){case b:I();break;case y:k(),I();break;default:j(),N!==x&&L===T&&w()}},[x,y,s,T,N,L,k,b,j,I,w]),(0,u.useEffect)(()=>{s&&c<1&&I()},[s,c,I]);const P=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:A,quizTime:c,resetQuizTimer:k,timerDuration:g,timerHidden:m,timerRunning:d}),[t,A,c,k,g,m,d]);return(0,n.jsx)(S5.Provider,{value:P,children:e})}const T5=()=>(0,u.useContext)(S5),Noe=e=>e.isTimedQuiz?(0,n.jsx)(koe,{...e,children:e.children}):(0,n.jsx)(n.Fragment,{children:e.children}),Eoe={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function Ioe(e){const t=re(),s=pr(),o=Ot(e??""),r=(0,u.useMemo)(()=>{if(!t||!s||!o)return Eoe;const l=TC({course:t,courseProgress:s});return AC({course:t,courseProgress:s,lesson:o,restrictingQuiz:l})},[t,s,o]),{restrictingQuiz:a}=r,i="title"in a?a.title:void 0,c=at(i);return(0,u.useMemo)(()=>i?{...r,restrictingQuiz:{...a,title:c}}:r,[r,a,i,c])}const L5=$("quiz-results");function joe({skipToLessonId:e}){const t=Ce(),s=Sj(e),o=Th(),{lessonPreposition:r,quizSkipAhead:a}=t??{},i=s>0&&a&&r?`${a} ${s} ${r} ${o}`:a;return i?(0,n.jsxs)(ou,{className:"continue-btn--flex",href:ks(e),testId:"quiz-skip-ahead-btn",children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"arrow-right-from-line"}),i]}):null}function woe({isFooterVisible:e,isResultsVisible:t,onTryAgainFocus:s}){const o=rt(),r=Es(),a=pl(r),{passed:i=!1,retryAttempts:c=0}=a??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=Lh(r),{resetQuizTimer:v}=T5(),C=hne(l),g=Ce(),x=jj(r),y=Ioe(x),{isRestricted:T}=y,{courseFinish:S,quizContinue:b,quizTakeAgain:L}=g??{},N=h&&i&&!!f,k=C,E=mne({canShowContinue:k,isExport:T8(),isRiseCom:!1,nextLesson:x}),j=(0,u.useCallback)(()=>{v(),o(yv(r))},[o,v,r]),A=k&&T&&x&&g&&(0,n.jsx)(Ay,{bgType:"transparent",text:UI({labels:g,restrictions:y})}),I=k&&!T&&x&&(!N||m)&&b&&(0,n.jsx)(ou,{className:N?"continue-btn--outline":void 0,href:ks(x),text:b}),w=E&&S&&(0,n.jsx)(ou,{href:Kg,text:S}),O=(d===-1||c<d)&&(0,n.jsxs)(Oy,{allowTabNavigation:t,onClick:j,onFocus:s,size:"lg",testId:"quiz-take-again-button",children:[(0,n.jsx)(ie,{"aria-hidden":"true",name:"arrow-rotate-left"}),L]});return(0,n.jsx)("div",{className:L5("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,n.jsxs)("div",{className:L5("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[N&&(0,n.jsx)(joe,{skipToLessonId:f}),A,I,w,O]})})}const qa=$("quiz-results");function Aoe({questionCount:e}){const t=rt(),s=Es()??"",o=pl(s),{activeIndex:r=0,passed:a=!1,passingScore:i=80,reportResults:c=!1,score:l=0}=o??{},d=Ce(),h=on(),{skipLessonsIfPassed:m,skipToLessonId:f}=Lh(s),[v,C]=(0,u.useState)(!1),g=e+1===r,x=(0,u.useRef)(g),y=(0,u.useRef)(void 0),T=(0,u.useRef)(void 0),S=(0,u.useRef)(null),b=(0,u.useId)(),{a11yQuizFailed:L="",a11yQuizPassed:N="",quizPassing:k="",quizResults:E="",quizScore:j=""}=d??{},A=`quiz-results-desc-${b}`,I=(0,u.useCallback)(()=>{T.current=setTimeout(()=>{C(!0),window.dispatchEvent(new CustomEvent(ql))},500)},[]),w=(0,u.useCallback)(()=>{clearTimeout(T.current),T.current=void 0,C(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(T.current)},[]),(0,u.useEffect)(()=>{g!==x.current&&(g?S.current?.focus():C(!1),x.current=g)},[g]),(0,u.useEffect)(()=>{if(!g||!a||!m||!f){y.current=void 0;return}const O=`${s}:${f}`;y.current!==O&&(y.current=O,t(Q7({quizId:s,destinationId:f})))},[t,a,g,s,m,f]),(0,n.jsx)("div",{className:qa(),children:(0,n.jsx)("div",{className:qa("container"),children:(0,n.jsxs)("div",{className:qa("content",{active:g}),"data-testid":"quiz-results",children:[(0,n.jsxs)("div",{className:qa("header"),children:[(0,n.jsx)("h1",{"aria-describedby":A,className:qa("label").mix("noOutline"),ref:S,tabIndex:-1,children:E}),(0,n.jsxs)("div",{className:"visually-hidden-always",id:A,children:[(0,n.jsx)("div",{children:`${k}: ${i}%`}),(0,n.jsx)("div",{children:`${j}: ${l}%`}),(0,n.jsx)("div",{children:a?N:L})]})]}),(0,n.jsx)("div",{"aria-hidden":"true",className:qa("results"),children:(0,n.jsx)(Loe,{hasPassed:a,isResultsVisible:g,isRTL:h,onAnimationDone:I,passingLabel:k,passingScore:i,score:l,scoreLabel:j,shouldAnimate:c})}),(0,n.jsx)(woe,{isFooterVisible:v,isResultsVisible:g,onTryAgainFocus:w})]})})})}const Roe=5,Poe=15,Moe=30,Ooe=60,Boe=180,k5=300,N5=600,E5=120,Doe=e=>e<=Roe?{regularInterval:Ooe,lowTimeThreshold:E5}:e<=Poe?{regularInterval:Boe,lowTimeThreshold:E5}:e<=Moe?{regularInterval:k5,lowTimeThreshold:k5}:{regularInterval:N5,lowTimeThreshold:N5},Foe=(e,t,s,o)=>{const r=Math.floor(o/60),a=o%60,i=r===1?e:t;if(r>0&&a>0)return`${s}: ${r} ${i} and ${a} seconds`;if(r>0&&a===0)return`${s}: ${r} ${i}`;if(r===0&&a>0)return`${s}: ${a} seconds`};var Pn=p(82920);const ds=$("quiz-timer"),Np=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,Hoe=e=>{const t=Math.floor(e/60),s=e%60;return Np(t,s)},I5=e=>{const t=Math.floor(e/60),s=e%60;return Np(t,s)},$oe=e=>Np(e,0),j5=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:s=!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=dr.REMAINING,timerEnabled:g=!1})=>{const[x,y]=Pn.useState(!1),[T,S]=Pn.useState(""),b=Pn.useRef(null),L=Pn.useRef(!1),{hideTimer:N,quizTime:k,timerDuration:E,timerHidden:j,timerRunning:A,handleExpiredQuiz:I}=T5(),w=E*60,{isCover:O,isHeader:R,isHidden:P}=Pn.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:C===dr.HIDE_TIMER}),[e,C]),M=s&&!O,H=Pn.useMemo(()=>Doe(E),[E]),F=Pn.useMemo(()=>({expired:a||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[a,h,m,f]),B=()=>{y(!1),I()},V=Pn.useCallback(()=>{const{regularInterval:oe,lowTimeThreshold:Q}=H,z=k<=Q&&k>0&&!L.current,D=b.current!==null&&b.current-k>=oe,U=b.current===null;if(z||D){z&&(L.current=!0),b.current=k;const K=Foe(F.minute,F.minutePlural,F.remaining,k);S(K)}U&&(b.current=k)},[H,k,F]);if(Pn.useEffect(()=>{g&&k!==0&&(O||V())},[V,O,g,A,k]),Pn.useEffect(()=>{if(!g||k!==0||s)return;const oe=setTimeout(()=>{y(!0)},1200);return()=>clearTimeout(oe)},[k,g,s]),!g||M||o)return null;const G={"header-area":R,"cover-area":O,"hide-timer":P,"exit-course":t},_={display:[O,R&&!s].some(Ne())?null:"none"},Z=()=>({[dr.SUMMARY]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:ds("label"),children:[d,":"]}),(0,n.jsxs)("div",{className:ds("value"),children:[E," ",E===1?h:m]})]}),[dr.REMAINING]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:ds("label"),children:[f,":"]}),(0,n.jsx)("div",{className:ds("value"),children:Hoe(k)})]}),[dr.ELAPSED]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:ds("label"),children:[r,":"]}),(0,n.jsx)("div",{className:ds("value"),children:I5(w-k)})]}),[dr.ELAPSED_TOTAL]:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:ds("label"),children:[r,":"]}),(0,n.jsxs)("div",{className:ds("value"),children:[I5(w-k)," /"," ",$oe(E)]})]})})[O?dr.SUMMARY:C];return(0,n.jsxs)("div",{className:ds(G),"data-testid":"quiz-timer",style:_,children:[k!==0&&(0,n.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:T}),k===0&&(0,n.jsx)("div",{className:"visually-hidden",role:"alert",children:a||"Time expired"}),R&&j?(0,n.jsxs)("button",{className:ds("hide"),onClick:()=>N(!1),type:"button",children:[(0,n.jsx)(ie,{className:ds("icon"),name:"stopwatch-regular"}),v]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:ds("time"),children:[(0,n.jsx)(ie,{className:ds("icon"),name:"stopwatch-regular"}),(0,n.jsx)("div",{className:ds("desc"),children:Z()})]}),R&&(0,n.jsx)("button",{className:ds("hide"),onClick:()=>N(!0),type:"button",children:l})]}),!O&&x&&Nn.createPortal((0,n.jsxs)(gd,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroundScroll:!0,heading:a,hideCloseButton:!0,onCancel:B,onClose:B,onOverlayClick:()=>{},children:[(0,n.jsx)("p",{children:c}),(0,n.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:B,type:"button",children:i})]}),Ao({childType:"dialog"}))]})},Mn=$("quiz-start"),Voe=e=>(e?.retryAttempts??0)>0;function zoe({lessonId:e,isActive:t}){const s=rt(),o=(0,u.useRef)(null),r=pl(e),a=Ce(),i=re(),c=dh(),l=Ot(e),d=UC(),h=le(_C),m=c?.authorName,f=c?.avatar,v=i?.theme?.showAuthor??!1,C=i?.theme?.showLessonCount??!1,g=d[e]??0,x=at(l?.description),y=at(l?.title),T=l?.settings?.timer,S=l?.settings?.asLesson!==!1,{a11yAuthorPrefix:b="",lessonName:L="",lessonPreposition:N="",quizStart:k="",quizTakeAgain:E="",quizTimerElapsed:j="",quizTimerExpired:A="",quizTimerExpiredAction:I="",quizTimerExpiredMessage:w="",quizTimerHide:O="",quizTimerLimit:R="",quizTimerMinute:P="",quizTimerMinutePlural:M="",quizTimerRemaining:H="",quizTimerShow:F=""}=a??{},B=Voe(r),V=t&&B,G=B?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{V&&o.current?.focus()},[V]);const _=()=>{s(D0({lessonId:e}))},Z=B?E:k;return(0,n.jsx)("div",{"aria-hidden":!t,className:Mn(),children:(0,n.jsx)("div",{className:Mn("container"),children:(0,n.jsxs)("div",{className:Mn("content"),children:[(0,n.jsxs)("div",{className:Mn("header"),children:[(0,n.jsx)("div",{className:Mn("counter"),children:S&&C&&(0,n.jsx)("div",{className:Mn("count"),children:`${L} ${g} ${N} ${h}`})}),(0,n.jsx)("h1",{ref:o,tabIndex:-1,children:(0,n.jsx)(ke,{className:Mn("title"),value:y})}),v&&f&&m?(0,n.jsxs)("div",{className:Mn("author"),children:[(0,n.jsx)("img",{alt:"",src:Tg(f)}),(0,n.jsxs)("span",{className:"visually-hidden",children:[b," ",m]}),(0,n.jsx)("span",{"aria-hidden":"true",children:m})]}):null]}),T&&(0,n.jsx)(j5,{area:"cover",exitCourseEnabled:i?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:j,labelQuizTimerExpired:A,labelQuizTimerExpiredAction:I,labelQuizTimerExpiredMessage:w,labelQuizTimerHide:O,labelQuizTimerLimit:R,labelQuizTimerMinute:P,labelQuizTimerMinutePlural:M,labelQuizTimerRemaining:H,labelQuizTimerShow:F,timerEnabled:T}),(0,n.jsx)(ke,{allowTabNavigation:t,className:Mn("description"),value:x}),(0,n.jsx)(dn.ArcButton,{className:Mn("start-button"),"data-testid":G,hierarchy:"plain",iconEnd:(0,n.jsx)(ie,{name:"chevron-right-solid"}),onClick:t?_:Jt,size:"sm",tabIndex:t?void 0:-1,children:Z})]})})})}function Uoe(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const s=document.querySelector("[data-previous-lesson]");if(!s)return;t(s.clientHeight);const o=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return o.observe(s),()=>{o.disconnect()}},[]),e}const w5=$("quiz");function _oe(){const e=Es();return e?(0,n.jsx)(Goe,{lessonId:e}):null}function Goe({lessonId:e}){const t=re(),s=t?.color,o=Ce(),a=$i()?.prefersKeyboardNavigation??!1,i=ia(e)??"",{activeIndex:c,progress:l,resolvedItems:d,retryAttempts:h,settings:m,sourceItems:f}=Hne({lessonId:e}),v=kne({settings:m}),C=Uoe();Kne({lessonId:e,items:f});const g=Sne(d.length),x=Tne(c),{items:y,startOffset:T}=Lne(d,c);return(0,n.jsxs)("section",{className:w5(),"data-quiz":!0,"data-testid":"quiz",children:[m?.timer&&(0,n.jsx)(j5,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:c===g,isStartScreenActive:c===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:m?.timerDisplay??void 0,timerEnabled:m?.timer}),(0,n.jsxs)("div",{className:w5("wrap"),children:[x&&(0,n.jsx)("div",{className:yp({activeIndex:c,index:0}),children:(0,n.jsx)(zoe,{isActive:c===0,lessonId:e})}),y.map((S,b)=>{const L=S.type===ss.MULTIPLE_CHOICE;return(0,n.jsx)(poe,{color:s,hasStart:!0,id:e,index:b+T,isCard:!0,isCorrectAnswerUnshuffled:L?vne(S.shuffledAnswerIndices,S.answers,S.correct):void 0,isShuffled:gne(S.shuffledAnswerIndices,S.answers),isTimedQuiz:m?.timer,item:S,items:d,labels:o??{},onChoiceSelect:v.onChoiceSelect,onFillInChange:v.onFillInChange,onMatchSet:v.onMatchSet,onResponseToggle:v.onResponseToggle,prefersKeyboardNavigation:a,progress:l,quizTop:C,reportAnswer:Lg,retryAttempts:h,scrollId:"page-wrap",setNextIndex:v.onSetIndex,settings:m??void 0,submitAction:v.onSubmit,title:i},`item-${S.id}`)}),(0,n.jsx)("div",{className:yp({activeIndex:c,index:g}),inert:g===c?void 0:!0,children:(0,n.jsx)(Aoe,{questionCount:d.length})})]})]})}const Woe=({lessonProgress:e})=>(0,n.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper",children:(0,n.jsx)(Su,{children:(0,n.jsxs)("div",{className:"page__content",children:[(0,n.jsx)(a5,{lessonProgress:e,type:"quiz"}),(0,n.jsx)(_oe,{},e?.retryAttempts??0)]})})})}),Koe=Oe("LessonHeader"),Qoe=$("lesson-header"),Yoe=({authorName:e,avatar:t,children:s,color:o,description:r,labels:{lessonName:a,lessonPreposition:i},lessonHeaderColor:c,lessonHeaderImageColor:l,lessonHeaderSize:d,lessonHeaderStyle:h,partnerContentAuthors:m,totalLessons:f,lessonNumber:v,showAuthor:C,showLessonCount:g,title:x})=>{const y=YE(),T=Es(),S=D1(y),b=h===se.IMAGE,L=Qoe("top-wrap"),{alpha:N,ariaLabel:k,media:E,role:j}=xr("lessonHeaderImage"),A=E?.image,I=(0,u.useMemo)(()=>{if(A&&b){const w=l===nt.LIGHT?"#fff":"#000";return ul({alpha:N,color:w,url:it(A)})}},[A,b,l,N]);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tH,{ariaLabel:b?k:void 0,imgRole:b?j:void 0,sectionStyles:I,topWrapClassName:L,children:(0,n.jsx)(Koe,{authorName:e,avatar:t,color:o,description:r,lessonHeaderColor:c,lessonHeaderSize:d,lessonHeaderStyle:h,lessonId:T,lessonName:a,lessonNumber:v,lessonPreposition:i,partnerContentAuthors:m,showAuthor:C,showLessonCount:g&&!S,title:x,totalLessons:f})}),s]})};function Zoe(e){const t=e?.customColorLessonHeaderContrast,s=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const o=Ns(s),r=t??o;return(r===be.AUTO?o:r)===be.DARK?xt.DARK:xt.LIGHT},[t,s])}var Xoe=p(89950),Ep=p.n(Xoe);p.dn(A5);function A5({authors:e,lessonAuthor:t,courseAuthor:s,selectedAuthorId:o}){if(o==="none")return{};if(o){const r=Ep()(e,{id:o});if(r)return r}if(t){const r=Ep()(e,{id:t});if(r)return r}if(s){const r=Ep()(e,{id:s});if(r)return r}return{}}const{LARGE:qoe,SMALL:Joe}=ui,{ACCENT:ere,BLACK:tre,COLOR:R5,DARK:sre,GRAY:nre,IMAGE:P5,LIGHT:ore,TINT:rre}=se,are=$("lesson-header-wrap");function ire({handleNavigate:e,isMobileHeader:t,lesson:s,lessonProgress:o,loadMedia:r}){const a=mr(),i=Ce(),c=Bi(),l=$i(),{previewType:d}=md(),h=Zoe(a?.theme);if(!a||!i||s.type!=="blocks"&&s.type!=="quiz")return null;if(s.type==="quiz")return(0,n.jsx)(Woe,{lessonProgress:o?.type==="quiz"?o:void 0});const m=PC({course:a,lesson:s}),f=typeof m=="object"&&m!==null&&"id"in m&&(typeof m.id=="string"||typeof m.id=="number")?String(m.id):null,v=_I({course:a,lesson:s}),C=GI(a),{author:g,selectedAuthorId:x}=s,{prefersKeyboardNavigation:y}=l??{},{authors:T,color:S,enableVideoPlaybackSpeed:b,showLessonCount:L,theme:N}=a,{hideLessonHeaders:k,lessonHeaderColor:E,lessonHeaderImageColor:j,lessonHeaderSize:A,lessonHeaderStyle:I,navigationType:w,showAuthor:O}=N??{},P=c.find(oe=>oe.id===x)?.data?.authors,M=A5({authors:T,lessonAuthor:g,courseAuthor:a.author,selectedAuthorId:x}),{avatar:H,authorName:F}=M,B=(0,n.jsx)(Yoe,{authorName:F,avatar:H,color:S,description:s.description,labels:i,lessonHeaderColor:E,lessonHeaderImageColor:j,lessonHeaderSize:A,lessonHeaderStyle:I,lessonNumber:v,partnerContentAuthors:P,showAuthor:O,showLessonCount:L,title:s.title,totalLessons:C,children:(0,n.jsx)(a5,{id:s.id,items:s.items,lessonProgress:o,navigationType:w,scrollPosition:0,type:s.type})}),G=`image-${(j??nt.DARK).toLowerCase()}`,_=are({[G]:I===P5,accent:I===ere,black:I===tre,collapsed:k,custom:I===R5,dark:I===sre,gray:I===nre,image:I===P5,large:A===qoe&&!t,light:I===ore,mobile:t,small:A===Joe&&!t,tint:I===rre}),Z=I===R5?{"--lesson-header-contrast-color":h,"--color-background":E}:{};return(0,n.jsx)(une,{animateBlockEntrance:a.animateBlockEntrance??!1,color:S??"",courseTitle:a.title,data:s,enableVideoPlaybackSpeed:b??!1,handleNavigate:e,hideLessonHeaders:k??void 0,labels:i,lessonHeader:B,lessonHeaderWrapClasses:_,lessonHeaderWrapStyles:Z,lessonProgress:o?.type==="blocks"?o:void 0,loadMedia:r,nextLesson:f,prefersKeyboardNavigation:y,previewType:d})}const cre=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:s="Completion Requirement",labelPercentCompletion:o="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:a="Requirement completed, check mark",labelA11yRequirementNotCompleted:i="Requirement not completed, empty square"})=>{const c=on();if(t==null)return null;const l=ba({percent:t,label:o,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,n.jsxs)("div",{className:"progress-summary__requirement",children:[(0,n.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,n.jsx)("h2",{className:"progress-summary__requirement-title",children:s}),(0,n.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,n.jsx)("div",{children:l}),(0,n.jsxs)("div",{children:[r,"\xA0",(0,n.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,n.jsx)(M5,{labelA11yRequirementCompleted:a,labelA11yRequirementNotCompleted:i,requirementMet:e!=null&&t<=e})]})},lre=({outOfAttempts:e,quizPassed:t,quizPassingScore:s=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=on();if(!a)return null;const g=ba({percent:s,label:l,isRTL:C});return(0,n.jsxs)("div",{className:"progress-summary__requirement",children:[(0,n.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,n.jsx)("h2",{className:"progress-summary__requirement-title",children:i}),(0,n.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,n.jsxs)("div",{children:[c," ",g," ",r]}),o==null?(0,n.jsx)("div",{children:(0,n.jsx)(rs,{className:"progress-summary__requirement-stats-link brand--color",to:ks(a),children:d})}):(0,n.jsxs)("div",{children:[h,"\xA0",(0,n.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[o,"%"]})]})]}),e&&(0,n.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,n.jsx)(M5,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:v,requirementMet:t})]})},M5=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:s})=>e?(0,n.jsx)(ie,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,n.jsx)("div",{"aria-label":s,className:"progress-summary__requirement-checkbox-empty",role:"img"}),dre=({dueAt:e})=>e?(0,n.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:qh(e)}):null;var ure=p(68508),hre=p.n(ure);const mre=900,fre=1e4;function pre(){const[e,t]=(0,u.useState)(!1),[s,o]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const a=setTimeout(()=>{t(!0),r=setTimeout(()=>o(!1),fre)},mre);return()=>{clearTimeout(a),clearTimeout(r)}},[]),{recycle:s,run:e}}const gre=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],vre=()=>{const{recycle:e,run:t}=pre(),s=(0,u.useRef)(null);return(0,n.jsx)("div",{className:"progress-summary__confetti",children:(0,n.jsx)(hre(),{canvasRef:s,colors:gre,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var Cre=p(15029);const O5=$("progress-summary-card"),xre=({completeLabel:e,isComplete:t,isUrgent:s,completedDate:o,labelDue:r})=>t?(0,n.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,n.jsx)("span",{className:"progress-summary-card__completed-date",children:o})]}):r?(0,n.jsx)("div",{className:["progress-summary-card__due-label",s?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,bre=({cardImageKey:e=null,className:t,color:s="#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:x=Jt,progress:y=0,title:T=""})=>{const S=Ce(),b=on(),L=o!==null,N=(0,u.useCallback)(()=>{a||x?.()},[a,x]),k=(0,u.useCallback)(P=>{Dh(P)&&P.preventDefault(),!a&&ua(P)&&x?.()},[a,x]),E=ba({percent:Math.round(y),label:S?.progressSummaryPercentComplete||"% Complete",isRTL:b}),j=e||r,A=S?.progressSummaryCompleted||"Completed: ",I=o===null?"":`${ln()(new Date(o)).format("MM/DD/YY")}`,w=O5("card",{disabled:a}),O=["progress-summary-card__title-button",t].filter(Boolean).join(" "),R=O5("image-overlay",{"not-started":!(y||L),"in-progress-completed":y||L});return(0,n.jsxs)("div",{"aria-hidden":l,className:w,onClick:N,children:[(0,n.jsxs)("div",{className:"progress-summary-card__content",children:[(0,n.jsx)("button",{"aria-disabled":a,className:O,onKeyDown:k,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,n.jsx)("span",{className:"progress-summary-card__title",children:T||S?.progressSummaryNoTitle||"(No Title)"})}),(0,n.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,n.jsx)("div",{className:"progress-summary-card__hide",children:g}),c&&(0,n.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!y&&!a&&!o&&(0,n.jsx)("span",{className:"progress-summary-card__hide",children:E}),!i&&!L&&(0,n.jsx)("div",{className:"progress-summary-card__duration",children:C}),(0,n.jsx)(xre,{completedDate:I,completeLabel:A,isComplete:L,isUrgent:m,labelDue:v})]})]}),(0,n.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,n.jsx)(Cre.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:j,imagesUri:d,s:"cover",style:{backgroundColor:s},w:300}),(0,n.jsx)("div",{className:R}),(0,n.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!y&&!a&&!L&&(0,n.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,n.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,n.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${y}%`}})})})})]})]})},yre=Ee("IMAGES_URI"),B5=(e,t)=>e===1?t:t.concat("s"),Ip=e=>e?.course?.course?.lessons??[],Sre=e=>t=>Ip(t).find(s=>s.type!=="section"&&s.id!=null&&!e.includes(s.id)),Tre=e=>{const t=Ip(e),{trackingQuizId:s,score:o}=e??{};if(s&&t.length){const r=t.find(({id:i})=>i===s),{settings:{passingScore:a}={}}=r??{};return Number(o)<Number(a)?r:!1}},Lre=e=>Ip(e).find(t=>t.type!=="section"),kre=(e,t)=>(Sre(e)(t)||Tre(t)||Lre(t))?.id??"",Nre=e=>{const t=ln().duration(e),s=t.hours(),o=t.minutes(),r=`${s} ${B5(s,"hr")}`,a=`${o} min`;return s>=100?"100+ hrs":s>0&&o>0?[r,a].join(" "):s>0?r:a},Ere=({color:e,learningPathId:t})=>{const{learningPathComplete:s,isSuccess:o,nextCourse:r}=le(x=>x.learningPathUpNext??{}),{dueAt:a,courseId:i="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=Ce(),f=(0,u.useMemo)(()=>kre(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}`)):DN(`${i}/lessons/${f}`)},[i,t,f,d]);return o&&!s&&(0,n.jsx)("div",{className:"progress-summary__lp-next",children:(0,n.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,n.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,n.jsx)(ie,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,n.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,n.jsx)(bre,{imagesUri:yre,labelCount:`${c} ${B5(c,"lesson")}`,labelDue:qh(a),labelDuration:Nre(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:g,...C})})]})})},Ire=`${Ee("CDN_URI")}/assets/rise/assets/trophy.svg`,jre=e=>Object.values(e).filter(({isComplete:t})=>t).length,wre=e=>{const{color:t,course:s={},courseProgress:o={},lessons:r=[]}=e,a=rt(),{learningPathComplete:i,lpHasFailedQuiz:c}=le(D=>D.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=o,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:v=[],riseComCourseId:C,riseComLearningPathId:g,trackingCompletionPercentage:x,trackingQuizId:y}=s,T=sa(),S=Ce(),b=S??{},L=x==null&&y==null,N=L?d===100:xg(),k=v.length,E=jre(l),j=(0,u.useCallback)(()=>{a(GN({courseId:C,learningPathId:g}))},[a,C,g]);(0,u.useEffect)(()=>{g&&j()},[]);const A=(0,u.useMemo)(()=>N?s.completedAt?s.completedAt:new Date:null,[s.completedAt,N]),I=(0,u.useMemo)(()=>r.find(D=>D.type==="quiz"&&D.id===y),[y,r]),w=at(I?.title),O=(0,u.useMemo)(()=>Number(I?.settings?.passingScore??100),[I]),R=y?o.lessons?.[y]:void 0,P=R?.passed??null,M=(0,u.useMemo)(()=>R?.percentComplete===100?R.score??null:null,[R]),H=MC(o,I,y),F=typeof H=="object"&&H!==null&&"outOfAttempts"in H&&H.outOfAttempts===!0,B=y?P:!0,V=ws(),G=L?"progress-summary progress-summary__no-req":"progress-summary",_=vo(s),Z=`You've completed ${E} of ${k} lessons.`,Q=_?N?"Complete":"Incomplete":Z,z=String(Yi(T+" - Progress Summary"));return(0,n.jsx)(Tr,{title:z,children:(0,n.jsxs)("div",{className:G,children:[N&&f&&B&&!V&&(0,n.jsx)(vre,{}),(0,n.jsxs)("header",{className:"progress-summary__header",children:[(0,n.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,children:N&&!L&&B?S?.progressSummaryCongratulations||"Congratulations!":S?.progressSummary||"Progress Summary"}),L?(0,n.jsx)("div",{className:"progress-summary__lessons-completed",children:Q}):N?(0,n.jsxs)("div",{className:"progress-summary__header-completion-date",children:[B&&(0,n.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:Ire}),ln()(A).format("MMMM Do, YYYY")]}):(0,n.jsx)(dre,{dueAt:h})]}),(0,n.jsxs)("section",{className:"progress-summary__section",children:[!L&&N&&(0,n.jsx)("div",{className:"progress-summary__requirements-met",children:S?.progressSummaryRequirementsMet||"You've met all the requirements."}),L?!g&&(0,n.jsxs)(rs,{className:"progress-summary__start-over",to:"/",children:[S?.progressSummaryStartOver||"Start Over",(0,n.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,n.jsxs)("div",{className:"progress-summary__requirements",children:[(0,n.jsx)(cre,{labelA11yRequirementCompleted:S?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:S?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:b.progressSummaryCompletionRequirement,labelPercentCompletion:b.progressSummaryPercentCompletion,labelYouCompleted:b.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:x}),(0,n.jsx)(lre,{labelA11yRequirementCompleted:S?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:S?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:b.progressSummaryNoAttemptsRemaining,labelQuizRequirement:b.progressSummaryQuizRequirement,labelScoreOf:b.progressSummaryScoreOf,labelScoreOfPreposition:b.progressSummaryScoreOfPreposition,labelViewQuiz:b.progressSummaryViewQuiz,labelYouScored:b.progressSummaryYouScored,outOfAttempts:F,quizPassed:P,quizPassingScore:O,quizScore:M,quizTitle:w,trackingQuizId:y})]}),(N||L)&&(0,n.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,n.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:BN,role:"link",type:"button",children:S?.progressSummaryBackToLearning||"Back to my learning"}),N&&(!g&&m||g&&i)&&m&&B&&!c&&(0,n.jsx)("span",{className:"progress-summary__completion-control",children:(0,n.jsx)(Sz,{})})]})]}),N&&!!g&&(0,n.jsx)(Ere,{color:t,learningPathId:g})]})})},D5=({contentClassName:e,...t})=>(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,n.jsx)(Su,{children:(0,n.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,n.jsx)(wre,{...t})})})})}),F5={addEventListeners(e,t){e.addEventListener("animationend",t,!1)},removeEventListeners(e,t){e.removeEventListener("animationend",t,!1)}};function Are({getNavigateDirection:e,ref:t}){const s=(0,u.useRef)(null),o=(0,u.useRef)(0),[r,a]=(0,u.useState)(!1),i=(0,u.useCallback)((c,l)=>{const d=e(),h=s.current;if(!h){l();return}const m=`page ${d}-${c}`,f=()=>{c==="enter"?h.className=`page ${d}-complete`:h.className="page",F5.removeEventListeners(h,f),window.dispatchEvent(new CustomEvent(bx)),l()};h.className=m,F5.addEventListeners(h,f)},[e]);return(0,u.useImperativeHandle)(t,()=>({componentWillEnter(c){i("enter",c)},componentDidEnter(){a(!0)},componentWillExit(c){const l=document.getElementById("page-wrap"),d=l?.scrollTop??0;l&&(l.scrollTop=0),o.current=d,i("leave",c),window.dispatchEvent(new CustomEvent(xx)),s.current&&(s.current.scrollTop=o.current)},componentDidExit(){}}),[i]),{hasTransitioned:r,markInitialTransitionComplete:()=>a(!0),nodeRef:s}}function Rre({content:e,getNavigateDirection:t,handleNavigate:s,isMobileHeader:o,lessonId:r,lessonProgress:a,onPageReady:i,ref:c}){const{didNavigate:l}=md(),d=mr(),h=pr(),m=jt(),{visibleLessons:f,registerLesson:v,unregisterLesson:C}=vG(),{hasTransitioned:g,markInitialTransitionComplete:x,nodeRef:y}=Are({getNavigateDirection:t,ref:c});(0,u.useEffect)(()=>(x(),e.kind==="lesson"&&(kg(r),fs(oN(r))),v(r),()=>{C(r)}),[]),LG({didNavigate:l,hasTransitioned:g,onPageReady:i});const T=m(d?.title),{contentTitle:S,lessonContent:b}=(()=>{switch(e.kind){case"progress-summary":return{contentTitle:"Progress Summary",lessonContent:(0,n.jsx)(D5,{course:d,courseProgress:h,lessons:d?.lessonsOnly})};case"lesson":return{contentTitle:m(e.lesson.title),lessonContent:(0,n.jsx)(ire,{handleNavigate:s,isMobileHeader:o,lesson:e.lesson,lessonProgress:a,loadMedia:r===f[0]})}}})();return(0,n.jsx)(Tr,{title:Yi(`${S} - ${T}`),children:(0,n.jsx)("div",{className:"page page-transition-complete","data-lesson-id":r,ref:y,children:b})})}var Pre=p(20855),H5=p(65577);function Mre(e){return e?.slidesUI?.slideDirection??Js.UP}function Ore(){return le(Mre)}function Bre(e){return e?.slidesUI?.exitingSlideOffset??0}function Dre(){return le(Bre)}var Fre;const Hre=1024,$re=16/9,$5=Hre/$re,Vre=e=>typeof e=="string"||typeof e=="number",zre=e=>Fre(e)&&e.type==="slide"&&Array.isArray(e.items),kc=e=>{if(!(!Xt(e)||!Xt(e.experiments)))return e.experiments},Ure=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(Vre).map(s=>t[String(s)]).filter(zre),H1e=(e,t)=>Ure(e,t).map(s=>s.id),_re=e=>kc(e)?.showTitle!==!1,V5=e=>kc(e)?.imageTextLayout,z5=e=>e!==void 0,Gre=e=>z5(V5(e)),Wre=e=>Gre(e)&&kc(e)?.showDescription!==!1,Kre=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isOverlay:e==="overlay"}),Qre=e=>kc(e)?.titleVariant,$1e=e=>e&&kc(e)?.speakerNotes||"",U5=$("presentation-logo"),Yre=()=>{const e=re(),t=e?.theme?.showLogo??!0;if(!_r(e)||t===!1)return null;const s=e?.theme?.logoPosition??ek;return(0,n.jsx)(Km,{className:U5({[J8[s]]:!0}),imageClassName:U5("image")})};function Zre(e,{designHeight:t,fit:s="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=s==="contain"&&t?Math.min(C,v>0?v/t:1):C;a(x=>x===g?x: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,s]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:s==="contain"?"center":"top left"};return{containerRef:o,scale:r,scaleStyle:c}}const _5=$("presentation-slide-frame");function Xre({children:e}){const{containerRef:t,scaleStyle:s}=Zre(1024,{designHeight:$5,fit:"contain"});return(0,n.jsx)("div",{className:_5(),ref:t,children:(0,n.jsx)("div",{className:_5("canvas"),style:{width:1024,height:$5,...s},children:e})})}const $t=$("blocks-lesson-slide"),G5="#fff",qre=e=>Xt(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",Jre=e=>Xt(e)&&(typeof e.id=="string"||typeof e.id=="number"),W5=e=>{const t={...e,id:e.id??e.blockId};return Jre(t)?t:null},eae=["image full","image text overlay","quote background"],K5=({className:e})=>{const t=Is()||G5;return(0,n.jsx)("div",{className:e,style:{background:t}})},tae=({block:e})=>{const t=W5(e);return t?(0,n.jsx)(wh,{block:t,children:(0,n.jsx)(K5,{className:$t("background-top")})}):null},sae=({block:e})=>{const t=W5(e);return t?(0,n.jsx)(wh,{block:t,children:(0,n.jsx)(K5,{className:$t("background-bottom")})}):null};function nae(e,t){const s=t.blocks?.length??1,o=s==1,r=s==2,a=t.blocks?.[0],i=t.blocks?.find(I=>I.settings?.backgroundType===se.IMAGE),c=e.settings?.backgroundType===se.IMAGE,l=e.id===a?.id,d=e.family==="multimedia",h=e.family==="mondrian",m=e.family==="survey",f=e.family==="buttons",C=e.variant==="accordion"&&document.querySelector(`[data-block-id="${e.id}"] [data-accordion-status="closed"]`)!=null,g=(document.querySelector(`[data-block-id="${e.id}"] [data-block-text]`)?.clientHeight??0)>300,x=rne(e.family??"",e.variant??"")||g,y=document.querySelector("[data-continue-sr]")!=null,T=!x&&r&&y&&document.querySelector("[data-continue-btn]")==null,S=o&&c&&!T,b=c&&!T&&!x,L=d||f||h||m;return $t("connected-blocks",{"min-half-height":i&&(r&&!T&&!x||C||b),"full-height":T||S,"top-block":l&&!o&&!x&&!L,"top-block-centered":l&&!o&&L})}const oae=({hasTransitioned:e,onContinue:t,prefersKeyboardNavigation:s,previewType:o,ref:r,slide:a,transitionState:i})=>{const c=re(),l=Es()??"",d=Ce(),h=Bi(),m=Io(l),f=m?.type==="blocks"?m:void 0,v=!0,{animateBlockEntrance:C,color:g,title:x,enableVideoPlaybackSpeed:y}=c,T=Ore(),S=Dre(),b=a?.lastBlock,L=(0,u.useCallback)(xe=>{xe===b?.id&&t()},[b,t]);if(!a)return null;const N=`${i}-${T}`,k=$t("wrapper",{exiting:i==="exiting"}),{blocks:E,lessonTitle:j,lessonDescription:A,shouldShowAnimation:I=C,shouldShowTitle:w=!0,shouldShowDescription:O=!0,imageTextLayout:R,titleVariant:P}=a,M=_r(c),H=M&&!R&&a.blocks?.[0]?.family==="multimedia",F=$t("inner",{[N]:!0,presentation:M}),B=$t("lesson-title",{heading:P==="heading",subheading:P==="subheading"}).toString(),V=$t("lesson",{slides:v,"touch-preview":tc(o),media:H}).toString(),G=a.blocks.length==1,{settings:_,type:Z,variant:oe}=a.blocks?.[0]??{},Q=G&&_?.backgroundType===se.IMAGE,z=G&&!Q&&eae.includes(`${Z} ${oe}`),D=!M&&(z||Q),U=a.blocks?.[0],K=a.blocks?.[a.blocks.length-1],Y=U?.settings?.backgroundType!==se.IMAGE,q=K?.settings?.backgroundType!==se.IMAGE,ee=$t("full-width-image",{legacy:z,background:Q}),J=w&&j,ne=z5(R)&&O&&A,te=(J||ne)&&(0,n.jsxs)("div",{className:$t("lesson-header"),children:[J&&(0,n.jsx)(ke,{className:B,tagName:"h1",value:j}),ne&&(0,n.jsx)(ke,{className:$t("lesson-description").toString(),value:A})]}),Te=R?Kre(R):void 0,W=!Te&&I,ue=Te?.imagePosition==="left",fe=E.map((xe,ge)=>{const Ye=G?!1:r5({blocks:a.blocks,lessonProgress:f,currentBlockIndex:ge}),Vt=D?ee:nae(xe,a),zt={...xe,blockId:xe.blockId??xe.id};if(!qre(zt))return null;const dt=zt;return(0,n.jsx)(vp,{animateBlockEntrance:W,block:dt,className:Vt,color:g,courseTitle:x,defaultBackgroundColor:G5,enableVideoPlaybackSpeed:y,hideBlock:Ye,index:ge,isLastBlock:!1,isOnlyBlockInStep:G,labels:d,lessonId:l,lessonProgress:f,loadMedia:e,match:void 0,onContinue:L,partnerContent:h,prefersKeyboardNavigation:s,previewType:o},dt.blockId)}),pe=Te?.isOverlay?(0,n.jsxs)("div",{className:$t("composition",{overlay:!0,bleed:!0}),children:[(0,n.jsx)("div",{className:$t("composition-image"),children:fe}),(J||ne)&&(0,n.jsxs)("div",{className:$t("composition-overlay-text"),children:[J&&(0,n.jsx)(ke,{className:B,tagName:"h1",value:j}),ne&&(0,n.jsx)(ke,{className:$t("lesson-description").toString(),value:A})]})]}):Te?(0,n.jsx)("div",{className:$t("composition",{bleed:Te.isFullBleed,"image-left":Te.imagePosition==="left","image-right":Te.imagePosition==="right"}),children:(ue?["image","text"]:["text","image"]).map(xe=>xe==="image"?(0,n.jsx)("div",{className:$t("composition-image"),children:fe},"image"):(0,n.jsx)("div",{className:$t("composition-text"),children:te},"text"))}):(0,n.jsxs)(n.Fragment,{children:[te,fe]}),he=(0,n.jsxs)("div",{className:F,children:[U&&Y&&(0,n.jsx)(tae,{block:U}),K&&q&&(0,n.jsx)(sae,{block:K}),(0,n.jsx)("div",{className:V,ref:r,children:pe}),(0,n.jsx)(Yre,{})]});return M?(0,n.jsx)(Xre,{children:he}):(0,n.jsx)("div",{className:k,style:{top:S},children:he})};var rae=p(27009),aae=p.n(rae);const Q5=$("blocks-slide-indicator-tooltip"),iae=({disabled:e,left:t,ref:s,text:o,top:r,visible:a})=>{let i=(0,n.jsx)("span",{"aria-hidden":"true",children:o});return e&&(i=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(ie,{classNameIcon:Q5("icon"),name:"lock"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,n.jsx)("div",{"aria-hidden":!a,className:Q5("wrapper",{disabled:e,visible:a}),ref:s,role:"tooltip",style:{left:t,top:r},children:i})},Nu=$("blocks-slide-indicator"),cae=({active:e,blockNavigationStyle:t,disabled:s,numberOfSlides:o,onKeyDown:r,onClick:a,ref:i,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=$i()??{},[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),x=t===E0.NUMBERS,y=c+1,T=`${y} / ${o}`,S=e?`Step ${y} of ${o}, current step`:`Go to step ${y} of ${o}`,b=(0,u.useRef)(null);b.current||=document.getElementById("portal");const L=(0,u.useCallback)(()=>{if(v.current&&C.current){const H=v.current.getBoundingClientRect(),F=C.current.getBoundingClientRect(),B=H.left-F.width-18,V=Math.round(H.top-F.height/2+H.height/2);f({left:B,top:V})}},[]),N=(0,u.useCallback)(()=>{g.current=setTimeout(()=>{L(),h(!0)},300)},[L]),k=(0,u.useCallback)(()=>{clearTimeout(g.current),h(!1)},[]),E=(0,u.useCallback)(()=>{a(c)},[a,c]),j=(0,u.useCallback)(H=>{gs(H)&&h(!1),r(H)},[r]),A=(0,u.useCallback)(()=>{N()},[N]),I=(0,n.jsx)(iae,{disabled:s,left:m?.left,ref:C,text:T,top:m?.top,visible:d}),w=Nu("button",{active:e,disabled:s,numbers:x}),O=Nu("wrapper"),R=Nu("circle",{active:e,disabled:s}),P=Nu("number",{active:e,disabled:s}),M=x?(0,n.jsx)("span",{"aria-hidden":"true",className:P,children:y}):(0,n.jsx)(ie,{classNameIcon:R,name:"circle-solid"});return(0,n.jsxs)("div",{className:O,ref:i,children:[(0,n.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":s,"aria-label":S+(s?" (unavailable until previous content is completed)":""),className:w,"data-control":"",onBlur:k,onClick:s?void 0:E,onFocus:l?A:void 0,onKeyDown:j,onMouseEnter:N,onMouseLeave:k,ref:v,type:"button",children:M}),b.current&&(0,Nn.createPortal)(I,b.current)]})},Mr=$("blocks-slide-controls"),Y5=38,lae=8,dae=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:s,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)(y=>{let T=!1,S=-1;if(gr(y)||Gn(y)){if(e-1>=0)S=e-1;else{o();return}T=!0}else vr(y)||Wn(y)?(e+1<=s-1&&(S=e+1),T=!0):u2(y)?(S=0,T=!0):d2(y)&&(S=s-1,a[S]&&(S=a.findLastIndex(b=>!b)),T=!0);S>=0&&!a[S]&&r(S),T&&(y.stopPropagation(),y.preventDefault())},[e,s,o,r,a]);(0,u.useEffect)(()=>{const y=c.current,T=l.current;if(y&&T){const S=y.getBoundingClientRect(),b=T.getBoundingClientRect(),L=S.bottom-Y5,N=S.top+Y5;b.bottom>L?y.scrollBy({top:b.bottom-L,left:0,behavior:"smooth"}):b.top<N&&y.scrollBy({top:b.top-N,left:0,behavior:"smooth"})}},[e]);const C=(0,u.useCallback)(()=>{const y=c.current;y&&(h(y.scrollTop>lae),f(y.clientHeight+y.scrollTop<y.scrollHeight))},[]);(0,Md.A)(C);const g=(0,u.useCallback)(ru()(C,100),[C]);Jl(c.current,C);const x=Mr({"touch-preview":tc(i)});return(0,n.jsx)("div",{className:x,children:(0,n.jsx)("div",{className:Mr("page-control-wrapper"),children:(0,n.jsxs)("div",{className:Mr("page-control-inner-wrapper"),children:[(0,n.jsx)("div",{className:Mr("page-control"),onScroll:g,ref:c,children:(0,n.jsx)("div",{className:Mr("slide-dot-wrapper"),children:aae()(y=>{const T=y===e;return(0,n.jsx)(cae,{active:T,blockNavigationStyle:t,disabled:a[y],numberOfSlides:s,onClick:r,onKeyDown:v,ref:T?l:null,slideIndex:y},y)},s)})}),(0,n.jsx)("div",{className:Mr("overlay-top",{visible:d})}),(0,n.jsx)("div",{className:Mr("overlay-bottom",{visible:m})})]})})})};var Nc=p(82920);const uae=50,hae=1e3,mae=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:s,timeoutDuration:o=hae})=>{const[r,a]=Nc.useState(!1),i=Nc.useRef(void 0),c=Nc.useCallback(()=>{i.current&&clearTimeout(i.current),i.current=setTimeout(()=>a(!1),o)},[o]),l=Nc.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<uae?(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]);Nc.useEffect(()=>{if(!(!s||!t||!e))return s.addEventListener("wheel",l,{passive:!0}),()=>{i.current&&clearTimeout(i.current),s?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,s])},fae="rise-presenter-sync",K1e="presenterMode",pae="slide",gae="NAVIGATE_TO_SLIDE",vae="SLIDE_CHANGE",Q1e="PRESENTER_VIEW_EXIT";function Cae(e){const t=new URLSearchParams(e).get(pae);if(t==null)return 0;const s=Number(t);return Number.isFinite(s)&&s>=0?s:0}function xae(){const e=window.location.hash.split("?")[1]||"";return Cae(e)}var Y1e;const Pt=$("lesson-one-page-slides"),bae=$("page-wrap"),Z5=e=>e,X5=100,yae=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}};function q5(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),s=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(s??"")||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 J5=(e,t)=>(s,o,r)=>o5(s,r.slice(0,-1),e,void 0,t),Sae=(e,t)=>({disabled:s,slides:o},r)=>{const a=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),i=r[r.length-1],c=s||sne(a)||nne(a,t),l={blocks:a,lastBlock:i,disabled:s};return{disabled:c,slides:[...o,l]}},Eu=e=>{let t=!1,s=!1;if(e){const{clientHeight:o,scrollHeight:r,scrollTop:a}=e,i=Math.max(0,a),c=r-i;t=c===r,s=c-5<=o}return{isAtTop:t,isAtBottom:s}},Tae=/,? +/,Lae=[],kae=({lessonProgress:e,prefersKeyboardNavigation:t,previewType:s})=>{const{announcePolite:o,clearAnnouncements:r}=xn(),a=(0,u.useRef)(null),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=(0,u.useRef)(null),v=(0,u.useRef)(null),C=(0,u.useRef)(null),g=(0,u.useRef)(0),x=(0,u.useRef)(0),y=qt(),T=rt(),[S,b]=(0,u.useState)(()=>xae()),[L,N]=(0,u.useState)(!0),[k,E]=(0,u.useState)(!1),j=(0,Me.A)(L),A=(0,Me.A)(k),I=(0,u.useRef)(void 0),w=ws(),{lessons:O,...R}=re()||{},P=_r(R),M=w||P?.01:600,H=yae(R?.theme)||E0.DOTS,F=O?.[0],B=F?.items||Lae,V=(0,u.useCallback)(()=>{const ye=(c.current?.scrollHeight??0)>(c.current?.clientHeight??0),{isAtBottom:ut}=Eu(c.current),ht=ye&&!L&&!ut;ht!=k&&E(ht)},[k,L]);Jl(a.current,V),(0,u.useLayoutEffect)(V,[L]);const G=(0,u.useCallback)(()=>{c.current?.scrollTo({top:0})},[]),_=R?.theme,Z=(0,u.useMemo)(()=>{const ht=xp([],B,e,_).map(J5(e,_)).filter(Wo=>Wo!==null);return Object.fromEntries(ht.map(Wo=>[Wo.blockId,Wo]))},[B,e,_]),oe=(0,u.useCallback)(ye=>{const ut={disabled:!1,slides:[]},{slides:ht}=ye.reduce(Sae(Z,e),ut);return ht},[Z,e]),Q=(0,u.useMemo)(()=>P?(O??[]).filter(ye=>ye?.type==="slide"):[],[P,O]),z=(0,u.useMemo)(()=>P?Q.map(ye=>{const ut=ye.items.map(J5(e,_));return{blocks:ut,lastBlock:ut[ut.length-1],lessonTitle:ye?.title,lessonDescription:ye?.description,shouldShowTitle:_re(ye),shouldShowDescription:Wre(ye),shouldShowAnimation:ye?.experiments?.showAnimation??!0,imageTextLayout:V5(ye),titleVariant:Qre(ye),disabled:!1}}):o0(B,Gse,oe),[P,Q,B,oe,e,_]),D=(0,u.useMemo)(()=>z.map(ye=>ye.disabled),[z]);(0,u.useEffect)(()=>{g.current=S},[S]),(0,u.useEffect)(()=>{x.current=z.length,z.length>0&&S>=z.length&&b(z.length-1)},[z.length,S]),(0,u.useEffect)(()=>{if(!P)return;const ye=Q[S];ye&&(kg(ye.id),T(sl(ye.id)))},[S,P,Q,T]),(0,u.useEffect)(()=>{if(!(!P||typeof BroadcastChannel>"u"))try{v.current||(v.current=new BroadcastChannel(fae));const ye=v.current,ut=ht=>{if(ht.data.type===gae){const Wo=ht.data.slideIndex,wc=Math.min(Wo,x.current-1);if(wc>=0){const Xie=wc<g.current?Js.DOWN:Js.UP;T(hr(Xie)),C.current&&C.current(wc)}}};return ye.addEventListener("message",ut),()=>{ye.removeEventListener("message",ut)}}catch{}},[P,T,y]),(0,u.useEffect)(()=>{if(!(!P||!v.current))try{v.current.postMessage({type:vae,slideIndex:S})}catch{}},[P,S]),(0,u.useEffect)(()=>()=>{v.current?.close(),v.current=null},[]);const U=z.length,K=U>0?Math.min(S,U-1):0,Y=z[K],q=tc(s),ee=H!==E0.NONE,J=S===U-1,ne=e?.isComplete,te=k||J?!ne||!0:D[S+1],Te=!k&&!J,W=J&&!0,ue=(0,Me.A)(W),fe=k&&!J,pe=(0,u.useCallback)(Zd()(V,100),[V]);(0,u.useEffect)(()=>{const ye=c.current;return ye?.addEventListener("scroll",pe,{passive:!0}),()=>ye?.removeEventListener("scroll",pe)},[pe]),(0,u.useEffect)(()=>{document.activeElement===h.current?!A&&k?d.current?.focus({preventScroll:!0}):!ue&&W&&m.current?.focus({preventScroll:!0}):document.activeElement===d.current&&A&&!k&&h.current?.focus({preventScroll:!0})},[k,A,ue,j,W,L]),(0,Pre.A)(()=>{hy(),I.current=setTimeout(()=>{N(!1),c.current?.focus?.()},M+X5)},()=>{clearTimeout(I.current)});const he=(0,u.useCallback)(ye=>{const ut=a.current?.getBoundingClientRect()?.top??0;T(hE(ut));const ht=Math.max(0,Math.min(ye,z.length-1));b(ht),G()},[T,G,z.length]),xe=(0,u.useCallback)(()=>{L||(N(!0),Yn(()=>{y("/")},"lesson-to-one-page-cover-stepped"))},[y,L]),ge=R?.exportSettings?.webExportSettings,Ye=P||!!(!Sn.isInstantLink&&(R?.lmsOptions?.disableCoverPage||ge?.disableCoverPage)),Vt=(0,u.useCallback)(Ye?()=>{T(hr(Js.DOWN)),he(0)}:xe,[Ye,he,xe,T,hr]);(0,u.useEffect)(()=>{C.current=he},[he]);const zt=(0,u.useCallback)(()=>{L||(S>0?(T(hr(Js.DOWN)),he(S-1)):xe())},[he,T,S,L,xe]),dt=(0,u.useCallback)(()=>{L||(T(hr(Js.UP)),he(S+1))},[he,T,y,J,S,L]),Qt=(0,u.useCallback)(()=>{(S<U-1||J&&!1)&&dt()},[J,S,U,dt]),io=(0,u.useCallback)(()=>{const ye=c.current?.scrollTop??0,ut=c.current?.clientHeight??0,ht=w?"instant":"smooth";c.current?.scrollTo({top:ye+ut,behavior:ht})},[w]),Ke=(0,u.useCallback)(()=>{dt()},[dt]),Yt=(0,u.useCallback)(()=>{io()},[io]),Ut=(0,u.useCallback)(ye=>{if(ye===S||L)return;const ut=ye<S?Js.DOWN:Js.UP;T(hr(ut)),he(ye),queueMicrotask(()=>{l.current?.querySelectorAll("[data-control]")?.[ye]?.focus?.()})},[he,T,S,L]),us=(0,u.useCallback)(()=>N(!0),[]),Le=(0,u.useCallback)(()=>{N(!1),setTimeout(()=>{if(i.current&&l.current?.contains?.(document.activeElement)){const ye=fp()(i.current.innerText,{length:75,separator:Tae});r(),o(`Content preview: ${ye}`)}else c.current?.focus?.()},0)},[o,r]),$e=(0,u.useCallback)(()=>{if(q)return;const{isAtTop:ye}=Eu(c.current);if(ye){S===0?Vt():zt();return}},[q,zt,S,Vt]),Ys=(0,u.useCallback)(()=>{if(q||J||te)return;const{isAtBottom:ye}=Eu(c.current);if(ye){Ke();return}},[J,te,q,Ke]),co=(0,u.useCallback)(()=>{const{isAtBottom:ye,isAtTop:ut}=Eu(c.current),ht=document.documentElement.clientWidth===window.innerWidth;return(ye||ut)&&ht},[]),Br=(0,u.useCallback)(ye=>{!l.current?.contains?.(document.activeElement)&&!q5(ye.target)&&$e()},[$e]),Mu=(0,u.useCallback)(ye=>{!l.current?.contains?.(document.activeElement)&&!q5(ye.target)&&Ys()},[Ys]),b4=(0,u.useCallback)(ye=>{const{itemId:ut}=ye.detail,ht=z.findIndex(Wo=>Wo.blocks.find(wc=>wc.id===ut));ht===-1||ht===S||(T(hr(ht>S?Js.UP:Js.DOWN)),he(ht))},[z,S,T,he]);(0,u.useEffect)(()=>(window.addEventListener(Ge,b4),()=>{window.removeEventListener(Ge,b4)})),(0,H5.A)("ArrowUp",Z5,Br),(0,H5.A)("ArrowDown",Z5,Mu),mae({target:c.current,onSwipeUpHandler:$e,onSwipeDownHandler:Ys,timeoutDuration:M+X5});const Yie=Pt("gradient",{visible:k}),Zie=(0,n.jsxs)("nav",{"aria-label":"Slide navigation",className:Pt("presentation-controls"),ref:l,children:[(0,n.jsxs)("button",{"aria-disabled":S===0&&Ye,"aria-hidden":S===0&&Ye,className:Pt("presentation-btn"),onClick:zt,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Pt("presentation-arrow-icon"),name:"chevron-left"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,n.jsx)("span",{"aria-hidden":!0,className:Pt("counter"),children:`${S+1} / ${U}`}),(0,n.jsxs)("button",{"aria-disabled":te,"aria-hidden":!Te,className:Pt("presentation-btn"),onClick:te?void 0:Ke,ref:h,tabIndex:J?-1:void 0,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Pt("presentation-arrow-icon"),name:"chevron-right"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,n.jsx)("div",{className:Pt({}),children:(0,n.jsx)("div",{className:bae({transitioning:L}),id:"page-wrap",ref:c,tabIndex:-1,children:(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper",children:(0,n.jsx)("div",{className:"page__content",children:(0,n.jsx)(Tr,{children:(0,n.jsxs)("div",{"data-lesson-id":F?.id,children:[P?Zie:(0,n.jsxs)("nav",{"aria-label":"Step navigation",className:Pt("controls",{"touch-preview":q}),ref:l,children:[(0,n.jsxs)("button",{"aria-disabled":S===0&&Ye,"aria-hidden":S===0&&Ye,className:Pt("prev-btn",{"touch-preview":q}),onClick:zt,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Pt("arrow-icon",{"touch-preview":q}),name:"arrow-up"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),ee&&(0,n.jsx)(dae,{activeSlideIndex:S,blockNavigationStyle:H,numberOfSlides:U,onGoToCover:xe,onSlideClick:Ut,previewType:s,slideDisabledState:D}),(0,n.jsxs)("div",{className:Pt("next-btns"),children:[(0,n.jsxs)("button",{"aria-disabled":!fe,"aria-hidden":!fe,className:Pt("page-down-btn",{"touch-preview":q}),onClick:fe?Yt:void 0,ref:d,tabIndex:fe?void 0:-1,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Pt("arrow-icon",{"touch-preview":q}),name:"arrow-down"}),(0,n.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!k&&(0,n.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),J&&(0,n.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,n.jsxs)("button",{"aria-disabled":te,"aria-hidden":!Te,className:Pt("next-btn",{"touch-preview":q}),onClick:te?void 0:Ke,ref:h,tabIndex:J?-1:void 0,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Pt("arrow-icon",{"touch-preview":q}),name:"arrow-down"}),(0,n.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",te&&(0,n.jsx)("span",{children:"(disabled until content is completed)"}),J&&(0,n.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,n.jsxs)("button",{"aria-disabled":!W,"aria-hidden":!W,className:Pt("restart-btn",{"touch-preview":q}),onClick:W?Vt:void 0,ref:m,tabIndex:J?void 0:-1,type:"button",children:[(0,n.jsx)(ie,{classNameIcon:Pt("restart-icon",{"touch-preview":q}),name:"arrow-rotate-left"}),(0,n.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,n.jsxs)(Ed,{onShouldRecognizeGesture:co,onSwipeDown:$e,onSwipeUp:Ys,children:[(0,n.jsx)("main",{"aria-describedby":"step-counter",ref:i,tabIndex:0,children:(0,n.jsx)(Qo,{children:(0,n.jsx)(Pc,{mountOnEnter:!0,nodeRef:f,onExited:Le,onExiting:us,timeout:M,unmountOnExit:!0,children:ye=>(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"visually-hidden-always",id:"step-counter",ref:f,children:`Step ${S+1} of ${U}`}),(0,n.jsx)(oae,{hasTransitioned:!L,onContinue:Qt,prefersKeyboardNavigation:t,previewType:s,ref:a,slide:Y,transitionState:ye})]})},S)})}),(0,n.jsx)("div",{className:Yie})]})]})})})})})})})},Nae=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",jp=1e3,Eae=3,Iae=/^\d+(?:\.\d+)?$/,e4=/^\d+$/,jae=/^\d{2}(?:\.\d{1,3})?$/,Iu=e=>{if(!Number.isFinite(e))return 0;const t=10**Eae;return Math.max(0,Math.round(e*t)/t)},wp=e=>e.toString().padStart(2,"0"),wae=e=>e!=null&&typeof e=="object"?e.time:void 0,X1e=e=>{const t=Math.round(Iu(e)*jp),s=Math.floor(t/36e5),o=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),a=t%jp,i=a===0?"":`.${a.toString().padStart(3,"0")}`;return s>0?`${s}:${wp(o)}:${wp(r)}${i}`:`${Math.floor(t/6e4)}:${wp(r)}${i}`},Aae=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[s,o,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(s!=null&&!e4.test(s)||!e4.test(o)||!jae.test(r))return null;const a=s==null?0:Number.parseInt(s,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)/jp;return Iu(a*3600+i*60+d+h)},q1e=e=>{const t=e.trim();return t.length===0?null:Iae.test(t)?Iu(Number.parseFloat(t)):Aae(t)},oo=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return"timestamp";const s=Reflect.get(t,"settings");if(s==null||typeof s!="object")return"timestamp";const o=Reflect.get(s,"placement");return o==="start"||o==="end"?o:"timestamp"},J1e=e=>oo(e)!=="timestamp",ege=e=>e==="timestamp"?{}:{placement:e},ro=e=>{let t;e!=null&&"checkpoint"in e?t=wae(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const s=typeof t=="number"?t:Number.parseFloat(String(t));return Iu(s)},Rae=null,tge=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&Rae.has(e.variant)),ju=(e,t,s)=>{if(e==null||typeof e!="object")return s;const o=Reflect.get(e,t);return typeof o=="string"&&o.trim().length>0?o:s},Pae=(e,t)=>{if(typeof e=="string"){const s=e.trim();if(s.length>0)return s}return t},Mae=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),s=new Map;return t.forEach((o,r)=>{s.set(o.id,r+1)}),s},Oae=e=>[...new Set(e.filter(t=>oo(t)==="timestamp").map(t=>ro(t)))].sort((t,s)=>t-s),sge=(e,t)=>{const s=[...e].sort((o,r)=>ro(o)-ro(r)).find(o=>ro(o)>t);return{insertBeforeItemId:s?.checkpoint.id??null,insertAtEnd:s==null}},Bae=e=>{const t=e[0]??null,s=t==null?e:e.slice(1),o=[],r=[];let a=null;s.forEach(c=>{if(Nae(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}},Ec=$("video-checkpoint-player");function Dae({activeGroup:e,animateBlockEntrance:t,checkpointGroups:s,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hasQueuedCheckpoints:l=!1,labels:d,lessonId:h,lessonProgress:m,loadMedia:f,onCheckpointCompleted:v,partnerContent:C,prefersKeyboardNavigation:g,previewType:x}){const y=(0,we.g)(),T=(0,u.useMemo)(()=>({params:y}),[y]),S=(0,u.useRef)(!1),b=(0,u.useMemo)(()=>Mae(s),[s]),L=(0,u.useCallback)(()=>{e==null||S.current||(S.current=!0,v?.(e))},[e,v]);if((0,u.useEffect)(()=>{e!=null&&(S.current=!1)},[e]),e==null)return null;const N=ro(e),k=rc(N),E=oo(e),j=E!=="timestamp",A=b.get(e.checkpoint.id),I=j?ju(d,E==="start"?"videoCheckpointStart":"videoCheckpointDone",E==="start"?"Start video":"Done"):`${d?.videoCheckpointDefaultTitle||"Checkpoint"} ${A??""}`,w=Pae(e.checkpoint?.title,I),O=e.blocks??[];let R;l?R=ju(d,"videoCheckpointContinue","Continue"):E==="start"?R=ju(d,"videoCheckpointStart","Start video"):E==="end"?R=ju(d,"videoCheckpointDone","Done"):R=d?.videoCheckpointResume||"Resume video";const P=w;return(0,n.jsx)(gd,{className:Ec(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",footer:(0,n.jsxs)("button",{"aria-label":`${R} \u2014 ${w}`,className:Ec("resume"),onClick:L,type:"button",children:[R,(0,n.jsx)(Sm,{className:Ec("resume-icon"),decorative:"true"})]}),heading:P,onClose:L,subText:j?void 0:`${d?.videoCheckpointPausedAt||"Paused at"} ${k}`,children:(0,n.jsx)("div",{className:Ec("blocks"),"data-testid":"video-checkpoint-content",children:O.length===0?(0,n.jsx)("p",{className:Ec("empty"),children:d?.videoCheckpointNoContent||"No content added to this checkpoint."}):O.map((M,H)=>(0,n.jsx)(vp,{animateBlockEntrance:t,block:{...M,blockId:M.id},color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hideBlock:!1,index:H,isLastBlock:H===O.length-1,labels:d,lessonId:h,lessonProgress:m,loadMedia:f,match:T,onContinue:Jt,partnerContent:C,prefersKeyboardNavigation:g,previewType:x},`checkpoint-overlay-${M.id}`))})})}const t4=(e,t,s)=>{fs(T2({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:ro(t),checkpoint_placement:oo(t),lesson_id:s}}))},Fae=e=>e?.containerElement?.querySelector("video")??null;function Hae(e,t){const s=(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 b=[],L=[];return e.forEach(N=>{const k=oo(N);k==="start"?b.push(N):k==="end"&&L.push(N)}),{startGroups:b,endGroups:L}},[e]),h=(0,u.useMemo)(()=>Oae(e),[e]),m=(0,u.useCallback)(b=>{oo(b)==="timestamp"&&s.current?.seekToTime?.(ro(b)),s.current?.pause?.(),r(b),t4("Video Checkpoint Viewed",b,t)},[t]),f=(0,u.useCallback)(b=>{if(b.length===0)return;const[L,...N]=b;a.current=N,c(N.length>0),m(L)},[m]),v=(0,u.useCallback)(b=>{t4("Video Checkpoint Completed",b,t);const L=a.current.shift();if(L!=null){c(a.current.length>0),m(L);return}c(!1),r(null),oo(b)!=="end"&&s.current?.play?.()},[t,m]),C=(0,u.useRef)(!1);(0,u.useEffect)(()=>{C.current||l.length===0||(C.current=!0,f(l))},[l,f]);const g=(0,u.useRef)(d);g.current=d;const x=(0,u.useRef)(null),y=(0,u.useRef)(null),T=(0,u.useRef)(!1);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:h,setVideoPlayerRef:b=>{s.current=b,x.current!=null&&y.current!=null&&(x.current.removeEventListener("ended",y.current),x.current=null,y.current=null);const L=Fae(b);if(L!=null){const N=()=>{T.current||(T.current=!0,f(g.current))};L.addEventListener("ended",N),x.current=L,y.current=N}},onCheckpointReached:b=>{const L=e.filter(N=>oo(N)==="timestamp"&&ro(N)===b);f(L)}}),[h,e,f]),activeCheckpointGroup:o,hasQueuedCheckpoints:i,handleCheckpointCompleted:v}}function $ae({animateBlockEntrance:e,checkpointGroups:t,children:s,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,partnerContent:f,prefersKeyboardNavigation:v,previewType:C}){const{contextValue:g,activeCheckpointGroup:x,hasQueuedCheckpoints:y,handleCheckpointCompleted:T}=Hae(t,d);return(0,n.jsxs)(JZ,{value:g,children:[s,t.length>0&&(0,n.jsx)(Dae,{activeGroup:x,animateBlockEntrance:e,checkpointGroups:t,color:o,courseTitle:r,enableVideoPlaybackSpeed:a,handleNavigate:i,handleStorylineFullscreen:c,hasQueuedCheckpoints:y,labels:l,lessonId:d,lessonProgress:h,loadMedia:m,onCheckpointCompleted:T,partnerContent:f,prefersKeyboardNavigation:v,previewType:C})]})}const Vae=$ae;function zae(e){const{inlineBlocks:t,checkpointGroups:s}=(0,u.useMemo)(()=>Bae(e.blocks),[e.blocks]);return(0,n.jsx)(Vae,{...e,checkpointGroups:s,children:(0,n.jsx)(bp,{...e,blocks:t})})}const Uae=zae,s4=$("blocks-lesson-restart-button"),_ae=({className:e,onClick:t})=>{const s=s4.mix(e);return(0,n.jsx)("button",{className:s,onClick:t,type:"button",children:(0,n.jsx)(ie,{classNameIcon:s4("icon"),name:"arrow-rotate-left"})})},Ja=$("one-page-authors");function Gae({className:e}){const t=Ce(),s=yC(),o=nI(),r=yF();if(!o)return null;const a=s?.isPartnerContentAuthor&&r!=null,i=Ja({}).mix(e);return a?(0,n.jsx)("div",{className:i,children:(0,n.jsx)("ul",{className:Ja("list"),role:"list",children:r.map((c,l)=>(0,n.jsxs)("li",{className:Ja("item"),role:"listitem",children:[(0,n.jsx)(n4,{avatarUrl:c?.image?Ti({width:76,height:76,imageKey:c.image}):void 0}),(0,n.jsx)(o4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,n.jsxs)("div",{className:i,children:[(0,n.jsx)(n4,{avatarUrl:mt(o.avatar)}),(0,n.jsx)(o4,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:o.authorName})]})}function n4({avatarUrl:e}){return e?(0,n.jsx)("div",{className:Ja("avatar"),style:{backgroundImage:`url(${e})`}}):(0,n.jsx)("div",{className:Ja("avatar-fallback"),children:(0,n.jsx)(vm,{decorative:!0})})}function o4({a11yAuthorPrefix:e,name:t}){const s=t||"Unknown User",o=Ja("name");return(0,n.jsxs)("div",{className:o.toString(),children:[(0,n.jsx)("span",{className:"visually-hidden-always",children:e}),(0,n.jsx)("span",{children:s})]})}const r4=Oe("OnePageAuthors",Gae),Wae=$("one-page-title"),a4=Oe("OnePageTitle",({className:e,htmlId:t})=>{const s=re(),o=Ae(s?.title),r=ga("title"),a=(0,_t.uW)(s?.title)?{"data-l10n-id":s?.title?.l10nId}:{"data-change-path":r},i=Wae({}).mix(e);return(0,n.jsx)("h1",{...a,className:i,id:t,tabIndex:-1,children:o})}),Ic=$("one-page-lesson-header-info");function Kae(){const e=re(),t=Ic({}),{accentContrast:s,coverImageColor:o,coverPageType:r}=e?.theme??{},c=r===ce.IMAGE&&o===nt.LIGHT||s===be.DARK||r===ce.WHITE||r===ce.VIDEO||r===ce.ACCENT&&Ns(e?.color)===be.DARK;return(0,n.jsxs)("div",{className:t,children:[(H1(e)||c0(e))&&(0,n.jsx)(Km,{className:Ic("logo"),imageClassName:Ic("logo-image")}),(0,n.jsx)(a4,{className:Ic("title").toString(),hasDarkText:c}),(0,n.jsx)(r4,{className:Ic("authors").toString(),hasDarkText:c})]})}const Qae=Oe("OnePageCoverInfo",Kae),Yae=Oe("CoverSVG"),Ap=$("one-page-lesson-header"),Zae=$("page"),Xae=Ap("main").mix("lesson-header__main"),qae=Ap("container").mix(Zae("header-container")),Jae=()=>{const e=re(),t=e?.coverPageType,{alpha:s,media:o}=xr("coverImage"),r=e?.theme?.coverImageColor,a=t===ce.WHITE,i=t===ce.IMAGE,c=t===ce.ACCENT,l=t===ce.VIDEO,d=r===nt.LIGHT,h=Ap({accent:c,image:i,white:a||l,video:l,"overlay-light":i&&d}),m=i?na({alpha:s,color:r??void 0,media:o})??void 0:void 0;return(0,n.jsxs)("header",{className:h,style:m,children:[(0,n.jsx)("div",{className:qae,children:(0,n.jsx)("div",{className:Xae,children:(0,n.jsx)(Qae,{})})}),(0,n.jsx)(Yae,{coverPageType:"LEFT"})]})},eie=$("lesson-one-page-scroll"),tie=({previewType:e,prefersKeyboardNavigation:t,lessonProgress:s})=>{const o=(0,u.useRef)(null),[r,a]=(0,u.useState)(!1),{lessons:i,...c}=re(),{lmsOptions:l}=c,d=sa(),h=Ce(),m=qt(),f=i?.[0],v=f?.type==="blocks"?f:void 0,C=f?.id??"",g=Bi(),x=v?.items??[],y=s?.type==="blocks"?s:void 0,T=i0(c),S=c0(c),b=T?Uae:bp,L=s?.isComplete&&!0&&!T&&!S,N=s?.isComplete&&!1,k=c?.exportSettings?.webExportSettings,E=!Sn.isInstantLink&&(l?.disableCoverPage||k?.disableCoverPage),j=(0,u.useCallback)(()=>{r||(E?o.current?.scrollTo({top:0,behavior:ws()?"instant":"smooth"}):(a(!0),Yn(()=>{m("/")},"lesson-to-one-page-cover-continuous").finally(()=>{a(!1)})))},[m,E,r]);return(0,n.jsx)("div",{className:eie(),children:(0,n.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:o,children:(0,n.jsx)("div",{className:"page","data-page":!0,children:(0,n.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,n.jsxs)(Su,{children:[(0,n.jsx)(Jae,{}),(0,n.jsx)("div",{className:"page__content",children:(0,n.jsx)(Tr,{children:(0,n.jsxs)("div",{"data-lesson-id":f?.id,children:[(0,n.jsx)(b,{animateBlockEntrance:c?.animateBlockEntrance,blocks:x,className:void 0,color:c?.color,courseTitle:d,enableVideoPlaybackSpeed:c?.enableVideoPlaybackSpeed,handleNavigate:void 0,handleStorylineFullscreen:void 0,isLessonEntering:void 0,isLessonExiting:void 0,labels:h,lessonId:C,lessonProgress:y,loadMedia:!0,nextLesson:void 0,partnerContent:g,prefersKeyboardNavigation:t,previewType:e}),L&&(0,n.jsx)(_ae,{className:void 0,onClick:j}),N&&(0,n.jsx)(uf,{lessonId:C})]})})})]})})})})})},i4=$("microlearning-progress-summary"),sie=$("page-wrap"),nie=({course:e,courseProgress:t,isStepped:s,lesson:o})=>{const r=(0,u.useRef)(null),a=(0,u.useRef)(null),[i,c]=(0,u.useState)(!1),l=i4("content",{stepped:s,mounted:i}).toString();return(0,Md.A)(()=>{const d=(a.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,n.jsxs)("div",{className:sie(),id:"page-wrap",ref:r,children:[(0,n.jsx)(hf,{className:i4("previous").toString(),lessonId:o?.id??"",ref:a}),(0,n.jsx)(D5,{contentClassName:l,course:e,courseProgress:t})]})},oie=({isProgressSummary:e,lessonProgress:t})=>{const s=re(),o=pr(),r=$i()?.prefersKeyboardNavigation??!1,{previewType:a}=md(),i=s?.theme?.blockNavigationType===Xc.STEPPED;return e?(0,n.jsx)(nie,{course:s,courseProgress:o,isStepped:i,lesson:void 0}):i?(0,n.jsx)(kae,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a}):(0,n.jsx)(tie,{lessonProgress:t,prefersKeyboardNavigation:r,previewType:a})};var rie=p(82920);function c4(){const e=rt();return rie.useMemo(()=>({advanceQuizLessonToEnd:t=>e(K7(t)),submitQuizAnswer:t=>e(F0(t)),setQuizLessonTimeRemaining:t=>e(Y7(t))}),[e])}const l4=-1,aie="MULTIPLE_CHOICE";function iie({allowedRetries:e,currentRetries:t}){return e===l4?!1:t>=e}function cie({lesson:e,lessonProgress:t,getL10nRecursive:s,quizActions:o,reportAnswer:r}){if(!e||!Q0(e))return;const a=e.settings??{},i=a.passToContinue??!1,c=Number(a.retryCount??l4),l=Object.values(t?.items??{}).filter(d=>!d.isComplete);if(l.length>0){const d=t?.retryAttempts??0,h=iie({allowedRetries:c,currentRetries:d});l.forEach(m=>{const f=Cne({lesson:e,question:m});if(!f)return;const v=f.type||aie,C=s({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 lie=p(82920);function die({lesson:e,lessonProgress:t,getL10nRecursive:s}){const o=c4();return lie.useCallback(()=>{cie({lesson:e,lessonProgress:t,getL10nRecursive:s,quizActions:o,reportAnswer:Lg})},[e,t,s,o])}var d4=p(82920);function uie({children:e}){const t=pr(),s=fl(),o=Ot(s),r=Io(s),a=vC(),{setQuizLessonTimeRemaining:i}=c4(),c=d4.useMemo(()=>r??{},[r]),l=die({lesson:o,lessonProgress:c,getL10nRecursive:a}),d=d4.useMemo(()=>hC(o)?o.settings:void 0,[o]),h=!!d?.timer,m=d?.timerDuration;return(0,n.jsx)(Noe,{courseProgress:t,currentLessonId:s,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:i,timerDuration:m,children:e})}var hie=p(82920);const mie=960,Rp=$("transcript-panel"),fie=e=>{const{currentLocale:t}=ot();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 pie({enhancedLabels:e,lessonId:t,questionBankActiveIndex:s}){const o=rt(),{audioPlayerIdOpen:r,focusing:a,refocusTarget:i,transcriptMedia:c}=qi(),l=!!r,d=(0,u.useId)(),h=le(z=>t?ki(t,z):null),f=t?.startsWith("question-bank-")?s:h?.type==="quiz"?h.activeIndex:void 0,v=Lt(mie),[C,g]=(0,u.useState)(0),[x,y]=(0,u.useState)(!1),[T,S]=(0,u.useState)(!1),b=(0,u.useRef)(!1),L=(0,u.useRef)(null),N=(0,u.useRef)(null),k=(0,u.useRef)(c),E=(0,u.useRef)(t),j=(0,u.useRef)(f),A=Ce()||e,I=(0,u.useRef)(null),w=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),O=(0,u.useCallback)(z=>{const U=w.current.panelHeight,K=performance.now();S(!0);const Y=q=>{const ee=q-K,J=Math.min(ee/300,1),ne=1-Math.pow(1-J,3),te=U+(z-U)*ne;g(te),w.current.panelHeight=te,J<1?requestAnimationFrame(Y):(S(!1),y(!1),w.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(Y)},[y,S,g]),R=(0,u.useCallback)(z=>{const{startTime:D,startY:U,startHeight:K}=w.current;if(!v||U===null)return;const Y=U-(z?.clientY??z?.touches?.[0]?.clientY??0),q=K+Y;if(g(q),w.current.panelHeight=q,D!==null){const ee=performance.now()-D,J=Y/ee;w.current.velocity=J}},[v]),P=(0,u.useCallback)(z=>{const{velocity:D}=w.current;if(!D)return;Object.assign(w.current,{startY:null,startHeight:null,startTime:null}),y(!1);const U=window.innerHeight*.66;let K;Math.abs(D)>.5?K=D>0?window.innerHeight:150:K=C>=U?window.innerHeight:150,O(K),z instanceof MouseEvent&&(window.removeEventListener("mousemove",R),window.removeEventListener("mouseup",P))},[O,C,R]),M=(0,u.useCallback)(z=>{!v||N.current.contains(z.target)||L.current.contains(z.target)||(Object.assign(w.current,{startY:z?.clientY??z?.touches?.[0]?.clientY??null,startHeight:I.current?.clientHeight??0,startTime:performance.now()}),y(!0),z.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",R),window.addEventListener("mouseup",P)))},[R,P,v,y]);(0,u.useEffect)(()=>{let z;const D=()=>{I?.current?.style&&(I.current.style.transition="none",I.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition="none"}))},U=()=>{clearTimeout(z),z=setTimeout(()=>{I?.current?.style&&(I.current.style.transition="",I.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Y=>{Y.style.transition=""}))},200)};return window.addEventListener("resize",D),window.addEventListener("resize",U),()=>{window.removeEventListener("resize",D),window.removeEventListener("resize",U),clearTimeout(z)}},[]),(0,u.useEffect)(()=>{!l&&b.current&&g(0),a&&l&&I.current&&(I.current.focus(),o(qm({audioPlayerId:r,focusing:!1}))),b.current=l},[r,o,a,l]),(0,u.useEffect)(()=>{l&&c!==k.current&&(k.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&E.current!==t&&o(Ji()),E.current=t},[t,l,o]),(0,u.useEffect)(()=>{l&&j.current!==f&&j.current!==void 0&&o(Ji()),j.current=f},[f,l,o]);const H={role:"button",tabIndex:0,onMouseDown:M,onTouchStart:M,onTouchEnd:P,onTouchMove:R},[F,B]=hie.useState(!1),V=Ae(F?k.current:c),G=fie(V);let _;l&&(_=Jm(r));const Z=(0,u.useCallback)(()=>{const z=i??document.getElementById(wb(r));return z?(z.focus(),!0):!1},[r,i]),oe=(0,u.useCallback)(z=>{z.stopPropagation(),z.preventDefault(),o(Ji()),Z()},[o,Z]),Q=(0,u.useCallback)(z=>{r&&z.key==="Escape"&&oe(z)},[r,oe]);return(0,n.jsx)(n.Fragment,{children:(0,n.jsx)(On,{classNames:"transcript-panel",in:l,nodeRef:I,onEnter:()=>B(!1),onEntered:()=>B(!1),onEntering:()=>B(!1),onExit:()=>B(!0),onExited:()=>B(!1),onExiting:()=>B(!0),timeout:300,unmountOnExit:!0,children:(0,n.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:Rp({isOpen:l,isAnimatingMobileSwipe:T,isDragging:x}),id:_,onKeyDown:Q,ref:I,style:v&&l?{height:`${C/10}rem`,minHeight:C>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,n.jsxs)("header",{...v?H:{},children:[(0,n.jsx)("h3",{id:d,ref:L,children:A?.audioTranscript}),(0,n.jsx)(dn.ArcButton,{"aria-label":A?.audioHideTranscript,className:Rp("close-button"),hierarchy:"tertiary",icon:(0,n.jsx)(ie,{name:"close"}),layout:"icon",onClick:oe,ref:N})]}),(0,n.jsx)("section",{className:Rp("transcript-text",{"not-available":!G}),children:G||A?.audioNoTranscriptAvailable})]})})})}var jc=p(82920);const u4={FORWARD:"page-transition",BACK:"page-transition-back"},wu=({id:e,lessons:t})=>e==="progress-summary"?1/0:t.findIndex(s=>s.id===e),gie=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function vie({currentLessonId:e,lessons:t,isProgressSummary:s}){const o=qt(),r=jc.useRef(!1),a=jc.useRef(e),i=jc.useCallback(()=>r.current?u4.FORWARD:u4.BACK,[]),c=jc.useCallback(l=>{const d=wu({id:l,lessons:t});if(s)r.current=!1;else if(l==="progress-summary")r.current=!0;else{const h=wu({id:e,lessons:t});r.current=h<d}o(ks(l))},[o,t,s,e]);return jc.useEffect(()=>{const l=wu({id:e,lessons:t}),d=wu({id:a.current,lessons:t});l!==d&&t.length>0&&(r.current=d<l),a.current=e,gie(e)},[e,t]),{getNavigateDirection:i,handleNavigate:c}}const Cie=({content:e})=>{const t=re(),s=pr(),o=t?.lessons??[],r=(0,we.g)(),a=(0,we.zy)(),[i]=(0,we.ok)(),c=i.get("embed")==="lesson-only",l=r.lessonId??"",d=e.kind==="progress-summary",h=i.get(kb);(0,u.useEffect)(()=>{!h||!l||window.dispatchEvent(new CustomEvent(Ge,{detail:{lessonId:l,itemId:h,path:["lessons",{id:l},"items",{id:h}],align:"start"}}))},[l,h]);const m=Lt(480),{getNavigateDirection:f,handleNavigate:v}=vie({currentLessonId:l,lessons:o,isProgressSummary:d}),C=vo(t),g=(0,u.useCallback)(()=>{C||(t.theme?.hideLessonHeaders?document.querySelector("main"):document.querySelector("h1"))?.focus({preventScroll:!0})},[t,C]),x=c?"lesson lesson--preview":"lesson",y=rt(),T=(0,u.useCallback)(({item:N,refs:k})=>{if(!N)return;const E="media"in N?N.media:null;y(jb({audioPlayerId:fn({refs:k}),transcriptMedia:E}))},[y]),S=(0,u.useCallback)(()=>{y(Ji())},[y]),b=(0,u.useCallback)(N=>{y(qm(N))},[y]),L=Io(l);return(0,n.jsxs)(uie,{children:[(0,n.jsxs)("div",{className:"page-lesson-wrap",children:[!C&&(0,n.jsx)(iH,{}),(0,n.jsx)("div",{className:"page-lesson",children:(0,n.jsxs)(SU,{children:[(0,n.jsx)(bU,{closeTranscript:S,mode:"readonly",onTranscriptUpdate:b,openTranscript:T,children:(0,n.jsx)("div",{className:x,"data-lesson":!0,children:(0,n.jsx)("div",{className:"lesson__content",children:(0,n.jsx)("div",{className:"page-view page-view--visible",children:(0,n.jsx)(Y_,{isLessonOnlyEmbed:c,children:C?(0,n.jsx)(oie,{isProgressSummary:d,lessonProgress:L}):(0,n.jsx)(TG,{isLessonOnlyEmbed:c,children:(0,n.jsx)(Rre,{content:e,getNavigateDirection:f,handleNavigate:v,isMobileHeader:m,lessonId:l,lessonProgress:L,onPageReady:g},a.pathname)})})})})})}),(0,n.jsx)(pie,{lessonId:s?.currentLesson?.toString()})]})})]}),(0,n.jsx)(Xm,{onClose:g})]})},Pp=$("one-page-cover-info");function xie({htmlIdTitle:e}){const t=ga("title");return(0,n.jsxs)("div",{className:Pp(),"data-change-path":t,children:[(0,n.jsx)(a4,{className:Pp("title").toString(),htmlId:e}),(0,n.jsx)(r4,{className:Pp("authors").toString()})]})}const bie=Oe("OnePageCoverInfo",xie),Au=$("one-page-cover"),yie=$("cover"),Sie={passive:!0};function Tie(e){return typeof e=="object"&&e!=null}function Lie(e){return Tie(e)&&(typeof e.id=="string"||typeof e.id=="number")}function kie({previewType:e}={}){const t=(0,u.useRef)(null),s=(0,u.useRef)(null),o=(0,u.useRef)(!1),r=qt(),a=le(ns),i=wI(a),c=Lie(i)?i:void 0,l=(0,u.useCallback)(()=>{const A=c?.id;return A!=null?ks(A):null},[c?.id]),d=(0,u.useCallback)(()=>{const A=l();if(A!=null){const w=a?.theme?.blockNavigationType===Xc.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";Yn(()=>{r(A)},w)}},[a?.theme?.blockNavigationType,l,r]),h=(0,u.useRef)(d);h.current=d;const m=(0,u.useRef)(e);m.current=e;const f=(0,u.useCallback)(()=>{s.current?.focus?.()},[]);(0,u.useEffect)(()=>{hy(),s.current?.focus?.()},[]),(0,u.useEffect)(()=>{const A=I=>{(I.key==="ArrowDown"||I.key==="ArrowRight")&&!o.current&&(o.current=!0,document.removeEventListener("keyup",A),h.current())};return document.addEventListener("keyup",A),()=>document.removeEventListener("keyup",A)},[]),(0,u.useEffect)(()=>{const A=I=>{tc(m.current)||o.current||I.deltaY>100&&(o.current=!0,document.removeEventListener("wheel",A),h.current())};return document.addEventListener("wheel",A,Sie),()=>document.removeEventListener("wheel",A)},[]);const v=(0,u.useCallback)(A=>{const I=A.target;I instanceof Node&&!t.current?.contains?.(I)&&!o.current&&(o.current=!0,d())},[d]),C=(0,u.useCallback)(A=>{A.preventDefault(),o.current||(o.current=!0,d())},[d]),g=a?.coverPageType===ce.WHITE,x=a?.coverPageType===ce.VIDEO,y=a?.coverPageType===ce.IMAGE,T=a?.coverPageType===ce.ACCENT,S=a?.theme?.blockNavigationType===Xc.STEPPED,b=a?.theme?.coverImageColor??nt.DARK,L="title",k=`overlay-${b?.toLowerCase()}`,E=Au("wrapper",{[k]:y,accent:T,image:y,white:g||x,video:x}).mix(yie("header-content")),j=l();return(0,n.jsx)(Tr,{children:(0,n.jsxs)(Ed,{onSwipeUp:d,children:[(0,n.jsxs)("main",{className:E,ref:s,tabIndex:-1,children:[(0,n.jsx)(bie,{htmlIdTitle:L}),S&&(0,n.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."}),j!=null&&(0,n.jsx)("div",{className:Au("start-wrapper"),onClick:v,children:(0,n.jsx)(rs,{"aria-label":"Start",className:Au("start-link"),onClick:C,ref:t,to:j,children:(0,n.jsx)(ie,{className:Au("start-icon"),name:"arrow-down"})})}),y&&(0,n.jsx)(bm,{})]}),(0,n.jsx)(Xm,{onClose:f})]})})}const Nie=kie,Eie="progress-summary";function Iie({course:e,lessonId:t,progressSummaryEnabled:s}){if(s&&t===Eie)return{kind:"progress-summary"};const o=e?.lessons?.find(r=>String(r.id)===t);return o?{kind:"lesson",lesson:o}:{kind:"not-found"}}function jie(){const e=re(),t=(0,we.zy)(),s=vo(e),o=e?.lessonsOnly?.[0]?.id,r=o==null?void 0:ks(o),a=s?cz(e):hb(e),l=r!=null&&a?(0,n.jsx)(we.C5,{replace:!0,to:{pathname:r,search:t.search}}):s?(0,n.jsx)(Nie,{}):(0,n.jsx)(vU,{});return(0,n.jsxs)(we.BV,{children:[(0,n.jsx)(we.qh,{element:(0,n.jsx)(h4,{}),path:kh}),(0,n.jsx)(we.qh,{element:(0,n.jsx)(m4,{children:(0,n.jsx)(h4,{})}),path:Nh}),(0,n.jsx)(we.qh,{element:l,index:!0}),(0,n.jsx)(we.qh,{element:(0,n.jsx)(m4,{children:l}),path:"/:mode"}),(0,n.jsx)(we.qh,{element:(0,n.jsx)(hd,{}),path:"*"})]})}function h4(){const e=mr(),{lessonId:t=""}=(0,we.g)(),s=Iie({course:e,lessonId:t,progressSummaryEnabled:!1});return s.kind==="not-found"?(0,n.jsx)(hd,{}):(0,n.jsx)(Cie,{content:s})}function m4({children:e}){const{mode:t}=(0,we.g)();return Mj(t)?e:(0,n.jsx)(hd,{})}var ao=p(82920);const Or=$("share-password-dialog");function wie({failAttempt:e,onSubmit:t}){const s=le(ch),o=ao.useRef(null),r=ao.useRef(null),[a,i]=ao.useState(!1),c=ao.useRef(!1),{announceAssertive:l}=xn();ao.useEffect(()=>{r.current?.showModal()},[]),ao.useEffect(()=>{e&&!c.current&&(i(!0),l("Incorrect password. Please try again.")),c.current=e},[l,e]),ao.useEffect(()=>{const f=r.current;if(!f)return;const v=()=>i(!1);return f.addEventListener("animationend",v),()=>{f.removeEventListener("animationend",v)}},[]);const d=ao.useCallback(f=>{f.preventDefault(),o.current&&t(o.current)},[t]),h=ao.useCallback(f=>{f.preventDefault()},[]),m=s?"You need a password to view this microlearning. If you don\u2019t know it, ask the person who shared this with you.":"You need a password to view this course. If you don\u2019t know it, ask the person who shared this with you.";return(0,n.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${Or({shaking:a})} brand--border`,onCancel:h,ref:r,children:[(0,n.jsx)("h1",{className:Or("heading"),id:"share-password-title",children:"Enter Password"}),(0,n.jsx)("p",{className:Or("instructions"),id:"share-password-instructions",children:m}),(0,n.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,n.jsxs)("form",{onSubmit:d,children:[(0,n.jsx)("label",{className:Or("label"),htmlFor:"share-password",children:"password"}),(0,n.jsx)("input",{className:Or("input"),id:"share-password",ref:o,type:"password"}),(0,n.jsx)("div",{className:Or("toolbar"),children:(0,n.jsx)("button",{className:`${Or("button")} brand--background`,type:"submit",children:"View"})})]})]})}const Aie=wie;function Rie(){const e=il();(0,u.useEffect)(()=>{window.targetMode=VO({locale:db(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:vs.STATUS,data:!!window.targetMode},"*"),bZ(s=>fs(lE(s)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!L8()||(t.current=!0,window.parent.postMessage({type:"preview:snapshotLoaded",data:{defaultLocale:e.defaultLocale,locales:e.locales?.map(({locale:s})=>s)}}))},[e]),(0,u.useEffect)(()=>{const s=()=>fs(Bk()),o=()=>fs(Dk()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return Dv("favoriteAdded",s),Dv("favoriteRemoved",o),document.addEventListener("click",r),()=>{Fv("favoriteAdded",s),Fv("favoriteRemoved",o),document.removeEventListener("click",r)}},[])}const Ru=document.createElement("style");Ru.innerHTML=`
  @layer rise-reset, arc-theme, arc-utils;

  :root {
    --arc-font-size-base: 1;

    /*  Override arc body font because of Inter naming conflict in Rise
        https://github.com/articulate/rise-authoring/issues/7263
    */
    --arc-internal-font-body: 'DS Inter', system-ui, sans-serif;
  }
`;function Pie(){(0,u.useEffect)(()=>(Ru.parentElement!==document.head&&document.head.prepend(Ru),()=>{Ru.remove()}),[])}function Mie(e){return e.status}function f4(){return le(Mie)}function Oie({enabled:e=!0,onAuthorized:t,onError:s,onUnauthorized:o,password:r}){const a=rt();(0,u.useEffect)(()=>{e&&(a(P7({onAuthorized:t,onError:s,onUnauthorized:o,password:r})),a(cE()))},[a,e,t,s,o,r])}function Bie(){const e=rt(),{courseLoaded:t,coverLoaded:s}=f4(),o=le(i=>i.course?.coverImage?.media),r=at(o),a=(0,u.useCallback)(()=>{e(Uk(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!s){const i=r?.image,{key:c,src:l}=i||{};if(c||l){const d=c?it(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,s,r,a])}function Die(e={}){Oie(e),Bie();const t=rt(),s=lb(),o=le(f=>f.courseLabels.labels),{courseLoaded:r,coverLoaded:a,fatalError:i,fontsLoaded:c,notFound:l,partnerContentLoaded:d}=f4(),h=(0,Me.A)(r),m=r&&c&&a&&d;return(0,u.useEffect)(()=>{!h&&r&&!c&&(s??[]).length>0&&t(jN(s))},[t,h,r,c,s]),(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 Fie({course:e}){const[t,s]=(0,u.useState)(!0),[o,r]=(0,u.useState)(!1),a=e&&"hasPassword"in e?!!e.hasPassword:!1,i=!!(t&&yg()&&e&&!tO(e)&&(a||Sg())),c=(0,u.useCallback)(l=>(r(!1),k8(l.value).then(({isValid:d})=>{d?s(!1):(l.value="",r(!0),s(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:i,failAttempt:o,onSharePasswordSubmit:c}}function Hie(){return WV(),Pie(),Rie(),(0,n.jsx)(vz,{children:(0,n.jsx)(PO,{children:(0,n.jsx)($ie,{})})})}function $ie(){const{enabled:e,isActive:t,onAuthorized:s,onError:o,onUnauthorized:r,password:a}=RO(),{isLoaded:i,notFound:c,fatalError:l,curtainLabels:d}=Die({enabled:e,onAuthorized:t?s:void 0,onError:t?o:void 0,onUnauthorized:t?r:void 0,password:t?a:void 0}),h=re(),{showPasswordDialog:m,failAttempt:f,onSharePasswordSubmit:v}=Fie({course:h}),C=!t&&m;return c?(0,n.jsx)(hd,{}):i?C?(0,n.jsx)(Aie,{failAttempt:f,onSubmit:v}):h?(0,n.jsx)(Vie,{course:h}):null:(0,n.jsx)(o2,{labels:d,status:l?"fatalError":"loading"})}function Vie({course:e}){const t=ZE(),s=GV(),{themeId:o}=e,r=`theme ${o}${t?" one-page":""}`;return(0,n.jsx)(zj,{appType:"learn",children:(0,n.jsx)(az,{children:(0,n.jsx)(tz,{children:(0,n.jsx)(AO,{children:(0,n.jsx)(DV,{themeId:o,children:(0,n.jsx)(Oh,{children:(0,n.jsx)(_V,{children:(0,n.jsxs)("div",{className:r,id:"innerApp",ref:MO,children:[(0,n.jsx)(JV,{...s}),(0,n.jsxs)(cO,{children:[(0,n.jsx)(jie,{}),(0,n.jsx)(Vj,{})]})]})})})})})})})})}function zie({children:e}){return(0,n.jsx)(sW,{ImageEagerOrLazy:Cf,children:e})}var p4;const g4={"rise-course-navigation":!0},Uie={"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},Mp=(0,u.createContext)(g4);Mp.displayName="FeatureFlagsContext";const{Provider:_ie}=Mp;function Gie({children:e,value:t}){const s=(0,u.useMemo)(()=>({...Uie,...t,...g4}),[t]);return(0,n.jsx)(_ie,{value:s,children:e})}function Op(){return(0,u.useContext)(Mp)}function Wie(e){return Op()[e]}function dge(e){function t(s){const o=Op();return p4(e,{...s,flags:o})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function uge(e,t){return function(s){const o=r=>{const a=Wie(e),i={...r,[t]:a};return p4(s,{...i})};return o.displayName=`withFeatureFlag(${s.displayName||s.name})`,o}}const v4=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});v4.displayName="On";const C4=({children:e})=>(0,n.jsx)(n.Fragment,{children:e});C4.displayName="Off";const Pu=({children:e,featureFlags:t})=>{const s=Op(),o=(0,u.useMemo)(()=>{const i=[].concat(t??[]);return i.length&&i.every(c=>s[c])},[t,s]),{on:r=null,off:a=null}=(0,u.useMemo)(()=>{const i={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case Pu.On.displayName:i.on=c;break;case Pu.Off.displayName:i.off=c;break;default:i.on=e}}),i},[e]);return o?r:a};Pu.On=v4,Pu.Off=C4;const Kie={};function Qie({children:e}){const s=re()?.features??Kie;return(0,n.jsx)(Gie,{value:s,children:e})}const x4=document.getElementById("app");if(!x4)throw new Error("Root element #app not found");(0,y4.createRoot)(x4).render((0,n.jsx)(u.Suspense,{fallback:null,children:(0,n.jsx)(SE,{store:iC,children:(0,n.jsx)(zie,{children:(0,n.jsx)(kE,{children:(0,n.jsx)(Qie,{children:(0,n.jsx)(we.I9,{useTransitions:!1,children:(0,n.jsx)(Hie,{})})})})})})}))},31926(Ac,ei,p){const Ko={"./en-au":52378,"./en-au.js":52378,"./en-ca":44232,"./en-ca.js":44232,"./en-gb":63301,"./en-gb.js":63301,"./en-ie":17282,"./en-ie.js":17282,"./en-il":70761,"./en-il.js":70761,"./en-in":43623,"./en-in.js":43623,"./en-nz":99308,"./en-nz.js":99308,"./en-sg":56270,"./en-sg.js":56270};function lo(Ms){const uo=Dr(Ms);return p(uo)}function Dr(Ms){if(!p.o(Ko,Ms)){const uo=new Error("Cannot find module '"+Ms+"'");throw uo.code="MODULE_NOT_FOUND",uo}return Ko[Ms]}lo.keys=function(){return Object.keys(Ko)},lo.resolve=Dr,Ac.exports=lo,lo.id=31926},38954(){}}]);
