(globalThis.wpRiseJsonp||=[]).push([["learn_main_tsx"],{30349(W1){W1.exports=function(pl){pl||(pl={});var __t,__p="";with(pl)__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}},87657(W1,pl,C){"use strict";var rh={};C.r(rh),C.d(rh,{callbackComponent:()=>I8,callbackPath:()=>Ah,errorPath:()=>f8,getToken:()=>p8,initAuth:()=>rC,login:()=>sC,logout:()=>Lr,onFetchTokensThunk:()=>T8,onSessionExpired:()=>C8,refreshSession:()=>v8,request:()=>WL});var o=C(30739),qpe=C(77352),Xpe=C(44148),Jpe=C(21502),ege=C(40932),tge=C(51219),nge=C(75985),sge=C(15937),oge=C(5095),rge=C(33078),ige=C(51321),age=C(50651),cge=C(13663),lge=C(99163),dge=C(61691),uge=C(76954),hge=C(4508),mge=C(21511),u=C(49860),k9=C(33950),Be=C(54573),N9=C(84545),gl=C(18398),Lo=C(20496),w9=C(69618),j9=C(16422),A9=C(23851);const ih=u.createContext(null),ah=u.createContext(!1),La=e=>(0,o.jsx)(ah.Provider,{value:!0,children:(0,o.jsx)(w9.A,{...e})});function K1(e){return class extends u.Component{static displayName=`withStaleTransitionState(${e.displayName||e.name})`;static defaultProps={onEnter:()=>{},onEntered:()=>{},onEntering:()=>{},onExit:()=>{},onExited:()=>{},onExiting:()=>{}};nodeRef=u.createRef();onEnterDelegate;onEnteringDelegate;onEnteredDelegate;onExitDelegate;onExitingDelegate;onExitedDelegate;constructor(n){super(n),this.state={transitionState:null},this.onEnterDelegate=this.onTransition.bind(this,"enter"),this.onEnteringDelegate=this.onTransition.bind(this,"entering"),this.onEnteredDelegate=this.onTransition.bind(this,"entered"),this.onExitDelegate=this.onTransition.bind(this,"exit"),this.onExitingDelegate=this.onTransition.bind(this,"exiting"),this.onExitedDelegate=this.onTransition.bind(this,"exited")}onTransition=(n,...s)=>{this.setState({transitionState:n});const r="on"+n[0].toUpperCase()+n.slice(1),i=this.props[r];typeof i=="function"&&i(...s)};render(){return(0,o.jsx)(ih.Provider,{value:this.state.transitionState,children:(0,o.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 Q1=K1(j9.Ay),Qs=K1(A9.A);function R9(e){const t=u.useContext(ah),n=u.useContext(ih),s=u.useRef(e);return t&&n?.startsWith?.("exit")||(s.current=e),s.current}function P9(e){const t=n=>{const s=R9(n);return(0,o.jsx)(e,{...s,nodeRef:n.ref,ref:n.ref})};return t.displayName=`withTransitionableState(${e.displayName||e.name||"Component"})`,t}const Z1=e=>e!=null&&typeof e=="object"&&"map"in e&&typeof e.map=="function",M9=e=>e!=null&&typeof e=="object"&&"run"in e&&typeof e.run=="function",Y1=e=>e!=null&&typeof e=="object"&&"then"in e&&typeof e.then=="function",O9=e=>e!=null&&typeof e=="object"&&"fork"in e&&typeof e.fork=="function",q1=e=>e!=null&&typeof e=="function",X1=(e,t)=>{const n=s=>X1(s,t);if(typeof e=="object"&&"type"in e&&typeof e.type=="string"){const s="meta"in e&&typeof e.meta=="object"?e.meta:void 0;return{...e,meta:{...s,origin:t}}}if("bimap"in e&&typeof e.bimap=="function")return e.bimap(n,n);if(Z1(e))return e.map(n);if(Y1(e))return e.then(n);if(q1(e))return function(r,i){return e(a=>r(n(a)),i)}};function B9(){return({dispatch:e,getState:t})=>n=>s=>{if(q1(s))return s(e,t);if(Y1(s))return s.then(e);if(O9(s)){s.fork(e,e);return}return M9(s)?e(s.run()):Z1(s)?s.map(e):n(s)}}function D9(){return[B9()]}var vl=C(49860);const F9=gl.Zz;function _9(e,t,{additionalMiddleware:n=[]}={}){const s=(0,gl.y$)(e,t,F9((0,gl.Tw)(...D9(),...n))),r=V9(),i=z9(),a=$9(),c=U9(),l=G9(),d=H9();return{Provider:Lo.Kq,connect:r,connectBase:i,dispatch:s.dispatch,store:s,useDispatch:a,useDispatchWithOrigin:c,useSelector:l,useStore:d}}function H9(){return function(){return(0,Lo.Pj)()}}function V9(){return function(t,n,s,r){return function(i){return(0,Lo.Ng)(t,n,s,r)(P9(i))}}}function z9(){return function(t,n,s,r){return function(i){return(0,Lo.Ng)(t,n,s,r)(i)}}}function $9(){return Lo.wA}function U9(){return function(t){const n=(0,Lo.wA)();return vl.useCallback(r=>n(X1(r,t)),[n,t])}}function G9(){return function(t,n=Lo.bN){const s=vl.useContext(ah),r=vl.useContext(ih),i=vl.useRef(void 0),a=(0,N9.S)(),c=(0,Lo.d4)(t,n),l=!a&&s&&r?.startsWith?.("exit");return l||(i.current=c),l&&i.current!==void 0?i.current:c}}var Eo=C(96531),W9=C(61017),gr=C.n(W9),me=C(12742),K9;function Q9(){return me.action}function fge(){return K9}var vr=C(16397),Z9=C(84268),Fe=C.n(Z9),Y9=C(14778),ch=C.n(Y9),q9=C(863),je=C.n(q9),X9=C(18271),cs=C.n(X9),J9=C(42117),lh=C.n(J9);const Cl=ch()(lh()),J1=["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"],eL=["align","allow","allowfullscreen","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","title","width"],tL=Cl({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:J1}),nL=Cl({allowedAttributes:{iframe:eL},allowedTags:["iframe"],allowedSchemes:["http","https"]}),dh=cs()(je(),tL,Fe()("")),ev=cs()(je(),nL,Fe()("")),wn=Cl({allowedTags:[],allowedAttributes:[]}),pge=Cl({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:J1.filter(e=>e!=="img")}),gge=e=>{const t=e.replace(/((<br>)|(<\/[a-z]*>))+/g," ");return wn(t).replace(/\s{2,}/g," ")},{Runtime:dn}=window,Ae=e=>window.env?.[e],vge=!1,Cge=null,tv="Rise 360",sL=e=>`${Ae("CDN_USER_CONTENT_URI")}/${e}`,yt=e=>{const t=e||"",n=dn?.resolvePath!=null?dn.resolvePath.bind(dn):sL;return t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:n(t)||t},oL=e=>dn?.resolveFontPath!=null?dn.resolveFontPath(e):`${e.default?Ae("CDN_URI"):Ae("CDN_USER_CONTENT_URI")}/${e.key}`,nv=()=>{dn?.exit!=null&&dn.exit()},rL=()=>dn?.isComplete!=null?dn.isComplete():null,Ea=()=>dn?.isExport!=null?dn.isExport():!1;function iL(){if(dn?.isExport!=null){const e=window.partnerContent?.content;return dn.isExport()&&!!e}return!1}const sv=()=>{if(dn?.sendTouch!=null)return dn.sendTouch()};var aL=C(91208),Zs=C.n(aL),cL=C(94083),ko=C.n(cL),lL=C(55283),xl=C.n(lL),dL=C(5763),At=C.n(dL),uL=C(95825),js=C.n(uL),hL=C(82863),ov=C.n(hL),mL=C(57260),uh=C.n(mL),fL=C(37832),st=C.n(fL),pL=C(11802),dt=C.n(pL),gL=C(70087),ls=C.n(gL);const vL=Zs(),bl=st(),CL=ko(),rv=e=>xl()(e),yl=cs(),Sl=e=>t=>{const n=e(t);return wn(n==null?void 0:String(n))},iv=e=>t=>vL({[e]:n=>wn(n==null?void 0:String(n))},t),xL=({startTime:e,stopTime:t})=>t-e,bL=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return uv(e);case"MATCHING":return gv(e);default:return hi(e)}},yL=e=>{switch(e.type){case"FILL_IN_THE_BLANK":return uv(e);case"MATCHING":return gv(e);case"MULTIPLE_CHOICE":return hv(e);case"MULTIPLE_RESPONSE":return TL(e);default:return hv(e)}},SL=({isUnfinished:e,item:t,itemProgress:n})=>{switch(t.type){case"FILL_IN_THE_BLANK":return IL(e)(n);case"MATCHING":return NL(t,e)(n);case"MULTIPLE_CHOICE":return mv(t,e)(n);case"MULTIPLE_RESPONSE":return LL(t,e)(n);default:return mv(t,e)(n)}},av=e=>[e],hi=e=>{const t=e.answers||[];if(e.shuffledAnswerIndices&&Array.isArray(e.shuffledAnswerIndices)){const n=e.shuffledAnswerIndices,s=[];return t.forEach((r,i)=>{const a=n[i];typeof a=="number"&&(s[a]=r)}),s.map(iv("title"))}return t.map(iv("title"))},hh=Sl(st()("id")),cv=Sl(st()("title")),lv=e=>t=>CL(n=>dt()("id",t,n),hi(e)),dv=e=>t=>ov()(t,hi(e)),uv=e=>uh()("title",hi(e)),IL=e=>t=>yl(Fe()(e),Fe()(""),Sl(n=>bl("text",n)))(t),hv=e=>e.correct==null?[]:lv(e)(e.correct),mv=(e,t)=>n=>yl(Fe()(t),Fe()([]),()=>{const s=bl("selectedIndex",n);return s===void 0?[]:av(dv(e)(s))})(n),TL=e=>rv(At()(lv(e),e.corrects??[])),LL=(e,t)=>n=>yl(Fe()(t),Fe()([]),()=>{const s=bl("selectedIndices",n)||[];return rv(s.map(r=>av(dv(e)(r))))})(n),fv=({sourceId:e,sourceTitle:t,targetId:n,targetTitle:s})=>({source:{id:`source_${String(e)}`,title:t},target:{id:`target_${String(n)}`,title:s}}),pv=Sl(st()("matchTitle")),EL=e=>{const t=hh(e);return fv({sourceId:t,sourceTitle:cv(e),targetId:t,targetTitle:pv(e)})},kL=e=>(t,n)=>{const s=hi(e),r=s.find(a=>a?.id===n),i=s.find(a=>a?.id===t);return fv({sourceId:hh(r),sourceTitle:cv(r),targetId:hh(i),targetTitle:pv(i)})},gv=e=>At()(EL,hi(e)),NL=(e,t)=>n=>yl(Fe()(t),Fe()([]),()=>{const s=bl("matches",n);return ls()(js()(kL(e),s??{}))})(n);var wL=C(61346),vv=C.n(wL);function Cr(e){const t=e.split(".")[1];if(!t)throw new Error("Invalid token specified: missing payload");const n=t.replace(/-/g,"+").replace(/_/g,"/"),s=n.padEnd(n.length+(4-n.length%4)%4,"="),r=new TextDecoder().decode(Uint8Array.from(atob(s),a=>a.charCodeAt(0))),i=JSON.parse(r);if(!jL(i))throw new Error("Invalid token specified: payload is not an object");return i}const jL=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);var Cv,xge;const mh="_articulate_user_id",AL="_rise_authoring_api_session",xv=()=>"_articulate_rise_",bv=e=>{if(typeof document>"u")return;const t=document.cookie?document.cookie.split(";"):[];for(const n of t){const s=n.indexOf("=");if(s===-1||n.slice(0,s).trim()!==e)continue;const i=n.slice(s+1).trim();try{return decodeURIComponent(i)}catch{return i}}},fh=(e,t)=>`${e}=${t}; domain=${Ae("SESSION_COOKIE_DOMAIN")}; path=/; secure=true`,RL=e=>document.cookie=fh(mh,e),PL=()=>document.cookie=`${fh(mh,"")}; Max-Age=-99999999`,ML=()=>document.cookie=`${fh(AL,"")}; Max-Age=-99999999`,xr=()=>bv(mh),Rt=()=>bv(xv()),OL=()=>Rt()?Cr(Rt()).staff:!1,BL=()=>Rt()?Cv(Rt())?.staffRoles||[]:[],DL=()=>Rt()?Cv(Rt())?.content_team_admin:!1,bge=()=>BL().includes("content-team")||DL(),ph=()=>Rt()?Cr(Rt()).riseId||Cr(Rt()).sub||Cr(Rt()).aid:"",FL=()=>Rt()?Cr(Rt()).roles:[],_L=()=>Rt()?Cr(Rt()).tenantId:"",yv=()=>Rt()?Cr(Rt()).subscription||{}:{},HL=()=>yv().plan_id||"",VL=()=>yv().status||"";var zL=C(87038),$L=C(82485),mi=C.n($L);const UL=mi()(window.env,{ACCESS_COOKIE_NAME:xv(),REDIRECT_URI:window.location.origin+"/auth-callback"}),No=(0,zL.A)(UL),Sv=No.closeSession,fi=No.on,GL=No.off,WL=No.request,Iv=No.refreshSession,ka=No.resetSession,KL=No.getAuthorizationUrl,yge=No.fetch;var Ys=C(88576);const Il=(e,t)=>((...n)=>{try{return e(...n)}catch(s){window.env?.SERVICE_ENV&&window.env?.SERVICE_ENV!=="prod"&&console.error(s),Ys.L2.addError(s),t(s)}}),Tv=e=>{const t=e.getResponseHeader("content-type")||"",n=t.includes("application/json");if(!(n||t.includes("text/")))return e.response;try{const r=new TextDecoder("utf-8").decode(e.response);try{return n?JSON.parse(r):r}catch{return r}}catch{return e.response}},QL=(e,t)=>{if(t)return Tv(e);try{return JSON.parse(e.response)}catch{return e.response}};function ZL(e,t){const n=t.indexOf(":"),s=t.substr(0,n).trim().toLowerCase(),r=t.substr(n+1).trim();return s&&(e[s]=e[s]?e[s]+", "+r:r),e}function YL(e){return e?e.split(`
`).reduce(ZL,{}):{}}function Lv(e){const t=[];for(const n in e){const s=e[n];if(!Array.isArray(s)){t.push(encodeURIComponent(n)+"="+encodeURIComponent(s));continue}for(const r of s)t.push(Lv(r))}return t.join("&")}function gh(e){let t,n=!1;const s=new Promise(function r(i,a){const c=e.signal;if(c?.aborted){a(new DOMException("Aborted","AbortError"));return}const l=N=>{throw a(N),N},d=()=>{t.abort(),a(new DOMException("Aborted","AbortError"))},h=e.data;let m=Il(e.deserialize??vv(),l);const f=e.headers??{},p=e.json??!1,g=e.jwt??!1,v=e.token??null,x=e.method??"GET",b=e.reviewEnv??!1,y=e.onUploadProgress;let T=Il(e.serialize??vv(),l),S=e.url;const I=e.withCredentials??!1,L=e.file,E=e.timeout??3e3;t=new XMLHttpRequest;const k=setTimeout(()=>{t.abort(),a({error:"request timed out"})},E);if(p&&(m=Il(JSON.parse,a),T=Il(JSON.stringify,a),f["Content-Type"]="application/json"),x==="GET"&&h&&(S+="?"+Lv(h)),g){const N=v||Rt();f.Authorization="Bearer "+N}c?.addEventListener("abort",d),t.withCredentials=I,t.addEventListener("abort",a),t.addEventListener("error",a),t.addEventListener("load",function(){if(t.status>=400)if([401,403].includes(t.status)){const N=QL(t,e.arrayBuffer);n?a({error:"Unable to resume session",status:t.status,body:N}):ka().then(()=>{r(i,a),n=!0}).catch(R=>{Ys.L2.addError(R),a({error:"Unable to resume session",status:t.status,body:N})})}else e.arrayBuffer?a(Tv(t)):a(m(t.response));else i({body:t.status===204?void 0:m(t.response),headers:YL(t.getAllResponseHeaders()),status:t.status}),c?.removeEventListener("abort",d);clearTimeout(k)}),t.upload&&typeof y=="function"&&t.upload.addEventListener("progress",y),t.open(x,S),e.arrayBuffer&&(t.responseType="arraybuffer");for(const N in f)t.setRequestHeader(N,f[N]);x!=="GET"&&h?t.send(T(h)):L?t.send(L):t.send()});return s.abort=(...r)=>t.abort(...r),s}function qL(e){return e.status===200||e.status===201?e.body:Promise.reject(e.body)}const Ev=(e,t=!0)=>t?`${e}s`:e;var vh=null;const Sge=null,kv=null,Ige=(e,t="short")=>{const s=Object.keys(vh).reverse().find(c=>e>=vh[c]);if(!s)return`${e} ${Ev("byte",e>1)}`;const r=e/vh[s],i=r%1===0?r.toFixed(0):r.toFixed(2),a=t==="long"?Ev(kv[s].long,r>1):kv[s].short;return`${i} ${a}`};var XL=C(48319),JL=C.n(XL);const un=e=>!!e&&e.type==="quiz",As=e=>!!e&&e.type==="blocks",St=({courseProgress:e,lessonId:t,updatedLessonProgress:n})=>({...e,lessons:{...e.lessons,[t]:n}});function It({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const s=t.lessons[e],r=n.lessons[e];if(s&&!JL()(s,r)&&(IN(s),eE({lessonId:e,courseProgress:t,prevCourseProgress:n})),tE({lessonId:e,prevCourseProgress:n,nextCourseProgress:t})){const i=wv(n),a=wv(t),c=a!==i,l={...t,percentComplete:a};return c&&(nE({courseProgress:l,lessonProgress:s}),l.percentComplete!=null&&LN(l.percentComplete)),l}return t}function eE({courseProgress:e,prevCourseProgress:t,lessonId:n}){const s=e.lessons?.[n],r=t.lessons?.[n];if(s?.percentComplete===100&&r?.percentComplete!==100){const i=Nv(s);i&&SN(i)}}function tE({lessonId:e,nextCourseProgress:t,prevCourseProgress:n}){const s=t.lessons?.[e];if(!s)return!1;const r=n.lessons?.[e]?.percentComplete===100,i=s.percentComplete===100,a=r!==i,c=t.currentLesson!=null&&un(t.lessons[t.currentLesson])&&t.lessons[t.currentLesson]?.percentComplete===100;return a||c}function Nv(e){const{id:t}=e;if(!t)throw new Error("Cannot create lesson payload: lesson.id is missing");if(un(e)){const{passed:n,score:s,passingScore:r=0}=e;return{id:t,...n!==void 0&&{passed:n},...s!==void 0&&{score:s},passingScore:r}}return{id:t}}function wv(e){const{lessons:t={}}=e,n=Object.keys(t).length;if(n===0)return 0;const s=Object.values(t).filter(r=>r.isComplete).length;return Math.round(s/n*100)}function nE({courseProgress:e,lessonProgress:t}){if(!e||!t)return;const n=Nv(t);n&&TN(e,n)}const sE=e=>e.reduce((t,n,s)=>("id"in n&&(t[n.id]={id:n.id,index:s}),t),{}),Ch=e=>({...e,percentComplete:xh({items:e.items,key:"isComplete"})}),jv=e=>({...e,percentComplete:xh({items:e.items,key:"isComplete"})}),Av=e=>({...e,percentViewed:xh({items:e.items,key:"isViewed"})});function Tge({itemId:e,isCorrect:t,progress:n}){const s={...n,items:{...n.items,[e]:{...n.items?.[e],id:e,index:n.items?.[e]?.index??0,isComplete:t,isViewed:t,...n.items?.[e].isCorrect===void 0?{isCorrect:t}:{}}}};s.items[e]?.isCorrect===!1&&(s.lastIncorrectCardId=e);const r=oE(s),i=r.percentComplete!==100?jv(r):r,a=Av(i);return a.percentComplete===100?{...a,isComplete:!0}:a}function xh({items:e,key:t}){const n=e??{},s=Object.keys(n).length,r=Object.values(n).filter(i=>i?.[t]).length;return s===0?0:Math.round(r/s*100)}function oE(e){const n=Object.values(e.items||{}).filter(s=>s.isCorrect===!0).length;return{...e,correctlyAnswered:n}}var bh=C(66330),rE,iE;const We=e=>!!e&&Object.prototype.toString.call(e)==="[object Object]",Rv=Array.isArray,Lge=(e,t)=>Object.fromEntries(Object.entries(t).map(e)),Pv=(e,t,n)=>{const s={};for(const r in n)s[e(r)]=t(n[r]);return s},aE=e=>e.map(Mv),cE=e=>e.map(Ov),lE=e=>Pv(rE,Mv,e),dE=e=>Pv(iE,Ov,e),Mv=e=>We(e)?lE(e):Rv(e)?aE(e):e,Ov=e=>We(e)?dE(e):Rv(e)?cE(e):e,qs=(e,t)=>{const n=new Set(t),s={};for(const r in e)n.has(r)||(s[r]=e[r]);return s},wo=(e,t)=>Object.fromEntries(Object.entries(e).map(([n,s])=>t(n,s)));function Bv(e,t){const n=e.lessons[t];if(!As(n))return e;const s={...yh(n),id:t},r=St({courseProgress:e,lessonId:t,updatedLessonProgress:s});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function uE(e,t){const{lessonId:n,blockId:s,itemId:r}=t,i=e.lessons[n];if(!As(i))return e;const a=i.items[s],c=yE({blockProgress:a,itemId:r}),l=br({lessonProgress:i,blockId:s,updatedProgressBlock:c}),d=Ch(l),h=St({courseProgress:e,lessonId:n,updatedLessonProgress:d});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}function hE(e,t){const n=e.lessons[t];if(!As(n))return e;const s=IE(n),r=St({courseProgress:e,lessonId:t,updatedLessonProgress:s});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:r})}function mE(e,{blockId:t,lessonId:n}){const s=e.lessons[n];if(!As(s))return e;const r=TE(s.items[t]),i=br({lessonProgress:s,blockId:t,updatedProgressBlock:r}),a=St({courseProgress:e,lessonId:n,updatedLessonProgress:i});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:a})}function fE(e,t){const{lessonId:n,blockId:s,items:r}=t,i=e.lessons[n];if(!As(i))return e;const a=bE({blockId:s,lessonProgress:i,items:r}),c=St({courseProgress:e,lessonId:n,updatedLessonProgress:a});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:c})}function pE(e,t){const{lessonId:n,blockId:s,itemId:r,audioVideoPlayhead:i}=t,a=e.lessons[n],c=a?.items?.[s];if(!As(a)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],audioVideoPlayhead:i},h={...c,items:{...c.items,[r]:d}},m=br({lessonProgress:a,blockId:s,updatedProgressBlock:h}),f=St({courseProgress:e,lessonId:n,updatedLessonProgress:m});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function gE(e,t){const{lessonId:n,blockId:s,itemId:r,isCorrect:i}=t,a=e.lessons[n];if(!As(a))return e;const c=LE({itemId:r,isCorrect:i,blockProgress:a.items[s]}),l=Ch(br({lessonProgress:a,blockId:s,updatedProgressBlock:c})),d=St({courseProgress:e,lessonId:n,updatedLessonProgress:l});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:d})}function vE(e,t){const{lessonId:n,blockId:s,itemId:r,response:i}=t,a=e.lessons[n],c=a?.items?.[s];if(!As(a)||!c||!("items"in c)||!c.items||!c.items[r])return e;const d={...c.items[r],response:i},h={...c,items:{...c.items,[r]:d}},m=br({lessonProgress:a,blockId:s,updatedProgressBlock:h}),f=St({courseProgress:e,lessonId:n,updatedLessonProgress:m});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:f})}function CE(e,t){const{lessonId:n,blockId:s,isSubmitted:r}=t,i=e.lessons[n];if(!As(i))return e;const a=i?.items?.[s]??{},c=wo(a?.items??{},(m,f)=>[m,qs(f,["response"])]),l={...a,items:c,isSubmitted:r},d=br({lessonProgress:i,blockId:s,updatedProgressBlock:l}),h=St({courseProgress:e,lessonId:n,updatedLessonProgress:d});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:h})}const xE=e=>Object.values(e).length>0&&Object.values(e).every(t=>t.isComplete),yh=e=>{const t=wo(e.items,(n,s)=>{const r=wo(s.items??{},(i,a)=>[i,{...a,isComplete:!0,id:a.id,index:a.index}]);return[n,{...s,items:r,isComplete:!0}]});return{...e,isComplete:!0,items:t,percentComplete:100}},bE=({blockId:e,items:t,lessonProgress:n})=>{const s=n.items?.[e]??{items:{}},r=new Set(t.map(d=>String(d.id))),i=wo(s.items??{},(d,h)=>{const m=r.has(d);return[d,{...h,isComplete:h.isComplete||m,id:h.id,index:h.index}]}),c=Object.keys(i).length===0||xE(i),l={...s,id:e,items:i,...c&&{isComplete:!0}};return SE(br({lessonProgress:n,blockId:e,updatedProgressBlock:l}))},yE=({blockProgress:e,itemId:t})=>{if(!e.items)return e;const n=e.items[t];return{...e,items:{...e.items,[t]:{...n,retryAttemptCount:(n?.retryAttemptCount??0)+1}}}},SE=e=>{const t=Ch(e);return t.percentComplete===100?{...t,isComplete:!0}:t},br=({blockId:e,lessonProgress:t,updatedProgressBlock:n})=>({...t,items:{...t.items,[e]:n}}),IE=e=>{const t=wo(e.items,(n,s)=>{const r=wo(s.items??{},(i,a)=>[i,qs(a,["isComplete","isCorrect","isViewed"])]);return[n,{id:s.id,index:s.index,items:r}]});return{...qs(e,["isComplete","percentComplete"]),items:t}},TE=e=>({...qs(e,["percentViewed","correctlyAnswered"]),id:e.id,index:e.index,items:wo(e.items??{},(t,n)=>[t,qs(n,["isViewed","isCorrect"])]),retryAttempts:(e.retryAttempts??0)+1}),LE=({isCorrect:e,itemId:t,blockProgress:n})=>{if(!n.items)return n;const s=n.items[t],r={...s,isComplete:e,isViewed:e,...s?.isCorrect===void 0&&{isCorrect:e}},i={...n.items,[t]:r},a=Object.values(i).filter(m=>m.isCorrect).length,c={...n,items:i,correctlyAnswered:a,...!e&&{lastIncorrectCardId:t}},l=Av(c),d=jv(l),h=d.percentComplete===100;return{...d,...h&&{isComplete:!0}}};var EE=C(76972);const Ege="datadoghq.com",kge=Ae("SERVICE_ENV"),Nge=Ae("RISE_FRONTEND_SHA"),wge=Ae("RISE_FRONTEND_LOCAL_DEV")==="true"||window.location.hostname==="rise.dev.articulate.zone",jge=window.Cypress!=null,Age=[/https:\/\/(rise(\.dev)?|360)\.articulate\.(com|zone)(?!\/api\/rise-business-content\/).*/],Sh={RESUME_RECOVERY:"Quiz resume recovery",END_ADVANCE_REFUSED:"Quiz end advance refused"};function Rge(e,t){}function Dv(e){return e.trim()===""}var kE=C(97115);const V=(0,kE.setup)({el:"__",mod:"--",modValue:"-"}),NE=V("quiz"),wE=0,pi=2,jE=e=>({start:e<pi?0:e-pi,end:e+pi});function Xs(e){return e+1}function AE(e){return e<wE+pi}function RE(e,t){const{start:n,end:s}=jE(t);return{items:e.slice(n,s),startOffset:n}}function Tl({activeIndex:e,index:t}){return NE("card",{active:t===e,done:t<e,next:t===e+1,penultimate:t===e+pi,future:t>e+pi})}function PE(e,t){const{lessonId:n,fromIndex:s,progressId:r}=t,i=e.lessons[n];if(!un(i))return e;const a=i.activeIndex??0;if(s!=null&&a!==s)return e;const c=r?(i.items[r]?.index??a)+1:a+1,l=Object.keys(i.items).length+1,d=Math.min(c,l);if(d===l&&t.finalize&&!i.reportResults&&!Na(i))return Sh.END_ADVANCE_REFUSED,{...Fv(i)},e;let h={...i,activeIndex:d};d===l&&!i.reportResults&&t.finalize&&(h=Ll(h,{passingScore:i.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt}));const m=St({courseProgress:e,lessonId:n,updatedLessonProgress:h});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:m})}function ME(e,t){const{lessonId:n}=t,s=e.lessons[n];if(!un(s))return e;if(t.finalize&&!s.reportResults&&!Na(s))return Sh.END_ADVANCE_REFUSED,{...Fv(s)},e;const r=Object.keys(s.items).length;let i={...s,activeIndex:r+1};!s.reportResults&&t.finalize&&(i=Ll(i,{passingScore:s.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt}));const a=St({courseProgress:e,lessonId:n,updatedLessonProgress:i});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:a})}function OE(e,{lessonId:t,itemId:n}){const s=e.lessons[t];if(!un(s))return e;const r=s.items[n];if(!r)return e;const i={...r,selectedIndices:[]},a=wa({lessonProgress:s,itemId:n,updatedProgressQuizItem:i}),c=St({courseProgress:e,lessonId:t,updatedLessonProgress:a});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:c})}function BE(e,t){const{lessonId:n,lessonProgress:s}=t,r=e.lessons[n],i=un(r)&&r.reportResults?r:void 0,a=i?{...s,isComplete:i.isComplete,passed:i.passed,percentComplete:i.percentComplete,reportResults:i.reportResults,score:i.score}:s,c={...e,lessons:{...e.lessons,[n]:a}};if(i||!DE(s,t))return c;const l=Ll(s,{passingScore:s.passingScore??80,passToContinue:t.passToContinue,finalRetryAttempt:t.finalRetryAttempt});return It({lessonId:n,prevCourseProgress:e,nextCourseProgress:St({courseProgress:c,lessonId:n,updatedLessonProgress:l})})}function DE(e,t){if(!t.finalize||e.reportResults)return!1;const n=Object.keys(e.items).length;return n>0&&(e.activeIndex??0)>=n+1&&Na(e)}function FE(e){const t=Object.values(e.items);if(t.length===0)return 0;const n=t.filter(s=>s.isCorrect).length;return Math.round(n/t.length*100)}function Fv(e){return{itemCount:Object.keys(e.items).length,incompleteItemIds:Object.values(e.items).filter(t=>t.isComplete!==!0).map(t=>String(t.id))}}function _E(e,{lessonId:t,itemId:n,text:s}){const r=e.lessons[t];if(!un(r))return e;const i=r.items[n];if(!i)return e;const a=typeof s=="string"&&Dv(s)?qs(i,["text"]):{...i,text:s},c=wa({lessonProgress:r,itemId:n,updatedProgressQuizItem:a}),l=St({courseProgress:e,lessonId:t,updatedLessonProgress:c});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function HE(e,t){const n=e.lessons[t];if(!un(n))return e;const s=wo(n.items,(c,l)=>{const d={id:l.id,index:l.index};return[c,d]}),i={...qs(n,["activeIndex","originalItemProgress","passed","percentComplete","questionList","questionsDrawn","reportResults","score"]),...n.passed!==!1&&{passed:n.passed},...n.isComplete!==!1&&{isComplete:n.isComplete},retryAttempts:(n.retryAttempts??0)+1,items:s},a=St({courseProgress:e,lessonId:t,updatedLessonProgress:i});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:a})}function VE(e,{lessonId:t,itemId:n,selectedIndex:s,shuffledAnswerIndices:r}){const i=e.lessons[t];if(!un(i))return e;const a=i.items[n];if(!a)return e;const c=r??a.shuffledAnswerIndices;if(s==null)return e;const l=Array.isArray(c)&&c[s]!=null?c[s]:s,d={...a,selectedIndex:l,...Array.isArray(c)&&{shuffledAnswerIndices:c}},h=wa({lessonProgress:i,itemId:n,updatedProgressQuizItem:d}),m=St({courseProgress:e,lessonId:t,updatedLessonProgress:h});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:m})}function zE(e,{lessonId:t,itemId:n,matches:s}){const r=e.lessons[t];if(!un(r))return e;const i=r.items[n];if(!i)return e;const a={...i,matches:s},c=wa({lessonProgress:r,itemId:n,updatedProgressQuizItem:a}),l=St({courseProgress:e,lessonId:t,updatedLessonProgress:c});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:l})}function $E(e,{lessonId:t,timeRemaining:n}){const s=e.lessons[t];if(!un(s))return e;const r={...s,timeRemaining:n},i=St({courseProgress:e,lessonId:t,updatedLessonProgress:r});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:i})}function UE(e,{lessonId:t,itemId:n,isCorrect:s,finalRetryAttempt:r,passToContinue:i}){const a=e.lessons[t];if(!un(a))return e;const c=a.passingScore??80,l=a.items[n];if(!l)return e;const d={...l,isCorrect:s,isComplete:!0},h={...a.items,[n]:d},m=Object.keys(h).length,f=Object.values(h).filter(T=>T.isCorrect).length,p=Object.values(h).filter(T=>T.isComplete).length,g=Math.round(f/m*100),v=Math.round(p/m*100),x=p===m?100:Math.min(v,99);let b={...a,items:h,score:g,percentComplete:x};Na(b)&&(b=Ll(b,{passingScore:c,passToContinue:i,finalRetryAttempt:r}));const y=St({courseProgress:e,lessonId:t,updatedLessonProgress:b});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:y})}function GE(e,{lessonId:t,itemId:n,selectedIndex:s,shuffledAnswerIndices:r}){const i=e.lessons[t];if(!un(i))return e;const a=i.items[n];if(!a)return e;const c=r??a.shuffledAnswerIndices;if(s==null)return e;const l=Array.isArray(c)&&c[s]!=null?c[s]:s,d=a.selectedIndices??[],m=d.includes(l)?d.filter(b=>b!==l):[...d,l],{selectedIndices:f,...p}=a,g=m.length>0?{...p,selectedIndices:m,...Array.isArray(c)&&{shuffledAnswerIndices:c}}:{...p,...Array.isArray(c)&&{shuffledAnswerIndices:c}},v=wa({lessonProgress:i,itemId:n,updatedProgressQuizItem:g}),x=St({courseProgress:e,lessonId:t,updatedLessonProgress:v});return It({lessonId:t,prevCourseProgress:e,nextCourseProgress:x})}function Ll(e,{passingScore:t,passToContinue:n,finalRetryAttempt:s}){if(e.reportResults||!Na(e))return e;const r=FE(e),i=r>=t,a=n?i:!0;return jC(i,r,e.id,s),{...e,passed:i,isComplete:a,reportResults:!0,score:r,percentComplete:100}}function Na(e){return Object.values(e.items).every(t=>t.isComplete===!0)}function wa({itemId:e,lessonProgress:t,updatedProgressQuizItem:n}){return{...t,items:{...t.items,[e]:n}}}function WE(e,t){const{id:n,passed:s,passingScore:r,score:i,retryAttempts:a}=t,c=[s,a,i];if(!(c.length===3&&c.every(g=>g!=null)))return e;const d=e.lessons?.[n]?.items??{},h=Object.keys(d).length+1,m=e.lessons?.[n];if(!m)return e;const f={...m,isComplete:!0,activeIndex:h,reportResults:!0,passed:s,passingScore:r,percentComplete:100,retryAttempts:a,score:i};return{...e,lessons:{...e.lessons,[n]:f}}}function KE(e,{quizId:t,destinationId:n}){const s=Object.keys(e.lessons),r=s.findIndex(c=>c===t),i=s.findIndex(c=>c===n);return r===-1||i===-1||i<=r?e:s.slice(r+1,i).reduce((c,l)=>{const d=c.lessons[l];if(!d||d.isComplete)return c;const h=un(d)?QE(d):yh(d),m=St({courseProgress:c,lessonId:l,updatedLessonProgress:h});return It({lessonId:l,prevCourseProgress:c,nextCourseProgress:m})},e)}function QE(e){const t=Object.fromEntries(Object.entries(e.items||{}).map(([n,s])=>[n,{...s,isComplete:!0,isCorrect:!0}]));return jC(!0,100,e.id,!1),{...e,items:t,isComplete:!0,passed:!0,percentComplete:100,reportResults:!0,score:100}}const ZE=e=>{const t=e.padEnd(e.length+(4-e.length%4)%4,"="),n=atob(t),s=Uint8Array.from(n,r=>r.charCodeAt(0));return new TextDecoder().decode(s)},_v=e=>{if(e!==void 0)return JSON.parse(ZE(String(e)))},YE=(e,t)=>window.courseData?e(window.courseData):window.course?{course:e(window.course),media:[]}:t;var qE=C(2949),Ue=C.n(qE),XE=C(27494),Ft=C.n(XE),JE=C(4656),Ih=C.n(JE),ek=C(85440),Hv=C.n(ek);const tk=["fromDashboard","locale","embed"];function nk(e,t){const n=typeof e=="function"?e(t):e;return typeof n=="string"?(0,Be.Rr)(n):n}function Th(e,t){const n=nk(e,t),s=new URLSearchParams(t?.search||""),r=new URLSearchParams(n?.search||"");for(const i of tk){const a=s.get(i);a&&!r.has(i)?r.set(i,a):r.has(i)&&!r.get(i)&&r.delete(i)}return{...n,search:r.toString()}}function hn(){const e=(0,Be.Zp)(),t=(0,Be.zy)();return(0,u.useCallback)((n,s)=>{if(typeof n=="number")return e(n);const r=Th(n,t);return e(r,s)},[e,t])}function sk(e){function t(n){const s=(0,Be.zy)(),r=hn(),i=(0,Be.g)(),[a]=(0,Be.ok)();return(0,o.jsx)(e,{...n,location:s,match:{params:i},navigate:r,queryParams:a})}return t.displayName=`withRouter(${e.displayName||e.name})`,t}function ok(e){return Object.fromEntries(new URLSearchParams(e.slice(1)))}var rk=C(62092),Vv=C.n(rk),ik=C(62220),Lh=C.n(ik),ak=C(16109),Rs=C.n(ak),ck=C(25784),jo=C.n(ck),lk=C(62197),gi=C.n(lk),dk=C(18793),Ut=C.n(dk),uk=C(6964),hk=C.n(uk),mk=C(77233),El=C.n(mk),Oge=C(67829),fk;function pk(...e){return Ue()(...hk()(1,e))(El()(e))}function Eh(e,...t){return Ut()(...t)(e)}function Bge(e,...t){return fk(...t)(e)}const mn=()=>{},zv={"Content-Type":"application/json"},gk=[(e,t)=>(t.Authorization=`Bearer ${Oa()}`,JSON.stringify(e))],vk=cs()(Ft(),je(),jo()(["data","status","statusText"])),Ck=Ut()(jo()(["name","message","response"]),Zs()({response:vk})),xk=({baseURL:e,...t})=>Ue()(mi()({headers:zv,transformRequest:gk}),mi()(t),Zs()({url:Rs()(e)})),bk=({data:e,method:t,url:n})=>fetch(n,{body:JSON.stringify(e),headers:{...zv,Authorization:`Bearer ${Oa()}`},keepalive:!0,method:t}).then(s=>s.json()).then(gi()("data")),yk=gr().fromPromise(bk),Sk=e=>({method:t,url:n})=>`${t}:${e}${n}`,Ik=e=>{const t=new Error("Nil token detected");return Ys.L2.addError(t,e),gr().Rejected(t)},Tk=e=>t=>e.preRequest?e.preRequest(t):t,Lk=e=>t=>e.postRequest?e.postRequest(t):t,Ek=()=>Ft()(Oa()),kk=e=>(t,n)=>Vv()(t,Sk(n),kh(Ba,e)),kh=(e,t)=>n=>Eh(n,Tk(t),xk(t),cs()(Ek,Ik,e),Lh()(Ck,st()("data")),Lk(t)),Nk=e=>({debounce:kk(e),send:kh(Ba,e),sendWithKeepAlive:kh(yk,e)});var wk=C(309),yr=C.n(wk);const jk=()=>document.visibilityState==="visible",Ak=e=>yr()(jk,()=>e()),$v=(e=>{document.addEventListener("visibilitychange",Ak(e)),window.addEventListener("focus",()=>e())});C.dn($v);var Rk=C(44113),jn=C.n(Rk),Pk=C(34469),ja=C.n(Pk),Mk=C(92996),Ok=C.n(Mk),Bk=C(14501),Sr=C.n(Bk);const Dk=e=>({user_role:e?.is_business_creator?"Business Creator":"Creator",is_admin:!!e?.is_team_admin});var Fk;const Uv=e=>{const t=e.user,n=t?.profile?.user_id,s=t?.subscription?.subscription_id||t?.subscription?.id,{user_role:r,is_admin:i}=Dk(t?.subscription);return{application_source:"360_rise",application_service:"authoring",user_role:r,is_admin:i,reach_user_id:void 0,a360_user_id:n,user_permissions:t?.permissions||[],session_id:e?.user?.session,subscription_id:t?.subscription?.subscription_id||s,tenant_id:s,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}}}},Fge=e=>{const t=e.course;return{course_id:t?.id,course_locale:t?.locale||e.l10n&&Fk(e.l10n)||null,course_created_via:t?.metadata?.createdVia??null,course_snapshot_id:t?.metadata?.restoredFromSnapshotId??null,copied_course_id:t?.copyOf??null}},_ge=(e,t)=>{if(!t)return{};const n=e?.lessons?.[t];if(!n)return{};const s=e?.course?.lessons?.indexOf(t)+1||null;return{lesson_id:t,lesson_type:n.type,lesson_position:s}},Hge=(e,t,n)=>{if(!t||!n)return{};const r=(e.lessons||{})[t];if(!r?.items)return{};const i=r.items.find(l=>l.id===n);if(!i)return{};const c=r.items.map(l=>l.id).indexOf(n)+1;return{block_id:n,block_type:i.type,block_variant:i.variant,block_family:i.family,block_position:c,block_created_via:i?.metadata?.createdVia??"manual"}},Vge=({interactionSetId:e,interactionSetWorkflowKey:t,taskType:n,resourceType:s,hasSourceContent:r}={})=>e?{interaction_set_id:e,...t&&{interaction_set_workflow_key:t},interaction_set_task_type:n,interaction_set_task_resource_type:s,interaction_set_has_source_content:r}:{},_k=()=>{if(!navigator.userAgent)return"unknown";const t=new vr.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:t.os?.name?t.os.name:t.browser?.name?t.browser.name:"unknown"},Hk=()=>{if(!navigator.userAgent)return"unknown";const t=new vr.UAParser(navigator.userAgent).getResult();return t.device?.model&&t.os?.version?t.os.version:t.browser?.version?t.browser.version:"unknown"},Vk=()=>{if(!navigator.userAgent)return"desktop";const t=new vr.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"desktop"},zk=()=>{if(!navigator.userAgent)return"unknown";const t=new vr.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"},$k=()=>{if(!navigator.userAgent)return"unknown";const t=new vr.UAParser(navigator.userAgent).getResult();return t.device?.model?t.device.model:"unknown"},Gv=()=>{if(!navigator.userAgent)return"browser";const t=new vr.UAParser(navigator.userAgent).getResult();return t.device?.type==="mobile"?"mobile":t.device?.type==="tablet"?"tablet":"browser"};function Uk(e){return"userAgentData"in e}const Wv=()=>{if(Uk(navigator))return{platform:navigator.userAgentData.platform,mobile:navigator.userAgentData.mobile,brands:navigator.userAgentData.brands}},Kv=()=>({name:_k(),version:Hk(),type:Vk(),manufacturer:zk(),model:$k()}),Qv=()=>{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}},Zv=()=>navigator.userAgent||null,Ir=(e,t=null)=>{const n={...e,context:{locale:navigator.language,device:Kv(),channel:Gv(),userAgentData:Wv(),page:Qv(),userAgent:Zv(),...e.context},properties:{...t?Uv(t):{},...e.properties}};return gh({method:"POST",url:`${Ae("RISE_RUNTIME_URI")}/analytics`,json:!0,data:n})},Gk=Ae("SUBSCRIPTIONS_ENDPOINT"),Wk=Ae("THREESIXTY_FRONTEND_URI"),Kk=Ok()(["error","status"],404),Qk=Ue()(gi()("error"),st()("response")),Zk=()=>window.location.href=Wk,Yk=[(e,t)=>(t.Authorization=`Bearer ${Oa()}`,e)],qk=async e=>{const t=`${Gk}/users/authorized_status`,n=await Ba({transformRequest:Yk,url:t}).toPromise().catch(Qk),s=Ue()(e,Hv()(i=>Ir({event:"Unexpected Logout",payload:{category:"auth",data:i,detail:"Subscription Error"}})));return jn()([[Kk,Zk],[ja()("error"),s],[Sr(),st()("data")]])(n)};function Ct(e){const t={};for(const n in e)Object.hasOwn(e,n)&&(t[n]=n);return t}class Xk extends Error{constructor(t="Assert Error",n){super(t,n)}}function $ge(e,t="Assertion Error"){if(!e)throw new Xk(t)}const Uge=null,Gn={ARTICLE:"Article",INTERACTION:"Interaction",QUIZ:"Quiz",VIDEO:"Video"},kl={EDITOR:1,MANAGER:2,OWNER:3},Jk={[kl.EDITOR]:"Author",[kl.MANAGER]:"Admin",[kl.OWNER]:"Owner"},Gge=Object.values(kl).map(e=>({id:e,title:Jk[e]})),Wge="questionBanks",Yv="2% 0px 2% 0px",Kge=9,Qge=13,Zge=27,Yge=32,qge=38,Xge=40,e1e=864e5*3,t1e=100,qv="onePage",e8="aiOutline",n1e="guide",Nh="presentation",t8="quickReference",wh="scenario",s1e="video",Ao=Ct({COMPACT:null,COVER:null,OVERLAY:null,SIDEBAR:null}),Tr={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},o1e=Object.values(Tr),r1e=null,Pt={DARK:"#000",LIGHT:"#fff"},Aa={SMALL:{label:"Small",value:1},MEDIUM:{label:"Medium",value:1.5},LARGE:{label:"Large",value:2}},Xv=["embed","map","process","sorting","timeline","video","screencast","slidecast"];var n8;const i1e=e=>e.status==="active",s8=e=>e.status==="inactive",a1e=e=>e.plan==="individual",c1e=e=>e.features?.enable_review===!0,o8=e=>e.features?.enable_rise===!0,l1e=e=>e.plan==="trial",r8=e=>e.plan==="trial"&&e.status==="inactive"&&e.is_retrial_eligible===!1,d1e=e=>e.plan==="team"||e.plan==="individual",u1e=e=>e.plan==="team"&&e.is_team_admin===!0,h1e=e=>e.plan==="trial"&&e.is_team_admin===!0,m1e=e=>{if(!e.end_date)return 0;const t=new Date(e.end_date);t.setUTCHours(0,0,0,0);const n=t.setDate(t.getDate()+1);return n&&(n.valueOf()-new Date().setUTCHours(0,0,0,0))/n8||0};var i8=C(7118),jh=C.n(i8),a8=C(13076),Jv=C.n(a8),c8=C(81233),Ra=C.n(c8),l8=C(66013),_n=C.n(l8);const Pa=(e,t)=>`${Ae("ID_MAPPER_URI")}/v1/avatars/${encodeURIComponent(e)}?size=${t}`,d8=e=>({large:Pa(e,"large"),medium:Pa(e,"medium"),micro:Pa(e,"micro"),mini:Pa(e,"mini"),small:Pa(e,"small")}),u8=Jv()({features:_n()({},"features"),subscription:Ih()(["features"])}),h8=jh()([r8,s8,Ra()(o8)]),m8="/auth-callback",eC="/auth-error",Nl=()=>new Promise(e=>{if(!window.Osano)return e();if(window.Osano.cm.dialogOpen){const t=setTimeout(()=>{e()},1e4);window.Osano.cm.addEventListener("osano-cm-ui-changed",(n,s)=>{n==="dialog"&&s==="hide"&&(e(),clearTimeout(t))})}else e()}),Ah=m8,f8=eC,p8=Rt,tC=()=>window.location.pathname===Ah;let nC=!1,Rh=!1;const g8=e=>{if(nC)return;const t=crypto.randomUUID();nC=!0,window.localStorage.setItem(t,e);const n=KL({client_id:Ae("OKTA_CLIENT_ID"),issuer:Ae("OIDC_ISSUER_URI"),redirect_uri:`${window.location.origin}${Ah}`,response_mode:"fragment",scope:Ae("OIDC_SCOPE"),state:t,prompt:null});Nl().then(()=>{window.location.href=n})},sC=()=>{const e=new URLSearchParams(window.location.search),t=e.has("redirect_url")?e.get("redirect_url"):window.location.href;return g8(t)},v8=()=>Iv().catch(e=>{e.response?.status===404&&Lr({onLogout:()=>window.location.reload(!0),reason:"Session expired"})}),C8=e=>(fi("unauthorized",e),()=>{GL("unauthorized",e)}),x8=()=>{if(Rh)return;const e=xr(),t=ph();Ft()(e)?(Ir({event:"Unexpected Logout",payload:{category:"auth",userId:t,detail:"id from cookie was null"}}),Ys.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"id from cookie was null"}),Rh=!0,Lr({onLogout:()=>window.location.reload(!0),reason:"Unexpected logout: user id/session cookie missing"})):e!==t&&(Ir({event:"Unexpected Logout",payload:{category:"auth",userId:e,idFromToken:t,detail:"Session/Token ID Mismatch"}}),Ys.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",idFromToken:t,idFromCookie:e,detail:"Session/Token ID Mismatch"}),Rh=!0,ka().then(()=>window.location.reload(!0)))},oC=async e=>{try{const[,t,n,s]=await ka(),{aid:r,content_team_admin:i}=s;if(Ir({event:"Setting Session Cookie",payload:{category:"auth",userId:r,detail:"Resuming existing session"}}),RL(r),tC()){e();return}const{first_name:a,last_name:c,launchdarkly:l,staff:d}=t,m={avatars:d8(r),first_name:a,user_id:r,last_name:c,staff:d,content_team_admin:i},f={author:r,profile:m},p=()=>Lr({onLogout:Fe()(null)}),g=x=>e({...f,...u8(x),launchdarkly:l,token:n}),v=await qk(p).then(Hv()(g)).catch(()=>e({...f,token:n}));if(h8(v)){Ir({event:"Unexpected Logout",payload:{category:"auth",userId:xr(),subscription:v,detail:"Invalid Subscription"}}),Ys.L2.addError(new Error("Unexpected Logout"),{type:"User Meta",userId:xr(),detail:"Invalid Subscription"}),Lr({onLogout:()=>window.location=`${Ae("THREESIXTY_FRONTEND_URI")}/rise`});return}$v(x8)}catch(t){Ir({event:"Unexpected Logout",payload:{category:"auth",userId:xr(),error:t,detail:"Error Resuming Session"}}),Ys.L2.addError(t,{type:"User Meta",userId:xr(),detail:"Error Resuming Session"}),Lr({onLogout:()=>window.location.reload(!0)})}},rC=({onFetchTokens:e})=>{if(tC()){oC(e);return}const t=xr(),n=ph();if(Ft()(t)||t!==n){Nl().then(sC);return}oC(e)},Lr=({onLogout:e,reason:t})=>{t&&Ir({event:"Logout",payload:{category:"auth",userId:xr(),detail:t}});const n=Ae("RISE_AUTHORING_URI"),s=()=>Nk({baseURL:n}).send({method:"DELETE",url:"/logout"}),r=()=>{PL(),ML(),Sv().then(e)};s().fork(i=>{console.error("Failed to log out of rise-authoring-api",i),r()},r)},b8=(e,t)=>{Nl().then(()=>{const s=window.localStorage.getItem(t)||"/",r=s===e?"/":s;window.localStorage.removeItem(t),window.location.href=r})},y8=e=>()=>window.location.href=`${eC}?description=${e}`,S8=({location:e})=>()=>{const{hash:t,pathname:n}=e,{state:s,error:r,error_description:i}=ok(t);r?(Ys.L2.addError(r,{type:"Logout Error",reason:"Error encountered when parsing auth callback.",error_description:i}),Lr({onLogout:y8(i),reason:`Error encountered when parsing auth callback. Error: ${r}; description: ${i}`})):rC({onFetchTokens:()=>b8(n,s)})},I8=sk(e=>((0,u.useEffect)(S8(e),[]),null)),T8=({dispatch:e,loadProfileOKTA:t})=>n=>{const s=Ih()(["token"],n);Ue()(e,t)(s)};var L8=C(76871),E8=C.n(L8),k8=C(43420),Er=C.n(k8),N8=C(21239),Mt=C.n(N8),w8=C(8119),iC=C.n(w8),j8=C(53883),Ma=C.n(j8);const wl=async()=>{await Nl();const[e,t]=At()(encodeURIComponent,iC()(["hash","pathname"],window.location));window.location.href=`/login#c=${t}${e}`},aC=()=>{window.location.href="/"},p1e=null,g1e=null,v1e=Rt,C1e=wl,A8=Sv,x1e=()=>Iv().catch(()=>A8()),b1e=()=>mn,R8=Ut()(_n()([],"roles"),Ma()(Er()("author"),aC)),cC=Ut()(Mt()("",["subscription","status"]),Ma()(Er()(E8(),["active","in_trial","non_renewing"]),aC)),P8=()=>window.location.reload(),y1e=async({onFetchTokens:e})=>{try{const[t,n]=await ka(),{launchdarkly:s,riseId:r,sub:i,staff:a,subscription:c}=n,l={staff:a,user_id:r||i};return cC(n),e({author:l.user_id,launchdarkly:s,profile:l,subscription:c,token:t}),fi("change:roles",R8),fi("change:status",cC),fi("change:subdomain",P8),fi("unauthorized",wl),fi("session:closed",wl),t}catch{wl()}};var S1e;const{callbackComponent:I1e,callbackPath:T1e,getToken:Oa,initAuth:L1e,login:E1e,logout:k1e,onSessionExpired:N1e,refreshSession:w1e,request:Ba}=rh;var lC;const dC=`${Ae("RBC_URI")}/api/partner_content`,M8=null,O8=e=>`${dC}/${e}`,Ph={transformRequest:[(e,t)=>(t.Authorization=`Bearer ${Oa()}`,e)],headers:{"Content-Type":"application/json"}},R1e=()=>lC({...Ph,url:M8}).toPromise().then(e=>e.data?.types??[]),P1e=e=>lC({...Ph,url:O8(e)}).toPromise().then(t=>t.data?.content??[]),B8=e=>Ba({method:"POST",url:dC,data:JSON.stringify({ids:e}),...Ph}).map(t=>t.data?.content??[]);var D8=C(17193),vi=C.n(D8);const uC=Ae("SERVICE_ENV")==="prod",jl=uC?"com":"zone",F8=Ut()(JSON.stringify,vi()(new RegExp(`https://images.riseusercontent.${jl}/`,"g"),`${Ae("IMAGES_URI")}/`),vi()(new RegExp(`https://riseusercontent.${jl}/`,"g"),`${Ae("CDN_USER_CONTENT_URI")}/`),vi()(new RegExp(`https://video.rise.${jl}/`,"g"),`https://video.riseusercontent.${jl}/`),yr()(Fe()(!uC),vi()(new RegExp("https://video.rise.com/","g"),"https://video.riseusercontent.zone/")),JSON.parse);var _8=C(47258),fn=C.n(_8),H8=C(5136),en=C.n(H8),V8=C(15489),Al=C.n(V8),z8=C(55066),hC=C.n(z8);const $8=jo(),Mh=js(),Oh=ls(),Bh=hC(),mC=mi(),Da=st(),U8=Zs(),Dh=At(),Rl=e=>e!=null&&typeof e=="object",G8=e=>t=>Ft()(t)?t:e(t),Fa=e=>!!e,fC={a:["activeIndex",je()],vp:["audioVideoPlayhead",Number],c:["isComplete",Fa],n:["correctlyAnswered",je()],p:["percentComplete",je()],r:["retryAttempts",je()],s:["score",je()],t:["currentTime",je()],v:["percentViewed",je()],rr:["reportResults",je()],pq:["passed",je()],ps:["passingScore",je()],qd:["questionsDrawn",je()],ql:["questionList",G8(At()(At()(je())))],qt:["timeRemaining",Number]},W8=e=>(t,n)=>{const[s,r]=fC[n];return fn()(s,r(t),e)},pC=e=>(t,n)=>{const[s,r]=q8[n],i=n==="i"?Fh(t)(Da("items",e)):r(t);return{[s]:i}},K8=e=>t=>{const n=e?.[String(t.index)];if(Ft()(n))return t;const s=Mh(pC(t),Rl(n)?n:{}),r=Bh(Oh(s).filter(i=>i!=null&&typeof i=="object"));return mC(t,r)},Fh=e=>t=>Dh(K8(Rl(e)?e:{}),Rl(t)?t:{}),Q8=e=>{const t=Mh(pC(null),Rl(e)?e:{});return Bh(Oh(t).filter(n=>n!=null&&typeof n=="object"))},Z8=e=>t=>{const n=Da("i",e),s=Da("items",t),r=$8(Al()(fC),e),i=Mh(W8(t),r);let a=Bh(Oh(i).filter(h=>h!=null&&typeof h=="object"));const c=e.ql,l=n!=null&&e.qd===!0&&Array.isArray(c)&&c.length>0&&c.every(h=>Array.isArray(h));if(!(n!=null&&Object.keys(n).length===0)&&!l&&(a=fn()("items",Fh(n??{})(s),a)),a=mC(t,a),l){const h=Dh(Q8,n??{});return fn()("originalItemProgress",h,a)}return a},Y8=(e,t)=>{const n=Da("lessons",t),s=i=>{const a=Da(String(i.index),n);return Ft()(a)?i:Z8(a??{})(i)};if(en()(n))return e;const r=U8({lessons:i=>Dh(s,i)},e);return fn()("percentComplete",_n()(0,"p",t),r)},q8={vp:["audioVideoPlayhead",Number],n:["correctlyAnswered",je()],c:["isComplete",Fa],k:["isCorrect",Fa],is:["isSubmitted",Fa],v:["isViewed",Fa],i:["items",Fh],pv:["percentViewed",je()],m:["matches",je()],sr:["response",je()],r:["retryAttemptCount",Number],s:["selectedIndex",je()],x:["selectedIndices",je()],sa:["shuffledAnswerIndices",je()],t:["text",je()]};var X8=C(87396),Ro=C.n(X8),J8=C(56890),gC=C.n(J8);const vC=jo(),eN=gC(),CC=js(),_h=ls(),Hh=hC(),Vh=st(),tN=At(),nN=e=>e!=null&&typeof e=="object",xC=e=>!!Ro()(Ft(),en())(e),sN=e=>t=>Ft()(t)?t:e(t),bC={activeIndex:["a",je()],audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",je()],currentTime:["t",je()],isComplete:["c",Number],passingScore:["ps",je()],percentComplete:["p",je()],percentViewed:["v",je()],retryAttempts:["r",je()],score:["s",je()],questionsDrawn:["qd",je()],questionList:["ql",sN(At()(At()(je())))],reportResults:["rr",je()],passed:["pq",je()],timeRemaining:["qt",Number]},oN=(e,t)=>{const[n,s]=IC[t];return{[n]:s(e)}},yC=e=>{const t=vC(Al()(IC),e),n=eN(en(),t),s=Hh(_h(CC(oN,n)).filter(r=>r!=null&&typeof r=="object"));return en()(s)?s:gi()(String(Vh("index",e)),s)},SC=e=>{const t=tN(yC,nN(e)?e:{});return Hh(_h(t).filter(n=>n!=null&&typeof n=="object"))},rN=e=>{const t={};for(const[n,s]of Object.entries(e))s==null||typeof s!="object"||Object.assign(t,yC({...s,index:n}));return t},iN=(e,t)=>{const[n,s]=bC[t];return{[n]:s(e)}};function aN(e){const t=Vh("items",e),n=Vh("index",e),s=e.originalItemProgress,r=s!=null&&Object.keys(s).length>0?rN(s):xC(t)?t:SC(t??{}),i=Hh(_h(CC(iN,vC(Al()(bC),e))).filter(c=>c!=null&&typeof c=="object")),a=xC(r)?i:fn()("i",r,i);return gi()(String(n),a)}const cN=e=>gi()("p",_n()(0,"percentComplete",e)),IC={audioVideoPlayhead:["vp",Number],correctlyAnswered:["n",je()],isComplete:["c",Number],isCorrect:["k",Number],isSubmitted:["is",je()],isViewed:["v",Number],items:["i",SC],matches:["m",je()],percentViewed:["pv",je()],retryAttemptCount:["r",Number],selectedIndex:["s",je()],selectedIndices:["x",At()(Number)],shuffledAnswerIndices:["sa",At()(Number)],text:["t",je()],response:["sr",je()]},lN=e=>`${Ae("CDN_USER_CONTENT_URI")}/${e}`,dN=()=>!!window.shareId,TC=()=>!!window.contentId,LC=()=>!!window.snapshotId,uN=()=>!!window.shareId&&!!window.hasPassword,hN=e=>TC()?F8(e):e,mN=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),EC=e=>{if(!mN(e))throw new Error("Invalid course payload");return e},fN={fetch:()=>zh.isExport?.()||window.courseData||window.course?Promise.resolve(YE(_v,{})).then(EC):gh({method:"GET",url:window.shareId?`${Ae("RISE_RUNTIME_URI")}/boot/share/${window.shareId}`:TC()?`${Ae("RISE_RUNTIME_URI")}/boot/businessContent/${window.contentId}`:LC()?`${Ae("RISE_RUNTIME_URI")}/boot/snapshot/${window.snapshotId}`:`${Ae("RISE_RUNTIME_URI")}/boot/${window.courseId}`,json:!0,withCredentials:!0,timeout:3e4}).then(qL).then(t=>typeof t=="object"?t:_v(t)).then(EC).then(hN),fetchPartnerContent:e=>zh.isExport?.()||window.partnerContent?window.partnerContent.content:B8(e).toPromise(),getDeliveryMode:()=>window.Runtime==null?"hosted":"static-export",getEnv:Ae,isPasswordProtected:uN,isShare:dN,isSnapshotPreview:LC,resolvePath:lN,verifySharePassword:e=>gh({method:"POST",url:`${Ae("RISE_RUNTIME_URI")}/password`,data:{shareId:window.shareId,password:e},json:!0}).then(t=>t.body)},pN=(e,{id:t,type:n,...s})=>n==="quiz"?WE(e,{id:t,...s}):Bv(e,t),gN=(e,t)=>e+((t||{}).c||0),vN=(e,t)=>(n,{id:s,type:r,...i})=>t.lessons[s]?{...n,...e(pN(t,{id:s,type:r,...i}).lessons[s])}:n,CN=(e,t,n)=>{const s=t.reduce(vN(e,n),{}),r=Object.keys(n.lessons||{}).length,i=Object.values(s).reduce(gN,0),a=Math.round(i/r*100);return{lessons:s,p:a}};window.Rise=Object.assign(window.Rise||{},{completeLessons:CN,decodeCourseProgress:Y8,encodeCourseProgress:cN,encodeLessonProgress:aN});const zh={...fN,...window.Runtime??{}},xe=zh,kC=e=>xe.getMasteryScore!=null?xe.getMasteryScore(e):e.passingScore,xN=e=>{if(xe.onCreateHistory!=null)return xe.onCreateHistory(e)},NC=(e={},t)=>xe.fetch!=null?Promise.resolve(t==null?xe.fetch():xe.fetch(t)):Promise.resolve(e),bN=(e=[])=>{if(xe.fetchPartnerContent!=null)return xe.fetchPartnerContent(e)},yN=e=>{if(xe.bookmark!=null)return xe.bookmark(e)},wC=e=>xe.getProgress!=null?xe.getProgress(e):e,SN=e=>xe.setLessonComplete!=null?xe.setLessonComplete(e):e,IN=e=>xe.setLessonProgress!=null?xe.setLessonProgress(e):e,TN=(e,t)=>xe.setCourseProgress!=null?xe.setCourseProgress(e,t):e,LN=e=>{if(xe.finish!=null)return xe.finish(e)},EN=()=>window.viewType!=="preview"&&xe.finishQuiz!=null,jC=(e,t,n,s)=>{xe.finishQuiz!=null&&xe.finishQuiz(e,t,n,s)},kN=(e,t,n,s)=>{xe.finishStoryline!=null&&xe.finishStoryline(e,t,n,s)},AC=()=>xe.isComplete!=null?xe.isComplete():null,NN=()=>xe.getDeliveryMode!=null?xe.getDeliveryMode():"hosted",wN=()=>xe.isExport!=null?xe.isExport():!1;function RC(){if(xe.isExport!=null){const e=window.partnerContent?.content;return xe.isExport()&&!!e}return!1}const Pl=()=>xe.isShare!=null?xe.isShare():!1,$h=()=>xe.isSnapshotPreview!=null?xe.isSnapshotPreview():!1,PC=()=>xe.isPasswordProtected!=null?xe.isPasswordProtected():!1,MC=e=>{const t=e||"";return xe.resolvePath!=null?t.startsWith("http")||t.startsWith("data:")||t.startsWith("//")?t:xe.resolvePath(t):t.startsWith("data:")||t.startsWith("http")||t.startsWith("//")?t:`/${t}`},jN=e=>xe.verifySharePassword!=null?xe.verifySharePassword(e):Promise.resolve({isValid:!0}),OC=e=>{if(xe.reportAnswer!=null){const{id:t,isCorrect:n,isUnfinished:s=!1,item:r,itemProgress:i,duration:a,retryAttempts:c,title:l}=e,{id:d,title:h,type:m}=r;return xe.reportAnswer({id:t,type:m,isCorrect:n,itemId:d,questionTitle:wn(h),quizTitle:wn(l),retryAttempts:c,answers:bL(r),correctResponse:yL(r),response:SL({isUnfinished:s,item:r,itemProgress:i}),isUnfinished:s,latency:xL(a)})}return!1},_a=e=>{if(xe.startLesson!=null)return xe.startLesson(e)},AN=e=>{xe.startQuiz!=null&&xe.startQuiz(e)},kr=e=>{if(xe.endLesson!=null)return xe.endLesson(e)},RN=()=>{if(xe.getLocale!=null)return xe.getLocale()},PN=e=>{if(xe.setLocale!=null)return xe.setLocale(e)},{browser:BC,os:DC}=new vr.UAParser(window.navigator.userAgent).getResult(),MN=e=>{if(xe.sendTelemetry!=null)return xe.sendTelemetry({...e,browser:{name:BC.name??"",version:BC.version??""},os:{name:DC.name??"",version:DC.version??""}})};var FC=C(99953),ON=C(94789),BN=C(96719),DN=C(51133),FN=C(79968),_N=C(56680),Uh=C(19268),Ha=C(29160),HN=C(27765);FC.A.register(ON.A),FC.A.register(BN.A);function Po(...e){try{return(0,DN.Ay)(...e)}catch{return null}}const ds=(e,t)=>{const n=Po(t);return n==null?null:(0,Ha.A)((0,Uh.jh)(n,Po("#ffffff"),e),{format:"hex",collapse:!1})},Gh=e=>ds(.9,e);var VN=C(45524),pn=C.n(VN),zN=C(17618),$N=C.n(zN),UN=C(3165),Wh=C.n(UN),an=C(95390);const GN=Ue()(Er()(".svg"),e=>(e??"").toLowerCase(),_n()("","originalUrl")),WN=cs()(GN,Fe()({width:"500rem"}),Fe()({})),Mo=e=>{if(e){const t=e.trim();if(t!==""&&t!=='""')return e}return""},_C=e=>Mo(e)||void 0,HC=e=>e?"img":void 0,VC=e=>Ut()(_n()("","originalUrl"),t=>t??"",Wh()("."),El(),t=>(t??"").toLowerCase(),pn()(e)),KN=VC("svg"),_1e=VC("gif"),QN=/\.svg$/i,zC=e=>QN.test(e),ZN=null,H1e=e=>ZN[e]||"left",YN=(e,t)=>{const n=$N()(e,t);return n.media.image.key===t.media.image.key&&Object.assign(n.media.image,{crushedKey:t.media.image.key,useCrushedKey:!0}),n},qN=({src:e,alpha:t})=>({alpha:t,media:{image:{key:XN(e),src:e}}}),XN=e=>typeof e!="string"?"":e.startsWith("http")?new URL(e).pathname.slice(1):e,JN=(({coverImageAlpha:e,coverImage:t})=>({alpha:e,src:t})),e7=(({lessonHeaderImageAlpha:e,lessonHeaderImage:t})=>({alpha:e,src:t})),$C=(e,t)=>(n,s)=>{const r=n[t];if(n?.theme){const i=s?s(r?.media):r?.media;if((0,an.uW)(i))return r;const a={...r,media:{...i}},c=qN(e(n.theme));return YN(a,c)}else return r},UC=$C(JN,"coverImage"),GC=$C(e7,"lessonHeaderImage"),V1e=async e=>{const t=new Image;return t.src=e,await t.decode(),t},se={RISE_CLASSIC:"classic",APEX:"organic",HORIZON:"imaginative"},t7="#ff631e",z1e=3,$1e=17,U1e=32,G1e=24,W1e=50,K1e=.6,Q1e="right",n7="rounded",s7=[{color:"#4baaf4",name:"Sky"},{color:"#285f9f",name:"Blueberry"},{color:"#7837a8",name:"Jelly"},{color:"#d84738",name:"Cherry"},{color:"#ff631e",name:"Tangerine"},{color:"#25bb64",name:"Basil"}],Z1e="#ffffff",Y1e=uh()("color",s7),q1e="#000",X1e="#fff",J1e="Rise",re=Ct({ACCENT:null,BLACK:null,COLOR:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),Va=Ct({LARGE:null,MEDIUM:null,SMALL:null}),za=Ct({STEPPED:null,CONTINOUS:null}),Kh=Ct({NUMBERS:null,DOTS:null,NONE:null}),Nr=Ct({COMPACT:null,OVERLAY:null,SIDEBAR:null}),Js=Ct({DARK:null,DARK_IMAGE:null,LIGHT:null,LIGHT_IMAGE:null}),wr=Ct({DARK:null,DARK_ACCENT:null,DARK_IMAGE:null,LIGHT:null,LIGHT_ACCENT:null,LIGHT_IMAGE:null}),Oo={FREE:"free",RESTRICTED:"restricted"},jr=Ct({ACCENT:null,DARK:null,GRAY:null,IMAGE:null,LIGHT:null,TINT:null}),ut=Ct({THEME_DEFAULT:null,CIRCULAR_FILL:null,INCOMPLETE_COMPLETE:null}),$a=Ct({ACCENT:null,DARK:null,LIGHT:null,TINT:null}),eo=Ct({FULL:null,FLOATING:null,FLOATING_FULL:null}),fe=Ct({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}),Ua=Ct({TOP_LEFT:null,TOP_RIGHT:null,BOTTOM_LEFT:null,BOTTOM_RIGHT:null}),o7={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right"},r7=Ua.BOTTOM_RIGHT,eve=[{text:"Top left",type:Ua.TOP_LEFT},{text:"Top right",type:Ua.TOP_RIGHT},{text:"Bottom left",type:Ua.BOTTOM_LEFT},{text:"Bottom right",type:Ua.BOTTOM_RIGHT}],tve={default:[{text:"Centered",type:fe.CENTERED},{text:"Centered overlay",type:fe.CENTERED_OVERLAY},{text:"Left",type:fe.LEFT},{text:"Left overlay",type:fe.LEFT_OVERLAY},{text:"Split left image",type:fe.SPLIT_LEFT_IMAGE},{text:"Split right image",type:fe.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:fe.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:fe.TWO_THIRDS_RIGHT_IMAGE}],classic:[{text:"Centered",type:fe.CENTERED},{text:"Centered overlay",type:fe.CENTERED_OVERLAY},{text:"Left",type:fe.LEFT},{text:"Left overlay",type:fe.LEFT_OVERLAY},{text:"Split left image",type:fe.SPLIT_LEFT_IMAGE},{text:"Split right image",type:fe.SPLIT_RIGHT_IMAGE},{text:"Two-Thirds left image",type:fe.TWO_THIRDS_LEFT_IMAGE},{text:"Two-Thirds right image",type:fe.TWO_THIRDS_RIGHT_IMAGE}],organic:[{text:"Centered",type:fe.CENTERED},{text:"Centered overlay",type:fe.CENTERED_OVERLAY},{text:"Left",type:fe.LEFT},{text:"Left overlay",type:fe.LEFT_OVERLAY},{text:"Split left",type:fe.SPLIT_LEFT},{text:"Split right",type:fe.SPLIT_RIGHT},{text:"Split left image",type:fe.SPLIT_LEFT_IMAGE},{text:"Split right image",type:fe.SPLIT_RIGHT_IMAGE}],imaginative:[{text:"Centered",type:fe.CENTERED},{text:"Centered overlay",type:fe.CENTERED_OVERLAY},{text:"Centered image",type:fe.CENTERED_IMAGE},{text:"Centered accent tint",type:fe.CENTERED_ACCENT_TINT},{text:"Split left image",type:fe.SPLIT_LEFT_IMAGE},{text:"Split right image",type:fe.SPLIT_RIGHT_IMAGE},{text:"Two-thirds left image",type:fe.TWO_THIRDS_LEFT_IMAGE},{text:"Two-thirds right image",type:fe.TWO_THIRDS_RIGHT_IMAGE}]},nve=null,sve=null,i7=[{text:"Image",type:fe.IMAGE},{text:"Accent",type:fe.ACCENT},{text:"White",type:fe.WHITE}],ove=[{text:"Video",type:fe.VIDEO},...i7],Ci={CLOSED:"closed",HIDDEN:"hidden",OPEN:"open"},ke=Ct({AUTO:null,BLACK:null,LIGHT:null,DARK:null}),a7=Ct({ROUNDED:null,SQUARED:null}),c7=Ct({ROUNDED:null,SQUARED:null}),l7=Ct({FLOATING:null,FULL:null}),xt=Ct({ACCENT:null,DARK:null,LIGHT:null}),rve=[{value:ke.AUTO,label:"Auto"},{value:ke.DARK,label:"Dark"},{value:ke.LIGHT,label:"Light"}],nt={accentContrast:ke.AUTO,allowSearch:!0,animateBlockEntrance:!0,blockBackgroundColor:null,blockBackgroundColorContrast:ke.AUTO,blockBackgroundType:re.LIGHT,blockContinueCompletionType:"",blockContinueCompleteHint:"Complete the content above before moving on.",blockContinueLabel:"Continue",blockCorners:a7.ROUNDED,blockPaddingEnd:3,blockPaddingStart:3,blockTextBackgroundColor:null,blockTextBackgroundColorContrast:ke.AUTO,blockTextBackgroundType:re.LIGHT,blockTextBodyFontSize:17,blockTextHeadingFontSize:32,blockTextPaddingEnd:3,blockTextPaddingStart:3,blockTextSubheadingFontSize:24,buttonInlineStyle:c7.ROUNDED,buttonNavigationStyle:l7.FULL,buttonScheme:$a.LIGHT,colorAccent:t7,compactShowLessonCount:!0,coverImageAlpha:50,coverPageType:fe.SPLIT_LEFT_IMAGE,customColorLessonHeaderContrast:ke.AUTO,enableVideoPlaybackSpeed:!0,lessonHeaderImageAlpha:.6,lessonHeaderImageColor:xt.DARK,lessonHeaderSize:Va.MEDIUM,lessonHeaderStyle:re.LIGHT,markLessonsComplete:!1,navigation:!0,navigationRestricted:!1,navigationSectionsExpanded:!0,navigationStyle:Js.LIGHT,navigationType:Nr.SIDEBAR,progressIndicatorStyle:ut.THEME_DEFAULT,showAuthor:!0,showLessonCount:!0,showNavigationButtons:!0,showStartButton:!0,sidebarStartsOpen:!0,themeId:se.RISE_CLASSIC},ive=null,d7=["bodyTypeface","coverImage","experiments","headingTypeface","lessonHeaderImage","media","previewShowAllPresentationLogos","theme","uiTypeface"],u7=e=>e.theme?.colorAccent||e.color||nt.colorAccent,WC=e=>e.theme?.navigationRestricted??nt.navigationRestricted?Oo.RESTRICTED:Oo.FREE,KC=e=>e.theme?.sidebarStartsOpen??nt.sidebarStartsOpen?Ci.OPEN:Ci.CLOSED,h7=e=>e.theme?.showLessonCount??e.showLessonCount??nt.showLessonCount,m7=({sidebarMode:e})=>e!==Ci.HIDDEN,f7=({navigationMode:e})=>e===Oo.RESTRICTED,p7=({sidebarMode:e})=>e===Ci.OPEN,g7=e=>e.coverImage?.media?.image?Js.LIGHT_IMAGE:Js.LIGHT,v7=e=>e.coverImage?.media?.image?fe.LEFT_OVERLAY:fe.LEFT,to=(e,t)=>t[e]??t.theme?.[e]??nt[e],QC=e=>{const t=KC(e),n=WC(e),s={allowSearch:to("allowSearch",e),animateBlockEntrance:to("animateBlockEntrance",e),bodyTypefaceId:e.bodyTypefaceId,colorAccent:(e.color||"").toLowerCase(),compactShowLessonCount:to("compactShowLessonCount",e),coverImageDefault:null,coverPageType:v7(e),enableVideoPlaybackSpeed:to("enableVideoPlaybackSpeed",e),headingTypefaceId:e.headingTypefaceId,markLessonsComplete:to("markComplete",e),navigation:m7({sidebarMode:t}),navigationSectionsExpanded:to("navigationSectionsExpanded",e),navigationRestricted:f7({navigationMode:n}),navigationStyle:g7(e),showAuthor:to("showAuthor",e),showLessonCount:to("showLessonCount",e),showNavigationButtons:to("showNavigationButtons",e),sidebarStartsOpen:p7({sidebarMode:t}),uiTypefaceId:e.uiTypefaceId},r={...nt,...s};return{...e,theme:{...r,isLegacyCourse:!0}}},Qh=e=>{const t=u7(e),n={allowSearch:e.theme?.allowSearch??nt.allowSearch,animateBlockEntrance:e.theme?.animateBlockEntrance??nt.animateBlockEntrance,buttonNavigationStyle:e.theme?.buttonNavigationStyle??nt.buttonNavigationStyle,buttonScheme:e.theme?.buttonScheme??nt.buttonScheme,color:t,colorAccentTint:t?Gh(t):void 0,coverImage:UC(e),coverPageType:e.theme?.coverPageType??nt.coverPageType,enableVideoPlaybackSpeed:e.theme?.enableVideoPlaybackSpeed??nt.enableVideoPlaybackSpeed,lessonHeaderImage:GC(e),lessonHeaderSize:e.theme?.lessonHeaderSize??nt.lessonHeaderSize,lessonHeaderStyle:e.theme?.lessonHeaderStyle??nt.lessonHeaderStyle,markComplete:e.theme?.markLessonsComplete??nt.markLessonsComplete,navigation:e.theme?.navigation??nt.navigation,navigationSectionsExpanded:e.theme?.navigationSectionsExpanded??nt.navigationSectionsExpanded,navigationMode:WC(e),navigationRestricted:e.theme?.navigationRestricted??nt.navigationRestricted,navigationStyle:e.theme?.navigationStyle??nt.navigationStyle,navigationType:e.theme?.navigationType??nt.navigationType,progressIndicatorStyle:e.theme?.progressIndicatorStyle??ut.THEME_DEFAULT,themeId:e.theme?.themeId??nt.themeId,showAuthor:e.theme?.showAuthor??nt.showAuthor,showLessonCount:h7(e),showStartButton:e.theme?.showStartButton??nt.showStartButton,sidebarMode:KC(e),sidebarStartsOpen:e.theme?.sidebarStartsOpen??nt.sidebarStartsOpen,showNavigationButtons:e.theme?.showNavigationButtons??nt.showNavigationButtons};return{...e,...n}},C7=({course:e,updates:t})=>{const n=Object.fromEntries(Object.entries(t||{}).filter(([r])=>d7.includes(r))),s={...e,...n};return Qh(s)},x7={padding:"medium",alignment:"left"},b7={embed:{aspectRatio:"16:9"},video:{},labeledgraphic:{hotspotStyle:"numbers"},process:{navigation:"stepped"},sorting:{feedback:"immediate"},timeline:{orientation:"vertical"},paragraph:{fontSize:"medium"}},us=(e,t=0)=>`item_${e}_${t}`,Ml=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),y7=e=>Xv.some(t=>t===e),ZC=e=>Ml(e)&&(typeof e.id=="string"||typeof e.id=="number")&&y7(e.type),Ga=e=>Array.isArray(e)?e.filter(Ml):[],YC=(e,t)=>[{id:us(`${t}_placeholder`,0),placeholder:!0,type:e,title:`Add ${e} content`}],Ar=e=>({...x7,...b7[e]??{}}),S7=e=>typeof e=="string"?e.replace(/<p><br><\/p>/g,""):e,qC=e=>e.map(t=>{if(t&&typeof t=="object"&&!Array.isArray(t)){const n={};for(const[s,r]of Object.entries(t))n[s]=S7(r);return n}return t}),I7=e=>["Introduction","Summary"].map((t,n)=>({id:us(`${e}_process`,n),title:t,type:t.toLowerCase(),description:null,isHidden:!0})),T7=(e,t)=>[{id:us(`${t}_text`,0),paragraph:e}],L7=(e,t)=>[...I7(t),...e],E7=(e,t)=>[{id:us(`${t}_video`,0),caption:"",media:e}],k7=(e=[],t)=>({family:"multimedia",id:us(`${t}_embed`,0),items:e.length?e:YC("embed",t),media:{},settings:Ar("embed"),type:"multimedia",variant:"embed"}),N7=(e,t,n)=>({family:"interactive-fullscreen",id:us(`${n}_labeledgraphic`,0),items:e,media:t,settings:Ar("labeledgraphic"),type:"interactive",variant:"labeledgraphic"}),w7=(e,t)=>({family:"interactive-fullscreen",id:us(`${t}_process`,0),items:qC(e),media:{},settings:Ar("process"),type:"interactive",variant:"process"}),j7=({items:e,piles:t},n)=>({family:"interactive-fullscreen",id:us(`${n}_sorting`,0),items:e,media:{},piles:t,settings:Ar("sorting"),type:"interactive",variant:"sorting"}),A7=(e,t)=>({family:"text",id:us(`${t}_text`,0),items:qC(e),settings:Ar("paragraph"),type:"text",variant:"paragraph"}),R7=(e,t)=>({family:"interactive-fullscreen",id:us(`${t}_timeline`,0),items:e,media:{},settings:Ar("timeline"),type:"interactive",variant:"timeline"}),P7=(e,t={},n)=>({family:"multimedia",id:us(`${n}_video`,0),items:Ml(e)&&e.video?E7(e,n):YC("video",n),media:{},settings:{...Ml(t)?t:{},...Ar("video")},type:"multimedia",variant:"video"}),M7=(e,t)=>{const n=Ga(e.items);return k7(n.map(({icon:s,...r})=>r),t)},O7=(e,t)=>N7(Ga(e.items).map(({hasMedia:n,...s})=>s),e.media,t),B7=(e,t)=>{const n=Ga(e.items).map(s=>({...s,isHidden:!1,type:"step"}));return w7(L7(n,t),t)},D7=(e,t)=>R7(Ga(e.items).map(({linePosition:n,...s})=>s),t),F7=(e,t)=>A7(T7(e,t),t),_7=(e,t)=>{const n=e.type;switch(n){case"embed":return M7(e,t);case"map":return O7(e,t);case"process":return B7(e,t);case"sorting":return j7({items:Ga(e.items),piles:e.piles},t);case"timeline":return D7(e,t);case"screencast":case"slidecast":case"video":return P7(e.media,e.settings,t);default:throw new Error(`Unknown legacy lesson type: ${n}`)}},H7=e=>ZC(e),V7=e=>{if(!ZC(e))return e;const t=String(e.id),n={description:"",icon:"Article",type:"blocks"},s=[_7(e,t)],r=typeof e.description=="string"?e.description.trim():"";return r&&s.unshift(F7(r,`${t}_desc`)),{...e,...n,items:s,media:{}}},XC=e=>`rise/rise-com/${e}`,JC=XC("FAVORITE_ADDED"),e2=XC("FAVORITE_REMOVED"),z7=()=>(0,me.action)(JC,void 0),$7=()=>(0,me.action)(e2,void 0),t2=(e=>`rise/partnerContent/${e}`)("SET_ALL_PARTNER_CONTENT"),Bo=(e=>`rise/status/${e}`)("SET_LOADED"),U7=(e,t)=>({...e,...t}),G7={connection:"connected",courseLoaded:!1,fatalError:!1,runtimeFetchError:null,fontsLoaded:!1,notFound:!1,partnerContentLoaded:!1},W7=(0,me.handle)(G7,{[Bo]:U7}),K7=(e=!1)=>(0,me.action)(Bo,{fontsLoaded:e}),Q7=(e=!1)=>(0,me.action)(Bo,{courseLoaded:e}),Z7=(e=!1)=>(0,me.action)(Bo,{coverLoaded:e}),Y7=(e=null)=>(0,me.action)(Bo,{runtimeFetchError:e}),q7=(e=!1)=>(0,me.action)(Bo,{notFound:e}),X7=(e=!1)=>(0,me.action)(Bo,{fatalError:e}),n2=(e=!1)=>(0,me.action)(Bo,{partnerContentLoaded:e}),Ol=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),Zh=e=>{if(e!=null){if(!Array.isArray(e))throw new TypeError("Partner content items must be an array");return Array.from(e)}};function J7({course:e,lessons:t}){const n=Zh(t),s=[];for(const r of n??[])if(Ol(r)){for(const i of Zh(r.items)??[])if(Ol(i))for(const a of Zh(i.items)??[])Ol(a)&&typeof a.partnerContentId=="string"&&a.partnerContentId&&s.push(a.partnerContentId)}return Ol(e)&&typeof e.partnerContentId=="string"&&e.partnerContentId&&s.push(e.partnerContentId),Array.from(new Set(s))}const ew=e=>typeof e=="string"&&e.length>0,lve=`${Ae("CDN_URI")}/assets/rise/assets/themes/thumbnails/sample-avatar.jpeg`,dve=Ct({ACTIVE:null,PREVIEW:null}),uve=({themeCoverImage:e,coverImageDefault:t})=>ew(t)?t:e,tw=e=>({...e,theme:{...e?.theme,hideLessonHeaders:e?.theme?.hideLessonHeaders??!1,showStartButton:e?.theme?.showStartButton??!0}}),oe={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"},Do={SUMMARY:"SUMMARY",REMAINING:"REMAINING",ELAPSED:"ELAPSED",ELAPSED_TOTAL:"ELAPSED_TOTAL",HIDE_TIMER:"HIDE_TIMER"},nw={CONTINUE:"continue",NONE:""},Ee={ALL:"all",NONE:"none",INCORRECT:"incorrect"},hve=10,mve=80,fve=500;var pve;const sw=jn()([[jh()([pn()(!0),pn()(Ee.ALL)]),Fe()(Ee.ALL)],[jh()([pn()(!1),pn()(Ee.NONE)]),Fe()(Ee.NONE)],[pn()(Ee.INCORRECT),Fe()(Ee.INCORRECT)],[Sr(),Fe()(Ee.ALL)]]),gve="draw from question bank",vve="fillin",Cve="matching",xve="multiple choice",bve="multiple response",yve=null;var ow=C(92324),Yh=C.n(ow);const qh=(e,t)=>e!=null&&typeof e=="object"?Reflect.get(e,t):void 0,Wa=e=>qh(e,"family")==="knowledgeCheck"&&!!qh(qh(e,"settings"),"requireCorrectAnswer"),Xh={LESSON:"lesson",QUIZ:"quiz",SECTION:"section"},Rr={KNOWLEDGE_CHECK:"KNOWLEDGE_CHECK",ORDER:"ORDER",QUIZ:"QUIZ"},An=(e,t)=>`/lessons/${encodeURIComponent(e)}${t?`/${encodeURIComponent(t)}`:""}`,Ka="progress-summary",s2=An(Ka),Jh="lesson:",Bl="#/lessons/",em="/lessons/",Sve=e=>`${Bl}${e}`,Ive=e=>e.startsWith(Jh)||e.startsWith(Bl)||e.startsWith(em),Tve=e=>e.startsWith(Jh)?e.slice(Jh.length):e.startsWith(Bl)?e.slice(Bl.length).split("/")[0]:e.startsWith(em)?e.slice(em.length).split("/")[0]:e,rw=e=>e.type===Xh.SECTION,iw=e=>e.type===Xh.QUIZ,aw=e=>e.settings?.passToContinue===!0,o2=e=>e?.items?.find(t=>Wa(t)),xi=e=>e!=null&&(e.type!=="quiz"||e.settings?.asLesson!==!1),cw=e=>e!=null&&e.type==="blocks",lw=e=>{const t=Yh()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.reduce((n,s)=>(s!=null&&n.push(dw(s)),n),[])),t},dw=e=>{const t=Yh()(e);return t!=null&&Array.isArray(t.items)&&(t.items=t.items.filter(Boolean)),t};var uw=C(11620),hw=C.n(uw);const r2="^1.9.0";class tm extends Error{}function mw(e){try{if(e==null)return;if(typeof e!="object"||!("version"in e)||typeof e.version!="string")throw new tm("Missing Runtime.version");if(!hw()(e.version,r2))throw new tm(`Runtime.version ${e.version} does not satisfy ${r2}`)}catch(t){console.warn(t)}}const Fo="rise/course/LOAD_COURSE",fw="rise/course/UPDATE_COMPLETED_AT",Dl="rise/course/UPDATE_COURSE_PREVIEW",i2="rise/course/UPDATE_LESSON_PREVIEW",nm="rise/course/APPLY_CHANGESET",pw="COURSE_REQUIRES_LMS";let sm;(async()=>{try{({applyReviewDataToManifest:sm}=await C.e("webpack_container_remote_mondrian_learn-react").then(C.t.bind(C,4246,23)))}catch{}})();const Qa=Q9(),gw=e=>{if("settings"in e&&e.settings&&We(e.settings)&&"revealAnswers"in e.settings){const n=e.settings;return{...e,settings:{...e.settings,revealAnswers:sw(n.revealAnswers)}}}return e},vw=e=>cw(e)?lw(e):e,a2=e=>vw(gw(e)),Cw=e=>({...e,lessons:e.lessons?.map(a2)||[]}),xw=e=>{const t=e.lessons?.filter(n=>n.type!=="section")||[];return{...e,lessonsOnly:t}},bw=e=>e.theme==null,yw=e=>Qh(QC(e)),Sw=e=>bw(e)?yw(e):Qh(e),Iw=e=>tw(Sw(e)),Tw=(e,t)=>{let n=(0,Eo.TJ)(["course"],t,e).result;const s=(0,Eo.TJ)(["lessons"],t,n.lessons).result;return t.some(r=>r.path[0]==="mondrian")&&n.mondrian&&sm&&(n={...n,mondrian:sm(n.mondrian,t)}),{...n,lessons:s}},Lw=e=>({...e,lessons:e.lessons?.map(V7)||[]}),Ew=(e,{completedAt:t,course:n,favoritedAt:s,riseComCurrentUser:r,riseComCourseId:i,riseComEnrollmentType:a,riseComLearningPathId:c})=>{const l=Cw(n),d=xw(l),h={...d,theme:d.theme??QC(d).theme};return{...Iw(h),completedAt:t,favoritedAt:s,riseComCourseId:i,riseComEnrollmentType:a,riseComCurrentUser:r,riseComLearningPathId:c}},kw=e=>({...e,favoritedAt:new Date}),Nw=e=>({...e,favoritedAt:null}),ww=e=>({...e,completedAt:new Date().toISOString()}),jw={[JC]:kw,[e2]:Nw,[Fo]:Ew,[fw]:ww,[Dl]:(e,{course:t})=>t,[i2]:(e,{lessons:t})=>({...e,lessons:t.map(a2)}),[nm]:Tw},Aw=(0,me.handle)({},jw),Rw=e=>e!=null&&typeof e=="object"&&"code"in e&&e.code===pw&&"message"in e&&typeof e.message=="string",c2=e=>t=>{Dw(t)?e(q7(!0)):Rw(t)?(e(Y7(t.message)),console.error(t)):t instanceof tm&&(e(X7(!0)),console.error(t))},Pw=e=>t=>t([{type:t2,payload:e},n2(!0)]),Mw=gr().fromPromise(async(...e)=>await bN(...e)),Ow=e=>e.length===0?n2(!0):Mw(e).map(Pw),Bw=e=>Fl(e)===401||om(e)&&Fl(e.response)===401,Dw=e=>Fl(e)===404||om(e)&&Fl(e.response)===404,Fl=e=>om(e)?e.status??e.statusCode:void 0,om=e=>e!=null&&typeof e=="object",Fw=e=>t=>{const{course:n}=t,s=Lw(n),r=J7({course:s,lessons:s.lessons});e([Qa(Fo,{...t,course:s,_loadOrigin:"runtime",_originalLessons:n.lessons}),Q7(!0),Ow(r)])},_w=e=>async t=>{let n;try{mw(window.Runtime),n=e?.password!=null?await NC(void 0,{password:e.password}):await NC()}catch(s){if(e?.onUnauthorized!=null&&Bw(s)){e.onUnauthorized();return}e?.onError?.(),await c2(t)(s);return}e?.onAuthorized?.();try{Fw(t)(n),MN(n)}catch(s){await c2(t)(s)}},Hw=e=>Qa(Fo,{...e,_loadOrigin:"preview-replace"}),Vw=Qa(Dl),zw=Qa(i2),$w=Qa(nm),Uw=(e,{labelSet:t})=>({...e,...t}),Gw=(0,me.handle)({},{[Fo]:Uw}),no=e=>`rise/course/${e}`,l2=no("BLOCKS_LESSON_COMPLETE"),d2=no("BLOCKS_LESSON_INCREMENT_RETRY_ATTEMPT"),u2=no("BLOCKS_LESSON_RESET"),h2=no("BLOCKS_LESSON_RETRY_SORTING_ACTIVITY"),m2=no("BLOCKS_LESSON_SET_ITEMS_PROGRESS"),f2=no("BLOCKS_LESSON_SET_MEDIA_PLAY_PROGRESS"),p2=no("BLOCKS_LESSON_SET_SORTING_ITEM_RESULT"),g2=no("BLOCKS_LESSON_SET_SURVEY_PARTIAL"),v2=no("BLOCKS_LESSON_SET_SURVEY_SUBMITTED"),Pr=(0,me.action)(l2),Ww=(0,me.action)(d2),Kw=(0,me.action)(u2),Qw=(0,me.action)(h2),bi=(0,me.action)(m2),Zw=(0,me.action)(f2),Yw=(0,me.action)(p2),qw=(0,me.action)(g2),Xw=(0,me.action)(v2),Wn=e=>`rise/course/${e}`,C2=Wn("QUIZ_LESSON_ADVANCE_STEP"),x2=Wn("QUIZ_LESSON_APPLY_SKIP"),b2=Wn("QUIZ_LESSON_CLEAR_ANSWER_SELECTION"),y2=Wn("QUIZ_LESSON_INITIALIZE_DRAWN_QUESTIONS"),S2=Wn("QUIZ_LESSON_RESTART"),I2=Wn("QUIZ_LESSON_SELECT_QUIZ_ANSWER"),T2=Wn("QUIZ_LESSON_SET_ANSWER_MATCHES"),L2=Wn("QUIZ_LESSON_SET_ANSWER_TEXT"),E2=Wn("QUIZ_LESSON_ADVANCE_TO_END"),k2=Wn("QUIZ_LESSON_SET_TIME_REMAINING"),N2=Wn("QUIZ_LESSON_SUBMIT_ANSWER"),w2=Wn("QUIZ_LESSON_TOGGLE_ANSWER_SELECTION"),rm=(0,me.action)(C2),Jw=(0,me.action)(E2),j2=(0,me.action)(S2),ej=(0,me.action)(x2),A2=(0,me.action)(I2),R2=(0,me.action)(L2),P2=(0,me.action)(w2),tj=(0,me.action)(k2),M2=(0,me.action)(T2),im=(0,me.action)(N2),nj=(0,me.action)(b2),sj=(0,me.action)(y2),am=e=>e&&typeof e=="object"&&e.type&&Xv.includes(e.type),oj=(e,t)=>{const n=new Map;return e.forEach(s=>{if(H7(s)){const r=t.find(i=>String(i.id)===String(s.id));r&&r.type==="blocks"&&n.set(String(s.id),String(r.id))}}),n},rj=(e,t)=>{const n={id:String(e.id),index:e.index,type:"blocks",items:{}};return typeof e.isComplete=="boolean"&&(n.isComplete=e.isComplete),typeof e.percentComplete=="number"&&(n.percentComplete=e.percentComplete),t.type==="blocks"&&t.items&&t.items.forEach((s,r)=>{if(s?.id!=null&&(n.items[s.id]={id:s.id,index:r,isComplete:e.isComplete===!0&&r===0,items:s.items?{}:void 0},s.items&&Array.isArray(s.items))){const i={};s.items.forEach((a,c)=>{a?.id!=null&&(i[a.id]={id:a.id,index:c,isComplete:e.isComplete===!0})}),Object.keys(i).length>0&&(n.items[s.id].items=i)}}),n},ij=(e,t)=>{const n=new Set(t.map(r=>String(r.id))),s=[];return Object.values(e.lessons).forEach(r=>{am(r)&&(n.has(String(r.id))||s.push(r))}),s},aj=(e,t,n)=>{const s={totalLegacyLessons:0,successfulMigrations:0,failedMigrations:0},r={...e,lessons:{...e.lessons}},i=ij(e,n);s.totalLegacyLessons=i.length;const a=oj(t,n),c=[];return i.forEach(l=>{try{const d=a.get(String(l.id))||String(l.id),h=n.find(m=>String(m.id)===d);if(h&&h.type==="blocks"){const m=rj(l,h);r.lessons[String(h.id)]=m,String(l.id)!==String(h.id)&&delete r.lessons[String(l.id)],s.successfulMigrations++}else c.push(String(l.id)),s.failedMigrations++}catch(d){console.warn(`Failed to migrate legacy lesson progress for lesson ${l.id}:`,d),c.push(String(l.id)),s.failedMigrations++}}),{migratedProgress:r,orphanedLessonIds:c,migrationSummary:s}},O2=e=>Object.values(e.lessons).some(am),Lve=e=>{let t=0,n=0;const s=[];return Object.values(e.lessons).forEach(r=>{n++,am(r)&&(t++,s.includes(r.type)||s.push(r.type))}),{legacyCount:t,totalCount:n,legacyTypes:s,hasLegacyProgress:t>0}},cj=(e,t,n)=>{if(!O2(e))return e;const s=aj(e,t,n);return s.orphanedLessonIds.length>0&&console.warn("Some legacy lessons could not be migrated:",s.orphanedLessonIds),s.migratedProgress},cm=e=>`rise/course/${e}`,B2=cm("BOOKMARK_LESSON"),lj=cm("LOAD_COURSE"),D2=cm("PREVIEW_COMPLETE_PRECEDING_LESSONS"),dj=(0,me.action)(B2),uj=(0,me.action)(D2),hj={lessons:{},percentComplete:0},mj=(0,me.handle)(hj,{[l2]:Bv,[d2]:uE,[u2]:hE,[h2]:mE,[m2]:fE,[f2]:pE,[p2]:gE,[g2]:vE,[v2]:CE,[C2]:PE,[E2]:ME,[x2]:KE,[b2]:OE,[y2]:BE,[S2]:HE,[I2]:VE,[T2]:zE,[L2]:_E,[k2]:$E,[N2]:UE,[w2]:GE,[B2]:pj,[lj]:fj,[D2]:gj});function fj(e,t){const n=t.course?.lessons??[],s=t._originalLessons??n,r=wC(yj(n));if(typeof r!="object"||r===null)return e;const i={...e,...r};return O2(e)&&s!==n?cj(i,s,n):i}function pj(e,t){return yN(t),{...e,currentLesson:t}}function gj(e,{targetLessonId:t,lessons:n}){const s=e.lessons[t];if(!s)return e;let r=s.index;for(const a of n){if(a.type!=="quiz")continue;const c=e.lessons[a.id];if(!c||c.index>=r)continue;const l=a.settings;if(!l?.skipLessonsIfPassed||!l.skipToLessonId)continue;const d=e.lessons[l.skipToLessonId];d&&d.index>r&&(r=d.index)}const i=Object.fromEntries(Object.entries(e.lessons).map(([a,c])=>c.index>=r||c.isComplete?[a,c]:[a,vj(c)]));return{...e,lessons:i}}function vj(e){return As(e)?yh(e):un(e)?Cj(e):e}function Cj(e){const t=Object.fromEntries(Object.entries(e.items??{}).map(([s,r])=>[s,{...r,isComplete:!0,isCorrect:!0}])),n=Object.keys(t).length;return{...e,items:t,activeIndex:n+1,isComplete:!0,passed:!0,passingScore:e.passingScore??80,percentComplete:100,reportResults:!0,score:100}}const xj=({index:e,lessonId:t,settings:n,type:s})=>s==="quiz"?{id:t,index:e,type:s,items:{},passingScore:Number(n?.passingScore??80)}:{id:t,index:e,type:"blocks",items:{}};function bj(e){return e.type==="quiz"&&"settings"in e}function yj(e){return{lessons:e.reduce((n,s,r)=>bj(s)?F2({index:r,items:s.items,lessonId:s.id,lessonProgress:n,settings:s.settings,type:s.type}):s.type==="blocks"||s.type==="slide"?F2({index:r,items:s.items,lessonId:s.id,lessonProgress:n,type:"blocks"}):n,{})}}function F2(e){const{lessonId:t,index:n,items:s,lessonProgress:r={},settings:i,type:a}=e,c=xj({lessonId:t,index:n,settings:i,type:a});if(s.length===0)return{...r,[t]:c};const l=a==="quiz"?Ij(s):Sj(s);return{...r,[t]:{...c,items:l}}}function Sj(e){return e.reduce((t,n,s)=>{const r=n.id,i=n.items??[],a=sE(i);return t[r]={id:r,index:s,items:a},t},{})}function Ij(e){return e.reduce((t,n,s)=>(t[n.id]={id:n.id,index:s},t),{})}var ot=C(48492),Tj=C(63898);const Lj=ot.ZU.Object({status:ot.ZU.Literal("resolved"),schemaVersion:ot.ZU.Literal(1),evaluatedAt:ot.ZU.Optional(ot.ZU.String()),access:ot.ZU.Union([ot.ZU.Literal("allowed"),ot.ZU.Literal("blocked")]),protection:ot.ZU.Optional(ot.ZU.Union([ot.ZU.Literal("none"),ot.ZU.Literal("required")])),reason:ot.ZU.Optional(ot.ZU.Union([ot.ZU.Literal("active-trial"),ot.ZU.Literal("trial-ended")])),accessExpiresAt:ot.ZU.Optional(ot.ZU.String()),trialType:ot.ZU.Optional(ot.ZU.Union([ot.ZU.Literal("standard"),ot.ZU.Literal("business-creator")])),degraded:ot.ZU.Optional(ot.ZU.Literal(!0))}),Ej=/^(\d{4})-(\d{2})-(\d{2})T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:\d{2})$/,_2=e=>{if(typeof e!="string")return!1;const t=Ej.exec(e);if(t==null||Number.isNaN(Date.parse(e)))return!1;const n=Number(t[1]),s=Number(t[2]),r=Number(t[3]),i=new Date(0);return i.setUTCFullYear(n,s-1,r),i.getUTCFullYear()===n&&i.getUTCMonth()===s-1&&i.getUTCDate()===r},kj=e=>e===void 0||_2(e),Za=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),H2=e=>e==="standard"||e==="business-creator"?e:void 0,hs=(e,t)=>Object.hasOwn(e,t)?e[t]:void 0,Nj=1,wj="delivery-policy:request",lm="delivery-policy:response",jj="delivery-policy:timeout",Eve=2e3,V2="deliveryPolicy",Mr=()=>({status:"resolved",schemaVersion:1,evaluatedAt:new Date().toISOString(),access:"allowed",protection:"none"}),Aj=()=>({...Mr(),degraded:!0}),Rj=(e,t=Date.now())=>e.access==="blocked"||e.reason==="active-trial"&&e.accessExpiresAt!=null&&Date.parse(e.accessExpiresAt)<t,Pj=e=>{try{return Mj(e)}catch{return Mr()}},Mj=e=>{if(!Za(e))return Mr();const t=hs(e,"access"),n=hs(e,"accessExpiresAt"),s=hs(e,"evaluatedAt"),r=hs(e,"protection"),i=hs(e,"reason"),a=hs(e,"schemaVersion"),c=hs(e,"status"),l=H2(hs(e,"trialType"));return c!=="resolved"||a!==1||!kj(s)?Mr():t==="allowed"&&r==="none"?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"allowed",protection:"none"}:t==="allowed"&&r==="required"?i==="active-trial"&&_2(n)&&(s===void 0||Date.parse(n)>=Date.parse(s))?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"allowed",protection:"required",reason:"active-trial",accessExpiresAt:n,trialType:l}:i==="trial-ended"?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"allowed",protection:"required",reason:"trial-ended"}:Mr():t==="blocked"?i==="trial-ended"||i==="active-trial"?{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"blocked",reason:i,trialType:l}:{status:"resolved",schemaVersion:1,evaluatedAt:s,access:"blocked",trialType:l}:Mr()},Oj=ot.ZU.Object({type:ot.ZU.Literal(lm),version:ot.ZU.Literal(Nj),policy:Lj}),Bj=e=>{if(!Za(e))return e;const t=e.policy;if(!Za(t)||hs(t,"access")!=="blocked")return e;const n=hs(t,"reason");if(n===void 0||n==="trial-ended"||n==="active-trial")return e;const s={...t};return delete s.reason,{...e,policy:s}},Dj=e=>{if(!Za(e))return e;const t=e.policy;if(!Za(t))return e;const n=hs(t,"trialType");if(n===void 0||H2(n)!==void 0)return e;const s={...t};return delete s.trialType,{...e,policy:s}};function Fj(e){const t=Dj(Bj(e));if(!Tj.J(Oj,t))return;const{policy:n}=t;if(!(n.access==="allowed"&&n.protection==null))return n}function dm(){const e="articulate.com";return e?[`https://360.${e}`,`https://360-dashboard.dev.${e}`]:[]}function _j(e=window.location){return new URLSearchParams(e.search).has(V2)||new URLSearchParams(e.hash.split("?")[1]??"").has(V2)}const Hj=(e,t)=>t._loadOrigin==="preview-replace"&&t.deliveryPolicy===void 0?e:Pj(t.deliveryPolicy),Vj=(0,me.handle)(Mr(),{[Fo]:Hj});var zj=C(73481),yi=C.n(zj),$j=C(27563),Uj=C.n($j),kve=C(31212),z2,$2;const um=5e3,Gj=At()(ch()(Rs())(":n3,n4,i4,n7,n9")),Wj=Ue()(yi()(","),Al()),Kj=(e,t)=>{const n=new FontFace(t.name,e,{family:t.name,style:t.style,weight:t.weight});return n.load().then(()=>document.fonts.add(n))},Qj=(e,t)=>{const n=document.createElement("style");return n.innerText=`@font-face { font-family: '${t.name}'; src: ${e}; font-weight: ${t.weight}; font-style: ${t.style}; }`,document.head.appendChild(n),new(Uj())(t.name,{style:t.style,weight:t.weight}).load()},Zj=e=>{const t=`url(${oL(e)}) format('woff')`;return("fonts"in document?Kj:Qj)(t,e)},U2=(e,t)=>{const n=Promise.all(e.map(Zj));let s;const r=new Promise(i=>{s=setTimeout(i,um)});return Promise.race([n,r]).catch(i=>{console.error("Failed to load learn course fonts:",{fonts:e,error:i.message||i})}).finally(()=>{clearTimeout(s),t()})},wve=({baseUri:e,typefaces:t,onLoad:n,onError:s})=>{const r=z2(t).join(", ");return $2.load({active:n,fontinactive:(i,a)=>{console.error("Individual font failed to load:",{familyName:i,fvd:a,typefaces:t})},inactive:()=>{console.error("Failed to load course fonts:",{typefaces:t,typefaceList:r}),s?.(),n?.()},timeout:um,custom:{families:Gj(z2(t)),urls:[`${e}/course_fonts.css?typefaceIds=${Wj(t)}`]}})},jve=()=>$2.load({google:{families:["Noto Sans Myanmar:300,400,500,600,700"]},timeout:um}),Yj=(e,{fonts:t})=>[...e,...t],qj=(e,{fonts:t})=>t,Xj=(0,me.handle)([],{[Fo]:Yj,[Dl]:qj}),Jj=e=>t=>{U2(e,()=>{t(K7(!0))})},eA={isPreview:window.viewType==="preview"},G2=((e=eA)=>e);C.dn(G2);const W2="rise/l10n/TOGGLE_LOCALE_SELECTOR",K2=(e,{l10n:t})=>t?{...e,...t}:e,tA=(e,t)=>(0,Eo.TJ)(["l10n"],t,e).result,hm=(0,me.action)(W2),nA=(e,t)=>e&&{...e,...!t&&{localeSelectorOptions:void 0},showLocaleSelector:t},sA=(0,me.handle)(null,{[Fo]:K2,[Dl]:K2,[nm]:tA,[W2]:nA});var oA=C(50333),mm=C.n(oA);const rA=mm()(2,e=>Lh()((0,me.error)(e),(0,me.action)(e))),{RiseDotCom:so}=window,Ya=e=>so&&so[e],Q2=e=>Promise.reject(new Error(`RiseDotCom.${e} is unavailable`)),iA=()=>{Ya("exit")&&so?.exit?.()},Z2=(...e)=>{Ya("on")&&so?.on?.(...e)},Y2=(...e)=>{Ya("off")&&so?.off?.(...e)},aA=(...e)=>{Ya("goToLearn")&&so?.goToLearn?.(...e)},cA=(...e)=>so?.downloadCertificate?.(...e)??Q2("downloadCertificate"),lA=(...e)=>{if(Ya("downloadCertificateCancel"))return so?.downloadCertificateCancel?.(...e)},dA=(...e)=>so?.fetchLpUpNext?.(...e)??Q2("fetchLpUpNext"),q2="rise/learningPathUpNext/FETCH_LP_UP_NEXT",X2="rise/learningPathUpNext/FETCH_LP_UP_NEXT_PENDING",uA={isPending:!1,isSuccess:!1,learningPathComplete:!1,nextCourse:{}},hA=e=>!("id"in e),mA=(e,t)=>{const n=hA(t);return{...e,isPending:!1,isSuccess:!0,learningPathComplete:n,lpHasFailedQuiz:t.lpHasFailedQuiz,nextCourse:n?{}:t}},fA=e=>({...e,isPending:!0}),Rve=(0,me.handle)(uA,{[q2]:(0,me.onSuccess)(mA),[X2]:fA}),pA=e=>[(0,me.action)(X2),rA(q2)(gr().fromPromise(dA)(e))],gA=(e,t)=>{const n=e.content.findIndex(r=>r.id===t.id),s=[...e.content];return n===-1?s.push(t):s[n]=t,{...e,content:s}},vA=(e,t)=>t.reduce(gA,e),CA={[t2]:vA},xA=(0,me.handle)({content:[]},CA),J2={BLOCKS:"blocks",QUIZ:"quiz",SECTION:"section"},_o=e=>e?.type===J2.QUIZ,_l=e=>e?.type===J2.QUIZ,Hl="rise-quiz-deck-engine",bA=null;function Pve(e){const t={};for(const n of bA)e[n]===!0&&(t[n]=!0);return t}function Mve(e,t){const n={...e};for(const[s,r]of Object.entries(t))n[s]=e[s]||r;return n}function Ove(e){return{...e,"rise-lessons":!0}}function oo(e){return e.trim()===""}function yA({getL10nValues:e,question:t}){switch(t.type){case oe.FILL_IN_THE_BLANK:{const n=IA({getL10nValues:e,question:t});return n.length>0?{acceptedAnswers:n,isCaseSensitive:t.settings?.isCaseSensitive===!0,kind:"fillIn"}:void 0}case oe.MATCHING:{const n=t.answers.map(s=>String(s.id));return n.length>0&&new Set(n).size===n.length?{kind:"matching"}:void 0}case oe.MULTIPLE_RESPONSE:{const n=t.corrects??[],s=n.map(r=>{const i=TA(r);return i==null?-1:t.answers.findIndex(a=>a.id===i)}).filter(r=>r>=0).sort((r,i)=>r-i);return n.length===0||s.length!==n.length||new Set(s).size!==s.length?void 0:{correctAuthoredAnswerIndices:s,kind:"multipleResponse"}}case oe.MULTIPLE_CHOICE:case void 0:{if(t.correct==null)return;const n=t.answers.findIndex(s=>s.id===t.correct);return n>=0?{correctAuthoredAnswerIndex:n,kind:"multipleChoice"}:void 0}}}function ex({card:e,progress:t}){switch(e.questionType){case oe.FILL_IN_THE_BLANK:return typeof t.text=="string"&&!oo(t.text);case oe.MATCHING:return LA({card:e,progress:t});case oe.MULTIPLE_CHOICE:return Number.isInteger(t.selectedIndex)&&t.selectedIndex!=null&&t.selectedIndex>=0&&t.selectedIndex<e.answerOrder.length;case oe.MULTIPLE_RESPONSE:{const n=t.selectedIndices;return Array.isArray(n)&&n.length>0&&new Set(n).size===n.length&&n.every(s=>Number.isInteger(s)&&s>=0&&s<e.answerOrder.length)}}}function SA({card:e,fillInText:t,progress:n,resolvedFillInAnswers:s}){const r=EA({card:e,fillInText:t,progress:n});if(!r||!ex({card:e,progress:r}))return;const i=kA({card:e,progress:r,resolvedFillInAnswers:s});return i==null?void 0:{isCorrect:i,progress:r}}function IA({getL10nValues:e,question:t}){return[...new Set(t.answers.flatMap(n=>[...typeof n.title=="string"?[n.title]:[],...e(n.title).flatMap(({value:s})=>typeof s=="string"?[s]:[])]))].filter(n=>!oo(n)).sort()}function TA(e){if(typeof e=="number"||typeof e=="string")return e;if(typeof e=="object"&&e!==null&&"id"in e&&(typeof e.id=="number"||typeof e.id=="string"))return e.id}function LA({card:e,progress:t}){const n=t.matches;if(!n||Object.keys(n).length!==e.matchingOrder.prompts.length)return!1;const s=new Set(e.matchingOrder.prompts.map(a=>String(e.matchingOrder.answerIds[a]))),r=new Set(e.matchingOrder.matches.map(a=>String(e.matchingOrder.answerIds[a]))),i=new Set;return Object.entries(n).every(([a,c])=>{const l=String(c);return!s.has(a)||!r.has(l)||i.has(l)?!1:(i.add(l),!0)})}function EA({card:e,fillInText:t,progress:n}){return e.questionType===oe.FILL_IN_THE_BLANK?typeof t=="string"&&!oo(t)?{...n,text:t}:void 0:t==null?n:void 0}function kA({card:e,progress:t,resolvedFillInAnswers:n}){if(e.questionType===oe.FILL_IN_THE_BLANK)return!Array.isArray(n)||!n.every(s=>typeof s=="string")||!n.some(s=>!oo(s))||!n.every(s=>e.scoring.acceptedAnswers.includes(s))?void 0:NA({acceptedAnswers:n,caseSensitive:e.scoring.isCaseSensitive,text:t.text});if(n==null)switch(e.questionType){case oe.MATCHING:return Object.entries(t.matches??{}).every(([s,r])=>s===String(r));case oe.MULTIPLE_CHOICE:return t.selectedIndex===e.scoring.correctAuthoredAnswerIndex;case oe.MULTIPLE_RESPONSE:{const s=[...t.selectedIndices??[]].sort((i,a)=>i-a),r=e.scoring.correctAuthoredAnswerIndices;return s.length===r.length&&s.every((i,a)=>i===r[a])}}}function NA({acceptedAnswers:e,caseSensitive:t,text:n}){if(n==null)return!1;const s=tx(n,t);return e.some(r=>tx(r,t)===s)}function tx(e,t){const n=e.trim();return t?n:n.toLowerCase()}var wA=C(4594),fm=C.n(wA),Bve=C(78219),jA=C(87467),nx=C.n(jA),AA=C(85806),Or=C.n(AA),RA=C(42997),PA=C.n(RA),MA=C(31529),OA=C.n(MA),Dve=C(3572),BA,sx,DA,FA,_A;const ox="owner",HA="manager",VA="editor",Fve="viewer",rx=null,pm=({effectiveRole:e,requiredRole:t})=>{const n=sx(e,rx),s=sx(t,rx);return n>=s},zA=e=>({editor:pm({effectiveRole:e,requiredRole:VA}),manager:pm({effectiveRole:e,requiredRole:HA}),owner:pm({effectiveRole:e,requiredRole:ox})}),_ve=(e,t,n)=>{const{authorId:s}=e,r=s===n,i=c=>r||c,a=$A(t);return FA(DA(["canChangePermissions","canMoveTo"]),BA({canDelete:i,canEdit:i,canMove:i,canRename:i,canUnshare:i}))(a)},$A=e=>{const{effectiveRole:t,type:n}=e||[],s=n!==_A?ox:t,{editor:r,manager:i,owner:a}=zA(s);return{canChangePermissions:i,canCreate:r,canDelete:a,canEdit:r,canMove:i,canMoveTo:r,canRename:r,canUnshare:a}};var UA,GA,qa,WA,KA,QA,ZA,ix,Si,YA,ax,cx,qA,XA,Xa,JA,eR,lx,tR,Vl,nR,sR,dx,oR,ux,rR,iR,Ii,zl,hx;const aR={[oe.FILL_IN_THE_BLANK]:"fillin",[oe.MATCHING]:"matching",[oe.MULTIPLE_CHOICE]:"multiple choice",[oe.MULTIPLE_RESPONSE]:"multiple response"},Hve=500,Vve=null,zve=null,mx=({questions:e=[],drawnQuestionIds:t=[]})=>{const n=i=>!t.some(a=>a.includes(i.id)),s=e.filter(n),r=Math.floor(Math.random()*s.length);return s[r]??null},cR=e=>t=>t.type===zl||ux({effectiveRole:t.effectiveRole,requiredRole:e}),lR=({folders:e,requiredRole:t,teamAccount:n})=>Ii(e,dx,ax,Si(s=>cR(t)(s)&&(n||s.type===zl))),$ve=({questionBanks:{folders:e,questionBanks:t},requiredRole:n=rR,teamAccount:s,term:r})=>{if(r&&XA(sR(r)))return{folders:[],questionBanks:[]};const i=new RegExp("("+oR(r)+")","i"),a=lR({folders:e,requiredRole:n,teamAccount:s}),c=lx("id",a),l=Si(h=>h.title.match(i)&&!h.deleted,a),d=Si(h=>(Xa(h.folderId)||ix(h.folderId,c))&&h.title.match(i)&&!h.deleted,t);return{folders:l,questionBanks:d}},fx=(e,t,n=!1)=>Ii(t,qA(qa(!Xa(e)),tR(e),eR(dx,ax)),nR(Vl("deleted",!n))),dR=(e,t,n,s=!1)=>{const r=e===hx,i=e===zl,a=Ii(fx(hx,n),lx("id")),c=l=>!Xa(l.folderId)&&ix(l.folderId,a);return Ii(t,Si(ZA([[qa(s),l=>l.deleted],[qa(r),l=>!l.deleted&&c(l)],[qa(i),l=>!l.deleted&&!c(l)],[qa(Xa(e)),l=>!l.deleted],[UA,cx]])))},uR=({type:e})=>e===zl,px=({effectiveRole:e})=>ux({effectiveRole:e,requiredRole:iR}),hR=(e,t)=>({id:n})=>n?QA(WA(cx),JA(GA([Vl("folderId",n),Vl("authorId",e)])))(t):!1,mR=(e,t,n,s)=>Ii(fx(t,e),Si(KA([uR,px,hR(s,n)]))),fR=(e,t)=>n=>{if(Xa(n.folderId))return!0;const s=YA(Vl("id",n.folderId),e);if(!s)return!1;const r=px(s),i=n.authorId===t;return r||i},pR=(e,t,n,s,r)=>Ii(dR(e,t,n),Si(fR(s,r))),Uve=(e,t,n,s)=>{const r=mR(e,n,t,s),i=pR(n,t,e,r,s);return{folders:r,questionBanks:i}},gR=(e,t,n=[])=>{const s=t[e],{parentId:r}=s||{},{type:i}=t?.[r]||{},a=s?[s,...n]:n;return!r||s.type!==i?a:gR(r,t,a)};function $l(){const{pathname:e}=new URL(window.location.href);return e.split("/")[1]==="review"}function vR(){const e=window.location.hash.slice(1),t=new URLSearchParams(e.split("?")[1]??"");return $l()&&!!t.get("locale")}const gm={drawQuestion:mx,isReviewTargetLanguage:vR,shuffle:fm()};function gx(e){return e.type===oe.DRAW_FROM_QUESTION_BANK}function vm(e){return Array.isArray(e)&&e.every(t=>Array.isArray(t)&&t.every(n=>typeof n=="number"&&Number.isInteger(n)&&n>=0))}function CR(e,t){return Ja({bank:e,isReviewTargetLanguage:t.isReviewTargetLanguage()})}function Ja({bank:e,isReviewTargetLanguage:t}){return t?e.questions.length:Math.min(e.drawCount??0,e.questions.length)}function xR(e,t,n){if(!vm(t)||t.length!==e.length)return;const s=[];for(const[r,i]of e.entries()){const a=t[r];if(!(a.length===CR(i,n)&&new Set(a).size===a.length&&a.every(l=>i.questions[l]!=null)))return;s.push(yR(i,a))}return s}function bR(e,t){return`${e}-${t}`}function Cm(e,t){return{...t,drawn:!0,id:bR(e.id,t.id)}}function yR(e,t){const n=t.map(s=>({question:e.questions[s],idx:s})).filter(s=>s.question!=null);return{items:n.map(({question:s})=>Cm(e,s)),indices:n.map(({idx:s})=>s)}}function SR(e,t){const{questions:n}=e;if(t.isReviewTargetLanguage())return{items:n.map(c=>Cm(e,c)),indices:n.map((c,l)=>l)};const s=e.drawCount,r=[],i=[],a=[];for(let c=0;c<s;c++){const l=t.drawQuestion({questions:n,drawnQuestionIds:r});if(!l)break;i.push(Cm(e,l)),a.push(n.findIndex(d=>d.id===l.id)),r.push(String(l.id))}return{items:i,indices:a}}function IR({dependencies:e,sourceItems:t,progress:n,lessonId:s}){const r=t.filter(gx),i=n?.questionsDrawn?xR(r,n.questionList,e):void 0,a=i?vx(t,i):void 0,c=i!==void 0&&a!==void 0&&LR(n,a),l=i!==void 0?i:r.map(p=>SR(p,e)),d=vx(t,l),h=r.length>0?l.map(p=>p.indices):void 0,m=n?.questionsDrawn&&r.length>0&&!c?{...n,items:{},originalItemProgress:void 0}:n,f=ER({items:d,progress:m,questionIndexList:h});return{concreteItems:d,didResetProgress:m!==n,drawPayload:{lessonId:s,lessonProgress:f}}}function vx(e,t){let n=0;return e.flatMap(s=>gx(s)?t[n++].items:[s])}function xm(e,t){return typeof e=="number"&&Number.isInteger(e)&&e>=0&&e<t}function Ul({answerCount:e,value:t}){if(!Array.isArray(t)||t.length!==e)return;const n=t.filter(s=>xm(s,e));if(n.length===t.length&&new Set(n).size===n.length)return n}function Cx(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function TR(e,t){if(!Cx(e))return!1;const n=t.answers??[],s=new Set(n.map(i=>String(i.id))),r=new Set;return Object.entries(e).every(([i,a])=>{if(typeof a!="string"&&typeof a!="number")return!1;const c=String(a);return!s.has(i)||!s.has(c)||r.has(c)?!1:(r.add(c),!0)})}function xx({item:e,persisted:t}){if(!Cx(t))return!1;const n=e.answers?.length??0;if(t.selectedIndex!=null&&!xm(t.selectedIndex,n))return!1;const s=t.selectedIndices;if(s!=null&&!(Array.isArray(s)&&s.every(c=>xm(c,n))))return!1;const r=t.shuffledAnswerIndices;if(r!=null&&!Ul({answerCount:n,value:r}))return!1;const i=t.text;if(i!=null&&typeof i!="string")return!1;const a=t.matches;return!(a!=null&&!TR(a,e))}function LR(e,t){if(!e)return!0;const n=new Map(Object.values(e.items).map(i=>[i.index,i])),s=e.originalItemProgress,r=s!==void 0;return t.every((i,a)=>{const c=s?.[a],l=n.get(a);return c!==void 0?xx({item:i,persisted:c}):r?!0:l===void 0||String(l.id)===String(i.id)})}function ER({items:e,progress:t,questionIndexList:n}){const s=t?.items??{},r=t?.originalItemProgress,i=new Map(Object.values(s).map(l=>[l.index,l])),a=Object.fromEntries(e.map((l,d)=>{const h=r?.[d]??{},m=i.get(d);return[l.id,{...h,...m,id:l.id,index:d}]}));return{...t?qs(t,["originalItemProgress"]):void 0,questionsDrawn:!0,questionList:n??t?.questionList,items:a}}function bm({itemIds:e,progress:t}){const n=t.activeIndex??0,s=e.length+1;if(t.reportResults)return{progress:e.length===0||n===s?t:{...t,activeIndex:s}};const r=n-1;if(r<=0)return{progress:t};const i=t.items??{},a=e.findIndex((c,l)=>l<r&&!i[c]?.isComplete);return a===-1?{progress:t}:{progress:{...t,activeIndex:a+1},recoveredFrom:n}}function ym(e,t){return!!t[e.id]?.isComplete}function kR({dependencies:e,items:t,progress:n}){const s=n?.items??{};return[...t.filter(r=>ym(r,s)),...e.shuffle(t.filter(r=>!ym(r,s)))]}function NR(e,t){const n=e.answers??[],s=t.shuffle(n),r=s.map(i=>n.findIndex(a=>a.id===i.id));return Object.assign({},e,{answers:s,shuffledAnswerIndices:r})}function wR(e,t){const n=e.answers??[];return Object.assign({},e,{answers:t.map(s=>n[s]),shuffledAnswerIndices:t})}function bx({dependencies:e=gm,items:t,settings:n,progress:s}){const r=n?.randomizeQuestionOrder?kR({dependencies:e,items:t,progress:s}):t;if(!n?.shuffleAnswerChoices)return r;const i=s?.items??{};return r.map(a=>{if(ym(a,i))return a;const c=i[a.id]?.shuffledAnswerIndices,l=Ul({answerCount:a.answers?.length??0,value:c});return l?wR(a,l):NR(a,e)})}function yx({dependencies:e=gm,lessonId:t,sourceItems:n,progress:s,settings:r}){const{concreteItems:i,didResetProgress:a,drawPayload:c}=IR({dependencies:e,sourceItems:n,progress:s,lessonId:t}),l=bx({dependencies:e,items:i,settings:r??void 0,progress:c.lessonProgress}),d=bm({itemIds:l.map(h=>h.id),progress:c.lessonProgress});return{didResetProgress:a,resolvedItems:l,recoveredFrom:d.recoveredFrom,drawPayload:{...c,lessonProgress:d.progress}}}function Gve(e){return bx({items:e.items,settings:e.settings,progress:e.progress})}const jR=e=>e!=null&&e.type!=null&&e.type!=="section";function Wve({lessonIds:e,lessons:t}){return!Array.isArray(e)||!t?!1:e.some((n,s)=>{const r=t[n];return r?.type!=="quiz"||r.settings?.skipLessonsIfPassed!==!0?!1:e.slice(s+1).some(i=>jR(t[i]))})}function Sx({preserveAnswerOrder:e,progress:t,targets:n}){const s=new Map(n.map(d=>[d.progressIndex,d]));if(s.size!==n.length)return{reason:"invalidProgress",status:"failed"};const r=Object.values(t.items),i=AR(r),a=new Map;for(const d of r){if(!tc({preserveAnswerOrder:e,value:d}))continue;const h=d.index==null?void 0:s.get(d.index);if(!h||String(d.id)!==String(h.progressId)||a.has(h.progressIndex)||!ec({preserveAnswerOrder:e,question:h.question,value:d}))return{reason:"invalidProgress",status:"failed"};a.set(h.progressIndex,d)}const c=Tx(t);for(const[d,h]of Object.entries(c)){if(!tc({preserveAnswerOrder:e,value:h}))continue;const m=RR({key:d,targetByIndex:s});if(!m||h.id!=null&&String(h.id)!==String(m.progressId)||h.index!=null&&h.index!==m.progressIndex||!ec({preserveAnswerOrder:e,question:m.question,value:h}))return{reason:"invalidProgress",status:"failed"}}const l=new Map;for(const d of n){const h=i.get(d.progressIndex)??[],m=h.filter(x=>String(x.id)===String(d.progressId));if(h.length>1&&h.some(x=>tc({preserveAnswerOrder:e,value:x})))return{reason:"invalidProgress",status:"failed"};const p=t.items[d.progressId],g=p&&p.index===d.progressIndex&&String(p.id)===String(d.progressId)?p:a.get(d.progressIndex)??m[0],v=c[String(d.progressIndex)];if(PR({current:g,original:v,preserveAnswerOrder:e,question:d.question}))return{reason:"invalidProgress",status:"failed"};l.set(d.progressIndex,{current:g,original:v})}return{claims:l,status:"success"}}function Ix({id:e,index:t,preserveAnswerOrder:n,question:s,value:r}){const i=ec({preserveAnswerOrder:n,question:s,value:r});if(!i)return;const a={id:e,index:t};return typeof i.isComplete=="boolean"&&(a.isComplete=i.isComplete),i.isComplete===!0&&typeof i.isCorrect=="boolean"&&(a.isCorrect=i.isCorrect),OR(i.matches)&&(a.matches={...i.matches}),typeof i.selectedIndex=="number"&&(a.selectedIndex=i.selectedIndex),Ex(i.selectedIndices)&&(a.selectedIndices=[...i.selectedIndices]),n&&Ex(i.shuffledAnswerIndices)&&(a.shuffledAnswerIndices=[...i.shuffledAnswerIndices]),typeof i.text=="string"&&(a.text=i.text),a}function Sm({cards:e,items:t}){const n=e.length;if(n===0)return{percentComplete:0,score:0};const s=e.filter(a=>t[a.progressId]?.isComplete===!0).length,r=e.filter(a=>{const c=t[a.progressId];return c?.isComplete===!0&&c.isCorrect===!0}).length,i=Math.round(s/n*100);return{percentComplete:s===n?100:Math.min(i,99),score:Math.round(r/n*100)}}function Im(e){return Object.values(e.items).some(Lx)||Object.values(Tx(e)).some(Lx)}function AR(e){const t=new Map;for(const n of e){if(n.index==null)continue;const s=t.get(n.index)??[];s.push(n),t.set(n.index,s)}return t}function Tx(e){const t=e.originalItemProgress;return We(t)?Object.fromEntries(Object.entries(t).filter(n=>We(n[1]))):{}}function RR({key:e,targetByIndex:t}){const n=Number(e);return Number.isInteger(n)&&String(n)===e?t.get(n):void 0}function PR({current:e,original:t,preserveAnswerOrder:n,question:s}){return e!=null&&t!=null&&tc({preserveAnswerOrder:n,value:e})&&tc({preserveAnswerOrder:n,value:t})||e!=null&&ec({preserveAnswerOrder:n,question:s,value:e})==null?!0:t!=null&&ec({preserveAnswerOrder:n,question:s,value:t})==null}function ec({preserveAnswerOrder:e,question:t,value:n}){if(!We(n)||n.isComplete!=null&&typeof n.isComplete!="boolean"||n.isCorrect!=null&&typeof n.isCorrect!="boolean")return;const s=e?n:MR(n);if(!xx({item:t,persisted:s}))return;const r=n.selectedIndex!=null,i=n.selectedIndices!=null,a=n.matches!=null,c=n.text!=null;switch(t.type??oe.MULTIPLE_CHOICE){case oe.MULTIPLE_CHOICE:return!i&&!a&&!c?n:void 0;case oe.MULTIPLE_RESPONSE:return!r&&!a&&!c?n:void 0;case oe.MATCHING:return!r&&!i&&!c?n:void 0;case oe.FILL_IN_THE_BLANK:return!r&&!i&&!a?n:void 0;default:return}}function MR(e){const t={...e};return delete t.shuffledAnswerIndices,t}function tc({preserveAnswerOrder:e,value:t}){return t.isComplete!=null&&t.isComplete!==!1||t.isCorrect!=null||t.matches!=null||t.selectedIndex!=null||t.selectedIndices!=null||e&&t.shuffledAnswerIndices!=null||t.text!=null}function Lx(e){const t=e.selectedIndices,n=e.matches,s=e.text;return e.isComplete===!0||e.selectedIndex!=null||(Array.isArray(t)?t.length>0:t!=null)||(We(n)?Object.keys(n).length>0:n!=null)||(typeof s=="string"?s.length>0:s!=null)}function Ex(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function OR(e){return We(e)&&Object.values(e).every(t=>typeof t=="string"||typeof t=="number")}function kx({deck:e,retryCount:t}){const n=e.attempt.currentProgress,s=Number(n.retryAttempts??0),r=Number(t??-1),i=r===-1||s<r;return e.deal.cards.length>0&&(n.activeIndex??0)>=Xs(e.deal.cards.length)&&e.deal.cards.every(a=>n.items[a.progressId]?.isComplete===!0)&&i}const BR={},Nx="rise/quizDecks/QUIZ_DECK_PREPARED",wx="rise/quizDecks/QUIZ_DECK_REVIEW_TARGET_LANGUAGE_CHANGED",jx="rise/quizDecks/QUIZ_DECK_MULTIPLE_CHOICE_SELECTION_CHANGED",Ax="rise/quizDecks/QUIZ_DECK_MULTIPLE_RESPONSE_SELECTION_TOGGLED",Rx="rise/quizDecks/QUIZ_DECK_FILL_IN_RESPONSE_CHANGED",Px="rise/quizDecks/QUIZ_DECK_MATCHING_RESPONSE_CHANGED",Mx="rise/quizDecks/QUIZ_DECK_ANSWER_SUBMITTED",Ox="rise/quizDecks/QUIZ_DECK_SIMULATION_ADVANCED",Bx="rise/quizDecks/QUIZ_DECK_SIMULATION_STARTED",Dx="rise/quizDecks/QUIZ_DECK_SIMULATION_RETAKE_REQUESTED",DR=(0,me.handle)(BR,{[Mx]:nP,[Fo]:YR,[Rx]:eP,[Px]:tP,[jx]:XR,[Ax]:JR,[Nx]:qR,[Ox]:rP,[Bx]:oP}),FR=(0,me.action)(jx),_R=(0,me.action)(Ax),HR=(0,me.action)(Rx),VR=(0,me.action)(Px),zR=(0,me.action)(Mx),$R=(0,me.action)(Nx),UR=(0,me.action)(wx),GR=(0,me.action)(Bx),WR=(0,me.action)(Dx),KR=(0,me.action)(Ox);function QR(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type===wx}function ZR(e){return typeof e=="object"&&e!==null&&"type"in e&&e.type===Dx}function Fx(e){const t=e.attempt.currentProgress,n=e.deal.cards[0],s=n?t.items[n.progressId]:void 0,r=e.deal.cards.length>0&&e.deal.cards.every(i=>t.items[i.progressId]!=null&&Wx(i));return t.reportResults!==!0&&(t.activeIndex??0)===0&&r&&s!=null&&s.isComplete!==!0}function _x(e){const t=e.attempt.currentProgress,n=t.activeIndex??0,s=e.deal.cards[n-1],r=s?t.items[s.progressId]:void 0;return t.reportResults!==!0&&n>0&&n<Xs(e.deal.cards.length)&&r?.isComplete===!0}function Hx({cardKey:e,deck:t}){return Gl({cardKey:e,deck:t,questionType:oe.MULTIPLE_CHOICE})}function Vx({cardKey:e,deck:t}){return Gl({cardKey:e,deck:t,questionType:oe.MULTIPLE_RESPONSE})}function zx({cardKey:e,deck:t}){return Gl({cardKey:e,deck:t,questionType:oe.FILL_IN_THE_BLANK})}function $x({cardKey:e,deck:t}){return Gl({cardKey:e,deck:t,questionType:oe.MATCHING})}function Ux({cardKey:e,deck:t}){return Gx({cardKey:e,deck:t})}function YR(e,{course:t}){return t.features?.[Hl]!==!0?{}:t.lessons.reduce((n,s)=>(_o(s)&&(n[s.id]={status:"unprepared"}),n),{})}function qR(e,{deck:t,lessonId:n}){return e[n]==null?e:{...e,[n]:t}}function XR(e,t){const{authoredAnswerIndex:n,cardKey:s,lessonId:r}=t,i=Br({payload:t,state:e});if(!i)return e;const a=Hx({cardKey:s,deck:i});if(!a)return e;const{card:c,progress:l}=a;if(n!=null&&(!Number.isInteger(n)||n<0||n>=c.answerOrder.length)||l.isCorrect==null&&(n==null?l.selectedIndex==null:l.selectedIndex===n))return e;const{isCorrect:h,selectedIndex:m,...f}=l,p=n==null?f:{...f,selectedIndex:n},g=i.attempt.currentProgress;return{...e,[r]:{...i,attempt:{...i.attempt,canonicalProgressDiscarded:!0,currentProgress:{...g,items:{...g.items,[c.progressId]:p}}}}}}function JR(e,t){const{authoredAnswerIndex:n,cardKey:s,lessonId:r}=t,i=Br({payload:t,state:e});if(!i)return e;const a=Vx({cardKey:s,deck:i});if(!a)return e;const{card:c,progress:l}=a;if(!Number.isInteger(n)||n<0||n>=c.answerOrder.length)return e;const d=l.selectedIndices??[],h=d.includes(n)?d.filter(x=>x!==n):[...d,n],{isCorrect:m,selectedIndices:f,...p}=l,g=h.length===0?p:{...p,selectedIndices:h},v=i.attempt.currentProgress;return{...e,[r]:{...i,attempt:{...i.attempt,canonicalProgressDiscarded:!0,currentProgress:{...v,items:{...v.items,[c.progressId]:g}}}}}}function eP(e,t){const{cardKey:n,lessonId:s,text:r}=t,i=Br({payload:t,state:e});if(!i)return e;const a=zx({cardKey:n,deck:i});if(!a)return e;const{card:c,progress:l}=a,d=oo(r);if(l.isCorrect==null&&(d?!Object.hasOwn(l,"text"):l.text===r))return e;const{isCorrect:m,text:f,...p}=l,g=d?p:{...p,text:r},v=i.attempt.currentProgress;return{...e,[s]:{...i,attempt:{...i.attempt,canonicalProgressDiscarded:!0,currentProgress:{...v,items:{...v.items,[c.progressId]:g}}}}}}function tP(e,t){const{cardKey:n,lessonId:s,matchAnswerId:r,promptAnswerId:i}=t,a=Br({payload:t,state:e});if(!a)return e;const c=$x({cardKey:n,deck:a});if(!c)return e;const{card:l,progress:d}=c,h=l.matchingOrder,m=h.answerIds.indexOf(i),f=r==null?void 0:h.answerIds.indexOf(r);if(!h.prompts.includes(m)||f!=null&&!h.matches.includes(f))return e;const p=d.matches??{},g=Object.hasOwn(p,i);if(d.isCorrect==null&&(r==null?!g:g&&String(p[i])===String(r)))return e;const x=sP({matchAnswerId:r,matches:p,promptAnswerId:i}),{isCorrect:b,matches:y,...T}=d,S=Object.keys(x).length===0?T:{...T,matches:x},I=a.attempt.currentProgress;return{...e,[s]:{...a,attempt:{...a.attempt,canonicalProgressDiscarded:!0,currentProgress:{...I,items:{...I.items,[l.progressId]:S}}}}}}function nP(e,t){const{cardKey:n,fillInText:s,lessonId:r,resolvedFillInAnswers:i}=t,a=Br({payload:t,state:e});if(!a)return e;const c=Ux({cardKey:n,deck:a});if(!c)return e;const{card:l,progress:d}=c,h=SA({card:l,fillInText:s,progress:d,resolvedFillInAnswers:i});if(!h)return e;const{isCorrect:m,progress:f}=h,p=a.attempt.currentProgress,g={...p.items,[l.progressId]:{...f,isComplete:!0,isCorrect:m}},v=Sm({cards:a.deal.cards,items:g}),x=p.activeIndex??0,b=a.deal.revealAnswers===Ee.NONE?Math.min(x+1,Xs(a.deal.cards.length)):x;return{...e,[r]:{...a,attempt:{...a.attempt,canonicalProgressDiscarded:!0,currentProgress:{...p,activeIndex:b,items:g,percentComplete:v.percentComplete,score:v.score}}}}}function sP({matchAnswerId:e,matches:t,promptAnswerId:n}){const s=String(n),r=[];for(const[i,a]of Object.entries(t))i!==s&&(e==null||String(a)!==String(e))&&r.push([i,a]);return e!=null&&r.push([s,e]),Object.fromEntries(r)}function oP(e,t){const n=Br({payload:t,state:e});if(!n||!Fx(n))return e;const{lessonId:s}=t,r=n.attempt.currentProgress;return{...e,[s]:{...n,attempt:{...n.attempt,canonicalProgressDiscarded:!0,currentProgress:{...r,activeIndex:1}}}}}function rP(e,t){const n=Br({payload:t,state:e});if(!n||!_x(n))return e;const{fromIndex:s,lessonId:r}=t,i=n.attempt.currentProgress,a=i.activeIndex??0;return a!==s?e:{...e,[r]:{...n,attempt:{...n.attempt,canonicalProgressDiscarded:!0,currentProgress:{...i,activeIndex:Math.min(a+1,Xs(n.deal.cards.length))}}}}}function Br({payload:e,state:t}){const n=t[e.lessonId];return n?.status==="ready"&&n.attempt.currentProgress.reportResults!==!0&&n.deal.structureKey===e.structureKey&&(n.attempt.currentProgress.retryAttempts??0)===e.retryAttempts?n:void 0}function Gx({cardKey:e,deck:t}){const n=t.attempt.currentProgress,s=n.activeIndex??0,r=t.deal.cards[s-1],i=r?n.items[r.progressId]:void 0;return n.reportResults!==!0&&s>0&&r?.key===e&&Wx(r)&&i!=null&&i.isComplete!==!0?{card:r,progress:i}:void 0}function Wx(e){const t=e.answerOrder.length;switch(e.questionType){case oe.FILL_IN_THE_BLANK:return e.scoring.acceptedAnswers.length>0;case oe.MATCHING:return t>0&&e.matchingOrder.answerIds.length===t&&e.matchingOrder.prompts.length===t&&e.matchingOrder.matches.length===t;case oe.MULTIPLE_CHOICE:return t>0&&e.scoring.correctAuthoredAnswerIndex>=0&&e.scoring.correctAuthoredAnswerIndex<t;case oe.MULTIPLE_RESPONSE:return t>0&&e.scoring.correctAuthoredAnswerIndices.length>0&&new Set(e.scoring.correctAuthoredAnswerIndices).size===e.scoring.correctAuthoredAnswerIndices.length&&e.scoring.correctAuthoredAnswerIndices.every(n=>n>=0&&n<t)}}function Gl({cardKey:e,deck:t,questionType:n}){const s=Gx({cardKey:e,deck:t});return s&&iP(s.card,n)?{card:s.card,progress:s.progress}:void 0}function iP(e,t){return e.questionType===t}const Kx="rise/search/RESET_SEARCH",Qx="rise/search/SET_SEARCH_ACTIVE",Zx="rise/search/SET_SEARCH_ACTIVE_LESSONS",Yx="rise/search/SET_SEARCH_TRANSLATIONS",qx="rise/search/SET_SEARCH_LESSONS",Xx="rise/search/SET_SEARCH_TERM",Jx={active:!1,activeLessons:[],translations:{},lessons:[],term:null},aP=(e,t)=>t?{...Jx,active:e.active}:e,cP=(e,t)=>({...e,active:t}),lP=(e,t)=>({...e,activeLessons:t}),dP=(e,t)=>({...e,translations:t}),uP=(e,t)=>({...e,lessons:t}),hP=(e,t)=>({...e,term:t}),mP=(0,me.handle)(Jx,{[Kx]:aP,[Qx]:cP,[Zx]:lP,[Yx]:dP,[qx]:uP,[Xx]:hP}),Ti=e=>(0,me.action)(e),eb=Ti(Kx),nc=Ti(Qx),tb=Ti(Zx),nb=Ti(Yx),sb=Ti(qx),Dr=Ti(Xx),Tm=e=>`rise/sessionPreferences/${e}`,ob=Tm("LOAD_SESSION_PREFERENCES"),rb=Tm("SET_PREFERS_KEYBOARD_NAVIGATION"),fP=Tm("SET_STARTING_COURSE_LESSON_SELECTED"),pP={prefersKeyboardNavigation:!1,startedCourseWithLessonSelected:!1},gP=(e,t)=>({...e,prefersKeyboardNavigation:t}),vP=(e,t)=>({...e,startedCourseWithLessonSelected:t}),CP=(0,me.handle)(pP,{[ob]:(e,t)=>({...e,...t}),[rb]:gP,[fP]:vP}),xP=()=>(0,me.action)(ob,null),bP=(0,me.action)(rb),Lm=Rs()("rise/transcriptPanel/"),ib=Lm("OPEN_TRANSCRIPT_PANEL"),ab=Lm("CLOSE_TRANSCRIPT_PANEL"),cb=Lm("UPDATE_TRANSCRIPT_PANEL"),yP={audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null},SP=(e,t)=>t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??!1,refocusTarget:t.refocusTarget??null,transcriptMedia:t.transcriptMedia??null}:e,lb=()=>({audioPlayerIdOpen:null,focusing:!1,refocusTarget:null,transcriptMedia:null}),IP=(e,t)=>e.audioPlayerIdOpen?t.audioPlayerId?{...e,audioPlayerIdOpen:t.audioPlayerId,focusing:t.focusing??e.focusing,transcriptMedia:t.transcriptMedia??e.transcriptMedia}:lb():e,TP={[ib]:SP,[ab]:lb,[cb]:IP},LP=(0,me.handle)(yP,TP),db=(e=>`rise/ui/${e}`)("SET_SKIP_TO_NAV_BUTTON_UI"),EP={skipToNavButton:null},kP=(0,me.handle)(EP,{[db]:(e,t)=>({...e,skipToNavButton:t})}),Em=(0,me.action)(db);var Qve;const NP={},wP=(0,gl.HY)({course:Aw,courseLabels:Gw,courseProgress:mj,deliveryPolicy:Vj,fonts:Xj,global:G2,l10n:sA,partnerContent:xA,quizDecks:DR,search:mP,sessionPreferences:CP,status:W7,transcriptPanel:LP,ui:kP,...NP});var Ke=C(32926);function ub(e){return(0,Ke.Mz)(e,t=>{const n=new Map;for(const s of t??[])s?.id==null||s.id===""||n.set(String(s.id),s);return n})}const sc=(e,t,n)=>(0,an.uW)(e)&&t?n?.[t]?.[e.l10nId]:void 0,Wl=(e,t,n,s)=>{if(!(0,an.uW)(e))return e;if(!t||!n||!s)return;const r=sc(e,t,s);if(r!==void 0)return r;const i=sc(e,n,s);if(i!==void 0)return i;const a=hb(e,s);return a.length>0?a[0].value:void 0},km=new WeakMap,Nm=(e,t)=>{if(e&&t in e)return e[t]},wm=(e,t,n,s)=>{if(!t||!n||!s||!e)return e;if(typeof e=="object"){const d=km.get(e)?.get(s);if(d&&d.locale===t&&d.defaultLocale===n)return d.result}const r=s[t],i=s[n],a=Object.values(s).filter(d=>d!==r&&d!==i);function c(d){let h;if(h=Nm(r,d),h!==void 0||(h=Nm(i,d),h!==void 0))return h;for(const m of a)if(h=Nm(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,Eo.pr)(l))d(c(h))}if(typeof e=="object"){let d=km.get(e);d||(d=new WeakMap,km.set(e,d)),d.set(s,{locale:t,defaultLocale:n,result:l})}return l},Zve=(e,t,n)=>wm(e,t,Li(n),ro(n)),Yve=(e,t,n)=>Wl(e,t,Li(n),ro(n)),qve=(e,t,n)=>sc(e,t,ro(n));function Xve(e,t){return t?.find(n=>n.locale===e)}function jP(e){return e?.l10n?.locales??[]}function Li(e){return e?.l10n?.defaultLocale}function AP(e,t){const n=Li(t);return!!(e&&n&&e!==n)}const RP=Object.freeze({});function ro(e){return e?.l10n?.translations??RP}function hb(e,t){return(0,an.uW)(e)?Object.keys(t).flatMap(n=>{const s=sc(e,n,t);return s?{locale:n,value:s}:[]}):[]}const Jve=(e,t)=>hb(e,ro(t)),Ot=e=>(0,an.uW)(e)?e.l10nId:void 0;function PP(e){return e?.l10n?.localeSelectorOptions}function jm(e){return e?.l10n?.languageCodeMetadata}function MP(e){return e?.l10n?.showLocaleSelector}function OP(e){return e.status==="incompatible"?e.recoverableDeck!=null||e.recoverableReviewMode!=null:e.status!=="failed"||e.phase!=="reconciliation"}function Am(e){const t=Ja({bank:e,isReviewTargetLanguage:!1}),n=Ja({bank:e,isReviewTargetLanguage:!0});return t!==n||n>1}function mb(e){return e.some(t=>t.type===oe.DRAW_FROM_QUESTION_BANK&&Am(t))}const fb=new Set([void 0,oe.FILL_IN_THE_BLANK,oe.MATCHING,oe.MULTIPLE_CHOICE,oe.MULTIPLE_RESPONSE]);function pb({dependencies:e,lesson:t,previousDeck:n,progress:s}){try{const r=n?.status==="failed"&&n.phase==="reconciliation"?n:void 0,i=n?.status==="ready"?n.attempt.baselineProgress:n?.status==="incompatible"?n.baselineProgress:r?.baselineProgress,a=i!=null&&(i.retryAttempts??0)===(s.retryAttempts??0);if(r&&a)return r.baselineProgress===s?r:{...r,baselineProgress:s};if(n?.status==="incompatible"&&a&&n.recoverableDeck==null&&n.recoverableReviewMode==null)return n.baselineProgress===s?n:{...n,baselineProgress:s};const c=e.isReviewTargetLanguage(),l={...e,isReviewTargetLanguage:()=>c},d=FP(l.getPassingScore({lesson:t})),h=Pm({getL10nValues:l.getL10nValues,isReviewTargetLanguage:c,lesson:t,passingScore:d}),m=s.reportResults===!0||n?.status==="ready"&&a&&n.attempt.currentProgress.reportResults===!0,f=YP({isReviewTargetLanguage:c,lesson:t,previousDeck:n?.status==="ready"&&a?n:void 0,progress:s}),p=c?"target":"source";if(n?.status==="incompatible"&&a){const B=n.recoverableDeck;if(B?.deal.structureKey===h)return B.attempt.currentProgress.reportResults!==!0&&!B.attempt.canonicalProgressDiscarded?xb({lesson:t,passingScore:d,previousDeck:B,progress:s}):{...B,attempt:{...B.attempt,baselineProgress:s}};if(n.recoverableReviewMode?.mode!==p||n.recoverableReviewMode.structureKey!==h)return n.baselineProgress===s?n:{...n,baselineProgress:s}}const g=n?.status==="ready"&&a&&n.deal.structureKey!==h,v=n?.status==="ready"&&a&&n.attempt.canonicalProgressDiscarded,x=g&&n?.status==="ready"&&n.deal.structureKey===Pm({getL10nValues:l.getL10nValues,isReviewTargetLanguage:!c,lesson:t,passingScore:d});if(x&&n?.status==="ready"&&n.attempt.currentProgress.reportResults!==!0&&!n.attempt.canonicalProgressDiscarded&&f)return Ql({previousDeck:n,progress:s})?Rm({previousDeck:n,progress:s}):Ps({progress:s,reason:"invalidProgress",structureKey:h});if(g&&m&&(!f||v))return{baselineProgress:s,reason:"reportedAttemptCannotBeMapped",...x?{recoverableDeck:n}:{},status:"incompatible",structureKey:h};if(n?.status==="ready"&&n.deal.structureKey===h&&a)return n.attempt.baselineProgress===s?n:n.attempt.currentProgress.reportResults===!0||v?{...n,attempt:{...n.attempt,baselineProgress:s}}:f?Ql({previousDeck:n,progress:s})?Rm({previousDeck:n,progress:s}):Ps({progress:s,reason:"invalidProgress",structureKey:h}):xb({lesson:t,passingScore:d,previousDeck:n,progress:s});const b=i!=null&&!a&&s.reportResults!==!0&&!Im(s)&&!ZP({lesson:t,progress:s});let y=s;if(g?y=Zl({lesson:t,progress:s}):b?y=yb({lesson:t,progress:s}):f&&s.questionsDrawn!==!0?y=Zl({lesson:t,progress:s}):f&&(y=qP({lesson:t,progress:s})),zP({lesson:t,progress:y}))return Ps({progress:s,reason:"invalidQuestionReference",structureKey:h});const T=Kl({isReviewTargetLanguage:c,lesson:t,progress:y});if(T){if(s.reportResults||Im(y)){const B=VP({isReviewTargetLanguage:c,lesson:t,progress:y});return Ps({progress:s,reason:T,recoverableReviewMode:B?{mode:B,structureKey:Pm({getL10nValues:l.getL10nValues,isReviewTargetLanguage:B==="target",lesson:t,passingScore:d})}:void 0,structureKey:h})}y=Zl({lesson:t,progress:y})}const{didResetProgress:S,drawPayload:I,resolvedItems:L}=yx({dependencies:l,lessonId:t.id,progress:y,settings:{...t.settings,randomizeQuestionOrder:vb({isReviewTargetLanguage:c,lesson:t})},sourceItems:t.items}),E={...t.settings?.shuffleAnswerChoices===!0?I.lessonProgress:XP(I.lessonProgress),passingScore:d},k=Kl({isReviewTargetLanguage:c,lesson:t,progress:E});if(k)return{reason:k,status:"failed"};const N=$P({lesson:t,questionList:E.questionList});if(N.status==="failed")return N;const R=UP({occurrences:N.occurrences,resolvedItems:L});if(!R)return Ps({progress:s,reason:"invalidQuestionReference",structureKey:h});const M=WP({lesson:t,occurrences:N.occurrences,preserveAnswerOrder:t.settings?.shuffleAnswerChoices===!0,progress:y,resolvedProgress:E});if(!M)return Ps({progress:s,reason:"invalidProgress",structureKey:h});const A=[];for(const{occurrence:B,question:H}of R){const _=GP({dependencies:l,occurrence:B,progress:M[B.progressId],question:H,shuffleAnswerChoices:t.settings?.shuffleAnswerChoices===!0});if(!_)return{reason:"unscorableQuestion",status:"failed"};A.push(_)}const j={...E,items:M},P=E.percentComplete!=null||E.score!=null?{...j,...Sm({cards:A,items:M})}:j,w=bm({itemIds:A.map(B=>B.progressId),progress:P}).progress,O={attempt:{baselineProgress:s,canonicalProgressDiscarded:!f&&(y!==s||S),currentProgress:Mm(w)},deal:{cards:A,revealAnswers:gb(t.settings?.revealAnswers),structureKey:h},status:"ready"};return f?Rm({previousDeck:O,progress:s}):s.reportResults&&A.some(B=>!w.items[B.progressId]?.isComplete)?{baselineProgress:s,reason:"reportedAttemptCannotBeMapped",status:"incompatible",structureKey:h}:O}catch{return{reason:"preparationError",status:"failed"}}}function BP({dependencies:e,lesson:t,previousDeck:n,retryAttempts:s,structureKey:r}){if(n.status!=="ready")return;const i=Number.parseInt(String(n.attempt.currentProgress.retryAttempts??0),10),a=Number.parseInt(String(s),10);if(n.deal.structureKey!==r||Number.isNaN(i)||Number.isNaN(a)||i!==a||!kx({deck:n,retryCount:t.settings?.retryCount}))return;const c={...yb({lesson:t,progress:n.attempt.currentProgress}),retryAttempts:a+1},l=pb({dependencies:e,lesson:t,previousDeck:n,progress:c});if(l.status==="ready")return{...l,attempt:{...l.attempt,baselineProgress:n.attempt.baselineProgress,canonicalProgressDiscarded:!0}}}function Rm({previousDeck:e,progress:t}){if(e.attempt.currentProgress.reportResults===!0)return{...e,attempt:{...e.attempt,baselineProgress:t}};const n={};for(const r of e.deal.cards){const i=e.attempt.currentProgress.items[r.progressId];if(!i)return{reason:"preparationError",status:"failed"};n[r.progressId]={...i,isComplete:!0,isCorrect:!0}}const s=Mm({...e.attempt.currentProgress,activeIndex:Xs(e.deal.cards.length),isComplete:t.isComplete,items:n,passed:t.passed,percentComplete:t.percentComplete,reportResults:t.reportResults,score:t.score});return{...e,attempt:{...e.attempt,baselineProgress:t,currentProgress:s}}}function Pm({getL10nValues:e,isReviewTargetLanguage:t,lesson:n,passingScore:s}){return JSON.stringify({items:n.items.map(r=>r.type===oe.DRAW_FROM_QUESTION_BANK?{drawCount:Ja({bank:r,isReviewTargetLanguage:t}),id:oc(r.id),questions:r.questions.map(i=>Cb({getL10nValues:e,question:i})),reviewMode:Am(r)?t?"target":"source":void 0,type:r.type}:Cb({getL10nValues:e,question:r})),passingScore:s,randomizeQuestionOrder:vb({isReviewTargetLanguage:t,lesson:n}),revealAnswers:gb(n.settings?.revealAnswers),shuffleAnswerChoices:n.settings?.shuffleAnswerChoices===!0})}function gb(e){switch(e){case!0:case Ee.ALL:return Ee.ALL;case Ee.INCORRECT:return Ee.INCORRECT;case Ee.NONE:case null:case void 0:return Ee.NONE}}function vb({isReviewTargetLanguage:e,lesson:t}){return t.settings?.randomizeQuestionOrder===!0&&!(e&&mb(t.items))}function Cb({getL10nValues:e,question:t}){return{answers:t.answers?.map(n=>oc(n.id))??[],columnBehavior:t.type===oe.MATCHING?t.settings?.columnBehavior??"freezeSecond":void 0,id:oc(t.id),scoring:DP({getL10nValues:e,question:t}),type:t.type??oe.MULTIPLE_CHOICE}}function DP({getL10nValues:e,question:t}){switch(t.type){case oe.FILL_IN_THE_BLANK:return{answers:t.answers?.map(n=>({title:n.title,translations:[...e(n.title)].sort(HP)}))??[],isCaseSensitive:t.settings?.isCaseSensitive===!0};case oe.MULTIPLE_RESPONSE:return{corrects:(t.corrects??[]).map(oc).sort(_P)};case oe.MULTIPLE_CHOICE:case void 0:{const n=t.correct;return{correct:n==null?null:oc(n)}}case oe.MATCHING:return}}function FP(e){const t=Number(e??80);return Number.isFinite(t)?t:80}function oc(e){return typeof e=="number"?["number",e]:["string",e]}function _P(e,t){const n=JSON.stringify(e),s=JSON.stringify(t);return n===s?0:n<s?-1:1}function HP(e,t){return e.locale===t.locale?0:e.locale<t.locale?-1:1}function Kl({isReviewTargetLanguage:e,lesson:t,progress:n}){const s=t.items.filter(a=>a.type===oe.DRAW_FROM_QUESTION_BANK);if(s.length===0||!n.questionsDrawn)return;const r=n.questionList;return!vm(r)||r.length!==s.length?"invalidQuestionReference":s.every((a,c)=>{const l=r[c],d=Ja({bank:a,isReviewTargetLanguage:e});return l.length===d&&new Set(l).size===l.length&&l.every(h=>a.questions[h]!=null)&&(!e||l.every((h,m)=>h===m))})?void 0:"invalidQuestionReference"}function VP({isReviewTargetLanguage:e,lesson:t,progress:n}){const s=!e;return t.items.some(r=>r.type===oe.DRAW_FROM_QUESTION_BANK&&Am(r))&&Kl({isReviewTargetLanguage:s,lesson:t,progress:n})==null?s?"target":"source":void 0}function zP({lesson:e,progress:t}){return!t.questionsDrawn&&e.items.some(n=>n.type===oe.DRAW_FROM_QUESTION_BANK)&&Im(t)}function $P({lesson:e,questionList:t}){const n=vm(t)?t:[],s=[];let r=0;for(const[a,c]of e.items.entries()){if(c.type!==oe.DRAW_FROM_QUESTION_BANK){if(!fb.has(c.type))return{reason:"unsupportedQuestion",status:"failed"};s.push({progressId:c.id,progressIndex:s.length,question:c,source:{kind:"lesson",lessonItemIndex:a}});continue}const l=n[r++];if(!l)return{reason:"invalidQuestionReference",status:"failed"};for(const d of l){const h=c.questions[d];if(!h)return{reason:"invalidQuestionReference",status:"failed"};if(!fb.has(h.type))return{reason:"unsupportedQuestion",status:"failed"};s.push({progressId:`${c.id}-${h.id}`,progressIndex:s.length,question:h,source:{bankQuestionIndex:d,kind:"questionBank",lessonItemIndex:a}})}}const i=s.map(({progressId:a})=>String(a));return new Set(i).size!==i.length?{reason:"invalidQuestionReference",status:"failed"}:{occurrences:s,status:"success"}}function UP({occurrences:e,resolvedItems:t}){if(e.length!==t.length)return;const n=new Map(e.map(r=>[String(r.progressId),r])),s=[];for(const r of t){const i=n.get(String(r.id));if(!i)return;s.push({occurrence:i,question:r})}return s}function GP({dependencies:e,occurrence:t,progress:n,question:s,shuffleAnswerChoices:r}){const i=s.answers?.length??0,a=Array.from({length:i},(g,v)=>v),c=n?.shuffledAnswerIndices,l=Ul({answerCount:i,value:s.shuffledAnswerIndices}),d=Ul({answerCount:i,value:c});let h=a;r&&l?h=[...l]:r&&d&&(h=[...d]);const m=yA({getL10nValues:e.getL10nValues,question:t.question});if(!m)return;const f=t.source.kind==="lesson"?`lesson:${t.source.lessonItemIndex}`:`questionBank:${t.source.lessonItemIndex}:${t.source.bankQuestionIndex}`,p={answerOrder:h,key:f,progressId:t.progressId,questionId:t.question.id,source:t.source};switch(m.kind){case"fillIn":return{...p,matchingOrder:void 0,questionType:oe.FILL_IN_THE_BLANK,scoring:{acceptedAnswers:m.acceptedAnswers,isCaseSensitive:m.isCaseSensitive}};case"matching":{if(s.type!==oe.MATCHING||t.question.type!==oe.MATCHING)return;const g=t.question.answers.map(x=>x.id),v=s.settings?.columnBehavior==="freezeFirst"?{answerIds:g,matches:e.shuffle([...h]),prompts:[...h]}:{answerIds:g,matches:[...h],prompts:e.shuffle([...h])};return{...p,matchingOrder:v,questionType:oe.MATCHING,scoring:{}}}case"multipleChoice":return{...p,matchingOrder:void 0,questionType:oe.MULTIPLE_CHOICE,scoring:{correctAuthoredAnswerIndex:m.correctAuthoredAnswerIndex}};case"multipleResponse":return{...p,matchingOrder:void 0,questionType:oe.MULTIPLE_RESPONSE,scoring:{correctAuthoredAnswerIndices:m.correctAuthoredAnswerIndices}}}}function WP({lesson:e,occurrences:t,preserveAnswerOrder:n,progress:s,resolvedProgress:r}){const i=Sx({preserveAnswerOrder:n,progress:s,targets:t});if(i.status==="failed")return;const a={};for(const c of t){const l=i.claims.get(c.progressIndex),d=l?.current!=null||l?.original!=null||bb({lesson:e,progress:s,source:c.source})!=null,h=r.items[c.progressId],m=h?Ix({id:c.progressId,index:c.progressIndex,preserveAnswerOrder:n,question:c.question,value:h}):void 0;if(!d||!h||h.index!==c.progressIndex||String(h.id)!==String(c.progressId)||!m)return;a[c.progressId]=m}return a}function xb({lesson:e,passingScore:t,previousDeck:n,progress:s}){const r=s.reportResults===!0;if(!Ql({previousDeck:n,progress:s}))return Ps({installedDeck:n,progress:s,reason:"invalidProgress",structureKey:n.deal.structureKey});const i=e.settings?.shuffleAnswerChoices===!0,a=[];for(const g of n.deal.cards){const v=KP({lesson:e,source:g.source}),x=n.attempt.currentProgress.items[g.progressId];if(!v||!x||x.index==null||v.id!==g.questionId)return{reason:"preparationError",status:"failed"};a.push({card:g,target:{progressId:g.progressId,progressIndex:x.index,question:v}})}const c=Sx({preserveAnswerOrder:i,progress:s,targets:a.map(({target:g})=>g)});if(c.status==="failed")return Ps({installedDeck:n,progress:s,reason:c.reason,structureKey:n.deal.structureKey});const l={};for(const{card:g,target:v}of a){const x=c.claims.get(v.progressIndex);if(!x)return{reason:"preparationError",status:"failed"};const b=x.original?{...x.current,...x.original}:x.current??bb({lesson:e,progress:s,source:g.source});if(!b)return Ps({installedDeck:n,progress:s,reason:"invalidProgress",structureKey:n.deal.structureKey});const y=Ix({id:g.progressId,index:v.progressIndex,preserveAnswerOrder:i,question:v.question,value:b});if(!y||!QP({card:g,row:y}))return Ps({installedDeck:n,progress:s,reason:"invalidProgress",structureKey:n.deal.structureKey});l[g.progressId]=y}const d={...s,items:l,passingScore:t};delete d.originalItemProgress,e.items.some(g=>g.type===oe.DRAW_FROM_QUESTION_BANK)?(d.questionList=n.attempt.currentProgress.questionList,d.questionsDrawn=!0):(delete d.questionList,delete d.questionsDrawn);const m=s.percentComplete!=null||s.score!=null?{...d,...Sm({cards:n.deal.cards,items:l})}:d,f=bm({itemIds:n.deal.cards.map(g=>g.progressId),progress:m}).progress,p={baselineProgress:s,canonicalProgressDiscarded:n.attempt.canonicalProgressDiscarded,currentProgress:Mm(f)};return r&&n.deal.cards.some(g=>!f.items[g.progressId]?.isComplete)?{baselineProgress:s,reason:"reportedAttemptCannotBeMapped",status:"incompatible",structureKey:n.deal.structureKey}:{...n,attempt:p}}function bb({lesson:e,progress:t,source:n}){const s=e.items[n.lessonItemIndex];if(!s||n.kind==="questionBank"&&s.type!==oe.DRAW_FROM_QUESTION_BANK||n.kind==="lesson"&&s.type===oe.DRAW_FROM_QUESTION_BANK)return;const r=t.items[s.id];return r&&String(r.id)===String(s.id)&&r.index===n.lessonItemIndex?r:void 0}function KP({lesson:e,source:t}){const n=e.items[t.lessonItemIndex];return t.kind==="lesson"?n?.type===oe.DRAW_FROM_QUESTION_BANK?void 0:n:n?.type===oe.DRAW_FROM_QUESTION_BANK?n.questions[t.bankQuestionIndex]:void 0}function QP({card:e,row:t}){return!(t.shuffledAnswerIndices&&JSON.stringify(t.shuffledAnswerIndices)!==JSON.stringify(e.answerOrder))}function ZP({lesson:e,progress:t}){return Object.values(t.items).length===e.items.length&&e.items.every((s,r)=>{const i=t.items[s.id];return i!=null&&String(i.id)===String(s.id)&&i.index===r&&Object.keys(i).every(a=>a==="id"||a==="index")})}function YP({isReviewTargetLanguage:e,lesson:t,previousDeck:n,progress:s}){if(s.isComplete!==!0||s.passed!==!0||s.percentComplete!==100||s.reportResults!==!0||s.score!==100||!t.items.some(a=>a.type===oe.DRAW_FROM_QUESTION_BANK)||Object.keys(s.items).length!==t.items.length)return!1;const r=s.questionsDrawn!==!0&&s.questionList==null,i=s.questionsDrawn===!0&&(n?Ql({previousDeck:n,progress:s}):Kl({isReviewTargetLanguage:e,lesson:t,progress:s})==null);return!r&&!i?!1:t.items.every((a,c)=>{const l=s.items[a.id];return l!=null&&String(l.id)===String(a.id)&&l.index===c&&l.isComplete===!0&&l.isCorrect===!0})}function Ql({previousDeck:e,progress:t}){const n=t.questionList;return!t.questionsDrawn&&n==null||JSON.stringify(n)===JSON.stringify(e.attempt.currentProgress.questionList)}function Zl({lesson:e,progress:t}){const n={...t,activeIndex:0,items:Object.fromEntries(e.items.map((s,r)=>[s.id,{id:s.id,index:r}]))};return delete n.isComplete,delete n.originalItemProgress,delete n.passed,delete n.percentComplete,delete n.questionList,delete n.questionsDrawn,delete n.reportResults,delete n.score,n}function qP({lesson:e,progress:t}){const n={...t,activeIndex:0,items:Object.fromEntries(e.items.map((s,r)=>[s.id,{id:s.id,index:r}]))};return delete n.isComplete,delete n.passed,delete n.percentComplete,delete n.reportResults,delete n.score,n}function yb({lesson:e,progress:t}){return{...Zl({lesson:e,progress:t}),...t.isComplete!==void 0&&{isComplete:t.isComplete},...t.passed!==void 0&&{passed:t.passed}}}function XP(e){return{...e,items:Object.fromEntries(Object.entries(e.items).map(([t,n])=>{const s={...n};return delete s.shuffledAnswerIndices,[t,s]}))}}function Mm(e){return{...e,items:Object.fromEntries(Object.entries(e.items).map(([t,n])=>[t,{...n,...n.matches?{matches:{...n.matches}}:{},...n.selectedIndices?{selectedIndices:[...n.selectedIndices]}:{},...n.shuffledAnswerIndices?{shuffledAnswerIndices:[...n.shuffledAnswerIndices]}:{}}]))}}function Ps({installedDeck:e,progress:t,reason:n,recoverableReviewMode:s,structureKey:r}){return t.reportResults===!0?{baselineProgress:t,reason:"reportedAttemptCannotBeMapped",...s?{recoverableReviewMode:s}:{},status:"incompatible",structureKey:r}:e?{baselineProgress:t,installedDeck:e,phase:"reconciliation",reason:n,status:"failed"}:{reason:n,status:"failed"}}function JP({resolutionDependencies:e=gm,resolveMasteryScore:t=kC}={}){const n=ub(s=>s.course.lessons);return({dispatch:s,getState:r})=>i=>a=>{const c=r(),l=i(a),d=r(),h=c.course.lessons!==d.course.lessons,m=c.courseProgress.lessons!==d.courseProgress.lessons,f=c.l10n?.translations!==d.l10n?.translations,p=QR(a),g=ZR(a)?a.payload:void 0;if(!m&&!f&&!h&&!p&&!g)return l;const v=Object.keys(d.quizDecks);if(v.length===0)return l;let x,b,y,T;h&&(y=n(c),b=n(d));for(const S of v){if(g&&g.lessonId!==S)continue;const I=r().quizDecks[S];if(!I)continue;const L=d.courseProgress.lessons[S],k=c.courseProgress.lessons[S]!==L,N=I.status==="unprepared"&&c.quizDecks[S]!==I,R=I.status==="ready"?I.attempt.baselineProgress!==L:I.status==="incompatible"||I.status==="failed"&&I.phase==="reconciliation"?I.baselineProgress!==L:!1,M=h&&y?.get(S)!==b?.get(S);let A,j=!1;f&&(T??=eM({currentTranslations:d.l10n?.translations,previousTranslations:c.l10n?.translations}),T.size>0&&(b??=n(d),A=b.get(S),j=_o(A)&&tM({changedL10nIds:T,lesson:A})));const P=p&&OP(I)&&nM((b??=n(d)).get(S)),w=I.status==="unprepared"?N||M||k||P:M||k||R||j||P,D=g?.lessonId===S&&!w;if(!w&&!D)continue;b??=n(d),A??=b.get(S);let O;if(D&&_o(A)&&g){x??={...e,getL10nValues:H=>Sb({state:d,value:H}),getPassingScore:({lesson:H})=>Ib({lesson:H,resolveMasteryScore:t})};const B=BP({dependencies:x,lesson:A,previousDeck:I,retryAttempts:g.retryAttempts,structureKey:g.structureKey});if(!B)continue;O=B}else if(_o(A))L?.type!=="quiz"?O={reason:"invalidProgress",status:"failed"}:(x??={...e,getL10nValues:B=>Sb({state:d,value:B}),getPassingScore:({lesson:B})=>Ib({lesson:B,resolveMasteryScore:t})},O=pb({dependencies:x,lesson:A,previousDeck:I,progress:L}));else continue;O!==I&&s($R({deck:O,lessonId:S}))}return l}}function Sb({state:e,value:t}){const n=Ot(t);return n===void 0?[]:Object.entries(ro(e)).flatMap(([s,r])=>{const i=r[n];return i===void 0?[]:[{locale:s,value:i}]})}function eM({currentTranslations:e,previousTranslations:t}){const n=new Set,s=new Set([...Object.keys(t??{}),...Object.keys(e??{})]);for(const r of s){const i=t?.[r],a=e?.[r];if(i===a)continue;const c=new Set([...Object.keys(i??{}),...Object.keys(a??{})]);for(const l of c)i?.[l]!==a?.[l]&&n.add(l)}return n}function tM({changedL10nIds:e,lesson:t}){return t.items.some(n=>(n.type==="DRAW_FROM_QUESTION_BANK"?n.questions:[n]).some(r=>r.type===oe.FILL_IN_THE_BLANK&&r.answers.some(i=>{const a=Ot(i.title);return a!=null&&e.has(a)})))}function Ib({lesson:e,resolveMasteryScore:t}){const n=Number(e.settings?.passingScore??80),s=Number.isFinite(n)?n:80;return Number(t({id:e.id,passingScore:s})??s)}function nM(e){return _o(e)&&mb(e.items)}const{Provider:sM,dispatch:gn,store:Tb,useDispatch:it,useSelector:pe}=_9(wP,void 0,{additionalMiddleware:[JP()]}),Lb="_course_token",Om=new URLSearchParams(window.location.hash.substr(1)),Eb=Om.get(Lb);Eb&&(Om.delete(Lb),window.history.replaceState(null,null,`#${Om.toString()}`));const oM=e=>{const{data:{method:t,id:n,jsonrpc:s}}=e;if(s==="2.0"&&t==="getBearerToken"){const r=Eb||Rt();navigator.serviceWorker.ready.then(i=>{i.active.postMessage({id:n,jsonrpc:"2.0",method:t,result:{token:r}})})}};navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",oM);const kb=(0,u.createContext)({});function rM(e,{type:t,message:n}){switch(t){case"polite":return{...e,politeMessage1:e.alternatePolite?n:"",politeMessage2:e.alternatePolite?"":n,alternatePolite:!e.alternatePolite};case"assertive":return{...e,assertiveMessage1:e.alternateAssertive?n:"",assertiveMessage2:e.alternateAssertive?"":n,alternateAssertive:!e.alternateAssertive};default:return{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}}}function Yl({ariaLive:e,message:t}){return(0,o.jsx)("div",{"aria-atomic":"true","aria-live":e,"aria-relevant":"additions text",className:"visually-hidden-always",role:"log",children:t})}function iM({children:e}){const[{politeMessage1:t,politeMessage2:n,assertiveMessage1:s,assertiveMessage2:r},i]=(0,u.useReducer)(rM,{politeMessage1:"",politeMessage2:"",alternatePolite:!1,assertiveMessage1:"",assertiveMessage2:"",alternateAssertive:!1}),a=(0,u.useMemo)(()=>({announcePolite:c=>{i({type:"polite",message:c})},announceAssertive:c=>{i({type:"assertive",message:c})},clearAnnouncements:()=>{i({type:"clear"})}}),[i]);return(0,o.jsxs)(kb.Provider,{value:a,children:[(0,o.jsx)(Yl,{ariaLive:"polite",id:"polite-announcer1",message:t}),(0,o.jsx)(Yl,{ariaLive:"polite",id:"polite-announcer2",message:n}),(0,o.jsx)(Yl,{ariaLive:"assertive",id:"assertive-announcer1",message:s}),(0,o.jsx)(Yl,{ariaLive:"assertive",id:"assertive-announcer2",message:r}),e]})}function Ms(){return(0,u.useContext)(kb)}var aM,cM,ql,rc,Xl,Jl,ic;const lM=[qv,"guide",Nh,"video",wh],Nb=e=>e!=null&&lM.includes(e),Kn=e=>Nb(e?.type),dM=e=>Kn(e)&&e?.theme?.blockNavigationType===za.STEPPED,uM=e=>cM(e)&&!!e.attachedToNextBlock;function hM(e){const t=[];let n=[];for(const s of e)n.push(s),uM(s.settings)||(t.push(n),n=[]);return n.length>0&&t.push(n),t}function eCe(e,t){const n=hM(e),s=n.findIndex(r=>r.some(i=>String(i.id)===String(t)));return s===-1?null:{index:s,slide:n[s]}}const tCe=(e,t)=>n=>Kn(n)?e:t,ms=e=>(0,Eo.Qe)({type:e?.type,experiments:e?.experiments}),nCe=e=>{const t=ms(e);switch(t){case"guide":case ql:case rc:case Xl:case"video":return t;case Jl:return"microlearning";case null:case ic:return"course"}},Bm=e=>ms(e)==="guide",Fr=e=>ms(e)===Nh,io=e=>ms(e)==="video",_r=e=>ms(e)===wh,sCe=e=>ms(e)===rc,oCe=e=>!_r(e)&&!io(e)&&ms(e)!==ic,wb=e=>{switch(ms(e)){case"guide":return"Guide";case Nh:return"Presentation";case"video":return"Interactive Video";case wh:return"Scenario";case null:case qv:case e8:case t8:return"Microlearning"}},rCe=e=>Kn(e)?wb(e):"Course",jb=["guide","presentation","video","scenario","microlearning"],mM=[...jb,"course"],iCe=e=>typeof e=="string"&&mM.includes(e),aCe=e=>!Bm(e)&&!Fr(e)&&!io(e)&&!_r(e),Dm=e=>e?.type==null||aM(e.type),cCe=e=>{if(!Dm(e))return!1;switch(ms(e)){case null:case Jl:return!0;case ic:case"guide":case ql:case rc:case Xl:case"video":return!1}},lCe=e=>{if(!Dm(e))return!1;switch(ms(e)){case null:case Jl:return!0;case ic:case"guide":case ql:case rc:case Xl:case"video":return!1}},dCe=e=>{if(!Dm(e))return!1;switch(ms(e)){case null:case ic:case Jl:case ql:case rc:case"video":return!0;case"guide":case Xl:return!1}},uCe=e=>e?jb.includes(e):!1,Fm=({locales:e,course:t,locale:n})=>!!(e?.find(i=>i.locale===n)?.rightToLeft||t?.experiments?.rtl),Ab=(0,u.createContext)({currentLocale:void 0,setCurrentLocale:()=>{}});function fM({children:e,currentLocale:t,setCurrentLocale:n}){const s=(0,u.useMemo)(()=>({currentLocale:t,setCurrentLocale:n}),[t,n]);return(0,o.jsx)(Ab.Provider,{value:s,children:e})}function at(){return(0,u.useContext)(Ab)}function pM(e){const t=n=>{const s=at();return(0,o.jsx)(e,{...n,...s})};return t.displayName=`withCurrentLocale(${e.displayName||e.name})`,t}const _m=(0,u.createContext)(void 0);_m.displayName="CourseSearchContext";function gM({children:e,search:t}){return(0,o.jsx)(_m.Provider,{value:t,children:e})}function ed(){return(0,u.useContext)(_m)}const Ei=(0,u.createContext)({l10n:null});Ei.displayName="TranslationContext";const Hm=(0,u.createContext)({l10n:null});Hm.displayName="LocalesContext";function ct(){const{currentLocale:e}=at(),t=Hn(),n=nd();return(0,u.useCallback)(s=>Wl(s,e,t,n),[e,t,n])}function Rb(){const{currentLocale:e}=at(),t=Hn(),n=nd();return(0,u.useCallback)(s=>wm(s,e,t,n),[e,t,n])}function Oe(e,t){const{currentLocale:n}=at(),s=Hn();let r=nd();const i=CM();return i&&Object.keys(i).length&&n&&r&&(r={...r,[n]:i}),Wl(e,t??n,s,r)}function vM(e){const{currentLocale:t}=at(),n=Hn(),s=nd();return(0,u.useMemo)(()=>wm(e,t,n,s),[t,n,e,s])}function ki(){return(0,u.use)(Hm)}function td(){const e=ki();return jP(e)}function Hn(){const e=ki();return Li(e)}function nd(){const e=(0,u.use)(Ei);return ro(e)}function CM(){return ed()?.translations}function xM(){const e=(0,u.use)(Ei);return MP(e)}function bM(){const e=(0,u.use)(Ei);return PP(e)}const yM=()=>(0,Ke.Mz)(t=>t,(t,n)=>n,(t,n,s)=>Li(s),(t,n,s)=>ro(s),Wl);function bt(e){const{currentLocale:t}=at(),n=(0,u.useMemo)(()=>yM(),[]);return pe(s=>n(e,t,s))}const SM=(0,Ke.Mz)(e=>e,(e,t)=>ro(t),(e,t)=>t?.[e]);function Pb(){const{currentLocale:e}=at();return pe(t=>SM(e,t))}const IM=(0,Ke.Mz)(e=>e.course?.title,Li,ro,(e,t,n)=>{if(e)return sc(e,t,n)});function TM(){return pe(IM)}function sd(){return pe(e=>e.l10n)}var LM=C(49860);function Mb(e){return e?.search}function Ho(){return pe(Mb)}function EM(e){return Mb(e)?.activeLessons}const kM=(0,Ke.Mz)(EM,e=>e?e.reduce((t,n)=>(n?.id&&(t[n.id]=n),t),{}):{});function NM(){return(0,Ke.Mz)(e=>e,(e,t)=>kM(t),(e,t)=>t?.[e])}function wM(e){const t=LM.useMemo(()=>NM(),[]);return pe(n=>t(e,n))}function _t(e){return e.course}function le(){return pe(_t)}function jM(e){return _t(e)?.navigationMode}function Vm(e){return _t(e)?.trackingQuizId}function ac(){const e=le();return bt(e?.title)}function AM(e){return _t(e)?.type}function RM(){return pe(e=>AM(e))}function PM(e){return _t(e)?.color??""}function MM(){return pe(PM)}function OM(e){return _t(e)?.enableVideoPlaybackSpeed??!1}function BM(){return pe(OM)}function Ob(e){const t=_t(e);return Kn(t)}function DM(){return pe(Ob)}function FM(e){const t=_t(e);return io(t)}function Bb(){return pe(FM)}function _M(e){const t=_t(e);return _r(t)}function Db(){return pe(_M)}const HM=e=>e.filter(t=>t.type!=="section");function Hr(){const e=le(),t=Ho();return(0,u.useMemo)(()=>t?.active&&t?.lessons?.length>0?{...e,lessons:t.lessons,lessonsOnly:HM(t.lessons)}:e,[e,t?.active,t?.lessons])}const VM=(0,Ke.Mz)(_t,e=>(e?.lessons??[]).filter(_o).some(t=>t.settings?.skipLessonsIfPassed&&t.settings?.skipToLessonId));function zm(e){const t=jM(e);return VM(e)?Oo.RESTRICTED:t??Oo.FREE}function od(){return pe(zm)}function zM(e){return _t(e)?.theme?.buttonNavigationStyle??nt.buttonNavigationStyle}function $M(){return pe(zM)}function $m(){const e=le();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 Fb(){return le()?.theme?.coverImageColor??xt.DARK}function Um(){return le()?.lessonsOnly?.[0]}function _b(){const e=le(),{selectedAuthorId:t}=e?.lessons?.[0]??{};return t==="none"||!t?null:e?.authors?.find(n=>n.id===t)??null}function fs(){const{currentLocale:e}=at(),t=td(),n=le();return n?Fm({course:n,locales:t,locale:e}):!1}function Hb(){const t=le()?.lessons;return(0,u.useMemo)(()=>Array.isArray(t)?t.filter(({type:n})=>n!=="section").length:0,[t])}class UM extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(t){return console.error(t),{hasError:!0,error:t}}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:s}=this.props;return t||n?(0,o.jsx)(s,{}):this.props.children}}const GM=UM;var WM=C(39117),KM=C.n(WM),QM=C(46280),ZM=C.n(QM),YM=C(76781),rd=C.n(YM),qM=C(98105),ps=C.n(qM),XM=C(18828),id=C.n(XM),JM=C(1554),Vo=C.n(JM),eO=C(71172),tO=C.n(eO),nO=C(41131),sO=C.n(nO);const Vb=({course:e,courseProgress:t})=>!e||!t?{}:e.lessons.filter(r=>!!r.settings?.passToContinue).filter(r=>!t.lessons[String(r.id)]?.passed)[0]??{},oO=({courseProgress:e,lesson:t,restrictingQuiz:n})=>{if(!e)return{};const s=c=>e.lessons[String(c)]?.index,r=s(t.id),i="id"in n?n.id:void 0,a=i!=null?s(i):void 0;return r!==void 0&&a!==void 0&&r>a?n:{}};var rO=C(99651),zo=C.n(rO),iO=C(55803),aO=C.n(iO),cO=C(1069),Gm=C.n(cO);const $o=Ae("CDN_USER_CONTENT_URI"),zb=Ae("CDN_URI"),cc=ja()("useCrushedKey"),gs=Ae("IMAGES_URI"),lO=Gm()(/-stock[-_]image.jpg/),Wm=Ae("RBC_IMAGES_URI"),dO=Ae("ASSETS_URI"),uO=Gm()(new RegExp(`^${$o}/review`)),$b=Ae("CDN_US_URI"),lc=e=>{const{crushedKey:t,key:n,useCrushedKey:s,src:r}=e;return cc(e)?yt(s&&t?t:n):yt(r)},Ub=(e,t)=>{if(!e||!e.key)return"";const{crushedKey:n,key:s,useCrushedKey:r}=e;return gs?cc(e)&&r&&n?`${gs}/${t}/${n}`:`${gs}/${t}/${s}`:lc(e)},hCe=e=>`${$o}/${e}`,mCe=e=>!e||!e.key?"":`${Wm}/b:fff,f:jpg,s:cover,w:550,h:296/${e.key}`,fCe=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:s}=e;return cc(e)&&s?t?`${gs}/f:jpg,b:fff,s:cover,w:340/${t}`:"":`${gs}/f:jpg,b:fff,s:cover,w:340/${n}`},Km=e=>Ub(e,"f:png,a:retain,s:cover,t:true,w:340"),pCe=e=>Ub(e?{...e,src:e.src??e.key}:void 0,"a:retain,f:png,s:contain,w:64,h:64"),pt=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:s,sourcedFrom:r}=e;if(!gs)return lc(e);const i=r==="AI",a=r==="LIBRARY",c=r==="EXTRACTED";return lO(n)||i||a?`${gs}/f:jpg,a:retain,b:fff,w:1680,q:90/${n}`:cc(e)?s&&t?`${$o}/${t}`:`${$o}/${n}`:c&&e.src||uO(e.src)?e.src:`${gs}/f:jpg|png,a:retain,b:fff/${n}`},gCe=(e,t="src")=>{const{key:n,src:s,thumbnail:r,thumbnailKey:i}=e,a=$o?`${$o}/${n}`:lc({key:n,src:s}),c=$o?`${$o}/${i}`:lc({key:i,src:r});return t==="src"?a:c},vCe=e=>{if(!e||!e.key)return"";const{crushedKey:t,key:n,useCrushedKey:s}=e;return cc(e)&&s&&t?`${gs}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${t}`:`${gs}/f:jpg,b:fff,h:100,s:cover,t:true,w:100/${n}`},dc=({height:e,imageKey:t,width:n})=>{if(Wm){const s=encodeURIComponent(t);return`${Wm}/b:fff,f:jpg,s:cover,w:${n},h:${e}/${s}`}return yt(`partnerContent/${t}`)},hO=()=>{const e=dO||gs,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}`:yt(`partnerContent/${t}`)},mO=()=>{const e="NBIC_logo_blue.svg";return zb?`${zb}/assets/rise/assets/partner-content/${e}`:yt(`partnerContent/${e}`)},fO=e=>{const{key:t,src:n}=e;return $b?`${$b}/${t}`:lc({key:t,src:n})},pO=e=>e.startsWith("#")?e:`#${e}`,gO=(e,t)=>{const n=Po(pO(e));return n==null?null:(0,Ha.A)({...n,alpha:t??n.alpha??1},{format:"rgba_number",alpha:!0})},ad=({alpha:e,color:t,url:n})=>{const s=gO(t,e);return s==null?{backgroundImage:`url("${n}")`}:{backgroundImage:`linear-gradient(0deg,${s},${s}), url("${n}")`}};var Qm,Zm;const xCe=Ra()(dt()("sidebarMode","hidden")),Ni=({alpha:e,color:t=void 0,hasOverlay:n=!0,media:s={}})=>{const{image:r={}}=s,{key:i,src:a}=r,c=i?pt(r):a,l=t===xt.LIGHT?"#fff":"#000";return c?n?ad({alpha:e/100,color:l,url:c}):{backgroundImage:`url("${c}")`}:null},Uo=e=>[wr.DARK,wr.DARK_ACCENT,wr.DARK_IMAGE,jr.DARK,Js.DARK,Js.DARK_IMAGE].includes(e),vO=Ut()(st()("lessons"),zo()),CO=dt()("navigationMode",Oo.RESTRICTED),xO=Ra()(dt()("sidebarMode",Ci.HIDDEN)),bO=dt()("navigationType",Nr.SIDEBAR),Gb=dt()("navigationType",Nr.COMPACT),Ym=cs()(aO()(Ft(),"navigation"),xO,dt()("navigation",!0)),yO=({course:e,search:t,isMobile:n})=>Kn(e)?!1:(bO(e)||Gb(e)&&!!n)&&Ym(e)||t.active,SO=({course:e,isMobile:t})=>Gb(e)&&Ym(e)&&!t,uc=e=>[wr.DARK_IMAGE,wr.LIGHT_IMAGE,jr.DARK_IMAGE,jr.IMAGE,Js.DARK_IMAGE,Js.LIGHT_IMAGE].includes(e),IO=e=>[Js.DARK,Js.LIGHT].includes(e),TO=(e,t)=>{if(e===se.RISE_CLASSIC||e===se.HORIZON)switch(t){case fe.SPLIT_LEFT_IMAGE:case fe.SPLIT_RIGHT_IMAGE:case fe.TWO_THIRDS_LEFT_IMAGE:case fe.TWO_THIRDS_RIGHT_IMAGE:return!0;default:return!1}else if(e===se.APEX)switch(t){case fe.SPLIT_LEFT_IMAGE:case fe.SPLIT_RIGHT_IMAGE:return!0;default:return!1}return!1},bCe=(e,t)=>{switch(e){case Qm.RISE_CLASSIC:case Qm.APEX:case Qm.HORIZON:return t===Zm.CENTERED_OVERLAY||t===Zm.LEFT_OVERLAY||t===Zm.IMAGE;default:return!1}},Wb=e=>e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1,vs=e=>!Wb(e),cd=st(),ld=Vo(),qm=Mt(),Kb=e=>ko()(t=>xi({settings:{asLesson:cd("asLesson",t.settings)??void 0},type:t.type??null}),cd("lessonsOnly",e)??[]),LO=({course:e,courseProgress:t})=>Or()(EO(t),e?.lessonsOnly??[]),EO=e=>t=>id()(t.id==null?void 0:ld(["lessons",t.id,"isComplete"],e)),kO=({lesson:e,currentLesson:t})=>e&&dt()("id",e.id,t),NO=({course:e,lesson:t})=>dt()("id",t.id,El()(cd("lessonsOnly",e)??[])),Qb=e=>e!=null&&e.type!=="section",wO=({lesson:e,courseProgress:t})=>e?.id==null?!1:qm(!1,["lessons",e.id,"isComplete"],t),Zb=({course:e,courseProgress:t,lesson:n,restrictingQuiz:s={}})=>{const r=n?.id==null?{}:oO({courseProgress:t,lesson:{id:n.id},restrictingQuiz:s}),i=CO(e),a=i||vs(r),c=LO({course:e,courseProgress:t}),l=Qb(n)&&id()(wO({lesson:n,courseProgress:t}));return{isRestricted:a&&l&&id()(kO({lesson:n,currentLesson:c})),restrictingQuiz:r,isRestrictedCourse:i,currentLesson:c}},jO=({labels:e,restrictions:t})=>{const{lessonRestricted:n,quizRequirePassingScore:s}=e,{isRestrictedCourse:r,restrictingQuiz:i,currentLesson:a}=t,c=a&&KM()("id",i,a),l=i!=null&&typeof i=="object"?cd("title",i):void 0;return!r||r&&c?typeof l=="string"&&l?s.replace("quiz",`"${l}"`):s:n},Yb=sO()((e,t)=>ZM()(tO()(jo()(["id"],e||{})),t)),AO=({course:e,lesson:t})=>Ue()(rd(),Yb(t),Kb)(e),qb=({course:e,lesson:t})=>{if(NO({course:e,lesson:t}))return;const n=e?.lessonsOnly??[];return n[rd()(Yb(t,n))]},RO=Ue()(ps(),Kb),PO=e=>typeof e=="object"&&Object.keys(e).length>0,MO=e=>e==null||e===!1,OO=e=>MO(e?.isComplete),BO=e=>e.find(([,t])=>OO(t)),DO=e=>{const t=Object.entries(e),[n]=BO(t)||[];return n},FO=(e={},t)=>PO(e)?DO(e):t==null?void 0:String(t),Xb=(e,t,n)=>{if(!n)return{outOfAttempts:!1,quizPassed:!0};const s=ld(["lessons",n],e),r=qm(-1,["settings","retryCount"],t),i=qm(0,["retryAttempts"],s),a=ld(["passed"],s);return{outOfAttempts:ld(["isComplete"],s)&&Number(r)>-1&&Number(i)===Number(r),quizPassed:a}};function Xm(e){return e.courseProgress}function _O(e){return e.courseProgress?.currentLesson??""}function HO(e){return e.courseProgress?.percentComplete??0}const Jb=(0,Ke.Mz)(Vm,_t,(e,t)=>{const{lessons:n}=t;return Array.isArray(n)?n.find(({id:s,type:r})=>r==="quiz"&&s===e)??null:null}),VO=(0,Ke.Mz)(Xm,Jb,(e,t)=>t?Xb(e,t,t.id):null);function ey(e){const t=Xm(e);return RC()?t?.percentComplete===100:!!AC()}function wi(e){return e.courseProgress?.lessons}function ji(e,t){if(e!=null)return wi(t)?.[e]}function Vr(){return pe(Xm)}function dd(){return pe(_O)}function Ai(){return pe(HO)}function zO(){return pe(Jb)}function Jm(){const e=pe(VO);return{outOfAttempts:e?.outOfAttempts??!1,quizPassed:e?.quizPassed??!1}}function $O(){return pe(ey)}function Go(e){return pe(t=>ji(e,t))}function ud(e){const t=Go(e);if(t?.type==="blocks")return t}function hd(e){const t=Go(e);if(t?.type==="quiz")return t}const UO=(0,Ke.Mz)(wi,e=>e?Object.values(e).some(t=>t.type==="quiz"&&t.activeIndex!==void 0&&!t.isComplete):!1);function GO(){return pe(UO)}const ty=e=>e>9999?1:e,WO=({current:e,restart:t,restartValue:n})=>{const s=Number(n),r=ty(Number.isInteger(s)&&s>0?s:1),i=t?r:e+1;return ty(i)},KO=(e,t)=>{if(t.family==="divider"&&t.variant==="numbered divider"){const n=t.settings??{},s=WO({current:e.currentNumber,restart:n.restartNumbering,restartValue:n.restartNumberingValue});return{map:{...e.map,[t.id]:s},currentNumber:s}}return e},ny=e=>rw(e),md=e=>iw(e),QO=e=>aw(e),ZO=e=>!!o2(e);function zr(){return(0,Ke.Mz)(e=>e,(e,t)=>iy(t),(e,t)=>t.get(String(e)))}function Gt(e){const t=(0,u.useMemo)(()=>zr(),[]);return pe(n=>t(e,n))}function Ri(e){const t=Gt(e);return bt(t?.title)}function YO(){const e=zr();return(0,Ke.Mz)(e,t=>ny(t))}function sy(){const e=fd();return(0,Ke.Mz)(t=>t,(t,n)=>e(n),(t,n)=>zm(n),(t,n)=>sB(n),(t,n)=>oB(n),(t,n)=>wi(n),(t,n,s,r,i,a)=>{const c=a?.[t],l=a?.[n];if(t!==n&&!c?.isComplete&&c?.index>l?.index){const d=a?.[r?.id]?.index??1/0,h=s==="restricted"?l?.index??1/0:a?.[i?.id]?.index??1/0;if(c?.index>Math.min(d,h))return h<d?s==="restricted"?{type:Rr.ORDER}:{type:Rr.KNOWLEDGE_CHECK}:{type:Rr.QUIZ,data:r.title}}return null})}function Pi(e){const t=(0,u.useMemo)(()=>sy(),[]);return pe(n=>t(e,n))}function fd(){return(0,Ke.Mz)(wi,Vm,(e,t)=>FO(e,t))}function qO(){const e=(0,u.useMemo)(()=>fd(),[]);return pe(t=>e(t))}function XO(){const e=fd();return(0,Ke.Mz)(e,iy,(t,n)=>{if(t)return n.get(String(t))})}function JO(){const e=zr();return(0,Ke.Mz)(e,ji,(t,n)=>{const s=n?.percentComplete??0,r=n?.isComplete??!1,i=n?.passed??!1;return s===100&&(!r||md(t)&&!i)})}function oy(e){const t=(0,u.useMemo)(()=>JO(),[]);return pe(n=>t(e,n))}function eB(){const e=zr();return(0,Ke.Mz)(e,ji,(t,n)=>{const s=n?.percentComplete??0,r=n?.isComplete??!1,i=n?.passed??!1;return s===100&&r&&(!md(t)||i)})}function ry(e){const t=(0,u.useMemo)(()=>eB(),[]);return pe(n=>t(e,n))}const ef=(0,Ke.Mz)(_t,e=>e?.lessons??[]),iy=ub(ef),Mi=(0,Ke.Mz)(_t,e=>e?.lessonsOnly??[]),tB=(0,Ke.Mz)(Mi,e=>e.reduce((t,n,s)=>(t[n.id]=s+1,t),{}));function ay(){return pe(e=>tB(e))}const tf=(0,Ke.Mz)(Mi,e=>e.filter(t=>xi(t))),cy=(0,Ke.Mz)(tf,e=>e.length),nB=(0,Ke.Mz)(ef,e=>e.reduce((t,n)=>{const s=t[t.length-1];return ny(n)||s==null?t.push([n.id]):s.push(n.id),t},[])),sB=(0,Ke.Mz)(Mi,wi,(e,t)=>e.find(n=>md(n)&&QO(n)&&!t?.[n.id]?.isComplete)),oB=(0,Ke.Mz)(Mi,wi,(e,t)=>e.find(n=>!md(n)&&ZO(n)&&!t?.[n.id]?.isComplete));function pd(e){const t=(0,u.useMemo)(YO,[]);return pe(n=>t(e[0],n))}function nf(e){const t=(0,u.useMemo)(()=>zr(),[]),n=(0,u.useMemo)(()=>sy(),[]),s=od();return pe(r=>{const i=_t(r),a=t(e,r),c=ji(e,r),d=n(e,r)?.type!=null;return s!==Oo.RESTRICTED&&i?.markComplete&&!d&&a?.type!==Xh.QUIZ&&!0})}const gd=(e,t)=>t.findIndex(n=>n.id===e);function ly(){return(0,Ke.Mz)(e=>e,(e,t)=>Mi(t),(e,t)=>{if(e===Ka)return t[t.length-1];const s=gd(e,t)-1;return t[s]})}function dy(){return(0,Ke.Mz)(e=>e,(e,t)=>Mi(t),(e,t)=>{const s=gd(e,t)+1;return t[s]})}function uy(e){return(0,Ke.Mz)((n,s)=>e(n,s),(n,s)=>tf(s),(n,s)=>gd(n?.id||"",s)+1)}function rB(){return uy(dy())}function iB(){return uy(ly())}function aB(e){const t=(0,u.useMemo)(()=>dy(),[]);return pe(n=>t(String(e),n))}function cB(e){const t=(0,u.useMemo)(()=>rB(),[]);return pe(n=>t(String(e),n))}function lB(e){return pe(t=>{if(!e)return 0;const n=tf(t);return gd(String(e),n)+1})}function sf(){return pe(cy)}function vd(){return pe(e=>nB(e))}function dB(){const e=fd();return(0,Ke.Mz)(ey,e,Vm,(t,n,s)=>{const r=!!n,i=s!=null;return t||!r&&!i})}function uB(){const e=(0,u.useMemo)(()=>dB(),[]);return pe(t=>e(t))}function hB(){const e=le(),t=Vr();return(0,u.useMemo)(()=>{if(!e||!t||!e.lessonsOnly)return[];const n=Vb({course:e,courseProgress:t});return e.lessonsOnly.filter(s=>{const{isRestricted:r}=Zb({course:e,courseProgress:t,lesson:s,restrictingQuiz:n});return r}).map(s=>s.id)},[e,t])}const mB=e=>e?.items?.reduce?.(KO,{map:{},currentNumber:0})?.map||{},fB=e=>{const t=(0,u.useMemo)(()=>zr(),[]),n=pe(s=>t(e,s));return(0,u.useMemo)(()=>mB(n),[n])},pB=({blockId:e,lessonId:t})=>fB(t)?.[e];function gB(e){const n=le()?.lessonsOnly??[],s=n.findIndex(i=>i.id===e);return(s>=0?n[s+1]:void 0)?.id??null}function of(e){const t=Gt(e),n=le(),s=t?.settings,r=n?.lessonsOnly;return(0,u.useMemo)(()=>{const i=s?.skipToLessonId,a=i&&r?.some(c=>c.id===i)?i:void 0;return{continueType:s?.continueType??"",retryCount:Number(s?.retryCount??-1),skipLessonsIfPassed:s?.skipLessonsIfPassed??!1,skipLessonsOptional:s?.skipLessonsOptional??!0,skipToLessonId:a}},[s,r])}function vB(){return pe(ef)}function CB(e){const t=(0,u.useMemo)(()=>ly(),[]);return pe(n=>t(e,n))}function xB(e){const t=(0,u.useMemo)(()=>iB(),[]);return pe(n=>t(e,n))}function bB(){const e=(0,u.useMemo)(()=>XO(),[]);return pe(e)}function hy(){const e=bB();return bt(e?.title)}const yCe="/:mode",Cd="/lessons/:lessonId",xd="/lessons/:lessonId/:mode",yB=e=>e==="iframe"||e==="preview";function ao(){const e=(0,Be.RQ)(Cd),t=(0,Be.RQ)(xd);return(e??t)?.params.lessonId}function SB(e){return e.courseLabels}function IB(){return pe(SB)}function TB(e,t){return t?.l10n?.localeLabelSets?.[e]?.labels||t?.courseLabels?.labels}function Ce(){const{currentLocale:e}=at();return pe(t=>TB(e,t))}function LB({isCourseComplete:e,percentCourseComplete:t}){const n=Ce()??{},{courseResume:s,courseStart:r,processStartAgain:i}=n;return{courseCTALabel:e?i:t>0?s:r}}const EB=(0,u.lazy)(()=>C.e("webpack_container_remote_learn_distribution_frontend_learn_ai-learner-popout").then(C.t.bind(C,68789,23))),kB=()=>{const{currentLocale:e}=at(),t=vM(le()),n=fs(),s=GO(),r=dd(),i=Gt(ao()),a=Ce(),c=window,l=c?.growth?.getSubscription?.()?.id||t?.aiLearnerSubscriptionId||void 0,d=c?.growth?.getUser?.()?.id||(t?`learner_${t.author}`:void 0),h=hB(),m=async()=>{try{await ka()}catch{}},f=t?.aiTutorConfig?.image?.media?.image,p=pt(f)||null,g=bt(t?.aiTutorConfig?.name)??null,[v,x]=(0,u.useState)(!1),b=`rise_ai_tutor_nudge_${d}`,y=(0,u.useCallback)(()=>{localStorage.setItem(b,"1")},[b]);(0,u.useEffect)(()=>{if(localStorage.getItem(b))return;let I=null;const L=setTimeout(()=>{const E=document.getElementById("page-wrap");if(!E)return;const k=()=>{if(localStorage.getItem(b)){E.removeEventListener("scroll",k);return}const{scrollTop:N,scrollHeight:R,clientHeight:M}=E,A=R-M,j=A>0?N/A:0;A<=0||j>=.75&&(localStorage.setItem(b,"1"),x(!0),E.removeEventListener("scroll",k))};E.addEventListener("scroll",k,{passive:!0}),I=()=>E.removeEventListener("scroll",k),k()},0);return()=>{clearTimeout(L),I?.()}},[d,b,r]);const T=s||i?.type==="quiz",S=T?a?.aiTutorDisabledWhileQuiz??"AI Tutor is disabled while a quiz is in progress.":void 0;return(0,o.jsx)(EB,{aiTutorImageUrl:p,aiTutorName:g,apiKey:t.aiLearnerCourseApiKey??null,course:t,currentLessonId:r||null,currentLocale:e,disabled:T,disabledReason:S,labels:a,onOpen:y,resetSession:m,resolveAssetUrl:MC,restrictedLessonIds:h,rtl:n,scrollTriggered:v,subscriptionId:l,userId:d})},NB=()=>{const e=le(),t=$l(),n=Db(),s=Bb();return!t&&!!e?.settings?.aiTutorEnabled&&!n&&!s?(0,o.jsx)(GM,{FallbackComponent:()=>null,children:(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(kB,{})})}):null};var ht=C(30433);function wB(){return(0,o.jsxs)("svg",{"aria-label":"Articulate",height:"12",role:"img",viewBox:"0 0 67.3382 12",width:"67.3382",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{clipRule:"evenodd",d:"M11.9087 4.3645L11.7334 4.57086V3.49778H9.95996V11.7729H11.7437V7.4909C11.7437 5.86063 12.6716 4.95264 14.3626 4.91136V3.38428C13.2593 3.40491 12.4551 3.72478 11.9087 4.3645Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M41.5205 0.835693H43.3042V11.7832H41.5205V0.835693Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M4.36136 4.84943C5.84608 4.84943 6.96993 6.04633 6.96993 7.63533C6.96993 9.22432 5.84608 10.4212 4.36136 10.4212C2.89726 10.4212 1.79404 9.22432 1.79404 7.63533C1.78372 6.04633 2.89726 4.84943 4.36136 4.84943ZM0 7.63533C0 10.122 1.87652 11.9896 4.35105 11.9896C5.98012 11.9896 6.95962 10.8443 6.95962 10.8443V11.7626H8.74334V7.62501C8.74334 5.13834 6.85651 3.27075 4.35105 3.27075C1.87652 3.28107 0 5.15897 0 7.63533Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M20.4253 3.4978H22.209V11.773H20.4253V3.4978Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M22.5595 1.20722C22.5595 0.546862 22.0234 0 21.3532 0C20.6933 0 20.1675 0.536543 20.1675 1.20722C20.1675 1.86758 20.7036 2.39381 21.3532 2.39381C22.0234 2.39381 22.5595 1.86758 22.5595 1.20722Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M27.5085 10.4317C26.0444 10.4317 24.9412 9.23475 24.9412 7.64576C24.9412 6.05677 26.0444 4.85986 27.5085 4.85986C28.5602 4.85986 29.4366 5.43768 29.8593 6.40758H31.7255C31.1997 4.50904 29.5603 3.2915 27.5085 3.2915C25.0237 3.2915 23.1575 5.16941 23.1575 7.64576C23.1575 10.1324 25.0237 12 27.5085 12C29.4881 12 31.1172 10.8444 31.6843 9.03871H29.7871C29.3438 9.90543 28.4983 10.4317 27.5085 10.4317Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M60.461 6.83069L60.5022 6.70687C60.8528 5.56156 61.7911 4.85993 62.9355 4.85993C64.1006 4.85993 65.0492 5.57188 65.3997 6.70687L65.441 6.83069H60.461ZM62.9355 3.28125C60.4507 3.28125 58.5845 5.15915 58.5845 7.63551C58.5845 10.1119 60.4507 11.9898 62.9355 11.9898C64.7605 11.9898 66.2865 11.0095 66.9669 9.42055H64.977C64.4924 10.0706 63.7707 10.4214 62.9458 10.4214C61.6983 10.4214 60.6878 9.54436 60.4301 8.24428L60.4094 8.13078H65.5235H67.3072C67.3278 7.94505 67.3381 7.79028 67.3381 7.63551C67.3278 5.15915 65.441 3.28125 62.9355 3.28125Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M44.49 0.835693H52.8931V2.2596H44.49V0.835693Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M17.2549 0.703857H15.4712V8.97901C15.4712 10.6918 16.4198 11.7649 17.9457 11.7649C18.4922 11.7649 19.1521 11.6927 19.3892 11.6617V10.114C19.1624 10.145 18.6262 10.2172 18.2447 10.2172C17.688 10.2172 17.2549 9.74255 17.2549 9.13378V4.83111H19.3892V3.36594H17.2549V0.703857",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M55.8831 9.2553V4.95263H58.0174V3.49777H55.8831V0.835693H54.0994V9.11084C54.0994 10.8237 55.0479 11.8967 56.5739 11.8967C57.1204 11.8967 57.7802 11.8142 58.0174 11.7936V10.2458C57.7905 10.2768 57.2544 10.349 56.8729 10.349C56.3264 10.349 55.8831 9.87439 55.8831 9.2553Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M48.676 4.84943C50.1607 4.84943 51.2846 6.04633 51.2846 7.63533C51.2846 9.22432 50.1607 10.4212 48.676 10.4212C47.2119 10.4212 46.1087 9.22432 46.1087 7.63533C46.1087 6.04633 47.2119 4.84943 48.676 4.84943ZM44.325 7.63533C44.325 10.122 46.2015 11.9896 48.676 11.9896C50.3051 11.9896 51.2846 10.8443 51.2846 10.8443V11.7626H53.0683V7.62501C53.0683 5.13834 51.1815 3.27075 48.676 3.27075C46.1912 3.28107 44.325 5.15897 44.325 7.63533Z",fill:"currentColor",fillRule:"evenodd"}),(0,o.jsx)("path",{clipRule:"evenodd",d:"M36.3343 10.411C34.6949 10.411 34.4577 9.05928 34.4577 7.62506V3.4978H32.6843V8.06874C32.6843 10.0911 33.736 11.9793 36.1487 11.9793C37.7262 11.9793 38.5304 10.8443 38.5304 10.8443V11.7626H40.3141V3.4978H38.5304V7.58379C38.5304 9.50296 37.4169 10.411 36.3343 10.411Z",fill:"currentColor",fillRule:"evenodd"})]})}var jB=C(92238),bd=C.n(jB);const AB=["End"],RB=["Enter"],PB=["Home"],MB=["Tab"],OB=[" ","Spacebar"],BB=["Escape","Esc"],DB=["ArrowUp"],FB=["ArrowDown"],_B=["ArrowLeft"],HB=["ArrowRight"],Os=e=>t=>e.includes(t.key),VB=e=>e.altKey||e.ctrlKey||e.metaKey,zB=Os(AB),Oi=Os(RB),$B=Os(PB),yd=Os(MB),rf=Os(OB),cn=Os(BB),$r=Os(DB),Ur=Os(FB),Wo=Os(_B),Ko=Os(HB),hc=Ro()(rf,Oi),SCe=Ro()(yd,Oi),UB=Ro()(Ko,$r),GB=Ro()(Wo,Ur),WB=Ro()($r,Ur),my=yr()(hc),fy=25,KB=bd()((e,t)=>{e.scrollTop!==0&&(t.preventDefault(),e.scrollTop-=fy)}),QB=bd()((e,t,n)=>{t&&(n.preventDefault(),e.scrollTop+=fy)}),ZB=(e,t)=>n=>{const s=QB(e,t),r=KB(e);jn()([[Ur,s],[$r,r]])(n)},Sd=V("trial-badge");function YB({ctaHref:e,newTabNotice:t,tooltip:n}){const s=(0,u.useId)(),[r,i]=(0,u.useState)(!1),a=e===void 0,c=(0,u.useCallback)(l=>{l instanceof KeyboardEvent&&cn(l)&&r&&i(!1)},[r]);return(0,ht.A)("keydown",c,document),(0,o.jsxs)("div",{className:Sd("wrapper"),onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),children:[(0,o.jsxs)("a",{"aria-disabled":a||void 0,"aria-describedby":n?s:void 0,className:Sd(),href:e,onBlur:()=>i(!1),onFocus:()=>i(!0),rel:a?void 0:"noopener noreferrer",role:a?"link":void 0,tabIndex:a&&n?0:void 0,target:a?void 0:"_blank",children:[(0,o.jsx)("span",{className:Sd("powered-by"),children:"Powered by"}),(0,o.jsx)(wB,{}),!a&&t&&(0,o.jsx)("span",{className:"visually-hidden-always",children:t})]}),n&&(0,o.jsx)("span",{className:Sd("tooltip",{visible:r}),id:s,role:"tooltip",children:n})]})}const Cs={get isInstantLink(){return!!window.InstantLinks?.publicId}},qB="Purchase to remove badging and watermarks from published content",XB=()=>{switch("prod:articulate.com"){case"dev:articulate.zone":return"https://growth.dev.articulate.zone/trial/upgrade";case"stage:articulate.zone":return"https://growth.articulate.zone/trial/upgrade";case"prod:articulate.com":return"https://growth.articulate.com/trial/upgrade";default:return}},py=()=>Pl()||Cs.isInstantLink,gy=()=>{const{courseId:e,viewType:t}=window;return t==="preview"||t==null&&e!=null&&window.location.pathname===`/preview/${e}`},JB=e=>gy()||$h()||e!==void 0||py(),eD=e=>!py()&&(gy()||$h()||e!==void 0),tD=V("trial-protection");function nD({children:e,showBadge:t,tooltip:n}){const s=Ce();return t?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:tD("ai-tutor"),children:e}),(0,o.jsx)(YB,{ctaHref:XB(),newTabNotice:s?.a11yNoticeLinkNewTab,tooltip:n})]}):e}const vy=(0,u.createContext)(null);function sD({appType:e,children:t}){return(0,o.jsx)(vy.Provider,{value:e,children:t})}function oD(){const e=(0,u.useContext)(vy);if(e==null)throw new Error("useAppType must be used within an AppTypeProvider");return e}function Id(){return oD()==="author"}const af=Object.assign((0,u.createContext)(void 0),{displayName:"BlockContext"});function Wt(){return(0,u.useContext)(af)}const Cy=Object.assign((0,u.createContext)({}),{displayName:"BlockSettingsContext"});function vn(){return(0,u.useContext)(Cy)}function cf(e,t="#ffffff"){if(e==null||e.trim()==="")return null;const n=Po(e);if(n==null)return null;const s=n.alpha??1,r=Po(t),i=s<1&&r!=null?(0,Uh.jh)(r,{...n,alpha:1},s,{space:"srgb"}):n;return(0,HN.A)(i,"srgb")}function rD(e,t){const n=cf(t);if(n==null)return 1;const s=cf(e,(0,Ha.A)(n));return s==null?1:(0,FN.A)(s,n,"WCAG21")}const xs=e=>e==null?ke.DARK:rD("#fff",e)>=4.5?ke.LIGHT:ke.DARK,lf=(0,u.createContext)(null);lf.displayName="CourseContext";const df=(0,u.createContext)(!1);df.displayName="PresentationContext";function iD({children:e,course:t,courseProgress:n,labels:s,labelsLocale:r,lessons:i,partnerContent:a,search:c}){const l=(0,u.useMemo)(()=>({course:t,courseProgress:n,labels:s,labelsLocale:r,lessons:i,partnerContent:a}),[t,n,s,r,i,a]);return(0,o.jsx)(lf.Provider,{value:l,children:(0,o.jsx)(gM,{search:c,children:(0,o.jsx)(df.Provider,{value:Fr(t),children:e})})})}function Td(){return(0,u.useContext)(lf)}function Cn(){return(0,u.useContext)(df)}function Ve(){return Td()?.course}function xy(){return Oe(Ve()?.title)}function Kt(){const{labels:e}=Td()??{};return e}function by(e){const s=Ve()?.theme?.accentContrast;return typeof s!="string"?ke.LIGHT:s===ke.AUTO?xs(e):s}function mc(){const e=Ve();return e?.theme?.colorAccent??e?.color}function Ld(){const{currentLocale:e}=at(),t=td(),n=Ve();return n?Fm({course:n,locales:t,locale:e}):!1}function ICe(){const{lessons:e}=Td();return e}const aD={text:{backgroundType:"blockTextBackgroundType",backgroundColor:"blockTextBackgroundColor",backgroundColorContrast:"blockTextBackgroundColorContrast",paddingStart:"blockTextPaddingStart",paddingEnd:"blockTextPaddingEnd",bodyFontSize:"blockTextBodyFontSize",headingFontSize:"blockTextHeadingFontSize",subheadingFontSize:"blockTextSubheadingFontSize"},continue:{completionType:"blockContinueCompletionType",label:"blockContinueLabel",completeHint:"blockContinueCompleteHint"}},TCe=null;function cD(e,t){if(!e||!t)return null;const n=aD[e];if(!n)return null;const s=r=>r?t[r]:void 0;return{backgroundType:s(n.backgroundType),backgroundColor:s(n.backgroundColor),backgroundColorContrast:s(n.backgroundColorContrast),paddingStart:s(n.paddingStart),paddingEnd:s(n.paddingEnd),bodyFontSize:s(n.bodyFontSize),headingFontSize:s(n.headingFontSize),subheadingFontSize:s(n.subheadingFontSize),completionType:s(n.completionType),label:s(n.label),completeHint:s(n.completeHint)}}function Qo(){const e=Wt(),t=Ve(),n=e?.family,s=t?.theme;return(0,u.useMemo)(()=>cD(n,s),[n,s])}var lD=C(83490),dD=C.n(lD);const Bs=(e,t)=>{const n=Po(t);return n==null?null:(0,Ha.A)((0,Uh.jh)(n,Po("#000000"),e),{format:"hex",collapse:!1})};function uD(e){if(e==null)return 0;const t=cf(e);return t==null?0:(0,_N.J1)(t)}const Tt=Ct({NEAR_BLACK:null,DARK:null,MED:null,LIGHT:null}),Bi=e=>{const t=uD(e);return t<=.01?Tt.NEAR_BLACK:t<=.05?Tt.DARK:t<=.35?Tt.MED:Tt.LIGHT},hD=e=>{switch(Bi(e)){case Tt.NEAR_BLACK:return ds(.1,e);case Tt.DARK:return Bs(.4,e);case Tt.MED:return Bs(.2,e);case Tt.LIGHT:return ds(.3,e)}};var mD,fD,pD,uf,yy,Zo;const Sy=2,LCe=(e,t,n)=>e??t??n,Iy=(e,t,n,s)=>e??t??n??s,Qn=Ct({WHITE:null,TRANSPARENT:null}),gD={markerColorContrast:ke.AUTO,paddingBottom:3,paddingLinked:!0,paddingTop:3,snippetColorContrast:ke.AUTO},vD={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 CD(e,t){return vD[e]?.includes(t)??!1}const xD={360:{storyline:"#fafafa"},impact:{c:"#ececec",d:"#f5f5f5"},"interactive-fullscreen":{process:"#f5f5f5",sorting:"#f5f5f5",timeline:"#f5f5f5"},quote:{d:"#f5f5f5"}};function hf(e,t){const n=xD[e]?.[t];return n==null?{}:{backgroundColor:n,backgroundType:re.COLOR}}const bD=null;function ECe(e,t){return bD[e]?.includes(t)??!1?.1:.5}function yD(e){switch(e.backgroundType){case re.COLOR:return e.backgroundColor;case re.ACCENT:return e.courseColor;case re.TINT:return Gh(e.courseColor);case re.LIGHT:return"#ffffff";case re.GRAY:return"#fafafa";case re.DARK:return"#303030";case re.BLACK:return"#000000"}}const SD={multimedia:{embed(e){return{cardMode:e.showBorder===!1?Qn.TRANSPARENT:Qn.WHITE}}}};function ID(e,t,n){return TD(e,t,n)}function TD(e,t,n){const s=hf(e,t);if(n.v==null||n.v<Sy){n=LD(n);const l=s.backgroundColor,d=n.backgroundColor?.toLowerCase(),h=l!=null&&d===l.toLowerCase(),m=l==null&&d==="#ffffff";d&&(h||m)&&(n=dD()("backgroundColor",n))}const r=SD[e]?.[t]?.(n),i=n.backgroundColor&&n.backgroundType==null?{backgroundType:re.COLOR}:{};return[{accentColor:null},gD,r,n,i,{v:Sy}].reduce((l,d)=>d==null?l:{...l,...gC()(Wb,d)},{})}function LD(e){return{...e,backgroundType:null,cardMode:null,v:1}}const ED=null;function kCe(e,t){return!ED[e]?.includes(t)}const kD=null;function NCe(e,t){return!kD[e]?.includes(t)}function ND(e){return e===pD.LIGHT?Zo.LIGHT:Zo.DARK}function wD(e,t){if(t===uf.AUTO){if(!e)return Zo.DARK;const n=mD(e);return fD(n)===uf.DARK?Zo.DARK:Zo.LIGHT}else return t===uf.LIGHT?Zo.LIGHT:Zo.DARK}function wCe(e,t,n,s,r){const i=e?.backgroundType;return e?.cardMode===Qn.TRANSPARENT?i===yy.IMAGE?ND(t?.overlayColor):s&&i!==yy.ACCENT?r:wD(n,e?.customBackgroundColorContrast):s?r:Zo.DARK}const jD=null;function jCe(e,t){return jD[e]?.includes(t)??!1}const AD=new RegExp(/^#([a-f0-9]{8}|[a-f0-9]{6}|[a-f0-9]{3})$/,"i"),mf=(e,t)=>t!=null&&AD.test(t)?t:e;function Qt(e){const{contrast:t=ke.AUTO,backgroundColor:n="#fff"}=e,s=mf("#fff",n),r=xs(s);return t===ke.DARK||t===ke.AUTO&&r===ke.DARK?Pt.DARK:Pt.LIGHT}const RD=e=>e.blockBackgroundType??e.familyBackgroundType??e.courseBackgroundType??e.blockTypeFallbackType??re.LIGHT,PD=e=>e.effectiveBackgroundType===re.COLOR?e.blockBackgroundColor||e.familyBackgroundColor||e.courseBackgroundColor||e.blockTypeFallbackColor||null:e.settingsBackgroundColor??null,MD=e=>e.blockCustomContrast??e.familyBackgroundColorContrast??e.courseBackgroundColorContrast??ke.AUTO,Ty=e=>{const{family:t,variant:n,customBackgroundColorContrast:s}=e;return!s&&(t==="image"&&n!=="text aside"||t==="chart"||n==="sorting")},OD=e=>{const{backgroundType:t,backgroundColor:n,accentColor:s,customBackgroundColorContrast:r,accentContrast:i,family:a,variant:c}=e;if(!(t===re.ACCENT||t===re.COLOR))return null;const d=t===re.ACCENT?s:n;let h;return t===re.ACCENT?h=i:Ty({family:a,variant:c,customBackgroundColorContrast:r})?h=xs(n):h=r??ke.DARK,Qt({backgroundColor:d??void 0,contrast:h})},BD=e=>OD(e)===Pt.LIGHT,DD=e=>{const t=e.blockBackgroundType!=null||e.familyBackgroundType!=null||e.courseBackgroundType!=null,n=e.blockCustomContrast!=null||e.familyBackgroundColorContrast!=null||e.courseBackgroundColorContrast!=null;return!t&&!n},FD=e=>{const{backgroundColor:t,family:n,variant:s,blockCustomContrast:r,familyBackgroundColorContrast:i,courseBackgroundColorContrast:a}=e,c=r??i??a??ke.AUTO,d=Ty({family:n,variant:s,customBackgroundColorContrast:c})?xs(t):c;return Qt({backgroundColor:t??void 0,contrast:d})};function Zn(){const e=Ve(),t=Qo(),n=vn(),s=Wt(),r=s?hf(s.family,s.variant):{};return RD({blockBackgroundType:n?.backgroundType,familyBackgroundType:t?.backgroundType,courseBackgroundType:e?.theme?.blockBackgroundType,blockTypeFallbackType:r.backgroundType})}var Ly=C(49860);const _D="settings";function ff(e){return t=>{const n=Ly.forwardRef((s,r)=>{const i=vn(),a={...s,[e??_D]:i};return(0,o.jsx)(t,{...a,ref:r})});return n.displayName=`withBlockSettings(${t.displayName||t.name})`,n}}function Rn(){const e=Ve(),t=vn(),n=Qo(),s=Zn(),r=Wt();if(t==null)return null;const i=r?hf(r.family,r.variant):{},a=PD({effectiveBackgroundType:s,blockBackgroundColor:t.backgroundColor,familyBackgroundColor:n?.backgroundColor,courseBackgroundColor:e?.theme?.blockBackgroundColor,blockTypeFallbackColor:i.backgroundColor,settingsBackgroundColor:t.backgroundColor}),c={...t,backgroundType:s,backgroundColor:a};return yD(c)}const HD="backgroundColor";function VD(e){return t=>{const n=Ly.forwardRef((s,r)=>{const i=Rn(),a={...s,[e??HD]:i};return(0,o.jsx)(t,{ref:r,...a})});return n.displayName=`withBackgroundColor(${t.displayName||t.name})`,n}}function pf({children:e,...t}){const n=Wt(),s=vn(),r=mc(),i=(0,u.useMemo)(()=>{const a=n==null?t:ID(n.family,n.variant,t);return{courseColor:r,...s,...a}},[n,t,r,s]);return(0,o.jsx)(Cy.Provider,{value:i,children:e})}var Ey,zD;const ACe=null;function $D({children:e,course:t}){const n=(0,u.use)(Ei),s=(0,u.useMemo)(()=>n.l10n==null?n:{l10n:{...n.l10n,localeSelectorOptions:void 0,showLocaleSelector:!1}},[n]);return e}function RCe(e){return Ey(e)?"slide":"element"}function PCe(e){return Ey(e)?"slide":zD(e)?"video":"block"}var Ed=C(49860);const gt=V("curtain"),UD={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."},GD=({children:e,labels:t,loadingText:n,runtimeFetchError:s,showHeader:r,status:i})=>{const a={...UD,...t},[c,l]=Ed.useState(!1),d=()=>l(!0),h=Ed.useRef(null);return Ed.useEffect(()=>(h.current=setTimeout(d,1e4),()=>{h.current&&clearTimeout(h.current)}),[]),Ed.useEffect(()=>{if(i==="error"){const m=new Error("There was a socket connection error. The renderReconnect curtain was displayed");EE.yf.logger.info(m.message,m)}},[i]),i==="deliveryBlocked"?(0,o.jsx)("div",{className:gt("container",{"show-header":r}),children:e}):i==="runtimeFetchError"?(0,o.jsx)("div",{className:gt("container",{"show-header":r}),children:(0,o.jsx)("div",{className:gt(),children:(0,o.jsx)("div",{className:gt("title"),children:s})})}):i==="fatalError"?(0,o.jsx)(KD,{labelCurtainSomethingWrong:a.curtainSomethingWrong,labelCurtainSomethingWrongRefresh:a.curtainSomethingWrongRefresh,labelCurtainSomethingWrongTryAgain:a.curtainSomethingWrongTryAgain,showHeader:r}):i==="error"&&c?(0,o.jsx)(ZD,{labelCurtainSessionTimedOut:a.curtainSessionTimedOut,labelCurtainSessionTimedOutRefresh:a.curtainSessionTimedOutRefresh,labelCurtainSessionTimedOutRestart:a.curtainSessionTimedOutRestart,showHeader:r}):i==="error"?(0,o.jsx)(QD,{labelCurtainOffline:a.curtainOffline,labelCurtainOfflineReconnecting:a.curtainOfflineReconnecting,showHeader:r}):(0,o.jsx)(WD,{labelCurtainLoading:a.curtainLoading,showHeader:r,text:n})},ky=()=>window.location.reload(),WD=({labelCurtainLoading:e,showHeader:t,text:n})=>(0,o.jsx)("div",{className:gt("container",{"show-header":t}),children:(0,o.jsxs)("div",{className:gt(),children:[(0,o.jsx)("div",{className:gt("spinner")}),(0,o.jsx)("div",{className:gt("text"),children:n||e})]})}),KD=({labelCurtainSomethingWrong:e,labelCurtainSomethingWrongRefresh:t,labelCurtainSomethingWrongTryAgain:n,showHeader:s})=>(0,o.jsx)("div",{className:gt("container",{"show-header":s}),children:(0,o.jsxs)("div",{className:gt(),children:[(0,o.jsx)("div",{className:gt("title"),children:e}),(0,o.jsx)("div",{className:gt("description"),children:n}),(0,o.jsx)("button",{className:gt("button"),onClick:ky,type:"button",children:t})]})}),QD=({labelCurtainOffline:e,labelCurtainOfflineReconnecting:t,showHeader:n})=>(0,o.jsx)("div",{className:gt("container",{"show-header":n}),children:(0,o.jsxs)("div",{className:gt(),children:[(0,o.jsx)("div",{className:gt("spinner",{reconnect:!0})}),(0,o.jsx)("div",{className:gt("title"),children:e}),(0,o.jsx)("div",{className:gt("description"),children:t})]})}),ZD=({labelCurtainSessionTimedOut:e,labelCurtainSessionTimedOutRefresh:t,labelCurtainSessionTimedOutRestart:n,showHeader:s})=>(0,o.jsx)("div",{className:gt("container",{"show-header":s}),children:(0,o.jsxs)("div",{className:gt(),children:[(0,o.jsx)("div",{className:gt("title"),children:e}),(0,o.jsx)("div",{className:gt("description"),children:n}),(0,o.jsx)("button",{className:gt("button"),onClick:ky,type:"button",children:t})]})}),gf=GD,MCe=null;function YD({children:e}){return e}var Ny=C(1368),qD=C(99979),XD=C(52872),JD=C(8099),eF=C(15995),tF=C(24899),nF=C(91961),sF=C(31072),oF=C(97730),rF=C(7145),iF=C(44383),aF=C(56143),cF=C(53183),lF=C(78001),dF=C(52546),uF=C(2972),hF=C(13392),mF=C(50408),fF=C(70552),pF=C(70720),gF=C(12544),vF=C(92873),CF=C(24945),xF=C(6918),bF=C(17518),yF=C(25532),SF=C(70836),IF=C(56303),TF=C(29415),LF=C(25130),EF=C(21606),kF=C(4893),NF=C(66343),wF=C(53119),jF=C(70482),AF=C(46584),RF=C(83867),PF=C(71265),MF=C(35082),OF=C(17745),BF=C(74499),DF=C(57186),FF=C(83644),_F=C(6556),HF=C(92584),VF=C(65421),zF=C(23721),$F=C(46832),UF=C(167),GF=C(89067),WF=C(48482),KF=C(58543),QF=C(65607),ZF=C(12476),YF=C(59319),qF=C(3370),XF=C(11373),JF=C(3273),e_=C(35520),t_=C(5491),n_=C(81009),s_=C(47073),wy=C(16625),o_=C(59099),r_=C(23572),i_=C(73574),a_=C(12409),c_=C(11198),l_=C(47083),d_=C(38150),u_=C(8495),h_=C(85754),m_=C(93706),f_=C(32085),p_=C(60441),g_=C(83045),v_=C(99419),C_=C(90698),x_=C(83704),b_=C(486),y_=C(60100),S_=C(47855),I_=C(64713),T_=C(43151),L_=C(14190),E_=C(98876),k_=C(7252),N_=C(18631),w_=C(81755),j_=C(12277),A_=C(52126),R_=C(31076),P_=C(64089),M_=C(80538),O_=C(63126),B_=C(93257),D_=C(49467),F_=C(33988),__=C(15792),H_=C(24129),V_=C(83656),z_=C(82837),$_=C(51119),U_=C(62983),G_=C(34340),jy=C(36274),W_=C(86546),K_=C(88379),Q_=C(67199),Z_=C(41252),Y_=C(61005),q_=C(56242),X_=C(28529),J_=C(76835),eH=C(63389),tH=C(17410),nH=C(78623),sH=C(76062),oH=C(96826),rH=C(95906),iH=C(39261),aH=C(2522),cH=C(51455),lH=C(83388),dH=C(87754),uH=C(33111),hH=C(23140),mH=C(17477),fH=C(44915),pH=C(34663),gH=C(94340),vH=C(27266),CH=C(19751),xH=C(86558),bH=C(6636),yH=C(6322),SH=C(40855),IH=C(50101),TH=C(38993),LH=C(74125),EH=C(11122),kH=C(89729),NH=C(22249),wH=C(71260),jH=C(92544),AH=C(31172),RH=C(50995),PH=C(90657),MH=C(21971),OH=C(13603),BH=C(66865),DH=C(52064),FH=C(46358),_H=C(57371),HH=C(94579),VH=C(93044),zH=C(76368),$H=C(24862),UH=C(88987),GH=C(16992),WH=C(59828),KH=C(1673),QH=C(28294),ZH=C(96930),YH=C(28251),Ay=C(10473),qH=C(67203),XH=C(5888),JH=C(75562),eV=C(77466),tV=C(70340),nV=C(19818),sV=C(57395),oV=C(75815),rV=C(49539),iV=C(59964),aV=C(34589),cV=C(46976),lV=C(4251),dV=C(33445),uV=C(97062),hV=C(81438),mV=C(58708),fV=C(37420),pV=C(85036),gV=C(38159),vV=C(67331),CV=C(74792),xV=C(43537),bV=C(86883),yV=C(6899),SV=C(11020),IV=C(82761),TV=C(38033),LV=C(10523),EV=C(80224),kV=C(94905),NV=C(88234),wV=C(51680);const jV={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"]},AV={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"]]},RV={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"]},PV={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"]},MV={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"]},OV={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"]},BV={prefix:"far",iconName:"arrow-turn-left-up",icon:[512,512,[],"e7ed","M7.1 145c-9.4-9.4-9.4-24.6 0-33.9L127.1-9c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L82 104 324 104c103.8 0 188 84.2 188 188S427.8 480 324 480l-236 0-2.5-.1C73.5 478.6 64 468.4 64 456s9.4-22.6 21.5-23.9l2.5-.1 236 0c77.3 0 140-62.7 140-140S401.3 152 324 152l-242.1 0 79 79 1.7 1.8c7.7 9.4 7.1 23.3-1.7 32.1s-22.7 9.3-32.1 1.7l-1.8-1.7-120-120z"]},DV={"alert-circle-solid":h_.lE,"alert-circle":jy.lE,"alert-diamond":aH.xG,"angle-right":x_.vm,"arrow-down-from-line":y_.xZ,"arrow-down-to-bracket":S_.a_,"arrow-down-to-line":I_.yH,"arrow-down":b_.B0,"arrow-left":T_.Ce,"arrow-right-from-line":E_.Pe,"arrow-right":L_.dm,"arrow-rotate-left-light":uF.V3,"arrow-rotate-left":k_.V3,"arrow-up-from-bracket":w_.MN,"arrow-up-from-line":j_.s8,"arrow-up-right-from-square":A_.faArrowUpRightFromSquare,"arrow-up-right-from-square-solid":d_.Ju,"arrow-up":N_.IN,"arrows-two-from-center":qD.A1,"arrows-two-to-center":XD.hL,"badge-check":MF.Zs,"bar-chart":R_.X8,bars:OF.ck,"bars-regular":P_.ck,"block-selector":p_.iH,bolt:wH.zm,"book-open":O_.Re,"book-sparkles":B_.E4,book:M_.LB,"browser-light":tF.c9,browser:D_.c9,building:JD.UR,"building-regular":eF.UR,"cards-blank":F_.Xm,"caret-down":FF.xB,"caret-right":_F.fU,"chart-column":PF.q9,"check-regular":v_.e6,check:BF.e6,"chevron-down-solid":HF.Jt,"chevron-down":__.Jt,"chevron-left-light":nF.Wz,"chevron-left-solid":zF.Wz,"chevron-left":H_.Wz,"chevron-right-light":sF.Xk,"chevron-right-solid":$F.Xk,"chevron-right":V_.Xk,"chevron-up-solid":VF.w2,"chevron-up":z_.w2,"circle-arrow-right":WF.Ni,"circle-arrow-up":GF.yi,"circle-check-regular":U_.QR,"circle-check-solid":KF.QR,"circle-check":IF.QR,"circle-dot":G_.pp,"circle-half-stroke":W_.B2,"circle-exclamation":jy.lE,"circle-info":K_.faCircleInfo,"circle-notch":Y_.s4,"circle-plus-duotone":TF.q_,"circle-plus-regular":Q_.q_,"circle-plus":QF.q_,"circle-small-solid":ZF.ZP,"circle-small":Z_.ZP,"circle-solid":UF.GE,"circle-x":YF.Ub,"circle-xmark":q_.bn,"circle-xmark-solid":qF.bn,"circle-xmark-duotone":LF.bn,circle:$_.GE,"clipboard-list-check":X_.S3,"clock-rotate-left":J_.Yj,clone:tH.$3,close:nH.yY,"closed-captioning":eH.UM,"code-fork-duotone":EF.zt,"code-fork-regular":sH.zt,code:NV.jT,comment:oH.DN,"comment-solid":DF.DN,compass:jH.Q9,copy:rH.jP,crop:iH.K1,"edit-regular":cH.MT,"ellipsis-regular":lH.Dw,"ellipsis-vertical-regular":dH.nx,envelope:uH.y_,"external-link":hH.vM,"eye-slash":rF.k6,eye:oF.pS,"face-anguished":hF.xX,"face-anguished-regular":mF.xX,"face-frown":fF.Ho,"face-frown-regular":pF.Ho,"face-grin-regular":gF.pj,"face-laugh":vF.ou,"face-laugh-regular":CF.ou,"face-meh":xF.Lz,"face-meh-regular":bF.Lz,"face-smile":yF.H8,"face-smile-regular":SF.H8,"file-audio":fH.qe,"file-duotone":kF.A4,"file-export-light":aF.o1,"file-export":pH.o1,"file-import":gH.$M,"file-lines":vH.bL,"file-pdf-light":iF.O_,"file-pdf":CH.O_,file:mH.A4,"folder-image":xH.JK,"folder-open":NF.Uj,gear:bH.BH,globe:yH.Bw,"graduation-cap":SH.eS,"grid-2":IH.Qy,"grid-solid":XF.Qy,"grip-dots-vertical":TH.IM,"hand-pointer":LH.A8,"image-landscape":kH.oC,"image-portrait":NH.E4,image:EH.jb,"photo-film":PH._Z,"info-circle":MH.iW,language:JF.mh,"layers-solid":u_.qI,"link-simple-slash":DH.r2,"link-simple":BH.wi,"link-slash":FH.TH,link:OH.CQ,lightbulb:AH.rC,list:_H.IT,"list-check":HH.UN,"location-dot":lF.gK,"lock-keyhole-light":cF.Yp,lock:e_.DW,"magnifying-glass-plus":zH.bM,"magnifying-glass":VH.$U,megaphone:f_.OR,"message-quote":$H.ps,"minus-solid":t_.EZ,minus:UH.EZ,paintbrush:wF.ue,palette:GH.fy,paste:WH.R9,pause:KH.G1,"pause-solid":n_.G1,"pen-line":QH.pg,"pen-nib":YH.us,"pen-to-square":ZH.faPenToSquare,"pencil-duotone":jF.zL,"pencil-regular":C_.zL,"pencil-thin":wV.zL,pencil:dF.zL,"play-regular":Ay.ij,"play-solid":s_.ij,play:Ay.ij,"flag-solid":wy.s6,flag:wy.s6,"plus-regular":qH.QL,plus:XH.TS,"quote-left":JH.$7,"rectangle-history-circle-plus":tV.Hu,"rectangle-regular":eV.vt,"rectangle-vertical-history":nV.Lt,rocket:sV.KM,"ruler-horizontal":oV.Si,"ruler-triangle":rV.cb,"sliders-simple":o_.AD,"sparkles-solid":r_.p7,sparkles:iV.p7,"spinner-third":aV.sq,star:RH.yy,"square-arrow-down":lV.Y1,"square-arrow-right":dV.mT,"square-arrow-up-right":uV.fL,"square-check-solid":i_.Dn,"square-check":hV.Dn,"square-duo":AF.Nf,"square-info":mV.Lg,"square-plus":fV.Vd,square:cV.Nf,"stopwatch-regular":pV.nw,table:gV.w9,tag:vV._2,text:CV.jw,"trash-can":bV.sj,trash:xV.yL,"triangle-exclamation":m_.JA,"user-group":a_.US,"users-regular":yV.gd,users:RF.gd,video:SV.n2,volume:IV.eF,volumeHigh:TV.AI,volumeLow:LV.gN,volumeXmark:EV.H_,"wand-magic-sparkles":kV.Ys,"waveform-lines":g_.Wx,xmark:c_.Jy,"xmark-large":l_.S2},FV={"arrow-u-turn-up-left":BV,"audio-plus":RV,"clone-plus":PV,"flask-outline":MV,language:OV,reach:AV,"rise-com":jV},ce=(0,u.memo)(function({"aria-label":t,className:n,classNameIcon:s,color:r,"data-testid":i,name:a,rotation:c,spin:l,style:d,styleIcon:h}){return(0,o.jsx)("span",{className:n,"data-testid":i,style:{color:r,...d},children:(0,o.jsx)(Ny.g,{"aria-label":t,className:s,icon:DV[a],rotation:c,spin:l,style:h})})}),OCe=(0,u.memo)(function({className:t,classNameIcon:n,color:s,name:r,style:i,styleIcon:a}){return(0,o.jsx)("span",{className:t,style:{color:s,...i},children:(0,o.jsx)(Ny.g,{className:n,icon:FV[r],style:a})})}),_V=({value:e,fallback:t})=>{const n=Oe(e),s=Ot(e);return t?(0,o.jsx)("span",{"data-l10n-id":s,children:n||t}):(0,o.jsx)("span",{"data-l10n-id":s,children:n})};function HV({value:e,children:t}){const n=Oe(e);return t(n)}const Pn=_V,Ry=new Intl.DisplayNames(["en"],{type:"language",fallback:"code"}),VV=(e,t)=>{const n=e?.toLowerCase();try{return t?.[n]?.authorDisplayName??Ry.of(e)}catch(s){return console.warn(`Language ${e} invalid`,s),e}},zV=(e,t)=>{try{return t?.[e]?.learnerDisplayName??Ry.of(e)}catch(n){return console.warn(`Language ${e} invalid`,n),e}},vf=()=>{const e=ki(),t=jm(e);return(0,u.useCallback)(s=>VV(s,t),[t])},$V=()=>{const e=ki(),t=jm(e);return(0,u.useCallback)(s=>zV(s,t),[t])};var UV=C(42663);function xn(e){const{to:t,children:n}=e,s=(0,Be.zy)(),r=(0,u.useMemo)(()=>Th(t,s),[s,t]);return(0,o.jsx)(Be.N_,{...e,to:r,children:n})}function GV({children:e,locale:t,...n}){const s=(0,Be.zy)(),r=Hn(),i=(0,u.useMemo)(()=>{const a=t===r?"":t,c=new URLSearchParams(s.search);return c.set("locale",a),s.pathname+"?"+c.toString()+s.hash},[r,t,s]);return(0,o.jsx)(xn,{...n,to:i,children:e})}const bs=V("locales-dropdown"),WV=({backToStackCourseId:e,currentLocale:t,defaultLocale:n,disabledTooltip:s,isBcd:r,isDisabled:i,locales:a,message:c,onChange:l,optionType:d,renderLocaleBadge:h,showMessageIndicator:m})=>{const f=(0,u.useRef)(null),p=(0,u.useRef)(null),[g,v]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!1),y=g&&!i,T=(0,u.useMemo)(()=>a.filter(N=>N.localeCode!==n),[n,a]),S=(0,u.useMemo)(()=>a.find(N=>N.localeCode===n),[n,a]),I=(0,u.useMemo)(()=>a.find(N=>N.localeCode===t),[t,a]);(0,u.useLayoutEffect)(()=>{y&&x&&(f.current?.querySelector(`[data-locale="${t}"]`)?.focus(),b(!1))},[y,x,t]),(0,u.useEffect)(()=>{const N=R=>{cn(R)&&(p.current?.focus(),v(!1)),yd(R)&&setTimeout(()=>{f.current.contains(document.activeElement)||v(!1)},0)};return y&&document.addEventListener("keydown",N),()=>{document.removeEventListener("keydown",N)}},[y]);const L=(0,u.useCallback)(N=>{i||(!y&&document.activeElement===N.currentTarget&&b(!0),v(!y))},[i,y]),E=(0,u.useCallback)(N=>{y&&!p.current?.contains(N?.target)&&v(!1)},[y]);(0,UV.A)(f,E),(0,u.useEffect)(()=>{const N=()=>setTimeout(()=>{document.activeElement.tagName==="IFRAME"&&E()},0);return window.addEventListener("blur",N),()=>window.removeEventListener("blur",N)},[E]);const k=(0,u.useCallback)(N=>{document.activeElement===N.currentTarget&&p.current?.focus(),v(!1),l?.(N.currentTarget.getAttribute("data-locale"))},[l]);return(0,o.jsxs)("div",{className:bs({isBcd:r,isDisabled:i,isOpen:y}),children:[(0,o.jsx)("div",{className:bs("trigger-wrap"),children:(0,o.jsxs)("button",{"aria-disabled":i,className:bs("trigger"),onClick:L,ref:p,title:i?s:void 0,type:"button",children:[r&&m?(0,o.jsx)(ce,{className:bs("warning-icon"),name:"triangle-exclamation"}):(0,o.jsxs)(o.Fragment,{children:[m&&(0,o.jsx)("div",{className:bs("message-indicator")}),(0,o.jsx)(ce,{name:"globe"})]}),I.displayName,(0,o.jsx)(ce,{name:"chevron-down"})]})}),(0,o.jsxs)("div",{className:bs("contents"),ref:f,children:[c,(0,o.jsx)("div",{className:bs("grouping-header"),children:"Source language"}),(0,o.jsx)(Py,{checked:n===t,locale:S,onClick:k,renderLocaleBadge:h,type:d}),(0,o.jsx)("div",{className:bs("grouping-header"),children:"Translations"}),T.map(N=>(0,o.jsx)(Py,{checked:N.localeCode===t,locale:N,onClick:k,renderLocaleBadge:h,type:d},N.localeCode)),e&&(0,o.jsx)("a",{className:bs("stack-button"),href:`/manage/locales/${e}`,children:"Back to Stack"})]})]})},Py=({checked:e,locale:t,onClick:n,renderLocaleBadge:s,type:r})=>r==="link"?(0,o.jsxs)(GV,{className:bs("option",{checked:e}),"data-locale":t.localeCode,locale:t.localeCode,onClick:n,children:[s?.(t.localeCode,e),t.displayName]},t.localeCode):(0,o.jsxs)("button",{className:bs("option",{checked:e}),"data-locale":t.localeCode,onClick:n,type:"button",children:[s?.(t.localeCode,e),t.displayName]},t.localeCode),KV=({hideBackToStack:e,isBcd:t,...n})=>{const s=Ve(),{currentLocale:r}=at(),i=td(),a=Hn(),c=vf(),l=!e&&!t?s?.id:void 0,d=(0,u.useMemo)(()=>i.map(h=>({localeCode:h.locale,displayName:c(h.locale)})),[c,i]);return(0,o.jsx)(WV,{backToStackCourseId:l,currentLocale:r,defaultLocale:a,isBcd:t,locales:d,optionType:"link",...n})},My=window.location.origin,QV=1e3,ZV="course:ready",Oy="localizedSharePreview:ready",YV="preview:selectLocale",Cf="localizedSharePreview:toggleCurtain",By="localizedSharePreview:togglePreview",ys=V("localized-share-preview"),Di=!!window.frameElement,Dy=e=>(0,an.HX)(e)&&Pl(),Fy=e=>Dy(e)&&!Di,qV=(e,t)=>window.parent?.postMessage({type:e,data:t});let _y=null;const XV=({children:e,localesDropdown:t,title:n})=>(0,o.jsxs)("div",{className:ys("header"),dir:"ltr",children:[(0,o.jsxs)("div",{className:ys("header-title-dropdowns"),children:[(0,o.jsx)("div",{className:ys("header-title"),children:(0,o.jsx)("span",{className:ys("header-title-text"),children:(0,o.jsx)(Pn,{value:n})})}),t&&(0,o.jsx)("div",{className:ys("header-dropdowns"),children:t})]}),(0,o.jsx)("div",{className:ys("header-btn-group"),children:e})]}),JV=({children:e,className:t,disabled:n=!1,onClick:s})=>(0,o.jsx)("button",{className:["button button--default button--header-done",t,n?"button--disabled":void 0].filter(Boolean).join(" "),disabled:n,onClick:s,style:{fontSize:"1.4rem",fontWeight:600,letterSpacing:0,textTransform:"none"},type:"button",children:e}),ez=({children:e})=>{const t=it(),n=hn(),s=(0,Be.zy)(),{currentLocale:r,setCurrentLocale:i}=at(),a=Hn(),c=TM(),l=le(),h=!!(l&&"hasPassword"in l?l.hasPassword:void 0)||PC(),m=(0,u.useRef)(null),[f,p]=(0,u.useState)(!1),[g,v]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!h),y=(0,u.useMemo)(()=>{const j=new URLSearchParams(window.location.search),P=new URLSearchParams;for(const D of["from"])j.has(D)&&P.set(D,j.get(D));const w=P.toString();return`${My}/share/${window.shareId}${w?`?${w}`:""}#/?locale=${r}`},[]),[T,S]=(0,u.useState)(null),[I,L]=(0,u.useState)(r),[E,k]=(0,u.useState)(!1),[N,R]=(0,u.useState)(!Di),M=(j,P)=>m.current?.contentWindow.postMessage({type:j,data:P});(0,u.useEffect)(()=>{Di||M(YV,r)},[r]),(0,u.useEffect)(()=>{Di&&(qV(Oy),setTimeout(()=>k(!0),0))},[]),(0,u.useEffect)(()=>{const j=P=>{if(P.origin!==My)return;const D=P.data?.type,O=P.data?.data;if(Di)switch(D){case Cf:{R(O);break}case By:{O?(L(r),S(s),t(hm(!0)),i(a),n("/",{replace:!0})):(t(hm(!1)),i(I),n(T.pathname+T.search+T.hash||"/",{replace:!0})),document.querySelector(".cover")?.scrollTo(0,0),document.querySelector(".page-wrap")?.scrollTo(0,0);break}}else switch(D){case ZV:{R(!1);break}case Oy:{b(!0);break}}};return window.addEventListener("message",j),()=>{window.removeEventListener("message",j)}},[a,t,n,r,s,I,T,i]);const A=(0,u.useCallback)(()=>{const j=!f;clearTimeout(_y),v(!0),M(Cf,!0),_y=setTimeout(()=>{v(!1),M(Cf,!1),p(j)},QV),setTimeout(()=>{M(By,j)},0)},[f]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:ys("curtain",{hide:!N}),children:(0,o.jsx)(gf,{status:"loading"})}),Di?E&&e:(0,o.jsxs)("div",{className:ys(),children:[x&&(0,o.jsx)(XV,{localesDropdown:!f&&!g&&(0,o.jsx)(KV,{hideBackToStack:!0}),title:c,children:(0,o.jsx)(JV,{className:ys("preview-button"),disabled:g,onClick:A,children:f?"Close Learner Preview":(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ce,{className:ys("preview-button-icon"),name:"play-regular"}),"Preview as Learner"]})})}),(0,o.jsx)("iframe",{allowFullScreen:!0,"aria-label":"Course preview",className:ys("iframe"),ref:m,src:y})]})]})},tz=(0,u.lazy)(()=>C.e("_b106").then(C.t.bind(C,63744,23))),nz=({children:e})=>{const t=le(),{setCurrentLocale:n,currentLocale:s}=at(),r=Oe(t?.title),i=ki()?.l10n?.languageCodeMetadata??{},a=Object.entries(i).map(([c,l])=>({code:c,learnerDisplayName:l.learnerDisplayName})).sort((c,l)=>c.learnerDisplayName.localeCompare(l.learnerDisplayName));return(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(tz,{courseTitle:r,currentLocale:s,locales:a,setCurrentLocale:n,children:e})})};function sz({children:e}){const t=le();return t&&Dy(t)?(0,o.jsx)(ez,{children:e}):Cs.isInstantLink?(0,o.jsx)(nz,{children:e}):(0,o.jsx)(o.Fragment,{children:e})}const xf=(0,u.createContext)(void 0);xf.displayName="RiseComPartnerTrackingContext";function oz({children:e,onTrack:t}){return(0,o.jsx)(xf.Provider,{value:t,children:e})}function Hy(){return(0,u.useContext)(xf)}var rz=C(76351),iz=C.n(rz),az=C(20152),cz=C.n(az);class co{static get isChrome(){return!window||!window.navigator?!1:/Chrome/.test(window.navigator.userAgent)&&/Google Inc/.test(window.navigator.vendor)}static get isSafari(){return!window||!window.navigator?!1:/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor)&&!/CriOS/.test(window.navigator.userAgent)}static get isIphoneSafari(){if(!window||!window.navigator)return!1;const t=/iPhone|iPod/.test(window.navigator.userAgent)&&!window.MSStream,n=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),s=/CriOS/.test(window.navigator.userAgent);return t&&n&&!s}static get isSafari9(){if(!window||!window.navigator)return!1;const t=/Safari/.test(window.navigator.userAgent)&&/Apple Computer/.test(window.navigator.vendor),n=/version\/9./i.test(window.navigator.userAgent);return t&&n}static get isIe11(){return!!(window&&Object.hasOwnProperty.call(window,"ActiveXObject")&&!window.ActiveXObject)}static get isEdge(){return!window||!window.navigator?!1:/Edge/.test(window.navigator.userAgent)}static get isMobile(){return!window||!window.navigator?!1:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}static get isLocalFilesystem(){return!window||!window.navigator?!1:/file:/.test(window.location.protocol)}static get isFirefox(){return window?.navigator?.userAgent.includes("Firefox")??!1}static get isBrave(){return globalThis?.navigator?typeof globalThis.navigator.brave?.isBrave=="function":!1}static get isChromium(){if(!globalThis?.navigator)return!1;const t=globalThis.navigator.userAgentData?.brands;return t?.length?t.some(({brand:n})=>/Chromium/i.test(n)):/Chrome|CriOS/.test(globalThis.navigator.userAgent)}static get isGoogleChrome(){if(!globalThis?.navigator||this.isBrave)return!1;const t=globalThis.navigator.userAgentData?.brands;if(t?.length)return t.some(({brand:i})=>/Google Chrome/i.test(i));const{userAgent:n,vendor:s}=globalThis.navigator,r=/Edg\/|OPR\/|SamsungBrowser|Vivaldi|Brave/.test(n);return/Chrome/.test(n)&&/Google Inc/.test(s)&&!r}}const lz=ch()(Rs()),Vy=e=>t=>`${e}/${t.id}`,dz=(e,t)=>Jv()({data:(0,me.action)(t),method:"POST",url:pk(lz(`/${t}`),st()("url"),e),...jo()(["headers","withCredentials"],e)}),uz=e=>(t,n)=>Vv()(t,Vy(n),bf(e,n)),hz=e=>Ut()(Mt()({},["response","data"]),Ma()(st()("type"),(0,me.error)(e))),mz=(e,t)=>n=>e.postRequest?e.postRequest(t,n):n,zy=e=>t=>n=>s=>Eh(s,dz(t,n),e,Lh()(hz(n),yr()(ja()("data"),st()("data"))),cz()(cs()(st()("error"),gr().Rejected,gr().of)),mz(t,{type:n,payload:s})),fz=({url:e,method:t,data:n,headers:s})=>{if(co.isFirefox){const r=new Blob([JSON.stringify(n)],{type:"application/json"}),i=window.navigator.sendBeacon(e,r);return Promise.resolve({type:n.type,payload:{...n.payload,queued:i}})}return fetch(e,{method:t,credentials:"include",headers:{"Content-Type":"application/json",...s},body:JSON.stringify(n),keepalive:!0}).then(r=>r.json()).then(gi()("data"))},pz=gr().fromPromise(fz),bf=mm()(3,zy(Ba)),gz=mm()(3,zy(pz)),vz=e=>(t,n)=>iz()(t,Vy(n),bf(e,n)),Cz=e=>({debounce:uz(e),send:bf(e),fetchWithKeepAlive:gz(e),throttle:vz(e)}),xz=`${Ae("RISE_RUNTIME_URI")}/ducks`,bz=Cz({headers:()=>({"x-rise-authoring-client":"258500d4e22ef1ef26f32126acba15864ee5850d"}),postRequest:(e,t)=>t,url:xz,withCredentials:!0});var yz=C(17077),Sz=C.n(yz);const HCe=Sz()({context:{app:{name:"rise-frontend"}},payload:{articulate_user:OL(),userRole:FL(),subId:_L(),subPlan:HL(),subStatus:VL()}}),Iz=Rs()("rise/track/")("TRACK");var zCe;const Tz=e=>({...e,context:{locale:navigator.language,device:Kv(),channel:Gv(),userAgentData:Wv(),page:Qv(),userAgent:Zv(),...e.context}}),Lz=(e,t)=>({...e,properties:{...Uv(t),...e.properties}}),$y=e=>(t,n)=>{const s=n(),r=ph();let i=Tz(e);return i=Lz(i,s),i.userId=i.userId??r,i.author=i.author??r,t(bz.send(Iz)(i))};function Ez({children:e}){const t=it(),n=(0,u.useCallback)(s=>t($y(s)),[t]);return(0,o.jsx)(oz,{onTrack:n,children:e})}var kd=C(49860);const Uy=kd.createContext({typefaces:[]});function kz({addTypefaces:e,children:t,typefaces:n=[]}){Nz(n);const s=kd.useMemo(()=>({addTypefaces:e,typefaces:n}),[e,n]);return(0,o.jsx)(Uy.Provider,{value:s,children:t})}function $Ce(){return kd.useContext(Uy)}function Nz(e){kd.useEffect(()=>{const t=new CSSStyleSheet;for(const n of e){const s=`[data-rise-typeface-id="${CSS.escape(n.id)}"] { font-family: "${CSS.escape(n.name)}"; }`;t.insertRule(s)}return t.insertRule('[data-rise-typeface-id="@@heading@@"] { font-family: var(--font-family-head); }'),t.insertRule('[data-rise-typeface-id="@@body@@"] { font-family: var(--font-family-body); }'),document.adoptedStyleSheets=[...document.adoptedStyleSheets,t],()=>{document.adoptedStyleSheets=document.adoptedStyleSheets.filter(n=>n!==t)}},[e])}function wz(e){return e.fonts}function Gy(){return pe(wz)}var jz=C(49860);function Az({children:e}){const t=Gy(),n=jz.useMemo(()=>{const s=new Map;for(const r of t)s.set(r.id,{id:String(r.id),name:r.name,default:r.default});return Array.from(s.values())},[t]);return(0,o.jsx)(kz,{typefaces:n,children:e})}var Wy;const Ky={},Rz={"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-assistant-chat-l-10-n":!1,"ai-use-conversation-harness":!1,"ai-assistant-redistribution":!1,"experiment-business-creator-role":!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,"universal-credits-ga":!1,"growth-release-articuland-onboarding":!1},yf=(0,u.createContext)(Ky);yf.displayName="FeatureFlagsContext";const{Provider:Pz}=yf;function Mz({children:e,value:t}){const n=(0,u.useMemo)(()=>({...Rz,...t,...Ky}),[t]);return(0,o.jsx)(Pz,{value:n,children:e})}function Sf(){return(0,u.useContext)(yf)}function Nd(e){return Sf()[e]}function UCe(e){function t(n){const s=Sf();return Wy(e,{...n,flags:s})}return t.displayName=`withFeatureFlags(${e.displayName||e.name})`,t}function GCe(e,t){return function(n){const s=r=>{const i=Nd(e),a={...r,[t]:i};return Wy(n,{...a})};return s.displayName=`withFeatureFlag(${n.displayName||n.name})`,s}}const Qy=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});Qy.displayName="On";const Zy=({children:e})=>(0,o.jsx)(o.Fragment,{children:e});Zy.displayName="Off";const wd=({children:e,featureFlags:t})=>{const n=Sf(),s=(0,u.useMemo)(()=>{const a=[].concat(t??[]);return a.length&&a.every(c=>n[c])},[t,n]),{on:r=null,off:i=null}=(0,u.useMemo)(()=>{const a={};return u.Children.forEach(e,c=>{switch(c.type.displayName){case wd.On.displayName:a.on=c;break;case wd.Off.displayName:a.off=c;break;default:a.on=e}}),a},[e]);return s?r:i};wd.On=Qy,wd.Off=Zy;function Oz(){return Nd(Hl)===!0&&$l()?(0,o.jsx)(Bz,{}):null}function Bz(){const e=it(),{search:t}=(0,Be.zy)(),n=!!new URLSearchParams(t).get("locale"),s=(0,u.useRef)(n);return(0,u.useEffect)(()=>{s.current!==n&&(s.current=n,e(UR()))},[e,n]),null}const lo=({id:e="portal",childType:t="other",attributes:n}={})=>{const s=document.querySelector('dialog[open][aria-modal="true"]');let r,i;if(s!=null&&t!=="dialog"?(e=`${e}-dialog`,r=s.querySelector(`#${e}`),i=s):(r=document.querySelector(`#${e}`),i=document.body),r==null&&(r=document.createElement("div"),r.setAttribute("id",e),i.appendChild(r)),n)for(const[a,c]of Object.entries(n))r.setAttribute(a,c);return r},Yy=lo();function Dz(e){e?e.appendChild(Yy):document.body.appendChild(Yy)}const qy=se.RISE_CLASSIC;function Xy(e){switch(e){case se.RISE_CLASSIC:case se.APEX:case se.HORIZON:return e;default:return qy}}const If=(0,u.createContext)(qy);If.displayName="ThemeIdContext";function Fz({children:e,themeId:t}){return(0,o.jsx)(If,{value:t,children:e})}function Lt(){return(0,u.useContext)(If)}function _z(){const e=le();return{accentContrast:e.theme?.accentContrast,bodyTypeface:e.bodyTypeface,color:e.color,headingTypeface:e.headingTypeface,isLegacyCourse:e.isLegacyCourse,uiTypeface:e.uiTypeface}}function Jy(e){return e.deliveryPolicy}function Hz(){const e=hn(),t=(0,Be.zy)(),n=(0,u.useRef)(e),s=(0,u.useRef)(new Set),r=(0,u.useRef)(window.location.href),i=(0,u.useRef)(null);n.current=e,i.current==null&&(i.current={push:(...a)=>n.current(...a),replace:a=>n.current(a,{replace:!0}),go:a=>n.current(a),goBack:()=>n.current(-1),goForward:()=>n.current(1),listen:a=>(s.current.add(a),()=>{s.current.delete(a)}),location:t}),(0,u.useEffect)(()=>{i.current&&xN(i.current)},[]),(0,u.useEffect)(()=>{if(!i.current)return;i.current.location=t,s.current.forEach(l=>l(t));const a=r.current,c=window.location.href;r.current=c,window.dispatchEvent(new HashChangeEvent("hashchange",{oldURL:a,newURL:c}))},[t])}const Vz=e=>e.startsWith("#")?e:`#${e}`,Yo=e=>{const t=Po(Vz(e));if(t==null)return null;const[n,s,r]=t.coords;return[Math.round((n??0)*255),Math.round((s??0)*255),Math.round((r??0)*255),t.alpha??1]};var zz=C(75152),Bt=C.n(zz),$z=C(30349),Uz=C.n($z);const Gz=Ma()(Gm()(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i),Fe()("#FFF")),Wz=Zs()({color:Gz}),Kz=({accentContrast:e,bodyTypeface:t,color:n,headingTypeface:s,isLegacyCourse:r,uiTypeface:i})=>{const a=(0,u.useMemo)(()=>{const d=xs(n),h=e??d;return!r&&(h===ke.DARK||h===ke.AUTO&&d===ke.DARK)?[Pt.DARK,Pt.LIGHT]:[Pt.LIGHT,Pt.DARK]},[e,n,r]),[c,l]=a;return(0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:Uz()({bodyTypeface:t,colorThemeRGB:Yo(n)?.slice(0,3),colorTheme:n,colorThemeContrast:c,colorThemeContrastComplementary:l,colorThemeContrastComplementaryRGB:Yo(l)?.slice(0,3),colorThemeContrastRGB:Yo(c)?.slice(0,3),colorThemeTint:Gh(n),colorThemeTransparent:n+"1A",headingTypeface:s,uiTypeface:i})}})},Tf=Ue()(Kz,Wz);Tf.displayName="Branding",Tf.propTypes={bodyTypeface:Bt().string,color:Bt().string.isRequired,headingTypeface:Bt().string,uiTypeface:Bt().string};const Qz=(0,u.memo)(Tf),Zz=e=>e?`${e} | ${tv}`:tv,fc=e=>Ea()?e:Zz(e);function Gr({active:e=!0,children:t,title:n,isExplicit:s=!1}){const r=fc(xy());return(0,o.jsxs)(o.Fragment,{children:[e&&(0,o.jsx)("title",{children:n??r},s?"explicit":"default"),t]})}const Lf=V("not-found"),jd=()=>(0,o.jsx)(Gr,{title:fc(),children:(0,o.jsx)("div",{className:Lf(),children:(0,o.jsxs)("div",{className:Lf("copy"),children:[(0,o.jsx)("h1",{className:Lf("copy",{heading:!0}),tabIndex:-1,children:"Hmm..."}),(0,o.jsx)("div",{children:"We can't seem to find the page you're looking for."})]})})}),QCe=null,Zt=V("expired-trial-paywall"),Yz="https://www.articulate.com/360/pricing/",qz="https://www.articulate.com/about/contact-us/",Xz="https://www.articulate.com/360/",Jz=["Create with the right format for every training need","Turn scripts into polished, presenter-led videos without a studio","Translate, validate, and manage training in 80+ languages","Track engagement, get insights, manage integrations and branding, and more"],e$=["Turn content into trackable training kits that stay current","Share instantly in the tools you use, then track engagement in real time","Turn scripts into polished, presenter-led videos without a studio","Translate into 80+ languages across different formats"];function t$({trialType:e}){const t=e==="business-creator",n=t?e$:Jz;return(0,o.jsxs)("div",{className:Zt({frontline:t}),children:[null,(0,o.jsxs)("div",{className:Zt("card"),children:[(0,o.jsxs)("div",{className:Zt("intro"),children:[(0,o.jsx)("div",{className:Zt("artwork"),children:(0,o.jsx)(n$,{})}),(0,o.jsx)("h1",{className:Zt("heading"),children:"Your free trial is over"})]}),(0,o.jsxs)("div",{className:Zt("features"),children:[(0,o.jsx)("p",{className:Zt("features-intro"),children:"Regain access to the #1 AI-powered platform for workplace learning:"}),(0,o.jsx)("ul",{className:Zt("feature-list"),children:n.map(s=>(0,o.jsxs)("li",{className:Zt("feature"),children:[(0,o.jsx)(ce,{className:Zt("feature-icon"),name:"check"}),(0,o.jsx)("span",{children:s})]},s))}),(0,o.jsxs)("a",{className:Zt("view-everything"),href:Xz,rel:"noopener noreferrer",target:"_blank",children:["View everything included",(0,o.jsx)("span",{className:Zt("new-tab-note"),children:" (opens in a new tab)"})]})]}),(0,o.jsxs)("div",{className:Zt("actions"),children:[(0,o.jsxs)("a",{className:Zt("unlock"),href:Yz,rel:"noopener noreferrer",target:"_blank",children:["Regain access",(0,o.jsx)("span",{className:Zt("new-tab-note"),children:" (opens in a new tab)"})]}),(0,o.jsxs)("a",{className:Zt("contact-sales"),href:qz,rel:"noopener noreferrer",target:"_blank",children:["Talk to sales",(0,o.jsx)("span",{className:Zt("new-tab-note"),children:" (opens in a new tab)"})]})]})]})]})}const n$=()=>(0,o.jsxs)("svg",{"aria-hidden":"true",className:Zt("artwork-svg"),fill:"none",focusable:"false",viewBox:"0 0 122.886 81.1564",children:[(0,o.jsx)("path",{d:"M95.4683 38.6182L122.308 30.2861M99.4669 53.605L112.981 59.8411M89.0065 23.3298L99.467 9.31273M27.4176 38.6183L0.578357 30.2861M23.4187 53.6049L9.90456 59.841M29.5004 19.9423L17.7933 10.7519M90.0716 36.4268H35.2705V80.5782H90.0716V36.4268Z",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.15641"}),(0,o.jsx)("path",{d:"M44.3597 36.0031V18.6226C44.3597 8.67302 52.4546 0.578203 62.4042 0.578203C72.3537 0.578203 80.4486 8.67302 80.4486 18.6226V36.4268M69.8633 36.4268V18.6186C69.8633 14.5068 66.516 11.1594 62.4042 11.1594C58.2924 11.1594 54.945 14.5068 54.945 18.6186V35.9991",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.15641"}),(0,o.jsx)("path",{d:"M62.4037 62.2108C67.6431 62.2108 71.8906 57.9634 71.8906 52.7239C71.8906 47.4845 67.6431 43.2371 62.4037 43.2371C57.1642 43.2371 52.9168 47.4845 52.9168 52.7239C52.9168 57.9634 57.1642 62.2108 62.4037 62.2108Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M68.4711 73.9748H56.3329L59.2739 57.5638H65.5301L68.4711 73.9748Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M35.0015 47.3288H40.6099M35.0015 54.8483H40.6099M35.0015 62.3639H40.6099M35.0015 69.8833H40.6099M84.1941 47.3288H89.8025M84.1942 54.8483H89.8026M84.1942 62.3639H89.8026M84.1942 69.8833H89.8026",stroke:"black",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.15641"})]});var e3,t3,Ad;const n3=(0,u.createContext)({enabled:!0,isActive:!1,onAuthorized:()=>{},onError:()=>{},onSubmitPassword:()=>{},onUnauthorized:()=>{},status:"authorized"});let ZCe;function YCe(){}function s$(){return(0,u.useContext)(n3)}function o$({children:e}){if(!Cs.isInstantLink)return(0,o.jsx)(o.Fragment,{children:e});const t=void 0;return t==null?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(t,{children:e})})}function qCe({children:e,PasswordGate:t}){const n=window.InstantLinks?.isPasswordProtected?.()===!0,[s,r]=t3(),[i,a]=t3(n?"required":"authorized"),c=Ad(()=>{a("authorized")},[]),l=Ad(()=>{a("error")},[]),d=Ad(f=>{r(f),a("validating")},[]),h=Ad(()=>{a("unauthorized")},[]),m=i==="authorized"||i==="validating";return e3(t,{onSubmitPassword:d,status:i,children:e3(n3.Provider,{value:{enabled:m,isActive:!0,onAuthorized:c,onError:l,onSubmitPassword:d,onUnauthorized:h,password:s,status:i},children:e})})}function r$(e){return e.partnerContent}function i$(){return pe(r$)}function s3(e){return e?.partnerContent?.content??[]}function Ef(){return pe(s3)}const o3=(0,Ke.Mz)(e=>_t(e)?.selectedAuthorId,s3,(e,t)=>t.find(n=>n.id===e)),a$=(0,Ke.Mz)(e=>_t(e)?.partnerContentId,o3,(e,t)=>e?t:void 0);function c$(){return pe(o3)}function pc(){return pe(a$)}function l$(){const e=c$();return(0,u.useMemo)(()=>e?.data?.authors??null,[e])}function d$(){return Ef()?.[0]?.data?.authors}function u$(e,t){const n=sd(),{currentLocale:s}=at(),r=s&&n?.localeLabelSets?.[s]?.labels||e,i=s&&n?.localeLabelSets?.[s]!=null?s:t;return{labels:r,labelsLocale:i}}function h$({children:e}){const t=le(),n=Vr(),{labels:s,iso639Code:r}=IB(),i=i$(),a=Ho(),c=t?.locale??r,{labels:l,labelsLocale:d}=u$(s,c);return(0,o.jsx)(iD,{course:t,courseProgress:n,labels:l,labelsLocale:d,partnerContent:i,search:a,children:e})}var m$=C(19560);function f$({children:e,l10n:t}){const n=(0,u.useMemo)(()=>({l10n:t==null?null:(0,m$.omit)(["locales","defaultLocale"],t)}),[t]),s=t?.locales,r=t?.defaultLocale,i=t?.localeSelectorOptions,a=t?.languageCodeMetadata,c=(0,u.useMemo)(()=>s==null||r==null?{l10n:null}:{l10n:{locales:s,defaultLocale:r,localeSelectorOptions:i,languageCodeMetadata:a}},[s,r,i,a]);return(0,o.jsx)(Ei.Provider,{value:n,children:(0,o.jsx)(Hm.Provider,{value:c,children:e})})}function r3(e,t=window.location){const{defaultLocale:n,locales:s}=e??{};let r=new URLSearchParams(t.search).get("locale");if(r==null&&t.hash){const c=(0,Be.Rr)(t.hash.slice(1));r=new URLSearchParams(c.search).get("locale")}const i=new URL(window.location.href);return i.pathname.startsWith("/view-pdf/")&&(r=i.searchParams.get("locale")),s?.find(c=>c.locale===r)?.locale||n}function p$({defaultLocale:e,locales:t}){const n=hn(),s=(0,Be.zy)(),r=(0,u.useRef)(s);r.current=s;const i=(0,u.useMemo)(()=>r3({defaultLocale:e,locales:t},s),[e,t,s]),a=(0,u.useCallback)((c,l="replace")=>{const d=r.current,h=c===e?"":c,m=new URLSearchParams(d.search);m.set("locale",h);const f=d.pathname+"?"+m.toString()+d.hash;l==="push"?n(f):n(f,{replace:!0})},[e,n]);return{currentLocale:i,setCurrentLocale:a}}const kf=e=>e===window.location.origin||e==="articulate.com"||e.endsWith(".articulate.com");function g$(e,t){const n=le(),s=sd(),r=pe(l=>l.courseLabels.iso639Code),i=n?.locale??r,a=s?.locales;(0,u.useEffect)(()=>{document.documentElement.lang=e??i??""},[e,i]),(0,u.useEffect)(()=>{n&&Fm({course:n,locales:a,locale:e})?document.documentElement.dir="rtl":document.documentElement.dir=""},[n,a,e]);const c=(0,u.useCallback)(l=>{if(!kf(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 v$({children:e}){const t=sd(),{currentLocale:n,setCurrentLocale:s}=p$({defaultLocale:t?.defaultLocale,locales:t?.locales});return g$(n,s),(0,o.jsx)(f$,{l10n:t,children:(0,o.jsx)(fM,{currentLocale:n,setCurrentLocale:s,children:e})})}function C$(e){const t=e?.exportSettings?.webExportSettings,n=e?.exportSettings?.exportType==="raw",s=e?.exportSettings?.exportType==="lms";return!!(n&&t?.disableCoverPage||s&&e?.lmsOptions?.disableCoverPage)}function i3(e){return!Cs.isInstantLink&&C$(e)}function x$(e){return Bm(e)||io(e)||Fr(e)||_r(e)?!0:i3(e)}function a3(e){return e?.lessonsOnly?.[0]?.id==null?!0:!(Kn(e)?x$(e):i3(e))}const c3=(0,u.createContext)({translationHoveredPath:null});function b$(){return(0,u.use)(c3)}const y$=c3.Provider,S$=()=>window.parent!==window&&_j()&&dm().length>0,l3=e=>{for(const t of dm())window.parent.postMessage(e,t)};function I$(e){const t=S$(),[n,s]=(0,u.useState)(()=>({settled:!t,policy:void 0,timedOut:!1})),r=(0,u.useRef)(void 0),i=(0,u.useRef)(0),a=(0,u.useCallback)((c,l=!1)=>{s(d=>d.settled?d:{settled:!0,policy:c,timedOut:l})},[]);return(0,u.useEffect)(()=>{if(t)return l3({type:wj,version:1}),i.current=Date.now(),r.current=window.setTimeout(()=>{a(Aj(),!0)},2e3),()=>clearTimeout(r.current)},[t,a]),(0,u.useEffect)(()=>{n.settled&&clearTimeout(r.current)},[n.settled]),(0,u.useEffect)(()=>{n.timedOut&&l3({type:jj,version:1,waitedMs:Date.now()-i.current})},[n.timedOut]),(0,u.useEffect)(()=>{if(!t)return;const c=Fj(e);c&&a(c)},[t,e,a]),(0,u.useMemo)(()=>({settled:n.settled,policy:n.policy}),[n.settled,n.policy])}const d3="focus-lesson-content",XCe="preview-nav-to-first-lesson",JCe="preview-nav-to-cover-page",Je="preview-nav-to-lesson-item",Nf="preview-nav-to-slide",e2e="preview-scroll-to-nav-prev",t2e="preview-scroll-to-header",wf="preview-clear-state",Rd="preview-show-nav-prev",Pd="preview-show-nav-next",u3="preview-nav-open",h3="preview-nav-close",Md="preview-focus-video-chapter",jf="preview-seek-video",Od="preview-focus-video-checkpoint",m3="event-lesson-nav-prev-visible",Af="event-lesson-nav-prev-hidden",f3="event-lesson-nav-next-visible",Rf="event-lesson-nav-next-hidden",qo="block-search-reveal-item",T$=8,[p3,g3,L$]=[2,3,6],E$=[[0,"l10n"],[1,"translations"],[4,"video"],[5,"chapters"],[7,"title"]],k$=e=>{if(e?.length!==T$)return null;const t=E$.every(([r,i])=>e[r]===i),n=e[g3],s=e[L$];return!t||typeof e[p3]!="string"||typeof n!="string"||typeof s!="number"?null:{l10nId:n,chapterIndex:s}},N$=11,w$=9,j$=[[0,"l10n"],[1,"translations"],[4,"video"],[5,"captions"],[7,"vtt"],[8,"cues"],[10,"riseHtml"]],A$=e=>{if(e?.length!==N$)return null;const t=j$.every(([r,i])=>e[r]===i),n=e[g3],s=e[w$];return!t||typeof e[p3]!="string"||typeof n!="string"||typeof s!="number"?null:{l10nId:n,cueIndex:s}},R$=9,[P$,M$,O$,B$]=[1,3,5,8],D$=[[0,"lessons"],[2,"items"],[4,"items"],[6,"media"],[7,"chapters"]],Bd=e=>{if(typeof e=="string"||typeof e=="number")return String(e);if(We(e)){const{id:t}=e;if(typeof t=="string"||typeof t=="number")return String(t)}return null},F$=e=>{if(e?.length!==R$||!D$.every(([c,l])=>e[c]===l))return null;const n=Bd(e[P$]),s=Bd(e[M$]),r=Bd(e[O$]),i=Bd(e[B$]);if(n==null||s==null||r==null)return null;const a=i==null?Number.NaN:Number(i);return!Number.isInteger(a)||a<0?null:{lessonId:n,blockId:s,itemId:r,chapterIndex:a}},Pf=(e,t)=>{if(!Array.isArray(e))return null;const s=e.find(r=>We(r)&&(typeof r.id=="string"||typeof r.id=="number")&&String(r.id)===t);return We(s)?s:null},_$=(e,t)=>{const n=Pf(e,t.lessonId),s=Pf(n?.items,t.blockId),r=Pf(s?.items,t.itemId);if(!We(r?.media))return null;const{l10nId:i}=r.media;return typeof i=="string"?i:null},Mf="data-change-path",Of="data-l10n-id",v3=(e,t)=>{if(e)return t?["l10n","translations",t,e.getAttribute(Of)]:JSON.parse(e.getAttribute(Mf))};let uo;const H$=()=>{const e=_i();e&&e.classList.add("selected")};let Fi=null;const Dd=()=>{Fi==null&&(Fi=requestAnimationFrame(()=>{Fi=null,_i()&&uo&&gc(uo)}))},V$=()=>{Fi!=null&&(cancelAnimationFrame(Fi),Fi=null)},z$=(e,t)=>n=>{const s=document.elementsFromPoint(n.clientX,n.clientY),r=t?s.find(i=>i.getAttribute(Of)):s.find(i=>i.getAttribute(Mf));r!=null&&(e&&uo!==r&&(uo=r,e(v3(r,t))),gc(r))},$$=(e,t)=>n=>{n.stopPropagation(),n.preventDefault();const s=document.elementsFromPoint(n.clientX,n.clientY),r=t?s.find(i=>i.getAttribute(Of)):s.find(i=>i.getAttribute(Mf));if(r){gc(r),C3();const i=v3(r,t);i&&(e(i),H$())}},Fd=()=>document.getElementById("target-container"),_i=()=>document.getElementById("target-highlight"),Bf=()=>{if(Fd())return;const t=document.createElement("div");t.classList.add("target-container"),t.id="target-container",document.body.appendChild(t);const n=document.createElement("div");n.classList.add("target-highlight"),n.id="target-highlight",t.appendChild(n)},C3=()=>{const e=_i();e&&e.classList.add("selected")},U$=({top:e,left:t,width:n,height:s})=>{const r=document.querySelector("[data-page=true]")?.getBoundingClientRect().width??window.innerWidth-20;return n<r&&(e=e-10,s=s+20,t=t-20,n=n+40),{top:e,left:t,width:n,height:s}},G$=e=>{Bf();const t=Fd();if(!t)return;const n=e.closest?.("dialog[open]")??document.body;t.parentElement!==n&&n.appendChild(t)},gc=e=>{const{top:t,left:n,width:s,height:r}=U$(e.getBoundingClientRect());G$(e);const i=_i();i&&(e!==uo&&i.classList.contains("selected")&&i.classList.remove("selected"),i.classList.add("active"),Object.assign(i.style,{top:`${t}px`,left:`${n}px`,width:`${s}px`,height:`${r}px`}),uo=e)},W$=()=>{window.removeEventListener("scroll",Dd,{capture:!0}),Ff()},Df=()=>{_i()?.classList?.remove("active"),_i()?.classList?.remove("selected")},Ff=()=>{V$(),Df(),uo=null};let Hi,_d;const K$=({locale:e})=>({isActive:t},n)=>{const s=!!Fd();if(t){if(Hi)return Hi;Bf();const r=z$(n,e);let i;return Hi=new Promise((a,c)=>{i=$$(a,e),_d=c,document.body.classList.add("target-mode"),window.addEventListener("mousemove",r,!0),window.addEventListener("click",i,!0),window.addEventListener("resize",Df,!0),window.addEventListener("scroll",Dd,!0)}).finally(()=>{Hi=null,_d=null,document.body.classList.remove("target-mode"),window.removeEventListener("mousemove",r,!0),window.removeEventListener("click",i,!0),window.removeEventListener("resize",Df,!0),window.removeEventListener("scroll",Dd,!0)}),Hi}else Ff(),Fd()?.remove();return s&&_d!=null&&_d(new Error("cancelled")),Promise.resolve()},Q$=e=>{let t=e.findIndex(n=>n==="items");return t===-1?e:e.slice(0,t+2)},Z$=e=>document.querySelector(`[data-transcript-l10n-id='${e}']`),Y$=(e,t,n)=>{const s=Array.from(e.querySelectorAll("[data-cue-start-ms]")),r=c=>Number(c.getAttribute("data-cue-start-ms"));if(typeof t!="number"||!Number.isFinite(t))return s.find(c=>(c.getAttribute("data-cue-indexes")??"").split(" ").includes(String(n)))??null;const i=t*1e3;return s.find(c=>i>=r(c)&&i<Number(c.getAttribute("data-cue-end-ms")))??s.findLast(c=>r(c)<=i)??s[0]??null},q$=e=>e?.hasAttribute?.("data-cue-start-ms"),x3=(e,{time:t}={})=>{const n=A$(e);if(n){const r=Z$(n.l10nId);if(r)return Y$(r,t,n.cueIndex)}const s=(0,Eo.Ce)(e);return s?s.type==="translation"||s.type==="caption"&&s.l10nId?document.querySelector(`[data-l10n-id='${s.l10nId}']`)??document.querySelector(`[data-l10n-id*='${s.l10nId}']`):document.querySelector(`[data-change-path='${JSON.stringify(Q$(e))}']`):null},X$=(e,t)=>{Bf(),window.addEventListener("scroll",Dd,{capture:!0}),document.body.classList.add("target-mode");const n=x3(e,t);if(!n){Ff();return}q$(n)&&n.scrollIntoView({block:"nearest"}),gc(n)},b3=(e,t)=>{if(!Hi)return!1;const n=x3(e,t);return n?(uo!==n&&(uo=n),gc(n),C3(),n.scrollIntoView({behavior:"smooth",block:"center"}),!0):!1},J$=e=>["course",e],y3=(e,t)=>["lessons",{id:e},t],eU=(e,t)=>[...y3(e,"items"),{id:t}],Vi=e=>JSON.stringify(J$(e)),S3=(e,t)=>JSON.stringify(y3(e,t)),tU=(e,t)=>JSON.stringify(eU(e,t)),Mn={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"},zi=(e,t)=>{const n={};for(let s=0;s<e.length;s++){const r=e[s];if(typeof r=="object"&&r.id){const i=e[s-1],a=i==="items"?t.shift():i.replace(/s$/,"");n[`${a??"item"}Id`]=r.id}}return n},nU=e=>{const t=(0,Eo.Ce)(e);return t!=null&&typeof t=="object"&&"itemId"in t?t.itemId:void 0},I3=e=>e==null?!1:(window.dispatchEvent(new CustomEvent(Od,{detail:{blockId:String(e)}})),!0),sU=()=>{window.dispatchEvent(new CustomEvent(Od,{detail:{blockId:null}}))},oU=10,T3=(e,t=0)=>{t>=oU||requestAnimationFrame(()=>{b3(e)||T3(e,t+1)})},rU=new Set(["preview:lessonUpdate","preview:navigate","preview:seek","preview:scrollto","preview:showLessonNavNext","preview:showLessonNavPrev","preview:themeUpdate","preview:update","preview:navOpen","preview:navClose","preview:replace","preview:changeset","preview:selectLocale",lm,Mn.FOCUS,Mn.TOGGLE,Mn.CLEAR,Mn.TRANSLATION_HOVERED,Mn.TRANSLATION_HOVER_CLEAR]),iU=(e,t)=>!(e==="firstLesson"&&t.includes("/lessons/"))&&!(e==="cover"&&(t==="/"||t==="/preview"));function aU({course:e,fonts:t,l10n:n}){let s=!1;return U2(t,()=>{s||(gn(Vw({course:e,fonts:t,l10n:n})),window.parent.postMessage({type:"preview:themeUpdateComplete"},window.location.origin))}),{cancel(){s=!0}}}function cU(){let e=[],t=0;return n=>{clearTimeout(t);for(const s of n)e.push(s);t=window.setTimeout(()=>{const s=e;e=[],gn($w(s))},15)}}function lU(){const e=hn(),t=(0,Be.zy)(),n=pe(T=>T.course),[s,r]=(0,u.useState)(""),[i,a]=(0,u.useState)({translationHoveredPath:null}),[c,l]=(0,u.useState)(!1),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(void 0),p=(0,u.useRef)(e);p.current=e;const g=(0,u.useRef)(t);g.current=t;const v=(0,u.useRef)(n);v.current=n;const x=(0,u.useRef)(null),b=(0,u.useRef)(cU()),y=(0,u.useRef)(t);return(0,u.useEffect)(()=>{y.current!==t&&(h(!0),y.current=t)},[t]),(0,u.useEffect)(()=>{if(d||c){const T=setTimeout(()=>{h(!1),l(!1)},0);return()=>clearTimeout(T)}},[d,c]),(0,u.useEffect)(()=>{const T=S=>{const{data:I,origin:L}=S;if(!kf(L))return;const E=p.current,N=g.current.pathname,R=v.current,M=R?.lessonsOnly,A=Array.isArray(I)?I:[I];for(const j of A){const{type:P,data:w,options:D}=j;if(rU.has(P)){if(P===lm){if(S.source!==window.parent||!dm().includes(S.origin))continue;f(j)}if(P===Mn.TOGGLE&&window.targetMode?.(w,B=>{window.parent.postMessage({type:Mn.HOVERED,data:B},"*")})?.then(B=>{window.parent.postMessage({type:Mn.SELECTED,data:B},"*")}).catch(()=>{window.parent.postMessage({type:Mn.SELECTED,data:[]},"*")}),P==="preview:update"&&r(w),P==="preview:themeUpdate"){x.current?.();const{course:O,l10n:B,fonts:H,theme:_}=w,$={...O,theme:_},z=C7({course:R,updates:$}),{cancel:K}=aU({course:z,fonts:H,l10n:B});x.current=K}if(P==="preview:navigate"){let{type:O,lessonId:B,itemId:H}=w;const{path:_,replace:$}=w,z=K=>{if(l(!0),$){E(K,{replace:!0});return}E(K)};if(iU(O,N)){if(Array.isArray(_)){const K=(0,Eo.Ce)(_);if(K)({type:O,lessonId:B,itemId:H}=K);else if(_[0]==="mondrian")for(const J of R?.lessons??[]){const Y=J.items?.find(G=>"blockumentId"in G&&G.blockumentId===_[1]);if(Y){O="lesson",B=J.id,H=Y.id;break}}else continue}if(O==="firstLesson"&&M?.[0])z(An(M[0].id));else if(O==="cover"||O==="course")a3(R)?z("/"):sU();else if(O==="lesson"&&M?.find(({id:J})=>J===B)!=null){const J=An(B),Y=Fr(R),G=(0,Be.B6)(Cd,N)!=null||(0,Be.B6)(xd,N)!=null,U=J!==N&&!(Y&&G),Q=Y&&H==null&&dM(R),Z=Array.isArray(_)?F$(_):null,q=()=>{if(Z==null)return;const ue=_$(R?.lessons,Z);ue!=null&&window.dispatchEvent(new CustomEvent(Md,{detail:{l10nId:ue,chapterIndex:Z.chapterIndex}}))},te=()=>{q(),I3(H),Q?window.dispatchEvent(new CustomEvent(Nf,{detail:{lessonId:B}})):(H!=null||_!=null)&&window.dispatchEvent(new CustomEvent(Je,{detail:{lessonId:B,itemId:H,path:_??[]}}))},ne=Q||H!=null||_!=null;zm(Tb.getState())===Oo.RESTRICTED&&gn(uj({targetLessonId:B,lessons:R?.lessons??[]})),U&&z(J),ne&&(l(!0),U?setTimeout(te,1500):te())}}}if(P===Mn.CLEAR&&window.dispatchEvent(new CustomEvent(wf)),P==="preview:navOpen"&&window.dispatchEvent(new CustomEvent(u3)),P==="preview:navClose"&&window.dispatchEvent(new CustomEvent(h3)),P==="preview:showLessonNavPrev"&&window.dispatchEvent(new CustomEvent(Rd)),P==="preview:showLessonNavNext"&&window.dispatchEvent(new CustomEvent(Pd)),P==="preview:scrollto"&&typeof w.target=="string"){const O=document.querySelector(w.target);O&&O.scrollIntoView({behavior:"smooth",block:"start"})}if(P==="preview:seek"&&typeof w.time=="number"&&Number.isFinite(w.time)&&typeof w.l10nId=="string"&&window.dispatchEvent(new CustomEvent(jf,{detail:{l10nId:w.l10nId,time:w.time}})),P==="preview:replace"&&gn(Hw(w)),P==="preview:changeset"&&b.current(w),P===Mn.FOCUS){const O=I3(nU(w.path));!b3(w.path)&&O&&T3(w.path);const B=k$(w.path);B&&window.dispatchEvent(new CustomEvent(Md,{detail:B}))}P===Mn.TRANSLATION_HOVERED&&(a({translationHoveredPath:w.path}),X$(w.path,{time:w.time})),P===Mn.TRANSLATION_HOVER_CLEAR&&(a({translationHoveredPath:null}),W$()),P==="preview:lessonUpdate"&&(gn(zw(w)),requestAnimationFrame(()=>{window.parent.postMessage({type:"preview:lessonUpdateComplete"},window.location.origin)})),P==="preview:selectLocale"&&D?.shouldRetainParentFocus&&l(!0)}}};return window.addEventListener("message",T),()=>window.removeEventListener("message",T)},[]),{previewType:s,targetModeContext:i,didNavigate:d,shouldSkipAutoFocusOnNavigate:c,deliveryPolicyResponse:m}}const Hd=(0,u.createContext)(null),L3=(0,u.createContext)(null);function Vd(){const e=(0,u.useContext)(Hd);if(e==null)throw new Error("usePreviewState must be used within PreviewRuntimeProvider");return e}function dU(){const e=(0,u.useContext)(L3);if(e==null)throw new Error("useDeliveryPolicy must be used within PreviewRuntimeProvider");return e}function uU(){return(0,u.useContext)(Hd)?.previewType}function hU(){return(0,u.useContext)(Hd)?.shouldSkipAutoFocusOnNavigate??!1}function mU({children:e}){const{previewType:t,targetModeContext:n,didNavigate:s,shouldSkipAutoFocusOnNavigate:r,deliveryPolicyResponse:i}=lU(),a=I$(i),c=(0,u.useMemo)(()=>({previewType:t||void 0,didNavigate:s,shouldSkipAutoFocusOnNavigate:r}),[t,s,r]);return(0,o.jsx)(y$,{value:n,children:(0,o.jsx)(L3,{value:a,children:(0,o.jsx)(Hd,{value:c,children:e})})})}function _f({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M2.34315 7.34315L8 13L13.6569 7.34315",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,o.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",width:"2",x:"7",y:"1"})]})}function fU({className:e}){return(0,o.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,o.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 E3({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M13.6569 7.65685L8 2L2.34315 7.65686",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"}),(0,o.jsx)("rect",{fill:"currentColor",height:"12",rx:"0.999999",transform:"rotate(180 9 14)",width:"2",x:"9",y:"14"})]})}function Yt({children:e,className:t,height:n,width:s,viewBox:r}){return(0,o.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:s,xmlns:"http://www.w3.org/2000/svg",children:e})}function pU(e){return(0,o.jsx)(Yt,{height:"12",viewBox:"0 0 18 12",width:"18",...e,children:(0,o.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 gU(e){return(0,o.jsx)(Yt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,o.jsx)("path",{d:"M9 1L5 5L1 1",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function vU(e){return(0,o.jsx)(Yt,{height:"6",viewBox:"0 0 10 6",width:"10",...e,children:(0,o.jsx)("path",{d:"M1 5L5 1L9 5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}function CU(e){return(0,o.jsxs)(Yt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,o.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,o.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,o.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 On(e){return(0,o.jsx)("svg",{"aria-hidden":"true",fill:"currentColor",focusable:"false",xmlns:"http://www.w3.org/2000/svg",...e})}function k3(e){return(0,o.jsx)(On,{...e,fill:"none",viewBox:"1 1 18 18",children:(0,o.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 zd(e){return(0,o.jsxs)(On,{...e,fill:"none",viewBox:"0 0 18 18",children:[(0,o.jsx)("circle",{cx:"9",cy:"9",fill:"#74BF44",r:"9"}),(0,o.jsx)("path",{d:"M6.43994 9.12061L8.43994 11.1206L11.9399 7.62061",stroke:"white",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5"})]})}function xU(e){return(0,o.jsx)(Yt,{height:"12",viewBox:"0 0 12 12",width:"12",...e,children:(0,o.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 bU(e){return(0,o.jsx)(Yt,{height:"5",viewBox:"0 0 10 5",width:"10",...e,children:(0,o.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 yU(e){return(0,o.jsxs)(Yt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,o.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,o.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 SU(e){return(0,o.jsxs)(Yt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,o.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,o.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 IU(e){return(0,o.jsx)(Yt,{height:"10",viewBox:"0 0 10 10",width:"10",...e,children:(0,o.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 TU=({width:e="17",height:t="15",title:n="Book",desc:s="Book",focusable:r="false",className:i})=>(0,o.jsxs)("svg",{className:i,focusable:r,height:t,viewBox:"0 0 17 15",width:e,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:n}),(0,o.jsx)("desc",{children:s}),(0,o.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 LU=C(40278),X=C.n(LU);const N3=({title:e="Pick One",desc:t="Pick One",width:n="16",height:s="14",className:r,focusable:i="false","aria-hidden":a})=>(0,o.jsxs)("svg",{"aria-hidden":a,className:X()("i i-pickOne",r),focusable:i,height:s,viewBox:"0 0 16 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.jsxs)("g",{fillRule:"evenodd",children:[(0,o.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,o.jsx)("path",{d:"M8.862 1.324h7v2h-7zM8.862 4.324h7v2h-7zM8.862 8.324h7v2h-7zM8.862 11.324h7v2h-7z"})]})]}),w3=({title:e="Fill in the Blank",desc:t="Pencil writing on a surface",width:n="15",height:s="15",className:r,focusable:i="false"})=>(0,o.jsxs)("svg",{className:X()("i i-fillInTheBlank",r),focusable:i,height:s,viewBox:"0 0 15 15",width:n,children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.jsx)("path",{d:"M2.488 8.246l5.25-5.25 1.4 1.4-5.25 5.25h-1.4v-1.4zm-.875 3.15h2.625a.794.794 0 0 0 .613-.262l6.125-6.125a.846.846 0 0 0 0-1.225L8.35 1.159a.846.846 0 0 0-1.225 0L1 7.284a.794.794 0 0 0-.263.612v2.625c0 .525.35.875.875.875zM.739 13.146h14v1.75h-14z"})]});function j3({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M3.33177 4.1487L6.48034 1.00013M9.6289 4.14869L6.48034 1.00013M6.48034 1.00013L6.47966 11.9601"})})}function EU(e){return(0,o.jsxs)(On,{...e,fill:"none",viewBox:"0 3 16 10",children:[(0,o.jsx)("path",{d:"M1.51472 7.99993H14.4853",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M9.50008 12.4994L14.5004 7.99932L9.50008 3.99973",stroke:"currentColor",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}function A3(e){return(0,o.jsx)(Yt,{height:"8",viewBox:"0 0 14 8",width:"14",...e,children:(0,o.jsx)("path",{clipRule:"evenodd",d:"M13 1L7 7L1 1",stroke:"currentColor"})})}function R3(e){return(0,o.jsxs)(On,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,o.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,o.jsx)("path",{d:"M5 7.71429L7.54545 10L11.5 5.5",stroke:"white"})]})}function P3(e){return(0,o.jsxs)(On,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,o.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,o.jsx)("circle",{cx:"8",cy:"7.5293",r:"7",stroke:"white"})]})}function kU({className:e}){return(0,o.jsxs)("svg",{"aria-hidden":"true",className:e,fill:"none",viewBox:"0 0 15 15",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{cx:"6",cy:"6",r:"5"}),(0,o.jsx)("path",{d:"M9.5 9.5L14 14"})]})}function NU(e){return(0,o.jsxs)(On,{...e,fill:"none",viewBox:"0 0 16 16",children:[(0,o.jsx)("circle",{cx:"8",cy:"8",r:"7",stroke:"white"}),(0,o.jsx)("path",{d:"M10 6L6 10",stroke:"white"}),(0,o.jsx)("path",{d:"M6 6L10 10",stroke:"white"})]})}function wU({className:e}){return(0,o.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,o.jsx)("path",{d:"M1 1.40002L5 5.40002L9 1.40002",strokeWidth:"1.6"})})}function jU(e){return(0,o.jsxs)(On,{viewBox:"0 0 12 12",...e,children:[(0,o.jsx)("path",{d:"M10.7425 0.742189L11.4496 1.4493L1.55012 11.3488L0.843012 10.6417L10.7425 0.742189Z",fill:"currentColor"}),(0,o.jsx)("path",{d:"M11.1571 10.6417L10.45 11.3488L0.550537 1.44929L1.25764 0.742188L11.1571 10.6417Z",fill:"currentColor"})]})}function AU({className:e,ref:t}){return(0,o.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,o.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 RU(e){return(0,o.jsx)(On,{...e,viewBox:"0 0 16 8",children:(0,o.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 PU({className:e,ref:t}){return(0,o.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,o.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 MU(e){return(0,o.jsx)(Yt,{height:"12",viewBox:"0 0 16 12",width:"16",...e,children:(0,o.jsx)("path",{clipRule:"evenodd",d:"M9.6665 2H0.666504V0H9.6665V2ZM12.6665 6H0.666504V4H12.6665V6ZM0.666504 10H7.6665V8H0.666504V10Z",fill:"currentColor",fillRule:"evenodd"})})}function M3(e){return(0,o.jsx)(Yt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,o.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 OU(e){return(0,o.jsx)(Yt,{height:"8",viewBox:"0 0 12 8",width:"12",...e,children:(0,o.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 BU(e){return(0,o.jsxs)(Yt,{height:"21",viewBox:"0 0 20 21",width:"20",...e,children:[(0,o.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,o.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,o.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 DU(e){return(0,o.jsx)(Yt,{height:"15",viewBox:"0 0 16 15",width:"16",...e,children:(0,o.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 FU(e){return(0,o.jsxs)(Yt,{height:"18",viewBox:"0 0 18 18",width:"18",...e,children:[(0,o.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,o.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 _U(e){return(0,o.jsxs)(Yt,{height:"14",viewBox:"0 0 20 14",width:"20",...e,children:[(0,o.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,o.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 HU(e){return(0,o.jsx)(Yt,{height:"14",viewBox:"0 0 14 14",width:"14",...e,children:(0,o.jsx)("path",{clipRule:"evenodd",d:"M13.4646 2.46462L11.8484 0.848376L7.00023 5.69652L2.15186 0.848143L0.535612 2.46439L5.38399 7.31276L0.534668 12.1621L2.15091 13.7783L7.00023 8.92901L11.8493 13.7781L13.4656 12.1619L8.61648 7.31276L13.4646 2.46462Z",fill:"currentColor",fillRule:"evenodd"})})}function qt(e){return function(n){const s=Lt(),r=e[s];return r?(0,o.jsx)(r,{...n}):null}}const O3=qt({[se.RISE_CLASSIC]:pU,[se.HORIZON]:null,[se.APEX]:MU}),$d=qt({[se.RISE_CLASSIC]:_f,[se.HORIZON]:j3,[se.APEX]:AU}),Hf=qt({[se.RISE_CLASSIC]:fU,[se.HORIZON]:EU,[se.APEX]:RU}),B3=qt({[se.RISE_CLASSIC]:E3,[se.HORIZON]:j3,[se.APEX]:PU}),VU=qt({[se.RISE_CLASSIC]:TU,[se.HORIZON]:null,[se.APEX]:null}),zU=qt({[se.RISE_CLASSIC]:gU,[se.HORIZON]:A3,[se.APEX]:M3}),$U=qt({[se.RISE_CLASSIC]:vU,[se.HORIZON]:A3,[se.APEX]:OU}),UU=qt({[se.RISE_CLASSIC]:zd,[se.HORIZON]:R3,[se.APEX]:zd}),GU=qt({[se.RISE_CLASSIC]:N3,[se.HORIZON]:P3,[se.APEX]:N3}),WU=qt({[se.RISE_CLASSIC]:CU,[se.HORIZON]:null,[se.APEX]:BU}),KU=qt({[se.RISE_CLASSIC]:k3,[se.HORIZON]:NU,[se.APEX]:k3}),QU=qt({[se.RISE_CLASSIC]:zd,[se.HORIZON]:R3,[se.APEX]:zd}),ZU=qt({[se.RISE_CLASSIC]:w3,[se.HORIZON]:P3,[se.APEX]:w3}),vc=qt({[se.RISE_CLASSIC]:xU,[se.HORIZON]:kU,[se.APEX]:DU}),D3=qt({[se.RISE_CLASSIC]:bU,[se.HORIZON]:wU,[se.APEX]:M3}),YU=qt({[se.RISE_CLASSIC]:yU,[se.HORIZON]:null,[se.APEX]:FU}),qU=qt({[se.RISE_CLASSIC]:SU,[se.HORIZON]:null,[se.APEX]:_U}),Ud=qt({[se.RISE_CLASSIC]:IU,[se.HORIZON]:jU,[se.APEX]:HU}),$i=V("cover");function r2e(){const{categories:e}=le();return!Array.isArray(e)||e.length===0?null:(0,o.jsxs)("section",{className:$i("categories-section"),children:[(0,o.jsx)("h2",{className:$i("categories-title"),children:"Topics"}),(0,o.jsx)("ul",{className:$i("categories-list"),role:"list",children:e.map(t=>(0,o.jsxs)("li",{className:$i("categories-item"),role:"listitem",children:[(0,o.jsx)(VU,{className:$i("categories-icon")}),(0,o.jsx)("span",{className:$i("categories-item-wrap"),children:t})]},t))})]})}var XU=C(11891),JU=C(90245),Wr=C.n(JU),ze=C(69980);const eG=`${Ae("CDN_URI")}/assets/rise/assets/certificate-icon.svg`,tG=`${Ae("CDN_URI")}/assets/rise/assets/error_x.svg`,nG=`${Ae("CDN_URI")}/assets/rise/assets/loading_spinner.svg`,Cc="downloading",Ui="error",Kr="ok",Vf="contained",F3=({type:e})=>{const[t]=(0,u.useState)(()=>Wr()("certdownload-")),[n,s]=(0,u.useState)(Kr),r=(0,ze.A)(n),i=(0,u.useRef)(null),a=Ce(),c=`${t}-live`,l=e===Vf?"certificateDownload certificateDownloadContained":"certificateDownload",d=(0,u.useCallback)(()=>{s(Cc)},[]);return(0,u.useEffect)(()=>(n===Cc&&r!==Cc&&cA().then(()=>{s(Kr)}).catch(h=>{(0,XU.FZ)(h)?s(Kr):s(Ui)}),()=>{lA()}),[r,n]),(0,u.useEffect)(()=>{i.current&&(n===Ui&&r!==Ui||n===Kr&&(r===Ui||r===Cc))&&i.current.focus()},[r,n]),(0,o.jsxs)("div",{className:l,children:[(0,o.jsxs)("div",{"aria-live":"polite",id:c,role:"status",children:[n===Cc&&(0,o.jsxs)("span",{className:"certificateDownload__downloading",children:[(0,o.jsx)("img",{alt:"",className:"animation-loading certificateDownload__downloadingImg",height:"15",src:nG,width:"15"}),a?.certificateDownloadInProgress||"Downloading..."]}),n===Ui&&(0,o.jsxs)("span",{className:"certificateDownload__error",children:[(0,o.jsx)("img",{alt:"Error",className:"certificateDownload__errorImg",height:"15",src:tG,width:"15"}),(0,o.jsx)("span",{className:"visually-hidden",children:a?.a11yCertificateDownloadFailed||"Failed to download certificate"})]})]}),(n===Kr||n===Ui)&&(0,o.jsxs)("button",{"aria-controls":c,className:"certificateDownload__btn",onClick:d,ref:i,type:"button",children:[n===Kr&&e===Vf&&(0,o.jsx)("img",{alt:"",className:"certificateDownload__okImg",height:"15",src:eG,width:"15"}),n===Kr?a?.certificateDownload||"Download certificate":a?.certificateRetryDownload||"Retry download"]})]})},sG=()=>(0,o.jsx)(F3,{type:Vf}),oG=(0,u.memo)(F3);var zf,rG;const i2e=({width:e="18",height:t="18",className:n})=>zf("svg",{"aria-hidden":"true",className:rG("i i-alert",n),focusable:"false",height:t,viewBox:"0 0 18 18",width:e,children:zf("g",{fill:"none",fillRule:"evenodd",stroke:"#DE1D1D",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",children:zf("path",{d:"M9 1a8 8 0 1 1 0 16A8 8 0 0 1 9 1zM9 5.364V9.53M9 11.91v.726"})})}),a2e=null;function iG(e){return(0,o.jsxs)(On,{viewBox:"0 0 16 12",...e,children:[(0,o.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,o.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,o.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 aG,_3,cG;const c2e=({width:e="24",height:t="16",leftMovement:n="0",className:s})=>aG("svg",{"aria-hidden":"true",className:cG("i i-alt",s),focusable:"false",height:t,style:{marginLeft:n},viewBox:"0 0 24 16",width:e,children:[_3("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"}),_3("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"})]}),l2e=null;var lG,Gd,dG;const d2e=({title:e="All Authors",desc:t="A circle with the outline of the head and shoulders of two people inside",width:n="30",height:s="30",className:r,focusable:i="false"})=>lG("svg",{className:dG("i i-blockTemplateAllAuthors",r),focusable:i,height:s,viewBox:"0 0 30 30",width:n,children:[Gd("title",{children:e}),Gd("desc",{children:t}),Gd("circle",{cx:"14.963",cy:"14.963",fill:"#E9E9E9",r:"14.963"}),Gd("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"})]}),u2e=null;var Wd,Ss,uG;const h2e=({title:e="Check Mark",desc:t="A circle with a check mark inside",width:n="112",height:s="112",className:r,focusable:i="false"})=>Wd("svg",{className:uG("i i-blockTemplateCheckMark",r),focusable:i,height:s,viewBox:"0 0 112 112",width:n,children:[Ss("title",{children:e}),Ss("desc",{children:t}),Ss("defs",{children:Wd("filter",{filterUnits:"objectBoundingBox",height:"186.1%",id:"a",width:"186.1%",x:"-43.1%",y:"-40.3%",children:[Ss("feOffset",{dy:"2",in:"SourceAlpha",result:"shadowOffsetOuter1"}),Ss("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:"10"}),Ss("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"}),Wd("feMerge",{children:[Ss("feMergeNode",{in:"shadowMatrixOuter1"}),Ss("feMergeNode",{in:"SourceGraphic"})]})]})}),Wd("g",{fill:"none",fillRule:"evenodd",filter:"url(#a)",transform:"translate(20 18)",children:[Ss("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"}),Ss("circle",{className:"inner",cx:"36",cy:"36",r:"30"}),Ss("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"})]})]}),m2e=null;var H3,Kd,hG;const f2e=({title:e="Folder Outline",desc:t="Outline of a folder",width:n="42",height:s="42",className:r,focusable:i="false"})=>H3("svg",{className:hG("i i-blockTemplateFolder",r),focusable:i,height:s,viewBox:"0 0 42 42",width:n,children:[Kd("title",{children:e}),Kd("desc",{children:t}),H3("g",{fill:"#ADAEAF",fillRule:"nonzero",stroke:"#ADAEAF",strokeWidth:".3",children:[Kd("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"}),Kd("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"})]})]}),p2e=null;var $f,xc,mG;const g2e=({title:e="Captions",desc:t="Two capital letter C inside a square",width:n="24",height:s="16",className:r,focusable:i="false"})=>$f("svg",{className:mG("i i-captions",r),focusable:i,height:s,viewBox:"0 0 24 16",width:n,children:[xc("title",{children:e}),xc("desc",{children:t}),$f("g",{fill:"none",fillRule:"evenodd",transform:"translate(-.355)",children:[xc("rect",{height:"13.25",rx:"1",stroke:"#000",strokeWidth:"1.75",width:"18.25",x:"1.447",y:"1.402"}),$f("text",{fill:"#000",fontFamily:"Lato-Black, Lato",fontSize:"9",fontWeight:"700",letterSpacing:".75",children:[xc("tspan",{x:"4.222",y:"11.5",children:"C"})," ",xc("tspan",{x:"10.885",y:"11.5",children:"C"})]})]})]}),v2e=null;var fG,Uf;const C2e=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="15",role:i="img",title:a,width:c="16"})=>fG("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Uf("title",{children:a}),s&&Uf("desc",{children:s}),Uf("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"})]}),x2e=null;function V3(e){return(0,o.jsx)(On,{viewBox:"0 0 11 8",...e,children:(0,o.jsx)("path",{d:"M9.6,0L11,1.3L3.9,8L0,4.3L1.4,3l2.6,2.4L9.6,0z"})})}var pG,Gf,gG;const b2e=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="21",role:i="img",title:a,width:c="21"})=>pG("svg",{"aria-hidden":e,"aria-label":t,className:gG("i i-checkMarkFilled",n),focusable:"false",height:r,role:i,viewBox:"0 0 21 21",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Gf("title",{children:a}),s&&Gf("desc",{children:s}),Gf("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"})]}),y2e=null;var z3,vG;function S2e(e){return z3(vG,{viewBox:"0 0 7 5",...e,children:z3("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 $3,CG;const I2e=({width:e="16",height:t="16",className:n,focusable:s="false"})=>$3("svg",{"aria-hidden":"true",className:CG("i i-chevronLeft",n),focusable:s,height:t,viewBox:"0 0 16 16",width:e,children:$3("polygon",{points:"11.1,15.7 3.4,8 11.1,0.3 12.6,1.7 6.3,8 12.6,14.3 "})}),T2e=null,xG=({className:e,dataTestId:t})=>(0,o.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,o.jsx)("circle",{cx:"5",cy:"5",r:"5"})}),bG=({className:e})=>(0,o.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,o.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 yG,Yn;const k2e=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="18",role:i="img",title:a,width:c="18"})=>yG("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 18 18",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Yn("title",{children:a}),s&&Yn("desc",{children:s}),Yn("path",{d:"M9 9V1a8 8 0 015.657 2.343L9 9z",fill:"red",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9l5.657-5.656A8 8 0 0117 9H9z",fill:"#F90",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9h8a8 8 0 01-2.343 5.657L9 9z",fill:"#FFF500",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9l5.657 5.657A8 8 0 019 17V9z",fill:"#ADFF00",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9v8a8 8 0 01-5.657-2.343L9 9z",fill:"#00FF94",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9l-5.657 5.657A8 8 0 011 9h8z",fill:"#06F",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9H1a8 8 0 012.343-5.656L9 9z",fill:"#8000FF",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 9L3.343 3.343A8 8 0 019 1v8z",fill:"#EB00FF",stroke:"#fff",strokeLinejoin:"round"}),Yn("path",{d:"M9 6a3 3 0 110 6 3 3 0 010-6z",fill:"#fff"}),Yn("path",{d:"M9 17A8 8 0 109 1a8 8 0 000 16z",stroke:"#EAEAEB"})]}),N2e=null;var SG,Wf,IG;const w2e=({title:e="Copy",desc:t="A document stacked on top of another one",width:n="15",height:s="18",className:r=null,focusable:i="false"})=>SG("svg",{className:IG("i i-stack",r),focusable:i,height:s,viewBox:"0 0 15 18",width:n,children:[Wf("title",{children:e}),Wf("desc",{children:t}),Wf("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"})]}),j2e=null;var TG,Kf,LG;const A2e=e=>{const{className:t,desc:n="Crop",focusable:s="false",height:r="19",title:i="Crop",width:a="19"}=e,c={className:LG("i i-crop",t),focusable:s,height:r,viewBox:`0 0 ${a} ${r}`,width:a};return TG("svg",{...c,children:[Kf("title",{children:i}),Kf("desc",{children:n}),Kf("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"})]})},R2e=null;var EG,Qf,kG;const P2e=({"aria-hidden":e,"aria-label":t="Dash mark",className:n,desc:s,height:r="3",role:i="img",title:a,width:c="7"})=>EG("svg",{"aria-hidden":e,"aria-label":t,className:kG("i i-dashMark",n),focusable:"false",height:r,role:i,viewBox:"0 0 7 3",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Qf("title",{children:a}),s&&Qf("desc",{children:s}),Qf("rect",{height:"3",width:"7"})]}),M2e=null,NG=({title:e="DestinationArrow",desc:t="DestinationArrow",width:n="13",height:s="10",className:r,focusable:i="false"})=>(0,o.jsxs)("svg",{className:X()("i i-destinationArrow",r),focusable:i,height:s,viewBox:"0 0 13 10",width:n,children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.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 wG,B2e;class D2e extends null{render(){return wG("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 F2e=null;var U3,jG;const _2e=({width:e=20,height:t=20,...n})=>U3(jG,{height:t,width:e,...n,viewBox:"0 0 20 20",children:U3("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"})}),H2e=null;var AG,Zf,RG;const V2e=({title:e="Vertical Dots",desc:t="Vertical Dots",width:n="4",height:s="24",className:r=null,focusable:i="false"})=>AG("svg",{className:RG("i i-dotsVertical",r),focusable:i,height:s,viewBox:"0 0 4 24",width:n,children:[Zf("title",{children:e}),Zf("desc",{children:t}),Zf("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"})]}),z2e=null,PG=({title:e="Download",desc:t="Arrow down with horizontal line beneath it",width:n="16",height:s="19",className:r,focusable:i="false"},a)=>(0,o.jsxs)("svg",{className:X()("i i-download",r),focusable:i,height:s,ref:a,viewBox:"0 0 16 19",width:n,children:[(0,o.jsx)("title",{children:e}),(0,o.jsx)("desc",{children:t}),(0,o.jsx)("rect",{height:"2",rx:"1",width:"16",y:"17"}),(0,o.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,o.jsx)("path",{d:"M7 0h2v12H7z"})]}),MG=(0,u.forwardRef)(PG);var OG,bc,BG;const $2e=({title:e="Download Circle",desc:t="Arrow down with horizontal line beneath it wrapped up in a circle",width:n="51",height:s="51",className:r,focusable:i="false"})=>OG("svg",{className:BG("i i-downloadCircle",r),focusable:i,height:s,viewBox:"0 0 51 51",width:n,children:[bc("title",{children:e}),bc("desc",{children:t}),bc("g",{fill:"none",stroke:"none",children:bc("g",{fill:"#000",transform:"translate(-695, -227)",children:bc("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"})})})]}),U2e=null;var DG,yc,FG;const G2e=({title:e="More",desc:t="Three dots next to one another",width:n="16",height:s="4",className:r=null,focusable:i="false"})=>DG("svg",{className:FG("i",r),focusable:i,height:s,viewBox:"0 0 16 4",width:n,children:[yc("title",{children:e}),yc("desc",{children:t}),yc("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"}),yc("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"}),yc("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"})]}),W2e=null;var _G,Yf,HG;const K2e=({title:e="Embed",desc:t="Embed icon",width:n="16",height:s="15",className:r,focusable:i="false"})=>_G("svg",{className:HG("i i-embed",r),focusable:i,height:s,viewBox:"0 0 16 15",width:n,children:[Yf("title",{children:e}),Yf("desc",{children:t}),Yf("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"})]}),Q2e=null;var VG,Qd,zG;const Z2e=({title:e="Empty folder",desc:t="Empty folder",width:n="46",height:s="46",className:r,focusable:i="false"})=>VG("svg",{className:zG("i i-emptyFolder",r),focusable:i,height:s,viewBox:"0 0 46 46",width:n,children:[Qd("title",{children:e}),Qd("desc",{children:t}),Qd("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"}),Qd("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"})]}),Y2e=null;var $G,Zd,UG;const q2e=({title:e="End Slide",desc:t="End Slide",width:n="16",height:s="14",className:r,focusable:i="false"})=>$G("svg",{className:UG("i i-end-slide",r),focusable:i,height:s,viewBox:"0 0 16 14",width:n,children:[Zd("title",{children:e}),Zd("desc",{children:t}),Zd("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"}),Zd("rect",{fillRule:"evenodd",height:"14",width:"2",x:"14"})]}),X2e=null;var G3,Yd,GG;const J2e=({title:e="Envelope",desc:t="Envelope",width:n="17",height:s="14",className:r,focusable:i="false"})=>G3("svg",{className:GG("i i-envelope",r),focusable:i,height:s,viewBox:"0 0 17 14",width:n,xmlns:"http://www.w3.org/2000/svg",children:[Yd("title",{children:e}),Yd("desc",{children:t}),G3("g",{fillRule:"nonzero",children:[Yd("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"}),Yd("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"})]})]}),exe=null;var WG,qd,KG;const txe=({title:e="Error",desc:t="An x with a circle",width:n="50",height:s="50",className:r,focusable:i="false"})=>WG("svg",{className:KG("i i-error",r),focusable:i,height:s,viewBox:"0 0 50 50",width:n,children:[qd("title",{children:e}),qd("desc",{children:t}),qd("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"}),qd("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"})]}),nxe=null;var QG,Xd,ZG;const sxe=({title:e="Error Alert",desc:t="A red circle with a white exclamation point in the middle",width:n="18",height:s="18",className:r,focusable:i="false"})=>QG("svg",{className:ZG("i i-errorAlert",r),focusable:i,height:s,viewBox:"0 0 18 18",width:n,children:[Xd("title",{children:e}),Xd("desc",{children:t}),Xd("circle",{cx:"9",cy:"9",r:"9"}),Xd("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"})]}),oxe=null,W3=({"aria-hidden":e,"aria-label":t="X mark",className:n,dataTestId:s="x-mark",desc:r,height:i="10",overrideStyle:a=!1,role:c="img",title:l,width:d="10"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()(n,{"i i-exMark":!a}),"data-testid":s,focusable:"false",height:i,role:c,viewBox:"0 0 10 10",width:d,xmlns:"http://www.w3.org/2000/svg",children:[l&&(0,o.jsx)("title",{children:l}),r&&(0,o.jsx)("desc",{children:r}),(0,o.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 YG,Jd,qG;const ixe=({title:e="Export",desc:t="Export",width:n="12",height:s="15",className:r,focusable:i="false"})=>YG("svg",{className:qG("i i-export",r),focusable:i,height:s,viewBox:"0 0 12 15",width:n,children:[Jd("title",{children:e}),Jd("desc",{children:t}),Jd("polygon",{points:"7,6.4 7,1 5,1 5,6.4 2.3,6.4 6,10.8 9.7,6.4"}),Jd("rect",{height:"2",width:"10",x:"1",y:"12"})]}),axe=null,K3=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#C7CACC",fillRule:"evenodd"}),(0,o.jsx)("path",{d:"M13.534 22.9863V24.4163H10.245V26.4458H12.984V27.8813H10.245V30.9998H8.375V22.9863H13.534Z",fill:"#414448"}),(0,o.jsx)("path",{d:"M17.533 30.9998H15.663V22.9863H17.533V30.9998Z",fill:"#414448"}),(0,o.jsx)("path",{d:"M21.8805 29.5148H24.8505V30.9998H20.0215V22.9863H21.8805V29.5148Z",fill:"#414448"}),(0,o.jsx)("path",{d:"M31.8846 22.9863V24.4163H28.5956V26.2863H31.1146V27.6613H28.5956V29.5698H31.8846V30.9998H26.7256V22.9863H31.8846Z",fill:"#414448"})]}),XG=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#96A9E0",fillRule:"evenodd"}),(0,o.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,o.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,o.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"})]}),JG=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#EDADA9",fillRule:"evenodd"}),(0,o.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,o.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,o.jsx)("path",{d:"M31.3465 22.9863V24.4163H28.0575V26.4458H30.7965V27.8813H28.0575V30.9998H26.1875V22.9863H31.3465Z",fill:"#771D18"})]}),eW=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#F8BFA6",fillRule:"evenodd"}),(0,o.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,o.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,o.jsx)("path",{d:"M31.2008 22.9863V24.4603H28.9458V30.9998H27.0868V24.4603H24.8318V22.9863H31.2008Z",fill:"#7C2B0E"})]}),tW=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,o.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,o.jsx)("path",{d:"M23.6162 22.9865V24.4605H21.3612V31H19.5022V24.4605H17.2472V22.9865H23.6162Z",fill:"#144E6C"}),(0,o.jsx)("path",{d:"M30.5411 22.9865V24.4165H27.2521V26.446H29.9911V27.8815H27.2521V31H25.3821V22.9865H30.5411Z",fill:"#144E6C"})]}),nW=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#AFD1AE",fillRule:"evenodd"}),(0,o.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,o.jsx)("path",{d:"M20.6017 29.5149H23.5717V30.9999H18.7427V22.9864H20.6017V29.5149Z",fill:"#265026"}),(0,o.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"})]}),sW=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="50",role:i="img",title:a="",width:c="40"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 40 50",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.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,o.jsx)("path",{clipRule:"evenodd",d:"M26 0V14H40",fill:"#ABDBF3",fillRule:"evenodd"}),(0,o.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,o.jsx)("path",{d:"M20.7826 30.9998H18.9126V22.9863H20.7826V30.9998Z",fill:"#124F6E"}),(0,o.jsx)("path",{d:"M25.1301 28.3213V30.9998H23.2711V22.9863H26.0981C26.6627 22.9863 27.1467 23.0542 27.5501 23.1898C27.9571 23.3218 28.2907 23.5052 28.5511 23.7398C28.8151 23.9745 29.0094 24.2513 29.1341 24.5703C29.2587 24.8893 29.3211 25.234 29.3211 25.6043C29.3211 26.004 29.2569 26.3707 29.1286 26.7043C29.0002 27.038 28.8041 27.324 28.5401 27.5623C28.2761 27.8007 27.9406 27.9877 27.5336 28.1233C27.1302 28.2553 26.6517 28.3213 26.0981 28.3213H25.1301ZM25.1301 26.9188H26.0981C26.5821 26.9188 26.9304 26.8033 27.1431 26.5723C27.3557 26.3413 27.4621 26.0187 27.4621 25.6043C27.4621 25.421 27.4346 25.2542 27.3796 25.1038C27.3246 24.9535 27.2402 24.8252 27.1266 24.7188C27.0166 24.6088 26.8754 24.5245 26.7031 24.4658C26.5344 24.4072 26.3327 24.3778 26.0981 24.3778H25.1301V26.9188Z",fill:"#124F6E"})]});var oW,qf;const pxe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="16",role:i="img",title:a,width:c="16"})=>oW("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&qf("title",{children:a}),s&&qf("desc",{children:s}),qf("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"})]}),gxe=null;var rW,Xf,iW;const vxe=({title:e="Hidden",desc:t="Eye crossed out",width:n="16",height:s="14",className:r=null,focusable:i="false"})=>rW("svg",{className:iW("i i-hidden",r),focusable:i,height:s,viewBox:"0 0 16 14",width:n,children:[Xf("title",{children:e}),Xf("desc",{children:t}),Xf("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"})]}),Cxe=null;var aW,eu,cW;const xxe=({title:e="Label Set",desc:t="Label Set",width:n="17",height:s="17",className:r,focusable:i="false"})=>aW("svg",{className:cW("i i-labelSet",r),focusable:i,height:s,viewBox:"0 0 18 18",width:n,children:[eu("title",{children:e}),eu("desc",{children:t}),eu("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"}),eu("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"})]}),bxe=null;var lW,Jf;const yxe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="15",role:i="img",title:a,width:c="16"})=>lW("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Jf("title",{children:a}),s&&Jf("desc",{children:s}),Jf("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"})]}),Sxe=null;var dW,ep,uW;const Ixe=({title:e="Matching",desc:t="Two rows of stacked squares",width:n="15",height:s="15",className:r,focusable:i="false"})=>dW("svg",{className:uW("i i-matching",r),focusable:i,height:s,viewBox:"0 0 15 15",width:n,children:[ep("title",{children:e}),ep("desc",{children:t}),ep("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"})]}),Txe=null;var hW,tu,mW;const Lxe=({title:e="Multiple Choice",desc:t="Stacked circles to the left of stacked lines",width:n="16",height:s="16",className:r,focusable:i="false"})=>hW("svg",{className:mW("i i-multipleChoice",r),focusable:i,height:s,viewBox:"0 0 16 16",width:n,children:[tu("title",{children:e}),tu("desc",{children:t}),tu("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"}),tu("circle",{cx:"7.904",cy:"7.904",r:"1.904"})]}),Exe=null;var fW,tp,pW;const kxe=({title:e="Multiple Response",desc:t="A box with a checkmark in it",width:n="16",height:s="16",className:r,focusable:i="false"})=>fW("svg",{className:pW("i i-multipleResponse",r),focusable:i,height:s,viewBox:"0 0 16 16",width:n,children:[tp("title",{children:e}),tp("desc",{children:t}),tp("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"})]}),Nxe=null;var gW,nu,vW;const wxe=({title:e="New Slide",desc:t="New Slide",width:n="16",height:s="16",className:r,focusable:i="false"})=>gW("svg",{className:vW("i i-new-slide",r),focusable:i,height:s,viewBox:"0 0 16 16",width:n,children:[nu("title",{children:e}),nu("desc",{children:t}),nu("path",{d:"M7,12h2V9h3V7H9V4H7v3H4v2h3V12z",fillRule:"evenodd"}),nu("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"})]}),jxe=null;var CW,np,xW;const Axe=({title:e="Next Slide",desc:t="Next Slide",width:n="16",height:s="13.4",className:r,focusable:i="false"})=>CW("svg",{className:xW("i i-next-slide",r),focusable:i,height:s,viewBox:"0 0 16 13.4",width:n,children:[np("title",{children:e}),np("desc",{children:t}),np("path",{d:"M9.3,0L7.9,1.4l4.3,4.3H0v2h12.2L7.9,12l1.4,1.4L16,6.7L9.3,0",fillRule:"evenodd"})]}),Rxe=null;var bW,Sc,yW;const Pxe=({title:e="Hide",desc:t="Shape of an eye with a stroke through it",width:n="20",height:s="16",className:r,focusable:i="false"})=>bW("svg",{className:yW("i",r),focusable:i,height:s,viewBox:"0 0 20 16",width:n,children:[Sc("title",{children:e}),Sc("desc",{children:t}),Sc("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"}),Sc("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"}),Sc("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"})]}),Mxe=null;var SW,sp,IW;const Oxe=({title:e="Edit",desc:t="Pencil",width:n="11",height:s="11",className:r,focusable:i="false"})=>SW("svg",{className:IW("i i-pencil",r),focusable:i,height:s,viewBox:"0 0 10 10",width:n,children:[sp("title",{children:e}),sp("desc",{children:t}),sp("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"})]}),Bxe=null;var TW,op;const Dxe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="16",role:i="img",title:a,width:c="16"})=>TW("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 16 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&op("title",{children:a}),s&&op("desc",{children:s}),op("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"})]}),Fxe=null;class rp extends u.Component{constructor(...t){super(...t),this.maskId=`person-unknown-mask-${Wr()()}`,this.pathId=`person-unknown-path-${Wr()()}`}render(){const{title:t="Person Unknown",desc:n,width:s="38",height:r="38",className:i,decorative:a,focusable:c="false"}=this.props;return(0,o.jsxs)("svg",{"aria-hidden":a,className:X()("i i-person-unknown",i),focusable:c,height:r,viewBox:"0 0 38 38",width:s,children:[t&&(0,o.jsx)("title",{children:t}),n&&(0,o.jsx)("desc",{children:n}),(0,o.jsx)("defs",{children:(0,o.jsx)("circle",{cx:"19",cy:"19",id:this.pathId,r:"19"})}),(0,o.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,o.jsx)("mask",{fill:"#fff",id:this.maskId,children:(0,o.jsx)("use",{href:`#${this.pathId}`})}),(0,o.jsx)("use",{fill:"#D8D8D8",href:`#${this.pathId}`}),(0,o.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 LW(e){return(0,o.jsxs)(On,{viewBox:"0 0 16 16",...e,children:[(0,o.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,o.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,o.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 EW,ip;const _xe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="15",role:i="img",title:a,width:c="16"})=>EW("svg",{"aria-hidden":e,"aria-label":t,className:n,focusable:"false",height:r,role:i,viewBox:"0 0 16 15",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&ip("title",{children:a}),s&&ip("desc",{children:s}),ip("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"})]}),Hxe=null;function kW(e){return(0,o.jsx)(On,{viewBox:"0 0 23 17",...e,children:(0,o.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 Q3,NW;const Vxe=({width:e="16",height:t="16",className:n})=>Q3("svg",{"aria-hidden":"true",className:NW("i i-search",n),fill:"currentColor",focusable:"false",height:t,viewBox:"0 0 15.6 14.7",width:e,children:Q3("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"})}),zxe=null;var Z3,Gi,wW;const $xe=({title:e="Spinner",desc:t="Hollow circle fading from transparent to gray",width:n="21",height:s="20",className:r,focusable:i="false"})=>Z3("svg",{className:wW("i i-spinner",r),focusable:i,height:s,viewBox:"0 0 21 20",width:n,children:[Gi("title",{children:e}),Gi("desc",{children:t}),Gi("defs",{children:Z3("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:[Gi("stop",{offset:"0%",stopColor:"#C8C8C8",stopOpacity:"0"}),Gi("stop",{offset:"100%",stopColor:"#979797"})]})}),Gi("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)"})]}),Uxe=null;function jW(e){return(0,o.jsxs)(On,{viewBox:"0 0 15 16",...e,children:[(0,o.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,o.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 AW,ap,RW;const Gxe=({title:e="Remove",desc:t="Trash can",width:n="10",height:s="13",className:r=null,focusable:i="false"})=>AW("svg",{className:RW("i i-trash",r),focusable:i,height:s,viewBox:"0 0 10 13",width:n,children:[ap("title",{children:e}),ap("desc",{children:t}),ap("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"})]}),Wxe=null;var PW,Wi;const Kxe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="16",role:i="img",title:a,width:c="14"})=>PW("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 14 16",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Wi("title",{children:a}),s&&Wi("desc",{children:s}),Wi("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"}),Wi("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"}),Wi("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"}),Wi("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"})]}),Qxe=null;var MW,su,OW;const Zxe=({title:e="Upload",desc:t="Upload icon",width:n="15",height:s="15",className:r="",focusable:i="false"})=>MW("svg",{className:OW("i",r),focusable:i,height:s,viewBox:"0 0 15 15",width:n,children:[su("title",{children:e}),su("desc",{children:t}),su("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"}),su("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"})]}),Yxe=null;var BW,Ic;const qxe=({"aria-hidden":e,"aria-label":t,className:n,desc:s,height:r="14",role:i="img",title:a,width:c="14"})=>BW("svg",{"aria-hidden":e,"aria-label":t,className:n,fill:"none",focusable:"false",height:r,role:i,viewBox:"0 0 14 14",width:c,xmlns:"http://www.w3.org/2000/svg",children:[a&&Ic("title",{children:a}),s&&Ic("desc",{children:s}),Ic("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"}),Ic("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"}),Ic("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"})]}),Xxe=null;var DW,ou,FW;const Jxe=({title:e="UploadXml",desc:t="UploadXml",width:n="18",height:s="21",className:r,focusable:i="false"})=>DW("svg",{className:FW("i i-uploadXml",r),focusable:i,height:s,viewBox:"0 0 18 21",width:n,children:[ou("title",{children:e}),ou("desc",{children:t}),ou("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"}),ou("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"})]}),ebe=null;function _W(e){return(0,o.jsx)(On,{viewBox:"0 0 16 12",...e,children:(0,o.jsx)("g",{transform:"translate(-1 -2)",children:(0,o.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 Y3,ru,HW;const tbe=({title:e="Visible",desc:t="Eye",width:n="16",height:s="12",className:r=null,focusable:i="false"})=>Y3("svg",{className:HW("i i-visible",r),focusable:i,height:s,viewBox:"0 0 16 12",width:n,children:[ru("title",{children:e}),ru("desc",{children:t}),Y3("g",{children:[ru("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"}),ru("path",{d:"M8 4a2 2 0 1 1 .001 3.999A2 2 0 0 1 8 4"})]})]}),nbe=null,VW=({"aria-hidden":e,"aria-label":t,className:n,desc:s="",height:r="20",role:i="img",title:a="",style:c,width:l="20"})=>(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:X()("i i-xMarkFilled",n),focusable:"false",height:r,role:i,style:c,viewBox:"0 0 20 20",width:l,xmlns:"http://www.w3.org/2000/svg",children:[a&&(0,o.jsx)("title",{children:a}),s&&(0,o.jsx)("desc",{children:s}),(0,o.jsx)("path",{d:"M10 9.08L6.904 5.986a.65.65 0 1 0-.92.92L9.082 10l-3.096 3.096a.65.65 0 0 0 .92.92L10 10.918l3.096 3.096a.65.65 0 0 0 .92-.92L10.918 10l3.096-3.096a.65.65 0 1 0-.92-.92L10 9.082zM10 20C4.477 20 0 15.523 0 10S4.477 0 10 0s10 4.477 10 10-4.477 10-10 10z"})]});var zW=C(78453),$W=C.n(zW);const UW=Ut()($W()({}),iC()(["first_name","last_name"]),yi()(" "),PA()),GW=({className:e,decorative:t,size:n,...s})=>{const r=Vo()(["avatars","medium"],s),i=t?"":UW(s)||"Unknown User";return r?(0,o.jsx)("img",{alt:i,className:e||"user-avatar",src:r,style:{height:n,width:n}}):(0,o.jsx)(rp,{decorative:t,height:n,title:i,width:n})},WW=`${Ae("CDN_URI")}/assets/rise/assets/trophy.svg`,iu=V("cover"),KW=oG,QW=GW;function rbe(){const{certificateDownload:e,riseComCurrentUser:t}=le(),n=Ce(),s=uB(),i=Jm()?.quizPassed??!0;return!(s&&i&&!RC())||window.viewType==="preview"?null:(0,o.jsxs)("div",{className:iu("completed-info"),children:[(0,o.jsxs)("div",{className:iu("completed-info-avatar"),children:[(0,o.jsx)(QW,{...t??{},decorative:!0}),(0,o.jsx)("img",{alt:"",className:iu("completed-info-trophy"),src:WW})]}),(0,o.jsxs)("div",{className:iu("completed-info-label"),children:[(0,o.jsx)("span",{"aria-hidden":"true",children:n?.coverCompleted||"Completed"}),(0,o.jsx)("span",{className:"visually-hidden",children:n?.a11yCoverCourseCompleted||"Course Completed"})]}),e&&(0,o.jsx)(KW,{})]})}const cp=V("cover");function ZW(e,t,n){return e===1?t:n}function YW(){const e=Hb(),t=Ce(),n=ZW(e,t?.coverLesson||"Lesson",t?.coverLessons||"Lessons");return(0,o.jsxs)("li",{className:cp("num-lessons"),role:"listitem",children:[(0,o.jsx)("span",{className:cp("num-lessons-value"),children:e}),"\xA0",(0,o.jsx)("span",{className:cp("num-lessons-units"),children:n})]})}const q3=6e4,X3=60*q3,lp=V("cover");function qW(e){return Math.round(10*e)/10}function J3(e,t,n){return e===1?t:n}function XW(){const{showTimeToComplete:e,timeToComplete:t}=le(),n=Ce();if(!e)return null;const s=Number(t??0),r=s>=X3,i=r?qW(s/X3):s/q3,a=r?J3(i,n?.coverHour||"Hour",n?.coverHours||"Hours"):J3(i,n?.coverMinute||"Minute",n?.coverMinutes||"Minutes");return(0,o.jsxs)("li",{className:lp("time-to-complete"),role:"listitem",children:[(0,o.jsx)("span",{className:lp("time-to-complete-value"),children:i}),"\xA0",(0,o.jsx)("span",{className:lp("time-to-complete-units"),children:a})]})}const dp=V("cover");function e6(){const e=Ce();return null}const JW=/^(\d{4})-(\d{2})-(\d{2})$/;function Xo(e){return e instanceof Date?new Date(e.getTime()):typeof e=="string"?eK(e)??new Date(e):new Date(e)}function eK(e){const t=JW.exec(e);if(t===null)return null;const n=Number(t[1]),s=Number(t[2])-1,r=Number(t[3]),i=new Date(0);return i.setFullYear(n,s,r),i.setHours(0,0,0,0),i.getFullYear()!==n||i.getMonth()!==s||i.getDate()!==r?new Date(Number.NaN):i}function tK(e){return e==null?!1:!Number.isNaN(Xo(e).getTime())}function nK(e,t){const n=Xo(e),s=Xo(t);if(Number.isNaN(n.getTime())||Number.isNaN(s.getTime()))return!1;const r=[n.getFullYear(),n.getMonth(),n.getDate()],i=[s.getFullYear(),s.getMonth(),s.getDate()];for(let a=0;a<r.length;a++){if(r[a]<i[a])return!0;if(r[a]>i[a])return!1}return!0}function sK(e,t){const n=Xo(e);return n.setDate(n.getDate()+t),n}const oK=new Intl.DateTimeFormat("en-US",{day:"numeric",month:"long",year:"numeric"}),rK={shortMonthDay:up({day:"numeric",month:"short"}),numericDate:up({day:"2-digit",month:"2-digit",year:"2-digit"}),longMonthDayYear:up({day:"numeric",month:"long",year:"numeric"}),longOrdinalDate:iK};function au(e,t){const n=Xo(e);return Number.isNaN(n.getTime())?"Invalid date":rK[t](n)}function up(e){const t=new Intl.DateTimeFormat("en-US",e);return n=>t.format(n)}function iK(e){return oK.formatToParts(e).map(t=>t.type==="day"?`${t.value}${aK(e.getDate())}`:t.value).join("")}function aK(e){if(Math.trunc(e%100/10)===1)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}const cK=864e5,t6=146097,n6=4800,Tc={secondsToMinute:45,minutesToHour:45,hoursToDay:22,daysToMonth:26,monthsToYear:11};function lK(e,t){const n=Xo(e),s=Xo(t);return Number.isNaN(n.getTime())||Number.isNaN(s.getTime())?"Invalid date":uK(dK(n,s))}function dK(e,t){return e.getTime()<=t.getTime()?s6(e,t):s6(t,e)}function s6(e,t){let n=t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,s=o6(e,n);return s.getTime()>t.getTime()&&(n-=1,s=o6(e,n)),{milliseconds:t.getTime()-s.getTime(),months:n}}function o6(e,t){const n=new Date(e.getTime()),s=n.getDate();n.setDate(1),n.setMonth(n.getMonth()+t);const r=new Date(n.getTime());return r.setMonth(r.getMonth()+1),r.setDate(0),n.setDate(Math.min(s,r.getDate())),n}function uK(e){const t=e.milliseconds/cK,s=Math.round(mK(e.months))+t,r=e.months+hK(t),i=Math.round(s*24*60*60),a=Math.round(s*24*60),c=Math.round(s*24),l=Math.round(s),d=Math.round(r),h=Math.round(r/12);return i<Tc.secondsToMinute?"a few seconds":a<=1?"a minute":a<Tc.minutesToHour?`${a} minutes`:c<=1?"an hour":c<Tc.hoursToDay?`${c} hours`:l<=1?"a day":l<Tc.daysToMonth?`${l} days`:d<=1?"a month":d<Tc.monthsToYear?`${d} months`:h<=1?"a year":`${h} years`}function hK(e){return e*n6/t6}function mK(e){return e*t6/n6}const fK=864e5,hp=e=>{if(!e)return"";const t=Xo(e),n=t.getTime();if(Number.isNaN(n))return"Due Invalid date";const s=new Date,r=s.getTime();return n<r?"Overdue":n<r+fK?`Due in ${lK(s,t)}`:`Due ${au(t,"shortMonthDay")}`},pK=e=>e==null?!1:nK(e,sK(new Date,3)),gK=V("cover");function vK(e){return typeof e=="object"&&e!=null}function CK(e){return e==null||typeof e=="string"||typeof e=="number"||e instanceof Date}function xK(e){if(!vK(e))return;const t=e.dueAt;return CK(t)?t:void 0}function ibe(){const e=Hr(),t=xK(e),n=Xy(e?.themeId??e?.theme?.themeId),s=$O(),r=Jm(),i=r==null||r.quizPassed||r.outOfAttempts,a=pK(t),c=n===se.RISE_CLASSIC?a?"brand--background":"brand--color":"",l=gK("due-date",{urgent:a}).mix(c);return!t||s&&i?null:(0,o.jsx)("div",{className:l,children:hp(t)})}const bK=e=>{const t=e.indexOf("-");return t===-1?e:e.slice(0,t)},abe=(e,t)=>{const n=bK(e);return t.find(({iso639Code:s})=>s===e)||t.find(({iso639Code:s})=>s===n)||t.find(({defaultId:s,defaultSet:r})=>r&&s===1)},Ki=({percent:e,label:t,isRTL:n})=>{if(t.includes("%")){const s=n?`%${e}`:`${e}%`;return t.replace("%",s)}return`${e} ${t}`},r6=({failed:e,complete:t})=>{const n=Ce();return(0,o.jsxs)("span",{className:"visually-hidden-always",children:[e?n?.a11yCoverRequirementFailed||"Requirement failed":t?n?.a11yCoverRequirementComplete||"Requirement complete":n?.a11yCoverRequirementIncomplete||"Requirement incomplete",": "]})},Is=V("cover");function lbe(){const e=le(),t=Ce(),{trackingCompletionPercentage:n,trackingQuizId:s}=e;return n==null&&!s?null:(0,o.jsxs)("section",{className:Is("requirements-section"),children:[(0,o.jsx)("h2",{className:Is("requirements-title"),children:t?.coverCourseRequirements||"Course Requirements"}),(0,o.jsxs)("ul",{className:Is("requirements-list"),children:[(0,o.jsx)(yK,{}),(0,o.jsx)(IK,{})]})]})}function yK(){const{trackingCompletionPercentage:e}=le(),t=Hb(),n=Ai(),s=Ce();if(e==null)return null;const r=Math.ceil(e/100*t),i=r===t,a=n!=null&&n>=e,c=a?UU:GU;return(0,o.jsxs)("li",{className:Is("lesson-requirement"),role:"listitem",children:[(0,o.jsx)(c,{"aria-hidden":"true",className:Is("lesson-requirement-icon",{complete:a}).toString()}),(0,o.jsxs)("span",{className:Is("lesson-requirement-text"),children:[(0,o.jsx)(r6,{complete:a}),i?s?.coverCompleteAllLessons||"Complete all lessons in this course":[s?.coverCompleteLessonsName||"Complete",r,s?.coverCompleteLessonsPreposition||"of",t,s?.coverCompleteLessonsInCourse||"lessons in this course"].join(" ")]})]})}const SK={passed:QU,failed:KU,requirement:ZU};function IK(){const e=Ce(),t=zO(),n=Jm(),s=fs(),r=bt(t?.title),i=t?.settings?.passingScore;if(!r||!n)return null;const{outOfAttempts:a,quizPassed:c}=n,l=!c&&a;let d="requirement";c?d="passed":l&&(d="failed");const h=SK[d],m=i!=null?Ki({percent:Number(i),label:e?.coverQuizPercentOrHigher||"% or higher",isRTL:s}):null;return(0,o.jsxs)("li",{className:Is("quiz-requirement"),role:"listitem",children:[(0,o.jsx)(h,{"aria-hidden":"true",className:Is("quiz-requirement-icon",{type:d}).toString()}),(0,o.jsxs)("span",{className:Is("quiz-requirement-text"),children:[(0,o.jsx)(r6,{complete:c,failed:l}),r,i!=null&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{"aria-hidden":"true",className:Is("quiz-requirement-seperator"),children:"\xA0|\xA0"}),e?.coverQuizScoreOf||"Score of"," ",m]}),l&&(0,o.jsx)("div",{className:Is("quiz-requirement-no-attempts"),children:e?.coverNoAttemptsRemaining||"No attempts remaining"})]})]})}function i6(e,t){const n=(0,u.useMemo)(()=>matchMedia(`(${e}: ${t*.0625}em)`),[e,t]),[s,r]=(0,u.useState)(n.matches);return(0,u.useEffect)(()=>{const i=n.addEventListener??n.addListener,a=n.removeEventListener??n.removeListener;return i.call(n,"change",c),()=>a.call(n,"change",c);function c(){r(n.matches)}},[n]),s}function Xt(e){return i6("max-width",e-1)}function TK(e){return i6("min-width",e)}const Lc=Rs()("partner-content-course-author__"),LK=({partnerContentAuthors:e,darkText:t,isImage:n,learn:s,lesson:r,isOnePage:i,selectedContentId:a})=>{const c=Or()(dt()("id",a),e),l=Vo()(["data","authors"],c),h=(r?l:e).filter(v=>v.name),m=X()(Lc("author-container"),{[Lc("author-container-padding-top")]:t}),f=X()({[Lc("gray-text")]:!s&&!i}),p=X()(Lc("author-image")),g=v=>`url(${dc({width:"76",height:"76",imageKey:v.image})})`;return(0,o.jsxs)("section",{children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Authors"}),(0,o.jsx)("ol",{className:m,"data-testid":"partner-content-course-author-container",role:"list",children:h.map(v=>(0,o.jsxs)("li",{className:Lc("author"),"data-testid":"partner-content-course-author",role:"listitem",children:[(0,o.jsx)("div",{"aria-hidden":"true",className:p,"data-testid":"partner-content-course-author-image",disabled:n,style:{backgroundImage:g(v)}}),(0,o.jsx)("span",{className:f,children:v.name})]},v.name))})]})},Qi=V("cover"),ube=()=>{const e=$m();if(e==null)return null;const{avatar:t,authorName:n,title:s}=e;return(0,o.jsxs)("div",{className:Qi("author-with-title"),children:[(0,o.jsx)(a6,{avatar:t}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:Qi("author-name"),children:n}),(0,o.jsx)("div",{className:Qi("author-title"),children:s})]})]})},a6=({avatar:e})=>{const t=Qi("header-content-authors-avatar");return e?(0,o.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",style:{backgroundImage:`url(${yt(e)})`}}):(0,o.jsx)("div",{className:t,"data-testid":"cover-header-content-authors-avatar",children:(0,o.jsx)(rp,{decorative:!0})})},EK=({className:e})=>{const{partnerContentId:t,selectedAuthorId:n,theme:s,themeId:r}=le(),{coverPageType:i}=s??{},{authorName:a,avatar:c}=$m()??{},l=Ce(),d=l$(),h=!!t&&d!=null,f=Xt(768)&&TO(r,i),p=i===fe.LEFT_OVERLAY||i===fe.CENTERED_OVERLAY||f;if(n==="none")return null;const g=a||"Unknown User",v=Qi("header-content-authors").mix(e),x=Qi("header-content-authors-name");return h?(0,o.jsx)("div",{className:v,"data-testid":"cover-authors",children:(0,o.jsx)(kK,{isImage:p,learn:!0,partnerContentAuthors:d})}):(0,o.jsxs)("div",{className:v,"data-testid":"cover-authors",children:[(0,o.jsx)(a6,{avatar:c}),(0,o.jsxs)("div",{className:x,"data-testid":"cover-header-content-authors-name",children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:l?.a11yAuthorPrefix}),(0,o.jsx)("span",{children:g})]})]})},kK=LK,Ds=EK,NK=V("cover");function wK({className:e="",type:t,...n}){const s=Lt(),r=X()(NK("details-content-heading",{type:t}).toString(),e,{"brand--ui":s===se.RISE_CLASSIC});return(0,o.jsx)("header",{...n,className:r})}const jK=V("cover");function AK({children:e,title:t,type:n}){const s=le(),{description:r,media:i,partnerContentId:a}=s??{},c=!!a,d=(i&&"image"in i?i.image?.key:null)!=null,m=n==="outline"?r?!d&&!c?"outline-no-logo":c&&!d?"outline-has-partner-content":c&&d?"outline-has-pc-and-logo":"outline":"outline-no-description":n;return(0,o.jsxs)("section",{className:jK("details-content-section",{type:m}),children:[t&&(0,o.jsx)(wK,{type:n,children:(0,o.jsx)("h2",{children:t})}),e]})}const RK=V("cover"),PK=({children:e,type:t})=>(0,o.jsx)("section",{className:RK("details-content-section",{type:t}),children:e});function cu(e){return Lt()===se.HORIZON?(0,o.jsx)(AK,{...e}):(0,o.jsx)(PK,{...e})}const mp=e=>xs(e)===ke.LIGHT;var hbe;const bn=Rs()("partner-content-book-info__"),c6=e=>{const{authors:t,backgroundColor:n,bookImage:s,bookTitle:r,buyLink:i,block:a,trackingInfo:c}=e,d=Ve()?.publishedAt,h=Hy(),m=t.filter(k=>!en()(k.name)),f=At()(k=>k.name,m),p=f.length>1?yi()(" & ",f):f[0],g=p.slice(-1)==="s"?"":"s",v=mp(n),x=X()({[bn("book-image-block")]:a&&!v},{[bn("book-image-block")&&bn("dark-theme-book-image")]:a&&v},{[bn("book-image-course")]:!a}),b=bn(a?"flex-block":"flex-course"),y=bn(a?"image-container-block":"image-container-course"),T=X()(bn("small-text"),{[bn("dark-theme")]:v}),S=X()(bn("black-text"),{[bn("dark-theme")]:v}),I=X()(bn("button"),{[bn("dark-theme-button")]:v}),L=dc({height:"210",width:"140",imageKey:s}),E=(0,u.useCallback)(()=>{},[d,h,c]);return(0,o.jsxs)("section",{className:b,children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Book Info"}),(0,o.jsx)("div",{"aria-hidden":"true",className:y,children:s?(0,o.jsx)("img",{alt:"",className:x,src:L}):(0,o.jsx)("div",{className:x})}),(0,o.jsxs)("div",{className:bn("text-container"),children:[(0,o.jsxs)("p",{className:T,children:["From ",p,"'",g]}),(0,o.jsx)("p",{className:S,children:r}),(0,o.jsx)("a",{className:I,href:i,onClick:E,rel:"noopener noreferrer",target:"_blank",children:"Buy the book"})]})]})};var fbe;const qn=Rs()("partner-content-partner-info__"),l6=({backgroundColor:e,block:t,link:n,trackingInfo:s})=>{const i=Ve()?.publishedAt,a=Hy(),c=t?hO():mO(),l=qn(t?"nbic-logo-light-bulb":"nbic-logo"),d=qn(t?"block-logo-container":"logo-container"),h=mp(e),m=X()(qn("small-text"),{[qn("dark-theme")]:h}),f=X()(qn("black-text"),{[qn("dark-theme")]:h}),p=X()(qn("button"),{[qn("dark-theme-button")]:h}),g=(0,u.useCallback)(()=>{},[i,a,s]);return(0,o.jsxs)("section",{className:qn("flex"),children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Partner Info"}),(0,o.jsx)("div",{"aria-hidden":"true",className:d,children:(0,o.jsx)("img",{alt:"",className:l,src:c})}),(0,o.jsxs)("div",{className:qn("text-container"),children:[(0,o.jsx)("p",{className:m,children:"In partnership with"}),(0,o.jsx)("p",{className:f,children:"Next Big Idea Club"}),(0,o.jsx)("a",{className:p,href:n,onClick:g,rel:"noopener noreferrer",target:"_blank",children:"Learn more"})]})]})},Zi=Rs()("partner-content-author-card__"),d6=e=>{const{partnerContent:t}=e,n=Ve(),{id:s,tenantId:r}=n??{},{data:i,type:a}=t,{authors:c,bookImage:l,bookTitle:d,buyLink:h,internalId:m,nbicLink:f}=i,p=c.filter(y=>y.name),g={courseId:s,partnerContentId:t.id,partnerContentInternalId:m,tenantId:r,contentSubtype:a},v=X()(Zi("flex"),Zi("author-container")),x=y=>dc({width:"122",height:"122",imageKey:y}),b=(y,T)=>(0,o.jsx)("div",{"aria-hidden":"true",className:Zi("image-container"),children:y?(0,o.jsx)("img",{alt:T,className:Zi("author-image"),src:x(y)}):(0,o.jsx)("div",{className:Zi("author-image")})});return(0,o.jsxs)("ol",{className:"partner-content-author-card","data-testid":"partner-content-author-card",role:"list",children:[(0,o.jsx)("li",{role:"listitem",children:(0,o.jsxs)("section",{children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"Authors"}),p.map(y=>(0,o.jsxs)("li",{className:v,children:[b(y.image,y.name),(0,o.jsx)("p",{className:Zi("author-name-text"),children:y.name})]},y.name))]})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(c6,{authors:c,bookImage:l,bookTitle:d,buyLink:h,trackingInfo:g})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(l6,{link:f,trackingInfo:g})})]})},MK=V("cover");function OK({hasLogo:e}){const t=pc();if(!t)return null;const n=MK("details-content-aside",{logo:e});return(0,o.jsx)("div",{className:n,children:(0,o.jsx)(cu,{type:"partner-content",children:(0,o.jsx)(d6,{partnerContent:t})})})}const BK=V("cover"),DK=({coursePartnerContent:e})=>(0,o.jsx)(cu,{type:"partner-content",children:(0,o.jsx)(d6,{partnerContent:e})}),FK=({hasLogo:e})=>{const t=pc(),n=t!=null,s=BK("details-content-aside",{logo:e});return(0,o.jsxs)("div",{className:s,children:[!1,t&&(0,o.jsx)(DK,{coursePartnerContent:t}),!1,!1]})},_K=e=>Lt()===se.HORIZON?(0,o.jsx)(OK,{...e}):(0,o.jsx)(FK,{...e});function Cbe(e){const t=new Map;return n=>{if(t.has(n))return t.get(n);const s=e(n);return t.set(n,s),s}}function lu(e,t={}){let n;return()=>{if(n==null){const s=e();n=s,t.clearOnReject&&s.catch(()=>{n===s&&(n=void 0)})}return n}}function HK(e,t={}){const n=new WeakMap;return s=>{const r=n.get(s);if(r!=null)return r;const i=e(s);return n.set(s,i),t.clearOnReject&&i.catch(()=>{n.get(s)===i&&n.delete(s)}),i}}const u6=lu(async()=>(await C.e("math").then(C.bind(C,8660))).browserAdaptor(),{clearOnReject:!0}),h6=lu(async()=>{const[{TeX:e},{AllPackages:t}]=await Promise.all([C.e("math").then(C.t.bind(C,91036,23)),C.e("math").then(C.bind(C,15801))]);return new e({packages:t})}),m6=lu(async()=>{const e=await C.e("math").then(C.t.bind(C,56260,23));return new e.SVG({fontCache:"local"})},{clearOnReject:!0}),f6=lu(async()=>{const[e,t,n,{RegisterHTMLHandler:s},{mathjax:r}]=await Promise.all([u6(),h6(),m6(),C.e("math").then(C.bind(C,33805)),C.e("math").then(C.bind(C,13067))]);return s(e),r.document(document,{InputJax:t,OutputJax:n})},{clearOnReject:!0}),VK=HK(async e=>{const t=new CSSStyleSheet;e.adoptedStyleSheets.push(t);const[n,s]=await Promise.all([m6(),f6()]),r=n.styleSheet(s);r instanceof HTMLStyleElement&&await t.replace(r.innerText)},{clearOnReject:!0});class zK extends HTMLElement{static observedAttributes=["long-description","short-description","tex"];_ready;_anchor=this;_renderController;constructor(){super(),this._ready=VK(this.ownerDocument)}get longDescription(){return this.getAttribute("long-description")??null}set longDescription(t){t==null?this.removeAttribute("long-description"):this.setAttribute("long-description",t)}get shortDescription(){return this.getAttribute("short-description")??null}set shortDescription(t){t==null?this.removeAttribute("short-description"):this.setAttribute("short-description",t)}get tex(){return this.getAttribute("tex")??""}set tex(t){this.setAttribute("tex",t)}disconnectedCallback(){this._renderController?.abort()}attributeChangedCallback(t){t==="tex"?this._renderTex():this._renderAria()}async _renderTex(){this._renderController?.abort();const t=this._renderController=new AbortController,[n,s,r]=await Promise.all([f6(),u6(),h6(),this._ready]);if(t.signal.aborted)return;r.reset();const{tex:i}=this,a=i.includes("begin{")?i:String.raw`\begin{align*}${i}\end{align*}`,c=n.convert(a),l=s.firstChild(c),d=document.evaluate("//@data-mjx-error",l,null,XPathResult.STRING_TYPE).stringValue;if(d.length>0){let h=d;if(d===String.raw`Missing \begin{align*} or extra \end{align*}`){const m=n.convert(i),f=s.firstChild(m);h=document.evaluate("//@data-mjx-error",f,null,XPathResult.STRING_TYPE).stringValue??"An error occured"}this.dispatchEvent(new $K("matherror",{bubbles:!1,composed:!1,detail:{errorMessage:h}})),this._anchor.replaceChildren()}else this._anchor.replaceChildren(l);await this._renderAria()}async _renderAria(){if(await this._ready,this._renderController?.signal.aborted||this.firstElementChild==null)return;const t=[this.shortDescription,this.longDescription].filter(n=>(n?.length??0)>0).join(`

`);this.firstElementChild.ariaLabel=t.trim().length===0?null:t}}customElements.define("rise-math",zK);class $K extends CustomEvent{}var Ts=C(63657);function fp(e){if(e==null)return{value:e};let t;if(typeof e=="string"?t=e:t=e.innerHTML,!t.includes("data-editor-id"))return{value:e};const n=t.match(/^<[^>]+data-editor-id=["']([^"']+)["'][^>]*>/);if(n){const s=n[1],r=t.match(/^<[^>]*>(.*)<\/[^>]*>$/s),i=r?r[1]:t;return{editorId:s,value:typeof e=="string"?i:e}}return{value:e}}const p6=(e="")=>e.split(".").slice(-2).join("."),g6=Ue()(p6,Ae),UK=e=>e.includes("#/lessons/"),Xn=e=>{if(!e||GK(e)||UK(e))return!1;e.slice(0,2)==="//"&&(e=`https:${e}`);try{const{hostname:t}=new URL(e),n=p6(t);return n!==g6("ARTICULATE_DOMAIN")&&n!==g6("RISE_DOMAIN")}catch{return!1}},GK=e=>e?e.slice(0,7)==="mailto:":!1;function Ec(e,t){const n=[];if(e){let s=e.parentElement;for(;s&&(t?.limit==null||n.length<t.limit);){if(s===document.body){n.push(window);break}const r=window.getComputedStyle(s);(r.overflowX==="auto"||r.overflowX==="scroll"||r.overflowY==="auto"||r.overflowY==="scroll")&&n.push(s),s=s.parentElement}}return n}function v6(e){return Ec(e,{limit:1})[0]??null}function xbe(e,{block:t="nearest",inline:n}={}){e.scrollIntoView(n===void 0?{block:t}:{block:t,inline:n})}var WK;function pp(){return document.getElementById("page-wrap")}const bbe=e=>{const t=e.value.length;e.focus(),e.setSelectionRange(t,t)},ybe=e=>{const t=WK(["current","editor"],e);if(!t)return null;const n=t.value.length;return t.focus(),t.setSelectionRange(n,n),e};function du(e,t){const n=e.getBoundingClientRect(),s=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth;if(t==="start")return n.top>=0;if(t==="center"){if(n.height>s)return n.top<=0&&n.bottom>=s;const i=s/2,a=n.top+n.height/2,c=s*.25;return Math.abs(i-a)<c}return t==="end"?n.bottom<=s:n.top>=0&&n.left>=0&&n.bottom<=s&&n.right<=r}function KK(e,{behavior:t="smooth",offsetTop:n=0}={}){const s=v6(e);if(!s||!("getBoundingClientRect"in s)){const r=e.getBoundingClientRect().top+window.scrollY;window.scrollTo({top:Math.max(0,r-n),behavior:t})}else{const r=s.getBoundingClientRect().top,i=e.getBoundingClientRect().top-r,a=Math.max(0,s.scrollTop+i-n);s.scrollTo({top:a,behavior:t})}}function Sbe(e){let t=requestAnimationFrame(()=>{t=requestAnimationFrame(e)});return()=>{cancelAnimationFrame(t)}}function gp({anchor:e,popover:t,positionX:n}){if(!e||!t)return null;const s=e.getBoundingClientRect(),i=window.getComputedStyle(e).direction==="rtl",a=window.getComputedStyle(t),c=parseFloat(a.marginTop),l=t.offsetWidth,d=window.visualViewport??{width:window.innerWidth,height:window.innerHeight},h=s.top+s.height+t.offsetHeight+c>d.height?s.top-(c*2+t.offsetHeight):s.top+s.height;let m;if(n==="center"){const f=s.left+s.width/2;m=i?d.width-f-l/2:f-l/2}else n==="right"?m=i?d.width-s.left-l:s.right-l:m=Math.min(i?d.width-s.right:s.left,d.width-l);return{left:m,top:h}}function C6(e){const t=document.getElementById(e);try{return t?.matches(":popover-open")??!1}catch{return!1}}function x6(e){if(e==null)return null;try{const t=e.querySelectorAll(":popover-open"),n=t.item(t.length-1);return n instanceof HTMLElement?n:null}catch{return null}}function QK(e){return x6(e)!=null}function ZK(e){const t=x6(e);return t==null?!1:(t.hidePopover(),!0)}const vp=V("external-link-disabled-popover"),b6=12,Cp="external-link-disabled-popover--open",uu="external-link-disabled-popover-visibility-change",Ls=e=>`trial-external-link-popover-${e}`;function hu(e){return document.getElementById(Ls(e))}function y6(e){const t=document.getElementById(e),n=hu(e);if(!t||!n)return;const s=gp({anchor:t,popover:n,positionX:"center"});if(!s)return;const r=window.visualViewport?.width??window.innerWidth,i=window.visualViewport?.height??window.innerHeight,a=Math.max(0,r-n.offsetWidth),c=Math.min(Math.max(0,s.left),a),l=window.getComputedStyle(t).direction==="rtl",d=l?-c:c,h=t.getBoundingClientRect(),m=Number.parseFloat(window.getComputedStyle(n).marginBlockStart)||0,f=h.top-(m*2+n.offsetHeight),p=h.bottom,g=h.top-m-n.offsetHeight>=0,v=h.bottom+m+n.offsetHeight<=i,x=g||!v&&h.top>=i-h.bottom,b=x?f:p,y=l?r-n.offsetWidth-c:c,T=h.left+h.width/2-y,S=l?n.offsetWidth-T:T,I=Math.min(Math.max(b6,S),n.offsetWidth-b6),L=x?"above":"below";n.dataset.placement=L,n.style.setProperty("--external-link-disabled-popover-tail-offset",`${I}px`),n.style.transform=`translate3d(${d}px, ${b}px, 0)`}function S6(e){const t=hu(e);if(t)try{typeof t.showPopover=="function"?C6(t.id)||t.showPopover():t.classList.add(Cp),y6(e),t.dispatchEvent(new window.Event(uu))}catch{}}function xp(e){const t=hu(e);if(t)try{typeof t.hidePopover=="function"?t.hidePopover():t.classList.remove(Cp),t.dispatchEvent(new window.Event(uu))}catch{}}function mu(e={}){const{delay:t=200}=e,n=u.useRef(new Map),s=u.useRef(new Map),r=u.useCallback(d=>{const h=s.current.get(d);if(h)return h;const m={focused:!1,hovered:!1};return s.current.set(d,m),m},[]),i=u.useCallback(d=>{const h=r(d);h.hovered=!0;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{S6(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),a=u.useCallback(d=>{const h=r(d);h.hovered=!1;const m=n.current.get(d);m&&clearTimeout(m);const f=setTimeout(()=>{!h.focused&&!h.hovered&&xp(d),n.current.delete(d)},t);n.current.set(d,f)},[t,r]),c=u.useCallback(d=>{const h=r(d);h.focused=!0;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),S6(d)},[r]),l=u.useCallback(d=>{const h=r(d);h.focused=!1;const m=n.current.get(d);m&&(clearTimeout(m),n.current.delete(d)),h.hovered||xp(d)},[r]);return u.useEffect(()=>{const d=n.current,h=s.current;return()=>{d.forEach(m=>clearTimeout(m)),d.clear(),h.clear()}},[]),{handleMouseEnter:i,handleMouseLeave:a,handleFocus:c,handleBlur:l}}function YK(e){return t=>{const{handleMouseEnter:n,handleMouseLeave:s,handleFocus:r,handleBlur:i}=mu(),a=u.useId();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(e,{...t,ariaDescribedBy:t.externalLinksDisabled?Ls(a):void 0,attachmentId:a,onLinkBlur:i,onLinkFocus:r,onLinkMouseEnter:n,onLinkMouseLeave:s}),t.externalLinksDisabled&&(0,o.jsx)(fu,{anchorId:a})]})}}const fu=({anchorId:e})=>{const t=Ls(e);return u.useEffect(()=>{const n=s=>{s.key==="Escape"&&xp(e)};return document.addEventListener("keydown",n),()=>{document.removeEventListener("keydown",n)}},[e]),u.useEffect(()=>{const n=document.getElementById(e),s=hu(e);if(!n||!s)return;const r=Ec(n);let i=null,a=null;const c=()=>{i==null&&(i=window.requestAnimationFrame(()=>{i=null,y6(e)}))},l=()=>{a?.abort(),a=null,i!=null&&(window.cancelAnimationFrame(i),i=null)},d=()=>{if(l(),s.classList.contains(Cp)||C6(s.id)){a=new window.AbortController;const{signal:h}=a;for(const m of r)m.addEventListener("scroll",c,{passive:!0,signal:h});window.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("resize",c,{signal:h}),window.visualViewport?.addEventListener("scroll",c,{passive:!0,signal:h})}};return s.addEventListener(uu,d),()=>{s.removeEventListener(uu,d),l()}},[e]),(0,o.jsxs)("div",{className:vp(),id:t,popover:"manual",role:"tooltip",children:[(0,o.jsx)("div",{className:vp("header"),children:"Subscribe to unlock full access"}),(0,o.jsx)("div",{className:vp("content"),children:"To protect learners from phishing, scams, or malicious redirects, external links are disabled when sharing with Quick Share during your trial."})]})},qK=({allowTabNavigation:e=!0,className:t="","data-testid":n,id:s,ref:r,tagName:i="div",transformValue:a,value:c})=>{const l=Ve(),d=l&&"externalLinksDisabled"in l?l.externalLinksDisabled:!1,h=Kt(),m=(0,u.useRef)(null),f=u.useId().replaceAll(":",""),p=Oe(c),[g,v]=(0,u.useState)([]),{handleMouseEnter:x,handleMouseLeave:b,handleFocus:y,handleBlur:T}=mu(),{currentLocale:S}=at(),I=Hn(),L=(0,u.useMemo)(()=>{const E=p??"",k=a?a(E):E,N=dh(k),R=typeof N=="string"?N:"",M=Array.prototype.concat(iQ,aQ,tQ,JK,eQ(S,I),d?nQ(f):[],e?oQ:sQ,rQ(h?.a11yNoticeLinkNewTab));return XK(M,R)},[e,S,I,f,d,h,a,p]);return(0,u.useLayoutEffect)(()=>{if(!d||!m.current){v([]);return}const E=[];m.current.querySelectorAll("[data-tooltip-target]").forEach((N,R)=>{const M=N.nextElementSibling;if(M?.hasAttribute("data-external")){const A=M.getAttribute("data-external-text")||"",j=M.getAttribute("data-external-id")||`link-${R}`;E.push({placeholder:N,text:A,id:j})}}),v(E)},[L,d]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{"aria-hidden":e?void 0:!0,className:`${t} brand--linkColor`,"data-l10n-id":Ot(c),"data-testid":n,id:s,ref:E=>{m.current=E,typeof r=="function"?r(E):r&&(r.current=E)},children:(0,u.createElement)(i,{className:"fr-view rise-tiptap",dangerouslySetInnerHTML:(0,u.useMemo)(()=>({__html:L}),[L])})}),g.map(({placeholder:E,text:k,id:N})=>(0,o.jsxs)(u.Fragment,{children:[(0,Ts.createPortal)((0,o.jsx)("span",{"aria-describedby":Ls(N),className:"external-link-disabled-popover__anchor",id:N,onBlur:()=>T(N),onFocus:()=>y(N),onMouseEnter:()=>x(N),onMouseLeave:()=>b(N),role:"button",tabIndex:0,children:k}),E),(0,o.jsx)(fu,{anchorId:N})]},N))]})};function XK(e,t){const n=document.createElement("div");n.innerHTML=t;for(const s of e)s(n);return n.innerHTML}const I6=e=>e.getAttribute("data-link-type")==="lesson"?!0:(e.getAttribute("href")??"").startsWith("#/lessons/");function JK(e){for(const t of e.querySelectorAll("a")){I6(t)?t.removeAttribute("target"):t.setAttribute("target","_blank");const s=new Set((t.getAttribute("rel")??"").split(/\s+/));s.delete("opener"),s.add("noopener"),s.add("noreferrer"),s.add("nofollow"),t.setAttribute("rel",Array.from(s).join(" "))}}function eQ(e,t){return n=>{if(!(!e||e===t)){for(const s of n.querySelectorAll("a"))if(I6(s)){const r=s.getAttribute("href");if(r){const i=r.includes("?")?"&":"?";s.setAttribute("href",`${r}${i}locale=${encodeURIComponent(e)}`)}}}}}function tQ(e){for(const t of e.querySelectorAll("table"))if(!t.parentElement.classList.contains("rise-table-wrap")){const n=document.createElement("div");n.className="rise-table-wrap",t.parentNode.replaceChild(n,t),n.appendChild(t)}}function nQ(e){return t=>{let n=0;const s=[];for(const r of t.querySelectorAll("a"))if(Xn(r.href)){const i=r.textContent||"",a=`external-link-anchor-${e}-${n++}`;r.removeAttribute("href"),r.removeAttribute("rel"),r.removeAttribute("target"),r.setAttribute("data-external",""),r.setAttribute("data-external-text",i),r.setAttribute("data-external-id",a),r.setAttribute("role","button"),r.style.display="none";const c=document.createElement("span");c.setAttribute("data-tooltip-target",""),r.parentNode?.insertBefore(c,r),s.push({placeholder:c,text:i,id:a})}return s}}function sQ(e){for(const t of e.querySelectorAll("a"))t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex","-1")}function oQ(e){for(const t of e.querySelectorAll("a"))t.removeAttribute("aria-hidden"),t.hasAttribute("data-external")?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}function rQ(e="(opens in a new tab)"){return t=>{for(const n of t.querySelectorAll('a[target="_blank"]')){const s=document.createElement("span");s.className="visually-hidden-always",s.textContent=e,n.appendChild(s)}}}function iQ(e){return fp(e).value}function aQ(e){for(const t of e.querySelectorAll("rise-math")){const{shortDescription:n,longDescription:s}=t,r=t.querySelector('[slot="short-description"]'),i=t.querySelector('[slot="long-description"]');n==null&&r!=null&&(t.shortDescription=r.textContent),s==null&&i!=null&&(t.longDescription=i.textContent)}return e}const Re=qK,bp=e=>e==="<p><br></p>"?"":e,cQ=()=>Xt(1200),T6=()=>Xt(480),lQ=V("cover"),dQ="longMonthDayYear";function L6({format:e=dQ}){const{publishedAt:t}=le(),n=Ce(),s=lQ("details-content-published-at");return!t||!tK(t)?null:(0,o.jsxs)("div",{className:s,children:[n?.coverPublished||"Published"," ",au(t,e)]})}const yp={field:"title",kind:"artifactField"},Sp={field:"description",kind:"artifactField"};function E6(e){return{field:"title",kind:"lessonField",lesson:String(e)}}function uQ(e){return{field:"description",kind:"lessonField",lesson:String(e)}}function hQ(e){return{block:String(e),kind:"block"}}function mQ(e){return{kind:"slide",slide:String(e)}}function fQ(e,t){return{kind:"question",lesson:String(e),question:String(t)}}function k6(e,t){const n={kind:e.kind};switch(t!=null&&(n.artifact=t.artifact),e.kind){case"artifactField":n.field=e.field;break;case"lessonField":n.lesson=e.lesson,n.field=e.field;break;case"block":n.block=e.block;break;case"slide":n.lesson=e.slide;break;case"question":n.lesson=e.lesson,n.question=e.question;break}return t?.locale!=null&&(n.locale=t.locale),n}function Ibe(e){return k6(e,void 0)}function pQ(e){return k6(e,e)}var gQ,vQ;const CQ=V("comment-preview-anchor"),xQ=V("comment-preview-target");function N6(e,t){return t==="slide"?e==="slide":e!=="slide"}const Ip=(0,u.createContext)(null);function Tbe({children:e,CommentBubble:t,courseId:n,locale:s,targetScope:r}){const i=vQ(()=>({CommentBubble:t,courseId:n,locale:s,targetScope:r}),[t,n,s,r]);return gQ(Ip,{value:i,children:e})}function Jn({anchor:e,children:t,label:n,rail:s="course"}){const r=(0,u.useContext)(Ip);if(r==null||N6(e.kind,r.targetScope)===!1)return t??null;const i=e.kind==="artifactField"||e.kind==="lessonField",a=xQ({"artifact-field":e.kind==="artifactField","lesson-field":e.kind==="lessonField",block:e.kind==="block",question:e.kind==="question",slide:e.kind==="slide",title:i&&e.field==="title",description:i&&e.field==="description","quiz-rail":s==="quiz"}),c=(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)("span",{className:a,children:(0,o.jsx)(r.CommentBubble,{label:n,tags:pQ(bQ(e,r))})})});return t==null?c:(0,o.jsxs)("div",{className:CQ(),children:[t,c]})}function w6(e){const t=(0,u.useContext)(Ip);return t!=null&&N6(e,t.targetScope)}function bQ(e,{courseId:t,locale:n}){switch(e.kind){case"artifactField":return{...e,artifact:t,locale:n};case"lessonField":return{...e,artifact:t,locale:n};case"block":return{...e,artifact:t,locale:n};case"question":return{...e,artifact:t,locale:n};case"slide":return{...e,artifact:t,locale:n}}}const j6=V("cover");function yQ(){const e=le(),t=cQ(),n=Oe(e?.description);if(!n)return null;const s=Vi("description"),r=(0,an.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":s};return(0,o.jsx)("div",{...r,children:(0,o.jsxs)("section",{className:j6("details-content-section"),children:[t?(0,o.jsx)(e6,{}):(0,o.jsx)(L6,{}),(0,o.jsx)(Jn,{anchor:Sp,label:"Comments on course description",children:(0,o.jsx)(Re,{className:j6("details-content-description"),value:bp(n)},"text")})]})})}const SQ=()=>Xt(1200),pu=()=>Xt(480),A6=V("cover");function IQ(){const e=le(),t=SQ(),n=Oe(e?.description);if(!n)return null;const s=Vi("description"),r=(0,an.uW)(e?.description)?{"data-l10n-id":e?.description?.l10nId}:{"data-change-path":s};return(0,o.jsx)("div",{...r,children:(0,o.jsxs)("section",{className:A6("details-content-section"),children:[t&&(0,o.jsx)(e6,{}),(0,o.jsx)(Jn,{anchor:Sp,label:"Comments on course description",children:(0,o.jsx)(Re,{className:A6("details-content-description"),value:bp(n)},"text")})]})})}const TQ=V("cover"),LQ=()=>{const e=le(),{navigation:t}=e,n=Oe(e.description),s=t?"description":"description-no-outline";if(!n)return null;const r=Vi("description"),i=(0,an.uW)(e.description)?{"data-l10n-id":e.description.l10nId}:{"data-change-path":r};return(0,o.jsx)(Jn,{anchor:Sp,label:"Comments on course description",children:(0,o.jsx)("div",{...i,children:(0,o.jsx)(cu,{type:s,children:(0,o.jsx)(Re,{className:TQ("details-content-description"),value:String(bp(n))},"text")})})})},EQ={[se.RISE_CLASSIC]:yQ,[se.HORIZON]:LQ,[se.APEX]:IQ};function R6(){const e=Lt(),t=EQ[e];return(0,o.jsx)(t,{})}const P6=V("cover"),Tp=({className:e=P6("details-logo"),imageClassName:t=P6("details-logo-image"),resolveImageDimensions:n})=>{const s=le()??{},r=Oe(s.media)?.image??{},{height:i,key:a,width:c,scalar:l=Aa.SMALL.value}=r,d=n?.(r.scalar,c,i),h={width:d?.width??Number(c)*l,height:d?.height??(n==null?Number(i)*l:void 0)};if(!a)return null;const m=pt(r);return(0,o.jsx)("div",{className:e.toString(),"data-testid":"cover-details-logo",children:(0,o.jsx)("img",{alt:"",className:t.toString(),"data-testid":"cover-details-logo-image",height:h.height,src:m,width:h.width})})};function kQ({icon:e,...t}){switch(e){case Gn.ARTICLE:return(0,o.jsx)(iG,{...t});case Gn.INTERACTION:return(0,o.jsx)(jW,{...t});case Gn.QUIZ:return(0,o.jsx)(LW,{...t});case Gn.VIDEO:return(0,o.jsx)(_W,{...t});default:return(0,o.jsx)("i",{className:"icon icon-Master-02"})}}var Qr=C(90313);function NQ(e){const{to:t,children:n}=e,s=(0,Be.zy)(),r=(0,u.useMemo)(()=>Th(t,s),[s,t]);return(0,o.jsx)(Be.k2,{...e,to:r,children:n})}function wQ(e){return e instanceof CustomEvent}function M6(e){document.dispatchEvent(new CustomEvent(d3,{detail:{lessonId:e}}))}function jQ(e){(0,ht.A)(d3,t=>{wQ(t)&&e(t)},document)}const O6=(0,u.createContext)(!1);function gu({children:e,inert:t}){const n=Lp();return(0,o.jsx)(O6.Provider,{value:n||t,children:e})}function Lp(){return(0,u.useContext)(O6)}function B6(e,t){(0,u.useLayoutEffect)(()=>{let n=e.current;const s=Ec(n);for(const r of s)r?.addEventListener("scroll",t);return()=>{for(const r of s)r?.removeEventListener("scroll",t)}},[t,e])}function AQ(e){return e?.sessionPreferences}function vu(){return pe(AQ)}const RQ=({children:e,className:t="lesson-link-item-tooltip",dark:n,ref:s,visible:r})=>{const i=(0,u.useMemo)(()=>V(t),[t]),a=(0,o.jsx)("div",{"aria-hidden":"true",ref:s,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,o.jsx)("div",{style:{pointerEvents:"all"},children:(0,o.jsx)("div",{className:i({visible:r}),children:(0,o.jsx)("div",{className:i("inner",{dark:n,light:!n}),children:e})})})});return(0,Ts.createPortal)(a,lo())};function PQ({labels:e,restriction:t,restrictionData:n}){if(t?.type===Rr.QUIZ)return`${e?.quizRequirePassingScore}: "${n}"`;if(t?.type===Rr.ORDER)return e?.lessonRestricted;if(t?.type===Rr.KNOWLEDGE_CHECK)return e?.knowledgeCheckCorrectAnswerRequiredNav}function D6(e){const{children:t,className:n,dark:s,restriction:r,tooltipClassName:i,style:a}=e,{prefersKeyboardNavigation:c}=vu()??{},l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=Ce(),p=Lp(),[g,v]=(0,u.useState)(!1),x=(0,u.useCallback)(()=>v(!0),[]),b=(0,u.useCallback)(()=>v(!1),[]),y=(0,u.useCallback)(()=>{h.current!=null&&(clearTimeout(h.current),h.current=null),m.current!=null&&(clearTimeout(m.current),m.current=null)},[]),T=(0,u.useCallback)(()=>{h.current=setTimeout(x,0)},[x]),S=(0,u.useCallback)(()=>{y(),c===!0&&b()},[y,b,c]),I=(0,u.useCallback)(M=>{M instanceof KeyboardEvent&&cn(M)&&g&&(M.stopPropagation(),b())},[b,g]),L=(0,u.useCallback)(()=>{document.activeElement===l.current&&(m.current!=null&&(clearTimeout(m.current),m.current=null),x())},[x]),E=(0,u.useCallback)(()=>{m.current=setTimeout(b,150)},[b]),k=(0,u.useCallback)(()=>{if(g&&l.current&&d.current){const M=l.current.getBoundingClientRect(),A=d.current.offsetParent?.getBoundingClientRect()??M,{height:j,width:P}=M,w=M.left-A.left,D=M.top-A.top;Object.assign(d.current.style,{transform:`translate(${w}px, ${D}px)`,width:`${P}px`,height:`${j}px`})}},[g]);(0,u.useEffect)(()=>{p&&v(!1)},[p]),(0,u.useEffect)(()=>y,[y]),(0,u.useLayoutEffect)(()=>k(),[k]),(0,ht.A)("resize",k,window),(0,ht.A)("keydown",I,document),B6(l,b);const N=bt(r!=null&&r.type===Rr.QUIZ?r.data:void 0),R=PQ({labels:f,restriction:r,restrictionData:N});return(0,o.jsxs)("div",{"aria-disabled":!0,className:n,onBlur:S,onFocus:T,onMouseEnter:L,onMouseLeave:E,ref:l,role:"link",style:a,tabIndex:p?-1:0,children:[t,(0,o.jsx)("div",{className:"visually-hidden-always",children:f?.a11yRestrictedNav}),(0,o.jsx)("div",{className:"visually-hidden-always",children:R}),(0,o.jsx)(RQ,{className:i,dark:s,ref:d,visible:g,children:R})]})}function MQ(e){const{b:t,children:n,"data-direction":s,dark:r,isCurrentLesson:i,isTooltipEnabled:a,lessonId:c,onClick:l=()=>{},onBlur:d,onFocus:h,onHideProgressTooltip:m,onNavigate:f=()=>{},onShowProgressTooltip:p,restriction:g,showProgressDelay:v,style:x,tooltipClassName:b}=e,y=Lp(),I=(le()?.theme?.progressIndicatorStyle??ut.THEME_DEFAULT)===ut.THEME_DEFAULT,L=(0,u.useRef)(null),E=(0,u.useCallback)(B=>{l(B),i?(B.preventDefault(),M6(c)):f(c)},[c,i,l,f]),[k,N]=(0,u.useState)(!1),R=(0,u.useCallback)(()=>{L.current!=null&&(clearTimeout(L.current),L.current=null)},[]),M=(0,u.useCallback)(B=>{!k&&a&&(v!=null?L.current=setTimeout(()=>{p?.()},v):p?.()),h?.(B)},[k,h,v,p,a]),A=(0,u.useCallback)(B=>{R(),a&&m?.(),d?.(B)},[R,a,d,m]),j=(0,u.useCallback)(B=>{a&&cn(B)&&m?.()},[m,a]),P=(0,u.useCallback)(()=>{a===!0&&N(!0)},[a]),w=(0,u.useCallback)(()=>{a===!0&&N(!1)},[a]);(0,u.useEffect)(()=>{if(!k)return;const B=()=>{N(!1)};return document.addEventListener("mouseup",B),()=>{document.removeEventListener("mouseup",B)}},[k]),(0,u.useEffect)(()=>R,[R]);const D=g?.type!=null,O=t("link",{active:i,restricted:D,"theme-default":I}).toString();return D?(0,o.jsx)(D6,{className:O,dark:r,restriction:g,style:x,tooltipClassName:b,children:n}):(0,o.jsx)(NQ,{"aria-current":i?"page":void 0,className:O.toString(),"data-direction":s,"data-nav-item":"",onBlur:A,onClick:E,onFocus:M,onKeyDown:j,onMouseDown:P,onMouseUp:w,style:x,tabIndex:y?-1:void 0,to:An(c),children:n})}function kc(e){const{className:t="lesson-link-item",isCurrentLesson:n,last:s,lessonId:r,style:i}=e,a=(0,u.useMemo)(()=>V(t),[t]),c=Pi(String(r)),l=c?.type!=null,{isComplete:d=!1}=Go(r)??{},h=a({active:n,complete:d,last:s,restricted:l});return(0,o.jsx)("div",{className:h,children:(0,o.jsx)(MQ,{...e,b:a,isCurrentLesson:n,restriction:c,style:i})})}function OQ({className:e,cx:t,cy:n,diameter:s,onTransitionEnd:r,r:i,strokeLinecap:a,strokeWidth:c,value:l=0}){const d=(0,u.useRef)(null),h=`mask-${(0,u.useId)()}`,m=(100-l)/100*(2*i);return(0,ht.A)("transitionend",r,d.current),(0,o.jsxs)("svg",{height:s,viewBox:`0 0 ${s} ${s}`,width:s,children:[(0,o.jsx)("defs",{children:(0,o.jsx)("mask",{id:h,children:(0,o.jsx)("rect",{fill:"white",height:2.3*i,width:2.3*i,x:"0",y:l===0?100:m})})}),(0,o.jsx)("circle",{className:e,cx:t,cy:n,fill:"none",mask:`url(#${h})`,r:i,ref:d,strokeLinecap:a,strokeWidth:c})]})}const Ep=OQ;function BQ({className:e,cx:t,cy:n,diameter:s,onTransitionEnd:r,r:i,strokeLinecap:a,strokeWidth:c,transform:l,value:d=0}){const h=(0,u.useRef)(null),m=Math.PI*(Number(s)-Number(c)),f=m*(100-d)/100;return(0,ht.A)("transitionend",r,h.current),(0,o.jsx)("circle",{className:e,cx:t,cy:n,fill:"transparent",r:i,ref:h,strokeDasharray:m,strokeDashoffset:f,strokeLinecap:a,strokeWidth:c,transform:l})}const F6=BQ;var kp=C(49860);const{COMPACT:DQ,COVER:FQ,OVERLAY:_Q,SIDEBAR:HQ}=Ao,Nc=V("progress-circle");function VQ({"aria-hidden":e,"aria-label":t,isCurrent:n,isFailed:s,isPassed:r,scope:i,value:a}){const[c,l]=kp.useState(a===100),d=(0,ze.A)(a),{theme:h}=le()??{},m=h?.progressIndicatorStyle??ut.THEME_DEFAULT,f=i===FQ,p=i===_Q,g=m===ut.THEME_DEFAULT,v=m===ut.CIRCULAR_FILL,x=m===ut.INCOMPLETE_COMPLETE,b=Nc({compact:i===DQ,cover:f,current:n,sidebar:i===HQ,overlay:p}),y=Nc("track",{"circular-fill":!p&&v,"incomplete-complete":f&&x}),T=Nc("runner",{"circular-fill":v,done:c,failed:s,passed:r,unstarted:a===0}),S=Nc("pass",{done:c,visible:r}),I=Nc("fail",{done:c,visible:s}),L=kp.useMemo(()=>v||a===100?a:0,[v,a]);return kp.useEffect(()=>{if(a!==100&&d===100)l(!1);else if(a===100&&!c&&!x){const E=setTimeout(()=>l(!0),300);return clearTimeout.bind(null,E)}else a===100&&!c&&x&&l(!0)},[c,x,d,a]),(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 16 16",xmlns:"https://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{className:y,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),g?(0,o.jsx)(F6,{className:T,cx:8,cy:8,diameter:16,r:7,strokeWidth:2,transform:"rotate(-89.9 8 8)",value:a}):(0,o.jsx)(Ep,{className:T,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:L}),(0,o.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,o.jsx)("path",{className:I,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})}var Np=C(49860);const{COMPACT:zQ,COVER:$Q,OVERLAY:UQ,SIDEBAR:GQ}=Ao,Yi=V("progress-circle");function WQ({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:s,scope:r,value:i}){const[a,c]=Np.useState(i===100),l=(0,ze.A)(i),{theme:d}=le()??{},h=d?.progressIndicatorStyle??ut.THEME_DEFAULT,m=r===$Q,f=r===UQ,p=h===ut.THEME_DEFAULT,g=h===ut.CIRCULAR_FILL,v=h===ut.INCOMPLETE_COMPLETE,x=Yi("default",{failed:n,passed:s}),b=Yi({compact:r===zQ,cover:m,overlay:f,sidebar:r===GQ}),y=Yi("track",{"circular-fill":!f&&g,"incomplete-complete":m&&v}),T=Yi("fill",{"circular-fill":g,done:a,failed:n,passed:s,unstarted:i===0}),S=Yi("pass",{done:a,visible:s}),I=Yi("fail",{done:a,visible:n}),L=Np.useMemo(()=>g||i===100?i:0,[g,i]);return Np.useEffect(()=>{if(i!==100&&l===100)c(!1);else if(i===100&&!a&&!v){const E=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,E)}else i===100&&!a&&v&&c(!0)},[a,v,l,i]),(0,o.jsx)(o.Fragment,{children:p?(0,o.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,o.jsx)("circle",{cx:"3.5",cy:"3.5",r:"2.5"})}):(0,o.jsxs)("svg",{"aria-hidden":e,"aria-label":t,className:b,fill:"none",focusable:"false",role:"img",viewBox:"0 0 7 7",xmlns:"https://www.w3.org/2000/svg",children:[(0,o.jsx)("circle",{className:y,cx:"8",cy:"8",fill:"transparent",r:"7",strokeWidth:"2",transform:"rotate(-89.9 8 8)"}),(0,o.jsx)(Ep,{className:T,cx:8,cy:8,diameter:16,r:7,strokeLinecap:"round",strokeWidth:2,value:L}),(0,o.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,o.jsx)("path",{className:I,clipRule:"evenodd",d:"M9.46967 10.5303C9.76256 10.8232 10.2374 10.8232 10.5303 10.5303C10.8232 10.2374 10.8232 9.76256 10.5303 9.46967L9.06066 8L10.5303 6.53033C10.8232 6.23744 10.8232 5.76256 10.5303 5.46967C10.2374 5.17678 9.76256 5.17678 9.46967 5.46967L8 6.93934L6.53033 5.46967C6.23744 5.17678 5.76256 5.17678 5.46967 5.46967C5.17678 5.76256 5.17678 6.23744 5.46967 6.53033L6.93934 8L5.46967 9.46967C5.17678 9.76256 5.17678 10.2374 5.46967 10.5303C5.76256 10.8232 6.23744 10.8232 6.53033 10.5303L8 9.06066L9.46967 10.5303Z",fillRule:"evenodd"})]})})}var Cu=C(49860);const{COMPACT:KQ,COVER:QQ,OVERLAY:ZQ,SIDEBAR:YQ}=Ao,wc=V("progress-circle");function qQ({"aria-hidden":e,"aria-label":t,isFailed:n,isPassed:s,scope:r,value:i}){const[a,c]=Cu.useState(i===100),l=(0,ze.A)(i),{theme:d}=le()??{},h=d?.progressIndicatorStyle??ut.THEME_DEFAULT,m=r===QQ,f=r===ZQ,p=h===ut.THEME_DEFAULT,g=h===ut.CIRCULAR_FILL,v=h===ut.INCOMPLETE_COMPLETE,x=wc({compact:r===KQ,cover:m,sidebar:r===YQ,overlay:f}),b=wc("track",{"circular-fill":!f&&g,"incomplete-complete":m&&v}),y=wc("runner",{"circular-fill":g,done:a,failed:n,passed:s,unstarted:i===0}),T=wc("pass",{done:a,visible:s}),S=wc("fail",{done:a,visible:n}),I=Cu.useMemo(()=>g||i===100?i:0,[g,i]);Cu.useEffect(()=>{if(i!==100&&l===100)c(!1);else if(i===100&&!a&&!v){const E=setTimeout(()=>c(!0),300);return clearTimeout.bind(null,E)}else i===100&&!a&&v&&c(!0)},[a,v,l,i]);const L=Cu.useCallback(()=>{i===100&&c(!0)},[i]);return(0,o.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,o.jsx)("circle",{className:b,cx:"7.5",cy:"7.5",fill:"transparent",r:"6.5",strokeWidth:"2",transform:"rotate(-89.9 7.5 7.5)"}),p?(0,o.jsx)(F6,{className:y,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:L,r:6.5,strokeWidth:2,transform:"rotate(-89.9 7.5 7.5)",value:i}):(0,o.jsx)(Ep,{className:y,cx:7.5,cy:7.5,diameter:15,onTransitionEnd:L,r:6.5,strokeLinecap:"round",strokeWidth:2,value:I}),(0,o.jsx)("path",{className:T,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,o.jsx)("path",{className:S,clipRule:"evenodd",d:"M7.5 8.56157L8.84426 9.90564L9.90503 8.84473L8.56078 7.50066L9.90543 6.15582L8.84452 5.09504L7.49986 6.43988L6.15452 5.09473L5.09375 6.15564L6.43909 7.5008L5.09452 8.84555L6.15543 9.90632L7.5 8.56157Z",fillRule:"evenodd"})]})}const XQ={[se.RISE_CLASSIC]:VQ,[se.HORIZON]:WQ,[se.APEX]:qQ};function _6(e){const t=Lt(),n=XQ[t];return(0,o.jsx)(n,{...e})}var JQ=C(79729),xu=C.n(JQ);const H6=e=>t=>(e(t),t.preventDefault()),Jo=e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},Es=e=>t=>{e(t),t.preventDefault(),Jo(t)},bu=V("lesson-progress"),{COMPACT:wp,COVER:jc,OVERLAY:jp,SIDEBAR:Ac}=Ao;function eZ({canComplete:e,color:t,hasRestriction:n,isComplete:s,isCurrentLesson:r,isDark:i,isEnabled:a,isFailed:c,isLegacy:l=void 0,isPassed:d,isTooltipVisible:h,navigationStyle:m,onHideTooltip:f,onMarkComplete:p=mn,onMarkReset:g=mn,onShowTooltip:v,percentComplete:x,progressGraphic:b,scope:y,labels:T}){const S=(0,u.useRef)(),I=(0,u.useRef)(),L=(0,u.useRef)(),E=(0,u.useRef)(),{theme:{progressIndicatorStyle:k=ut.THEME_DEFAULT}}=Ve(),N=k===ut.THEME_DEFAULT,R=bu({compact:y===wp,cover:y===jc&&!l,"legacy-cover":y===jc&&l,inactive:n,overlay:y===jp,sidebar:y===Ac&&!l,"legacy-sidebar":y===Ac&&l,"theme-default":N}),M=bu("graphic",{compact:y===wp,cover:y===jc&&!l,"legacy-cover":y===jc&&l,overlay:y===jp,sidebar:y===Ac&&!l,"legacy-sidebar":y===Ac&&l}),A=bu("tooltip",{legacy:l}).toString(),j=(0,u.useCallback)(()=>{s?g?.():p?.()},[s,p,g]),P=(0,u.useCallback)(H=>{xu()(f)&&cn(H)&&h&&f()},[f,h]),w=(0,u.useCallback)(()=>{clearTimeout(L.current),!n&&xu()(v)&&(I.current=setTimeout(v,600))},[n,v]),D=(0,u.useCallback)(()=>{clearTimeout(I.current),xu()(f)&&(L.current=setTimeout(f,150))},[f]),O=(0,u.useCallback)(()=>{setTimeout(()=>{if(h){const H=S.current.getBoundingClientRect(),_=E.current.offsetParent.getBoundingClientRect(),{height:$,width:z}=H,K=H.left-_.left,J=H.top-_.top;Object.assign(E.current.style,{transform:`translate(${K}px, ${J}px)`,width:`${z}px`,height:`${$}px`})}},0)},[h]);if((0,u.useLayoutEffect)(()=>O(),[O]),(0,ht.A)("resize",O,window),(0,ht.A)("keydown",P,document),B6(S,D),e){const _=tZ({labels:T,percentComplete:x,canReset:!0}),$=!a||!1,z=bu("action",{disabled:$});return(0,o.jsx)("span",{className:R,"data-testid":"lesson-progress",children:(0,o.jsx)("button",{"aria-label":_,className:z,disabled:$,onBlur:f,onClick:j,onFocus:v,type:"button",children:(0,o.jsxs)("span",{className:M,onMouseEnter:w,onMouseLeave:D,ref:S,children:[(0,o.jsx)(b,{"aria-hidden":"true",color:t,isCurrent:r,isDark:i,isFailed:c,isPassed:d,navigationStyle:m,scope:y,value:x}),a&&!n&&(0,o.jsx)(V6,{className:A,dark:i,ref:E,scope:y,visible:h,children:_})]})})})}const B=nZ({labels:T,isFailed:c,percentComplete:x});return(0,o.jsx)("span",{className:R,"data-testid":"lesson-progress",children:(0,o.jsxs)("span",{className:M,onMouseEnter:w,onMouseLeave:D,ref:S,children:[(0,o.jsx)(b,{"aria-label":B,color:t,isCurrent:r,isDark:i,isFailed:c,isPassed:d,navigationStyle:m,scope:y,value:x}),a&&!n&&(0,o.jsx)(V6,{className:A,dark:i,ref:E,scope:y,visible:h,children:B})]})})}const V6=(0,u.forwardRef)((e,t)=>{const{children:n,className:s,dark:r,scope:i,visible:a}=e,c=(0,u.useMemo)(()=>V(s),[s]),l=c({compact:i===wp,cover:i===jc,overlay:i===jp,sidebar:i===Ac,visible:a}),d=c("inner",{dark:r,light:!r}),h=(0,o.jsx)("div",{"aria-hidden":"true",onClick:Jo,ref:t,style:{left:0,pointerEvents:"none",position:"absolute",top:0,zIndex:Number.MAX_SAFE_INTEGER},children:(0,o.jsx)("div",{style:{pointerEvents:"all"},children:(0,o.jsx)("div",{className:l,children:(0,o.jsx)("div",{className:d,children:n})})})});return(0,Ts.createPortal)(h,lo())});function tZ({labels:e,canReset:t,percentComplete:n}){const s=n===100,{progressPieCompleted:r,progressPieUnstarted:i,progressPieClickToComplete:a,progressPieClickToReset:c}=e;return s&&t?`${r}. ${c}`:n===100&&!t?r:n===0?`${i}. ${a}`:`${n}% ${r}. ${a}`}function nZ({labels:e,isFailed:t,percentComplete:n}){const s=n===100,{progressPieCompleted:r,progressPieUnstarted:i,progressPieQuizFailed:a}=e;return t?a:s?r:n===0?i:`${n}% ${r}`}const z6=u.memo(eZ);function yu({canComplete:e,id:t,isDark:n,isEnabled:s,isTooltipVisible:r,onHideTooltip:i,onShowTooltip:a,scope:c}){const l=it(),{color:d,navigationStyle:h}=le(),m=Go(t),f=ao(),p=oy(String(t)),g=ry(String(t)),v=Pi(String(t)),x=Ce(),b=v?.type!=null,y=m?.isComplete,T=String(t)===f,S=m?.percentComplete??0,I=(0,u.useCallback)(()=>{l(Pr(t))},[l,t]),L=(0,u.useCallback)(()=>{l(Kw(t))},[l,t]);return(0,o.jsx)(z6,{canComplete:e,color:d,hasRestriction:b,isComplete:y,isCurrentLesson:T,isDark:n,isEnabled:s,isFailed:p,isPassed:g,isTooltipVisible:r,labels:x,navigationStyle:h,onHideTooltip:i,onMarkComplete:I,onMarkReset:L,onShowTooltip:a,percentComplete:S,progressGraphic:_6,scope:c})}function sZ({color:e,hasRestriction:t,isComplete:n,isCurrentLesson:s,isFailed:r,isPassed:i,isTooltipVisible:a,lessonTitle:c,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:p,labels:g}){return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"overview-list-item__progress",children:g&&(0,o.jsx)(z6,{canComplete:!1,color:e,hasRestriction:t,isComplete:n,isCurrentLesson:s,isDark:!1,isEnabled:!0,isFailed:r,isPassed:i,isTooltipVisible:a,labels:g,navigationStyle:l,onHideTooltip:d,onShowTooltip:h,percentComplete:m,progressGraphic:f,scope:p})}),(0,o.jsx)("span",{className:"overview-list-item__title",children:c})]})}const oZ=matchMedia("(prefers-reduced-motion: reduce)");function yn(){return oZ.matches}function $6(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("selector(html:active-view-transition-type(a))")}function U6(){return!(typeof document>"u"||!("startViewTransition"in document)||co.isFirefox&&!$6())}function rZ(e,t){if(!U6()||yn()){const n=e();return Promise.resolve(n)}return new Promise(n=>{try{const s=async()=>{await e()};(t!=null&&$6()?document.startViewTransition({update:s,types:[t]}):document.startViewTransition(s)).finished.then(()=>n()).catch(()=>n())}catch{const s=e();Promise.resolve(s).then(()=>n()).catch(()=>n())}})}const iZ=3e3;function aZ(){let e=0,t=0,n=null;const s=i=>{n==null||n.generation!==i||(clearTimeout(n.timeoutId),document.documentElement.classList.remove(`transition-${n.transitionType}`),n=null,t=0)};function r(i,a="default"){if(!U6()||yn())return n!=null&&s(n.generation),i(),Promise.resolve();n!=null&&s(n.generation);const l=++e;t=l;const d=setTimeout(()=>{s(l)},iZ);return n={generation:l,transitionType:a,timeoutId:d},rZ(()=>{t===l&&document.documentElement.classList.add(`transition-${a}`),(0,Ts.flushSync)(()=>{i()})},a).finally(()=>{t===l&&s(l)})}return{navigate:r,reset(){n!=null&&s(n.generation),e+=1,t=0},get isTransitioning(){return n!=null}}}const ho=aZ().navigate,cZ=V("overview-list-item");function lZ({className:e,id:t,last:n}){const s=hn(),r=Lt(),i=ao(),{color:a,navigationStyle:c}=le(),{icon:l,title:d}=Gt(t)??{},h=bt(d),m=Go(t),f=oy(t),p=ry(t),g=Pi(t),v=Ce(),x=(0,an.uW)(d)?{"data-l10n-id":d.l10nId}:{"data-change-path":S3(t,"title")},b=m?.isComplete,y=m?.percentComplete??0,T=g?.type!=null,[S,I]=(0,u.useState)(!1),L=r===se.HORIZON?sZ:dZ,E=(0,u.useCallback)(()=>I(!0),[]),k=(0,u.useCallback)(()=>I(!1),[]);(0,u.useEffect)(()=>()=>{Qr.Ay.Events.scrollEvent.remove("end")},[]);const N=n?"overview-list__li overview-list__li--last":"overview-list__li",R=X()(e,"overview-list-item"),M=(0,u.useCallback)(A=>{const{currentTarget:{hash:j}}=A;A.preventDefault(),Qr.Ay.Events.scrollEvent.remove("end"),Qr.Ay.Events.scrollEvent.register("end",()=>{ho(()=>{s(j.slice(1))},"cover-to-lesson"),Qr.Ay.Events.scrollEvent.remove("end")}),Qr.Ay.animateScroll.scrollTo(0,{containerId:"cover"})},[s]);return(0,o.jsx)("li",{...x,className:N,"data-testid":`overview-list-item-${t}`,role:"listitem",children:(0,o.jsx)(kc,{className:R,isTooltipEnabled:!0,lessonId:t,onBlur:k,onClick:M,onHideProgressTooltip:k,onShowProgressTooltip:E,showProgressDelay:25,tooltipClassName:"overview-list-item-tooltip",children:(0,o.jsx)(L,{color:a,hasRestriction:T,isComplete:b,isCurrentLesson:t===i,isFailed:f,isPassed:p,isTooltipVisible:S,labels:v,lessonIcon:l,lessonId:t,lessonTitle:h,navigationStyle:c,onHideTooltip:k,onShowTooltip:E,percentComplete:y,progressGraphic:_6,scope:Ao.COVER})})})}function dZ({isTooltipVisible:e,lessonIcon:t,lessonId:n,lessonTitle:s,onHideTooltip:r,onShowTooltip:i,scope:a}){const c=cZ("progress-circle");return(0,o.jsxs)("div",{className:c,children:[(0,o.jsx)("span",{"aria-hidden":"true",className:"overview-list-item__icon",children:(0,o.jsx)(kQ,{icon:t??void 0})}),(0,o.jsx)("span",{className:"overview-list-item__title","data-testid":`overview-list-item-title-${n}`,children:s}),(0,o.jsx)(yu,{canComplete:!1,id:n,isDark:!1,isEnabled:!0,isTooltipVisible:e,onHideTooltip:r,onShowTooltip:i,scope:a})]})}const uZ=V("overview-list"),hZ=e=>e.reduce((t,n)=>(n.type==="section"?t.push([n]):t[t.length-1]?t[t.length-1].push(n):t.push([n]),t),[]),mZ=({className:e="",...t})=>{const n=Lt(),s=X()(e,"overview-list__section-title",{"brand--ui":n===se.RISE_CLASSIC});return(0,o.jsx)("h2",{...t,className:s})},fZ=()=>{const e=vB(),t=Ce(),n=hZ(e);return(0,o.jsx)("nav",{"aria-label":t?.a11yRegionNavOverview,className:"overview-list",children:n.map((s,r)=>{const[i,...a]=s;if(!i)return null;const{title:c,type:l}=i,d=l==="section",h=d?a:s,m=uZ("list",{sectionless:!d});return(0,o.jsxs)("section",{children:[d&&c&&(0,o.jsx)(mZ,{children:(0,o.jsx)(Pn,{value:c})}),(0,o.jsx)("ol",{className:m,role:"list",children:h.map((f,p)=>(0,o.jsx)(lZ,{id:f.id,last:h.length>1&&p===h.length-1},f.id))})]},r)})})},pZ=(0,u.memo)(fZ),gZ={[se.RISE_CLASSIC]:{SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"LEFT_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"LEFT_OVERLAY"},[se.HORIZON]:{SPLIT_LEFT_IMAGE:"CENTERED_OVERLAY",SPLIT_RIGHT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_LEFT_IMAGE:"CENTERED_OVERLAY",TWO_THIRDS_RIGHT_IMAGE:"CENTERED_OVERLAY"},[se.APEX]:{SPLIT_LEFT:"LEFT",SPLIT_LEFT_IMAGE:"LEFT_OVERLAY",SPLIT_RIGHT:"LEFT",SPLIT_RIGHT_IMAGE:"LEFT_OVERLAY"}};function vZ({coverPageType:e="CENTERED",isTablet:t,themeId:n}){return t?gZ[n][e]??e:e}function Rc(){const e=le(),t=Lt(),n=Xt(768);return vZ({coverPageType:e.theme?.coverPageType??void 0,isTablet:n,themeId:t})}const CZ=e=>Object.values(Aa).find(t=>t.value==e);function xZ(e){return(0,u.useMemo)(()=>CZ(e)??Aa.SMALL,[e])?.label.toLowerCase()}const qi=V("cover");function G6(e){return typeof e=="object"&&e!=null}function bZ(e){return G6(e)}function yZ(e){if(G6(e))return bZ(e.image)?e.image:void 0}function SZ(){const e=Xt(1200),t=Lt(),n=Rc(),s=t===se.APEX&&(n==="SPLIT_RIGHT"||n==="SPLIT_RIGHT_IMAGE"),{description:r,media:i,navigation:a,partnerContentId:c,publishedAt:l}=le(),h=!!pc(),m=yZ(bt(i)),f=m!=null&&Object.keys(m).length>0,p=!!a,g=!r||!p,v=!r&&!p,x=!!h,b=qi("details",{"rise-com":!1,"rise-com-authoring":!1}),y=qi("details-content-wrap",{columns:x,logo:f}),T=qi("details-content",{"no-description-or-outline":g}),S=qi("details-logo",{centered:v,"no-description-or-outline":g,"has-partner-content":!!c}),I=x&&(0,o.jsx)(_K,{hasLogo:f}),L=xZ(m?.scalar),E=qi("details-logo-image",{[L]:!0}),k=qi("details-description-outline");return(0,o.jsx)("section",{className:b,"data-testid":"cover-details",children:(0,o.jsxs)("div",{className:y,children:[!e&&s&&I,(0,o.jsxs)("div",{className:T,children:[(0,o.jsx)(Tp,{className:S,imageClassName:E}),(0,o.jsxs)("div",{className:k,children:[r&&(0,o.jsx)(R6,{}),e&&I,p&&(0,o.jsx)(cu,{type:"outline",children:(0,o.jsx)(pZ,{})})]})]}),!e&&!s&&I]})})}const IZ=(0,u.forwardRef)(function({children:t,disabled:n,onClick:s,to:r,...i},a){return n?(0,o.jsx)("a",{"aria-disabled":"true",ref:a,role:"link",...i,children:t}):(0,o.jsx)(xn,{onClick:s,ref:a,to:r,...i,children:t})}),W6=V("cover"),Sn=()=>{const e=le(),{trackingQuizId:t,theme:n}=e,s=hn(),r=window.viewType==="preview",i=Um(),a=qO(),c=Ai(),l=i?.id,d=n?.showStartButton??!0,h=iL()?c===100:rL(),f=a!=null?a:l,p=!r&&!1,{courseCTALabel:g}=LB({isCourseComplete:h===!0,percentCourseComplete:c??0});if(!d||!g||f==null)return null;const v=["cover__header-content-action-link","overview__button-enrolled",p?"overview__start-again":void 0].filter(Boolean).join(" "),x=An(f),b=y=>{y.preventDefault(),ho(()=>{s(x)},"cover-to-lesson")};return(0,o.jsx)("div",{className:W6("header-content-action-wrapper"),children:(0,o.jsx)(IZ,{className:v,onClick:b,to:x,children:(0,o.jsx)("span",{className:W6("header-content-action-link-text"),children:g})})})},TZ=V("cover"),es=({children:e})=>{const t=TZ("header-content");return(0,o.jsx)("div",{className:t,"data-testid":"cover-header-content",children:e})},Zr=e=>{const t=Ve(),n=ct();return LZ(t,e,n)},LZ=(e,t,n)=>{const{media:s,alpha:r}=t==="coverImage"?UC(e,n):GC(e,n),i="image"in s?_C(s?.image?.alt):void 0;return{alpha:r,ariaLabel:i,media:s,role:HC(i)}},EZ=V("cover"),Ap=()=>{const e=Fb(),{alpha:t,ariaLabel:n,media:s,role:r}=Zr("coverImage"),i=EZ("header-image"),a=Ni({alpha:t,color:e,media:s});return(0,o.jsx)("div",{"aria-label":n,className:i,role:r,style:a??void 0})},kZ=V("cover"),Rp=({children:e})=>{const t=Fb(),n=`overlay-${t.toLowerCase()}`,s=kZ("header-content",{[n]:!!t});return(0,o.jsxs)("div",{className:s,"data-testid":"cover-header-content",children:[e,(0,o.jsx)(Ap,{})]})},NZ=V("cover"),Pc=({hasOverlay:e=!1})=>{const{alpha:t,ariaLabel:n,media:s,role:r}=Zr("coverImage"),i=Ni({alpha:t,hasOverlay:e,media:s}),a=NZ("header-graphic",{"dot-com":!1});return(0,o.jsx)("div",{"aria-label":n,className:a,"data-testid":"cover-header-graphic",role:r,style:i??void 0})},wZ=V("cover");function In({children:e}){const t=!!pc(),n=wZ("header-content-info",{rbc:t,"rise-com":!1});return(0,o.jsx)("div",{className:n,"data-testid":"cover-header-content-info",children:e})}const mo=V("cover");function jZ({percentComplete:e}){const t=pu(),n=fs(),s=Ce(),r=hy();return null}const Yr=V("cover"),AZ=({percentComplete:e})=>{const t=fs(),n=Ce(),s=hy();return e===0||window.isPublicShare,null;const r=Ki({percent:e,label:n.progressSummaryPercentComplete,isRTL:t});return(0,o.jsxs)("div",{className:Yr("progress"),children:[(0,o.jsx)("div",{className:Yr("progress-text"),children:r}),(0,o.jsx)("div",{className:Yr("progress-outer"),children:(0,o.jsx)("div",{className:Yr("progress-inner"),style:{width:`${e}%`}})}),s&&(0,o.jsxs)("div",{className:Yr("progress-next-lesson"),children:[(0,o.jsx)(Hf,{className:Yr("progress-next-lesson-icon").toString(),decorative:!0}),(0,o.jsx)("span",{"aria-hidden":"true",className:Yr("progress-next-lesson-text"),children:s}),(0,o.jsxs)("span",{className:"visually-hidden",children:["Next lesson: ",s]})]})]})};function tn(){const e=Ai()??0;return Lt()===se.APEX?(0,o.jsx)(jZ,{percentComplete:e}):(0,o.jsx)(AZ,{percentComplete:e})}const RZ=V("cover"),Tn=()=>{const e=le(),t=Oe(e.title),n=RZ("header-content-title"),s=Vi("title"),r=(0,an.uW)(e.title)?{"data-l10n-id":e.title.l10nId}:{"data-change-path":s};return(0,o.jsx)("h1",{...r,className:n,"data-testid":"cover-header-content-title",tabIndex:-1,children:t})},PZ=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Rp,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(tn,{}),(0,o.jsx)(Sn,{})]})})}),MZ=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(tn,{}),(0,o.jsx)(Sn,{})]})})}),OZ=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pc,{}),(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(tn,{}),(0,o.jsx)(Sn,{})]})})]}),BZ=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(tn,{}),(0,o.jsx)(Sn,{})]})}),(0,o.jsx)(Pc,{})]});function DZ(){switch(Rc()){default:case fe.LEFT_OVERLAY:case fe.CENTERED_OVERLAY:return(0,o.jsx)(PZ,{});case fe.LEFT:case fe.CENTERED:return(0,o.jsx)(MZ,{});case fe.SPLIT_LEFT_IMAGE:case fe.TWO_THIRDS_LEFT_IMAGE:return(0,o.jsx)(BZ,{});case fe.SPLIT_RIGHT_IMAGE:case fe.TWO_THIRDS_RIGHT_IMAGE:return(0,o.jsx)(OZ,{})}}function FZ(){return(0,o.jsx)("header",{className:"cover__header","data-testid":"cover-header",children:(0,o.jsx)(DZ,{})})}const _Z=V("cover");function Mc(){return(0,o.jsxs)("svg",{"aria-hidden":"true",className:_Z("header-star"),fill:"none",height:"18",viewBox:"0 0 18 18",width:"18",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)("path",{d:"M9 0V18",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M18 9H0",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M15.3 15.3002L2.69995 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"}),(0,o.jsx)("path",{d:"M2.69995 15.3002L15.3 2.7002",strokeMiterlimit:"10",strokeWidth:"0.75"})]})}const HZ=V("cover"),VZ=()=>null,zZ=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Rp,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Mc,{}),(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})})}),$Z=()=>(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Mc,{}),(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})})}),UZ=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pc,{}),(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Mc,{}),(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})})]}),GZ=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Mc,{}),(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})}),(0,o.jsx)(Pc,{})]}),WZ=()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Mc,{}),(0,o.jsx)(Ds,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})}),(0,o.jsx)("div",{className:"cover__header-graphic-wrap",children:(0,o.jsx)(Pc,{})})]});function KZ(){switch(Rc()){default:case"CENTERED_IMAGE":return(0,o.jsx)(WZ,{});case"CENTERED":case"CENTERED_ACCENT_TINT":return(0,o.jsx)($Z,{});case"SPLIT_LEFT_IMAGE":case"TWO_THIRDS_LEFT_IMAGE":return(0,o.jsx)(GZ,{});case"SPLIT_RIGHT_IMAGE":case"TWO_THIRDS_RIGHT_IMAGE":return(0,o.jsx)(UZ,{});case"CENTERED_OVERLAY":return(0,o.jsx)(zZ,{})}}function QZ(){return(0,o.jsxs)("header",{className:HZ("header",{meta:!1}),"data-testid":"cover-header",children:[(0,o.jsx)(KZ,{}),(0,o.jsx)(u.Suspense,{children:(0,o.jsx)(VZ,{})})]})}const K6=V("cover");function Su({accentColor:e,hasOverlay:t=!1,isShape:n=!1}){const{alpha:s,ariaLabel:r,media:i,role:a}=Zr("coverImage"),c=n?{backgroundColor:e}:Ni({alpha:s,hasOverlay:t,media:i});return(0,o.jsx)("div",{className:K6("header-graphic-container"),children:(0,o.jsx)("div",{"aria-label":r,className:K6("header-graphic"),"data-testid":"cover-header-graphic",role:a,style:c??void 0})})}const Q6=e=>(0,o.jsx)(Iu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),Z6=e=>(0,o.jsx)(Iu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),Y6=e=>(0,o.jsx)(Iu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),q6=e=>(0,o.jsx)(Iu,{...e,children:(0,o.jsx)("clipPath",{clipPathUnits:"objectBoundingBox",id:"cover-page-clip-path",children:(0,o.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"})})}),ZZ={LEFT_OVERLAY:Q6,LEFT:Q6,CENTERED:Z6,CENTERED_OVERLAY:Z6,SPLIT_LEFT:Y6,SPLIT_LEFT_IMAGE:Y6,SPLIT_RIGHT:q6,SPLIT_RIGHT_IMAGE:q6},Iu=({children:e,className:t="svgPath",height:n,width:s,viewBox:r})=>(0,o.jsx)("svg",{"aria-hidden":"true",className:t,fill:"none",focusable:"false",height:n,viewBox:r,width:s,xmlns:"http://www.w3.org/2000/svg",children:e});function qr({className:e,coverPageType:t}){const n=t?ZZ[t]:null;return n?(0,o.jsx)(n,{className:e}):null}const X6=V("cover"),Xi=()=>(0,o.jsxs)("div",{className:X6("author-published-wrap"),children:[(0,o.jsx)(Ds,{}),(0,o.jsx)(L6,{})]}),YZ=({coverPageType:e})=>{const t=pu();return(0,o.jsxs)(Rp,{children:[(0,o.jsx)(qr,{coverPageType:e}),(0,o.jsxs)(In,{children:[!t&&(0,o.jsx)(tn,{}),(0,o.jsx)(Xi,{}),(0,o.jsx)(Tn,{}),t&&(0,o.jsx)(tn,{}),(0,o.jsx)(Sn,{})]})]})},qZ=({coverPageType:e})=>{const t=pu();return(0,o.jsxs)(es,{children:[(0,o.jsx)(qr,{coverPageType:e}),(0,o.jsxs)(In,{children:[!t&&(0,o.jsx)(tn,{}),(0,o.jsx)(Xi,{}),(0,o.jsx)(Tn,{}),t&&(0,o.jsx)(tn,{}),(0,o.jsx)(Sn,{})]})]})},XZ=({coverPageType:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qr,{coverPageType:e}),(0,o.jsx)(Su,{}),(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Xi,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})})]}),JZ=({accentColor:e,coverPageType:t})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Xi,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})}),(0,o.jsx)(qr,{coverPageType:t}),(0,o.jsx)(Su,{accentColor:e,isShape:!0})]}),eY=({coverPageType:e})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Xi,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})}),(0,o.jsx)(qr,{coverPageType:e}),(0,o.jsx)(Su,{})]}),tY=({accentColor:e,coverPageType:t})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(qr,{coverPageType:t}),(0,o.jsx)(Su,{accentColor:e,isShape:!0}),(0,o.jsx)(es,{children:(0,o.jsxs)(In,{children:[(0,o.jsx)(tn,{}),(0,o.jsx)(Xi,{}),(0,o.jsx)(Tn,{}),(0,o.jsx)(Sn,{})]})})]});function nY(e){const t=Rc(),n={...e,coverPageType:t};switch(t){default:case fe.LEFT_OVERLAY:case fe.CENTERED_OVERLAY:return(0,o.jsx)(YZ,{...n});case fe.LEFT:case fe.CENTERED:return(0,o.jsx)(qZ,{...n});case fe.SPLIT_LEFT:return(0,o.jsx)(JZ,{...n});case fe.SPLIT_LEFT_IMAGE:return(0,o.jsx)(eY,{...n});case fe.SPLIT_RIGHT:return(0,o.jsx)(tY,{...n});case fe.SPLIT_RIGHT_IMAGE:return(0,o.jsx)(XZ,{...n})}}function sY(e){const n=!!!!pc();return(0,o.jsx)("header",{className:X6("header",{"with-info":n}),"data-testid":"cover-header",children:(0,o.jsx)(nY,{...e})})}const oY={[se.RISE_CLASSIC]:FZ,[se.HORIZON]:QZ,[se.APEX]:sY};function rY(){const e=Lt(),t=oY[e];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t,{}),(0,o.jsx)(Jn,{anchor:yp,label:"Comments on course title"})]})}var iY=C(73766),Tu=C.n(iY);const aY=V("cover");function cY({children:e}){const t=Lt(),n=Rc(),s=Tu()(n);return(0,o.jsx)("div",{className:aY({layout:s}),"data-testid":`cover-layout-${s}`,"data-theme-id":t,id:"cover",children:e})}var lY=C(78723),Oc=C(62736);const dY=V("portal-tooltip"),nn={LEFT:"LEFT",RIGHT:"RIGHT",ABOVE:"ABOVE",BELOW:"BELOW"},uY=(e,t,n)=>{const s=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=window.visualViewport;let a=n;(a===nn.ABOVE||a===nn.BELOW)&&(s.bottom-r.height<0&&(a=nn.BELOW),r.height+s.top>i.height&&(a=nn.ABOVE)),(a===nn.LEFT||a===nn.RIGHT)&&(r.left<0&&(a=nn.RIGHT),r.width+s.left>i.width&&(a=nn.LEFT));const c={left:0,right:0,top:0,bottom:0};a===nn.ABOVE&&(c.top=s.top-r.height-25),a===nn.BELOW&&(c.top=s.top+s.height),a===nn.RIGHT&&(c.left=s.left+s.width+70),a===nn.LEFT&&(c.left=s.left-r.width-25),(a===nn.LEFT||a===nn.RIGHT)&&(c.top=s.top-s.height/2),(a===nn.ABOVE||a===nn.BELOW)&&(c.left=s.left+s.width/2);const l=s.left+s.width/2,d=r.width/2+l>i.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--${a.toLowerCase()}`)};function hY({children:e,className:t,direction:n=nn.ABOVE,elementFocused:s,exitAnimation:r=!0,message:i,style:a,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),[p,g]=(0,lY.A)((()=>e)),v=(0,u.useCallback)(()=>d(!0),[d]),x=(0,u.useCallback)(()=>d(!1),[d]);return(0,u.useEffect)(()=>(document.addEventListener("scroll",v),document.addEventListener("scrollend",x),()=>{document.removeEventListener("scroll",v),document.removeEventListener("scrollend",x)})),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{ref:m,children:p}),i&&(g||h||s)&&!l&&(0,o.jsx)(Qs,{classNames:"portal-tooltip__tooltip",exit:r,timeout:200,children:(0,o.jsx)(mY,{buttonRef:m,className:t,direction:n,elementFocused:s,hovering:g,message:i,portalRef:f,renderInModalWhenPresent:c,style:a})})]})}function mY({buttonRef:e,className:t,direction:n,elementFocused:s,hovering:r,message:i,portalRef:a,style:c,renderInModalWhenPresent:l=!1}){const d=(0,u.useCallback)(()=>uY(e.current,a.current,n),[e,n,a]),h=(0,u.useCallback)(()=>{a.current&&d()},[a,d]),m=()=>{!r&&!s&&a.current&&(a.current.style=null)};return(0,Oc.A)(h),(0,Ts.createPortal)((0,o.jsx)("div",{"aria-hidden":!r||!s,className:dY("tooltip").mix(t).toString(),onTransitionEnd:m,ref:a,style:c,children:i}),l?lo({id:"portal",childType:"other"}):document.getElementById("portal"))}const Fs=hY,fY=["[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(", "),J6=(e,t=!1)=>n=>{const s=e5(n);if(s.length===0)return;const r=e>=s.length&&t?0:e;return ov()(r,s)},e5=e=>e?Array.from(e.querySelectorAll(fY)).filter(t=>window.getComputedStyle(t).display!=="none"):[],t5=J6(0),pY=J6(-1),Pp=e=>t5(e)?.focus?.();function gY(){const e=(0,u.useRef)(null);function t(n){const s=t5(e.current),r=pY(e.current);yd(n)&&(n.shiftKey?document.activeElement===s&&(r.focus(),n.preventDefault()):document.activeElement===r&&(s.focus(),n.preventDefault()))}return(0,u.useEffect)(()=>{const n=e?.current;return n?.addEventListener("keydown",t),()=>{n?.removeEventListener("keydown",t)}},[]),e}var Mp;const Op=u.createContext(null);Op.displayName="UndoManagerContext";function Obe(e){return Mp(Op.Provider,{value:e.undoManager,children:e.children})}function n5(){return u.useContext(Op)}function Bbe(e){function t(n){const s=n5();return Mp(e,{...n,undoManager:s})}return t.displayName=`withUndoManager(${e.displayName||e.name})`,t}function s5(){const e=n5();u.useEffect(()=>{if(e!=null)return e.disable(),()=>e.enable()},[e])}function Dbe(e){function t(n){return s5(),Mp(e,{...n})}return t.displayName=`withDisableUndoManager(${e.displayName||e.name})`,t}const Ht=V("modal");function vY({message:e}){const t=u.useId(),[n,s]=(0,u.useState)(!1),r=(0,u.useCallback)(()=>s(!0),[]),i=(0,u.useCallback)(()=>s(!1),[]);return(0,o.jsxs)("span",{className:Ht("close-tooltip"),children:[(0,o.jsx)(Fs,{elementFocused:n,message:e,renderInModalWhenPresent:!0,children:(0,o.jsx)("button",{"aria-describedby":e?t:void 0,"aria-disabled":"true","aria-label":"close dialog",className:Ht("close",{disabled:!0}),onBlur:i,onFocus:r,type:"button",children:(0,o.jsx)(ce,{className:Ht("close-icon"),name:"close"})})}),e&&(0,o.jsx)("span",{className:"visually-hidden-always",id:t,children:e})]})}const Bp=u.forwardRef((e,t)=>{const{children:n,className:s,"data-testid":r,darkOverlay:i,disabledCloseButton:a=!1,disabledCloseButtonMessage:c,disableBackgroundScroll:l,disableCloseOnOverlayClick:d,disableCloseOnEscape:h=!1,focusFirstInput:m=!0,focusHeadingOnOpen:f=!1,focusOnOpen:p=!0,footer:g,forceToTop:v=!1,fullscreen:x=!1,heading:b,hideCloseButton:y=!1,hideHeader:T=!1,skipDialogClose:S=!1,useTopLayer:I=!0,onCancel:L,onClose:E=mn,onClickBack:k,onCloseBubbles:N=!1,onOverlayClick:R,scroll:M=!1,subHeading:A,subText:j,width:P}=e;s5();const w=gY(),D=(0,u.useRef)(null),O=(0,u.useRef)(null),B=(0,u.useRef)(!1),H=(0,u.useCallback)(()=>{const G=w.current;!S&&G?.open&&G.close(),E()},[E,w,S]);(0,u.useEffect)(()=>{const G=F=>{if(!(!cn(F)||h)){if(ZK(w.current)){F.preventDefault(),F.stopPropagation();return}F.preventDefault(),F.stopPropagation(),L?.(F),H()}};return document.addEventListener("keydown",G,!N),()=>{document.removeEventListener("keydown",G,!N)}},[h,L,H,N,w]),(0,u.useEffect)(()=>{const G=w.current;if(!G||!h)return;const F=U=>U.preventDefault();return G.addEventListener("cancel",F),()=>{G.removeEventListener("cancel",F)}},[w,h]),(0,u.useEffect)(()=>{const G=w.current;if(G)return I?G.showModal():G.show(),p||setTimeout(()=>{G.contains(document.activeElement)&&document.activeElement?.blur()},0),()=>{G.close()}},[w,I,p]),(0,u.useEffect)(()=>{if(f&&O.current){O.current.focus();return}if(m&&w.current){const F=e5(w.current).find(Q=>Q.tagName==="INPUT"||Q.tagName==="TEXTAREA"||Q.tagName==="SELECT"),U=F||D?.current;U?.focus(),U instanceof HTMLTextAreaElement&&U.setSelectionRange(U.value.length,U.value.length)}},[m,f,w]),(0,u.useEffect)(()=>(l&&(document.scrollingElement||document.documentElement).classList.add("no-scroll"),()=>{l&&(document.scrollingElement||document.documentElement).classList.remove("no-scroll")}),[l,w]);const _=Ht({"force-to-top":v}).mix(s),$=Ht("content",{"with-footer":!!g,"force-scroll":!!M}),z=Ht("overlay",{dark:!!i}),K=R||H,J=()=>{B.current=QK(w.current)},Y=()=>{B.current||K()};return(0,o.jsxs)("dialog",{"aria-labelledby":"modal-heading","aria-modal":"true",className:_.toString(),"data-testid":r,onClose:H,ref:G=>{w.current=G,t&&(t.current=G)},children:[(0,o.jsx)("div",{id:"modal-portal"}),(0,o.jsx)("div",{className:z,onClick:d?void 0:Y,onPointerDown:d?void 0:J}),(0,o.jsxs)("div",{className:Ht("dialog",{fullscreen:x}),style:P&&!x?{width:P}:{},children:[(!T||!y)&&(0,o.jsxs)("div",{className:Ht("heading-wrapper"),children:[(0,o.jsxs)("div",{className:Ht("heading-flexbox"),children:[!T&&(0,o.jsxs)("div",{className:Ht("header"),children:[k&&(0,o.jsx)("button",{"aria-label":"back to previous page",className:Ht("back"),onClick:k,type:"button",children:(0,o.jsx)(ce,{className:Ht("back-icon"),name:"arrow-left"})}),(0,o.jsxs)("h1",{className:Ht("heading"),id:"modal-heading",ref:O,tabIndex:f?-1:void 0,children:[b,(0,o.jsx)("span",{className:Ht("subheading"),children:A})]})]}),!y&&(a?(0,o.jsx)(vY,{message:c}):(0,o.jsx)("button",{"aria-label":"close dialog",className:Ht("close"),onClick:H,ref:D,type:"button",children:(0,o.jsx)(ce,{className:Ht("close-icon"),name:"close"})}))]}),j?(0,o.jsx)("p",{className:Ht("subtitle"),children:j}):null]}),(0,o.jsx)("div",{className:$,children:n}),g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:Ht("footer-shadow")}),(0,o.jsx)("div",{className:Ht("footer"),children:g})]})]})]})}),er=V("locale-selector"),Dp=({onClose:e})=>{const t=(0,Be.zy)(),n=le(),s=xM(),r=td(),i=bM(),a=i?.length?i:s&&r?r?.map(I=>I.locale):void 0,[c,l]=(0,u.useState)(!1),d=c&&(a?.length||0)>1,h=(0,ze.A)(d),m=bt(n?.title),{currentLocale:f,setCurrentLocale:p}=at(),g=$V(),v=Ce(),[x,b]=(0,u.useState)(!1),y=(0,u.useCallback)(I=>{PN(I),p(I)},[p]),T=()=>{gn(hm(!1))};(0,u.useEffect)(()=>{h&&!d&&e?.()},[e,h,d]),(0,u.useEffect)(()=>{if(!a||x||s===void 0||!r)return;if(a.length===1){y(a[0]),b(!0);return}const I=wC(void 0),L=RN()??"";if(L!==""){y(L),b(!0),l(!1);return}I?.p==null&&L===""?l(!0):(l(!1),T());const k=(navigator.language??"en-US").toLowerCase(),N=a.find(R=>R.toLowerCase()===k);y(N?k:a[0]),b(!0)},[a,t,y,x,s,r,l]);const S=I=>{I.preventDefault();const L=I.target.value;y(L)};return!d||s===void 0||!r?null:(0,o.jsx)(Qs,{classNames:"modal",timeout:400,children:(0,o.jsx)(Bp,{className:er("modal"),disableCloseOnOverlayClick:!0,hideCloseButton:!0,hideHeader:!0,onClose:T,children:(0,o.jsxs)("div",{className:er("container"),children:[(0,o.jsx)("div",{className:er("heading"),children:v.l10nChooseLanguage}),(0,o.jsx)("div",{className:er("course-title"),children:m}),(0,o.jsx)("div",{className:er("selector"),children:(0,o.jsx)("select",{onChange:S,value:f,children:a.map(I=>(0,o.jsx)("option",{value:I,children:g(I)},I))})}),(0,o.jsx)("div",{className:er("footer"),children:(0,o.jsx)("button",{className:er("continue-button"),onClick:T,type:"button",children:(0,o.jsx)("span",{className:er("continue-button-label"),children:v.l10nChooseLanguageContinue})})})]})})})},CY=V("cover-container"),o5=()=>document.querySelector("h1")?.focus({preventScroll:!0});function xY(){const{didNavigate:e,shouldSkipAutoFocusOnNavigate:t}=Vd(),s=Ce()?.overviewPageTitleSuffix,r=ac();return(0,u.useEffect)(()=>{t||e&&o5()},[e,t]),(0,o.jsxs)(Gr,{title:fc(`${r} - ${s}`),children:[(0,o.jsx)("main",{children:(0,o.jsx)("div",{className:CY({}),children:(0,o.jsxs)(cY,{children:[(0,o.jsx)(rY,{}),(0,o.jsx)(SZ,{})]})})}),(0,o.jsx)(Dp,{onClose:o5})]})}const bY=xY,yY=/^([^/\s]+)\/([^/\s]+)$/;function SY(e){const t=yY.exec(e.trim());return t?{lessonId:t[1],blockId:t[2]}:null}function Hbe(e,t){return`${e}/${t}`}const Bc="blockId";function Vbe(e,t){return`#/lessons/${e}?${Bc}=${t}`}const IY=/^#\/lessons\/([^/?#]+)\?(.+)$/;function TY(e){const t=IY.exec(e.trim());if(!t)return null;const n=new URLSearchParams(t[2]).get(Bc);return n?{lessonId:decodeURIComponent(t[1]),blockId:n}:null}const r5=(0,u.createContext)(void 0);function Lu(){const e=(0,u.useContext)(r5);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 i5(e){function t(n){const s=Lu();return(0,o.jsx)(e,{...n,...s})}return t.displayName=`WithMediaContextWrapper(${e.name})`,t}function LY({children:e,lessonId:t,mode:n="readonly",openTranscript:s,closeTranscript:r,onTranscriptUpdate:i,disableTranscriptButton:a=!1}){const c={mode:n,lessonId:t||"",openTranscript:s||null,closeTranscript:r||null,onTranscriptUpdate:i||null,disableTranscriptButton:a,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,o.jsx)(r5.Provider,{value:c,children:e})}const a5=(0,u.createContext)(void 0),EY=a5.Provider;function Dc(){return(0,u.useContext)(a5)}function kY({children:e}){const t=pe(n=>n.transcriptPanel);return(0,o.jsx)(EY,{value:t,children:e})}const c5=(0,me.action)(ib),Fc=(0,me.action)(ab),Fp=(0,me.action)(cb);function ks(e){return e.refs?Tu()("audio-id__refs_"+e.refs.toLowerCase()):""}function _p(e){if(e)return`audio-transcript--${e}`}function l5(e){if(e)return`audio-player-transcript-toggle--${e}`}const d5=V("course-exit");function u5(e){const t=Ce(),{className:n,lmsOptions:s,style:r}=e;return s?.enableExitCourse?(0,o.jsx)("div",{className:d5("wrapper"),children:(0,o.jsx)("button",{className:d5("button").mix(n),onClick:nv,style:r,type:"button",children:t?.courseExit})}):null}const NY=960;function _c(){return Xt(NY)}function wY(){const e=Ve(),t=_c(),n=ed();return yO({course:e,isMobile:t,search:n})}function jY(){const e=Ve(),t=_c();return SO({course:e,isMobile:t})}const Hp=V("nav-control"),AY=()=>{const[e,t]=(0,u.useState)(!1);return(0,ht.A)(m3,()=>t(!0)),(0,ht.A)(Af,()=>t(!1)),e},RY=({"aria-controls":e,isNavOpen:t,toggleNav:n,hideNav:s})=>{const{buttonNavigationStyle:r,lmsOptions:i,showNavigationButtons:a,...c}=le(),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(0),m=Ce(),f=_c(),p=dd(),g=AY(),v=(0,u.useMemo)(()=>c.lessons?.find(L=>L.id===p),[c.lessons,p]),x=v?.type==="quiz"&&!!v.settings?.timer,b=i?.enableExitCourse,y=x||b,T=c.navigationType===Nr.COMPACT,S=T?"fixed-course-exit":void 0;(0,u.useEffect)(()=>{l.current=document.querySelector(".page-wrap");const E=document.querySelector(".lesson-nav--previous")?.clientHeight??60,k=!a||r===eo.FLOATING&&!f;function N({target:R}){const M=R instanceof HTMLElement?R.scrollTop:0,A=E-M;h(A)}return g&&!k?l.current.scrollTop===0?h(E):l.current.addEventListener("scroll",N):h(0),()=>l.current.removeEventListener("scroll",N)},[r,f,g,a]);const I=(0,u.useCallback)(()=>{const L=document.getElementsByClassName("nav-control__menu--top-nav-bar").item(0),E=L instanceof HTMLElement?L:null;if(l.current&&E){const k=l.current.offsetWidth-l.current.clientWidth||0;E.style.maxWidth=`calc(100% - ${k}px)`}},[]);return(0,u.useLayoutEffect)(()=>{y&&I()},[y,I]),(0,o.jsx)("div",{className:Hp("wrapper"),children:(0,o.jsxs)("div",{className:Hp("menu",{"is-timed-quiz":x,"nav-off":s,"top-nav-bar":y}),style:{marginTop:d},children:[!s&&(!T||f)&&(0,o.jsx)("button",{"aria-controls":e,"aria-expanded":t,"aria-label":t?m?.a11yNavigationMenuClose:m?.a11yNavigationMenuOpen,className:Hp("button"),onClick:n,type:"button",children:(0,o.jsx)(ce,{classNameIcon:"page-menu-toggle__icon",name:"bars-regular"})}),(0,o.jsx)(u5,{className:S,lmsOptions:i})]})})},Vp=({"aria-hidden":e=void 0,"aria-label":t=void 0,progress:n=0,runnerClass:s,trackClass:r})=>(0,o.jsx)("div",{"aria-hidden":e,"aria-label":t,className:r,role:"img",children:(0,o.jsx)("div",{className:s,style:{width:`${n}%`}})}),tr=V("nav-compact"),PY=e=>{const{lessonPosition:t,labelLessonName:n,labelLessonPreposition:s,totalLessons:r}=e;return t<=0?null:(0,o.jsx)("div",{className:tr("header-counter"),"data-testid":"nav-compact-counter",children:`${n} ${t} ${s} ${r}`})},MY=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:s,percentComplete:r,percentCompleteText:i,navExpanded:a}=e;return(0,o.jsxs)("div",{className:tr("header-progress"),"data-testid":"nav-compact-progress",children:[(0,o.jsx)("div",{className:n,children:i}),(0,o.jsx)(Vp,{"aria-hidden":a,"aria-label":i,progress:r,runnerClass:t,trackClass:s})]})},OY=({closeNav:e,isExpanded:t,openNav:n})=>{const s=hn(),r=it(),i=Hr(),a=le(),c=ac(),l=Ai(),d=Ce(),h=Ho(),m=od(),f=dd(),p=ay(),g=(0,u.useMemo)(()=>a?.lessonsOnly?.length??0,[a?.lessonsOnly]),v=(0,u.useMemo)(()=>p[f]??-1,[p,f]),x=i?.navigationStyle,b=(0,u.useMemo)(()=>uc(x),[x]),y=(0,u.useCallback)(()=>{t?e():n()},[t,n,e]),T=i?.exportSettings?.webExportSettings,S=!Cs.isInstantLink&&(i?.lmsOptions?.disableCoverPage||T?.disableCoverPage),I=(0,u.useCallback)(J=>{J.preventDefault(),ho(()=>{s("/")},"lesson-to-cover")},[s]),k=`${fs()?`%${l}`:`${l}%`} ${d?.lessonComplete??""}`,{alpha:N,ariaLabel:R,media:M,role:A}=Zr("coverImage"),j=(0,u.useMemo)(()=>Ni({alpha:N,color:i?.theme?.coverImageColor??void 0,media:M}),[N,i?.theme?.coverImageColor,M]),P=tr("header",{collapsed:!t}),w=tr("header-image",{collapsed:!t}),D="nav-compact__header-inner",O="nav-compact__header-control",B=tr("header-title-link",{collapsed:!t}),H=tr("header-progress-text",{collapsed:!t}),_=tr("header-progress-track",{collapsed:!t}),$=tr("header-progress-runner",{collapsed:!t}),z="nav-compact__header-strip",K=(0,u.useCallback)(()=>{r(nc(!h?.active))},[r,h?.active]);return(0,o.jsxs)("section",{"aria-label":"Course Information",className:P,"data-testid":"nav-compact-header",children:[b&&j&&(0,o.jsx)("div",{"aria-label":R,className:w,role:A,style:j}),(0,o.jsxs)("div",{className:D,children:[(0,o.jsxs)("div",{className:z,children:[(0,o.jsxs)("div",{className:"nav-compact__header-controls",children:[i?.allowSearch&&m!=="restricted"&&t&&(0,o.jsx)("button",{"aria-label":d?.a11ySearchOpen,className:`${O} nav-compact__header-search`,"data-testid":"nav-compact-search",onClick:K,type:"button",children:(0,o.jsx)(vc,{className:"nav-compact__header-control-icon nav-compact__header-search-icon"})}),(0,o.jsxs)("button",{"aria-controls":"nav-compact-outline","aria-expanded":t,"aria-label":t?d?.a11yNavigationMenuClose:d?.a11yNavigationMenuOpen,className:`${O} nav-compact__header-toggle`,"data-testid":"nav-compact-toggle",onClick:y,type:"button",children:[t&&(0,o.jsx)(zU,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"}),!t&&(0,o.jsx)($U,{className:"nav-compact__header-control-icon nav-compact__header-toggle-icon"})]})]}),(0,o.jsx)(PY,{labelLessonName:d?.lessonName??"",labelLessonPreposition:d?.lessonPreposition??"",lessonPosition:v,totalLessons:g})]}),(0,o.jsx)("div",{className:"nav-compact__header-title","data-testid":"nav-compact-title",children:S?(0,o.jsx)("span",{className:B,children:c}):(0,o.jsx)(xn,{className:B,onClick:I,to:"/",children:c})}),(0,o.jsx)(MY,{classProgressRunner:$,classProgressText:H,classProgressTrack:_,navExpanded:t,percentComplete:l,percentCompleteText:k})]})]})};var BY=C(75810),DY=C.n(BY),Gbe=C(22063),FY=C(514),_Y=C.n(FY),HY=C(99227),VY=C.n(HY),zY,$Y,UY,GY,WY;function h5(e,t,n="..."){const s=e?e.toString():"";return s.length>t?s.substr(0,t-1)+n:s}const Wbe=e=>WY(t=>$Y(t)>e,UY(0,e)),KY=new RegExp(/^[0-9]+$/),QY=e=>KY.test(e),ZY=e=>e>=0,YY=e=>e<=100,Kbe=e=>e==="",Qbe=e=>QY(e)&&YY(e)&&ZY(e),Zbe=e=>String(Number(e)),m5=Ue()(yi()(""),DY()(_Y(),0)),Ybe=e=>`${/^[aeiou]/i.test(e)?"an":"a"} ${e}`,qbe=Ue()(yi()(" "),At()(m5),Wh()(" ")),f5=Ue()(yi()(" "),Wh()(/(?=[A-Z]|^)/)),Xbe=e=>e?zY(m5,GY,f5)(e):"",Jbe=Ue()(VY(),f5);function p5({id:e,isEnabled:t,isSectionLesson:n,last:s}){const{navigationStyle:r}=le(),{settings:i}=Gt(e)??{},a=Ri(e),c=ao(),l=nf(String(e)),d=(0,u.useMemo)(()=>Uo(r),[r]),h=String(e)===c,m=i?.isGeneratingAIContent===!0,f=h5(a||"",45),[p,g]=(0,u.useState)(!1),v=(0,u.useCallback)(()=>g(!0),[]),x=(0,u.useCallback)(()=>g(!1),[]),b=n?"nav-compact__outline-section-item":"nav-compact__outline-item",y=`${b}__link`,T=(0,o.jsx)(yu,{canComplete:l,id:e,isDark:d,isEnabled:t,isTooltipVisible:p,onHideTooltip:x,onShowTooltip:v,scope:Ao.COMPACT});return(0,o.jsx)("li",{className:"nav-compact__outline-list-item","data-testid":`nav-compact-lesson-${e}`,role:"listitem",children:m?(0,o.jsx)("div",{className:b,children:(0,o.jsx)("span",{"aria-disabled":"true",className:`${y} ${y}--generating`,"data-testid":`nav-compact-lesson-${e}-generating`,children:f})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(kc,{className:b,dark:d,isCurrentLesson:h,isTooltipEnabled:!l,last:s,lessonId:e,onHideProgressTooltip:x,onShowProgressTooltip:v,showProgressDelay:0,tooltipClassName:`${b}-tooltip`,children:[f,!l&&T]}),l&&T]})})}const qY=V("nav-compact"),XY=({id:e})=>{const t=Gt(e),n=bt(t?.title),s=qY("outline-section-empty");return(0,o.jsx)("div",{className:s,children:(0,o.jsx)("span",{children:n})})};var Ji=C(49860);const JY=({index:e,isEnabled:t,lessonIds:n,id:s})=>{const r=le(),i=r?.theme,a=r?.themeId,c=i?.navigationSectionsExpanded??!0,l=Gt(String(s)),d=bt(l?.title),[h,m]=Ji.useState(c);Ji.useEffect(()=>{m(c)},[c]);const[f,p]=Ji.useState(),g=Ji.useRef(null),v=`sublistCompact-${e}`,x=String(a),b=h?"nav-compact__outline-section-toggle-icon":"nav-compact__outline-section-toggle-icon nav-compact__outline-section-toggle-icon--collapsed",y=h?"nav-compact__outline-section-list":"nav-compact__outline-section-list nav-compact__outline-section-list--collapsed",T=h?"nav-compact__outline-section-toggle":"nav-compact__outline-section-toggle nav-compact__outline-section-toggle--collapsed",S=Ji.useCallback(()=>{m(I=>!I)},[]);return Ji.useLayoutEffect(()=>{const I=setTimeout(()=>{g.current&&p(g.current.scrollHeight)},0);return()=>{clearTimeout(I)}},[n.length,x]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{"aria-controls":v,"aria-expanded":h,className:T,onClick:S,tabIndex:t?void 0:-1,type:"button",children:[(0,o.jsx)("span",{className:"nav-compact__outline-section-toggle-text",children:d}),(0,o.jsx)(D3,{className:b})]}),(0,o.jsx)(gu,{inert:!h,children:(0,o.jsx)("ol",{"aria-hidden":h?void 0:!0,className:y,id:v,ref:g,role:"list",style:{maxHeight:f},children:n.map((I,L)=>(0,o.jsx)(p5,{id:I,isEnabled:t&&h,isSectionLesson:!0,last:L===n.length-1},I))})})]})},eq=({index:e,isEnabled:t,lessonIds:n})=>{const[s,...r]=n,i="nav-compact__outline-item nav-compact__outline-section";return en()(r)?(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(XY,{id:s})}):(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(JY,{id:s,index:e,isEnabled:t,lessonIds:r})})},tq=({index:e,isEnabled:t,lessonIds:n})=>pd(n)?(0,o.jsx)(eq,{index:e,isEnabled:t,lessonIds:n}):n.map((r,i)=>(0,o.jsx)(p5,{id:r,isEnabled:t,isSectionLesson:!1,last:i===n.length-1},r)),nq=({className:e="",isEnabled:t})=>{const n=vd(),s=Ce(),r=Lt(),i=[e,r===se.RISE_CLASSIC?"brand--ui":void 0,"nav-compact__outline",t?void 0:"nav-compact__outline--collapsed"].filter(Boolean).join(" ");return(0,o.jsx)("section",{"aria-label":s?.a11yRegionNavOverview,className:i,"data-testid":"nav-compact-outline",id:"nav-compact-outline",children:vs(n)&&(0,o.jsx)("ol",{className:"nav-compact__outline-list","data-testid":"nav-compact-outline-list",role:"list",children:n.map((a,c)=>en()(a)?null:(0,o.jsx)(tq,{index:c,isEnabled:t,lessonIds:a},c))})})};var sq=C(49860);const oq=()=>{const[e,t]=sq.useState(!1);return(0,ht.A)(f3,()=>t(!0)),(0,ht.A)(Rf,()=>t(!1)),e},g5=V("nav-compact"),v5="nav-content-compact",rq=(0,u.forwardRef)(({closeNav:e,isExpanded:t,openNav:n},s)=>{const r=Hr(),{navigationStyle:i,theme:a}=r??{},c=a?.coverImageColor,l=a?.progressIndicatorStyle,d=pe(S=>S.course?.theme?.buttonNavigationStyle==="FULL"?Math.round(-(S.ui.lessonNavNextButton?.intersectionRect?.height??0)):0),h=(0,u.useMemo)(()=>Uo(i),[i]),m=(0,u.useMemo)(()=>i===wr.LIGHT_ACCENT||i===wr.DARK_ACCENT,[i]),f=oq(),p=(0,u.useMemo)(()=>uc(i),[i]),g=l===ut.CIRCULAR_FILL,v=l===ut.INCOMPLETE_COMPLETE,x=(0,u.useMemo)(()=>p&&c===xt.LIGHT,[p,c]),b=g5({accent:m,dark:h,light:!h,"image-dark-overlay":p&&!x,"image-light-overlay":p&&x,"progress-circular-fill":g,"progress-incomplete-complete":v,collapsed:!t,navNextIsVisible:f}),y=g5("wrap",{collapsed:!t}),T={transform:`translateY(${d}px)`};return(0,o.jsx)("div",{className:b,"data-testid":"nav-compact",id:v5,ref:s,style:T,children:(0,o.jsxs)("div",{className:y,children:[(0,o.jsx)(OY,{closeNav:e,isExpanded:t,openNav:n}),(0,o.jsx)(gu,{inert:!t,children:(0,o.jsx)(nq,{isEnabled:t})})]})})});function C5(e,t){const[n,s]=(0,u.useState)(null),{root:r,rootMargin:i,threshold:a}=t;return(0,u.useEffect)(()=>{if(e&&typeof IntersectionObserver=="function"){const c=new IntersectionObserver(l=>{s(l[0])},{root:r,rootMargin:i,threshold:a});return c.observe(e),()=>{s(null),c.disconnect()}}return()=>{}},[e,r,i,a]),n}const iq={closeNav:()=>{},openNav:()=>{},openSearch:()=>{},closeSearch:()=>{},searchActive:!1},x5=Object.assign((0,u.createContext)(iq),{displayName:"OverlayNavControlContext"});function aq(e){const{children:t,closeNav:n,openNav:s}=e,[r,i]=(0,u.useState)(!1),a=(0,u.useCallback)(()=>{i(!0)},[]),c=(0,u.useCallback)(()=>{i(!1)},[]);return(0,o.jsx)(x5.Provider,{value:{closeNav:n,openNav:s,openSearch:a,closeSearch:c,searchActive:r},children:t})}const Eu=()=>(0,u.useContext)(x5),ku=V("nav-overlay"),cq=({className:e})=>{const t=Ce(),n=fs(),s=Ai(),i=`${n?`%${s}`:`${s}%`} ${t?.lessonComplete??""}`,a=ku("header-progress-runner"),c=ku("header-progress-text"),l=ku("header-progress-track");return(0,o.jsxs)("div",{className:ku("header-progress").mix(e),"data-testid":"nav-overlay-progress",children:[(0,o.jsx)(Vp,{"aria-hidden":!0,progress:s,runnerClass:a,trackClass:l}),(0,o.jsx)("div",{className:c,children:i})]})},fo=V("nav-overlay"),lq=()=>{const e=le(),t=hn(),n=ac(),{allowSearch:s,lmsOptions:r}=e,i=od(),a=Ce(),c=Eu(),l=(0,u.useRef)(null),d=fo("header-control-btn"),h=e?.exportSettings?.webExportSettings,m=!Cs.isInstantLink&&(r?.disableCoverPage||h?.disableCoverPage),f=p=>{p.preventDefault(),ho(()=>{t("/")},"lesson-to-cover")};return(0,o.jsx)("section",{"aria-label":"Course Information","data-testid":"nav-overlay-header",children:(0,o.jsxs)("div",{className:fo("header-container"),children:[(0,o.jsxs)("div",{className:fo("header-controls"),children:[(0,o.jsx)("button",{"aria-label":a?.a11yNavigationMenuClose,className:d,"data-testid":"nav-overlay-close",onClick:c.closeNav,ref:l,type:"button",children:(0,o.jsx)(Ud,{className:fo("header-close-icon")})}),s&&i!=="restricted"&&(0,o.jsx)("button",{"aria-label":a?.a11ySearchOpen,className:d,"data-testid":"nav-overlay-search",onClick:c.openSearch,type:"button",children:(0,o.jsx)(vc,{className:fo("header-search-icon")})})]}),(0,o.jsxs)("div",{className:fo("header-title-progress-container"),children:[(0,o.jsx)("h1",{className:fo("header-title"),"data-testid":"nav-overlay-title",id:"nav-overlay-title",children:m?(0,o.jsx)("span",{className:fo("header-title"),children:n}):(0,o.jsx)(xn,{className:fo("header-title-link"),onClick:f,to:"/",children:n})}),(0,o.jsx)(cq,{})]})]})})},dq={[Gn.ARTICLE]:O3,[Gn.INTERACTION]:YU,[Gn.QUIZ]:WU,[Gn.VIDEO]:qU},Nu=({className:e,icon:t})=>{const n=dq[t]??O3;return(0,o.jsx)(n,{className:e,icon:t})},po=V("nav-overlay"),b5=({first:e,id:t,isEnabled:n,isSectionLesson:s,last:r})=>{const{navigationStyle:i}=le(),{icon:a,settings:c}=Gt(t)??{},l=Ri(t),d=Eu(),h=nf(String(t)),m=Uo(i),f=c?.isGeneratingAIContent===!0,p=po("outline-item",{section:s}),g=`${po("outline-item")}__link`,v=po("outline-item-link-icon",{quiz:a==="Quiz"}),x=(0,u.useCallback)(()=>{d.closeNav()},[d]),[b,y]=(0,u.useState)(!1),T=(0,u.useCallback)(()=>y(!0),[]),S=(0,u.useCallback)(()=>y(!1),[]),I=(0,o.jsx)(yu,{canComplete:h,id:t,isDark:m,isEnabled:n,isTooltipVisible:b,onHideTooltip:S,onShowTooltip:T,scope:Ao.OVERLAY});return(0,o.jsx)("li",{className:po("outline-list-item",{first:e,last:r}),"data-testid":`nav-overlay-lesson-${t}`,role:"listitem",children:f?(0,o.jsx)("div",{className:p.toString(),children:(0,o.jsxs)("span",{"aria-disabled":"true",className:`${g} ${g}--generating`,"data-testid":`nav-overlay-lesson-${t}-generating`,children:[(0,o.jsx)("span",{className:po("outline-icon-wrap"),children:(0,o.jsx)(Nu,{className:v,icon:a??Gn.ARTICLE})}),(0,o.jsx)("span",{className:po("outline-lesson-title"),children:l})]})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(kc,{className:p.toString(),dark:m,isTooltipEnabled:!h,lessonId:t,onHideProgressTooltip:S,onNavigate:x,onShowProgressTooltip:T,showProgressDelay:null,tooltipClassName:po("outline-item-tooltip").toString(),children:[(0,o.jsx)("span",{className:po("outline-icon-wrap"),children:(0,o.jsx)(Nu,{className:v,icon:a??Gn.ARTICLE})}),(0,o.jsx)("span",{className:po("outline-lesson-title"),children:l}),!h&&I]}),h&&I]})})},uq=V("nav-overlay"),hq=({id:e})=>{const t=Gt(e),n=bt(t?.title);return(0,o.jsx)("span",{className:uq("outline-section-text"),children:n})},y5=V("nav-overlay"),mq=({isEnabled:e,lessonIds:t})=>{const n=(0,u.useRef)(null);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:y5("outline-section-divider")}),(0,o.jsx)("ol",{className:y5("outline-section-list"),ref:n,role:"list",children:t.map((s,r)=>(0,o.jsx)(b5,{id:s,isEnabled:e,isSectionLesson:!0,last:r===t.length-1},s))})]})},fq=V("nav-overlay"),pq=({index:e,isEnabled:t,lessonIds:n})=>{const[s,...r]=n,i=fq("outline-item").mix("nav-overlay__outline-section");return en()(r)?(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(hq,{id:s})}):(0,o.jsx)("li",{className:i,role:"listitem",children:(0,o.jsx)(mq,{index:e,isEnabled:t,lessonIds:r})})},gq=({index:e,isEnabled:t,lessonIds:n})=>{const s=pd(n),r=Ri(n[0]),i=V("nav-overlay");return s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h2",{className:i("outline-section-text"),children:r}),(0,o.jsx)("ol",{className:i("outline-list"),"data-testid":"nav-overlay-outline-list",role:"list",children:(0,o.jsx)(pq,{index:e,isEnabled:t,lessonIds:n})})]}):n.map((a,c)=>(0,o.jsx)(b5,{first:c===0,id:a,isEnabled:t,isSectionLesson:!1,last:c===n.length-1},a))},vq=V("nav-overlay"),Cq=({isEnabled:e})=>{const t=vd(),n=Ce();return(0,o.jsx)("section",{"aria-label":n?.a11yRegionNavOverview,className:vq("outline"),"data-testid":"nav-overlay-outline",id:"nav-overlay-outline",children:vs(t)&&(0,o.jsx)(o.Fragment,{children:t.map((s,r)=>en()(s)?null:(0,o.jsx)(gq,{index:r,isEnabled:e,lessonIds:s},`lessonIdGroup-${r}`))})})};var xq=C(40002),wu=C.n(xq);const bq={"&nbsp;":"\xA0","&iexcl;":"\xA1","&cent;":"\xA2","&pound;":"\xA3","&curren;":"\xA4","&yen;":"\xA5","&brvbar;":"\xA6","&sect;":"\xA7","&uml;":"\xA8","&copy;":"\xA9","&ordf;":"\xAA","&laquo;":"\xAB","&not;":"\xAC","&shy;":"\xAD","&reg;":"\xAE","&macr;":"\xAF","&deg;":"\xB0","&plusmn;":"\xB1","&sup2;":"\xB2","&sup3;":"\xB3","&acute;":"\xB4","&micro;":"\xB5","&para;":"\xB6","&middot;":"\xB7","&cedil;":"\xB8","&sup1;":"\xB9","&ordm;":"\xBA","&raquo;":"\xBB","&frac14;":"\xBC","&frac12;":"\xBD","&frac34;":"\xBE","&iquest;":"\xBF","&Agrave;":"\xC0","&Aacute;":"\xC1","&Acirc;":"\xC2","&Atilde;":"\xC3","&Auml;":"\xC4","&Aring;":"\xC5","&AElig;":"\xC6","&Ccedil;":"\xC7","&Egrave;":"\xC8","&Eacute;":"\xC9","&Ecirc;":"\xCA","&Euml;":"\xCB","&Igrave;":"\xCC","&Iacute;":"\xCD","&Icirc;":"\xCE","&Iuml;":"\xCF","&ETH;":"\xD0","&Ntilde;":"\xD1","&Ograve;":"\xD2","&Oacute;":"\xD3","&Ocirc;":"\xD4","&Otilde;":"\xD5","&Ouml;":"\xD6","&times;":"\xD7","&Oslash;":"\xD8","&Ugrave;":"\xD9","&Uacute;":"\xDA","&Ucirc;":"\xDB","&Uuml;":"\xDC","&Yacute;":"\xDD","&THORN;":"\xDE","&szlig;":"\xDF","&agrave;":"\xE0","&aacute;":"\xE1","&acirc;":"\xE2","&atilde;":"\xE3","&auml;":"\xE4","&aring;":"\xE5","&aelig;":"\xE6","&ccedil;":"\xE7","&egrave;":"\xE8","&eacute;":"\xE9","&ecirc;":"\xEA","&euml;":"\xEB","&igrave;":"\xEC","&iacute;":"\xED","&icirc;":"\xEE","&iuml;":"\xEF","&eth;":"\xF0","&ntilde;":"\xF1","&ograve;":"\xF2","&oacute;":"\xF3","&ocirc;":"\xF4","&otilde;":"\xF5","&ouml;":"\xF6","&divide;":"\xF7","&oslash;":"\xF8","&ugrave;":"\xF9","&uacute;":"\xFA","&ucirc;":"\xFB","&uuml;":"\xFC","&yacute;":"\xFD","&thorn;":"\xFE","&yuml;":"\xFF","&quot;":'"',"&amp;":"&","&lt;":"<","&gt;":">","&apos;":"'","&OElig;":"\u0152","&oelig;":"\u0153","&Scaron;":"\u0160","&scaron;":"\u0161","&Yuml;":"\u0178","&circ;":"\u02C6","&tilde;":"\u02DC","&ensp;":"\u2002","&emsp;":"\u2003","&thinsp;":"\u2009","&zwnj;":"\u200C","&zwj;":"\u200D","&lrm;":"\u200E","&rlm;":"\u200F","&ndash;":"\u2013","&mdash;":"\u2014","&lsquo;":"\u2018","&rsquo;":"\u2019","&sbquo;":"\u201A","&ldquo;":"\u201C","&rdquo;":"\u201D","&bdquo;":"\u201E","&dagger;":"\u2020","&Dagger;":"\u2021","&permil;":"\u2030","&lsaquo;":"\u2039","&rsaquo;":"\u203A","&euro;":"\u20AC","&fnof;":"\u0192","&Alpha;":"\u0391","&Beta;":"\u0392","&Gamma;":"\u0393","&Delta;":"\u0394","&Epsilon;":"\u0395","&Zeta;":"\u0396","&Eta;":"\u0397","&Theta;":"\u0398","&Iota;":"\u0399","&Kappa;":"\u039A","&Lambda;":"\u039B","&Mu;":"\u039C","&Nu;":"\u039D","&Xi;":"\u039E","&Omicron;":"\u039F","&Pi;":"\u03A0","&Rho;":"\u03A1","&Sigma;":"\u03A3","&Tau;":"\u03A4","&Upsilon;":"\u03A5","&Phi;":"\u03A6","&Chi;":"\u03A7","&Psi;":"\u03A8","&Omega;":"\u03A9","&alpha;":"\u03B1","&beta;":"\u03B2","&gamma;":"\u03B3","&delta;":"\u03B4","&epsilon;":"\u03B5","&zeta;":"\u03B6","&eta;":"\u03B7","&theta;":"\u03B8","&iota;":"\u03B9","&kappa;":"\u03BA","&lambda;":"\u03BB","&mu;":"\u03BC","&nu;":"\u03BD","&xi;":"\u03BE","&omicron;":"\u03BF","&pi;":"\u03C0","&rho;":"\u03C1","&sigmaf;":"\u03C2","&sigma;":"\u03C3","&tau;":"\u03C4","&upsilon;":"\u03C5","&phi;":"\u03C6","&chi;":"\u03C7","&psi;":"\u03C8","&omega;":"\u03C9","&thetasym;":"\u03D1","&upsih;":"\u03D2","&piv;":"\u03D6","&bull;":"\u2022","&hellip;":"\u2026","&prime;":"\u2032","&Prime;":"\u2033","&oline;":"\u203E","&frasl;":"\u2044","&weierp;":"\u2118","&image;":"\u2111","&real;":"\u211C","&trade;":"\u2122","&alefsym;":"\u2135","&larr;":"\u2190","&uarr;":"\u2191","&rarr;":"\u2192","&darr;":"\u2193","&harr;":"\u2194","&crarr;":"\u21B5","&lArr;":"\u21D0","&uArr;":"\u21D1","&rArr;":"\u21D2","&dArr;":"\u21D3","&hArr;":"\u21D4","&forall;":"\u2200","&part;":"\u2202","&exist;":"\u2203","&empty;":"\u2205","&nabla;":"\u2207","&isin;":"\u2208","&notin;":"\u2209","&ni;":"\u220B","&prod;":"\u220F","&sum;":"\u2211","&minus;":"\u2212","&lowast;":"\u2217","&radic;":"\u221A","&prop;":"\u221D","&infin;":"\u221E","&ang;":"\u2220","&and;":"\u2227","&or;":"\u2228","&cap;":"\u2229","&cup;":"\u222A","&int;":"\u222B","&there4;":"\u2234","&sim;":"\u223C","&cong;":"\u2245","&asymp;":"\u2248","&ne;":"\u2260","&equiv;":"\u2261","&le;":"\u2264","&ge;":"\u2265","&sub;":"\u2282","&sup;":"\u2283","&nsub;":"\u2284","&sube;":"\u2286","&supe;":"\u2287","&oplus;":"\u2295","&otimes;":"\u2297","&perp;":"\u22A5","&sdot;":"\u22C5","&lceil;":"\u2308","&rceil;":"\u2309","&lfloor;":"\u230A","&rfloor;":"\u230B","&lang;":"\u2329","&rang;":"\u232A","&loz;":"\u25CA","&spades;":"\u2660","&clubs;":"\u2663","&hearts;":"\u2665","&diams;":"\u2666"},yq=e=>{if(e.charAt(1)!=="#")return bq[e]||e;let t,n=e.charAt(2);return n==="x"||n==="X"?(n=e.substring(3,e.length-1),t=parseInt(n,16)):(n=e.substring(2,e.length-1),t=parseInt(n)),Number.isNaN(t)?e:String.fromCharCode(t)},pye=e=>e.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),Xr=e=>e.replace(/&#?\w+;/g,yq);var Sq=C(68848),ju=C.n(Sq);const zp=Array.isArray,S5=e=>typeof e=="number",Au=e=>!Ft()(e)&&typeof e=="object",$p=e=>typeof e=="string",Iq=(e,t,n)=>(s,r)=>{const i=Er()(r,e);if((0,an.uW)(s)){const a=n[s.l10nId];return typeof a!="string"?!1:!en()(ju()(t,Xr(a)))}else return Au(s)?I5(e,t,n)(s):i&&$p(s)?!en()(ju()(t,Xr(s))):!1},I5=(e,t,n)=>s=>{const r=js()(Iq(e,t,n),s);return Er()(!0,ls()(r))},Tq=I5;var Lq=C(49306),Up=C.n(Lq),Eq=C(39767),Gp=C.n(Eq);const kq=Up(),Nq=fn(),wq=(e,t,n)=>(s,r)=>{const i=Er()(r,e);if(zp(s))return ls()(Wp(e,t,n)(s));if((0,an.uW)(s)){const a=n[s.l10nId];return typeof a!="string"?0:ps()(ju()(t,Xr(a)))}else return Au(s)?Wp(e,t,n)(s):i&&$p(s)?ps()(ju()(t,Xr(s))):0},Wp=(e,t,n)=>s=>js()(wq(e,t,n),s),Kp=e=>{if(zp(e))return At()(Kp,e);if(Au(e))return Kp(ls()(e));if(S5(e))return e},jq=(e,t,n)=>s=>{const r=Wp(e,t,n)(s),i=At()(Kp,ls()(r)),a=xl()(i).filter(S5),c=Gp()(kq,0,a);return Nq("results",c,s)},Aq=(e,t,n)=>(s,r)=>{const i=Er()(r,e);return zp(s)?ls()(Qp(e,t,n)(s)):Au(s)?Qp(e,t,n)(s):i&&$p(s)?vi()(t,n,s):s},Qp=(e,t,n)=>s=>js()(Aq(e,t,n),s),T5=Qp,L5=(e,t,n,s,r)=>{const i=["caption","code","description","heading","message","name","paragraph","title"];if(en()(e))return!1;const a=e.replace(/[-[\]{}()"'*+?.,\\^$|#\s]/g,"\\$&"),c=new RegExp(`(${a})(?![^<]*>)`,"ig"),l="<mark>$&</mark>",d=T5(i,c,l),h=T5(Object.keys(n),c,l),m=At()(b=>{const y=d(b);return Array.isArray(y)?b:{...b,...y}},t),f=s?s(e):{},p=h(n),g=b=>f[b.id]>0||Tq(i,c,n)(b),v=b=>jq(i,c,n)(b),x=At()(v,ko()(g,t));x.forEach(b=>{b.results+=f[b.id]??0}),r(e,x,Array.isArray(p)?n:p,m)};function Rq(e){if(!e)return!0;for(const t in e)return!1;return!0}function E5(){const{lessons:e,mondrian:t}=le(),{currentLocale:n}=at(),[s,r]=(0,u.useState)(null);return(0,u.useEffect)(()=>{Rq(t)||C.e("webpack_container_remote_mondrian_learn-react").then(C.t.bind(C,4246,23)).then(i=>r(()=>i.searchItemsByLesson))},[t]),(0,u.useCallback)(i=>s?.(i,e,t,n)??{},[s,e,t,n])}const Pq=Qr.Ay.animateScroll,ts=V("nav-overlay"),Mq=()=>{const e=it(),t=Pb(),n=Eu(),{lessons:s}=le(),[r,i]=(0,u.useState)(""),a=E5(),c=(0,u.useRef)(null),l=Ce(),d=ts("search-close-btn"),h=ts("search-clear-btn"),m=(0,u.useCallback)(()=>{n.closeSearch(),n.closeNav(),e([eb(!0),nc(!1),Dr(null)])},[e,n]),f=(0,u.useCallback)(()=>{i(""),c.current?.focus?.()},[]);(0,u.useEffect)(()=>{c.current?.focus?.()},[]);const p=(0,u.useCallback)(x=>{cn(x)&&!wu()(r)?(x.preventDefault(),i(""),e(Dr(null))):cn(x)&&wu()(r)&&m()},[e,m,r]);(0,ht.A)("keydown",p);const g=(0,u.useCallback)(x=>{i(x.target.value)},[]),v=(0,u.useCallback)(x=>{if(x.preventDefault(),r){const b=(y,T,S,I)=>{e([Dr(y),tb(T),nb(S),sb(I),nc(!0)]),Pq.scrollToTop({duration:500,smooth:!0})};n.closeNav(),n.closeSearch(),L5(r,s,t??{},a,b)}},[r,a,n,s,t,e]);return(0,o.jsxs)("div",{className:ts("search"),"data-testid":"nav-overlay-search-container",children:[(0,o.jsx)("div",{className:ts("search-header"),children:(0,o.jsx)("button",{"aria-label":l?.a11ySearchClose,className:d,"data-testid":"nav-overlay-search-close",onClick:m,type:"button",children:(0,o.jsx)(Ud,{className:ts("search-close-icon")})})}),(0,o.jsx)("div",{className:ts("search-body"),children:(0,o.jsxs)("form",{autoComplete:"off",onSubmit:v,children:[(0,o.jsxs)("div",{className:ts("search-container"),children:[(0,o.jsx)(vc,{className:ts("search-icon")}),(0,o.jsx)("input",{"aria-label":l?.a11ySearchInput,className:ts("search-input").mix("brand--ui"),"data-testid":"nav-overlay-search-input",name:"search",onChange:g,placeholder:l?.search,ref:c,type:"input",value:r}),r&&(0,o.jsx)("button",{"aria-label":l?.a11ySearchInputClear,className:h,"data-testid":"nav-overlay-search-clear",onClick:f,type:"button",children:(0,o.jsx)(Ud,{className:ts("search-clear-icon").toString()})})]}),(0,o.jsx)("div",{className:ts("search-actions"),children:(0,o.jsx)("button",{className:ts("search-submit-btn").mix("brand--ui"),"data-testid":"nav-overlay-search-submit",type:"submit",children:l?.search})})]})})]})},Zp=V("nav-overlay"),k5="nav-content-overlay",Oq=({isExpanded:e,outlineRef:t})=>{const s=vd()[0],r=pd(s),i=Zp("body",{section:r});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(lq,{}),(0,o.jsx)("div",{className:i,ref:t,children:(0,o.jsx)(Cq,{isEnabled:e})})]})},Bq=({children:e,isImage:t,hasStickyHeader:n})=>{const s=Zp("content",{graphic:t,"has-sticky-header":n});return(0,o.jsxs)("div",{className:s,"data-nav-scrollable":!0,"data-testid":"nav-overlay-content",children:[e,t&&(0,o.jsx)(Ap,{})]})},Dq=({isExpanded:e})=>{const t=(0,u.useRef)(null),[n,s]=(0,u.useState)(null),r=le(),i=Eu(),a=(0,ze.A)(e),c=r?.navigationStyle,l=r?.theme?.progressIndicatorStyle,d=r?.theme?.coverImageColor,h=c===jr.ACCENT,m=c===jr.TINT,f=Uo(c),p=c===jr.GRAY,g=c===jr.LIGHT,v=uc(c),x=l===ut.CIRCULAR_FILL,b=l===ut.INCOMPLETE_COMPLETE,[y,T]=(0,u.useState)(!0),{isIntersecting:S=!1}=C5(n,{root:t?.current,threshold:1})||{},I=(0,ze.A)(S),L=(0,u.useMemo)(()=>v&&d===xt.LIGHT,[v,d]),E=Zp({"accent-tint":m,accent:h,dark:f,gray:p,"image-dark-overlay":v&&!L,"image-light-overlay":v&&L,light:g,"progress-circular-fill":x,"progress-incomplete-complete":b,closing:a&&!e});return(0,u.useEffect)(()=>{e?t.current?.showModal():setTimeout(()=>{t.current?.close()},500)},[e]),(0,u.useEffect)(()=>{const k=N=>{cn(N)&&!i.searchActive&&(N.preventDefault(),i.closeNav())};return e?document.addEventListener("keydown",k):document.removeEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[e,i]),(0,u.useEffect)(()=>{!y&&S?T(!0):I&&!S&&T(!1)},[S,y,I,T]),(0,o.jsx)("dialog",{"aria-labelledby":"nav-overlay-title","aria-modal":"true",className:E,"data-testid":"nav-overlay",id:k5,ref:t,children:(0,o.jsx)(Bq,{hasStickyHeader:y,isImage:v,children:i.searchActive?(0,o.jsx)(Mq,{}):(0,o.jsx)(Oq,{isExpanded:e,outlineRef:s})})})},Hc=V("nav-sidebar-search"),Fq=({className:e="",isEnabled:t})=>{const n=it(),s=Pb(),r=(0,ze.A)(t),{lessons:i}=le(),a=Ho(),c=Ce(),l=(0,u.useRef)(null),d=Hc({disabled:!t}).mix(e),h=Hc("icon"),m=Hc("input"),f=Hc("close"),p=Hc("close-icon"),g=a?.term,v=!t,[x,b]=(0,u.useState)(""),y=E5(),T=(0,u.useCallback)(()=>{n([eb(!0),nc(!1),Dr(null)]),b("")},[n]),S=(0,u.useCallback)(E=>{cn(E)&&!wu()(x)?(E.preventDefault(),b(""),n(Dr(null))):cn(E)&&wu()(x)&&T()},[n,T,x]),I=(0,u.useCallback)(E=>{g!=null&&n(Dr(null)),b(E.target.value)},[n,g]),L=(0,u.useCallback)(E=>{E.preventDefault(),L5(x,i,s??{},y,(N,R,M,A)=>n([Dr(N),tb(R),nb(M),sb(A)]))},[n,i,s,x,y]);return(0,u.useEffect)(()=>{!r&&t&&setTimeout(()=>{l.current?.focus()},50)},[t,r]),(0,u.useEffect)(()=>{g&&g!==x&&b(g)},[x,g]),(0,o.jsxs)("form",{autoComplete:"off",className:d,"data-testid":"nav-sidebar-search",onSubmit:L,children:[(0,o.jsx)(vc,{className:h}),(0,o.jsx)("input",{"aria-label":c?.a11ySearchInput,className:m,disabled:v,name:"search",onChange:I,onKeyDown:S,placeholder:c?.search,ref:l,type:"search",value:x}),(0,o.jsx)("button",{"aria-label":c?.a11ySearchClose,className:f,onClick:T,type:"reset",children:(0,o.jsx)(Ud,{className:p})})]})},Yp=new WeakMap,N5=new ResizeObserver(e=>{requestAnimationFrame(()=>{for(const t of e)Yp.get(t.target)?.(t)})});function Ru(e,t){(0,u.useEffect)(()=>{if(e)return Yp.set(e,t),()=>Yp.delete(e)},[e,t]),(0,u.useEffect)(()=>{if(e)return N5.observe(e),()=>N5.unobserve(e)},[e])}const ns=V("nav-sidebar-header"),_q=V("nav-sidebar-header-ghost"),Hq=()=>pe(e=>e.ui.skipToNavButton?.offsetHeight??0),Vq=e=>{const{classProgressRunner:t,classProgressText:n,classProgressTrack:s,percentComplete:r,percentCompleteText:i}=e,a=Lt(),c=(0,o.jsx)("div",{className:n,children:i});return(0,o.jsxs)("div",{className:ns("progress"),"data-testid":"nav-sidebar-progress",children:[a===se.APEX&&c,(0,o.jsx)(Vp,{"aria-hidden":"true",progress:r,runnerClass:t,trackClass:s}),a!==se.APEX&&c]})},zq=({className:e,isCompact:t,isEnabled:n,navRefWidth:s,setIsCompact:r})=>{const i=it(),a=hn(),[c,l]=(0,u.useState)(""),[d,h]=(0,u.useState)({height:0,width:0}),[m,f]=(0,u.useState)(d),[p,g]=(0,u.useState)(d),v=Hq(),[x,b]=(0,u.useState)(null),y=(0,u.useRef)(null),T=(0,u.useRef)(null),[S,I]=(0,u.useState)(null),L=le(),E=ac(),k=Ce(),N=Ai(),R=Ho(),M=T6(),A=fs(),j=od(),P=L?.exportSettings?.webExportSettings,w=!Cs.isInstantLink&&(L?.lmsOptions?.disableCoverPage||P?.disableCoverPage),D=L?.allowSearch&&j!=="restricted",O=L?.theme?.coverImageColor,B=L?.navigationStyle,H=(0,u.useMemo)(()=>uc(B),[B]),_=!!jY(),$=(0,ze.A)(R),z=(R?.active||_)??!1,[K,J]=(0,u.useState)(!0),[Y,G]=(0,u.useState)(null),F=ns({compact:t,searching:z,transition:K}).mix(e),U=ns("inner",{compact:t}),Q=ns("content",{compact:t,hidden:z}),Z=ns("graphic",{image:H}),q=ns("progress-runner"),te=ns("progress-text",{compact:t}),ne=ns("progress-track"),ae=ns("search-area",{hidden:!z}),ue=ns("search-btn",{hidden:z}),Te=ns("search-icon"),we=ns("title",{compact:t}),W=_q({compact:t,searching:z}),ge=`${A?`%${N}`:`${N}%`} ${k?.lessonComplete}`,he=n&&!z?void 0:-1,Ne=n&&!z?void 0:-1,{alpha:be,media:de}=Zr("coverImage"),Qe=(0,u.useMemo)(()=>{const Pe={};return H&&Object.assign(Pe,Ni({alpha:be,color:O??void 0,media:de})),z&&(Pe.height=m.height),Pe},[be,O,de,H,z,m.height]),zt=(0,u.useMemo)(()=>{const Pe={};return t&&(Pe.bottom=`calc(100% - ${v}px)`,Pe.width=s||0,Pe.transition="width 0.3s",n||(Pe.transition="width 0.3s",Pe.width="0rem")),d.height&&(Pe.height=d.height,Pe.overflow="hidden",t&&(Pe.transition="height 0.3s ease .1s, transform 0.3s ease .1s")),Pe},[t,n,s,d.height,v]);(0,u.useEffect)(()=>{l(t&&M?h5(E??"",45):E)},[E,t,M]);const on=z?void 0:{height:p.height},Ze=(0,u.useCallback)(()=>{f(d),i(nc(!0))},[i,d]),rn=(0,u.useCallback)(Pe=>{Pe.preventDefault(),ho(()=>{a("/")},"lesson-to-cover")},[a]);(0,u.useLayoutEffect)(()=>{G(document.querySelector("[data-nav-scrollable]"))},[]);const{isIntersecting:rt=!1}=C5(x,{root:Y,threshold:0})||{},tt=(0,ze.A)(rt);(0,u.useEffect)(()=>{const Pe=S!=null&&window.innerHeight*.4>=S.offsetHeight;tt&&!rt&&Pe?r(!0):!tt&&rt&&r(!1)},[rt,tt,S,r]);const wt=(0,u.useCallback)(({target:Pe})=>{const Me={height:Pe?.scrollHeight??0,width:s??0};h(Me),f(Me),t||g(Me)},[t,s]);Ru(S,wt),(0,u.useLayoutEffect)(()=>{const Pe=Y?.scrollTop??0;(Y||Pe>0)&&Y&&(Y.scrollTop=0);const Me={height:S?.scrollHeight??0,width:s??0};h(Me),f(Me),g(Me)},[Y,s,S]),(0,u.useEffect)(()=>{D&&$?.active&&!R?.active&&y?.current?.focus()},[D,R,$]),(0,u.useEffect)(()=>{z?J(!0):t&&J(!1)},[z,t]);const He=(0,u.useCallback)(Pe=>{const Me=Pe.target;if(!(Me instanceof HTMLElement)||!Me.hasAttribute("data-nav-item")||!t||!S||!Y)return;const jt=S.getBoundingClientRect(),as=Me.getBoundingClientRect();jt.bottom>as.top&&(Y.scrollTop-=jt.height-as.top+5)},[Y,t,S]);return(0,ht.A)("focusin",He,Y),(0,u.useEffect)(()=>l(E),[E]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:W,ref:b,style:on}),(0,o.jsx)("div",{className:F,"data-testid":"nav-sidebar-header",ref:T,style:zt,children:(0,o.jsxs)("div",{className:U,ref:I,children:[(0,o.jsx)("div",{className:Z,style:Qe}),D&&(0,o.jsx)("button",{"aria-label":k?.a11ySearchOpen,className:ue,onClick:Ze,tabIndex:he,type:"button",children:(0,o.jsx)(vc,{className:Te})}),(0,o.jsx)("div",{className:ae,children:(0,o.jsx)(Fq,{isEnabled:n&&z})}),(0,o.jsxs)("div",{className:Q,children:[w?(0,o.jsx)("span",{className:we,"data-testid":"nav-sidebar-title",tabIndex:Ne,children:c}):(0,o.jsx)(xn,{className:we,"data-testid":"nav-sidebar-title",onClick:rn,tabIndex:Ne,to:"/",children:c}),(0,o.jsx)(Vq,{classProgressRunner:q,classProgressText:te,classProgressTrack:ne,percentComplete:N,percentCompleteText:ge})]})]})})]})},$q=V("nav-sidebar");function w5({closeNav:e,id:t,isEnabled:n,isSectionLesson:s,last:r}){const{navigationStyle:i}=le(),{icon:a,settings:c}=Gt(t)??{},l=Ri(t),d=ao(),h=_c(),m=nf(String(t)),f=String(t)===d,p=c?.isGeneratingAIContent===!0,g=(0,u.useMemo)(()=>Uo(i),[i]),v=s?"nav-sidebar__outline-section-item":"nav-sidebar__outline-item",x=`${v}__link`,b=`${v}-link-icon`,y=(0,o.jsx)(Nu,{className:b,icon:a??Gn.ARTICLE}),[T,S]=(0,u.useState)(!1),I=(0,u.useCallback)(()=>S(!0),[]),L=(0,u.useCallback)(()=>S(!1),[]),E=(0,o.jsx)(yu,{canComplete:m,id:t,isDark:g,isEnabled:n,isTooltipVisible:T,onHideTooltip:L,onShowTooltip:I,scope:Ao.SIDEBAR}),k=()=>{e&&h&&e()};return(0,o.jsx)("li",{className:$q("outline-list-item",{last:r}),"data-testid":`nav-outline-lesson-${t}`,role:"listitem",children:p?(0,o.jsx)("div",{className:v,children:(0,o.jsxs)("span",{"aria-disabled":"true",className:`${x} ${x}--generating`,"data-testid":`nav-outline-lesson-${t}-generating`,children:[y,l]})}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(kc,{className:v,dark:g,isCurrentLesson:f,isTooltipEnabled:!m,lessonId:t,onHideProgressTooltip:L,onNavigate:k,onShowProgressTooltip:I,showProgressDelay:0,tooltipClassName:`${v}-tooltip`,children:[y,l,!m&&E]}),m&&E]})})}const Uq=({id:e})=>{const t=Gt(e),n=bt(t?.title);return(0,o.jsx)("span",{className:"nav-sidebar__outline-section-text",children:n})};var ea=C(49860);const Gq=({closeNav:e,id:t,index:n,isEnabled:s,lessonIds:r})=>{const i=le(),a=i?.theme,c=i?.themeId,l=a?.navigationSectionsExpanded??!0,d=Ri(String(t)),[h,m]=ea.useState(l);ea.useEffect(()=>{m(l)},[l]);const[f,p]=ea.useState(),g=ea.useRef(null),v=`sidebar-sublist-${n}`,x=g.current?.clientWidth,b=String(c),y=h?"nav-sidebar__outline-section-toggle-icon":"nav-sidebar__outline-section-toggle-icon nav-sidebar__outline-section-toggle-icon--collapsed",T=h?"nav-sidebar__outline-section-list":"nav-sidebar__outline-section-list nav-sidebar__outline-section-list--collapsed",S=ea.useCallback(()=>{m(I=>!I)},[]);return ea.useLayoutEffect(()=>{const I=setTimeout(()=>{g.current&&p(g.current.scrollHeight)},0);return()=>{clearTimeout(I)}},[r.length,x,b]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("button",{"aria-controls":v,"aria-expanded":h,className:"nav-sidebar__outline-section-toggle","data-nav-item":"",onClick:S,tabIndex:s?void 0:-1,type:"button",children:[(0,o.jsx)("span",{className:"nav-sidebar__outline-section-toggle-text",children:d}),(0,o.jsx)(D3,{className:y})]}),(0,o.jsx)(gu,{inert:!h,children:(0,o.jsx)("ol",{"aria-hidden":h?void 0:!0,className:T,id:v,ref:g,role:"list",style:{maxHeight:f},children:r.map((I,L)=>(0,o.jsx)(w5,{closeNav:e,id:I,isEnabled:s&&h,isSectionLesson:!0,last:L===r.length-1},I))})})]})},Wq=({closeNav:e,index:t,isEnabled:n,lessonIds:s})=>{const[r,...i]=s,a="nav-sidebar__outline-item nav-sidebar__outline-section";return en()(i)?(0,o.jsx)("li",{className:a,role:"listitem",children:(0,o.jsx)(Uq,{id:r})}):(0,o.jsx)("li",{className:a,role:"listitem",children:(0,o.jsx)(Gq,{closeNav:e,id:r,index:t,isEnabled:n,lessonIds:i})})},Kq=({closeNav:e,index:t,isEnabled:n,lessonIds:s})=>pd(s.map(String))?(0,o.jsx)(Wq,{closeNav:e,index:t,isEnabled:n,lessonIds:s}):s.map((i,a)=>(0,o.jsx)(w5,{closeNav:e,id:i,isEnabled:n,isSectionLesson:!1,last:a===s.length-1},i)),Qq=({className:e="",closeNav:t,isEnabled:n})=>{const s=vd(),[r,i]=(0,u.useState)(!n),a=Ce(),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=[e,"nav-sidebar__outline",r?"nav-sidebar__outline--hidden":void 0,co.isSafari?"nav-sidebar__outline--safari":void 0].filter(Boolean).join(" "),h=["nav-sidebar__outline-list",n?void 0:"nav-sidebar__outline-list--disabled",r?"nav-sidebar__outline-list--hidden":void 0].filter(Boolean).join(" ");return(0,u.useEffect)(()=>(n?(clearTimeout(l.current??void 0),i(!1)):l.current=setTimeout(()=>{i(!0)},350),()=>{clearTimeout(l.current??void 0)}),[n]),(0,o.jsx)("section",{"aria-label":a?.a11yRegionNavOverview,className:d,"data-testid":"nav-sidebar-outline",id:"nav-sidebar-outline",children:vs(s)&&(0,o.jsx)("ol",{className:h,"data-testid":"nav-sidebar-outline-list",ref:c,role:"list",children:s.map((m,f)=>en()(m)?null:(0,o.jsx)(Kq,{closeNav:t,index:f,isEnabled:n,lessonIds:m},f))})})};var Zq=C(4374);const ta=V("nav-sidebar-result"),j5=({result:e})=>{const t=Ce(),n=e?.icon??Gn.ARTICLE,s=bt(e?.title),r=e?.results??0,i=r===1?t?.result:t?.results,a=ta("icon"),c=ta("title"),l=ta("count");return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Nu,{className:a,icon:n}),(0,o.jsx)("span",{className:c,children:s}),(0,o.jsx)("span",{className:l,children:`${r} ${i}`})]})},Yq=({id:e,index:t,isEnabled:n,onSelectResult:s})=>{const r=le(),i=(0,Be.RQ)(Cd),a=(0,Be.RQ)(xd),c=i??a,l=wM(String(e)),d=c?.params.lessonId===String(e),h=d?"page":void 0,m=r?.color,f=r?.navigationStyle,p=n?void 0:-1,g={animationDelay:`${t/10}s`},v=l?.id,x=Pi(v==null?void 0:String(v)),b=(0,u.useMemo)(()=>Uo(f),[f]),y=ta(),T=ta("inner",{active:d}),S=ta("link",{dark:b,light:!b});return(0,o.jsx)("li",{className:y,role:"listitem",style:g,children:(0,o.jsx)("div",{className:T,style:{color:m},children:n&&x==null?(0,o.jsx)(xn,{"aria-current":h,className:S,onClick:s,tabIndex:p,to:An(e),children:(0,o.jsx)(j5,{result:l})}):(0,o.jsx)(D6,{className:S,restriction:x,tooltipClassName:"lesson-nav-link-tooltip",children:(0,o.jsx)(j5,{result:l})})})})},Pu=V("nav-sidebar-results"),qq=[],Xq=({closeNav:e,isEnabled:t})=>{const{announcePolite:n}=Ms(),s=le(),r=Ho(),i=Ce(),c=(r?.activeLessons??qq).filter(Qb),l=r?.term,d=vs(c),h=(0,Zq.A)(l),m=i?.noResults??"",f=s?.navigationStyle,p=(0,u.useMemo)(()=>Uo(f),[f]),g=Pu(),v=Pu("message",{dark:p,light:!p}),x=Pu("term"),b=Pu("list"),y=Xt(960),T=u.useCallback(()=>{y&&e()},[e,y]);return(0,u.useEffect)(()=>{if(h){const S=c.length===1?i?.result:i?.results,I=d?`${c.length} ${S}`:`${i?.noResults} ${l}`;n?.(I)}},[n,d,h,c,i,l]),(0,o.jsxs)("div",{className:g,"data-testid":"nav-sidebar-results",children:[!d&&h&&(0,o.jsxs)("div",{className:v,children:[m," ",(0,o.jsxs)("span",{className:x,children:['"',l,'"']})]}),d&&h&&(0,o.jsx)("ol",{className:b,"data-testid":"nav-sidebar-results-list",role:"list",children:c.map((S,I)=>(0,o.jsx)(Yq,{id:S.id,index:I,isEnabled:t,onSelectResult:T},S.id))})]})},Mu=V("nav-sidebar"),A5="nav-content-sidebar",Jq=({isExpanded:e,closeNav:t})=>{const n=le(),s=Ho(),[r,i]=(0,u.useState)(!1),[a,c]=(0,u.useState)(0),l=(0,u.useRef)(null),d=(0,u.useRef)(null),h=n?.color,m=n?.theme?.coverImageColor,f=n?.isLegacyCourse,p=n?.navigationStyle,g=n?.theme?.accentContrast,v=n?.theme?.progressIndicatorStyle,x=s?.active??!1,b=x||e?void 0:"true";(0,u.useLayoutEffect)(()=>{l&&l?.current&&c(l.current?.scrollWidth)},[r,e,l,x,c]);const y=(0,u.useMemo)(()=>IO(p),[p]),T=(0,u.useMemo)(()=>Uo(p),[p]),S=(0,u.useMemo)(()=>uc(p),[p]),I=S&&m===xt.LIGHT,L=xs(h),E=v===ut.CIRCULAR_FILL,k=v===ut.INCOMPLETE_COMPLETE,N=g?g===ke.DARK||g===ke.AUTO&&L===ke.DARK:L===ke.DARK,R=Mu("header"),M=Mu("body"),A=Mu("content"),j=Mu({accent:y,"dark-contrast":!S&&N,"light-contrast":!S&&!N,"legacy-pre-themes":f,"image-dark-overlay":S&&!I,"image-light-overlay":S&&I,"progress-circular-fill":E,"progress-incomplete-complete":k,collapsed:!e,dark:T,light:!T,searching:x});return(0,o.jsx)(gu,{inert:!e,children:(0,o.jsx)(La,{children:(0,o.jsx)(Q1,{in:e,mountOnEnter:!0,nodeRef:d,timeout:300,unmountOnExit:!0,children:(0,o.jsx)("div",{"aria-hidden":b,className:j,"data-testid":"nav-sidebar",ref:d,children:(0,o.jsxs)("div",{className:A,"data-nav-scrollable":!0,id:A5,children:[(0,o.jsx)(zq,{className:R,isCompact:r,isEnabled:e,navRefWidth:a,setIsCompact:i}),(0,o.jsxs)("div",{className:M,"data-testid":"nav-sidebar-body",ref:l,children:[(0,o.jsx)(Qq,{closeNav:t,isEnabled:e&&!x}),(0,o.jsx)(Xq,{closeNav:t,isEnabled:e&&x})]})]})})})})})},Jr={x:null,y:null},Ou={passive:!0};function R5({children:e,onSwipeDown:t,onSwipeLeft:n,onSwipeRight:s,onSwipeUp:r,onShouldRecognizeGesture:i=()=>!0,thresholdX:a=100,thresholdY:c=100}){const l=(0,u.useRef)(),[d,h]=(0,u.useState)(Jr),[m,f]=(0,u.useState)(Jr),p=(0,u.useCallback)(b=>{const y=b.touches?.length??0,T=b.targetTouches[0],S=i?i():!0;y==1&&T&&S?h({x:T.clientX,y:T.clientY}):h(Jr)},[i]),g=(0,u.useCallback)(b=>{const y=b.targetTouches[0];y&&f({x:y.clientX,y:y.clientY})},[]),v=(0,u.useCallback)(()=>{h(Jr),f(Jr)},[]),x=(0,u.useCallback)(b=>{const y=b.touches?.length??0;if(d.x==null||d.y==null||m.x==null||m.y==null||y>0)return;const T=m.x-d.x,S=m.y-d.y;Math.abs(T)>Math.abs(S)?Math.abs(T)>a&&(T<0?n?.():s?.()):Math.abs(S)>c&&(S<0?r?.():t?.()),h(Jr),f(Jr)},[t,n,s,r,a,c,m,d]);return(0,ht.A)("touchstart",p,l.current,Ou),(0,ht.A)("touchcancel",v,l.current,Ou),(0,ht.A)("touchmove",g,l.current,Ou),(0,ht.A)("touchend",x,l.current,Ou),(0,o.jsx)("div",{ref:l,children:e})}R5.propTypes={children:Bt().oneOfType([Bt().arrayOf(Bt().element),Bt().element]).isRequired,onShouldRecognizeGesture:Bt().func,onSwipeDown:Bt().func,onSwipeLeft:Bt().func,onSwipeRight:Bt().func,onSwipeUp:Bt().func,thresholdX:Bt().number.isRequired,thresholdY:Bt().number.isRequired};function Bu({isEnabled:e=!0,...t}){return e?(0,o.jsx)(R5,{...t}):(0,o.jsx)("div",{children:t.children})}Bu.propTypes={children:Bt().oneOfType([Bt().arrayOf(Bt().element),Bt().element]).isRequired,isEnabled:Bt().bool.isRequired};const Du={DESKTOP:"desktop",TABLET_PORTRAIT:"tablet-portrait",TABLET_LANDSCAPE:"tablet-landscape",MOBILE_PORTRAIT:"mobile-portrait",MOBILE_LANDSCAPE:"mobile-landscape"},eX=[Du.TABLET_PORTRAIT,Du.TABLET_LANDSCAPE,Du.MOBILE_PORTRAIT,Du.MOBILE_LANDSCAPE],Vc=e=>eX.includes(e),tX=e=>(0,u.useMemo)(()=>{const t=window.matchMedia("(pointer: coarse)").matches,n=Vc(e);return t||n},[e]),qp=(0,u.createContext)({isCourseNavOpen:!1});qp.displayName="CourseNavigationContext";function nX(e){const{children:t,isCourseNavOpen:n}=e;return(0,o.jsx)(qp.Provider,{value:{isCourseNavOpen:n},children:t})}function sX(){return(0,u.useContext)(qp)}const P5=V("course-navigation"),{COMPACT:Fu,OVERLAY:Xp,SIDEBAR:ei}=Nr,oX={[Fu]:v5,[ei]:A5,[Xp]:k5},rX=({hasSearchResults:e,courseNavType:t,openNav:n,closeNav:s})=>{const[r,i]=(0,u.useState)(e);return(0,u.useEffect)(()=>{r&&!e&&!(t===ei)?(s(),i(!1)):r&&t===Xp?n():i(e)},[e,t,n,s,r]),r},iX=({activeNavType:e,beginWithSidebarOpen:t,isNavOpen:n,isTablet:s,openNav:r,closeNav:i})=>{const[a,c]=(0,u.useState)();(0,u.useEffect)(()=>{e===ei&&t&&(!a&&s&&n?i():a===!0&&!s&&!n&&r(),c(s))},[e,t,n,s,r,i,a])},aX=({beginWithSidebarOpen:e,children:t,closeNav:n,courseNavType:s,isNavOpen:r,isTablet:i,lessonNavType:a,openNav:c,previewType:l,toggleNav:d,hideNav:h})=>{const m=(0,u.useRef)(null),f=(0,u.useRef)(null),{active:p=!1}=Ho()??{},g=Ce(),v=rX({hasSearchResults:p,courseNavType:s,openNav:c,closeNav:n}),x=(0,u.useMemo)(()=>v||s===Fu&&i?ei:s,[s,v,i]);iX({activeNavType:x,beginWithSidebarOpen:e,closeNav:n,openNav:c,isNavOpen:r,isTablet:i}),(0,u.useEffect)(()=>{const L=k=>{k.relatedTarget instanceof Node&&f.current?.contains(k.relatedTarget)===!0&&n()},E=()=>{f.current?.removeEventListener("click",n),f.current?.removeEventListener("keypress",n),f.current?.removeEventListener("blur",L,!0)};return x===Fu&&r?(f.current?.addEventListener("click",n),f.current?.addEventListener("keypress",n),f.current?.addEventListener("blur",L,!0)):E(),E},[x,r,n]);const b=tX(l),y=(0,u.useCallback)(()=>{const L=x===Nr.SIDEBAR;b&&L&&r&&n()},[n,r,b,x]),T=(0,u.useMemo)(()=>x!=null?oX[x]:void 0,[x]),S=P5(x?.toLowerCase()??null,{"nav-open":r,"search-open":p&&r,"course-nav-type":s?.toLowerCase()}),I=P5("lessonNav",{type:a?.toLowerCase()});return(0,o.jsx)(nX,{isCourseNavOpen:r,children:(0,o.jsx)("div",{className:S,children:(0,o.jsx)(Bu,{isEnabled:x===Nr.SIDEBAR,onSwipeLeft:y,children:(0,o.jsxs)("div",{className:I,children:[(0,o.jsxs)("nav",{"aria-label":g?.a11yRegionNavLesson,children:[(0,o.jsx)(RY,{"aria-controls":T,hideNav:h,isNavOpen:r,toggleNav:d}),x===ei&&(0,o.jsx)(Jq,{closeNav:n,isExpanded:r}),x===Fu&&(0,o.jsx)(rq,{closeNav:n,isExpanded:r,openNav:c,ref:m}),x===Xp&&(0,o.jsx)(aq,{closeNav:n,openNav:c,children:(0,o.jsx)(Dq,{isExpanded:r})})]}),(0,o.jsx)("div",{ref:f,children:t})]})})})})},cX=({children:e,isLessonOnlyEmbed:t,...n})=>{const{buttonNavigationStyle:s,navigationType:r,lmsOptions:i,...a}=le(),c=_c(),l=Ym(a)===!0,d=!c,h=a.sidebarMode===Ci.OPEN,m=l&&r===ei&&h&&d,f=Kn(a),p=f&&a?.theme?.blockNavigationType===za.CONTINOUS,[g,v]=(0,u.useState)(m),x=(0,u.useCallback)(()=>{v(!0)},[]),b=(0,u.useCallback)(()=>{v(!1)},[]),y=(0,u.useCallback)(()=>g?b():x(),[g,b,x]);(0,ht.A)(u3,x),(0,ht.A)(h3,b);const T=f||t===!0,S=T?"fixed-course-exit":void 0,I=p?{marginInlineEnd:"2rem"}:void 0,L=l?r:void 0;return T?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u5,{className:S,lmsOptions:i,style:I}),e]}):(0,o.jsx)(aX,{...n,beginWithSidebarOpen:h,closeNav:b,courseNavType:L,hideNav:!l,isNavOpen:g,isTablet:c,lessonNavType:s,openNav:x,toggleNav:y,children:e})};var M5=C(26665);const na=e=>e===eo.FLOATING||e===eo.FLOATING_FULL;function ti(){const e=$M();return Xt(480)&&e===eo.FLOATING?eo.FLOATING_FULL:e}function O5({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M2 8L7.65685 13.6569L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const lX=V("lesson-nav");function dX(e){const{children:t,finish:n,lessonId:s,onFocus:r}=e,i=hn(),a=e["data-direction"];if(s!=null)return(0,o.jsx)(kc,{className:"lesson-nav-link","data-direction":a,lessonId:s,onFocus:r,tooltipClassName:a==="previous"?"lesson-nav-link-tooltip-previous":"lesson-nav-link-tooltip",children:t});const c=n?s2:"/",l=d=>{if(d.preventDefault(),c==="/"){ho(()=>{i(c)},"lesson-to-cover");return}i(c)};return(0,o.jsx)("span",{className:"lesson-nav-link",children:(0,o.jsx)(xn,{className:"lesson-nav-link__link","data-direction":e["data-direction"],onClick:l,onFocus:r,to:c,children:t})})}function sa({children:e,className:t,direction:n,finish:s,navLessonId:r,onFocus:i,ref:a,restrictionType:c}){const d=Hr()?.theme?.buttonScheme,h=c!=null,m=ti(),p={className:lX(null,{[n]:!0,accent:d===$a.ACCENT,dark:d===$a.DARK,floating:m===eo.FLOATING,"floating-full":m===eo.FLOATING_FULL,finish:s,full:m===eo.FULL,light:d===$a.LIGHT,restricted:h,tint:d===$a.TINT}).mix(t),[`data-${n}-lesson`]:!0};return(0,o.jsx)("div",{ref:a,...p,children:(0,o.jsx)(dX,{"data-direction":n,finish:s,lessonId:r,onFocus:i,children:e})})}const B5=V("lesson-nav");function uX({allowTooltip:e,lessonNameLabel:t,nextLesson:n,nextLessonNumber:s,onFocus:r,ref:i,restrictionData:a,restrictionType:c}){const l=n?.id,d=ti(),h=na(d),f=xi(n)&&l,p=Oe(n?.title)||"",g=h?_f:O5,v=f?`${t} ${s} - `:"",x=h&&f?`${t} ${s}`:`${v}${p}`;return(0,o.jsxs)(sa,{allowTooltip:e,direction:"next",isFloating:h,navLessonId:l,onFocus:r,ref:i,restrictionData:a,restrictionType:c,children:[(0,o.jsx)("span",{className:B5("link-text").mix("brand--ui"),children:x}),(0,o.jsx)(g,{className:B5("link-icon")})]})}function hX(e){const t=Ce(),n=aB(e),s=cB(e),r=sf(),i=n?.id,a=Pi(i),c=bt(a?.data);return{lessonNameLabel:t?.lessonName,lessonPrepositionLabel:t?.lessonPreposition,nextLesson:n,nextLessonNumber:s,restrictionData:i?c:void 0,restrictionType:i?a?.type:void 0,totalLessons:r}}const _u=V("lesson-nav");function mX({allowTooltip:e,lessonNameLabel:t,lessonPrepositionLabel:n,nextLesson:s,nextLessonNumber:r,onFocus:i,ref:a,restrictionData:c,restrictionType:l,totalLessons:d}){const h=s?.id,m=ti(),f=na(m),g=s&&xi(s)&&h,v=Oe(s?.title)||"",x=g?`${r} ${n} ${d} \u2014 ${v}`:v,b=f&&g?`${t} ${r}`:x;return(0,o.jsx)(sa,{allowTooltip:e,direction:"next",navLessonId:h,onFocus:i,ref:a,restrictionData:c,restrictionType:l,children:f?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:_u("link-text"),children:b}),(0,o.jsx)($d,{className:_u("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)($d,{className:_u("link-icon")}),(0,o.jsx)("span",{className:_u("link-text"),children:b})]})})}function D5({lessonId:e,...t}){const n=hX(e);return Lt()===se.RISE_CLASSIC?(0,o.jsx)(uX,{...t,lessonNameLabel:n.lessonNameLabel,nextLesson:n.nextLesson,nextLessonNumber:n.nextLessonNumber,restrictionData:n.restrictionData,restrictionType:n.restrictionType}):(0,o.jsx)(mX,{...t,...n})}const F5=V("lesson-nav");function fX({allowTooltip:e,courseFinishLabel:t,onFocus:n,restrictionData:s,restrictionType:r,ref:i}){const a=ti(),c=na(a),l=c?_f:O5;return(0,o.jsxs)(sa,{allowTooltip:e,direction:"next",finish:!0,isFloating:c,onFocus:n,ref:i,restrictionData:s,restrictionType:r,children:[(0,o.jsx)("span",{className:F5("link-text").mix("brand--ui"),children:t}),(0,o.jsx)(l,{className:F5("link-icon")})]})}const Hu=V("lesson-nav");function pX({allowTooltip:e,courseFinishLabel:t,onFocus:n,ref:s,restrictionData:r,restrictionType:i}){const a=ti(),c=na(a);return(0,o.jsx)(sa,{allowTooltip:e,direction:"next",finish:!0,onFocus:n,ref:s,restrictionData:r,restrictionType:i,children:c?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:Hu("link-text"),children:t}),(0,o.jsx)($d,{className:Hu("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)($d,{className:Hu("link-icon")}),(0,o.jsx)("span",{className:Hu("link-text"),children:t})]})})}function Jp(e){const n=Ce()?.courseFinish??"Finish";return Lt()===se.RISE_CLASSIC?(0,o.jsx)(fX,{...e,courseFinishLabel:n}):(0,o.jsx)(pX,{...e,courseFinishLabel:n})}function gX({className:e,ref:t}){return(0,o.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,o.jsx)("path",{d:"M2 8L7.65685 2.34315L13.3137 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})}const Vu=V("lesson-nav");function vX({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:s,onFocus:r,previousLesson:i,previousLessonNumber:a,ref:c,restrictionData:l,restrictionType:d}){const h=i?.id,m=ti(),f=na(m),g=xi(i)&&h,v=Oe(i?.title)||n,x=f?E3:gX,b=g?`${s} ${a} - ${v}`:v,y=g&&f?`${s} ${a}`:b;return(0,o.jsx)(sa,{allowTooltip:e,className:t,direction:"previous",isFloating:f,navLessonId:h,onFocus:r,ref:c,restrictionData:l,restrictionType:d,children:f?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:Vu("link-text").mix("brand--ui"),children:y}),(0,o.jsx)(x,{className:Vu("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(x,{className:Vu("link-icon")}),(0,o.jsx)("span",{className:Vu("link-text").mix("brand--ui"),children:y})]})})}const zu=V("lesson-nav");function CX({allowTooltip:e,className:t,courseHomeLabel:n,lessonNameLabel:s,lessonPrepositionLabel:r,onFocus:i,previousLesson:a,previousLessonNumber:c,ref:l,restrictionData:d,restrictionType:h,totalLessons:m}){const f=a?.id,p=ti(),g=na(p),x=xi(a)&&f!=null,b=bt(a?.title)??n,y=x?`${c} ${r} ${m} \u2014 ${b}`:b,T=g&&x?`${s} ${c}`:y;return(0,o.jsx)(sa,{allowTooltip:e,className:t,direction:"previous",navLessonId:f,onFocus:i,ref:l,restrictionData:d,restrictionType:h,children:g?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:zu("link-text"),children:T}),(0,o.jsx)(B3,{className:zu("link-icon")})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(B3,{className:zu("link-icon")}),(0,o.jsx)("span",{className:zu("link-text"),children:T})]})})}function eg({lessonId:e,...t}){const n=CB(e),s=xB(e),r=sf(),i=Ce(),a=Lt(),c=n?.id,l=Pi(c),d=bt(l?.data),h=c!=null?d:void 0,m=c!=null?l?.type:void 0;return a===se.RISE_CLASSIC?(0,o.jsx)(vX,{...t,courseHomeLabel:i?.courseHome,lessonNameLabel:i?.lessonName,previousLesson:n,previousLessonNumber:s,restrictionData:h,restrictionType:m}):(0,o.jsx)(CX,{...t,courseHomeLabel:i?.courseHome,lessonNameLabel:i?.lessonName,lessonPrepositionLabel:i?.lessonPreposition,previousLesson:n,previousLessonNumber:s,restrictionData:h,restrictionType:m,totalLessons:r})}const xX={threshold:0},$u=(e,t)=>{const[n,s]=(0,u.useState)(!1),r=(0,u.useRef)(null);return(0,u.useEffect)(()=>{r.current&&r.current.disconnect(),r.current=new IntersectionObserver(([a])=>{s(a.isIntersecting)},t||xX);const{current:i}=r;return e.current?i.observe(e.current):s(!1),()=>{i.disconnect()}},[e,t]),n},_5=V("navButtonsFull"),bX=({isVisible:e})=>{(0,M5.A)(()=>window.dispatchEvent(new CustomEvent(Af))),(0,u.useEffect)(()=>{const t=e?m3:Af;window.dispatchEvent(new CustomEvent(t))},[e])},yX=({isVisible:e})=>{(0,M5.A)(()=>window.dispatchEvent(new CustomEvent(Rf))),(0,u.useEffect)(()=>{const t=e?f3:Rf;window.dispatchEvent(new CustomEvent(t))},[e])},SX=({children:e,hideNavToHome:t,isTransitioning:n=!1,navNextEnabled:s,navFinishEnabled:r})=>{const i=(0,u.useRef)(null),a=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),d=ao(),h=$u(a),m=$u(c),f=(0,u.useCallback)(()=>{i.current?.scrollTo({top:0,behavior:"smooth"})},[]),p=(0,u.useCallback)(()=>{const v=i.current?.scrollHeight;i.current?.scrollTo({top:v,behavior:"smooth"})},[]);(0,ht.A)(Rd,f),(0,ht.A)(Pd,p),bX({isVisible:h}),yX({isVisible:m}),(0,u.useEffect)(()=>{if(!n&&a.current){const x=(a.current?.clientHeight??0)+1;i.current?.scrollTo({top:x})}},[n]);const g=_5("navPrev",{visible:h,hide:n});return(0,o.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:i,children:(0,o.jsxs)("div",{className:_5(),children:[!t&&d&&(0,o.jsx)("div",{className:g,children:(0,o.jsx)(eg,{lessonId:d,ref:a})}),e,s&&d&&(0,o.jsx)(D5,{lessonId:d,ref:c}),r&&(0,o.jsx)(Jp,{lessonId:d,ref:l})]})})},zc=V("navButtonsFloating"),H5=({transitionIn:e,buttonType:t,children:n})=>{const s=(0,u.useRef)(null),r={entered:zc(t,{entered:!0}),exiting:zc(t,{exiting:!0}),exited:zc(t,{exited:!0})};return(0,o.jsx)(Q1,{in:e,nodeRef:s,timeout:250,children:i=>(0,o.jsx)("div",{className:r[i],ref:s,children:n})})},V5={threshold:.2},IX=({topRef:e,bottomRef:t,pageWrapRef:n,isTransitioning:s})=>{const r=$u(e,V5),i=$u(t,V5),[a,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)(s),m=(0,u.useCallback)(()=>{n.current?.scrollTo({top:2,behavior:"smooth"})},[n]);return(0,Oc.A)(m),(0,u.useEffect)(()=>{const f=h.current;h.current=s,f&&!s&&m()},[s,m]),(0,u.useEffect)(()=>{c(i&&!s),d(r&&!s)},[i,r,s]),{showPrev:l,showNext:a}},TX=({children:e,isCurrentLessonQuiz:t,isTransitioning:n=!1,navNextEnabled:s,hideNavToHome:r,navFinishEnabled:i})=>{const a=(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=ao(),{showNext:p,showPrev:g}=IX({topRef:h,bottomRef:m,pageWrapRef:a,isTransitioning:n}),v=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0,behavior:"smooth"})},[]),x=(0,u.useCallback)(()=>{const b=a.current?.scrollHeight;a.current?.scrollTo({top:b,behavior:"smooth"})},[]);return(0,ht.A)(Rd,v),(0,ht.A)(Pd,x),(0,u.useEffect)(()=>{t&&(s||i)&&x()},[t,s,i,x]),(0,o.jsxs)("div",{className:"page-wrap",id:"page-wrap",ref:a,children:[(0,o.jsx)("div",{className:zc("top"),ref:h}),!r&&f&&(0,o.jsx)(H5,{buttonType:"prev",transitionIn:g,children:(0,o.jsx)(eg,{lessonId:f,onFocus:v,ref:c})}),e,(0,o.jsx)(H5,{buttonType:"next",transitionIn:p&&!!(s||i),children:s&&f?(0,o.jsx)(D5,{lessonId:f,onFocus:x,ref:l}):i?(0,o.jsx)(Jp,{lessonId:f,onFocus:x,ref:d}):null}),(0,o.jsx)("div",{className:zc("bottom"),ref:m})]})},z5=(0,u.createContext)("present"),$5=(0,u.createContext)(!0);function LX({status:e,mediaActive:t,children:n}){return(0,o.jsx)(z5.Provider,{value:e,children:(0,o.jsx)($5.Provider,{value:t,children:n})})}function tg(){return(0,u.useContext)(z5)}function EX(){return(0,u.useContext)($5)}function Uu(e){return{finished:e.finished,cancel:()=>e.cancel(),progress:()=>{const t=e.effect?.getComputedTiming().progress;return typeof t=="number"?t:null}}}function U5(e,t,n,s){return{key:e,instanceId:s,status:t,direction:n}}function kX(e,t,n){const s=e.generation+1,r=e.items.find(l=>l.key===t);let i;r!=null?i={...r,status:"entering",direction:n}:i=U5(t,"entering",n,s);const a=e.items.filter(l=>l.key!==t).map(l=>({...l,status:"exiting",direction:n})),c=a.length>1?a.slice(0,1):a;return{currentKey:t,generation:s,items:[i,...c]}}function NX(e,t,n,s){return s==="exit"?{...e,items:e.items.filter(r=>!(r.key===t&&r.instanceId===n))}:{...e,items:e.items.map(r=>r.key===t&&r.instanceId===n?{...r,status:"present"}:r)}}function wX(e,t){switch(t.type){case"ROUTE_CHANGED":return kX(e,t.nextKey,t.direction);case"ITEM_FINISHED":return t.generation!==e.generation?e:NX(e,t.key,t.instanceId,t.phase)}}const G5="(prefers-reduced-motion: reduce)";function jX(e){if(typeof window>"u"||!window.matchMedia)return()=>{};const t=window.matchMedia(G5);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function AX(){return typeof window>"u"||!window.matchMedia?!1:window.matchMedia(G5).matches}const RX=()=>!1;function PX(e){return(e.find(n=>n.status==="exiting")??e.find(n=>n.status==="present")??e[0])?.instanceId??null}function W5({current:e,animate:t,getDirection:n,reducedMotion:s,initialStatus:r="present",initialDirection:i="forward",animationTimeoutMs:a=1500,onEntered:c,onExited:l}){const d=(0,u.useSyncExternalStore)(jX,AX,RX),h=s??d,[m,f]=(0,u.useReducer)(wX,e,I=>({currentKey:I,generation:0,items:[U5(I,r,i,0)]}));m.currentKey!==e&&f({type:"ROUTE_CHANGED",nextKey:e,direction:n(m.currentKey,e)});const p=(0,u.useRef)(new Map),g=(0,u.useRef)(new Map),v=I=>{let L=p.current.get(I);return L||(L=E=>{E?g.current.set(I,E):g.current.delete(I)},p.current.set(I,L)),L},x=(0,u.useRef)(new Map),b=(0,u.useRef)(new Map),y=(0,u.useRef)(c),T=(0,u.useRef)(l);y.current=c,T.current=l;const S=(0,u.useRef)([]);return(0,u.useEffect)(()=>{const I=S.current;if(I.length!==0){S.current=[];for(const L of I)try{L.type==="enter"?y.current?.(L.key,L.instanceId):T.current?.(L.key,L.instanceId)}catch(E){console.error("useTransitionPresence callback threw:",E)}}},[m.items]),(0,u.useLayoutEffect)(()=>{const I=k=>{const N=b.current.get(k);N!=null&&(clearTimeout(N),b.current.delete(k))},L=(k,N,R,M)=>{I(N),f({type:"ITEM_FINISHED",key:k,instanceId:N,phase:R,generation:M}),S.current.push({type:R==="enter"?"enter":"exit",key:k,instanceId:N})},E=new Set(m.items.map(k=>k.instanceId));for(const[k,N]of Array.from(x.current.entries()))E.has(k)||(N.handle.cancel(),x.current.delete(k),I(k));m.items.forEach(k=>{if(k.status==="present")return;const N=k.status==="entering"?"enter":"exit",R=x.current.get(k.instanceId);if(R&&R.phase===N&&R.generation===m.generation&&R.reducedMotion===h)return;let M=null;R&&(R.phase!==N&&R.direction!==k.direction&&(M=R.handle.progress?.()??null),R.handle.cancel(),x.current.delete(k.instanceId),I(k.instanceId));const A=m.generation,j=g.current.get(k.instanceId);if(!j){L(k.key,k.instanceId,N,A);return}const P=t(j,{phase:N,direction:k.direction,reducedMotion:h,fromProgress:M});if(!P){L(k.key,k.instanceId,N,A);return}x.current.set(k.instanceId,{handle:P,phase:N,direction:k.direction,generation:A,instanceId:k.instanceId,reducedMotion:h});const w=setTimeout(()=>{const D=x.current.get(k.instanceId);D?.handle===P&&D.generation===A&&(D.handle.cancel(),x.current.delete(k.instanceId),L(k.key,k.instanceId,N,A))},a);b.current.set(k.instanceId,w),Promise.resolve(P.finished).then(()=>{const D=x.current.get(k.instanceId);D?.handle===P&&D.generation===A&&(x.current.delete(k.instanceId),L(k.key,k.instanceId,N,A))},()=>{const D=x.current.get(k.instanceId);D?.handle===P&&D.generation===A&&(x.current.delete(k.instanceId),L(k.key,k.instanceId,N,A))})})},[m.items,m.generation,t,h,a]),(0,u.useEffect)(()=>{const I=new Set(m.items.map(L=>L.instanceId));for(const L of Array.from(p.current.keys()))I.has(L)||p.current.delete(L)},[m.items]),(0,u.useEffect)(()=>()=>{x.current.forEach(({handle:I})=>I.cancel()),x.current.clear(),b.current.forEach(I=>clearTimeout(I)),b.current.clear()},[]),{presence:m.items.map(I=>({key:I.key,instanceId:I.instanceId,status:I.status,direction:I.direction,ref:v(I.instanceId)})),isTransitioning:m.items.some(I=>I.status!=="present"),mediaOwnerInstanceId:PX(m.items)}}const ng=750,K5=300,MX=59.9375,OX="ease",Q5="100vh",Bye=ng+K5+750,BX=e=>e.querySelector(".page__wrapper")??e,DX=(e,t)=>{let n=0,s=e;for(;s instanceof HTMLElement&&s!==t&&t.contains(s);)n+=s.offsetTop,s=s.offsetParent;return n},FX=()=>{const e=document.getElementById("page-wrap");if(!e)return 0;const t=e.querySelector('[data-lesson-transition]:not([data-state="exiting"])'),n=t?DX(t,e):0;return Math.max(0,e.scrollTop-n)},_X=(e,t,n)=>{const s=document.getElementById("page-wrap");s&&(s.scrollTop=0),e.scrollTop=n;const r=n-e.scrollTop;r>0&&t!==e&&(t.style.minBlockSize=`${t.offsetHeight+r}px`,e.scrollTop=n)},HX=()=>typeof window<"u"&&window.matchMedia(`(max-width: ${MX}em)`).matches?K5:0,Z5=(e,t,n)=>{t!=null&&(e.currentTime=n+(1-t)*ng)},VX=(e,{phase:t,direction:n,reducedMotion:s,fromProgress:r},i=0)=>{const a=BX(e);if(a.style.minBlockSize="",t==="exit"&&_X(e,a,i),s)return null;const c=t==="enter"?a:e;if(typeof c.animate!="function")return null;const l=HX(),d={duration:ng,easing:OX,fill:t==="exit"?"forwards":"auto",delay:l};if(t==="exit"){const f=n==="forward"?"-100%":"100%",p=c.animate([{transform:"translate3d(0, 0, 0)",opacity:1},{transform:`translate3d(0, ${f}, 0)`,opacity:.5}],d);return Z5(p,r,l),Uu(p)}const h=n==="forward"?"100%":"-100%",m=c.animate([{height:Q5,transform:`translate3d(0, ${h}, 0)`},{height:Q5,transform:"translate3d(0, 0, 0)"}],d);return Z5(m,r,l),Uu(m)},Y5=(e,t)=>e===Ka?1/0:t.findIndex(n=>String(n.id)===String(e));function zX(e,t,n){if(e===null||e===t)return"forward";const s=Y5(e,n);return Y5(t,n)>s?"forward":"backward"}function $X({children:e,currentLessonId:t,lessons:n,onLessonEntered:s,onTransitioningChange:r}){const i=(0,u.useRef)(new Map);i.current.set(t,e);const a=(0,u.useRef)(t),c=(0,u.useRef)(0);a.current!==t&&(a.current=t,c.current=FX());const l=(0,u.useCallback)((p,g)=>VX(p,g,c.current),[]),{presence:d,isTransitioning:h,mediaOwnerInstanceId:m}=W5({current:t,animate:l,getDirection:(p,g)=>zX(p,g,n),animationTimeoutMs:1800,onEntered:p=>{s?.(String(p))}});(0,u.useEffect)(()=>{r?.(h)},[h,r]);const f=new Set(d.map(p=>String(p.key)));for(const p of i.current.keys())f.has(p)||i.current.delete(p);return(0,o.jsx)(o.Fragment,{children:d.map(p=>{const g=String(p.key),v=p.status==="present";return(0,o.jsx)("div",{"aria-hidden":!v,"data-direction":p.direction,"data-lesson-transition":!0,"data-state":p.status,inert:v?void 0:!0,ref:p.ref,children:(0,o.jsx)(LX,{mediaActive:p.instanceId===m,status:p.status,children:i.current.get(g)})},p.instanceId)})})}var UX=C(89858),sg=C.n(UX);const GX=sg()(dt()("family","continue"),dt()("variant","continue")),WX=Ue()(nx()(GX),_n()([],"items")),{FULL:KX,FLOATING:q5}=eo,QX=V("lessonNavigation"),ZX=({children:e})=>{const t=(0,u.useRef)(null);return(0,o.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:e})},YX=(e,t)=>typeof t=="object"&&t!==null&&"drawCount"in t&&typeof t.drawCount=="number"?e+t.drawCount:e+1,qX=(e=[])=>e.reduce(YX,0),XX=({children:e,isLessonOnlyEmbed:t,onLessonEntered:n})=>{const s=le(),r=s.buttonNavigationStyle,{showNavigationButtons:i,lessonsOnly:a,lmsOptions:c}=s,l=(0,u.useRef)(null),d=Xt(480),h=ao(),m=Gt(h),f=Go(h),[p,g]=(0,u.useState)(r),[v,x]=(0,u.useState)(!1),b=a?.[0]?.id,y=s.exportSettings?.webExportSettings?.disableCoverPage===!0,T=!Cs.isInstantLink&&(c?.disableCoverPage===!0||y)&&b===h,S=!Cs.isInstantLink&&c?.disableCoverPage===!0,I=c?.disableCoverPage===!0?T:S;(0,u.useEffect)(()=>{r!==p&&(g(r),window.dispatchEvent(new CustomEvent(Rd)))},[r,p]);const L=m!=null&&m.type!=null?m:void 0,E=L!=null&&(WX(L)||o2(L))?f?.isComplete===!0:!0,k=L?.type==="quiz",N=f?.type==="quiz"?f.activeIndex:void 0,R=k&&N!=null&&N===qX(L.items)+1,{skipLessonsIfPassed:M,skipLessonsOptional:A,skipToLessonId:j}=of(h),P=f?.type==="quiz"&&f.passed===!0,w=k&&P&&M&&!A&&!!j,D=k&&!R||L?.settings?.continueType==="continue"||w,O=m!=null?qb({course:s,lesson:m}):void 0,B=O!=null&&O!==!1,H=h===Ka,_=window.isPublicShare===!0,$=B&&t!==!0&&E&&!D&&!H,z=!B&&E&&!1,K=QX("wrapper",{full:r===KX||d,floating:r===q5&&!d}),Y=i!==!0||t===!0?ZX:r===q5&&!d?TX:SX;(0,u.useEffect)(()=>{const U=document.querySelector(".page__content");U&&U.classList.add("page__content--preview-nav")},[Y]);const G=s?.lessons??[],F=h?(0,o.jsx)($X,{currentLessonId:h,lessons:G,onLessonEntered:n,onTransitioningChange:x,children:e}):e;return(0,o.jsx)("div",{className:K,ref:l,children:(0,o.jsx)(Y,{hideNavToHome:I,isTransitioning:v,navFinishEnabled:z,navNextEnabled:$,children:F})})};var JX=C(97954);function Gu({block:e,children:t}){const[n,s]=(0,u.useState)(e);return e!=null&&e!==n&&s(e),(0,o.jsx)(af.Provider,{value:n,children:(0,o.jsx)(pf,{...n?.settings,children:t})})}const Fye=af.Consumer;function Wu(e){return function(n){const s=Wt();return(0,o.jsx)(e,{...n,block:s})}}const X5=()=>(0,o.jsx)("div",{className:"unsupported-block",children:(0,o.jsxs)("span",{children:["We no longer support this block, so you can safely delete it. If you have any questions, please"," ",(0,o.jsx)("a",{href:"https://access.articulate.com/support/contact",children:"contact Articulate Support."})]})}),Hye=null;function J5(e,t){return`${e}/${t}`}function eJ(e,{prepareProps:t,extras:n}){const s={...e,...n};return function(i){const a=s[J5(i.family,i.variant)];if(!a)return(0,o.jsx)(X5,{});if(a.render)return a.render(i);const{Component:c,propsBefore:l,propsAfter:d}=a;if(c===null)return null;const h={...l?.(i),...t(i),...d?.(i)};return(0,u.createElement)(c,h)}}function og(e){const{type:t,dividerNumber:n,...s}=e;return s}const tJ=e=>{const{effectiveBackgroundType:t,blockImage:n}=e;return t!==re.IMAGE?null:n??null},nJ=e=>_C(e?.alt),sJ=e=>{if(!e)return null;const{alpha:t,overlayColor:n=xt.DARK}=e,s=pt(e),r=n===xt.LIGHT?"#fff":"#000";return ad({alpha:t,color:r,url:s})};function oJ(){return Zn().toLowerCase()}function Ku(){const e=Wt(),t=Zn(),n=e?.background,s=Oe(n?.media)?.image;return tJ({effectiveBackgroundType:t,blockImage:s})}function rJ(){const e=Ku();return nJ(e)}function iJ(){const e=Ku();return sJ(e)}function aJ(){const e=Ku();return!!e&&e?.overlayColor===xt.LIGHT}function cJ(){const e=Wt(),t=e?.family,n=e?.variant,s=CD(t,n),r=e?.settings?.cardMode??Qn.WHITE;return s?r.toLowerCase():null}function lJ(){const e=Rn(),t=e?Bi(e):Tt.LIGHT;return Tu()(t.toLowerCase())}function dJ(){const e=Wt(),t=Ve(),n=Qo();return MD({blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function uJ(){const e=Ve(),t=vn(),n=Rn(),s=Wt(),r=Zn(),i=dJ(),a=t.accentColor||e?.theme?.colorAccent;return BD({accentColor:a,accentContrast:e?.theme?.accentContrast,backgroundColor:n,backgroundType:r,customBackgroundColorContrast:i,family:s?.family,variant:s?.variant})}function hJ(){const e=Wt(),t=Ve(),n=Rn(),s=Qo();return FD({backgroundColor:n,blockCustomContrast:e?.settings?.customBackgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast,family:e?.family,familyBackgroundColorContrast:s?.backgroundColorContrast,variant:e?.variant})}function mJ(){const e=Wt(),t=Ve(),n=Qo();return DD({blockBackgroundType:e?.settings?.backgroundType,familyBackgroundType:n?.backgroundType,courseBackgroundType:t?.theme?.blockBackgroundType,blockCustomContrast:e?.settings?.customBackgroundColorContrast,familyBackgroundColorContrast:n?.backgroundColorContrast,courseBackgroundColorContrast:t?.theme?.blockBackgroundColorContrast})}function rg(){const e=oJ(),t=lJ(),n=cJ(),s=uJ(),r=aJ(),i=mJ(),a=Rn(),c=iJ(),l=rJ();return{backgroundColor:a,backgroundImageAlt:l,backgroundImageCss:c,backgroundTypeLowercase:e,cardMode:n,colorRange:t,isContrastLight:s,isLegacyBackground:i,isOverlayLight:r}}function fJ(e,t){const{className:n="",tag:s="div",style:r={},...i}=e,{backgroundColor:a}=vn(),c=hJ(),l=c===Pt.DARK?Pt.LIGHT:Pt.DARK;return a!==""&&Object.assign(r,{"--color-background-contrast":c,"--color-background-contrast-complementary":l,"--color-background-contrast-rgb":Yo(c)?.slice(0,3)}),(0,o.jsx)(s,{...i,className:n,ref:t,style:r})}const eS=(0,u.forwardRef)(fJ),pJ=10,tS=e=>`${e}rem`,ig=e=>e!=null?`${e/pJ}rem`:void 0,gJ=["image full","image text overlay","quote background"];function vJ(e){const{family:t,variant:n,backgroundType:s,isOnlyBlockInStep:r,isOnePage:i}=e;if(!i||!r)return!1;if(s===re.IMAGE)return!0;if(!t||!n)return!1;const a=`${t} ${n}`;return gJ.some(c=>c===a)}const ag={paddingBottom:"0rem",paddingTop:"0rem"},CJ=e=>{const{blockSettings:t,familyTheme:n,courseTheme:s,isFullWidthImage:r,isPresentation:i,collapseBlockPadding:a}=e;if(i)return{...ag,paddingLeft:"0rem",paddingRight:"0rem"};if(r||a)return ag;const c=tS(Number(Iy(t?.paddingTop,n?.paddingStart,s?.blockPaddingStart,3)));return{paddingBottom:tS(Number(Iy(t?.paddingBottom,n?.paddingEnd,s?.blockPaddingEnd,3))),paddingTop:c}},xJ=e=>({"--rise-block-padding-top":e.paddingTop,"--rise-block-padding-bottom":e.paddingBottom,"--rise-block-padding-left":e.paddingLeft,"--rise-block-padding-right":e.paddingRight}),bJ={},yJ=e=>e?{bodyFontSize:ig(e.bodyFontSize),headingFontSize:ig(e.headingFontSize),subheadingFontSize:ig(e.subheadingFontSize)}:bJ;function SJ(e){const t=Wt(),n=Ve(),s=Qo(),r=Kn(n),i=vJ({backgroundType:t?.settings?.backgroundType,family:t?.family,isOnePage:r,isOnlyBlockInStep:t?.isOnlyBlockInStep,variant:t?.variant});return CJ({blockSettings:t?.settings,courseTheme:n?.theme,familyTheme:s,isFullWidthImage:i,isPresentation:Fr(n),collapseBlockPadding:e})}function IJ(){const e=Qo();return yJ(e)}function TJ(e){const t=SJ(e?.collapseBlockPadding);return{fontSize:IJ(),padding:t}}const LJ=Ih()(["settings"]),nS=V("block-wrapper"),EJ=V("bg"),kJ=(e,t)=>{const{children:n,className:s,collapseBlockPadding:r=!1,defaultBackgroundColor:i="",style:a,tag:c,type:l,...d}=e,h=Wt(),m=rg(),f=TJ({collapseBlockPadding:r}),p=Cn(),g=mf(i,m.backgroundColor),v=g||"transparent",x=h?.className,b={...a,...m.backgroundImageCss,"--color-background":g,...f.fontSize.bodyFontSize&&{"--block-text-body-font-size":f.fontSize.bodyFontSize},...f.fontSize.headingFontSize&&{"--block-text-heading-font-size":f.fontSize.headingFontSize},...f.fontSize.subheadingFontSize&&{"--block-text-subheading-font-size":f.fontSize.subheadingFontSize},boxShadow:`0px 1px 0px ${v} `,...p?xJ(f.padding):{paddingBottom:f.padding.paddingBottom,paddingTop:f.padding.paddingTop}},y=X()(s,{"bg--legacy-background":m.isLegacyBackground,[`block-${l}`]:!!l}),T=EJ({card:m.cardMode,range:m.colorRange,type:m.backgroundTypeLowercase,"overlay-light":m.isOverlayLight,"contrast-light":m.isContrastLight}),S=x?nS({}).mix(T).mix(x):nS({}).mix(T),I=[y,S.toString()].join(" ");return(0,o.jsxs)(eS,{...LJ(d),className:I,ref:t,style:b,tag:c,children:[(0,o.jsx)("span",{"aria-label":m.backgroundImageAlt,role:HC(m.backgroundImageAlt)}),n]})},De=(0,u.forwardRef)(kJ);class NJ extends u.Component{static defaultProps={scope:"error-boundary"};constructor(t){super(t),this.state={hasError:!1,prevScope:t.scope}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}static getDerivedStateFromProps(t,n){return n.prevScope!==t.scope?{hasError:!1,error:void 0,prevScope:t.scope}:n}componentDidCatch(t){Ys.L2.addError(t,{scope:this.props.scope},"source")}render(){const{hasError:t,error:n}=this.state,{FallbackComponent:s}=this.props;return t||n?(0,o.jsx)(s,{}):this.props.children}}const sS=NJ,wJ=V("block-ai-scenario"),jJ=(0,u.lazy)(()=>C.e("webpack_container_remote_ai_scenario_learner-player-react").then(C.t.bind(C,58812,23)));function AJ({scenarioId:e,onExit:t,onComplete:n,labels:s}){const{currentLocale:r}=at(),i=Hn(),a=Ve(),c=Ld(),[l,d]=(0,u.useState)(!1),h=(0,u.useCallback)(v=>d(v),[]);(0,u.useEffect)(()=>{d(!1)},[e]);const m=(0,u.useMemo)(()=>({active:r,source:i}),[r,i]),f=a?.aiScenarios,p=e&&oS(f)?f[e]:void 0,g=oS(p)?p:void 0;return(0,o.jsx)(De,{className:wJ("wrapper"),collapseBlockPadding:l,children:(0,o.jsx)(sS,{FallbackComponent:PJ,children:(0,o.jsx)(u.Suspense,{children:(0,o.jsx)(jJ,{l10n:g?.l10n,labels:s,isRTL:c,locale:m,locales:g?.locales,onComplete:n,onExit:t,onFrameExpandChange:h,resolvePath:yt,scenario:g?.data,source:g?.source,sourceLocale:g?.sourceLocale})})})})}const RJ=(0,u.memo)(AJ);function oS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function PJ(){return null}var MJ=C(77533),cg=C.n(MJ);const rS=":focus{outline: none}",OJ=":focus:not(:focus-visible){outline: none}",iS="focus-ring-style",lg=()=>document.getElementById(iS)||BJ(),BJ=()=>{const e=document.createElement("style");return e.id=iS,document.head.appendChild(e),e},DJ=0,FJ=-1,_J=e=>{const t=lg();document.addEventListener("mousedown",()=>{setTimeout(()=>{t.innerHTML=rS},0),e?.(!1)}),window.addEventListener("keydown",n=>{HJ(n,e)})},HJ=(e,t)=>{const n=e.target,s=lg();(yd(e)||hc(e)&&!n.classList.contains("ignore-prefers"))&&(s.innerHTML="",t?.(!0))},aS=({focusVisible:e}={})=>lg().innerHTML=e?OJ:rS,VJ=e=>e?DJ:FJ,cS=({list:e,index:t})=>{t>=0&&t<ps()(e)&&e[t].focus()},zJ=({list:e,currentIndex:t})=>{const n=rd()(t||0),s=n<ps()(e)?n:0;return cS({list:e,index:s}),s},$J=({list:e,currentIndex:t})=>{const n=cg()(t||ps()(e));return cS({list:e,index:n}),n};var $c=C(49860);const UJ=1e3,GJ={fadeInGrow:"scale(0.95)",fadeInLeft:"translateX(-50px)",fadeInLeftSmall:"translateX(-25px)",fadeInRight:"translateX(50px)",fadeInUp:"translateY(25px)"},WJ=e=>{const{afterAnimatedIn:t,animateIn:n="fadeIn",children:s,className:r,duration:i=1,initiallyVisible:a,siblingDelay:c=0}=e,l=$c.useRef(null),[d,h]=$c.useState(!1);$c.useEffect(()=>{const f=l.current;if(a&&f){h(!0);return}if(d||!f||typeof window>"u")return;const p=pp(),g=new IntersectionObserver(([x])=>{x!=null&&(x.isIntersecting||x.intersectionRatio>0)&&(h(!0),g.unobserve(x.target))},{root:p,rootMargin:Yv,threshold:0});g.observe(f);const v=setTimeout(()=>{h(x=>{if(x)return x;const b=l.current;if(!b)return x;const y=b.getBoundingClientRect(),T=p?.getBoundingClientRect(),S=T?.top??0,I=T?.bottom??window.innerHeight,L=(I-S)*.1;return y.bottom>S-L&&y.top<I+L?!0:x})},UJ);return()=>{g.disconnect(),clearTimeout(v)}},[a,d]),$c.useEffect(()=>{const f=l.current;if(!f||!t)return;const p=g=>{g.target instanceof Element&&g.target.parentElement===f&&g.propertyName==="opacity"&&t()};return f.addEventListener("transitionend",p),()=>{f.removeEventListener("transitionend",p)}},[t]),$c.useEffect(()=>{const f=l.current;if(!f||!Array.isArray(s))return;Array.from(f.children).forEach((g,v)=>{g instanceof HTMLElement&&g.style.setProperty("--idx",String(v))})},[s]);const m={"--scroll-animation-step":`${c}s`,"--scroll-animation-duration":n==="none"?"0s":`${i}s`,"--scroll-animation-from":GJ[n]??"translateY(0)"};return(0,o.jsx)("div",{className:X()("scroll-animation",r,{"scroll-animation--in":d}),ref:l,style:m,children:s})},$e=e=>{const{afterAnimatedIn:t,animateBlockEntrance:n,animateIn:s,children:r,className:i,duration:a,initiallyVisible:c,isLearner:l,siblingDelay:d}=e;return l&&n&&!yn()?(0,o.jsx)(WJ,{afterAnimatedIn:t,animateIn:s,className:i,duration:a,initiallyVisible:c,siblingDelay:d,children:r}):Array.isArray(r)?(0,o.jsx)("div",{className:i,children:r}):r};var KJ=C(69419),QJ=C(58016),ZJ=C.n(QJ);const YJ=/(\.\.\/)|(\.\.\.\.\/)+|%2e%2e\/|%252e%252e\/|%2f\/|\/%2e%2e/gi,qJ=e=>typeof e=="string"&&e.replace(YJ,""),Bn=ZJ()(qJ,KJ.J);var lS=C(49860);const Qu=V("blocks-button"),dS=n7,XJ=({description:e})=>(0,o.jsx)(Re,{className:Qu("description"),value:e}),JJ=({color:e,destination:t,editBlock:n,isEditable:s,label:r,type:i})=>{const a=xy(),c=Ve()?.externalLinksDisabled,l=Ve()?.theme,d=mc(),{mode:h}=(0,Be.g)(),m=vn(),f=Kt(),p=Oe(t),g=Xr(wn(Oe(r))),v=i==="email",x=i==="exit-course",b=i==="lesson",y=i==="relative-url",T=Qu("button"),S=!e||e===""||e===d,I=e??d,L={},E=by(d),k=S&&l?.accentContrast===ke.AUTO?ke.AUTO:E,N=m?.buttonColorContrast??k,R=m?.buttonRadius??null,M=m?.buttonWidth??null,A=Qt({backgroundColor:I,contrast:N});Object.assign(L,{...!S&&{"--color-button-bg":I},...!S&&{"--color-button-text":A},...!S&&{"--color-button-border":"transparent"},...R!=null&&{"--radius-button":`${Number(R)}px`},...M!=null&&{"--width-button":`${Number(M)}rem`}});const j=c&&Xn(p),{handleMouseEnter:P,handleMouseLeave:w,handleFocus:D,handleBlur:O}=mu(),B=lS.useId(),H=(0,u.useCallback)(()=>{if(s)n();else{if(j)return;if(x)return nv()}},[n,j,s,x]);if(s||j||x){const _=(0,o.jsx)("button",{"aria-describedby":j?Ls(B):void 0,"aria-label":g,className:T,id:j?B:void 0,onBlur:j?()=>O(B):void 0,onClick:H,onFocus:j?()=>D(B):void 0,onKeyDown:my(H),onMouseEnter:j?()=>P(B):void 0,onMouseLeave:j?()=>w(B):void 0,style:L,tabIndex:0,type:"button",children:g});return j?(0,o.jsxs)(o.Fragment,{children:[_,(0,o.jsx)(fu,{anchorId:B})]}):_}else if(b){const _=p?An(p,h):"#";return(0,o.jsx)(xn,{"aria-label":g,className:T,style:L,to:_,children:g})}else{const _=y?p:Bn(p),$=v?`mailto:${p}?subject=${a}`:_,z=co.isIphoneSafari?"_top":"_self",K=v?z:"_blank",J=K==="_blank",Y=J?"noopener noreferrer nofollow":void 0,G=f?.a11yNoticeLinkNewTab||"(opens in a new tab)",F=J?`${g} ${G}`:g;return(0,o.jsx)("a",{"aria-label":F,className:T,href:$,rel:Y,style:L,tabIndex:0,target:K,children:g})}},uS=e=>{const{animateBlockEntrance:t,editable:n,editBlock:s=()=>{},initiallyVisible:r,isLearner:i,items:a=[],renderDescription:c=XJ,settings:l}=e,{buttonAlignment:d="right",buttonColor:h,buttonShowDescription:m=!0,buttonStack:f,entranceAnimation:p}=l,g=Qu(null,{"no-animation":!p,description:m==!0,center:d==="center",left:d==="left",right:d==="right",rounded:dS==="rounded"}),v=a?.map(({id:x,description:b,...y})=>{const T=(0,o.jsx)(JJ,{...y,color:h,editBlock:s,isEditable:n}),S=m&&c({id:x,description:b});return(0,o.jsx)("section",{className:Qu("container"),children:d==="left"&&m?(0,o.jsxs)(o.Fragment,{children:[T,S]}):(0,o.jsxs)(o.Fragment,{children:[S,T]})},x)})??null;if(f){const{paddingBottom:x,paddingTop:b}=l,y={...b!=null&&{paddingTop:`${Number(b)}rem`},...x!=null&&{paddingBottom:`${Number(x)}rem`}};return(0,o.jsx)("div",{className:g.toString(),style:y,children:v})}return(0,o.jsx)(De,{className:g.toString(),children:(0,o.jsx)($e,{animateBlockEntrance:t,animateIn:"fadeIn",initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"blocks-button",children:v})})})},eee=uS;class tee extends lS.Component{renderButtonDelegate;constructor(t){super(t),this.renderButtonDelegate=this.renderButton.bind(this)}static get defaultProps(){return{items:[],lessonId:"",blockId:"",editBlock:()=>{}}}renderButton(t,n){const{blockId:s,editable:r,editBlock:i,isLearner:a,lessonId:c,initiallyVisible:l}=this.props;return(0,o.jsx)(uS,{animateBlockEntrance:!1,blockId:s,editable:r,editBlock:i,initiallyVisible:l,isLearner:a,items:[t],lessonId:c,settings:n,type:"right"})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i,renderButton:a=this.renderButtonDelegate}=this.props,{entranceAnimation:c,buttonShowDescription:l=!0,buttonAlignment:d="right",buttonSpacing:h=3}=i,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":dS==="rounded"});return(0,o.jsx)(De,{className:m,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:r.map((f,p)=>{const g=p===0,v={buttonColor:i.buttonColor||this.props.color,buttonStyle:i.buttonStyle,buttonStack:!0,buttonShowDescription:l,buttonAlignment:d,...g?{}:{paddingTop:h}};return(0,o.jsx)(u.Fragment,{children:a(f,v)},f.id)})})})}}var hS=C(67750),nee=C(49860);function see(e,t){const n=zC(e.src),s=e.width&&e.height&&!n,r=s?"async":void 0,i=s?"lazy":void 0,a=s?e.width:void 0,c=s?e.height:void 0;return(0,o.jsx)("img",{...e,decoding:r,height:c,loading:i,ref:t,width:a})}const dg=nee.forwardRef(see);var mt=C(49860);const Jt=V("block-code"),oee=`${Ae("CDN_URI")}/assets/rise/assets/blocks/code_block_unavailable.svg`;function mS(e,t){const n=fS(hS.parse(e.data));for(const s of n)if(s.type==="notification")t[s.method]?.(s.params);else throw new Error(`Unsupported RPC type "${s.type}"`)}function*fS(e){if(Array.isArray(e))for(const t of e)yield*fS(t);else yield e}function pS(e,t,n){return mt.useEffect(()=>{const r=new AbortController;return window.addEventListener("message",i=>{i.origin===window.origin&&t!=null&&e.current&&i.source===e.current.contentWindow&&mS(i,t)},{signal:r.signal}),()=>r.abort()},[t,e]),mt.useCallback(r=>{e.current?.contentWindow?.postMessage(r,n)},[e,n])}const ree=(e,t,n)=>pS(e,n,window.origin),iee=(e,t,n)=>pS(e,n,"*"),aee=(e,t,n)=>{const[s,r]=mt.useState(()=>new BroadcastChannel(t));return mt.useEffect(()=>()=>s.close(),[s]),mt.useEffect(()=>{s.name!==t&&r(new BroadcastChannel(t))},[s,t]),mt.useEffect(()=>{const a=new AbortController;return s.addEventListener("message",c=>mS(c,n),{signal:a.signal}),()=>a.abort()},[s,n]),mt.useCallback(a=>{s.postMessage(a)},[s])},cee=Ea()?co.isLocalFilesystem?iee:aee:ree,lee=window.location.origin==="";function dee(e){let t=lee?"":"lib/sandbox/sandbox.html";return t+=`#channel=${encodeURIComponent(e)}`,t}function uee(e){return typeof e=="number"?`${e/10}rem`:"-1px"}const hee={0:"small",1:"medium",2:"full"};function ug({editBlock:e,errors:t,isDragPreview:n,isLearn:s,isSidebarPreview:r,items:i,labels:a,onClearErrors:c,onError:l,onStep:d,previewType:h,settings:m}){const f=mt.useRef(null),g=Ve()?.htmlBlocksDisabled,v=n||r||!!h,[x]=i,b=Oe(x.srcdoc),y=Oe(x.media),T=y?.sandbox?.src==null?void 0:`${y.sandbox.src}/index.html`,S=m?.autoResize===!0,I=m?.width??"0",[L,E]=mt.useState("-1px");mt.useEffect(()=>{S||E(uee(m?.height))},[S,m?.height]);const[k,N]=mt.useState(0),[R,M]=mt.useState(!1),[A,j]=mt.useState(!1),[P]=mt.useState(()=>`rise-frontend-sandbox-${window.crypto.randomUUID()}`),w=dee(P),D=mt.useCallback(()=>{d?.({id:x.id})},[x.id,d]),O=mt.useCallback(({message:G})=>{l?.({message:G}),j(!0),console.error("Sandbox Error",G)},[l,j]),B=mt.useCallback(()=>{c?.(),j(!1),N(G=>G+1)},[c]),H=mt.useCallback(()=>{M(k>0)},[k]),_=mt.useCallback(({height:G})=>{S&&E(`${G}px`)},[S]),$=mt.useMemo(()=>({oncomplete:D,onerror:O,onload:H,onready:B,onresize:_}),[D,O,B,H,_]),z=cee(f,P,$),K=mt.useCallback((G,F)=>{if(f==null&&k===0)throw new Error("Attempted to send message to sandbox before it is ready");const U=hS.format.notification(G,F);z(U)},[k,f,z]),J=mt.useCallback(()=>{window.location.reload()},[]),Y=mt.useCallback(()=>{e?.()},[e]);return mt.useEffect(()=>{k&&K("onupdate",{autoResize:S,src:T,srcDoc:b})},[S,k,K,T,b]),s&&t!=null||A?(0,o.jsx)(De,{children:(0,o.jsxs)("div",{className:Jt("error-general",{learn:s}),children:[(0,o.jsx)("div",{className:Jt("error-message"),children:"Something went wrong"}),(0,o.jsx)("div",{className:Jt("error-message-subtitle"),children:"There was an error loading this code block. Please contact your admin if the issue continues."}),(0,o.jsx)("button",{className:Jt("error-button"),onClick:J,type:"button",children:"Refresh page"})]})}):t!=null&&Object.keys(t).length>0?(0,o.jsx)(De,{children:t[404]?(0,o.jsxs)("div",{className:Jt("error-404"),children:[(0,o.jsx)("div",{className:Jt("error-message"),children:"We couldn\u2019t find your file"}),(0,o.jsx)("div",{className:Jt("error-message-subtitle"),children:"Make sure your zip file contains an index.html file."}),(0,o.jsx)("button",{className:Jt("error-button"),onClick:Y,type:"button",children:"Retry upload"})]}):(0,o.jsxs)("div",{className:Jt("error-general"),children:[(0,o.jsx)("div",{className:Jt("error-message"),children:"Something went wrong"}),(0,o.jsxs)("div",{className:Jt("error-message-subtitle"),children:["Try refreshing the page or entering your code again. If the issue isn't fixed,"," ",(0,o.jsx)("a",{href:"https://community.articulate.com/group/code-block",rel:"noopener noreferrer",target:"_blank",children:"visit our community"}),"."]}),(0,o.jsx)("button",{className:Jt("error-button"),onClick:J,type:"button",children:"Refresh page"})]})}):g&&!v?(0,o.jsx)(De,{children:(0,o.jsx)("div",{className:Jt("restricted"),children:(0,o.jsxs)("div",{className:Jt("restricted-card"),children:[(0,o.jsx)(dg,{alt:"",className:Jt("restricted-icon"),src:oee}),(0,o.jsx)("div",{className:Jt("restricted-title"),children:"Subscribe to unlock full access"}),(0,o.jsx)("div",{className:Jt("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,o.jsx)(De,{children:(0,o.jsx)("iframe",{allow:"fullscreen",className:Jt({"auto-resize":S,loaded:v||R,width:hee[I]}),"data-rise-frontend-sandbox":"",loading:"lazy",ref:f,sandbox:"allow-forms allow-popups allow-same-origin allow-scripts",scrolling:S?"no":void 0,src:w,style:{"--block-html-height":L},title:a?.a11yBlockCode},P)})}const et=({value:e,className:t,allowTabNavigation:n=!0,tagName:s,id:r,emptyFallback:i=null,transformValue:a})=>{const{value:c}=fp(Oe(e));return c?(0,o.jsx)(Re,{allowTabNavigation:n,className:t,id:r,tagName:s,transformValue:a,value:e}):i},Uye="group",mee="tablist",fee="tabpanel",Gye="tab",Wye="radio",Uc=({caption:e,editable:t,id:n,isOverlayType:s,getL10nValue:r})=>{const i=!!(!s&&!t&&r(e));return{figcaptionId:i?`figcaption-${n}`:void 0,isFigure:i,role:i?"figure":void 0,tagName:i?"figure":"div"}};var pee=C(49860);function vt(e){const t=pee.forwardRef((n,s)=>{const r=ct();return(0,o.jsx)(e,{...n,getL10nValue:r,ref:s})});return t.displayName=`withLocalizedLookup(${e.displayName||e.name})`,t}var gS=C(49860);const gee=gS.lazy(async()=>{const[e,t]=await Promise.all([C.e("ace").then(C.t.bind(C,87401,23)),C.e("ace").then(C.bind(C,92763)),C.e("ace").then(C.t.bind(C,2577,23)),C.e("ace").then(C.t.bind(C,5152,23)),C.e("ace").then(C.t.bind(C,50428,23)),C.e("ace").then(C.t.bind(C,14280,23)),C.e("ace").then(C.t.bind(C,50428,23)),C.e("ace").then(C.t.bind(C,19991,23)),C.e("ace").then(C.t.bind(C,60968,23)),C.e("ace").then(C.t.bind(C,91401,23)),C.e("ace").then(C.t.bind(C,64127,23)),C.e("ace").then(C.t.bind(C,30485,23)),C.e("ace").then(C.t.bind(C,95797,23)),C.e("ace").then(C.t.bind(C,82300,23)),C.e("ace").then(C.t.bind(C,86952,23)),C.e("ace").then(C.t.bind(C,44887,23)),C.e("ace").then(C.t.bind(C,98283,23)),C.e("ace").then(C.t.bind(C,14866,23)),C.e("ace").then(C.t.bind(C,95649,23)),C.e("ace").then(C.t.bind(C,2326,23)),C.e("ace").then(C.t.bind(C,93509,23)),C.e("ace").then(C.t.bind(C,9308,23))]);return{default:t.default}}),vee=({classNames:e,code:t})=>{const[n,s]=(0,u.useState)(!1),{announcePolite:r}=Ms(),i=async()=>{const a=Xr(t);await navigator.clipboard.writeText(a),s(!0),setTimeout(()=>s(!1),1e3),r("Copied!")};return(0,o.jsx)("div",{className:e,children:(0,o.jsx)(Fs,{message:n?"Copied!":"Copy",children:(0,o.jsx)("button",{"aria-label":n?"Copied!":"Copy",className:"block-code-snippet-copy",onClick:i,type:"button",children:(0,o.jsx)(ce,{name:n?"check":"copy"})})})})};class Cee extends gS.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption({caption:t}){return(0,o.jsx)(et,{className:"block-text__code-caption",value:t||""})}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n="",getL10nValue:s,initiallyVisible:r,isLearner:i,items:a,labels:c,settings:l,renderCaption:d=this.renderCaptionDelegate}=this.props,{entranceAnimation:h,language:m,paddingBottom:f,paddingTop:p,snippetBackgroundColor:g,snippetColorContrast:v,theme:x,useAdvancedEditor:b,wrapWords:y}=l,T=X()("block-text block-text--code",{"block-text--padding-top":Number(p)===2,"block-text--padding-bottom":Number(f)===2,"block-text--no-animation":!h}),S={backgroundColor:g},I=g==="#fafafa"||Ft()(g),L=v??ke.DARK;if(!I){const E=Qt({backgroundColor:g,contrast:L});Object.assign(S,{"--color-snippet-contrast":E})}return(0,o.jsx)(De,{className:T,defaultBackgroundColor:n,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"block-text__container",children:a.slice(0,1).map(E=>{const k=Uc({...E,getL10nValue:s});return(0,o.jsx)("div",{className:"block-text__row",children:(0,o.jsx)("div",{"aria-label":c?.a11yBlockCodeSnippet,className:"block-text__col",role:"group",children:(0,o.jsxs)("figure",{"aria-labelledby":k.figcaptionId,className:"block-text__figure block-text__figure--with-copy",role:"figure",children:[(0,o.jsx)(HV,{value:E.code,children:N=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(vee,{classNames:"block-text__copy-button",code:N}),b?(0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(gee,{editorProps:{$blockScrolling:!0},maxLines:25,mode:m,name:String(E.id),readOnly:!0,setOptions:{enableSnippets:!1,showLineNumbers:!0,tabSize:2,fontSize:"1.6rem",useWorker:!1},theme:x,value:Xr(dh(N)),width:"100%",wrapEnabled:y})}):(0,o.jsx)("pre",{className:"block-text__code",dangerouslySetInnerHTML:{__html:dh(N)},dir:"ltr",style:S})]})}),E.caption&&(0,o.jsx)("figcaption",{id:k.figcaptionId,children:d(E)})]})})},E.id)})})})})}}const vS=vt(Cee),CS=V("continue-btn"),Zu=({children:e,className:t,href:n,onClick:s,text:r,testId:i="continue-btn"})=>{const a=t?`${CS()} ${t}`:CS();return n?(0,o.jsx)(xn,{className:a,"data-continue-btn":"","data-testid":i,onClick:s,to:n,children:e??(0,o.jsx)(Pn,{value:r})}):(0,o.jsx)("button",{className:a,"data-continue-btn":"","data-testid":i,onClick:s,type:"button",children:e??(0,o.jsx)(Re,{value:r})})},xS=({bgType:e,text:t,iconType:n="locked"})=>{const s=X()("continue-hint",{"continue-hint--bg-transparent":e==="transparent"});return(0,o.jsxs)("div",{className:s,"data-continue-btn":"",children:[n==="locked"&&(0,o.jsx)(ce,{className:"continue-hint__icon",name:"lock-keyhole-light"}),(0,o.jsx)("div",{className:"continue-hint__content",children:(0,o.jsx)(Pn,{value:t})})]})},hg=V("block-text");function xee({blockId:e,animateBlockEntrance:t,canContinue:n=!1,isComplete:s,isLearner:r,isLastBlock:i=!1,isOnlyBlockInStep:a,items:c=[],labels:l,onStep:d=()=>{},skipContinue:h=!1,initiallyVisible:m}){const p=(0,u.useRef)(null),g=(0,ze.A)(s),[v,x]=u.useState(!1),{announcePolite:b}=Ms(),[y,T]=u.useState(!1),S=vn(),I=Ve(),L=mc(),E=by(L),k=Qo(),N=c[0],{id:R}=N,M=N.title??k?.label??nt.blockContinueLabel,A=N.type??k?.completionType??nt.blockContinueCompletionType,j=N.completeHint??k?.completeHint??nt.blockContinueCompleteHint,P=!A||(h?y:n||a&&s),w=h||!s||a,D=S?.continueColor||L,O=!D||D===L,B=O&&I?.theme?.accentContrast===ke.AUTO?ke.AUTO:E,H=S?.continueColorContrast??B,_=S?.continueRadius??null,$=S?.continueWidth??76,z=Qt({backgroundColor:D,contrast:H}),K={...!O&&{"--color-button-bg":D},...!O&&{"--color-button-text":z},...!O&&{"--color-button-border":"transparent"},..._!=null&&{"--radius-button":`${Number(_)}px`},...$!=null&&{maxWidth:`${Number($)}rem`}},J=(0,u.useCallback)(()=>{d({id:R}),x(!0),i?setTimeout(()=>{const Y=document.querySelector("[data-lesson-id]"),G=document.querySelector("main"),F=document.querySelector("h1.lesson-header__title, .lesson-header__title h1"),U=Y?.querySelector('.block-wrapper, [role="region"], .lesson-content > *:first-child');let Q=null;F?Q=F:U&&U!==p.current?.parentElement?Q=U:Y?Q=Y:G&&(Q=G),Q&&(Q.setAttribute("tabindex","-1"),Q.focus({preventScroll:!0}))},200):setTimeout(()=>{const Y=p.current;Y&&Y.focus()},100)},[R,d,i]);return(0,u.useEffect)(()=>{!g&&s&&(i||setTimeout(()=>{b?.(l?.a11yStatusAdditionalContent)},300))},[b,s,l,g,i]),(0,u.useEffect)(()=>{const Y=G=>{const{path:F}=G.detail,{blockId:U,buttonId:Q}=zi(G.detail.path,["block","button"]);if(e==U&&Q===N.id){const Z=F.at(-1);Z==="title"?T(!0):Z==="completeHint"&&T(!1)}};return window.addEventListener(Je,Y),()=>{window.removeEventListener(Je,Y)}},[e,N.id]),(0,o.jsxs)(o.Fragment,{children:[w&&(0,o.jsx)(De,{children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:m,isLearner:r,children:(0,o.jsx)("div",{className:hg("container"),children:(0,o.jsx)("div",{className:hg("row"),children:(0,o.jsxs)("div",{className:hg("continue"),style:K,children:[P&&(0,o.jsx)(Zu,{onClick:J,text:M}),!P&&(0,o.jsx)(xS,{text:j})]})})})})}),v&&(0,o.jsx)("div",{"aria-live":"off",className:"visually-hidden-always",ref:p,role:"status",tabIndex:-1,children:l?.a11yStatusContinued||"Continued"})]})}const mg=V("block-divider"),fg=({isLearner:e,labels:{numberedDividerGroup:t},number:n,settings:s,type:r="divider"})=>{const{entranceAnimation:i}=s,a=r==="numbered",l=mg({authoring:!e,spacing:r==="spacing",numbered:a,"no-animation":!i}).toString(),d=a?(0,o.jsxs)("div",{className:mg("wrap__number"),children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:t}),n]}):null;return(0,o.jsx)(De,{className:l,children:(0,o.jsx)("div",{className:mg("wrap",{authoring:!e&&!a}),children:d})})},bee=fg,yee=e=>(0,o.jsx)(fg,{type:"numbered",...e}),See=e=>(0,o.jsx)(fg,{type:"spacing",...e});var Iee=C(15384),Yu=C.n(Iee);function Tee(e,t){const n=vn(),{cardMode:s,className:r="",children:i,disabled:a=!1,tag:c="div",overrideBackground:l=!1,style:d={},...h}=e,{cardMode:m,customBackgroundColorContrast:f}=n,g=Ve()?.theme,v=Zn(),x=s??m??Qn.WHITE,b=Rn()??"#ffffff",y=x===Qn.WHITE,T=v===re.COLOR,S=v===re.ACCENT,I=g?.accentContrast,L=v===re.ACCENT||v===re.COLOR,E=I===ke.AUTO&&S||f===ke.AUTO&&T,k=v===re.COLOR?f:I,N=[r,"block-card"];if(y)N.push("bg--range-light","block-card--white");else if(a){N.push("block-card--disabled");const R=Qt({backgroundColor:b,contrast:k});E&&(d["--color-text"]=R,d["--color-text-opposite"]=R===Pt.DARK?Pt.LIGHT:Pt.DARK)}else{N.push("block-card--transparent");const M=hD(b)??b??"#ffffff";switch(v){case re.LIGHT:case re.GRAY:N.push("bg--range-light");break;case re.IMAGE:N.push("bg--range-dark");break;case re.DARK:case re.BLACK:N.push("bg--range-dark"),d["--color-background-rgb"]=Yo(M)?.slice(0,3);break;default:{const j=d["--color-background"]??(l?b:M),P=Qt({backgroundColor:j,contrast:k});L&&P==Pt.LIGHT&&N.push("block-card--contrast-light");const w=Bi(j);N.push(`bg--range-${Tu()(w.toLowerCase())}`),d["--color-background"]=j,d["--color-background-rgb"]=Yo(j)?.slice(0,3);break}}}return(0,o.jsx)(c,{...h,className:N.join(" "),ref:t,style:d,children:i})}const sn=(0,u.forwardRef)(Tee);var Et=C(49860);function bS({ariaLabel:e,children:t,className:n="carousel-controls-item-btn",isActive:s,onClick:r,onKeyDown:i}){return(0,o.jsx)("li",{className:"carousel-controls-item",role:"listitem",children:(0,o.jsx)("button",{"aria-current":s,"aria-label":e,className:n,onClick:r,onKeyDown:i,tabIndex:s?0:-1,type:"button",children:t})})}function qu({children:e,iconNameLeft:t="chevron-left-light",iconNameRight:n="chevron-right-light",isInfinite:s=!0,isRTL:r=!1,labelCarousel:i="Carousel",labelCarouselRoleDesc:a="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:p="Slide",onChange:g,ref:v,renderSlideIndicator:x,shouldMouseEmulateTouch:b=!1,shouldUseCounter:y=!1,shouldUseGoToSlide:T=!0}){const S=Et.useId(),[I,L]=Et.useState(0),E=(0,ze.A)(I)??0,k=Et.useRef(null),N=Et.useRef(null),R=Et.useRef(!1),M=Et.useRef(!1),A=Et.useRef(void 0),j=Et.useRef(void 0),P=`carousel-${S}`,w=Et.Children.count(e),D=(0,ze.A)(w),O=Et.useMemo(()=>Array.from({length:w}),[w]),B=w>1;Et.useImperativeHandle(v,()=>({navigateToSlide:(Y,G=!0)=>{L(Y);const F=k.current?.children?.[Y]?.firstElementChild;G&&F?.focus()}}),[]);const H=Et.useCallback(({activeIndex:Y,dir:G})=>{const F=s?Y-1>=0?Y-1:w-1:Math.max(0,Y-1),U=s?Y+1<=w-1?Y+1:0:Math.min(w-1,Y+1);return G==="left"?r?U:F:r?F:U},[s,r,w]),_=Et.useCallback(()=>{L(Y=>H(r?{activeIndex:Y,dir:"right"}:{activeIndex:Y,dir:"left"}))},[H,r]),$=Et.useCallback(()=>{L(Y=>H(r?{activeIndex:Y,dir:"left"}:{activeIndex:Y,dir:"right"}))},[H,r]),z=Et.useCallback(Y=>{const G=k.current?.children?.[Y],F=k.current;if(G&&F){const U=G.getBoundingClientRect(),Q=F.getBoundingClientRect(),Z=U.left+U.width/2,q=Q.left+Q.width/2,te=Z-q;F.scrollBy({left:te,behavior:"smooth"})}},[]),K=Et.useCallback(Y=>{let G=!1,F=I;switch(Y.key){case"ArrowLeft":G=!0,F=H({activeIndex:I,dir:"left"});break;case"ArrowRight":G=!0,F=H({activeIndex:I,dir:"right"});break;case"Home":G=!0,F=0;break;case"End":G=!0,F=w-1;break}G&&(Y.stopPropagation(),Y.preventDefault()),I!==F&&(k.current?.children?.[F]?.firstChild?.focus(),z(F),L(F))},[I,H,z,w]);Et.useEffect(()=>{E!==I&&g?.(I)},[I,g,E]),Et.useEffect(()=>{w<D&&I>w-1&&L(w-1)},[I,D,w]),Et.useEffect(()=>{const Y=te=>{te.target.tagName==="IMG"&&te.preventDefault(),A.current=te.screenX},G=te=>{const ne=window.visualViewport?.scale??1,ae=window.getSelection().toString()!=="";if(!M.current&&ne<=1.01&&!ae&&A.current!=null){j.current=te.screenX;const ue=j.current-A.current;Math.abs(ue)>50&&(window.getSelection().empty(),R.current=!0,A.current=void 0,j.current=void 0,ue<0?L(we=>H({activeIndex:we,dir:"right"})):L(we=>H({activeIndex:we,dir:"left"})))}},F=te=>{R.current&&te.stopPropagation(),R.current=!1,M.current=!1,A.current=void 0,j.current=void 0},U=te=>{if(te.touches.length>1){M.current=!0;return}te.changedTouches.length===1&&te.changedTouches[0]&&(A.current=te.changedTouches[0].screenX)},Q=te=>{const ne=window.visualViewport?.scale??1,ae=window.getSelection().toString()!=="";if(!M.current&&ne<=1.01&&!ae&&A.current!=null&&te.changedTouches[0]){j.current=te.changedTouches[0].screenX;const ue=j.current-A.current;Math.abs(ue)>50&&(R.current=!0,A.current=void 0,j.current=void 0,ue<0?L(we=>H({activeIndex:we,dir:"right"})):L(we=>H({activeIndex:we,dir:"left"})))}},Z=()=>{R.current=!1,M.current=!1,A.current=void 0,j.current=void 0},q=N.current;return b&&(q?.addEventListener("mousedown",Y,{capture:!0}),q?.addEventListener("mousemove",G,{capture:!0}),q?.addEventListener("click",F,{capture:!0})),q?.addEventListener("touchstart",U,{passive:!0}),q?.addEventListener("touchmove",Q,{passive:!0}),q?.addEventListener("touchend",Z,{passive:!0}),q?.addEventListener("touchcancel",Z,{passive:!0}),()=>{b&&(q?.removeEventListener("mousedown",Y),q?.removeEventListener("mousemove",G),q?.removeEventListener("mouseup",Z)),q?.removeEventListener("touchstart",U),q?.removeEventListener("touchmove",Q),q?.removeEventListener("touchend",Z),q?.removeEventListener("touchcancel",Z)}},[H,b,w]);const J=Et.useCallback(Y=>()=>{z(Y),L(Y)},[z]);return(0,o.jsxs)("div",{"aria-label":i,"aria-roledescription":a,className:"carousel",dir:r?"rtl":void 0,role:"region",style:{"--carousel-active-index":I},children:[B&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{"aria-label":c,className:"carousel-controls",role:"group",children:[T&&(0,o.jsx)("ul",{className:"carousel-controls-items",ref:k,role:"list",children:O.map((Y,G)=>{const F=I===G,U=J(G);return x?x({index:G,isActive:F,onClick:U,onKeyDown:K}):(0,o.jsx)(bS,{ariaLabel:h+" "+(G+1),isActive:F,onClick:U,onKeyDown:K,children:(0,o.jsx)(ce,{className:"carousel-controls-item-btn-icon",name:F?"circle":"circle-solid"})},G)})}),(0,o.jsx)("button",{"aria-disabled":s?void 0:I===0,"aria-label":d,className:"carousel-controls-prev",onClick:!s&&I===0?void 0:_,type:"button",children:(0,o.jsx)(ce,{className:"carousel-controls-prev-icon",name:r?n:t})}),(0,o.jsx)("button",{"aria-disabled":s?void 0:I===w-1,"aria-label":l,className:"carousel-controls-next",onClick:!s&&I===w-1?void 0:$,type:"button",children:(0,o.jsx)(ce,{className:"carousel-controls-next-icon",name:r?t:n})}),y&&(0,o.jsxs)("div",{className:"carousel-controls-counter",children:[(0,o.jsx)("div",{className:"carousel-controls-counter-text",children:`${I+1} ${m} ${w}`}),(0,o.jsx)("div",{className:"carousel-controls-counter-line",children:(0,o.jsx)("div",{className:"carousel-controls-counter-line-runner",style:{width:`${Number(((I+1)/w).toFixed(2))*100}%`}})})]})]})}),(0,o.jsx)("div",{"aria-live":"polite",className:"carousel-slides",ref:N,children:Et.Children.map(e,(Y,G)=>{const F=`${P}-${G}-counter`;return(0,o.jsxs)("div",{"aria-labelledby":F,"aria-roledescription":p,className:"carousel-slide",hidden:I!==G,inert:I!==G,role:"group",children:[(0,o.jsx)("div",{className:"visually-hidden-always",id:F,children:`${G+1} ${f} ${w}`}),Y]})})})]})}const yS=(0,u.createContext)(dg);function Lee({children:e,ImageEagerOrLazy:t}){return(0,o.jsx)(yS,{value:t,children:e})}function Eee(){return(0,u.use)(yS)}function Ln(e){const t=Eee();return(0,o.jsx)(t,{...e})}const En=(e,t)=>e==null||t==null?e===t:String(e)===String(t);function pg(e){const t=n=>{const s=Ld();return(0,o.jsx)(e,{...n,isRTL:s})};return t.displayName=`withRTL(${e.displayName||e.name})`,t}const Xu=({blockId:e,carouselRef:t,children:n,items:s})=>{const r=(0,u.useRef)(null),i=t??r;return(0,u.useEffect)(()=>{const a=d=>{const h=s.findIndex(m=>En(m.id,d));h>=0&&i.current?.navigateToSlide?.(h,!1)},c=d=>{const{path:h}=d.detail,{blockId:m,cardId:f}=zi(h,["block","card"]);m===e&&a(f)},l=d=>{const{blockId:h,itemId:m}=d.detail;En(h,e)&&a(m)};return window.addEventListener(Je,c),window.addEventListener(qo,l),()=>{window.removeEventListener(Je,c),window.removeEventListener(qo,l)}},[s,e,i]),(0,o.jsx)(o.Fragment,{children:n({carouselRef:i})})};var kee=C(74753),Nee=C.n(kee);const SS=V("audio-player-actions"),wee=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onDelete:s,onTranscriptClick:r,onTranscriptClose:i})=>{const{mode:a,disableTranscriptButton:c}=Lu(),l=Dc(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),p=Oe(n)?.audio?.transcript,g=(0,u.useCallback)(()=>h(!0),[]),v=(0,u.useCallback)(()=>h(!1),[]),x=(0,u.useCallback)(()=>f(!0),[]),b=(0,u.useCallback)(R=>{!(R.relatedTarget instanceof Element&&R.relatedTarget.closest(".transcript-panel")!==null)&&R.currentTarget.matches(":focus-visible")&&f(!0)},[]),y=(0,u.useCallback)(()=>f(!1),[]),T=Kt(),S=l?.audioPlayerIdOpen&&l.audioPlayerIdOpen===e,I=c?"Transcripts are only available in lesson previews":S?T?.audioHideTranscript:a==="edit"?"Edit transcript":T?.audioShowTranscript,L=(0,u.useCallback)(()=>{const R=document.getElementById(_p(e));R&&R.focus()},[e]),[E,k]=(0,u.useState)(!1);function N(){c||(S?i?.():(r?.(),k(!0)))}return(0,u.useEffect)(()=>{E&&(k(!1),L())},[E,L]),(0,o.jsxs)(o.Fragment,{children:[s&&(0,o.jsx)(Fs,{elementFocused:d,message:"Remove audio",children:(0,o.jsx)("button",{"aria-label":"Remove audio",className:SS("button",{condensed:t}),onBlur:v,onClick:s,onFocus:g,onMouseOut:v,onMouseOver:g,type:"button",children:(0,o.jsx)(ce,{name:"trash"})})}),(a==="edit"||p)&&(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Fs,{elementFocused:m,message:I,renderInModalWhenPresent:a==="readonly",style:{whiteSpace:"nowrap"},children:(0,o.jsx)("button",{"aria-disabled":c,"aria-label":I,className:SS("button",{condensed:t}),id:a==="readonly"?l5(e):void 0,onBlur:y,onClick:N,onFocus:b,onMouseOut:y,onMouseOver:x,style:c?{opacity:.5}:void 0,type:"button",children:(0,o.jsx)(ce,{name:"file-audio"})})})})]})};var jee=C(29048);const IS="change";class Aee extends jee.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(IS,t)}removeChangeListener(t){this.removeListener(IS,t)}}const Se=new Aee(1/0),Ree=[.5,.75,1,1.25,1.5,1.75,2].toReversed().map(e=>({value:e,label:`${e}x`})),qye=.05,TS=V("audio-player-icon"),ni=({x:e,width:t,height:n,y:s,pulseBaseHeight:r,pulseBaseY:i,pulseHeight:a,pulseY:c,delay:l="0s"})=>(0,o.jsx)("rect",{className:TS("bar"),height:n,rx:1,style:{"--base-height":`${n/10}rem`,"--base-y":`${s/10}rem`,"--pulse-base-height":r&&`${r/10}rem`,"--pulse-base-y":i&&`${i/10}rem`,"--pulse-height":`${a/10}rem`,"--pulse-y":`${c/10}rem`,"--delay":l},width:t,x:e,y:s}),LS=({animating:e})=>(0,o.jsx)("span",{className:TS({animating:e}),children:(0,o.jsxs)("svg",{"aria-hidden":"true",height:"16",viewBox:"0 0 20 16",width:"20",xmlns:"http://www.w3.org/2000/svg",children:[(0,o.jsx)(ni,{delay:"0s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:0,y:7}),(0,o.jsx)(ni,{delay:"0.1s",height:4,pulseBaseHeight:3,pulseBaseY:6.5,pulseHeight:8,pulseY:4,width:2,x:3,y:6}),(0,o.jsx)(ni,{delay:"0.2s",height:10,pulseBaseHeight:8,pulseBaseY:4,pulseHeight:12,pulseY:2,width:2,x:6,y:3}),(0,o.jsx)(ni,{delay:"0.3s",height:16,pulseBaseHeight:12,pulseBaseY:2,pulseHeight:16,pulseY:0,width:2,x:9,y:0}),(0,o.jsx)(ni,{delay:"0.4s",height:8,pulseBaseHeight:6,pulseBaseY:5,pulseHeight:12,pulseY:2,width:2,x:12,y:4}),(0,o.jsx)(ni,{delay:"0.5s",height:11,pulseBaseHeight:9,pulseBaseY:3.5,pulseHeight:15,pulseY:.5,width:2,x:15,y:2.5}),(0,o.jsx)(ni,{delay:"0.6s",height:2,pulseBaseHeight:1,pulseBaseY:7.5,pulseHeight:6,pulseY:5,width:2,x:18,y:7})]})});var Pee,Ye=C(49860);const Ju=Ye.createContext(null);function Mee({children:e,isDisabled:t,onClose:n,onOpen:s,onSelect:r,positionX:i="left"}){const[a,c]=Ye.useState(!1),l=(0,ze.A)(a),[d,h]=Ye.useState(null),m=Ye.useRef(null),f=Ye.useRef(null),p=Ye.useRef(null),x=`${`menu-${Ye.useId()}`}-content`,b=Ye.useCallback(({direction:P,predFn:w=()=>!0})=>{if(!p.current)return;const D=Array.from(p.current.querySelectorAll('[role="menuitem"]')),O=D.length,B=D.findIndex(z=>z===document.activeElement);let H,_,$;switch(P){case"start":H=0,_=1;break;case"end":H=O-1,_=-1;break;case"backwards":H=B-1,_=-1;break;case"forwards":H=B+1,_=1;break;default:H=B+1,_=1}for(let z=0;z<=O;z++){H>=O?H=0:H<0&&(H=O-1);const K=D[H];if(K!=null&&Dee(K)&&w(K)){$=K;break}else H=H+_}$&&$.focus()},[]),y=Ye.useCallback(()=>{b({direction:"start"})},[b]),T=Ye.useCallback(()=>{b({direction:"end"})},[b]),S=Ye.useCallback(()=>{b({direction:"backwards"})},[b]),I=Ye.useCallback(()=>{b({direction:"forwards"})},[b]),L=Ye.useCallback(P=>{b({direction:"forwards",predFn:w=>Fee(w,P)})},[b]),E=Ye.useCallback(()=>{a?c(!1):(c(!0),setTimeout(I,25))},[I,a]),k=Ye.useCallback(()=>{f.current?.focus(),c(!1)},[]),N=Ye.useCallback(()=>{c(!0),setTimeout(I,25)},[I]),R=Ye.useCallback(()=>{c(!0),setTimeout(S,25)},[S]),M=Ye.useCallback(()=>{const{left:P,top:w}=gp({anchor:f.current,popover:p.current,positionX:i});h({transform:`translate3d(${P}px, ${w}px, 0)`,visibility:"visible"})},[i]),A=Ye.useCallback(P=>{const w=P.currentTarget;ES(w)||(r?.(w.getAttribute("data-name")),k())},[k,r]),j=Ye.useCallback(P=>{const w=P.key;if(P.altKey||P.ctrlKey||P.metaKey)return;let D=!1;if(P.shiftKey)w==="Tab"?S():w.trim()!==""&&L(w),D=!0;else switch(w){case" ":case"Enter":A(P),D=!0;break;case"Esc":case"Escape":k(),D=!0;break;case"ArrowUp":S(),D=!0;break;case"Tab":case"ArrowDown":I(),D=!0;break;case"Home":case"PageUp":y(),D=!0;break;case"End":case"PageDown":T(),D=!0;break;default:L(w);break}D&&(P.stopPropagation(),P.preventDefault())},[k,A,L,y,T,I,S]);return Ye.useEffect(()=>{const P=w=>{a&&m.current!=null&&p.current!=null&&!m.current.contains(w.target)&&!p.current.contains(w.target)&&c(!1)};return a?document.addEventListener("click",P):document.removeEventListener("click",P),()=>{document.removeEventListener("click",P)}},[a]),Ye.useEffect(()=>(a?window.addEventListener("resize",M):window.removeEventListener("resize",M),()=>{window.removeEventListener("resize",M)}),[M,a]),Ye.useEffect(()=>{const P=Ec(m.current);for(const w of P)a?w?.addEventListener("scroll",M,{passive:!0}):w?.removeEventListener("scroll",M);return()=>{for(const w of P)w?.removeEventListener("scroll",M)}},[M,a]),Ye.useEffect(()=>{a?M():h(null)},[M,a]),Ye.useEffect(()=>{if(l&&!a)n?.();else if(!l&&a&&(s?.(),m.current)){const P=new CustomEvent("menuopen",{bubbles:!0,detail:{target:m.current}});m.current.dispatchEvent(P)}},[l,a,n,s]),Ye.useEffect(()=>{const P=w=>{w.detail.target!==m.current&&c(!1)};return document.addEventListener("menuopen",P),()=>{document.removeEventListener("menuopen",P)}},[]),(0,o.jsx)(Ju.Provider,{value:{htmlIdContent:x,isExpanded:a,onCloseFocusTrigger:k,onExpandFocusMenuItemNext:N,onExpandFocusMenuItemPrevious:R,onFocusMenuItemByPrefix:L,onFocusMenuItemFirst:y,onFocusMenuItemLast:T,onFocusMenuItemNext:I,onFocusMenuItemPrevious:S,onItemClick:A,onItemKeyDown:j,onTriggerClick:E,refContent:p,refTrigger:f,styleContent:d},children:(0,o.jsx)("div",{"aria-owns":x,inert:t?!0:void 0,ref:m,children:e})})}function Oee({as:e,children:t,label:n,labelledBy:s,...r}){const{htmlIdContent:i,isExpanded:a,onTriggerClick:c,onCloseFocusTrigger:l,onExpandFocusMenuItemNext:d,onExpandFocusMenuItemPrevious:h,refTrigger:m}=Ye.useContext(Ju),f=Ye.useCallback(g=>{let v=!1;switch(g.key){case" ":case"Enter":case"ArrowDown":case"Down":d(),v=!0;break;case"Esc":case"Escape":l(),v=!0;break;case"Up":case"ArrowUp":h(),v=!0;break;default:break}v&&(g.stopPropagation(),g.preventDefault())},[l,d,h]),p=e??"button";return(0,o.jsx)(p,{...r,"aria-controls":i,"aria-expanded":a,"aria-haspopup":"menu","aria-label":n,"aria-labelledby":s,"data-menu-trigger":"",onClick:c,onKeyDown:f,ref:m,type:"button",children:t})}function Bee({children:e,className:t}){const{htmlIdContent:n,isExpanded:s,refContent:r,styleContent:i}=Ye.useContext(Ju);return s?Ts.createPortal((0,o.jsx)("div",{className:t,"data-menu-content":"",hidden:s?void 0:!0,id:n,ref:r,role:"menu",style:i,children:e}),lo()):null}function e0({children:e,className:t,isDisabled:n,name:s,tooltipId:r}){const{onItemClick:i,onItemKeyDown:a}=Ye.useContext(Ju),c=Ye.useCallback(l=>{l.currentTarget?.focus()},[]);return(0,o.jsx)("button",{"aria-describedby":r,"aria-disabled":n,className:t,"data-menu-item":"","data-name":s,onClick:n?void 0:i,onKeyDown:a,onMouseOver:c,role:"menuitem",tabIndex:n?-1:void 0,type:"button",children:e})}function Jye({children:e}){return Pee("span",{"data-menu-item-icon":"",children:e})}function ES(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function Dee(e){return e!=null&&e.tagName==="BUTTON"&&!ES(e)}function Fee(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const oa=V("audio-player-actions-condensed"),nr=Object.freeze({DeleteAudio:"delete-audio",EditAudio:"edit-audio",EditTranscript:"edit-transcript",RevertToSource:"revert-audio-to-source"}),_ee=({audioPlayerId:e,condensed:t=!1,transcriptMedia:n,onTranscriptClick:s,onTranscriptClose:r,item:i,side:a,refs:c})=>{const{mode:l,isVariantLocale:d,handleOpenMediaModal:h,handleDelete:m,handleRevertToSource:f}=Lu(),p=Dc(),g=Wt(),v=ct(),x=i&&"media"in i&&i.media?v(i.media):void 0,b=x&&"audio"in x?x.audio.aiAudioSettings:void 0,y=Hn(),T=vf(),S=y?T(y):"",[I,L]=(0,u.useState)(!1),E=(0,u.useCallback)(()=>L(!0),[]),k=(0,u.useCallback)(()=>L(!1),[]),N=b?.l10nAutoGenStatus==="reverted-to-source",R=d&&"audio"in x&&x.audio?.sourceType==="ai-audio"&&b?.l10nAutoGenStatus!=="unsupported-locale",M=Kt(),A=p?.audioPlayerIdOpen===e,j=A?M?.audioHideTranscript:l==="edit"?"Edit transcript":M?.audioShowTranscript;function P(D){switch(D){case nr.DeleteAudio:m(g.id,i,c);break;case nr.EditTranscript:A?r?.():s?.();break;case nr.EditAudio:h(g,i,c,a,{triggeredFrom:"block_audio_button"});break;case nr.RevertToSource:f(g.id,i);break}}const w=!!v(n)?.audio?.transcript;return h||m||w?(0,o.jsx)(Fs,{elementFocused:I,message:"Options",children:(0,o.jsxs)(Mee,{onSelect:P,positionX:"left",children:[(0,o.jsx)(Oee,{className:oa("trigger",{condensed:t}),label:"Options",onBlur:k,onFocus:E,onMouseEnter:E,onMouseLeave:k,children:(0,o.jsx)(ce,{name:"ellipsis-regular"})}),(0,o.jsxs)(Bee,{className:oa("content"),children:[h?(0,o.jsx)(e0,{className:oa("menu-item"),name:nr.EditAudio,children:"Edit audio"}):null,l==="edit"||w?(0,o.jsx)(e0,{className:oa("menu-item"),name:nr.EditTranscript,children:j}):null,m&&g?.variant!=="audio"?(0,o.jsx)(e0,{className:oa("menu-item"),name:nr.DeleteAudio,children:"Remove audio"}):null,f&&R?(0,o.jsx)(Fs,{message:N?"Audio currently synced to source":void 0,children:(0,o.jsxs)(e0,{className:oa("menu-item"),isDisabled:N,name:nr.RevertToSource,children:["Revert to source audio (",S,")"]})}):null]})]})}):null};var Hee,Vee,qe=C(49860);const Gc=qe.createContext(null);function zee({children:e,className:t,isDisabled:n,onClose:s,onItemActiveChange:r,onOpen:i,onSelect:a,portalArgs:c,positionX:l="left",value:d}){const[h,m]=qe.useState(null),f=(0,ze.A)(h),[p,g]=qe.useState(!1),v=(0,ze.A)(p),[x,b]=qe.useState(null),y=qe.useRef(null),T=qe.useRef(null),S=qe.useRef(null),L=`select-${qe.useId()}`,E=`${L}-content`,k=h?.id,N=qe.useCallback(w=>{const D=w.currentTarget;kS(D)||(g(!1),m(D),a(D.getAttribute("data-value")),w.stopPropagation())},[a]),R=qe.useCallback(w=>{m(w)},[]),M=qe.useCallback(()=>{g(w=>!w)},[]),A=qe.useCallback(()=>{const{left:w,top:D}=gp({anchor:T.current,popover:S.current,positionX:l}),H=window.getComputedStyle(T.current).direction==="rtl"?-w:w;b({transform:`translate3d(${H}px, ${D}px, 0)`,visibility:"visible",width:`${T.current?.offsetWidth}px`})},[l]),j=qe.useCallback(w=>{const D=Array.from(S.current?.querySelectorAll("[data-select-item]")??[]),O=D.length,B=D.findIndex($=>$.getAttribute("data-select-item")==="current");let H,_=B+1;for(let $=0;$<O;$++){_>=O&&(_=0);const z=D[$];if(z!=null&&!kS(z)&&Wee(z,w)){H=$;break}else _=O-1}H&&(m(D[H]),D[H]?.scrollIntoView({block:"center"}))},[]),P=qe.useCallback(w=>{const D=w.key;if(w.ctrlKey||w.metaKey)return;let O=!1;const B=Array.from(S.current?.querySelectorAll("[data-select-item]")??[]),H=B.findIndex(_=>_.getAttribute("data-select-item")==="current");if(p)if(D.length===1&&D!==" "&&!w.altKey&&!w.ctrlKey&&!w.metaKey)j(D);else switch(D){case" ":case"Enter":g(!1),B[H]!=null&&a(B[H].getAttribute("data-value")),O=!0;break;case"Esc":case"Escape":g(!1),m(B.find(_=>_.getAttribute("aria-selected")==="true")),O=!0;break;case"ArrowUp":w.altKey?(g(!1),B[H]!=null&&a(B[H].getAttribute("data-value")??"")):H>0&&(m(B[H-1]),B[H-1].scrollIntoView({block:"center"})),O=!0;break;case"ArrowDown":H<B.length-1&&(m(B[H+1]),B[H+1].scrollIntoView({block:"center"})),O=!0;break;case"Home":m(B[0]),B[0]?.scrollIntoView({block:"center"}),O=!0;break;case"End":m(B[B.length-1]),B[B.length-1]?.scrollIntoView({block:"center"}),O=!0;break;case"PageUp":m(B[0]),B[0]?.scrollIntoView({block:"center"}),O=!0;break;case"PageDown":m(B[B.length-1]),B[B.length-1]?.scrollIntoView({block:"center"}),O=!0;break;case"Tab":g(!1),B[H]!=null&&a(B[H].getAttribute("data-value"));break}else if(D.length===1&&D!==" "&&!w.altKey&&!w.ctrlKey&&!w.metaKey)g(!0),j(D);else switch(D){case" ":case"Enter":g(!0),O=!0;break;case"ArrowUp":g(!0),m(B[0]),O=!0;break;case"ArrowDown":g(!0),O=!0;break;case"Home":g(!0),m(B[0]),O=!0;break;case"End":g(!0),m(B[B.length-1]),O=!0;break}O&&(w.stopPropagation(),w.preventDefault())},[j,p,a]);return qe.useEffect(()=>{const w=S.current?.querySelector('[data-select-item][aria-selected="true"]');m(w)},[]),qe.useEffect(()=>{const w=S.current?.querySelector(`[data-select-item][data-value="${d}"]`);m(w)},[d]),qe.useEffect(()=>{const w=D=>{p&&y.current!=null&&S.current!=null&&!y.current.contains(D.target)&&!S.current.contains(D.target)&&g(!1)};return p?document.addEventListener("click",w):document.removeEventListener("click",w),()=>{document.removeEventListener("click",w)}},[p]),qe.useEffect(()=>(p?window.addEventListener("resize",A):window.removeEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[A,p]),qe.useEffect(()=>{const w=Ec(y.current);for(const D of w)p?D?.addEventListener("scroll",A,{passive:!0}):D?.removeEventListener("scroll",A);return()=>{for(const D of w)D?.removeEventListener("scroll",A)}},[A,p]),qe.useEffect(()=>{p?A():b(null)},[A,p]),qe.useEffect(()=>{p&&f!=null&&f!==h&&r?.({value:h.getAttribute("data-value")})},[p,f,h,r]),qe.useEffect(()=>{if(v&&!p)s?.();else if(!v&&p&&(i?.(),y.current)){const w=new CustomEvent("comboboxopen",{bubbles:!0,detail:{target:y.current}});y.current.dispatchEvent(w)}},[v,p,s,i]),qe.useEffect(()=>{const w=D=>{D.detail.target!==y.current&&g(!1)};return document.addEventListener("comboboxopen",w),()=>{document.removeEventListener("comboboxopen",w)}},[]),(0,o.jsx)(Gc.Provider,{value:{activeEl:h,htmlIdActiveDescendant:k,htmlIdBase:L,htmlIdContent:E,isExpanded:p,onItemClick:N,onItemHover:R,onTriggerClick:M,onTriggerKeyDown:P,portalArgs:c,refContent:S,refTrigger:T,selectedValue:d,styleContent:x},children:(0,o.jsx)("div",{"aria-owns":E,className:t,inert:n?!0:void 0,ref:y,children:e})})}function $ee({children:e,className:t,labelledBy:n,as:s,...r}){const{htmlIdActiveDescendant:i,htmlIdContent:a,isExpanded:c,onTriggerClick:l,onTriggerKeyDown:d,refTrigger:h}=qe.useContext(Gc),m=!!s,f=s??"button";return(0,o.jsxs)(f,{"aria-activedescendant":i,"aria-controls":a,"aria-expanded":c,"aria-haspopup":"listbox","aria-labelledby":n,className:t,"data-select-trigger":m?void 0:"",onClick:l,onKeyDown:d,ref:h,role:"combobox",type:"button",...r,children:[(0,o.jsx)("span",{"data-select-trigger-text":"",children:e}),(0,o.jsx)("span",{"data-select-trigger-icon":"",children:c?(0,o.jsx)(ce,{name:"chevron-up"}):(0,o.jsx)(ce,{name:"chevron-down"})})]})}function Uee({children:e,className:t,label:n,labelledBy:s,style:r={}}){const{htmlIdContent:i,isExpanded:a,portalArgs:c,refContent:l,styleContent:d}=qe.useContext(Gc);return Ts.createPortal((0,o.jsx)("div",{"aria-label":n,"aria-labelledby":s,className:t,"data-select-content":"",hidden:a?void 0:!0,id:i,ref:l,role:"listbox",style:{...d,...r},children:e}),lo(c))}function t3e({children:e,className:t,labelText:n}){const{htmlIdBase:s}=qe.useContext(Gc),r=qe.useId(),i=`${s}-group-label-${r}`;return Hee("div",{"aria-labelledby":i,className:t,"data-select-group":"",role:"group",children:[Vee("div",{"data-select-group-label":"",id:i,role:"presentation",children:n}),e]})}function Gee({children:e,className:t,labelledBy:n,isDisabled:s,value:r}){const{activeEl:i,htmlIdBase:a,onItemClick:c,onItemHover:l,selectedValue:d}=qe.useContext(Gc),h=qe.useRef(null),m=qe.useId(),f=h.current===i,p=r===d,g=`${a}-option-${m}`,v=qe.useCallback(()=>{l(h.current)},[l]);return(0,o.jsxs)("div",{"aria-disabled":s,"aria-labelledby":n,"aria-selected":p,className:t,"data-select-item":f?"current":"","data-value":r,id:g,onClick:s?void 0:c,onMouseEnter:v,ref:h,role:"option",children:[e,p&&(0,o.jsx)("span",{"data-select-item-selected":"",children:(0,o.jsx)(ce,{name:"check"})})]})}function kS(e){return e!=null&&e.getAttribute("disabled")!=null||e.getAttribute("aria-disabled")==="true"}function Wee(e,t){return e?.textContent.toLowerCase().startsWith(t?.toLowerCase())}const gg=V("playback-speed-menu"),Kee=({onChange:e,condensed:t=!1,speed:n})=>{const s=Kt(),[r,i]=(0,u.useState)(!1),a=(0,u.useCallback)(()=>i(!0),[]),c=(0,u.useCallback)(()=>i(!1),[]);return(0,o.jsx)(Fs,{elementFocused:r,message:s?.audioPlaySpeed,children:(0,o.jsxs)(zee,{className:gg(),onOpen:c,onSelect:l=>e(parseFloat(l)),portalArgs:{id:"portal",childType:"other"},value:String(n),children:[(0,o.jsxs)($ee,{"aria-label":s?.audioPlaySpeed,className:gg("trigger",{condensed:t}),labelledBy:void 0,onBlur:c,onFocus:a,onMouseEnter:a,onMouseLeave:c,children:[n,"x"]}),(0,o.jsx)(Uee,{className:gg("content"),label:s?.audioPlaySpeed,children:Ree.map((l,d)=>(0,o.jsx)(Gee,{value:String(l.value??""),children:l.label},d))})]})})};function Qee(e=!1,t=200){const n=(0,u.useRef)(void 0),[s,r]=(0,u.useState)(e),i=(0,u.useCallback)(()=>{n.current&&clearTimeout(n.current),r(!0)},[]),a=(0,u.useCallback)(c=>{n.current&&clearTimeout(n.current),c?r(!1):n.current=setTimeout(()=>{r(!1)},t)},[t]);return(0,u.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{isActive:s,setActive:i,setInactive:a}}const vg=V("audio-player-volume"),Zee=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"];function Yee(e,t){return t||e<=0?"volumeXmark":e<=1/3?"volumeLow":e<=2/3?"volume":"volumeHigh"}function qee({condensed:e=!1,muted:t,onChange:n,onMute:s,volume:r}){const i=Kt(),a=(0,u.useRef)(null),c=(0,u.useRef)(null),l=(0,u.useRef)(null),{isActive:d,setActive:h,setInactive:m}=Qee(!1,200),f=t?0:r;function p(v){if(Zee.includes(v.code)){const y=window.getComputedStyle(v.currentTarget).direction==="rtl"?"ArrowLeft":"ArrowRight",T=v.code==="ArrowUp"||v.code===y?Math.min(f+.05,1):Math.max(f-.05,0);n(T),v.stopPropagation(),v.preventDefault()}else v.code==="KeyM"&&(s(),v.stopPropagation(),v.preventDefault())}(0,u.useEffect)(()=>{l.current.style.setProperty("--slider-volume",`${f*100}%`)},[f]);const g=`${Math.round(f*100)}%`;return(0,o.jsxs)("div",{className:vg(),onKeyDown:p,onMouseEnter:h,onMouseLeave:()=>m(!1),ref:a,children:[(0,o.jsx)("button",{"aria-label":f<=0?i?.a11yMediaUnmute:i?.a11yMediaMute,className:vg("button",{condensed:e}),onClick:s,ref:c,type:"button",children:(0,o.jsx)(ce,{name:Yee(f,t)})}),(0,o.jsx)("input",{"aria-label":i?.a11yMediaVolume,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f*100,"aria-valuetext":g,className:vg("slider").mix(d?"":"visually-hidden"),max:100,min:0,onChange:v=>n(v.currentTarget.valueAsNumber/100),ref:l,type:"range",value:f*100})]})}const Vn=V("audio-player"),t0=({currentTime:e,duration:t})=>Math.round(e/t*100)||0,NS=e=>{if(!e)return{hours:0,minutes:0,seconds:0};const t=Math.floor(e/3600),n=Math.floor(e%3600/60),s=e%60;return{hours:t,minutes:n,seconds:s}},wS=e=>{const{minutes:t,seconds:n}=NS(e);let s="";return t>0&&(s+=`${new Intl.NumberFormat(void 0,{style:"unit",unit:"minute",unitDisplay:"long"}).format(t)} `),s+=new Intl.NumberFormat(void 0,{style:"unit",unit:"second",unitDisplay:"long"}).format(Math.round(n)),s},Xee=e=>{const{hours:t,minutes:n,seconds:s}=NS(e);function r(c,l,d){return(new Array(d+1).join(l)+c).slice(-d)}const i=r(n,"0",2),a=r(s,"0",2);return t>0?`${t}:${i}:${a}`:`${n}:${a}`};class ra extends u.Component{audio;play;playerControls;seekSlider;onDelete;constructor(t){super(t),this.state={condensed:!1,currentTime:0,playheadPositionSaveThrottle:0,playbackSpeed:1,playerExpanded:!0,shouldLoadPlayheadPosition:!0,volume:1,muted:!1,maxTime:t.audioVideoPlayhead||0,sliderPercent:0},this.handleChange=this.handleChange.bind(this),this.handleClickInsideAudioPlayer=this.handleClickInsideAudioPlayer.bind(this),this.onPlayClick=this.onPlayClick.bind(this),this.onTogglePlayer=this.onTogglePlayer.bind(this)}static defaultProps={allowTabNavigation:!0,mediaSrc:null,onEnd:()=>{},onLoad:()=>{},onPause:()=>{},onPlay:()=>{},onSeek:()=>{},shouldPause:!1,transcriptMedia:null};static timeMs(t){return Math.round(t*1e3)}keySeek(t){const{canRestrictSeek:n}=this.props,{currentTime:s,duration:r}=this.audio,{maxTime:i}=this.state;let a=s+t;n&&a>i&&(a=i);const c=Math.max(0,r-.01);this.audio.currentTime=t<0?Math.max(a,0):Math.min(a,c)}changeVolume=t=>{this.audio.volume=Math.round(t*100)/100,this.audio.muted=!1};muteToggle=()=>{this.audio.volume<=0?(this.audio.volume=1,this.audio.muted=!1):this.audio.muted=!this.audio.muted};changeVolumeDelta=t=>{const n=t<0?Math.max(this.audio.volume+t,0):Math.min(this.audio.volume+t,1);this.changeVolume(n)};componentDidMount(){Se.addChangeListener(this.handleChange)}componentDidUpdate(t,n){const r=this.props.activeIndex!=null&&this.props.itemIndex!=null&&t.activeIndex!==this.props.activeIndex&&this.props.activeIndex!==this.props.itemIndex;(!t.shouldPause&&this.props.shouldPause||r)&&(this.audio.pause(),Se.isPlaying&&Se.playerId===this.props.id&&Se.pause()),n.playbackSpeed!==this.state.playbackSpeed&&(this.audio.playbackRate=this.state.playbackSpeed)}componentWillUnmount(){const{recordMediaPlayheadPosition:t,id:n}=this.props;Se.playerId===n&&Se.pause(),Se.removeChangeListener(this.handleChange),t&&t(t0(this.audio))}handleClickInsideAudioPlayer=t=>{t.stopPropagation(),t.preventDefault()};handleChange(){Se.playerId===this.props.id?this.audio&&(Se.isPlaying&&this.audio.paused?this.audio.play():!Se.isPlaying&&!this.audio.paused&&this.audio.pause(),this.forceUpdate()):Se.isPlaying&&(this.audio.pause(),this.forceUpdate())}containerResizeRef=t=>{const n=new ResizeObserver(([s])=>{if(!s)return;const r=getComputedStyle(document.documentElement),i=parseFloat(r.fontSize)/10;this.setState({condensed:s.contentRect.width<300*i})});return this.setState({condensed:t.getBoundingClientRect().width<256}),n.observe(t),()=>{n.disconnect()}};render(){const{allowTabNavigation:t,id:n,isEditor:s,isOverlayAudio:r,labels:i,mediaSrc:a,mode:c,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m,item:f,side:p,refs:g,transcriptAudioPlayerIdOpen:v}=this.props,x=Se.isPlaying&&Se.playerId===n,{currentTime:b,playerExpanded:y}=this.state,T=this.audio?.duration??0,S=Number.isFinite(T)?T:0,I=Math.round(S-b),L=Xee(I),E=wS(I),k=wS(b),N=t?0:-1,R=!s,{a11yGroupAudioPlayer:M,a11yMediaPlay:A,a11yMediaPause:j,a11yMediaSeek:P}=i??{},w=Vn({overlay:r,collapsed:r&&!y,expanded:!r||y,"volume-slider-below":this.props.volumeSliderPosition==="below"}),D=s||c==="edit"?"Collapse audio player":i?.audioCollapsePlayer,O=s||c==="edit"?"Expand audio player":i?.audioExpandPlayer,B=y?D:O,H=ks({refs:g}),$=v===H?_p(v):void 0;return(0,o.jsx)("div",{className:Vn("container"),"data-search-content-ignore":"",onClick:this.handleClickInsideAudioPlayer,ref:this.containerResizeRef,children:(0,o.jsxs)("div",{className:w,id:n,children:[R&&(0,o.jsx)("div",{className:Vn("waveform"),children:r?(0,o.jsx)(Fs,{message:B,children:(0,o.jsx)("button",{"aria-label":B,className:Vn("waveform-icon"),onClick:this.onTogglePlayer,type:"button",children:(0,o.jsx)(LS,{animating:x})})}):(0,o.jsx)("div",{className:Vn("waveform-icon",{disabled:!0}),children:(0,o.jsx)(LS,{animating:x})})}),(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":M,"aria-owns":$,className:Vn("housing",{"with-border":R}),inert:!this.state.playerExpanded,onKeyDown:this.onKeyDown.bind(this),role:"group",tabIndex:N,children:[(0,o.jsxs)("div",{className:Vn("play-timer-housing"),children:[(0,o.jsx)("button",{"aria-label":x?j:A,className:Vn("play",{condensed:this.state.condensed}),onClick:this.onPlayClick,ref:z=>{this.play=z},tabIndex:N,type:"button",children:(0,o.jsx)(ce,{className:Vn("icon"),name:x?"pause-solid":"play-solid"})}),(0,o.jsx)("input",{"aria-label":P,"aria-valuemax":S,"aria-valuemin":0,"aria-valuenow":b,"aria-valuetext":k,className:Vn("seek-slider"),max:S,min:0,onChange:this.onSeekSliderChange.bind(this),ref:z=>{this.seekSlider=z},step:.01,style:{"--seek-slider-percent":`${this.state.sliderPercent}%`},type:"range",value:b}),(0,o.jsx)("div",{"aria-label":E,className:Vn("timer").mix(this.state.condensed?"visually-hidden-always":""),role:"timer",children:L})]}),(0,o.jsxs)("div",{className:Vn("player-controls"),ref:z=>{this.playerControls=z},children:[(0,o.jsx)(Kee,{condensed:this.state.condensed,onChange:z=>{this.setState({playbackSpeed:z})},speed:this.state.playbackSpeed}),(0,o.jsx)(qee,{condensed:this.state.condensed,muted:this.state.muted,onChange:this.changeVolume,onMute:this.muteToggle,volume:this.state.volume}),c==="readonly"||s?(0,o.jsx)(wee,{audioPlayerId:H,condensed:this.state.condensed,onDelete:l,onTranscriptClick:d,onTranscriptClose:h,transcriptMedia:m}):(0,o.jsx)(_ee,{audioPlayerId:H,condensed:this.state.condensed,item:f,onTranscriptClick:d,onTranscriptClose:h,refs:g,side:p,transcriptMedia:m})]})]}),(0,o.jsx)("audio",{className:Vn("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:z=>{this.audio=z},src:yt(`${a}`)},"audio-"+n)]},`player-${n}`)})}onKeyDown(t){const s=Es(this.onPlayClick),r=Es(()=>this.keySeek(5)),i=Es(()=>this.keySeek(-5)),a=Es(()=>this.changeVolumeDelta(.05)),c=Es(()=>this.changeVolumeDelta(-.05)),l=Es(()=>this.muteToggle()),d=v=>v.target===this.play,h=v=>v.target===this.seekSlider,m=v=>this.playerControls===v.target||this.playerControls.contains(v.target),f=jn()([[hc,s],[Ko,Jo],[Wo,Jo],[Ur,Jo],[$r,Jo]]),p=jn()([[hc,s],[UB,r],[GB,i]]),g=jn()([[hc,s],[Ko,r],[Wo,i],[$r,a],[Ur,c],[v=>v.code==="KeyM",l]]);jn()([[d,f],[h,p],[m,Jo],[Sr(),g]])(t)}onPlayClick(t){t.stopPropagation(),t.preventDefault();const{audioVideoPlayhead:n}=this.props,{duration:s,paused:r}=this.audio;r&&n&&this.state.shouldLoadPlayheadPosition&&(this.audio.currentTime=s*n/100||0),r?this.audio.play():this.audio.pause()}onAudioPlayPause=t=>{const{id:n,onPause:s,onPlay:r,onTranscriptUpdate:i,recordMediaPlayheadPosition:a,refs:c,transcriptMedia:l}=this.props,{paused:d,currentTime:h,duration:m}=t.currentTarget;if(d)d&&Se.playerId===n&&(Se.isPlaying=!1,s(ra.timeMs(h)),a&&a(t0({currentTime:h,duration:m})));else{Se.playerId=n,Se.isPlaying=!0,r(ra.timeMs(h));const f=ks({refs:c});i?.({audioPlayerId:f,transcriptMedia:l})}this.setState({shouldLoadPlayheadPosition:!1})};onVolumeChangeHandler=t=>{const{volume:n,muted:s}=t.currentTarget;this.setState({volume:n,muted:s})};onSeekSliderChange(t){const{canRestrictSeek:n}=this.props,{maxTime:s}=this.state;let r=t.currentTarget.valueAsNumber;n&&r>s&&(r=s),this.audio.currentTime=r}onLoadedMetadata(t){const{currentTime:n,duration:s,muted:r,volume:i}=t.currentTarget,a=n/s*100;this.setState({currentTime:n,muted:r,volume:i,sliderPercent:a});const{onLoad:c}=this.props;c()}onEnded(t){const n=t.currentTarget;this.audio.currentTime=0,this.setState({currentTime:n.currentTime}),Se.isPlaying=!1,this.props.onEnd(ra.timeMs(n.currentTime)),this.forceUpdate()}onSeeked(t){const{id:n,onSeek:s,recordMediaPlayheadPosition:r}=this.props,{currentTime:i,duration:a}=t.currentTarget;Se.isPlaying&&Se.playerId!==n&&(Se.isPlaying=!1),Se.playerId=n,s(ra.timeMs(i)),r&&r(t0({currentTime:i,duration:a}))}onTimeUpdate(t){const n=t.currentTarget,{recordMediaPlayheadPosition:s}=this.props,{currentTime:r,duration:i}=n,a=Math.floor(r);r>this.state.maxTime&&this.setState({maxTime:r});const c=r/i*100;sv(),this.setState({currentTime:r,sliderPercent:c}),a%5===0&&this.state.playheadPositionSaveThrottle!==a&&s&&(s(t0(n)),this.setState({playheadPositionSaveThrottle:a}))}onTogglePlayer(t){this.setState(({playerExpanded:n})=>({playerExpanded:!n})),t.preventDefault(),t.stopPropagation()}}const Jee=ra,go=e=>t=>t!=null&&typeof t=="object"&&"status"in t&&typeof t.status=="string"&&e.includes(t.status),ete=go(["uploading","processing","cropping","crushing"]),s3e=go(["canceled"]),jS=go(["complete"]),tte=go(["cropping"]),nte=go(["crushing"]),ste=go(["uploading"]),ote=go(["processing"]),rte=go(["errored"]),AS=go(["cropping","crushing","errored","processing","uploading"]);function ite(e){return e==null||typeof e!="object"?0:Object.values(e).filter(ete).length}function o3e(e){return Math.round(e.loaded*100/e.total)}const r3e=e=>e?.file?.name||e?.opts?.filename||"";function i3e(e){return e==null||typeof e!="object"?!1:Object.keys(e).length>0&&ite(e)>0}const n0=e=>X()("upload-progress__wrapper",e),RS=(0,u.createContext)(null);function PS(){return(0,u.useContext)(RS)}const a3e=RS.Provider;function ate(e){function t(n){const s=PS();return s?(0,o.jsx)(e,{...n,getUpload:s.getUpload,handleUploadDismiss:s.handleUploadDismiss}):(0,o.jsx)(e,{...n})}return t.displayName=`withUploadStatusContext(${e.displayName||e.name})`,t}const s0=({onClick:e,text:t})=>(0,o.jsxs)("button",{className:"upload-action-button",onClick:e,type:"button",children:[t,(0,o.jsx)("span",{className:"visually-hidden-always",children:" upload"})]}),Cg=20,Wc=Cg/2,xg=Wc-2,MS=+(2*Math.PI*xg).toFixed(3),cte=e=>MS*(100-e)/100;function OS({classes:e,percent:t}){return(0,o.jsxs)("svg",{className:X()("upload-progress__pie",e),focusable:"false",height:`${Cg}px`,width:`${Cg}px`,children:[(0,o.jsx)("circle",{className:"upload-progress__border",cx:Wc,cy:Wc,r:xg}),(0,o.jsx)("circle",{className:"upload-progress__progress",cx:Wc,cy:Wc,r:xg,strokeDasharray:MS,strokeDashoffset:cte(t)})]})}const lte=({text:e})=>(0,o.jsxs)("div",{className:"upload-progress",children:[(0,o.jsx)(OS,{classes:"upload-progress__pie--processing",percent:70}),(0,o.jsx)("div",{className:"upload-progress__text",children:e})]}),dte=({percentage:e,text:t="Uploading\u2026"})=>(0,o.jsxs)("div",{className:"upload-progress",children:[(0,o.jsx)(OS,{percent:e}),(0,o.jsx)("div",{className:"upload-progress__text",children:t})]}),bg=({classes:e,jobId:t,onCancel:n,text:s})=>(0,o.jsxs)("div",{className:n0(e),children:[(0,o.jsx)(lte,{text:s}),t&&(0,o.jsx)(s0,{onClick:n,text:"Cancel"})]}),ute=({classes:e,onCancel:t,percentage:n,text:s})=>(0,o.jsxs)("div",{className:n0(e),children:[(0,o.jsx)(dte,{percentage:n,text:s}),(0,o.jsx)(s0,{onClick:t,text:"Cancel"})]}),hte=({message:e="Error"})=>(0,o.jsxs)("div",{className:"upload-error",children:[(0,o.jsx)(ce,{name:"circle-exclamation"}),(0,o.jsx)("div",{className:"upload-error__text",children:e})]}),mte=({classes:e,message:t,onClick:n})=>(0,o.jsxs)("div",{className:n0(e),children:[(0,o.jsx)(hte,{message:t}),(0,o.jsx)(s0,{onClick:n,text:"Dismiss"})]}),fte=({message:e="Success"})=>(0,o.jsxs)("div",{className:"upload-success",children:[(0,o.jsx)(ce,{name:"check-regular"}),(0,o.jsx)("div",{className:"upload-success__text",children:e})]}),pte=({classes:e,message:t,onClick:n})=>(0,o.jsxs)("div",{className:n0(e),children:[(0,o.jsx)(fte,{message:t}),n?(0,o.jsx)(s0,{onClick:n,text:"Dismiss"}):null]}),gte=e=>{const{classes:t,data:n={},errorMessage:s,jobId:r,progress:i,onCancelUpload:a,onCancelProcess:c,onErrorDismiss:l,onSuccessDismiss:d,successMessage:h,uploadType:m}=e;return rte(e)?(0,o.jsx)(mte,{classes:t,message:s||n?.message,onClick:l}):ste(e)?(0,o.jsx)(ute,{classes:t,onCancel:a,percentage:i,text:`Uploading ${m}\u2026`}):ote(e)?(0,o.jsx)(bg,{classes:t,jobId:r,onCancel:c,text:`Processing ${m}\u2026`}):nte(e)?(0,o.jsx)(bg,{classes:t,onCancel:c,text:`Uploading ${m}\u2026`}):tte(e)?(0,o.jsx)(bg,{classes:t,onCancel:c,text:"Cropping image\u2026"}):jS(e)&&h?(0,o.jsx)(pte,{classes:t,message:h,onClick:d}):(0,o.jsx)("div",{})},yg=V("audio-player"),vte=yg("upload-state");function BS({uploadId:e,onAIUploadFinish:t,volumeSliderPosition:n,...s}){const r=PS(),{mode:i}=Lu(),a=Dc(),c=r&&e?r.getUpload(e):null,l=(0,u.useMemo)(()=>c&&c.mediaType==="audio"&&AS(c),[c]),d=(0,ze.A)(l);if((0,u.useEffect)(()=>{!l&&d&&t?.()},[l,d,t]),l){const{jobId:h,status:m,progress:f,data:p}=c,g=x=>()=>r?.handleUploadDismiss(x,c),v=yg({overlay:s.isOverlayAudio,static:s.isOverlayAudio});return(0,o.jsx)("div",{className:yg("container"),children:(0,o.jsx)("div",{className:v,children:(0,o.jsx)(gte,{classes:vte,errorMessage:p?.message,jobId:h,onCancelProcess:g("process"),onCancelUpload:g("upload"),onErrorDismiss:g("error"),progress:f,status:m,successMessage:"Processing\u2026",uploadType:"audio"})})})}return(0,o.jsx)(Jee,{...s,mode:i,transcriptAudioPlayerIdOpen:a?.audioPlayerIdOpen??null,volumeSliderPosition:n})}var Cte=C(91242),xte=C.n(Cte),bte=C(22954),yte=C.n(bte),Ste=C(82945),m3e=C(39754);function DS({children:e,...t}){return Cn()?e:(0,o.jsx)(Ste.i,{IconUnzoom:Tte,IconZoom:Ite,...t,children:e})}const Ite=()=>(0,o.jsx)(ce,{name:"arrows-two-from-center"}),Tte=()=>(0,o.jsx)(ce,{name:"arrows-two-to-center"}),Lte={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 Ete(){const t=Ve()?.id,n=Id();return(0,u.useCallback)(s=>n&&t!=null?Lte.lesson({courseId:t,lessonId:s}):An(s),[t,n])}const kte="about:blank",Nte=e=>{const t=e?.trim();if(!t)return null;const n=Bn(t);return n===kte?null:/^(https?:\/\/|mailto:)/i.test(n)||/^(\.?\/|[#?])/.test(n)?n:`http://${n.replace(/^\/\//,"")}`},ia=u.memo(({align:e,alt:t,allowTabNavigation:n=!0,cornerRadius:s,disableZoom:r,getLessonPath:i,height:a,l10nId:c,labels:l,link:d,maxHeight:h=380,onLoad:m,shouldFillWidth:f,src:p,width:g})=>{const v=Ete(),x=i??v,b=Mo(t),y=d?.type==="url"&&d.destination?Nte(d.destination):null,T=d?.type==="block"?SY(d.destination):null,S=d?.type==="lesson"&&!!d.destination||T!=null||!!y,I=n&&!r&&!S,L=X()("img-img",{"img-img--left":e==="left","img-img--right":e==="right","img-img--center":!e||e==="center","img-img--fill":f});let E={};s!=null&&(E["--corner-radius"]=`${Number(s)}px`),g>0&&a>0&&a>h?(g=Math.round(g*h/a),a=h):h&&(!g||!a)&&(E={maxHeight:h});let k=(0,o.jsx)(Ln,{alt:b,className:L,"data-l10n-id":c,height:a,onLoad:m,src:p,style:E,width:g});return S&&d?d.type==="lesson"?k=(0,o.jsx)(xn,{className:"img__link",to:x(d.destination),children:k}):d.type==="block"&&T?k=(0,o.jsx)(xn,{className:"img__link",to:`${x(T.lessonId)}?blockId=${T.blockId}`,children:k}):y&&(k=(0,o.jsx)("a",{className:"img__link",href:y,rel:"noopener noreferrer nofollow",target:"_blank",children:k})):I&&(k=(0,o.jsx)(DS,{a11yNameButtonUnzoom:l?.a11yUnzoomImage,a11yNameButtonZoom:l?.a11yZoomImage,children:k})),(0,o.jsx)("div",{className:"img",children:k})});var p3e=C(17897),wte=C(22294),jte=C.n(wte);const Ate=/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/,Rte=/\.[a-z]{2,}\.?$/i,Pte=(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,Mte=e=>Sg(e);function g3e(e){try{if(Mte(e))return new URL(e);throw new Error("invalid URL")}catch{return}}const Sg=e=>{if(typeof e!="string")return!1;let t;try{t=e.startsWith("//")?new URL(e,"https://placeholder.invalid"):new URL(e)}catch{return!1}if(t.protocol!=="http:"&&t.protocol!=="https:")return!1;const{hostname:n}=t;if(!n)return!1;const s=Ate.exec(n);return s?!Pte(Number(s[1]),Number(s[2])):Rte.test(n)},Ote=/^<iframe\b[^>]*\ssrc="([^"]+)"[^>]*><\/iframe>$/,Bte=e=>{if(typeof e!="string")return!1;const t=Ote.exec(e);return t?Sg(t[1]):!1};var Dte,Fte,_te,Hte,Vte;const FS=fn()("type","embed"),zte=jte()("type","embedType"),$te=vi()(/http:/i,"https:"),Ute=e=>({embedType:"iframe",originalUrl:e,src:e}),Gte=e=>si(e.embed),si=e=>e?.embedType||e?.type,v3e=e=>_te([[Hte,Dte(FS,Ute,$te)],[Vte,Fte(FS,zte,e)]]),C3e=Ro()(Ue()(Bte,ev),Sg),x3e="We are unable to generate an embed for this URL. Please check that the URL is valid and the content is publicly accessible.";var oi=C(49860);const _S=e=>{const t=Ae("CDN_USER_CONTENT_URI"),n=new RegExp(Ae("CDN_URI"),"g");return Ea()?e:n.test(e)?`${t}${new URL(e).pathname}${new URL(e).search}`:e},Wte=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:","")},Kte=/^\/\/cdn.embedly.+src=.*\.typeform\.com%2F/,Qte=e=>Kte.test(e),Zte=/^\/\//,HS=e=>e?.replace(Zte,"https://"),o0=e=>{try{if(e===!1)return e;const t=new URL(HS(e));if(t.host==="cdn.embedly.com"&&t.pathname==="/widgets/media.html"){const n=new URL("https://embed.articulateusercontent.com/media/");return n.search=t.search,n.searchParams.set("v","1"),n.href}return t.href}catch(t){const n=new Error("Could not parse embed url",{cause:t});return console.warn(n),e}},Yte=Ue()(o0,HS,yr()(Qte,Wte),yr()(Boolean,yt),Bn),qte=e=>{const{paddingBottom:t,ref:n,value:s}=e;return(0,o.jsx)("div",{className:"embed--iframe",dangerouslySetInnerHTML:oi.useMemo(()=>({__html:s}),[s]),ref:n,style:{paddingBottom:t}})};class Xte extends oi.Component{player;refIframeContainer=oi.createRef();refIframePlayer=oi.createRef();state={duration:0,isReady:!1};static get defaultProps(){return{allowTabNavigation:!0,shouldPause:!1,showMetaData:!0}}componentDidUpdate(t){!t.shouldPause&&this.props.shouldPause&&Se.isPlaying&&(this.player?.pause(),Se.isPlaying=!1)}componentWillUnmount(){si(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}),Se.addChangeListener(this.handlePlayerChange))};handlePlayerPlay=()=>{const{id:t}=this.props;Se.isPlaying&&Se.playerId!==t&&(Se.isPlaying=!1),Se.playerId=t,Se.isPlaying=!0};handlePlayerUpdate=t=>{this.props.progressChanged?.({done:t.seconds/t.duration*100})};handlePlayerChange=()=>{const{id:t}=this.props;Se.playerId===t&&(Se.isPlaying?this.player.play():this.player.pause())};setupPlayer=()=>{this.refIframePlayer.current?.contentWindow!=null&&(this.player!=null&&this.teardownPlayer(),this.player=new(xte()).Player(this.refIframePlayer.current),this.player.on("ready",this.handlePlayerReady))};teardownPlayer=()=>{Se.isPlaying=!1,Se.removeChangeListener(this.handlePlayerChange),this.player&&(this.player.off("play"),this.player.off("ready"),this.player.off("timeupdate"),delete this.player)};playerSupportsMethods=t=>{const n=s=>this.player.supports("method",s);return yte()(n)(t)};togglePlay=()=>{this.playerSupportsMethods(["play","pause"])&&this.player.on("ready",()=>{this.player.getPaused(t=>{t?this.player.play():this.player.pause()})})};keySeek=t=>{this.playerSupportsMethods(["getCurrentTime","setCurrentTime"])&&this.player.on("ready",()=>{this.player.getCurrentTime(n=>{this.player.setCurrentTime(n+t)})})};changeVolume=t=>{this.playerSupportsMethods(["getVolume","setVolume"])&&this.player.getVolume(n=>{this.player.setVolume(n+t)})};onKeyDown=t=>{const r=Es(this.togglePlay),i=Es(()=>this.keySeek(5)),a=Es(()=>this.keySeek(-5)),c=Es(()=>this.changeVolume(10)),l=Es(()=>this.changeVolume(-10));jn()([[rf,r],[Ko,i],[Wo,a],[$r,c],[Ur,l]])(t)};renderProvider=()=>{const{allowTabNavigation:t,embedId:n,externalLinksDisabled:s,onLinkBlur:r,onLinkFocus:i,onLinkMouseEnter:a,onLinkMouseLeave:c,showMetaData:l,data:d}=this.props,{providerUrl:h,provider:m,favicon:f}=d;if(!(l&&h))return null;const p=o0(Bn(h)),g=s&&Xn(p),v=`${n}-provider`,x=g?"":void 0,b=g?void 0:p,y=g?void 0:"noopener noreferrer",T=g?"button":void 0,S=g?void 0:"_blank";return(0,o.jsx)("h2",{className:"embed__provider",children:(0,o.jsxs)("a",{"aria-describedby":g?Ls(v):void 0,className:"brand--hoverColor","data-external":x,href:b,id:g?v:void 0,onBlur:g?()=>r?.(v):void 0,onFocus:g?()=>i?.(v):void 0,onMouseEnter:g?()=>a?.(v):void 0,onMouseLeave:g?()=>c?.(v):void 0,rel:y,role:T,style:g?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:S,children:[(0,o.jsx)(Ln,{alt:f?m:"",className:"embed__providerIcon",src:f}),(0,o.jsx)("span",{className:"embed__providerName",children:m})]})})};renderMetaData=()=>{const{allowTabNavigation:t,data:n,embedId:s,externalLinksDisabled:r,labels:i,onLinkBlur:a,onLinkFocus:c,onLinkMouseEnter:l,onLinkMouseLeave:d,showMetaData:h}=this.props,{src:m,title:f,description:p,provider:g}=n,v=si(n);if(!h&&v!=="link")return null;const x=o0(Bn(m)),b=r&&Xn(x),y=`${s}-metadata-title`,T=`${s}-metadata-readmore`,S=I=>({"aria-describedby":b?Ls(I):void 0,"data-external":b?"":void 0,href:b?void 0:x,id:b?I:void 0,onBlur:b?()=>a?.(I):void 0,onFocus:b?()=>c?.(I):void 0,onMouseEnter:b?()=>l?.(I):void 0,onMouseLeave:b?()=>d?.(I):void 0,rel:b?void 0:"noopener noreferrer nofollow",role:b?"button":void 0,style:b?{display:"inline-block"}:void 0,tabIndex:t?0:-1,target:b?void 0:"_blank"});return(0,o.jsxs)("div",{className:"embed__meta__content",children:[(0,o.jsx)("h2",{className:"embed__title",children:(0,o.jsx)("a",{className:"brand--hoverColor",...S(y),children:(0,o.jsx)(Re,{value:f})})}),(0,o.jsx)(Re,{className:"embed__description",value:p}),(0,o.jsxs)("a",{className:"embed__readMore brand--hoverColor",...S(T),children:[v==="link"?`${i?.embedReadMore} ${g}`:`${i?.embedViewOn} ${g}`,(0,o.jsx)("i",{className:"icon icon-chevron-right"})]})]})};render(){const{allowTabNavigation:t,data:n,embedId:s,externalLinksDisabled:r,isLesson:i,labels:a,onLinkBlur:c,onLinkFocus:l,onLinkMouseEnter:d,onLinkMouseLeave:h,showMetaData:m}=this.props,{useRelativePath:f}=n??{},{description:p,originalUrl:g,src:v,thumbnail:x,title:b}=n,y=si(n);if(y==="iframe"){const T=document.createElement("div");T.innerHTML=ev(v);const S=T.firstChild,I=S&&S.tagName&&S.tagName.toLowerCase()==="iframe";let L=100,E=32;if(this.props.isAuthoring&&f)return(0,o.jsxs)("div",{children:[(0,o.jsx)("h2",{className:"embed__relativeUrl--iframe",children:"Embedded iframe with a relative url"}),(0,o.jsx)("p",{className:"embed__relativeUrl--title",children:b}),(0,o.jsx)("p",{className:"embed__relativeUrl--url",children:g})]});if(I){const A=S.width.match(/%/),j=parseInt(S.width);S.src=Bn(S.src),L=A?700*(j/100):j||16,E=parseInt(S.height)}const k=E/L,N=I?`${k*100}%`:"3rem";let R=null;try{R=new URL(S.src)}catch{}if(R){const{hostname:A}=R,j=A==="typeform.com"||A.endsWith(".typeform.com"),P=A==="forms.office.com";j&&(R.searchParams.append("disable-auto-focus","true"),S.src=R.toString()),P&&(R.searchParams.append("embed","true"),S.src=R.toString())}const M=I?S.outerHTML:"<div>Error: Invalid iframe tag. Please check the iframe source.</div>";return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.embedPlayerGroup,className:"embed",role:"group",children:[f&&(0,o.jsx)("div",{className:"embed__title embed--iframe__title",children:b}),(0,o.jsx)(qte,{paddingBottom:N,ref:this.refIframeContainer,value:M})]})}else if(i){const T=f?v:o0(Bn(v)),S=r&&Xn(T),I=`${s}-lesson-title`,L=`${s}-lesson-url`,E=S?"":void 0,k=S?void 0:T,N=S?void 0:"noopener noreferrer nofollow",R=S?"button":void 0,M=S?void 0:"_blank";if(f){const A={"aria-describedby":S?Ls(I):void 0,"data-external":S?"":void 0,href:T,id:S?I:void 0,onBlur:S?()=>c?.(I):void 0,onFocus:S?()=>l?.(I):void 0,onMouseEnter:S?()=>d?.(I):void 0,onMouseLeave:S?()=>h?.(I):void 0,rel:S?void 0:"noopener noreferrer nofollow",role:S?"button":void 0,tabIndex:t?0:-1,target:S?void 0:"_blank"};return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[(0,o.jsx)("h2",{className:"embed__title",children:(0,o.jsx)("a",{className:"brand--hoverColor",...A,children:(0,o.jsx)(Re,{value:b})})}),["link","photo"].includes(y)?(0,o.jsxs)("a",{"aria-describedby":S?Ls(L):void 0,className:"embed__relativeUrl--url","data-external":E,href:k,id:S?L:void 0,onBlur:S?()=>c?.(L):void 0,onFocus:S?()=>l?.(L):void 0,onMouseEnter:S?()=>d?.(L):void 0,onMouseLeave:S?()=>h?.(L):void 0,rel:N,role:R,tabIndex:t?0:-1,target:M,children:[T,y==="photo"?(0,o.jsx)("div",{className:"embed__relativeUrl--image",children:(0,o.jsx)(Ln,{alt:x?b:"",className:"embed__img",src:T})}):null]}):this.renderEmbedIframe({allowTabNavigation:t,labels:a,src:v,thumbnail:x,title:b,type:y})]})}return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.a11yBlockEmbed,className:"embed embed--link embed--rich",role:"group",children:[this.renderProvider(),["link","photo"].includes(y)?(0,o.jsx)("a",{"aria-describedby":S?Ls(L):void 0,"data-external":E,href:k,id:S?L:void 0,onBlur:S?()=>c?.(L):void 0,onFocus:S?()=>l?.(L):void 0,onMouseEnter:S?()=>d?.(L):void 0,onMouseLeave:S?()=>h?.(L):void 0,rel:N,role:R,tabIndex:t?0:-1,target:M,children:(0,o.jsx)(Ln,{alt:x?b:"",className:"embed__img",src:_S(x)})}):this.renderEmbedIframe({allowTabNavigation:t,labels:a,src:v,thumbnail:x,title:b,type:y}),this.renderMetaData()]})}else if(y==="link"){const T=f?v:Bn(v),S=f||r&&Xn(T),I=`${s}-link-readmore`,L=S?"":void 0,E=S?void 0:T,k=S?void 0:"noopener noreferrer nofollow",N=S?"button":void 0,R=S?void 0:"_blank";return(0,o.jsxs)("div",{"aria-hidden":!t,"aria-label":a?.embedLinkGroup,className:"embed embed--link brand--linkColor",role:"group",children:[(0,o.jsx)(Re,{className:"embed__title",value:b}),(0,o.jsx)(Re,{className:"embed__description",value:p}),(0,o.jsx)("a",{"aria-describedby":r&&S?Ls(I):void 0,className:"embed__readMore brand--hoverColor","data-external":L,href:E,id:S?I:void 0,onBlur:S?()=>c?.(I):void 0,onFocus:S?()=>l?.(I):void 0,onMouseEnter:S?()=>d?.(I):void 0,onMouseLeave:S?()=>h?.(I):void 0,rel:k,role:N,target:R,children:a?.embedReadMore})]})}else return(0,o.jsxs)("div",{className:"embed embed--media",children:[m?(0,o.jsx)(Re,{"aria-hidden":!t,className:"embed__title",value:b}):null,this.renderEmbedIframe({allowTabNavigation:t,labels:a,src:v,thumbnail:x,title:b,type:y})]})}renderEmbedIframe=t=>{const{allowTabNavigation:n,labels:s,src:r,thumbnail:i,title:a,type:c}=t,{useRelativePath:l}=this.props.data??{};if(c==="photo")return(0,o.jsx)("figure",{className:"embed__media-wrap embed__media-wrap--photo",children:(0,o.jsx)(ia,{allowTabNavigation:n,labels:s,src:_S(i)})});{const d=co.isIe11||co.isEdge,h=X()("embed__media-wrap",{"embed__media-wrap--ms_browser":d});return(0,o.jsxs)("figure",{"aria-hidden":!n,"aria-label":s?.embedPlayerGroup,className:h,onKeyDown:this.onKeyDown,ref:this.refIframeContainer,tabIndex:n?0:-1,children:[(0,o.jsx)("meta",{content:"origin",name:"referrer"}),(0,o.jsx)("iframe",{allowFullScreen:!0,className:"embed__media",frameBorder:"0",inert:n?void 0:!0,loading:"lazy",onLoad:this.setupPlayer,ref:this.refIframePlayer,scrolling:l?"yes":"no",src:l?r:Yte(r),title:a})]})}}}const VS=e=>{const t=Id(),n=Ve(),s=e.externalLinksDisabled??(n&&"externalLinksDisabled"in n?n.externalLinksDisabled:!1),{handleMouseEnter:r,handleMouseLeave:i,handleFocus:a,handleBlur:c}=mu(),[l,d]=oi.useState([]),h=oi.useId();return oi.useEffect(()=>{if(!s||!e.data){d([]);return}const m=[],{providerUrl:f,src:p,useRelativePath:g}=e.data,v=si(e.data);e.isLesson&&p&&Xn(Bn(p))&&(m.push(`${h}-lesson-title`),["link","photo"].includes(v)&&m.push(`${h}-lesson-url`),v!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),f&&Xn(Bn(f))&&m.push(`${h}-provider`)),!e.isLesson&&e.showMetaData&&f&&Xn(Bn(f))&&m.push(`${h}-provider`),!e.isLesson&&e.showMetaData&&p&&Xn(Bn(p))&&v!=="iframe"&&(m.push(`${h}-metadata-title`),m.push(`${h}-metadata-readmore`)),v==="link"&&(g||p&&Xn(Bn(p)))&&m.push(`${h}-link-readmore`),d(m)},[s,e.data,e.showMetaData,e.isLesson,h]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Xte,{...e,embedId:h,externalLinksDisabled:s,isAuthoring:t,onLinkBlur:c,onLinkFocus:a,onLinkMouseEnter:r,onLinkMouseLeave:i}),l.map(m=>(0,o.jsx)(fu,{anchorId:m},m))]})};var Jte=C(63074);const ene={hovered:null,setHovered:mn},Ig=(0,u.createContext)(null);function tne({children:e}){const t=(0,u.useContext)(Ig),[n,s]=(0,u.useState)(null),r=(0,u.useMemo)(()=>({hovered:n,setHovered:s}),[n]);return t!=null?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(Ig.Provider,{value:r,children:e})}const nne=()=>(0,u.useContext)(Ig)??ene,sne=.001,one=(e,t,n,s)=>e==null||e.kind!==t||Math.abs(e.time-n)>=sne?!1:e.kind!=="checkpoint"?!0:s==null||e.markerId===s,zS=V("video-seek-bar-overlay"),Tg=e=>Math.max(0,Math.min(100,e)),$S=e=>{const t=typeof e=="number"?e:Number(e);return Number.isFinite(t)?Math.max(0,t):null},rne=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=e.map(s=>{const r=$S(s.time);return r==null||r>=t?null:{chapter:s,startTime:r}}).filter(s=>s!=null).sort((s,r)=>s.startTime-r.startTime);return n.map((s,r)=>{const i=n[r+1],a=i!=null?i.startTime:t;return a<=s.startTime?null:{chapter:s.chapter,endTime:a,leftPercent:Tg(s.startTime/t*100),startTime:s.startTime,widthPercent:Tg((a-s.startTime)/t*100)}}).filter(s=>s!=null)},ine=(e,t)=>{if(!Number.isFinite(t)||t<=0)return[];const n=new Set;return e.forEach(s=>{const r=$S(s);r==null||r>=t||n.add(r)}),[...n].sort((s,r)=>s-r).map(s=>({leftPercent:Tg(s/t*100),time:s}))};function ane({chapters:e,checkpointTimesSeconds:t,durationSeconds:n}){const s=u.useMemo(()=>rne(e,n),[e,n]),r=u.useMemo(()=>ine(t,n),[t,n]),{hovered:i}=nne(),a=u.useMemo(()=>{const c=s.filter(d=>d.leftPercent>0).map(d=>({kind:"chapter",element:"chapter",time:d.startTime,leftPercent:d.leftPercent,key:`chapter-${d.startTime}-${d.chapter.title}`})),l=r.map(d=>({kind:"checkpoint",element:"marker",time:d.time,leftPercent:d.leftPercent,key:`checkpoint-${d.time}`}));return[...c,...l].sort((d,h)=>d.time-h.time||(d.kind===h.kind?0:d.kind==="chapter"?-1:1))},[s,r]);return a.length===0?null:(0,o.jsx)("div",{"aria-hidden":"true",className:zS("markers"),children:a.map(c=>(0,o.jsx)("span",{className:zS(c.element,{hovered:one(i,c.kind,c.time)}),style:{left:`${c.leftPercent}%`}},c.key))})}const cne=()=>{const e=ki();return jm(e)},US=(e,t)=>e in t?"Articulate":e.length===2?"ISO-639-1":e.length===3?"ISO-639-3":null,lne=e=>Object.entries(e).reduce((t,[,n])=>(n.ISO639_1&&(t.iso1Map[n.ISO639_1]=t.iso1Map[n.ISO639_1]||[],t.iso1Map[n.ISO639_1].push(n)),n.ISO639_3&&(t.iso3Map[n.ISO639_3]=t.iso3Map[n.ISO639_3]||[],t.iso3Map[n.ISO639_3].push(n)),t),{iso1Map:{},iso3Map:{}}),dne=(e,t,n)=>{let s=e,r="",i=n??US(e,t);return!i&&e.includes("-")&&([s,r]=e.split("-"),i=US(s,t),i&&(e=s)),{languageCode:s,code:e,regionCode:r,standard:i??"Articulate"}},Kc=(e,t,n={})=>{const{code:s,standard:r}=dne(e.toLowerCase(),t,n.standard),{location:i,script:a,variant:c}=n;if(r!=="Articulate"){const{iso1Map:l,iso3Map:d}=lne(t),h=r==="ISO-639-1"?l[s]??null:d[s]??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,p=i&&"location"in m&&m.location?m.location.toLocaleLowerCase()===i.toLocaleLowerCase():!1,g=a&&"script"in m&&m.script?m.script.toLocaleLowerCase()===a.toLocaleLowerCase():!1;return f||p||g})||h[0]||null:null}return t[s]??null},y3e=(e,t,n={})=>Kc(e,t,{standard:"Articulate",...n})?.ISO639_1||null,S3e=(e,t,n={})=>Kc(e,t,{standard:"Articulate",...n})?.ISO639_3||null,I3e=(e,t,n={})=>Kc(e,t,{standard:"ISO-639-1",...n})?.code||null,T3e=(e,t,n={})=>Kc(e,t,{standard:"ISO-639-3",...n})?.code||null,GS=e=>!!(e&&"video"in e&&e.video&&"key"in e.video&&e.video.key),WS=e=>!!(e&&"customVideo"in e&&e.customVideo&&"src"in e.customVideo&&e.customVideo.src),KS=e=>!!(e&&"customVideo"in e&&e.customVideo&&"key"in e.customVideo&&e.customVideo.key),une=(e,t)=>{const n=GS(e)&&GS(t)&&e.video.key===t.video.key,s=WS(e)&&WS(t)&&e.customVideo.src===t.customVideo.src,r=KS(e)&&KS(t)&&e.customVideo.key===t.customVideo.key;return n||s||r},hne=e=>!!(e&&"video"in e&&e.video&&"captions"in e.video&&e.video.captions?.length),mne=e=>{const t=Hn(),{currentLocale:n}=at(),s=Oe(e,t),r=Oe(e,n),i=cne();return(0,u.useMemo)(()=>{if(!!(n&&n!==t)&&i&&une(s,r)&&hne(r))return r.video.captions.find(l=>Kc(l.code,i)?.code===n)?.id},[t,n,s,r,i])},fne=2,pne=0,gne=()=>({previousTime:0,triggeredTimes:new Set}),vne=(e,t,n)=>{const{previousTime:s}=n;t>s+fne&&e.filter(i=>i<=t).forEach(i=>n.triggeredTimes.add(i)),t<s-pne&&(n.triggeredTimes=new Set(e.filter(i=>i<=t))),n.previousTime=t;const r=e.find(i=>t>=i&&!n.triggeredTimes.has(i));return r==null?null:(n.triggeredTimes.add(r),r)};function Cne({checkpointTimesSeconds:e,isLoaded:t,getMediaElement:n,onCheckpointReached:s}){const r=(0,u.useRef)(s);r.current=s;const i=(0,u.useMemo)(()=>Array.from(new Set(e)).sort((a,c)=>a-c),[e]);(0,u.useEffect)(()=>{if(!t||i.length===0)return;const a=n();if(a==null)return;const c=gne(),l=a.currentTime;c.previousTime=l,i.filter(p=>p<=l&&!(p===0&&l===0)).forEach(p=>c.triggeredTimes.add(p));let d=0;const h=()=>{const p=vne(i,a.currentTime,c);p!=null&&r.current?.(p),d=requestAnimationFrame(h)},m=()=>{d===0&&(d=requestAnimationFrame(h))},f=()=>{d!==0&&(cancelAnimationFrame(d),d=0)};return a.addEventListener("play",m),a.addEventListener("playing",m),a.addEventListener("pause",f),a.addEventListener("ended",f),a.paused||m(),()=>{f(),a.removeEventListener("play",m),a.removeEventListener("playing",m),a.removeEventListener("pause",f),a.removeEventListener("ended",f)}},[n,t,i])}function QS(e){return Number.isFinite(e)&&e>0?e:0}function Lg({allowTabNavigation:e=!0,audioVideoPlayhead:t,canAdjustPlaybackSpeed:n,canRestrictSeek:s,captions:r,chapters:i=[],checkpointTimesSeconds:a=[],cornerRadius:c,disableDownload:l=!1,id:d,media:h,onCheckpointReached:m,onLoad:f,poster:p,progressChanged:g,recordMediaPlayheadPosition:v,ref:x,shouldPause:b,src:y,style:T,subtitle:S,type:I}){const L=u.useRef(null),[E,k]=u.useState(0),N=u.useCallback(ne=>{L.current=ne,typeof x=="function"?x(ne):x&&(x.current=ne)},[x]),R=(0,ze.A)(b),M=Id(),A=Kt(),j=vf(),P=mne(h),w=I==="customVideo",D=u.useCallback(()=>L.current?.containerElement?.querySelector("video")??null,[]),O=u.useCallback(ne=>{sv(),k(QS(ne.duration)),g?.(ne)},[g]),B=u.useCallback(ne=>{v?.(ne)},[v]),H=u.useCallback(()=>{Se.playerId=d,Se.isPlaying=!0},[d]),_=u.useCallback(()=>{Se.playerId===d&&(Se.isPlaying=!1)},[d]),[$,z]=u.useState(!1),K=u.useRef(!1),J=u.useCallback(()=>{z(!0);const ne=L.current;if(ne){const{duration:ae}=ne.getProgress();k(QS(ae)),f?.({player:ne})}},[f]);Cne({checkpointTimesSeconds:a,isLoaded:$,getMediaElement:D,onCheckpointReached:m}),u.useEffect(()=>{K.current||$&&(t!=null&&t>0&&L.current?.seekToPercent(t),K.current=!0)},[$,t]),u.useEffect(()=>{!R&&b&&L.current?.pause()},[R,b]),u.useEffect(()=>{const ne=()=>{(!Se.isPlaying||Se.playerId!==d)&&L.current?.pause()};return Se.addChangeListener(ne),()=>{Se.removeChangeListener(ne)}},[d]);const Y=u.useMemo(()=>{const ne=typeof c=="number"||typeof c=="string"?{"--ov-corner-radius":`${Number(c)}px`}:void 0;if(!(ne==null&&T==null))return{...ne,...T}},[c,T]),G=p==null?void 0:w?p:yt(p),F=$&&E>0&&(i.length>0||a.length>0),U=`${w?y:yt(y)}?v=1`,Q=w?"application/x-mpegURL":void 0,Z=u.useMemo(()=>[{src:U,type:Q??"video/mp4"}],[U,Q]),q=u.useMemo(()=>{const ne=[];if(r==null&&S&&ne.push({kind:"captions",label:"English",src:w?S:yt(S),srcLang:"en"}),r!=null)for(const ae of r){const ue=ae.url||(ae.key!=null?yt(ae.key):void 0);ue&&ne.push({default:ae.id===P?!0:void 0,kind:"captions",label:ae.name||j?.(ae.code)||ae.code,src:ue,srcLang:ae.code})}return ne},[r,S,w,j,P]);return(0,o.jsx)(Jte.L,{crossOrigin:co.isLocalFilesystem?void 0:"anonymous",enableDownload:M&&!l,enablePlaybackSpeed:n??void 0,enableSeek:s==null?void 0:!s,inert:!e,labelBackToMoreOptions:A?.a11yMediaMoreOptionsBack,labelCaptions:A?.a11yMediaCaptions,labelCaptionsOff:A?.a11yMediaCaptionsOff,labelContainer:A?.a11yGroupVideoPlayer??"Video player",labelCurrentTime:A?.a11yMediaCurrentTime,labelDownload:A?.a11yMediaDownload,labelDuration:A?.a11yMediaDuration,labelError:A?.a11yMediaErrorVideo,labelExitFullscreen:A?.a11yMediaExitFullscreen,labelExitPictureInPicture:A?.a11yMediaExitPictureInPicture,labelFullscreen:A?.a11yMediaFullscreen,labelMoreOptions:A?.a11yMediaMoreOptions,labelMute:A?.a11yMediaMute,labelPause:A?.a11yMediaPause,labelPictureInPicture:A?.a11yMediaPictureInPicture,labelPlay:A?.a11yMediaPlay,labelPlaybackRate:A?.a11yMediaPlaybackRate,labelPlaybackRateNormal:A?.a11yMediaPlaybackRateNormal,labelPlayVideo:A?.a11yMediaPlayVideo,labelReplay:A?.a11yMediaReplay,labelSeek:A?.a11yMediaSeek,labelSeekDisabled:A?.a11yMediaSeekDisabled,labelUnmute:A?.a11yMediaUnmute,labelVolume:A?.a11yMediaVolume,onPause:_,onPlay:H,onPlayheadSave:B,onReady:J,onTimeUpdate:O,poster:G,ref:N,seekOverlay:F?(0,o.jsx)(ane,{chapters:i,checkpointTimesSeconds:a,durationSeconds:E}):null,sources:Z,style:Y,timeUpdateInterval:1e3,tracks:q})}var xne=C(52329),ZS=C.n(xne),bne=C(49508),yne=C.n(bne);const Sne=e=>({...e,courseId:e.courseId||Vo()(["course","id"],e)}),Ine=e=>({...e,lessonId:e.lessonId||Vo()(["lesson","id"],e)}),Tne=({id:e,courseId:t,lessonId:n,refs:s})=>e||(s&&n?`${n}-${s}`:n||t),Eg=Ue()(Tne,Ine,Sne),L3e=Ut()(Ma()(st()("id"),ZS()("id",Eg)),Ro()(yne()(st(),[st()("id"),st()("uploads")]),jo()(["id"])),ZS()("isUploading",dt()("status","uploading")));function E3e(e){const t=e.match(/^(.*\/)?([^/]+)$/);if(!t)return encodeURIComponent(e);const n=t[1]??"",s=t[2],r=encodeURIComponent(s);return`${n}${r}`}function Lne(e){return e.replace(/%2F/g,"/")}var Ene=C(49860);const kg=e=>!!(e&&("key"in e&&e.key||"src"in e&&e.src)),r0=e=>kg(e)&&!e.isProcessing&&!e.error,kne=(e,t)=>t?.mediaType==="audio"?!!e&&(kg(e)||AS(t)||jS(t)&&!kg(e)):r0(e),Nne=e=>yr()(Fe()(!!e),Nee()(`-${e}`));class wne extends Ene.Component{constructor(t){super(t),this.onTranscriptClick=this.onTranscriptClick.bind(this)}static get defaultProps(){return{defaultAlign:"left",media:{},index:"1",hasPadding:!0,opts:{},allowTabNavigation:!0,lessonNumber:1,getL10nValue:()=>{}}}onTranscriptClick(){const{block:t,blockId:n,openTranscript:s,refs:r}=this.props,i=t?.items?.length===1?t.items[0]:void 0,a=this.props.item??i;let c=n;try{t!=null&&typeof t=="object"&&!Array.isArray(t)?"blockId"in t?c=t.blockId:"id"in t&&(c=t.id):t?.id&&(c=t.id)}catch{c=n}let l="";try{a!=null&&typeof a=="object"&&!Array.isArray(a)&&"id"in a&&(l=String(a.id))}catch{l=""}const d=r??`items:${c||""}/items:${l}`;if((t||n)&&a&&s)return s({blockId:t?.id??n,item:a,refs:d})}renderAudio(t,n){const{activeIndex:s,allowTabNavigation:r,block:i,blockId:a,getL10nValue:c,index:l,isOverlayAudio:d,item:h,itemIndex:m,labels:f,lessonNumber:p,shouldPause:g,side:v}=this.props,{audio:x}=c(t),b=i&&typeof i=="object"&&"blockId"in i?i.blockId:i?.id||a||"",y=h&&typeof h=="object"&&"id"in h?h.id:"",T=this.props.refs??`items:${b}/items:${y}`,S=`audio-${p}-${l}`;return(0,o.jsx)(BS,{activeIndex:s,allowTabNavigation:r,id:S,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:T,shouldPause:x.pause||g,side:v,transcriptMedia:t,uploadId:n,volumeSliderPosition:this.props.volumeSliderPosition},S)}renderImage(t){const{allowTabNavigation:n,cornerRadius:s,defaultAlign:r,imageMaxHeight:i,index:a,labels:c,onLoad:l,opts:d}=this.props,h=t?.align??r,m=t?.dimensions,f=`image-${a}`,{disableZoom:p}=d??{};return(0,o.jsx)(ia,{align:h,allowTabNavigation:n,alt:t?.alt,cornerRadius:s,disableZoom:p,height:m?.height||m?.originalHeight,labels:c,link:t?.link,maxHeight:i,onLoad:l,shouldFillWidth:t?.fillWidth,src:pt(t),width:m?.width||m?.originalWidth},f)}renderVideo(t,n){const{allowTabNavigation:s,blockId:r,lessonNumber:i,index:a,enableVideoPlaybackSpeed:c,shouldPause:l}=this.props,d=t.skipProcess?Lne(t.poster):t.poster,h=Nne(r)(`video-${i}-${a}-${d||""}`);return(0,o.jsx)(Lg,{allowTabNavigation:s,canAdjustPlaybackSpeed:c,captions:t.captions,id:h,media:n,poster:d,shouldPause:t.pause||l,src:t.key},h)}renderPlaceholder(t){const{blockId:n,item:s,renderVideoPlaceholder:r}=this.props,i=s&&"id"in s?s.id:void 0;return!r||n==null||i==null?null:r({blockId:n,itemId:i,video:t})}renderEmbed(t){const{allowTabNavigation:n,embedClass:s,labels:r,opts:i,shouldPause:a}=this.props,{fullEmbed:c,showMetaData:l=!0}=i,d=`embed-${this.props.index}`;return(0,o.jsx)("div",{className:s,children:(0,o.jsx)(VS,{allowTabNavigation:n,data:t,id:d,isLesson:c,labels:r,shouldPause:t.pause||a,showMetaData:l},d)})}render(){const{blockId:t,hasPadding:n,item:s,lessonId:r,mediaType:i}=this.props,a=s&&typeof s=="object"&&"id"in s?s.id:"",c=this.props.refs??`items:${t??""}/items:${a}`,l=this.props.media,d=X()({"media-group":n}),{audio:h,embed:m,image:f,video:p}=this.props.getL10nValue(l)??{},g=Eg({lessonId:r,refs:c}),v=this.props.getUpload?this.props.getUpload(g):null;return(0,o.jsxs)("div",{className:d,"data-l10n-id":Ot(l),children:[(!i||i==="image")&&r0(f)&&this.renderImage(f),(!i||i==="audio")&&kne(h,v)&&this.renderAudio(l,g),(!i||i==="video")&&!!p&&(r0(p)?this.renderVideo(p,l):this.renderPlaceholder(p)),(!i||i==="embed")&&r0(m)&&this.renderEmbed(m)]})}}const ln=ate(Wu(i5(vt(wne)))),jne=V("flashcard"),Ane="block-search-current",Rne="flashcard-side--front",YS="flashcard-side--back",Pne=60,Mne=8;class One extends u.PureComponent{static defaultProps={allowTabNavigation:!0,backType:"description",forceFlipped:!1,frontType:"description",getL10nValue:()=>{},onFlip:Function.prototype,onStep:Function.prototype,settingShowHint:!0};state={areSidesReady:!0,flipped:!1,hasFlippedOnce:!1,isMounted:!1,suppressFlipFocus:!1};cardRef=(0,u.createRef)();revealSettleTimer=void 0;render(){const{cardRef:t,handleFlip:n,handleSideReady:s,handleTouchEnd:r,props:{activeIndex:i,allowTabNavigation:a,backDescription:c,backMedia:l,backType:d,block:h,forceFlipped:m,frontDescription:f,frontMedia:p,frontType:g,id:v,index:x,isHidden:b,labels:y,lessonId:T,prefersKeyboardNavigation:S,settingShowHint:I,size:L,type:E,wrapElement:k,wrapRole:N},state:{areSidesReady:R,flipped:M,isMounted:A,suppressFlipFocus:j}}=this,P=m||M,w=jne({large:L==="large",small:L==="small",flipped:P,stack:E==="stack"});return(0,o.jsxs)(k,{"aria-hidden":!a,className:w,onClick:n,onTouchEnd:r,ref:t,role:N,children:[(0,o.jsx)(sn,{activeIndex:i,allowTabNavigation:a,blockId:h?.id,blockType:E,description:f,index:x,isActiveSide:!P,isAriaHidden:P&&A&&R,isFlipped:P,isHidden:b,itemId:v,labels:y,lessonId:T,media:p,onFlip:n,onReady:s,prefersKeyboardNavigation:S,settingShowHint:I,side:"front",size:L,suppressFlipFocus:j,tag:XS,type:g}),(0,o.jsx)(sn,{activeIndex:i,allowTabNavigation:a,blockId:h?.id,blockType:E,description:c,index:x,isActiveSide:P,isAriaHidden:!P&&A&&R,isFlipped:P,isHidden:b,itemId:v,labels:y,lessonId:T,media:l,onFlip:n,onReady:s,prefersKeyboardNavigation:S,settingShowHint:I,side:"back",size:L,suppressFlipFocus:j,tag:Bne,type:d})]})}componentDidMount(){this.setState({isMounted:!0}),window.addEventListener(Je,this.handleNavEvent),window.addEventListener(qo,this.handleRevealItem)}componentDidUpdate(t,n){const{props:{allowTabNavigation:s,id:r,onStep:i},state:{hasFlippedOnce:a}}=this;!n.hasFlippedOnce&&a&&i({id:r}),t.allowTabNavigation&&!s&&this.setState({flipped:!1})}componentWillUnmount(){this.clearRevealSettle(),window.removeEventListener(Je,this.handleNavEvent),window.removeEventListener(qo,this.handleRevealItem)}handleNavEvent=t=>{const{path:n}=t.detail,{cardId:s}=zi(n,["block","card"]);if(s===this.props.id){let r=!1;n.includes("back")&&(r=!0),this.setState({flipped:r},()=>{this.props.type!=="stack"&&!du(this.cardRef.current,"center")&&this.cardRef.current.scrollIntoView({behavior:"instant",block:"center"})})}};handleRevealItem=t=>{const{blockId:n,itemId:s}=t.detail;n!==this.props.blockId||!En(s,this.props.id)||(this.clearRevealSettle(),this.tryRevealFlip(0))};tryRevealFlip=t=>{const n=this.getActiveHighlightSide();if(n!=null){this.setState({areSidesReady:!0,flipped:n==="back",suppressFlipFocus:!0},()=>{this.setState({suppressFlipFocus:!1})});return}t>=Mne||(this.revealSettleTimer=setTimeout(()=>{this.tryRevealFlip(t+1)},Pne))};clearRevealSettle=()=>{clearTimeout(this.revealSettleTimer),this.revealSettleTimer=void 0};getActiveHighlightSide=()=>{const t=this.cardRef.current;if(t==null||typeof CSS>"u"||!("highlights"in CSS))return;const n=CSS.highlights.get(Ane);if(n!=null)for(const s of n){const{startContainer:r}=s,a=(r instanceof Element?r:r.parentElement)?.closest(`.${YS}, .${Rne}`);if(a!=null&&t.contains(a))return a.classList.contains(YS)?"back":"front"}};handleFlip=t=>{const{block:n,index:s}=this.props,r=window.getSelection(),i=r.toString()&&this.cardRef.current?.contains(r.anchorNode);if(t.detail>1&&r.empty(),t&&t.target.closest("a")||i)return;const a=!this.state.flipped;this.setState({areSidesReady:!1,flipped:a,hasFlippedOnce:!0});const c=a?"back":"front",l=n?.items?.[s],d=l?.[c]?.media,h=`items:${n?.id}/items:${l?.id}/${c}`;this.props.onTranscriptUpdate?.({audioPlayerId:ks({refs:h}),transcriptMedia:d}),this.props.onFlip?.(this.props.index,a)};handleTouchEnd=t=>{t.stopPropagation()};handleSideReady=()=>{this.setState({areSidesReady:!0})}}const qS=Wu(vt(One)),aa=V("flashcard-side"),i0=V("flashcard-side-flip");class ri extends u.PureComponent{static descriptionActionTypes={INITIAL:"INITIAL",INSERTING:"INSERTING",DELETING:"DELETING"};static initialState={descriptionAction:ri.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,bh.uniqueId)("flashcard-side")}state=ri.initialState;longBottomObserver=void 0;readyTimeout=void 0;refDescription=(0,u.createRef)();refDescriptionBottom=(0,u.createRef)();refSide=(0,u.createRef)();refBtnTimeoutMouseLeave=(0,u.createRef)();checkDescriptionSizeDebounced;handleMouseEnterAudio=()=>{const{itemId:t,index:n,settingShowHint:s,side:r}=this.props,i=document.getElementById(`${t}-${n}-${r}-flip-btn`);i&&s&&(i.style.opacity="0.6")};handleMouseLeaveAudio=()=>{const{itemId:t,index:n,settingShowHint:s,side:r}=this.props,i=document.getElementById(`${t}-${n}-${r}-flip-btn`);i&&s&&(i.style.opacity="1")};render(){const{props:{activeIndex:t,allowTabNavigation:n,block:s,className:r,description:i,getL10nValue:a,index:c,itemId:l,media:d,isActiveSide:h,isAriaHidden:m,isFlipped:f,labels:p,lessonId:g,onFlip:v,prefersKeyboardNavigation:x,settingShowHint:b,side:y,size:T,style:S,type:I},refDescription:L,refDescriptionBottom:E,refSide:k,state:{isAtLongOverflowBottom:N,isLong:R,isLongOverflow:M,isTooltipVisible:A,scrollbarWidthOffset:j}}=this,P=y==="front",w=y==="back",D=T==="small",O=T==="large",B=I==="description",H=I==="fullimage",_=I==="image",$=P?p?.a11yBlockFlashcardFront:p?.a11yBlockFlashcardBack,z=`items:${s?.id}/items:${l}/${P?"front":"back"}`,K=aa({back:w,flipped:f,front:P,fullimage:H}).mix(r),{image:J,audio:Y}=a(d)??{},G=aa("content",{small:D,large:O,front:P,fullimage:H,image:_,"long-overflow":M,"long-overflow-bottom":N,"has-audio":!!Y}),F=i0({"audio-expansion":!0}),U=i0("btn",{"visually-hidden":!b,"prefers-keyboard":x,round:!0}),Q=i0("icon"),Z=i0("tooltip",{visible:A}),q=aa("img",{small:D,large:O,centered:_,full:H}),te=aa("description",{"has-audio":!!Y,long:R&&!M,"long-overflow":M,short:!R,large:O}),ne=aa("description-bottom"),ae=j==null?void 0:{right:j},ue=J?.alt??`Image ${c+1}`,Te=pt(J),we=`${this.id}-click-to-flip-text`,W=`${this.id}-image`,ie=`${this.id}-description`;return(0,o.jsxs)("div",{"aria-label":$,className:K,inert:m,ref:k,role:"group",style:S,tabIndex:-1,children:[(0,o.jsxs)("div",{className:G,children:[(0,o.jsxs)("div",{className:F,onMouseEnter:this.handleBtnMouseEnter,onMouseLeave:this.handleBtnMouseLeave,style:ae,children:[(0,o.jsx)("button",{"aria-labelledby":`${we} ${ie} ${W}`,className:U,id:`${l}-${c}-${y}-flip-btn`,onBlur:this.handleBtnBlur,onClick:v,onFocus:this.handleBtnFocus,tabIndex:n&&h?0:-1,type:"button",children:(0,o.jsx)(kW,{className:Q})}),(0,o.jsx)("div",{"aria-hidden":"true",className:Z,id:we,onClick:Jo,children:p?.blocksClickToFlip})]}),(H||_)&&(0,o.jsx)(Dne,{alt:ue,className:q,imageId:W,l10nId:Ot(d),url:Te}),B&&(0,o.jsxs)("div",{className:te,ref:L,tabIndex:h&&M?0:void 0,children:[(0,o.jsx)(Re,{allowTabNavigation:n&&!m,id:ie,value:i}),M&&(0,o.jsx)("div",{className:ne,ref:E})]})]}),Y&&(0,o.jsx)("div",{className:aa("audio-player",{text:B,image:_}),onMouseEnter:this.handleMouseEnterAudio,onMouseLeave:this.handleMouseLeaveAudio,children:(0,o.jsx)(ln,{activeIndex:t,blockId:s.id,index:`${l}-${c}-${y}`,isOverlayAudio:H,item:{id:l,media:d},itemIndex:c,labels:p,lessonId:g,media:d,mediaType:"audio",refs:z,shouldPause:!h,side:y})})]})}componentDidMount(){this.checkDescriptionSize(this.props),this.checkDescriptionSizeDebounced=Yu()(this.checkDescriptionSize,250),window.addEventListener("resize",this.checkDescriptionSizeDebounced),document.addEventListener("keydown",this.handleDocumentKeyDown)}componentWillUnmount(){clearTimeout(this.readyTimeout),this.cleanupLongBottomObserver(),window.removeEventListener("resize",this.checkDescriptionSizeDebounced),document.removeEventListener("keydown",this.handleDocumentKeyDown)}componentDidUpdate(t,n){const{props:{allowTabNavigation:s,blockType:r,isFlipped:i,isActiveSide:a,isHidden:c,onReady:l,suppressFlipFocus:d,type:h}}=this;t.isHidden&&!c&&this.checkDescriptionSize(this.props),t.isFlipped!==i&&(a&&s&&!d?(this.refSide.current?.focus?.(),this.readyTimeout=setTimeout(()=>{l()},700)):clearTimeout(this.readyTimeout)),h==="description"&&this.handleUpdatesDescription(t,n),r==="stack"&&a&&!t.allowTabNavigation&&s&&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=>{cn(t)&&this.state.isTooltipVisible&&this.setState({isTooltipVisible:!1})};handleUpdatesDescription=(t,n)=>{const{props:{isFlipped:s,isActiveSide:r},state:{isLongOverflow:i}}=this;t.isFlipped!==s&&r&&this.scrollDescriptionToTop(),this.handleUpdatesDescriptionSize(t,n),!n.isLongOverflow&&i?(this.setLongBottomObserver(),this.setScrollbarWidth()):n.isLongOverflow&&!i&&this.cleanupLongBottomObserver()};handleUpdatesDescriptionSize=(t,n)=>{const{INSERTING:s,DELETING:r}=ri.descriptionActionTypes,{props:{description:i,size:a,type:c,getL10nValue:l},state:{descriptionAction:d,isLong:h,isLongOverflow:m}}=this,f=l(i)?.length||0,p=l(t.description)?.length||0;d!==s&&f>p?this.setState({descriptionAction:s}):d!==r&&f<p?this.setState({descriptionAction:r}):(d!==n.descriptionAction||h!==n.isLong||m!==n.isLongOverflow||a!==t.size||c!==t.type||f!==p)&&this.checkDescriptionSize(t)};checkDescriptionSize=t=>{const{DELETING:n}=ri.descriptionActionTypes,{props:{size:s},refDescription:{current:r},state:{descriptionAction:i,isLong:a,isLongOverflow:c}}=this;if(!r)return;r&&r.scrollHeight>r.clientHeight?a&&!c?this.setState({isLongOverflow:!0}):!a&&!c&&this.setState({isLong:!0}):(i===n||s!==t.size)&&this.setState(ri.initialState)};scrollDescriptionToTop=()=>{const t=this.refDescription.current;this.state.isLong&&t&&(t.scrollTop=0)};setLongBottomObserver=()=>{const t=this.refDescriptionBottom.current;if(t&&this.longBottomObserver==null){const n=s=>{const r=s?.[0]?.isIntersecting??!1;this.setState({isAtLongOverflowBottom:!r})};this.longBottomObserver=new IntersectionObserver(n,{threshold:[0,1]}),this.longBottomObserver.observe(t)}};cleanupLongBottomObserver=()=>{this.longBottomObserver?.disconnect?.(),this.longBottomObserver=void 0};setScrollbarWidth=()=>{const t=this.refDescription.current;if(t){const n=t.offsetWidth-t.clientWidth;n>0&&this.setState({scrollbarWidthOffset:n})}}}const XS=Wu(vt(e=>(0,o.jsx)(ri,{...e}))),Bne=e=>{const{cardMode:t,customBackgroundColorContrast:n}=vn(),s=Ve()?.theme,r=Ku(),i=Zn(),c=i===re.IMAGE&&r?.overlayColor===xt.LIGHT,l=Rn(),d=s?.accentContrast,h=d===ke.AUTO,m=(0,u.useMemo)(()=>{let p="#fafafa";if(t===Qn.TRANSPARENT)switch(i){case re.DARK:p="#525252";break;case re.BLACK:p="#1a1a1a";break;case re.IMAGE:c?p="rgba(0, 0, 0, 0.7)":p="rgba(255, 255, 255, 0.7)";break;case re.ACCENT:case re.COLOR:case re.TINT:if(l!=null)switch(Bi(l)){case Tt.LIGHT:p=ds(.5,l);break;case Tt.MED:p=Bs(.35,l);break;case Tt.DARK:p=Bs(.65,l);break;case Tt.NEAR_BLACK:p=ds(.1,l);break}}const g={"--color-background":p},v=i===re.COLOR?n:d;if((i===re.ACCENT||i===re.COLOR)&&t===Qn.TRANSPARENT&&h){const x=Qt({backgroundColor:p,contrast:v});g["--color-text"]=x}return g},[l,i,t,n,h,c,d]),f={...e,style:m};return(0,o.jsx)(XS,{...f})},Dne=({alt:e,className:t,imageId:n,l10nId:s,url:r})=>{const i=Mo(e);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Ln,{alt:i,className:t,"data-l10n-id":s,id:n,src:r}),!i&&(0,o.jsx)("span",{className:"visually-hidden-always",children:"No image alternative text"})]})};class Fne extends u.Component{static defaultProps={editable:!1,isRTL:!1,items:[],onStep:()=>{},stack:!1};state={activeIndex:0,flipStateMap:{},prefersKeyboardNavigation:!0};render(){const{blockId:t,animateBlockEntrance:n,initiallyVisible:s,isHidden:r,isLearner:i,items:a,labels:c,lessonId:l,onStep:d,previewType:h,isRTL:m,settings:f,stack:p}=this.props,{activeIndex:g}=this.state,{prefersKeyboardNavigation:v}=this.state,{entranceAnimation:x,showHint:b}=f,y=X()("block-flashcards",{"block-flashcard--column":!p,"block-flashcard--stack":p,"block-flashcards--no-animation":!x}),S=f.flashcardSize==="1"?"small":f.flashcardSize==="2"?"large":a.length>2?"small":"large",I=h===Tr.MOBILE_PORTRAIT||h===Tr.MOBILE_LANDSCAPE;return(0,o.jsx)(De,{className:y,children:p?(0,o.jsx)($e,{animateBlockEntrance:n,initiallyVisible:s,isLearner:i,children:(0,o.jsx)("div",{className:"block-flashcard-carousel",children:(0,o.jsx)(Xu,{blockId:t,items:a,children:({carouselRef:L})=>(0,o.jsx)(qu,{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:L,shouldMouseEmulateTouch:I,shouldUseCounter:!0,shouldUseGoToSlide:!1,children:a.map((E,k)=>(0,o.jsx)(qS,{activeIndex:g,backDescription:E?.back?.description,backMedia:E?.back?.media,backType:E?.back?.type,blockId:t,frontDescription:E?.front?.description,frontMedia:E?.front?.media,frontType:E?.front?.type,id:E?.id,index:k,isHidden:r,labels:c,lessonId:l,onFlip:this.handleFlip.bind(this),onStep:d,prefersKeyboardNavigation:v,settingShowHint:b,size:"large",type:"stack",wrapElement:"div"},E?.id))})})})}):(0,o.jsx)($e,{animateBlockEntrance:n,className:"block-flashcards__animation",initiallyVisible:s,isLearner:i,siblingDelay:.25,children:(0,o.jsx)("ol",{className:"block-flashcards__wrapper",role:"list",children:a.map((L,E)=>(0,o.jsx)(qS,{activeIndex:g,backDescription:L?.back?.description,backMedia:L?.back?.media,backType:L?.back?.type,blockId:t,frontDescription:L?.front?.description,frontMedia:L?.front?.media,frontType:L?.front?.type,id:L?.id,index:E,isHidden:r,labels:c,lessonId:l,onStep:d,prefersKeyboardNavigation:v,settingShowHint:b,size:S,type:"grid",wrapElement:"li",wrapRole:"listitem"},L?.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&&!VB(t)&&this.setState({prefersKeyboardNavigation:!0})};handleMouseDown=()=>{this.state.prefersKeyboardNavigation&&this.setState({prefersKeyboardNavigation:!0})};handleFlip(t,n){this.setState(s=>({flipStateMap:{...s.flipStateMap,[t]:n}}))}handleCarouselChange(t){const{block:n,onTranscriptUpdate:s}=this.props,{flipStateMap:r}=this.state,i=r[t]?"back":"front",a=n.items?.[t],c=a?.[i]?.media,l=`items:${n?.id}/items:${a?.id}/${i}`;s?.({audioPlayerId:ks({refs:l}),transcriptMedia:c}),this.setState({activeIndex:t})}}const JS=pg(vt(Wu(Fne)));var Qc=C(49860);const _ne="div",eI=Qc.createContext(void 0);function Hne({children:e,element:t,...n},s){const[r,i]=Qc.useState(null);return(0,o.jsx)(eI.Provider,{value:r,children:Qc.createElement(t??_ne,{...n,ref:s},e,(0,o.jsx)("div",{ref:i}))})}const Zc=Qc.forwardRef(Hne);function k3e(){return Qc.useContext(eI)}var Vne=C(49860);function tI(e){class t extends Vne.Component{static displayName=`withGalleryCaption(${e.displayName||e.name})`;renderCaptionDelegate;constructor(s){super(s),this.renderCaptionDelegate=this.renderCaption.bind(this)}renderCaption(s,r,i=!0){return(0,o.jsx)(et,{allowTabNavigation:i,className:"block-gallery__caption",value:r})}render(){const{renderCaption:s=this.renderCaptionDelegate}=this.props;return(0,o.jsx)(e,{...this.props,renderCaption:s})}}return t}var a0=C(49860);const nI=V("block-gallery-carousel");function zne({blockId:e,animateBlockEntrance:t,defaultBackgroundColor:n,editable:s,initiallyVisible:r,isLearner:i,labels:a,lessonId:c,items:l,onStep:d,previewType:h,renderCaption:m,settings:f}){l||=[];const[p,g]=a0.useState(0),v=a0.useCallback(T=>{g(T),d?.(l[T])},[l,d]),x=h===Tr.MOBILE_PORTRAIT||h===Tr.MOBILE_LANDSCAPE,b=nI({noAnimation:!f?.entranceAnimation||yn()}).toString(),y=Ld();return(0,o.jsx)(De,{className:b,defaultBackgroundColor:n,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)(Zc,{className:nI("container").toString(),children:(0,o.jsx)(Xu,{blockId:e,items:l,children:({carouselRef:T})=>(0,o.jsx)(qu,{isRTL:y,labelCarousel:a?.a11yBlockImageCarousel,labelCarouselRoleDesc:a?.a11yBlockImageCarouselRoleDescription,labelSlideControls:a?.a11yBlockImageCarouselSlideControls,labelSlideControlsGoToNext:a?.a11yBlockImageCarouselSlideControlsGoToNext,labelSlideControlsGoToPrevious:a?.a11yBlockImageCarouselSlideControlsGoToPrevious,labelSlideControlsGoToSlide:a?.a11yBlockImageCarouselSlideControlsGoToSlide,labelSlideCounterPreposition:a?.blocksPreposition,labelSlidePreposition:a?.a11yBlockImageCarouselSlidePreposition,labelSlideRoleDesc:a?.a11yBlockImageCarouselSlideRoleDescription,onChange:v,ref:T,shouldMouseEmulateTouch:x,children:l.map((S,I)=>(0,o.jsx)(Une,{activeIndex:p,blockId:e,editable:s,index:I,item:S,labels:a,lessonId:c,renderCaption:m,settings:f},S.id))})})})})})}const $ne=tI(zne),Ng=V("block-gallery-carousel-item");function Une({activeIndex:e,blockId:t,editable:n,index:s,item:r,labels:i,lessonId:a,renderCaption:c,settings:l}){const[d,h]=a0.useState(!1),{image:m,audio:f}=Oe(r.media),p=Oe(m?.link?.destination),g=m?.dimensions,v=a0.useCallback(()=>{h(!0)},[]);return(0,o.jsxs)("figure",{className:Ng(),children:[n&&!d&&(0,o.jsx)("div",{className:Ng("loading"),children:"Loading image..."}),(0,o.jsxs)("div",{className:Ng("image-container",{"audio-overlay":!!f}),children:[(0,o.jsx)(ia,{alt:m?.alt,cornerRadius:l?.cornerRadius,disableZoom:!l?.zoomOnClick,height:g?.height||g?.originalHeight,l10nId:Ot(r?.media),labels:i,link:m?.link&&typeof p=="string"?{type:m.link.type,destination:p}:void 0,maxHeight:900,onLoad:v,src:pt(m),width:g?.width||g?.originalWidth}),f&&(0,o.jsx)(ln,{blockId:t,cornerRadius:l?.cornerRadius,index:`${t}-${r.id}-${s}`,isOverlayAudio:!0,item:r,labels:i,lessonId:a,media:r.media,mediaType:"audio",shouldPause:e!==s})]}),(n||r.caption)&&(0,o.jsx)("figcaption",{children:c(r.id,r.caption)})]})}const Gne=({alt:e,cornerRadius:t,disableZoom:n,height:s,l10nId:r,labels:i,link:a,src:c,width:l})=>(0,o.jsx)("div",{className:"block-gallery__image",children:(0,o.jsx)(ia,{alt:e,cornerRadius:t,disableZoom:n,height:s,l10nId:r,labels:i,link:a,maxHeight:900,src:c,width:l})});var Yc;const Wne=1024,Kne=16/9,sI=Wne/Kne,wg={LARGE:{height:60,width:225},MEDIUM:{height:40,width:175},SMALL:{height:20,width:125}},Qne=e=>{const t=e==null?void 0:Number(e);return t===Aa.SMALL.value?wg.SMALL:t===Aa.LARGE.value?wg.LARGE:wg.MEDIUM},Zne=(e,t,n)=>{const s=Qne(e);if(t==null||n==null||!Number.isFinite(t)||!Number.isFinite(n)||t<=0||n<=0)return s;const r=Math.min(s.width/t,s.height/n);return{height:n*r,width:t*r}},Yne=e=>We(e)&&e.type==="text"&&e.family==="text"&&["two column","three column","four column"].includes(String(e.variant)),oI=e=>e!==void 0&&Yne(e),qne={defaultValue:75,max:100,min:0,step:1},Xne={defaultValue:2,max:40,min:0,step:1},Jne=e=>typeof e=="string"||typeof e=="number",ese=e=>Yc(e)&&e.type==="slide"&&Array.isArray(e.items),jg=e=>{if(!(!We(e)||!We(e.experiments)))return e.experiments},sr=e=>typeof e=="boolean"?e:void 0,tse={insetLeft:!0,insetRight:!0,bleedLeft:!0,bleedRight:!0,overlay:!0,fullBleed:!0},nse=e=>typeof e=="string"&&Object.hasOwn(tse,e),rI=e=>nse(e)?e:void 0,sse={heading:!0,subheading:!0},ose=e=>typeof e=="string"&&Object.hasOwn(sse,e),iI=e=>ose(e)?e:void 0,ca=e=>{if(!We(e))return;const t=We(e.settings)?e.settings:void 0,n=We(e.experiments)?e.experiments:void 0;if(!(!t&&!n))return{imageTextLayout:rI(t?.imageTextLayout)??rI(n?.imageTextLayout),showAnimation:sr(t?.showAnimation)??sr(n?.showAnimation),showDescription:sr(t?.showDescription)??sr(n?.showDescription),showLogo:sr(t?.showLogo)??sr(n?.showLogo),showTitle:sr(t?.showTitle)??sr(n?.showTitle),titleVariant:iI(t?.titleVariant)??iI(n?.titleVariant)}},aI=(e,t)=>!Array.isArray(e)||!t?[]:e.filter(Jne).map(n=>t[String(n)]).filter(ese),w3e=(e,t)=>aI(e,t).map(n=>n.id),j3e=(e,t)=>aI(e,t).map(n=>({id:n.id,settings:{...n.settings,showLogo:!0}})),rse=e=>Yc(e)&&typeof e.key=="string"&&e.key.length>0,cI=e=>{if(Yc(e))return rse(e.image)?e.image:void 0},ise=e=>{if(!Yc(e))return;const t=cI(e.media);if(t)return t;const n=Array.isArray(e.items)?e.items:[];for(const s of n){const r=cI(Yc(s)?s.media:void 0);if(r)return r}},A3e=e=>{for(const t of e?.items??[]){const n=ise(t);if(n)return n}},ase=e=>ca(e)?.showTitle!==!1,cse=e=>jg(e)?.showFill!==!1,lse=(e,t=!0)=>ca(e)?.showLogo??t,dse=e=>ca(e)?.showAnimation!==!1,use=e=>{const t=oI(e)?e.settings:void 0;return{showFill:t?.showColumnFill!==!1,showIcons:t?.showColumnIcons??!1}},hse=[{icon:"alert-circle",terms:["alert","danger","risk","safety","warning"]},{icon:"lightbulb",terms:["idea","insight","learn","tip"]},{icon:"compass",terms:["direction","path","plan","roadmap","strategy"]},{icon:"bolt",terms:["automation","energy","fast","power","speed"]}],lI=["alert-circle","lightbulb","compass","bolt","star"],mse=(e,t=0)=>{const n=e.replace(/<[^>]*>/g," ").toLowerCase();return hse.find(({terms:s})=>s.some(r=>n.includes(r)))?.icon??lI[t%lI.length]},dI=e=>ca(e)?.imageTextLayout,uI=e=>e!==void 0&&e!=="fullBleed",fse=null,R3e=e=>e===void 0||fse.includes(e),pse=e=>uI(dI(e)),gse=e=>pse(e)&&ca(e)?.showDescription!==!1,hI=(e,{defaultValue:t,max:n,min:s})=>{const r=e===""||e==null?NaN:Number(e);return Number.isFinite(r)?Math.min(Math.max(Math.round(r),s),n):t},mI=e=>({blur:hI(e?.overlayBlur,Xne),opacity:hI(e?.overlayOpacity,qne)}),Ag=e=>{const t=jg(e),n=We(e?.settings)?e.settings:void 0;return{overlayBlur:n?.overlayBlur??t?.overlayBlur,overlayOpacity:n?.overlayOpacity??t?.overlayOpacity}},P3e=e=>mI(Ag(e)),fI=e=>{const{blur:t,opacity:n}=mI(e);return{"--presentation-overlay-blur":`${t}px`,"--presentation-overlay-opacity":String(n/100)}},M3e=e=>fI(Ag(e)),vse=e=>({imagePosition:e==="insetRight"||e==="bleedRight"?"right":"left",isFullBleed:e==="bleedLeft"||e==="bleedRight"||e==="overlay",isFullWidthBleed:e==="fullBleed",isOverlay:e==="overlay"}),Rg=[{columns:2,variant:"two column"},{columns:3,variant:"three column"},{columns:4,variant:"four column"}],Cse=Rg.map(e=>e.variant),pI=e=>Cse.some(t=>t===e),xse=e=>e?.family==="gallery"&&pI(e.variant),bse=[2,3,4],gI=8,yse=2,Sse=2,Ise=4,vI=e=>bse.filter(t=>e>=t&&Math.ceil(e/t)<=yse),O3e=(e,t)=>vI(e).includes(t),CI=(e,t)=>{const n=vI(e);return n.length===0?e>gI?Ise:Sse:n.find(s=>s===t)??n[0]},Tse=e=>Rg.find(t=>t.variant===e)?.columns,Lse=e=>Rg.find(t=>t.columns===e).variant,B3e=(e,t)=>{if(pI(e))return Lse(CI(t,Tse(e)))},Ese=5,kse=e=>e>=Ese,D3e=e=>Math.max(0,gI-e),Nse=/(?:^|>)([^<>]*)/g,wse=/^(?:\s|&nbsp;|&#160;)*$/,jse=e=>typeof e!="string"?!1:[...e.matchAll(Nse)].some(([,t])=>t!==void 0&&!wse.test(t)),Ase=e=>ca(e)?.titleVariant,F3e=e=>e&&jg(e)?.speakerNotes||"",Rse=e=>{switch(e){case 3:return"threecol";case 4:return"fourcol";default:return"twocol"}},Pse=(e,t,n)=>{const s=new Set;return e.forEach((r,i)=>{jse(n(r.caption))&&s.add(Math.floor(i/t))}),s};function xI(e){return(0,o.jsx)($ne,{...e})}class Mse extends u.Component{static get defaultProps(){return{blockId:"",getL10nValue:()=>{},items:[],lessonId:"",width:2}}captionedRowsCache;getCaptionedRows(t){const{getL10nValue:n,items:s}=this.props,r=this.captionedRowsCache;if(r&&r.columns===t&&r.getL10nValue===n&&r.items===s)return r.rows;const i=Pse(s,t,n);return this.captionedRowsCache={columns:t,getL10nValue:n,items:s,rows:i},i}render(){const{animateBlockEntrance:t,defaultBackgroundColor:n,editable:s,getL10nValue:r,initiallyVisible:i,isAuthoring:a,isEditableSurface:c,isLearner:l,isPresentation:d,items:h,labels:m,renderCaption:f,settings:p,width:g}=this.props,{entranceAnimation:v,cornerRadius:x,zoomOnClick:b}=p,y=d?CI(h.length,g):g,T=!!(d&&a),S=d&&!a?this.getCaptionedRows(y):void 0,I=X()(`block-gallery block-gallery--${Rse(y)}`,{"block-gallery--no-animation":!v||yn(),"block-gallery--presentation":d});return(0,o.jsx)(De,{className:I,defaultBackgroundColor:n,children:(0,o.jsx)("div",{className:"block-gallery__container",children:(0,o.jsx)("div",{className:"block-gallery__row",children:(0,o.jsx)($e,{animateBlockEntrance:t,className:d?"block-gallery__grid":void 0,initiallyVisible:i,isLearner:l,siblingDelay:.25,children:h.map((L,E)=>{const{id:k}=L,N=L.caption,R=r(L.media)?.image,M=R?.alt,A=R?.key,j=R?.dimensions,P=j?.width||j?.originalWidth,w=j?.height||j?.originalHeight,D=pt(R),O=r(R?.link?.destination),B=T||!!S?.has(Math.floor(E/y)),H=s||!!N||!!(d&&c&&B),_=Uc({caption:N,editable:s,id:k,getL10nValue:this.props.getL10nValue});return(0,o.jsx)("div",{className:X()("block-gallery__col",{"block-gallery__col--captioned":B}),children:(0,o.jsxs)(_.tagName,{"aria-labelledby":_.figcaptionId,className:"block-gallery__figure",role:_.role,children:[A&&(0,o.jsx)(Gne,{alt:M,cornerRadius:x,disableZoom:!b,height:w,l10nId:Ot(L?.media),labels:m,link:R?.link&&typeof O=="string"?{type:R.link.type,destination:O}:void 0,src:D,width:P}),H&&(0,o.jsx)("figcaption",{id:_.figcaptionId,children:f(k,N)})]})},k)})})})})})}}const bI=e=>(0,o.jsx)(Mse,{...e,isAuthoring:Id(),isPresentation:Cn()});bI.displayName="BlockGalleryWithPresentation";const Pg=tI(vt(bI));var Mg=C(49860);const Og=e=>["hero","full","aside"].includes(e);class Ose extends Mg.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{type:"hero",editable:!1,getL10nValue:()=>{},lessonId:"",blockId:"",items:[]}}renderCaption(t,n){return(0,o.jsx)(et,{className:"block-image__caption",value:n})}render(){const{aiMagicIcon:t,aiOverlay:n,animateBlockEntrance:s,blockId:r,defaultBackgroundColor:i,editable:a,getL10nValue:c,initiallyVisible:l,isLearner:d,items:h,type:m,labels:f,lessonId:p,settings:g,renderCaption:v=this.renderCaptionDelegate}=this.props,{entranceAnimation:x,cornerRadius:b,zoomOnClick:y}=g,T=X()(`block-image block-image--${m}`,"block-image--flag-dimensions",{"block-image--no-animation":!x}),S=h[0],{id:I,caption:L}=S,{image:E,audio:k}=c(S.media)??{},N=E?.alt,R=pt(E),M=E?.dimensions,A=M?.width||M?.originalWidth,j=M?.height||M?.originalHeight,P=Uc({caption:L,editable:a,id:I,getL10nValue:c}),w=!d&&!R,D=A&&j?A/j:void 0,O=E?.link?c(E.link.destination):void 0,B=E?.link&&typeof O=="string"?{type:E.link.type,destination:O}:void 0,H=X()("block-image__image",{"block-image__image--audio-overlay":!!k});return(0,o.jsx)(De,{className:T,defaultBackgroundColor:i,children:(0,o.jsx)("div",{className:"block-image__container",children:(0,o.jsx)("div",{className:"block-image__row",children:(0,o.jsx)("div",{className:"block-image__col",children:(0,o.jsx)($e,{animateBlockEntrance:s,initiallyVisible:l,isLearner:d,children:(0,o.jsxs)(P.tagName,{"aria-labelledby":P.figcaptionId,className:"block-image__figure",role:P.role,children:[(0,o.jsxs)("div",{className:H,children:[w?(0,o.jsxs)("div",{className:"block-image__waiting",style:{aspectRatio:D},children:[(0,o.jsx)("div",{children:t}),(0,o.jsx)("div",{className:"block-image__waiting-text",children:"Waiting for image\u2026"})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ia,{alt:N,cornerRadius:b,disableZoom:!y,height:j,l10nId:Ot(S.media),labels:f,link:B,maxHeight:m==="full"?380:900,src:R,width:A}),k&&Og(m)&&(0,o.jsx)(ln,{blockId:r,cornerRadius:b,index:`${r}-${I}-0`,isOverlayAudio:!0,item:S,labels:f,lessonId:p,media:S.media,mediaType:"audio"})]}),n&&(0,o.jsx)("div",{className:"block-image__ai-overlay",children:n})]}),(a||L)&&(0,o.jsx)("figcaption",{id:P.figcaptionId,children:v(I,L)})]})})})})})})}}const Bse=vt(Ose),Dse=(e,t,n,s,r)=>t?r:(0,o.jsx)($e,{animateBlockEntrance:e,initiallyVisible:n,isLearner:s,children:r});class Fse extends Mg.Component{renderCaptionDelegate;renderParagraphDelegate;constructor(t){super(t),this.renderParagraphDelegate=this.renderParagraph.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",type:"text-aside"}}renderParagraph(t,n){return(0,o.jsx)(et,{className:"block-image__text",value:n})}renderCaption(t,n){return(0,o.jsx)(et,{className:"block-image__caption",value:n})}renderImage(t,n,s,r){const{blockId:i,editable:a,lessonId:c,renderCaption:l=this.renderCaptionDelegate,getL10nValue:d}=this.props,h=d(s.media),m=h?.image,f=h?.audio,p=m?.alt,g=pt(m),v=m?.dimensions,x=v?.width||v?.originalWidth,b=v?.height||v?.originalHeight,y=Uc({caption:n,editable:a,id:t,getL10nValue:d}),{animateBlockEntrance:T,initiallyVisible:S,isLearner:I,labels:L,settings:{cornerRadius:E,zoomOnClick:k}}=this.props,N=X()("block-image__image",{"block-image__image--audio-overlay":!!f}),R=m?.link?d(m.link.destination):void 0,M=m?.link&&typeof R=="string"?{type:m.link.type,destination:R}:void 0;return(0,o.jsx)($e,{animateBlockEntrance:T,animateIn:r==="right"?"fadeInRight":"fadeInLeft",initiallyVisible:S,isLearner:I,children:(0,o.jsxs)(y.tagName,{"aria-labelledby":y.figcaptionId,className:"block-image__figure",role:y.role,children:[(0,o.jsxs)("div",{className:N,children:[(0,o.jsx)(ia,{alt:p,cornerRadius:E,disableZoom:!k,height:b,l10nId:Ot(s?.media),labels:L,link:M,maxHeight:900,src:g,width:x}),f&&Og("aside")&&(0,o.jsx)(ln,{blockId:i,cornerRadius:E,index:`${i}-${t}-0`,isOverlayAudio:!0,item:s,labels:L,lessonId:c,media:s.media,mediaType:"audio"})]}),(a||n)&&(0,o.jsx)("figcaption",{id:y.figcaptionId,children:l(t,n)})]})})}render(){const{defaultBackgroundColor:t,items:n,renderParagraph:s=this.renderParagraphDelegate,settings:r,type:i}=this.props,{entranceAnimation:a,imagePosition:c,imageSize:l}=r,d=c==="right",h=X()(`block-image block-image--${i}`,{"block-image--small":l==="small","block-image--large":l==="large","block-image--reverse":d,"block-image--no-animation":!a}),m=n[0],{id:f,caption:p}=m,g="paragraph"in m?m.paragraph:void 0;return(0,o.jsx)(De,{className:h,defaultBackgroundColor:t,children:(0,o.jsx)("div",{className:"block-image__container",children:(0,o.jsxs)("div",{className:"block-image__row",children:[(0,o.jsx)("div",{className:"block-image__col",children:d?s(f,g):this.renderImage(f,p,m,"left")}),(0,o.jsx)("div",{className:"block-image__col",children:d?this.renderImage(f,p,m,"right"):s(f,g)})]})})})}}const _se=vt(Fse);class Hse extends Mg.Component{renderCaptionDelegate;renderOverlayDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.renderOverlayDelegate=this.renderOverlay.bind(this)}static get defaultProps(){return{blockId:"",editable:!1,getL10nValue:()=>{},items:[],lessonId:"",type:"full"}}renderCaption(t,n){return(0,o.jsx)(et,{className:"block-image__caption",value:n})}renderOverlay(t,n){return(0,o.jsx)(et,{className:"block-image__paragraph",value:n})}renderOverlayCaption(t,n){const{animateBlockEntrance:s,initiallyVisible:r,isLearner:i,renderOverlay:a=this.renderOverlayDelegate}=this.props;return(0,o.jsx)("div",{className:"block-image__container",children:(0,o.jsx)("div",{className:"block-image__row",children:(0,o.jsx)("div",{className:"block-image__col",children:(0,o.jsx)($e,{animateBlockEntrance:s,animateIn:"fadeInUp",duration:1,initiallyVisible:r,isLearner:i,children:a(t,n)})})})})}render(){const{animateBlockEntrance:t,blockId:n,defaultBackgroundColor:s,editable:r,getL10nValue:i,initiallyVisible:a,isLearner:c,items:l,labels:d,lessonId:h,settings:m,type:f,renderCaption:p=this.renderCaptionDelegate}=this.props,{entranceAnimation:g,opacity:v,opacityColor:x}=m,b=mf(m?.backgroundColor,s),y=X()(`block-image block-image--${f}`,"block-image--flag-dimensions",{"block-image--no-animation":!g,"block-image--dark":mp(b)}),T={opacity:v||.6,backgroundColor:x||"transparent"},S=l[0],{id:I,caption:L}=S,E=i(S.media),k=E?.image,N=E?.audio,R=k?.key,M=pt(k),A=k?.dimensions,j=A?.width||A?.originalWidth,P=A?.height||A?.originalHeight,w=Mo(k?.alt),D=f==="overlay",O=Uc({caption:L,editable:r,id:I,isOverlayType:D,getL10nValue:i});return(0,o.jsxs)(De,{"aria-labelledby":O.figcaptionId,className:y,defaultBackgroundColor:s,role:O.role,tag:O.tagName,children:[Dse(t,D,a,c,(0,o.jsxs)("div",{className:"block-image__figure",children:[R&&(0,o.jsxs)("div",{className:"block-image__image","data-l10n-id":Ot(S?.media),style:{backgroundImage:`url('${M}')`},children:[(0,o.jsx)(Ln,{alt:w,height:P,src:M,width:j}),(0,o.jsx)("div",{className:"block-image__overlay",style:T}),N&&Og(f)&&(0,o.jsx)(ln,{blockId:n,index:`${n}-${I}-0`,isOverlayAudio:!0,item:S,labels:d,lessonId:h,media:S.media,mediaType:"audio"})]}),D?this.renderOverlayCaption(I,L):null]})),!D&&(r||L)&&(0,o.jsx)("figcaption",{className:"block-image__container",id:O.figcaptionId,children:p(I,L)})]})}}const Bg=vt(Hse),Vse=e=>(0,o.jsx)(Bg,{type:"overlay",...e}),zse=e=>(0,o.jsx)(Bg,{type:"banner",...e}),$se=()=>{const e=crypto.getRandomValues(new Uint8Array(16));e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return[t.slice(0,8),t.slice(8,12),t.slice(12,16),t.slice(16,20),t.slice(20)].join("-")},c0=()=>typeof crypto.randomUUID=="function"?crypto.randomUUID():$se();var Use=C(30234),Gse=C.n(Use),Wse=C(27689),yI=C.n(Wse),Kse=C(8907),l0=C.n(Kse);function Ns(e,t,n,s){const i=t==="bottom"||!n&&t!=="top"?"bottom":"top",a={renderOrder:["text"],isOverlayAudio:!1};if(!e)return a;const c=!!e.audio,l=!!e.image,d=!!e.video,h=!!e.embed,m=l||d,f=()=>{const v=l?"image":"video",x={top:c?["audio","text",v]:["text",v],bottom:c?["text","audio",v]:["text",v],legacyTop:c?["audio",v,"text"]:[v,"text"],legacyBottom:c?[v,"text","audio"]:[v,"text"]};return n&&s==="timeline"&&!t?x.top:n&&s!=="timeline"?i==="bottom"?x.legacyBottom:x.legacyTop:i==="bottom"?x.bottom:x.top},p=()=>{const v={top:c?["audio","text","embed"]:["text","embed"],bottom:c?["text","embed","audio"]:["text","embed"],legacyTop:c?["audio","embed","text"]:["embed","text"],legacyBottom:c?["embed","text","audio"]:["embed","text"]};return n&&s==="timeline"&&!t?v.legacyTop:n&&s!=="timeline"?i==="bottom"?v.legacyBottom:v.legacyTop:i==="bottom"?v.bottom:v.top},g=()=>i==="bottom"?["text","audio"]:["audio","text"];return c&&!m&&!h?{...a,renderOrder:g()}:m&&!c&&!h?{...a,renderOrder:f()}:h&&!c&&!m?{...a,renderOrder:p()}:c&&m&&!h?s==="statement"?{...a,renderOrder:g()}:s==="labeled-graphic"||i==="top"||s==="process"?{...a,renderOrder:f(),audioOnlyMedia:{audio:e.audio},imageOnlyMedia:{image:e.image},videoOnlyMedia:{video:e.video}}:{...a,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?{...a,renderOrder:p(),audioOnlyMedia:{audio:e.audio},embedOnlyMedia:{embed:e.embed}}:a}var d0=C(49860);const Qse=30,SI=ff("blockSettings");class Zse extends d0.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],lessonId:"",onStep:()=>{}};render(){const{animateBlockEntrance:t,blockId:n,editable:s,initiallyVisible:r,isLearner:i,items:a,labels:c,lessonId:l,onStep:d,settings:h,enableVideoPlaybackSpeed:m}=this.props,{entranceAnimation:f,accordionBehavior:p="keepOpen"}=h,g=X()("blocks-accordion",{"blocks-accordion--no-animation":!f});return(0,o.jsx)(De,{className:g,"data-block-id":n,children:(0,o.jsx)($e,{animateBlockEntrance:t,duration:.75,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"blocks-accordion__container",children:(0,o.jsx)("div",{className:"blocks-accordion__row",children:(0,o.jsx)("div",{className:"blocks-accordion__col",children:(0,o.jsx)(noe,{blockId:n,editable:s,enableVideoPlaybackSpeed:m,items:a,keepOpen:p==="keepOpen",labels:c,lessonId:l,onStep:d,settings:h})})})})})})}}const Yse={isOpen:!1,isActive:!1},qse=e=>(t,{id:n})=>Object.assign({},t,{[n]:e[n]||Yse}),II=(e,t)=>t.reduce(qse(e),{}),Xse=(e,t)=>(n,s)=>{const r=e==s,i=r?!n.isOpen:n.isOpen,a=r&&!n.isOpen;return{isOpen:t?i:a,isActive:r}},Jse=e=>(t,n)=>{const s=n==e;return{isOpen:s,isActive:s}},eoe=e=>(t,n)=>({isOpen:n==e,isActive:t.isActive});class toe extends d0.Component{static defaultProps={blockId:"",blockSettings:{},editable:!1,items:[],keepOpen:!1,lessonId:"",onStep:()=>{}};constructor(t){super(t);const{items:n}=this.props;this.state={itemStatusMap:II({},n)},this.handleNavtoTab=this.handleNavtoTab.bind(this)}componentDidMount(){window.addEventListener(Je,this.handleNavtoTab)}componentWillUnmount(){window.removeEventListener(Je,this.handleNavtoTab)}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,s=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;if(n===this.props.blockId){const r=this.props.items.findIndex(({id:h})=>h===s),{items:i,onStep:a}=this.props,{itemStatusMap:c}=this.state,l=i[r].id,d=Jse(l);this.setState({itemStatusMap:js()(d,c)}),open&&a(i[r])}}UNSAFE_componentWillReceiveProps(t){const n=t.items,s=ps()(n)!==ps()(this.props.items);!t.keepOpen&&this.props.keepOpen?this.updateMapForOneAtATimePreference():s&&this.rebuildItemStatusMap(n)}updateMapForOneAtATimePreference(){const{itemStatusMap:t}=this.state,{items:n}=this.props,s=Gse()(i=>t[i.id].isOpen,n);if(!s)return;const r=eoe(s.id);this.setState({itemStatusMap:js()(r,t)})}rebuildItemStatusMap(t){const n=this.state.itemStatusMap;this.setState({itemStatusMap:II(n,t)})}handleItemClick(t){const{items:n,keepOpen:s,onStep:r}=this.props,{itemStatusMap:i}=this.state,a=n[t].id,c=Xse(a,s);this.setState({itemStatusMap:js()(c,i)}),open&&r(n[t])}render(){const{items:t,settings:n,editable:s,labels:r,lessonId:i,blockId:a,enableVideoPlaybackSpeed:c}=this.props,{itemStatusMap:l}=this.state,{zoomOnClick:d}=n,h=Object.values(l)?.find(m=>m.isOpen)?"open":"closed";return(0,o.jsx)("div",{className:"blocks-accordion__wrapper","data-accordion-status":h,children:t.map((m,f)=>(0,o.jsx)(ooe,{blockId:a,disableZoom:!d,editable:s,focused:l[m.id].isActive,index:f,item:{...m,enableVideoPlaybackSpeed:c},labels:r,lessonId:i,onClick:this.handleItemClick.bind(this,f),open:l[m.id].isOpen},m.id))})}}const noe=SI(toe);class soe extends d0.Component{static get defaultProps(){return{editable:!1,getL10nValue:()=>{},onClick:()=>{},lessonId:"",blockId:"",open:null}}id;content;constructor(t){super(t),this.id=c0(),this.toggle=this.toggle.bind(this),this.renderDescription=this.renderDescription.bind(this),this.renderTitle=this.renderTitle.bind(this)}componentDidUpdate(t){if(!this.props.open)return;const n=this.content;if(n&&(n.classList.add("blocks-accordion__content--visible"),!t.open&&this.props.open&&!this.props.suppressAutoScrollOnOpen)){const s=n.parentElement,r=s?.getBoundingClientRect()?.top,i=r!=null&&r>0&&r<window.innerHeight,a=yn()?"instant":"smooth";i||s.scrollIntoView({behavior:a,block:"start"})}}toggle(t){const{blockId:n,index:s}=this.props,r=Se.playerId,i=new RegExp(`-${s}(?:-.+)?$`);open&&r&&r.includes(n.toString())&&i.test(r)&&Se.pause(),this.props.onClick(),t.preventDefault()}renderTitle(t){const{title:n}=this.props.item;return(0,o.jsx)(Re,{className:"blocks-accordion__title",id:t,value:n})}renderDescription(t){const{description:n=""}=this.props.item;return(0,o.jsx)(et,{className:"blocks-accordion__description",value:n||""},t)}render(){const{blockId:t,blockSettings:n,editable:s,disableZoom:r,getL10nValue:i,index:a,item:c,focused:l,labels:d,lessonId:h,open:m,renderDescription:f=this.renderDescription,renderTitle:p=this.renderTitle}=this.props,{settings:g={},enableVideoPlaybackSpeed:v}=c,x=i(c.media)??{},b=Ns(x,n.audioPosition),y=Object.assign({},g,{disableZoom:r,fullEmbed:!0}),T=n?.backgroundType===re.ACCENT||n?.backgroundType===re.IMAGE,S=X()("blocks-accordion__item",{"blocks-accordion__item--closed":!m}),I=X()("blocks-accordion__header",{"blocks-accordion__header--editing":s,"brand--border":m&&l&&!T}),L=X()("blocks-accordion__content",{"blocks-accordion__content--will-enter":m,"brand--border":m&&l&&!T}),E=`title-${this.id}`,k=`panel-${this.id}`,N=n?.headingLevel,R=N?`h${N}`:"h2";let M=(0,o.jsxs)("button",{"aria-controls":k,"aria-expanded":m,className:I,onClick:this.toggle,onKeyDown:!s&&my(this.toggle)||void 0,type:"button",children:[p(E),(0,o.jsx)("span",{className:"blocks-accordion__toggler-wrap",children:(0,o.jsx)(ce,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]});return s&&(M=(0,o.jsxs)("div",{className:I,children:[p(E),(0,o.jsx)("button",{"aria-controls":k,"aria-expanded":m,"aria-label":m?"Close":"Open",className:"blocks-accordion__toggler-wrap",onClick:this.toggle,type:"button",children:(0,o.jsx)(ce,{className:"blocks-accordion__toggler",name:m?"minus":"plus"})})]})),(0,o.jsxs)(sn,{className:S,tag:"section",children:[(0,o.jsx)("div",{className:"blocks-accordion__header-wrap",children:(0,o.jsx)(R,{children:M})}),(0,o.jsx)("section",{"aria-labelledby":E,className:L,id:k,ref:A=>{this.content=A},children:b.renderOrder.map((A,j)=>{if(A==="text")return f(`text-${j}`);const P={blockId:t,hasPadding:!1,imageMaxHeight:1e3,item:c,labels:d,lessonId:h,enableVideoPlaybackSpeed:v,opts:y,shouldPause:!m},w=TI(x),D=w==="image-with-audio",O=D?"left":"center",H={audio:{media:b.audioOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-audio`,className:"blocks-accordion__audio"},image:{media:b.imageOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-image`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${O}`]:D})},video:{media:b.videoOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-video`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${O}`]:D})},embed:{media:b.embedOnlyMedia||x,isOverlayAudio:!1,index:`${t}-${a}-embed`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${O}`]:D})},overlay:{media:x,isOverlayAudio:!0,index:`${t}-${a}-overlay`,className:X()(`blocks-accordion__${w}`,{[`blocks-accordion__${w}--${O}`]:D})}}[A];if(!H)return null;const{className:_,...$}=H;return(0,o.jsx)("div",{className:X()(_,{"audio-on-top":this.props.blockSettings.audioPosition==="top"}),children:(0,o.jsx)("div",{className:"blocks-accordion__figure",children:(0,o.jsx)(ln,{...P,...$})})},`${A}-${j}`)})})]})}}const ooe=SI(vt(e=>(0,o.jsx)(soe,{...e}))),TI=e=>{const{image:t,embed:n,video:s,audio:r}=e;return t&&!r?"image":n&&!r?"embed":s?"video":r&&!t&&!n?"audio":t&&r?"image-with-audio":r&&n?"audio-and-embed":"image"};class roe extends d0.Component{static get defaultProps(){return{items:[],activeIndex:0,getL10nValue:()=>{},lessonId:"",blockId:"",blockSettings:{},onStep:Function.prototype}}tabs;id;tabResize;tabScroll;arrowNextEl;arrowPrevEl;container;tabControls;tabsHeaderEl;constructor(t){super(t),this.renderDescription=this.renderDescription.bind(this);const n=this.props.activeIndex;this.state={activeIndex:n,activeTouch:!1,activeMouse:!1},this.tabs=[],this.id=c0(),this.handleNavtoTab=this.handleNavtoTab.bind(this),this.handleRevealItem=this.handleRevealItem.bind(this)}componentDidMount(){this.handleControls(),window.addEventListener("resize",this.tabResize=l0()(this.handleControls.bind(this),100)),window.addEventListener(Je,this.handleNavtoTab),window.addEventListener(qo,this.handleRevealItem),this.tabsHeaderEl?.addEventListener("scroll",this.tabScroll=l0()(this.handleControls.bind(this),50))}handleNavtoTab(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,s=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&(this.tabsHeaderEl.scrollIntoView({behavior:"smooth",block:"start"}),this.setState({activeIndex:this.props.items.findIndex(({id:r})=>r===s)},()=>{du(this.tabsHeaderEl,"start")||this.tabsHeaderEl.scrollIntoView({behavior:"instant",block:"start"})}))}handleRevealItem(t){const{blockId:n,itemId:s}=t.detail;if(n!==this.props.blockId)return;const r=this.props.items.findIndex(({id:i})=>En(i,s));r>=0&&this.setState({activeIndex:r})}componentDidUpdate(){this.handleControls()}componentWillUnmount(){this.tabsHeaderEl?.removeEventListener("scroll",this.tabScroll),window.removeEventListener("resize",this.tabResize),window.removeEventListener(Je,this.handleNavtoTab),window.removeEventListener(qo,this.handleRevealItem)}setActive(t){this.setState({activeIndex:t});const{blockId:n}=this.props,s=Se.playerId;this.state.activeIndex!=t&&s&&s.includes(n.toString())&&Se.pause(),this.props.onStep?.(this.props.items[t])}handleControls(){const{isRTL:t}=this.props;this.tabsHeaderEl.offsetWidth===this.tabsHeaderEl.scrollWidth?(this.arrowPrevEl.classList.add("hidden"),this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("start"),this.tabControls.classList.add("end")):(this.tabsHeaderEl.scrollLeft===0?(this.arrowPrevEl.classList.add("hidden"),this.tabControls.classList.add("start")):(this.arrowPrevEl.classList.remove("hidden"),this.tabControls.classList.remove("start")),this.tabsHeaderEl.scrollLeft===(this.tabsHeaderEl.scrollWidth-this.tabsHeaderEl.offsetWidth)*(t?-1:1)?(this.arrowNextEl.classList.add("hidden"),this.tabControls.classList.add("end")):(this.arrowNextEl.classList.remove("hidden"),this.tabControls.classList.remove("end")))}handleMouseEnter(){this.state.activeTouch||this.setState({activeMouse:!0})}handleMouseLeave(){this.setState({activeMouse:!1})}handleTouchStart(){this.setState({activeTouch:!0})}scrollTabs(t){const{isRTL:n}=this.props,s=this.tabsHeaderEl.offsetWidth,r=this.tabsHeaderEl.scrollLeft,a=(t==="next"?n?yI():Up():n?Up():yI())(r,s*.8);this.tabsHeaderEl.scrollTo({left:a,behavior:"smooth"})}arrowPrevInset(t){const n=this.arrowPrevEl.getBoundingClientRect(),s=n.right-t,r=n.left-t;return s+r}focusTab(t){t.currentTarget?.scrollIntoView({behavior:"smooth",block:"nearest"})}handleTabKeyDown(t,n){const{isRTL:s}=this.props;let r=!1,i;Wo(n)?(r=!0,i=s?t+1>this.tabs.length-1?0:t+1:t-1>=0?t-1:this.tabs.length-1):Ko(n)&&(r=!0,i=s?t-1>=0?t-1:this.tabs.length-1:t+1>this.tabs.length-1?0:t+1),r&&n.preventDefault(),i!=null&&(this.tabs[i]?.focus(),this.setActive(i))}renderHeader(t,n){const{activeIndex:s,activeTouch:r,activeMouse:i}=this.state,a=this.tabsHeaderEl&&this.tabsHeaderEl.scrollWidth>this.tabsHeaderEl.clientWidth,c=X()("blocks-tabs__header-wrap",{touch:r,mouse:i&&a});return(0,o.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter.bind(this),onMouseLeave:this.handleMouseLeave.bind(this),onTouchStart:this.handleTouchStart.bind(this),children:[(0,o.jsx)("div",{className:"blocks-tabs__header",ref:l=>{this.tabsHeaderEl=l},role:mee,children:t.map(({title:l},d)=>{const h=t.length===1||d===s,m=t.length>1&&d+1===s,f=t.length>1&&d-1===s,p=X()("blocks-tabs__header-item",{"brand--color":h&&!n,"blocks-tabs__header-item--active":h,"blocks-tabs__header-item--before-active":m,"blocks-tabs__header-item--after-active":f}),g=`tab-${this.id}-${d}`,v=`tabpanel-${this.id}-${d}`;return(0,o.jsx)("button",{"aria-controls":v,"aria-selected":h,className:p,id:g,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,o.jsx)(Re,{value:l})},g)})}),(0,o.jsxs)("div",{className:"blocks-tabs__controls",ref:l=>{this.tabControls=l},children:[(0,o.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,o.jsx)(ce,{className:"blocks-tabs__arrow-icon",name:"chevron-right-solid"})}),(0,o.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,o.jsx)(ce,{className:"blocks-tabs__arrow-icon blocks-tabs__arrow-icon--next",name:"chevron-right-solid"})})]})]})}renderDescription({description:t}){return(0,o.jsx)(et,{className:"blocks-tabs__description",value:t})}renderItem(t,n,s){const{blockId:r,getL10nValue:i,labels:a,lessonId:c,renderDescription:l=this.renderDescription}=this.props,{activeIndex:d}=this.state,h=d===n,{settings:m={},enableVideoPlaybackSpeed:f}=t,p=i(t.media)??{},g=Ns(p,this.props.settings.audioPosition,!1),v=X()("blocks-tabs__content-item",{"blocks-tabs__content-item--active":h}),x=Object.assign({},m,{disableZoom:s,fullEmbed:!0}),b=`tabpanel-${this.id}-${n}`,y=`tab-${this.id}-${n}`,T=TI(p),S=T==="image-with-audio",I=T==="audio-and-embed",L=S?p?.image?.align:"left",E=I?"embed-border":void 0;return(0,o.jsx)("div",{"aria-labelledby":y,className:v,id:b,role:fee,tabIndex:h?0:void 0,children:g.renderOrder.map((k,N)=>{if(k==="text")return(0,o.jsx)("div",{className:"blocks-tabs__description",children:l(t)},`text-${N}`);const R={blockId:r,embedClass:E,hasPadding:!1,imageMaxHeight:1e3,item:t,labels:a,lessonId:c,enableVideoPlaybackSpeed:f,opts:x,shouldPause:!h},A={audio:{media:g.audioOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-audio`,className:"blocks-tabs__audio"},image:{media:g.imageOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-image`,className:X()(`blocks-tabs__${T}`,{[`blocks-tabs__${T}--${L}`]:S})},video:{media:g.videoOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-video`,className:X()(`blocks-tabs__${T}`,{[`blocks-tabs__${T}--${L}`]:S})},embed:{media:g.embedOnlyMedia||p,isOverlayAudio:!1,index:`${r}-${n}-embed`,className:X()(`blocks-tabs__${T}`,{[`blocks-tabs__${T}--${L}`]:S})},overlay:{media:p,isOverlayAudio:!0,index:`${r}-${n}-overlay`,className:X()(`blocks-tabs__${T}`,{[`blocks-tabs__${T}--${L}`]:S})}}[k];if(!A)return null;const{className:j,...P}=A;return(0,o.jsx)("div",{className:X()(j,{"audio-on-top":this.props.settings.audioPosition==="top"}),children:(0,o.jsx)("div",{className:"blocks-tabs__figure",children:(0,o.jsx)(ln,{...R,...P})})},`${k}-${N}`)})},b)}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i,enableVideoPlaybackSpeed:a}=this.props,{backgroundType:c,cardMode:l,entranceAnimation:d,zoomOnClick:h}=i,m=X()("blocks-tabs",{"blocks-tabs--no-animation":!d}),f=r.length>0?r.slice(0,Qse):[],p=l===Qn.TRANSPARENT&&(c===re.ACCENT||c===re.IMAGE),g=X()("blocks-tabs__container",{"blocks-tabs--single":f.length===1});return(0,o.jsx)(De,{className:m,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:g,children:(0,o.jsx)("div",{className:"blocks-tabs__row",children:(0,o.jsx)("div",{className:"blocks-tabs__col",children:(0,o.jsx)("div",{className:"blocks-tabs__wrapper",ref:v=>{this.container=v},children:(0,o.jsxs)(sn,{children:[this.renderHeader(f,p),(0,o.jsx)("div",{className:"blocks-tabs__content",children:f.map((v,x)=>this.renderItem({...v,enableVideoPlaybackSpeed:a},x,!h))})]})})})})})})})}}const ioe=pg(vt(e=>(0,o.jsx)(roe,{...e}))),Dg=V("pill-button");function LI({allowTabNavigation:e=!0,ariaLabel:t,children:n,className:s,href:r,onClick:i=()=>{},onFocus:a,ref:c,size:l="sm",testId:d,variant:h="plain"}){const m=Dg({[h]:!0,[l]:!0}).mix(s),f=!e;return r?(0,o.jsx)(xn,{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:i,onFocus:a,tabIndex:e?void 0:-1,to:r,children:(0,o.jsx)("span",{className:Dg("content"),children:n})}):(0,o.jsx)("button",{"aria-hidden":f,"aria-label":t,className:m,"data-testid":d,onClick:i,onFocus:a,ref:c,tabIndex:e?void 0:-1,type:"button",children:(0,o.jsx)("span",{className:Dg("content"),children:n})})}const EI=({allowNext:e=!1,canProceed:t=!1,isReduceMotion:n=!1,onNext:s,onSubmit:r,quizNext:i,quizSubmit:a})=>{const c=t?!0:void 0,l=t?void 0:r,d=t?-1:void 0,h=t?void 0:!0,m=t?s:void 0,f=t?void 0:-1,p=(0,u.useRef)(null),g=(0,ze.A)(t);(0,u.useEffect)(()=>{e&&!g&&t&&setTimeout(()=>{p.current?.focus?.({preventScroll:n})},0)},[e,t,n,g]);const v=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,o.jsxs)("div",{className:v,children:[(0,o.jsx)("div",{className:"quiz-card__submit brand--ui",children:!c&&(0,o.jsx)("button",{className:"quiz-card__button","data-testid":"quiz-submit-button",onClick:l,tabIndex:d,type:"button",children:a})}),(0,o.jsx)("br",{className:"visually-hidden-always",role:"presentation"}),e&&(0,o.jsx)("div",{className:"quiz-card__next brand--ui",children:(0,o.jsx)("button",{"aria-disabled":h,"aria-hidden":h,className:x,"data-testid":"quiz-next-button",onClick:m,ref:p,tabIndex:f,type:"button",children:i})})]})},aoe=({children:e,isActive:t,isComplete:n,isTimedQuiz:s,style:r})=>(0,o.jsx)("div",{"aria-hidden":t?void 0:!0,className:coe({isActive:t,isComplete:n,isTimedQuiz:s}),"data-testid":"quiz-card",inert:t?void 0:!0,style:r,children:(0,o.jsx)("div",{className:"quiz-card__container",children:(0,o.jsx)("div",{className:"quiz-card__row",children:(0,o.jsx)("div",{className:"quiz-card__main",children:e})})})}),coe=({isActive:e,isComplete:t,isTimedQuiz:n})=>X()("quiz-card",{"quiz-card--active":e,"quiz-card--done":t,"quiz-card--timed":n}),kI=aoe,{FILL_IN_THE_BLANK:NI,MATCHING:loe,MULTIPLE_CHOICE:doe,MULTIPLE_RESPONSE:uoe}=oe;function hoe(e,t){return e.map(n=>String(t(n?.title)??"")).filter(Boolean).join(", ")}function moe(e,t,n){const s=t!=null?e.find(r=>r.id===t):e.find(r=>r.correct===!0);return String(n(s?.title)??"")}function foe(e,t,n){return String(n(e?.[t]?.title)??"")}function wI(e,t,n){return t.filter(e).reduce((s,r,i)=>{const a=String(n(r?.title)??"");return i===0?a:s+", "+a},"")}function poe(e,t,n){return wI(r=>Array.isArray(e)?e.includes(r.id):!!r.correct,t,n)}function goe(e,t,n){return Array.isArray(t)?wI((r,i)=>t.includes(i),e,n):""}function voe({answers:e,getL10nValue:t,selection:n,correctLabel:s,userLabel:r,matchLabel:i="Match Item: ",revealAnswers:a}){if(n==null||Object.keys(n).length===0)return"";const c=Object.fromEntries(Object.entries(n).map(([l,d])=>[d,l]));return e.map((l,d)=>{const h=String(t(l?.title)??""),m=String(t(l?.matchTitle)??""),f=c?.[d],p=String(t(e?.[Number(f)]?.title)??"");return a===Ee.INCORRECT?`${i}${m}. ${r}: ${p}.`:`${i}${m}. ${s}: ${h}. ${r}: ${p}.`}).join(" ")}function Fg({correctAnswer:e,selectedAnswer:t,correctLabel:n,userLabel:s,revealAnswers:r}){return!e||!t||r===Ee.NONE?"":r===Ee.INCORRECT?`${s}: ${wn(t)}.`:`${n}: ${wn(e)}. ${s}: ${wn(t)}.`}function Coe(e,t){return e.type===NI?t?.quizAcceptableResponses:t?.a11yCorrectLive}function xoe({getL10nValue:e,isComplete:t,item:n,selection:s,labels:r,revealAnswers:i}){if(!n||!t)return null;const a=n?.answers??[],c=n?.correct,l=n?.corrects,d=Coe(n,r),h=r?.a11yAnswerLive;switch(n.type){case loe:return voe({getL10nValue:e,answers:a,selection:s,correctLabel:d,userLabel:h,revealAnswers:i});case NI:return Fg({correctAnswer:hoe(a,e),selectedAnswer:s,correctLabel:d,userLabel:h,revealAnswers:i});case doe:return Fg({correctAnswer:moe(a,c,e),selectedAnswer:foe(a,s,e),correctLabel:d,userLabel:h,revealAnswers:i});case uoe:return Fg({correctAnswer:poe(l,a,e),selectedAnswer:goe(a,s,e),correctLabel:d,userLabel:h,revealAnswers:i})}return null}const jI=({canProceed:e,feedbackRef:t,feedbackValue:n,isActive:s,isComplete:r,isCorrect:i,item:a,labels:c,quizCorrect:l,quizIncorrect:d,revealAnswers:h,selection:m})=>{const{announcePolite:f,clearAnnouncements:p}=Ms(),g=(0,ze.A)(e),v=ct(),b=!!Oe(n),y=i?l:d,T=(0,u.useCallback)(()=>{const L=xoe({getL10nValue:v,isComplete:r,item:a,labels:c,revealAnswers:h,selection:m}),E=n?wn(v(n)):"",k=y+". "+L+" "+E;let N;return k&&(N=setTimeout(()=>{f(k)},250)),()=>{clearTimeout(N)}},[f,n,v,r,a,c,y,h,m]);(0,u.useLayoutEffect)(()=>{!g&&e&&h!==Ee.NONE&&T()},[e,g,T,h]),(0,u.useEffect)(()=>p,[p]);const S=X()("quiz-card__feedback",{"quiz-card__feedback--active":e,"quiz-card__feedback--frame":b}),I=X()("quiz-card__feedback-icon",{"quiz-card__feedback-icon--correct":i});return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{"aria-hidden":s?void 0:!0,className:S,ref:t,tabIndex:s?-1:void 0,children:(0,o.jsx)("div",{className:"quiz-card__main--feedback",children:(0,o.jsxs)("div",{"aria-label":c?.a11yQuizFeedback,className:"quiz-card__feedback-wrap",role:"group",children:[(0,o.jsx)("div",{className:I,children:(0,o.jsx)("i",{"aria-hidden":"true",className:i?"icon icon-Master-05":"icon icon-Master-06"})}),(0,o.jsx)("div",{className:"quiz-card__feedback-label",children:y}),n&&(0,o.jsx)("div",{children:(0,o.jsx)(Re,{allowTabNavigation:r&&s,className:"quiz-card__feedback-text",value:n})})]})})})})},{FILL_IN_THE_BLANK:boe}=oe,yoe=({children:e,type:t})=>(0,o.jsx)("div",{className:Soe({type:t}),children:e}),Soe=({type:e})=>X()("quiz-card__interactive",{"quiz-card__interactive--no-border":[boe].includes(e)}),AI=yoe,or=({allowTabNavigation:e,blockId:t="",enableVideoPlaybackSpeed:n,index:s,isOverlayAudio:r,item:i,labels:a={},media:c,settings:l,shouldPause:d})=>c==null||!Object.keys(c).some(h=>h!=="tmp")?null:(0,o.jsx)("div",{className:"quiz-card__media",children:(0,o.jsx)(ln,{allowTabNavigation:e,blockId:t,enableVideoPlaybackSpeed:n,index:s,isOverlayAudio:r,item:i,labels:a,media:c,opts:l,shouldPause:d})}),U3e=(e,t)=>n=>n>=e&&n<t,RI=e=>e<10?`0${e}`:String(e),Ioe=e=>Intl.NumberFormat(void 0,{style:"percent",maximumFractionDigits:2}).format(e),PI=e=>e.reduce((t,n)=>n==null||isNaN(n)?t:t+n,0),Toe=(e,t)=>{const n=yn(),s=(0,ze.A)(t);(0,u.useEffect)(()=>{!s&&t&&e&&xu()(e.focus)&&e.focus({preventScroll:n})},[t,n,s,e])},u0=V("question-counter"),Loe=({isActive:e=!1,labels:t,questionLabel:n,questionNumber:s,totalQuestions:r})=>{const i=(0,u.useRef)(null);Toe(i.current,e);const a=`${t?.quizQuestion} ${s} ${t?.lessonPreposition} ${r}`,c=`${RI(s)}/${RI(r)}`;return(0,o.jsx)("div",{className:u0(),children:(0,o.jsxs)("h1",{"aria-label":a,className:u0("heading"),ref:i,tabIndex:-1,children:[(0,o.jsx)("span",{"aria-hidden":"true",className:u0("label"),children:n}),(0,o.jsx)("span",{"aria-hidden":"true",className:u0("count"),children:c})]})})},Eoe=V("question-title"),koe=({allowTabNavigation:e,htmlId:t,value:n})=>(0,o.jsx)(Re,{allowTabNavigation:e,className:Eoe(),"data-testid":"quiz-question-title",id:t,value:n}),Noe=({allowTabNavigation:e=!1,correctAnswerColor:t,correctAnswerColorContrast:n,errorMessageId:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isComplete:a,isCorrect:c=!1,labels:l,onEnterToSubmit:d=()=>{},onChange:h=()=>{},options:m,questionHtmlId:f="",quizAcceptableResponses:p="",quizAnswerPlaceholder:g,revealAnswers:v=Ee.NONE,value:x=""})=>{const b=(0,u.useRef)(null),[y]=(0,u.useState)(()=>Wr()("fitb-")),T=ct(),S=woe({options:m,getL10nValue:T}),I=`${y}-feedback`,L=`${y}-acceptable`,E=`${y}-input`,k=a?`${I} ${L}`:s||void 0,N=a?void 0:g,R=e?0:-1,M=v===Ee.ALL||v===Ee.INCORRECT,A=v===Ee.ALL||c&&v===Ee.INCORRECT,j=c?t:r,w=t&&r&&{"--fa-primary-color":Qt({backgroundColor:j,contrast:c?n:i}),"--fa-secondary-color":j},D=r&&{backgroundColor:Qt({backgroundColor:r,contrast:i}),fill:r,borderRadius:"50%"},O=X()("quiz-fill__icon",{"quiz-fill__icon--visible":a}),B=X()("quiz-fill__options",{"quiz-fill__options--visible":a}),H=(0,u.useCallback)(K=>{h(K.currentTarget.value)},[h]),_=(0,u.useCallback)(K=>{Oi(K)&&d(K)},[d]),$=a?void 0:H,z=a?void 0:_;return(0,o.jsxs)("div",{className:"quiz-fill",children:[(0,o.jsxs)("div",{className:"quiz-fill__container",children:[(0,o.jsx)("input",{"aria-describedby":k,"aria-hidden":!e,"aria-invalid":s?!0:void 0,"aria-labelledby":f,"aria-readonly":a,"aria-required":"true",autoComplete:"off",className:"quiz-fill__input ignore-prefers",id:E,onChange:$,onKeyDown:z,placeholder:N,readOnly:a,ref:b,tabIndex:R,type:"text",value:x}),M&&(0,o.jsxs)("div",{className:O,id:I,children:[c&&(0,o.jsx)(ce,{"aria-label":l?.quizCorrect,name:"circle-check",styleIcon:{height:"2rem",...w}}),!c&&(0,o.jsx)(VW,{"aria-label":l?.quizIncorrect,style:D})]})]}),A&&a&&(0,o.jsx)("div",{className:B,id:L,children:(0,o.jsx)(Re,{value:`${p}: ${S}`})})]})},woe=({options:e,getL10nValue:t})=>e.map(s=>(t(s.title)??"").trim()).join(", "),MI=Noe;function joe({correctAnswerColor:e,correctAnswerColorContrast:t}){const n=Kt(),s=Qt({backgroundColor:e,contrast:t}),r=e?{"--fa-primary-color":s,"--fa-secondary-color":e}:void 0;return(0,o.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,o.jsx)(ce,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--correct",name:"circle-check",style:r}),(0,o.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,o.jsx)("span",{className:"matching-results-item-feedback-text-result",children:n?.quizCorrect})})]})}var la=C(49860);function Aoe({correctAnswerValue:e,incorrectAnswerColor:t,incorrectAnswerColorContrast:n,shouldRevealCorrectAnswer:s}){const[r,i]=la.useState(!0),[a,c]=la.useState(!1),l=la.useRef(null),h=`matching-text-${la.useId()}`,m=Kt(),f=(0,ze.A)(e),p=la.useCallback(()=>{i(S=>!S)},[]);la.useLayoutEffect(()=>{if(f!==e){const S=l.current;S!=null&&S.scrollWidth>S.clientWidth&&c(!0)}},[f,e]);const g=Qt({backgroundColor:t,contrast:n}),v=t?{"--fa-primary-color":g,"--fa-secondary-color":t}:void 0,x=X()("matching-results-item-feedback-text",{"matching-results-item-feedback-text--collapsed":r}),b=X()("matching-results-item-feedback-text-btn-icon",{"matching-results-item-feedback-text-btn-icon--collapsed":r}),y=X()("matching-results-item-feedback-text-extra",{"matching-results-item-feedback-text-extra--collapsed":r}),T=X()("matching-results-item-feedback-text-extra-text",{"matching-results-item-feedback-text-extra-text--collapsed":r});return(0,o.jsxs)("div",{className:"matching-results-item-feedback",children:[(0,o.jsx)(ce,{className:"matching-results-item-feedback-icon matching-results-item-feedback-icon--incorrect",name:"circle-xmark-duotone",style:v}),!s&&(0,o.jsx)("span",{className:"matching-results-item-feedback-text",children:(0,o.jsx)("span",{className:"matching-results-item-feedback-text-result",children:m?.quizIncorrect})}),s&&(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("span",{className:x,children:[(0,o.jsxs)("span",{className:"matching-results-item-feedback-text-result",children:[m?.quizIncorrect,"."]}),a&&(0,o.jsx)("button",{"aria-controls":h,"aria-expanded":!r,"aria-label":r?m?.a11yMatchingItemShowMore:m?.a11yMatchingItemShowLess,className:"matching-results-item-feedback-text-btn",onClick:p,type:"button",children:(0,o.jsx)(ce,{className:b,name:"caret-down",style:v})}),(0,o.jsx)("span",{className:y,children:(0,o.jsxs)("span",{className:T,id:h,ref:l,children:[m?.quizCorrect,": ",(0,o.jsx)(Pn,{value:e})]})})]})})]})}function Roe({col1Id:e,col1Value:t,col2Id:n,col2Value:s,correctAnswerColor:r,correctAnswerColorContrast:i,correctAnswerValue:a,height:c,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,revealAnswers:h}){const m=e===n,f=h!=="incorrect",p=h!=="none";return(0,o.jsxs)("li",{className:"matching-results-item",role:"listitem",children:[(0,o.jsxs)("div",{className:"matching-results-item-pieces",children:[(0,o.jsxs)("div",{className:"matching-results-item-piece",style:c?{height:c}:void 0,children:[(0,o.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,o.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,o.jsx)("span",{className:"matching-results-item-piece-content",children:(0,o.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,o.jsx)(Pn,{value:t})})})]}),(0,o.jsxs)("div",{className:"matching-results-item-piece",children:[(0,o.jsx)("span",{className:"matching-results-item-piece-decoration"}),(0,o.jsx)("span",{className:"matching-results-item-piece-jigsaw"}),(0,o.jsx)("span",{className:"matching-results-item-piece-content",children:(0,o.jsx)("span",{"data-matching-results-item-piece-content-inline":"",children:(0,o.jsx)(Pn,{value:s})})})]})]}),p&&m&&(0,o.jsx)(joe,{correctAnswerColor:r,correctAnswerColorContrast:i}),p&&!m&&(0,o.jsx)(Aoe,{correctAnswerValue:a,incorrectAnswerColor:l,incorrectAnswerColorContrast:d,shouldRevealCorrectAnswer:f})]})}function Poe({answers:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,itemHeight:a,revealAnswers:c,rows:l}){return(0,o.jsx)("div",{className:"matching-results",children:(0,o.jsx)("ul",{className:"matching-results-list",role:"list",children:l.map((d,h)=>{const[m,f]=d,p=t==="freezeFirst"?e.find(g=>g.id===m.id)?.matchTitle:e.find(g=>g.id===f.id)?.title;return(0,o.jsx)(Roe,{col1Id:m.id,col1Value:m.value,col2Id:f.id,col2Value:f.value,correctAnswerColor:n,correctAnswerColorContrast:s,correctAnswerValue:p,height:a,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,revealAnswers:c},h)})})})}function Moe(e){return Object.keys(e).length===0}function Ooe(e,t){return t in e}function Boe(e,t){return Object.values(e).includes(t)}function _g(e,t){for(const n in e)if(e[n]===t)return n}function Doe(e,t,n){return{...e,[t]:n}}function h0(e,t){return t in e?qs(e,[t]):e}function Foe(e,t){const n=_g(e,t);return n===void 0?e:h0(e,n)}function OI(e,t,n){let s=h0(e,t);return s=Foe(s,n),Doe(s,t,n)}function _oe(e){return Object.keys(e).length}var Hoe=C(22431),Hg=C.n(Hoe);Hg().dynamicDrop(!0),Hg().pointerMoveTolerance(8);const _s=Hg();var da=C(49860);function Voe(e,{onStart:t,onMove:n,onEnd:s,isEnabled:r=!0}){const i=da.useRef({x:0,y:0}),a=da.useRef({x:0,y:0}),c=da.useRef(!1),l=da.useRef(null),d=da.useRef(void 0);da.useEffect(()=>{const h=e.current;if(!h||!r||c.current)return;l.current=v6(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(),p=f.x-a.current.x,g=f.y-a.current.y;(p!==0||g!==0)&&(i.current.x+=p,i.current.y+=g,e.current&&(e.current.style.transform=`translate3d(${i.current.x}px, ${i.current.y}px, 0)`,n?.({...i.current})),a.current=f)},_s(h).draggable({inertia:!1,autoScroll:{container:l.current,distance:5,interval:10,margin:50},listeners:{start:()=>{i.current={x:0,y:0},a.current=m(),l.current?.addEventListener("scroll",d.current,{passive:!0}),t?.()},move:f=>{i.current.x+=f.dx,i.current.y+=f.dy,h.style.transform=`translate3d(${i.current.x}px, ${i.current.y}px, 0)`,n?.({...i.current})},end:()=>{i.current={x:0,y:0},h.style.transform="",l.current?.removeEventListener("scroll",d.current),setTimeout(()=>{s?.()},0)}}}),c.current=!0,()=>{_s(h).unset(),l.current?.removeEventListener("scroll",d.current),c.current=!1}},[e,t,n,s,r])}var BI=C(49860);function zoe(e,{isEnabled:t=!0,onDrop:n,onEnter:s,onLeave:r,overlap:i=.015}){const a=BI.useRef(!1);BI.useEffect(()=>{const c=e.current;if(!(!c||!t||a.current))return _s(c).dropzone({overlap:i,listeners:{drop:()=>{n?.()},dragenter:()=>{s?.()},dragleave:()=>{r?.()}}}),a.current=!0,()=>{_s(c).unset(),a.current=!1}},[e,n,s,r,t,i])}var ss=C(49860);const DI=ss.memo(function({col:t,height:n,id:s,index:r,isActive:i,isFrozen:a,isMatched:c,isMoved:l,onClick:d,onDragEnd:h,onDragStart:m,onDrop:f,onDropZoneEnter:p,onDropZoneLeave:g,onKeyDown:v,value:x,valueOtherColumnActive:b,valueOtherColumnMatch:y}){const[T,S]=ss.useState(!1),I=ss.useRef(null),L=ss.useRef(null),E=Kt(),k=ss.useCallback(()=>{d({col:t,id:s,value:x})},[t,s,d,x]),N=ss.useCallback(()=>{S(!0),m({col:t,id:s,value:x})},[t,s,m,x]),R=ss.useCallback(()=>{h(),S(!1)},[h]),M=ss.useCallback(()=>{f({col:t,id:s,value:x})},[t,s,f,x]),A=ss.useCallback(()=>{p({col:t,id:s,value:x})},[t,s,p,x]),j=ss.useCallback(()=>{g()},[g]),P=ss.useCallback(H=>{v(H,{col:t,index:r})},[t,r,v]);ss.useEffect(()=>{t===1&&r===0||L.current?.setAttribute("tabindex","-1")},[]),Voe(I,{isEnabled:!a,onStart:N,onEnd:R}),zoe(I,{isEnabled:a,onDrop:M,onEnter:A,onLeave:j});const w=X()("matching-interaction-piece",{"matching-interaction-piece--matched":c,"matching-interaction-piece--moved":l}),D=y==null?null:(0,o.jsxs)(o.Fragment,{children:[E?.a11yMatchingItemMatchedWith," ",(0,o.jsx)(Pn,{value:y})]}),O=b==null?(0,o.jsx)(o.Fragment,{children:E?.a11yMatchingItemSelectableItem}):(0,o.jsxs)(o.Fragment,{children:[E?.a11yMatchingItemMatchWith," ",(0,o.jsx)(Pn,{value:b})]}),B=X()("matching-interaction-item",{draggable:!a,"draggable--dragging":!a&&T,droppable:a});return(0,o.jsx)("li",{className:B,ref:I,role:"listitem",children:(0,o.jsxs)("button",{"aria-pressed":i||c?!0:void 0,className:w,"data-state":i?"active":void 0,onClick:T?void 0:k,onKeyDown:P,ref:L,style:n?{height:n}:void 0,type:"button",children:[a?(0,o.jsx)("span",{className:"matching-interaction-piece-decoration"}):(0,o.jsx)(ce,{className:"matching-interaction-piece-decoration",name:"grip-dots-vertical"}),t===2?(0,o.jsx)("span",{className:"matching-interaction-piece-jigsaw"}):null,(0,o.jsx)("span",{className:"matching-interaction-piece-content",children:(0,o.jsx)("span",{"data-matching-interaction-piece-content-inline":"",children:(0,o.jsx)(Pn,{value:x})})}),(0,o.jsx)("span",{className:"visually-hidden-always",children:D}),(0,o.jsx)("span",{className:"visually-hidden-always",children:O})]},s)})});var Xe=C(49860);function $oe({answers:e,columnBehavior:t,isActive:n,itemHeight:s,matches:r,onChange:i,onChangeItemHeight:a,onChangeRows:c,prefersKeyboardNavigation:l}){const d=(0,ze.A)(n),h=(0,ze.A)(t),m=(0,ze.A)(e),f=(0,ze.A)(r),p=Kt(),[g,v]=Xe.useState(void 0),[x,b]=Xe.useState(void 0),[y,T]=Xe.useState(void 0),[S,I]=Xe.useState(!1),L=Xe.useRef(null),E=Xe.useRef(null),k=Xe.useRef(null),N=Xe.useRef(void 0),R=Xe.useRef(void 0),[M,A]=Xe.useState(()=>m0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),[j,P]=Xe.useState(()=>m0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})),w=Xe.useMemo(()=>e.map(U=>({col:1,id:U.id,value:U.title})).toSorted((U,Q)=>{const Z=M.get(U.id)??1/0,q=M.get(Q.id)??1/0;return Z-q}),[e,M]),D=Xe.useMemo(()=>e.map(U=>({col:2,id:U.id,value:U.matchTitle})).toSorted((U,Q)=>{const Z=j.get(U.id)??1/0,q=j.get(Q.id)??1/0;return Z-q}),[e,j]),O=Xe.useCallback(()=>{for(const F of L.current?.querySelectorAll('button:not([tabindex="-1"])')??[])F.setAttribute("tabindex","-1")},[]),B=Xe.useCallback(F=>{const U=Array.from(M),Q=Array.from(j);if(t==="freezeSecond"){const Z=new Array(Q.length),q=U.map(ae=>ae[0]).filter(ae=>!(ae in F));for(const[ae,ue]of Object.entries(F)){const Te=j.get(ue);Z[Te]=[ae,Te]}for(let ae=0;ae<Z.length;ae++)if(Z[ae]==null){const ue=q.shift();Z[ae]=[ue,ae]}const te=new Map(Z),ne=FI(M,te);ne.length>0&&b(ne),A(te)}else{const Z=new Array(U.length),q=new Set(Object.values(F)),te=Q.map(ue=>ue[0]).filter(ue=>!q.has(ue));for(const[ue,Te]of Object.entries(F)){const we=M.get(ue);Z[we]=[Te,we]}for(let ue=0;ue<Z.length;ue++)if(Z[ue]==null){const Te=te.shift();Z[ue]=[Te,ue]}const ne=new Map(Z),ae=FI(j,ne);ae.length>0&&T(ae),P(ne)}},[t,M,j]),H=Xe.useCallback(F=>{N.current=F},[]),_=Xe.useCallback(()=>{R.current==null&&(N.current=void 0)},[]),$=Xe.useCallback(F=>{R.current=F},[]),z=Xe.useCallback(()=>{R.current=void 0},[]),K=Xe.useCallback(F=>{const U=N.current;if(U!=null){const Q=F.col===1?F.id:U.id,Z=F.col===1?U.id:F.id,q=OI(r,Q,Z);N.current=void 0,R.current=void 0,i(q)}},[r,i]),J=Xe.useCallback(F=>{let U=null,Q=!1,Z=g;if(F.col===1&&F.id in r)U=h0(r,F.id),Z=null;else if(F.col===2&&_g(r,F.id)){const q=_g(r,F.id);U=h0(r,q),Z=null}else g==null&&(Z={col:F.col,id:F.id,value:F.value},Q=!0);if(g!=null)if(g.col===F.col)g.id===F.id?Z=null:Z={col:F.col,id:F.id,value:F.value};else{const q=F.col===1?F.id:g.id,te=F.col===1?g.id:F.id;U=OI(r,q,te),Q=!0,Z=null}if(U!=null&&i(U),g!==Z&&v(Z),Q){const te=(F.col===1?k:E).current?.querySelector('button:not([aria-pressed="true"])');te&&(O(),te.removeAttribute("tabindex"),te.focus({preventScroll:!l}))}},[l,g,r,i,O]),Y=Xe.useCallback((F,{col:U,index:Q})=>{const Z=F.currentTarget;let q=!1,te=null;switch(F.key){case"ArrowUp":q=!0,te=Z.parentElement.previousElementSibling?.firstElementChild;break;case"ArrowDown":q=!0,te=Z.parentElement.nextElementSibling?.firstElementChild;break;case"ArrowRight":q=!0,te=U===1?k.current?.children[Q]?.firstElementChild:void 0;break;case"ArrowLeft":q=!0,te=U===2?E.current?.children[Q]?.firstElementChild:void 0;break;case"Home":q=!0,te=Z.closest("ul").firstElementChild.firstElementChild;break;case"End":q=!0,te=Z.closest("ul").lastElementChild.firstElementChild;break}q&&(F.preventDefault(),F.stopPropagation()),te&&(O(),te.removeAttribute("tabindex"),te.focus())},[O]);Xe.useEffect(()=>{r!==f&&!Moe(r)&&B(r)},[B,r,f]),Xe.useEffect(()=>{const F=({shouldFocus:Z})=>{const q=g.col===1?E:k;O();const te=q.current.querySelector('button[data-state="active"]');te?.removeAttribute("tabindex"),Z&&te?.focus(),v(null)},U=Z=>{L.current?.contains(Z.target)||F({shouldFocus:!1})},Q=Z=>{cn(Z)&&g!=null&&F({shouldFocus:!0})};return g==null?(document.removeEventListener("mousedown",U),document.removeEventListener("keydown",Q)):(document.addEventListener("mousedown",U),document.addEventListener("keydown",Q)),()=>{document.removeEventListener("mousedown",U),document.removeEventListener("keydown",Q)}},[g,O]);const G=Xe.useCallback(()=>{const F=Array.from(L.current?.querySelectorAll("[data-matching-interaction-piece-content-inline]")??[]);if(F.length===0)return;const U=F[0].closest("button");let Q=0,Z;if(U){const te=window.getComputedStyle(U),ne=parseFloat(te.paddingBlockStart)+parseFloat(te.paddingBlockEnd),ae=parseFloat(te.borderTopWidth)+parseFloat(te.borderBottomWidth);Q=ne+ae,Z=parseFloat(te.minHeight)}const q=F.reduce((te,ne)=>Math.max(te,ne.scrollHeight+Q),0);Z&&Z>=q?a(void 0):a(q)},[a]);return Xe.useEffect(()=>{(!d&&n||m!==e)&&G()},[d,n,e,m,G]),Xe.useEffect(()=>{const F=L.current?.closest(".quiz-card");let U;return F!=null&&(U=new ResizeObserver(()=>{G()}),U.observe(F)),()=>{F!=null&&U!=null&&U.unobserve(F)}},[G]),Xe.useEffect(()=>{let F,U;return x&&(F=setTimeout(()=>{b(void 0)},1e3)),y&&(U=setTimeout(()=>{T(void 0)},1e3)),()=>{clearTimeout(F),clearTimeout(U)}},[x,y]),Xe.useEffect(()=>{S&&h!==t&&(i({}),B({}),v(void 0),A(m0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeSecond"})),P(m0({answers:e,columnBehavior:t,columnBehaviorToShuffle:"freezeFirst"})))},[S,t,h,e,i,B]),Xe.useEffect(()=>{if(w.length<=0)return;const F=w.map((U,Q)=>[U,D[Q]]);c(F)},[w,D,c]),Xe.useEffect(()=>{I(!0)},[]),(0,o.jsxs)("div",{className:"matching-interaction","data-testid":"matching-interaction",ref:L,children:[(0,o.jsx)("ul",{"aria-label":p?.a11yMatchingColumn1,className:"matching-interaction-col matching-interaction-col-1","data-col":"1",ref:E,role:"list",children:w.map((F,U)=>{const Q=Ooe(r,F.id);return(0,o.jsx)(DI,{col:1,height:s,id:F.id,index:U,isActive:g?.col===1&&g?.id===F.id,isFrozen:t==="freezeFirst",isMatched:Q,isMoved:x?.map(Z=>Z.id).includes(F.id)??!1,onClick:J,onDragEnd:_,onDragStart:H,onDrop:K,onDropZoneEnter:$,onDropZoneLeave:z,onKeyDown:Y,value:F.value,valueOtherColumnActive:g?.col===2?g?.value:void 0,valueOtherColumnMatch:Q?D[U]?.value:void 0},F.id)})}),(0,o.jsx)("ul",{"aria-label":p?.a11yMatchingColumn2,className:"matching-interaction-col matching-interaction-col-2","data-col":"2",ref:k,role:"list",children:D.map((F,U)=>{const Q=Boe(r,F.id);return(0,o.jsx)(DI,{col:2,height:s,id:F.id,index:U,isActive:g?.col===2&&g?.id===F.id,isFrozen:t==="freezeSecond",isMatched:Q,isMoved:y?.map(Z=>Z.id).includes(F.id)??!1,onClick:J,onDragEnd:_,onDragStart:H,onDrop:K,onDropZoneEnter:$,onDropZoneLeave:z,onKeyDown:Y,value:F.value,valueOtherColumnActive:g?.col===1?g?.value:void 0,valueOtherColumnMatch:Q?w[U]?.value:void 0},F.id)})})]})}const m0=({answers:e,columnBehavior:t,columnBehaviorToShuffle:n})=>{let s=e.map(r=>r.id);return t===n&&(s=(0,bh.shuffle)(s)),new Map(s.map((r,i)=>[r,i]))};function FI(e,t){const n=[];for(const[s,r]of e){const i=t.get(s);i!==r&&n.push({id:s,from:r,to:i})}return n}var f0=C(49860);function _I({columnBehavior:e="freezeSecond",matches:t={},onChange:n=()=>{},revealAnswers:s="none",...r}){const[i,a]=f0.useState([]),[c,l]=f0.useState(void 0),d=f0.useCallback(m=>{a(m)},[]),h=f0.useCallback(m=>{l(m)},[]);return r.isComplete?(0,o.jsx)(Poe,{...r,columnBehavior:e,itemHeight:c,revealAnswers:s,rows:i}):(0,o.jsx)($oe,{...r,columnBehavior:e,itemHeight:c,matches:t,onChange:n,onChangeItemHeight:h,onChangeRows:d})}function HI(e){return e==null||e===-1}function Uoe(e,t){return e===t}const Goe=({allowTabNavigation:e=!1,color:t,correctId:n="",errorMessageId:s,isComplete:r,isCorrect:i=!1,isReduceMotion:a=!1,labels:c,onChange:l=()=>{},onEnterToSubmit:d=()=>{},options:h=[],questionHtmlId:m="",renderOptionText:f,isRetaking:p,revealAnswers:g=Ee.NONE,selectedIndex:v=-1,shouldFocusFirst:x,onFocusFirstComplete:b})=>{const y=HI(v);return(0,o.jsx)(Zc,{"aria-invalid":s?!0:void 0,"aria-labelledby":[m,s].filter(Boolean).join(" "),"aria-required":"true",role:"radiogroup",children:h.map((T,S,I)=>(0,o.jsx)(Woe,{allowTabNavigation:e,color:t,id:T.id,index:S,isComplete:r,isCorrect:i,isCorrectOption:n===T.id,isFirst:S===0,isFresh:y,isLast:S===I.length-1,isReduceMotion:a,isRetaking:p,isSelected:!p&&Uoe(v,S),labels:c,onChange:l,onEnterToSubmit:d,onFocusFirstComplete:b,questionHtmlId:m,renderOptionText:f,revealAnswers:g,shouldFocusFirst:x,title:T.title},T.id))})},Woe=({allowTabNavigation:e,color:t,id:n,index:s,isComplete:r,isCorrect:i,isCorrectOption:a,isFresh:c,isSelected:l,isReduceMotion:d,labels:h,onChange:m,onEnterToSubmit:f,questionHtmlId:p,renderOptionText:g,isRetaking:v,revealAnswers:x,shouldFocusFirst:b,onFocusFirstComplete:y,title:T})=>{const[S]=(0,u.useState)(()=>Wr()("qmc-")),I=(0,u.useRef)(null),L=(0,ze.A)(l),E=!!r,k=e&&(l||c&&s===0)?0:-1,N=x===Ee.ALL,R=x==Ee.INCORRECT,M=N||R&&i,A=N||R&&i||R&&!i&&l,j=r&&a&&M,P=r&&!a&&A,w=(j||P)&&!v,D=w?`${S}-result`:void 0,O=X()("quiz-multiple-choice-option",{"is-complete":r,"is-correct":j,"is-incorrect":P,"is-selected":l}),B=X()("quiz-multiple-choice-option__dot",{"quiz-multiple-choice-option__dot--active":l&&!r}),H=X()("quiz-multiple-choice-option__check",{"quiz-multiple-choice-option__check--active":j}),_=X()("quiz-multiple-choice-option__x",{"quiz-multiple-choice-option__x--active":P}),$=X()("quiz-multiple-choice-option__border"),z=(0,u.useCallback)(G=>{Oi(G)&&f(G)},[f]),K=(0,u.useCallback)(()=>{m({selectedIndex:s})},[s,m]),J=(0,u.useCallback)(()=>{l&&m({selectedIndex:s})},[s,l,m]),Y=r?void 0:z;return(0,u.useEffect)(()=>{e&&I.current&&(!L&&l?I.current.focus({preventScroll:d}):b&&c&&s===0&&(I.current.focus({preventScroll:d}),y?.()))},[e,l,d,L,b,c,s,y]),(0,o.jsxs)("div",{"data-testid":"quiz-card-option",children:[(0,o.jsxs)("label",{"aria-describedby":D,className:O,ref:I,children:[(0,o.jsx)("input",{checked:l,className:"quiz-multiple-choice-option__input",disabled:E,name:p,onChange:K,onClick:r?void 0:J,onKeyDown:Y,tabIndex:k,type:"radio"}),(0,o.jsxs)("div",{className:"quiz-multiple-choice-option__indicator",style:{color:t},children:[(0,o.jsx)(xG,{className:B,dataTestId:l&&!r?"selected-dot-active":"selected-dot"}),(0,o.jsx)(V3,{className:H,"data-testid":j?"correct-check-active":"correct-check"}),(0,o.jsx)(W3,{"aria-hidden":"true",className:_,dataTestId:P?"incorrect-x-active":"incorrect-x",overrideStyle:!0})]}),(0,o.jsx)("div",{className:$}),(0,o.jsx)("div",{className:"quiz-multiple-choice-option__text","data-testid":"quiz-mc-option-text",children:g({optionId:n,title:T})})]}),w&&(0,o.jsxs)("div",{className:"visually-hidden-always",id:D,children:[l&&a&&h?.a11yQuizReviewCorrectlySelected,l&&!a&&h?.a11yQuizReviewIncorrectlySelected,!l&&a&&h?.a11yQuizReviewIncorrectlyUnselected,!l&&!a&&h?.a11yQuizReviewCorrectlyUnselected]})]})},VI=Goe;function Koe(e){return e.length===0}function Qoe(e,t){return e.includes(t)}function Zoe(e,t){return e.includes(t)?e.filter(n=>n!==t):[...e,t]}const Yoe=({allowTabNavigation:e=!1,correctIds:t=[],errorMessageId:n,isComplete:s,isCorrect:r=!1,labels:i,onChange:a=()=>{},onEnterToSubmit:c=()=>{},options:l=[],questionHtmlId:d="",renderOptionText:h,isRetaking:m,revealAnswers:f=Ee.NONE,selectedIndices:p=[]})=>(0,o.jsx)("div",{"aria-labelledby":[d,n].filter(Boolean).join(" "),role:"group",children:(0,o.jsx)("ul",{children:l.map((g,v)=>(0,o.jsx)(qoe,{allowTabNavigation:e,errorMessageId:n,id:g.id,index:v,isComplete:s,isCorrect:r,isCorrectOption:t.includes(g.id),isRetaking:m,isSelected:!m&&Qoe(p,v),labels:i,onChange:a,onEnterToSubmit:c,renderOptionText:h,revealAnswers:f,title:g.title},g.id))})}),qoe=({allowTabNavigation:e,errorMessageId:t,id:n,index:s,isComplete:r,isCorrect:i,isCorrectOption:a,isSelected:c,labels:l,onChange:d,onEnterToSubmit:h,renderOptionText:m,isRetaking:f,revealAnswers:p,title:g})=>{const[v]=(0,u.useState)(()=>Wr()("qmr-")),x=r&&p===Ee.ALL&&!f,b=x?`${v}-result`:void 0,y=!!r,T=e?0:-1,S=p===Ee.ALL,I=p==Ee.INCORRECT,L=S||I&&i||I&&!i&&c,E=X()("quiz-multiple-response-option",{"quiz-multiple-response-option--complete":r,"quiz-multiple-response-option--selected":c,"quiz-multiple-response-option--correct":r&&a&&L,"quiz-multiple-response-option--incorrect":r&&!a&&L}),k=X()("quiz-multiple-response-option__border"),N=(0,u.useCallback)(A=>{Oi(A)&&h(A)},[h]),R=(0,u.useCallback)(()=>{d({optionIndex:s})},[s,d]),M=r?void 0:N;return(0,o.jsxs)("li",{children:[(0,o.jsxs)("label",{"aria-describedby":b,className:E,children:[(0,o.jsx)("input",{"aria-describedby":t||void 0,"aria-invalid":t?!0:void 0,checked:c,className:"quiz-multiple-response-option__input",disabled:y,onChange:r?void 0:R,onKeyDown:M,tabIndex:T,type:"checkbox"}),(0,o.jsxs)("div",{className:"quiz-multiple-response-option__indicator",children:[(0,o.jsx)(V3,{className:"quiz-multiple-response-option__check"}),(0,o.jsx)(W3,{"aria-hidden":"true",className:"quiz-multiple-response-option__x",height:"8",overrideStyle:!0,width:"8"})]}),(0,o.jsx)("div",{className:k}),(0,o.jsx)("div",{className:"quiz-multiple-response-option__text",children:m({optionId:n,title:g})})]}),x&&(0,o.jsxs)("div",{className:"visually-hidden-always",id:b,children:[c&&a&&l?.a11yQuizReviewCorrectlyChecked,c&&!a&&l?.a11yQuizReviewIncorrectlyChecked,!c&&a&&l?.a11yQuizReviewIncorrectlyUnchecked,!c&&!a&&l?.a11yQuizReviewCorrectlyUnchecked]})]})},zI=Yoe;var Q3e,Xoe,Joe,Z3e,Y3e,q3e,X3e;const ere=ko()(dt()("correct",!0)),J3e=e=>Xoe(Joe(e),Vg),tre=e=>({MATCHING:je(),FILL_IN_THE_BLANK:zg,MULTIPLE_CHOICE:je(),MULTIPLE_RESPONSE:je()})[e],Vg=Ue()(uh()("id"),ere),nre=Ue()(zo(),Vg),zg=ko()(dt()("correct",!0)),sre=Ue()(st()("id"),zo()),e6e=null,{FILL_IN_THE_BLANK:ore,MATCHING:$I,MULTIPLE_CHOICE:rre,MULTIPLE_RESPONSE:ire}=oe;function UI({type:e,text:t="",matches:n={},answersLength:s=0,selectedIndices:r=[],selectedIndex:i}){switch(e){case ore:return!Dv(t);case $I:return _oe(n)===s;case ire:return!Koe(r);case rre:default:return!HI(i)}}function are({answered:e=!1,...t}){return e&&t.type!==$I?!1:UI(t)}function GI(e,t){const n=e.trim();return t?n:n.toLowerCase()}function WI({answers:e,text:t,caseSensitive:n=!1,getL10nValue:s}){if(!t)return!1;const r=GI(t,n);return e.some(i=>{const a=s(i.title);return typeof a!="string"?!1:GI(a,n)===r})}function KI(e){return Object.entries(e).every(([t,n])=>t===String(n))}function cre(e){const t=e.answers??[],n=e.correct;if(n!=null)return t.findIndex(r=>r.id===n);const s=t.findIndex(r=>r.correct===!0);return s===-1?0:s}function QI({isCorrectAnswerUnshuffled:e=!1,isShuffled:t=!1,item:n,selectedIndex:s,shuffledAnswerIndices:r}){if(s==null||t&&!Array.isArray(r))return!1;const i=t&&!e?r.indexOf(s):s,a=cre(n);return i===a}function lre(e,t){return t.map(n=>e.indexOf(n))}function dre(e){return typeof e=="object"&&e!==null&&"id"in e?e.id:e}function ure(e){const t=e.answers??[],n=e.corrects??[];return n.length>0?n.map(i=>{const a=dre(i);return t.findIndex(c=>c.id===a)}).filter(i=>i>=0).sort((i,a)=>i-a):t.map((r,i)=>r.correct===!0?i:-1).filter(r=>r>=0).sort((r,i)=>r-i)}function ZI(e){return[...e].sort((t,n)=>t-n)}function YI({isShuffled:e=!1,item:t,selectedIndices:n,shuffledAnswerIndices:s}){if(!Array.isArray(n)||e&&!Array.isArray(s))return!1;const r=e?lre(s,n):n,i=ure(t),a=ZI(r),c=ZI(i);return a.length!==c.length?!1:a.every((l,d)=>l===c[d])}function qI({answers:e,feedback:t,feedbackCorrect:n,feedbackIncorrect:s,feedbackType:r,isCorrect:i,isShuffled:a=!1,selectedIndex:c,shuffledAnswerIndices:l}){switch(r){case"CHOICE":{if(c==null||!e)return;const d=a&&Array.isArray(l)?l.indexOf(c):c;return e[d]?.feedback}case"CORRECT_INCORRECT":return i?n:s;default:return t}}function hre(e){return e==="a"?46.5:7.6}function mre(e){return e==="d"?2:3.2}function fre(e){switch(e){case"a":return 30;case"c":case"d":return 92;default:return 76}}function XI(e){switch(e){case"b":return 95;case"background":return 52;default:return 76}}function $g(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 pre(e){return .3}function t6e(e){switch(e){case 3:return"three";case 4:return"four";default:return"two"}}function gre(e){return e==="light"?"#fff":"#000"}function n6e(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 s6e(e){return e==="b"?[52,76,95]:[52,76,92]}function o6e(e){return e==="a"?[30,76,92]:[52,76,92]}function r6e(e){return e==="d"?[2,4.8,5.6]:[3.2,4.8,5.6]}function i6e(e){return e==="a"?[46.5,78,120]:[7.6,20,32]}function vre(e){switch(e){case 3:return"sm";case 10:return"lg";default:return"med"}}function Ug(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 Cre(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function JI(e){switch(e){case 52:return"sm";case 76:return"med";default:return"lg"}}function e4(e){switch(e){case 4:return"med";case 6:return"lg";default:return"sm"}}function p0(e){switch(e){case 52:return"sm";case 92:return"lg";default:return"med"}}function xre(e){switch(e){case 30:case 52:return"sm";case 92:return"lg";default:return"med"}}function bre(e){switch(e){case 4.8:return"med";case 5.6:return"lg";default:return"sm"}}function yre(e){switch(e){case 20:case 78:return"med";case 32:case 120:return"lg";default:return"sm"}}function Sre(e){switch(e){case 1:return"sm";case 3:return"lg";default:return"med"}}function Ire(e){switch(e){case 3.2:return"med";case 5.6:return"lg";default:return"sm"}}const{FILL_IN_THE_BLANK:ua,MATCHING:g0,MULTIPLE_CHOICE:v0,MULTIPLE_RESPONSE:C0}=oe,Tre={FILL_IN_THE_BLANK:"a11yBlockKnowledgeCheckFIB",MATCHING:"a11yBlockKnowledgeCheckM",MULTIPLE_CHOICE:"a11yBlockKnowledgeCheckMC",MULTIPLE_RESPONSE:"a11yBlockKnowledgeCheckMR"},Lre=Mt()(null,[0,"type"]),Gg=yn();class t4 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-${c0()}`},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(Je,this.previewOnly__forceShowFeedback),window.addEventListener(wf,this.previewOnly__clearOverrides),this.id=Wr()("kc-")}componentDidUpdate(t,n){n.answered&&!this.state.answered?this.getType()!==ua&&Pp(this.wrapper):!n.answered&&this.state.answered&&setTimeout(()=>{this.takeAgainRef.current?this.takeAgainRef.current.focus():this.feedbackRef.current?.focus()},0)}componentWillUnmount(){this.retakeAnimationStageOne&&(clearTimeout(this.retakeAnimationStageOne),this.retakeAnimationStageOne=null),this.retakeAnimationStageTwo&&(clearTimeout(this.retakeAnimationStageTwo),this.retakeAnimationStageTwo=null),window.removeEventListener(Je,this.previewOnly__forceShowFeedback),window.removeEventListener(wf,this.previewOnly__clearOverrides)}previewOnly__forceShowFeedback(t){const{itemId:n,path:s}=t.detail,{getL10nValue:r}=this.props;if(n!==this.props.blockId)return;const i=s.at(-1);if(typeof i=="string"&&i.startsWith?.("feedback")){const a=i==="feedbackCorrect",c=s.indexOf("answers"),l=s[c+1],d=c>-1&&typeof l!="string"?l.id:null,h={forceShowFeedback:!0,forceShowFeedbackCorrect:a,forceShowFeedbackMessage:""};if(d&&"answers"in this.props.items[0]){const m=this.props.items[0].answers.find(({id:p})=>p===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 ua:return this.state.fillInText;case g0:return this.state.matches;case C0:return this.state.selectedIndices;case v0:default:return this.state.selectedAnswer}}handleMatchesChange=t=>{this.setState({errorIncomplete:!1,matches:t})};handleMultipleResponseChange({optionIndex:t}){const{selectedIndices:n}=this.state;this.setState({errorIncomplete:!1,selectedIndices:Zoe(n,t)})}handleChoiceSelect({selectedIndex:t}){const{answered:n}=this.state;n||this.setState({errorIncomplete:!1,selectedAnswer:t,chosen:!0})}onSubmit(t,n,s,r,i){if(!n){switch(this.setState({errorIncomplete:!0}),r.type){case ua:this.wrapper?.querySelector("input")?.focus();break;case C0:case v0:this.wrapper?.querySelector("input")?.focus();break;case g0:default:break}return}i?.preventDefault(),this.setState({answered:!0,isRetaking:!1}),s&&this.props.onStep({id:t})}handleFillIn(t){this.setState({errorIncomplete:!1,fillInText:t})}handleRetake(t){const{blockId:n,lessonId:s,settings:r}=this.props,{id:i}=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},()=>{!Gg&&this.getType()===ua&&Pp(this.wrapper),this.retakeAnimationStageTwo=null}),r?.retryCount!=null&&this.props.onRetryAttempt?.({blockId:n,itemId:i,lessonId:s})},950)}resetErrorIncomplete(){this.state.errorIncomplete&&this.setState({errorIncomplete:!1})}resetShouldFocusFirst=()=>{this.state.shouldFocusFirst&&this.setState({shouldFocusFirst:!1})};renderQuestionTitle({title:t}){return(0,o.jsx)(et,{className:"quiz-card__title",id:this.state.questionHtmlId,value:t})}renderQuestion(t){const{answered:n,errorIncomplete:s,isRetaking:r,selectedAnswer:i}=this.state,{blockId:a,enableVideoPlaybackSpeed:c,getL10nValue:l,labels:d,progress:h,renderQuestionTitle:m=this.renderQuestionTitle,settings:f}=this.props,{quizCorrect:p,quizIncorrect:g,quizRequireAnswer:v,quizSubmit:x,quizTakeAgain:b}=d,{id:y,type:T}=t,S=t.type!=="DRAW_FROM_QUESTION_BANK"?t.settings:{},I=l("media"in t?t.media:{}),L=this.state.forceShowFeedbackCorrect||this.getIsCorrect({item:t}),E=this.getCanSubmit({item:t}),k=f?.requireCorrectAnswer?L:!0,N=this.onSubmit.bind(this,y,E,k,t),R=this.getFeedback({item:t,isCorrect:L,selectedAnswer:i}),M=this.getSelection({item:t}),{columnBehavior:A,correctAnswerColor:j,correctAnswerColorContrast:P,incorrectAnswerColor:w,incorrectAnswerColorContrast:D}=f,O=L?j:w,B=d.knowledgeCheckCorrectAnswerRequiredBlock,H=d.knowledgeCheckRetriesAttemptsRemaining,_=d.knowledgeCheckMaxRetriesReached,$=h?.items?.[a]?.items?.[y]?.retryAttemptCount??0,z=f?.retryCount!==0&&(f?.retryCount==null||f?.retryCount===-1||$<f?.retryCount),K=f?.retryCount!=null||f?.retryCount===-1?f?.retryCount-$:-1,J=!L,Y={"--color-feedback-icon":O,"--color-matching-feedback-bubble-bg":w,"--color-multiple-choice-complete-border":w,"--color-multiple-choice-correct-border":j,"--color-multiple-response-correct-border":j,"--color-multiple-response-incorrect-border":w,"--color-multiple-response-option-check":n?j:void 0,"--color-quiz-option-check":j,"--color-x-fill":w},F=f?.revealCorrectAnswers!==!1&&(f.retryCount==null||f.retryCount===-1||!z)?Ee.ALL:Ee.INCORRECT,U=X()("block-knowledge__retake-container",{"block-knowledge__retake-container--active":n,"block-knowledge__retake-container--active-attempts-left":n&&!r&&K>0}),Q=X()("block-knowledge__retake",{"block-knowledge__retake--active":n&&!r&&z}),Z=X()("block-knowledge__retake","block-knowledge__attempts-left",{"block-knowledge__retake--active":n&&!r&&z&&K>0}),q=X()("block-knowledge__retake","block-knowledge__no-more-attempts",{"block-knowledge__retake--active":n&&!r&&!z}),te=!!I?.image,ne=!!I?.audio,ae=!!I?.video,ue=!!I?.embed;let Te=null;ne&&te?Te=(0,o.jsx)(or,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${y}-audio`,isOverlayAudio:!0,item:t,labels:d,media:I,settings:S}):ne&&(ae||ue)?Te=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(or,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${y}-audio`,item:t,labels:d,media:{audio:I.audio},settings:S}),(0,o.jsx)(or,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${y}-video`,item:t,labels:d,media:ae?{video:I.video}:{embed:I.embed},settings:S})]}):Te=(0,o.jsx)(or,{blockId:a,enableVideoPlaybackSpeed:c,index:`${a}-${y}-audio`,item:t,labels:d,media:I,settings:S});const we=X()("block-knowledge__media",{"block-knowledge__image-with-audio":ne&&te});return(0,o.jsxs)(kI,{isActive:!0,style:Y,children:[f?.requireCorrectAnswer&&(n&&!L||!n)&&(0,o.jsxs)("div",{className:"quiz-card__require-correct-answer-disclaimer",children:[(0,o.jsx)(ce,{className:"quiz-card__require-correct-answer-disclaimer-icon",name:"info-circle"}),B]}),m(t),(0,o.jsx)("div",{className:we,children:Te}),(0,o.jsx)(AI,{type:T,children:this.renderType({columnBehavior:A,correctAnswerColor:j,correctAnswerColorContrast:P,incorrectAnswerColor:w,incorrectAnswerColorContrast:D,isCorrect:L,item:t,onSubmit:N})}),(0,o.jsx)("div",{"aria-live":"assertive",children:s&&(0,o.jsxs)("div",{className:"quiz-card__validations","data-testid":"quiz-validation-error",children:[(0,o.jsx)("span",{"data-testid":"quiz-validation-icon",children:(0,o.jsx)(ce,{className:"quiz-card__validation-icon",name:"alert-circle"})}),(0,o.jsx)("span",{id:`${this.id}-error-incomplete-message`,children:v})]})}),(0,o.jsx)(EI,{canProceed:n,canSubmit:E,isReduceMotion:Gg,onSubmit:N,quizSubmit:x}),(0,o.jsx)(jI,{canProceed:this.state.forceShowFeedback||n,feedbackRef:this.feedbackRef,feedbackValue:R,isActive:n,isComplete:n,isCorrect:L,item:t,labels:d,quizCorrect:p,quizIncorrect:g,revealAnswers:F,selection:M}),(0,o.jsxs)("div",{"aria-hidden":!n,className:U,children:[J&&(0,o.jsxs)(o.Fragment,{children:[z?(0,o.jsxs)(LI,{allowTabNavigation:n,className:Q,onClick:this.handleRetake.bind(this,t),ref:this.takeAgainRef,size:"md",variant:"outlined",children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"arrow-rotate-left"}),b]}):null,K>0&&(0,o.jsxs)("div",{className:Z,children:[H," ",K]})]}),!z&&!L&&(0,o.jsx)("div",{className:q,children:_})]})]},y)}getIsCorrect({item:t}){const{fillInText:n,matches:s,selectedAnswer:r,selectedIndices:i}=this.state,{type:a}=t,c="answers"in t?t.answers:void 0,l="isCaseSensitive"in t?t.isCaseSensitive:!1;switch(a){case ua:return WI({answers:zg(c),text:n,caseSensitive:l,getL10nValue:this.props.getL10nValue});case g0:return KI(s);case C0:return YI({item:{answers:c},selectedIndices:i});case v0:default:return QI({item:{answers:c},selectedIndex:r})}}getType(){const{items:t}=this.props;return Lre(t)}getCanSubmit({item:t}){const n="answers"in t?t.answers:void 0,{answered:s,fillInText:r,matches:i,selectedAnswer:a,selectedIndices:c}=this.state;return are({type:t.type,text:r,matches:i,answersLength:n?.length??0,selectedIndices:c,selectedIndex:a,answered:s})}getFeedback({item:t,isCorrect:n,selectedAnswer:s}){if(this.state.forceShowFeedbackMessage)return this.state.forceShowFeedbackMessage;const r="feedback"in t?t.feedback:void 0,i="feedbackCorrect"in t?t.feedbackCorrect:void 0,a="feedbackIncorrect"in t?t.feedbackIncorrect:void 0,c="feedbackType"in t?t.feedbackType:void 0,l="answers"in t?t.answers:void 0,d=this.state.forceShowFeedbackCorrect??n;return qI({answers:l,feedback:r,feedbackCorrect:i,feedbackIncorrect:a,feedbackType:c,isCorrect:d,selectedIndex:typeof s=="number"?s:null})}getTypeLabel(){const{labels:t}=this.props,n=this.getType(),s=Tre[n];return s?t?.[s]:t?.a11yBlockKnowledgeCheck}renderMultipleResponseOptionText(t,{title:n}){return(0,o.jsx)(et,{className:"cursorAuto",value:n})}renderMultipleChoiceOptionText(t,{title:n}){return(0,o.jsx)(et,{className:"quiz-multiple-choice-option__label cursorAuto",value:n})}renderType({columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isCorrect:a,item:c,onSubmit:l}){const{isHidden:d,labels:h,prefersKeyboardNavigation:m,renderMultipleResponseOptionText:f=this.renderMultipleResponseOptionText,renderMultipleChoiceOptionText:p=this.renderMultipleChoiceOptionText,settings:g,progress:v,blockId:x}=this.props,{answered:b,fillInText:y,isRetaking:T,matches:S,selectedAnswer:I,selectedIndices:L,shouldFocusFirst:E,questionHtmlId:k}=this.state,{id:N,type:R}=c,M="answers"in c?c.answers:[],{quizAcceptableResponses:A,quizAnswerPlaceholder:j}=h,P=v?.items?.[x]?.items?.[N]?.retryAttemptCount??0,w=g?.retryCount!==0&&(g?.retryCount==null||g?.retryCount===-1||P<g?.retryCount),O=g?.revealCorrectAnswers!==!1&&(g.retryCount==null||g.retryCount===-1||!w)?Ee.ALL:Ee.INCORRECT,B=this.state.errorIncomplete?`${this.id}-error-incomplete-message`:void 0;switch(R){case ua:return(0,o.jsx)(MI,{allowTabNavigation:!0,correctAnswerColor:n,correctAnswerColorContrast:s,errorMessageId:B,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isComplete:b,isCorrect:a,labels:h,onChange:this.handleFillIn,onEnterToSubmit:l,options:zg(M),questionHtmlId:k,quizAcceptableResponses:A,quizAnswerPlaceholder:j,revealAnswers:O,value:y});case g0:return(0,o.jsx)(_I,{answers:tre(R)(M),columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:r,incorrectAnswerColorContrast:i,isActive:!d,isComplete:b,matches:S,onChange:this.handleMatchesChange,prefersKeyboardNavigation:m,revealAnswers:O});case C0:return(0,o.jsx)(zI,{allowTabNavigation:!0,correctIds:Vg(M),errorMessageId:B,isComplete:b,isCorrect:a,isRetaking:T,labels:h,onChange:this.handleMultipleResponseChange,onEnterToSubmit:l,options:M,questionHtmlId:k,renderOptionText:f.bind(this,c),revealAnswers:O,selectedIndices:L});case v0:default:return(0,o.jsx)(VI,{allowTabNavigation:!0,correctId:nre(M)||sre(M),errorMessageId:B,isComplete:b,isCorrect:a,isReduceMotion:Gg,isRetaking:T,labels:h,onChange:this.handleChoiceSelect,onEnterToSubmit:l,onFocusFirstComplete:this.resetShouldFocusFirst,options:M,questionHtmlId:k,renderOptionText:p.bind(this,c),revealAnswers:O,selectedIndex:I,shouldFocusFirst:E})}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i,variant:a}=this.props,{answered:c,isRetaking:l}=this.state,{entranceAnimation:d,knowledgeCheckWidth:h=76}=i,m=p0(h),f=X()("block-knowledge",{"block-knowledge--answered":c,"block-knowledge--no-animation":!d,"block-knowledge--retake":l}),p=X()("block-knowledge__wrapper",`block-knowledge__wrapper--${a}`,{[`block-knowledge__container--custom-width-${m}`]:!0}),g=Array.isArray(r)&&r.length>0?r.slice(0,1):[];return(0,o.jsx)(De,{className:f,"data-testid":"block-kc-card",ref:v=>{this.block=v},style:this.getStyle(),children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:"block-knowledge__container",children:(0,o.jsx)("div",{className:"block-knowledge__row",children:(0,o.jsx)("div",{className:`block-knowledge__col--custom-width-${m}`,children:(0,o.jsx)(sn,{"aria-label":this.getTypeLabel(),className:p,"data-testid":"block-knowledge-wrapper",ref:v=>{this.wrapper=v},children:g.map(v=>this.renderQuestion(v))})})})})})})}getStyle(){const{backgroundColor:t,settings:n}=this.props;if(n?.cardMode===Qn.TRANSPARENT)switch(n?.backgroundType){case re.ACCENT:case re.COLOR:case re.TINT:if(t)switch(Bi(t)){case Tt.LIGHT:return{"--color-background-choice-hover":ds(.5,t),"--color-background-feedback-frame":ds(.5,t)};case Tt.MED:return{"--color-background-choice-hover":Bs(.3,t),"--color-background-feedback-frame":Bs(.3,t)};case Tt.DARK:return{"--color-background-choice-hover":Bs(.6,t),"--color-background-feedback-frame":Bs(.6,t)};case Tt.NEAR_BLACK:return{"--color-background-choice-hover":ds(.15,t),"--color-background-feedback-frame":ds(.15,t)}}}}}const Ere=e=>{const{blockId:t,items:[n]}=e,{questions:s}=n,[r,i]=(0,u.useState)(()=>mx({questions:s}));(0,u.useEffect)(()=>{if(!s)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=s.find(({id:p})=>p===m);f&&i(f)};return window.addEventListener(Je,c),()=>window.removeEventListener(Je,c)},[t,r,s]);const a=(0,u.useMemo)(()=>r?{variant:aR[r.type],items:[r]}:{},[r]);return r?(0,o.jsx)(t4,{...e,...a}):(0,o.jsx)("div",{})},kre=e=>e.variant==="draw from question bank",ha=e=>{const t=Rn()??"",n=vn(),s=ct(),r={...e,backgroundColor:t,getL10nValue:s,blockSettings:n};return kre(r)?(0,o.jsx)(Ere,{...r}):(0,o.jsx)(t4,{...r})};var Nre=C(83854),wre=C.n(Nre);class jre extends u.Component{refWrap;refBubbleTitle;refDialog;portal;contentRef;scrollRef;videoContainer;constructor(t){super(t),this.state={hasOverflow:!1},this.refWrap=(0,u.createRef)(),this.refBubbleTitle=(0,u.createRef)(),this.refDialog=(0,u.createRef)(),this.renderOverflowMask=this.renderOverflowMask.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleNextClick=this.handleNextClick.bind(this),this.handlePreviousClick=this.handlePreviousClick.bind(this),this.portal=lo()}static defaultProps={allowNav:!0,onClose:()=>{},onNextClick:()=>{},onPreviousClick:()=>{}};componentWillUnmount(){document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown),this.contentRef.removeEventListener("scroll",this.scrollRef)}UNSAFE_componentWillReceiveProps(t){t.isActive&&setTimeout(this.renderOverflowMask,100)}componentDidUpdate(t){if(!t.isActive&&this.props.isActive?this.contentRef.scrollTop=0:t.isActive&&!this.props.isActive&&this.state.hasOverflow&&this.contentRef.removeEventListener("scroll",this.scrollRef),this.props.forceNonModal&&this.props.isActive){const n=this.refDialog.current;n!=null&&!n.open&&(n.open=!0)}if(!t.isActive&&this.props.isActive){setTimeout(()=>{document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown)},0),this.props.suppressFocus||this.refBubbleTitle.current?.focus?.();const n=this.props.media;this.props.onTranscriptUpdate?.({audioPlayerId:ks({refs:`items:${this.props.blockId}/items:${this.props.item?.id}`}),transcriptMedia:n})}else t.isActive&&!this.props.isActive&&(document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown))}render(){const{accentColor:t,allowNav:n,description:s,forceNonModal:r,headingLevel:i,htmlId:a,isActive:c,isMobile:l,media:d,title:h,x:m,y:f}=this.props,p=i?`h${i}`:"h2",g=X()("bubble",{"bubble--active":c}),v=Rre({x:m,y:f}),x=Pre({hasOverflow:this.state.hasOverflow,x:m,y:f}),b={borderBottomColor:t},y=`${a}-title`,T=()=>{if(!d)return(0,o.jsx)(Re,{allowTabNavigation:c,className:"bubble__description",value:s});const I=this.props.getL10nValue(d)??{},L=Ns(I,this.props.audioPosition,!0,"labeled-graphic"),E={blockId:this.props.blockId,hasPadding:!1,imageMaxHeight:1e3,item:this.props.item,labels:this.props.labels,lessonId:this.props.lessonId,enableVideoPlaybackSpeed:this.props.enableVideoPlaybackSpeed,opts:this.props.mediaOpts,refs:`items:${this.props.blockId}/items:${this.props.item?.id}`,shouldPause:!c},k={audio:{media:L.audioOnlyMedia||I,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-audio`},image:{media:L.imageOnlyMedia||I,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-image`},video:{media:L.videoOnlyMedia||I,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-video`},embed:{media:L.embedOnlyMedia||I,isOverlayAudio:!1,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-embed`},overlay:{media:I,isOverlayAudio:!0,index:`${this.props.blockId}-${this.props.item.id}-${this.props.index}-overlay`}};return(0,o.jsx)(o.Fragment,{children:L.renderOrder.map((N,R)=>{if(N==="text")return(0,o.jsx)(Re,{allowTabNavigation:c,className:"bubble__description",value:s},`text-${R}`);const M=k[N];return!M||N==="embed"&&!c?null:(0,o.jsx)("div",{className:"bubble__media",children:(0,o.jsx)("div",{className:"bubble__figure",children:(0,o.jsx)("div",{className:X()({"labeled-graphic-bubble-media-container--audio-bottom":N==="audio"&&this.props.audioPosition==="bottom"}),children:(0,o.jsx)(ln,{...E,...M})})})},`${N}-${R}`)})})},S=(0,o.jsx)("div",{className:g,ref:this.refWrap,style:v,children:(0,o.jsxs)("dialog",{"aria-hidden":!c,"aria-labelledby":y,"aria-modal":l&&!r,className:x,id:a,onKeyDown:this.handleKeyDown,ref:this.refDialog,style:b,children:[(0,o.jsx)(p,{className:"bubble__title",id:y,ref:this.refBubbleTitle,tabIndex:-1,children:(0,o.jsx)(Pn,{value:h})}),(0,o.jsx)("button",{"aria-label":"Close modal",className:"bubble__close",onClick:this.handleCloseClick,type:"button",children:(0,o.jsx)(bG,{className:"bubble__close-icon"})}),(0,o.jsx)("div",{className:"bubble__content",ref:I=>{this.contentRef=I},children:T()}),n&&this.renderControls()]})});return l?(0,Ts.createPortal)((0,o.jsx)(eS,{children:S}),this.portal):S}renderControls(){const{accentColor:t,labels:n}=this.props,s={"--color-lg-accent":t};return(0,o.jsxs)("div",{className:"bubble__controls",style:s,children:[(0,o.jsx)("button",{"aria-label":n?.a11yCarouselPrevious,className:"bubble__prev",onClick:this.handlePreviousClick,type:"button",children:(0,o.jsx)("i",{className:"icon icon-chevron-left"})}),(0,o.jsx)("button",{"aria-label":n?.a11yCarouselNext,className:"bubble__next",onClick:this.handleNextClick,type:"button",children:(0,o.jsx)("i",{className:"icon icon-chevron-right"})})]})}renderOverflowMask(){if(!this.contentRef)return;const t=this.contentRef,n=t.offsetHeight;t.scrollHeight>n?(t.addEventListener("scroll",this.scrollRef=l0()(this.handleScroll,50)),this.setState({hasOverflow:!0}),this.scrollRef()):(t.removeEventListener("scroll",this.scrollRef),this.setState({hasOverflow:!1}))}handleDocumentClick=t=>{if(!this.props.isActive)return;const n=t.composedPath();if(!(this.refWrap.current!=null&&n.includes(this.refWrap.current)||Array.from(document.querySelectorAll("dialog[open]")).some(r=>n.includes(r)))){if(this.props.forceNonModal){const r=document.querySelector(".block-search");if(r!=null&&n.includes(r))return}this.props.onClose({shouldFocusMarker:!1})}};handleDocumentKeyDown=t=>{cn(t)&&this.props.isActive&&this.props.onClose({shouldFocusMarker:!1})};handleKeyDown(t){const{allowNav:n,onNextClick:s,onPreviousClick:r}=this.props,i=ZB(this.contentRef,this.state.hasOverflow),a=wre()(Fe()(n));jn()([[a(Wo),r],[a(Ko),s],[WB,i]])(t)}handleCloseClick=()=>{this.props.onClose()};handleNextClick(t){this.props.onNextClick(t)}handlePreviousClick(t){this.props.onPreviousClick(t)}handleScroll(){const t=this.contentRef,n=t.scrollTop,s=t.scrollHeight,r=t.offsetHeight;n>=s-r-10?this.setState({hasOverflow:!1}):this.state.hasOverflow||this.setState({hasOverflow:!0})}}function Are(e){const t=ct(),n=Xt(768);return(0,o.jsx)(jre,{...e,getL10nValue:t,isMobile:n})}const Rre=({x:e,y:t})=>{const n={top:"initial",bottom:"initial",left:"0",right:"0"};return e>50?n.right=100-e+"%":n.left=e+"%",t>50?n.bottom=100-t+"%":n.top=t+"%",n},Pre=({hasOverflow:e,x:t,y:n})=>{const s=t<50;let r="top";return n>33&&(r=n>66?"bottom":"middle"),X()("bubble__body","bg--range-light",{"bubble__body--has-overflow":e,"bubble__body--left":s,"bubble__body--right":!s,"bubble__body--top":r==="top","bubble__body--middle":r==="middle","bubble__body--bottom":r==="bottom"})};var Mre=C(49860);const Ore=e=>new URL(e).pathname.slice(1)+new URL(e).search;class Bre extends Mre.Component{imageEl;constructor(t){super(t),this.state={style:{}}}render(){const{canvasClassNames:t,children:n,cornerRadius:s,editable:r,editingDisabled:i,getL10nValue:a,imageLoaded:c,media:l,onCreateMarker:d,onShowAltDialog:h}=this.props,{style:m}=this.state,f=a(l)?.image??{},{alt:p,dimensions:g,key:v,src:x}=f,b=!!f.alt,y=Mo(p),T=WN(f),S=X()("labeled-graphic-canvas__figure",{"labeled-graphic-canvas__figure--editable":r&&!i,"labeled-graphic-canvas__figure--editing-disabled":r&&i});let I;v?I=pt(f):x&&(I=pt({key:Ore(x),...f}));const L=X()("labeled-graphic-canvas__image","labeled-graphic-canvas__image--flag-dimensions",{"labeled-graphic-canvas__image--svg":zC(I)}),E={...m,...s!=null&&{"--corner-radius":`${Number(s)}px`}},k=(0,o.jsx)(Ln,{alt:y,className:L,"data-l10n-id":Ot(l),height:g?.height||g?.originalHeight,onClick:d,onLoad:()=>this.setState({style:T}),ref:N=>{this.imageEl=N},src:I,style:E,width:g?.width||g?.originalWidth});return(0,o.jsx)("div",{className:t||"labeled-graphic-canvas",children:(0,o.jsx)("div",{className:"labeled-graphic-canvas__item",children:(0,o.jsx)("div",{className:"labeled-graphic-canvas__bounds",children:(0,o.jsxs)("figure",{className:S,children:[b&&r&&(0,o.jsx)(Fs,{message:"Edit alt text",children:(0,o.jsx)("div",{className:"item-media__tooltip",children:(0,o.jsx)("button",{className:"labeled-graphic-canvas__alt-tag",onClick:h,type:"button",children:"ALT"})})}),c&&k,(0,o.jsx)("ol",{role:"list",children:n})]})})})})}}const Dre=vt(Bre),Fre={"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"},_re=(e,t)=>{const n=Fre[t];return n?.startsWith("a11y")?e?.[n]||"":n||""};var Hre=C(49860);const n4=V("labeled-graphic-marker");class Vre extends Hre.Component{marker;onMouseMove;onMouseLeave;constructor(t){super(t),this.state={dragging:!1,hovering:!1,isComplete:!1,isDragged:!1,offsetX:0,offsetY:0,wasDragged:!1},this.onClick=this.onClick.bind(this)}parentCanvasElement(){return this.marker.parentElement.parentElement.parentElement}componentDidMount(){const t=this.parentCanvasElement();t.addEventListener("mousemove",this.onMouseMove=n=>{this.onItemDrag(n)}),t.addEventListener("mouseleave",this.onMouseLeave=n=>{this.onItemRelease(n)})}componentWillUnmount(){const t=this.parentCanvasElement();t.removeEventListener("mousemove",this.onMouseMove),t.removeEventListener("mouseleave",this.onMouseLeave)}UNSAFE_componentWillReceiveProps(t){const{isSelected:n,useLocalStateForCompletion:s}=t;n&&s&&!this.state.isComplete&&this.setState({isComplete:!0})}buildMarkerLabel=({icon:t,label:n,title:s,viewed:r})=>{const{labels:i}=this.props;return[].concat(n||[]).concat(s||[]).concat(t||[]).concat(r?i?.a11yLabeledGraphicViewed:i?.a11yLabeledGraphicUnviewed).join(", ")};render(){const{accentColor:t,ariaControls:n,hasSearchMatch:s,icon:r,isActive:i,isComplete:a,isLessonBlocksList:c,isSelected:l,isVisible:d,labels:h,markerColor:m,markerColorContrast:f,onFocus:p,styles:g,useLocalStateForCompletion:v}=this.props,x=this.props.getL10nValue(this.props.title),b=_re(h,r),y=v?this.state.isComplete:a,T=!!m,S=xs(m),L=Qt({backgroundColor:m,contrast:f??S}),E=T?m:"#ffffff",k=T?L:t,N=this.buildMarkerLabel({icon:b,label:h&&h.a11yLabeledGraphicButtonMarker||"",title:x,viewed:y}),R=n4({active:l,dragged:this.state.isDragged,visible:d,complete:y,"search-match":s}),M={...g,"--color-lg-accent":E,"--color-lg-font":k},A=n4("pin",{selected:l,disabled:c});return(0,o.jsx)("button",{"aria-controls":n,"aria-expanded":i,"aria-label":N,className:R,onClick:this.onClick,onContextMenu:this.onItemRelease.bind(this),onFocus:p,onMouseDown:this.onItemGrab.bind(this),onMouseEnter:this.onHover.bind(this),onMouseLeave:this.onLeave.bind(this),onMouseUp:this.onItemRelease.bind(this),ref:j=>{this.marker=j},style:M,type:"button",children:(0,o.jsx)("span",{className:A,children:(0,o.jsx)("i",{className:`icon icon-Master-${r}`})})})}focus(){this.marker&&this.marker.focus&&this.marker.focus()}onHover(){this.state.wasDragged&&this.props.onHover(),this.setState({hovering:!0})}onLeave(){this.props.onLeave(),this.setState({hovering:!1})}onClick(){const{editable:t,itemId:n,onClick:s,parentId:r}=this.props,i="labeledGraphicMarkerClick",a={detail:{itemId:n,parentId:r}},c=new CustomEvent(i,a);document.dispatchEvent(c),t||s()}onItemGrab(t){const{editable:n}=this.props;if(!n)return;const s=this.marker.getBoundingClientRect(),r=s.left-t.clientX+this.marker.offsetWidth/2,i=s.top-t.clientY+this.marker.offsetHeight/2;this.setState({posX:t.clientX,posY:t.clientY,offsetX:r,offsetY:i,isDragged:!0})}onItemDrag(t){if(this.state.isDragged){const n=t.clientX-this.state.posX,s=t.clientY-this.state.posY;this.marker.style.transform=`translate3d(${n}px, ${s}px, 0)`}}onItemRelease(t){const{editable:n}=this.props,s={isDragged:!1};this.marker.style.transform="translate3d(0, 0, 0)",this.state.isDragged&&this.state.posX===t.clientX&&this.state.posY===t.clientY?this.props.onClick():n&&t.currentTarget instanceof HTMLElement&&t.currentTarget.classList.contains("labeled-graphic-marker")?this.props.onSetPosition(t,this.state.offsetX,this.state.offsetY):this.state.isDragged&&(s.offsetX=0,s.offsetY=0),this.setState(s)}}const zre=vt(Vre);class $re extends u.Component{static get defaultProps(){return{animateBlockEntrance:!1,editable:!0,getL10nValue:(t=>t),markerDelay:0,onClose:Function.prototype,onCreateMarker:Function.prototype,onItemClear:Function.prototype,onItemHint:Function.prototype,onItemSelected:Function.prototype,onNextClick:Function.prototype,onPreviousClick:Function.prototype,onSetMarkerPosition:Function.prototype,showBubbles:!0}}markerRefs;timeout;entranceDoneTimeout;canvas;constructor(t){super(t);const{isLearner:n}=t;this.afterAnimatedIn=this.afterAnimatedIn.bind(this),this.createMarker=this.createMarker.bind(this),this.onBubbleClose=this.onBubbleClose.bind(this),this.onMarkerFocus=this.onMarkerFocus.bind(this),this.markerRefs={},this.state={showMarkers:!n||yn()}}componentDidMount(){const{isBlock:t,isLearner:n,isPreview:s,markerDelay:r}=this.props;n&&!t&&(this.timeout=setTimeout(()=>this.setState({showMarkers:!0}),s?0:r))}componentWillUnmount(){clearTimeout(this.timeout),clearTimeout(this.entranceDoneTimeout)}render(){const{accentColor:t,animateBlockEntrance:n,blockId:s,color:r,canvasClassNames:i,disableCreateMarker:a,editable:c,getL10nValue:l,imageLoaded:d=!0,isBlock:h,isLearner:m,isLessonBlocksList:f,isPreview:p,initiallyVisible:g,items:v,labels:x,lessonId:b,media:y,onItemClear:T,onItemHint:S,onItemSelected:I,onNextClick:L,onPreviousClick:E,onShowAltDialog:k,parentId:N,progress:R,searchMatchedItemIds:M,selected:A,settings:j={},showBubbles:P,suppressBubbleFocus:w,enableVideoPlaybackSpeed:D,forceBubbleNonModal:O}=this.props,{cornerRadius:B,headingLevel:H,markerColor:_,markerColorContrast:$}=j,{showMarkers:z}=this.state,J=_||(t||r),Y=X()("map-item",{"map-item--animated":!c}),G=n?"fadeIn":"none",F=n?1:0,U=v.length>1,Q=new Set(M?.map(String)??[]);return(0,o.jsx)(u.Fragment,{children:(0,o.jsx)($e,{afterAnimatedIn:this.afterAnimatedIn,animateBlockEntrance:!p,animateIn:G,duration:p?0:F,initiallyVisible:g,isLearner:m,children:(0,o.jsx)(Dre,{canvasClassNames:i,cornerRadius:B,editable:c,editingDisabled:a,imageLoaded:d,media:y,onCreateMarker:this.createMarker,onShowAltDialog:k,ref:Z=>{this.canvas=Z},children:v.map((Z,q)=>{const{description:te,id:ne,icon:ae,media:ue,title:Te}=Z,we=l(Z.x),W=l(Z.y),ie={top:W+"%",left:we+"%"},ge=Vo()(["items",ne,"isComplete"],R),he=En(A,ne),Ne=Q.has(String(ne)),be=`bubble-${s}-${ne}`;return(0,o.jsxs)("li",{className:Y,role:"listitem",children:[(0,o.jsx)(zre,{accentColor:J,ariaControls:be,editable:c,hasSearchMatch:Ne,icon:ae,isActive:he,isComplete:ge,isLessonBlocksList:f,isSelected:he,isVisible:z,itemId:ne,labels:x,markerColor:_,markerColorContrast:$,onClick:()=>{I(ne)},onFocus:this.onMarkerFocus(ne),onHover:()=>{S()},onLeave:()=>{T()},onSetPosition:this.onSetPosition.bind(this,Z),parentId:N,ref:de=>{this.markerRefs[ne]=de},styles:ie,title:Te,useLocalStateForCompletion:h},ne),!c&&P&&(0,o.jsx)(Are,{accentColor:J,allowNav:U,audioPosition:j.audioPosition,blockId:s,description:te,enableVideoPlaybackSpeed:D,forceNonModal:O,headingLevel:H,htmlId:be,index:q,isActive:he,item:Z,labels:x,lessonId:b,media:ue,mediaOpts:{disableZoom:!j.zoomOnClick},onClose:this.onBubbleClose(ne),onNextClick:()=>{L(q)},onPreviousClick:()=>{E(q)},suppressFocus:w,title:Te,x:Number(we),y:Number(W)},be)]},ne)})})})})}createMarker(t){const{disableCreateMarker:n,editable:s,onCreateMarker:r}=this.props;if(!s||n)return;const{x:i,y:a}=this.findItemCoordinates({e:t}),c=this.props.items.length,d={description:"",hasMedia:!1,icon:"01",id:c0(),isActive:!1,title:"",x:String(i),y:String(a)};r({index:c,payload:d})}onBubbleClose(t){const{onClose:n}=this.props;return(s={shouldFocusMarker:!0})=>{const r=this.markerRefs[t];s.shouldFocusMarker&&r?.focus?.(),n(t)}}onMarkerFocus(t){return()=>{const{onClose:n,selected:s}=this.props;s&&s!==t&&n()}}onSetPosition(t,n,s,r){if(!this.props.editable)return;const{lesson:i,onSetMarkerPosition:a}=this.props,{id:c,items:l}=i,{x:d,y:h}=this.findItemCoordinates({e:n,offsetX:s,offsetY:r}),m={x:String(d),y:String(h)};(0,an.uW)(t.x)&&(0,an.uW)(t.y)?(this.props.updateL10n({l10n:t.x,value:m.x}),this.props.updateL10n({l10n:t.y,value:m.y})):a({itemId:t.id,lessonId:c,items:l,payload:m})}findItemCoordinates({e:t,offsetX:n=0,offsetY:s=0}){const r=this.canvas.imageEl.getBoundingClientRect(),i=20,a=this.findItemCoordinate({clientPos:t.clientX,clientOffset:n,rectSubtractor:r.left,rectDivisor:r.width,validOffsetAmount:i}),c=this.findItemCoordinate({clientPos:t.clientY,clientOffset:s,rectSubtractor:r.top,rectDivisor:r.height,validOffsetAmount:i});return{x:a,y:c}}findItemCoordinate({clientPos:t,clientOffset:n,rectSubtractor:s,rectDivisor:r,validOffsetAmount:i}){const a=i/r*100,c=100-a;let l=(t+n-s)/r*100;return l>c?l=c:l<a&&(l=a),l}afterAnimatedIn(){const{isBlock:t}=this.props;t&&this.setState({showMarkers:!0})}}const Ure=vt($re);var Gre=C(49860);const Wre=e=>{e.open=!0};class Kre extends Gre.Component{static get defaultProps(){return{onItemSelected:Function.prototype,onStep:Function.prototype,getL10nValue:()=>{}}}constructor(t){super(t),this.state={forceBubbleNonModal:!1,imageLoaded:!1,searchMatchedItemIds:[],suppressBubbleFocus:!1},this.closeOpenedBubble=this.closeOpenedBubble.bind(this),this.handleMarkerClick=this.handleMarkerClick.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.handleRevealItem=this.handleRevealItem.bind(this),this.onItemSelected=this.onItemSelected.bind(this),this.onNextClick=this.onNextClick.bind(this),this.onPreviousClick=this.onPreviousClick.bind(this),this.setImageLoaded=this.setImageLoaded.bind(this)}componentDidMount(){this.loadImage(),this.props.readOnly||document.addEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.addEventListener(Je,this.handleNavEvent),window.addEventListener(qo,this.handleRevealItem)}handleNavEvent(t){const n=t.detail.path[t.detail.path.indexOf("items")+1]?.id,s=t.detail.path[t.detail.path.lastIndexOf("items")+1]?.id;n===this.props.blockId&&this.state.selectedItemId!==s&&this.onItemSelected(s)}handleRevealItem(t){const{items:n}=this.props,{blockId:s,itemId:r,matchingItemIds:i=[r]}=t.detail;if(!En(s,this.props.blockId))return;const a=n.find(d=>En(d.id,r));if(!a)return;const c=n.filter(d=>i.some(h=>En(d.id,h))).map(d=>d.id);c.some(d=>En(d,a.id))||c.push(a.id);const{selectedItemId:l}=this.state;l!=null&&!En(l,a.id)&&this.getBubble(l)?.close(),this.setState({forceBubbleNonModal:!0,searchMatchedItemIds:c,selectedItemId:a.id,suppressBubbleFocus:!0},()=>{const d=this.getBubble(a.id);d!=null&&!d.open&&Wre(d),this.setState({suppressBubbleFocus:!1})})}getBubble(t){return document.getElementById(`bubble-${this.props.blockId}-${t}`)}componentDidUpdate(t){const{isMobile:n}=this.props,{forceBubbleNonModal:s,selectedItemId:r}=this.state;t.isMobile===n||r==null||s||(this.getBubble(r)?.close(),this.openBubble(r))}componentWillUnmount(){this.props.readOnly||document.removeEventListener("labeledGraphicMarkerClick",this.handleMarkerClick),window.removeEventListener(Je,this.handleNavEvent),window.removeEventListener(qo,this.handleRevealItem)}render(){const{forceBubbleNonModal:t,imageLoaded:n,searchMatchedItemIds:s,suppressBubbleFocus:r}=this.state,{initiallyVisible:i,isLessonBlocksList:a,isPreview:c,items:l,labels:d,parentId:h,settings:m={}}=this.props,{mediaWidth:f="2"}=m,p=c?l[0].id:this.state.selectedItemId,g=X()("view-labeled-graphic",{"view-labeled-graphic--small":f==="0","view-labeled-graphic--medium":f==="1","view-labeled-graphic--full":f==="2"});return(0,o.jsx)("div",{"aria-label":d?.a11yLabeledGraphicBlock,className:g,role:"group",children:(0,o.jsx)(Ure,{...this.props,canvasClassNames:this.getCanvasClassNames(),editable:!1,forceBubbleNonModal:t,imageLoaded:n,initiallyVisible:i,isLessonBlocksList:a,labels:d,markerDelay:1e3,onClose:this.closeOpenedBubble,onItemSelected:this.onItemSelected,onNextClick:this.onNextClick,onPreviousClick:this.onPreviousClick,parentId:h,searchMatchedItemIds:s,selected:p,suppressBubbleFocus:r})})}setImageLoaded(){this.setState({imageLoaded:!0})}loadImage(){const t=this.props.getL10nValue(this.props.media)?.image,{key:n,src:s}=t??{};if(!n&&!s)return;const r=setTimeout(this.setImageLoaded,1e3),i=new Image,a=n?pt(t):s;i.src=a,i.onload=()=>{clearTimeout(r),this.setImageLoaded()}}getCanvasClassNames(){return X()("labeled-graphic-canvas",{"labeled-graphic-canvas--visible":this.state.imageLoaded})}onNextClick(t){const{blockId:n,items:s}=this.props,r=st()("id",s[rd()(t)]||s[0]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}onPreviousClick(t){const{blockId:n,items:s}=this.props,r=st()("id",s[cg()(t)]||s[cg()(ps()(s))]);document.querySelector(`dialog#bubble-${n}-${this.state.selectedItemId}[open]`)?.close(),this.onItemSelected(r)}clearSearchReveal(t){const{selectedItemId:n}=this.state;n!=null&&this.getBubble(n)?.close(),this.setState({forceBubbleNonModal:!1,searchMatchedItemIds:[],selectedItemId:void 0},t)}onItemSelected(t){const{editBlock:n,items:s,onItemSelected:r,onStep:i}=this.props,{forceBubbleNonModal:a,selectedItemId:c}=this.state;if(!(n&&window.matchMedia("(max-width: 768px)").matches)){if(a){const l=En(c,t);this.clearSearchReveal(()=>{l?r(t):this.onItemSelected(t)});return}c===t?this.closeOpenedBubble():(this.openBubble(t),Ue()(i,Or()(l=>l.id===t))(s)),r(t)}}handleMarkerClick(t){const{itemId:n,parentId:s}=t.detail,{selectedItemId:r}=this.state;(s!==this.props.parentId||r!==n)&&this.closeOpenedBubble()}openBubble(t,{forceNonModal:n=!1}={}){const{blockId:s}=this.props;this.setState({forceBubbleNonModal:n,selectedItemId:t});const r=document.getElementById(`bubble-${s}-${t}`);!r||r.open||(!n&&this.props.isMobile&&typeof r.showModal=="function"?r.showModal():r.show())}closeOpenedBubble(t=this.state.selectedItemId){t!=null&&(this.getBubble(t)?.close(),this.setState(n=>{const s=En(n.selectedItemId,t);return{forceBubbleNonModal:s?!1:n.forceBubbleNonModal,searchMatchedItemIds:s?[]:n.searchMatchedItemIds,selectedItemId:s?void 0:n.selectedItemId}}))}}function Qre(e){const t=ct(),n=Xt(768);return(0,o.jsx)(Kre,{...e,getL10nValue:t,isMobile:n})}const Zre=e=>{const{blockId:t,progress:n,isLessonBlocksList:s=!1}=e,r=Vo()(["items",t],n);return(0,o.jsx)(De,{className:"block-labeled-graphic",children:(0,o.jsx)(Qre,{...e,editable:!1,isBlock:!0,isLessonBlocksList:s,parentId:t,progress:r})})},Yre=e=>We(e)&&typeof e.key=="string"&&e.key.length>0,qre=e=>We(e)&&Yre(e.image)?e.image:void 0,Wg=(0,u.createContext)(!0);Wg.displayName="PresentationSlideFillContext";function Xre({children:e,showFill:t}){return(0,o.jsx)(Wg.Provider,{value:t,children:e})}function Jre(){return(0,u.useContext)(Wg)}var s4=C(49860);const kn=V("block-list"),eie=class extends s4.Component{static get defaultProps(){return{editable:!1,items:[],onStep:Function.prototype,type:"numbered",getL10nValue:()=>{}}}nextNumber(e){const{items:t}=this.props,s=t.length>0?t[e].number:null;let r;return!isNaN(s)&&s!==""&&(r=parseInt(s,10)+1),(r<1||r>99)&&(r=null),r}render(){const{animateBlockEntrance:e,blockId:t,defaultBackgroundColor:n,editable:s,getL10nValue:r,initiallyVisible:i,isLearner:a,items:c,labels:l,lessonId:d,media:h,onStep:m,settings:f,type:p}=this.props,{audioPosition:g,bulletPadding:v,entranceAnimation:x,listItemColor:b,listItemColorContrast:y,listWidth:T}=f,S=r(Array.isArray(h)?{}:h),I=Ns(S,g),L=vre(v),E=p0(T),k=kn({[p]:!0,[`${p}-custom-width-${E}`]:!0,[`${p}-bullet-padding-${L}`]:!0,"no-animation":!x,presentation:this.props.isPresentation,"no-fill":this.props.isPresentation&&this.props.showFill===!1,compact:this.props.isPresentation&&kse(c.length)}),N=p==="numbered"?"ol":"ul";return(0,o.jsx)(De,{className:k.toString(),defaultBackgroundColor:n,children:(0,o.jsx)("div",{className:kn("container"),children:(0,o.jsx)("div",{className:kn("row"),children:(0,o.jsx)(Zc,{className:kn("col"),children:(0,o.jsx)("div",{className:"blocks-list__container",children:I.renderOrder.map((R,M)=>{if(R==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(N,{className:kn("list"),role:"list",children:(0,o.jsx)($e,{animateBlockEntrance:e,animateIn:"fadeInRight",className:kn("animated-item").toString(),initiallyVisible:i,isLearner:a,siblingDelay:.25,children:c.map((A,j)=>{const P={key:A.id,index:j,lessonId:d,blockId:t,type:p,editable:s,nextNumber:this.nextNumber.bind(this),onStep:m,listItemColor:b??void 0,listItemColorContrast:y??void 0,...A,iconSrc:pt(qre(r(A.iconMedia)))};return this.props.renderItem?this.props.renderItem(P):(0,u.createElement)(tie,{...P,key:P.key})})})})},`text-${M}`);if(R==="audio")return(0,o.jsx)("div",{className:X()("block-list__media",{"audio-on-top":I.renderOrder[0]==="audio","audio-on-bottom":I.renderOrder[0]!=="audio"}),children:(0,o.jsx)(ln,{blockId:t,hasPadding:!1,index:t,item:{media:h,id:t},labels:l,lessonId:d,media:h,refs:`items:${t}`})},`${R}-${M}`)})})})})})})}};class tie extends s4.Component{renderTextDelegate;animateRef=null;static get defaultProps(){return{className:""}}constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}renderText(t){return(0,o.jsx)(et,{...t})}handleChangeCheckbox=()=>{this.props.onStep(this.props)};render(){const{type:t,icon:n,iconSrc:s,id:r,index:i,number:a,paragraph:c,editable:l,className:d,renderText:h=this.renderTextDelegate,style:m,listItemColor:f,listItemColorContrast:p}=this.props,g=f?{...m,"--list-fill-color":f}:m,v={allowTabNavigation:!0,className:"block-list__content brand--linkColor cursorAuto",editable:l,id:r,value:c};return(0,o.jsxs)("li",{className:X()("block-list__item",`block-list__item--${t}`,d),ref:x=>{this.animateRef=x},role:"listitem",style:g,children:[t==="numbered"&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:kn("number"),style:f?{backgroundColor:f,color:Qt({contrast:p||ke.AUTO,backgroundColor:f})}:void 0,children:a||i+1}),h(v)]}),t==="bulleted"&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:"\u2022"}),(0,o.jsx)(ce,{className:kn("bullet"),name:"circle-solid",style:f?{color:f}:void 0}),h(v)]}),t==="icon"&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:kn("icon"),style:f?{"--color-background":f}:void 0,children:s?(0,o.jsx)("img",{alt:"",className:kn("icon-image"),src:s}):(0,o.jsx)("span",{"aria-hidden":"true",className:kn("icon-glyph",{placeholder:!n?.value}),children:n?.value||"\u2B50\uFE0F"})}),h(v)]}),t==="checkboxes"&&(0,o.jsxs)("label",{className:kn("option"),children:[(0,o.jsx)("input",{className:kn("checkbox-input"),onChange:this.handleChangeCheckbox,type:"checkbox"}),(0,o.jsx)("div",{className:kn("checkbox"),style:f?{borderColor:f,"--color-background":f}:void 0,children:(0,o.jsx)(ce,{className:kn("checkbox__icon"),name:"check",style:f?{color:Qt({contrast:p||ke.AUTO,backgroundColor:f})}:void 0})}),h(v)]})]})}}const x0=e=>{const t=ct(),n=Cn(),s=Jre();return(0,o.jsx)(eie,{...e,getL10nValue:t,isPresentation:n,showFill:s})},nie=x0,sie=e=>(0,o.jsx)(x0,{type:"checkboxes",...e}),oie=e=>(0,o.jsx)(x0,{type:"bulleted",...e}),rie=e=>(0,o.jsx)(x0,{type:"icon",...e}),iie=[{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"}],aie=(0,u.lazy)(()=>C.e("webpack_container_remote_mondrian_learn-react").then(C.t.bind(C,4246,23))),cie={subscribe(e,t){const n=`mondrian:${e}`,s=()=>{Se.isPlaying&&Se.playerId!==n&&t()};return Se.addChangeListener(s),()=>{Se.removeChangeListener(s)}},play(e){const t=`mondrian:${e}`;Se.playerId=t,Se.isPlaying=!0}};function lie(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 die({blockumentId:e,manifest:t}){let n=920,s=600;try{const r=t.blockuments?.[e];if(r){const i=t.items?.[r.children[0]?.id];if(i){const a=i.states[i.initialState];if(a){const c=a.width.value,l=a.height.value;typeof c=="number"&&typeof l=="number"&&(n=c,s=l)}}}}catch{}return(0,o.jsx)("svg",{"aria-hidden":"true",className:"block-mondrian__fallback",height:s,width:n})}function uie({animateBlockEntrance:e=!0,initiallyVisible:t,blockumentId:n,isLearner:s=!1,settings:r,onStep:i,onTranscriptClose:a,onTranscriptOpen:c,onTranscriptUpdate:l,labels:d,transcriptPanelState:h}){const m=Ve(),f=m.mondrian,p=ed(),g={externalLinksDisabled:"externalLinksDisabled"in m?m.externalLinksDisabled:!1,isExternalLink:Xn},{currentLocale:v}=at(),x=Hn(),b=b$(),y=(0,u.useMemo)(()=>({active:v,source:x}),[v,x]),T=(0,u.useCallback)(N=>h?.audioPlayerIdOpen===ks({refs:`items:${n}/items:${N}`}),[n,h?.audioPlayerIdOpen]),S=(0,u.useCallback)(({refocusTarget:N,itemId:R,transcript:M})=>{T(R)?a?.():c?.({audioPlayerId:ks({refs:`items:${n}/items:${R}`}),focusing:!0,refocusTarget:N,transcriptMedia:{mondrianTranscript:M}})},[n,T,a,c]),I=(0,u.useCallback)(({itemId:N,transcript:R})=>{h?.audioPlayerIdOpen&&l?.({audioPlayerId:ks({refs:`items:${n}/items:${N}`}),transcriptMedia:{mondrianTranscript:R}})},[n,l,h]),L=(0,u.useCallback)(N=>{l?.({audioPlayerId:ks({refs:`items:${n}/items:${N}`}),focusing:!0})},[n,l]),E=(0,u.useMemo)(()=>({isPanelOpenForItem:T,focusPanel:L,togglePanel:S,updateTranscript:I}),[L,T,S,I]),k=(0,u.useCallback)(N=>{if(i)for(const R of Object.values(N))R.progress>=100&&i({id:R.itemId})},[i]);return(0,o.jsx)(De,{children:(0,o.jsx)(sS,{FallbackComponent:fie,children:(0,o.jsx)($e,{animateBlockEntrance:e,initiallyVisible:t,isLearner:s,children:(0,o.jsx)("div",{style:lie(r),children:(0,o.jsx)(u.Suspense,{fallback:(0,o.jsx)(die,{blockumentId:n,manifest:f}),children:(0,o.jsx)(aie,{blockumentId:n,hoveredItemPath:b.translationHoveredPath,labels:d,languages:iie,linkRenderConfig:g,locale:y,manifest:f,mediaStoreAdapter:cie,onMediaProgress:k,runtimeInterface:window.Runtime,searchTerm:p?.term,transcriptPanelAdapter:E})})})})})})}const hie=(0,u.memo)(uie,mie);function mie(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 fie(){return null}const o4=["B","KB","MB","GB","TB","PB","EB"];function pie(e){if(!Number.isFinite(e))return String(e);let t=Math.abs(e),n=0;for(;t>=1024&&n<o4.length-1;)t/=1024,n+=1;const s=Math.round(t*10)/10,r=Number.isInteger(s)?String(s):s.toFixed(1);return`${e<0?"-":""}${r} ${o4[n]}`}const b0=V("block-video");function gie({item:e}){const t=ct(),{media:n}=e,s=t(n)??{},{customVideo:r={},tmp:i={},video:a={}}=s,c="poster"in a?a:{...a,...r},l=i.video&&"poster"in i.video?i.video:void 0,{poster:d}=Ea()?c:l||c,h=d?yt(d):void 0;return(0,o.jsxs)("div",{className:b0("poster-container"),children:[(0,o.jsx)(Ln,{alt:"Video Poster",className:b0("poster"),src:h}),(0,o.jsx)("div",{className:b0("play-overlay"),children:(0,o.jsxs)("svg",{className:b0("play-icon"),fill:"currentColor",height:"80",viewBox:"0 0 24 24",width:"80",children:[(0,o.jsx)("circle",{cx:"12",cy:"12",fill:"rgba(0,0,0,0.6)",r:"12"}),(0,o.jsx)("polygon",{fill:"white",points:"10,8 10,16 16,12"})]})})]})}const r4=V("block-video");function vie({mediaWidth:e}){const t=r4("item",{small:e==="0",medium:e==="1",full:e==="2"});return(0,o.jsx)("div",{className:t,children:(0,o.jsx)("div",{className:r4("placeholder")})})}const Cie=Rs()("partner-content-block-card__"),i4=e=>{const{backgroundColor:t,blockId:n,partnerContent:s}=e,r=Ve(),{id:i,tenantId:a}=r??{},{data:c,type:l}=s,{authors:d,bookImage:h,bookTitle:m,buyLink:f,internalId:p,nbicLink:g}=c,v={blockId:n,courseId:i,partnerContentId:p,tenantId:a,contentSubtype:l};return(0,o.jsxs)("section",{children:[(0,o.jsx)("h2",{className:"visually-hidden",children:"More Info"}),(0,o.jsxs)("ol",{className:"partner-content-block-card",role:"list",children:[(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(c6,{authors:d,backgroundColor:t,block:!0,bookImage:h,bookTitle:m,buyLink:f,trackingInfo:v})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)("div",{className:Cie("divider")})}),(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(l6,{backgroundColor:t,block:!0,link:g,trackingInfo:v})})]})]})};var Kg=C(49860);const y0=V("block-video"),xie={"--ov-width":"100%","--ov-max-height":"none"},bie={"--ov-height":"100%","--ov-max-height":"none"};function yie({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:s,blockPartnerContentExists:r,captions:i,cornerRadius:a,currentLocale:c,dataL10nId:l,disableDownload:d,enableVideoPlaybackSpeed:h,forwardSeekRestricted:m,id:f,isLoaded:p,item:g,lessonId:v,loadMedia:x,media:b,mediaWidth:y,onLoad:T,onProgressChanged:S,poster:I,recordMediaPlayheadPosition:L,renderCaption:E,renderPostVideoSlot:k,subtitle:N,type:R,videoKey:M,videoSrc:A}){const j=y==="2",[P,w]=Kg.useState(null),D=y0("item",{small:y==="0",medium:y==="1",full:j}),O=Kg.useCallback(({player:_})=>{const $=_.containerElement?.querySelector("video");if($){const z=$.videoWidth/$.videoHeight>=1.7777777777777777;w(z?"landscape":"portrait")}T?.({player:_})},[T]),B=P==="landscape"?xie:P==="portrait"?bie:void 0,H=Kg.useCallback(_=>{const $=y0("caption",{visible:p}).toString();return(0,o.jsx)(et,{className:$,value:_.caption})},[p]);return(0,o.jsxs)("div",{className:D,children:[(0,o.jsxs)("figure",{"data-l10n-id":l,children:[(0,o.jsx)("div",{className:y0("aspect-container"),"data-search-content-ignore":"",children:x&&(0,o.jsx)(Lg,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:h,canRestrictSeek:m,captions:i,cornerRadius:a,disableDownload:d,id:`${v}-${n}-${f}-${c}`,media:b,onLoad:O,poster:I,progressChanged:S,recordMediaPlayheadPosition:L,src:A,style:B,subtitle:N,type:M?"video":R},`${v}-${n}-${f}-${c}-${I||""}`)}),p&&(0,o.jsxs)(o.Fragment,{children:[k?.(),(0,o.jsx)("figcaption",{className:y0("wrapper"),children:(E??H)(g)})]})]}),r&&(0,o.jsx)(i4,{backgroundColor:t,blockId:n,partnerContent:s})]})}const Qg=e=>e.toString().padStart(2,"0");function Zg(e){const t=Math.floor(e),n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return n>0?`${n}:${Qg(s)}:${Qg(r)}`:`${s}:${Qg(r)}`}function u6e(e=[]){return e.map(({time:t,title:n})=>`${Zg(t)} ${n}`).join(`
`)}const Sie=e=>{const[t,n,s]=e.split(":").reverse();return parseInt(t,10)+parseInt(n,10)*60+parseInt(s||"0",10)*3600},a4=e=>Number.isFinite(e)?Math.max(0,Math.floor(e)):0,h6e=(e,t)=>{const n=a4(t);return e.some(s=>a4(s.time)===n)},Iie=/^(\d*:)?\d{1,2}:\d{2}$/,m6e=(e,t)=>{const n=e.split(`
`).filter(r=>r.trim()!==""),s=[];for(const r of n){const[i,...a]=r.split(" ");if(!Iie.test(i))throw new Error("Chapters must use the format M:SS or H:MM:SS. Chapters will not display.");s.push({time:Sie(i),title:a.join(" ")})}for(let r=1;r<s.length;r++)if(s[r].time<=s[r-1].time)throw new Error("Chapters are out of order. Chapters will not display.");if(t!=null){for(const r of s)if(r.time>=t)throw new Error("Timestamps must be within the video duration. Chapters will not display.");for(let r=0;r<s.length;r++)if((r<s.length-1?s[r+1].time:t)-s[r].time<10)throw new Error("Chapters must be at least 10 seconds long. Chapters will not display.")}return s},Hs=V("vt-chapter-strip");function Tie(e,t){for(let n=e.length-1;n>=0;n--)if(t>=e[n].time)return n;return-1}function Lie(e,t){const n=e.getBoundingClientRect(),s=t.getBoundingClientRect(),r=n.left+n.width/2,i=s.left+s.width/2;t.scrollBy({behavior:"smooth",left:r-i})}function Eie({chapters:e,currentTime:t,headerAction:n,onSeek:s}){const r=Kt(),i=(0,u.useRef)(null),a=(0,u.useRef)(null),c=Tie(e,t);return(0,u.useEffect)(()=>{const l=i.current,d=a.current;l==null||d==null||Lie(l,d)},[c]),e.length===0?null:(0,o.jsxs)("div",{className:Hs(),children:[(0,o.jsxs)("div",{className:Hs("head"),children:[(0,o.jsx)("h2",{className:Hs("heading"),children:r?.videoChapters}),n]}),(0,o.jsx)("ul",{className:Hs("list"),ref:a,role:"list",children:e.map((l,d)=>{const h=d===c;return(0,o.jsx)("li",{className:Hs("item"),children:(0,o.jsxs)("button",{"aria-current":h?"true":void 0,className:Hs("button",{active:h}),onClick:()=>s?.(l.time),ref:h?i:void 0,type:"button",children:[(0,o.jsx)("span",{className:Hs("thumbwrap"),children:(l.thumbnailStatus==null||l.thumbnailStatus==="done")&&l.thumbnail&&(0,o.jsx)("img",{alt:"",className:Hs("thumb"),src:l.thumbnail})}),(0,o.jsx)("span",{className:Hs("time"),children:Zg(l.time)}),(0,o.jsx)("span",{className:Hs("title"),children:l.title})]})},`${l.time}-${d}`)})})]})}const kie={allowedTags:["b","i","u","c","ruby","rt","v","lang"],allowedAttributes:{c:["class"],v:["title"],lang:["lang"],ruby:[],rt:[]},disallowedTagsMode:"escape",allowedSchemes:[]};function Nie(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 wie(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 Dn(e,t={}){if(!e)return"";let n;if(t.allowVTTTags!==!1){const s=Nie(e),r=lh()(s,kie);n=wie(r)}else n=lh()(e,{allowedTags:[],allowedAttributes:{}});return t.preserveWhitespace||(n=n.replace(/\s+/g," ").trim()),n}function qc(){return typeof window<"u"?window.crypto.randomUUID():`cue_${Date.now()}_${Math.random().toString(36).substring(2,9)}`}function jie(e){return e.map(t=>({...t,stableId:t.stableId||qc()}))}function rr(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 c4(e){let t=e.match(/^(\d{2}):(\d{2}):(\d{2})\.(\d{3})$/);if(t){const[,n,s,r,i]=t;return parseInt(n)*36e5+parseInt(s)*6e4+parseInt(r)*1e3+parseInt(i)}if(t=e.match(/^(\d{2}):(\d{2})\.(\d{3})$/),t){const[,n,s,r]=t;return parseInt(n)*6e4+parseInt(s)*1e3+parseInt(r)}throw new Error(`Invalid timestamp format: ${e}`)}function Aie(e,t=!1){const n=Math.round(e),s=Math.floor(n/36e5),r=Math.floor(n%36e5/6e4),i=Math.floor(n%6e4/1e3),a=n%1e3;if(t){const c=i.toString().padStart(2,"0");if(s>0){const l=r.toString().padStart(2,"0");return`${s}:${l}:${c}`}else return`${r}:${c}`}return`${s.toString().padStart(2,"0")}:${r.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}.${a.toString().padStart(3,"0")}`}function l4(e){const t={};if(!e)return t;const n=e.match(/\S+/g)||[];for(const s of n){const r=s.indexOf(":");if(r>0){const i=Dn(s.substring(0,r),{allowVTTTags:!1}),a=Dn(s.substring(r+1),{allowVTTTags:!1});t[i]=a}}return t}function Rie(e){const t=e.match(/^<v\s+/);if(t){let i=0,a=-1;for(let c=t[0].length;c<e.length;c++)if(e[c]==="<")i++;else if(e[c]===">")if(i===0){a=c;break}else i--;if(a!==-1){const c=e.substring(t[0].length,a).trim(),l=e.substring(a+1).trim();return{speaker:Dn(c,{allowVTTTags:!1}),text:l}}}const n=e.match(/^<v>\s*(.*)$/s);if(n)return{text:n[1]};const s=e.match(/^\[([^\]]+)\]:\s*(.*)$/s);if(s)return{speaker:Dn(s[1].trim(),{allowVTTTags:!1}),text:s[2]};const r=e.match(/^([^:\n]+):\s*(.*)$/s);if(r&&r[1].length<50){const i=r[1].trim();if(!(/^\d+(\s+\w+)*\s+at\s+\d+$/.test(i)||/^\d{1,2}$/.test(i)||/\d+:\d+/.test(i)||/\bat\s+\d/.test(i)||/\bfrom\s+\d/.test(i)||/\bto\s+\d/.test(i)||/\d+\s*(AM|PM|am|pm)/.test(i)))return{speaker:Dn(i,{allowVTTTags:!1}),text:r[2]}}return{text:e}}function Yg(e){return Dn(e,{preserveWhitespace:!1,allowVTTTags:!0})}function Pie(e){const t=Dn(e.substring(6).trim(),{allowVTTTags:!1}),n=l4(t);return{id:n.id,width:n.width,lines:n.lines,regionanchor:n.regionanchor,viewportanchor:n.viewportanchor,scroll:n.scroll,...n}}function Mie(e){const t=[...new Set(e.map(n=>n.speaker).filter(Boolean))];return{cueCount:e.length,speakerCount:t.length,speakers:t,lastModified:new Date}}function*Oie(e){const t=e.cues,n=e.totalDuration;for(let s=0;s<t.length;s++){const r=t[s],i=s>0?t[s-1]:void 0,a=s<t.length-1?t[s+1]:void 0,c=i?Math.max(0,r.startTimeMs-i.endTimeMs):r.startTimeMs,l=a?Math.max(0,a.startTimeMs-r.endTimeMs):Math.max(0,n-r.endTimeMs),d=n>0?r.startTimeMs/n*100:0,h=n>0?r.endTimeMs/n*100:0,m=h-d;yield{cue:r,index:s,isFirst:s===0,isLast:s===t.length-1,previousCue:i,nextCue:a,gapBefore:c,gapAfter:l,relativeStartPercent:d,relativeEndPercent:h,relativeWidthPercent:m}}}function f6e(e){return Array.from(Oie(e))}function Bie(e,t,n,s,r,i,a,c){const l=[],d=/<v\s+([^>]+)>([^<]*)<\/v>/g;let h,m=0;for(;(h=d.exec(e))!==null;){const[v,x,b]=h,y={stableId:qc(),startTime:t,endTime:n,startTimeMs:s,endTimeMs:r,duration:i,text:Yg(b.trim()),settings:a,index:0,speaker:Dn(x.trim(),{allowVTTTags:!1})};c&&(y.id=c),a.position&&(y.position=a.position),a.align&&(y.align=a.align),a.line&&(y.line=a.line),a.size&&(y.size=a.size),a.vertical&&(y.vertical=a.vertical),a.region&&(y.region=a.region),l.push(y),m=h.index+v.length}const f=/<v\s+([^>]+)>([^<]*)$/,g=e.substring(m).match(f);if(g){const[,v,x]=g,b={stableId:qc(),startTime:t,endTime:n,startTimeMs:s,endTimeMs:r,duration:i,text:Yg(x.trim()),settings:a,index:0,speaker:Dn(v.trim(),{allowVTTTags:!1})};c&&(b.id=c),a.position&&(b.position=a.position),a.align&&(b.align=a.align),a.line&&(b.line=a.line),a.size&&(b.size=a.size),a.vertical&&(b.vertical=a.vertical),a.region&&(b.region=a.region),l.push(b)}return l}function Die(e,t){let n=t,s;!rr(e[n])&&rr(e[n+1])&&(s=Dn(e[n],{allowVTTTags:!1}),n++);const r=e[n];if(!rr(r))return{cues:[],nextIndex:n+1};const i=r.match(/^((?:\d{2}:)?\d{2}:\d{2}\.\d{3})\s*-->\s*((?:\d{2}:)?\d{2}:\d{2}\.\d{3})(.*)$/);if(!i)return{cues:[],nextIndex:n+1};const[,a,c,l]=i,d=l4(l.trim());n++;const h=[];for(;n<e.length&&e[n]!==""&&!rr(e[n]);)h.push(e[n]),n++;const m=c4(a),f=c4(c),p=f-m,g=[];if(h.length===0){const v={stableId:qc(),startTime:a,endTime:c,startTimeMs:m,endTimeMs:f,duration:p,text:"",settings:d,index:0};s&&(v.id=s),d.position&&(v.position=d.position),d.align&&(v.align=d.align),d.line&&(v.line=d.line),d.size&&(v.size=d.size),d.vertical&&(v.vertical=d.vertical),d.region&&(v.region=d.region),g.push(v)}else for(const v of h)if(v.includes("<v ")&&(v.includes("</v>")||v.match(/<v\s+[^>]+>[^<]*$/))){const x=Bie(v,a,c,m,f,p,d,s);g.push(...x)}else{const x=h.join(`
`),{text:b,speaker:y}=Rie(x),T={stableId:qc(),startTime:a,endTime:c,startTimeMs:m,endTimeMs:f,duration:p,text:Yg(b),settings:d,index:0};s&&(T.id=s),y&&(T.speaker=y),d.position&&(T.position=d.position),d.align&&(T.align=d.align),d.line&&(T.line=d.line),d.size&&(T.size=d.size),d.vertical&&(T.vertical=d.vertical),d.region&&(T.region=d.region),g.push(T);break}return{cues:g,nextIndex:n}}function Fie(e){const t=e.split(`
`).map(i=>i.trim()),n=t.find(i=>i.length>0);if(!n||!n.startsWith("WEBVTT"))throw new Error('Invalid WebVTT file: Must start with "WEBVTT"');const s={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(s.header=Dn(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 i=t[r];if(i===""){r++;continue}if(i.startsWith("NOTE")){const a=[Dn(i.substring(4).trim(),{preserveWhitespace:!0,allowVTTTags:!1})];for(r++;r<t.length&&t[r]!==""&&!rr(t[r]);)a.push(Dn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;s.notes?.push(a.join(`
`));continue}if(i.startsWith("STYLE")){const a=[];for(r++;r<t.length&&t[r]!==""&&!rr(t[r]);)a.push(Dn(t[r],{preserveWhitespace:!0,allowVTTTags:!1})),r++;s.styles?.push(a.join(`
`));continue}if(i.startsWith("REGION")){const a=Pie(i);s.regions?.push(a),r++;continue}if(rr(i)||rr(t[r+1])){const a=Die(t,r);a.cues&&a.cues.length>0&&s.cues.push(...a.cues),r=a.nextIndex;continue}r++}return s.cues=jie(s.cues),s.cues.sort((i,a)=>i.startTimeMs-a.startTimeMs),s.cues.forEach((i,a)=>{i.index=a}),s.totalDuration=s.cues.length>0?Math.max(...s.cues.map(i=>i.endTimeMs)):0,s.metadata=Mie(s.cues),s}function p6e(e){let t="";if(e.header?t+=e.header.trim()+`
`:t+=`WEBVTT
`,t+=`
`,e.notes&&e.notes.length>0)for(const n of e.notes)t+="NOTE",n&&n.length>0&&(t+=" "+n),t+=`

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

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

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

`}return t.replace(/\s+$/,"")+`
`}const Xc=V("video-transcript-panel"),_ie=(0,u.memo)(function({cue:t,isCurrent:n,isDisabled:s,onSeek:r,sourceIndexes:i}){const a=(0,u.useCallback)(()=>{r?.(t.startTimeMs/1e3)},[t,r]);return(0,o.jsxs)("button",{"aria-current":n?"true":void 0,"aria-disabled":s,className:Xc("line",{current:n,disabled:s}),"data-cue-end-ms":t.endTimeMs,"data-cue-indexes":i.join(" "),"data-cue-start-ms":t.startTimeMs,onClick:s?void 0:a,tabIndex:s?-1:0,type:"button",children:[(0,o.jsx)("span",{className:Xc("timestamp"),children:Aie(t.startTimeMs,!0)}),(0,o.jsx)("span",{className:Xc("text"),children:t.text})]})}),Hie=({captions:e,currentTime:t=0,forwardSeekRestricted:n=!1,l10nId:s,maxTimeReached:r=0,onSeek:i})=>{const[a,c]=(0,u.useState)([]);(0,u.useEffect)(()=>{if(!e||e.length===0)return;const d=new AbortController;return(async()=>{try{const m=e[0];if(!m)return;const f=m.url||(m.key?yt(m.key):null);if(!f)return;const p=await fetch(f,{signal:d.signal});if(!p.ok)return;const g=await p.text(),x=Fie(g).cues.reduce((b,y,T)=>{const S=b[b.length-1];return S!=null&&Math.floor(S.cue.startTimeMs/1e3)===Math.floor(y.startTimeMs/1e3)?(b[b.length-1]={cue:{...S.cue,text:`${S.cue.text} ${y.text}`,endTime:y.endTime,endTimeMs:y.endTimeMs,duration:y.endTimeMs-S.cue.startTimeMs},sourceIndexes:[...S.sourceIndexes,T]},b):(b.push({cue:y,sourceIndexes:[T]}),b)},[]);c(x)}catch(m){console.error("Error loading transcript:",m)}})(),()=>{d.abort()}},[e]);const l=(0,u.useMemo)(()=>{const d=t*1e3;return a.findIndex(({cue:h})=>d>=h.startTimeMs&&d<h.endTimeMs)},[a,t]);return a.length===0?null:(0,o.jsx)("div",{className:Xc(),"data-transcript-l10n-id":s,children:(0,o.jsx)("div",{className:Xc("lines"),children:a.map(({cue:d,sourceIndexes:h},m)=>(0,o.jsx)(_ie,{cue:d,isCurrent:m===l,isDisabled:n&&d.startTimeMs/1e3>r,onSeek:i,sourceIndexes:h},d.stableId))})})},ii=V("vt-learner-transcript");function Vie({captions:e,currentTime:t,forwardSeekRestricted:n,l10nId:s,maxTimeReached:r,onClose:i,onSeek:a}){const c=Kt(),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useId)(),g=(0,u.useId)();return(0,u.useEffect)(()=>{f.current?.focus()},[]),(0,u.useEffect)(()=>{if(!l)return;const v=x=>{cn(x)&&d(!1)};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[l]),(0,u.useEffect)(()=>{const v=h.current?.querySelector('[aria-current="true"]');v!=null&&v!==m.current&&(m.current=v,v.scrollIntoView({behavior:"smooth",block:"center"}))},[t]),(0,o.jsxs)("aside",{"aria-labelledby":p,className:ii(),children:[(0,o.jsxs)("div",{className:ii("head"),children:[(0,o.jsx)("h3",{className:ii("title"),id:p,children:c?.videoTranscript}),(0,o.jsxs)("div",{className:ii("close-wrap"),onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:[(0,o.jsx)("button",{"aria-describedby":g,"aria-label":c?.videoHideTranscript,className:ii("close"),onClick:i,ref:f,type:"button",children:(0,o.jsx)(ce,{name:"xmark"})}),(0,o.jsx)("span",{className:ii("close-tooltip",{visible:l}),id:g,role:"tooltip",children:c?.videoHideTranscript})]})]}),(0,o.jsx)("div",{className:ii("scroll"),ref:h,children:(0,o.jsx)(Hie,{captions:e,currentTime:t,forwardSeekRestricted:n,l10nId:s,maxTimeReached:r,onSeek:a})})]})}const d4=(0,u.createContext)(null),zie=d4.Provider;function $ie(){return(0,u.useContext)(d4)}const Uie=(e,t,n)=>{const s=(0,u.useRef)({l10nId:e,chapters:t,onSeek:n});s.current={l10nId:e,chapters:t,onSeek:n},(0,u.useEffect)(()=>{const r=i=>{const{l10nId:a,chapters:c,onSeek:l}=s.current;if(a==null||a!==i.detail.l10nId)return;const d=c?.[i.detail.chapterIndex];d!=null&&l(d.time)};return window.addEventListener(Md,r),()=>window.removeEventListener(Md,r)},[])},Gie=(e,t,n)=>{const s=(0,u.useRef)({l10nId:e,onSeek:t,getContainer:n});s.current={l10nId:e,onSeek:t,getContainer:n},(0,u.useEffect)(()=>{const r=i=>{const{l10nId:a,onSeek:c,getContainer:l}=s.current,{l10nId:d,time:h}=i.detail;if(a==null||a!==d||typeof h!="number"||!Number.isFinite(h))return;c(h);const m=l?.();m!=null&&!du(m,"center")&&m.scrollIntoView({behavior:"smooth",block:"center"})};return window.addEventListener(jf,r),()=>window.removeEventListener(jf,r)},[])},Wie=window!==window.parent,Kie="bcd.context";function S0(e){if(!e)return null;try{return new URL(e).origin}catch{return null}}function Qie(e){return typeof e=="object"&&e!==null}function Zie(){try{const e=sessionStorage.getItem(Kie);if(!e)return null;const t=JSON.parse(e);if(Qie(t)&&typeof t.packageUrl=="string")return t.packageUrl}catch{}return null}function I0(e){return e&&kf(e)?e:null}function Yie(){try{const t=new URLSearchParams(window.location.search),n=I0(S0(t.get("packageUrl")));if(n)return n;const s=I0(S0(t.get("homeUrl")));if(s)return s}catch{}const e=I0(S0(Zie()));return e||I0(S0(document.referrer))}function u4(e){if(!Wie)return;const t=Yie();t&&window.parent.postMessage(e,t)}const qie=250,h4={second:Number.NaN,at:Number.NEGATIVE_INFINITY},Xie=e=>{const t=(0,u.useRef)(h4),n=(0,u.useRef)(e);return n.current!==e&&(n.current=e,t.current=h4),(0,u.useCallback)(s=>{if(e==null||!Number.isFinite(s))return;const r=Math.floor(s),i=Date.now();r===t.current.second||i-t.current.at<qie||(t.current={second:r,at:i},u4({type:"video:timeupdate",data:{l10nId:e,time:s}}))},[e])};var Jie,m4,f4,eae;function g6e(){let e=null;const t=new Set;return{registerPlayer(n){e=n},onTimeUpdate(){t.forEach(n=>{n()})},getPosition(){return e?.getProgress().currentTime??0},getDuration(){return e?.getProgress().duration??0},subscribe(n){return t.add(n),()=>{t.delete(n)}},seekToTime(n){e?.seekToTime(n)}}}const tae=Object.freeze({registerPlayer(){},onTimeUpdate(){},getPosition:()=>0,getDuration:()=>0,subscribe:()=>()=>{},seekToTime(){}}),p4=(0,u.createContext)(tae),nae=p4.Provider;function T0(){return(0,u.useContext)(p4)}function v6e(){const e=T0(),t=m4(e);return t.current=e,f4(()=>()=>t.current.getPosition(),[])}function C6e(e){const t=T0();return eae(t.subscribe,()=>e(t.getPosition()),()=>e(0))}function x6e(){const e=T0(),t=m4(e);return t.current=e,f4(()=>n=>t.current.seekToTime(n),[])}function b6e({store:e,children:t}){return Jie(nae,{value:e,children:t})}var sae,oae;const L0=[];function y6e(){let e=L0;const t=new Set;return{setChapters(n){n!==e&&(e=n,t.forEach(s=>{s()}))},getChapters(){return e},subscribe(n){return t.add(n),()=>{t.delete(n)}}}}const rae=Object.freeze({setChapters(){},getChapters:()=>L0,subscribe:()=>()=>{}}),g4=(0,u.createContext)(rae),iae=g4.Provider;function v4(){return(0,u.useContext)(g4)}function S6e(){const e=v4();return oae(e.subscribe,e.getChapters,()=>L0)}function I6e({store:e,children:t}){return sae(iae,{value:e,children:t})}const ir=V("block-video"),aae=V("vt-player-shell"),cae={"--ov-width":"100%","--ov-max-height":"none"},lae={"--ov-height":"100%","--ov-max-height":"none"};function dae({audioVideoPlayhead:e,backgroundColor:t,blockId:n,blockPartnerContent:s,blockPartnerContentExists:r,captions:i,chapters:a,cornerRadius:c,currentLocale:l,dataL10nId:d,disableDownload:h,enableVideoPlaybackSpeed:m,forwardSeekRestricted:f,id:p,isLearner:g,isLoaded:v,item:x,lessonId:b,loadMedia:y,media:T,mediaWidth:S,onLoad:I,onProgressChanged:L,poster:E,recordMediaPlayheadPosition:k,renderCaption:N,renderPostVideoSlot:R,showChapters:M,subtitle:A,transcriptEnabled:j,type:P,videoKey:w,videoSrc:D,shouldPause:O}){const B=$ie(),H=T0(),_=v4(),[$,z]=(0,u.useState)(0),[K,J]=(0,u.useState)(0),[Y,G]=(0,u.useState)(!1),[F,U]=(0,u.useState)(null),Q=(0,u.useRef)(null),Z=(0,u.useRef)(null),q=(0,u.useRef)(null),te=Kt(),ne=Xie(d),ae=(0,u.useCallback)(He=>{z(He.currentTime),J(Pe=>Math.max(Pe,He.currentTime)),H.onTimeUpdate(He.currentTime),ne(He.currentTime),L?.(He)},[ne,L,H]),ue=(0,u.useCallback)(He=>{const Pe=ir("caption",{visible:v});return(0,o.jsx)(et,{className:Pe,value:He.caption})},[v]),Te=(0,u.useCallback)(({player:He})=>{const Pe=He.containerElement?.querySelector("video");if(Pe){const Me=Pe.videoWidth/Pe.videoHeight>=1.7777777777777777;U(Me?"landscape":"portrait")}I?.({player:He})},[I]),we=F==="landscape"?cae:F==="portrait"?lae:void 0,W=(0,u.useCallback)(He=>{Q.current?.seekToTime(He)},[Q]),ie=(0,u.useCallback)(()=>Q.current?.containerElement??null,[Q]);Uie(d,a,W),Gie(d,W,ie);const ge=B?.setVideoPlayerRef,he=(0,u.useCallback)(He=>{Q.current=He,ge?.(He),H.registerPlayer(He)},[ge,H]),Ne=g&&M&&a!=null&&a.length>0,be=g&&j&&i!=null&&i.length>0,de=be&&Y,Qe=B?.onTranscriptOpenChange;(0,u.useEffect)(()=>(Qe?.(!!de),()=>{Qe?.(!1)}),[de,Qe]);const zt=(0,u.useCallback)(()=>{G(!0)},[]);(0,u.useEffect)(()=>()=>{q.current!=null&&cancelAnimationFrame(q.current)},[]);const on=(0,u.useCallback)(()=>{G(!1),q.current!=null&&cancelAnimationFrame(q.current),q.current=requestAnimationFrame(()=>{Z.current?.focus({preventScroll:!0}),q.current=null})},[]),Ze=be&&!Y&&(0,o.jsxs)("button",{className:ir("vt-show-transcript"),onClick:zt,ref:Z,type:"button",children:[(0,o.jsx)(ce,{name:"closed-captioning"}),te?.audioShowTranscript]});(0,u.useEffect)(()=>{_.setChapters(a??L0)},[_,a]);const rn=ir("item",{small:S==="0",medium:S==="1",full:S==="2","video-training":!0,"no-side-panel":!0}),rt=B?.wrapVideo,tt=y?(0,o.jsx)(Lg,{audioVideoPlayhead:e,canAdjustPlaybackSpeed:m,canRestrictSeek:f,captions:i,chapters:a,checkpointTimesSeconds:B?.checkpointMarkerTimes,cornerRadius:c,disableDownload:h,id:`${b}-${n}-${p}-${l}`,media:T,onCheckpointReached:B?.onCheckpointReached,onLoad:Te,poster:E,progressChanged:ae,recordMediaPlayheadPosition:k,ref:he,shouldPause:O,src:D,style:we,subtitle:A,type:w?"video":P},`${b}-${n}-${p}-${l}-${E||""}`):null,wt=(0,o.jsxs)("div",{className:rn,children:[(0,o.jsx)("div",{className:ir("vt-layout",{"transcript-open":de}),children:(0,o.jsxs)("div",{className:ir("vt-main"),children:[(0,o.jsxs)("figure",{"data-l10n-id":d,children:[(0,o.jsx)("div",{className:ir("figure-container"),children:rt?rt(tt):tt}),v&&(0,o.jsxs)(o.Fragment,{children:[R?.(),(0,o.jsx)("figcaption",{className:ir("wrapper"),children:(N??ue)(x)})]})]}),!Ne&&Ze&&(0,o.jsx)("div",{className:ir("vt-transcript-bar"),children:Ze}),Ne&&(0,o.jsx)(Eie,{chapters:a??[],currentTime:$,headerAction:Ze,onSeek:W})]})}),de&&(0,o.jsx)(Vie,{captions:i,currentTime:$,forwardSeekRestricted:f||!1,l10nId:d,maxTimeReached:K,onClose:on,onSeek:W}),r&&(0,o.jsx)(i4,{backgroundColor:t,blockId:n,partnerContent:s})]});return(0,o.jsx)("div",{className:aae({"transcript-open":de}),children:wt})}var qg=C(49860);function uae({backgroundColor:e,blockId:t,cornerRadius:n,disableDownload:s,enableVideoPlaybackSpeed:r,forwardSeekRestricted:i,headingLevel:a,isGeneratingChapters:c,isLearner:l,item:d,lessonId:h,loadMedia:m,mediaWidth:f,onStep:p,partnerContent:g,audioVideoPlayhead:v,recordMediaPlayheadPosition:x,renderCaption:b,renderPostVideoSlot:y,showChapters:T,transcriptEnabled:S,type:I,isVideoTraining:L,shouldPause:E}){const[k,N]=qg.useState(!1),{currentLocale:R}=at(),M=ct(),{id:A,media:j,partnerContentId:P}=d,w=M(j)??{},{customVideo:D={},tmp:O={},video:B={}}=w,H="poster"in B?B:{...B,...D},_=O.video&&"poster"in O.video?O.video:void 0,{captions:$,chapters:z,key:K,poster:J,src:Y,subtitle:G}=Ea()?H:_||H,U=T||L&&!l?z??[]:[],Q=K||Y,q=(Array.isArray(g)?g:g?.content)?.find(we=>P!=null&&We(we)&&"id"in we&&we.id===P),te=q!=null&&We(q),ne=We(j)&&"l10nId"in j?j.l10nId:void 0,ae=qg.useCallback(()=>{N(!0)},[]),ue=qg.useCallback(({percentComplete:we})=>{we>=100&&p?.({id:A})},[A,p]);if(!Q)return(0,o.jsx)(vie,{mediaWidth:f});const Te={audioVideoPlayhead:v,backgroundColor:e,blockId:t,blockPartnerContent:q,blockPartnerContentExists:te,captions:$,chapters:U,cornerRadius:n,currentLocale:R,dataL10nId:ne,disableDownload:s,enableVideoPlaybackSpeed:r,forwardSeekRestricted:i,id:A,isLoaded:k,item:d,lessonId:h,loadMedia:m,media:j,mediaWidth:f,onLoad:ae,onProgressChanged:ue,poster:J,recordMediaPlayheadPosition:x,renderCaption:b,renderPostVideoSlot:y,subtitle:G,type:I,videoKey:K,videoSrc:Q,shouldPause:E};return L?(0,o.jsx)(dae,{...Te,chapters:U,headingLevel:a,isGeneratingChapters:c,isLearner:l,showChapters:T,transcriptEnabled:S},K):(0,o.jsx)(yie,{...Te},K)}const hae=V("block-video");function Xg({animateBlockEntrance:e,blockId:t,disableDownload:n,enableVideoPlaybackSpeed:s,initiallyVisible:r,isDragPreview:i,isLearner:a,isSidebarPreview:c,items:l,lessonId:d,loadMedia:h,onStep:m,partnerContent:f,progress:p,recordMediaPlayheadPosition:g,renderCaption:v,renderPostVideoSlot:x,settings:b,takingSnapshot:y,type:T,isGeneratingChapters:S,isVideoTraining:I,shouldPause:L}){const E=Cn(),k=l?.[0];if(k==null)return null;const N=hae({"no-animation":!b?.entranceAnimation,presentation:E}).toString(),R=I?"2":"1",M=y||i||c;return(0,o.jsx)(De,{className:N,children:(0,o.jsx)($e,{animateBlockEntrance:e,initiallyVisible:r,isLearner:a,children:M?(0,o.jsx)(gie,{item:k}):(0,o.jsx)(tne,{children:(0,o.jsx)(uae,{audioVideoPlayhead:p?.items?.[t]?.items?.[k.id]?.audioVideoPlayhead??0,backgroundColor:b?.backgroundColor,blockId:t,cornerRadius:b?.cornerRadius,disableDownload:n,enableVideoPlaybackSpeed:s,forwardSeekRestricted:b?.forwardSeekRestricted&&!p?.isComplete,headingLevel:b?.headingLevel,isGeneratingChapters:S,isLearner:a,isVideoTraining:I,item:k,lessonId:d,loadMedia:h,mediaWidth:b?.mediaWidth??R,onStep:m,partnerContent:f,recordMediaPlayheadPosition:g,renderCaption:v,renderPostVideoSlot:x,shouldPause:L,showChapters:!!b?.showChapters,transcriptEnabled:!!b?.showTranscript,type:T})})})})}var Jg=C(49860);const E0=V("block-audio"),e1=V("block-embed"),zn=V("block-attachment");class mae extends Jg.Component{renderCaptionDelegate;constructor(t){super(t),this.renderCaptionDelegate=this.renderCaption.bind(this),this.onLoad=this.onLoad.bind(this),this.state={loaded:!1}}static get defaultProps(){return{audioVideoPlayhead:0,blockId:"",getL10nValue:()=>{},editable:!1,items:[],lessonId:"",onStep:()=>{},recordMediaPlayheadPosition:()=>{}}}renderCaption({caption:t}){const{loaded:n}=this.state,s=E0("caption",{hidden:!n}).toString();return(0,o.jsx)(et,{className:s,value:t})}onLoad(){this.setState({loaded:!0})}renderItem(t){const{blockId:n,getL10nValue:s,labels:r,lessonId:i,loadMedia:a,progress:c,recordMediaPlayheadPosition:l,renderCaption:d=this.renderCaptionDelegate,settings:h}=this.props,m="forwardSeekRestricted"in h?h.forwardSeekRestricted:!1,f=t.media,p=s(f)??{},{id:g}=t,v=p?.tmp?.audio?.key||p?.audio?.key,x=`${i}-${n}-${g}`,b=Mt()(0,["items",n,"items",g,"audioVideoPlayhead"],c),y=Eg({lessonId:i,refs:`items:${n}/items:${g}`});return(0,o.jsxs)("div",{className:E0("item"),children:[a&&(0,o.jsx)(BS,{audioVideoPlayhead:b,canRestrictSeek:!!m&&!c?.isComplete,id:x,item:t,labels:r,mediaSrc:v,onAIUploadFinish:this.props.onAIUploadFinish,onEnd:this.handleOnEnd.bind(this,g),onLoad:this.onLoad,onTranscriptClick:this.onTranscriptClick.bind(this,t),onTranscriptClose:this.props.closeTranscript,onTranscriptUpdate:this.props.onTranscriptUpdate??void 0,recordMediaPlayheadPosition:l,refs:`items:${n}/items:${g}`,transcriptMedia:f,uploadId:y},x),d(t)]},g)}handleOnEnd(t){this.props.onStep({id:t})}onTranscriptClick(t){const{blockId:n}=this.props;return this.props.openTranscript?.({blockId:n,item:t,refs:`items:${n}/items:${t.id}`})}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,items:r,settings:i}=this.props,{entranceAnimation:a}=i,c=E0({"no-animation":!a,presentation:this.props.isPresentation}).toString(),l=r.length>0?r.slice(0,1):[];return(0,o.jsx)(De,{className:c,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:E0("wrapper"),children:l.map(d=>this.renderItem(d))})})})}}const fae=i5(vt(mae));function pae(e){const t=Cn();return(0,o.jsx)(fae,{...e,isPresentation:t})}class gae extends Jg.Component{static get defaultProps(){return{items:[],editable:!1,lessonId:"",blockId:"",settings:{}}}renderItem(t,n){const{id:s,settings:r={}}=t,i=this.props.getL10nValue(t.media)??{},a="embed"in i?i.embed:void 0,{loadMedia:c,labels:l,settings:d}=this.props,{showMetaData:h}=r,{cardMode:m,showBorder:f=!0}=d,p=e1("item",{border:f}).toString();return(0,o.jsx)(sn,{className:p,disabled:!f&&m==Qn.TRANSPARENT,tag:"section",children:c&&(0,o.jsx)(VS,{data:a,id:`${n}-${s}`,isLesson:!0,labels:l,showMetaData:h})},s)}render(){const{animateBlockEntrance:t,blockId:n,getL10nValue:s,initiallyVisible:r,isLearner:i,items:a,settings:c}=this.props,{entranceAnimation:l,mediaWidth:d="0"}=c,h=s(a?.[0]?.media);if(!h)return null;const m=Gte(h),f=m!=="link",p=e1({"no-animation":!l,presentation:this.props.isPresentation,video:m==="video"}).toString(),g=e1("wrapper",{medium:f&&d==="1",full:f&&d==="2"}),v=a.length>0?a.slice(0,1):[];return(0,o.jsx)(De,{className:p,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:g,children:v.map(x=>this.renderItem(x,n))})})})}}const vae=vt(ff()(gae));function Cae(e){const t=Cn();return(0,o.jsx)(vae,{...e,isPresentation:t})}class xae extends Jg.Component{get attachment(){const t=this.props.items[0].media;return this.props.getL10nValue(t)?.attachment??{}}render(){const{animateBlockEntrance:t,initiallyVisible:n,isLearner:s}=this.props;return(0,o.jsx)(De,{children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{className:"block-text--onecol",children:(0,o.jsx)("div",{className:"block-text__container",children:(0,o.jsx)("div",{className:"block-text__row",children:(0,o.jsx)("div",{className:"block-text__col",children:this.renderAttachment(this.attachment)})})})})})})}renderAttachment(t){return t.key?this.renderDownload(t):this.renderNoFile()}renderDownload({key:t,mimeType:n,originalUrl:s,size:r}){const{ariaDescribedBy:i,attachmentId:a,blockId:c,externalLinksDisabled:l,onLinkBlur:d,onLinkFocus:h,onLinkMouseEnter:m,onLinkMouseLeave:f}=this.props,p=yt(t),g=l?"":void 0,v=l?void 0:p,x=l?void 0:"noopener noreferrer nofollow",b=l?"button":void 0,y=l?0:void 0,T=l?void 0:"_blank",S=zn({}).mix("brandHover").toString(),I=zn("info");return(0,o.jsxs)(sn,{"aria-describedby":i,"aria-labelledby":`attachment-name-${c} attachment-icon-${c}`,className:S,"data-external":g,download:s,href:v,id:l?a:void 0,onBlur:l?()=>d?.(a):void 0,onFocus:l?()=>h?.(a):void 0,onMouseEnter:l?()=>m?.(a):void 0,onMouseLeave:l?()=>f?.(a):void 0,rel:x,role:b,tabIndex:y,tag:"a",target:T,children:[(0,o.jsxs)("div",{className:zn("main"),children:[(0,o.jsx)("div",{className:zn("icon"),id:`attachment-icon-${c}`,children:this.fileIcon(n)}),(0,o.jsxs)("div",{className:I,children:[(0,o.jsx)(Re,{className:zn("title").toString(),id:`attachment-name-${c}`,value:s}),(0,o.jsx)("div",{className:zn("size").toString(),children:pie(r)})]})]}),(0,o.jsx)("div",{className:zn("rest"),children:(0,o.jsx)(MG,{className:"brandHover__target--fill"})})]})}renderNoFile(){const t=zn({none:!0}).toString(),n=zn("info");return(0,o.jsx)(sn,{className:t,children:(0,o.jsxs)("div",{className:zn("main"),children:[(0,o.jsx)("div",{className:zn("icon"),children:(0,o.jsx)(K3,{"aria-label":"File"})}),(0,o.jsxs)("div",{className:n,children:[(0,o.jsx)("div",{className:zn("title").toString(),children:"File Attachment Block"}),(0,o.jsx)("div",{className:zn("size").toString(),children:"No file added"})]})]})})}fileIcon(t){const{labels:n}=this.props,s=/excel|spreadsheet/,r=/pdf/,i=/word/,a=/powerpoint|presentation/,c=/rtf|richtext/,l=/zip/;return s.test(t)?(0,o.jsx)(nW,{"aria-label":n?.a11yExcelIcon}):r.test(t)?(0,o.jsx)(JG,{"aria-label":n?.a11yPDFIcon}):i.test(t)?(0,o.jsx)(XG,{"aria-label":n?.a11yWordIcon}):a.test(t)?(0,o.jsx)(eW,{"aria-label":n?.a11yPPTIcon}):c.test(t)?(0,o.jsx)(tW,{"aria-label":n?.a11yRTFIcon}):l.test(t)?(0,o.jsx)(sW,{"aria-label":n?.a11yZipIcon}):(0,o.jsx)(K3,{"aria-label":n?.a11yFileIcon})}}function bae(e){const t=ff()(e),n=vt(t),s=YK(n);function r(i){const a=Ve(),c=i.externalLinksDisabled??(a&&"externalLinksDisabled"in a?a.externalLinksDisabled:!1);return(0,o.jsx)(s,{...i,externalLinksDisabled:c})}return r}const yae=bae(xae),t1=V("block-process-card"),C4=({icon:e,isOverlayAudio:t=!1,onClick:n,text:s,variant:r})=>{const i=`${r}-btn`;return(0,o.jsxs)("button",{className:t1(i,{"audio-overlay":t}),onClick:n,type:"button",children:[(0,o.jsx)("span",{className:t1(`${i}-text`),children:s}),(0,o.jsx)(ce,{classNameIcon:t1(`${i}-icon`),name:e})]})},Sae=V("block-process-card"),Iae=({activeIndex:e,enableVideoPlaybackSpeed:t,id:n,index:s,isIntroStep:r=!1,isOverlayAudio:i=!1,item:a,labels:c,lessonId:l,media:d,onMediaLoad:h,settingZoomOnClick:m})=>{const{image:f}=d??{},p=i?f?.align??"center":"center",g=Sae("media",{legacy:!1,"audio-overlay":i,[`audio-overlay-${p}`]:i,"intro-step":r}),v=e===s;return(0,o.jsx)("div",{className:g,children:(0,o.jsx)(ln,{activeIndex:e,blockId:n,defaultAlign:"center",enableVideoPlaybackSpeed:t,hasPadding:!1,index:`${n}-${s}`,isOverlayAudio:i,item:a,itemIndex:s,labels:c,lessonId:l,media:d,onLoad:h,opts:{disableZoom:!m},shouldPause:!v})})};var n1=C(49860);const ar=V("block-process-card"),Tae=({text:e})=>{const t=n1.useRef(null),{isInView:n}=Lae({ref:t,threshold:.75});return(0,o.jsxs)("div",{className:ar("swipe-badge",{animate:n}),ref:t,children:[(0,o.jsx)("span",{className:ar("swipe-badge-text"),children:e}),(0,o.jsx)(ce,{className:ar("swipe-badge-icon"),name:"chevron-right-solid"})]})};function Lae({ref:e,rootMargin:t="0px",threshold:n=.1}){const[s,r]=n1.useState(!1);return n1.useEffect(()=>{if(!e.current||s)return;const i=new IntersectionObserver(([a])=>{a.isIntersecting&&(r(!0),i.disconnect())},{rootMargin:t,threshold:n});return i.observe(e.current),()=>i.disconnect()},[s,e,t,n]),{isInView:s}}const Eae=({activeIndex:e,className:t,description:n,enableVideoPlaybackSpeed:s,hasIntro:r,id:i,index:a,item:c,labels:l,lessonId:d,media:h,onClickRestart:m,onClickStart:f,settingAudioPosition:p,settingHeadingLevel:g=2,settingShowStepLabel:v=!0,settingStepLabel:x,settingZoomOnClick:b,showSwipeBadge:y,style:T,title:S,totalSteps:I,type:L})=>{const E=`h${g}`,k=L==="intro",N=L==="summary",R=L==="step",M=r?a:a+1,A=Oe(x)||l.processStepName,j=Oe(Array.isArray(h)?{}:h),P=Ns(j,p,!0,"process"),w=()=>{if(!h)return null;const D={activeIndex:e,blockId:i,enableVideoPlaybackSpeed:s,id:i,index:a,isIntroStep:k,labels:l,lessonId:d,media:h,onMediaLoad:()=>{},settingZoomOnClick:b,item:c},O={audio:{media:P.audioOnlyMedia||j,isOverlayAudio:!1},image:{media:P.imageOnlyMedia||j,isOverlayAudio:!1},video:{media:P.videoOnlyMedia||j},embed:{media:P.embedOnlyMedia||j,isOverlayAudio:!1},overlay:{media:j,isOverlayAudio:!1}};return P.renderOrder.map((B,H)=>{if(B==="text")return(0,o.jsx)(Re,{className:ar("description"),value:n},`text-${H}`);const _=O[B];return _?(0,o.jsx)(Iae,{...D,..._},`${B}-${H}`):null})};return(0,o.jsxs)("div",{className:ar(null,{[L]:!0}).mix(t),style:T,children:[R&&v&&(0,o.jsx)("div",{className:ar("number"),children:`${A} ${M}`}),(0,o.jsx)("div",{className:ar("title"),children:(0,o.jsx)(E,{children:(0,o.jsx)(Re,{value:S})})}),w(),!h&&(0,o.jsx)(Re,{className:ar("description"),value:n}),k&&I>1&&(0,o.jsx)(C4,{icon:"chevron-right-solid",isOverlayAudio:P.isOverlayAudio,onClick:f,text:l.processStart,variant:"start"}),N&&I>1&&(0,o.jsx)(C4,{icon:"arrow-rotate-left",isOverlayAudio:P.isOverlayAudio,onClick:m,text:l.processStartAgain,variant:"restart"}),y&&R&&(0,o.jsx)(Tae,{text:l.processSwipe})]})};var Vs=C(49860);const kae=V("block-process-carousel"),x4=e=>e?.type==="intro",s1=e=>e?.type==="summary",o1=e=>e?.type==="step",b4=e=>e?.isHidden,Nae=({animateBlockEntrance:e,enableVideoPlaybackSpeed:t,id:n,initiallyVisible:s,isLearner:r,items:i,labels:a,lessonId:c,onStep:l,onTranscriptUpdate:d,previewType:h,processRef:m,settings:{audioPosition:f,headingLevel:p,stepLabel:g,showStepLabel:v,zoomOnClick:x}})=>{const b=Xt(480),y=Ld(),T=ct(),S=Vs.useRef(null),[I,L]=Vs.useState(0),[E,k]=Vs.useState(!1),N=Vs.useMemo(()=>h===Tr.MOBILE_PORTRAIT||h===Tr.MOBILE_LANDSCAPE,[h]),R=Vs.useMemo(()=>{const _=i.filter(J=>!b4(J)),$=_.find(x4),z=_.find(s1),K=_.filter(o1);return[$,...K,z].filter(Boolean)},[i]),M=Vs.useMemo(()=>R.findIndex((_,$)=>o1(_)&&(o1(R[$+1])||s1(R[$+1]))),[R]),A=x4(R[0]),j=s1(R[R.length-1]),P=!!h;Vs.useEffect(()=>{l&&(i.forEach(_=>b4(_)&&l(_)),R.length>0&&l(R[0]))},[]);const w=Vs.useCallback(()=>{S.current?.navigateToSlide?.(0)},[]),D=Vs.useCallback(()=>{S.current?.navigateToSlide?.(1)},[]),O=Vs.useCallback(_=>{if(L(_),m.current){const K=m.current.closest("[data-block-id]")??m.current;KK(K,{offsetTop:document.getElementById("app-header")?.offsetHeight??0})}_!==M&&!E&&k(!0),l?.(R[_]);const $=R[_]?.media;T($)?.audio&&d?.({audioPlayerId:ks({refs:`items:${n}/items:${R[_]?.id}`}),transcriptMedia:$})},[R,M,T,E,n,l,d,m]),B=({index:_,isActive:$,onClick:z,onKeyDown:K})=>{const J=A&&_===0,Y=j&&_===R.length-1,G=A?_:_+1;let F,U;J?(F=a?.a11yBlockProcessSlideControlsIntroduction,U=(0,o.jsx)(ce,{className:"carousel-controls-item-intro-icon",name:"chevron-right"})):Y?(F=a?.a11yBlockProcessSlideControlsSummary,U=(0,o.jsx)(ce,{name:"check-regular"})):(F=G.toString(),U=G.toString());const Q=`${a?.a11yBlockProcessSlideControlsGoToSlide} ${F}`;return(0,o.jsx)(bS,{"aria-label":Q,ariaLabel:Q,className:"carousel-controls-item-btn",isActive:$,onClick:z,onKeyDown:K,children:U},_)},H=e?"fadeIn":"none";return(0,o.jsx)($e,{animateBlockEntrance:P,animateIn:H,duration:P&&e?1:0,initiallyVisible:s,isLearner:r,children:(0,o.jsx)("div",{className:kae(),children:(0,o.jsx)(Xu,{blockId:n,carouselRef:S,items:R,children:()=>(0,o.jsx)(qu,{iconNameLeft:"chevron-left-solid",iconNameRight:"chevron-right-solid",isInfinite:!1,isRTL:y,labelCarousel:a?.a11yBlockProcessCarousel,labelCarouselRoleDesc:a?.a11yBlockProcessRoleDescription,labelSlideControls:a?.a11yBlockProcessSlideControls,labelSlideControlsGoToNext:a?.a11yBlockProcessSlideControlsGoToNext,labelSlideControlsGoToPrevious:a?.a11yBlockProcessSlideControlsGoToPrevious,labelSlideControlsGoToSlide:a?.a11yBlockProcessSlideControlsGoToSlide,labelSlideCounterPreposition:a?.blocksPreposition,labelSlidePreposition:a?.a11yBlockProcessSlidePreposition,labelSlideRoleDesc:a?.a11yBlockProcessSlideRoleDescription,onChange:O,ref:S,renderSlideIndicator:B,shouldMouseEmulateTouch:N,shouldUseCounter:!1,shouldUseGoToSlide:!0,children:R.map((_,$)=>(0,o.jsx)(sn,{activeIndex:I,description:_.description,enableVideoPlaybackSpeed:t,hasIntro:A,id:n,index:$,isHidden:_.isHidden,item:_,labels:a,lessonId:c,media:_.media,onClickRestart:w,onClickStart:D,settingAudioPosition:f,settingHeadingLevel:p,settingShowStepLabel:v,settingStepLabel:g,settingZoomOnClick:x,showSwipeBadge:b&&!E&&$===M,tag:Eae,title:_.title,totalSteps:R.length,type:_.type},_.id))})})})})};var wae=C(49860);const jae=e=>{const{blockId:t}=e,n=wae.useRef(null);return(0,o.jsx)(De,{className:"block-process",ref:n,children:(0,o.jsx)(Nae,{id:t,processRef:n,...e})})},Ge=V("block-quote"),Jc=({avatar:e,alt:t,l10nId:n,showAvatar:s})=>s?(0,o.jsx)(Ln,{alt:Mo(t),className:Ge("avatar"),"data-l10n-id":n,src:e}):null,y4=(e,{paragraph:t})=>{const n=t||"",s=Ge("text",{blank:t===""}).toString();return(0,o.jsx)(et,{className:s,value:n})},S4=(e,{name:t})=>{const n=Ge("caption",{blank:t===""}).toString();return(0,o.jsx)(et,{className:n,value:t})},I4=({avatar:e,blockProps:t,getL10nValue:n,item:s,renderCaption:r,renderText:i})=>{const a=s?.avatar?.media,c=n(a)?.image,l=c?.alt,d=Km(c),h=Ot(a);return(0,o.jsx)("div",{className:Ge("slide"),children:(0,o.jsxs)("figure",{className:Ge("figure"),children:[d&&e?(0,o.jsx)(Jc,{alt:l??"",avatar:d,l10nId:h,showAvatar:!!e}):null,(0,o.jsx)("blockquote",{className:Ge("quote-body"),children:i(t,s)}),(0,o.jsx)("figcaption",{children:r(t,s)})]})})},Aae=({alt:e,animateBlockEntrance:t,avatar:n,children:s,l10nId:r,initiallyVisible:i,isAuthorBlank:a=!1,isLearner:c,showAvatar:l,type:d})=>{const h=Ge("col",{"no-avatar":!n}),m=n?(0,o.jsx)("div",{className:Ge("image"),children:(0,o.jsx)("div",{className:Ge("avatar-wrap"),children:d==="c"?(0,o.jsx)($e,{animateBlockEntrance:t,animateIn:"fadeInLeftSmall",initiallyVisible:i,isLearner:c,children:(0,o.jsx)(Jc,{alt:e,avatar:n,l10nId:r,showAvatar:l})}):(0,o.jsx)(Jc,{alt:e,avatar:n,l10nId:r,showAvatar:l})})}):null;return(0,o.jsx)("div",{className:Ge("container"),children:(0,o.jsx)("div",{className:Ge("row"),children:(0,o.jsxs)("div",{className:h,children:[(0,o.jsx)("div",{className:Ge("divider-top")}),(0,o.jsxs)("div",{className:Ge("figure",{"no-author":a,"no-avatar":!a&&!l}),children:[m,s]}),(0,o.jsx)("div",{className:Ge("divider-bottom")})]})})})},Rae=({avatar:e,children:t,alt:n,l10nId:s,showAvatar:r})=>(0,o.jsx)("div",{className:Ge("figure"),children:(0,o.jsx)("div",{className:Ge("container"),children:(0,o.jsxs)("div",{className:Ge("row"),children:[(0,o.jsx)("div",{className:Ge("col"),children:e&&r?(0,o.jsx)(Jc,{alt:n,avatar:e,l10nId:s,showAvatar:r}):null}),(0,o.jsx)("div",{className:Ge("col"),children:t})]})})}),Pae=({background:e,avatar:t,children:n,alt:s,l10nId:r,showAvatar:i})=>(0,o.jsx)("div",{className:Ge("background"),style:{backgroundImage:e??""},children:(0,o.jsx)("div",{className:Ge("container"),children:(0,o.jsx)("div",{className:Ge("row"),children:(0,o.jsx)("div",{className:Ge("col"),children:(0,o.jsxs)("div",{className:Ge("figure"),children:[t&&i?(0,o.jsx)(Jc,{alt:s,avatar:t,l10nId:r,showAvatar:i}):null,n]})})})})});class Mae extends u.Component{renderTextDelegate;renderCaptionDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this),this.renderCaptionDelegate=this.renderCaption.bind(this)}static get defaultProps(){return{editable:!1,items:[],type:"a",getL10nValue:()=>{}}}getQuoteEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":case"b":case"background":return"fadeInUp";case"d":case"c":return"fadeInRight"}}getBackgroundImageUrl(t,n){const s=t?.alpha??pre(n),r=pt(t),i=gre(n);return ad({alpha:s,color:i,url:r})?.backgroundImage}renderText(t,{paragraph:n}){const s=n||"",r=Ge("text",{blank:s===""}).toString();return(0,o.jsx)(et,{className:r,value:s})}renderCaption(t,{name:n}){const s=Ge("caption",{blank:n===""}).toString();return(0,o.jsx)(et,{className:s,value:n})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:s,isLearner:r,items:i,settings:a,type:c,renderText:l=this.renderTextDelegate,renderCaption:d=this.renderCaptionDelegate}=this.props,h=92,{avatarSize:m=$g(c),divider:f=!0,dividerSize:p=h,entranceAnimation:g,quoteAlignment:v="left",quoteIcon:x=!0,quotesInline:b,quotePadding:y=2,quoteWidth:T=XI(c)}=a,[S]=i,{avatar:I,background:L}=S,E=n(I?.media)?.image,k=Km(E),N=E?.alt,R=Ot(I.media),M=n(L?.media)?.image,A=M?.overlayColor,j=this.getBackgroundImageUrl(M,A),P=a?.avatar??k!=="",w=k&&k!=="",D=c==="background",O=D&&A==="light",B=JI(T),H=e4(y),_=Ug(c,m),$=Cre(p),z=c==="a",K=c==="c"||D,J=c!=="b"&&!D,Y=S?.name==="",G=S?.paragraph==="",F=Ge(null,{[c]:!0,[`${c}-custom-width-${B}`]:!0,[`${c}-divider-off`]:z&&!f,[`${c}-divider-size-${$}`]:z&&f,[`${c}-quote-padding-${H}`]:!0,[`${c}-align-${v}`]:D,[`${c}-${B}-no-avatar`]:!k||!P,[`${c}-avatar-size-${_}`]:P&&w,[`${c}-quote-icon-off`]:K&&!x,[`${c}-legacy-quote-mark`]:J&&!b,[`${c}-overlay-legacy`]:!A,[`${c}-overlay-light`]:O,"no-animation":!g}).toString(),U=(0,o.jsx)("div",{className:Ge("wrap",{blank:Y||G}),children:(0,o.jsx)($e,{animateBlockEntrance:t,animateIn:this.getQuoteEntranceAnimationType(),initiallyVisible:s,isLearner:r,siblingDelay:.15,children:(0,o.jsxs)("figure",{children:[(0,o.jsx)("blockquote",{children:l(this.props,S)}),(0,o.jsx)("figcaption",{children:d(this.props,S)})]})})});let Q;switch(c){case"d":Q=(0,o.jsx)(Rae,{alt:N,avatar:k,initiallyVisible:s,l10nId:R,showAvatar:P,type:c,children:U});break;case"background":Q=(0,o.jsx)(Pae,{alt:N,avatar:k,background:j,initiallyVisible:s,l10nId:R,showAvatar:P,type:c,children:U});break;default:Q=(0,o.jsx)(Aae,{alt:N,animateBlockEntrance:t,avatar:k,initiallyVisible:s,isAuthorBlank:Y,isLearner:r,l10nId:R,showAvatar:P,type:c,children:U})}return(0,o.jsx)(De,{className:F,children:Q})}}const el=vt(Mae),T4=(e=>(0,o.jsx)(el,{...e}));C.dn(T4);const Oae=e=>(0,o.jsx)(el,{type:"b",...e}),Bae=e=>(0,o.jsx)(el,{type:"c",...e}),Dae=e=>(0,o.jsx)(el,{type:"d",...e}),Fae=e=>(0,o.jsx)(el,{type:"background",...e});class _ae extends u.Component{static get defaultProps(){return{type:"carousel",items:[],onStep:Function.prototype,getL10nValue:()=>{}}}handleChangeCarousel=t=>{this.props.onStep?.(this.props.items[t])};render(){const{blockId:t,animateBlockEntrance:n,editable:s,getL10nValue:r,initiallyVisible:i=!1,isRTL:a,isLearner:c,isLessonBlocksList:l=!1,items:d,labels:h,previewType:m,settings:f,renderText:p=y4,renderCaption:g=S4,type:v}=this.props,{avatar:x=!0,avatarSize:b=$g(v),entranceAnimation:y,quotesInline:T,quotePadding:S=2,quoteWidth:I=XI(v),showBorder:L=!0}=f,k=v!=="b"&&!(v==="background"),N=JI(I),R=e4(S),M=Ug(v,b),A=m==="mobile-portrait"||m==="mobile-landscape",j=Ge({[v]:!0,[`${v}-custom-width-${N}`]:!0,[`${v}-quote-padding-${R}`]:!0,[`${v}-${N}-no-avatar`]:!x,[`${v}-avatar-size-${M}`]:x,[`${v}-legacy-quote-mark`]:!l&&k&&!T,"no-animation":!y,"hide-border":!L,editable:s}).toString(),P=d.map(w=>(0,o.jsx)(I4,{avatar:x,blockProps:this.props,getL10nValue:r,item:w,renderCaption:g,renderText:p},w.id));return(0,o.jsx)("div",{className:Ge("slider-container"),children:(0,o.jsx)(De,{className:j,children:(0,o.jsx)(Zc,{className:Ge("wrap"),children:(0,o.jsx)("div",{className:Ge("container"),children:(0,o.jsx)("div",{className:Ge("col"),children:(0,o.jsx)(sn,{className:Ge("box"),children:(0,o.jsx)($e,{animateBlockEntrance:n,animateIn:"fadeInUp",initiallyVisible:i,isLearner:c,children:(0,o.jsx)(Xu,{blockId:t,items:d,children:({carouselRef:w})=>(0,o.jsx)(qu,{isRTL:a,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:w,shouldMouseEmulateTouch:A,children:P})})})})})})})})})}}const Hae=pg(vt(_ae)),k0=V("block-quote"),Vae=e=>{const{animateBlockEntrance:t,initiallyVisible:n=!1,isLearner:s,items:r=[],settings:i,renderText:a=y4,renderCaption:c=S4,type:l="stacked"}=e,d=ct(),{avatar:h=!0,entranceAnimation:m}=i,f=i.avatarSize??$g(l),p=Ug(l,f),g=k0({[l]:!0,[`${l}-avatar-size-${p}`]:!0,"no-animation":!m}).toString(),v=r.map(x=>(0,o.jsx)(I4,{avatar:h,blockProps:e,getL10nValue:d,item:x,renderCaption:c,renderText:a},x.id));return(0,o.jsx)(De,{className:g,children:(0,o.jsx)(Zc,{className:k0("wrap"),children:(0,o.jsx)("div",{className:k0("container"),children:(0,o.jsx)($e,{animateBlockEntrance:t,animateIn:"fadeInUp",initiallyVisible:n,isLearner:s,siblingDelay:.15,children:(0,o.jsx)("div",{className:k0("row"),children:v})})})})})};var zae=C(58516),$ae=C.n(zae),Uae=C(67731),L4=C.n(Uae),Gae=C(89955),E4=C.n(Gae),Wae=C(50195),Kae=C.n(Wae),Qae=C(18352),cr=C.n(Qae);const k4=e=>({...e.responses[e.response],hasCharacter:e.hasCharacter,type:"response"}),Zae=(e,t)=>{const n=e.responses[e.response],s={emotion:t.emotion,goTo:t.goTo,nextSlide:t.nextSlide},r="action"in t?{action:t.action}:{};return{...s,...r,description:n?.feedback||"",type:"dialogue",hasCharacter:e.hasCharacter}},Yae=e=>[k4(e)],qae=e=>{const t=!!e.responses[e.response],n=k4(e),s=Zae(e,n);return t?[n,s]:[s]},Xae=e=>e.hasFeedback?[e,...qae(e)]:e.response!=null?[e,...Yae(e)]:[e],Jae=(e,t)=>{if(!t)return;const{scene:n,slide:s}=t,r=e.findIndex(c=>c.id===n),a=(e[r]?.slides||[]).findIndex(c=>c.id===s);return{scene:r,slide:a}},N4=bd()(Jae);var ece=C(14172),tce=C.n(ece);const nce=Ut()(st()("filters"),ko()(dt()("name","rise_emotion")),Ra()(en())),sce=Ut()(st()("filters"),Or()(dt()("name","rise_emotion")),st()("value")),w4=e=>new URL(e).pathname.slice(1),oce=e=>Ut()(fn()("key",w4(e.src)),fn()("thumbnailKey",w4(e.thumbnail)))(e),rce=Ut()(st()("poses"),ko()(nce),At()(e=>[sce(e),e]),tce(),js()(oce));var L6e,zs=C(49860);const r1=e=>e===-1?null:e,ice=e=>cs()(Ft(),je(),e),j4=Ra()(Ft()),ma=sg()(j4,vs),A4=$ae()(Gp()),R4=ice(fO),i1=e=>zo()(e);class ace extends zs.Component{static get defaultProps(){return{getCharacter:Function.prototype,onItemUpdate:Function.prototype}}continueRef;feedbackRef;resetRef;buttonRef=zs.createRef();responseItemRef=zs.createRef();scenarioRef=zs.createRef();blockContentRef=zs.createRef();endRef=zs.createRef();textRef=zs.createRef();refs=zs.createRef();dynamicRefs=zs.createRef();fadeObservers=new Map;shouldFocus=!1;constructor(t){super(t);const n={activeScene:0,activeSlide:0,initiated:!1,prevScene:0,prevSlide:0,resizes:0,slides:{}};this.refs.current={},this.state=t.initialState||n,this.fetchCharacters=this.fetchCharacters.bind(this),this.fetchCharacterPose=this.fetchCharacterPose.bind(this),this.getCharacterPose=this.getCharacterPose.bind(this),this.handleNavEvent=this.handleNavEvent.bind(this),this.onClick=this.onClick.bind(this),this.onFocus=this.onFocus.bind(this),this.onInit=this.onInit.bind(this),this.onResize=this.onResize.bind(this),this.onResponseClick=this.onResponseClick.bind(this),this.onTryAgainClick=this.onTryAgainClick.bind(this),this.renderBackground=this.renderBackground.bind(this),this.renderButton=this.renderButton.bind(this),this.renderDetails=this.renderDetails.bind(this),this.renderDialogues=this.renderDialogues.bind(this),this.renderEnd=this.renderEnd.bind(this),this.renderPose=this.renderPose.bind(this),this.renderResponse=this.renderResponse.bind(this),this.renderText=this.renderText.bind(this),this.renderAudioMedia=this.renderAudioMedia.bind(this),this.renderDialogueWithAudioPositioning=this.renderDialogueWithAudioPositioning.bind(this),this.renderTextWithAudioPositioning=this.renderTextWithAudioPositioning.bind(this),this.resetSlide=this.resetSlide.bind(this),this.resetSlides=this.resetSlides.bind(this),this.setNextSlide=this.setNextSlide.bind(this),this.dynamicRefs.current={},this.setupFadeObserver=this.setupFadeObserver.bind(this)}setupFadeObserver(t){if(!t)return;const n=this.fadeObservers.get(t);n&&(n.observer.disconnect(),t.removeEventListener("scroll",n.scrollHandler),this.fadeObservers.delete(t));const s=Array.from(t.children).find(d=>d.className.includes("-bottom"));if(!s)return;const r=t.parentElement?.classList.contains("scenario-block__dialogue__bubble")||t.parentElement?.classList.contains("scenario-block__dialogue__pane")?t.parentElement:t,i=()=>{const{scrollHeight:d,clientHeight:h}=t;return d>h+2},a=d=>{const h=d?.[0]?.isIntersecting??!1,m=i();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(a,{root:t,threshold:[0,1]}),l=()=>{};this.fadeObservers.set(t,{observer:c,scrollHandler:l}),c.observe(s)}componentDidMount(){const{initialState:t,items:n}=this.props,s=Ue()(ja()("poses"),_n()({},"character"),i1);ma(n)&&!s(n)&&this.fetchCharacters(),t||this.resetSlides(),window.addEventListener("resize",this.onResize),window.addEventListener(Je,this.handleNavEvent)}handleNavEvent(t){const{path:n}=t.detail,{blockId:s,sceneId:r,slideId:i,responseId:a}=zi(n,["block","scene"]),c=n.at(-1)==="feedback";if(s!==this.props.blockId)return;const l=r1(this.props.items.findIndex(m=>m.id===r)),d=l!==null?r1(this.props.items[l].slides.findIndex(m=>m.id===i)):null,h=d!==null?r1(this.props.items[l].slides[d].responses.findIndex(m=>m.id===a)):null;this.setState({activeScene:l??0,activeSlide:d??0},()=>{l!==null&&d!==null&&this.setState({slides:{...this.state.slides,[`${l}.${d}`]:{...this.state.slides[`${l}.${d}`],hasFeedback:c,response:h}}})})}componentDidUpdate(){const{items:t,onStep:n}=this.props,{activeScene:s,activeSlide:r}=this.state,i=Mt()([],[s,"slides"],t),a=Mt()(null,[r,"goTo"],i),c=Mt()(null,[r,"type"],i);if(n&&(a==="end"&&c==="text"||!a&&!c)&&E4()(n,t),this.shouldFocus){this.shouldFocus=!1;const m=this.scenarioRef.current?.querySelector('[data-scenario-focus][tabindex="-1"]');m?m.focus():Pp(this.scenarioRef.current)}this.fadeObservers.forEach(({observer:m,scrollHandler:f},p)=>{document.contains(p)||(m.disconnect(),p.removeEventListener("scroll",f),this.fadeObservers.delete(p))})}componentWillUnmount(){clearTimeout(this.continueRef),clearTimeout(this.feedbackRef),clearTimeout(this.resetRef),window.removeEventListener("resize",this.onResize),window.removeEventListener(Je,this.handleNavEvent),this.fadeObservers.forEach(({observer:t,scrollHandler:n},s)=>{t.disconnect(),s.removeEventListener("scroll",n)}),this.fadeObservers.clear()}getActiveScene(){return this.getScene(this.state.activeScene)}getScene(t){const{items:n}=this.props;return n&&t>=0&&t<n.length?n[t]:null}fetchCharacterPose(t,n){const s=this.getScene(t),r=s?.slides,i=r&&n>=0&&n<r.length;if(!s||!r||!i)return{name:"",pose:null};const{character:a}=s,c=r[n],l=`${t}.${n}`,d=[l,"response"],h=[l,"hasFeedback"],m=Mt()(null,d,this.state.slides),f=Mt()(!1,h,this.state.slides),p=_n()("neutral","emotion",c),g=cs()(Fe()(f),Mt()(p,["responses",m,"emotion"]),Fe()(p)),v=Ut()(Mt()(a?.poses?.neutral,["poses",g(c)]),R4);return{name:a?.name||"",pose:v(a)}}fetchCharacters(){const{getCharacter:t,items:n,onItemUpdate:s}=this.props,r=jo()(["id","name","poses","src"]),i=c=>l=>s({itemId:c,payload:{character:l}}),a=({character:c,id:l})=>ma(c)&&t(c.id).then(d=>fn()("poses",rce(d),d)).then(r).then(i(l));n.map(a)}isCharacterHidden(){const{items:t}=this.props,{activeScene:n,activeSlide:s}=this.state,i=this.getActiveScene()?.slides?.[s],a=s===null,c=t[n];return a?!(c?.slidesHaveCharacterByDefault??!1):i&&!i.hasCharacter}getCharacterPose(){const{items:t}=this.props,{activeScene:n,activeSlide:s,prevScene:r,prevSlide:i}=this.state,a=Mt()([],[n,"slides"],t),c=Mt()(!0,[s,"hasCharacter"],a);return j4(r)&&id()(c)?this.fetchCharacterPose(r,i):this.fetchCharacterPose(n,s)}onClick(t,n){const{items:s,onStep:r}=this.props,{activeScene:i,activeSlide:a}=this.state,c=this.getActiveScene()?.slides,l=_n()(null,"type",c?.[a])==="dialogue",d=i===s.length-1,h=a===(c?.length??0)-1,m={activeSlide:a+1},f={activeScene:i+1,activeSlide:0},p={activeSlide:null},g={activeScene:0,activeSlide:0},v=Ut()(N4(s),S=>({activeScene:S.scene,activeSlide:S.slide})),x=jn()([[Fe()(h&&d),Fe()(p)],[Fe()(h&&!d),Fe()(f)],[Sr(),Fe()(m)]]),b=cs()(Fe()(l),Fe()(p),Fe()(g)),y=jn()([[pn()("slide"),cr()(v,[n])],[pn()("next"),x],[pn()("end"),b]]),T=()=>this.continueRef=setTimeout(this.setNextSlide,300);this.resetRef=setTimeout(this.resetSlide.bind(this,i,a),0),this.setState({prevScene:i,prevSlide:a}),this.setState(y(t),T),t==="end"&&this.resetSlides(),t==="end"&&r&&E4()(r,s)}onFocus(){this.shouldFocus=!0}onInit(){this.setState({initiated:!0})}onResize(){this.setState({resizes:this.state.resizes+1})}onResponseClick(t,n){const{activeScene:s,activeSlide:r,slides:i}=this.state,{getL10nValue:a,lessonId:c,blockId:l}=this.props,d=`${s}.${r}`,h=fn()("response",t),m=fn()("hasFeedback",!0),f=Zs()({[`${d}`]:h}),p=Zs()({[`${d}`]:m});n.media&&a(n.media)?.audio&&Se.playerId===`audio-${c}-${l}`&&Se.pause();const v=Ue()(p,f);this.setState({slides:f(i)},()=>{this.shouldFocus=!0,this.setState({slides:v(i)})})}onTryAgainClick(){const{activeScene:t,activeSlide:n,slides:s}=this.state,r=`${t}.${n}`,i=L4()({hasFeedback:null,response:null}),a=Zs()({[`${r}`]:i});this.setState({slides:a(s)})}render(){const{blockId:t,getL10nValue:n,isPDF:s,items:r,labels:i}=this.props,{activeScene:a,activeSlide:c,initiated:l}=this.state,h=this.getActiveScene()?.slides?.[c],m=Ue()(vs,_n()({},"character"),i1),f=Ue()(ja()("poses"),_n()({},"character"),i1),p=Ue()(ls(),Mt()({},["character","poses"])),g=Ue()(xl(),ls(),At()(p)),v=this.isCharacterHidden(),x=X()("scenario-block",{"scenario-block--initiated":l,"scenario-block--mobile":co.isMobile,"scenario-block--loading":m(r)&&!f(r),"scenario-block--character-hidden":v}),b=`scenario-live-${t}`,y={"aria-label":i?.a11yGroupScenario,"aria-describedby":b,className:x,ref:this.scenarioRef,role:"group",style:window.innerWidth<480?{height:window.innerHeight}:void 0},T=pt(n(r?.[0].background?.media)?.image),S=jn()([[Ft(),this.renderEnd],[dt()("type","dialogue"),this.renderDialogues],[dt()("type","text"),this.renderText],[Sr(),Fe()(null)]]),I=X()("scenario-block__character",{"scenario-block__character--hidden":v}),L=`${a}.${c}`,E=this.state.slides[L],k=E?.hasFeedback?h?.responses?.[E?.response]?.alt:h?.alt,N=n(k);return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{...y,"data-l10n-id":Ot(k),children:[(0,o.jsx)("div",{"aria-live":"polite",className:"visually-hidden-always",id:b,children:N}),(0,o.jsx)("div",{className:"scenario-block__spinner"}),(0,o.jsx)("div",{className:"scenario-block__background-wrapper",children:ma(r)&&r.map(this.renderBackground)}),T&&(0,o.jsx)(Ln,{alt:"",onLoad:this.onInit,src:T}),(0,o.jsxs)("div",{className:"scenario-block__inner",children:[(0,o.jsx)("div",{className:I,children:f(r)&&g(r).map(this.renderPose)}),(0,o.jsx)(La,{children:ma(r)&&S(h)})]})]}),s&&h&&this.renderDetails(h)]})}renderBackground(t,n){const{activeScene:s}=this.state,{id:r,blurBackground:i}=t,a=this.props.getL10nValue(t?.background?.media)?.image,c=X()("scenario-block__background",{"scenario-block__background--active":s===n,"scenario-block__background--blur":i??!0}),l=pt(a);return l?(0,o.jsx)(Ln,{alt:"",className:c,src:l},r):(0,o.jsx)(o.Fragment,{})}renderButton(t){const{labels:n}=this.props,{scenarioContinue:s,scenarioTryAgain:r}=n,{goTo:i,nextSlide:a}=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,o.jsxs)("span",{children:[r," ",(0,o.jsx)("i",{className:"icon icon-reload"})]}):(0,o.jsx)("span",{children:s}),m={className:"scenario-block__dialogue__button",key:"button",onClick:c==="tryAgain"?Ue()(this.onFocus,this.onTryAgainClick):Ue()(this.onFocus,cr()(this.onClick,[i,a]))};return(0,o.jsx)(La,{children:(0,o.jsx)(Qs,{...l,children:(0,o.jsx)("button",{...m,type:"button",children:d})})})}renderDetails(t){const{items:n}=this.props,{activeScene:s,activeSlide:r}=this.state,{responses:i,type:a}=t,c=(m,f)=>(0,o.jsxs)("span",{children:[m," ",(0,o.jsx)(NG,{})," ",f]},m),l=Ut()(N4(n),m=>`Scene ${m.scene+1} Slide ${m.slide+1}`),d=(m,{goTo:f,nextSlide:p})=>jn()([[pn()("next"),cr()(c,[m,"Next Slide"])],[pn()("end"),cr()(c,[m,"End of Scenario"])],[Sr(),cr()(c,[m,l(p||{})])]])(f),h=a==="text"?d("Continue",t):i.map((m,f)=>d(f,m));return(0,o.jsxs)("div",{className:"scenario-block__pdf-details",children:[(0,o.jsxs)("h3",{children:["Scene ",s+1," Slide ",r+1]}),h]})}renderDialogue(t,n,s){const{description:r,id:i,hasCharacter:a}=n,c="type"in n?n.type:void 0,{count:l,firstKey:d,hasFeedback:h,slide:m,totalDialogues:f}=t,p=s===0?i:s,g=s===1?d:s-1,v=s===0&&l===1,x=s===l,b=c==="dialogue"&&(v||x),y=this.dynamicRefs.current[`dialogue-${p}`],T=x&&this.dynamicRefs.current[`dialogue-${g}`],S=y&&y.offsetHeight,I=x&&T&&T.offsetHeight,L=h?30:0,E=window.innerWidth<480?20:30,k=E*2+60+I-L,N=E+60-L,R=Kae()(S+L-60),M=zs.createRef(),{settings:A,getL10nValue:j}=this.props,P=A?.audioPosition,w=j(m.media),D=Ns(w,P),O=D.renderOrder.indexOf("audio")<D.renderOrder.indexOf("text"),B=!!w?.audio,H=h&&s===f-1,_=X()("scenario-block__dialogue",{"scenario-block__dialogue--response":c==="response","scenario-block__dialogue--feedback":H,"scenario-block__dialogue--done":s<l-1,"scenario-block__dialogue--audio-top":O&&B}),$=jn()([[Fe()(v),Fe()(null)],[pn()(l),Fe()({top:`${k}px`})],[pn()(l-1),Fe()({top:`${N}px`})],[pn()(l-2),Fe()({top:`${R}px`})],[Sr(),Fe()({top:`-${S+30}px`})]]),z={className:_,ref:U=>{this.dynamicRefs.current[`dialogue-${p}`]=U},style:$(s)},K={appear:!0,classNames:"scenario-block__dialogue-",nodeRef:M,key:s,timeout:{enter:400,exit:400}},J=X()({"scenario-block__dialogue__bubble":a||c==="response","scenario-block__dialogue__pane":!a}),Y=this.props.getL10nValue(r)||"",G=c!=="response"&&!H&&B&&O&&(0,o.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(m)}),F=(0,o.jsxs)("div",{className:J,"data-scenario-focus":b?"":void 0,tabIndex:b?-1:void 0,children:[G,(0,o.jsxs)("div",{className:"scenario-block__dialogue__bubble__content",ref:this.setupFadeObserver,children:[c!=="response"&&!H?this.renderDialogueWithAudioPositioning(m,Y,D):(0,o.jsx)(Re,{value:Y}),(0,o.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})]});return(0,o.jsx)(Qs,{...K,children:(0,o.jsx)("div",{children:(0,o.jsx)("div",{...z,children:ma(r)&&F})})})}renderDialogues(t){const{activeScene:n,activeSlide:s,slides:r}=this.state,{id:i,responses:a}=t,c=`${n}.${s}`,l=r[c]||{},h=Ue()(xl(),Xae,mi()(l))(t),{hasFeedback:m,response:f}=l,{feedback:p}=a[f]||{},g=Ft()(f)&&vs(a),v=m?h.length-1:h.length,x=(v===1&&en()(a)||v===2&&vs(a))&&m,b={count:v,firstKey:Mt()(null,[0,"id"],h),hasFeedback:m&&ma(p),slide:t,totalDialogues:h.length},y={classNames:"scenario-block__content-",nodeRef:this.blockContentRef,timeout:{enter:0,exit:1e3}},T=(0,o.jsx)("div",{className:"scenario-block__dialogues__bottom",children:(0,o.jsx)("div",{className:"scenario-block__dialogues__bottom__inner",children:(0,o.jsx)("div",{className:"scenario-block__dialogues__responses",children:(0,o.jsx)(La,{component:"ol",role:"list",children:a.map((S,I)=>this.renderResponse(S,t,I))})})})});return(0,o.jsx)(Qs,{...y,children:(0,o.jsx)("div",{className:"scenario-block__dialogues scenario-block__content",children:(0,o.jsxs)("div",{className:"scenario-block__dialogues__inner",children:[(0,o.jsx)("div",{className:"scenario-block__dialogues__top",children:(0,o.jsx)("div",{className:"scenario-block__dialogues__top__inner",children:(0,o.jsx)(La,{children:h.map(this.renderDialogue.bind(this,b))})})}),g&&T,x&&this.renderButton(h[v-1])]})})},i)}renderEnd(){const{labels:t}=this.props,{scenarioComplete:n,scenarioStartOver:s}=t,r=Ue()(this.onFocus,cr()(this.onClick,["end",null])),i=X()(["scenario-block__text","scenario-block__text--end","scenario-block__content"]),a={classNames:"scenario-block__content-",nodeRef:this.endRef,timeout:{enter:0,exit:400}};return(0,o.jsx)(Qs,{...a,children:(0,o.jsx)("div",{className:i,children:(0,o.jsxs)("div",{className:"scenario-block__text__inner","data-scenario-focus":"",tabIndex:-1,children:[(0,o.jsx)("div",{className:"scenario-block__text__title",children:(0,o.jsx)("h2",{children:n})}),(0,o.jsxs)("button",{className:"scenario-block__text__end",onClick:r,type:"button",children:[(0,o.jsx)("span",{children:s}),(0,o.jsx)("i",{className:"icon icon-reload"})]})]})},"end")},"end")}renderPose(t,n){const{pose:s}=this.getCharacterPose(),{filters:r,id:i}=t,a=R4(t),c=sg()(dt()("name","style")),l=c(dt()("value","left_aligned")),d=c(dt()("value","right_aligned")),h=X()("scenario-block__character__inner",{"scenario-block__character__inner--active":s===a,"scenario-block__character__inner--right":Or()(d,r),"scenario-block__character__inner--left":Or()(l,r)});return(0,o.jsx)("div",{className:h,"data-pose-id":i,children:(0,o.jsx)(Ln,{alt:"",src:a})},`pose-${n}-${i}`)}renderResponse({description:t},n,s){const{isPDF:r}=this.props,i=r?lce:Ue()(this.onFocus,cr()(this.onResponseClick,[s,n])),a=p=>{const v=p.currentTarget.querySelector(".scenario-block__response__inner");if(v){const x=v.getBoundingClientRect();if(p.clientX>x.right-16){p.preventDefault();return}}i(p)},c=p=>{const v=p.currentTarget.querySelector(".scenario-block__response__inner");if(v){const x=v.getBoundingClientRect();p.clientX>x.right-16?v.classList.add("hovering-scrollbar"):v.classList.remove("hovering-scrollbar")}},l=p=>{const v=p.currentTarget.querySelector(".scenario-block__response__inner");v&&v.classList.remove("hovering-scrollbar")},d=X()(["scenario-block__response",`scenario-block__response--${s}`]),h=X()("scenario-block__response-item",`scenario-block__response-item--${s}`),m={appear:!0,classNames:"scenario-block__response-item-",nodeRef:this.responseItemRef,timeout:{enter:0,exit:1e3}},f=(0,o.jsx)("button",{className:d,onClick:a,onMouseLeave:l,onMouseMove:c,type:"button",children:(0,o.jsxs)("div",{className:"scenario-block__response__inner",ref:this.setupFadeObserver,children:[(0,o.jsx)("div",{className:"scenario-block__response__number",children:s+1}),(0,o.jsx)(Re,{value:t}),(0,o.jsx)("div",{className:"scenario-block__response__inner-bottom"})]})});return(0,o.jsx)(Qs,{...m,children:(0,o.jsx)("li",{className:h,role:"listitem",children:f})},s)}renderText(t){const{description:n,goTo:s,hasCharacter:r,id:i,nextSlide:a}=t,c=this.props.getL10nValue(t.title),l=this.props.getL10nValue(n)||"",{labels:d,settings:h,getL10nValue:m}=this.props,{scenarioContinue:f,scenarioStartOver:p}=d,g=!n&&(c||"").length<22,v=h?.audioPosition,x=m(t.media),b=Ns(x,v),y=b.renderOrder.indexOf("audio")<b.renderOrder.indexOf("text"),T=!!x?.audio,S=X()("scenario-block__text","scenario-block__content",{"scenario-block__text--no-character":!r,"scenario-block__text--short":g,"scenario-block__text--audio-top":y&&T}),I={classNames:"scenario-block__content-",nodeRef:this.textRef,timeout:{enter:0,exit:400}},L=h?.headingLevel,E=L?`h${L}`:"h2",k=`scenario-title-${i}`,N=`scenario-description-${i}`,R=`${k} ${N}`,M=X()("scenario-block__text__inner",{"scenario-block__text__inner--end":s==="end"}),A=X()("scenario-block__text__title",{"scenario-block__text__title--end":s==="end"}),j=(0,o.jsx)("div",{className:A,"data-l10n-id":Ot(t.title),id:k,children:(0,o.jsx)(E,{children:c})}),P=T&&y&&(0,o.jsx)("div",{className:"audio-position-wrapper audio-position-wrapper--top",children:this.renderAudioMedia(t)}),w=(0,o.jsx)("div",{className:"scenario-block__text__description",id:N,ref:this.setupFadeObserver,children:this.renderTextWithAudioPositioning(t,l,b)}),D=Ue()(this.onFocus,cr()(this.onClick,[s,a])),O=(0,o.jsx)("button",{"aria-describedby":R,className:"scenario-block__text__continue",onClick:D,type:"button",children:(0,o.jsx)("span",{children:f})}),B=(0,o.jsxs)("button",{"aria-describedby":R,className:"scenario-block__text__end",onClick:D,type:"button",children:[(0,o.jsx)("span",{children:p}),(0,o.jsx)("i",{className:"icon icon-reload"})]});return(0,o.jsx)(Qs,{...I,children:(0,o.jsx)("div",{className:S,children:(0,o.jsxs)("div",{className:M,"data-scenario-focus":"",tabIndex:-1,children:[c&&j,P,n&&w,s==="end"?B:O]})},i)},i)}renderAudioMedia(t){const{blockId:n,getL10nValue:s,labels:r,lessonId:i,items:a,settings:c}=this.props,l=s(t.media),d=a?.[this.state.activeScene];return l?(0,o.jsx)(ln,{blockId:n,index:n,item:t,labels:r,lessonId:i,lessonNumber:i,media:l,refs:`items:${n}/items:${d.id}/slides:${t.id}`,shouldPause:t.type!=="dialogue",volumeSliderPosition:c?.audioPosition==="top"?"below":"above"}):null}renderDialogueWithAudioPositioning(t,n,s){const r=s.renderOrder.indexOf("audio")<s.renderOrder.indexOf("text");return(0,o.jsxs)(o.Fragment,{children:[s.renderOrder.map((i,a)=>{if(i==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(Re,{value:n})},`text-${a}`);if(i==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,o.jsx)("div",{children:c},`audio-${a}`):null}return null}),(0,o.jsx)("div",{className:"scenario-block__dialogue__bubble-bottom"})]})}renderTextWithAudioPositioning(t,n,s){const r=s.renderOrder.indexOf("audio")<s.renderOrder.indexOf("text");return(0,o.jsxs)(o.Fragment,{children:[s.renderOrder.map((i,a)=>{if(i==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(Re,{value:n})},`text-${a}`);if(i==="audio"&&!r){const c=this.renderAudioMedia(t);return c?(0,o.jsx)("div",{children:c},`audio-${a}`):null}return null}),(0,o.jsx)("div",{className:"scenario-block__text__description-bottom"})]})}resetSlide(t,n){const{slides:s}=this.state,r=`${t}.${n}`,i={hasFeedback:!1,response:null};this.setState({slides:fn()(r,i,s)})}resetSlides(){const{items:t}=this.props,n=r=>(i,a,c)=>{const{type:l,responses:d=[]}=a,h=l==="dialogue"&&d.length===0;return fn()(`${r}.${c}`,{hasFeedback:h,response:null},i)},s=(r,i,a)=>Ut()(_n()([],"slides"),A4(n(a),{}),L4()(r))(i);this.setState({slides:A4(s,{},t)})}setNextSlide(){const{activeScene:t,activeSlide:n,slides:s}=this.state,r=this.getActiveScene()?.slides;if(!r)return;const{responses:i=[],type:a}=r[n]||{},c=`${t}.${n}`,l=fn()("hasFeedback",!0),d=Zs()({[c]:l});a==="dialogue"&&en()(i)&&(this.shouldFocus=!0,this.setState({slides:d(s)}))}shouldComponentUpdate(t,n){return t.items!==this.props.items||t.settings!==this.props.settings||n.activeScene!==this.state.activeScene||n.activeSlide!==this.state.activeSlide||n.initiated!==this.state.initiated||n.resizes!==this.state.resizes||n.slides!==this.state.slides||t.labels!==this.props.labels}}const cce=e=>{const t=ct();return(0,o.jsx)(ace,{...e,getL10nValue:t})};function lce(){}var dce=C(49860);class uce extends dce.Component{render(){const{animateBlockEntrance:t,isLearner:n,previewType:s,initiallyVisible:r}=this.props,i=!Ft()(s),l={animateBlockEntrance:i,animateIn:t?"fadeIn":"none",duration:i&&t?1:0,initiallyVisible:r,isLearner:n};return(0,o.jsx)(De,{className:"block-scenario",children:(0,o.jsx)($e,{...l,children:(0,o.jsx)(cce,{...this.props})})})}}function hce(e){e&&(e.addEventListener("touchstart",lr,!0),e.addEventListener("touchmove",lr,!0),e.addEventListener("touchcancel",lr,!0),e.addEventListener("touchend",lr,!0))}function mce(e){e&&(e.removeEventListener("touchstart",lr,!0),e.removeEventListener("touchmove",lr,!0),e.removeEventListener("touchcancel",lr,!0),e.removeEventListener("touchend",lr,!0))}function lr(e){e?.stopPropagation?.()}const fa=V("playing-card"),P4=({id:e,isDeckTopCard:t,title:n,ref:s})=>{const[r,i]=(0,u.useState)(!1),[a,c]=(0,u.useState)(!1),[l,d]=(0,u.useState)({x:0,y:0}),[h,m]=(0,u.useState)(!0),[f,p]=(0,u.useState)(!1),[g,v]=(0,u.useState)(0),x=Kt(),b=ct(),y=vn(),T=(0,u.useRef)(null),S=(0,u.useRef)(null),I=(0,u.useRef)(void 0),L=(0,u.useRef)(void 0),E=(0,u.useRef)(!1),k=(0,u.useCallback)(()=>{const{innerWidth:B}=window,H=T.current&&T.current.scrollHeight>T.current.clientHeight,_=B<g;H&&B>g&&v(B),p(H||_)},[g]),N=(0,u.useRef)(()=>{i(!0),c(!1)}),R=(0,u.useRef)(()=>{i(!1)});(0,u.useImperativeHandle)(s,()=>({onStartSortAttempt:N.current,onEndSortAttempt:R.current})),(0,u.useEffect)(()=>{const B=setTimeout(()=>{m(!1)},300);return()=>clearTimeout(B)},[]),(0,u.useEffect)(()=>{const B=S.current;if(!B)return;const H=()=>{i(!0),c(!1)},_=({dx:z,dy:K})=>{d(J=>({x:J.x+z,y:J.y+K}))},$=()=>{i(!1)};return N.current=H,R.current=$,hce(B),_s(B).draggable({inertia:!0,autoScroll:!1,modifiers:[_s.modifiers.snap({targets:[(z,K)=>({x:z,y:K})],range:1/0,endOnly:!0,relativePoints:[{x:.5,y:.5}]})]}).on("dragstart",H).on("dragmove",_).on("dragend",$),k(),I.current=Yu()(k,250),window.addEventListener("resize",I.current),()=>{mce(B),_s(B).off("dragstart",H).off("dragmove",_).off("dragend",$),I.current&&(I.current.cancel(),window.removeEventListener("resize",I.current)),clearTimeout(L.current)}},[k]),(0,u.useEffect)(()=>{k()},[e,k]),(0,u.useEffect)(()=>{const B=E.current;E.current=r,B&&!r&&(c(!0),clearTimeout(L.current),L.current=setTimeout(()=>{d({x:0,y:0}),c(!1)},300))},[r]);const M=y?.backgroundType===re.ACCENT||y?.backgroundType===re.IMAGE,A=`translate3d(${l.x}px, ${l.y}px, 0)`,j={WebkitTransform:A,transform:A},P=fa("title",{"is-max-length":f}),w=fa({draggable:!0,moving:r,fail:a,reset:h}),D=M?fa("content"):fa("content").mix("brand--border"),O=b(n)??"";return(0,o.jsxs)("div",{"aria-hidden":!t,className:w,id:e.toString(),onMouseDown:B=>{B.preventDefault()},ref:S,style:j,children:[t&&(0,o.jsx)("div",{className:"visually-hidden-always",children:`${x?.a11ySortingCurrentItem}: ${O}`}),(0,o.jsxs)(sn,{"aria-hidden":"true",className:D,children:[(0,o.jsx)(Re,{className:P,id:`card-title-${e}`,ref:T,value:n}),(0,o.jsx)("div",{className:fa("handle")}),(0,o.jsx)("div",{className:fa("status"),children:(0,o.jsx)("i",{className:"icon icon-check"})})]})]},`card-${e}`)},N0=V("restart-button");function fce({allowTabNavigation:e=!0,onClick:t,onFocus:n=mn,ref:s,text:r}){const i=N0({}).mix("button");return(0,o.jsx)("button",{"aria-hidden":!e,className:i,"data-testid":"quiz-take-again-button",onClick:t,onFocus:n,ref:s,tabIndex:VJ(e),type:"button",children:(0,o.jsxs)("div",{className:N0("content"),children:[(0,o.jsx)("span",{className:N0("text").mix("brand--ui"),children:r}),(0,o.jsx)("i",{"aria-hidden":"true",className:N0("icon").mix("icon").mix("icon-reload")})]})})}const pce=fce,tl=V("deck"),gce=e=>e?.percentViewed===100,vce=(e,t)=>`${e?.correctlyAnswered??0}/${t}`,Cce=(e,t)=>String(t?.lastIncorrectCardId)===String(e.id),xce=({count:e,items:t,id:n,onReplay:s,progress:r,ref:i})=>{const a=Kt(),c=(0,u.useRef)([]),l=(0,u.useRef)(null);(0,u.useImperativeHandle)(i,()=>({startKeyDrop(){c.current[0]?.onStartSortAttempt()},endKeyDrop(){c.current[0]?.onEndSortAttempt()},focusReplayButton(){l.current?.focus()}}));const d=gce(r),h=vce(r,e),m=()=>{s?.({id:n})};return(0,o.jsxs)("div",{className:tl({complete:r?.percentViewed===100}),children:[(0,o.jsx)("div",{className:tl("spacer")}),d&&(0,o.jsxs)("div",{className:tl("cardholder"),children:[(0,o.jsxs)("div",{className:tl("title").mix("brand--ui"),children:[h," ",a?.sortingCardsCorrect]}),(0,o.jsx)(pce,{allowTabNavigation:d,onClick:m,ref:l,text:a?.sortingReplay??""})]}),(0,o.jsx)("div",{className:tl("content"),children:t.map((f,p)=>(0,o.jsx)(P4,{id:f.id,isDeckTopCard:c.current[p]===c.current[0],isIncorrect:Cce(f,r),ref:g=>{c.current[p]=g},title:f.title},f.id))})]})},ai=V("pile"),bce=({id:e,lessonId:t,deckTopCard:n,nextCard:s,isComplete:r=!1,onCardDrop:i,onNavigateToNext:a,onNavigateToPrevious:c,onKeyDropStart:l,onKeyDropEnd:d,title:h,ref:m})=>{const[f,p]=(0,u.useState)(void 0),[g,v]=(0,u.useState)(!1),[x,b]=(0,u.useState)(!0),[y,T]=(0,u.useState)(!1),[S,I]=(0,u.useState)(!1),[L,E]=(0,u.useState)(0),k=(0,u.useRef)(null),N=(0,u.useRef)(null),R=(0,u.useRef)(null),M=(0,u.useRef)(void 0),A=(0,u.useRef)(void 0),j=(0,u.useRef)(void 0),P=(0,u.useRef)(void 0),w=(0,u.useRef)(void 0),D=Kt(),O=ct(),{announcePolite:B}=Ms(),H=(0,u.useEffectEvent)(()=>{if(r||!n)return;const Z=n.id.toString(),q=n.pileId===e;i?.({id:t,itemId:Z,isCorrect:q});const te=O(n.title)??"",ne=O(h)??"";if(q){clearTimeout(A.current),clearTimeout(j.current),clearTimeout(P.current),p(n),v(!0),b(!1),B(`${D?.a11ySortingCorrect}. ${te}, ${D?.a11ySortingCategory}: ${ne}`);const ae=O(s?.title)??"";ae&&(P.current=setTimeout(()=>{B(`${D?.a11ySortingNextItem}. ${ae}`)},500)),A.current=setTimeout(()=>{p(void 0),v(!1)},1500),j.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(A.current),clearTimeout(j.current),clearTimeout(P.current),p(void 0),v(!1),b(!0),B(D?.a11ySortingIncorrect??"")});(0,u.useImperativeHandle)(m,()=>({focus(){N.current?.focus()}}));const _=(0,u.useCallback)(()=>{const{innerWidth:Z}=window,q=k.current&&k.current.scrollHeight>(k.current.offsetParent?.clientHeight??0),te=Z<L;q&&Z>L&&E(Z),I(q||te)},[L]),$=(0,u.useCallback)(()=>{if(r||!n)return;l?.();const Z=n.id.toString(),q=n.pileId===e;i?.({id:t,itemId:Z,isCorrect:q});const te=O(n.title)??"",ne=O(h)??"";if(q){clearTimeout(A.current),clearTimeout(j.current),clearTimeout(P.current),p(n),v(!0),b(!1),B(`${D?.a11ySortingCorrect}. ${te}, ${D?.a11ySortingCategory}: ${ne}`);const ae=O(s?.title)??"";ae&&(P.current=setTimeout(()=>{B(`${D?.a11ySortingNextItem}. ${ae}`)},500)),A.current=setTimeout(()=>{p(void 0),v(!1)},1500),j.current=setTimeout(()=>{b(!0)},1300)}else clearTimeout(A.current),clearTimeout(j.current),clearTimeout(P.current),p(void 0),v(!1),b(!0),B(D?.a11ySortingIncorrect??"")},[r,n,s,e,t,D,h,O,l,i,B]),z=(0,u.useCallback)(Z=>{Wo(Z)?H6(()=>c?.())(Z):Ko(Z)&&H6(()=>a?.())(Z)},[c,a]),K=(0,u.useCallback)(()=>{r||($(),clearTimeout(w.current),w.current=setTimeout(()=>d?.(),100))},[$,d,r]),J=(0,u.useCallback)(()=>{T(!0)},[]),Y=(0,u.useCallback)(()=>{T(!1)},[]);(0,u.useEffect)(()=>{const Z=R.current;if(!Z)return;const q=ae=>{const ue=_s.getElementRect(ae.target),Te={x:ue.left+ue.width/2,y:ue.top+ue.height/2};ae.draggable.draggable({snap:{targets:[Te]}})},te=ae=>{ae.draggable.draggable({snap:{targets:[(ue,Te)=>({x:ue,y:Te})]}})},ne=ae=>{ae.draggable.draggable({snap:{targets:[(ue,Te)=>({x:ue,y:Te})]}}),ae.stopPropagation?.(),ae.preventDefault?.(),H()};return _s(Z).dropzone({overlap:"pointer"}).on("dragenter",q).on("dragleave",te).on("drop",ne),_(),M.current=Yu()(_,250),window.addEventListener("resize",M.current),()=>{_s(Z).off("dragenter",q).off("dragleave",te).off("drop",ne),clearTimeout(A.current),clearTimeout(j.current),clearTimeout(P.current),clearTimeout(w.current),M.current&&(M.current.cancel(),window.removeEventListener("resize",M.current))}},[]);const G=X()(ai(),{"drop-success":g,complete:r}),F=X()(ai("content"),{"drop-animating":!x&&!y}),U=ai("title",{"is-max-length":S}),Q=O(h)??D?.a11ySortingCategories??"Categories";return(0,o.jsx)("div",{className:G,ref:R,children:(0,o.jsx)("div",{className:ai("wrapwrap"),children:(0,o.jsxs)(sn,{className:ai("wrap"),overrideBackground:!0,children:[(0,o.jsx)("div",{"aria-hidden":"true",className:ai("message"),children:(0,o.jsx)(Re,{className:U,ref:k,value:h})}),(0,o.jsx)("button",{"aria-disabled":r,"aria-label":Q,className:F,disabled:r,onBlur:Y,onClick:K,onFocus:J,onKeyDown:z,ref:N,type:"button",children:f&&(0,o.jsx)(P4,{id:f.id,title:f.title})}),(0,o.jsx)("div",{className:ai("background")})]})})})},a1=V("sorting"),yce=(e,t)=>!t||!t.items?e:e.filter(n=>!t.items?.[n.id]?.isViewed),Sce=({id:e,items:t,piles:n,onCardDrop:s,onReplay:r,progress:i})=>{const[a,c]=(0,u.useState)(()=>fm()(t)),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)([]),m=(0,u.useRef)(null),f=(0,u.useRef)(i?.retryAttempts),p=(0,u.useRef)(i?.percentViewed),g=(0,u.useRef)(void 0),v=(0,u.useRef)(void 0),x=(0,u.useRef)(void 0),b=Kt(),y=ct(),{announcePolite:T}=Ms(),S=(0,u.useEffectEvent)(()=>{h.current[0]?.focus()}),I=(0,u.useEffectEvent)(()=>{const A=i?.correctlyAnswered??0,j=t.length;T(`${A} ${b?.a11ySortingCompleteOf} ${j} ${b?.a11ySortingComplete}`)}),L=(0,u.useEffectEvent)(()=>{m.current?.focusReplayButton()});(0,u.useEffect)(()=>{const A=j=>{const{blockId:P,cardId:w}=zi(j.detail.path,["block","card"]);e!==P||!w||c(D=>{const O=D.find(H=>H.id===w),B=D.filter(H=>H.id!==w);return O?[O,...B]:D})};return window.addEventListener(Je,A),()=>{window.removeEventListener(Je,A)}},[e]),(0,u.useEffect)(()=>{const A=i?.retryAttempts,j=f.current;return A!==j?(f.current=A,c(fm()(t)),clearTimeout(g.current),g.current=setTimeout(()=>{S()},100)):c(P=>{const w=t.filter(B=>!P.find(H=>H.id===B.id));return[...P.filter(B=>t.find(H=>H.id===B.id)).map(B=>{const H=t.find(_=>_.id===B.id);return H?{...B,...H}:B}),...w]}),()=>{clearTimeout(g.current)}},[t,i?.retryAttempts]),(0,u.useEffect)(()=>{const A=i?.percentViewed,j=p.current;return A===100&&j!==100&&(d(!0),clearTimeout(v.current),v.current=setTimeout(()=>{I()},500),clearTimeout(x.current),x.current=setTimeout(()=>{L()},100)),A!==100&&j===100&&d(!1),p.current=A,()=>{clearTimeout(v.current),clearTimeout(x.current)}},[T,i?.correctlyAnswered,i?.percentViewed,t.length]);const E=yce(a,i),k=b?.sortingLandmark??"",N=E?.[0],R=N?y(N.title)??"":"",M=l?b?.a11ySortingCategoriesComplete:R?`${b?.a11ySortingCategories}. ${R}`:b?.a11ySortingCategories;return(0,o.jsxs)("div",{"aria-label":k,className:a1(),role:"group",children:[(0,o.jsx)("div",{className:a1("row"),children:(0,o.jsx)(xce,{count:a.length,id:e,items:E,onReplay:r,progress:i,ref:m})}),(0,o.jsx)("ul",{"aria-label":M,className:a1("row"),role:"list",children:n.map((A,j)=>(0,o.jsx)("li",{role:"listitem",children:(0,o.jsx)(bce,{deckTopCard:E?.[0],id:A.id,isComplete:l,lessonId:e,nextCard:E?.[1],onCardDrop:s,onKeyDropEnd:()=>{m.current?.endKeyDrop()},onKeyDropStart:()=>{m.current?.startKeyDrop()},onNavigateToNext:()=>zJ({list:h.current,currentIndex:j}),onNavigateToPrevious:()=>$J({list:h.current,currentIndex:j}),ref:P=>{h.current[j]=P},title:A.title})},A.id))})]})},M4=()=>()=>{},Ice=e=>{const{animateBlockEntrance:t,blockId:n,initiallyVisible:s,items:r,onCardDrop:i=M4,onReplay:a=M4,piles:c,progress:l}=e;return(0,o.jsx)(De,{type:"sorting-activity",children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:s,isLearner:!0,children:(0,o.jsx)(Sce,{id:n,items:r,onCardDrop:i(e),onReplay:a(e),piles:c,progress:Mt()({},["items",n],l)})})})};function Tce({accentColor:e,backgroundType:t,blockBackgroundColor:n,noteColor:s,imageBackgroundDefault:r="#ffffff"}){return s!=null&&s!==""?s:Lce({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:r})}function Lce({accentColor:e,backgroundType:t,blockBackgroundColor:n,imageBackgroundDefault:s="#ffffff"}){if(t!==re.IMAGE&&n==null)return"#000000b3";switch(t){case re.IMAGE:return s;case re.LIGHT:case re.GRAY:return ds(.9,e);case re.DARK:return"#494949";case re.BLACK:return"#333333";default:{if(!n)return e;switch(Bi(n)){case Tt.LIGHT:return ds(.3,n);case Tt.MED:return Bs(.2,n);case Tt.DARK:case Tt.NEAR_BLACK:return Bs(.4,n);default:return e}}}}var Ece=C(49860);const $n=V("block-statement");class kce extends Ece.Component{renderTextDelegate;constructor(t){super(t),this.renderTextDelegate=this.renderText.bind(this)}static get defaultProps(){return{items:[],type:"a",getL10nValue:()=>{}}}getEntranceAnimationType(){const{type:t}=this.props;switch(t){case"a":return"fadeIn";case"b":case"d":return"fadeInUp";case"c":return"fadeInRight";case"note":return"fadeInGrow"}}getEntranceAnimationDuration(){const{type:t}=this.props;switch(t){case"a":return 1;case"b":case"c":case"d":return .75;case"note":return .5}}renderText({blockId:t,getL10nValue:n,type:s,labels:r,lessonId:i,media:a,settings:c},{paragraph:l}){const d=s==="note",h=n(Array.isArray(a)?{}:a),m=!!h?.audio,f=Ns(h,c.audioPosition,!1,"statement"),p=(0,o.jsx)("div",{className:$n("quote"),children:f.renderOrder.map((g,v)=>{if(g==="text")return(0,o.jsx)("div",{children:(0,o.jsx)(et,{value:l})},`text-${v}`);if(g==="audio"&&m){const x=f.renderOrder.indexOf("audio")<f.renderOrder.indexOf("text");return(0,o.jsx)("div",{className:$n("audio-container",{top:x,bottom:!x}),children:(0,o.jsx)(ln,{blockId:t,hasPadding:!1,index:t,item:{media:a,id:t},labels:r,lessonId:i,media:a,mediaType:"audio",refs:`items:${t}`})},`audio-${v}`)}return null})});return d?(0,o.jsx)(Pce,{getL10nValue:n,media:a,children:p}):p}render(){const{animateBlockEntrance:t,isLearner:n,items:s,renderText:r=this.renderTextDelegate,settings:i,type:a,initiallyVisible:c}=this.props,{entranceAnimation:l,divider:d=!0,dividerPadding:h=mre(a),dividerSize:m=hre(a),noteIcon:f=!0,noteSize:p="sm",statementWidth:g=fre(a)}=i,v=xre(g),x=bre(h),b=yre(m),y=p,T=a==="a"||a==="b"||a==="d",S=a==="note",I=$n({[a]:!0,[`${a}-custom-width-${v}`]:!0,[`${a}-divider-off`]:T&&!d,[`${a}-divider-padding-${x}`]:T&&d,[`${a}-divider-size-${b}`]:T&&d,[`note-size-${y}`]:S,[`note-size-${y}-no-icon`]:S&&!f,"no-animation":!l});return(0,o.jsx)(De,{className:I.toString(),children:(0,o.jsx)("div",{className:$n("wrap"),children:(0,o.jsx)("div",{className:$n("container"),children:(0,o.jsx)("div",{className:$n("row"),children:s.slice(0,1).map(L=>(0,o.jsx)($e,{animateBlockEntrance:t,animateIn:this.getEntranceAnimationType(),duration:this.getEntranceAnimationDuration(),initiallyVisible:c,isLearner:n,children:(0,o.jsxs)("div",{className:$n("col"),children:[(0,o.jsx)("div",{className:$n("divider-top-container"),children:(0,o.jsx)("div",{className:$n("divider-top")})}),r(this.props,L),(0,o.jsx)("div",{className:$n("divider-bottom")})]})},L.id))})})})})}}const nl=vt(kce),Nce=nl,wce=e=>(0,o.jsx)(nl,{type:"b",...e}),jce=e=>(0,o.jsx)(nl,{type:"c",...e}),Ace=e=>(0,o.jsx)(nl,{type:"d",...e}),Rce=e=>(0,o.jsx)(nl,{type:"note",...e}),Pce=({children:e,getL10nValue:t,media:n})=>{const s=vn(),{accentColor:r,cardMode:i,cornerRadius:a,courseColor:c,customBackgroundColorContrast:l,noteIcon:d=!0,noteIconColor:h}=s,m=s.noteColor,f=s.noteColorContrast,{theme:p}=Ve(),g=Rn(),v=Zn(),x=v===re.COLOR,b=v===re.ACCENT,y=p?.accentContrast,T=v===re.DARK||v===re.BLACK,S=m!=null&&m!=="",L=x||b||T||S?Qn.TRANSPARENT:i,E=S&&(f??ke.AUTO)===ke.AUTO||y===ke.AUTO&&b||l===ke.AUTO&&x,k=(0,u.useMemo)(()=>Tce({accentColor:r??c,backgroundType:v,blockBackgroundColor:g,noteColor:m,imageBackgroundDefault:""}),[r,v,g,c,m]),N=S?f??ke.AUTO:v===re.COLOR?l:y,R=Qt({backgroundColor:k,contrast:N}),M={"--color-background":k,...(E||S)&&{"--color-text":R},...a&&{"--corner-radius":`${Number(a)}px`},...h&&{"--color-theme-decorative":h},...S&&{"--color-theme":m}},A=$n("note-icon",{off:!d}),P=(t?t(Array.isArray(n)?{}:n):void 0)?.image,w=P?.key&&Object.keys(P).length>0,D=w?KN(P)?yt(P.key):pt(P):null,O=()=>d?w&&D?(0,o.jsx)("div",{"aria-hidden":!0,className:$n("note-icon__custom"),style:{WebkitMaskImage:`url('${D}')`,maskImage:`url('${D}')`}}):(0,o.jsx)(ce,{name:"circle-info"}):null;return(0,o.jsxs)(sn,{cardMode:L,className:$n("note-card"),style:M,children:[(0,o.jsx)("div",{className:A,children:O()}),e]})},ws=V("block-step"),Mce=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:s,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=i,f=Oe(i.media)??{},p=d==="audio"&&f.audio,g=d==="embed"&&f.embed,v=d==="image"&&f.image,x=d==="video"&&f.video;if(!p&&!g&&!v&&!x&&!(d==="image-with-audio"&&r))return;const y=f.embed?si(f.embed):void 0,T=!!f.image,S=!!f.audio,I=T?f.image.align:"center",L=ws("media",{audio:S&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${I}`]:r&&!!I,"audio-on-bottom":S&&!r&&h==="bottom",linkEmbed:y==="link",videoEmbed:y==="video",visual:!r&&T||!Ft()(f.video)}),E=m||{};return(0,o.jsx)("div",{className:L,children:(0,o.jsx)(ln,{blockId:t,enableVideoPlaybackSpeed:s,index:`${i.id}`,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...E},shouldPause:!0})})},Oce=e=>{const{headingLevel:t,innerRef:n,item:s,isActive:r,loadMedia:i,audioPosition:a,onFocus:c,renderTitle:l,renderDescription:d,style:h}=e,{id:m}=s,f=ws({active:r}),p=Hn(),g=Oe(s.step),v=Oe(s.step,p),x=!!(g||v),b=!!s.title,y=t||2,T=`h${y}`,S=`h${y+1}`,I=Oe(s.media),L=Ns(I,a,!0,"timeline"),E=Oe(s.description),k=(0,u.useMemo)(()=>!!Object.keys(I??{}).length||!!fp(E).value?.length,[I,E]),N=()=>{const R={audio:{item:{...s,media:L.audioOnlyMedia||I},mediaType:"audio"},image:{item:{...s,media:L.imageOnlyMedia||I},mediaType:"image"},video:{item:{...s,media:L.videoOnlyMedia||I},mediaType:"video"},embed:{item:{...s,media:L.embedOnlyMedia||I},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,o.jsx)(o.Fragment,{children:L.renderOrder.map((M,A)=>{if(M==="text")return d?(0,o.jsx)("div",{className:ws("description"),children:d(s)},`text-${A}`):(0,o.jsx)(Re,{className:ws("description"),value:s.description},`text-${A}`);if(!I||!i)return null;const j=R[M];return j?(0,u.createElement)(Mce,{...e,...j,key:`${M}-${A}`}):null})})};return(0,o.jsx)(De,{children:(0,o.jsx)("div",{className:f,"data-id":m,ref:n,style:h,children:(0,o.jsx)(sn,{className:ws("body"),onFocus:c,children:(0,o.jsxs)("div",{className:ws("main-wrap"),children:[(0,o.jsxs)("div",{className:ws("heading",{solo:!k}),children:[x&&(0,o.jsx)("div",{className:ws("step"),children:(0,o.jsx)(T,{children:(0,o.jsx)(Pn,{fallback:v,value:s.step})})}),(b||l)&&(0,o.jsx)("div",{className:ws("title"),children:l?l(s):(0,o.jsx)(S,{children:(0,o.jsx)(Re,{value:s.title})})})]}),(0,o.jsx)("div",{className:ws("main"),children:N()})]})})})})},Bce=e=>{const{id:t,settings:n,items:s,onEnter:r,enableVideoPlaybackSpeed:i,initiallyVisible:a,isLearner:c,labels:l,lessonId:d,renderTitle:h,renderDescription:m}=e,f=s[0],p=n.audioPosition,g=!(n.zoomOnClick??!0),v=n.headingLevel,x=(0,u.useCallback)((y,T)=>{r?.({id:t,payload:{activeIndex:y,itemId:T}})},[t,r]),b=(0,o.jsx)(Oce,{audioPosition:p,blockId:t,disableZoom:g,enableVideoPlaybackSpeed:i,headingLevel:v,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":n.cornerRadius!=null?`${n.cornerRadius}px`:"max(8px, 0.5em)"}});return c?(0,o.jsx)($e,{animateBlockEntrance:!0,className:ws("animate").toString(),initiallyVisible:a,isLearner:!0,children:b}):b},ve=V("block-survey"),c1={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"}]},O4=c1[5].map(e=>e.defaultLabel),w0=e=>{const t=F4(e.labels?.length);return c1[t]??c1[j0]},B4=(e,t)=>{const n=w0(e).findIndex(s=>s.value===t);return n===-1?void 0:n+1},Dce=(e,t)=>w0(e)[t-1]?.value,Fce=2,_ce=10,D4=5,Hce=7,j0=3,Vce=5,F4=e=>e===2||e===3||e===4||e===5?e:j0,sl=null,P6e=e=>(sl[e]??sl[j0]).map(t=>O4[t]),M6e=(e,t)=>{const n=F4(e?.length),s=sl[n]??sl[j0],r=sl[t],i=[...O4];return e?.forEach((a,c)=>{const l=s[c];l!==void 0&&(i[l]=a)}),r.map(a=>i[a])},pa=e=>Array.isArray(e)?e.length===0:!e||e.trim()==="",zce=(e,t,n)=>{const s=n?.items?.[e]?.items??{};return t.reduce((r,i)=>{const a=s?.[i.id]?.response;if(a==null)return r;if(i.questionType==="RATING"){const c=Dce(i,Number(a));c!=null&&(r[i.id]=c)}else r[i.id]=String(a);return r},{})},$ce=(e,t)=>t?.items?.[e]?.isSubmitted??!1,_4=(e,t)=>(0,o.jsx)(et,{className:"block-survey__question-title",id:t,value:e.question}),Uce=e=>(0,o.jsx)(et,{value:e.startLabel}),Gce=e=>(0,o.jsx)(et,{value:e.endLabel}),Wce=(e,t)=>(0,o.jsx)(et,{className:"block-survey__rating-label",value:e.labels?.[t]});function Kce({animateBlockEntrance:e,blockId:t,initiallyVisible:n,isLearner:s,items:r=[],labels:i,onSurveySubmitted:a=mn,onSurveyPartialResponse:c=mn,lessonId:l,onStep:d,onSubmit:h,progress:m,renderLinearScaleEndLabel:f=Gce,renderLinearScaleStartLabel:p=Uce,renderQuestionTitle:g=_4,renderRatingLabel:v=Wce,settings:x={},title:b}){const y=ct(),T=Cn(),[S,I]=(0,u.useState)(()=>zce(t,r,m)),[L,E]=(0,u.useState)(()=>$ce(t,m)),[k,N]=(0,u.useState)(!1),[R,M]=(0,u.useState)(!1),[A,j]=(0,u.useState)(new Set),[P,w]=(0,u.useState)(0),D=(0,u.useRef)(null),O=(0,u.useRef)(null),B=(0,u.useRef)(!1),H=(0,u.useCallback)(W=>{O.current=W},[]),{announcePolite:_}=Ms(),$=(0,ze.A)(L),z=x.cardMode==="TRANSPARENT",K=`validation-error-${t}`,J=x.surveyWidth??76,Y=p0(J),G=(0,u.useCallback)((W,ie)=>{I(Ne=>({...Ne,[W]:ie}));const ge=r.find(Ne=>Ne.id===W),he=ge?.questionType==="RATING"?B4(ge,ie):void 0;c({itemId:W,response:he}),A.has(W)&&(j(be=>{const de=new Set(be);return de.delete(W),de}),r.find(be=>be.id===W)&&r.filter(de=>de.isRequired&&de.id!==W&&pa(S[de.id])).length===0&&M(!1))},[A,r,c,S]),F=(0,u.useCallback)((W,ie)=>{I(ge=>({...ge,[W]:ie})),c({itemId:W,response:ie}),A.has(W)&&(j(he=>{const Ne=new Set(he);return Ne.delete(W),Ne}),r.filter(he=>he.isRequired&&he.id!==W&&pa(S[he.id])).length===0&&M(!1))},[A,r,c,S]),U=(0,u.useCallback)((W,ie)=>{I(ge=>{const he=ge[W],Ne=Array.isArray(he)?he:[],be=Ne.includes(ie)?Ne.filter(de=>de!==ie):[...Ne,ie];return{...ge,[W]:be}}),A.has(W)&&(j(he=>{const Ne=new Set(he);return Ne.delete(W),Ne}),r.filter(he=>he.isRequired&&he.id!==W&&pa(S[he.id])).length===0&&M(!1))},[A,r,S]),Q=(0,u.useCallback)((W,ie)=>{I(ge=>({...ge,[W]:ie})),c({itemId:W,response:Number(ie)}),A.has(W)&&(j(he=>{const Ne=new Set(he);return Ne.delete(W),Ne}),r.find(he=>he.id===W)&&r.filter(Ne=>Ne.isRequired&&Ne.id!==W&&pa(S[Ne.id])).length===0&&M(!1))},[A,r,c,S]),Z=(0,u.useCallback)((W,ie,ge)=>{if(ge&&ie.length>ge)return;const he=S[W]||"",Ne=ge&&ie.length===ge&&he.length<ge;I(be=>({...be,[W]:ie})),c({itemId:W,response:ie}),Ne&&_(`Character limit reached. ${ge} characters maximum.`),A.has(W)&&ie.trim()!==""&&(j(de=>{const Qe=new Set(de);return Qe.delete(W),Qe}),r.filter(de=>de.isRequired&&de.id!==W&&pa(S[de.id])).length===0&&M(!1))},[_,r,c,S,A]),q=(0,u.useCallback)(async()=>{if(!t||!l){console.error("Missing blockId or lessonId");return}N(!0);try{const W=r.flatMap(ie=>{const ge=S[ie.id],he=Array.isArray(ge)?"":ge||"",Ne=y(ie.question)??"",be={id:String(t),lessonId:String(l),itemId:ie.id,questionTitle:wn(String(Ne)),surveyTitle:wn(String(y(b)??"")),isUnfinished:!1};if(ie.questionType==="RATING"){const de=B4(ie,he);if(de===void 0)return[];const Qe=w0(ie),zt=Object.fromEntries(Qe.map((on,Ze)=>[Ze+1,y(ie.labels?.[Ze])??on.defaultLabel]));return[{...be,ratingOptions:zt,type:ie.questionType,response:de}]}if(ie.questionType==="LINEAR_SCALE")return[{...be,type:"LINEAR_SCALE",response:he===""?void 0:Number(he)}];if(ie.questionType==="MULTIPLE_CHOICE"||ie.questionType==="MULTIPLE_RESPONSE"){const de=ie.choices??[],zt=(Array.isArray(ge)?ge:ge?[ge]:[]).flatMap(on=>{const Ze=de.find(rn=>rn.id===on);return Ze?[{id:Ze.id,title:wn(String(y(Ze.title)??""))}]:[]});return[{...be,type:ie.questionType,response:zt}]}return[{...be,type:ie.questionType==="SHORT_RESPONSE"?"SHORT_RESPONSE":"LONG_RESPONSE",response:he}]});window.Runtime?.reportUngradedAnswers&&await window.Runtime.reportUngradedAnswers(W),r.forEach(ie=>d?.({id:ie.id})),h?.(S),E(!0),a()}catch(W){console.error("Failed to submit survey:",W)}finally{N(!1)}},[t,l,r,S,d,h,b,y,a]),te=(0,u.useCallback)(W=>{if(W.preventDefault(),k)return;const ge=r.filter(he=>he.isRequired).filter(he=>pa(S[he.id]));if(ge.length>0){M(!0),j(new Set(ge.map(he=>he.id))),B.current=!0,w(he=>he+1);return}q()},[k,q,r,S]);(0,u.useEffect)(()=>{B.current&&O.current&&(O.current.focus(),B.current=!1)},[P]),(0,u.useEffect)(()=>{!$&&L&&D.current&&D.current.focus()},[L,$]);const ne=(0,u.useRef)(null),ae=(0,u.useRef)(new Map),ue=(0,u.useCallback)((W,ie)=>{const ge=ae.current;ie?ge.set(String(W),ie):ge.delete(String(W))},[]),Te=g!==_4;(0,u.useEffect)(()=>{if(!Te)return;const W=ne.current;if(!W)return;const ie=`.${String(ve("question-text"))}`,ge=he=>{if(he.button!==0)return;const Ne=he.target;if(!(Ne instanceof HTMLElement))return;const be=Ne.closest(ie);if(!(be instanceof HTMLElement)||Ne.closest('[contenteditable="true"]'))return;const de=be.dataset.surveyItemId,Qe=de==null?void 0:ae.current.get(de);Qe&&(he.preventDefault(),Qe.setFocus())};return W.addEventListener("mousedown",ge),()=>W.removeEventListener("mousedown",ge)},[Te]);const we=(W,ie)=>{const ge=S[W.id]||"",he=`survey-q-${W.id}`,Ne=`${he}-char-count`,be=`${he}-error`,de=A.has(W.id),Qe=de&&ie===r.findIndex(tt=>A.has(tt.id));if(W.questionType==="LINEAR_SCALE"){const tt=Math.min(_ce,Math.max(Fce,W.scaleMax??Vce)),wt=Array.from({length:tt},(Me,jt)=>jt+1),He=ve("linear-scale-options",{wide:tt<=D4,medium:tt>D4&&tt<=Hce}),Pe=ve("linear-scale",{error:de});return(0,o.jsxs)("fieldset",{"aria-describedby":de?be:void 0,className:ve("question",{error:de}),ref:Qe?H:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:ve("question-text"),"data-survey-item-id":String(W.id),children:[g(W,he,ue),W.isRequired&&(0,o.jsxs)("span",{className:ve("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:ve("interactive"),children:(0,o.jsxs)("div",{className:Pe,children:[(0,o.jsx)("div",{className:ve("linear-scale-label"),children:p(W)}),(0,o.jsx)("div",{className:He,children:wt.map(Me=>{const jt=ge===String(Me);return(0,o.jsxs)("label",{className:ve("linear-scale-option"),children:[(0,o.jsx)("span",{className:ve("linear-scale-number"),children:Me}),(0,o.jsx)("div",{className:ve("linear-scale-indicator"),children:(0,o.jsx)(ce,{className:ve("linear-scale-dot",{active:jt}),"data-testid":jt?"linear-scale-dot-active":"linear-scale-dot",name:"circle-solid"})}),(0,o.jsx)("input",{checked:jt,className:ve("linear-scale-input"),name:`survey-${W.id}`,onChange:()=>Q(W.id,String(Me)),type:"radio",value:String(Me)})]},Me)})}),(0,o.jsx)("div",{className:ve("linear-scale-label"),children:f(W)})]})}),de&&(0,o.jsxs)("div",{className:ve("error-message"),id:be,children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyRatingRequired]})]},W.id)}if(W.questionType==="RATING"){const tt=w0(W).map((Me,jt)=>({value:Me.value,label:W.labels?.[jt],icon:Me.icon})),wt=ve("question",{error:de}),He=ve("rating-options",{error:de}),Pe=de?be:void 0;return(0,o.jsxs)("fieldset",{"aria-describedby":Pe,className:wt,ref:Qe?H:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:ve("question-text"),"data-survey-item-id":String(W.id),children:[g(W,he,ue),W.isRequired&&(0,o.jsxs)("span",{className:ve("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:ve("interactive"),children:(0,o.jsx)("div",{className:He,children:tt.map((Me,jt)=>{const as=ge===Me.value,Ks=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("input",{checked:as,className:ve("rating-input"),name:`survey-${W.id}`,onChange:()=>G(W.id,Me.value),type:"radio",value:Me.value}),(0,o.jsx)(ce,{"aria-hidden":"true",className:ve("rating-icon"),name:Me.icon}),v(W,jt)]}),ul=ve("rating-option",{selected:as,error:de,"two-options":tt.length===2,"three-options":tt.length===3,"four-options":tt.length===4,"five-options":tt.length===5});return z?(0,o.jsx)(sn,{cardMode:"WHITE",className:ul,tag:"label",children:Ks},Me.value):(0,o.jsx)("label",{className:ul,children:Ks},Me.value)})})}),de&&(0,o.jsxs)("div",{className:ve("error-message"),id:be,children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyRatingRequired]})]},W.id)}if(W.questionType==="MULTIPLE_CHOICE"){const tt=W.choices??[],wt=ve("choices",{error:de});return(0,o.jsxs)("fieldset",{"aria-describedby":de?be:void 0,className:ve("question",{error:de}),ref:Qe?H:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:ve("question-text"),"data-survey-item-id":String(W.id),children:[g(W,he,ue),W.isRequired&&(0,o.jsxs)("span",{className:ve("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:ve("interactive"),children:(0,o.jsx)("ul",{className:wt,children:tt.map(He=>{const Pe=ge===He.id;return(0,o.jsx)("li",{className:ve("choice"),children:(0,o.jsxs)("label",{className:ve("choice-option",{selected:Pe}),children:[(0,o.jsx)("input",{checked:Pe,className:ve("choice-input"),name:`survey-${W.id}`,onChange:()=>F(W.id,He.id),type:"radio",value:He.id}),(0,o.jsx)("span",{"aria-hidden":"true",className:ve("choice-indicator"),children:(0,o.jsx)(ce,{className:ve("choice-dot",{active:Pe}),name:"circle-solid"})}),(0,o.jsx)("span",{className:ve("choice-text"),children:(0,o.jsx)(et,{allowTabNavigation:!1,value:He.title})})]})},He.id)})})}),de&&(0,o.jsxs)("div",{className:ve("error-message"),id:be,children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyMultipleChoiceRequired]})]},W.id)}if(W.questionType==="MULTIPLE_RESPONSE"){const tt=W.choices??[],wt=S[W.id],He=Array.isArray(wt)?wt:[],Pe=ve("choices",{error:de});return(0,o.jsxs)("fieldset",{"aria-describedby":de?be:void 0,className:ve("question",{error:de}),ref:Qe?H:void 0,tabIndex:-1,children:[(0,o.jsxs)("legend",{className:ve("question-text"),"data-survey-item-id":String(W.id),children:[g(W,he,ue),W.isRequired&&(0,o.jsxs)("span",{className:ve("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:ve("interactive"),children:(0,o.jsx)("ul",{className:Pe,children:tt.map(Me=>{const jt=He.includes(Me.id);return(0,o.jsx)("li",{className:ve("choice"),children:(0,o.jsxs)("label",{className:ve("choice-option",{selected:jt}),children:[(0,o.jsx)("input",{checked:jt,className:ve("choice-input"),name:`survey-${W.id}`,onChange:()=>U(W.id,Me.id),type:"checkbox",value:Me.id}),(0,o.jsx)("span",{"aria-hidden":"true",className:ve("choice-indicator",{checkbox:!0}),children:(0,o.jsx)(ce,{className:ve("choice-check",{active:jt}),name:"check"})}),(0,o.jsx)("span",{className:ve("choice-text"),children:(0,o.jsx)(et,{allowTabNavigation:!1,value:Me.title})})]})},Me.id)})})}),de&&(0,o.jsxs)("div",{className:ve("error-message"),id:be,children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyMultipleResponseRequired]})]},W.id)}const zt=Array.isArray(ge)?"":ge,on=ve("question",{error:de}),Ze=ve("text-input",{error:de}),rn=W.questionType==="SHORT_RESPONSE"||W.questionType==="LONG_RESPONSE"?W.maxLength:void 0,rt=[de?be:null,rn?Ne:null].filter(Boolean).join(" ")||void 0;return(0,o.jsxs)("div",{className:on,children:[(0,o.jsxs)("div",{className:ve("question-text"),"data-survey-item-id":String(W.id),children:[g(W,he,ue),W.isRequired&&(0,o.jsxs)("span",{className:ve("required-indicator"),children:[" ",(0,o.jsx)("span",{"aria-hidden":"true",children:"*"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:i.surveyRequired})]})]}),(0,o.jsx)("div",{className:ve("interactive"),children:(0,o.jsxs)("div",{className:ve("text-response"),children:[(0,o.jsx)("textarea",{"aria-describedby":rt,"aria-invalid":de?!0:void 0,"aria-labelledby":he,"aria-required":W.isRequired?!0:void 0,className:Ze,maxLength:rn,onChange:tt=>Z(W.id,tt.target.value,rn),ref:Qe?H:void 0,rows:W.questionType==="LONG_RESPONSE"?4:2,value:zt}),rn&&(0,o.jsxs)("div",{className:ve("character-count"),children:[(0,o.jsxs)("span",{"aria-hidden":"true",children:[zt.length," / ",rn]}),(0,o.jsx)("span",{className:"visually-hidden-always",id:Ne,children:`${i.a11yBlockSurveyCharCount} ${zt.length} ${i.a11yPreposition} ${rn}`})]})]})}),de&&(0,o.jsxs)("div",{className:ve("error-message"),id:be,children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyFreeResponseRequired]})]},W.id)};return(0,o.jsx)(pf,{...x,children:(0,o.jsx)(De,{className:ve({presentation:T}),children:(0,o.jsx)($e,{animateBlockEntrance:e,initiallyVisible:n,isLearner:s,children:(0,o.jsx)("div",{children:(0,o.jsx)(sn,{className:ve("container",{[`custom-width-${Y}`]:!0}),children:L?(0,o.jsx)("div",{className:ve("confirmation"),ref:D,tabIndex:-1,children:(0,o.jsxs)("p",{className:ve("confirmation-text"),children:[(0,o.jsx)(ce,{name:"circle-check-regular"})," ",i.surveyConfirmation]})}):(0,o.jsxs)("form",{noValidate:!0,onSubmit:te,children:[b&&(0,o.jsx)(et,{className:ve("title"),tagName:"h2",value:b}),(0,o.jsx)("div",{className:ve("questions"),ref:ne,children:r.map((W,ie)=>we(W,ie))}),(0,o.jsxs)("div",{className:ve("actions"),children:[(0,o.jsx)("div",{className:ve("validation-error",{visible:R}),id:`validation-error-${t}`,role:"alert",children:R&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"alert-circle"})," ",i.surveyValidationError]})}),(0,o.jsx)("div",{className:`${ve("submit")} brand--ui`,children:(0,o.jsx)("button",{"aria-describedby":R?K:void 0,className:ve("submit-button"),"data-testid":"survey-submit-button",disabled:k,type:"submit",children:k?i.surveySubmitting:i.surveySubmit})})]})]})})})})})})}const $s=V("block-team"),Qce=e=>(0,o.jsx)(Re,{className:$s("name").toString(),value:e.name}),Zce=e=>(0,o.jsx)(Re,{className:$s("role").toString(),value:e.description}),Yce=({item:e,index:t,renderName:n,renderDescription:s})=>{const r=e.avatar?.image,i=Km(r);return(0,o.jsxs)("li",{className:$s("card"),children:[(0,o.jsx)("div",{className:$s("avatar-wrap"),children:i?(0,o.jsx)(Ln,{alt:Mo(r?.alt),className:$s("avatar").toString(),src:i}):(0,o.jsx)("div",{className:$s("avatar",{placeholder:!0}).toString()})}),(0,o.jsxs)("div",{className:$s("body"),children:[n(e,t),s(e,t)]})]})},qce=e=>{const{defaultBackgroundColor:t,items:n,renderName:s=Qce,renderDescription:r=Zce}=e;return(0,o.jsx)(De,{className:$s().toString(),defaultBackgroundColor:t,children:(0,o.jsx)("div",{className:$s("container"),children:(0,o.jsx)("ul",{className:$s("list"),"data-count":n.length,children:n.map((i,a)=>(0,o.jsx)(Yce,{index:a,item:i,renderDescription:r,renderName:s},i.id))})})})},A0=V("block-text");function Xce({children:e,columnIndex:t=0,item:n,labels:s}){const r="media"in n?n.media:void 0,i="iconMedia"in n?n.iconMedia:void 0,a=Oe(r)?.image,c=Oe(i)?.image,l=Oe("paragraph"in n?n.paragraph:void 0),d=Cn(),h=pt(a),m=pt(c),f=Mo(a?.alt??""),g=Wt()?.settings,v=g?.images,x=g?.zoomOnClick,b=(0,u.useRef)(void 0);let y=(0,o.jsx)(Ln,{alt:f,"data-l10n-id":Ot(r),ref:b,src:h});return x&&(y=(0,o.jsx)(DS,{a11yNameButtonUnzoom:s?.a11yUnzoomImage,a11yNameButtonZoom:s?.a11yZoomImage,children:y})),(0,o.jsxs)("div",{className:A0("col"),children:[d&&(0,o.jsx)("div",{className:A0("presentation-icon"),children:(0,o.jsx)("div",{"aria-hidden":!0,className:A0("presentation-icon-media"),children:c?(0,o.jsx)(Ln,{alt:"",src:m}):(0,o.jsx)(ce,{name:mse(l??"",t)})})}),v&&a&&(0,o.jsx)("div",{className:A0("image"),children:y}),e]})}var Jce=C(49860);const Us=V("block-text"),ele=class extends Jce.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,o.jsx)(Re,{value:t})}renderText(e,t){const{labels:n,takingSnapshot:s,variant:r}=this.props,i=r?.includes("column"),a="paragraph"in e?e.paragraph:void 0;return i||s?(0,o.jsx)(Xce,{columnIndex:t,item:e,labels:n,children:(0,o.jsx)(et,{value:a||""})}):(0,o.jsx)(et,{className:Us("col"),value:a||""})}render(){const{blockId:e,columns:t,defaultBackgroundColor:n,heading:s,isLearner:r,items:i,labels:a,lessonId:c,media:l,settings:d,type:h,variant:m,renderText:f=this.renderTextDelegate,renderHeading:p=this.renderHeadingDelegate,getL10nValue:g}=this.props,v=g(l),x=Object.keys(v?.audio??{}).length>0,{audioPosition:b,entranceAnimation:y,cellPadding:T=1.5,tableWidth:S=76,textPadding:I=.8,textWidth:L=76}=d,E=m==="table",k=t===1,N=t>1,R=this.props.isPresentation&&(m==="paragraph"||m==="two column"),M=E?S:L,A=!E&&k,j=E,P=Sre(T),w=Ire(I),D=p0(M),O=Us({[h]:!A&&!j||N,[`${h}-custom-width`]:!N,[`${h}-custom-width-table-${D}`]:j,[`${h}-custom-width-text-${D}`]:A,[`heading-custom-text-padding-${w}`]:A,[`${h}-custom-cell-padding-${P}`]:j,"no-animation":!y,presentation:this.props.isPresentation,"presentation-text":R,table:E}),B=t>2?Us("container-wide"):Us("container",{authoring:!r}),H=this.getHeadingComponent(),_=g(Array.isArray(l)?{}:l),$=Ns(_,b);return(0,o.jsx)(De,{className:O.toString(),defaultBackgroundColor:n,children:(0,o.jsxs)("div",{className:B,"data-block-id":e,"data-block-text":"",children:[(0,o.jsx)("div",{className:Us("row"),children:s!==""?i.slice(0,1).map((z,K)=>(0,o.jsx)("div",{className:Us("col"),children:(0,o.jsx)("div",{className:Us("heading"),children:(0,o.jsx)(H,{children:p(z)})})},"id"in z?z.id:K)):null}),$.renderOrder.map((z,K)=>{if(z==="text")return(0,o.jsx)("div",{className:Us("row",{text:!0}),children:h!=="heading"?i.slice(0,t).map((J,Y)=>(0,o.jsx)(u.Fragment,{children:f(J,Y)},"id"in J?J.id:Y)):null},`text-${K}`);if(z==="audio"&&x){const J=$.renderOrder.indexOf("audio")<$.renderOrder.indexOf("text");return(0,o.jsx)("div",{className:Us("row",{media:!0,top:J,bottom:!J,hasHeading:m==="heading paragraph"||m==="subheading paragraph"}),children:(0,o.jsx)("div",{className:Us("col",{media:!0}),children:(0,o.jsx)(ln,{blockId:e,hasPadding:!1,index:e,item:{id:e,media:l},labels:a,lessonId:c,media:l,refs:`items:${e}`})})},`audio-${K}`)}})]})})}},dr=e=>{const t=ct(),n=Cn();return(0,o.jsx)(ele,{...e,getL10nValue:t,isPresentation:n})},H4=dr,tle=e=>(0,o.jsx)(dr,{columns:2,type:"twocol",...e}),nle=e=>(0,o.jsx)(dr,{columns:3,type:"threecol",...e}),sle=e=>(0,o.jsx)(dr,{columns:4,type:"fourcol",...e}),ole=e=>(0,o.jsx)(dr,{heading:"heading",type:"heading",...e}),rle=e=>(0,o.jsx)(dr,{heading:"subheading",type:"heading",...e}),ile=e=>(0,o.jsx)(dr,{heading:"heading",...e}),ale=e=>(0,o.jsx)(dr,{heading:"subheading",...e}),ur=V("timeline-card"),cle=e=>{const{blockId:t,disableZoom:n,enableVideoPlaybackSpeed:s,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,mediaType:d,audioPosition:h}=e,{settings:m}=i,f=Oe(i.media)??{},p=d==="audio"&&f.audio,g=d==="embed"&&f.embed,v=d==="image"&&f.image,x=d==="video"&&f.video;if(!p&&!g&&!v&&!x&&!(d==="image-with-audio"&&r))return;const y=f.embed?si(f.embed):void 0,T=!!f.image,S=!!f.audio,I=T?f.image.align:"center",L=ur("media",{audio:S&&!r,"audio-and-embed":!!(f.audio&&f.embed),"image-with-audio":r,[`image-with-audio-${I}`]:r&&!!I,"audio-on-bottom":S&&!r&&h==="bottom",linkEmbed:y==="link",videoEmbed:y==="video",visual:!r&&T||!Ft()(f.video)}),E=m||{};return(0,o.jsx)("div",{className:L,children:(0,o.jsx)(ln,{blockId:t,enableVideoPlaybackSpeed:s,index:`${i.id}`,isOverlayAudio:r,item:i,labels:a,lessonId:c,lessonNumber:l,media:f,mediaType:r?void 0:d,opts:{disableZoom:n,...E}})})},lle=e=>{const{headingLevel:t,innerRef:n,item:s,isActive:r,loadMedia:i,audioPosition:a,onFocus:c}=e,{id:l}=s,d=ur({active:r}),h=!!s.date,m=!!s.title,f=t||2,p=`h${f}`,g=`h${f+1}`,v=Oe(s.media)??{},x=Ns(v,a,!0,"timeline"),b=()=>{if(!v||!i)return null;const y={audio:{item:{...s,media:x.audioOnlyMedia||v},mediaType:"audio"},image:{item:{...s,media:x.imageOnlyMedia||v},mediaType:"image"},video:{item:{...s,media:x.videoOnlyMedia||v},mediaType:"video"},embed:{item:{...s,media:x.embedOnlyMedia||v},mediaType:"embed"},overlay:{mediaType:"image-with-audio",isOverlayAudio:!0}};return(0,o.jsx)(o.Fragment,{children:x.renderOrder.map((T,S)=>{if(T==="text")return(0,o.jsx)(Re,{className:ur("description"),value:s.description},`text-${S}`);const I=y[T];return I?(0,u.createElement)(cle,{...e,...I,key:`${T}-${S}`}):null})})};return(0,o.jsx)("div",{className:d,"data-id":l,ref:n,children:(0,o.jsx)(sn,{className:ur("body"),onFocus:c,children:(0,o.jsx)("div",{className:ur("main-wrap"),children:(0,o.jsxs)("div",{className:ur("main"),children:[h&&(0,o.jsx)("div",{className:ur("date"),children:(0,o.jsx)(p,{children:(0,o.jsx)(Pn,{value:s.date})})}),m&&(0,o.jsx)("div",{className:ur("title"),children:(0,o.jsx)(g,{children:(0,o.jsx)(Pn,{value:s.title})})}),b()]})})})})},ol=V("timeline"),dle=e=>{const{audioPosition:t,disableZoom:n,enableVideoPlaybackSpeed:s,headingLevel:r,id:i,initiallyVisible:a,isBlock:c,isLearner:l,item:d,labels:h,lessonId:m,onFocus:f}=e,p=(0,o.jsx)(lle,{audioPosition:t,blockId:i,disableZoom:n,enableVideoPlaybackSpeed:s,headingLevel:r,isActive:!0,item:d,labels:h,lessonId:m,lessonNumber:i,loadMedia:!0,onFocus:f});return c?l?(0,o.jsx)($e,{animateBlockEntrance:!0,className:ol("animate").toString(),initiallyVisible:a,isLearner:!0,children:p}):p:null},ule=e=>{const{id:t,items:n,labels:s,onEnter:r=Function.prototype,settings:i={}}=e,a=(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}=zi(d.detail.path,["block","card"]);if(h!==t)return;const f=a.current.querySelector(`[data-id="${m}"]`);f&&!du(f,"center")&&f.scrollIntoView({behavior:"instant",block:"center"})}return window.addEventListener(Je,l),()=>{window.removeEventListener(Je,l)}}),(0,o.jsx)("div",{"aria-label":s?.a11yBlockTimeline,className:"page__content-container",ref:a,role:"group",children:(0,o.jsx)("div",{className:ol("wrapper"),children:(0,o.jsx)("div",{className:ol(),children:(0,o.jsx)("ul",{className:ol("container"),role:"list",children:n.map((l,d)=>(0,o.jsx)("li",{className:ol("card-wrapper"),role:"listitem",children:dle({index:d,item:l,onFocus:c,...e,disableZoom:!i.zoomOnClick,headingLevel:i.headingLevel,audioPosition:i.audioPosition})},d))})})})})},hle=({animateBlockEntrance:e,blockId:t,enableVideoPlaybackSpeed:n,initiallyVisible:s,isLearner:r,items:i,labels:a,lessonId:c,settings:l})=>(0,o.jsx)($e,{animateBlockEntrance:e,animateIn:"fadeIn",initiallyVisible:s,isLearner:r,children:(0,o.jsx)(De,{type:"timeline",children:(0,o.jsx)(ule,{enableVideoPlaybackSpeed:n,id:t,initiallyVisible:s,isBlock:!0,isLearner:r,items:i,labels:a,lessonId:c,settings:l})})}),vo=V("block-sequence"),mle=({label:e})=>(0,o.jsx)("span",{className:vo("indicator-label"),children:Oe(e)??""}),fle=e=>(0,o.jsx)(mle,{label:e.label}),ple=e=>(0,o.jsx)(Re,{className:vo("description").toString(),value:e.description}),l1=e=>{const{color:t,defaultBackgroundColor:n,items:s,labels:r,renderDescription:i=ple,renderLabel:a=fle,variant:c}=e,l=c==="pyramid",d=c==="arrows"||c==="timeline",h=l?"figure":"ol",m=l?"div":"li",f=c==="arrows"?r?.a11yBlockArrowSequence||"Arrow sequence":c==="timeline"?r?.a11yBlockTimeline||"Timeline":void 0,p=Ve()?.theme?.accentContrast,g=t?{"--block-sequence-color":t,"--block-sequence-on-color":Qt({backgroundColor:t,contrast:p??void 0})}:void 0;return(0,o.jsx)(De,{className:vo({[c]:!0}).toString(),defaultBackgroundColor:n,style:g,children:(0,o.jsx)("div",{"aria-label":d?f:void 0,className:vo("container"),role:d?"group":void 0,children:(0,o.jsx)(h,{"aria-label":l?r?.a11yBlockPyramid||"Pyramid diagram":void 0,className:vo("list"),"data-step-count":s.length,children:s.map((v,x)=>(0,o.jsxs)(m,{className:vo("step"),"data-step-id":v.id,children:[(0,o.jsxs)("div",{className:vo("indicator"),children:[l?(0,o.jsx)("div",{className:vo("label-surface"),children:a(v,x)}):a(v,x),l&&x===0&&(0,o.jsx)("span",{className:"visually-hidden-always",children:r?.a11yBlockPyramidTopLayer||"Top layer"}),l&&s.length>1&&x===s.length-1&&(0,o.jsx)("span",{className:"visually-hidden-always",children:r?.a11yBlockPyramidBaseLayer||"Base layer"})]}),(0,o.jsx)("div",{className:vo("text"),children:i(v,x)})]},v.id))})})})},gle=Mt()(null,["payload","result"]),vle=e=>{if(e.meta?.thumbnail)return`${e.contentPrefix}/${e.meta.thumbnail}`},Cle=e=>e.meta?.version,V4=e=>e.src??null,xle=e=>e.processing,ble=Vo()(["payload","result","completion"]),yle=Mt()(!1,["payload","result","score"]),Sle=bd()((e,t)=>{if(!t)return!1;const{majorLimit:n,minorLimit:s}=e,[r,i]=t.split("."),a=parseInt(r)===n&&Number(i)>=s;return Number(r)>n||a}),Ile={mobile:"?forcemobile=1&devicepreview=1&phone=1&rise=true",tablet:"?forcemobile=1&devicepreview=1&rise=true"},Tle=e=>{const t=zo()(e.split("-"));return Ile[t]},Lle=Sle({majorLimit:3,minorLimit:13}),Ele=(e,t,n,s)=>{const r=t&&Tle(n),i=r?`${e}${r}`:`${e}?rise=true`;if(s){const a=i.includes("?")?"&":"?";return`${i}${a}locale=${s}`}return i},z4="about:blank",kle="https://example.invalid",$4=new Set(["http:","https:"]),U4=e=>{if(e)try{const t=new URL(e);return $4.has(t.protocol)?t.href:void 0}catch{return}},Nle=()=>U4(Ae("CDN_USER_CONTENT_URI"))??U4(window.location.origin)??kle,G4=e=>{try{return $4.has(new URL(e,Nle()).protocol)}catch{return!1}},W4=e=>{const t=Bn(e);return typeof t=="string"?t:""},wle=e=>{const t=W4(e);if(!t||t===z4||!G4(t))return;const n=W4(yt(t));return n&&n!==z4&&G4(n)?n:void 0};var jle=C(49860);class Ale extends jle.Component{constructor(t){super(t),this.state={fullscreen:!1},this.iframe=null,this.canFullscreen=this.canFullscreen.bind(this),this.handleCourseUpdate=this.handleCourseUpdate.bind(this),this.handleFullscreenEnter=this.handleFullscreenEnter.bind(this),this.handleFullscreenExit=this.handleFullscreenExit.bind(this),this.handleMessages=this.handleMessages.bind(this),this.renderItem=this.renderItem.bind(this)}iframe;static get defaultProps(){return{getL10nValue:()=>{},isLesson:!1,onStep:Function.prototype,hasManySlBlocks:Function.prototype,previewType:""}}UNSAFE_componentWillMount(){window.addEventListener("message",this.handleMessages)}componentWillUnmount(){window.removeEventListener("message",this.handleMessages)}componentDidMount(){const{getL10nValue:t,items:n,onStep:s}=this.props,r=zo()(n),i=t(r?.media)?.storyline??{},a=Cle(i);Lle(a)||s(r)}canFullscreen(t){const{blockId:n,hasManySlBlocks:s}=this.props,{windowName:r}=t;return n===r||!s()}handleMessages(t){const{data:n}=t,{type:s}=n,r={"fullscreen:enter":this.handleFullscreenEnter,"fullscreen:exit":this.handleFullscreenExit,"course:update":this.handleCourseUpdate}[s];r&&r(n)}handleCourseUpdate(t){const{items:n,onFinishStoryline:s,onStep:r,blockId:i}=this.props,a=zo()(n),{windowName:c}=t;if(i===c&&ble(t)){const{score:l,success:d}=gle(t);if(yle(t)){const h=l.scaled*100;s?.(i,d,!0,h)}else s?.(i,!0,!1);r(a)}}handleFullscreenEnter(t){this.canFullscreen(t)&&this.setState({fullscreen:!0})}handleFullscreenExit(t){this.canFullscreen(t)&&this.setState({fullscreen:!1})}render(){const{animateBlockEntrance:t,getL10nValue:n,initiallyVisible:s,isLesson:r,isLearner:i,isOnlyBlockInStep:a,items:c,labels:{a11yBlockStoryline:l},settings:d,takingSnapshot:h}=this.props,m=zo()(c),f=n(m?.media)?.storyline??{},{mediaWidth:p="0"}=d,g=a?{}:{display:r&&!V4(f)?"none":"block"},v=X()("blocks-storyline__wrapper",{"blocks-storyline__wrapper--small":p==="0","blocks-storyline__wrapper--medium":p==="1","blocks-storyline__wrapper--full":p==="2","blocks-storyline__wrapper--snapshot":h});return(0,o.jsx)(De,{className:"blocks-storyline",style:g,children:(0,o.jsx)($e,{animateBlockEntrance:t,initiallyVisible:s,isLearner:i,children:(0,o.jsx)("div",{"aria-label":l,className:v,role:"group",children:h?this.renderThumbnail(f):this.renderStorylineBlock(f)})})})}renderStorylineBlock(t){return xle(t)?this.renderProcessing():V4(t)?this.renderItem(t):this.renderEmpty()}renderThumbnail(t){const n=vle(t),s=`${Ae("CDN_USER_CONTENT_URI")}/${n}`;return(0,o.jsx)("img",{alt:"Thumbnail",src:s})}renderEmpty(){const{renderEmpty:t}=this.props;return typeof t=="function"?t():null}renderItem(t){const{fullscreen:n}=this.state,{blockId:s,currentLocale:r,isLesson:i,previewType:a,settings:c}=this.props,{cornerRadius:l}=c,{src:d,meta:h,title:m}=t,{player:f}=h,p=Ele(d,i,a,r),g=wle(p),x={paddingBottom:`${f.height/f.width*100}%`,...l!=null&&{"--corner-radius":`${Number(l)}px`}},b=X()("blocks-storyline__item__iframe",{"blocks-storyline__item__iframe--fullscreen":n});return(0,o.jsx)("div",{className:"blocks-storyline__item",style:x,children:(0,o.jsx)("iframe",{allowFullScreen:!0,allowtransparency:"true",className:b,loading:"lazy",name:s.toString(),ref:y=>{this.iframe=y},src:g,title:m})})}renderProcessing(){const{renderProcessing:t}=this.props;return typeof t=="function"?t():null}}const Rle=pM(vt(Ale));var Fn=C(30467),Ple=C(28565),K4=C(84748),Mle=C(94556),Q4=C.n(Mle);const H6e=(e,t)=>n=>{const s=n.findIndex(i=>i.id==t);if(s===-1)return n;const r=n.slice();return r[s]=e(n[s]),r},V6e=e=>t=>t.filter(n=>n.id!=e),z6e=(e,t)=>n=>{const s=n.slice(),[r]=s.splice(e,1);return s.splice(t,0,r),s};function Ole(e,t){const n=[];for(const s of t)if(n.push(s),e(s))break;return n}const Ble=e=>e.some(t=>t<0),Z4=e=>Array.from(Array(e)),Y4=(e,t)=>Z4(t).map(()=>e),Dle=(e,t,n,s)=>Z4(n).map((r,i)=>i===s?t:e),$6e=(e,t,n)=>n.some(s=>s[e]==t);function U6e(e,t,n){if(t>=n.length)return n.slice(0);const s=Math.floor(t/2),r=Math.ceil(t/2),i=e-s,a=e+r;return a>n.length?n.slice(n.length-t):i>=0?n.slice(i,a):n.slice(0,t)}const R0=(e,t)=>{const n=Math.min(e.length,t.length),s=new Array(n);for(let r=0;r<n;r++)s[r]=[e[r],t[r]];return s},d1=(e,t,n=0)=>Math.round(Math.sqrt((1-n)*e**2+n*t**2)),Fle=(e,t,n=0)=>Number(((1-n)*e+n*t).toFixed(2)),_le=([e=0,t=0,n=0,s=1])=>(0,Ha.A)({space:"srgb",coords:[e/255,t/255,n/255],alpha:s},{format:"hex",collapse:!1}),q4=(e,t,n)=>{const s=Yo(e),r=Yo(t);if(s==null||r==null)return null;const[i,a,c,l]=s,[d,h,m,f]=r;return _le([d1(i,d,n),d1(a,h,n),d1(c,m,n),Fle(l,f,n)])},Hle=matchMedia("(forced-colors: active)");function rl(){return Hle.matches}const Vle=({activeIndex:e,values:t,opts:n})=>{const{background:s,variant:r}=Wt(),{chartColor:i,lineCurve:a}=vn(),c=Rn(),l=mc(),d=n?.defaultFontColor,h=Zn(),m=h===re.IMAGE,p=Oe(s?.media)?.image?.overlayColor??xt.DARK,g=rl();let v=i??l,x=c||"#fff";!i&&h===re.ACCENT||i===x?v=d:m&&(v=p===xt.DARK?"#fff":"#000",x=p===xt.DARK?"#000":"#fff"),g&&(v="Highlight",x="Canvas");let b=v,y=Array(t.length).fill(v);if(e!=null&&!g){const T=m&&p===xt.LIGHT?.2:.7,S=q4(v,x,T)??v;b=S,y=Dle(S,v,t.length,e)}return r==="bar"?{backgroundColor:y,data:t,hoverBackgroundColor:y}:{borderColor:b,cubicInterpolationMode:a==="linear"?"default":"monotone",data:t,lineTension:a==="linear"?0:void 0,pointBackgroundColor:y,pointBorderColor:y,pointBorderWidth:0,pointHitRadius:20,pointHoverBackgroundColor:v,pointHoverBorderColor:v,pointHoverBorderWidth:0,pointRadius:4}};function zle({activeIndex:e,children:t,opts:n,values:s}){const r=Vle({activeIndex:e,opts:n,values:s});return t(r)}class $le extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,identifier:n,index:s,label:r,value:i}=this.props,a=t!=null&&t!==s,c=X()("block-chart__cartesianLegendItem",{"block-chart__cartesianLegendItem--unfocused":a});return(0,o.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,o.jsx)("dt",{className:"block-chart__cartesianLegendTerm",children:`${n}.`}),(0,o.jsxs)("dd",{className:"block-chart__cartesianLegendDefn","data-l10n-id":r.l10nId,children:[r.label,(0,o.jsx)("span",{className:"block-chart__cartesianLegendDefnPipe",role:"separator",children:"|"}),(0,o.jsx)("span",{className:"block-chart__cartesianLegendDefnVal",children:i})]})]})}}const Ule=$le,Gle=({activeIndex:e,labels:t,letters:n,onEvent:s,values:r})=>{const i=R0(n,R0(t,r));return i.length===0?null:(0,o.jsx)("dl",{className:"block-chart__cartesianLegend",children:i.map(([a,[c,l]],d)=>(0,o.jsx)(Ule,{activeIndex:e,identifier:a,index:d,label:c,onEvent:s,value:l},a))})},Wle=(0,u.memo)(Gle);function Kle(e){const t=this.getLabelForValue(e),n=15,s=t.split(" "),r=[];let i="";return s.forEach(a=>{(i+a).length>n?(r.push(i),i=a):i+=(i.length>0?" ":"")+a}),r.push(i),r}const Qle={animation:{},barPercentage:.5,defaultFontFamily:'"lato", sans-serif',elements:{arc:{},bar:{},line:{borderWidth:2,fill:!1}},layout:{padding:{bottom:0,left:0,right:0,top:50}},maxBarThickness:60,plugins:{datalabels:{display:!1},legend:{display:!1,labels:{}},tooltip:{animation:!0,boxPadding:"14px 10px",callbacks:{label:()=>null,title:e=>{const{label:t,formattedValue:n}=e[0];return`${t}: ${n}`}},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom"}},responsive:!1,scales:{x:{border:{display:!1},grid:{display:!1,offset:!0},offset:!0,ticks:{autoSkip:!1,callback:Kle,padding:10}},y:{beginAtZero:!0,border:{display:!1},grid:{drawTicks:!1},ticks:{maxTicksLimit:8,padding:15}}}};function Zle({values:e,contrastColor:t}){const n=Wt(),s=Zn(),r=s===re.IMAGE,i=(0,u.useMemo)(()=>Ble(e),[e]);let a,c;const d=Oe(n?.background?.media)?.image?.overlayColor??xt.DARK,h=r&&d===xt.LIGHT;switch(s){case re.LIGHT:case re.GRAY:case re.TINT:[a,c]=["#e1e1e1","#c9c9c9"];break;case re.DARK:case re.BLACK:case re.IMAGE:[a,c]=["#ffffff80","#ffffffe9"];break;case re.ACCENT:case re.COLOR:{[a,c]=t==="#000"?["#00000080","#0000001a"]:["#ffffff80","#ffffffe9"];break}}return r&&h&&([a,c]=["#00000080","#0000001a"]),i||(c=a),[a,c]}const Yle=({onEvent:e,reduceMotion:t,shouldAnimate:n,values:s})=>{const r=Rn(),{customBackgroundColorContrast:i}=vn(),a=Ve(),c=Cn(),l=mc(),d=a?.theme?.accentContrast,h=Zn(),m=h===re.IMAGE,f=Wt(),p=rl(),g=xs(r),v=!i&&f?.family==="chart",x=i??ke.DARK,b=v?g:x,T=Oe(f?.background?.media)?.image?.overlayColor??xt.DARK,S=m&&T===xt.LIGHT,I=h===re.ACCENT||h===re.COLOR,L=h===re.ACCENT?l:r,E=h===re.ACCENT?d:b,k=Qt({backgroundColor:L,contrast:E}),[N,R]=Zle({values:s,contrastColor:k}),M=(0,u.useCallback)(j=>p&&m?S?"#000000":"#FFFFFF":j.tick.value===0?R:N,[N,p,R,m,S]);return(0,u.useMemo)(()=>{let j="#000";if(p)m?j=S?"#000000":"#FFFFFF":j="FieldText";else{switch(h){case re.DARK:case re.BLACK:case re.IMAGE:j="#fff";break}I&&(j=k),m&&S&&(j="#000")}const P=n&&!t?1e3:0;let w,D;p?m?(w=j,D=S?"#FFFFFF":"#000000"):(w="Highlight",D="HighlightText"):(w=j,D=j==="#000"||j==="#000000"||j===ke.DARK?"#FFFFFF":"#000000");const O=Yh()(Qle);return O.maintainAspectRatio=!c,O.animation.duration=P,O.defaultFontColor=j,O.onClick=e,O.onHover=e,O.plugins.tooltip.animation=!t,O.plugins.tooltip.backgroundColor=w,O.plugins.tooltip.titleColor=D,p&&!m?(O.scales.x.grid.color="FieldText",O.scales.y.grid.color="FieldText"):(O.scales.x.grid.color=N,O.scales.y.grid.color=M),O.scales.x.ticks.color=j,O.scales.y.ticks.color=j,p&&(m?O.plugins.legend.labels.color=S?"#000000":"#FFFFFF":O.plugins.legend.labels.color="FieldText"),O},[h,k,N,I,p,m,S,e,c,t,M,n])};function qle(e){const{children:t,onEvent:n,reduceMotion:s,shouldAnimate:r,values:i}=e,a=Yle({onEvent:n,reduceMotion:s,shouldAnimate:r,values:i});return t(a)}var Xle=C(7173),u1=C.n(Xle);const Jle=/<mark>|<\/mark>/gm,ede=e=>t=>{const n=e(t.type).replace(Jle,"")??"";return{label:u1()(n,{length:30}),l10nId:Ot(t?.type)}},tde=e=>parseFloat(e.value??"0"),X4=(e,t)=>({labels:e.map(ede(t)),values:e.map(tde)});function nde(e,t,n){const s=[];let r=0;return n.replace(e,function(...i){const a=i.length,c=i[0],l=i[a-1],d=i[a-2],h=l.slice(r,d),m=typeof t=="function"?t(...i):t;return s.push(h,m),r=d+c.length,""}),s.push(n.slice(r)),s}const sde=(e,t)=>(0,o.jsx)("mark",{children:e},t),ode=(e,t)=>nde(new RegExp(OA()(t),"igm"),sde,e),J4=(e,t,n)=>{const s=u1()(t,{length:e});return n?ode(s,n):s};function rde(e){return e.clientWidth<=0||e.clientHeight<=0?null:{width:e.clientWidth,height:e.clientHeight}}function ide(){let e=null;return function(n,s){if(s.clientWidth<=0)return null;e?.chart!==n&&(e=n.width>0&&n.height>0?{chart:n,ratio:n.height/n.width}:null);const r=s.clientWidth,i=r*(e?.ratio??n.height/n.width);return s.clientHeight>0&&i>s.clientHeight?{width:r,height:s.clientHeight}:{width:r,height:i}}}function ade({fillParent:e}={}){const[t,n]=u.useState(null),s=u.useRef(null),[r]=u.useState(ide),{announcePolite:i}=Ms(),{labels:a}=Td()??{},{a11yBlockChartPreposition:c}=a??{},l=Cn(),d=u.useCallback(x=>{n(x)},[]),h=u.useCallback(()=>{const x=s.current;if(!x)return;const b=l?x.canvas?.parentElement:null;if(b&&x.width){const y=e?rde(b):r(x,b);y&&x.resize(y.width,y.height)}else x.resize()},[e,r,l]),m=u.useCallback(()=>{s.current?.update()},[]),f=u.useCallback(()=>{h(),m()},[h,m]),p=u.useCallback(()=>{const x=s.current;if(x==null)return;const b=x.getDatasetMeta(0),y=b.data;if(!y?.length)return;const T=0,I=[{datasetIndex:0,element:b.data[T],index:T}];x.setActiveElements(I),x.tooltip?.setActiveElements(I,{x:0,y:0}),x.update(),d(T);const L=x.data.labels[T],E=x.data.datasets[0].data[T];setTimeout(()=>{i(`${T+1} ${c??""} ${y.length} - ${L}: ${E}`)},0)},[c,i,s,d]),g=u.useCallback(()=>{const x=s.current;if(x==null)return;const b=[];x.setActiveElements(b),x.tooltip?.setActiveElements(b,{x:0,y:0}),x.update(),d(null),i(null)},[i,s,d]),v=u.useCallback(x=>{const b=s.current;if(b==null)return;const y=b.getDatasetMeta(0),T=y.data;if(!T?.length)return;let S=!1,I=t;switch(x.key){case"ArrowLeft":S=!0,I=(t-1+T.length)%T.length;break;case"ArrowRight":S=!0,I=(t+1+T.length)%T.length;break;case"Home":S=!0,I=0;break;case"End":S=!0,I=T.length-1;break}if(S&&(x.stopPropagation(),x.preventDefault()),I!==t){const E=[{datasetIndex:0,element:y.data[I],index:I}];b.setActiveElements(E),b.tooltip?.setActiveElements(E,{x:0,y:0}),b.update(),d(I);const k=b.data.labels?.[I],N=b.data.datasets[0].data[I];i(`${I+1} ${c??""} ${T.length} - ${k}: ${N}`)}},[c,t,i,s,d]);return u.useEffect(()=>{h(),m()},[h,m]),u.useEffect(()=>{s.current&&s.current.update()},[t]),{activeIndex:t,chartRef:s,onBlur:g,onFocus:p,onKeyDown:v,onEvent:d,onResize:f}}function eT(e,t={}){const n=s=>{const{activeIndex:r,chartRef:i,onBlur:a,onEvent:c,onFocus:l,onKeyDown:d,onResize:h}=ade(t);return(0,o.jsx)(e,{...s,activeIndex:r,chartRef:i,onBlur:a,onEvent:c,onFocus:l,onKeyDown:d,onResize:h})};return n.displayName=`withChartEvents(${e.displayName||e.name})`,n}const cde="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("");class lde extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)(),this.state={labelYTop:"50%"}}componentDidMount(){this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}handleEvent=(t,n)=>{const s=n.length?n[0].index:null;this.props.onEvent(s)};handleResize=()=>{requestAnimationFrame(()=>{this.props.onResize(),this.setLabelYTop()})};setLabelYTop=()=>{const t=this.props.chartRef.current;if(t){const{bottom:n,top:s}=t?.scales?.y??{};Q4()(n)&&Q4()(s)&&this.setState({labelYTop:`${(n+s)/2}px`})}};render(){const{props:{activeIndex:t,chartRef:n,getL10nValue:s,htmlIdBase:r,htmlIdTitle:i,onBlur:a,onFocus:c,onKeyDown:l,isDesktop:d,isVisible:h,items:m,itemsLabel:f,labels:p,onEvent:g,search:v,shouldAnimate:x,valuesLabel:b,variant:y},state:{labelYTop:T}}=this,S=J4(80,s(f),v),I=J4(30,s(b),v),L=X4(m,s),E=d?[]:cde.slice(0,m.length),k=d?L.labels:E.map(P=>({label:P})),N=h?L.values:Y4(0,m.length),R=`${r}-type`,M=`${r}-instructions`,A=k.map(P=>P.label),j=k.map(P=>P.l10nId).join(",");return(0,o.jsxs)("div",{className:"block-chart__cartesian",children:[(0,o.jsx)("p",{className:"visually-hidden-always",id:M,children:p?.a11yBlockChartInstructions}),(0,o.jsxs)("div",{className:"block-chart__cartesianChart",ref:this.wrapRef,children:[I&&vs(I)&&(0,o.jsxs)("div",{className:"block-chart__cartesianLabelY","data-l10n-id":Ot(b),style:{insetInlineEnd:T},children:[I,(0,o.jsx)("span",{className:"visually-hidden-always",children:p?.a11yBlockChartAxisY})]}),S&&vs(S)&&(0,o.jsxs)("div",{className:"block-chart__cartesianLabelX","data-l10n-id":Ot(f),children:[S,(0,o.jsx)("span",{className:"visually-hidden-always",children:p?.a11yBlockChartAxisX})]}),(0,o.jsx)(qle,{onEvent:this.handleEvent,reduceMotion:yn(),shouldAnimate:x,values:N,children:P=>(0,o.jsx)(zle,{activeIndex:t,opts:P,values:N,children:w=>(0,o.jsxs)("div",{"aria-describedby":M,"aria-labelledby":`${i} ${R}`,className:"block-chart__cartesian-canvas-wrap",onBlur:a,onFocus:c,onKeyDown:l,role:"application",tabIndex:0,children:[(0,o.jsx)("div",{className:"visually-hidden-always",id:R,children:y==="bar"?p?.a11yBlockChartBar:p?.a11yBlockChartLine}),(0,o.jsx)(K4.Chart,{"aria-hidden":"true",data:{labels:A,datasets:[w]},"data-l10n-id":j,options:P,ref:n,role:"presentation",type:y,updateMode:"default"})]})})})]}),!d&&(0,o.jsx)(Wle,{activeIndex:t,labels:L.labels,letters:E,onEvent:g,values:N})]})}}function dde(e){const t=vt(e),n=eT(t);function s(r){const a=ed()?.term??"",c=Cn(),l=TK(960);return(0,o.jsx)(n,{...r,isDesktop:c||l,search:a})}return s}const ude=dde(lde),h1=({valueType:e,value:t,values:n})=>e==="numeric"?String(t):Ioe(t/PI(n)),hde=e=>{if(rl())return"FieldText";const t=e.dataset.backgroundColor[e.dataIndex]??"#000";return xs(t)===ke.DARK?Pt.DARK:Pt.LIGHT},mde=(e,t,n)=>h1({valueType:e,value:t,values:n.dataset.data}),fde=(e,t)=>{const{label:n,dataset:s,parsed:r}=t[0],i=h1({valueType:e,value:r,values:s.data});return`${n}: ${i}`},pde=(e,t)=>{const n=t.dataIndex,s=t.dataset.data??[1],r=s[n],i=e==null&&r/PI(s)>=.06;return e===n||i},gde=({activeIndex:e,onEvent:t,reduceMotion:n,settings:{valueType:s},shouldAnimate:r})=>{const i=rl();return{animation:{animateRotate:r&&!n,duration:r&&!n?1e3:0},defaultFontFamily:'"lato", sans-serif',onClick:t,onHover:t,maintainAspectRatio:!1,plugins:{datalabels:{color:hde,display:pde.bind(null,e),font:{size:12,weight:"bold"},formatter:mde.bind(null,s)},legend:{display:!1,labels:i?{color:"FieldText"}:void 0},tooltip:{animation:!n,boxPadding:"14px 10px",callbacks:{label:()=>null,title:fde.bind(null,s)},caretPadding:10,cornerRadius:3,displayColors:!1,titleFont:{weight:"normal"},titleMarginBottom:0,titleSpacing:0,xAlign:"center",yAlign:"bottom",backgroundColor:i?"Highlight":Pt.LIGHT,titleColor:i?"HighlightText":Pt.DARK}},responsive:!1,rotation:130}},vde=({activeIndex:e,colors:t,hasBorder:n,values:s})=>{const r=Rn(),i=rl(),a=e==null?t:t.map((c,l)=>l===e?c:q4(c,r||"#fff",.5)??c);return i?{backgroundColor:a,hoverBackgroundColor:a,borderWidth:.5,borderColor:"rgba(255, 255, 255, 0.3)",data:s}:{backgroundColor:a,hoverBackgroundColor:a,borderWidth:0,data:s,...n&&{borderWidth:1,borderColor:"#000"}}};function Cde({activeIndex:e,children:t,colors:n,hasBorder:s,values:r}){const i=vde({activeIndex:e,colors:n,hasBorder:s,values:r});return t(i)}class xde extends u.PureComponent{handleMouseEnter=()=>{this.props.onEvent(this.props.index)};handleMouseLeave=()=>{this.props.onEvent(null)};render(){const{activeIndex:t,color:n,index:s,label:r,value:i}=this.props,a=t!=null&&t!==s,c=X()("block-chart__circleLegendItem",{"block-chart__circleLegendItem--unfocused":a});return(0,o.jsxs)("div",{className:c,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,children:[(0,o.jsxs)("dt",{className:"block-chart__circleLegendTerm",children:[(0,o.jsx)("svg",{"aria-hidden":"true",className:"block-chart__circleLegendSymbol","data-ignore":"contrast",fill:n,focusable:"false",role:"presentation",viewBox:"0 0 10 10",children:(0,o.jsx)("rect",{height:"10",rx:"1.5",width:"10"})}),(0,o.jsx)("span",{className:"block-chart__circleLegendText","data-l10n-id":r.l10nId,children:r.label})]}),(0,o.jsx)("dd",{className:"visually-hidden-always",children:i})]})}}const bde=xde,yde=({activeIndex:e,colors:t,hasBorder:n,labels:s,onEvent:r,values:i,valueType:a="numeric"})=>{const c=R0(t,R0(s,i));if(c.length===0)return null;const l=X()("block-chart__circleLegend",{"block-chart__circleLegend--border":n});return(0,o.jsx)("dl",{className:l,children:c.map(([d,[h,m]],f)=>(0,o.jsx)(bde,{activeIndex:e,color:d,index:f,label:h,onEvent:r,value:h1({valueType:a,value:m,values:i})},h.label))})},Sde=(0,u.memo)(yde),Ide=(e,t)=>{const n=e.filter(i=>Number(i.value)>=0),s=X4(n,t),r=n.map(i=>i.color);return{...s,colors:r}};class Tde extends u.PureComponent{wrapRef;id;resizeObserver;constructor(t){super(t),this.wrapRef=(0,u.createRef)()}componentDidMount(){this.resizeObserver=new ResizeObserver(this.props.onResize),this.resizeObserver.observe(this.wrapRef.current)}componentWillUnmount(){this.resizeObserver.unobserve(this.wrapRef.current)}buildOptions=()=>{const{activeIndex:t,settings:n,shouldAnimate:s}=this.props;return gde({activeIndex:t,onEvent:this.handleEvent,reduceMotion:yn(),settings:n,shouldAnimate:s})};handleEvent=(t,n)=>{const s=n.length?n[0].index:null;this.props.onEvent(s)};render(){const{activeIndex:t,backgroundColor:n,chartRef:s,getL10nValue:r,htmlIdBase:i,htmlIdTitle:a,onBlur:c,onFocus:l,onKeyDown:d,isVisible:h,items:m,labels:f,onEvent:p,settings:g}=this.props,{colors:v,labels:x,values:b}=Ide(m,r),y=h?b:Y4(0,m.length),T=this.buildOptions(),S=`${i}-type`,I=`${i}-instructions`,L=x.map(k=>k.label),E=v.includes(n);return(0,o.jsxs)("div",{className:"block-chart__circle",children:[(0,o.jsx)("p",{className:"visually-hidden-always",id:I,children:f?.a11yBlockChartInstructions}),(0,o.jsx)("div",{className:"block-chart__circleChart",ref:this.wrapRef,children:(0,o.jsx)(Cde,{activeIndex:t,colors:v,hasBorder:E,values:y,children:k=>(0,o.jsxs)("div",{"aria-describedby":I,"aria-labelledby":`${a} ${S}`,className:"block-chart__circle-canvas-wrap",onBlur:c,onFocus:l,onKeyDown:d,role:"application",tabIndex:0,children:[(0,o.jsx)("div",{className:"visually-hidden-always",id:S,children:f?.a11yBlockChartPie}),(0,o.jsx)(K4.Chart,{"aria-hidden":"true",data:{labels:L,datasets:[k]},options:T,ref:s,role:"presentation",type:"pie",updateMode:"default"})]})})}),(0,o.jsx)(Sde,{activeIndex:t,colors:v,hasBorder:E,labels:x,onEvent:p,values:y,valueType:g?.valueType})]})}}function Lde(e){const t=VD()(e),n=eT(t,{fillParent:!0});return vt(n)}const Ede=Lde(Tde);Fn.Chart.register(Fn.ArcElement,Fn.BarController,Fn.BarElement,Fn.CategoryScale,Ple.default,Fn.Legend,Fn.Legend,Fn.LineController,Fn.LineElement,Fn.LinearScale,Fn.PieController,Fn.PointElement,Fn.Title,Fn.Tooltip);const kde=e=>e.displayName||e.name||"Component";class Nde extends u.PureComponent{id;constructor(t){super(t),this.state={isVisible:!1},this.id=(0,bh.uniqueId)("chart-")}componentDidMount(){this.setState({isVisible:!this.props.animateBlockEntrance||yn()})}handleAnimationEnd=()=>{this.setState({isVisible:!0})};renderTitle=()=>{const{title:t}=this.props;return(0,o.jsx)(Re,{value:t})};render(){const{props:{animateBlockEntrance:t,children:n,editable:s,initiallyVisible:r,isLearner:i,items:a,itemsLabel:c,labels:l,settings:d,title:h,valuesLabel:m,variant:f,renderTitle:p=this.renderTitle},state:{isVisible:g}}=this,v=d?.headingLevel,x=v?`h${v}`:"h2",b=this.id,y=`${b}-title`;return(0,o.jsx)(De,{className:this.props.isPresentation?"block-chart--presentation":void 0,type:"chart",children:(0,o.jsx)($e,{afterAnimatedIn:this.handleAnimationEnd,animateBlockEntrance:t,initiallyVisible:r,isLearner:i,children:(0,o.jsx)("div",{className:"block-chart__container",children:(0,o.jsx)("div",{className:"block-chart__row",children:(0,o.jsx)("div",{className:"block-chart__rowInner",children:(0,o.jsxs)("figure",{children:[(!s&&h||s)&&(0,o.jsx)("figcaption",{children:(0,o.jsx)(x,{className:"block-chart__title",id:y,children:p()})}),(0,o.jsx)("div",{className:"block-chart__chart",children:u.cloneElement(u.Children.only(n),{htmlIdBase:b,htmlIdTitle:y,isVisible:g,items:a,itemsLabel:c,labels:l,settings:d,shouldAnimate:t,valuesLabel:m,variant:f})})]})})})})})})}}const wde=e=>{const t=Cn();return(0,o.jsx)(Nde,{...e,isPresentation:t})};function tT(e){const t=n=>(0,o.jsx)(wde,{...n,children:(0,o.jsx)(e,{})});return t.displayName=`ChartWrap(${kde(e)})`,t}const nT=tT(ude),jde=tT(Ede),Ade=e=>e.filter(t=>typeof t=="object"&&t!==null&&"variant"in t&&t.variant==="storyline").length<1;function Rde(e){const t=og(e);return(0,u.createElement)(yee,{...t,number:e.dividerNumber})}function Pde(e){const t=og(e),{items:n}=e;return(0,u.createElement)(Rle,{...t,hasManySlBlocks:()=>n&&Ade(n),isLesson:!0})}const Mde=eJ({"text/paragraph":{Component:H4},"text/table":{Component:H4},"text/heading paragraph":{Component:ile},"text/subheading paragraph":{Component:ale},"text/heading":{Component:ole},"text/subheading":{Component:rle},"text/two column":{Component:tle},"text/three column":{Component:nle},"text/four column":{Component:sle},"text/code":{Component:vS},"impact/a":{Component:Nce},"impact/b":{Component:wce},"impact/c":{Component:jce},"impact/d":{Component:Ace},"impact/note":{Component:Rce},"quote/a":{Component:T4},"quote/b":{Component:Oae},"quote/c":{Component:Bae},"quote/d":{Component:Dae},"quote/background":{Component:Fae},"quote/carousel":{Component:Hae},"quote/stacked":{Component:Vae},"list/numbered":{Component:nie},"list/checkboxes":{Component:sie},"list/bulleted":{Component:oie},"list/icon":{Component:rie},"image/hero":{Component:Bse},"image/full":{Component:Bg},"image/text aside":{Component:_se},"image/text overlay":{Component:Vse},"image/banner":{Component:zse},"gallery/centered":{Component:xI},"gallery/two column":{Component:Pg},"gallery/three column":{Component:Pg,propsBefore:()=>({width:3})},"gallery/four column":{Component:Pg,propsBefore:()=>({width:4})},"divider/divider":{Component:bee},"divider/numbered divider":{render:Rde},"divider/spacing divider":{Component:See},"360/storyline":{render:Pde},"interactive/accordion":{Component:Zse},"interactive/tabs":{Component:ioe},"interactive-fullscreen/labeledgraphic":{Component:Zre},"interactive-fullscreen/process":{Component:jae},"interactive-fullscreen/scenario":{Component:uce},"interactive-fullscreen/sorting":{Component:Ice},"interactive-fullscreen/timeline":{Component:hle},"buttons/button":{Component:eee},"buttons/button stack":{Component:tee},"flashcard/flashcard":{Component:JS},"flashcard/stack":{Component:JS,propsBefore:()=>({stack:!0})},"knowledge/knowledge":{Component:ha},"continue/continue":{Component:xee},"multimedia/step":{Component:Bce},"multimedia/audio":{Component:pae},"multimedia/video":{Component:Xg},"multimedia/ai_avatar":{Component:Xg},"multimedia/custom video":{Component:Xg,propsAfter:()=>({type:"customVideo"})},"multimedia/embed":{Component:Cae},"multimedia/attachment":{Component:yae},"multimedia/code":{Component:vS},"knowledgeCheck/multiple choice":{Component:ha},"knowledgeCheck/multiple response":{Component:ha},"knowledgeCheck/fillin":{Component:ha},"knowledgeCheck/matching":{Component:ha},"knowledgeCheck/draw from question bank":{Component:ha},"chart/bar":{Component:nT},"chart/line":{Component:nT},"chart/pie":{Component:jde},"ai-scenario/ai-scenario":{Component:RJ},"mondrian/mondrian":{Component:hie},"survey/survey":{Component:Kce},"team/people":{Component:qce},"sequence/arrows":{Component:l1},"sequence/pyramid":{Component:l1},"sequence/timeline":{Component:l1},"html/inline":{Component:ug},"html/cdn":{Component:ug},"videoCheckpoint/videoCheckpoint":{Component:null},"textToVideo/textToVideo":{Component:X5},"pending/pending":{Component:null},"spacer/spacer":{Component:null}},{extras:{"html/vibe":{Component:ug},"gallery/full":{Component:xI}},prepareProps:og});function Ode(e){return(0,o.jsx)(Gu,{block:e,children:(0,o.jsx)(Mde,{...e})})}const Bde=1e3,Dde=150,Fde="onscrollend"in window;function sT(e,t){const n=e.getBoundingClientRect(),s=t?.getBoundingClientRect(),r=s?.top??0,i=s?.bottom??window.innerHeight,a=(i-r)*.02,c=n.bottom>r-a&&n.top<i+a,l=n.bottom<r;return c||l}const m1={entries:new Map,scrollHandler:null,scrollEndHandler:null,scrollTarget:null,debounceTimer:null,register(e,t,n){const s=this.entries.size===0,r=t??window;if(this.entries.set(e,{el:e,scrollableParent:t,callback:n}),s){this.scrollTarget=r;const i=()=>{this.debounceTimer!=null&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>this.checkAll(),Dde)};Fde?(this.scrollEndHandler=()=>this.checkAll(),this.scrollTarget.addEventListener("scrollend",this.scrollEndHandler),this.scrollHandler=i,this.scrollTarget.addEventListener("scroll",this.scrollHandler)):(this.scrollHandler=i,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())sT(t.el,t.scrollableParent)&&e.push(t);e.forEach(t=>t.callback())})}},oT=({active:e=!0,children:t,onViewed:n})=>{const s=(0,u.useRef)(null),r=(0,u.useRef)(!1),i=(0,u.useRef)(n);return(0,u.useEffect)(()=>{i.current=n},[n]),(0,u.useEffect)(()=>{const a=s.current;if(!e||!a||r.current)return;let c=!0;const l=pp(),d=()=>{!c||r.current||(r.current=!0,h.disconnect(),clearTimeout(m),m1.unregister(a),i.current())},h=new IntersectionObserver(([f])=>{f!=null&&(f.isIntersecting||f.intersectionRatio>0)&&d()},{root:l,rootMargin:Yv,threshold:0});h.observe(a);const m=setTimeout(()=>{!r.current&&sT(a,l)&&d()},Bde);return m1.register(a,l,d),()=>{c=!1,h.disconnect(),clearTimeout(m),m1.unregister(a)}},[e]),(0,o.jsx)("div",{ref:s,children:t})},_de=(0,u.memo)(function({active:t=!0,block:n,children:s,completesFirstItemOnView:r=!1,onViewed:i,onStep:a}){const c=(0,u.useCallback)(d=>{d!=null&&"id"in d&&d.id!=null&&!d.isDone&&a(d.id)},[a]),l=(0,u.useCallback)(()=>{if(!n.items?.length){i();return}if(!n.requiresInteraction){i();return}r&&n.items.length>0&&c(n.items[0])},[n,r,c,i]);return(0,o.jsx)(oT,{active:t,onViewed:l,children:u.cloneElement(u.Children.only(s),{onStep:c})})}),Ie={mode:"view"},kt={mode:"step"},Hde={mode:"exit"},f1={mode:"step",completesFirstItemOnView:!0},Vde={mode:"step-if",when:({items:e})=>Array.isArray(e)&&e.length>0},p1={mode:"step-if",when:({settings:e})=>typeof e=="object"&&e!==null&&"hasCustomCompletion"in e&&e.hasCustomCompletion===!0},zde={...{"text/paragraph":Ie,"text/table":Ie,"text/heading paragraph":Ie,"text/subheading paragraph":Ie,"text/heading":Ie,"text/subheading":Ie,"text/two column":Ie,"text/three column":Ie,"text/four column":Ie,"text/code":Ie,"impact/a":Ie,"impact/b":Ie,"impact/c":Ie,"impact/d":Ie,"impact/note":Ie,"quote/a":Ie,"quote/b":Ie,"quote/c":Ie,"quote/d":Ie,"quote/background":Ie,"quote/carousel":f1,"quote/stacked":Ie,"list/numbered":Ie,"list/checkboxes":kt,"list/bulleted":Ie,"list/icon":Ie,"image/hero":Ie,"image/full":Ie,"image/text aside":Ie,"image/text overlay":Ie,"image/banner":Ie,"gallery/centered":f1,"gallery/two column":Ie,"gallery/three column":Ie,"gallery/four column":Ie,"divider/divider":Ie,"divider/numbered divider":Ie,"divider/spacing divider":Ie,"360/storyline":kt,"interactive/accordion":kt,"interactive/tabs":f1,"interactive-fullscreen/labeledgraphic":kt,"interactive-fullscreen/process":kt,"interactive-fullscreen/scenario":kt,"interactive-fullscreen/sorting":kt,"interactive-fullscreen/timeline":Ie,"buttons/button":Ie,"buttons/button stack":Ie,"flashcard/flashcard":kt,"flashcard/stack":kt,"knowledge/knowledge":kt,"continue/continue":kt,"multimedia/step":Ie,"multimedia/audio":kt,"multimedia/video":kt,"multimedia/ai_avatar":Ie,"multimedia/custom video":kt,"multimedia/embed":Ie,"multimedia/attachment":Ie,"multimedia/code":Ie,"knowledgeCheck/multiple choice":kt,"knowledgeCheck/multiple response":kt,"knowledgeCheck/fillin":kt,"knowledgeCheck/matching":kt,"knowledgeCheck/draw from question bank":kt,"chart/bar":Ie,"chart/line":Ie,"chart/pie":Ie,"ai-scenario/ai-scenario":Hde,"mondrian/mondrian":Vde,"survey/survey":kt,"team/people":Ie,"sequence/arrows":Ie,"sequence/pyramid":Ie,"sequence/timeline":Ie,"html/inline":p1,"html/cdn":p1,"videoCheckpoint/videoCheckpoint":kt,"textToVideo/textToVideo":Ie,"pending/pending":Ie,"spacer/spacer":Ie},...{"html/vibe":p1,"gallery/full":Ie}};function g1(e){const t=zde[J5(e.family,e.variant??"")]??Ie;return{completesFirstItemOnView:(t.mode==="step"||t.mode==="step-if")&&t.completesFirstItemOnView===!0,trackSteps:t.mode==="step"||t.mode==="step-if"&&t.when(e),trackExit:t.mode==="exit"}}const $de=e=>{const{trackSteps:t,trackExit:n}=g1(e);return t||n},Ude=e=>{window.parent.postMessage({type:"preview:lessonChange",data:e},"*")};function v1(){const e=hn();return(0,u.useCallback)(t=>{e(An(t))},[e])}function Gde(e){const t=v1(),n=(0,u.useRef)(null);return(0,u.useEffect)(()=>{e&&n.current!==e&&(Ude(e),n.current=e)},[e]),{handleNavigate:t}}const Wde="draw from question bank",C1=e=>{const{animateBlockEntrance:t,backgroundBefore:n,block:s,className:r,defaultBackgroundColor:i,hideBlock:a,index:c,isLastBlock:l,isOnlyBlockInStep:d,lessonId:h,loadMedia:m,observeProgress:f=!0,onContinue:p}=e,{blockId:g,family:v,items:x=[],variant:b}=s,y=`block-${g}`,T=it(),S=Bb(),I=Db(),L=Ce(),E=Ef(),k=uU(),N=vu()?.prefersKeyboardNavigation,R=MM(),M=BM(),A=v1(),j=ud(h),P=w6("block"),w=pB({blockId:String(g),lessonId:String(h)}),D=(0,u.useCallback)(W=>{const ie=b===Wde?x[0]:Or()(dt()("id",W),x);T(bi({blockId:g,lessonId:h,items:[ie]})),v==="continue"&&p(g,W)},[g,T,v,x,h,p,b]),O=(0,u.useCallback)(()=>{T(bi({blockId:g,lessonId:h,items:x}))},[g,T,x,h]),B=(0,u.useCallback)(W=>{const ie=x?.[0],ge=ie&&"id"in ie?ie.id:void 0;ge&&T(Zw({blockId:g,itemId:ge,lessonId:h,audioVideoPlayhead:W}))},[g,T,h,x]),H=(0,u.useCallback)(()=>{T(Xw({blockId:g,lessonId:h,isSubmitted:!0}))},[g,T,h]),_=(0,u.useCallback)(({itemId:W,response:ie})=>{T(qw({blockId:g,itemId:W,lessonId:h,response:ie}))},[g,T,h]),$=(0,u.useCallback)(W=>{T(Ww(W))},[T]),z=(0,u.useCallback)(()=>({itemId:W,isCorrect:ie})=>T(Yw({itemId:W,lessonId:h,blockId:g,isCorrect:ie})),[g,T,h]),K=(0,u.useCallback)(()=>()=>T(Qw({lessonId:h,blockId:g})),[g,T,h]),J=Dc(),Y=(0,u.useCallback)(W=>{T(c5(W))},[T]),G=(0,u.useCallback)(()=>{T(Fc())},[T]),F=(0,u.useCallback)(W=>{T(Fp(W))},[T]),U=(0,u.useCallback)(()=>{T(Pr(h))},[T,h]),Q=(0,u.useCallback)(()=>{T(I?Pr(h):bi({blockId:g,lessonId:h,items:[]}))},[g,T,I,h]);if(!L)return null;const Z={...s,animateBlockEntrance:t,className:r?.toString(),color:R,defaultBackgroundColor:i,dividerNumber:w,enableVideoPlaybackSpeed:M,handleNavigate:A,onExit:U,onComplete:Q,onFinishStoryline:kN,onSurveySubmitted:H,onSurveyPartialResponse:_,initiallyVisible:c===0,isHidden:a,isLastBlock:l,isLearn:!0,isLearner:!0,isOnlyBlockInStep:d,isVideoTraining:S,labels:L,lessonId:h,loadMedia:m,onCardDrop:z,onReplay:K,onRetryAttempt:$,onTranscriptClose:G,onTranscriptOpen:Y,onTranscriptUpdate:F,partnerContent:E,prefersKeyboardNavigation:N,previewType:k,progress:j,recordMediaPlayheadPosition:B,transcriptPanelState:J},{completesFirstItemOnView:q,trackExit:te,trackSteps:ne}=g1(s),ae=tU(h,g),ue=["noOutline",r,P?"comment-preview-anchor":void 0,a?"blocks-lesson__block-wrapper--hidden":void 0].filter(Boolean).join(" "),Te=(0,o.jsx)(Ode,{...Z});let we;return te?we=Te:ne?we=(0,o.jsx)(_de,{active:f,block:s,completesFirstItemOnView:q,onStep:D,onViewed:O,children:Te}):we=(0,o.jsx)(oT,{active:f,onViewed:O,children:Te}),(0,o.jsxs)("div",{className:ue,"data-block-family":v,"data-block-id":g,"data-change-path":ae,children:[n,we,(0,o.jsx)(Jn,{anchor:hQ(g),label:"Comments on block"})]},y)},P0=Mt(),x1=mi(),Kde=st(),Qde=({slides:e,currentSlide:t},n)=>(t.push(n),n.settings?.attachedToNextBlock||(e.push(t),t=[]),{slides:e,currentSlide:t}),rT=e=>{const{slides:t}=Gp()(Qde,{slides:[],currentSlide:[]},e);return t};function b1(e,t,n,s){if(e.length){const i=e.slice(-1)[0];if(!hr(i.id,n))return e}const r=Ole(Zde(n),t.slice(e.length)).map(Yde(s));return r.length?b1(e.concat(r),t,n,s):e}const hr=(e,t)=>e==null?!1:P0(!1,["items",e,"isComplete"],t),Zde=e=>({family:t,items:n})=>{const s=P0({},0,n);return t==="continue"&&!hr(s.id,e)},Yde=e=>(t,n,s)=>{const r=s.slice(-1)[0]||{},{family:i}=r,a=i==="continue"?P0(void 0,["items",0,"type"],r)??e?.blockContinueCompletionType??!1:!1;return Wa(t)?x1(t,{requiresInteraction:!0}):t.variant!=="continue"&&(!a||a==="completeBlock"&&n!==s.length-1&&n!==s.length-2)?t:x1(t,{requiresInteraction:!0})};function iT({id:e,...t},n,s,r,i){if(t.family==="continue"){const a=P0(void 0,["items",0,"type"],t)??i?.blockContinueCompletionType??"";return x1({blockId:e,...t},{skipContinue:r,canContinue:qde({continueType:a,blocks:n,progress:s}),lessonProgress:s,isComplete:hr(e,s)})}return{blockId:e,...t}}const qde=({continueType:e,blocks:t,progress:n})=>{switch(e){case"completeAll":return pn()(ps()(t),tue(n));case"completeBlock":return t.length===0?!0:hr(nue(t),n);default:return!0}},Xde=e=>ls()(Kde("items",e)??{}),Jde=e=>eue(Xde(e??{})),eue=e=>ko()(t=>dt()("isComplete",!0,t),e),tue=e=>ps()(Jde(e)),nue=e=>El()(e)?.id,sue=({family:e,variant:t,isComplete:n,requiresInteraction:s})=>e==="continue"&&t==="continue"&&!!s&&!n,oue=(e,t)=>!!e.find(s=>{if(Wa(s))return s.id==null?!0:!t?.items?.[s.id]?.isComplete}),rue=e=>e.length===0?!1:nx()(t=>!!sue(t),e),iue=(e,t)=>e.length===0?!1:oue(e,t),aue=({blocks:e,lessonProgress:t})=>e.findIndex(n=>{const s=n.id==null?void 0:t?.items?.[n.id],r=s&&s?.isComplete==null;return Wa(n)&&r}),aT=({blocks:e,lessonProgress:t,currentBlockIndex:n})=>{const s=aue({blocks:e,lessonProgress:t});return s>-1&&n>s},cT=(e,t,n)=>{const s=e.findIndex(r=>r.id===t);return s<=0?[]:e.slice(0,s).filter(r=>r.family==="continue"&&!hr(r.id,n))},cue=(e,t)=>{const n=["embed","video","full"],s=["interactive","interactive-fullscreen","image","flashcard","gallery","chart","knowledgeCheck"];return e!=null&&s.includes(e)||t!=null&&n.includes(t)};function lT(e){const t=(0,u.useRef)(e);t.current=e,(0,u.useEffect)(()=>{const n=s=>{if(s.defaultPrevented||s.button!==0||s.altKey||s.ctrlKey||s.metaKey||s.shiftKey)return;const r=s.target;if(!(r instanceof Element))return;const i=r.closest("a")?.getAttribute("href");if(i==null)return;const a=TY(i);a!=null&&t.current(a)};return document.addEventListener("click",n),()=>document.removeEventListener("click",n)},[])}function lue(e,t,n){if(!e||!t||!$l())return!1;if(AP(n,{l10n:t}))return!0;const{locales:s,defaultLocale:r}=t,i=s.find(a=>a.locale===r)?.id;return!!(i&&i!==e)}function dT(){const{currentLocale:e}=at(),t=pe(s=>s.course?.defaultLocaleId),n=pe(s=>s.l10n);return lue(t??null,n,e)}const due=e=>e==="center"||e==="end"||e==="nearest"||e==="start",uue=e=>We(e)&&typeof e.lessonId=="string"&&(typeof e.itemId=="string"||e.itemId==null)&&(e.align===void 0||due(e.align)),hue=e=>We(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string";function mue({animateBlockEntrance:e,blocks:t,className:n,isLessonEntering:s,isLessonExiting:r,lessonId:i,loadMedia:a,observeProgress:c=!0,nextLesson:l}){const d=ud(i),h=v1(),m=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(null),[g,v]=(0,u.useState)(null),[,x]=(0,u.useState)(0),[b,y]=(0,u.useState)(!1),T=(0,u.useRef)(null),[S]=(0,Be.ok)(),I=S.get(Bc),L=pe(_=>_.course?.theme),E=pe(Ob),k=dT()||b,N=(0,u.useRef)(r),R=(0,u.useRef)(s),M=(0,u.useRef)(i),A=(0,u.useRef)(t);N.current=r,R.current=s,M.current=i,A.current=t;const j=(0,u.useCallback)((_,$="start")=>{const z=A.current.find(K=>String(K.id)===String(_));return z==null?!1:(T.current?.(),p.current={blockId:z.id,align:$},v(z.id),x(K=>K+1),!0)},[]);lT(({lessonId:_,blockId:$})=>{_===M.current&&j($)}),(0,u.useEffect)(()=>{const _=$=>{if($.origin!==window.location.origin)return;(Array.isArray($.data)?$.data:[$.data]).forEach(K=>{We(K)&&K.type==="preview:lessonUpdate"&&y(!0)})};return window.addEventListener("message",_),()=>window.removeEventListener("message",_)},[]),(0,u.useEffect)(()=>{const _=$=>{if(N.current||!($ instanceof CustomEvent))return;const z=$.detail;if(!uue(z)||z.lessonId!==M.current)return;const K=z.itemId,J=z.align??"nearest";if(K==null){T.current?.(),m.current?.closest(".page")?.scrollIntoView({behavior:"smooth",block:"start"});return}j(K,J)};return window.addEventListener(Je,_),()=>window.removeEventListener(Je,_)},[j]),(0,u.useEffect)(()=>{T.current?.(),(I==null||!j(I))&&(p.current=null,v(null))},[I,i,j]),(0,u.useEffect)(()=>()=>T.current?.(),[]),(0,u.useEffect)(()=>{if(k||g==null)return;cT(t,g,d).forEach($=>{gn(bi({blockId:$.id,items:$.items??[],lessonId:i}))})},[k,g,t,d,i]),(0,u.useLayoutEffect)(()=>{const _=p.current;if(_==null||R.current)return;const $=document.querySelector(".page-wrap"),z=$?.querySelector(`[data-block-id="${_.blockId}"]`);$==null||z==null||(p.current=null,_.align==="start"?P($,z):z.scrollIntoView({behavior:"smooth",block:_.align}))}),(0,u.useLayoutEffect)(()=>{w()});function P(_,$){T.current?.();const z=()=>{let Z=0,q=$;for(;q instanceof HTMLElement&&q!==_&&_.contains(q);)Z+=q.offsetTop,q=q.offsetParent;return Z},K=()=>{const Z=z();Math.abs(_.scrollTop-Z)>1&&(_.scrollTop=Z)};let J=0,Y=!1;const G=()=>{Y||(Y=!0,cancelAnimationFrame(J),window.clearTimeout(U),_.removeEventListener("wheel",G,F),_.removeEventListener("touchstart",G,F),_.removeEventListener("pointerdown",G,F),window.removeEventListener("keydown",G,!0),T.current===G&&(T.current=null))},F={capture:!0,passive:!0};_.addEventListener("wheel",G,F),_.addEventListener("touchstart",G,F),_.addEventListener("pointerdown",G,F),window.addEventListener("keydown",G,!0);const U=window.setTimeout(G,2500),Q=()=>{Y||(K(),J=requestAnimationFrame(Q))};T.current=G,J=requestAnimationFrame(Q)}function w(){if(f.current){const $=t.findIndex(K=>K.id===f.current)+1,z=t[$]?.id??null;if(z){const K=document.querySelector(".page-wrap"),J=K?.querySelector(`[data-block-id="${z}"]`),Y=J?J.getBoundingClientRect().top:0;Qr.Ay.animateScroll.scrollTo(Y+(K?.scrollTop??0),{smooth:!0,containerId:"page-wrap"})}f.current=null}}const D=(0,u.useCallback)((_,$)=>{hr($,d)||(f.current=_),_===t[t.length-1]?.id&&l&&(gn(Pr(i)),h(l))},[h,t,i,d,l]),O=k?t:(()=>{const _=b1([],t,d,L);return Array.isArray(_)?_.filter($=>We($)&&(typeof $.id=="string"||typeof $.id=="number")):t})(),B=g==null?-1:O.findIndex(_=>_.id===g),H=["blocks-lesson",n,E?"blocks-lesson--one-page":void 0].filter(Boolean).join(" ");return(0,o.jsx)("section",{className:H,ref:m,children:O.map((_,$,z)=>{const K=iT(_,z.slice(0,-1),d,k,L);if(!hue(K))return null;const J=K,Y=z.length-1,F=J.family==="continue"?_.id===t[t.length-1]?.id:$===Y,U=B!==-1&&$<=B,Q=!b&&!U&&aT({blocks:O,lessonProgress:d,currentBlockIndex:$});return(0,o.jsx)(C1,{animateBlockEntrance:e,block:J,hideBlock:Q,index:$,isLastBlock:F,lessonId:i,loadMedia:a,observeProgress:c,onContinue:D},J.blockId)}).filter(JX.A)})}const y1=mue;function M0({children:e,lessonId:t}){const n=(0,u.useRef)(null),s=(0,u.useCallback)(r=>{const i=r.detail?.lessonId;i!=null&&String(i)!==String(t)||n.current?.focus?.()},[t]);return jQ(s),(0,o.jsx)("main",{className:"lesson-main",ref:n,tabIndex:-1,children:e})}const fue=({animateBlockEntrance:e,data:t,lessonHeader:n,lessonHeaderWrapClasses:s,lessonHeaderWrapStyles:r,loadMedia:i,observeProgress:a,isLessonEntering:c,isLessonExiting:l,nextLesson:d,hideLessonHeaders:h})=>{const{id:m,items:f}=t,p={animateBlockEntrance:e,blocks:f,lessonId:m,loadMedia:i,observeProgress:a,isLessonEntering:c,isLessonExiting:l,nextLesson:d};return(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,o.jsxs)(M0,{lessonId:m,children:[(0,o.jsx)("div",{className:s,inert:h,style:r,children:n}),(0,o.jsx)("div",{className:"page__content",children:(0,o.jsx)(y1,{...p})})]})})})},pue=10;function gue(){const e=(0,u.useRef)(null),[t,n]=(0,u.useState)(!1);return(0,u.useEffect)(()=>{let s=null;const r=()=>{const a=e.current;if(!a||!s)return;const c=s.scrollTop,l=a.getBoundingClientRect().top+c,d=c>l&&c>0;n(h=>h===d?h:d)},i=setTimeout(()=>{s=pp(),s?.addEventListener("scroll",r,{passive:!0})},pue);return()=>{clearTimeout(i),s?.removeEventListener("scroll",r)}},[]),{isSticky:t,refProgressWrap:e}}const uT=V("progress"),vue=V("lesson-progress-wrapper"),Cue=()=>!!document.querySelector(".lesson--preview"),xue=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??-1,s=e?.length??0;return n===-1?0:n+1===s?100:e?.[n]?.linePosition?.replace("%","")??"0"},bue=({items:e,lessonProgress:t})=>{const n=t?.activeIndex??0,s=e?.length??0;return n>s?100:Math.round(n/s*100)},yue=e=>{const{lessonProgress:t,type:n}=e;switch(n){case"process":return bue(e);case"sorting":return t?.percentViewed??0;case"timeline":return xue(e);default:return t?.percentComplete??0}},Sue=e=>{const{type:t,items:n,sidebarAvailable:s,isCourseNavOpen:r,isMobile:i}=e,{isSticky:a,refProgressWrap:c}=gue(),[l]=(0,u.useState)(lo),d=r,h=r&&i,m=Cue(),f=vue({visible:a&&!h}).mix(d&&s&&!m?"lesson--open":"").mix(s&&h&&!m?"lesson--open-mobile":"").toString(),p=uT({timeline:t==="timeline",video:t==="video"}).toString(),g=yue(e),v=t==="timeline"&&n&&n.map(b=>{const y=parseInt(String(g))>=parseInt(b.linePosition?.slice(0,-1)??"0"),T=uT("marker",{active:y}).mix(y?"brand--background":"").toString();return(0,o.jsx)("div",{className:T,style:{left:b.linePosition}},b.id)}),x=(0,o.jsx)("div",{className:"progress-wrap",children:(0,o.jsx)("div",{className:p,children:(0,o.jsxs)("div",{className:"progress__container",children:[(0,o.jsx)("div",{className:"progress__indicator brand--background",style:{transform:`translate3d(calc(${g}% * var(--dir-x)),0px,0px)`}}),v]})})});return(0,o.jsxs)("div",{ref:c,children:[x,(0,Ts.createPortal)((0,o.jsx)("div",{"aria-hidden":"true",className:f,children:x}),l)]})},Iue=e=>{const t=wY(),{isCourseNavOpen:n}=sX(),s=Xt(480);return(0,o.jsx)(Sue,{...e,isCourseNavOpen:n,isMobile:s,sidebarAvailable:t})};function hT(e){return Lt()===se.RISE_CLASSIC?(0,o.jsx)(Iue,{...e}):null}function Tue(e,t){return e==null?void 0:t.quizDecks?.[e]}function Lue(e,t){const n=ji(e,t);return n?.type==="quiz"?n:void 0}function Eue(){const e=zr(),t=(0,Ke.Mz)((n,s)=>n==null?void 0:e(n,s),n=>_o(n)?n:void 0);return(0,Ke.Mz)(Tue,t,Lue,(n,s,r)=>({deck:n,lesson:s,progress:r}))}function kue(e){const t=(0,u.useMemo)(Eue,[]);return pe(n=>t(e,n))}const Le=V("quiz-deck-analysis");function Nue({lessonId:e}){const{deck:t,lesson:n,progress:s}=kue(e),r=ct();return(0,o.jsxs)("section",{className:Le(),children:[(0,o.jsxs)("header",{className:Le("header"),children:[(0,o.jsx)("p",{className:Le("eyebrow"),children:"Internal diagnostic"}),(0,o.jsx)("h2",{children:"Quiz deck engine analysis"}),(0,o.jsx)("p",{className:Le("notice"),children:"Simulation changes only the owned quiz-deck Redux attempt. They do not update canonical course progress or save to Runtime or an LMS."})]}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Deck status",value:t?.status??"missing"}),(0,o.jsx)(_e,{label:"Lesson data",value:n?"loaded":"missing"}),(0,o.jsx)(_e,{label:"Progress data",value:s?"loaded":"missing"}),(0,o.jsx)(_e,{label:"Canonical progress fenced",value:t?.status==="ready"?String(t.attempt.canonicalProgressDiscarded):"not applicable"})]}),t?.status==="ready"?(0,o.jsx)(wue,{deck:t,getL10nValue:r,lesson:n,lessonId:e,progress:s}):null,t?.status==="incompatible"?(0,o.jsxs)("section",{className:Le("panel"),children:[(0,o.jsx)("h3",{children:"Saved attempt is incompatible"}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Reason",value:t.reason}),(0,o.jsx)(_e,{label:"Saved position",value:String(t.baselineProgress.activeIndex??0)})]}),(0,o.jsx)(O0,{label:"Canonical progress snapshot",value:t.baselineProgress})]}):null,t?.status==="failed"?(0,o.jsxs)("section",{className:Le("panel"),children:[(0,o.jsx)("h3",{children:"Deck preparation failed"}),(0,o.jsx)("dl",{className:Le("facts"),children:(0,o.jsx)(_e,{label:"Reason",value:t.reason})})]}):null]})}function wue({deck:e,getL10nValue:t,lesson:n,lessonId:s,progress:r}){const{cards:i,structureKey:a}=e.deal,{currentProgress:c}=e.attempt,l=it(),d=Ce(),h=(0,u.useRef)(null),m=(0,u.useRef)(null),f=(0,u.useRef)(null),p=(0,u.useRef)(null),g=(0,u.useRef)(null),v=(0,u.useRef)(null),[x,b]=(0,u.useState)(),[y,T]=(0,u.useState)(),[S,I]=(0,u.useState)(),[L,E]=(0,u.useState)(),k=(0,u.useMemo)(()=>new Map(i.map(F=>[F.key,Vue({card:F,getL10nValue:t,lesson:n})])),[i,t,n]),N=Co(d?.quizSubmit)&&Co(d?.quizCorrect)&&Co(d?.quizIncorrect)&&(e.deal.revealAnswers===Ee.NONE||Co(d?.quizNext)),R=i.every(F=>F.questionType===oe.FILL_IN_THE_BLANK?mT({acceptedAnswers:F.scoring.acceptedAnswers,resolvedFillInAnswers:k.get(F.key)??[]}):!0),M=N?R?void 0:"A fill-in card has no accepted response in the current locale.":"Required localized submission labels are missing.",A=M==null,j=A&&Fx(e),P=A&&_x(e),w=c.activeIndex??0,D=w>=Xs(i.length),O=Co(d?.quizTakeAgain)?d.quizTakeAgain:void 0,B=A&&n!=null&&O!=null&&kx({deck:e,retryCount:n.settings?.retryCount});(0,u.useEffect)(()=>{if(!x)return;a===x.structureKey&&(c.retryAttempts??0)===x.retryAttempts&&c.activeIndex===1&&(m.current??h.current??f.current)?.focus(),b(void 0)},[c.activeIndex,c.retryAttempts,x,a]),(0,u.useEffect)(()=>{if(!L)return;w===0&&(c.retryAttempts??0)===L.retryAttempts&&g.current?.focus(),E(void 0)},[w,c.retryAttempts,L]),(0,u.useEffect)(()=>{if(!S)return;const F=Math.min(S.fromIndex+1,Xs(i.length));a===S.structureKey&&(c.retryAttempts??0)===S.retryAttempts&&w===F&&(D?p.current?.focus():(m.current??h.current??f.current)?.focus()),I(void 0)},[w,S,i.length,c.retryAttempts,D,a]),(0,u.useEffect)(()=>{if(!y)return;const F=c.items[y.progressId];if(!(a===y.structureKey&&(c.retryAttempts??0)===y.retryAttempts&&F?.isComplete===!0&&typeof F.isCorrect=="boolean")){T(void 0);return}const Q=F.isCorrect?d?.quizCorrect:d?.quizIncorrect;if(!Co(Q)){T(void 0);return}v.current?.focus(),T(void 0)},[c.items,c.retryAttempts,d?.quizCorrect,d?.quizIncorrect,a,y]);function H({authoredAnswerIndex:F,cardKey:U}){l(FR({authoredAnswerIndex:F,cardKey:U,lessonId:s,retryAttempts:c.retryAttempts??0,structureKey:a}))}function _({authoredAnswerIndex:F,cardKey:U}){l(_R({authoredAnswerIndex:F,cardKey:U,lessonId:s,retryAttempts:c.retryAttempts??0,structureKey:a}))}function $({cardKey:F,text:U}){l(HR({cardKey:F,lessonId:s,retryAttempts:c.retryAttempts??0,structureKey:a,text:U}))}function z({cardKey:F,matchAnswerId:U,promptAnswerId:Q}){l(VR({cardKey:F,lessonId:s,matchAnswerId:U,promptAnswerId:Q,retryAttempts:c.retryAttempts??0,structureKey:a}))}function K({cardKey:F,fillInText:U,resolvedFillInAnswers:Q}){const Z=i.find(q=>q.key===F);Z&&(e.deal.revealAnswers===Ee.NONE?I({fromIndex:w,retryAttempts:c.retryAttempts??0,structureKey:a}):T({cardKey:F,progressId:Z.progressId,retryAttempts:c.retryAttempts??0,structureKey:a})),l(zR({cardKey:F,fillInText:U,lessonId:s,resolvedFillInAnswers:Q,retryAttempts:c.retryAttempts??0,structureKey:a}))}function J(){const F={fromIndex:w,retryAttempts:c.retryAttempts??0,structureKey:a};I(F),l(KR({lessonId:s,...F}))}function Y(){const F={retryAttempts:c.retryAttempts??0,structureKey:a};b(F),l(GR({lessonId:s,...F}))}function G(){const F=Number.parseInt(String(c.retryAttempts??0),10);E({retryAttempts:F+1}),l(WR({lessonId:s,retryAttempts:F,structureKey:a}))}return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("section",{className:Le("panel"),children:[(0,o.jsx)("h3",{children:"Redux sources"}),(0,o.jsxs)("div",{className:Le("columns"),children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h4",{children:"Course lesson"}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Title",value:mr({getL10nValue:t,value:n?.title})}),(0,o.jsx)(_e,{label:"Lesson ID",value:String(n?.id??"missing")}),(0,o.jsx)(_e,{label:"Authored items",value:String(n?.items.length??0)})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h4",{children:"Quiz attempt"}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Dealt cards",value:String(i.length)}),(0,o.jsx)(_e,{label:"Current location",value:_ue({activeIndex:c.activeIndex,cardCount:i.length})}),(0,o.jsx)(_e,{label:"Retry attempt",value:String(c.retryAttempts??0)}),(0,o.jsx)(_e,{label:"Complete",value:ci(c.isComplete)}),(0,o.jsx)(_e,{label:"Results reported",value:ci(c.reportResults)}),(0,o.jsx)(_e,{label:"Score / passed",value:`${c.score??"not set"} / ${ci(c.passed)}`})]})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h4",{children:"Quiz settings"}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Authored passing score",value:String(n?.settings?.passingScore??"not set")}),(0,o.jsx)(_e,{label:"Effective passing score",value:String(c.passingScore??"not set")}),(0,o.jsx)(_e,{label:"Retry allowance",value:Bue(n?.settings?.retryCount)}),(0,o.jsx)(_e,{label:"Effective reveal answers",value:e.deal.revealAnswers}),(0,o.jsx)(_e,{label:"Pass to continue",value:ci(n?.settings?.passToContinue??!1)}),(0,o.jsx)(_e,{label:"Shuffle questions",value:ci(n?.settings?.randomizeQuestionOrder??!1)}),(0,o.jsx)(_e,{label:"Shuffle answers",value:ci(n?.settings?.shuffleAnswerChoices??!1)}),(0,o.jsx)(_e,{label:"Timer enabled",value:ci(n?.settings?.timer??!1)}),(0,o.jsx)(_e,{label:"Timer duration",value:Due(n?.settings?.timerDuration??10)}),(0,o.jsx)(_e,{label:"Timer display",value:String(n?.settings?.timerDisplay??Do.REMAINING)})]})]})]}),(0,o.jsxs)("div",{className:Le("details-grid"),children:[(0,o.jsx)(O0,{label:"Canonical course progress",value:r}),(0,o.jsx)(O0,{label:"Owned deck progress",value:c}),(0,o.jsx)(O0,{label:"Structure identity",value:zue(a)})]})]}),(0,o.jsxs)("section",{className:Le("panel"),children:[(0,o.jsx)("h3",{children:"Prepared deal"}),(0,o.jsx)("p",{className:Le("help"),children:"Cards are listed in final display order. Displayed answer positions are one-based; original answer indices remain zero-based so the permutation is explicit. Multiple-choice, multiple-response, fill-in, and matching simulation controls update only the owned Redux deck and are not saved."}),M?(0,o.jsx)("p",{className:Le("warning"),role:"status",children:M}):null,j?(0,o.jsx)("div",{className:Le("button-row"),children:(0,o.jsx)("button",{className:Le("button"),onClick:Y,ref:g,type:"button",children:"Start simulation"})}):null,(0,o.jsx)("ol",{"aria-label":"Dealt question order",className:Le("cards"),children:i.map((F,U)=>{const Q=U+1,Z=w===Q,q=A&&(Hx({cardKey:F.key,deck:e})!=null||Vx({cardKey:F.key,deck:e})!=null),te=A&&zx({cardKey:F.key,deck:e})!=null,ne=A&&$x({cardKey:F.key,deck:e})!=null,ae=c.items[F.progressId],ue=ne||j&&U===0,Te=A?Ux({cardKey:F.key,deck:e}):void 0,we=k.get(F.key);return(0,o.jsx)(jue,{canChangeResponse:q||te||ne,canSubmitResponse:Te!=null&&ex(Te),card:F,cardCount:i.length,displayIndex:U,fillInInputRef:te?h:void 0,firstAnswerButtonRef:q?m:void 0,firstMatchingSelectRef:ne?f:void 0,getL10nValue:t,isActive:Z,labels:d,lesson:n,onAdvance:J,onChangeMatchingResponse:z,onCommitFillInResponse:$,onChangeMultipleChoiceSelection:H,onToggleMultipleResponseSelection:_,onSubmitResponse:K,progress:ae,resolvedFillInAnswers:we,showMatchingResponseControls:ue,showMatchingResponseSummary:ae?.isComplete===!0,showNextControl:e.deal.revealAnswers!==Ee.NONE&&P&&Z&&ae?.isComplete===!0,showSubmitControl:Te!=null,submissionResultRef:y?.cardKey===F.key?v:void 0},F.key)})}),D?(0,o.jsxs)("section",{"aria-current":"step",className:Le("card"),children:[(0,o.jsx)("h4",{ref:p,tabIndex:-1,children:"Simulation results"}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Score",value:String(c.score??"not set")}),(0,o.jsx)(_e,{label:"Percent complete",value:String(c.percentComplete??"not set")})]}),B?(0,o.jsx)("div",{className:Le("button-row"),children:(0,o.jsx)("button",{className:Le("button"),onClick:G,type:"button",children:O})}):null]}):null]})]})}function jue({card:e,cardCount:t,canChangeResponse:n,canSubmitResponse:s,displayIndex:r,fillInInputRef:i,firstAnswerButtonRef:a,firstMatchingSelectRef:c,getL10nValue:l,isActive:d,labels:h,lesson:m,onAdvance:f,onChangeMatchingResponse:p,onChangeMultipleChoiceSelection:g,onCommitFillInResponse:v,onToggleMultipleResponseSelection:x,onSubmitResponse:b,progress:y,resolvedFillInAnswers:T,showMatchingResponseControls:S,showMatchingResponseSummary:I,showNextControl:L,showSubmitControl:E,submissionResultRef:k}){const N=pT({lesson:m,source:e.source}),R=e.questionType===oe.MULTIPLE_CHOICE,M=e.questionType===oe.MULTIPLE_RESPONSE,A=e.questionType===oe.FILL_IN_THE_BLANK,j=R||M,P=N?.type===oe.MATCHING?N.answers:void 0,w=y?.isComplete===!0&&typeof y.isCorrect=="boolean"?y.isCorrect?h?.quizCorrect:h?.quizIncorrect:void 0,D=Co(w)?w:void 0;return(0,o.jsxs)("li",{"aria-current":d?"step":void 0,className:Le("card"),children:[(0,o.jsxs)("header",{className:Le("card-header"),children:[(0,o.jsxs)("p",{className:Le("eyebrow"),children:["Displayed question ",r+1," of ",t]}),(0,o.jsx)("h4",{children:mr({getL10nValue:l,value:N?.title})}),(0,o.jsx)("code",{children:N?.type??oe.MULTIPLE_CHOICE})]}),(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Card key",value:e.key}),(0,o.jsx)(_e,{label:"Question ID",value:String(e.questionId)}),(0,o.jsx)(_e,{label:"Progress ID",value:String(e.progressId)}),(0,o.jsx)(_e,{label:"Authored source",value:Hue(e.source)}),(0,o.jsx)(_e,{label:"Simulation state",value:Fue({isActive:d,progress:y})}),(0,o.jsx)(_e,{label:"Answer permutation",value:S1(e.answerOrder)})]}),N?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("h5",{children:"Answer display order"}),(0,o.jsx)("div",{className:Le("table-wrap"),children:(0,o.jsxs)("table",{children:[(0,o.jsx)("thead",{children:(0,o.jsxs)("tr",{children:[(0,o.jsx)("th",{scope:"col",children:"Displayed position"}),(0,o.jsx)("th",{scope:"col",children:"Original answer index"}),(0,o.jsx)("th",{scope:"col",children:"Answer text"}),N.type===oe.MATCHING?(0,o.jsx)("th",{scope:"col",children:"Match text"}):null,(0,o.jsx)("th",{scope:"col",children:"Answer ID"}),(0,o.jsx)("th",{scope:"col",children:"Scoring"}),j?(0,o.jsx)("th",{scope:"col",children:"Simulation"}):null]})}),(0,o.jsx)("tbody",{children:e.answerOrder.map((O,B)=>{const H=N.answers[O],_=mr({getL10nValue:l,value:H?.title}),$=R?y?.selectedIndex===O:M?y?.selectedIndices?.includes(O)===!0:!1;return(0,o.jsxs)("tr",{children:[(0,o.jsx)("td",{children:B+1}),(0,o.jsx)("td",{children:O}),(0,o.jsx)("td",{children:_}),N.type===oe.MATCHING?(0,o.jsx)("td",{children:mr({getL10nValue:l,value:P?.[O]?.matchTitle})}):null,(0,o.jsx)("td",{children:(0,o.jsx)("code",{children:String(H?.id??"missing")})}),(0,o.jsx)("td",{children:Oue({answerId:H?.id,question:N})}),j?(0,o.jsx)("td",{children:(0,o.jsx)("button",{"aria-label":`${R?"Select":"Toggle"} question ${r+1} answer ${B+1}: ${_}`,"aria-pressed":$,className:Le("button"),disabled:!n,onClick:()=>{const z={authoredAnswerIndex:O,cardKey:e.key};R?g(z):x(z)},ref:B===0?a:void 0,type:"button",children:R?"Select":"Toggle"})}):null]},`${e.key}:${O}`)})})]})}),A?(0,o.jsx)(Aue,{acceptedAnswers:e.questionType===oe.FILL_IN_THE_BLANK?e.scoring.acceptedAnswers:[],canChangeResponse:n,cardKey:e.key,inputRef:i,onCommit:v,onSubmit:b,progress:y,resolvedFillInAnswers:T??[],showSubmitControl:E,submitLabel:h?.quizSubmit}):null,S&&N.type===oe.MATCHING&&e.matchingOrder?(0,o.jsx)(Rue,{canChangeResponse:n,cardKey:e.key,firstSelectRef:c,getL10nValue:l,matchingOrder:e.matchingOrder,onChange:p,progress:y,question:N}):null,I&&N.type===oe.MATCHING&&e.matchingOrder?(0,o.jsx)(Pue,{getL10nValue:l,matchingOrder:e.matchingOrder,progress:y,question:N}):null,R?(0,o.jsx)("div",{className:Le("button-row"),children:(0,o.jsx)("button",{"aria-label":`Clear question ${r+1} selection`,className:Le("button"),disabled:!n,onClick:()=>g({authoredAnswerIndex:void 0,cardKey:e.key}),type:"button",children:"Clear selection"})}):null,E&&!A&&h?.quizSubmit?(0,o.jsx)("div",{className:Le("button-row"),children:(0,o.jsx)("button",{className:Le("button"),disabled:!s,onClick:()=>b({cardKey:e.key,fillInText:void 0,resolvedFillInAnswers:void 0}),type:"button",children:h.quizSubmit})}):null]}):(0,o.jsx)("p",{className:Le("warning"),children:"Question data could not be resolved."}),D?(0,o.jsx)("h5",{ref:k,tabIndex:-1,children:D}):null,L&&Co(h?.quizNext)?(0,o.jsx)("div",{className:Le("button-row"),children:(0,o.jsx)("button",{className:Le("button"),onClick:f,type:"button",children:h.quizNext})}):null,e.matchingOrder?(0,o.jsxs)("dl",{className:Le("facts"),children:[(0,o.jsx)(_e,{label:"Prompt permutation",value:S1(e.matchingOrder.prompts)}),(0,o.jsx)(_e,{label:"Match permutation",value:S1(e.matchingOrder.matches)})]}):null,(0,o.jsx)("h5",{children:"Owned progress row"}),(0,o.jsx)("pre",{className:Le("json"),children:fT(y??null)})]})}function Aue({acceptedAnswers:e,canChangeResponse:t,cardKey:n,inputRef:s,onCommit:r,onSubmit:i,progress:a,resolvedFillInAnswers:c,showSubmitControl:l,submitLabel:d}){const h=`quiz-deck-fill-in-${(0,u.useId)()}`,[m,f]=(0,u.useState)(a?.text??""),p=(0,u.useRef)(null),g=t&&l&&Co(d)&&mT({acceptedAnswers:e,resolvedFillInAnswers:c})&&!oo(m);(0,u.useEffect)(()=>{f(a?.text??"")},[a]);function v(x){if(!t||p.current&&x.relatedTarget===p.current)return;const b=oo(m)?"":m;f(b),r({cardKey:n,text:b})}return(0,o.jsxs)("form",{className:Le("response-field"),onSubmit:x=>{x.preventDefault(),g&&i({cardKey:n,fillInText:m,resolvedFillInAnswers:c})},children:[(0,o.jsx)("label",{htmlFor:h,children:"Simulated response"}),(0,o.jsx)("input",{className:Le("input"),disabled:!t,id:h,onBlur:v,onChange:x=>f(x.currentTarget.value),ref:s,type:"text",value:m}),(0,o.jsx)("p",{className:Le("help"),children:"Whitespace-only input clears the simulated response on blur."}),l&&d?(0,o.jsx)("div",{className:Le("button-row"),children:(0,o.jsx)("button",{className:Le("button"),disabled:!g,ref:p,type:"submit",children:d})}):null]})}function Co(e){return typeof e=="string"&&e.trim().length>0}function mT({acceptedAnswers:e,resolvedFillInAnswers:t}){return t.some(n=>!oo(n))&&t.every(n=>e.includes(n))}function Rue({canChangeResponse:e,cardKey:t,firstSelectRef:n,getL10nValue:s,matchingOrder:r,onChange:i,progress:a,question:c}){return(0,o.jsxs)("div",{children:[(0,o.jsx)("h5",{children:"Simulated matches"}),r.prompts.map((l,d)=>{const h=c.answers[l],m=r.answerIds[l];return!h||m==null?null:(0,o.jsx)(Mue,{canChangeResponse:e,cardKey:t,getL10nValue:s,inputRef:d===0?n:void 0,matchingOrder:r,onChange:i,progress:a,prompt:h,promptAnswerId:m,promptDisplayIndex:d,question:c},String(m))}),(0,o.jsx)("p",{className:Le("help"),children:"Choosing a match reassigns it from any other prompt. Choose Unmatched to clear a pair."})]})}function Pue({getL10nValue:e,matchingOrder:t,progress:n,question:s}){const r=new Map(s.answers.map(i=>[String(i.id),i]));return(0,o.jsxs)("div",{children:[(0,o.jsx)("h5",{children:"Submitted matches"}),(0,o.jsx)("dl",{className:Le("facts"),children:t.prompts.map((i,a)=>{const c=s.answers[i],l=t.answerIds[i];if(!c||l==null)return null;const d=n?.matches?.[l],h=d==null?void 0:r.get(String(d));return(0,o.jsx)(_e,{label:`Match prompt ${a+1}: ${mr({getL10nValue:e,value:c.title})}`,value:h?mr({getL10nValue:e,value:h.matchTitle}):"Unmatched"},String(l))})})]})}function Mue({canChangeResponse:e,cardKey:t,getL10nValue:n,inputRef:s,matchingOrder:r,onChange:i,progress:a,prompt:c,promptAnswerId:l,promptDisplayIndex:d,question:h}){const m=`quiz-deck-matching-${(0,u.useId)()}`,f=a?.matches?.[l],p=f==null?-1:r.answerIds.findIndex(x=>String(x)===String(f)),g=r.matches.includes(p)?String(p):"",v=mr({getL10nValue:n,value:c.title});return(0,o.jsxs)("div",{className:Le("response-field"),children:[(0,o.jsxs)("label",{htmlFor:m,children:["Match prompt ",d+1,": ",v]}),(0,o.jsxs)("select",{className:Le("input"),disabled:!e,id:m,onChange:x=>{const b=Number(x.currentTarget.value),y=x.currentTarget.value===""?void 0:r.answerIds[b];x.currentTarget.value!==""&&y==null||i({cardKey:t,matchAnswerId:y,promptAnswerId:l})},ref:s,value:g,children:[(0,o.jsx)("option",{value:"",children:"Unmatched"}),r.matches.map((x,b)=>{const y=h.answers[x];return y?(0,o.jsxs)("option",{value:x,children:[b+1,"."," ",mr({getL10nValue:n,value:y.matchTitle})]},String(r.answerIds[x])):null})]})]})}function _e({label:e,value:t}){return(0,o.jsxs)("div",{className:Le("fact"),children:[(0,o.jsx)("dt",{children:e}),(0,o.jsx)("dd",{children:t})]})}function O0({label:e,value:t}){return(0,o.jsxs)("details",{className:Le("details"),children:[(0,o.jsx)("summary",{children:e}),(0,o.jsx)("pre",{className:Le("json"),children:fT(t??null)})]})}function Oue({answerId:e,question:t}){if(e==null)return"missing";switch(t.type){case oe.FILL_IN_THE_BLANK:return"accepted response";case oe.MATCHING:return"paired response";case oe.MULTIPLE_RESPONSE:return t.corrects?.includes(e)?"correct":"incorrect";case oe.MULTIPLE_CHOICE:case void 0:return t.correct===e?"correct":"incorrect"}}function ci(e){return e==null?"not set":e?"yes":"no"}function Bue(e){return e==null||Number(e)===-1?"unlimited":String(e)}function Due(e){return e==null?"not set":`${e} ${String(e)==="1"?"minute":"minutes"}`}function fT(e){return JSON.stringify(e,null,2)}function mr({getL10nValue:e,value:t}){return t==null?"(missing)":String(wn(String(e(t)??""))).trim()||"(empty)"}function S1(e){return`[${e.join(", ")}]`}function Fue({isActive:e,progress:t}){return e?t?.isComplete===!0?"Active feedback":"Active":t?.isComplete===!0?"Completed":"Upcoming"}function _ue({activeIndex:e=0,cardCount:t}){return e<0?`Invalid (activeIndex ${e})`:e===0?`Start (activeIndex ${e})`:e>=Xs(t)?`Results (activeIndex ${e})`:`Question ${e} of ${t} (activeIndex ${e})`}function Hue(e){return e.kind==="lesson"?`lesson item ${e.lessonItemIndex}`:`question bank item ${e.lessonItemIndex}, question ${e.bankQuestionIndex}`}function pT({lesson:e,source:t}){const n=e?.items[t.lessonItemIndex];return t.kind==="lesson"?n?.type===oe.DRAW_FROM_QUESTION_BANK?void 0:n:n?.type===oe.DRAW_FROM_QUESTION_BANK?n.questions[t.bankQuestionIndex]:void 0}function Vue({card:e,getL10nValue:t,lesson:n}){if(e.questionType!==oe.FILL_IN_THE_BLANK)return;const s=pT({lesson:n,source:e.source});return s?.type!==oe.FILL_IN_THE_BLANK?[]:s.answers.flatMap(r=>{const i=t(r.title);return typeof i=="string"&&!oo(i)?[i]:[]})}function zue(e){try{return JSON.parse(e)}catch{return e}}const $ue=e=>e===nw.CONTINUE,Uue=({canShowContinue:e,isExport:t,isRiseCom:n,nextLesson:s})=>e&&n&&!s&&!t,Gue=e=>We(e)&&"id"in e&&"type"in e,Wue=(e,t)=>t.startsWith(`${e}-`)?t.slice(e.length+1):void 0,Kue=(e,t)=>{const n=Wue(String(e.id),t);return n==null?void 0:e.questions.find(s=>String(s.id)===n)},Que=(e,t)=>!e||!t||e.length!==t.length?!1:e.some((n,s)=>t[n]?.id!==t[s]?.id),Zue=(e,t,n)=>{if(!Array.isArray(e)||!Array.isArray(t)||!n)return!1;const s=e.map(a=>t[a]),r=t.findIndex(a=>a.id===n),i=s.findIndex(a=>a.id===n);return r===i},Yue=({lesson:e,question:t})=>{const n=String(t.id);for(const s of e?.items??[])if(Gue(s)){if(s.type===oe.DRAW_FROM_QUESTION_BANK){const r=Kue(s,n);if(r)return r}else if(String(s.id)===n)return s}};function que({settings:e}){const t=it();return(0,u.useMemo)(()=>({onChoiceSelect:n=>{t(A2(n))},onFillInChange:n=>{t(R2(n))},onMatchSet:n=>{t(M2(n))},onResponseToggle:n=>{t(P2(n))},onSetIndex:n=>{t(rm(n))},onSubmit:n=>{const{skipLessonsIfPassed:s,skipToLessonId:r}=e||{};return t(im({...n,passToContinue:n.passToContinue??!1,skipLessonsIfPassed:s??void 0,skipToLessonId:r??void 0}))}}),[t,e])}const gT=-1;function B0({allowedRetries:e,currentRetries:t}){const n=parseInt(String(e??gT),10),s=parseInt(String(t??0),10);return n===gT?!1:s>=n}function Xue(e,t){const n=Gt(e),s=_l(n)?n.settings:void 0,r=e?kC({id:e,passingScore:t?.passingScore??80}):void 0;return(0,u.useMemo)(()=>s&&{...s,passingScore:r??s?.passingScore??80},[s,r])}const D0=typeof matchMedia<"u"?matchMedia("(prefers-reduced-motion: reduce)"):void 0;function vT(){const[e,t]=(0,u.useState)(D0?.matches??!1);return(0,u.useEffect)(()=>{if(!D0)return;const n=s=>t(s.matches);return D0.addEventListener("change",n),()=>D0.removeEventListener("change",n)},[]),e}function Jue({lessonId:e}){const t=it(),n=Gt(e),s=_l(n)?n:void 0,r=hd(e),i=(0,u.useMemo)(()=>s?.items??[],[s?.items]),a=Xue(e,r),[{resolvedItems:c,drawPayload:l,recoveredFrom:d}]=(0,u.useState)(()=>yx({lessonId:e,progress:r,settings:a,sourceItems:i}));(0,u.useLayoutEffect)(()=>{d!==void 0&&(Sh.RESUME_RECOVERY,l.lessonProgress.activeIndex,Object.keys(l.lessonProgress.items).length,c.length,void 0);const f=EN()?{finalize:!0,passToContinue:a?.passToContinue??!1,finalRetryAttempt:B0({allowedRetries:a?.retryCount,currentRetries:r?.retryAttempts})}:{finalize:!1};t(sj({...l,lessonId:e,...f}))},[]);const h=r?.activeIndex??0,m=vT();return e0e({activeIndex:h,isReduceMotion:m,progress:r,resolvedItems:c,settings:a,sourceItems:i}),{activeIndex:h,progress:r,resolvedItems:c,retryAttempts:r?.retryAttempts??0,settings:a,sourceItems:i}}function e0e({activeIndex:e,isReduceMotion:t,progress:n,resolvedItems:s,settings:r,sourceItems:i}){const a=(0,u.useRef)(e);(0,u.useEffect)(()=>{},[e])}const t0e=e=>e.length===3,n0e=e=>{const t=e.findIndex(n=>n==="answers");return t===-1?null:e[t+1]?.id},s0e=e=>{const t=e.findIndex(n=>n==="questions");return t===-1?null:e[t+1]?.id},o0e=e=>{const t=e.at(-1);return typeof t=="string"&&t.startsWith("feedback")},r0e=({items:e,itemId:t,questionBankQuestionId:n})=>{const s=e.find(({id:r})=>r===t);return s?"questions"in s?n?s.questions.find(({id:r})=>r===n):null:s:null},i0e=(e,t,n)=>{const s=n==="feedbackCorrect";return e?[e]:n==="feedback"?t.answers.slice(0,1):n==="feedbackIncorrect"&&t.type==="FILL_IN_THE_BLANK"?[{title:""}]:t.answers.filter(r=>"correct"in r?r.correct===s:"corrects"in t?t.corrects.includes(r.id)===s:t.answers)},a0e=({lessonId:e,items:t})=>{const n=it(),s=(0,u.useCallback)(({lessonId:i,progressId:a,question:c,answer:l},d=!0)=>{switch(c.type){case"MULTIPLE_CHOICE":n(A2({lessonId:i,itemId:a,selectedIndex:c.answers.indexOf(l)}));break;case"MULTIPLE_RESPONSE":n(P2({lessonId:i,itemId:a,selectedIndex:c.answers.indexOf(l)}));break;case"FILL_IN_THE_BLANK":n(R2({lessonId:i,itemId:a,text:typeof l.title=="string"?l.title:""}));break;case"MATCHING":n(M2({lessonId:i,itemId:a,matches:d?Object.fromEntries(c.answers.map(h=>[h.id,h.id])):{}}));break}},[n]),r=(0,u.useCallback)(({detail:i})=>{const{lessonId:a,path:c}=i,l=String(i.itemId);if(a!==e)return;if(t0e(c)){n(j2(e));return}const d=s0e(c),h=r0e({items:t,itemId:l,questionBankQuestionId:d});if(!h)return;const m=d?`${l}-${d}`:l;if(n(rm({lessonId:e,progressId:m,finalize:!1})),o0e(c)){const f=n0e(c),p=f?h.answers.find(({id:b})=>b===f)??null:null,g=c.at(-1),v=g==="feedbackCorrect",x=i0e(p,h,g);h.type==="MULTIPLE_RESPONSE"&&n(nj({lessonId:e,itemId:m})),x.forEach(b=>{s({lessonId:e,question:h,progressId:m,answer:b},v)}),n(im({finalRetryAttempt:!1,lessonId:e,isCorrect:v,itemId:m,passToContinue:!0}))}},[n,e,t,s]);(0,u.useEffect)(()=>(window.addEventListener(Je,r),()=>{window.removeEventListener(Je,r)}),[r])},c0e=V("quiz-item");function l0e({activeIndex:e,children:t,index:n,isActive:s,isComplete:r,isCorrect:i,isTimedQuiz:a,settings:c}){const l=c?.correctAnswerColor??void 0,d=c?.incorrectAnswerColor??void 0,f={"--color-feedback-icon":i?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,o.jsx)("div",{className:Tl({activeIndex:e,index:n}),"data-testid":"quiz-item-card",inert:s?void 0:!0,children:(0,o.jsx)("div",{className:c0e("content"),children:(0,o.jsx)(kI,{isActive:s,isComplete:r,isTimedQuiz:!!a,style:f,children:(0,o.jsx)("div",{hidden:!s&&!r,children:t})})})})}const d0e=V("quiz-card");function u0e({blockId:e,enableVideoPlaybackSpeed:t,index:n,isActive:s,item:r,labels:i,media:a}){const c=ct();if(!a)return null;const l=c(a),{audio:d,image:h,video:m,embed:f}=l??{},p={allowTabNavigation:s,blockId:e,enableVideoPlaybackSpeed:t,item:r,labels:i};return d&&h?(0,o.jsx)("div",{className:`${d0e("media",{"image-with-audio":!0})}`,children:(0,o.jsx)(or,{...p,index:String(n),isOverlayAudio:!0,media:a})}):d&&(m||f)?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(or,{...p,index:`${n}-audio`,media:{audio:d}}),(0,o.jsx)(or,{...p,index:String(n),media:m?{video:m}:{embed:f},shouldPause:!s})]}):(0,o.jsx)(or,{...p,index:String(n),media:a,shouldPause:!s})}function CT(e,t){if(e===void 0||!t)return;if(Array.isArray(e))return e.map(s=>t.indexOf(s)).filter(s=>s!==-1);const n=t.indexOf(e);return n===-1?void 0:n}const{FILL_IN_THE_BLANK:h0e,MATCHING:m0e,MULTIPLE_CHOICE:f0e,MULTIPLE_RESPONSE:p0e}=oe;function g0e({color:e,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,errorMessageId:r,incorrectAnswerColor:i,incorrectAnswerColorContrast:a,isActive:c,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,isShuffled:f,item:p,itemProgress:g,labels:v,onChoiceSelect:x,onFillInChange:b,onMatchSet:y,onResponseToggle:T,onSubmit:S,prefersKeyboardNavigation:I,questionHtmlId:L,quizAcceptableResponses:E,quizAnswerPlaceholder:k,revealAnswers:N}){const{answers:R,type:M}=p,A=c&&!l,j=R??[],P=("correct"in p?p.correct:void 0)??"",w=("corrects"in p?p.corrects:void 0)??[],D=g?.text??"",O=g?.matches??{},B=(0,u.useCallback)(({title:_})=>(0,o.jsx)(Re,{allowTabNavigation:c,className:"quiz-multiple-choice-option__label",value:_}),[c]),H=(0,u.useCallback)(({title:_})=>(0,o.jsx)(Re,{allowTabNavigation:c,tagName:"span",value:_}),[c]);switch(M){case h0e:return(0,o.jsx)(MI,{allowTabNavigation:c,correctAnswerColor:n,correctAnswerColorContrast:s,errorMessageId:r,incorrectAnswerColor:i,incorrectAnswerColorContrast:a,isComplete:l,isCorrect:d,labels:v,onChange:b,onEnterToSubmit:S,options:j,questionHtmlId:L,quizAcceptableResponses:E,quizAnswerPlaceholder:k,revealAnswers:N,value:D});case m0e:return(0,o.jsx)(_I,{answers:j,columnBehavior:t,correctAnswerColor:n,correctAnswerColorContrast:s,incorrectAnswerColor:i,incorrectAnswerColorContrast:a,isActive:c,isComplete:l,matches:O,onChange:y,prefersKeyboardNavigation:I,revealAnswers:N});case p0e:{const _=g?.selectedIndices,$=g?.shuffledAnswerIndices??[],z=f?CT(_,$):_;return(0,o.jsx)(zI,{allowTabNavigation:c,correctIds:w,errorMessageId:r,isComplete:l,isCorrect:d,isRetaking:m,labels:v,onChange:T,onEnterToSubmit:S,options:j,questionHtmlId:L,renderOptionText:H,revealAnswers:N,selectedIndices:z??[]})}case f0e:default:{const _=g?.selectedIndex,$=g?.shuffledAnswerIndices??[],z=f?CT(_,$):_;return(0,o.jsx)(VI,{allowTabNavigation:A,color:e,correctId:P,errorMessageId:r,isComplete:l,isCorrect:d,isReduceMotion:h,isRetaking:m,labels:v,onChange:x,onEnterToSubmit:S,options:j,questionHtmlId:L,renderOptionText:B,revealAnswers:N,selectedIndex:z??-1})}}}const li=V("quiz-card");function v0e({color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:s,interaction:r,isQuestionBankQuiz:i,isReduceMotion:a,isShuffled:c,item:l,items:d,labels:h,lessonId:m,onTakeAgain:f,prefersKeyboardNavigation:p,progress:g,settings:v,showNextButton:x}){const{canProceed:b,canSubmit:y,errorIncomplete:T,feedbackRef:S,errorMessageId:I,feedbackValue:L,handleChoiceSelect:E,handleFillInChange:k,handleMatchSet:N,handleNextFeedbackClick:R,handleResponseToggle:M,handleSubmit:A,handleTakeAgain:j,isActive:P,isComplete:w,isCorrect:D,isRetaking:O,itemProgress:B,quizItemHtmlId:H,selection:_,wrapperRef:$}=r,z=n?s+1:s,K=v?.revealAnswers===!0?Ee.ALL:v?.revealAnswers??Ee.NONE,J=`q-${l.id}`,Y=l.settings,G=v?.correctAnswerColor??void 0,F=v?.correctAnswerColorContrast??void 0,U=v?.incorrectAnswerColor??void 0,Q=v?.incorrectAnswerColorContrast??void 0,Z=h?.quizQuestion??"",q=h?.quizAcceptableResponses??"",te=h?.quizAnswerPlaceholder??"",ne=h?.quizCorrect??"",ae=h?.quizIncorrect??"",ue=h?.quizSubmit??"",Te=g?.percentComplete===100&&i?h?.quizRestart??"":h?.quizNext??"";return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Loe,{isActive:P,labels:h,questionLabel:Z,questionNumber:s+1,totalQuestions:d.length}),(0,o.jsx)(Jn,{anchor:fQ(m,l.id),label:"Comments on quiz question",children:(0,o.jsx)(koe,{allowTabNavigation:P,htmlId:J,value:l.title})}),(0,o.jsx)(u0e,{blockId:l.id,enableVideoPlaybackSpeed:t,index:z,isActive:P,item:l,labels:h,media:l.media}),(0,o.jsx)(AI,{type:l.type,children:(0,o.jsx)("div",{ref:$,children:(0,o.jsx)(g0e,{canSubmit:y,color:e,columnBehavior:Y?.columnBehavior,correctAnswerColor:G,correctAnswerColorContrast:F,errorMessageId:I,incorrectAnswerColor:U,incorrectAnswerColorContrast:Q,isActive:P,isComplete:w,isCorrect:D,isReduceMotion:a,isRetaking:O,isShuffled:c,item:l,itemProgress:B,labels:h,onChoiceSelect:E,onFillInChange:k,onMatchSet:N,onResponseToggle:M,onSubmit:A,prefersKeyboardNavigation:p,questionHtmlId:J,quizAcceptableResponses:q,quizAnswerPlaceholder:te,revealAnswers:K})})}),(0,o.jsx)("div",{"aria-live":"assertive",children:T&&(0,o.jsxs)("div",{className:`${li("validations")}`,"data-testid":"quiz-validation-error",children:[(0,o.jsx)(ce,{className:`${li("validation-icon")}`,"data-testid":"quiz-validation-icon",name:"alert-circle"}),(0,o.jsx)("span",{id:`${H}-error-incomplete-message`,children:h?.quizRequireAnswer})]})}),(0,o.jsx)(jI,{canProceed:b,feedbackRef:S,feedbackValue:L,isActive:P,isComplete:w,isCorrect:D,item:l,labels:h,quizCorrect:ne,quizIncorrect:ae,revealAnswers:K,selection:_}),(0,o.jsx)(EI,{allowNext:!f,canProceed:b,canSubmit:y,isReduceMotion:a,onNext:x?R:void 0,onSubmit:A,quizNext:Te,quizSubmit:ue}),f&&(0,o.jsx)("div",{className:`${li("retake-container",{active:w})}`,children:(0,o.jsx)("button",{className:`${li("retake",{active:w})}`,onClick:j,type:"button",children:(0,o.jsxs)("div",{className:`${li("retake-content")}`,children:[(0,o.jsx)("div",{className:`${li("retake-text")}`,children:"TAKE AGAIN"}),(0,o.jsx)("i",{className:`${li("retake-icon")} icon icon-reload`})]})})})]})}const{FILL_IN_THE_BLANK:xT,MATCHING:bT,MULTIPLE_CHOICE:yT,MULTIPLE_RESPONSE:ST}=oe;function C0e(e,t){return e?.items?.[t]??{}}function x0e(e,t,n,s,r){switch(e.type){case xT:return WI({answers:e.answers??[],text:t.text,caseSensitive:e.settings?.isCaseSensitive??!1,getL10nValue:r});case bT:return KI(t.matches??{});case ST:return YI({isShuffled:n,item:e,selectedIndices:t.selectedIndices,shuffledAnswerIndices:t.shuffledAnswerIndices});case yT:default:return QI({isCorrectAnswerUnshuffled:s,isShuffled:n,item:e,selectedIndex:t.selectedIndex,shuffledAnswerIndices:t.shuffledAnswerIndices})}}function b0e(e,t){switch(e.type){case xT:return t.text;case bT:return t.matches;case ST:return t.selectedIndices;case yT:default:return t.selectedIndex}}const{FILL_IN_THE_BLANK:y0e,MATCHING:S0e,MULTIPLE_CHOICE:I0e,MULTIPLE_RESPONSE:T0e}=oe;function L0e({hasStart:e=!1,id:t,index:n,isCorrectAnswerUnshuffled:s=!1,isShuffled:r=!1,item:i,onChoiceSelect:a,onFillInChange:c,onMatchSet:l,onResponseToggle:d,onTakeAgain:h,progress:m,reportAnswer:f,retryAttempts:p=0,setNextIndex:g,settings:v,submitAction:x,title:b}){const y=ct(),T=Rb(),[S,I]=(0,u.useState)(!1),[L,E]=(0,u.useState)(Date.now),[k,N]=(0,u.useState)(!1),R=(0,u.useRef)(null),M=(0,u.useRef)(null),A=(0,u.useId)(),j=(0,u.useRef)({canSubmit:!1,isCorrect:!1,item:i,itemId:String(i.id),itemProgress:{},retryAttempts:p,revealAnswers:Ee.NONE,settings:v,startTime:L,title:b}),P=e?n+1:n,w=m?.activeIndex??0,D=P===w,O=C0e(m,i.id),B=O?.isComplete??!1,H=x0e(i,O,r,s,y),_=v?.revealAnswers===!0?Ee.ALL:v?.revealAnswers??Ee.NONE,$=_===Ee.ALL||_===Ee.INCORRECT,z=D&&B&&$,K=D&&!B&&UI({answersLength:i.answers?.length??0,matches:O?.matches,selectedIndex:O?.selectedIndex,selectedIndices:O?.selectedIndices,text:O?.text,type:i.type});j.current={canSubmit:K,isCorrect:H,item:i,itemId:String(i.id),itemProgress:O,retryAttempts:p,revealAnswers:_,settings:v,startTime:L,title:b};const J=O?.selectedIndex,Y=qI({answers:i.answers,feedback:"feedback"in i?i.feedback:void 0,feedbackCorrect:"feedbackCorrect"in i?i.feedbackCorrect:void 0,feedbackIncorrect:"feedbackIncorrect"in i?i.feedbackIncorrect:void 0,feedbackType:"feedbackType"in i?i.feedbackType:void 0,isCorrect:H,isShuffled:r,selectedIndex:J,shuffledAnswerIndices:i.shuffledAnswerIndices}),G=b0e(i,O),F=S?`${A}-error-incomplete-message`:void 0,U=(0,u.useCallback)(()=>{I(!1)},[]),Q=String(i.id),Z=(0,u.useCallback)(({selectedIndex:be})=>{U(),a?.({lessonId:t,itemId:Q,selectedIndex:be,shuffledAnswerIndices:i.shuffledAnswerIndices})},[t,Q,i.shuffledAnswerIndices,a,U]),q=(0,u.useCallback)(be=>{U(),c?.({lessonId:t,itemId:Q,text:be})},[t,Q,c,U]),te=(0,u.useCallback)(be=>{U(),l?.({lessonId:t,itemId:Q,matches:be})},[t,Q,l,U]),ne=(0,u.useCallback)(({optionIndex:be})=>{U(),d?.({lessonId:t,itemId:Q,selectedIndex:be,shuffledAnswerIndices:i.shuffledAnswerIndices})},[t,Q,i.shuffledAnswerIndices,d,U]),ae=v?.passToContinue??!1,ue=B0({allowedRetries:v?.retryCount,currentRetries:p}),Te=(0,u.useCallback)((be=()=>{},de)=>{de&&be(de),g?.({fromIndex:w,lessonId:t,finalize:!0,passToContinue:ae,finalRetryAttempt:ue})},[w,ue,ae,t,g]),we=(0,u.useCallback)((be,de)=>{Se.pause(),Te(be??(()=>{}),de)},[Te]),W=(0,u.useCallback)(()=>{D&&we()},[D,we]),ie=(0,u.useCallback)(be=>{be.preventDefault();const{canSubmit:de,isCorrect:Qe,item:zt,itemId:on,itemProgress:Ze,retryAttempts:rn,revealAnswers:rt,settings:tt,startTime:wt,title:He}=j.current;if(!de){switch(I(!0),zt.type){case y0e:case T0e:case I0e:M.current?.querySelector("input")?.focus();break;case S0e:M.current?.querySelector("button")?.focus();break;default:break}return}j.current.canSubmit=!1;const Pe={startTime:wt,stopTime:Date.now()},{passToContinue:Me}=tt??{},jt=B0({allowedRetries:tt?.retryCount,currentRetries:rn}),as=T({duration:Pe,id:t,isCorrect:Qe,item:zt,itemProgress:Ze,retryAttempts:rn,title:He});f?.(as);const Ks={finalRetryAttempt:jt,lessonId:t,isCorrect:Qe,itemId:on,passToContinue:Me,revealAnswers:rt};if(rt===Ee.ALL||rt===Ee.INCORRECT){x?.(Ks);return}we(x,Ks)},[T,we,t,f,x]),ge=(0,u.useCallback)(()=>{N(!0),setTimeout(()=>{h?.(),N(!1)},50)},[h]),he=(0,ze.A)(D)??!1,Ne=(0,ze.A)(B)??!1;return(0,u.useEffect)(()=>{!he&&D&&E(Date.now())},[D,he]),{activeIndex:w,canProceed:z,canSubmit:K,feedbackRef:R,errorIncomplete:S,errorMessageId:F,feedbackValue:Y,handleChoiceSelect:Z,handleFillInChange:q,handleMatchSet:te,handleNextFeedbackClick:W,handleResponseToggle:ne,handleSubmit:ie,handleTakeAgain:ge,isActive:D,isComplete:B,isCorrect:H,isRetaking:k,itemProgress:O,prevIsActive:he,prevIsComplete:Ne,quizItemHtmlId:A,selection:G,wrapperRef:M}}const E0e=3;function k0e({feedbackRef:e,isActive:t,isComplete:n,isReduceMotion:s,prevIsActive:r,prevIsComplete:i,quizTop:a,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=a??E0e,m=s?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:h,behavior:m})}},[t,r,s,a,l]),(0,u.useEffect)(()=>{if(!(!t||c===Ee.NONE||s))return!i&&n&&(clearTimeout(d.current),d.current=setTimeout(()=>{const h=e.current;if(!h)return;const m=h.offsetHeight+h.offsetTop,f=s?"instant":"smooth";document.getElementById(l??"page-wrap")?.scrollTo({top:m,behavior:f})},750)),()=>{clearTimeout(d.current)}},[e,t,n,s,i,c,l])}const N0e=V("quiz-item");function w0e({color:e,enableVideoPlaybackSpeed:t,hasStart:n=!1,id:s,index:r,isCard:i=!1,isCorrectAnswerUnshuffled:a,isQuestionBankQuiz:c=!1,isShuffled:l=!1,isTimedQuiz:d,item:h,items:m,labels:f={},onChoiceSelect:p,onFillInChange:g,onMatchSet:v,onResponseToggle:x,onTakeAgain:b,prefersKeyboardNavigation:y,progress:T,quizTop:S,reportAnswer:I,retryAttempts:L=0,scrollId:E,setNextIndex:k,settings:N={revealAnswers:Ee.ALL},showNextButton:R=!0,submitAction:M,title:A}){const j=vT(),P=L0e({hasStart:n,id:s,index:r,isCorrectAnswerUnshuffled:a,isShuffled:l,item:h,onChoiceSelect:p,onFillInChange:g,onMatchSet:v,onResponseToggle:x,onTakeAgain:b,progress:T,reportAnswer:I,retryAttempts:L,setNextIndex:k,settings:N,submitAction:M,title:A}),{activeIndex:w,feedbackRef:D,isActive:O,isComplete:B,isCorrect:H,prevIsActive:_,prevIsComplete:$}=P,z=N?.revealAnswers===!0?Ee.ALL:N?.revealAnswers??Ee.NONE;k0e({feedbackRef:D,isActive:O,isComplete:B,isReduceMotion:j,prevIsComplete:$,prevIsActive:_,quizTop:S,revealAnswers:z,scrollId:E});const K=(0,o.jsx)(v0e,{color:e,enableVideoPlaybackSpeed:t,hasStart:n,index:r,interaction:P,isQuestionBankQuiz:c,isReduceMotion:j,isShuffled:l,item:h,items:m,labels:f,lessonId:s,onTakeAgain:b,prefersKeyboardNavigation:y,progress:T,settings:N,showNextButton:R});return i?(0,o.jsx)(l0e,{activeIndex:w,index:n?r+1:r,isActive:O,isComplete:B,isCorrect:H,isTimedQuiz:d,settings:N,children:K}):(0,o.jsx)("div",{className:N0e("wrap"),children:K})}const ft=V("odometer"),IT=300,TT=700,j0e=300,A0e=500,F0=200,R0e=170,LT=145,os=F0/2,rs=R0e/2,il=70,ET=1.5,P0e=2.5,M0e=225,O0e=135,kT=270,I1=7,ga={start:{dx:-19,dy:8},mid:{dx:-5,dy:22},end:{dx:26,dy:-7}},fr={size:12,topOffset:-3,bottomOffset:21};function B0e(e){return e<.5?16*e**5:1+16*(e-1)**5}function D0e(e){return e<.5?2*e**2:1-(-2*e+2)**2/2}function _0({angle:e,centerX:t,centerY:n,radius:s}){const r=(e-90)*Math.PI/180;return{x:t+s*Math.cos(r),y:n+s*Math.sin(r)}}function T1({centerX:e,centerY:t,counterClockwise:n=!1,endAngle:s,radius:r,startAngle:i}){const a=_0({angle:i,centerX:e,centerY:t,radius:r}),c=_0({centerX:e,centerY:t,radius:r,angle:s}),d=Math.abs(s-i)>180?"1":"0",h=n?"0":"1";return`M ${a.x} ${a.y} A ${r} ${r} 0 ${d} ${h} ${c.x} ${c.y}`}function NT(e,t,n){return t+n*kT*e/100}function F0e({hasPassed:e,isResultsVisible:t,isRTL:n,onAnimationDone:s,passingLabel:r,passingScore:i,score:a=0,scoreLabel:c,shouldAnimate:l}){const[d,h]=(0,u.useState)(0),[m,f]=(0,u.useState)(0),[p,g]=(0,u.useState)(!1),x=`hatch-pattern${(0,u.useId)()}`,b=(0,u.useRef)(null),y=(0,u.useRef)(!1),T=(0,u.useRef)([]),S=(0,u.useCallback)(()=>{T.current.forEach(clearTimeout),T.current=[]},[]),I=(0,u.useCallback)(()=>{b.current!==null&&(cancelAnimationFrame(b.current),b.current=null),S()},[S]);(0,u.useEffect)(()=>{t||(I(),y.current=!1,h(0),f(0),g(!1))},[t,I]),(0,u.useEffect)(()=>{if(!t||!l||y.current)return;y.current=!0;const K=a,J=setTimeout(()=>{let Y=null;const G=F=>{Y===null&&(Y=F);const U=F-Y,Q=Math.min(U/TT,1),Z=B0e(Q),q=D0e(Q);if(f(Z),h(Math.round(q*K)),Q<1)b.current=requestAnimationFrame(G);else{f(1),h(K);const te=setTimeout(()=>{g(!0);const ne=setTimeout(()=>{s?.()},A0e);T.current.push(ne)},j0e-IT-TT);T.current.push(te)}};b.current=requestAnimationFrame(G)},IT);T.current.push(J)},[t,l,a,s]),(0,u.useEffect)(()=>()=>{I()},[I]);const L=n?O0e:M0e,E=n?-1:1,k=NT(i,L,E),N=NT(m*a,L,E),R=L+E*kT,M=_0({centerX:os,centerY:rs,radius:il,angle:N}),A=_0({centerX:os,centerY:rs,radius:il,angle:k}),j=m*a>=i,P=n?`%${i}`:`${i}%`,w=n?`%${d}`:`${d}%`,D=`${c} ${n?`%${a}`:`${a}%`}`,O=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:ft("pass-mark-label"),children:r}),(0,o.jsx)("div",{className:ft("pass-mark-percent"),children:P})]}),B=T1({centerX:os,centerY:rs,counterClockwise:n,radius:il,startAngle:L,endAngle:R}),H=T1({centerX:os,centerY:rs,counterClockwise:n,radius:il+3,startAngle:k,endAngle:R}),_=m>0?T1({centerX:os,centerY:rs,counterClockwise:n,radius:il,startAngle:L,endAngle:N}):"",$={x:A.x+(n?-13:13),y:A.y-13},z={x:$.x+(n?-13:13),y:$.y};return(0,o.jsxs)("div",{className:ft(),children:[(0,o.jsxs)("svg",{"aria-hidden":"true",className:ft("svg"),viewBox:`0 0 ${F0} ${LT}`,children:[(0,o.jsx)("defs",{children:(0,o.jsx)("pattern",{height:"1.5",id:x,patternTransform:"rotate(45)",patternUnits:"userSpaceOnUse",width:"1.5",children:(0,o.jsx)("line",{className:ft("hatch-line"),x1:"0",x2:"0",y1:"0",y2:"1.5"})})}),(0,o.jsx)("path",{className:ft("passing-zone"),d:H,fill:"none",stroke:`url(#${x})`,strokeWidth:"6"}),(0,o.jsxs)("g",{className:ft("pass-mark-lines"),children:[(0,o.jsx)("line",{className:ft("pass-mark-line"),x1:A.x,x2:$.x,y1:A.y,y2:$.y}),(0,o.jsx)("line",{className:ft("pass-mark-line"),x1:$.x,x2:z.x,y1:$.y,y2:z.y})]}),(0,o.jsx)("path",{className:ft("track"),d:B,fill:"none",strokeWidth:ET}),_&&(0,o.jsx)("path",{className:ft("progress",{passing:j}),d:_,fill:"none",strokeWidth:ET}),m>0&&(0,o.jsx)("circle",{className:ft("dot",{passing:j}),cx:M.x,cy:M.y,r:P0e}),p&&(0,o.jsx)("g",{className:ft("result-icon"),children:e?(0,o.jsx)("path",{className:ft("checkmark"),d:`M ${os+ga.start.dx} ${rs+ga.start.dy} L ${os+ga.mid.dx} ${rs+ga.mid.dy} L ${os+ga.end.dx} ${rs+ga.end.dy}`,fill:"none",strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:I1}):(0,o.jsxs)("g",{className:ft("x-mark"),children:[(0,o.jsx)("path",{className:ft("x-line",{first:!0}),d:`M ${os-fr.size} ${rs+fr.topOffset} L ${os+fr.size} ${rs+fr.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:I1}),(0,o.jsx)("path",{className:ft("x-line",{second:!0}),d:`M ${os+fr.size} ${rs+fr.topOffset} L ${os-fr.size} ${rs+fr.bottomOffset}`,fill:"none",strokeLinecap:"square",strokeWidth:I1})]})})]}),(0,o.jsxs)("div",{className:ft("score",{pass:p&&e,fail:p&&!e}),children:[(0,o.jsx)("div",{className:ft("score-label"),children:c}),(0,o.jsx)("div",{className:ft("pass-label"),children:D}),(0,o.jsx)("div",{className:ft("fail-label"),children:D}),(0,o.jsx)("div",{className:ft("score-percent",{hidden:p}),children:w})]}),(0,o.jsx)("div",{className:ft("pass-mark"),style:{"--pass-mark-x":`${(n?F0-z.x:z.x)/F0*100}%`,"--pass-mark-y":`${(z.y+3)/LT*100}%`},children:O}),(0,o.jsx)("div",{className:ft("pass-mark-mobile"),children:O})]})}const wT=(0,u.createContext)({handleExpiredQuiz:mn,hideTimer:mn,quizTime:0,resetQuizTimer:mn,timerDuration:0,timerHidden:!1,timerRunning:!1});function _0e({children:e,handleExpiredQuiz:t=()=>{},isTimedQuiz:n,courseProgress:s,setQuizLessonTimeRemaining:r=()=>{},timerDuration:i=10}){const a=(0,u.useRef)(void 0),[c,l]=(0,u.useState)(),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),[p,g]=(0,u.useState)(),v=(0,u.useMemo)(()=>Number(i),[i]),{activeIndex:x,endIndex:b,lessonId:y,lessonProgress:T,startIndex:S}=(0,u.useMemo)(()=>{const D=s?.currentLesson,O=s?.lessons?.[D],B=O?.activeIndex||0,H=Object.keys(O?.items||{}).length+1;return{activeIndex:B,lessonId:D,endIndex:H,lessonProgress:O,startIndex:0}},[s]),I=(0,ze.A)(y),L=(0,ze.A)(x),E=(0,u.useCallback)(()=>{l(v*60)},[v]),k=(0,u.useCallback)(()=>{l(D=>D-1)},[l]),N=(0,u.useCallback)(()=>{h(!0),a.current||(a.current=setInterval(k,1e3))},[k,h]),R=(0,u.useCallback)(D=>{f(D!==void 0?D:!m)},[m]),M=(0,u.useCallback)(()=>{h(!1),a.current&&(a.current=clearInterval(a.current))},[h]),A=(0,u.useCallback)(()=>{c&&p!==void 0&&r({lessonId:p,timeRemaining:c})},[p,c,r]),j=(0,u.useCallback)(()=>{A(),l(void 0)},[l,A]),P=(0,u.useCallback)(()=>l(T.timeRemaining||v*60),[T,v,l]);(0,u.useEffect)(()=>{if(!n)return;const D=I!==y,O=D&&c,B=D&&n;n&&!D&&p!==y&&g(y),O&&j(),B&&P()},[n,p,y,I,c,P,j]),(0,u.useEffect)(()=>{if(n)switch(x){case S:M();break;case b:E(),M();break;default:N(),L!==x&&I===y&&A()}},[x,b,n,y,L,I,E,S,N,M,A]),(0,u.useEffect)(()=>{n&&c<1&&M()},[n,c,M]),(0,u.useEffect)(()=>()=>M(),[M]);const w=(0,u.useMemo)(()=>({handleExpiredQuiz:t,hideTimer:R,quizTime:c,resetQuizTimer:E,timerDuration:v,timerHidden:m,timerRunning:d}),[t,R,c,E,v,m,d]);return(0,o.jsx)(wT.Provider,{value:w,children:e})}const jT=()=>(0,u.useContext)(wT),H0e=e=>e.isTimedQuiz?(0,o.jsx)(_0e,{...e,children:e.children}):(0,o.jsx)(o.Fragment,{children:e.children}),V0e={currentLesson:void 0,isRestricted:!1,isRestrictedCourse:!1,restrictingQuiz:{}};function z0e(e){const t=le(),n=Vr(),s=Gt(e??""),r=(0,u.useMemo)(()=>{if(!t||!n||!s)return V0e;const l=Vb({course:t,courseProgress:n});return Zb({course:t,courseProgress:n,lesson:s,restrictingQuiz:l})},[t,n,s]),{restrictingQuiz:i}=r,a="title"in i?i.title:void 0,c=bt(a);return(0,u.useMemo)(()=>a?{...r,restrictingQuiz:{...i,title:c}}:r,[r,i,a,c])}const AT=V("quiz-results");function $0e({skipToLessonId:e}){const t=Ce(),n=lB(e),s=sf(),{lessonPreposition:r,quizSkipAhead:i}=t??{},a=n>0&&i&&r?`${i} ${n} ${r} ${s}`:i;return a?(0,o.jsxs)(Zu,{className:"continue-btn--flex",href:An(e),testId:"quiz-skip-ahead-btn",children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"arrow-right-from-line"}),a]}):null}function U0e({isFooterVisible:e,isResultsVisible:t,lessonId:n,onTryAgainFocus:s}){const r=it(),i=hd(n),{passed:a=!1,retryAttempts:c=0}=i??{},{continueType:l,retryCount:d,skipLessonsIfPassed:h,skipLessonsOptional:m,skipToLessonId:f}=of(n),{resetQuizTimer:p}=jT(),g=$ue(l),v=Ce(),x=gB(n),b=z0e(x),{isRestricted:y}=b,{courseFinish:T,quizContinue:S,quizTakeAgain:I}=v??{},L=h&&a&&!!f,E=g,k=Uue({canShowContinue:E,isExport:wN(),isRiseCom:!1,nextLesson:x}),N=(0,u.useCallback)(()=>{p(),r(j2(n))},[r,p,n]),R=E&&y&&x&&v&&(0,o.jsx)(xS,{bgType:"transparent",text:jO({labels:v,restrictions:b})}),M=E&&!y&&x&&(!L||m)&&S&&(0,o.jsx)(Zu,{className:L?"continue-btn--outline":void 0,href:An(x),text:S}),A=k&&T&&(0,o.jsx)(Zu,{href:s2,text:T}),j=(d===-1||c<d)&&(0,o.jsxs)(LI,{allowTabNavigation:t,onClick:N,onFocus:s,size:"lg",testId:"quiz-take-again-button",children:[(0,o.jsx)(ce,{"aria-hidden":"true",name:"arrow-rotate-left"}),I]});return(0,o.jsx)("div",{className:AT("footer",{active:t}),"data-testid":"quiz-results-footer",children:(0,o.jsxs)("div",{className:AT("footer-items",{hidden:!e}),inert:e?void 0:!0,children:[L&&(0,o.jsx)($0e,{skipToLessonId:f}),R,M,A,j]})})}const va=V("quiz-results");function G0e({lessonId:e,questionCount:t}){const n=it(),s=hd(e),{activeIndex:r=0,passed:i=!1,passingScore:a=80,reportResults:c=!1,score:l=0}=s??{},d=Ce(),h=fs(),{skipLessonsIfPassed:m,skipToLessonId:f}=of(e),[p,g]=(0,u.useState)(!1),v=t+1===r,x=(0,u.useRef)(v),b=(0,u.useRef)(void 0),y=(0,u.useRef)(void 0),T=(0,u.useRef)(null),S=(0,u.useId)(),{a11yQuizFailed:I="",a11yQuizPassed:L="",quizPassing:E="",quizResults:k="",quizScore:N=""}=d??{},R=`quiz-results-desc-${S}`,M=(0,u.useCallback)(()=>{y.current=setTimeout(()=>{g(!0),window.dispatchEvent(new CustomEvent(Pd))},500)},[]),A=(0,u.useCallback)(()=>{clearTimeout(y.current),y.current=void 0,g(!0)},[]);return(0,u.useEffect)(()=>()=>{clearTimeout(y.current)},[]),(0,u.useEffect)(()=>{v!==x.current&&(v?T.current?.focus():g(!1),x.current=v)},[v]),(0,u.useEffect)(()=>{if(!v||!i||!m||!f){b.current=void 0;return}const j=`${e}:${f}`;b.current!==j&&(b.current=j,n(ej({quizId:e,destinationId:f})))},[n,i,v,e,m,f]),(0,o.jsx)("div",{className:va(),children:(0,o.jsx)("div",{className:va("container"),children:(0,o.jsxs)("div",{className:va("content",{active:v}),"data-testid":"quiz-results",children:[(0,o.jsxs)("div",{className:va("header"),children:[(0,o.jsx)("h1",{"aria-describedby":R,className:va("label").mix("noOutline"),ref:T,tabIndex:-1,children:k}),(0,o.jsxs)("div",{className:"visually-hidden-always",id:R,children:[(0,o.jsx)("div",{children:`${E}: ${a}%`}),(0,o.jsx)("div",{children:`${N}: ${l}%`}),(0,o.jsx)("div",{children:i?L:I})]})]}),(0,o.jsx)("div",{"aria-hidden":"true",className:va("results"),children:(0,o.jsx)(F0e,{hasPassed:i,isResultsVisible:v,isRTL:h,onAnimationDone:M,passingLabel:E,passingScore:a,score:l,scoreLabel:N,shouldAnimate:c})}),(0,o.jsx)(U0e,{isFooterVisible:p,isResultsVisible:v,lessonId:e,onTryAgainFocus:A})]})})})}const al=V("callout");function W0e({icon:e,title:t,children:n}){return(0,o.jsxs)("div",{className:al(),role:"status",children:[(0,o.jsx)(ce,{className:al("icon"),name:e}),(0,o.jsxs)("div",{className:al("content"),children:[(0,o.jsx)("p",{className:al("title"),children:t}),(0,o.jsx)("div",{className:al("body"),children:n})]})]})}const K0e=5,Q0e=15,Z0e=30,Y0e=60,q0e=180,RT=300,PT=600,MT=120,X0e=e=>e<=K0e?{regularInterval:Y0e,lowTimeThreshold:MT}:e<=Q0e?{regularInterval:q0e,lowTimeThreshold:MT}:e<=Z0e?{regularInterval:RT,lowTimeThreshold:RT}:{regularInterval:PT,lowTimeThreshold:PT},J0e=(e,t,n,s)=>{const r=Math.floor(s/60),i=s%60,a=r===1?e:t;if(r>0&&i>0)return`${n}: ${r} ${a} and ${i} seconds`;if(r>0&&i===0)return`${n}: ${r} ${a}`;if(r===0&&i>0)return`${n}: ${i} seconds`};var Gs=C(49860);const Nn=V("quiz-timer"),L1=(e,t)=>`${e.toString().padStart(2,"0")}:${t.toString().padStart(2,"0")}`,ehe=e=>{const t=Math.floor(e/60),n=e%60;return L1(t,n)},OT=e=>{const t=Math.floor(e/60),n=e%60;return L1(t,n)},the=e=>L1(e,0),BT=({area:e,exitCourseEnabled:t=!1,isStartScreenActive:n=!1,isEndScreenActive:s=!1,labelQuizTimerElapsed:r,labelQuizTimerExpired:i,labelQuizTimerExpiredAction:a,labelQuizTimerExpiredMessage:c,labelQuizTimerHide:l,labelQuizTimerLimit:d,labelQuizTimerMinute:h,labelQuizTimerMinutePlural:m,labelQuizTimerRemaining:f,labelQuizTimerShow:p,timerDisplay:g=Do.REMAINING,timerEnabled:v=!1})=>{const[x,b]=Gs.useState(!1),[y,T]=Gs.useState(""),S=Gs.useRef(null),I=Gs.useRef(!1),{hideTimer:L,quizTime:E,timerDuration:k,timerHidden:N,timerRunning:R,handleExpiredQuiz:M}=jT(),A=k*60,{isCover:j,isHeader:P,isHidden:w}=Gs.useMemo(()=>({isCover:e==="cover",isHeader:e==="header",isHidden:g===Do.HIDE_TIMER}),[e,g]),D=n&&!j,O=Gs.useMemo(()=>X0e(k),[k]),B=Gs.useMemo(()=>({expired:i||"Time expired",minute:h||"minute",minutePlural:m||"minutes",remaining:f||"Time left"}),[i,h,m,f]),H=()=>{b(!1),M()},_=Gs.useCallback(()=>{const{regularInterval:J,lowTimeThreshold:Y}=O,G=E<=Y&&E>0&&!I.current,F=S.current!==null&&S.current-E>=J,U=S.current===null;if(G||F){G&&(I.current=!0),S.current=E;const Q=J0e(B.minute,B.minutePlural,B.remaining,E);T(Q)}U&&(S.current=E)},[O,E,B]);if(Gs.useEffect(()=>{v&&E!==0&&(j||_())},[_,j,v,R,E]),Gs.useEffect(()=>{if(!v||E!==0||n)return;const J=setTimeout(()=>{b(!0)},1200);return()=>clearTimeout(J)},[E,v,n]),!v||D||s)return null;const $={"header-area":P,"cover-area":j,"hide-timer":w,"exit-course":t},z={display:[j,P&&!n].some(je())?null:"none"},K=()=>({[Do.SUMMARY]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Nn("label"),children:[d,":"]}),(0,o.jsxs)("div",{className:Nn("value"),children:[k," ",k===1?h:m]})]}),[Do.REMAINING]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Nn("label"),children:[f,":"]}),(0,o.jsx)("div",{className:Nn("value"),children:ehe(E)})]}),[Do.ELAPSED]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Nn("label"),children:[r,":"]}),(0,o.jsx)("div",{className:Nn("value"),children:OT(A-E)})]}),[Do.ELAPSED_TOTAL]:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Nn("label"),children:[r,":"]}),(0,o.jsxs)("div",{className:Nn("value"),children:[OT(A-E)," /"," ",the(k)]})]})})[j?Do.SUMMARY:g];return(0,o.jsxs)("div",{className:Nn($),"data-testid":"quiz-timer",style:z,children:[E!==0&&(0,o.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"visually-hidden",role:"status",children:y}),E===0&&(0,o.jsx)("div",{className:"visually-hidden",role:"alert",children:i||"Time expired"}),P&&N?(0,o.jsxs)("button",{className:Nn("hide"),onClick:()=>L(!1),type:"button",children:[(0,o.jsx)(ce,{className:Nn("icon"),name:"stopwatch-regular"}),p]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:Nn("time"),children:[(0,o.jsx)(ce,{className:Nn("icon"),name:"stopwatch-regular"}),(0,o.jsx)("div",{className:Nn("desc"),children:K()})]}),P&&(0,o.jsx)("button",{className:Nn("hide"),onClick:()=>L(!0),type:"button",children:l})]}),!j&&x&&Ts.createPortal((0,o.jsxs)(Bp,{className:"quiz-timer-modal","data-testid":"quiz-timer-modal",disableBackgroundScroll:!0,heading:i,hideCloseButton:!0,onCancel:H,onClose:H,onOverlayClick:()=>{},children:[(0,o.jsx)("p",{children:c}),(0,o.jsx)("button",{"data-testid":"quiz-view-results-button",onClick:H,type:"button",children:a})]}),lo({childType:"dialog"}))]})},is=V("quiz-start"),nhe=e=>(e?.retryAttempts??0)>0;function DT({lessonId:e,isActive:t,hasQuestions:n=!0}){const s=it(),r=(0,u.useRef)(null),i=hd(e),a=Ce(),c=le(),l=$m(),d=Gt(e),h=ay(),m=pe(cy),f=l?.authorName,p=l?.avatar,g=c?.theme?.showAuthor??!1,v=c?.theme?.showLessonCount??!1,x=h[e]??0,b=bt(d?.description),y=bt(d?.title),T=tg()==="exiting",S=d?.settings?.timer,I=d?.settings?.asLesson!==!1,{a11yAuthorPrefix:L="",lessonName:E="",lessonPreposition:k="",quizStart:N="",quizTakeAgain:R="",quizTimerElapsed:M="",quizTimerExpired:A="",quizTimerExpiredAction:j="",quizTimerExpiredMessage:P="",quizTimerHide:w="",quizTimerLimit:D="",quizTimerMinute:O="",quizTimerMinutePlural:B="",quizTimerRemaining:H="",quizTimerShow:_=""}=a??{},$=nhe(i),z=t&&$,K=$?"quiz-take-again-button":"quiz-start-button";(0,u.useEffect)(()=>{z&&r.current?.focus()},[z]);const J=()=>{AN(e),s(rm({lessonId:e,fromIndex:0,finalize:!1}))},Y=$?R:N;return(0,o.jsx)("div",{"aria-hidden":!t,className:is(),children:(0,o.jsx)("div",{className:is("container"),children:(0,o.jsxs)("div",{className:is("content"),children:[(0,o.jsxs)("div",{className:is("header"),children:[(0,o.jsx)("div",{className:is("counter"),children:I&&v&&(0,o.jsx)("div",{className:is("count"),children:`${E} ${x} ${k} ${m}`})}),(0,o.jsx)(Jn,{anchor:E6(e),label:"Comments on quiz title",rail:"quiz",children:(0,o.jsx)("h1",{ref:r,tabIndex:-1,children:(0,o.jsx)(Re,{className:is("title"),value:y})})}),g&&p&&f?(0,o.jsxs)("div",{className:is("author"),children:[(0,o.jsx)("img",{alt:"",src:MC(p)}),(0,o.jsxs)("span",{className:"visually-hidden",children:[L," ",f]}),(0,o.jsx)("span",{"aria-hidden":"true",children:f})]}):null]}),n&&S&&!T&&(0,o.jsx)(BT,{area:"cover",exitCourseEnabled:c?.lmsOptions?.enableExitCourse,isStartScreenActive:t,labelQuizTimerElapsed:M,labelQuizTimerExpired:A,labelQuizTimerExpiredAction:j,labelQuizTimerExpiredMessage:P,labelQuizTimerHide:w,labelQuizTimerLimit:D,labelQuizTimerMinute:O,labelQuizTimerMinutePlural:B,labelQuizTimerRemaining:H,labelQuizTimerShow:_,timerEnabled:S}),(0,o.jsx)(Jn,{anchor:uQ(e),label:"Comments on quiz description",rail:"quiz",children:(0,o.jsx)(Re,{allowTabNavigation:t,className:is("description"),value:b})}),n?(0,o.jsxs)("button",{className:is("start-button"),"data-testid":K,onClick:t?J:mn,tabIndex:t?void 0:-1,type:"button",children:[(0,o.jsx)("span",{className:is("start-button-text"),children:Y}),(0,o.jsx)(ce,{className:is("start-button-icon"),name:"chevron-right-solid"})]}):(0,o.jsx)(W0e,{icon:"circle-exclamation",title:"No questions found",children:"This quiz has no questions. Contact your admin for help."})]})})})}function she(){const[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{const n=document.querySelector("[data-previous-lesson]");if(!n)return;t(n.clientHeight);const s=new ResizeObserver(([r])=>{t(r.target.clientHeight)});return s.observe(n),()=>{s.disconnect()}},[]),e}const H0=V("quiz");function ohe({lessonId:e}){const t=Gt(e);return!e||!_l(t)?null:(0,o.jsx)(rhe,{lessonId:e})}function rhe({lessonId:e}){const t=le(),n=t?.color,s=Ce(),r=tg()==="exiting",a=vu()?.prefersKeyboardNavigation??!1,c=Ri(e)??"",{activeIndex:l,progress:d,resolvedItems:h,retryAttempts:m,settings:f,sourceItems:p}=Jue({lessonId:e}),g=que({settings:f}),v=she();a0e({lessonId:e,items:p});const x=Xs(h.length),b=AE(l),{items:y,startOffset:T}=RE(h,l);return h.length===0?(0,o.jsx)("section",{className:H0(),"data-quiz":!0,"data-testid":"quiz",children:(0,o.jsx)("div",{className:H0("wrap"),children:(0,o.jsx)("div",{className:Tl({activeIndex:0,index:0}),children:(0,o.jsx)(DT,{hasQuestions:!1,isActive:!0,lessonId:e})})})}):(0,o.jsxs)("section",{className:H0(),"data-quiz":!0,"data-testid":"quiz",children:[f?.timer&&!r&&(0,o.jsx)(BT,{area:"header",exitCourseEnabled:t?.lmsOptions?.enableExitCourse,isEndScreenActive:l===x,isStartScreenActive:l===0,labelQuizTimerElapsed:s?.quizTimerElapsed,labelQuizTimerExpired:s?.quizTimerExpired,labelQuizTimerExpiredAction:s?.quizTimerExpiredAction,labelQuizTimerExpiredMessage:s?.quizTimerExpiredMessage,labelQuizTimerHide:s?.quizTimerHide,labelQuizTimerLimit:s?.quizTimerLimit,labelQuizTimerMinute:s?.quizTimerMinute,labelQuizTimerMinutePlural:s?.quizTimerMinutePlural,labelQuizTimerRemaining:s?.quizTimerRemaining,labelQuizTimerShow:s?.quizTimerShow,timerDisplay:f?.timerDisplay??void 0,timerEnabled:f?.timer}),(0,o.jsxs)("div",{className:H0("wrap"),children:[b&&(0,o.jsx)("div",{className:Tl({activeIndex:l,index:0}),children:(0,o.jsx)(DT,{isActive:l===0,lessonId:e})}),y.map((S,I)=>{const L=S.type===oe.MULTIPLE_CHOICE;return(0,o.jsx)(w0e,{color:n,hasStart:!0,id:e,index:I+T,isCard:!0,isCorrectAnswerUnshuffled:L?Zue(S.shuffledAnswerIndices,S.answers,S.correct):void 0,isShuffled:Que(S.shuffledAnswerIndices,S.answers),isTimedQuiz:f?.timer,item:S,items:h,labels:s??{},onChoiceSelect:g.onChoiceSelect,onFillInChange:g.onFillInChange,onMatchSet:g.onMatchSet,onResponseToggle:g.onResponseToggle,prefersKeyboardNavigation:a,progress:d,quizTop:v,reportAnswer:OC,retryAttempts:m,scrollId:"page-wrap",setNextIndex:g.onSetIndex,settings:f??void 0,submitAction:g.onSubmit,title:c},`item-${S.id}`)}),(0,o.jsx)("div",{className:Tl({activeIndex:l,index:x}),inert:x===l?void 0:!0,children:(0,o.jsx)(G0e,{lessonId:e,questionCount:h.length})})]})]})}function ihe({lessonProgress:e}){const t=e?.id,n=Nd(Hl)===!0;return(0,o.jsx)("div",{className:"page page--lessonTypeQuiz","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper",children:(0,o.jsx)(M0,{lessonId:t,children:(0,o.jsxs)("div",{className:"page__content",children:[(0,o.jsx)(hT,{lessonProgress:e,type:"quiz"}),n?t!=null?(0,o.jsx)(Nue,{lessonId:t}):null:(0,o.jsx)(ohe,{lessonId:t},`${t??""}-${e?.retryAttempts??0}`)]})})})})}const V0=V("lesson-header"),xo=({avatar:e,authorName:t,className:n=""})=>{const s=Ce();return(0,o.jsxs)("div",{className:V0("author").mix(n),children:[(0,o.jsx)("img",{alt:"",className:"lesson-header__author-img",src:e?yt(e):void 0}),(0,o.jsx)("span",{className:"visually-hidden-always",children:s?.a11yAuthorPrefix}),(0,o.jsx)("span",{className:"lesson-header__author-name",children:t})]})},z0=({showPartnerContent:e=!1})=>(0,o.jsx)("div",{className:V0("author",{"partner-content":e})}),bo=()=>(0,o.jsx)("div",{className:"lesson-header__counter"}),yo=({lessonName:e,lessonPreposition:t,totalLessons:n,lessonNumber:s,showPartnerContent:r=!1})=>{const{lmsOptions:i}=le();return(0,o.jsx)("div",{className:V0("counter",{"partner-content":r}),children:(0,o.jsx)("div",{className:V0("count",{"exit-button-enabled":i?.enableExitCourse}),children:`${e} ${s} ${t} ${n}`})})},Ca=({description:e})=>(0,o.jsx)(Re,{className:"lesson-header__description",value:e}),ahe=({children:e})=>(0,o.jsx)("div",{className:"lesson-header__grouped-row",children:e}),che=({ariaLabel:e,imgRole:t,children:n,sectionStyles:s,topWrapClassName:r})=>(0,o.jsxs)("header",{className:"page__header",children:[(0,o.jsx)("div",{className:"page__header-limit",children:(0,o.jsx)("div",{className:"page__header-container",children:(0,o.jsx)("div",{className:"lesson-header__row",children:(0,o.jsx)("div",{className:"lesson-header__main",children:(0,o.jsx)("div",{className:"lesson-header",children:(0,o.jsx)("div",{className:r,children:n})})})})})}),(0,o.jsx)("div",{"aria-label":e,className:"page__header-bg",role:t,style:s})]}),So=({title:e,id:t})=>{const n=S3(t,"title"),s=(0,o.jsx)("h1",{className:"lesson-header__title","data-change-path":n,tabIndex:-1,children:(0,o.jsx)(Re,{value:e})});return t==null?s:(0,o.jsx)(Jn,{anchor:E6(t),label:"Comments on lesson title",children:s})},pr=V("lesson-header"),FT=e=>`url(${dc({width:76,height:76,imageKey:e.image})})`,E1=({partnerContentAuthors:e})=>{const t=e.map(s=>s.name).join(", "),n=e.length===1;return(0,o.jsxs)("div",{className:pr("partner-content",{mobile:!0}),children:[(0,o.jsx)("div",{className:pr("partner-content-author",{single:n}),children:e.map(s=>(0,o.jsx)("div",{className:pr("partner-content-author-img",{single:n}),style:{backgroundImage:FT(s)}},s.name))}),(0,o.jsx)("span",{"aria-hidden":"true",className:pr("author-name"),children:t})]})},xa=({partnerContentAuthors:e})=>{const t=Ce();return(0,o.jsx)("div",{className:pr("partner-content"),children:e.map(n=>(0,o.jsxs)("div",{className:pr("partner-content-author"),children:[(0,o.jsx)("div",{className:pr("partner-content-author-img"),style:{backgroundImage:FT(n)}}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("span",{className:"visually-hidden",children:[t?.a11yAuthorPrefix," ",n.name]}),(0,o.jsx)("span",{"aria-hidden":"true",className:pr("author-name"),children:n.name})]})]},n.name))})};var _T=C(49860);const ba=V("lesson-header"),lhe=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null&&c,p=t&&e&&c&&!f,g=p||f||l,v=l&&(p||f);return(0,o.jsxs)("div",{className:ba("content"),children:[g&&(0,o.jsxs)("div",{className:ba("info-row"),children:[p?(0,o.jsx)(xo,{authorName:e,avatar:t}):(0,o.jsx)(z0,{}),f&&(0,o.jsx)(xa,{partnerContentAuthors:a}),v&&(0,o.jsx)("span",{"aria-hidden":"true",className:ba("info-row--divider"),children:"|"}),l?(0,o.jsx)(yo,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(bo,{})]}),(0,o.jsxs)("div",{className:ba("title-wrapper",{"no-info":!g}),children:[(0,o.jsx)(So,{id:m,title:d}),n&&(0,o.jsx)(Ca,{description:n,id:m})]})]})},dhe=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null,p=_T.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,o.jsxs)("div",{className:ba("content"),children:[l?(0,o.jsx)(yo,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(bo,{}),p&&(0,o.jsx)(xo,{authorName:e,avatar:t}),c&&f&&(0,o.jsx)(E1,{partnerContentAuthors:a}),(0,o.jsx)(So,{id:m,title:d}),n&&(0,o.jsx)(Ca,{description:n,id:m})]})},uhe=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null,p=_T.useMemo(()=>t&&e&&c&&!f,[t,e,c,f]);return(0,o.jsxs)("div",{className:ba("content"),children:[l?(0,o.jsx)(yo,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(bo,{}),(0,o.jsx)(So,{id:m,title:d}),p?(0,o.jsx)(xo,{authorName:e,avatar:t}):(0,o.jsx)(z0,{showPartnerContent:f}),c&&f&&(0,o.jsx)(xa,{partnerContentAuthors:a}),n&&(0,o.jsx)(Ca,{description:n,id:m})]})};function hhe(e){const t=T6();return e.lessonHeaderSize===Va.SMALL&&!t?(0,o.jsx)(lhe,{...e}):t?(0,o.jsx)(dhe,{...e}):(0,o.jsx)(uhe,{...e})}const mhe=()=>Xt(480);var HT=C(49860);const k1=V("lesson-header"),fhe=({authorName:e,avatar:t,lessonName:n,lessonNumber:s,lessonPreposition:r,partnerContentAuthors:i,showAuthor:a,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=i!=null&&a,f=t&&e&&a&&!m,p=f||m||c,g=c&&(f||m);return(0,o.jsxs)("div",{className:k1("content"),children:[p&&(0,o.jsxs)("div",{className:k1("info-row"),children:[f?(0,o.jsx)(xo,{authorName:e,avatar:t}):(0,o.jsx)(z0,{}),m&&(0,o.jsx)(xa,{partnerContentAuthors:i}),g&&(0,o.jsx)("span",{"aria-hidden":"true",className:k1("info-row--divider"),children:"|"}),c?(0,o.jsx)(yo,{lessonName:n,lessonNumber:s,lessonPreposition:r,totalLessons:d}):(0,o.jsx)(bo,{})]}),(0,o.jsx)("div",{children:(0,o.jsx)(So,{id:h,title:l})})]})},phe=({authorName:e,avatar:t,lessonName:n,lessonNumber:s,lessonPreposition:r,partnerContentAuthors:i,showAuthor:a,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=i!=null,f=HT.useMemo(()=>t&&e&&a&&!m,[t,e,a,m]);return(0,o.jsxs)(o.Fragment,{children:[c?(0,o.jsx)(yo,{lessonName:n,lessonNumber:s,lessonPreposition:r,totalLessons:d}):(0,o.jsx)(bo,{}),f&&(0,o.jsx)(xo,{authorName:e,avatar:t}),a&&m&&(0,o.jsx)(E1,{partnerContentAuthors:i}),(0,o.jsx)(So,{id:h,title:l})]})},ghe=({authorName:e,avatar:t,lessonName:n,lessonNumber:s,lessonPreposition:r,partnerContentAuthors:i,showAuthor:a,showLessonCount:c,title:l,totalLessons:d,lessonId:h})=>{const m=i!=null,f=HT.useMemo(()=>t&&e&&a&&!m,[t,e,a,m]);return(0,o.jsxs)(o.Fragment,{children:[f?(0,o.jsx)(xo,{authorName:e,avatar:t}):(0,o.jsx)(z0,{}),a&&m&&(0,o.jsx)(xa,{partnerContentAuthors:i}),(0,o.jsx)(So,{id:h,title:l}),c?(0,o.jsx)(yo,{lessonName:n,lessonNumber:s,lessonPreposition:r,totalLessons:d}):(0,o.jsx)(bo,{})]})};function vhe(e){const t=mhe();return e.lessonHeaderSize===Va.SMALL&&!t?(0,o.jsx)(fhe,{...e}):t?(0,o.jsx)(phe,{...e}):(0,o.jsx)(ghe,{...e})}var VT=C(49860);const $0=V("lesson-header"),N1=()=>(0,o.jsx)("div",{className:$0("author--hidden")}),Che=({authorName:e,avatar:t,description:n,lessonName:s,lessonNumber:r,lessonPreposition:i,partnerContentAuthors:a,showAuthor:c,showLessonCount:l,title:d,totalLessons:h,lessonId:m})=>{const f=a!=null&&c,p=t&&e&&c&&!f,g=p||f||l,v=l&&(p||f);return(0,o.jsxs)("div",{className:$0("content"),children:[g&&(0,o.jsxs)("div",{className:$0("info-row"),children:[p?(0,o.jsx)(xo,{authorName:e,avatar:t}):(0,o.jsx)(N1,{}),f&&(0,o.jsx)(xa,{partnerContentAuthors:a}),v&&(0,o.jsx)("span",{"aria-hidden":"true",className:$0("info-row--divider"),children:"|"}),l?(0,o.jsx)(yo,{lessonName:s,lessonNumber:r,lessonPreposition:i,totalLessons:h}):(0,o.jsx)(bo,{})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)(So,{id:m,title:d}),n&&(0,o.jsx)(Ca,{description:n,id:m})]})]})},xhe=e=>{const{authorName:t,avatar:n,description:s,lessonName:r,lessonNumber:i,lessonPreposition:a,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,p=c!=null,g=VT.useMemo(()=>n&&t&&l&&!p,[n,t,l,p]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(So,{id:f,title:h}),(0,o.jsxs)(ahe,{children:[g?(0,o.jsx)(xo,{authorName:t,avatar:n}):(0,o.jsx)(N1,{}),l&&p&&(0,o.jsx)(xa,{partnerContentAuthors:c}),d?(0,o.jsx)(yo,{lessonName:r,lessonNumber:i,lessonPreposition:a,showPartnerContent:p,totalLessons:m}):(0,o.jsx)(bo,{})]}),s&&(0,o.jsx)(Ca,{description:s,id:f})]})},bhe=e=>{const{authorName:t,avatar:n,description:s,lessonName:r,lessonNumber:i,lessonPreposition:a,partnerContentAuthors:c,showAuthor:l,showLessonCount:d,title:h,totalLessons:m,lessonId:f}=e,p=c!=null,g=VT.useMemo(()=>n&&t&&l&&!p,[n,t,l,p]);return(0,o.jsxs)(o.Fragment,{children:[d?(0,o.jsx)(yo,{lessonName:r,lessonNumber:i,lessonPreposition:a,totalLessons:m}):(0,o.jsx)(bo,{}),g?(0,o.jsx)(xo,{authorName:t,avatar:n}):(0,o.jsx)(N1,{}),l&&p&&(0,o.jsx)(E1,{partnerContentAuthors:c}),(0,o.jsx)(So,{id:f,title:h}),s&&(0,o.jsx)(Ca,{description:s,id:f})]})};function yhe(e){const t=pu();return e.lessonHeaderSize===Va.SMALL&&!t?(0,o.jsx)(Che,{...e}):t?(0,o.jsx)(bhe,{...e}):(0,o.jsx)(xhe,{...e})}const She={[se.RISE_CLASSIC]:hhe,[se.HORIZON]:vhe,[se.APEX]:yhe};function Ihe(e){const t=Lt(),n=She[t];return(0,o.jsx)(n,{...e})}const The=V("lesson-header"),Lhe=({authorName:e,avatar:t,children:n,description:s,labels:{lessonName:r,lessonPreposition:i},lessonHeaderImageColor:a,lessonHeaderSize:c,lessonHeaderStyle:l,lessonId:d,partnerContentAuthors:h,totalLessons:m,lessonNumber:f,showAuthor:p,showLessonCount:g,title:v})=>{const x=RM(),b=Nb(x),y=l===re.IMAGE,T=The("top-wrap"),{alpha:S,ariaLabel:I,media:L,role:E}=Zr("lessonHeaderImage"),k=L?.image,N=(0,u.useMemo)(()=>{if(k&&y){const R=a===xt.LIGHT?"#fff":"#000";return ad({alpha:S,color:R,url:pt(k)})}},[k,y,a,S]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(che,{ariaLabel:y?I:void 0,imgRole:y?E:void 0,sectionStyles:N,topWrapClassName:T,children:(0,o.jsx)(Ihe,{authorName:e,avatar:t,description:s,lessonHeaderSize:c,lessonId:d,lessonName:r,lessonNumber:f,lessonPreposition:i,partnerContentAuthors:h,showAuthor:p,showLessonCount:g&&!b,title:v,totalLessons:m})}),n]})};function Ehe(e){const t=e?.customColorLessonHeaderContrast,n=e?.lessonHeaderColor;return(0,u.useMemo)(()=>{const s=xs(n),r=t??s;return(r===ke.AUTO?s:r)===ke.DARK?Pt.DARK:Pt.LIGHT},[t,n])}var khe=C(89464),w1=C.n(khe);C.dn(zT);function zT({authors:e,lessonAuthor:t,courseAuthor:n,selectedAuthorId:s}){if(s==="none")return{};if(s){const r=w1()(e,{id:s});if(r)return r}if(t){const r=w1()(e,{id:t});if(r)return r}if(n){const r=w1()(e,{id:n});if(r)return r}return{}}const{LARGE:Nhe,SMALL:whe}=Va,{ACCENT:jhe,BLACK:Ahe,COLOR:$T,DARK:Rhe,GRAY:Phe,IMAGE:UT,LIGHT:Mhe,TINT:Ohe}=re,Bhe=V("lesson-header-wrap");function Dhe({isLessonEntering:e,isLessonExiting:t,isMobileHeader:n,lesson:s,lessonProgress:r,loadMedia:i,observeProgress:a=!0}){const c=Hr(),l=Ce(),d=Ef(),h=Ehe(c?.theme);if(!c||!l||s.type!=="blocks"&&s.type!=="quiz")return null;if(s.type==="quiz")return(0,o.jsx)(ihe,{lessonProgress:r?.type==="quiz"?r:void 0});const m=qb({course:c,lesson:s}),f=typeof m=="object"&&m!==null&&"id"in m&&(typeof m.id=="string"||typeof m.id=="number")?String(m.id):null,p=AO({course:c,lesson:s}),g=RO(c),{author:v,selectedAuthorId:x}=s,{authors:b,showLessonCount:y,theme:T}=c,{hideLessonHeaders:S,lessonHeaderColor:I,lessonHeaderImageColor:L,lessonHeaderSize:E,lessonHeaderStyle:k,navigationType:N,showAuthor:R}=T??{},A=d.find($=>$.id===x)?.data?.authors,j=zT({authors:b,lessonAuthor:v,courseAuthor:c.author,selectedAuthorId:x}),{avatar:P,authorName:w}=j,D=(0,o.jsx)(Lhe,{authorName:w,avatar:P,description:s.description,labels:l,lessonHeaderImageColor:L,lessonHeaderSize:E,lessonHeaderStyle:k,lessonId:s.id,lessonNumber:p,partnerContentAuthors:A,showAuthor:R,showLessonCount:y,title:s.title,totalLessons:g,children:(0,o.jsx)(hT,{id:s.id,items:s.items,lessonProgress:r,navigationType:N,scrollPosition:0,type:s.type})}),B=`image-${(L??xt.DARK).toLowerCase()}`,H=Bhe({[B]:k===UT,accent:k===jhe,black:k===Ahe,collapsed:S,custom:k===$T,dark:k===Rhe,gray:k===Phe,image:k===UT,large:E===Nhe&&!n,light:k===Mhe,mobile:n,small:E===whe&&!n,tint:k===Ohe,"video-training":io(c)}),_=k===$T?{"--lesson-header-contrast-color":h,"--color-background":I}:{};return(0,o.jsx)(fue,{animateBlockEntrance:c.animateBlockEntrance??!1,data:s,hideLessonHeaders:S??void 0,isLessonEntering:e,isLessonExiting:t,lessonHeader:D,lessonHeaderWrapClasses:H,lessonHeaderWrapStyles:_,loadMedia:i,nextLesson:f,observeProgress:a})}const Fhe=({percentComplete:e,trackingCompletionPercentage:t,labelCompletionRequirement:n="Completion Requirement",labelPercentCompletion:s="% Completion",labelYouCompleted:r="You completed:",labelA11yRequirementCompleted:i="Requirement completed, check mark",labelA11yRequirementNotCompleted:a="Requirement not completed, empty square"})=>{const c=fs();if(t==null)return null;const l=Ki({percent:t,label:s,isRTL:c}),d=c?`%${e}`:`${e}%`;return(0,o.jsxs)("div",{className:"progress-summary__requirement",children:[(0,o.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,o.jsx)("h2",{className:"progress-summary__requirement-title",children:n}),(0,o.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,o.jsx)("div",{children:l}),(0,o.jsxs)("div",{children:[r,"\xA0",(0,o.jsx)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:d})]})]})]}),(0,o.jsx)(GT,{labelA11yRequirementCompleted:i,labelA11yRequirementNotCompleted:a,requirementMet:e!=null&&t<=e})]})},_he=({outOfAttempts:e,quizPassed:t,quizPassingScore:n=100,quizScore:s,quizTitle:r,trackingQuizId:i,labelQuizRequirement:a="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:p="Requirement not completed, empty square"})=>{const g=fs();if(!i)return null;const v=Ki({percent:n,label:l,isRTL:g});return(0,o.jsxs)("div",{className:"progress-summary__requirement",children:[(0,o.jsxs)("div",{className:"progress-summary__requirement-stats-wrap",children:[(0,o.jsx)("h2",{className:"progress-summary__requirement-title",children:a}),(0,o.jsxs)("div",{className:"progress-summary__requirement-stats",children:[(0,o.jsxs)("div",{children:[c," ",v," ",r]}),s==null?(0,o.jsx)("div",{children:(0,o.jsx)(xn,{className:"progress-summary__requirement-stats-link brand--color",to:An(i),children:d})}):(0,o.jsxs)("div",{children:[h,"\xA0",(0,o.jsxs)("strong",{className:"progress-summary__requirement-stats-percent-achieved",children:[s,"%"]})]})]}),e&&(0,o.jsx)("span",{className:"progress-summary__requirement-no-attempts",children:m})]}),(0,o.jsx)(GT,{labelA11yRequirementCompleted:f,labelA11yRequirementNotCompleted:p,requirementMet:t})]})},GT=({requirementMet:e,labelA11yRequirementCompleted:t,labelA11yRequirementNotCompleted:n})=>e?(0,o.jsx)(ce,{"aria-label":t,classNameIcon:"progress-summary__requirement-checkbox-checked",name:"square-check"}):(0,o.jsx)("div",{"aria-label":n,className:"progress-summary__requirement-checkbox-empty",role:"img"}),Hhe=({dueAt:e})=>e?(0,o.jsx)("div",{className:"progress-summary__header-due brand--color brand--border",children:hp(e)}):null;var Vhe=C(22043),zhe=C.n(Vhe);const $he=900,Uhe=1e4;function Ghe(){const[e,t]=(0,u.useState)(!1),[n,s]=(0,u.useState)(!0);return(0,u.useEffect)(()=>{let r;const i=setTimeout(()=>{t(!0),r=setTimeout(()=>s(!1),Uhe)},$he);return()=>{clearTimeout(i),clearTimeout(r)}},[]),{recycle:n,run:e}}const Whe=["#eb524d","#ffac02","#ffcc00","#28cea9","#4fbdf4","#6788e4"],Khe=()=>{const{recycle:e,run:t}=Ghe(),n=(0,u.useRef)(null);return(0,o.jsx)("div",{className:"progress-summary__confetti",children:(0,o.jsx)(zhe(),{canvasRef:n,colors:Whe,gravity:.4,height:window.innerHeight,numberOfPieces:500,recycle:e,run:t,width:window.innerWidth})})};var Qhe=C(72804);const WT=V("progress-summary-card"),Zhe=({completeLabel:e,isComplete:t,isUrgent:n,completedDate:s,labelDue:r})=>t?(0,o.jsxs)("div",{className:"progress-summary-card__completed-label",children:[e,(0,o.jsx)("span",{className:"progress-summary-card__completed-date",children:s})]}):r?(0,o.jsx)("div",{className:["progress-summary-card__due-label",n?"brand--color":void 0].filter(Boolean).join(" "),children:r}):null,Yhe=({cardImageKey:e=null,className:t,color:n="#ff6602",completedAt:s=null,coverImageKey:r=null,disable:i=!1,durationHidden:a=!1,enrolledAt:c=null,hidden:l=!1,imagesUri:d="",isLearningPath:h=!1,isUrgent:m=!1,labelAssignedToMe:f="",labelDue:p="",labelDuration:g="",labelLearningPath:v="",onClick:x=mn,progress:b=0,title:y=""})=>{const T=Ce(),S=fs(),I=s!=null,L=(0,u.useCallback)(()=>{i||x?.()},[i,x]),E=(0,u.useCallback)(w=>{rf(w)&&w.preventDefault(),!i&&Oi(w)&&x?.()},[i,x]),k=Ki({percent:Math.round(b),label:T?.progressSummaryPercentComplete||"% Complete",isRTL:S}),N=e||r,R=T?.progressSummaryCompleted||"Completed: ",M=s==null?"":au(s,"numericDate"),A=WT("card",{disabled:i}),j=["progress-summary-card__title-button",t].filter(Boolean).join(" "),P=WT("image-overlay",{"not-started":!(b||I),"in-progress-completed":b||I});return(0,o.jsxs)("div",{"aria-hidden":l,className:A,onClick:L,children:[(0,o.jsxs)("div",{className:"progress-summary-card__content",children:[(0,o.jsx)("button",{"aria-disabled":i,className:j,onKeyDown:E,role:"link",tabIndex:l?-1:void 0,type:"button",children:(0,o.jsx)("span",{className:"progress-summary-card__title",children:y||T?.progressSummaryNoTitle||"(No Title)"})}),(0,o.jsxs)("div",{className:"progress-summary-card__course-info",children:[h&&(0,o.jsx)("div",{className:"progress-summary-card__hide",children:v}),c&&(0,o.jsx)("div",{className:"progress-summary-card__hide",children:f}),!!b&&!i&&!s&&(0,o.jsx)("span",{className:"progress-summary-card__hide",children:k}),!a&&!I&&(0,o.jsx)("div",{className:"progress-summary-card__duration",children:g}),(0,o.jsx)(Zhe,{completedDate:M,completeLabel:R,isComplete:I,isUrgent:m,labelDue:p})]})]}),(0,o.jsxs)("div",{className:"progress-summary-card__image-wrap",children:[(0,o.jsx)(Qhe.A,{alt:"","aria-hidden":"true",b:"fff",className:"progress-summary-card__image",f:"jpg",h:150,imageKey:N,imagesUri:d,s:"cover",style:{backgroundColor:n},w:300}),(0,o.jsx)("div",{className:P}),(0,o.jsx)("div",{className:"progress-summary-card__image-overlay-bottom-bar",children:!!b&&!i&&!I&&(0,o.jsx)("div",{"aria-hidden":"true",className:"progress-summary-card__progress-bar-wrap",children:(0,o.jsx)("div",{className:"progress-summary-card__wrap-light",children:(0,o.jsx)("div",{className:"progress-summary-card__progress-bar",style:{width:`${b}%`}})})})})]})]})},qhe=Ae("IMAGES_URI"),Xhe=6e4,KT=60,Jhe=24,QT=(e,t)=>e===1?t:t.concat("s"),j1=e=>e?.course?.course?.lessons??[],eme=e=>t=>j1(t).find(n=>n.type!=="section"&&n.id!=null&&!e.includes(n.id)),tme=e=>{const t=j1(e),{trackingQuizId:n,score:s}=e??{};if(n&&t.length){const r=t.find(({id:a})=>a===n),{settings:{passingScore:i}={}}=r??{};return Number(s)<Number(i)?r:!1}},nme=e=>j1(e).find(t=>t.type!=="section"),sme=(e,t)=>(eme(e)(t)||tme(t)||nme(t))?.id??"",ome=e=>{const t=Math.floor((e??0)/Xhe),n=Math.floor(t/KT)%Jhe,s=t%KT,r=`${n} ${QT(n,"hr")}`,i=`${s} min`;return n>0&&s>0?[r,i].join(" "):n>0?r:i},rme=({color:e,learningPathId:t})=>{const{learningPathComplete:n,isSuccess:s,nextCourse:r}=pe(x=>x.learningPathUpNext??{}),{dueAt:i,courseId:a="",lessonCount:c,lessonsCompleted:l=[],sourceType:d,timeToComplete:h}=r??{},m=Ce(),f=(0,u.useMemo)(()=>sme(l,r),[r,l]),p=r?.color??e,g={cardImageKey:r?.cardImageKey,color:p,coverImageKey:r?.coverImageKey,progress:r?.progress,score:r?.score??void 0,title:r?.title},v=(0,u.useCallback)(()=>{d==="PACKAGE"?(window.top.sessionStorage.setItem("upNextCourseId",a),window.top.location.assign(`/learning-path/${t}`)):aA(`${a}/lessons/${f}`)},[a,t,f,d]);return s&&!n&&(0,o.jsx)("div",{className:"progress-summary__lp-next",children:(0,o.jsxs)("div",{className:"progress-summary__lp-next-inner",children:[(0,o.jsxs)("div",{className:"progress-summary__lp-next-label",children:[m?.progressSummaryNextUp||"Next up"," ",(0,o.jsx)(ce,{"aria-hidden":"true",classNameIcon:"progress-summary__lp-next-label-icon",name:"arrow-right"})]}),(0,o.jsx)("div",{className:"progress-summary__lp-next-card",children:(0,o.jsx)(Yhe,{imagesUri:qhe,labelCount:`${c} ${QT(c,"lesson")}`,labelDue:hp(i),labelDuration:ome(h),noCertDownload:!0,noFavoriteBtn:!0,onClick:v,...g})})]})})},ime=`${Ae("CDN_URI")}/assets/rise/assets/trophy.svg`,ame=e=>Object.values(e).filter(({isComplete:t})=>t).length,cme=e=>{const{color:t,course:n={},courseProgress:s={},lessons:r=[]}=e,i=it(),{learningPathComplete:a,lpHasFailedQuiz:c}=pe(F=>F.learningPathUpNext??{}),{lessons:l={},percentComplete:d}=s,{dueAt:h,certificateDownload:m,completionCelebration:f,lessonsOnly:p=[],riseComCourseId:g,riseComLearningPathId:v,trackingCompletionPercentage:x,trackingQuizId:b}=n,y=ac(),T=Ce(),S=T??{},I=x==null&&b==null,L=I?d===100:AC(),E=p.length,k=ame(l),N=(0,u.useCallback)(()=>{i(pA({courseId:g,learningPathId:v}))},[i,g,v]);(0,u.useEffect)(()=>{v&&N()},[]);const R=(0,u.useMemo)(()=>L?n.completedAt?n.completedAt:new Date:null,[n.completedAt,L]),M=(0,u.useMemo)(()=>r.find(F=>F.type==="quiz"&&F.id===b),[b,r]),A=bt(M?.title),j=(0,u.useMemo)(()=>Number(M?.settings?.passingScore??100),[M]),P=b?s.lessons?.[b]:void 0,w=P?.passed??null,D=(0,u.useMemo)(()=>P?.percentComplete===100?P.score??null:null,[P]),O=Xb(s,M,b),B=typeof O=="object"&&O!==null&&"outOfAttempts"in O&&O.outOfAttempts===!0,H=b?w:!0,_=yn(),$=I?"progress-summary progress-summary__no-req":"progress-summary",z=Kn(n),K=`You've completed ${k} of ${E} lessons.`,Y=z?L?"Complete":"Incomplete":K,G=String(fc(y+" - Progress Summary"));return(0,o.jsx)(Gr,{title:G,children:(0,o.jsxs)("div",{className:$,children:[L&&f&&H&&!_&&(0,o.jsx)(Khe,{}),(0,o.jsxs)("header",{className:"progress-summary__header",children:[(0,o.jsx)("h1",{className:"progress-summary__header-title",tabIndex:-1,children:L&&!I&&H?T?.progressSummaryCongratulations||"Congratulations!":T?.progressSummary||"Progress Summary"}),I?(0,o.jsx)("div",{className:"progress-summary__lessons-completed",children:Y}):L?(0,o.jsxs)("div",{className:"progress-summary__header-completion-date",children:[H&&(0,o.jsx)("img",{alt:"trophy",className:"progress-summary__header-trophy",src:ime}),R==null?"":au(R,"longOrdinalDate")]}):(0,o.jsx)(Hhe,{dueAt:h})]}),(0,o.jsxs)("section",{className:"progress-summary__section",children:[!I&&L&&(0,o.jsx)("div",{className:"progress-summary__requirements-met",children:T?.progressSummaryRequirementsMet||"You've met all the requirements."}),I?!v&&(0,o.jsxs)(xn,{className:"progress-summary__start-over",to:"/",children:[T?.progressSummaryStartOver||"Start Over",(0,o.jsx)("i",{className:"progress-summary__start-over-icon icon icon-reload"})]}):(0,o.jsxs)("div",{className:"progress-summary__requirements",children:[(0,o.jsx)(Fhe,{labelA11yRequirementCompleted:T?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:T?.a11yProgressSummaryRequirementNotCompleted,labelCompletionRequirement:S.progressSummaryCompletionRequirement,labelPercentCompletion:S.progressSummaryPercentCompletion,labelYouCompleted:S.progressSummaryYouCompleted,percentComplete:d,trackingCompletionPercentage:x}),(0,o.jsx)(_he,{labelA11yRequirementCompleted:T?.a11yProgressSummaryRequirementCompleted,labelA11yRequirementNotCompleted:T?.a11yProgressSummaryRequirementNotCompleted,labelNoAttemptsRemaining:S.progressSummaryNoAttemptsRemaining,labelQuizRequirement:S.progressSummaryQuizRequirement,labelScoreOf:S.progressSummaryScoreOf,labelScoreOfPreposition:S.progressSummaryScoreOfPreposition,labelViewQuiz:S.progressSummaryViewQuiz,labelYouScored:S.progressSummaryYouScored,outOfAttempts:B,quizPassed:w,quizPassingScore:j,quizScore:D,quizTitle:A,trackingQuizId:b})]}),(L||I)&&(0,o.jsxs)("div",{className:"progress-summary__completion-controls",children:[(0,o.jsx)("button",{className:"progress-summary__btn-back progress-summary__completion-control",onClick:iA,role:"link",type:"button",children:T?.progressSummaryBackToLearning||"Back to my learning"}),L&&(!v&&m||v&&a)&&m&&H&&!c&&(0,o.jsx)("span",{className:"progress-summary__completion-control",children:(0,o.jsx)(sG,{})})]})]}),L&&!!v&&(0,o.jsx)(rme,{color:t,learningPathId:v})]})})},ZT=({contentClassName:e,lessonId:t,...n})=>(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,o.jsx)(M0,{lessonId:t,children:(0,o.jsx)("div",{className:e?`page__content ${e}`:"page__content",children:(0,o.jsx)(cme,{...n})})})})});function lme({content:e,isMobileHeader:t,lessonId:n,lessonProgress:s}){const r=Hr(),i=Vr(),a=ct(),c=Ce(),l=tg(),d=EX(),h=(0,u.useRef)(!1),m=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(l==="exiting"){h.current=!1;const y=m.current;y!=null&&(m.current=null,kr(y));return}h.current||(h.current=!0,e.kind==="lesson"&&(_a(n),m.current=n,gn(dj(n))))},[e.kind,n,l]),(0,u.useEffect)(()=>()=>{const y=m.current;y!=null&&kr(y)},[]);const f=a(r?.title),p=e.kind==="progress-summary"?c?.progressSummary??"":e.kind==="lesson"?a(e.lesson.title):"",g=l==="entering",v=l==="exiting",x=l==="present",b=e.kind==="progress-summary"?(0,o.jsx)(ZT,{course:r,courseProgress:i,lessonId:n,lessons:r?.lessonsOnly}):e.kind==="lesson"?(0,o.jsx)(Dhe,{isLessonEntering:g,isLessonExiting:v,isMobileHeader:t,lesson:e.lesson,lessonProgress:s,loadMedia:d,observeProgress:x}):null;return(0,o.jsx)(Gr,{active:!v,title:fc(`${p} - ${f}`),children:(0,o.jsx)("div",{className:"page","data-lesson-id":n,children:b})})}var U0=C(57990),dme=C(19055),ume=C.n(dme);const YT=V("blocks-slide-indicator-tooltip"),hme=({disabled:e,left:t,ref:n,text:s,top:r,visible:i})=>{let a=(0,o.jsx)("span",{"aria-hidden":"true",children:s});return e&&(a=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(ce,{classNameIcon:YT("icon"),name:"lock"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"(locked content)"})]})),(0,o.jsx)("div",{"aria-hidden":!i,className:YT("wrapper",{disabled:e,visible:i}),ref:n,role:"tooltip",style:{left:t,top:r},children:a})},G0=V("blocks-slide-indicator"),mme=({active:e,blockNavigationStyle:t,disabled:n,numberOfSlides:s,onKeyDown:r,onClick:i,ref:a,slideIndex:c})=>{const{prefersKeyboardNavigation:l}=vu()??{},[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(),p=(0,u.useRef)(null),g=(0,u.useRef)(null),v=(0,u.useRef)(void 0),x=t===Kh.NUMBERS,b=c+1,y=`${b} / ${s}`,T=e?`Step ${b} of ${s}, current step`:`Go to step ${b} of ${s}`,S=(0,u.useRef)(null);S.current||=document.getElementById("portal");const I=(0,u.useCallback)(()=>{if(p.current&&g.current){const O=p.current.getBoundingClientRect(),B=g.current.getBoundingClientRect(),H=O.left-B.width-18,_=Math.round(O.top-B.height/2+O.height/2);f({left:H,top:_})}},[]),L=(0,u.useCallback)(()=>{v.current=setTimeout(()=>{I(),h(!0)},300)},[I]),E=(0,u.useCallback)(()=>{clearTimeout(v.current),h(!1)},[]),k=(0,u.useCallback)(()=>{i(c)},[i,c]),N=(0,u.useCallback)(O=>{cn(O)&&h(!1),r(O)},[r]),R=(0,u.useCallback)(()=>{L()},[L]),M=(0,o.jsx)(hme,{disabled:n,left:m?.left,ref:g,text:y,top:m?.top,visible:d}),A=G0("button",{active:e,disabled:n,numbers:x}),j=G0("wrapper"),P=G0("circle",{active:e,disabled:n}),w=G0("number",{active:e,disabled:n}),D=x?(0,o.jsx)("span",{"aria-hidden":"true",className:w,children:b}):(0,o.jsx)(ce,{classNameIcon:P,name:"circle-solid"});return(0,o.jsxs)("div",{className:j,ref:a,children:[(0,o.jsx)("button",{"aria-current":e?"page":void 0,"aria-disabled":n,"aria-label":T+(n?" (unavailable until previous content is completed)":""),className:A,"data-control":"",onBlur:E,onClick:n?void 0:k,onFocus:l?R:void 0,onKeyDown:N,onMouseEnter:L,onMouseLeave:E,ref:p,type:"button",children:D}),S.current&&(0,Ts.createPortal)(M,S.current)]})},di=V("blocks-slide-controls"),qT=38,fme=8,pme=({activeSlideIndex:e,blockNavigationStyle:t,numberOfSlides:n,onGoToCover:s,onSlideClick:r,slideDisabledState:i,previewType:a})=>{const c=(0,u.useRef)(null),l=(0,u.useRef)(null),[d,h]=(0,u.useState)(!1),[m,f]=(0,u.useState)(!1),p=(0,u.useCallback)(b=>{let y=!1,T=-1;if($r(b)||Wo(b)){if(e-1>=0)T=e-1;else{s();return}y=!0}else Ur(b)||Ko(b)?(e+1<=n-1&&(T=e+1),y=!0):$B(b)?(T=0,y=!0):zB(b)&&(T=n-1,i[T]&&(T=i.findLastIndex(S=>!S)),y=!0);T>=0&&!i[T]&&r(T),y&&(b.stopPropagation(),b.preventDefault())},[e,n,s,r,i]);(0,u.useEffect)(()=>{const b=c.current,y=l.current;if(b&&y){const T=b.getBoundingClientRect(),S=y.getBoundingClientRect(),I=T.bottom-qT,L=T.top+qT;S.bottom>I?b.scrollBy({top:S.bottom-I,left:0,behavior:"smooth"}):S.top<L&&b.scrollBy({top:S.top-L,left:0,behavior:"smooth"})}},[e]);const g=(0,u.useCallback)(()=>{const b=c.current;b&&(h(b.scrollTop>fme),f(b.clientHeight+b.scrollTop<b.scrollHeight))},[]);(0,Oc.A)(g);const v=(0,u.useCallback)(Yu()(g,100),[g]);Ru(c.current,g);const x=di({"touch-preview":Vc(a)});return(0,o.jsx)("div",{className:x,children:(0,o.jsx)("div",{className:di("page-control-wrapper"),children:(0,o.jsxs)("div",{className:di("page-control-inner-wrapper"),children:[(0,o.jsx)("div",{className:di("page-control"),onScroll:v,ref:c,children:(0,o.jsx)("div",{className:di("slide-dot-wrapper"),children:ume()(b=>{const y=b===e;return(0,o.jsx)(mme,{active:y,blockNavigationStyle:t,disabled:i[b],numberOfSlides:n,onClick:r,onKeyDown:p,ref:y?l:null,slideIndex:b},b)},n)})}),(0,o.jsx)("div",{className:di("overlay-top",{visible:d})}),(0,o.jsx)("div",{className:di("overlay-bottom",{visible:m})})]})})})},XT=V("presentation-logo"),gme=({showLogo:e=!0})=>{const t=le();if(!Cn()||e===!1)return null;const s=t?.theme?.logoPosition??r7;return(0,o.jsx)(Tp,{className:XT({[o7[s]]:!0}),imageClassName:XT("image"),resolveImageDimensions:Zne})};function vme(e,{designHeight:t,fit:n="width"}={}){const s=(0,u.useRef)(null),[r,i]=(0,u.useState)(1),a=(0,u.useRef)(null);(0,u.useLayoutEffect)(()=>{const l=s.current;if(!l)return;const d=(f,p)=>{const g=f>0?f/e:1,v=n==="contain"&&t?Math.min(g,p>0?p/t:1):g;i(x=>x===v?x:v)},h=l.getBoundingClientRect();d(h.width,h.height);const m=new ResizeObserver(f=>{a.current!=null&&cancelAnimationFrame(a.current),a.current=requestAnimationFrame(()=>{const p=f[0];p&&d(p.contentRect.width,p.contentRect.height)})});return m.observe(l),()=>{m.disconnect(),a.current!=null&&cancelAnimationFrame(a.current)}},[e,t,n]);const c={transform:`scale3d(${r}, ${r}, 1)`,transformOrigin:n==="contain"?"center":"top left"};return{containerRef:s,scale:r,scaleStyle:c}}const JT=V("presentation-slide-frame");function Cme({children:e}){const{containerRef:t,scaleStyle:n}=vme(1024,{designHeight:sI,fit:"contain"});return(0,o.jsx)("div",{className:JT(),ref:t,children:(0,o.jsx)("div",{className:JT("canvas"),style:{width:1024,height:sI,...n},children:e})})}const Nt=V("blocks-lesson-slide"),A1="#fff",xme=e=>We(e)&&(typeof e.blockId=="string"||typeof e.blockId=="number")&&typeof e.family=="string",bme=e=>We(e)&&(typeof e.id=="string"||typeof e.id=="number"),W0=e=>{const t={...e,id:e.id??e.blockId};return bme(t)?t:null},yme=["image full","image text overlay","quote background"],Sme=({className:e,hasSingleBlock:t})=>{const n=Zn(),{backgroundImageCss:s}=rg(),r=Rn()||A1,i=n===re.IMAGE;return t&&i?null:(0,o.jsx)("div",{className:e,style:i&&s?{backgroundImage:s.backgroundImage}:{background:r}})},e9=({className:e})=>{const t=Zn(),{backgroundImageCss:n}=rg(),s=Rn()||A1,r=t===re.IMAGE;return(0,o.jsx)("div",{className:e,style:r&&n?{backgroundImage:n.backgroundImage}:{background:s}})},t9=({className:e,showTitle:t,title:n,titleClassName:s,showDescription:r,description:i})=>!t&&!r?null:(0,o.jsxs)("div",{className:e,children:[t&&(0,o.jsx)(Re,{className:s,tagName:"h1",value:n}),r&&(0,o.jsx)(Re,{className:Nt("lesson-description").toString(),value:i})]}),Ime=({backgroundCovers:e,composition:t,header:n,overlayText:s,renderedBlocks:r,isPresentationCourse:i,isMultimediaSlide:a,isChartSlide:c,isGridSlide:l})=>{if(t?.isFullWidthBleed)return(0,o.jsxs)(o.Fragment,{children:[n,(0,o.jsx)("div",{className:Nt("full-image"),children:r})]});if(t?.isOverlay)return(0,o.jsxs)("div",{className:Nt("composition",{overlay:!0,bleed:!0}),children:[(0,o.jsx)("div",{className:Nt("composition-image"),children:r}),s]});if(t){const d=t.imagePosition==="left"?["image","text"]:["text","image"];return(0,o.jsx)("div",{className:Nt("composition",{bleed:t.isFullBleed,"image-left":t.imagePosition==="left","image-right":t.imagePosition==="right"}),children:d.map(h=>h==="image"?(0,o.jsx)("div",{className:Nt("composition-image"),children:r},"image"):(0,o.jsx)("div",{className:Nt("composition-text"),children:n},"text"))})}return i?(0,o.jsxs)(o.Fragment,{children:[n,a||c?r:(0,o.jsx)("div",{className:Nt("body",{grid:l}),children:r})]}):(0,o.jsxs)(o.Fragment,{children:[n,(0,o.jsxs)("div",{className:Nt("blocks-container"),children:[e,r]})]})};function Tme(e,t,n){if(n)return Nt("connected-blocks");const s=t.blocks?.find(l=>l.settings?.backgroundType===re.IMAGE),r=e.settings?.backgroundType===re.IMAGE,i=cue(e.family??"",e.variant??"");return Nt("connected-blocks",{"min-half-height":s&&(r&&!i)})}const Lme=({loadMedia:e,onContinue:t,previewType:n,ref:s,revealTargetBlockId:r,slide:i})=>{const a=le(),c=ao()??"",l=ud(c),{animateBlockEntrance:d}=a,h=i?.lastBlock,m=(0,u.useCallback)(ge=>{ge===h?.id&&t()},[h,t]);if(!i)return null;const{blocks:f,lessonTitle:p,lessonDescription:g,shouldShowAnimation:v=d,shouldShowTitle:x=!0,shouldShowDescription:b=!0,shouldShowFill:y=!0,shouldShowLogo:T=!0,imageTextLayout:S,overlaySettings:I,titleVariant:L}=i,E=r==null?-1:f.findIndex(ge=>String(ge.id??ge.blockId)===String(r)),k=Fr(a),N=i.blocks?.[0],R=N?W0(N):null,M=oI(R??void 0),{showFill:A,showIcons:j}=use(R??void 0),P=k&&!S?i.blocks?.[0]?.family:void 0,w=k&&!S&&xse(i.blocks?.[0]),D=Nt("inner",{"column-fill":k&&M&&A,"column-icons":k&&M&&j,presentation:k}),O=Nt("lesson-title",{heading:L==="heading",subheading:L==="subheading"}).toString(),B=Nt("lesson",{slides:!0,"touch-preview":Vc(n),media:P==="multimedia",chart:P==="chart"}).toString(),H=i.blocks.length===1,{settings:_,type:$,variant:z}=i.blocks?.[0]??{},K=!H||k?"none":_?.backgroundType===re.IMAGE?"image-background":yme.includes(`${$} ${z}`)?"legacy":"none",J=K!=="none"?Nt("full-width-image",{legacy:K==="legacy",background:K==="image-background"}):null,Y=x&&p,G=uI(S)&&b&&g,F=(0,o.jsx)(t9,{className:Nt("lesson-header").toString(),description:g,showDescription:!!G,showTitle:!!Y,title:p,titleClassName:O}),U=(0,o.jsx)(t9,{className:Nt("composition-overlay-text").toString(),description:g,showDescription:!!G,showTitle:!!Y,title:p,titleClassName:O}),Q=S?vse(S):void 0,Z=!Q&&v,q=f.map((ge,he)=>{const Ne=E!==-1&&he<=E;return H||Ne?!1:aT({blocks:i.blocks,lessonProgress:l,currentBlockIndex:he})}),te=f.map((ge,he)=>{const Ne=q[he],be=J||Tme(ge,i,k),de={...ge,blockId:ge.blockId??ge.id};if(!xme(de))return null;const Qe=de,zt=W0(ge),on=Qe.blockId===h?.id,Ze=!k&&!J&&zt?(0,o.jsx)(Gu,{block:zt,children:(0,o.jsx)(Sme,{className:Nt("block-background"),hasSingleBlock:H})}):null;return(0,o.jsx)(C1,{animateBlockEntrance:Z,backgroundBefore:Ze,block:Qe,className:be,defaultBackgroundColor:A1,hideBlock:Ne,index:he,isLastBlock:on,isOnlyBlockInStep:H,lessonId:c,loadMedia:e,onContinue:m},Qe.blockId)}),ne=f.filter((ge,he)=>!q[he]),ae=!k&&!J&&ne.length>=3,ue=ae?W0(ne[0]):null,Te=ae?W0(ne[ne.length-1]):null,we=ue&&Te?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Gu,{block:ue,children:(0,o.jsx)(e9,{className:Nt("background-top-cover")})}),(0,o.jsx)(Gu,{block:Te,children:(0,o.jsx)(e9,{className:Nt("background-bottom-cover")})})]}):null,W=(0,o.jsx)(Ime,{backgroundCovers:we,composition:Q,header:F,isChartSlide:P==="chart",isGridSlide:w,isMultimediaSlide:P==="multimedia",isPresentationCourse:k,overlayText:U,renderedBlocks:te}),ie=(0,o.jsxs)("div",{className:D,style:Q?.isOverlay?fI(I):void 0,children:[(0,o.jsx)("div",{className:B,ref:s,children:W}),(0,o.jsx)(gme,{showLogo:T})]});return k?(0,o.jsx)(Xre,{showFill:y,children:(0,o.jsx)(Cme,{children:ie})}):(0,o.jsx)("div",{className:Nt("wrapper"),children:ie})},K0=625,Eme=100;function kme({isPresentationCourse:e,reduceMotion:t}){return(t||e?.01:K0)+Eme}const n9="ease",s9=(e,t)=>{t!=null&&(e.currentTime=(1-t)*K0)},Nme=(e,{phase:t,direction:n,reducedMotion:s,fromProgress:r})=>{if(s||typeof e.animate!="function")return null;if(t==="enter"){const c=n==="forward"?"100vh":"-100%",l=e.animate([{opacity:0,transform:`translateY(${c})`},{opacity:1,transform:"translateY(0)"}],{duration:K0,easing:n9});return s9(l,r),Uu(l)}const i=n==="forward"?"-100vh":"100%",a=e.animate([{opacity:1,transform:"translateY(0)"},{opacity:0,transform:`translateY(${i})`}],{duration:K0,easing:n9,fill:"forwards"});return s9(a,r),Uu(a)};function wme({currentLessonRef:e,isPresentationCourse:t,numberOfSlides:n,onContinue:s,onCurrentLessonElChange:r,onSlideEntered:i,onTransitioningChange:a,previewType:c,revealTargetBlockId:l,slideIndex:d,slides:h}){const m=(0,u.useRef)(0),f=(0,u.useRef)(d),p=(0,u.useCallback)(y=>{e.current=y,r?.(y)},[e,r]);f.current!==d&&(m.current=e.current?.getBoundingClientRect()?.top??0,f.current=d);const g=h.length>0?Math.max(0,Math.min(d,h.length-1)):0,{presence:v,isTransitioning:x,mediaOwnerInstanceId:b}=W5({current:g,animate:(y,T)=>t?null:Nme(y,T),getDirection:(y,T)=>T>y?"forward":"backward",initialStatus:"present",animationTimeoutMs:825,onEntered:()=>{i()}});return(0,u.useEffect)(()=>{a(x)},[x,a]),(0,o.jsxs)(o.Fragment,{children:[v.map(y=>{const T=h[y.key],S=y.status==="exiting";return(0,o.jsx)("div",{ref:y.ref,style:S?{insetInline:0,position:"absolute",top:m.current,zIndex:0}:{position:"relative",zIndex:1},children:(0,o.jsx)(Lme,{loadMedia:y.instanceId===b,onContinue:s,previewType:c,ref:S?void 0:p,revealTargetBlockId:S?void 0:l,slide:T})},y.instanceId)}),(0,o.jsx)("div",{className:"visually-hidden-always",id:"step-counter",style:{insetBlockStart:0},children:n>0&&`Step ${g+1} of ${n}`})]})}var cl=C(49860);const jme=50,Ame=1e3,Rme=({onSwipeDownHandler:e,onSwipeUpHandler:t,target:n,timeoutDuration:s=Ame})=>{const[r,i]=cl.useState(!1),a=cl.useRef(void 0),c=cl.useCallback(()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),s)},[s]),l=cl.useCallback(d=>{const h=Math.abs(d.deltaY);if(r)h<jme?(a.current&&clearTimeout(a.current),i(!1)):c();else if(h>100){const m=d.deltaY>0?e:t;i(!0),c(),m()}},[c,r,e,t]);cl.useEffect(()=>{if(!(!n||!t||!e))return n.addEventListener("wheel",l,{passive:!0}),()=>{a.current&&clearTimeout(a.current),n?.removeEventListener?.("wheel",l,{passive:!0})}},[e,t,l,n])},o9="rise-presenter-sync",S5e="presenterMode",Pme="slide",Mme="NAVIGATE_TO_SLIDE",Ome="SLIDE_CHANGE",Bme="PRESENTER_VIEW_EXIT";function Dme(){if(!(typeof BroadcastChannel>"u"))try{const e=new BroadcastChannel(o9);e.postMessage({type:Bme}),setTimeout(()=>{e.close()},0)}catch{}}let R1=null;function I5e(e){R1=e}function Fme(){const e=R1;if(R1=null,!!e)try{e.closed||e.close()}catch{}}function T5e(){Fme(),Dme()}function _me(e){const t=new URLSearchParams(e).get(Pme);if(t==null)return 0;const n=Number(t);return Number.isFinite(n)&&n>=0?n:0}function Hme(){const e=window.location.hash.split("?")[1]||"";return _me(e)}var L5e;const Vt=V("lesson-one-page-slides"),Vme=V("page-wrap"),Q0=e=>e,zme=e=>{if(e!=null&&"blockNavigationStyle"in e){const t=e.blockNavigationStyle;return typeof t=="string"?t:void 0}},$me=e=>"previewShowAllPresentationLogos"in e&&e.previewShowAllPresentationLogos===!0,Ume=e=>We(e)&&(typeof e.id=="string"||typeof e.id=="number");function P1(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("type"),s=e.getAttribute("role"),r=e.tabIndex,i=t==="button"||["div","span"].includes(t)&&(s==="button"||r===0),a=t==="input"&&["radio","text"].includes(n??"")||t==="textarea"||s==="radio",c=["audio","video"].includes(t),l=s==="tab",d=document.querySelector(".quiz-card__interactive")?.contains?.(e)??!1;return i||a||c||l||d}const Gme=["button","checkbox","color","file","hidden","image","radio","range","reset","submit"];function r9(e){if(P1(e))return!0;if(!(e instanceof HTMLElement))return!1;const t=e.tagName.toLowerCase(),n=e.getAttribute("role"),s=e.getAttribute("type");return e.isContentEditable||n==="textbox"||t==="input"&&!Gme.includes(s??"")||(n==="slider"||n==="spinbutton"||t==="input"&&s==="range")}const i9=(e,t)=>(n,s,r)=>iT(n,r.slice(0,-1),e,void 0,t),Wme=(e,t)=>({disabled:n,slides:s},r)=>{const i=r.filter(d=>e[d.id]!=null).map(d=>({...d,...e[d.id]})),a=r[r.length-1],c=n||rue(i)||iue(i,t),l={blocks:i,lastBlock:a,disabled:n};return{disabled:c,slides:[...s,l]}},Z0=e=>{let t=!1,n=!1;if(e){const{clientHeight:s,scrollHeight:r,scrollTop:i}=e,a=Math.max(0,i),c=r-a;t=c===r,n=c-5<=s}return{isAtTop:t,isAtBottom:n}},Kme=/,? +/,Qme=[],Zme=({lessonProgress:e,previewType:t})=>{const{announcePolite:n,clearAnnouncements:s}=Ms(),r=(0,u.useRef)(null),i=(0,u.useRef)(null),a=(0,u.useRef)(null),[c,l]=(0,u.useState)(null),[d,h]=(0,u.useState)(null),m=(0,u.useCallback)(ee=>{a.current=ee,l(ee)},[]),f=(0,u.useRef)(null),p=(0,u.useRef)(null),g=(0,u.useRef)(null),v=(0,u.useRef)(null),x=(0,u.useRef)(null),b=(0,u.useRef)(null),y=(0,u.useRef)(0),T=(0,u.useRef)(0),S=(0,u.useRef)(void 0),I=hn(),L=it(),[E,k]=(0,u.useState)(()=>Hme()),[N,R]=(0,u.useState)(null),[M,A]=(0,u.useState)(!1),[j,P]=(0,u.useState)(!1),[w,D]=(0,u.useState)(!1),O=(0,ze.A)(j),B=(0,ze.A)(w),H=yn(),{lessons:_,...$}=le()||{},z=Fr($),K=$me($),J=_r($),Y=io($),G=zme($?.theme)||Kh.DOTS,F=_?.[0],U=F?.items||Qme,Q=dT()||M;(0,u.useEffect)(()=>{const ee=ye=>{if(ye.origin!==window.location.origin)return;(Array.isArray(ye.data)?ye.data:[ye.data]).forEach(Dt=>{We(Dt)&&Dt.type==="preview:lessonUpdate"&&A(!0)})};return window.addEventListener("message",ee),()=>window.removeEventListener("message",ee)},[]);const Z=(0,u.useCallback)(()=>{const ee=(a.current?.scrollHeight??0)>(a.current?.clientHeight??0),{isAtBottom:ye}=Z0(a.current),lt=ee&&!j&&!ye;lt!=w&&D(lt)},[w,j]);Ru(d,Z),(0,u.useLayoutEffect)(Z,[j]);const q=(0,u.useCallback)(()=>{a.current?.scrollTo({top:0})},[]);(0,u.useLayoutEffect)(()=>{q()},[E,q]);const te=(0,u.useRef)(null),[,ne]=(0,u.useState)(0),ae=(0,u.useCallback)(ee=>{te.current=ee,ne(ye=>ye+1)},[]);(0,u.useLayoutEffect)(()=>{const ee=te.current;if(ee==null)return;const ye=a.current,lt=ye?.querySelector(`[data-block-id="${ee}"]`);if(ye==null||lt==null)return;te.current=null;let Dt=0,$t=lt;for(;$t instanceof HTMLElement&&$t!==ye&&ye.contains($t);)Dt+=$t.offsetTop,$t=$t.offsetParent;ye.scrollTo({top:Dt})});const ue=$?.theme,Te=(0,u.useMemo)(()=>{const lt=(Q?U:b1([],U,e,ue)).map(i9(e,ue)).filter(Dt=>Dt!==null);return Object.fromEntries(lt.map(Dt=>[Dt.blockId,Dt]))},[U,e,ue,Q]),we=(0,u.useCallback)(ee=>{const ye={disabled:!1,slides:[]},{slides:lt}=ee.reduce(Wme(Te,e),ye);return lt},[Te,e]),W=(0,u.useMemo)(()=>z?(_??[]).filter(ee=>ee?.type==="slide"):[],[z,_]),ie=(0,u.useMemo)(()=>z?W.map(ee=>{const ye=ee.items.map(i9(e,ue));return{blocks:ye,lastBlock:ye[ye.length-1],lessonTitle:ee?.title,lessonDescription:ee?.description,shouldShowTitle:ase(ee),shouldShowDescription:gse(ee),shouldShowAnimation:dse(ee),shouldShowFill:cse(ee),imageTextLayout:dI(ee),overlaySettings:Ag(ee),shouldShowLogo:K||lse(ee,ue?.showLogo??!0),titleVariant:Ase(ee),disabled:!1}}):Eh(U,rT,we),[z,K,W,U,we,e,ue]),ge=(0,u.useMemo)(()=>ie.map(ee=>ee.disabled),[ie]),he=(0,u.useMemo)(()=>rT(U),[U]);(0,u.useEffect)(()=>{y.current=E},[E]),(0,u.useEffect)(()=>{T.current=ie.length,ie.length>0&&E>=ie.length&&k(ie.length-1)},[ie.length,E]),(0,u.useEffect)(()=>{if(!z)return;const ee=W[E];if(!ee)return;const ye=S.current;ye!=null&&ye!==ee.id&&kr(ye),_a(ee.id),L(Pr(ee.id)),S.current=ee.id,window.parent.postMessage({type:"slide:change",data:String(ee.id)},"*")},[E,z,W,L]),(0,u.useEffect)(()=>()=>{const ee=S.current;ee!=null&&kr(ee)},[]);const Ne=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!J)return;const ee=F?.id;if(ee)return _a(ee),Ne.current=ee,()=>{const ye=Ne.current;ye!=null&&kr(ye)}},[J,F?.id]);const be=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!Y)return;const ee=F?.id;if(ee)return _a(ee),be.current=ee,()=>{const ye=be.current;ye!=null&&kr(ye)}},[Y,F?.id]),(0,u.useEffect)(()=>{if(!(!z||typeof BroadcastChannel>"u"))try{x.current||(x.current=new BroadcastChannel(o9));const ee=x.current,ye=lt=>{if(lt.data.type===Mme){const Dt=lt.data.slideIndex,$t=Math.min(Dt,T.current-1);$t>=0&&b.current&&b.current($t)}};return ee.addEventListener("message",ye),()=>{ee.removeEventListener("message",ye)}}catch{}},[z,I]),(0,u.useEffect)(()=>{if(!(!z||!x.current))try{x.current.postMessage({type:Ome,slideIndex:E})}catch{}},[z,E]),(0,u.useEffect)(()=>()=>{x.current?.close(),x.current=null},[]);const de=ie.length,Qe=de>0?Math.min(E,de-1):0,zt=w6("slide"),on=z?W[Qe]:void 0,Ze=Vc(t),rn=G!==Kh.NONE,rt=de===0||Qe===de-1,tt=e?.isComplete,wt=w||rt?!tt||!0:ge[Qe+1],He=!w&&!rt,Pe=He&&!wt,Me=rt&&!0,jt=(0,ze.A)(Me),as=w&&!rt,Ks=(0,u.useCallback)(l0()(Z,100),[Z]);(0,u.useEffect)(()=>{const ee=a.current;return ee?.addEventListener("scroll",Ks,{passive:!0}),()=>ee?.removeEventListener("scroll",Ks)},[Ks]),(0,u.useEffect)(()=>{document.activeElement===g.current?!B&&w?p.current?.focus({preventScroll:!0}):!jt&&Me&&v.current?.focus({preventScroll:!0}):document.activeElement===p.current&&B&&!w&&g.current?.focus({preventScroll:!0})},[w,B,jt,O,Me,j]);const ul=hU(),_1=(0,u.useRef)(!1);(0,u.useEffect)(()=>{ul&&(_1.current=!0)},[ul]),(0,u.useEffect)(()=>{const ee=()=>{_1.current=!1};return document.addEventListener("pointerdown",ee,!0),document.addEventListener("keydown",ee,!0),()=>{document.removeEventListener("pointerdown",ee,!0),document.removeEventListener("keydown",ee,!0)}},[]);const H1=(0,u.useCallback)(()=>{_1.current||a.current?.focus?.()},[]);(0,Oc.A)(()=>{aS(),H1()});const Un=(0,u.useCallback)(ee=>{const ye=Math.max(0,Math.min(ee,ie.length-1));if(ye===y.current){q();return}k(ye)},[q,ie.length]),L9=ee=>{const ye=he.findIndex(Dt=>Dt.some($t=>String($t.id)===String(ee)));if(ye===-1)return;const lt=he[ye].find(Dt=>String(Dt.id)===String(ee));R(lt?.id??ee),ae(lt?.id??ee),F?.id!=null&&!Q&&cT(U,lt?.id??ee,e).forEach($t=>{Ume($t)&&L(bi({blockId:$t.id,items:$t.items??[],lessonId:F.id}))}),ye!==E&&Un(ye)},eh=(0,u.useRef)(L9);(0,u.useEffect)(()=>{eh.current=L9});const[Fpe]=(0,Be.ok)(),V1=Fpe.get(Bc);(0,u.useEffect)(()=>{V1!=null&&eh.current(V1)},[V1]),lT(({lessonId:ee,blockId:ye})=>{(F?.id==null||ee===String(F.id))&&eh.current(ye)});const hl=(0,u.useCallback)(()=>{j||(P(!0),ho(()=>{I("/")},"lesson-to-one-page-cover-stepped"))},[I,j]),_pe=$?.exportSettings?.webExportSettings,ml=z||!!(!Cs.isInstantLink&&($?.lmsOptions?.disableCoverPage||_pe?.disableCoverPage)),th=E===0&&ml,z1=(0,u.useCallback)(ml?()=>Un(0):hl,[ml,Un,hl]);(0,u.useEffect)(()=>{b.current=Un},[Un]);const nh=(0,u.useCallback)(()=>{j||(E>0?Un(E-1):hl())},[Un,E,j,hl]),sh=(0,u.useCallback)(()=>{j||Un(E+1)},[Un,I,rt,E,j]),Hpe=(0,u.useCallback)(()=>{(E<de-1||rt&&!1)&&sh()},[rt,E,de,sh]),E9=(0,u.useCallback)(()=>{const ee=a.current?.scrollTop??0,ye=a.current?.clientHeight??0,lt=H?"instant":"smooth";a.current?.scrollTo({top:ee+ye,behavior:lt})},[H]),oh=(0,u.useCallback)(()=>{sh()},[sh]),Vpe=(0,u.useCallback)(()=>{E9()},[E9]),zpe=(0,u.useCallback)(ee=>{ee===E||j||(Un(ee),queueMicrotask(()=>{f.current?.querySelectorAll("[data-control]")?.[ee]?.focus?.()}))},[Un,E,j]),$pe=(0,u.useCallback)(()=>{setTimeout(()=>{if(i.current&&f.current?.contains?.(document.activeElement)){const ee=u1()(i.current.innerText,{length:75,separator:Kme});s(),n(`Content preview: ${ee}`)}else H1()},0)},[n,s,H1]),Ia=(0,u.useCallback)(()=>{if(Ze)return;const{isAtTop:ee}=Z0(a.current);if(ee){E===0?z1():nh();return}},[Ze,nh,E,z1]),Ta=(0,u.useCallback)(()=>{if(Ze||rt||wt)return;const{isAtBottom:ee}=Z0(a.current);if(ee){oh();return}},[rt,wt,Ze,oh]),Upe=(0,u.useCallback)(()=>{const{isAtBottom:ee,isAtTop:ye}=Z0(a.current),lt=document.documentElement.clientWidth===window.innerWidth;return(ee||ye)&&lt},[]),Gpe=(0,u.useCallback)(ee=>{!f.current?.contains?.(document.activeElement)&&!P1(ee.target)&&Ia()},[Ia]),Wpe=(0,u.useCallback)(ee=>{!f.current?.contains?.(document.activeElement)&&!P1(ee.target)&&Ta()},[Ta]),Kpe=(0,u.useCallback)(ee=>{z&&!f.current?.contains?.(document.activeElement)&&!r9(ee.target)&&Ia()},[z,Ia]),Qpe=(0,u.useCallback)(ee=>{z&&!f.current?.contains?.(document.activeElement)&&!r9(ee.target)&&Ta()},[z,Ta]),fl=(0,u.useCallback)(ee=>{ee===-1||ee===E||Un(ee)},[Un,E]),$1=(0,u.useCallback)(ee=>{const ye=W.findIndex(({id:lt})=>String(lt)===String(ee.detail.lessonId));fl(ye)},[fl,W]),U1=(0,u.useCallback)(ee=>{const{itemId:ye,lessonId:lt}=ee.detail;if(!z){ye!=null&&eh.current(ye);return}const Dt=ye==null?-1:ie.findIndex($t=>$t.blocks.some(G1=>("blockId"in G1?G1.blockId:G1.id)===ye));if(Dt!==-1){fl(Dt);return}fl(W.findIndex(({id:$t})=>String($t)===String(lt)))},[z,fl,W,ie]);(0,u.useEffect)(()=>(window.addEventListener(Nf,$1),window.addEventListener(Je,U1),()=>{window.removeEventListener(Nf,$1),window.removeEventListener(Je,U1)}),[U1,$1]),(0,U0.A)("ArrowUp",Q0,Gpe),(0,U0.A)("ArrowDown",Q0,Wpe),(0,U0.A)("ArrowLeft",Q0,Kpe),(0,U0.A)("ArrowRight",Q0,Qpe),Rme({target:c,onSwipeUpHandler:Ia,onSwipeDownHandler:Ta,timeoutDuration:kme({isPresentationCourse:z,reduceMotion:H})});const Zpe=Vt("gradient",{visible:w}),Ype=(0,o.jsxs)("nav",{"aria-label":"Slide navigation",className:Vt("presentation-controls"),ref:f,children:[(0,o.jsxs)("button",{"aria-disabled":E===0&&ml,className:Vt("presentation-btn"),onClick:E===0&&ml?void 0:nh,type:"button",children:[(0,o.jsx)(ce,{classNameIcon:Vt("presentation-arrow-icon"),name:"chevron-left"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),(0,o.jsx)("span",{"aria-hidden":!0,className:Vt("counter"),children:`${Qe+1} / ${de}`}),(0,o.jsxs)("button",{"aria-disabled":!Pe,className:Vt("presentation-btn"),onClick:Pe?oh:void 0,ref:g,type:"button",children:[(0,o.jsx)(ce,{classNameIcon:Vt("presentation-arrow-icon"),name:"chevron-right"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Go to next step"})]})]});return(0,o.jsxs)("div",{className:Vt({}),children:[(0,o.jsx)("div",{className:Vme({transitioning:j}),id:"page-wrap",ref:m,tabIndex:-1,children:(0,o.jsx)("div",{className:"page","data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper",children:(0,o.jsx)("div",{className:"page__content",children:(0,o.jsx)(Gr,{children:(0,o.jsxs)("div",{"data-lesson-id":F?.id,children:[z?Ype:(0,o.jsxs)("nav",{"aria-label":"Step navigation",className:Vt("controls",{"touch-preview":Ze}),ref:f,children:[(0,o.jsxs)("button",{"aria-disabled":th,"aria-hidden":th,className:Vt("prev-btn",{"touch-preview":Ze}),onClick:th?void 0:nh,tabIndex:th?-1:void 0,type:"button",children:[(0,o.jsx)(ce,{classNameIcon:Vt("arrow-icon",{"touch-preview":Ze}),name:"arrow-up"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Previous"})]}),rn&&(0,o.jsx)(pme,{activeSlideIndex:E,blockNavigationStyle:G,numberOfSlides:de,onGoToCover:hl,onSlideClick:zpe,previewType:t,slideDisabledState:ge}),(0,o.jsxs)("div",{className:Vt("next-btns"),children:[(0,o.jsxs)("button",{"aria-disabled":!as,"aria-hidden":!as,className:Vt("page-down-btn",{"touch-preview":Ze}),onClick:as?Vpe:void 0,ref:p,tabIndex:as?void 0:-1,type:"button",children:[(0,o.jsx)(ce,{classNameIcon:Vt("arrow-icon",{"touch-preview":Ze}),name:"arrow-down"}),(0,o.jsxs)("span",{className:"visually-hidden-always",children:["Scroll page down",!w&&(0,o.jsx)("span",{children:"(disabled because this is the bottom of the page)"}),rt&&(0,o.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,o.jsxs)("button",{"aria-disabled":wt,"aria-hidden":!He,className:Vt("next-btn",{"touch-preview":Ze}),onClick:!He||wt?void 0:oh,ref:g,tabIndex:He?void 0:-1,type:"button",children:[(0,o.jsx)(ce,{classNameIcon:Vt("arrow-icon",{"touch-preview":Ze}),name:"arrow-down"}),(0,o.jsxs)("span",{className:"visually-hidden-always",children:["Go to next step",wt&&(0,o.jsx)("span",{children:"(disabled until content is completed)"}),rt&&(0,o.jsx)("span",{children:"(disabled since this is the last step)"})]})]}),(0,o.jsxs)("button",{"aria-disabled":!Me,"aria-hidden":!Me,className:Vt("restart-btn",{"touch-preview":Ze}),onClick:Me?z1:void 0,ref:v,tabIndex:rt?void 0:-1,type:"button",children:[(0,o.jsx)(ce,{classNameIcon:Vt("restart-icon",{"touch-preview":Ze}),name:"arrow-rotate-left"}),(0,o.jsx)("span",{className:"visually-hidden-always",children:"Restart"})]})]})]}),(0,o.jsxs)(Bu,{onShouldRecognizeGesture:Upe,onSwipeDown:Ia,onSwipeUp:Ta,children:[(0,o.jsx)("main",{"aria-describedby":"step-counter",ref:i,tabIndex:z?-1:0,children:(0,o.jsx)(wme,{currentLessonRef:r,isPresentationCourse:z,numberOfSlides:de,onContinue:Hpe,onCurrentLessonElChange:h,onSlideEntered:$pe,onTransitioningChange:P,previewType:t,revealTargetBlockId:N,slideIndex:Qe,slides:ie})}),(0,o.jsx)("div",{className:Zpe})]})]})})})})})}),zt&&on!=null&&(0,o.jsx)("div",{className:Vt("presentation-comment"),children:(0,o.jsx)(Jn,{anchor:mQ(on.id),label:"Comments on slide"},String(on.id))})]})},Yme=e=>!!e&&e.type==="videoCheckpoint"&&e.family==="videoCheckpoint"&&e.variant==="videoCheckpoint",M1=1e3,qme=3,Xme=/^\d+(?:\.\d+)?$/,a9=/^\d+$/,Jme=/^\d{2}(?:\.\d{1,3})?$/,Y0=e=>{if(!Number.isFinite(e))return 0;const t=10**qme;return Math.max(0,Math.round(e*t)/t)},O1=e=>e.toString().padStart(2,"0"),efe=e=>e!=null&&typeof e=="object"?e.time:void 0,k5e=e=>{const t=Math.round(Y0(e)*M1),n=Math.floor(t/36e5),s=Math.floor(t%36e5/6e4),r=Math.floor(t%6e4/1e3),i=t%M1,a=i===0?"":`.${i.toString().padStart(3,"0")}`;return n>0?`${n}:${O1(s)}:${O1(r)}${a}`:`${Math.floor(t/6e4)}:${O1(r)}${a}`},tfe=e=>{const t=e.split(":");if(t.length!==2&&t.length!==3)return null;const[n,s,r]=t.length===3?[t[0],t[1],t[2]]:[null,t[0],t[1]];if(n!=null&&!a9.test(n)||!a9.test(s)||!Jme.test(r))return null;const i=n==null?0:Number.parseInt(n,10),a=Number.parseInt(s,10),[c,l=""]=r.split("."),d=Number.parseInt(c,10);if(t.length===3&&a>=60||d>=60)return null;const h=l.length===0?0:Number.parseInt(l.padEnd(3,"0"),10)/M1;return Y0(i*3600+a*60+d+h)},N5e=e=>{const t=e.trim();return t.length===0?null:Xme.test(t)?Y0(Number.parseFloat(t)):tfe(t)},Ws=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return"timestamp";const n=Reflect.get(t,"settings");if(n==null||typeof n!="object")return"timestamp";const s=Reflect.get(n,"placement");return s==="start"||s==="end"?s:"timestamp"},w5e=e=>Ws(e)!=="timestamp",nfe=e=>{const t=e!=null&&"checkpoint"in e?e.checkpoint:e;if(t==null||typeof t!="object")return!1;const n=Reflect.get(t,"settings");return n==null||typeof n!="object"?!1:Reflect.get(n,"required")===!0},j5e=e=>e==="timestamp"?{}:{placement:e},Io=e=>{let t;e!=null&&"checkpoint"in e?t=efe(e.checkpoint):e!=null&&"time"in e&&(t=e.time);const n=typeof t=="number"?t:Number.parseFloat(String(t));return Y0(n)},sfe=null,ofe=e=>{const t=e?.blocks??[];return nfe(e)?t.filter($de):t.filter(Wa)},rfe=e=>(e?.blocks??[]).filter(t=>g1(t).trackExit),A5e=e=>e.family==="interactive-fullscreen"||e.family==="360"?!1:!(e.family==="multimedia"&&sfe.has(e.variant)),ll=(e,t,n)=>{if(e==null||typeof e!="object")return n;const s=Reflect.get(e,t);return typeof s=="string"&&s.trim().length>0?s:n},ife=(e,t)=>{if(typeof e=="string"){const n=e.trim();if(n.length>0)return n}return t},R5e=e=>{const t=e.filter(s=>Ws(s)==="timestamp").map((s,r)=>({id:s.checkpoint.id,time:Io(s),documentIndex:r})).sort((s,r)=>s.time-r.time||s.documentIndex-r.documentIndex),n=new Map;return t.forEach((s,r)=>{n.set(s.id,r+1)}),n},afe=(e,t)=>t==null?null:e.find(n=>En(n.checkpoint.id,t)||n.blocks.some(s=>En(s.id,t)))??null,cfe=e=>[...new Set(e.filter(t=>Ws(t)==="timestamp").map(t=>Io(t)))].sort((t,n)=>t-n),P5e=(e,t)=>{const n=[...e].sort((s,r)=>Io(s)-Io(r)).find(s=>Io(s)>t);return{insertBeforeItemId:n?.checkpoint.id??null,insertAtEnd:n==null}},lfe=e=>{const t=e[0]??null,n=t==null?e:e.slice(1),s=[],r=[];let i=null;n.forEach(c=>{if(Yme(c)){i!=null&&r.push(i),i={checkpoint:c,blocks:[]};return}if(i!=null){i.blocks.push(c);return}s.push(c)}),i!=null&&r.push(i);const a=r.length===0?e:[...t==null?[]:[t],...s];return{videoBlock:t,leadingBlocks:s,checkpointGroups:r,inlineBlocks:a}},q0=V("video-checkpoint-player");function dfe({activeGroup:e,animateBlockEntrance:t,hasQueuedCheckpoints:n=!1,lessonId:s,loadMedia:r,onCheckpointCompleted:i,onCheckpointDismissed:a}){const c=Ce(),l=ud(s),d=it(),h=(0,u.useRef)(!1),m=(0,u.useCallback)(()=>{if(e!=null)for(const O of rfe(e))hr(O.id,l)||d(bi({blockId:O.id,lessonId:s,items:[]}))},[e,d,s,l]),f=(0,u.useCallback)(()=>{e==null||h.current||(h.current=!0,m(),i?.(e))},[e,m,i]),p=(0,u.useCallback)(()=>{h.current||(h.current=!0,m(),a?.())},[m,a]);(0,u.useEffect)(()=>{e!=null&&(h.current=!1)},[e]);const g=(0,u.useId)(),[v,x]=(0,u.useState)(!1),b=(0,u.useCallback)(()=>x(!0),[]),y=(0,u.useCallback)(()=>x(!1),[]),T=(0,u.useMemo)(()=>ofe(e),[e]),S=(0,u.useMemo)(()=>new Set(T.map(O=>O.id)),[T]),I=T.some(O=>!hr(O.id,l)),L=ll(c,"videoCheckpointLocked","Complete the activities above to continue."),E=ct();if(e==null)return null;const k=Io(e),N=Zg(k),R=Ws(e),M=R!=="timestamp",A=ll(c,"videoCheckpointDefaultTitle","Checkpoint"),j=ife(E(e.checkpoint?.title),A),P=e.blocks??[];let w;n?w=ll(c,"videoCheckpointContinue","Continue"):R==="start"?w=ll(c,"videoCheckpointStartDismiss","Start video"):R==="end"?w=ll(c,"videoCheckpointDone","Done"):w=c?.videoCheckpointResume||"Resume video";const D=j;return(0,o.jsx)(Bp,{className:q0(),darkOverlay:!0,"data-testid":"video-checkpoint-overlay",disableCloseOnEscape:I,disableCloseOnOverlayClick:I,disabledCloseButton:I,disabledCloseButtonMessage:L,focusHeadingOnOpen:!0,footer:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Fs,{elementFocused:I&&v,message:I?L:void 0,renderInModalWhenPresent:!0,children:(0,o.jsxs)("button",{"aria-describedby":I?g:void 0,"aria-disabled":I||void 0,className:q0("resume",{locked:I}),onBlur:y,onClick:I?void 0:f,onFocus:b,type:"button",children:[w,(0,o.jsx)(Hf,{className:q0("resume-icon")})]})}),I&&(0,o.jsx)("span",{className:"visually-hidden-always",id:g,children:L})]}),heading:D,onCancel:I||R!=="timestamp"?void 0:f,onClose:I?mn:R==="end"?f:p,subText:M?void 0:`${c?.videoCheckpointPausedAt||"Paused at"} ${N}`,children:(0,o.jsx)("div",{className:q0("blocks"),"data-testid":"video-checkpoint-content",children:P.map((O,B)=>(0,o.jsx)(C1,{animateBlockEntrance:t,block:{...O,blockId:O.id,requiresInteraction:S.has(O.id)||void 0},hideBlock:!1,index:B,isLastBlock:B===P.length-1,lessonId:s,loadMedia:r,onContinue:mn},`checkpoint-overlay-${O.id}`))})})}const ufe=({checkpointId:e,placement:t,lessonId:n})=>{const s=(0,u.useRef)({placement:t,lessonId:n});s.current={placement:t,lessonId:n},(0,u.useEffect)(()=>{e!=null&&u4({type:"video:checkpoint",data:{lessonId:s.current.lessonId,checkpointId:e,placement:s.current.placement}})},[e])},c9=(e,t,n)=>{gn($y({event:e,properties:{checkpoint_id:t.checkpoint.id,checkpoint_time:Io(t),checkpoint_placement:Ws(t),lesson_id:n}}))},hfe=e=>e?.containerElement?.querySelector("video")??null;function mfe(e,t,n){const s=(0,u.useRef)(null),[r,i]=(0,u.useState)(null),a=(0,u.useMemo)(()=>e.find(P=>P.checkpoint.id===r)??null,[e,r]),c=(0,u.useRef)([]),[l,d]=(0,u.useState)(!1),h=(0,u.useRef)(!1),m=(0,u.useRef)(null),{startGroups:f,endGroups:p}=(0,u.useMemo)(()=>{const P=[],w=[];return e.forEach(D=>{const O=Ws(D);O==="start"?P.push(D):O==="end"&&w.push(D)}),{startGroups:P,endGroups:w}},[e]),g=(0,u.useMemo)(()=>cfe(e),[e]);ufe({checkpointId:r,placement:a&&Ws(a),lessonId:t});const v=(0,u.useCallback)(P=>{Ws(P)==="timestamp"&&s.current?.seekToTime?.(Io(P)),s.current?.pause?.(),i(P.checkpoint.id),c9("Video Checkpoint Viewed",P,t)},[t]),x=(0,u.useCallback)(P=>{if(P.length===0)return;const[w,...D]=P;c.current=D.map(O=>O.checkpoint.id),d(D.length>0),v(w)},[v]),b=(0,u.useCallback)(P=>{c9("Video Checkpoint Completed",P,t);let w;for(;w==null&&c.current.length>0;){const O=c.current.shift();w=e.find(B=>B.checkpoint.id===O)}if(w!=null){d(c.current.length>0),v(w);return}d(!1),i(null);const D=Ws(P);if((D==="timestamp"||D==="start")&&s.current?.play?.(),D==="end"){const O=m.current;m.current=null,!h.current&&O!=null&&(h.current=!0,gn(Pr(O)))}},[e,t,v]),y=(0,u.useCallback)(()=>{c.current=[],d(!1)},[]),T=(0,u.useCallback)(()=>{y(),i(null)},[y]),S=(0,u.useRef)(r);S.current=r,(0,u.useEffect)(()=>{const P=w=>{const D=afe(e,w.detail?.blockId);if(D!=null){En(D.checkpoint.id,S.current)||(y(),v(D));return}T()};return window.addEventListener(Od,P),()=>window.removeEventListener(Od,P)},[e,y,T,v]);const[I,L]=(0,u.useState)(()=>!window.InstantLinks?.publicId||!window.InstantLinks?.isGuestbookEnabled?.()||window.guestbookEntry!=null);(0,u.useEffect)(()=>{if(!(I||!window.InstantLinks))return window.InstantLinks.onGuestbookCompleted=()=>L(!0),()=>{window.InstantLinks.onGuestbookCompleted=void 0}},[I]);const E=(0,u.useRef)(!1);(0,u.useEffect)(()=>{E.current||f.length===0||!I||(E.current=!0,x(f))},[f,x,I]);const k=(0,u.useRef)(p);k.current=p;const N=(0,u.useRef)(t);N.current=t;const R=(0,u.useRef)(null),M=(0,u.useRef)(null),A=(0,u.useRef)(!1);return{contextValue:(0,u.useMemo)(()=>({checkpointMarkerTimes:g,onTranscriptOpenChange:n,setVideoPlayerRef:P=>{s.current=P,R.current!=null&&M.current!=null&&(R.current.removeEventListener("ended",M.current),R.current=null,M.current=null);const w=hfe(P);if(w!=null){const D=()=>{if(A.current)return;A.current=!0;const O=N.current,B=k.current;B.length===0?!h.current&&O!=null&&(h.current=!0,gn(Pr(O))):O!=null&&(m.current=O),x(B)};w.addEventListener("ended",D),R.current=w,M.current=D}},onCheckpointReached:P=>{const w=e.filter(D=>Ws(D)==="timestamp"&&Io(D)===P);x(w)}}),[g,e,n,x]),activeCheckpointGroup:a,hasQueuedCheckpoints:l,handleCheckpointCompleted:b,handleCheckpointDismissed:T}}function ffe({animateBlockEntrance:e,checkpointGroups:t,children:n,lessonId:s,loadMedia:r,onTranscriptOpenChange:i}){const a=(0,u.useMemo)(()=>t.filter(f=>f.blocks.length>0),[t]),{contextValue:c,activeCheckpointGroup:l,hasQueuedCheckpoints:d,handleCheckpointCompleted:h,handleCheckpointDismissed:m}=mfe(a,s,i);return(0,o.jsxs)(zie,{value:c,children:[n,a.length>0&&(0,o.jsx)(dfe,{activeGroup:l,animateBlockEntrance:e,checkpointGroups:a,hasQueuedCheckpoints:d,lessonId:s,loadMedia:r,onCheckpointCompleted:h,onCheckpointDismissed:m})]})}const pfe=ffe;function gfe({onTranscriptOpenChange:e,...t}){const{inlineBlocks:n,checkpointGroups:s}=(0,u.useMemo)(()=>lfe(t.blocks),[t.blocks]);return(0,o.jsx)(pfe,{...t,checkpointGroups:s,onTranscriptOpenChange:e,children:(0,o.jsx)(y1,{...t,blocks:n})})}const vfe=gfe,l9=V("blocks-lesson-restart-button"),Cfe=({className:e,onClick:t})=>{const n=l9.mix(e);return(0,o.jsx)("button",{className:n,onClick:t,type:"button",children:(0,o.jsx)(ce,{classNameIcon:l9("icon"),name:"arrow-rotate-left"})})},ya=V("one-page-authors");function xfe({className:e}){const t=Ce(),n=Um(),s=_b(),r=d$();if(!s)return null;const i=n?.isPartnerContentAuthor&&r!=null,a=ya({}).mix(e);return i?(0,o.jsx)("div",{className:a,children:(0,o.jsx)("ul",{className:ya("list"),role:"list",children:r.map((c,l)=>(0,o.jsxs)("li",{className:ya("item"),role:"listitem",children:[(0,o.jsx)(d9,{avatarUrl:c?.image?dc({width:76,height:76,imageKey:c.image}):void 0}),(0,o.jsx)(u9,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:c?.name})]},l))})}):(0,o.jsxs)("div",{className:a,children:[(0,o.jsx)(d9,{avatarUrl:yt(s.avatar)}),(0,o.jsx)(u9,{a11yAuthorPrefix:t?.a11yAuthorPrefix,name:s.authorName})]})}function d9({avatarUrl:e}){return e?(0,o.jsx)("div",{className:ya("avatar"),style:{backgroundImage:`url(${e})`}}):(0,o.jsx)("div",{className:ya("avatar-fallback"),children:(0,o.jsx)(rp,{decorative:!0})})}function u9({a11yAuthorPrefix:e,name:t}){const n=t||"Unknown User",s=ya("name");return(0,o.jsxs)("div",{className:s.toString(),children:[(0,o.jsx)("span",{className:"visually-hidden-always",children:e}),(0,o.jsx)("span",{children:n})]})}const h9=xfe,m9=e=>typeof e?.key=="string",O5e=e=>m9(e?.video),bfe=60,yfe=e=>typeof e!="number"||!Number.isFinite(e)||e<=0?null:e,B1=e=>{if(!m9(e))return null;const{duration:t}=e;return yfe(t)},Sfe=e=>B1(e?.video)??B1(e?.tmp?.video)??B1(e?.customVideo),Ife=(e,t)=>{const n=e?.items[0]?.media;return n==null?null:Sfe(t(n))},Tfe=(e,t)=>{const n=Math.max(1,Math.round(e/bfe)),s=n===1?t?.coverMinute||"Minute":t?.coverMinutes||"Minutes";return`${n} ${s}`},Lfe=(e,t,n)=>{const s=new Date(e);if(Number.isNaN(s.getTime()))return null;const r=new Intl.DateTimeFormat(n,{month:"long",year:"numeric",timeZone:"UTC"}).format(s);return`${t?.coverUpdated||"Updated"} ${r}`},Efe=({authorName:e,durationSeconds:t,labels:n,locale:s="en",updatedAt:r})=>{const i=[];if(e&&i.push(e),t!=null&&i.push(Tfe(t,n)),r){const a=Lfe(r,n,s);a&&i.push(a)}return i},kfe=V("one-page-video-meta");function Nfe({segments:e}){return(0,o.jsx)(o.Fragment,{children:e.map((t,n)=>(0,o.jsxs)("span",{children:[n>0&&(0,o.jsxs)("span",{"aria-hidden":"true",className:kfe("separator"),children:[" ","\xB7"," "]}),t.content]},t.key))})}const wfe=e=>e!=null&&e.type==="multimedia"&&e.family==="multimedia"&&e.variant==="video",jfe=e=>e?.find(wfe),Afe=V("one-page-video-meta");function Rfe(){const e=le(),t=Um(),n=_b(),s=ct(),r=Ce(),{currentLocale:i}=at(),a=Efe({authorName:n?.authorName,durationSeconds:Ife(jfe(t?.type==="blocks"?t.items:void 0),s),labels:r,locale:i,updatedAt:e?.contentUpdatedAt??e?.updatedAt});if(a.length===0)return null;const c=a.map((l,d)=>({key:`${l}-${d}`,content:(0,o.jsx)("span",{children:l})}));return(0,o.jsx)("p",{className:Afe(),"data-testid":"one-page-video-meta",children:(0,o.jsx)(Nfe,{segments:c})})}const Pfe=Rfe,Mfe=V("one-page-title"),f9=({className:e,htmlId:t})=>{const n=le(),s=Oe(n?.title),r=Vi("title"),i=(0,an.uW)(n?.title)?{"data-l10n-id":n?.title?.l10nId}:{"data-change-path":r},a=Mfe({}).mix(e);return(0,o.jsx)("h1",{...i,className:a,id:t,tabIndex:-1,children:s})},dl=V("one-page-lesson-header-info");function Ofe(){const e=le(),t=dl({}),n=io(e);return(0,o.jsxs)("div",{className:t,children:[(Bm(e)||_r(e)||n)&&(0,o.jsx)(Tp,{className:dl("logo"),imageClassName:dl("logo-image")}),(0,o.jsx)(f9,{className:dl("title").toString()}),n?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(Pfe,{}),(0,o.jsx)(R6,{})]}):(0,o.jsx)(h9,{className:dl("authors").toString()})]})}const Bfe=Ofe,X0=V("one-page-lesson-header"),Dfe=V("page"),Ffe=X0("main").mix("lesson-header__main"),_fe=X0("container").mix(Dfe("header-container")),Hfe=()=>{const e=le(),t=Lt(),n=e?.coverPageType,{alpha:s,ariaLabel:r,media:i,role:a}=Zr("coverImage"),c=e?.theme?.coverImageColor,l=n===fe.WHITE,d=n===fe.IMAGE,h=n===fe.ACCENT,m=n===fe.VIDEO&&io(e),f=c===xt.LIGHT,p=X0({accent:h,image:d,white:l||m,video:m,"overlay-light":d&&f}),g=d?Ni({alpha:s,color:c??void 0,media:i})??void 0:void 0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("header",{className:p,children:[d&&g&&(0,o.jsx)("div",{"aria-label":r,className:X0("background-image"),role:a,style:g}),(0,o.jsx)("div",{className:_fe,children:(0,o.jsx)("div",{className:Ffe,children:(0,o.jsx)(Bfe,{})})}),t===se.APEX&&(0,o.jsx)(qr,{coverPageType:"LEFT"})]}),(0,o.jsx)(Jn,{anchor:yp,label:"Comments on course title"})]})},Vfe=V("lesson-one-page-scroll"),zfe=V("page"),$fe=({lessonProgress:e})=>{const t=(0,u.useRef)(null),[n,s]=(0,u.useState)(!1),[r,i]=(0,u.useState)(!1),{lessons:a,...c}=le(),{lmsOptions:l}=c,d=hn(),h=a?.[0],m=h?.type==="blocks"?h:void 0,f=h?.id??"",p=m?.items??[],g=io(c),v=_r(c),x=(0,u.useRef)(null);(0,u.useEffect)(()=>{if(!(!v&&!g)&&f)return _a(f),x.current=f,()=>{const L=x.current;L!=null&&kr(L)}},[f,v,g]);const b=e?.isComplete&&!0&&!g&&!v,y=e?.isComplete&&!1,T=c?.exportSettings?.webExportSettings,S=!Cs.isInstantLink&&(l?.disableCoverPage||T?.disableCoverPage),I=(0,u.useCallback)(()=>{r||(S?t.current?.scrollTo({top:0,behavior:yn()?"instant":"smooth"}):(i(!0),ho(()=>{d("/")},"lesson-to-one-page-cover-continuous").finally(()=>{i(!1)})))},[d,S,r]);return(0,o.jsx)("div",{className:Vfe(),children:(0,o.jsx)("div",{className:"page-wrap",id:"page-wrap",ref:t,children:(0,o.jsx)("div",{className:zfe({"video-transcript-open":n}),"data-page":!0,children:(0,o.jsx)("div",{className:"page__wrapper page__wrapper--white",children:(0,o.jsxs)(M0,{lessonId:f,children:[(0,o.jsx)(Hfe,{}),(0,o.jsx)("div",{className:"page__content",children:(0,o.jsx)(Gr,{children:(0,o.jsxs)("div",{"data-lesson-id":h?.id,children:[g?(0,o.jsx)(vfe,{animateBlockEntrance:c?.animateBlockEntrance,blocks:p,className:void 0,isLessonEntering:void 0,isLessonExiting:void 0,lessonId:f,loadMedia:!0,nextLesson:void 0,onTranscriptOpenChange:s}):(0,o.jsx)(y1,{animateBlockEntrance:c?.animateBlockEntrance,blocks:p,className:void 0,isLessonEntering:void 0,isLessonExiting:void 0,lessonId:f,loadMedia:!0,nextLesson:void 0}),b&&(0,o.jsx)(Cfe,{className:void 0,onClick:I}),y&&(0,o.jsx)(Jp,{lessonId:f})]})})})]})})})})})},p9=V("microlearning-progress-summary"),Ufe=V("page-wrap"),Gfe=({course:e,courseProgress:t,isStepped:n,lesson:s})=>{const r=(0,u.useRef)(null),i=(0,u.useRef)(null),[a,c]=(0,u.useState)(!1),l=p9("content",{stepped:n,mounted:a}).toString();return(0,Oc.A)(()=>{const d=(i.current?.clientHeight??0)+1;r.current?.scrollTo({top:d}),c(!0)}),(0,o.jsxs)("div",{className:Ufe(),id:"page-wrap",ref:r,children:[(0,o.jsx)(eg,{className:p9("previous").toString(),lessonId:s?.id??"",ref:i}),(0,o.jsx)(ZT,{contentClassName:l,course:e,courseProgress:t,lessonId:s?.id??""})]})},Wfe=({isProgressSummary:e,lessonProgress:t})=>{const n=le(),s=Vr(),{previewType:r}=Vd(),i=n?.theme?.blockNavigationType===za.STEPPED;return e?(0,o.jsx)(Gfe,{course:n,courseProgress:s,isStepped:i,lesson:void 0}):i?(0,o.jsx)(Zme,{lessonProgress:t,previewType:r}):(0,o.jsx)($fe,{lessonProgress:t})};var Kfe=C(49860);function g9(){const e=it();return Kfe.useMemo(()=>({advanceQuizLessonToEnd:t=>e(Jw(t)),submitQuizAnswer:t=>e(im(t)),setQuizLessonTimeRemaining:t=>e(tj(t))}),[e])}const Qfe="MULTIPLE_CHOICE";function Zfe({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:s,reportAnswer:r}){if(!e||!_l(e))return;const i=e.settings??{},a=i.passToContinue??!1,c=t?.retryAttempts??0,l=B0({allowedRetries:i.retryCount,currentRetries:c}),d=Object.values(t?.items??{}).filter(h=>!h.isComplete);d.length>0&&d.forEach(h=>{const m=Yue({lesson:e,question:h});if(m){const f=m.type||Qfe,p=n({duration:{startTime:0,stopTime:0},id:e.id,isCorrect:!1,isUnfinished:!0,item:{id:String(m.id||""),title:String(m.title||""),type:f},itemProgress:h,retryAttempts:c,title:e.title});r(p)}s.submitQuizAnswer({finalRetryAttempt:l,isCorrect:!1,itemId:h.id,lessonId:e.id,passToContinue:a})}),s.advanceQuizLessonToEnd({lessonId:e.id,finalize:!0,passToContinue:a,finalRetryAttempt:l})}var Yfe=C(49860);function qfe({lesson:e,lessonProgress:t,getL10nRecursive:n}){const s=g9();return Yfe.useCallback(()=>{Zfe({lesson:e,lessonProgress:t,getL10nRecursive:n,quizActions:s,reportAnswer:OC})},[e,t,n,s])}var v9=C(49860);function Xfe({children:e}){return Nd(Hl)===!0?(0,o.jsx)(o.Fragment,{children:e}):(0,o.jsx)(Jfe,{children:e})}function Jfe({children:e}){const t=dd(),n=Vr(),s=Gt(t),r=Go(t),i=Rb(),{setQuizLessonTimeRemaining:a}=g9(),c=v9.useMemo(()=>r??{},[r]),l=qfe({lesson:s,lessonProgress:c,getL10nRecursive:i}),d=v9.useMemo(()=>_o(s)?s.settings:void 0,[s]),h=!!d?.timer,m=d?.timerDuration;return(0,o.jsx)(H0e,{courseProgress:n,currentLessonId:t,handleExpiredQuiz:l,isTimedQuiz:h,setQuizLessonTimeRemaining:a,timerDuration:m,children:e})}function epe({lessonId:e}){const t=it(),[n,s]=(0,u.useState)(null),r=Ce(),i=(0,u.useCallback)(c=>{c.target instanceof HTMLElement&&t(Em({offsetHeight:c.target.offsetHeight}))},[t]);(0,u.useLayoutEffect)(()=>{if(n)return t(Em({offsetHeight:n.offsetHeight})),()=>{t(Em(null))}},[t,n]),Ru(n,i);const a=(0,u.useCallback)(()=>{M6(e)},[e]);return(0,o.jsx)("button",{className:"visually-hidden btn-skip-to-lesson brand--ui",onClick:a,ref:s,type:"button",children:(0,o.jsxs)("span",{className:"btn-skip-to-lesson__wrap",children:[r?.courseSkipToLesson,(0,o.jsx)(ce,{"aria-hidden":"true",classNameIcon:"btn-skip-to-lesson__icon",name:"arrow-right"})]})})}var tpe=C(49860);const npe=960,D1=V("transcript-panel"),spe=e=>{const{currentLocale:t}=at();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 ope({enhancedLabels:e,lessonId:t,questionBankActiveIndex:n}){const s=it(),{audioPlayerIdOpen:r,focusing:i,refocusTarget:a,transcriptMedia:c}=Dc(),l=!!r,d=(0,u.useId)(),h=pe(G=>t?ji(t,G):null),f=t?.startsWith("question-bank-")?n:h?.type==="quiz"?h.activeIndex:void 0,p=Xt(npe),[g,v]=(0,u.useState)(0),[x,b]=(0,u.useState)(!1),[y,T]=(0,u.useState)(!1),S=(0,u.useRef)(!1),I=(0,u.useRef)(null),L=(0,u.useRef)(null),E=(0,u.useRef)(c),k=(0,u.useRef)(t),N=(0,u.useRef)(f),R=Ce()||e,M=(0,u.useRef)(null),A=(0,u.useRef)({panelHeight:0,startY:null,startHeight:null,startTime:null,velocity:null}),j=(0,u.useCallback)(G=>{const U=A.current.panelHeight,Q=performance.now();T(!0);const Z=q=>{const te=q-Q,ne=Math.min(te/300,1),ae=1-Math.pow(1-ne,3),ue=U+(G-U)*ae;v(ue),A.current.panelHeight=ue,ne<1?requestAnimationFrame(Z):(T(!1),b(!1),A.current={startY:null,startHeight:null,startTime:null,panelHeight:null,velocity:null})};requestAnimationFrame(Z)},[b,T,v]),P=(0,u.useCallback)(G=>{const{startTime:F,startY:U,startHeight:Q}=A.current;if(!p||U===null)return;const Z=U-(G?.clientY??G?.touches?.[0]?.clientY??0),q=Q+Z;if(v(q),A.current.panelHeight=q,F!==null){const te=performance.now()-F,ne=Z/te;A.current.velocity=ne}},[p]),w=(0,u.useCallback)(G=>{const{velocity:F}=A.current;if(!F)return;Object.assign(A.current,{startY:null,startHeight:null,startTime:null}),b(!1);const U=window.innerHeight*.66;let Q;Math.abs(F)>.5?Q=F>0?window.innerHeight:150:Q=g>=U?window.innerHeight:150,j(Q),G instanceof MouseEvent&&(window.removeEventListener("mousemove",P),window.removeEventListener("mouseup",w))},[j,g,P]),D=(0,u.useCallback)(G=>{!p||L.current.contains(G.target)||I.current.contains(G.target)||(Object.assign(A.current,{startY:G?.clientY??G?.touches?.[0]?.clientY??null,startHeight:M.current?.clientHeight??0,startTime:performance.now()}),b(!0),G.nativeEvent instanceof MouseEvent&&(window.addEventListener("mousemove",P),window.addEventListener("mouseup",w)))},[P,w,p,b]);(0,u.useEffect)(()=>{let G;const F=()=>{M?.current?.style&&(M.current.style.transition="none",M.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Z=>{Z.style.transition="none"}))},U=()=>{clearTimeout(G),G=setTimeout(()=>{M?.current?.style&&(M.current.style.transition="",M.current.parentNode.querySelectorAll("div:not(.transcript-panel)").forEach(Z=>{Z.style.transition=""}))},200)};return window.addEventListener("resize",F),window.addEventListener("resize",U),()=>{window.removeEventListener("resize",F),window.removeEventListener("resize",U),clearTimeout(G)}},[]),(0,u.useEffect)(()=>{!l&&S.current&&v(0),i&&l&&M.current&&(M.current.focus(),s(Fp({audioPlayerId:r,focusing:!1}))),S.current=l},[r,s,i,l]),(0,u.useEffect)(()=>{l&&c!==E.current&&(E.current=c)},[l,c]),(0,u.useEffect)(()=>{l&&k.current!==t&&s(Fc()),k.current=t},[t,l,s]),(0,u.useEffect)(()=>{l&&N.current!==f&&N.current!==void 0&&s(Fc()),N.current=f},[f,l,s]);const O={role:"button",tabIndex:0,onMouseDown:D,onTouchStart:D,onTouchEnd:w,onTouchMove:P},[B,H]=tpe.useState(!1),_=Oe(B?E.current:c),$=spe(_);let z;l&&(z=_p(r));const K=(0,u.useCallback)(()=>{const G=a??document.getElementById(l5(r));return G?(G.focus(),!0):!1},[r,a]),J=(0,u.useCallback)(G=>{G.stopPropagation(),G.preventDefault(),s(Fc()),K()},[s,K]),Y=(0,u.useCallback)(G=>{r&&G.key==="Escape"&&J(G)},[r,J]);return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)(Qs,{classNames:"transcript-panel",in:l,nodeRef:M,onEnter:()=>H(!1),onEntered:()=>H(!1),onEntering:()=>H(!1),onExit:()=>H(!0),onExited:()=>H(!1),onExiting:()=>H(!0),timeout:300,unmountOnExit:!0,children:(0,o.jsxs)("section",{"aria-hidden":!l,"aria-labelledby":d,className:D1({isOpen:l,isAnimatingMobileSwipe:y,isDragging:x}).toString(),id:z,onKeyDown:Y,ref:M,style:p&&l?{height:`${g/10}rem`,minHeight:g>0?"33vh":void 0}:{},tabIndex:-1,children:[(0,o.jsxs)("header",{...p?O:{},children:[(0,o.jsx)("h3",{id:d,ref:I,children:R?.audioTranscript}),(0,o.jsx)("button",{"aria-label":R?.audioHideTranscript,className:D1("close-button"),onClick:J,ref:L,type:"button",children:(0,o.jsx)(ce,{name:"close"})})]}),(0,o.jsx)("section",{className:D1("transcript-text",{"not-available":!$}),children:$||R?.audioNoTranscriptAvailable})]})})})}const rpe=({content:e})=>{const t=le(),n=Vr(),{didNavigate:s,shouldSkipAutoFocusOnNavigate:r}=Vd(),i=(0,Be.g)(),a=(0,Be.zy)(),[c]=(0,Be.ok)(),l=c.get("embed")==="lesson-only",d=i.lessonId??"",h=c.get(Bc);(0,u.useEffect)(()=>{!h||!d||window.dispatchEvent(new CustomEvent(Je,{detail:{lessonId:d,itemId:h,path:["lessons",{id:d},"items",{id:h}],align:"start"}}))},[d,h]);const m=Xt(480);Gde(d);const f=Kn(t),p=(0,u.useCallback)(L=>{if(f)return;const E=document.querySelector(`[data-lesson-id="${L}"]`);(t.theme?.hideLessonHeaders?E?.querySelector("main"):E?.querySelector("h1"))?.focus({preventScroll:!0})},[t,f]),g=(0,u.useRef)(d),v=(0,u.useRef)(!1);(0,u.useEffect)(()=>{v.current||d!==g.current||r||!s||(v.current=!0,p(d))},[s,p,d,r]);const x=l?"lesson lesson--preview":"lesson",b=it(),y=(0,u.useCallback)(({item:L,refs:E})=>{if(!L)return;const k="media"in L?L.media:null;b(c5({audioPlayerId:ks({refs:E}),transcriptMedia:k}))},[b]),T=(0,u.useCallback)(()=>{b(Fc())},[b]),S=(0,u.useCallback)(L=>{b(Fp(L))},[b]),I=Go(d);return(0,o.jsxs)(Xfe,{children:[(0,o.jsxs)("div",{className:"page-lesson-wrap",children:[!f&&(0,o.jsx)(epe,{lessonId:d}),(0,o.jsx)("div",{className:"page-lesson",children:(0,o.jsxs)(kY,{children:[(0,o.jsx)(LY,{closeTranscript:T,mode:"readonly",onTranscriptUpdate:S,openTranscript:y,children:(0,o.jsx)("div",{className:x,"data-lesson":!0,children:(0,o.jsx)("div",{className:"lesson__content",children:(0,o.jsx)("div",{className:"page-view",children:(0,o.jsx)(cX,{isLessonOnlyEmbed:l,children:f?(0,o.jsx)(Wfe,{isProgressSummary:e.kind==="progress-summary",lessonProgress:I}):(0,o.jsx)(XX,{isLessonOnlyEmbed:l,onLessonEntered:p,children:(0,o.jsx)(lme,{content:e,isMobileHeader:m,lessonId:d,lessonProgress:I},a.pathname)})})})})})}),(0,o.jsx)(ope,{lessonId:n?.currentLesson?.toString()})]})})]}),(0,o.jsx)(Dp,{onClose:()=>p(d)})]})},F1=V("one-page-cover-info");function ipe({htmlIdTitle:e}){const t=Vi("title");return(0,o.jsxs)("div",{className:F1(),"data-change-path":t,children:[(0,o.jsx)(f9,{className:F1("title").toString(),htmlId:e}),(0,o.jsx)(h9,{className:F1("authors").toString()})]})}const ape=ipe,J0=V("one-page-cover"),cpe=V("cover"),lpe={passive:!0};function dpe(e){return typeof e=="object"&&e!=null}function upe(e){return dpe(e)&&(typeof e.id=="string"||typeof e.id=="number")}function hpe({previewType:e}={}){const t=(0,u.useRef)(null),n=(0,u.useRef)(null),s=(0,u.useRef)(!1),r=hn(),i=Ce(),{shouldSkipAutoFocusOnNavigate:a}=Vd(),c=(0,u.useRef)(a),l=pe(_t),d=vO(l),h=upe(d)?d:void 0,m=(0,u.useCallback)(()=>{const j=h?.id;return j!=null?An(j):null},[h?.id]),f=(0,u.useCallback)(()=>{const j=m();if(j!=null){const w=l?.theme?.blockNavigationType===za.STEPPED?"one-page-cover-to-lesson-stepped":"one-page-cover-to-lesson-continuous";ho(()=>{r(j)},w)}},[l?.theme?.blockNavigationType,m,r]),p=(0,u.useRef)(f);p.current=f;const g=(0,u.useRef)(e);g.current=e;const v=(0,u.useCallback)(()=>{n.current?.focus?.()},[]);(0,u.useEffect)(()=>{aS(),c.current||n.current?.focus?.()},[]),(0,u.useEffect)(()=>{const j=n.current;if(!j)return;const P=w=>{(w.key==="ArrowDown"||w.key==="ArrowRight")&&!s.current&&(s.current=!0,j.removeEventListener("keyup",P),p.current())};return j.addEventListener("keyup",P),()=>j.removeEventListener("keyup",P)},[]),(0,u.useEffect)(()=>{const j=P=>{Vc(g.current)||s.current||P.deltaY>100&&(s.current=!0,document.removeEventListener("wheel",j),p.current())};return document.addEventListener("wheel",j,lpe),()=>document.removeEventListener("wheel",j)},[]);const x=(0,u.useCallback)(j=>{const P=j.target;P instanceof Node&&!t.current?.contains?.(P)&&!s.current&&(s.current=!0,f())},[f]),b=(0,u.useCallback)(j=>{j.preventDefault(),s.current||(s.current=!0,f())},[f]),y=l?.coverPageType===fe.WHITE,T=l?.coverPageType===fe.VIDEO,S=l?.coverPageType===fe.IMAGE,I=l?.coverPageType===fe.ACCENT,L=l?.theme?.blockNavigationType===za.STEPPED,E=l?.theme?.coverImageColor??xt.DARK,k="title",R=`overlay-${E?.toLowerCase()}`,M=J0("wrapper",{[R]:S,accent:I,image:S,white:y||T,video:T}).mix(cpe("header-content")),A=m();return(0,o.jsx)(Gr,{children:(0,o.jsxs)(Bu,{onSwipeUp:f,children:[(0,o.jsxs)("main",{className:M,ref:n,tabIndex:-1,children:[(0,o.jsx)(ape,{htmlIdTitle:k}),L&&(0,o.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."}),A!=null&&(0,o.jsx)("div",{className:J0("start-wrapper"),onClick:x,children:(0,o.jsx)(xn,{"aria-label":i?.courseStart??"Start",className:J0("start-link"),onClick:b,ref:t,to:A,children:(0,o.jsx)(ce,{className:J0("start-icon"),name:"arrow-down"})})}),S&&(0,o.jsx)(Ap,{})]}),(0,o.jsx)(Jn,{anchor:yp,label:"Comments on course title"}),(0,o.jsx)(Dp,{onClose:v})]})})}const mpe=hpe;function fpe({course:e,lessonId:t,progressSummaryEnabled:n}){if(n&&t===Ka)return{kind:"progress-summary"};const s=e?.lessons?.find(r=>String(r.id)===t);return s?{kind:"lesson",lesson:s}:{kind:"not-found"}}function ppe(){const e=le(),t=(0,Be.zy)(),n=Kn(e),s=e?.lessonsOnly?.[0]?.id,r=s==null?void 0:An(s),c=r!=null&&!a3(e)?(0,o.jsx)(Be.C5,{replace:!0,to:{pathname:r,search:t.search}}):n?(0,o.jsx)(mpe,{}):(0,o.jsx)(bY,{});return(0,o.jsxs)(Be.BV,{children:[(0,o.jsx)(Be.qh,{element:(0,o.jsx)(C9,{}),path:Cd}),(0,o.jsx)(Be.qh,{element:(0,o.jsx)(x9,{children:(0,o.jsx)(C9,{})}),path:xd}),(0,o.jsx)(Be.qh,{element:c,index:!0}),(0,o.jsx)(Be.qh,{element:(0,o.jsx)(x9,{children:c}),path:"/:mode"}),(0,o.jsx)(Be.qh,{element:(0,o.jsx)(jd,{}),path:"*"})]})}function C9(){const e=Hr(),{lessonId:t=""}=(0,Be.g)(),n=fpe({course:e,lessonId:t,progressSummaryEnabled:!1});return n.kind==="not-found"?(0,o.jsx)(jd,{}):(0,o.jsx)(rpe,{content:n})}function x9({children:e}){const{mode:t}=(0,Be.g)();return yB(t)?e:(0,o.jsx)(jd,{})}const Sa=V("legacy-share-deprecation-banner"),gpe=Date.UTC(2026,7,31),vpe="https://community.articulate.com/discussions/discuss/rise-360-legacy-preview-links-will-be-disabled-on-august-31/1265175",b9="has-legacy-share-banner",y9="--legacy-share-banner-height",S9="legacyShareBannerDismissed";function Cpe(){try{return sessionStorage.getItem(S9)==="true"}catch{return!1}}function xpe(){try{return sessionStorage.setItem(S9,"true"),!0}catch{return!1}}const bpe=()=>(0,o.jsx)("svg",{"aria-hidden":"true",className:Sa("icon"),focusable:"false",viewBox:"0 0 512 512",children:(0,o.jsx)("path",{d:"M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM96 208l320 0c8.8 0 16 7.2 16 16l0 64c0 8.8-7.2 16-16 16L96 304c-8.8 0-16-7.2-16-16l0-64c0-8.8 7.2-16 16-16z"})}),ype=()=>(0,o.jsx)("svg",{"aria-hidden":"true",className:Sa("dismiss-icon"),focusable:"false",viewBox:"0 0 384 512",children:(0,o.jsx)("path",{d:"M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"})});function Spe(){const e=le(),[t,n]=(0,u.useState)(Cpe),s=(0,u.useRef)(null),r=!t&&Pl()&&Date.now()<gpe&&e!=null&&!Fy(e),i=(0,u.useCallback)(()=>{xpe(),n(!0)},[]);return(0,u.useEffect)(()=>{const a=document.getElementById("app"),c=s.current;if(!r||!a||!c)return;a.classList.add(b9);const l=()=>{const{height:h}=c.getBoundingClientRect();a.style.setProperty(y9,`${h}px`)};l();const d=new ResizeObserver(l);return d.observe(c),()=>{d.disconnect(),a.classList.remove(b9),a.style.removeProperty(y9)}},[r]),r?(0,o.jsxs)("div",{className:Sa(),ref:s,role:"status",children:[(0,o.jsx)(bpe,{}),(0,o.jsxs)("p",{className:Sa("message"),children:["Access to this content will be"," ",(0,o.jsx)("a",{className:Sa("link"),href:vpe,rel:"noopener noreferrer",target:"_blank",children:"disabled on August 31, 2026"}),". Please contact your administrator and request the content be republished via Quick Share to maintain access."]}),(0,o.jsx)("button",{"aria-label":"Dismiss notice",className:Sa("dismiss"),onClick:i,type:"button",children:(0,o.jsx)(ype,{})})]}):null}const Ipe=Spe;var To=C(49860);const ui=V("share-password-dialog");function Tpe({failAttempt:e,onSubmit:t}){const n=pe(_t),s=To.useRef(null),r=To.useRef(null),[i,a]=To.useState(!1),c=To.useRef(!1),{announceAssertive:l}=Ms();To.useEffect(()=>{r.current?.showModal()},[]),To.useEffect(()=>{e&&!c.current&&(a(!0),s.current&&(s.current.value=""),l("Incorrect password. Please try again.")),c.current=e},[l,e]),To.useEffect(()=>{const p=r.current;if(!p)return;const g=()=>a(!1);return p.addEventListener("animationend",g),()=>{p.removeEventListener("animationend",g)}},[]);const d=To.useCallback(p=>{p.preventDefault(),s.current&&t(s.current.value)},[t]),h=To.useCallback(p=>{p.preventDefault()},[]),f=`You need a password to view this ${Kn(n)?wb(n).toLocaleLowerCase():"course"}. If you don\u2019t know it, ask the person who shared this with you.`;return(0,o.jsxs)("dialog",{"aria-describedby":"share-password-instructions share-password-constraint","aria-labelledby":"share-password-title",className:`${ui({shaking:i})} brand--border`,onCancel:h,ref:r,children:[(0,o.jsx)("h1",{className:ui("heading"),id:"share-password-title",children:"Enter Password"}),(0,o.jsx)("p",{className:ui("instructions"),id:"share-password-instructions",children:f}),(0,o.jsx)("p",{className:"visually-hidden-always",id:"share-password-constraint",children:"This dialog requires a password to proceed and cannot be dismissed."}),(0,o.jsxs)("form",{onSubmit:d,children:[(0,o.jsx)("label",{className:ui("label"),htmlFor:"share-password",children:"password"}),(0,o.jsx)("input",{className:ui("input"),id:"share-password",ref:s,type:"password"}),(0,o.jsx)("div",{className:ui("toolbar"),children:(0,o.jsx)("button",{className:`${ui("button")} brand--background`,type:"submit",children:"View"})})]})]})}const Lpe=Tpe;function Epe(){const e=sd();(0,u.useEffect)(()=>{window.targetMode=K$({locale:r3(e)})},[e]),(0,u.useEffect)(()=>{window.parent.postMessage({type:"ready"},"*"),window.parent.postMessage({type:Mn.STATUS,data:!!window.targetMode},"*"),_J(n=>gn(bP(n)))},[]);const t=(0,u.useRef)(!1);(0,u.useEffect)(()=>{t.current||!e||!$h()||(t.current=!0,window.parent.postMessage({type:"preview:snapshotLoaded",data:{defaultLocale:e.defaultLocale,locales:e.locales?.map(({locale:n})=>n)}}))},[e]),(0,u.useEffect)(()=>{const n=()=>gn(z7()),s=()=>gn($7()),r=()=>window.parent.postMessage("coursePreviewIframeClicked","*");return Z2("favoriteAdded",n),Z2("favoriteRemoved",s),document.addEventListener("click",r),()=>{Y2("favoriteAdded",n),Y2("favoriteRemoved",s),document.removeEventListener("click",r)}},[])}function kpe(e){return e.status}function I9(){return pe(kpe)}function Npe({enabled:e=!0,onAuthorized:t,onError:n,onUnauthorized:s,password:r}){const i=it();(0,u.useEffect)(()=>{e&&(i(_w({onAuthorized:t,onError:n,onUnauthorized:s,password:r})),i(xP()))},[i,e,t,n,s,r])}function wpe(){const e=it(),{courseLoaded:t,coverLoaded:n}=I9(),s=pe(a=>a.course?.coverImage?.media),r=bt(s),i=(0,u.useCallback)(()=>{e(Z7(!0))},[e]);(0,u.useEffect)(()=>{if(t&&!n){const a=r?.image,{key:c,src:l}=a||{};if(c||l){const d=c?pt(a):l,h=setTimeout(i,5e3),m=new Image;return m.src=d,m.onload=()=>{clearTimeout(h),i()},()=>{clearTimeout(h),m.onload=null}}else i()}},[t,n,r,i])}function jpe(e={}){Npe(e),wpe();const t=it(),n=Gy(),s=pe(p=>p.courseLabels.labels),{courseLoaded:r,runtimeFetchError:i,coverLoaded:a,fatalError:c,fontsLoaded:l,notFound:d,partnerContentLoaded:h}=I9(),m=(0,ze.A)(r),f=r&&l&&a&&h;return(0,u.useEffect)(()=>{!m&&r&&!l&&(n??[]).length>0&&t(Jj(n))},[t,m,r,l,n]),(0,u.useEffect)(()=>{if(!f||window.parent===window)return;window.parent.postMessage({type:"course:ready"},window.location.origin);const p=g=>{g.key==="Escape"&&window.parent.postMessage({type:"preview:escape"},window.location.origin)};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[f]),{runtimeFetchError:i??null,isLoaded:!!f,notFound:!!d,fatalError:!!c,curtainLabels:s}}function Ape({course:e}){const[t,n]=(0,u.useState)(!0),[s,r]=(0,u.useState)(!1),i=e&&"hasPassword"in e?!!e.hasPassword:!1,a=!!(t&&Pl()&&e&&!Fy(e)&&(i||PC())),c=(0,u.useCallback)(l=>(r(!1),jN(l).then(({isValid:d})=>{d?n(!1):(r(!0),n(!0))}).catch(d=>console.error("Verify password error",d))),[]);return{showPasswordDialog:a,failAttempt:s,onSharePasswordSubmit:c}}function Rpe(){return Hz(),Epe(),(0,o.jsxs)(mU,{children:[(0,o.jsx)(Oz,{}),(0,o.jsx)(Ipe,{}),(0,o.jsx)(o$,{children:(0,o.jsx)(YD,{children:(0,o.jsx)(Ppe,{})})})]})}function Ppe(){const{enabled:e,isActive:t,onAuthorized:n,onError:s,onUnauthorized:r,password:i}=s$(),a=dU(),c=pe(Jy),l=NN()==="hosted",d=a.policy,h=l&&d?.access==="blocked",m=l&&Rj(c),f=d!=null?h:m,{isLoaded:p,notFound:g,fatalError:v,runtimeFetchError:x,curtainLabels:b}=jpe({enabled:e&&a.settled&&!h,onAuthorized:t?n:void 0,onError:t?s:void 0,onUnauthorized:t?r:void 0,password:t?i:void 0}),y=le(),{showPasswordDialog:T,failAttempt:S,onSharePasswordSubmit:I}=Ape({course:y}),L=!t&&T;return g?(0,o.jsx)(jd,{}):f?(0,o.jsx)(gf,{status:"deliveryBlocked",children:(0,o.jsx)(t$,{trialType:(d??c).trialType})}):p?L?(0,o.jsx)(Lpe,{failAttempt:S,onSubmit:I}):y?(0,o.jsx)(Mpe,{course:y,reviewPolicy:a.policy}):null:(0,o.jsx)(gf,{labels:b,runtimeFetchError:x,status:x!=null?"runtimeFetchError":v?"fatalError":"loading"})}function Mpe({course:e,reviewPolicy:t}){const n=DM(),s=_z(),r=pe(Jy),a=(t??r).protection==="required"&&JB(t),c=a&&eD(t)?qB:void 0,l=Xy(e.themeId),d=`theme ${l}${n?" one-page":""}`;return(0,o.jsx)(sD,{appType:"learn",children:(0,o.jsx)(v$,{children:(0,o.jsx)(h$,{children:(0,o.jsx)(Ez,{children:(0,o.jsx)(Fz,{themeId:l,children:(0,o.jsx)(pf,{children:(0,o.jsx)(Az,{children:(0,o.jsx)($D,{course:e,children:(0,o.jsxs)("div",{className:d,id:"innerApp",ref:Dz,children:[(0,o.jsx)(Qz,{...s}),(0,o.jsxs)(sz,{children:[(0,o.jsx)(ppe,{}),(0,o.jsx)(nD,{showBadge:a,tooltip:c,children:(0,o.jsx)(NB,{})})]})]})})})})})})})})})}function Ope({children:e}){return(0,o.jsx)(Lee,{ImageEagerOrLazy:dg,children:e})}const Bpe={};function Dpe({children:e}){const n=le()?.features??Bpe;return(0,o.jsx)(Mz,{value:n,children:e})}const T9=document.getElementById("app");if(!T9)throw new Error("Root element #app not found");(0,k9.createRoot)(T9).render((0,o.jsx)(u.Suspense,{fallback:null,children:(0,o.jsx)(sM,{store:Tb,children:(0,o.jsx)(Ope,{children:(0,o.jsx)(iM,{children:(0,o.jsx)(Dpe,{children:(0,o.jsx)(Be.I9,{useTransitions:!1,children:(0,o.jsx)(Rpe,{})})})})})})}))}}]);
