1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[793],{3795:function(e,t,s){Promise.resolve().then(s.bind(s,5656))},3371:function(e,t,s){"use strict";s.d(t,{z:function(){return c}});var n=s(7437),r=s(2265),l=s(1538),i=s(2218),a=s(8745);let o=(0,i.j)("inline-flex items-center justify-center whitespace-nowrap 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-background 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:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),c=r.forwardRef((e,t)=>{let{className:s,variant:r,size:i,asChild:c=!1,...d}=e,u=c?l.g7:"button";return(0,n.jsx)(u,{className:(0,a.cn)(o({variant:r,size:i,className:s})),ref:t,...d})});c.displayName="Button"},5656:function(e,t,s){"use strict";s.d(t,{default:function(){return U}});var n=s(7437),r=s(2265),l=s(7138),i=s(6463),a=s(4041),o=s(2468),c=s(8030);let d=(0,c.Z)("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);var u=s(8954);let m=(0,c.Z)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var x=s(3274),h=s(3073),f=s(6727),v=s(4232),p=s(4453),b=s(287),g=s(3371),j=s(6752),w=s(5962),y=s(2568),N=s(8168);let k=e=>{let{work:t}=e,s=(0,a.useTranslations)("signedOutChat"),{openSignIn:l}=(0,h.ll)(),[i,o]=(0,r.useState)(""),c=()=>{let e=window.location.pathname+window.location.search;l({forceRedirectUrl:e,signUpForceRedirectUrl:e})};return(0,n.jsxs)("div",{className:"chat",children:[(0,n.jsx)(y.x,{className:"mb-2 h-[240px] w-full rounded-xl border border-stone-200 bg-stone-50",children:(0,n.jsx)("div",{className:"flex flex-col gap-3 p-3",children:(0,n.jsxs)("div",{className:"flex flex-row items-start gap-3 rounded-2xl border border-stone-200 bg-white p-4 shadow-sm",children:[(0,n.jsx)("div",{className:"mt-1 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-lime-100 text-lime-700",children:(0,n.jsx)(u.Z,{className:"h-4 w-4"})}),(0,n.jsx)("p",{className:"text-sm leading-relaxed text-stone-700",children:(0,N.eo)(null==t?void 0:t.languageId,null==t?void 0:t.title)})]})})}),(0,n.jsxs)("form",{className:"relative mt-3 w-full rounded-xl border border-stone-200 bg-white focus-within:ring-1 focus-within:ring-lime-400",onSubmit:e=>{e.preventDefault(),c()},children:[(0,n.jsx)(j._,{htmlFor:"message",className:"sr-only",children:s("messageLabel")}),(0,n.jsx)(w.g,{id:"message",placeholder:s("placeholder"),value:i,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),c())},className:"min-h-12 resize-none border-0 p-4 text-sm shadow-none focus-visible:ring-0"}),(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 pt-0",children:[(0,n.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-stone-500",children:[(0,n.jsx)(p.Z,{className:"h-3 w-3"}),s("signInToSend")]}),(0,n.jsxs)(g.z,{type:"submit",size:"sm",className:"gap-2 rounded-full bg-lime-600 text-white hover:bg-lime-700",children:[s("send"),(0,n.jsx)(b.Z,{className:"size-3.5"})]})]})]})]})};var T=s(5491),S=s(8745),C=s(5071),I=s(3578),z=s(4391),E=s(2714),M=s(5496),P=s(8122);function Z(e){let{workId:t,player:s,currentTimestamp:l}=e,i=(0,a.useTranslations)("watch"),[c,u]=(0,r.useState)(!1),m=(0,r.useCallback)(async()=>{var e,n;let r=null!==(n=null===(e=s.current)||void 0===e?void 0:e.currentTime)&&void 0!==n?n:0,i=Math.max(0,Math.round(r>0?r:l)),a=window.location.origin,o="".concat(a,"/watch/").concat(t).concat(i>0?"?t=".concat(i):"");try{await navigator.clipboard.writeText(o),u(!0),setTimeout(()=>u(!1),1800)}catch(e){}},[l,s,t]);return(0,n.jsxs)("button",{type:"button",onClick:m,className:"inline-flex items-center gap-1.5 rounded-full border border-stone-200 bg-white px-3 py-1 text-xs text-stone-600 transition-colors hover:border-stone-400 hover:text-stone-900",children:[c?(0,n.jsx)(o.Z,{className:"h-3 w-3 text-lime-600"}):(0,n.jsx)(d,{className:"h-3 w-3"}),i(c?"copied":"copyLink")]})}function U(){var e,t;let s=(0,a.useTranslations)("watch"),o=(0,a.useTranslations)("nav"),c=(0,i.useParams)(),d=(0,i.useSearchParams)(),p=(0,r.useRef)(null),[b,g]=(0,r.useState)(!1),[j,w]=(0,r.useState)(0),[y,N]=(0,r.useState)({}),{isSignedIn:U,isLoaded:_}=(0,h.aF)(),F=null==c?void 0:c.id,L=Number(null!==(t=null==d?void 0:d.get("t"))&&void 0!==t?t:"0"),O=!!F&&/^[0-9a-f-]{36}$/i.test(F),R=O?"/watch/".concat(F).concat((null==d?void 0:d.toString())?"?".concat(d.toString()):""):"/",{data:A,error:D,isLoading:B}=C.h.work.getPublicWorkBundle.useQuery({id:null!=F?F:""},{enabled:O}),V=null==A?void 0:A.work,W=null==A?void 0:A.title,H=null==A?void 0:A.summary,J=null==A?void 0:A.transcription,K=(0,r.useMemo)(()=>{var e;let t=null==A?void 0:null===(e=A.profile)||void 0===e?void 0:e.meta;if(!t)return null;try{let e=JSON.parse(t);if(!e||"object"!=typeof e||Array.isArray(e))return null;let s={};for(let[t,n]of Object.entries(e))"string"==typeof n&&""!==n.trim()&&(s[t]=n);return Object.keys(s).length>0?s:null}catch(e){return null}},[null==A?void 0:null===(e=A.profile)||void 0===e?void 0:e.meta]),$=(0,r.useMemo)(()=>{var e,t;return null!==(t=null!==(e=(0,P.l)(null==W?void 0:W.body))&&void 0!==e?e:(0,P.l)(null==V?void 0:V.title))&&void 0!==t?t:void 0},[W,V]),q=(0,r.useMemo)(()=>{var e;let t=new T.WebVTTParser().parse(null!==(e=null==J?void 0:J.body)&&void 0!==e?e:"");return(0,S.Gi)(t.cues)},[J]);return((0,r.useEffect)(()=>{(null==J?void 0:J.body)&&N(new T.WebVTTParser().parse(J.body))},[J]),(0,r.useEffect)(()=>
1{if(p.current&&!b&&(null==V?void 0:V.publicPlaybackId)&&L>0&&Number.isFinite(L)){let e=p.current,t=()=>{e.currentTime=L,e.play().catch(()=>{})};t(),e.addEventListener("loadedmetadata",t,{once:!0}),g(!0)}},[L,b,null==V?void 0:V.publicPlaybackId]),O)?(0,n.jsxs)("main",{className:"min-h-screen bg-stone-50 text-stone-900",children:[(0,n.jsx)("header",{children:(0,n.jsxs)("div",{className:"container mx-auto flex items-center justify-between px-6 py-6",children:[(0,n.jsxs)(l.default,{href:"/",className:"flex items-center gap-2 text-lg font-semibold tracking-tight text-stone-900",children:[(0,n.jsx)(u.Z,{className:"h-6 w-6 text-lime-600"}),"NeoTube"]}),(0,n.jsxs)("div",{className:"flex items-center gap-4",children:[(0,n.jsxs)(l.default,{href:"/discover",className:"inline-flex items-center gap-1.5 text-sm text-stone-600 transition-colors hover:text-lime-700",children:[(0,n.jsx)(m,{className:"h-4 w-4"}),s("backToSearch")]}),(0,n.jsx)(E.LanguageSwitcher,{}),_&&U&&(0,n.jsx)(l.default,{href:"/studio",className:"inline-flex items-center gap-1.5 text-sm text-stone-600 transition-colors hover:text-lime-700",children:o("studio")}),_&&U?(0,n.jsx)(h.l8,{}):_&&(0,n.jsx)(h.$d,{mode:"modal",forceRedirectUrl:R,signUpForceRedirectUrl:R,children:(0,n.jsx)("button",{className:"inline-flex items-center gap-1.5 rounded-full border border-stone-200 px-3 py-1.5 text-xs uppercase tracking-widest text-stone-600 transition-colors hover:border-lime-400 hover:bg-lime-50 hover:text-stone-900",children:o("signIn")})})]})]})}),(0,n.jsx)("section",{className:"px-6 pb-16 pt-4",children:(0,n.jsxs)("div",{className:"container mx-auto max-w-4xl",children:[B&&(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 py-16 text-stone-500",children:[(0,n.jsx)(x.Z,{className:"h-4 w-4 animate-spin"}),(0,n.jsx)("span",{className:"text-sm",children:s("loading")})]}),D&&(0,n.jsxs)("div",{className:"rounded-2xl border border-stone-200 bg-white p-12 text-center shadow-sm",children:[(0,n.jsx)("h2",{className:"mb-2 text-xl font-semibold text-stone-900",children:s("unavailableTitle")}),(0,n.jsx)("p",{className:"text-stone-600",children:s("unavailableBody")})]}),V&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[(0,n.jsx)("h1",{className:"mr-1 text-2xl font-semibold tracking-tight text-stone-900",children:null!=$?$:s("untitled")}),(0,n.jsx)(I.C,{variant:"secondary",className:"rounded-full",children:V.creator}),V.languageId&&(0,n.jsx)(I.C,{className:"rounded-full capitalize",children:V.languageId}),K&&(0,n.jsx)(z.j,{meta:K}),(0,n.jsx)(M.U,{workId:V.id}),(0,n.jsx)("div",{className:"ml-auto",children:(0,n.jsx)(Z,{workId:V.id,player:p,currentTimestamp:j})})]}),(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)(f.J,{cueData:q,work:V,transcriptions:y,title:null!=$?$:null,summary:null==H?void 0:H.body,setCurrentTimestamp:w,currentTimestamp:j,player:p})}),(0,n.jsx)("div",{className:"mt-4",children:_&&U?(0,n.jsx)(v.e,{setCurrentTimestamp:w,work:V,trans:y,player:p}):_&&(0,n.jsx)(k,{work:V})})]})]})})]}):(0,n.jsx)("main",{className:"flex min-h-screen items-center justify-center bg-stone-50 text-stone-600",children:(0,n.jsx)("p",{children:s("invalidId")})})}}},function(e){e.O(0,[404,331,194,837,965,202,182,723,448,463,885,971,23,744],function(){return e(e.s=3795)}),_N_E=e.O()}]);
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.