1import{a as e}from"./rolldown-runtime-DOG2APjf.js";import{i as t,t as a}from"./react-core-CchioXwE.js";import{t as r}from"./queryKeys-IU4Wi3pN.js";import{t as s}from"./useQuery-CS559GLG.js";import{n}from"./api-Bo2_vrwo.js";import{r as i,s as l}from"./Skeleton-C7RXEkZz.js";import{t as o}from"./createLucideIcon-DnMz71l9.js";import{t as c}from"./arrow-left-HbW2WjoD.js";import{t as d}from"./play-Bth_1PkE.js";import{a as u,i as m,s as x}from"./monitoring-DTg999Ma.js";import{A as h,G as p,R as f,S as b,St as k,W as g,X as y,_t as v,ct as w,dt as j,ot as N,p as _,tt as C,vt as M,xt as E,z as S}from"./index-hmhQZAEy.js";import{t as L}from"./PageHeader-DzkpeGVa.js";import{c as T}from"./hooks-CKc9ymoO.js";var F=o("flip-horizontal",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h3",key:"1i73f7"}],["path",{d:"M16 3h3a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-3",key:"saxlbk"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 14v2",key:"8jcxud"}],["path",{d:"M12 8v2",key:"1woqiv"}],["path",{d:"M12 2v2",key:"tus03m"}]]),z=o("list-video",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M10 12H3",key:"1ulcyk"}],["path",{d:"M10 19H3",key:"108z41"}],["path",{d:"M15 12.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z",key:"ms4nik"}]]),P=o("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),R=o("maximize",[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]),A=o("minimize",[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]]),q=o("panel-left-close",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]),$=o("panel-left-open",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]),I=o("pause",[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]]),D=o("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),H=o("skip-back",[["path",{d:"M17.971 4.285A2 2 0 0 1 21 6v12a2 2 0 0 1-3.029 1.715l-9.997-5.998a2 2 0 0 1-.003-3.432z",key:"15892j"}],["path",{d:"M3 20V4",key:"1ptbpl"}]]),V=o("skip-forward",[["path",{d:"M21 4v16",key:"7j8fe9"}],["path",{d:"M6.029 4.285A2 2 0 0 0 3 6v12a2 2 0 0 0 3.029 1.715l9.997-5.998a2 2 0 0 0 .003-3.432z",key:"zs4d6"}]]),U=o("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]),O=o("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]),K=o("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]),X=e(t(),1),B=a(),W=()=>!/iPhone/.test(navigator.userAgent)&&!(!document.documentElement.requestFullscreen&&!("webkitRequestFullscreen"in document.documentElement)),Y=[.25,.5,.75,1,1.5,2],G=new Set(["expired","denied"]),J=e=>Number.isFinite(e)?`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,"0")}`:"0:00",Q=e=>{if(!Number.isFinite(e)||e<0)return"0 seconds";const t=Math.floor(e/60),a=Math.floor(e%60),r=[];return t>0&&r.push(`${t} minute${1===t?"":"s"}`),(a>0||0===t)&&r.push(`${a} second${1===a?"":"s"}`),r.join(" ")};function Z({onClick:e,label:t,pressed:a,active:r,buttonRef:s,children:n}
1){return(0,B.jsx)("button",{ref:s,type:"button",onClick:e,"aria-label":t,"aria-pressed":a,className:"inline-flex h-11 w-11 items-center justify-center rounded-lg transition-colors hover:bg-white/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60 active:bg-white/20 "+(r?"bg-brand-red":""),children:n})}function ee({src:e,mobileSrc:t,desktopSrc:a,title:r,className:s="",autoPlay:n=!1,watermarkCode:i,textTracks:o,onRequestFreshSource:c,srcExpiresAt:h,onSessionExpired:b,poster:k}){const y=(0,X.useRef)(null),v=(0,X.useRef)(null),w=(0,X.useRef)(null),j=(0,X.useRef)(),N=(0,X.useRef)(),_=(0,X.useRef)(),C=T(),[M,E]=(0,X.useState)(!1),[S,L]=(0,X.useState)(0),[z,q]=(0,X.useState)(0),[$,ee]=(0,X.useState)(1),[te,ae]=(0,X.useState)(!1),[re,se]=(0,X.useState)(!1),[ne,ie]=(0,X.useState)(null),[le,oe]=(0,X.useState)(!1),[ce,de]=(0,X.useState)(1),[ue,me]=(0,X.useState)(!1),[xe,he]=(0,X.useState)(!0),[pe,fe]=(0,X.useState)(!1),[be,ke]=(0,X.useState)(!1),[ge,ye]=(0,X.useState)({kind:"ok"}),ve=(0,X.useRef)(0),we=(0,X.useRef)(0),je=(0,X.useRef)(0),[Ne,_e]=(0,X.useState)(void 0),Ce=(0,X.useRef)(null),Me=(0,X.useRef)(null),Ee=(0,X.useRef)(!1),Se=(0,X.useRef)(null),Le=C?a||e:t||a||e,Te=C?"wide":"narrow";(0,X.useEffect)(()=>{const e=y.current;if(!e)return;j.current&&(cancelAnimationFrame(j.current),j.current=void 0);const t=()=>L(e.currentTime),a=()=>q(e.duration),r=()=>{const t=Se.current;null!==t&&e.currentTime>t+.15&&(ve.current=0,we.current=0,Se.current=null)};return e.addEventListener("timeupdate",t),e.addEventListener("timeupdate",r),e.addEventListener("loadedmetadata",a),()=>{e.removeEventListener("timeupdate",t),e.removeEventListener("timeupdate",r),e.removeEventListener("loadedmetadata",a),e.pause(),j.current=requestAnimationFrame(()=>{e.isConnected||(e.removeAttribute("src"),e.load())})}},[]),(0,X.useEffect)(()=>{if(!re||null===ne||!y.current)return;const e=y.current,t=()=>{Number.isFinite(e.currentTime)&&Number.isFinite(ne)&&e.currentTime>=ne+20&&(e.currentTime=ne)};return e.addEventListener("timeupdate",t),()=>e.removeEventListener("timeupdate",t)},[re,ne]),(0,X.useEffect)(()=>{_e(Le),ye({kind:"ok"}),ve.current=0,we.current=0,je.current=0,Ee.current=!1,Se.current=null},[Le]);const Fe=(0,X.useCallback)(e=>{const t=e?Date.parse(e):NaN,a=Number.isFinite(t);Ce.current=a?t:null,Me.current=a?Math.max(0,t-Date.now()):null},[]);(0,X.useEffect)(()=>{Fe(h)},[h,Fe]);const ze=(0,X.useCallback)(e=>{_e(e.url),Fe(e.expiresAt)},[Fe]),Pe=(0,X.useCallback)(()=>{const e=Ce.current,t=Me.current;if(null===e)return!1;const a=e-Date.now();return a<12e4||!!t&&a/t<.25},[]),Re=(0,X.useCallback)(async e=>{const t=y.current;if(!t||!c)return void ye({kind:"expired"});if(ve.current>=2)return ye({kind:"fatal",message:"This lesson could not be loaded. Please try again in a moment."}),void u("playback_recovery_exhausted",{reason:e});ve.current+=1;const a=Number.isFinite(t.currentTime)?t.currentTime:0,r=!t.paused;ye({kind:"recovering"}),u("playback_recovery_attempt",{reason:e,attempt:ve.current});try{const e=await c();ze(e),requestAnimationFrame(()=>{const e=y.current;if(!e)return;e.addEventListener("loadedmetadata",()=>{if(Number.isFinite(a)&&a>0&&(e.currentTime=a),r){const t=e.play();t&&"function"==typeof t.then&&t.catch(e=>x.warn("Resume after recovery rejected",e))}ye({kind:"ok"})},{once:!0}),e.load()})}catch(s){const t=s?.status;if(401===t)return u("playback_session_expired",{reason:e}),ye({kind:"signed-out"}),void b?.();if(403===t||404===t)return m(s,{context:"playback_not_entitled",reason:e,status:t}),void ye({kind:"unavailable",message:"This lesson isn't available on your enrolment any more."});m(s,{context:"playback_recovery_failed",reason:e}),ye({kind:"expired"})}finally{Ee.current=!1}},[c,ze,b]),Ae=(0,X.useCallback)(async e=>{if(c&&!Ee.current){Ee.current=!0;try{const t=await c();ze(t),u("playback_url_refreshed",{reason:e})}catch(t){x.warn("Proactive playback URL refresh failed",t),u("playback_url_refresh_failed",{reason:e})}finally{Ee.current=!1}}},[c,ze]);(0,X.useEffect)(()=>{if(!c)return;const e=Ce.current,t=Me.current;if(null===e||!t)return;const a=e-t*(1-.8),r=Math.min(Math.max(a-Date.now(),0),2147483647),s=window.setTimeout(()=>{Ae("scheduled")},r);return()=>window.clearTimeout(s)},[Ne,c,Ae]);const qe=(0,X.useCallback)((e,t)=>{const a=Date.now();a-je.current<1e4||(je.current=a,m(new Error(e),{context:e,code:t??-1}))},[]),$e=(0,X.useCallback)(()=>{const e=y.current?.error?.code;if(1===e)return;if(Se.current=null,3===e)return ye({kind:"fatal",message:"This video could not be played on this device."}),void qe("playback_decode",e);const t=Ce.current,a=null!==t&&Date.now()>=t?"playback_denied_expired":null===t?"playback_denied_unknown":"playback_denied_refused";qe(a,e),"playback_denied_refused"===a&&4===e&&ve.current>=1?ye({kind:"denied"}):Re(a)},[Re,qe]),Ie=(0,X.useCallback)(()=>{const e=y.current;if(e)if(e.paused){Pe()&&Ae("resume_from_pause");const t=e.play();t&&"function"==typeof t.then&&t.catch(e=>{x.warn("Video play() rejected",e),e instanceof DOMException&&"NotAllowedError"===e.name||(m(e,{context:"video_play_rejected"}),Re("playback_denied_unknown"))})}else e.pause()},[Re,Pe,Ae]),De=(0,X.useCallback)(e=>{const t=y.current;if(!t)return;if(!Number.isFinite(t.duration))return;const a=Math.max(0,Math.min(t.duration,t.currentTime+e));Number.isFinite(a)&&(t.currentTime=a)},[]),He=(0,X.useCallback)(()=>{he(!0),N.current&&clearTimeout(N.current),N.current=setTimeout(()=>{const e=y.current,t=v.current;e&&!e.paused&&(t&&t.contains(document.activeElement)||he(!1))},3e3)},[]);(0,X.useEffect)(()=>(He(),()=>{N.current&&clearTimeout(N.current),_.current&&clearTimeout(_.current)}),[He]),(0,X.useEffect)(()=>{pe||be?(he(!0),N.current&&clearTimeout(N.current)):He()},[pe,be,He]);const Ve=(0,X.useCallback)(e=>{const t=v.current;if(_.current){clearTimeout(_.current),_.current=void 0;const a=t?.getBoundingClientRect(),r=a&&a.width>0?(e-a.left)/a.width:.5;return r<.35?De(-10):r>.65?De(10):Ie(),void He()}_.current=setTimeout(()=>{_.current=void 0,C?(Ie(),He()):he(e=>!e&&(He(),!0))},250)},[C,De,Ie,He]),Ue=(0,X.useCallback)(()=>{const e=v.current;if(e)if(W()){const a=document,r=e,s=!(!a.fullscreenElement&&!a.webkitFullscreenElement);
1try{s?a.exitFullscreen?a.exitFullscreen().catch(e=>{x.error("Exit fullscreen failed",e),m(e,{context:"fullscreen_exit"})}):a.webkitExitFullscreen&&a.webkitExitFullscreen():r.requestFullscreen?r.requestFullscreen().catch(e=>{x.error("Fullscreen request failed",e),m(e,{context:"fullscreen_request"})}):r.webkitRequestFullscreen&&r.webkitRequestFullscreen()}catch(t){x.error("Fullscreen toggle failed",t),m(t,{context:"fullscreen_toggle"})}}else oe(e=>!e)},[]);(0,X.useEffect)(()=>{if(!W())return;const e=()=>{const e=document;oe(!(!e.fullscreenElement&&!e.webkitFullscreenElement))};return document.addEventListener("fullscreenchange",e),document.addEventListener("webkitfullscreenchange",e),()=>{document.removeEventListener("fullscreenchange",e),document.removeEventListener("webkitfullscreenchange",e)}},[]),(0,X.useEffect)(()=>{le?v.current?.focus({preventScroll:!0}):document.activeElement===document.body&&w.current?.focus({preventScroll:!0})},[le]);const Oe=(0,X.useCallback)(e=>{const t=y.current;t&&(t.preservesPitch=!0,t.mozPreservesPitch=!0,t.webkitPreservesPitch=!0,t.playbackRate=e,ee(e))},[]);(0,X.useEffect)(()=>{const e=y.current;if(!e)return;const t=()=>Oe($);return e.addEventListener("loadedmetadata",t),()=>e.removeEventListener("loadedmetadata",t)},[Oe,$]);const Ke=()=>ae(e=>!e);(0,X.useEffect)(()=>{const e=e=>{const t=y.current;if(!t)return;const a=e.target;if(a){const e=a.tagName;if("INPUT"===e||"TEXTAREA"===e||"SELECT"===e||a.isContentEditable)return}if(e.metaKey||e.ctrlKey||e.altKey)return;const r=e=>{if(!Number.isFinite(t.duration))return;const a=Math.max(0,Math.min(t.duration,t.currentTime+e));Number.isFinite(a)&&(t.currentTime=a)},s=e=>{const a=Y.indexOf(t.playbackRate),r=-1===a?Y.indexOf(1):a,s=Y[Math.max(0,Math.min(Y.length-1,r+e))];Oe(s)};let n=!0;switch(e.key){case"Escape":pe?fe(!1):be?ke(!1):n=!1;break;case" ":case"k":case"K":Ie();break;case"ArrowLeft":r(-5);break;case"ArrowRight":r(5);break;case"j":case"J":r(-15);break;case"l":case"L":r(15);break;case"ArrowUp":t.volume=Math.min(1,t.volume+.05),t.muted=!1,de(t.volume),me(!1);break;case"ArrowDown":t.volume=Math.max(0,t.volume-.05),de(t.volume);break;case"m":case"M":t.muted=!t.muted,me(t.muted);break;case"f":case"F":Ue();break;case"r":case"R":Ke();break;case",":case"<":s(-1);break;case".":case">":s(1);break;default:n=!1}n&&(e.preventDefault(),He())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[Ue,Ie,Oe,He,pe,be]),(0,X.useEffect)(()=>{x.debug("[VideoPlayer] Device type:",C?"Desktop":"Mobile"),x.debug("[VideoPlayer] Selected source:",Le),x.debug("[VideoPlayer] Available sources:",{src:e,mobileSrc:t,desktopSrc:a})},[e,t,a,Le,C]);const Xe=(0,B.jsxs)("div",{className:"relative",children:[(0,B.jsxs)("button",{type:"button",onClick:()=>ke(e=>!e),"aria-label":`Playback speed ${$}x`,"aria-haspopup":"menu","aria-expanded":be,className:"inline-flex h-11 min-w-[44px] items-center justify-center rounded-lg px-2 text-sm font-medium text-white transition-colors hover:bg-white/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60 active:bg-white/20",children:[$,"x"]}),be&&(0,B.jsx)("div",{role:"menu","aria-label":"Playback speed",className:"absolute bottom-full right-0 z-20 mb-2 min-w-[7rem] overflow-hidden rounded-lg border border-hairline bg-surface-3 py-1 shadow-xl backdrop-blur",children:Y.map(e=>(0,B.jsxs)("button",{type:"button",role:"menuitemradio","aria-checked":e===$,onClick:()=>{Oe(e),ke(!1)},className:"flex h-10 w-full items-center gap-2 px-3 text-left text-sm text-white transition-colors hover:bg-white/10 focus:outline-none focus-visible:bg-white/10",children:[(0,B.jsx)(l,{className:"h-4 w-4 "+(e===$?"opacity-100":"opacity-0"),"aria-hidden":"true"}),e,"x"]},e))})]}),Be=(0,B.jsxs)("div",{className:"flex items-center gap-1",children:[(0,B.jsx)(Z,{onClick:()=>{const e=y.current;e&&(e.muted=!ue,me(!ue))},label:ue?"Unmute":"Mute",children:ue||0===ce?(0,B.jsx)(K,{className:"h-5 w-5 text-white","aria-hidden":"true"}):(0,B.jsx)(O,{className:"h-5 w-5 text-white","aria-hidden":"true"})}),(0,B.jsx)("input",{type:"range",min:"0",max:"1",step:"0.05",value:ue?0:ce,onChange:e=>{const t=y.current;if(!t)return;const a=parseFloat(e.target.value);t.volume=a,de(a),0===a?(t.muted=!0,me(!0)):ue&&(t.muted=!1,me(!1))},"aria-label":"Volume","aria-valuetext":`${Math.round(100*(ue?0:ce))}%`,className:"player-range appearance-none rounded-lg bg-transparent "+("wide"===Te?"player-range--compact w-20":"w-full flex-1")})]}),We=(0,B.jsx)(Z,{onClick:Ke,label:"Mirror video",pressed:te,active:te,children:(0,B.jsx)(F,{className:"h-5 w-5 text-white","aria-hidden":"true"})}),Ye=(0,B.jsx)(Z,{onClick:()=>{re?(se(!1),ie(null)):(ie(y.current?.currentTime||0),se(!0))},label:"Loop 20 seconds from current position",pressed:re,active:re,children:(0,B.jsxs)("span",{className:"relative inline-flex",children:[(0,B.jsx)(D,{className:"h-5 w-5 text-white","aria-hidden":"true"}),(0,B.jsx)("span",{"aria-hidden":"true",className:"absolute -right-1 -top-1 text-[8px] font-bold text-white",children:"20"})]})});return(0,B.jsxs)("div",{className:`overflow-hidden rounded-lg bg-black ${s}`,children:[r&&(0,B.jsx)("div",{className:"border-b border-hairline bg-surface-2 px-4 py-2",children:(0,B.jsx)("h3",{className:"text-text-on-dark font-medium",children:r})}),(0,B.jsxs)("div",{ref:v,tabIndex:-1,onMouseMove:He,onFocusCapture:He,className:`relative focus:outline-none ${le?"fixed inset-0 z-[9999] flex h-[100dvh] items-center justify-center bg-black pb-[env(safe-area-inset-bottom)]":""} ${xe?"":"cursor-none"}`,style:{WebkitTapHighlightColor:"transparent"},children:[(0,B.jsx)("video",{ref:y,src:Ne,poster:k,preload:"metadata",className:"w-full "+(le?"max-h-[100dvh]":"max-h-[calc(100vh-200px)]"),autoPlay:n,playsInl
1ine:!0,disablePictureInPicture:!0,disableRemotePlayback:!0,controlsList:"nodownload noremoteplayback",onContextMenu:e=>e.preventDefault(),style:{transform:te?"scaleX(-1)":"scaleX(1)"},onPlay:()=>{E(!0),He()},onPause:()=>{E(!1),he(!0)},onWaiting:()=>ye(e=>"ok"===e.kind?{kind:"buffering"}:e),onStalled:()=>ye(e=>"ok"===e.kind?{kind:"buffering"}:e),onPlaying:e=>{Se.current=e.currentTarget.currentTime,ye(e=>"buffering"===e.kind?{kind:"ok"}:e)},onCanPlay:()=>ye(e=>"buffering"===e.kind?{kind:"ok"}:e),onError:$e,onLoadStart:()=>x.debug("Video load started"),onLoadedData:()=>x.debug("Video data loaded"),children:o?.map(e=>(0,B.jsx)("track",{kind:e.kind??"captions",src:e.src,srcLang:e.srcLang,label:e.label,default:e.default},`${e.srcLang}-${e.src}`))}),(0,B.jsx)("button",{type:"button","aria-hidden":"true",tabIndex:-1,onClick:e=>Ve(e.clientX),className:"absolute inset-0 z-0 cursor-default focus:outline-none"}),i&&(0,B.jsx)("div",{className:"pointer-events-none absolute bottom-14 right-4 z-10 select-none font-mono text-xs tracking-wider text-white/20","data-testid":"video-watermark",children:i}),!M&&"ok"===ge.kind&&(0,B.jsx)("button",{type:"button",onClick:Ie,"aria-label":"Play",className:"absolute left-1/2 top-1/2 z-10 flex h-16 w-16 -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full bg-black/50 text-white backdrop-blur transition-colors hover:bg-black/70 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/70",children:(0,B.jsx)(d,{className:"ml-1 h-7 w-7","aria-hidden":"true"})}),("buffering"===ge.kind||"recovering"===ge.kind)&&(0,B.jsxs)("div",{role:"status","aria-live":"polite",className:"pointer-events-none absolute inset-0 z-10 flex flex-col items-center justify-center gap-3 text-white",children:[(0,B.jsx)(P,{className:"h-10 w-10 animate-spin","aria-hidden":"true"}),(0,B.jsx)("span",{className:"rounded-full bg-black/60 px-3 py-1 font-sans text-sm backdrop-blur",children:"recovering"===ge.kind?"Reconnectingâ¦":"Bufferingâ¦"})]}),("expired"===ge.kind||"fatal"===ge.kind||"denied"===ge.kind||"unavailable"===ge.kind||"signed-out"===ge.kind)&&(0,B.jsxs)("div",{role:"alert",className:"absolute inset-0 z-20 flex flex-col items-center justify-center gap-4 bg-black/80 px-6 text-center backdrop-blur",children:[(0,B.jsx)(g,{className:"h-10 w-10 text-brand-red-text","aria-hidden":"true"}),(0,B.jsx)("p",{className:"text-text-on-dark max-w-sm font-sans text-sm",children:"signed-out"===ge.kind?"Your session ended while this lesson was open. Sign in again to carry on.":"unavailable"===ge.kind||"fatal"===ge.kind?ge.message:we.current>=3?"This lesson is not loading right now. Reload the page to try again, or come back in a few minutes.":"denied"===ge.kind?"Your network changed while you were watching. Press play to pick up where you left off.":"This lesson timed out while it was paused. Pick up where you left off."}),G.has(ge.kind)&&we.current<3&&(0,B.jsxs)("button",{type:"button",onClick:()=>{we.current+=1,ve.current=0,Re("manual_retry")},className:"inline-flex min-h-[44px] items-center gap-2 rounded-lg border border-hairline bg-surface-2 px-4 font-sans text-sm text-white transition-colors hover:bg-white/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60",children:[(0,B.jsx)(p,{className:"h-4 w-4","aria-hidden":"true"}),"Try again"]})]}),pe&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("button",{type:"button","aria-label":"Close options",onClick:()=>fe(!1),className:"absolute inset-0 z-20 bg-black/50"}),(0,B.jsxs)("div",{role:"dialog","aria-label":"Playback options",className:"absolute inset-x-0 bottom-0 z-30 rounded-t-2xl border-t border-hairline bg-surface-3 p-4 pb-[max(1rem,env(safe-area-inset-bottom))] backdrop-blur",children:[(0,B.jsxs)("div",{className:"mb-3 flex items-center justify-between",children:[(0,B.jsx)("h4",{className:"text-text-on-dark font-sans text-sm font-semibold",children:"Playback"}),(0,B.jsx)(Z,{onClick:()=>fe(!1),label:"Close options",children:(0,B.jsx)(f,{className:"h-5 w-5 text-white","aria-hidden":"true"})})]}),(0,B.jsxs)("div",{className:"mb-4",children:[(0,B.jsx)("p",{id:"player-speed-label",className:"text-text-muted mb-2 font-sans text-xs uppercase tracking-wider",children:"Playback speed"}),(0,B.jsx)("div",{role:"radiogroup","aria-labelledby":"player-speed-label",className:"flex flex-wrap gap-2",children:Y.map(e=>(0,B.jsxs)("button",{type:"button",role:"radio","aria-checked":e===$,onClick:()=>Oe(e),className:"inline-flex h-11 min-w-[3.25rem] items-center justify-center rounded-lg border px-3 text-sm font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60 "+(e===$?"border-brand-red bg-brand-red text-white":"border-hairline text-white hover:bg-white/10"),children:[e,"x"]},e))})]}),(0,B.jsxs)("div",{className:"mb-4 flex items-center gap-3",children:[We,(0,B.jsx)("span",{className:"text-text-on-dark font-sans text-sm",children:"Mirror"}),(0,B.jsx)("span",{className:"flex-1"}),Ye,(0,B.jsx)("span",{className:"text-text-on-dark font-sans text-sm",children:"Loop 20s"})]}),(0,B.jsxs)("div",{children:[(0,B.jsx)("p",{className:"text-text-muted mb-2 font-sans text-xs uppercase tracking-wider",children:"Volume"}),Be]})]})]}),(0,B.jsxs)("div",{className:"absolute bottom-0 left-0 right-0 z-10 bg-gradient-to-t from-black/90 to-transparent px-3 pb-[max(0.75rem,env(safe-area-inset-bottom))] pt-6 transition-opacity duration-200 sm:px-4 "+(xe?"opacity-100":"pointer-events-none opacity-0"),children:[(0,B.jsxs)("div",{className:"mb-1",children:[(0,B.jsx)("input",{type:"range",min:"0",max:z||0,value:S,onChange:e=>{const t=y.current;if(!t)return;const a=parseFloat(e.target.value);
1Number.isFinite(a)&&(t.currentTime=a,L(a))},"aria-label":"Seek","aria-valuetext":`${Q(S)} of ${Q(z)}`,className:"player-range w-full appearance-none bg-transparent"}),(0,B.jsxs)("div",{className:"text-text-muted -mt-1 flex justify-between text-[11px] sm:text-xs",children:[(0,B.jsx)("span",{children:J(S)}),(0,B.jsx)("span",{children:J(z)})]})]}),(0,B.jsxs)("div",{className:"flex items-center justify-between gap-1",children:[(0,B.jsxs)("div",{className:"flex items-center gap-0.5 sm:gap-1",children:[(0,B.jsx)(Z,{onClick:Ie,label:M?"Pause":"Play",children:M?(0,B.jsx)(I,{className:"h-5 w-5 text-white","aria-hidden":"true"}):(0,B.jsx)(d,{className:"h-5 w-5 text-white","aria-hidden":"true"})}),(0,B.jsx)(Z,{onClick:()=>De(-15),label:"15 seconds back",children:(0,B.jsxs)("span",{className:"relative inline-flex",children:[(0,B.jsx)(H,{className:"h-5 w-5 text-white","aria-hidden":"true"}),(0,B.jsx)("span",{"aria-hidden":"true",className:"absolute -right-1 -top-1 text-[8px] font-bold text-white",children:"15"})]})}),(0,B.jsx)(Z,{onClick:()=>De(5),label:"5 seconds forward",children:(0,B.jsxs)("span",{className:"relative inline-flex",children:[(0,B.jsx)(V,{className:"h-5 w-5 text-white","aria-hidden":"true"}),(0,B.jsx)("span",{"aria-hidden":"true",className:"absolute -right-1 -top-1 text-[8px] font-bold text-white",children:"5"})]})})]}),(0,B.jsxs)("div",{className:"flex items-center gap-0.5 sm:gap-1",children:["wide"===Te?(0,B.jsxs)(B.Fragment,{children:[Be,Xe,We,Ye]}):(0,B.jsx)(Z,{onClick:()=>fe(!0),label:"Playback options: speed, mirror, loop, volume",children:(0,B.jsx)(U,{className:"h-5 w-5 text-white","aria-hidden":"true"})}),(0,B.jsx)(Z,{onClick:Ue,label:le?"Exit fullscreen":"Fullscreen",buttonRef:w,children:le?(0,B.jsx)(A,{className:"h-5 w-5 text-white","aria-hidden":"true"}):(0,B.jsx)(R,{className:"h-5 w-5 text-white","aria-hidden":"true"})})]})]})]})]})]})}var te=/\s*[([]\s*\d{3,4}p\s*[)\]]/gi,ae=/\s+\d{3,4}p\s*$/i,re=/\bcopy of\s+/gi,se=/\s*\(\d+\)\s*$/,ne=/\b(eng|esp|english|spanish)\b/gi,ie=/^[\s\-ââ:|]+/,le=e=>e.toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(/\blevels?\b/g,"nivel").replace(/\bprecourse\b/g,"precurso").replace(/[^a-z0-9]/g,"");function oe(e){if(!/^[a-zà -öø-ÿ]+[A-ZÃ-ÃÃ-Ã]/.test(e))return e;const t=e.toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}function ce(e,t){if(!e)return e;let a=e;return a=a.replace(te," "),a=a.replace(ae,""),a=a.replace(se,""),a=a.replace(re,""),a=function(e,t){if(!t)return e;const a=e.indexOf(" - ");if(a<=0)return e;const r=e.slice(0,a),s=e.slice(a+3).trim();if(!s)return e;const n=le(r.replace(ne,""));if(n.length<3)return e;if(le(t).includes(n))return s;const i=t.split(" - ").pop()??"",l=le(i);return l.length>=4&&n.includes(l)?s:e}(a,t),a=a.replace(/_/g," "),a=a.replace(ie,""),a=a.replace(/\s+/g," ").trim(),a=a.split(" ").map(oe).join(" "),a===a.toLowerCase()&&(a=function(e){const t=e.search(/[a-zà -öø-ÿ]/i);return-1===t?e:e.slice(0,t)+e.charAt(t).toUpperCase()+e.slice(t+1)}(a)),a||e}function de({courseTitle:e,programName:t,materials:a,selectedMaterialId:r,isLoadingMaterial:s=!1,collapsedCategories:n,onToggleCategory:i,onSelectMaterial:l}){const o=(0,X.useMemo)(()=>function(e){const t=new Map;for(const a of e){const e=a.material_category?.id||"__uncategorized__",r=a.material_category?.name||"Uncategorized";t.has(e)||t.set(e,{id:e,name:r,materials:[]}),t.get(e).materials.push(a)}for(const a of t.values())a.materials.sort((e,t)=>null==e.display_order&&null==t.display_order?0:null==e.display_order?1:null==t.display_order?-1:e.display_order-t.display_order);return Array.from(t.values()).sort((e,t)=>"__uncategorized__"===e.id?1:"__uncategorized__"===t.id?-1:e.name.localeCompare(t.name))}(a),[a]),c=1===o.length;return(0,B.jsxs)("div",{className:"flex h-full flex-col",children:[(0,B.jsxs)("div",{className:"border-b border-hairline p-4",children:[(0,B.jsx)("p",{className:"text-text-muted mb-1 font-sans text-xs uppercase tracking-wider",children:t}),(0,B.jsx)("h2",{className:"text-text-on-dark line-clamp-2 font-serif text-lg font-bold",children:e}),(0,B.jsxs)("p",{className:"text-text-muted mt-1 font-sans text-xs",children:[a.length," ",1===a.length?"lesson":"lessons"]})]}),(0,B.jsx)("div",{className:"flex-1 overflow-y-auto",children:0===a.length?(0,B.jsx)("div",{className:"p-4 text-center",children:(0,B.jsx)("p",{className:"text-text-muted font-sans text-sm",children:"No lessons available yet."})}):c?(0,B.jsx)("div",{className:"py-2",children:o[0].materials.map(e=>(0,B.jsx)(ue,{material:e,isSelected:r===e.material_id,isLoading:s,isS
1howSpinner:s&&r===e.material_id,onSelect:l},e.material_id))}):(0,B.jsx)("div",{className:"py-2",children:o.map(e=>{const t=n.has(e.id);return(0,B.jsxs)("div",{children:[(0,B.jsxs)("button",{onClick:()=>i(e.id),className:"flex w-full items-center gap-2 px-4 py-2.5 text-left transition-colors hover:bg-white/5","aria-expanded":!t,"aria-label":`${e.name}, ${e.materials.length} ${1===e.materials.length?"lesson":"lessons"}`,children:[(0,B.jsx)(y,{className:"h-4 w-4 flex-shrink-0 text-brand-red-text","aria-hidden":"true"}),(0,B.jsx)("span",{className:"text-text-on-dark flex-1 truncate font-sans text-sm font-semibold",children:e.name}),(0,B.jsx)("span",{className:"text-text-muted text-xs",children:e.materials.length}),(0,B.jsx)(w,{"aria-hidden":"true",className:"text-text-muted h-4 w-4 flex-shrink-0 transition-transform "+(t?"-rotate-90":"")})]}),!t&&e.materials.map(e=>(0,B.jsx)(ue,{material:e,isSelected:r===e.material_id,isLoading:s,isShowSpinner:s&&r===e.material_id,onSelect:l},e.material_id))]},e.id)})})})]})}var ue=(0,X.memo)(function({material:e,isSelected:t,isLoading:a=!1,isShowSpinner:r=!1,onSelect:s}){return(0,B.jsxs)("button",{onClick:()=>s(e),disabled:a,"aria-current":t?"true":void 0,className:"flex w-full items-start gap-3 px-4 py-3 text-left transition-colors "+(r?"cursor-not-allowed border-r-2 border-brand-red bg-brand-red/10 opacity-70":a?"cursor-not-allowed opacity-50":t?"border-r-2 border-brand-red bg-brand-red/10":"hover:bg-white/5"),children:[(0,B.jsx)("div",{className:"mt-0.5 flex-shrink-0",children:r?(0,B.jsx)("div",{className:"h-4 w-4 animate-spin rounded-full border-2 border-brand-red/30 border-t-brand-red"}):t?(0,B.jsx)(d,{className:"h-4 w-4 fill-brand-red text-brand-red-text"}):(0,B.jsx)(S,{className:"text-text-muted h-4 w-4"})}),(0,B.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,B.jsx)("p",{className:"line-clamp-2 font-sans text-sm "+(t||r?"font-semibold text-brand-red-text":"text-text-on-dark"),title:e.title,children:ce(e.title,e.material_category?.name)}),e.duration&&(0,B.jsx)("div",{className:"mt-1 flex items-center gap-2",children:(0,B.jsxs)("span",{className:"text-text-muted flex items-center gap-1 text-xs",children:[(0,B.jsx)(C,{className:"h-3 w-3"}),e.duration," min"]})})]})]})});function me({onClick:e}){return(0,B.jsxs)(v,{variant:"brand-outline",size:"sm",onClick:e,className:"mb-4",children:[(0,B.jsx)(c,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),"Back to My Courses"]})}function xe(){const{enrollmentId:e}=k(),t=E(),[a,l]=(0,X.useState)(null),[o,c]=(0,X.useState)(!1),[u,x]=(0,X.useState)(new Set),[p,g]=(0,X.useState)(!1),[y,w]=(0,X.useState)(!1),{data:C,isLoading:S,error:T}=s({queryKey:r.enrollments.detail(e||""),queryFn:async()=>{const t=await n.getEnrollment(e);let a=[];return"ACTIVE"!==t.status&&"CONFIRMED"!==t.status||(a=(await n.listCourseMaterials(t.course_id,t.course_offering_id,{limit:100})).materials||[]),{courseTitle:t.course_title||"Unknown Course",programName:t.program_name||"Unknown Program",enrollmentStatus:t.status,courseOfferingId:t.course_offering_id,materials:a}},enabled:!!e,staleTime:_.SHORT}),F=T?T.message:"",P=(0,X.useMemo)(()=>C?.materials?[...C.materials].sort((e,t)=>null==e.display_order&&null==t.display_order?0:null==e.display_order?1:null==t.display_order?-1:e.display_order-t.display_order):[],[C?.materials]),R=(0,X.useMemo)(()=>a?P.findIndex(e=>e.material_id===a.material_id):-1,[a,P]),A=R>=0&&R<P.length-1,I=(0,X.useMemo)(()=>{if(!a)return"";const e=C?.materials.find(e=>e.material_id===a.material_id);return ce(a.title,e?.material_category?.name)},[a,C?.materials]),D=(0,X.useRef)(0),H=C?.courseOfferingId,U=(0,X.useCallback)(async e=>{if(!H)return;w(!1);const t=++D.current;c(!0),l({material_id:e.material_id,title:e.title,description:e.description,playback_url:"",expires_at:null,watermark_code:null});try{const a=await n.getMaterialAccessUrl(e.material_id,H);if(t!==D.current)return;l({material_id:e.material_id,title:e.title,description:e.description,playback_url:a.playback_url,expires_at:a.expires_at??null,watermark_code:a.watermark_code??null})}catch(a){if(t!==D.current)return;l(null),m(a,{context:"material_access_url_failed"}),M.error(a instanceof Error?a.message:"Failed to load video. Please try again.",{duration:4e3})}finally{t===D.current&&c(!1)}},[H]),O=(0,X.useCallback)(()=>{t("/login",{state:{message:"Your session ended. Sign in again to carry on with your lesson.",from:location.pathname}})},[t]),K=(0,X.useCallback)(async()=>{const e=a?.material_id;if(!e||!H)throw new Error("No material selected");const t=await n.getMaterialAccessUrl(e,H);return{url:t.playback_url,expiresAt:t.expires_at??null}},[a?.material_id,H]),W=(0,X.useCallback)(()=>
1{if(!A)return;const e=P[R+1];U(e)},[A,P,R,U]),Y=(0,X.useCallback)(()=>{P.length>0&&U(P[0])},[P,U]);(0,X.useEffect)(()=>{if(!y)return;const e=e=>{"Escape"===e.key&&w(!1)};document.addEventListener("keydown",e);const t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",e),document.body.style.overflow=t}},[y]);const G=(0,X.useCallback)(e=>{x(t=>{const a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},[]);if(F)return(0,B.jsxs)("div",{children:[(0,B.jsx)(me,{onClick:()=>t("/student/courses")}),(0,B.jsx)(b,{icon:N,title:"Course Not Found",description:F||"This course could not be loaded. It may have been removed or you may not have access.",action:{label:"Back to My Courses",onClick:()=>t("/student/courses")}})]});if(S||!C)return(0,B.jsxs)("div",{children:[(0,B.jsx)(me,{onClick:()=>t("/student/courses")}),(0,B.jsx)(i,{})]});if("ACTIVE"!==C.enrollmentStatus&&"CONFIRMED"!==C.enrollmentStatus)return(0,B.jsxs)("div",{children:[(0,B.jsx)(me,{onClick:()=>t("/student/courses")}),(0,B.jsxs)("div",{className:"rounded-lg border border-hairline bg-surface-2 p-8 text-center",children:[(0,B.jsx)(N,{className:"text-text-muted mx-auto mb-3 h-12 w-12","aria-hidden":"true"}),(0,B.jsxs)("h2",{className:"text-text-on-dark mb-2 font-serif text-xl font-bold",children:["Enrollment ",C.enrollmentStatus]}),(0,B.jsx)("p",{className:"text-text-muted font-sans text-sm",children:"This enrollment is no longer active. Course materials are not available."})]})]});const J=(0,B.jsx)(de,{courseTitle:C.courseTitle,programName:C.programName,materials:C.materials,selectedMaterialId:a?.material_id??null,isLoadingMaterial:o,collapsedCategories:u,onToggleCategory:G,onSelectMaterial:U});return(0,B.jsxs)("div",{className:"relative",children:[(0,B.jsxs)("div",{className:"flex min-h-[calc(100vh-64px)]",children:[(0,B.jsx)("aside",{className:"hidden flex-shrink-0 border-r border-hairline bg-surface-2 transition-all duration-300 lg:block "+(p?"w-0 overflow-hidden border-r-0":"w-64"),children:(0,B.jsx)("div",{className:"sticky top-0 h-[calc(100vh-64px)] w-64 overflow-y-auto",children:J})}),(0,B.jsx)("div",{className:"min-w-0 flex-1",children:(0,B.jsxs)("div",{className:"p-4 sm:p-6",children:[(0,B.jsx)(me,{onClick:()=>t("/student/courses")}),(0,B.jsx)(L,{eyebrow:C.programName,title:C.courseTitle,actions:(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("button",{onClick:()=>w(!0),className:"text-text-on-dark inline-flex min-h-[44px] items-center gap-2 rounded-lg border border-hairline px-3 py-1.5 font-sans text-sm transition-colors hover:bg-white/5 lg:hidden","aria-haspopup":"dialog","aria-expanded":y,children:[(0,B.jsx)(z,{className:"h-4 w-4","aria-hidden":"true"}),"Lessons",(0,B.jsxs)("span",{className:"text-text-muted",children:["(",P.length,")"]})]}),(0,B.jsx)("button",{onClick:()=>g(e=>!e),className:"text-text-muted hidden items-center gap-2 rounded-lg border border-hairline px-3 py-1.5 font-sans text-sm transition-colors hover:bg-white/5 hover:text-white lg:flex","aria-expanded":!p,children:p?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)($,{className:"h-4 w-4","aria-hidden":"true"}),"Show Lessons"]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(q,{className:"h-4 w-4","aria-hidden":"true"}),"Hide Lessons"]})})]})}),a?(0,B.jsxs)("div",{children:[o?(0,B.jsx)("div",{className:"flex min-h-[300px] items-center justify-center rounded-lg border border-hairline bg-black sm:min-h-[400px]",children:(0,B.jsx)(h,{text:"Loading video..."})}):(0,B.jsx)(ee,{src:a.playback_url,srcExpiresAt:a.expires_at,onRequestFreshSource:K,onSessionExpired:O,autoPlay:!0,watermarkCode:a.watermark_code}),(0,B.jsxs)("div",{className:"mt-4",children:[(0,B.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,B.jsx)("h2",{className:"text-text-on-dark min-w-0 flex-1 break-words font-serif text-xl font-bold sm:text-2xl",title:a.title,children:I}),A?(0,B.jsxs)(v,{variant:"brand-outline",size:"sm",onClick:W,className:"flex-shrink-0",children:["Next Lesson",(0,B.jsx)(V,{className:"ml-2 h-4 w-4","aria-hidden":"true"})]}):(0,B.jsx)("div",{className:"text-text-muted flex-shrink-0 rounded-lg border border-hairline bg-surface-2 px-3 py-1.5 text-sm font-medium",children:"Last lesson"})]}),a.description&&(0,B.jsx)("p",{className:"text-text-muted mt-2 font-sans text-sm",children:a.description})]})]}):(0,B.jsxs)("div",{className:"rounded-lg border border-hairline bg-surface-2 p-8 text-center sm:p-12",children:[(0,B.jsx)(j,{className:"text-text-muted mx-auto mb-4 h-16 w-16","aria-hidden":"true"}),(0,B.jsx)("p",{className:"text-text-muted mx-auto mb-6 max-w-md font-sans",children:P.length>0?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("span",{className:"hidden lg:inline",children:"Select a lesson from the sidebar to start learning."}),(0,B.jsx)("span",{className:"lg:hidden",children:"Tap Lessons above to browse, or start with the first one."})]}):"No lessons are available yet."}),P.length>0&&(0,B.jsxs)(v,{variant:"primary",onClick:Y,children:[(0,B.jsx)(d,{className:"mr-2 h-4 w-4"}),"Start First Lesson"]}),0===P.length&&(0,B.jsx)("p",{className:"text-text-muted font-sans text-sm",children:"No lessons available yet. Check back later!"})]})]})})]}),y&&(0,B.jsxs)("div",{className:"fixed inset-0 z-50 lg:hidden",children:[(0,B.jsx)("button",{type:"button","aria-label":"Close lessons",onClick:()=>w(!1),className:"absolute inset-0 bg-black/60"}),(0,B.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Lessons",className:"absolute inset-y-0 left-0 flex w-[85vw] max-w-sm flex-col border-r border-hairline bg-surface-2 shadow-2xl",children:[(0,B.jsxs)("div",{className:"flex items-center justify-between border-b border-hairline px-2 py-2",children:[(0,B.jsx)("span",{className:"text-text-muted px-2 font-sans text-xs uppercase tracking-wider",children:"Lessons"}),(0,B.jsx)("button",{type:"button",onClick:()=>w(!1),"aria-label":"Close lessons",className:"inline-flex h-11 w-11 items-center justify-center rounded-lg text-white transition-colors hover:bg-white/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-white/60",children:(0,B.jsx)(f,{className:"h-5 w-5","aria-hidden":"true"})})]}),(0,B.jsx)("div",{className:"flex-1 overflow-y-auto pb-[env(safe-area-inset-bottom)]",children:J})]})]})]})}export{xe as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.