1import{i as a,f as o}from"./motion-BTH3w9fV.js";import{cp as L,cl as b,cq as D,g as V,cc as k,f as I}from"./index-CTi7hHs9.js";import{k as R,h as T}from"./firstTimeHints-DkFTY8r4.js";import{u as A,G as M}from"./useSavedDocument-ClcCbnPX.js";import{R as p}from"./ResourceNotFoundPage-Dx1x9hJT.js";import{P as N}from"./PeacockStudioLoader-HhO9WvKx.js";import{r as y}from"./analyticsRepository-CR5y04eV.js";import{a as O}from"./useFirstTimeHint-D6Pdm5fE.js";import{u as _}from"./useHydrateResourceLabels-BrlMjNZK.js";import{u as q,r as G}from"./resolveFlowDocView-DgNoik18.js";import{F as U}from"./FlowDocExperienceViews-CSTaxKPr.js";import{aB as u,an as B}from"./flowLibraryDb-Dfoh8sKi.js";import"./clerk-BpV5oStK.js";import"./sentry-C20HUQ3l.js";import"./guestDocumentVisibility-DAwHkQic.js";import"./ShareDocumentModal-CE41xP16.js";import"./GuestShareAccessNotice-BheDljjO.js";import"./trash-2-JuBMUU98.js";import"./resolveStepDescription-B71MCotr.js";import"./pdf-VhDWQxox.js";import"./supabaseClient-CB_5nr7r.js";import"./Button-3SqDYXzX.js";import"./FieldTextarea-pD-DHDLN.js";import"./loader-circle-sz1I2CBp.js";import"./PlayerStage-BMfmMbSZ.js";import"./PlayerClickMarker-CFc5tyvn.js";import"./PulseMarker-C32XJ7SL.js";import"./rotate-ccw-CXpviO9c.js";import"./HintAnchor-CWT_zWNF.js";import"./check-DKZUFT4M.js";import"./eye-DFJa3VdH.js";import"./circle-check-B3rBG1Sl.js";import"./list-ordered-uFBPCEwa.js";import"./layout-grid-CPBiuNuT.js";import"./arrow-up-right-B7dqexlb.js";import"./FlowSectionCard-CQRPXn1p.js";import"./arrow-left-lFvyOmV1.js";import"./book-marked-DgSxIzMm.js";import"./ActionTooltip-CVejSt0q.js";import"./maximize-2-C7SNgLHV.js";import"./pencil-DIQCVHHo.js";import"./FlowVersionBadge-DpsVV-k4.js";import"./formatFlowDate-Ci-M_0r3.js";import"./circle-play-C6mzUmQz.js";import"./clock-8DaP8x18.js";import"./useWorkflowArtifacts-BywR-R8b.js";import"./SignedInUserButton-Do5Z14Z7.js";import"./sessionIntent-C4lm7p9z.js";import"./workflowArtifact-CSxh7pNS.js";import"./GenericErrorPage-DQHG67w-.js";import"./play-Ckh27Uvd.js";import"./circle-dashed-BwCmXjUI.js";import"./chevron-right-D5NvJfah.js";import"./audit-CdCstKrm.js";import"./turnstile-B5SSyqO-.js";const $e=()=>{const{documentId:t}=L(),g=b(),[s,d]=D(),S=q(),{isLoading:P,isLoaded:r,error:l}=A(t);_(r,!0);const f=u(e=>e.steps),h=u(e=>e.shareSettings),n=u(e=>e.setViewerFilter),i=G(s,g.hash,S);a.useEffect(()=>{if(!r)return;const e=B(s,f,h??void 0);return n(e),()=>n(null)},[r,s,f,h,n]),a.useEffect(()=>{!r||!t||y("document_view",{resourceType:"document",resourceId:t,metadata:{view:i}})},[t,r,i]),a.useEffect(()=>{!r||!t||i!=="player"||k(I.playerOpened,{document_id:t,view:i})},[t,r,i]);const j=e=>{const c=new URLSearchParams(s);if(c.set("view",e),d(c,{replace:!0}),e==="doc"){const F=`${window.location.pathname}?${c.toString()}`;window.history.replaceState(null,"",F),window.scrollTo(0,0)}t&&y("document_mode_change",{resourceType:"document",resourceId:t,metadata:{view:e}})},E=()=>{const e=new URLSearchParams(s);e.set("view","hub"),d(e,{replace:!0})},m=a.useMemo(()=>R(i==="player"?"player":"doc"),[i]),{activeHintId:w,dismissHint:v,skipAllHints:x}=O(m,{ready:r}),H=a.useMemo(()=>({activeHintId:w,hintStep:e=>T(e,m),dismissHint:v,skipAllHints:x}),[w,v,m,x]);return t?l?o.jsx(p,{title:"Documentation not found",description:l}):P?o.jsxs("div",{className:"flex min-h-screen flex-col items-center justify-center gap-4 bg-slate-50",children:[o.jsx(N,{size:160}),o.jsx("p",{className:"text-sm text-slate-500",children:"Loading documentationâ¦"})]}):r?o.jsx(M,{documentId:t,children:o.jsx(V,{compact:!0,title:"Player crashed",description:"A rendering error stopped the player. You can retry this view or return to your dashboard.",children:o.jsx(U,{documentId:t,resolvedView:i,onModeChange:j,onOverview:E,pageHints:H})})}):o.jsx(p,{title:"Documentation not found",description:"This documentation was not found. It may have been deleted."}):o.jsx(p,{title:"Invalid link",description:"Open documentation from your dashboard or use a shared link."})};export{$e as Player}; 2//# sourceMappingURL=Player-CYaIoacs.js.map
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.