"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[40616],{66728:(e,t,r)=>{r.d(t,{B1:()=>i,NG:()=>s,c_:()=>function e(t){return"string"==typeof t?t:"number"==typeof t?String(t):Array.isArray(t)?t.map(e).join(""):o.isValidElement(t)?e(t.props.children):""}});var n=r(19002),o=r(52114);function s(e){let{code:t,language:s}=e,[i,a]=o.useState(null);return(o.useEffect(()=>{let e=!1;return(async()=>{try{let{codeToHtml:n}=await Promise.all([r.e(58907),r.e(83010)]).then(r.bind(r,83010)),o=await n(t||"",{lang:s||"text",theme:"github-dark"});e||a(o)}catch(t){e||a(null)}})(),()=>{e=!0}},[t,s]),i)?(0,n.jsx)("div",{className:"my-6 overflow-x-auto rounded-lg border",dangerouslySetInnerHTML:{__html:i}}):(0,n.jsx)("pre",{className:"my-6 overflow-x-auto rounded-lg border bg-muted/30 p-4 text-sm",children:(0,n.jsx)("code",{children:t})})}function i(e){let{formula:t,displayMode:s=!1}=e,[i,a]=o.useState(null);return(o.useEffect(()=>{let e=!1;return(async()=>{try{let n=(await Promise.resolve().then(r.bind(r,49676))).renderToString(t||"",{throwOnError:!1,displayMode:s});e||a(n)}catch(t){e||a(null)}})(),()=>{e=!0}},[t,s]),i)?s?(0,n.jsx)("div",{className:"my-4 overflow-x-auto",dangerouslySetInnerHTML:{__html:i}}):(0,n.jsx)("span",{dangerouslySetInnerHTML:{__html:i}}):s?(0,n.jsx)("div",{className:"my-4 rounded border bg-muted/30 p-3 font-mono text-sm",children:t}):(0,n.jsx)("code",{className:"rounded bg-muted px-1.5 py-0.5 text-sm",children:t})}r(51466)},48995:(e,t,r)=>{r.d(t,{MultimediaExperience:()=>w});var n=r(19002),o=r(52114),s=r(23746),i=r(54995),a=r(81878),l=r(96313),d=r(7828),c=r(33648),u=r(31055),m=r(41181),h=r(36526),p=r(40399),f=r(82556);function x(e){let{payload:t,showCaptions:r,themeMode:o="dark"}=e,s={composition:t.composition,scenes:t.scenes.map(e=>({key:e.key,sceneType:e.sceneType,durationInFrames:e.durationInFrames,title:e.title,subtitle:e.subtitle,ctaText:e.ctaText,ctaUrl:e.ctaUrl,content:e.content,contentFormat:e.contentFormat,backgroundImageUrl:e.backgroundImageUrl,slideImageUrl:e.slideImageUrl,captions:e.captions})),audioTracks:t.audioTracks};return(0,n.jsx)(f.q,{payload:s,showCaptions:r,themeMode:o})}var g=r(5235),v=r(27309);function b(e){var t;let{sourceAsset:r,useLatestSource:o=!1,className:s}=e,i=null!==(t=r.sourcePath.split("/").pop())&&void 0!==t?t:"source.ipynb",a=new URLSearchParams({path:"content/".concat(r.sourceId,"/").concat(r.sourcePath)});return!o&&r.sourceCommitSha&&a.set("ref",r.sourceCommitSha),(0,n.jsx)("div",{className:s,children:(0,n.jsx)(u.$,{asChild:!0,variant:"outline",size:"sm",children:(0,n.jsxs)("a",{href:"/api/sources/file?".concat(a.toString()),download:i,children:[(0,n.jsx)(v.A,{className:"mr-2 h-4 w-4"}),"Download source"]})})})}var y=r(48315);function w(e){var t,r,a,f;let{lessonTitle:v,lesson:w,preview:R,initialAudioUrlBySceneId:I,audioUrlEndpoint:M,sourceAsset:S,className:E}=e,{resolvedTheme:L}=(0,d.D)(),F=(0,o.useRef)(null),A=(0,o.useRef)(null),T=(0,o.useRef)(null),z=(0,o.useRef)(null),U=(0,o.useRef)(null),B=(0,o.useRef)(null),P=(0,o.useRef)(null),[H,W]=(0,o.useState)("notebook"),[_,D]=(0,o.useState)(0),[V,Z]=(0,o.useState)(null!=I?I:{}),[$,O]=(0,o.useState)(null),[q,K]=(0,o.useState)([]),[G,J]=(0,o.useState)(null),[X,Y]=(0,o.useState)(R.composition.showCaptions);(0,o.useEffect)(()=>{Z(null!=I?I:{})},[I]),(0,o.useEffect)(()=>{Y(R.composition.showCaptions)},[R.composition.showCaptions]);let Q=(0,o.useMemo)(()=>[...w.scenes].sort((e,t)=>e.orderIndex-t.orderIndex),[w.scenes]),ee=(0,o.useMemo)(()=>Q.filter(e=>"BLOCK_DERIVED"===e.sceneType),[Q]),et=(0,o.useMemo)(()=>{let e=new Map;for(let t of Q)e.set(t.id,t);return e},[Q]),er=(0,o.useMemo)(()=>{let e=R.scenes.map(e=>{var t;return{...e,audioUrl:e.sceneId&&null!==(t=V[e.sceneId])&&void 0!==t?t:e.audioUrl}}),t=R.audioTracks.map(e=>{var t;let r=null===(t=R.scenes.find(t=>t.key===e.sceneKey))||void 0===t?void 0:t.sceneId,n=r?V[r]:null;return n?{...e,audioUrl:n}:e});return{...R,scenes:e,audioTracks:t}},[V,R]),en=null!==(r=er.scenes[_])&&void 0!==r?r:null,eo=(null==en?void 0:en.sceneId)?null!==(a=et.get(en.sceneId))&&void 0!==a?a:null:null!==(f=Q[_])&&void 0!==f?f:null;(0,o.useEffect)(()=>{D(e=>Math.min(e,Math.max(0,er.scenes.length-1)))},[er.scenes.length]),(0,o.useEffect)(()=>{var e,t,r;en&&(null===(e=F.current)||void 0===e||e.seekTo(en.from),null===(t=A.current)||void 0===t||t.seekTo(en.from),null===(r=T.current)||void 0===r||r.seekTo(en.from))},[null==en?void 0:en.from]),(0,o.useEffect)(()=>{en&&z.current&&z.current.seekTo(en.from)},[null==en?void 0:en.from]),(0,o.useEffect)(()=>{if("notebook"!==H||!U.current){K([]);return}let e=Array.from(U.current.querySelectorAll("h1, h2, h3, h4, h5, h6")),t=[];e.forEach(e=>{var r;let n=(null!==(r=e.textContent)&&void 0!==r?r:"").replace(/!\[[^\]]*]\([^)]+\)/g,"").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/[`*_~]/g,"").trim().trim();if(!n)return;let o=Number.parseInt(e.tagName.slice(1),10),s=e.id;s&&o>=2&&t.push({id:s,sceneId:"",level:o,text:n})}),K(t)},[ee,H]),(0,o.useEffect)(()=>{if("notebook"!==H||0===q.length){O(null);return}let e=q.map(e=>document.getElementById(e.id)).filter(e=>!!e);if(0===e.length)return;let t=new IntersectionObserver(e=>{let t=e.filter(e=>e.isIntersecting).sort((e,t)=>e.boundingClientRect.top-t.boundingClientRect.top);t.length>0&&O(t[0].target.id)},{rootMargin:"-20% 0px -65% 0px",threshold:[0,1]});return e.forEach(e=>t.observe(e)),()=>t.disconnect()},[H,q]),(0,o.useEffect)(()=>{if("notebook"!==H){J(null);return}let e=0,t=()=>{var e;if(!P.current||!B.current)return;let t=P.current.getBoundingClientRect(),r=B.current.getBoundingClientRect(),n=document.querySelector("[data-app-navbar]"),o=null!==(e=null==n?void 0:n.getBoundingClientRect())&&void 0!==e?e:null,s=Math.round(r.bottom+16),i=Math.round(t.top+16),a=Math.max(16,s,o&&o.bottom>0?Math.round(o.bottom+16):16,i);J({left:Math.round(t.right-460),top:a})},r=()=>{e&&window.cancelAnimationFrame(e),e=window.requestAnimationFrame(()=>{t()})};return t(),window.addEventListener("resize",r),window.addEventListener("scroll",r,!0),()=>{e&&window.cancelAnimationFrame(e),window.removeEventListener("resize",r),window.removeEventListener("scroll",r,!0)}},[H,ee.length]),(0,o.useEffect)(()=>{if(!eo||V[eo.id]||!eo.audioKey||!M)return;let e=new AbortController;return fetch("".concat(M,"?sceneId=").concat(encodeURIComponent(eo.id)),{signal:e.signal}).then(async e=>{if(!e.ok)throw Error("Failed to resolve audio URL");return await e.json()}).then(e=>{e.audioUrl&&Z(t=>({...t,[eo.id]:e.audioUrl}))}).catch(()=>void 0),()=>e.abort()},[V,M,eo]);let es=(0,o.useCallback)(()=>{D(e=>Math.max(0,e-1))},[]),ei=(0,o.useCallback)(()=>{D(e=>Math.min(er.scenes.length-1,e+1))},[er.scenes.length]);return 0===Q.length?(0,n.jsx)(m.Zp,{className:E,children:(0,n.jsx)(m.Wu,{className:"p-6 text-sm text-muted-foreground",children:"No multimedia scenes are available for this lesson yet."})}):(0,n.jsxs)("div",{className:(0,p.cn)("space-y-4",E),"aria-label":v,children:[(0,n.jsxs)("div",{ref:B,className:"flex flex-wrap items-center justify-between gap-2",children:[(0,n.jsx)("div",{children:S?(0,n.jsx)(b,{sourceAsset:S}):null}),(0,n.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.jsx)(k,{label:"Notebook",active:"notebook"===H,onClick:()=>W("notebook")}),(0,n.jsx)(k,{label:"Video",active:"video"===H,onClick:()=>W("video")}),(0,n.jsx)(k,{label:"Slides",active:"slides"===H,onClick:()=>W("slides")})]})]}),"notebook"===H?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"xl:hidden",children:(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)(m.Zp,{children:(0,n.jsx)(m.Wu,{className:"p-3",children:(0,n.jsx)(l.ai,{ref:F,component:x,inputProps:{payload:er,showCaptions:X,themeMode:"light"===L?"light":"dark"},fps:er.composition.fps,durationInFrames:er.composition.durationInFrames,compositionWidth:er.composition.width,compositionHeight:er.composition.height,acknowledgeRemotionLicense:!0,controls:!0,renderFullscreenButton:e=>{let{isFullscreen:t}=e;return C({isFullscreen:t,captionsEnabled:X,onToggleCaptions:()=>Y(e=>!e)})},renderPlayPauseButton:j,style:{width:"100%",aspectRatio:"16 / 9",borderRadius:12,overflow:"hidden"}})})}),(0,n.jsx)(y.G,{headings:q,activeHeadingId:$})]})}),(0,n.jsxs)("div",{ref:P,className:"grid items-start gap-4 xl:grid-cols-[minmax(0,1fr)_460px]",children:[(0,n.jsx)("div",{ref:U,className:"space-y-4",children:ee.map(e=>(0,n.jsx)(m.Zp,{children:(0,n.jsx)(m.Wu,{className:"p-4",children:(0,n.jsx)("div",{className:"prose max-w-none dark:prose-invert",children:(0,n.jsx)(g.e,{text:e.content||" ",headingIdPrefix:"notebook-scene-".concat(e.id)})})})},e.id))}),(0,n.jsx)("div",{className:"hidden xl:block","aria-hidden":"true"}),(0,n.jsx)("div",{className:"hidden xl:block",children:(0,n.jsxs)("div",{className:"fixed z-20 w-[460px] space-y-4",style:G?{left:"".concat(G.left,"px"),top:"".concat(G.top,"px")}:void 0,children:[(0,n.jsx)(m.Zp,{children:(0,n.jsx)(m.Wu,{className:"p-3",children:(0,n.jsx)(l.ai,{ref:A,component:x,inputProps:{payload:er,showCaptions:X,themeMode:"light"===L?"light":"dark"},fps:er.composition.fps,durationInFrames:er.composition.durationInFrames,compositionWidth:er.composition.width,compositionHeight:er.composition.height,acknowledgeRemotionLicense:!0,controls:!0,renderFullscreenButton:e=>{let{isFullscreen:t}=e;return C({isFullscreen:t,captionsEnabled:X,onToggleCaptions:()=>Y(e=>!e)})},renderPlayPauseButton:j,style:{width:"100%",aspectRatio:"16 / 9",borderRadius:12,overflow:"hidden"}})})}),(0,n.jsx)("div",{className:"max-h-[calc(100vh-24rem)] overflow-y-auto pr-1",children:(0,n.jsx)(y.G,{headings:q,activeHeadingId:$})})]})})]})]}):null,"video"===H?(0,n.jsx)(m.Zp,{children:(0,n.jsx)(m.Wu,{className:"p-4",children:(0,n.jsx)(l.ai,{ref:T,component:x,inputProps:{payload:er,showCaptions:X,themeMode:"light"===L?"light":"dark"},fps:er.composition.fps,durationInFrames:er.composition.durationInFrames,compositionWidth:er.composition.width,compositionHeight:er.composition.height,acknowledgeRemotionLicense:!0,controls:!0,renderFullscreenButton:e=>{let{isFullscreen:t}=e;return C({isFullscreen:t,captionsEnabled:X,onToggleCaptions:()=>Y(e=>!e)})},renderPlayPauseButton:j,style:{width:"100%",aspectRatio:"16 / 9",borderRadius:12,overflow:"hidden"}})})}):null,"slides"===H&&en?(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_360px]",children:[(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,n.jsxs)(u.$,{variant:"outline",size:"sm",onClick:es,disabled:_<=0,children:[(0,n.jsx)(s.A,{className:"mr-1 h-4 w-4"}),"Previous"]}),(0,n.jsx)(c.E,{variant:"secondary",children:"".concat(_+1," / ").concat(er.scenes.length)}),(0,n.jsxs)(u.$,{variant:"outline",size:"sm",onClick:ei,disabled:_>=er.scenes.length-1,children:["Next",(0,n.jsx)(i.A,{className:"ml-1 h-4 w-4"})]})]}),(0,n.jsx)(m.Zp,{children:(0,n.jsxs)(m.Wu,{className:"p-4",children:[(0,n.jsx)(l.ai,{ref:z,component:x,inputProps:{payload:er,showCaptions:X,themeMode:"light"===L?"light":"dark"},fps:er.composition.fps,durationInFrames:er.composition.durationInFrames,compositionWidth:er.composition.width,compositionHeight:er.composition.height,acknowledgeRemotionLicense:!0,controls:!1,style:{width:"100%",aspectRatio:"16 / 9",borderRadius:12,overflow:"hidden"}}),(null==eo?void 0:eo.id)&&V[eo.id]?(0,n.jsxs)("div",{className:"mt-4 flex items-center gap-2",children:[(0,n.jsx)("audio",{className:"min-w-0 flex-1",controls:!0,src:V[eo.id]}),(0,n.jsx)(u.$,{type:"button",variant:X?"default":"outline",size:"sm",onClick:()=>Y(e=>!e),"aria-pressed":X,"aria-label":X?"Hide captions":"Show captions",children:"CC"})]}):null]})})]}),(null==eo?void 0:null===(t=eo.script)||void 0===t?void 0:t.trim())?(0,n.jsx)(m.Zp,{children:(0,n.jsxs)(m.Wu,{className:"p-4 text-sm leading-7 text-muted-foreground",children:[(0,n.jsx)("p",{className:"mb-3 text-sm font-semibold text-foreground",children:"Script"}),eo.script]})}):null]}),(0,n.jsx)(h.ScrollArea,{className:"w-full whitespace-nowrap rounded-md border p-2",children:(0,n.jsx)("div",{className:"flex gap-2",children:er.scenes.map((e,t)=>(0,n.jsx)("button",{type:"button",className:(0,p.cn)("w-[180px] shrink-0 rounded-md border p-1 text-left transition-colors",t===_?"border-primary bg-primary/10":"border-border bg-card hover:bg-accent/50"),onClick:()=>D(t),children:(0,n.jsx)("div",{className:"relative aspect-video overflow-hidden rounded-sm border border-border/40 bg-black/40",children:(0,n.jsx)(N,{preview:er,frame:e.from,themeMode:"light"===L?"light":"dark"})})},e.key))})})]}):null]})}function j(e){let{playing:t}=e;return(0,n.jsx)("span",{style:{width:25,height:25,display:"inline-flex",alignItems:"center",justifyContent:"center"},children:t?(0,n.jsxs)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:[(0,n.jsx)("rect",{x:"6",y:"5",width:"4.5",height:"14",rx:"1",fill:"white"}),(0,n.jsx)("rect",{x:"13.5",y:"5",width:"4.5",height:"14",rx:"1",fill:"white"})]}):(0,n.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M8 6V18L18 12L8 6Z",fill:"white"})})})}function N(e){let{preview:t,frame:r,themeMode:s}=e,i=(0,o.useRef)(null);return(0,o.useEffect)(()=>{i.current&&i.current.seekTo(r)},[r]),(0,n.jsx)(l.ai,{ref:i,component:x,inputProps:{payload:t,showCaptions:!1,themeMode:s},fps:t.composition.fps,durationInFrames:t.composition.durationInFrames,compositionWidth:t.composition.width,compositionHeight:t.composition.height,acknowledgeRemotionLicense:!0,controls:!1,style:{width:"100%",height:"100%"}})}function k(e){let{label:t,active:r,onClick:o}=e;return(0,n.jsx)("button",{type:"button",onClick:o,className:(0,p.cn)("rounded-md border px-3 py-1.5 text-sm transition-colors",r?"border-primary bg-primary/10 text-primary":"border-border bg-background text-muted-foreground hover:text-foreground"),children:t})}function C(e){let{isFullscreen:t,captionsEnabled:r,onToggleCaptions:o}=e;return(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{role:"button",tabIndex:0,onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onClick:e=>{e.preventDefault(),e.stopPropagation(),o()},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),o())},"aria-label":r?"Hide captions":"Show captions",title:r?"Hide captions":"Show captions",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:30,height:30,borderRadius:8,border:"1px solid ".concat(r?"rgba(253, 224, 71, 0.9)":"rgba(255, 255, 255, 0.35)"),background:r?"rgba(250, 204, 21, 0.18)":"rgba(255, 255, 255, 0.08)",color:r?"#fde68a":"#ffffff"},children:(0,n.jsx)(a.A,{className:"h-4 w-4"})}),(0,n.jsx)(R,{isFullscreen:t})]})}function R(e){let{isFullscreen:t}=e;return t?(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M9 3H5v4M15 3h4v4M9 21H5v-4M19 21h-4v-4",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}):(0,n.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M15 3h6v6M9 21H3v-6M21 15v6h-6M3 9V3h6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}},48315:(e,t,r)=>{r.d(t,{G:()=>u});var n=r(19002),o=r(52114),s=r(36112),i=r(54995),a=r(47659),l=r(41181),d=r(31055),c=r(40399);function u(e){let{headings:t,activeHeadingId:r}=e,[u,m]=o.useState(!0),h=o.useCallback(e=>{let t=()=>{let t=document.getElementById(e);return!!t&&(t.scrollIntoView({behavior:"smooth",block:"start"}),window.history.replaceState(null,"","#".concat(e)),!0)};t()||window.requestAnimationFrame(()=>{t()})},[]);if(0===t.length)return null;let p=u?t.filter(e=>e.level<=2):t;return(0,n.jsx)(l.Zp,{children:(0,n.jsxs)(l.Wu,{className:"p-4",children:[(0,n.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 text-sm font-semibold text-foreground",children:[(0,n.jsx)(s.A,{className:"h-4 w-4"}),"On this page"]}),(0,n.jsx)(d.$,{type:"button",variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>m(e=>!e),"aria-label":u?"Expand section outline":"Collapse to h2 headings",title:u?"Show h3 headings":"Collapse to h2 headings",children:u?(0,n.jsx)(i.A,{className:"h-4 w-4"}):(0,n.jsx)(a.A,{className:"h-4 w-4"})})]}),(0,n.jsx)("nav",{"aria-label":"Lesson sections",children:(0,n.jsx)("ul",{className:"space-y-1",children:p.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)("button",{type:"button",onClick:()=>h(e.id),className:(0,c.cn)("block w-full rounded-md px-3 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-foreground",e.level>=3?"ml-4":"",e.level>=4?"ml-8":"",r===e.id?"bg-primary/10 font-medium text-primary":"text-muted-foreground"),children:e.text})},e.id))})})]})})}},20318:(e,t,r)=>{r.d(t,{BH:()=>i,I4:()=>a,Wb:()=>s});let n=[/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([^"&?/\s]{11})/i,/youtube\.com\/shorts\/([^"&?/\s]{11})/i],o=/drive\.google\.com\/file\/d\/([^/?#\s]+)/i;function s(e){if(!e)return null;for(let t of n){let r=e.match(t);if(r&&r[1])return r[1]}return null}function i(e){if(!e)return null;let t=e.trim();if(!t)return null;try{let e=new URL(t);if("drive.google.com"!==e.hostname)return null;let r=e.href.match(o);if(null==r?void 0:r[1])return r[1];let n=e.searchParams.get("id");return(null==n?void 0:n.trim())||null}catch(e){return null}}function a(e){let t=i(e);return t?"https://drive.google.com/file/d/".concat(t,"/preview"):null}},33648:(e,t,r)=>{r.d(t,{E:()=>a});var n=r(19002);r(52114);var o=r(42030),s=r(40399);let i=(0,o.F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function a(e){let{className:t,variant:r,...o}=e;return(0,n.jsx)("div",{className:(0,s.cn)(i({variant:r}),t),...o})}a.displayName="Badge"},31055:(e,t,r)=>{r.d(t,{$:()=>c,r:()=>d});var n=r(19002),o=r(52114),s=r(4302),i=r(42030),a=r(40399),l=r(56130);let d=(0,i.F)("inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),c=o.forwardRef((e,t)=>{let{className:r,variant:o,size:i,asChild:c=!1,loading:u=!1,children:m,...h}=e,p=c?s.DX:"button";return(0,n.jsx)(p,{className:(0,a.cn)(d({variant:o,size:i,className:r}),u&&"relative"),ref:t,...h,children:u?(0,n.jsxs)("span",{children:[(0,n.jsx)("span",{className:(0,a.cn)({"opacity-0":u}),children:m}),(0,n.jsx)("span",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,n.jsx)(l.y,{className:"text-current size-4"})})]}):m})});c.displayName="Button"},37088:(e,t,r)=>{r.d(t,{S:()=>l});var n=r(19002),o=r(52114),s=r(60),i=r(45359),a=r(40399);let l=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(s.bL,{ref:t,className:(0,a.cn)("peer size-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",r),...o,children:(0,n.jsx)(s.C1,{className:(0,a.cn)("flex items-center justify-center text-current"),children:(0,n.jsx)(i.A,{className:"size-4 shrink-0"})})})});l.displayName=s.bL.displayName},7737:(e,t,r)=>{r.d(t,{p:()=>i});var n=r(19002),o=r(52114),s=r(40399);let i=o.forwardRef((e,t)=>{let{className:r,type:o,...i}=e;return(0,n.jsx)("input",{type:o,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...i})});i.displayName="Input"},2071:(e,t,r)=>{r.d(t,{J:()=>d});var n=r(19002),o=r(52114),s=r(71821),i=r(42030),a=r(40399);let l=(0,i.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),d=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)(s.b,{ref:t,className:(0,a.cn)(l(),r),...o})});d.displayName=s.b.displayName},36526:(e,t,r)=>{r.d(t,{ScrollArea:()=>l});var n=r(19002),o=r(52114),s=r(70899),i=r(42553),a=r(40399);let l=o.forwardRef((e,t)=>{let{verticalScrollBar:r=!0,horizontalScrollBar:o=!1,className:i,children:l,...c}=e;return(0,n.jsxs)(s.bL,{ref:t,className:(0,a.cn)("relative",i),...c,children:[(0,n.jsx)(s.LM,{className:"size-full rounded-[inherit]",children:l}),r&&(0,n.jsx)(d,{forceMount:!0,orientation:"vertical"}),o&&(0,n.jsx)(d,{forceMount:!0,orientation:"horizontal"}),(0,n.jsx)(s.OK,{})]})});l.displayName=s.bL.displayName;let d=o.forwardRef((e,t)=>{let{className:r,orientation:o="vertical",...i}=e;return(0,n.jsx)(s.VM,{ref:t,orientation:o,className:(0,a.cn)("relative z-20 flex touch-none select-none transition-colors","vertical"===o&&"h-full w-2.5 border-l border-l-transparent p-px","horizontal"===o&&"h-2.5 flex-col border-t border-t-transparent p-px",r),...i,children:(0,n.jsx)(s.lr,{className:"relative flex-1 rounded-full bg-border"})})});d.displayName=s.VM.displayName,o.forwardRef((e,t)=>{let{breakpoint:r,mediaQueryOptions:o,children:s,fallbackProps:a,...d}=e;return(0,i.U)(r,o)?(0,n.jsx)(l,{ref:t,...d,children:s}):(0,n.jsx)("div",{ref:t,...a,children:s})}).displayName="ResponsiveScrollArea"},95836:(e,t,r)=>{r.d(t,{Toaster:()=>i,o:()=>o.oR});var n=r(19002);r(52114);var o=r(26912),s=r(7828);function i(e){let{theme:t="system"}=(0,s.D)();return(0,n.jsx)(o.l$,{theme:t,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...e})}i.displayName="Toaster"},56130:(e,t,r)=>{r.d(t,{Y:()=>c,y:()=>d});var n=r(19002);r(52114);var o=r(42030),s=r(2005),i=r(40399);let a=(0,o.F)("flex-col items-center justify-center",{variants:{show:{true:"flex",false:"hidden"}},defaultVariants:{show:!0}}),l=(0,o.F)("animate-spin text-primary",{variants:{size:{small:"size-6 shrink-0",medium:"size-8 shrink-0",large:"size-12 shrink-0"}},defaultVariants:{size:"medium"}});function d(e){let{size:t,show:r,children:o,className:d}=e;return(0,n.jsxs)("span",{className:a({show:r}),children:[(0,n.jsx)(s.A,{className:(0,i.cn)(l({size:t}),d)}),o]})}function c(e){let{containerClassName:t,...r}=e;return(0,n.jsx)("div",{className:(0,i.cn)("pointer-events-none absolute inset-0 flex select-none items-center justify-center opacity-65",t),children:(0,n.jsx)(d,{...r})})}c.displayName="CenteredSpinner"},61237:(e,t,r)=>{r.d(t,{T:()=>i});var n=r(19002),o=r(52114),s=r(40399);let i=o.forwardRef((e,t)=>{let{className:r,...o}=e;return(0,n.jsx)("textarea",{className:(0,s.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",r),ref:t,...o})});i.displayName="Textarea"},42553:(e,t,r)=>{r.d(t,{U:()=>o});var n=r(52114);function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{fallback:r,ssr:o=!0,getWindow:s}=t,i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=n.useRef(e);return n.useEffect(()=>{r.current=e}),n.useCallback(function(){for(var e,t=arguments.length,n=Array(t),o=0;o{var t,n,s,a;return{media:e,matches:o?!!r:null===(n=(s=null!==(a=i())&&void 0!==a?a:window).matchMedia)||void 0===n?void 0:null===(t=n.call(s,e))||void 0===t?void 0:t.matches}});return n.useEffect(()=>{var t;let r=null!==(t=i())&&void 0!==t?t:window;l(t=>{let n={media:e,matches:r.matchMedia(e).matches};return t.matches===n.matches&&t.media===n.media?t:n});let n=function(e,t){try{return e.addEventListener("change",t),()=>e.removeEventListener("change",t)}catch(r){return e.addListener(t),()=>e.removeListener(t)}}(r.matchMedia(e),e=>{l(t=>t.media===e.media?{...t,matches:e.matches}:t)});return()=>n()},[i]),a.matches}},7828:(e,t,r)=>{r.d(t,{D:()=>n.D,N:()=>n.N});var n=r(92335)},77358:(e,t,r)=>{r.d(t,{j:()=>o});var n=r(12569);let o=(0,n.createServerReference)("604322d18ceb445ee1b55923509adfcfad201bef66",n.callServer,void 0,n.findSourceMapURL,"getLessonVideoFileUrl")},77065:(e,t,r)=>{r.d(t,{A:()=>o});var n=r(12569);let o=(0,n.createServerReference)("60db2a173c40326c5eccda2b5785d671c9f3f1155a",n.callServer,void 0,n.findSourceMapURL,"getArticleAudioUrl")},11011:(e,t,r)=>{r.d(t,{N:()=>o});var n=r(12569);let o=(0,n.createServerReference)("60ef7768d676cd870bf3f00ebed76ccf89d609aebf",n.callServer,void 0,n.findSourceMapURL,"getArticleImageUrl")}}]);