@hyperframes/producer 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": "0.1.0",
3
3
  "buildId": "dev",
4
- "sha256": "a1824c85f214b4cb3f29f6b3ba0c99e5ab5b05d6bbffaf91670a5394dbe67233",
4
+ "sha256": "1d58f4fa8b0eed0443ff9daf35980bb74d3d81eccabacf927e1c51ca38a93ea8",
5
5
  "artifacts": {
6
6
  "iife": "hyperframe.runtime.iife.js",
7
7
  "esm": "hyperframe.runtime.mjs"
@@ -1,4 +1,4 @@
1
- "use strict";(()=>{function le(e){try{window.parent.postMessage(e,"*")}catch{}}function pt(e){let t=n=>{let s=n.data;if(!s||s.source!=="hf-parent"||s.type!=="control")return;let o=s.action;if(o==="play"){e.onPlay();return}if(o==="pause"){e.onPause();return}if(o==="seek"){e.onSeek(Number(s.frame??0),s.seekMode??"commit");return}if(o==="set-muted"){e.onSetMuted(!!s.muted);return}if(o==="set-playback-rate"){e.onSetPlaybackRate(Number(s.playbackRate??1));return}if(o==="enable-pick-mode"){e.onEnablePickMode();return}if(o==="disable-pick-mode"){e.onDisablePickMode();return}if(o==="flash-elements"){let i=s.selectors,l=s.duration||800;i&&on(i,l)}};return window.addEventListener("message",t),t}function on(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`
1
+ "use strict";(()=>{function ue(e){try{window.parent.postMessage(e,"*")}catch{}}function pt(e){let t=n=>{let r=n.data;if(!r||r.source!=="hf-parent"||r.type!=="control")return;let o=r.action;if(o==="play"){e.onPlay();return}if(o==="pause"){e.onPause();return}if(o==="seek"){e.onSeek(Number(r.frame??0),r.seekMode??"commit");return}if(o==="set-muted"){e.onSetMuted(!!r.muted);return}if(o==="set-playback-rate"){e.onSetPlaybackRate(Number(r.playbackRate??1));return}if(o==="enable-pick-mode"){e.onEnablePickMode();return}if(o==="disable-pick-mode"){e.onDisablePickMode();return}if(o==="flash-elements"){let i=r.selectors,c=r.duration||800;i&&fn(i,c)}};return window.addEventListener("message",t),t}function fn(e,t){if(!document.getElementById("__hf-flash-styles")){let n=document.createElement("style");n.id="__hf-flash-styles",n.textContent=`
2
2
  .__hf-flash {
3
3
  outline: 2px solid rgba(59, 130, 246, 0.6) !important;
4
4
  outline-offset: 2px !important;
@@ -8,10 +8,10 @@
8
8
  0% { outline-color: rgba(59, 130, 246, 0.8); }
9
9
  100% { outline-color: transparent; }
10
10
  }
11
- `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(o=>{o.classList.add("__hf-flash"),setTimeout(()=>o.classList.remove("__hf-flash"),t)})}catch{}}var $e=null;function ht(e){$e=e}function Ce(e,t){if($e)try{$e({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch{}}function gt(e){let t=[];return{name:"css",discover:()=>{t=[];let n=document.querySelectorAll("*");for(let s of n){if(!(s instanceof HTMLElement))continue;let o=window.getComputedStyle(s);!o.animationName||o.animationName==="none"||t.push({el:s,baseDelay:s.style.animationDelay||"",basePlayState:s.style.animationPlayState||""})}},seek:n=>{let s=Number(n.time)||0;for(let o of t){if(!o.el.isConnected)continue;let i=e?.resolveStartSeconds?e.resolveStartSeconds(o.el):Number.parseFloat(o.el.getAttribute("data-start")??"0")||0,l=Math.max(0,s-i);o.el.style.animationPlayState="paused",o.el.style.animationDelay=`-${l.toFixed(3)}s`}},pause:()=>{for(let n of t)n.el.isConnected&&(n.el.style.animationPlayState=n.basePlayState||"paused",n.baseDelay&&(n.el.style.animationDelay=n.baseDelay))},revert:()=>{t=[]}}}function yt(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let s=Math.max(0,Number(t.time)||0);typeof n.totalTime=="function"?n.totalTime(s,!1):n.seek(s,!1)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Lt(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],s=new Set(n);for(let o of t)s.has(o)||n.push(o);window.__hfLottie=n}}}catch{}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let s of n)try{if(bt(s))s.goToAndStop(t*1e3,!1);else if(St(s)){if(typeof s.setCurrentRawFrameValue=="function"){let o=s.totalFrames??0,i=s.frameRate??30,l=t*i;o>0&&s.setCurrentRawFrameValue(Math.min(l,o-1))}else if(typeof s.seek=="function"){let o=s.duration??1,i=Math.min(100,t/o*100);s.seek(i)}}}catch{}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(bt(t)||St(t))&&t.pause()}catch{}},revert:()=>{}}}function bt(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function St(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}function At(){let e=null,t=0;return{name:"three",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfThreeTime=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch{}},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function kt(){return{name:"waapi",discover:()=>{},seek:e=>{if(!document.getAnimations)return;let t=Math.max(0,(Number(e.time)||0)*1e3);for(let n of document.getAnimations())try{n.pause(),n.currentTime=t}catch{}},pause:()=>{if(document.getAnimations)for(let e of document.getAnimations())try{e.pause()}catch{}}}}function xt(e){let t=Array.from(document.querySelectorAll("video[data-start], audio[data-start]")),n=[],s=[],o=0;for(let i of t){let l=e?.resolveStartSeconds?e.resolveStartSeconds(i):Number.parseFloat(i.dataset.start??"0");if(!Number.isFinite(l))continue;let d=Number.parseFloat(i.dataset.playbackStart??i.dataset.mediaStart??"0")||0,c=i.defaultPlaybackRate,r=Number.isFinite(c)&&c>0?Math.max(.1,Math.min(5,c)):1,u=i.loop,g=Number.isFinite(i.duration)&&i.duration>0?i.duration:null,m=Number.parseFloat(i.dataset.duration??"");(!Number.isFinite(m)||m<=0)&&g!=null&&(m=Math.max(0,(g-d)/r));let b=Number.isFinite(m)&&m>0?l+m:Number.POSITIVE_INFINITY,T=Number.parseFloat(i.dataset.volume??""),M={el:i,start:l,mediaStart:d,duration:Number.isFinite(m)&&m>0?m:Number.POSITIVE_INFINITY,end:b,volume:Number.isFinite(T)?T:null,playbackRate:r,loop:u,sourceDuration:g};n.push(M),i.tagName==="VIDEO"&&s.push(M),Number.isFinite(b)&&(o=Math.max(o,b))}return{timedMediaEls:t,mediaClips:n,videoClips:s,maxMediaEnd:o}}function Et(e){for(let t of e.clips){let{el:n}=t;if(!n.isConnected)continue;let s=(e.timeSeconds-t.start)*t.playbackRate+t.mediaStart;if(e.timeSeconds>=t.start&&e.timeSeconds<t.end&&s>=0){if(t.loop&&t.sourceDuration!=null&&t.sourceDuration>0){let i=t.sourceDuration-t.mediaStart;i>0&&s>=t.sourceDuration&&(s=t.mediaStart+(s-t.mediaStart)%i)}t.volume!=null&&(n.volume=t.volume);try{n.playbackRate=t.playbackRate*e.playbackRate}catch{}if(Math.abs((n.currentTime||0)-s)>.3)try{n.currentTime=s}catch{}e.playing&&n.paused?n.play().catch(()=>{}):!e.playing&&!n.paused&&n.pause();continue}n.paused||n.pause()}}function wt(e){let t=!1,n=null,s=null,o=null,i=null;function l(y,A){try{window.dispatchEvent(new CustomEvent(y,{detail:A}))}catch{}}function d(y){o=y,l("hyperframe:picker:hovered",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function c(y){i=y,l("hyperframe:picker:selected",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function r(y){if(!y||y===document.body||y===document.documentElement)return!1;let A=y.tagName.toLowerCase();return!(A==="script"||A==="style"||A==="link"||A==="meta"||y.classList.contains("__hf-pick-highlight"))}function u(y){let A=y;if(A.id)return`#${A.id}`;let N=y.getAttribute("data-composition-id");if(N)return`[data-composition-id="${N}"]`;let R=y.getAttribute("data-composition-src");if(R)return`[data-composition-src="${R}"]`;let F=y.getAttribute("data-track-index");if(F)return`[data-track-index="${F}"]`;let E=y.tagName.toLowerCase(),k=y.parentElement;if(!k)return E;let C=k.querySelectorAll(`:scope > ${E}`);if(C.length===1)return E;for(let W=0;W<C.length;W+=1)if(C[W]===y)return`${E}:nth-of-type(${W+1})`;return E}function g(y){let A=y.tagName.toLowerCase(),N=(y.textContent??"").trim().replace(/\s+/g," "),R=(F,E)=>F.length>E?`${F.slice(0,E-1)}\u2026`:F;return A==="h1"||A==="h2"||A==="h3"?"Heading":A==="p"||A==="span"||A==="div"?N.length>0?R(N,56):"Text":A==="img"?"Image":A==="video"?"Video":A==="audio"?"Audio":A==="svg"?"Shape":y.getAttribute("data-composition-src")?"Composition":A==="section"?"Section":`${A.charAt(0).toUpperCase()}${A.slice(1)}`}function m(y,A,N){let R=typeof N=="number"&&N>0?N:8,F=[];if(document.elementsFromPoint)F=document.elementsFromPoint(y,A);else if(document.elementFromPoint){let C=document.elementFromPoint(y,A);F=C?[C]:[]}let E={},k=[];for(let C=0;C<F.length;C+=1){let W=F[C];if(!r(W))continue;let Y=`${W.tagName}::${W.id||""}::${C}`;if(!E[Y]&&(E[Y]=!0,k.push(W),k.length>=R))break}return k}function b(y){let A=y.getBoundingClientRect(),N={};for(let F=0;F<y.attributes.length;F+=1){let E=y.attributes[F];E.name.startsWith("data-")&&(N[E.name]=E.value)}return{id:y.id||null,tagName:y.tagName.toLowerCase(),selector:u(y),label:g(y),boundingBox:{x:A.left,y:A.top,width:A.width,height:A.height},textContent:y.textContent?y.textContent.trim().slice(0,200):null,src:y.getAttribute("src")||y.getAttribute("data-composition-src")||null,dataAttributes:N}}function T(y,A,N){return m(y,A,N).map(b)}function M(y){if(!t)return;let N=m(y.clientX,y.clientY,1)[0]??(y.target instanceof Element?y.target:null);if(!r(N)||n===N)return;n&&n.classList.remove("__hf-pick-highlight"),n=N,N.classList.add("__hf-pick-highlight");let R=b(N);d(R),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:R})}function _(y){if(!t)return;y.preventDefault(),y.stopPropagation(),y.stopImmediatePropagation();let A=T(y.clientX,y.clientY,8);A.length!==0&&(d(A[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:A,selectedIndex:0,point:{x:y.clientX,y:y.clientY}}))}function V(y){y.key==="Escape"&&(z(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function ee(){t||(t=!0,s=document.createElement("style"),s.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
12
- `),document.head.appendChild(s),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",M,!0),document.addEventListener("click",_,!0),document.addEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function z(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),s&&(s.remove(),s=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",M,!0),document.removeEventListener("click",_,!0),document.removeEventListener("keydown",V,!0),l("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function U(){window.__HF_PICKER_API={enable:ee,disable:z,isActive:()=>t,getHovered:()=>o,getSelected:()=>i,getCandidatesAtPoint:(y,A,N)=>Number.isFinite(y)&&Number.isFinite(A)?T(y,A,N):[],pickAtPoint:(y,A,N)=>{if(!Number.isFinite(y)||!Number.isFinite(A))return null;let R=T(y,A,8);if(!R.length)return null;let F=Math.max(0,Math.min(R.length-1,Number(N??0))),E=R[F]??null;return E?(c(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),z(),E):null},pickManyAtPoint:(y,A,N)=>{if(!Number.isFinite(y)||!Number.isFinite(A))return[];let R=T(y,A,8);if(!R.length)return[];let F=[],E=Array.isArray(N)?N:[0];for(let k of E){let C=Math.max(0,Math.min(R.length-1,Math.floor(Number(k)))),W=R[C];if(!W)continue;F.some(q=>q.selector===W.selector&&q.tagName===W.tagName)||F.push(W)}return F.length?(c(F[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:F}),z(),F):[]}},l("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:ee,disablePickMode:z,installPickerApi:U}}function Tt(e,t){let n=Number.isFinite(t)&&t>0?t:30,s=Number.isFinite(e)&&e>0?e:0;return Math.floor(s*n+1e-9)/n}function Mt(e,t,n){let s=Tt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(s,!1):e.seek(s,!1),s}function Nt(e){return{_timeline:null,play:()=>{let t=e.getTimeline();if(!t||e.getIsPlaying())return;let n=Math.max(0,Number(e.getSafeDuration?.()??t.duration()??0)||0);n>0&&Math.max(0,Number(t.time())||0)>=n&&(t.pause(),t.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof t.timeScale=="function"&&t.timeScale(e.getPlaybackRate()),t.play(),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let t=e.getTimeline();if(!t)return;t.pause();let n=Math.max(0,Number(t.time())||0);e.onDeterministicSeek(n),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(n,!1),e.onRenderFrameSeek(n),e.onStatePost(!0)},seek:t=>{let n=e.getTimeline();if(!n)return;let s=Math.max(0,Number(t)||0),o=Mt(n,s,e.getCanonicalFps());e.onDeterministicSeek(o),e.setIsPlaying(!1),e.onSyncMedia(o,!1),e.onRenderFrameSeek(o),e.onStatePost(!0)},renderSeek:t=>{let n=e.getTimeline();if(!n)return;let s=Mt(n,t,e.getCanonicalFps());e.onDeterministicSeek(s),e.setIsPlaying(!1),e.onSyncMedia(s,!1),e.onRenderFrameSeek(s),e.onStatePost(!0)},getTime:()=>Number(e.getTimeline()?.time()??0),getDuration:()=>Number(e.getTimeline()?.duration()??0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:t=>e.setPlaybackRate(t),getPlaybackRate:()=>e.getPlaybackRate()}}function vt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,timelinePollIntervalId:null,controlBridgeHandler:null,clampDurationLoggedRaw:null,beforeUnloadHandler:null,domReadyHandler:null,injectedCompStyles:[],injectedCompScripts:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,maxTimelineDurationSeconds:1800,nativeVisualWatchdogTick:0}}function Pe(e){let t=Number(e);return Number.isFinite(t)?t:null}function rn(e){let t=(e??"").trim();if(!t)return null;let n=Pe(t);if(n!=null)return{kind:"absolute",value:n};let s=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!s)return null;let o=(s[1]??"").trim();if(!o)return null;let i=s[2]??"+",l=s[3]??"0",d=Number.parseFloat(l),c=Number.isFinite(d)?Math.max(0,d):0,r=i==="-"?-c:c;return{kind:"reference",refId:o,offset:r}}function we(e){let t=e.timelineRegistry??{},n=new WeakMap,s=new WeakMap,o=new Set,i=c=>{let r=document.getElementById(c);return r||(document.querySelector(`[data-composition-id="${CSS.escape(c)}"]`)??null)},l=c=>{let r=s.get(c);if(r!==void 0)return r;let u=null,g=Pe(c.getAttribute("data-duration"));if(g!=null&&g>0&&(u=g),u==null||u<=0){let m=Pe(c.getAttribute("data-end"));if(m!=null){let b=d(c,0),T=m-b;Number.isFinite(T)&&T>0&&(u=T)}}if((u==null||u<=0)&&c instanceof HTMLMediaElement){let m=Pe(c.getAttribute("data-playback-start"))??Pe(c.getAttribute("data-media-start"))??0;Number.isFinite(c.duration)&&c.duration>m&&(u=c.duration-m)}if(u==null||u<=0){let m=c.getAttribute("data-composition-id");if(m){let b=t[m]??null;if(b&&typeof b.duration=="function")try{let T=Number(b.duration());Number.isFinite(T)&&T>0&&(u=T)}catch{}}}return u!=null&&Number.isFinite(u)&&u>0?(s.set(c,u),u):(s.set(c,null),null)},d=(c,r)=>{let u=n.get(c);if(u!==void 0)return u??r;if(o.has(c))return r;o.add(c);try{let g=rn(c.getAttribute("data-start"));if(!g){if(c.hasAttribute("data-composition-id")){let _=c.parentElement;if(_&&(_.hasAttribute("data-composition-src")||_.hasAttribute("data-composition-id"))){let V=d(_,r);return n.set(c,V),V}}return n.set(c,r),r}if(g.kind==="absolute"){let _=Math.max(0,g.value);return n.set(c,_),_}let m=i(g.refId);if(!m)return n.set(c,r),r;let b=d(m,0),T=l(m);if(T==null||T<=0){let _=Math.max(0,b+g.offset);return n.set(c,_),_}let M=Math.max(0,b+T+g.offset);return n.set(c,M),M}finally{o.delete(c)}};return{resolveStartForElement:(c,r=0)=>d(c,Math.max(0,r)),resolveDurationForElement:c=>l(c)}}function ue(e){let t=Number(e);return Number.isFinite(t)?t:null}var Rt={composition:0,video:1,image:2,element:3,audio:4};function sn(e){if(e.length===0)return;let t=new Map;for(let l of e){let d=t.get(l.track)??new Set;d.add(l.kind),t.set(l.track,d)}if(!Array.from(t.values()).some(l=>l.size>1))return;let s=0,o=new Map,i=[...t.keys()].sort((l,d)=>l-d);for(let l of i){let d=t.get(l);if(d.size===1)o.set(`${l}:${[...d][0]}`,s++);else{let c=[...d].sort((r,u)=>(Rt[r]??99)-(Rt[u]??99));for(let r of c)o.set(`${l}:${r}`,s++)}}for(let l of e){let d=`${l.track}:${l.kind}`,c=o.get(d);c!=null&&(l.track=c)}}function Fe(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function an(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Fe(t);let n=e.getAttribute("data-composition-src");if(n)return Fe(n);let s=e.querySelector("img[src], video[src], audio[src], source[src]");return s?Fe(s.getAttribute("src")):null}function Ct(e){let n=window.__timelines??{},s=we({timelineRegistry:n}),o=S=>{if(!S)return null;let h=n[S]??null;if(!h||typeof h.duration!="function")return null;try{let w=Number(h.duration());return Number.isFinite(w)&&w>0?w:null}catch{return null}},i=S=>{let h=ue(S.getAttribute("data-duration"));if(h!=null&&h>0)return h;let w=ue(S.getAttribute("data-playback-start"))??ue(S.getAttribute("data-media-start"))??0;return Number.isFinite(S.duration)&&S.duration>w?Math.max(0,S.duration-w):null},l=()=>{let S=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(S.length===0)return null;let h=0;for(let w of S){let P=s.resolveStartForElement(w,0);if(!Number.isFinite(P))continue;let G=i(w);G==null||G<=0||(h=Math.max(h,Math.max(0,P)+G))}return h>0?h:null},d=S=>{let h=S.trim().toLowerCase();return!(!h||h==="main"||h.includes("caption")||h.includes("ambient"))},c=(S,h)=>{let w=[],P=null,G=null,I=null,D=S.parentElement;for(;D;){let B=D.getAttribute("data-composition-id");B&&(w.push(B),!I&&D!==h&&(I=B),P==null&&(P=s.resolveStartForElement(D,0)),G==null&&(G=ue(D.getAttribute("data-duration"))??o(B)??null)),D=D.parentElement}return{parentCompositionId:I,compositionAncestors:w.reverse(),inheritedStart:P,inheritedDuration:G}},r=document.querySelector("[data-composition-id]"),u=r?.getAttribute("data-composition-id")??null,g=r?s.resolveStartForElement(r,0):0,m=l(),b=m!=null?Math.max(0,m-Math.max(0,g)):null,T=o(u),M=ue(r?.getAttribute("data-duration")),_=typeof T=="number"&&Number.isFinite(T)&&T>0?T:null,V=typeof M=="number"&&Number.isFinite(M)&&M>0?M:null,ee=typeof b=="number"&&Number.isFinite(b)&&b>0?b:null,z=_!=null&&ee!=null&&_>ee+1,U=V??(z?ee:_??ee),y=U!=null?Math.min(U,e.maxTimelineDurationSeconds):null,N=(y!=null?g+y:null)??(typeof m=="number"&&Number.isFinite(m)&&m>0?m:null),R=(S,h)=>!Number.isFinite(h)||h<=0?0:N==null||!Number.isFinite(N)?h:!Number.isFinite(S)||S>=N?0:Math.max(0,Math.min(h,N-S)),F=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],k=[],C=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),W=0;for(let S=0;S<C.length;S+=1){let h=C[S];if(h===r||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(h.tagName))continue;let w=c(h,r),P=s.resolveStartForElement(h,w.inheritedStart??0),G=h.getAttribute("data-composition-id"),I=ue(h.getAttribute("data-duration"));if((I==null||I<=0)&&G&&G!==u&&(I=o(G)),(I==null||I<=0)&&h instanceof HTMLMediaElement){let ae=ue(h.getAttribute("data-playback-start"))??ue(h.getAttribute("data-media-start"))??0;Number.isFinite(h.duration)&&h.duration>0&&(I=Math.max(0,h.duration-ae))}if(I==null||I<=0){let ae=w.inheritedDuration;if(ae!=null&&ae>0){let fe=(w.inheritedStart??0)+ae;I=Math.max(0,fe-P)}}if(I==null||I<=0||(I=R(P,I),I<=0))continue;let D=P+I;W=Math.max(W,D);let B=h.tagName.toLowerCase(),me=G&&G!==u?"composition":B==="video"?"video":B==="audio"?"audio":B==="img"?"image":"element";E.push({id:h.id||G||`__node__index_${S}`,label:h.getAttribute("data-timeline-label")??h.getAttribute("data-label")??h.getAttribute("aria-label")??G??h.id??h.className?.split(" ")[0]??me,start:P,duration:I,track:Number.parseInt(h.getAttribute("data-track-index")??h.getAttribute("data-track")??String(S),10)||0,kind:me,tagName:B,compositionId:h.getAttribute("data-composition-id"),compositionAncestors:w.compositionAncestors,parentCompositionId:w.parentCompositionId,nodePath:null,compositionSrc:Fe(h.getAttribute("data-composition-src")),assetUrl:an(h),timelineRole:h.getAttribute("data-timeline-role"),timelineLabel:h.getAttribute("data-timeline-label"),timelineGroup:h.getAttribute("data-timeline-group"),timelinePriority:ue(h.getAttribute("data-timeline-priority"))})}let Y=new Set(E.map(S=>S.id)),q=r?.getAttribute("data-composition-id")??null,K=q?n[q]??null:null;if(K&&r){let S=K;if(typeof S.getChildren=="function")try{let h=S.getChildren(!0,!0,!1)??[],w=new Map;for(let I of r.children){let D=I;if(!D.id)continue;let B=D.tagName.toLowerCase();B==="script"||B==="style"||B==="link"||w.set(D,{id:D.id,start:1/0,end:-1/0})}let P=I=>{let D=I;for(;D;){if(w.has(D))return D;if(D===r)return null;D=D.parentElement}return null};for(let I of h){if(typeof I.targets!="function"||typeof I.startTime!="function"||typeof I.duration!="function")continue;let D=I.startTime(),B=I.parent;for(;B&&typeof B.startTime=="function";)D+=B.startTime(),B=B.parent;let me=D+I.duration();if(!(!Number.isFinite(D)||!Number.isFinite(me)))for(let ae of I.targets()){if(!(ae instanceof Element))continue;let ve=P(ae);if(!ve)continue;let fe=w.get(ve);fe&&(fe.start=Math.min(fe.start,D),fe.end=Math.max(fe.end,me))}}let G=E.length>0?Math.max(...E.map(I=>I.track))+1:0;for(let[I,D]of w){if(D.start===1/0||D.end===-1/0)continue;let B=I;if(Y.has(B.id))continue;let me=Math.max(0,D.end-D.start);if(me<=0)continue;let ae=R(D.start,me);ae<=0||(W=Math.max(W,D.start+ae),E.push({id:B.id,label:B.getAttribute("data-timeline-label")??B.getAttribute("data-label")??B.getAttribute("aria-label")??B.id,start:D.start,duration:ae,track:Number.parseInt(B.getAttribute("data-track-index")??B.getAttribute("data-track")??"",10)||G,kind:"element",tagName:B.tagName.toLowerCase(),compositionId:B.getAttribute("data-composition-id"),compositionAncestors:q?[q]:[],parentCompositionId:q,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:B.getAttribute("data-timeline-role"),timelineLabel:B.getAttribute("data-timeline-label"),timelineGroup:B.getAttribute("data-timeline-group"),timelinePriority:ue(B.getAttribute("data-timeline-priority"))}),Y.add(B.id))}}catch{}}if(r&&y!=null&&y>0){let S=E.length>0?Math.max(...E.map(h=>h.track))+1:0;for(let h of r.children){let w=h;if(!w.id||Y.has(w.id))continue;let P=w.tagName.toLowerCase();if(P==="script"||P==="style"||P==="link"||P==="meta"||window.getComputedStyle(w).display==="none")continue;let I=R(0,y);I<=0||(W=Math.max(W,I),E.push({id:w.id,label:w.getAttribute("data-timeline-label")??w.getAttribute("data-label")??w.getAttribute("aria-label")??w.id,start:0,duration:I,track:Number.parseInt(w.getAttribute("data-track-index")??w.getAttribute("data-track")??"",10)||S,kind:"element",tagName:P,compositionId:w.getAttribute("data-composition-id"),compositionAncestors:q?[q]:[],parentCompositionId:q,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:w.getAttribute("data-timeline-role"),timelineLabel:w.getAttribute("data-timeline-label"),timelineGroup:w.getAttribute("data-timeline-group"),timelinePriority:ue(w.getAttribute("data-timeline-priority"))}),Y.add(w.id))}}sn(E);for(let S of F){if(S===r)continue;let h=S.getAttribute("data-composition-id");if(!h||!d(h))continue;let w=s.resolveStartForElement(S,0),P=ue(S.getAttribute("data-duration")),G=o(h),I=P&&P>0?P:G;if(I==null||I<=0)continue;let D=R(w,I);D<=0||k.push({id:h,label:S.getAttribute("data-label")??h,start:w,duration:D,thumbnailUrl:Fe(S.getAttribute("data-thumbnail-url")),avatarName:null})}let H=Math.max(1,Math.min(W||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:z&&V==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(H*Math.max(1,e.canonicalFps))),clips:E,scenes:k,compositionWidth:ue(r?.getAttribute("data-width"))??1920,compositionHeight:ue(r?.getAttribute("data-height"))??1080}}var ln=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,un=e=>new Promise(t=>{let n=!1,s=Date.now(),o=null,i=l=>{n||(n=!0,o!=null&&window.clearTimeout(o),t({status:l,elapsedMs:Math.max(0,Date.now()-s)}))};e.addEventListener("load",()=>i("load"),{once:!0}),e.addEventListener("error",()=>i("error"),{once:!0}),o=window.setTimeout(()=>i("timeout"),8e3)});function Ve(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function Pt(e,t){let n=e.trim();if(!n)return e;try{return ln.test(n)?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}async function Ke(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(r=>r.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode;if(e.headStyles)for(let c of e.headStyles){let r=c.cloneNode(!0);r instanceof HTMLStyleElement&&(document.head.appendChild(r),e.injectedStyles.push(r))}let s=Array.from(n.querySelectorAll("style"));for(let c of s){let r=c.cloneNode(!0);r instanceof HTMLStyleElement&&(document.head.appendChild(r),e.injectedStyles.push(r))}let o=[];if(e.headScripts)for(let c of e.headScripts){let r=c.getAttribute("type")?.trim()??"",u=c.getAttribute("src")?.trim()??"";if(u){let g=Pt(u,e.compositionUrl);o.push({kind:"external",src:g,type:r})}else{let g=c.textContent?.trim()??"";g&&o.push({kind:"inline",content:g,type:r})}}let i=Array.from(n.querySelectorAll("script")),l=[...o];for(let c of i){let r=c.getAttribute("type")?.trim()??"",u=c.getAttribute("src")?.trim()??"";if(u){let g=Pt(u,e.compositionUrl);l.push({kind:"external",src:g,type:r})}else{let g=c.textContent?.trim()??"";g&&l.push({kind:"inline",content:g,type:r})}c.parentNode?.removeChild(c)}let d=Array.from(n.querySelectorAll("style"));for(let c of d)c.parentNode?.removeChild(c);if(t){let c=document.importNode(t,!0),r=t.getAttribute("data-width"),u=t.getAttribute("data-height"),g=e.parseDimensionPx(r),m=e.parseDimensionPx(u);c.style.position="relative",c.style.width=g||"100%",c.style.height=m||"100%",g&&c.style.setProperty("--comp-width",g),m&&c.style.setProperty("--comp-height",m),r&&e.host.setAttribute("data-width",r),u&&e.host.setAttribute("data-height",u),g&&e.host instanceof HTMLElement&&(e.host.style.width=g),m&&e.host instanceof HTMLElement&&(e.host.style.height=m),e.host.appendChild(c)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let c of l){let r=document.createElement("script");if(c.type&&(r.type=c.type),r.async=!1,c.kind==="external"?r.src=c.src:c.type.toLowerCase()==="module"?r.textContent=c.content:r.textContent=`(function(){${c.content}})();`,document.body.appendChild(r),e.injectedScripts.push(r),c.kind==="external"){let u=await un(r);u.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:c.src,loadStatus:u.status,elapsedMs:u.elapsedMs}})}}}async function Ft(e){let t=Array.from(document.querySelectorAll("[data-composition-id]:not([data-composition-src])")).filter(n=>{if(n.children.length>0)return!1;let s=n.getAttribute("data-composition-id");return s?!!document.querySelector(`template#${CSS.escape(s)}-template`):!1});if(t.length!==0)for(let n of t){let s=n.getAttribute("data-composition-id"),o=document.querySelector(`template#${CSS.escape(s)}-template`);Ve(n),await Ke({host:n,hostCompositionId:s,hostCompositionSrc:`template#${s}-template`,sourceNode:o.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function It(e){let t=Array.from(document.querySelectorAll("[data-composition-src]"));t.length!==0&&await Promise.all(t.map(async n=>{let s=n.getAttribute("data-composition-src");if(!s)return;let o=null;try{o=new URL(s,document.baseURI)}catch{o=null}Ve(n);try{let i=n.getAttribute("data-composition-id"),l=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(l){await Ke({host:n,hostCompositionId:i,hostCompositionSrc:s,sourceNode:l.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let d=await fetch(s);if(!d.ok)throw new Error(`HTTP ${d.status}`);let c=await d.text(),u=new DOMParser().parseFromString(c,"text/html"),g=(i?u.querySelector(`template#${CSS.escape(i)}-template`):null)??u.querySelector("template"),m=g?g.content:u.body,b=g?void 0:Array.from(u.head.querySelectorAll("style")),T=g?void 0:Array.from(u.head.querySelectorAll("script"));await Ke({host:n,hostCompositionId:i,hostCompositionSrc:s,sourceNode:m,hasTemplate:!!g,fallbackBodyInnerHtml:u.body.innerHTML,compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,headStyles:b,headScripts:T,onDiagnostic:e.onDiagnostic})}catch(i){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:n.getAttribute("data-composition-id"),hostCompositionSrc:s,errorMessage:i instanceof Error?i.message:"unknown_error"}}),Ve(n)}}))}function Je(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=[],s=document.querySelectorAll(".caption-group");for(let o of s){let i=o.querySelectorAll(":scope > span");for(let l of i)n.push(l)}for(let o of t){let i=null;if(o.wordId&&(i=document.getElementById(o.wordId)),!i&&o.wordIndex!==void 0&&(i=n[o.wordIndex]??null),!i||!(i instanceof HTMLElement))continue;let l={},d={};if(o.x!==void 0&&(l.x=o.x),o.y!==void 0&&(l.y=o.y),o.scale!==void 0&&(l.scale=o.scale),o.rotation!==void 0&&(l.rotation=o.rotation),o.opacity!==void 0&&(d.opacity=o.opacity),o.fontSize!==void 0&&(d.fontSize=`${o.fontSize}px`),o.fontWeight!==void 0&&(d.fontWeight=o.fontWeight),o.fontFamily!==void 0&&(d.fontFamily=o.fontFamily),o.activeColor||o.dimColor){let r=e.getTweensOf(i).filter(g=>g.vars.color!==void 0).sort((g,m)=>g.startTime()-m.startTime()),u=r.length>0?String(r[0].vars.color):"";for(let g of r)String(g.vars.color)===u?o.dimColor&&(g.vars.color=o.dimColor):o.activeColor&&(g.vars.color=o.activeColor);o.dimColor&&e.set(i,{color:o.dimColor})}if(Object.keys(d).length>0&&e.set(i,d),Object.keys(l).length>0){let c=document.createElement("span");c.style.display="inline-block",c.dataset.captionWrapper="true",i.parentNode?.insertBefore(c,i),c.appendChild(i),e.set(c,l)}}}).catch(()=>{})}function Dt(){let e=vt(),t=window,n=null,s=null,o=[],i=new Set,l=null;if(typeof t.__hfRuntimeTeardown=="function")try{t.__hfRuntimeTeardown()}catch{}document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden"),window.__timelines=window.__timelines||{};let d=a=>{o.push(a)},c=(a,p,f)=>{let x=f??`${a}:${JSON.stringify(p)}`;i.has(x)||(i.add(x),le({source:"hf-preview",type:"diagnostic",code:a,details:p}))},r=a=>{let p={scale:1,focusX:960,focusY:540},f=[],x=[],L={time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:a.play,pause:a.pause,seek:a.seek,getTime:a.getTime,getDuration:a.getDuration,isPlaying:a.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>p,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>f,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:a.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>x,getRenderState:()=>({...L,time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying()})}},u=1/60,g=.75,m=.75,b=.35,T=900,M=3,_=2,V=.05,ee=100,z=240,U=a=>{if(a instanceof Error)return a.message||String(a);if(typeof a=="string")return a;try{return JSON.stringify(a)}catch{return String(a??"")}},y=a=>{let p=a.toLowerCase();return p.includes("cannot read properties of null")||p.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:p.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:p.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},A=a=>{if(a==null||a.trim()==="")return null;let p=Number.parseFloat(a);return!Number.isFinite(p)||p<=0?null:`${p}px`},N=()=>{let a=document.querySelector('[data-composition-id][data-root="true"]');if(a instanceof HTMLElement)return a;let p=Array.from(document.querySelectorAll("[data-composition-id]"));return p.length===0?null:p.find(f=>!f.parentElement?.closest("[data-composition-id]"))??p[0]??null},R=()=>{let a=N();if(!a)return;let p=A(a.getAttribute("data-width")),f=A(a.getAttribute("data-height"));p&&(a.style.width=p),f&&(a.style.height=f),p&&a.style.setProperty("--comp-width",p),f&&a.style.setProperty("--comp-height",f)},F=()=>{let a=N(),p=Array.from(document.querySelectorAll("[data-composition-id]")).filter(f=>f.hasAttribute("data-duration")||f.hasAttribute("data-end"));for(let f of p)a&&f===a||(f.removeAttribute("data-duration"),f.removeAttribute("data-end"))},E=()=>{let a=N();if(!a)return;a.style.position||(a.style.position="relative"),a.style.overflow="hidden";let p=A(a.getAttribute("data-width")),f=A(a.getAttribute("data-height"));p&&(a.style.width=p),f&&(a.style.height=f);let x=Array.from(a.children);for(let L of x){let Z=L.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!L.hasAttribute("data-start"))continue;let re=(L.style.top==="0px"||L.style.top==="0")&&(L.style.left==="0px"||L.style.left==="0")&&L.style.width==="100%"&&L.style.height==="100%",Se=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(L.style.transform);if(re&&Se&&!L.hasAttribute("data-width")&&!L.hasAttribute("data-height")){let ce=L.style.top,$=L.style.left,O=L.style.width,J=L.style.height;L.style.top="",L.style.left="",L.style.width="",L.style.height="";let j=window.getComputedStyle(L);j.top!=="auto"||j.bottom!=="auto"||j.left!=="auto"||j.right!=="auto"||j.width!=="0px"||j.height!=="0px"||(L.style.top=ce,L.style.left=$,L.style.width=O,L.style.height=J)}let te=window.getComputedStyle(L),X=te.position;if(X!=="absolute"&&X!=="fixed"&&(L.style.position="absolute"),!!L.style.top||!!L.style.bottom||te.top!=="auto"||te.bottom!=="auto"||(L.style.top="0"),!!L.style.left||!!L.style.right||te.left!=="auto"||te.right!=="auto"||(L.style.left="0"),Z!=="audio"){let ce=A(L.getAttribute("data-width")),$=A(L.getAttribute("data-height")),O=te.width!=="0px"&&te.width!=="auto",J=te.height!=="0px"&&te.height!=="auto";ce?!L.style.width&&!O&&(L.style.width=ce):!L.style.width&&te.width==="0px"&&(L.style.width="100%"),$?!L.style.height&&!J&&(L.style.height=$):!L.style.height&&te.height==="0px"&&(L.style.height="100%")}}},k=(a,p=0)=>we({timelineRegistry:window.__timelines??{}}).resolveStartForElement(a,p),C=a=>we({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(a),W=!!document.querySelector("[data-composition-src]"),Y=!1;{let a=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let p of a){let f=p.getAttribute("data-composition-id");if(f&&p.children.length===0&&document.querySelector(`template#${CSS.escape(f)}-template`)){Y=!0;break}}}let q=!W&&!Y,K=a=>{if(!a||typeof a.duration!="function")return null;try{let p=Number(a.duration());return Number.isFinite(p)?Math.max(0,p):null}catch{return null}},H=a=>typeof a=="number"&&Number.isFinite(a)&&a>u,de=a=>{let p=Number(a.getAttribute("data-duration"));if(Number.isFinite(p)&&p>0)return p;let f=Number(a.getAttribute("data-playback-start")??a.getAttribute("data-media-start")??"0"),x=Number.isFinite(f)?Math.max(0,f):0;return Number.isFinite(a.duration)&&a.duration>x?Math.max(0,a.duration-x):null},v=()=>{let a=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(a.length===0)return null;let p=0;for(let f of a){let x=k(f,0);if(!Number.isFinite(x))continue;let L=de(f);L==null||L<=u||(p=Math.max(p,Math.max(0,x)+L))}return p>u?p:null},S=()=>{let a=v();return typeof a!="number"||!Number.isFinite(a)||a<=u?null:a},h=a=>H(a)?Math.max(u,a*g):u,w=(a,p=0)=>{let f=K(a),x=S(),L=Number.isFinite(p)&&p>u?p:0,Z=0;H(f)?Z=Math.max(f,L):H(x)?Z=Math.max(x,L):Z=L;let re=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,re)):0},P=()=>{let a=window.__timelines??{},p=we({timelineRegistry:a}),f=S(),x=h(f),L=$=>{let O=document.querySelector(`[data-composition-id="${CSS.escape($)}"]`);return O?p.resolveStartForElement(O,0):0},Z=$=>{let O=window.gsap;if(!O||typeof O.timeline!="function")return null;let J=O.timeline({paused:!0});for(let j of $)J.add(j.timeline,L(j.compositionId));return J},re=($,O)=>{if(!H($))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let j=J.timeline({paused:!0});if(O)try{j.add(O,0)}catch{}let Q=j;if(typeof Q.to=="function")try{Q.to({},{duration:$})}catch{}return j},Se=($,O)=>{let J=$;if(typeof J.getChildren!="function")return[];try{let j=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(j))return[];let Q=[];for(let ie of O)if(!j.some(Le=>Le===ie.timeline))try{let Le=L(ie.compositionId);$.add(ie.timeline,Le),Q.push(ie.compositionId)}catch{}return Q}catch{return[]}},te=N(),X=te?.getAttribute("data-composition-id")??null;if(!X)return{timeline:null};let se=a[X]??null,ne=(()=>{if(!te)return[];let $=new Set,O=Array.from(te.querySelectorAll("[data-composition-id]")),J=[];for(let j of O){let Q=j.getAttribute("data-composition-id");if(!Q||Q===X||$.has(Q))continue;$.add(Q);let ie=a[Q]??null;if(!ie||typeof ie.play!="function"||typeof ie.pause!="function")continue;let Ee=K(ie);J.push({compositionId:Q,timeline:ie,durationSeconds:Ee??0})}return J})(),ce=$=>{for(let O of $){let J=O.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ne.length>0&&ce(ne),se){let $=ne.length>0?Se(se,ne):[];if((ne.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+X+"'])"))&&(I=!0),$.length>0)try{let j=se.time();se.seek(j,!1)}catch{}let O=K(se);if(!H(O)&&ne.length>0){let j=ne.map(nn=>nn.compositionId),Q=Z(ne),ie=K(Q);if(Q&&H(ie))return{timeline:Q,selectedTimelineIds:j,selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:x,selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,selectedTimelineIds:j,autoNestedChildren:$}}};let Ee=re(f??0,se),Le=K(Ee);if(Ee&&H(Le))return{timeline:Ee,selectedTimelineIds:[X],selectedDurationSeconds:Le,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:f,selectedDurationSeconds:Le,selectedTimelineIds:[X],autoNestedChildren:$}}}}if(!H(O)&&ne.length===0){let j=re(f??0,se),Q=K(j);if(j&&H(Q))return{timeline:j,selectedTimelineIds:[X],selectedDurationSeconds:Q,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:X,rootDurationSeconds:O,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:f,selectedDurationSeconds:Q,selectedTimelineIds:[X]}}}}let J=te?.getAttribute("data-duration");if(J){let j=parseFloat(J);if(H(j)&&H(O)&&j>=O+.5){let Q=se;if(typeof Q.to=="function")try{Q.to({},{duration:0},j)}catch{}let ie=K(se);if(H(ie))return{timeline:se,selectedTimelineIds:[X],selectedDurationSeconds:ie,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:X,rootDurationSeconds:O,rootDeclaredDur:j,newDur:ie}}}}}return{timeline:se,selectedTimelineIds:[X],selectedDurationSeconds:O,mediaDurationFloorSeconds:f,diagnostics:$.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:X,selectedDurationSeconds:O,autoNestedChildren:$}}:void 0}}if(ne.length>0){let $=ne.map(j=>j.compositionId),O=Z(ne),J=K(O);if(O)return{timeline:O,selectedTimelineIds:$,selectedDurationSeconds:J,mediaDurationFloorSeconds:f,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:X,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:x,selectedDurationSeconds:J,mediaDurationFloorSeconds:f,selectedTimelineIds:$}}}}return{timeline:null}},G=()=>{let a=e.capturedTimeline;if(!a||typeof a.time!="function")return;let p=Number(a.time());Number.isFinite(p)&&(e.currentTime=Math.max(0,p))},I=!1,D=()=>{if(!q)return!1;let a=e.capturedTimeline,p=K(a),f=H(p);if(a&&f&&I)return!1;let x=P();return x.timeline?a&&a===x.timeline?(typeof a.timeScale=="function"&&a.timeScale(e.playbackRate),!1):(e.capturedTimeline=x.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),x.diagnostics&&le({source:"hf-preview",type:"diagnostic",code:x.diagnostics.code,details:x.diagnostics.details}),le({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:x.selectedTimelineIds??[],selectedDurationSeconds:x.selectedDurationSeconds??null,mediaDurationFloorSeconds:x.mediaDurationFloorSeconds??null}}),!0):!1},B=()=>{let a=N();if(!(a instanceof HTMLElement))return;let p=a.getBoundingClientRect(),f=Number(a.getAttribute("data-width")),x=Number(a.getAttribute("data-height")),L=window.getComputedStyle(a),Z=Number.isFinite(f)&&f>0&&Number.isFinite(x)&&x>0,re=p.width<=0||p.height<=0||a.clientWidth<=0||a.clientHeight<=0;!Z||!re||c("root_stage_layout_zero",{compositionId:a.getAttribute("data-composition-id")??null,declaredWidth:f,declaredHeight:x,rectWidth:Math.round(p.width),rectHeight:Math.round(p.height),clientWidth:a.clientWidth,clientHeight:a.clientHeight,display:L.display,visibility:L.visibility,overflow:L.overflow},`root-stage-layout-zero:${a.getAttribute("data-composition-id")??"unknown"}`)},me=()=>{e.tornDown||(l!=null&&window.cancelAnimationFrame(l),l=window.requestAnimationFrame(()=>{l=null,B()}))},ae=()=>{n=a=>{let p=U(a.error??a.message).slice(0,z);if(!p)return;let f=y(p);le({source:"hf-preview",type:"diagnostic",code:f.code,details:{category:f.category,message:p,filename:a.filename||null,line:Number.isFinite(a.lineno)?a.lineno:null,column:Number.isFinite(a.colno)?a.colno:null}})},s=a=>{let p=U(a.reason).slice(0,z);if(!p)return;let f=y(p);le({source:"hf-preview",type:"diagnostic",code:`${f.code}_unhandled_rejection`,details:{category:`${f.category}-unhandled-rejection`,message:p}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",s)},ve=()=>{let a=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let f of a){let x=()=>{if(!(f instanceof Element))return;let L=f.tagName.toLowerCase(),Z=f.getAttribute("src")??f.getAttribute("href")??f.getAttribute("poster")??null,re=L==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";c(re,{tagName:L,assetUrl:Z,currentSrc:(f instanceof HTMLImageElement||f instanceof HTMLMediaElement)&&f.currentSrc||null,readyState:f instanceof HTMLMediaElement?f.readyState:null,networkState:f instanceof HTMLMediaElement?f.networkState:null},`${re}:${L}:${Z??"unknown"}`)};f.addEventListener("error",x),d(()=>{f.removeEventListener("error",x)})}let p=document.fonts;p&&p.ready.then(()=>{if(e.tornDown)return;let f=Array.from(p).filter(x=>x.status==="error").map(x=>x.family).filter(x=>!!x).slice(0,10);f.length!==0&&c("runtime_font_load_issue",{failedFamilies:f,totalFaces:Array.from(p).length},`runtime-font-load-issue:${f.join("|")}`)}).catch(()=>{})},fe=(a,p)=>{if(!a.timeline)return!1;let f=e.capturedTimeline;if(f&&f===a.timeline)return!1;let x=Math.max(0,e.currentTime||0),L=e.isPlaying;e.capturedTimeline=a.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(x,!1),L&&e.capturedTimeline.play()}catch{}return le({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:p,previousTime:x,selectedTimelineIds:a.selectedTimelineIds??[],selectedDurationSeconds:a.selectedDurationSeconds??null,mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),!0},be=null,ut=!1,De=new Set,_e=()=>{e.tornDown||(be!=null&&window.clearTimeout(be),be=window.setTimeout(()=>{if(e.tornDown)return;be=null;let a=P();if(!a.timeline||!H(a.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){D()&&(ke(),he(!0));return}if(ut)return;let f=K(e.capturedTimeline),x=a.selectedDurationSeconds??K(a.timeline);H(x)&&(!H(f)||x>=f+V)&&fe(a,"manual")&&(ut=!0,le({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:f??null,selectedDurationSeconds:x??null,selectedTimelineIds:a.selectedTimelineIds??[],mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),ke(),he(!0))},ee))},Xt=()=>{for(let a of De)a.removeEventListener("loadedmetadata",_e),a.removeEventListener("durationchange",_e);De.clear()},je=()=>{if(e.tornDown)return;let a=Array.from(document.querySelectorAll("video, audio"));for(let p of a)De.has(p)||(De.add(p),p.addEventListener("loadedmetadata",_e),p.addEventListener("durationchange",_e))},ct=()=>{let a=xt({resolveStartSeconds:x=>k(x,0)});Et({clips:a.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate});let p=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,f=Array.from(document.querySelectorAll("[data-start]"));for(let x of f){if(!(x instanceof HTMLElement))continue;let L=x.tagName.toLowerCase();if(L==="script"||L==="style"||L==="link"||L==="meta")continue;if(!x.getAttribute("data-composition-id")){let ce=x.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(ce&&ce!==p)continue}let re=k(x,0),Se=C(x),te=Se!=null&&Se>0?re+Se:Number.POSITIVE_INFINITY,X=te,se=x.getAttribute("data-composition-id");if(se&&!Number.isFinite(te)){let ne=(window.__timelines??{})[se];if(ne&&typeof ne.duration=="function"){let ce=ne.duration();ce>0&&(X=re+ce)}}let Ue=e.currentTime>=re&&(Number.isFinite(X)?e.currentTime<X:!0);x.style.visibility=Ue?"visible":"hidden"}},he=a=>{G();let p=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),f=Date.now();(a||p!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||f-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=p,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=f,le({source:"hf-preview",type:"state",frame:p,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ke=()=>{F(),R(),E();let a=N();if(a){let f=A(a.getAttribute("data-width")),x=A(a.getAttribute("data-height")),L=f?parseInt(f,10):0,Z=x?parseInt(x,10):0;L>0&&Z>0&&le({source:"hf-preview",type:"stage-size",width:L,height:Z})}D();let p=Ct({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=p,le(p),me()},Re=(a,p=0)=>{for(let f of e.deterministicAdapters){try{a==="discover"&&f.discover(),a==="pause"&&f.pause(),a==="play"&&f.play&&f.play()}catch{}if(a==="discover")try{f.seek({time:p})}catch{}}};if(q)Je();else{let a={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:A,onDiagnostic:({code:p,details:f})=>{le({source:"hf-preview",type:"diagnostic",code:p,details:f})}};It(a).then(()=>Ft(a)).finally(()=>{q=!0,Re("discover",e.currentTime),je(),ve(),Je(),ke(),he(!0)})}let We=wt({postMessage:a=>le(a)});We.installPickerApi();let dt=a=>{let p=Number(a);!Number.isFinite(p)||p<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,p)),e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let f=document.querySelectorAll("video, audio");for(let x of f)if(x instanceof HTMLMediaElement)try{x.playbackRate=e.playbackRate}catch{}},oe=Nt({getTimeline:()=>e.capturedTimeline,setTimeline:a=>{e.capturedTimeline=a},getIsPlaying:()=>e.isPlaying,setIsPlaying:a=>{e.isPlaying=a},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:dt,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(a,p)=>{e.currentTime=Math.max(0,Number(a)||0),e.isPlaying=p,ct()},onStatePost:he,onDeterministicSeek:a=>{for(let p of e.deterministicAdapters)try{p.seek({time:Number(a)||0})}catch{}},onDeterministicPause:()=>Re("pause"),onDeterministicPlay:()=>Re("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>w(e.capturedTimeline,0)});window.__player=r(oe),window.__playerReady=!0,window.__renderReady=!0,ht(le),Ce("composition_loaded",{duration:oe.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=pt({onPlay:()=>{oe.play(),Ce("composition_played",{time:oe.getTime()})},onPause:()=>{oe.pause(),Ce("composition_paused",{time:oe.getTime()})},onSeek:(a,p)=>{let f=Math.max(0,a)/e.canonicalFps;oe.seek(f),Ce("composition_seeked",{time:f})},onSetMuted:a=>{e.bridgeMuted=a;let p=document.querySelectorAll("video, audio");for(let f of p)f instanceof HTMLMediaElement&&(f.muted=a)},onSetPlaybackRate:a=>dt(a),onEnablePickMode:()=>We.enablePickMode(),onDisablePickMode:()=>We.disablePickMode()}),D(),e.capturedTimeline&&(oe._timeline=e.capturedTimeline),q&&setTimeout(()=>{let a=e.capturedTimeline;D()&&e.capturedTimeline!==a&&(oe._timeline=e.capturedTimeline),Re("discover",e.currentTime),ke(),he(!0)},0),e.deterministicAdapters=[gt({resolveStartSeconds:a=>k(a,0)}),kt(),Lt(),At(),yt({getTimeline:()=>e.capturedTimeline})],ae(),Re("discover"),je(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let ze=0,Be=null,mt=0,Ge=!1,xe=0,ft=()=>{mt=Date.now(),Ge=!1,xe=0};e.timelinePollIntervalId=setInterval(()=>{ze+=1;let p=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<_?!1:D();if(e.capturedTimeline&&!oe._timeline&&(oe._timeline=e.capturedTimeline),(p||ze%20===0)&&ke(),ze%10===0&&je(),G(),e.isPlaying&&e.capturedTimeline){let f=Math.max(0,e.currentTime||0),x=Be,L=w(e.capturedTimeline,0);if(L>0&&f>=L){oe.pause(),oe.seek(L),Be=L,xe=0,he(!0);return}if(x!=null&&x>=m&&f<=b?xe+=1:xe=0,!Ge&&xe>=M&&Date.now()-mt>T){let re=P();fe(re,"loop_guard")&&(Ge=!0,xe=0)}Be=Math.max(0,e.currentTime||0)}else Be=Math.max(0,e.currentTime||0);e.isPlaying&&ct(),he(!1)},50),ke(),he(!0);let en=oe.seek;oe.seek=a=>{ft(),en(a)};let tn=oe.renderSeek;oe.renderSeek=a=>{ft(),tn(a)};let qe=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),be!=null&&(window.clearTimeout(be),be=null),l!=null&&(window.cancelAnimationFrame(l),l=null),Xt(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),n&&(window.removeEventListener("error",n),n=null),s&&(window.removeEventListener("unhandledrejection",s),s=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),We.disablePickMode();for(let a of e.deterministicAdapters)if(!(!a||typeof a.revert!="function"))try{a.revert()}catch{}e.deterministicAdapters=[];for(let a of o.splice(0))try{a()}catch{}for(let a of e.injectedCompStyles)try{a.remove()}catch{}e.injectedCompStyles=[];for(let a of e.injectedCompScripts)try{a.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===qe&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=qe,e.beforeUnloadHandler=qe,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var cn=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ON","CS","ON","CS","ON","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ON","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","ON","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],dn=["AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"];function mn(e){return e<=255?cn[e]:1424<=e&&e<=1524?"R":1536<=e&&e<=1791?dn[e&255]:1792<=e&&e<=2220?"AL":"L"}function fn(e){let t=e.length;if(t===0)return null;let n=new Array(t),s=0;for(let r=0;r<t;r++){let u=mn(e.charCodeAt(r));(u==="R"||u==="AL"||u==="AN")&&s++,n[r]=u}if(s===0)return null;let o=t/s<.3?0:1,i=new Int8Array(t);for(let r=0;r<t;r++)i[r]=o;let l=o&1?"R":"L",d=l,c=d;for(let r=0;r<t;r++)n[r]==="NSM"?n[r]=c:c=n[r];c=d;for(let r=0;r<t;r++){let u=n[r];u==="EN"?n[r]=c==="AL"?"AN":"EN":(u==="R"||u==="L"||u==="AL")&&(c=u)}for(let r=0;r<t;r++)n[r]==="AL"&&(n[r]="R");for(let r=1;r<t-1;r++)n[r]==="ES"&&n[r-1]==="EN"&&n[r+1]==="EN"&&(n[r]="EN"),n[r]==="CS"&&(n[r-1]==="EN"||n[r-1]==="AN")&&n[r+1]===n[r-1]&&(n[r]=n[r-1]);for(let r=0;r<t;r++){if(n[r]!=="EN")continue;let u;for(u=r-1;u>=0&&n[u]==="ET";u--)n[u]="EN";for(u=r+1;u<t&&n[u]==="ET";u++)n[u]="EN"}for(let r=0;r<t;r++){let u=n[r];(u==="WS"||u==="ES"||u==="ET"||u==="CS")&&(n[r]="ON")}c=d;for(let r=0;r<t;r++){let u=n[r];u==="EN"?n[r]=c==="L"?"L":"EN":(u==="R"||u==="L")&&(c=u)}for(let r=0;r<t;r++){if(n[r]!=="ON")continue;let u=r+1;for(;u<t&&n[u]==="ON";)u++;let g=r>0?n[r-1]:d,m=u<t?n[u]:d,b=g!=="L"?"R":"L";if(b===(m!=="L"?"R":"L"))for(let M=r;M<u;M++)n[M]=b;r=u-1}for(let r=0;r<t;r++)n[r]==="ON"&&(n[r]=l);for(let r=0;r<t;r++){let u=n[r];(i[r]&1)===0?u==="R"?i[r]++:(u==="AN"||u==="EN")&&(i[r]+=2):(u==="L"||u==="AN"||u==="EN")&&i[r]++}return i}function _t(e,t){let n=fn(e);if(n===null)return null;let s=new Int8Array(t.length);for(let o=0;o<t.length;o++)s[o]=n[t[o]];return s}var pn=/[ \t\n\r\f]+/g,hn=/[\t\n\r\f]| {2,}|^ | $/;function gn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function yn(e){if(!hn.test(e))return e;let t=e.replace(pn," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function bn(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
11
+ `,document.head.appendChild(n)}for(let n of e)try{document.querySelectorAll(n).forEach(o=>{o.classList.add("__hf-flash"),setTimeout(()=>o.classList.remove("__hf-flash"),t)})}catch{}}var Ye=null;function ht(e){Ye=e}function Be(e,t){if(Ye)try{Ye({source:"hf-preview",type:"analytics",event:e,properties:t??{}})}catch{}}function gt(e){let t=[];return{name:"css",discover:()=>{t=[];let n=document.querySelectorAll("*");for(let r of n){if(!(r instanceof HTMLElement))continue;let o=window.getComputedStyle(r);!o.animationName||o.animationName==="none"||t.push({el:r,baseDelay:r.style.animationDelay||"",basePlayState:r.style.animationPlayState||""})}},seek:n=>{let r=Number(n.time)||0;for(let o of t){if(!o.el.isConnected)continue;let i=e?.resolveStartSeconds?e.resolveStartSeconds(o.el):Number.parseFloat(o.el.getAttribute("data-start")??"0")||0,c=Math.max(0,r-i);o.el.style.animationPlayState="paused",o.el.style.animationDelay=`-${c.toFixed(3)}s`}},pause:()=>{for(let n of t)n.el.isConnected&&(n.el.style.animationPlayState=n.basePlayState||"paused",n.baseDelay&&(n.el.style.animationDelay=n.baseDelay))},revert:()=>{t=[]}}}function St(e){return{name:"gsap",discover:()=>{},seek:t=>{let n=e.getTimeline();if(!n)return;n.pause();let r=Math.max(0,Number(t.time)||0);typeof n.totalTime=="function"?n.totalTime(r,!1):n.seek(r,!1)},pause:()=>{let t=e.getTimeline();t&&t.pause()}}}function Et(){return{name:"lottie",discover:()=>{try{let e=window.lottie;if(e&&typeof e.getRegisteredAnimations=="function"){let t=e.getRegisteredAnimations();if(Array.isArray(t)&&t.length>0){let n=window.__hfLottie??[],r=new Set(n);for(let o of t)r.has(o)||n.push(o);window.__hfLottie=n}}}catch{}},seek:e=>{let t=Math.max(0,Number(e.time)||0),n=window.__hfLottie;if(!(!n||n.length===0))for(let r of n)try{if(Ft(r))r.goToAndStop(t*1e3,!1);else if(Nt(r)){if(typeof r.setCurrentRawFrameValue=="function"){let o=r.totalFrames??0,i=r.frameRate??30,c=t*i;o>0&&r.setCurrentRawFrameValue(Math.min(c,o-1))}else if(typeof r.seek=="function"){let o=r.duration??1,i=Math.min(100,t/o*100);r.seek(i)}}}catch{}},pause:()=>{let e=window.__hfLottie;if(!(!e||e.length===0))for(let t of e)try{(Ft(t)||Nt(t))&&t.pause()}catch{}},revert:()=>{}}}function Ft(e){return typeof e=="object"&&e!==null&&typeof e.goToAndStop=="function"}function Nt(e){return typeof e=="object"&&e!==null&&typeof e.pause=="function"&&("totalFrames"in e||"duration"in e)}function At(){let e=null,t=0;return{name:"three",discover:()=>{},seek:n=>{e=Math.max(0,Number(n.time)||0),t=e,window.__hfThreeTime=e;try{window.dispatchEvent(new CustomEvent("hf-seek",{detail:{time:e}}))}catch{}},pause:()=>{e==null&&(e=Math.max(0,t))},play:()=>{e=null},revert:()=>{e=null,t=0}}}function yt(){return{name:"waapi",discover:()=>{},seek:e=>{if(!document.getAnimations)return;let t=Math.max(0,(Number(e.time)||0)*1e3);for(let n of document.getAnimations())try{n.pause(),n.currentTime=t}catch{}},pause:()=>{if(document.getAnimations)for(let e of document.getAnimations())try{e.pause()}catch{}}}}function bt(e){let t=Array.from(document.querySelectorAll("video[data-start], audio[data-start]")),n=[],r=[],o=0;for(let i of t){let c=e?.resolveStartSeconds?e.resolveStartSeconds(i):Number.parseFloat(i.dataset.start??"0");if(!Number.isFinite(c))continue;let m=Number.parseFloat(i.dataset.playbackStart??i.dataset.mediaStart??"0")||0,u=i.defaultPlaybackRate,s=Number.isFinite(u)&&u>0?Math.max(.1,Math.min(5,u)):1,l=i.loop,x=Number.isFinite(i.duration)&&i.duration>0?i.duration:null,h=Number.parseFloat(i.dataset.duration??"");(!Number.isFinite(h)||h<=0)&&x!=null&&(h=Math.max(0,(x-m)/s));let M=Number.isFinite(h)&&h>0?c+h:Number.POSITIVE_INFINITY,D=Number.parseFloat(i.dataset.volume??""),k={el:i,start:c,mediaStart:m,duration:Number.isFinite(h)&&h>0?h:Number.POSITIVE_INFINITY,end:M,volume:Number.isFinite(D)?D:null,playbackRate:s,loop:l,sourceDuration:x};n.push(k),i.tagName==="VIDEO"&&r.push(k),Number.isFinite(M)&&(o=Math.max(o,M))}return{timedMediaEls:t,mediaClips:n,videoClips:r,maxMediaEnd:o}}var je=new WeakSet;function Mt(e){for(let t of e.clips){let{el:n}=t;if(!n.isConnected)continue;let r=(e.timeSeconds-t.start)*t.playbackRate+t.mediaStart;if(e.timeSeconds>=t.start&&e.timeSeconds<t.end&&r>=0){if(t.loop&&t.sourceDuration!=null&&t.sourceDuration>0){let i=t.sourceDuration-t.mediaStart;i>0&&r>=t.sourceDuration&&(r=t.mediaStart+(r-t.mediaStart)%i)}t.volume!=null&&(n.volume=t.volume);try{n.playbackRate=t.playbackRate*e.playbackRate}catch{}if(Math.abs((n.currentTime||0)-r)>.3)try{n.currentTime=r}catch{}e.playing&&n.paused&&!je.has(n)?n.readyState>=HTMLMediaElement.HAVE_FUTURE_DATA?n.play().catch(()=>{}):(je.add(n),n.preload!=="auto"&&(n.preload="auto"),n.addEventListener("canplay",()=>{je.delete(n),n.paused&&n.play().catch(()=>{})},{once:!0}),n.addEventListener("error",()=>je.delete(n),{once:!0}),n.load()):!e.playing&&!n.paused&&n.pause();continue}n.paused||n.pause()}}function Ct(e){let t=!1,n=null,r=null,o=null,i=null;function c(g,d){try{window.dispatchEvent(new CustomEvent(g,{detail:d}))}catch{}}function m(g){o=g,c("hyperframe:picker:hovered",{elementInfo:o,isPickMode:t,timestamp:Date.now()})}function u(g){i=g,c("hyperframe:picker:selected",{elementInfo:i,isPickMode:t,timestamp:Date.now()})}function s(g){if(!g||g===document.body||g===document.documentElement)return!1;let d=g.tagName.toLowerCase();return!(d==="script"||d==="style"||d==="link"||d==="meta"||g.classList.contains("__hf-pick-highlight"))}function l(g){let d=g;if(d.id)return`#${d.id}`;let S=g.getAttribute("data-composition-id");if(S)return`[data-composition-id="${S}"]`;let A=g.getAttribute("data-composition-src");if(A)return`[data-composition-src="${A}"]`;let b=g.getAttribute("data-track-index");if(b)return`[data-track-index="${b}"]`;let E=g.tagName.toLowerCase(),v=g.parentElement;if(!v)return E;let _=v.querySelectorAll(`:scope > ${E}`);if(_.length===1)return E;for(let I=0;I<_.length;I+=1)if(_[I]===g)return`${E}:nth-of-type(${I+1})`;return E}function x(g){let d=g.tagName.toLowerCase(),S=(g.textContent??"").trim().replace(/\s+/g," "),A=(b,E)=>b.length>E?`${b.slice(0,E-1)}\u2026`:b;return d==="h1"||d==="h2"||d==="h3"?"Heading":d==="p"||d==="span"||d==="div"?S.length>0?A(S,56):"Text":d==="img"?"Image":d==="video"?"Video":d==="audio"?"Audio":d==="svg"?"Shape":g.getAttribute("data-composition-src")?"Composition":d==="section"?"Section":`${d.charAt(0).toUpperCase()}${d.slice(1)}`}function h(g,d,S){let A=typeof S=="number"&&S>0?S:8,b=[];if(document.elementsFromPoint)b=document.elementsFromPoint(g,d);else if(document.elementFromPoint){let _=document.elementFromPoint(g,d);b=_?[_]:[]}let E={},v=[];for(let _=0;_<b.length;_+=1){let I=b[_];if(!s(I))continue;let X=`${I.tagName}::${I.id||""}::${_}`;if(!E[X]&&(E[X]=!0,v.push(I),v.length>=A))break}return v}function M(g){let d=g.getBoundingClientRect(),S={};for(let b=0;b<g.attributes.length;b+=1){let E=g.attributes[b];E.name.startsWith("data-")&&(S[E.name]=E.value)}return{id:g.id||null,tagName:g.tagName.toLowerCase(),selector:l(g),label:x(g),boundingBox:{x:d.left,y:d.top,width:d.width,height:d.height},textContent:g.textContent?g.textContent.trim().slice(0,200):null,src:g.getAttribute("src")||g.getAttribute("data-composition-src")||null,dataAttributes:S}}function D(g,d,S){return h(g,d,S).map(M)}function k(g){if(!t)return;let S=h(g.clientX,g.clientY,1)[0]??(g.target instanceof Element?g.target:null);if(!s(S)||n===S)return;n&&n.classList.remove("__hf-pick-highlight"),n=S,S.classList.add("__hf-pick-highlight");let A=M(S);m(A),e.postMessage({source:"hf-preview",type:"element-hovered",elementInfo:A})}function w(g){if(!t)return;g.preventDefault(),g.stopPropagation(),g.stopImmediatePropagation();let d=D(g.clientX,g.clientY,8);d.length!==0&&(m(d[0]??null),e.postMessage({source:"hf-preview",type:"element-pick-candidates",candidates:d,selectedIndex:0,point:{x:g.clientX,y:g.clientY}}))}function j(g){g.key==="Escape"&&(B(),e.postMessage({source:"hf-preview",type:"pick-mode-cancelled"}))}function V(){t||(t=!0,r=document.createElement("style"),r.textContent=[".__hf-pick-highlight { outline: 2px solid #4f8cf7 !important; outline-offset: 2px; cursor: crosshair !important; }",".__hf-pick-active * { cursor: crosshair !important; }"].join(`
12
+ `),document.head.appendChild(r),document.body.classList.add("__hf-pick-active"),document.addEventListener("mousemove",k,!0),document.addEventListener("click",w,!0),document.addEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!0,timestamp:Date.now()}))}function B(){t&&(t=!1,n&&(n.classList.remove("__hf-pick-highlight"),n=null),r&&(r.remove(),r=null),document.body.classList.remove("__hf-pick-active"),document.removeEventListener("mousemove",k,!0),document.removeEventListener("click",w,!0),document.removeEventListener("keydown",j,!0),c("hyperframe:picker:mode",{isPickMode:!1,timestamp:Date.now()}))}function $(){window.__HF_PICKER_API={enable:V,disable:B,isActive:()=>t,getHovered:()=>o,getSelected:()=>i,getCandidatesAtPoint:(g,d,S)=>Number.isFinite(g)&&Number.isFinite(d)?D(g,d,S):[],pickAtPoint:(g,d,S)=>{if(!Number.isFinite(g)||!Number.isFinite(d))return null;let A=D(g,d,8);if(!A.length)return null;let b=Math.max(0,Math.min(A.length-1,Number(S??0))),E=A[b]??null;return E?(u(E),e.postMessage({source:"hf-preview",type:"element-picked",elementInfo:E}),B(),E):null},pickManyAtPoint:(g,d,S)=>{if(!Number.isFinite(g)||!Number.isFinite(d))return[];let A=D(g,d,8);if(!A.length)return[];let b=[],E=Array.isArray(S)?S:[0];for(let v of E){let _=Math.max(0,Math.min(A.length-1,Math.floor(Number(v)))),I=A[_];if(!I)continue;b.some(L=>L.selector===I.selector&&L.tagName===I.tagName)||b.push(I)}return b.length?(u(b[0]??null),e.postMessage({source:"hf-preview",type:"element-picked-many",elementInfos:b}),B(),b):[]}},c("hyperframe:picker:api-ready",{hasApi:!0,timestamp:Date.now()})}return{enablePickMode:V,disablePickMode:B,installPickerApi:$}}function Dt(e,t){let n=Number.isFinite(t)&&t>0?t:30,r=Number.isFinite(e)&&e>0?e:0;return Math.floor(r*n+1e-9)/n}function kt(e,t,n){let r=Dt(t,n);return e.pause(),typeof e.totalTime=="function"?e.totalTime(r,!1):e.seek(r,!1),r}function Lt(e){return{_timeline:null,play:()=>{let t=e.getTimeline();if(!t||e.getIsPlaying())return;let n=Math.max(0,Number(e.getSafeDuration?.()??t.duration()??0)||0);n>0&&Math.max(0,Number(t.time())||0)>=n&&(t.pause(),t.seek(0,!1),e.onDeterministicSeek(0),e.setIsPlaying(!1),e.onSyncMedia(0,!1),e.onRenderFrameSeek(0)),typeof t.timeScale=="function"&&t.timeScale(e.getPlaybackRate()),t.play(),e.onDeterministicPlay(),e.setIsPlaying(!0),e.onShowNativeVideos(),e.onStatePost(!0)},pause:()=>{let t=e.getTimeline();if(!t)return;t.pause();let n=Math.max(0,Number(t.time())||0);e.onDeterministicSeek(n),e.onDeterministicPause(),e.setIsPlaying(!1),e.onSyncMedia(n,!1),e.onRenderFrameSeek(n),e.onStatePost(!0)},seek:t=>{let n=e.getTimeline();if(!n)return;let r=Math.max(0,Number(t)||0),o=kt(n,r,e.getCanonicalFps());e.onDeterministicSeek(o),e.setIsPlaying(!1),e.onSyncMedia(o,!1),e.onRenderFrameSeek(o),e.onStatePost(!0)},renderSeek:t=>{let n=e.getTimeline();if(!n)return;let r=kt(n,t,e.getCanonicalFps());e.onDeterministicSeek(r),e.setIsPlaying(!1),e.onSyncMedia(r,!1),e.onRenderFrameSeek(r),e.onStatePost(!0)},getTime:()=>Number(e.getTimeline()?.time()??0),getDuration:()=>Number(e.getTimeline()?.duration()??0),isPlaying:()=>e.getIsPlaying(),setPlaybackRate:t=>e.setPlaybackRate(t),getPlaybackRate:()=>e.getPlaybackRate()}}function Tt(){return{capturedTimeline:null,isPlaying:!1,rafId:null,currentTime:0,deterministicAdapters:[],parityModeEnabled:!0,canonicalFps:30,bridgeMuted:!1,playbackRate:1,bridgeLastPostedFrame:-1,bridgeLastPostedAt:0,bridgeLastPostedPlaying:!1,bridgeLastPostedMuted:!1,bridgeMaxPostIntervalMs:80,timelinePollIntervalId:null,controlBridgeHandler:null,clampDurationLoggedRaw:null,beforeUnloadHandler:null,domReadyHandler:null,injectedCompStyles:[],injectedCompScripts:[],cachedTimedMediaEls:[],cachedMediaClips:[],cachedVideoClips:[],cachedMediaTimelineDurationSeconds:0,tornDown:!1,maxTimelineDurationSeconds:1800,nativeVisualWatchdogTick:0}}function ve(e){let t=Number(e);return Number.isFinite(t)?t:null}function pn(e){let t=(e??"").trim();if(!t)return null;let n=ve(t);if(n!=null)return{kind:"absolute",value:n};let r=t.match(/^([A-Za-z0-9_.:-]+)(?:\s*([+-])\s*([0-9]*\.?[0-9]+))?$/);if(!r)return null;let o=(r[1]??"").trim();if(!o)return null;let i=r[2]??"+",c=r[3]??"0",m=Number.parseFloat(c),u=Number.isFinite(m)?Math.max(0,m):0,s=i==="-"?-u:u;return{kind:"reference",refId:o,offset:s}}function Ce(e){let t=e.timelineRegistry??{},n=new WeakMap,r=new WeakMap,o=new Set,i=u=>{let s=document.getElementById(u);return s||(document.querySelector(`[data-composition-id="${CSS.escape(u)}"]`)??null)},c=u=>{let s=r.get(u);if(s!==void 0)return s;let l=null,x=ve(u.getAttribute("data-duration"));if(x!=null&&x>0&&(l=x),l==null||l<=0){let h=ve(u.getAttribute("data-end"));if(h!=null){let M=m(u,0),D=h-M;Number.isFinite(D)&&D>0&&(l=D)}}if((l==null||l<=0)&&u instanceof HTMLMediaElement){let h=ve(u.getAttribute("data-playback-start"))??ve(u.getAttribute("data-media-start"))??0;Number.isFinite(u.duration)&&u.duration>h&&(l=u.duration-h)}if(l==null||l<=0){let h=u.getAttribute("data-composition-id");if(h){let M=t[h]??null;if(M&&typeof M.duration=="function")try{let D=Number(M.duration());Number.isFinite(D)&&D>0&&(l=D)}catch{}}}return l!=null&&Number.isFinite(l)&&l>0?(r.set(u,l),l):(r.set(u,null),null)},m=(u,s)=>{let l=n.get(u);if(l!==void 0)return l??s;if(o.has(u))return s;o.add(u);try{let x=pn(u.getAttribute("data-start"));if(!x){if(u.hasAttribute("data-composition-id")){let w=u.parentElement;if(w&&(w.hasAttribute("data-composition-src")||w.hasAttribute("data-composition-id"))){let j=m(w,s);return n.set(u,j),j}}return n.set(u,s),s}if(x.kind==="absolute"){let w=Math.max(0,x.value);return n.set(u,w),w}let h=i(x.refId);if(!h)return n.set(u,s),s;let M=m(h,0),D=c(h);if(D==null||D<=0){let w=Math.max(0,M+x.offset);return n.set(u,w),w}let k=Math.max(0,M+D+x.offset);return n.set(u,k),k}finally{o.delete(u)}};return{resolveStartForElement:(u,s=0)=>m(u,Math.max(0,s)),resolveDurationForElement:u=>c(u)}}function ce(e){let t=Number(e);return Number.isFinite(t)?t:null}var wt={composition:0,video:1,image:2,element:3,audio:4};function hn(e){if(e.length===0)return;let t=new Map;for(let c of e){let m=t.get(c.track)??new Set;m.add(c.kind),t.set(c.track,m)}if(!Array.from(t.values()).some(c=>c.size>1))return;let r=0,o=new Map,i=[...t.keys()].sort((c,m)=>c-m);for(let c of i){let m=t.get(c);if(m.size===1)o.set(`${c}:${[...m][0]}`,r++);else{let u=[...m].sort((s,l)=>(wt[s]??99)-(wt[l]??99));for(let s of u)o.set(`${c}:${s}`,r++)}}for(let c of e){let m=`${c.track}:${c.kind}`,u=o.get(m);u!=null&&(c.track=u)}}function Re(e){let t=String(e??"").trim();if(!t)return null;let n=t.toLowerCase();if(n.startsWith("data:")||n.startsWith("javascript:"))return null;try{return new URL(t,document.baseURI).toString()}catch{return t}}function gn(e){let t=e.getAttribute("src")??e.getAttribute("data-src");if(t)return Re(t);let n=e.getAttribute("data-composition-src");if(n)return Re(n);let r=e.querySelector("img[src], video[src], audio[src], source[src]");return r?Re(r.getAttribute("src")):null}function Bt(e){let n=window.__timelines??{},r=Ce({timelineRegistry:n}),o=N=>{if(!N)return null;let F=n[N]??null;if(!F||typeof F.duration!="function")return null;try{let T=Number(F.duration());return Number.isFinite(T)&&T>0?T:null}catch{return null}},i=N=>{let F=ce(N.getAttribute("data-duration"));if(F!=null&&F>0)return F;let T=ce(N.getAttribute("data-playback-start"))??ce(N.getAttribute("data-media-start"))??0;return Number.isFinite(N.duration)&&N.duration>T?Math.max(0,N.duration-T):null},c=()=>{let N=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(N.length===0)return null;let F=0;for(let T of N){let W=r.resolveStartForElement(T,0);if(!Number.isFinite(W))continue;let Q=i(T);Q==null||Q<=0||(F=Math.max(F,Math.max(0,W)+Q))}return F>0?F:null},m=N=>{let F=N.trim().toLowerCase();return!(!F||F==="main"||F.includes("caption")||F.includes("ambient"))},u=(N,F)=>{let T=[],W=null,Q=null,R=null,P=N.parentElement;for(;P;){let O=P.getAttribute("data-composition-id");O&&(T.push(O),!R&&P!==F&&(R=O),W==null&&(W=r.resolveStartForElement(P,0)),Q==null&&(Q=ce(P.getAttribute("data-duration"))??o(O)??null)),P=P.parentElement}return{parentCompositionId:R,compositionAncestors:T.reverse(),inheritedStart:W,inheritedDuration:Q}},s=document.querySelector("[data-composition-id]"),l=s?.getAttribute("data-composition-id")??null,x=s?r.resolveStartForElement(s,0):0,h=c(),M=h!=null?Math.max(0,h-Math.max(0,x)):null,D=o(l),k=ce(s?.getAttribute("data-duration")),w=typeof D=="number"&&Number.isFinite(D)&&D>0?D:null,j=typeof k=="number"&&Number.isFinite(k)&&k>0?k:null,V=typeof M=="number"&&Number.isFinite(M)&&M>0?M:null,B=w!=null&&V!=null&&w>V+1,$=j??(B?V:w??V),g=$!=null?Math.min($,e.maxTimelineDurationSeconds):null,S=(g!=null?x+g:null)??(typeof h=="number"&&Number.isFinite(h)&&h>0?h:null),A=(N,F)=>!Number.isFinite(F)||F<=0?0:S==null||!Number.isFinite(S)?F:!Number.isFinite(N)||N>=S?0:Math.max(0,Math.min(F,S-N)),b=Array.from(document.querySelectorAll("[data-composition-id]")),E=[],v=[],_=Array.from(document.querySelectorAll("[data-start], [data-track-index], [data-composition-id], video, audio, img")),I=0;for(let N=0;N<_.length;N+=1){let F=_[N];if(F===s||["SCRIPT","STYLE","LINK","META","TEMPLATE","NOSCRIPT"].includes(F.tagName))continue;let T=u(F,s),W=r.resolveStartForElement(F,T.inheritedStart??0),Q=F.getAttribute("data-composition-id"),R=ce(F.getAttribute("data-duration"));if((R==null||R<=0)&&Q&&Q!==l&&(R=o(Q)),(R==null||R<=0)&&F instanceof HTMLMediaElement){let le=ce(F.getAttribute("data-playback-start"))??ce(F.getAttribute("data-media-start"))??0;Number.isFinite(F.duration)&&F.duration>0&&(R=Math.max(0,F.duration-le))}if(R==null||R<=0){let le=T.inheritedDuration;if(le!=null&&le>0){let pe=(T.inheritedStart??0)+le;R=Math.max(0,pe-W)}}if(R==null||R<=0||(R=A(W,R),R<=0))continue;let P=W+R;I=Math.max(I,P);let O=F.tagName.toLowerCase(),fe=Q&&Q!==l?"composition":O==="video"?"video":O==="audio"?"audio":O==="img"?"image":"element";E.push({id:F.id||Q||`__node__index_${N}`,label:F.getAttribute("data-timeline-label")??F.getAttribute("data-label")??F.getAttribute("aria-label")??Q??F.id??F.className?.split(" ")[0]??fe,start:W,duration:R,track:Number.parseInt(F.getAttribute("data-track-index")??F.getAttribute("data-track")??String(N),10)||0,kind:fe,tagName:O,compositionId:F.getAttribute("data-composition-id"),compositionAncestors:T.compositionAncestors,parentCompositionId:T.parentCompositionId,nodePath:null,compositionSrc:Re(F.getAttribute("data-composition-src")),assetUrl:gn(F),timelineRole:F.getAttribute("data-timeline-role"),timelineLabel:F.getAttribute("data-timeline-label"),timelineGroup:F.getAttribute("data-timeline-group"),timelinePriority:ce(F.getAttribute("data-timeline-priority"))})}let X=new Set(E.map(N=>N.id)),L=s?.getAttribute("data-composition-id")??null,U=L?n[L]??null:null;if(U&&s){let N=U;if(typeof N.getChildren=="function")try{let F=N.getChildren(!0,!0,!1)??[],T=new Map;for(let R of s.children){let P=R;if(!P.id)continue;let O=P.tagName.toLowerCase();O==="script"||O==="style"||O==="link"||T.set(P,{id:P.id,start:1/0,end:-1/0})}let W=R=>{let P=R;for(;P;){if(T.has(P))return P;if(P===s)return null;P=P.parentElement}return null};for(let R of F){if(typeof R.targets!="function"||typeof R.startTime!="function"||typeof R.duration!="function")continue;let P=R.startTime(),O=R.parent;for(;O&&typeof O.startTime=="function";)P+=O.startTime(),O=O.parent;let fe=P+R.duration();if(!(!Number.isFinite(P)||!Number.isFinite(fe)))for(let le of R.targets()){if(!(le instanceof Element))continue;let Te=W(le);if(!Te)continue;let pe=T.get(Te);pe&&(pe.start=Math.min(pe.start,P),pe.end=Math.max(pe.end,fe))}}let Q=E.length>0?Math.max(...E.map(R=>R.track))+1:0;for(let[R,P]of T){if(P.start===1/0||P.end===-1/0)continue;let O=R;if(X.has(O.id))continue;let fe=Math.max(0,P.end-P.start);if(fe<=0)continue;let le=A(P.start,fe);le<=0||(I=Math.max(I,P.start+le),E.push({id:O.id,label:O.getAttribute("data-timeline-label")??O.getAttribute("data-label")??O.getAttribute("aria-label")??O.id,start:P.start,duration:le,track:Number.parseInt(O.getAttribute("data-track-index")??O.getAttribute("data-track")??"",10)||Q,kind:"element",tagName:O.tagName.toLowerCase(),compositionId:O.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:O.getAttribute("data-timeline-role"),timelineLabel:O.getAttribute("data-timeline-label"),timelineGroup:O.getAttribute("data-timeline-group"),timelinePriority:ce(O.getAttribute("data-timeline-priority"))}),X.add(O.id))}}catch{}}if(s&&g!=null&&g>0){let N=E.length>0?Math.max(...E.map(F=>F.track))+1:0;for(let F of s.children){let T=F;if(!T.id||X.has(T.id))continue;let W=T.tagName.toLowerCase();if(W==="script"||W==="style"||W==="link"||W==="meta"||window.getComputedStyle(T).display==="none")continue;let R=A(0,g);R<=0||(I=Math.max(I,R),E.push({id:T.id,label:T.getAttribute("data-timeline-label")??T.getAttribute("data-label")??T.getAttribute("aria-label")??T.id,start:0,duration:R,track:Number.parseInt(T.getAttribute("data-track-index")??T.getAttribute("data-track")??"",10)||N,kind:"element",tagName:W,compositionId:T.getAttribute("data-composition-id"),compositionAncestors:L?[L]:[],parentCompositionId:L,nodePath:null,compositionSrc:null,assetUrl:null,timelineRole:T.getAttribute("data-timeline-role"),timelineLabel:T.getAttribute("data-timeline-label"),timelineGroup:T.getAttribute("data-timeline-group"),timelinePriority:ce(T.getAttribute("data-timeline-priority"))}),X.add(T.id))}}hn(E);for(let N of b){if(N===s)continue;let F=N.getAttribute("data-composition-id");if(!F||!m(F))continue;let T=r.resolveStartForElement(N,0),W=ce(N.getAttribute("data-duration")),Q=o(F),R=W&&W>0?W:Q;if(R==null||R<=0)continue;let P=A(T,R);P<=0||v.push({id:F,label:N.getAttribute("data-label")??F,start:T,duration:P,thumbnailUrl:Re(N.getAttribute("data-thumbnail-url")),avatarName:null})}let te=Math.max(1,Math.min(I||1,e.maxTimelineDurationSeconds));return{source:"hf-preview",type:"timeline",durationInFrames:B&&j==null?Number.POSITIVE_INFINITY:Math.max(1,Math.round(te*Math.max(1,e.canonicalFps))),clips:E,scenes:v,compositionWidth:ce(s?.getAttribute("data-width"))??1920,compositionHeight:ce(s?.getAttribute("data-height"))??1080}}var Sn=/^(?![a-zA-Z][a-zA-Z\d+\-.]*:)(?!\/\/)(?!\/)(?!\.\.?\/).+/,Fn=e=>new Promise(t=>{let n=!1,r=Date.now(),o=null,i=c=>{n||(n=!0,o!=null&&window.clearTimeout(o),t({status:c,elapsedMs:Math.max(0,Date.now()-r)}))};e.addEventListener("load",()=>i("load"),{once:!0}),e.addEventListener("error",()=>i("error"),{once:!0}),o=window.setTimeout(()=>i("timeout"),8e3)});function Xe(e){for(;e.firstChild;)e.removeChild(e.firstChild);e.textContent=""}function vt(e,t){let n=e.trim();if(!n)return e;try{return Sn.test(n)?new URL(n,document.baseURI).toString():t?new URL(n,t).toString():new URL(n,document.baseURI).toString()}catch{return e}}async function et(e){let t=null;e.hostCompositionId&&(t=Array.from(e.sourceNode.querySelectorAll("[data-composition-id]")).find(s=>s.getAttribute("data-composition-id")===e.hostCompositionId)??null);let n=t??e.sourceNode;if(e.headStyles)for(let u of e.headStyles){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let r=Array.from(n.querySelectorAll("style"));for(let u of r){let s=u.cloneNode(!0);s instanceof HTMLStyleElement&&(document.head.appendChild(s),e.injectedStyles.push(s))}let o=[];if(e.headScripts)for(let u of e.headScripts){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=vt(l,e.compositionUrl);o.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&o.push({kind:"inline",content:x,type:s})}}let i=Array.from(n.querySelectorAll("script")),c=[...o];for(let u of i){let s=u.getAttribute("type")?.trim()??"",l=u.getAttribute("src")?.trim()??"";if(l){let x=vt(l,e.compositionUrl);c.push({kind:"external",src:x,type:s})}else{let x=u.textContent?.trim()??"";x&&c.push({kind:"inline",content:x,type:s})}u.parentNode?.removeChild(u)}let m=Array.from(n.querySelectorAll("style"));for(let u of m)u.parentNode?.removeChild(u);if(t){let u=document.importNode(t,!0),s=t.getAttribute("data-width"),l=t.getAttribute("data-height"),x=e.parseDimensionPx(s),h=e.parseDimensionPx(l);u.style.position="relative",u.style.width=x||"100%",u.style.height=h||"100%",x&&u.style.setProperty("--comp-width",x),h&&u.style.setProperty("--comp-height",h),s&&e.host.setAttribute("data-width",s),l&&e.host.setAttribute("data-height",l),x&&e.host instanceof HTMLElement&&(e.host.style.width=x),h&&e.host instanceof HTMLElement&&(e.host.style.height=h),e.host.appendChild(u)}else e.hasTemplate?e.host.appendChild(document.importNode(n,!0)):e.host.innerHTML=e.fallbackBodyInnerHtml;for(let u of c){let s=document.createElement("script");if(u.type&&(s.type=u.type),s.async=!1,u.kind==="external"?s.src=u.src:u.type.toLowerCase()==="module"?s.textContent=u.content:s.textContent=`(function(){${u.content}})();`,document.body.appendChild(s),e.injectedScripts.push(s),u.kind==="external"){let l=await Fn(s);l.status!=="load"&&e.onDiagnostic?.({code:"external_composition_script_load_issue",details:{hostCompositionId:e.hostCompositionId,hostCompositionSrc:e.hostCompositionSrc,resolvedScriptSrc:u.src,loadStatus:l.status,elapsedMs:l.elapsedMs}})}}}async function Rt(e){let t=Array.from(document.querySelectorAll("[data-composition-id]:not([data-composition-src])")).filter(n=>{if(n.children.length>0)return!1;let r=n.getAttribute("data-composition-id");return r?!!document.querySelector(`template#${CSS.escape(r)}-template`):!1});if(t.length!==0)for(let n of t){let r=n.getAttribute("data-composition-id"),o=document.querySelector(`template#${CSS.escape(r)}-template`);Xe(n),await et({host:n,hostCompositionId:r,hostCompositionSrc:`template#${r}-template`,sourceNode:o.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:null,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic})}}async function It(e){let t=Array.from(document.querySelectorAll("[data-composition-src]"));t.length!==0&&await Promise.all(t.map(async n=>{let r=n.getAttribute("data-composition-src");if(!r)return;let o=null;try{o=new URL(r,document.baseURI)}catch{o=null}Xe(n);try{let i=n.getAttribute("data-composition-id"),c=i!=null?document.querySelector(`template#${CSS.escape(i)}-template`):null;if(c){await et({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:c.content,hasTemplate:!0,fallbackBodyInnerHtml:"",compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,onDiagnostic:e.onDiagnostic});return}let m=await fetch(r);if(!m.ok)throw new Error(`HTTP ${m.status}`);let u=await m.text(),l=new DOMParser().parseFromString(u,"text/html"),x=(i?l.querySelector(`template#${CSS.escape(i)}-template`):null)??l.querySelector("template"),h=x?x.content:l.body,M=x?void 0:Array.from(l.head.querySelectorAll("style")),D=x?void 0:Array.from(l.head.querySelectorAll("script"));await et({host:n,hostCompositionId:i,hostCompositionSrc:r,sourceNode:h,hasTemplate:!!x,fallbackBodyInnerHtml:l.body.innerHTML,compositionUrl:o,injectedStyles:e.injectedStyles,injectedScripts:e.injectedScripts,parseDimensionPx:e.parseDimensionPx,headStyles:M,headScripts:D,onDiagnostic:e.onDiagnostic})}catch(i){e.onDiagnostic?.({code:"external_composition_load_failed",details:{hostCompositionId:n.getAttribute("data-composition-id"),hostCompositionSrc:r,errorMessage:i instanceof Error?i.message:"unknown_error"}}),Xe(n)}}))}function tt(){let e=window.gsap;e&&document.querySelectorAll(".caption-group").length!==0&&fetch("caption-overrides.json").then(t=>t.ok?t.json():null).then(t=>{if(!t||!Array.isArray(t)||t.length===0)return;let n=[],r=document.querySelectorAll(".caption-group");for(let o of r){let i=o.querySelectorAll(":scope > span");for(let c of i)n.push(c)}for(let o of t){let i=null;if(o.wordId&&(i=document.getElementById(o.wordId)),!i&&o.wordIndex!==void 0&&(i=n[o.wordIndex]??null),!i||!(i instanceof HTMLElement))continue;let c={},m={};if(o.x!==void 0&&(c.x=o.x),o.y!==void 0&&(c.y=o.y),o.scale!==void 0&&(c.scale=o.scale),o.rotation!==void 0&&(c.rotation=o.rotation),o.opacity!==void 0&&(m.opacity=o.opacity),o.fontSize!==void 0&&(m.fontSize=`${o.fontSize}px`),o.fontWeight!==void 0&&(m.fontWeight=o.fontWeight),o.fontFamily!==void 0&&(m.fontFamily=o.fontFamily),o.activeColor||o.dimColor){let s=e.getTweensOf(i).filter(x=>x.vars.color!==void 0).sort((x,h)=>x.startTime()-h.startTime()),l=s.length>0?String(s[0].vars.color):"";for(let x of s)String(x.vars.color)===l?o.dimColor&&(x.vars.color=o.dimColor):o.activeColor&&(x.vars.color=o.activeColor);o.dimColor&&e.set(i,{color:o.dimColor})}if(Object.keys(m).length>0&&e.set(i,m),Object.keys(c).length>0){let u=document.createElement("span");u.style.display="inline-block",u.dataset.captionWrapper="true",i.parentNode?.insertBefore(u,i),u.appendChild(i),e.set(u,c)}}}).catch(()=>{})}function Pt(){let e=Tt(),t=window,n=null,r=null,o=[],i=new Set,c=null;if(typeof t.__hfRuntimeTeardown=="function")try{t.__hfRuntimeTeardown()}catch{}document.documentElement&&(document.documentElement.style.margin="0",document.documentElement.style.padding="0",document.documentElement.style.overflow="hidden"),document.body&&(document.body.style.margin="0",document.body.style.padding="0",document.body.style.overflow="hidden"),window.__timelines=window.__timelines||{};let m=a=>{o.push(a)},u=(a,f,p)=>{let C=p??`${a}:${JSON.stringify(f)}`;i.has(C)||(i.add(C),ue({source:"hf-preview",type:"diagnostic",code:a,details:f}))},s=a=>{let f={scale:1,focusX:960,focusY:540},p=[],C=[],y={time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying(),renderMode:!1,timelineDirty:!1};return{play:a.play,pause:a.pause,seek:a.seek,getTime:a.getTime,getDuration:a.getDuration,isPlaying:a.isPlaying,getMainTimeline:()=>null,getElementBounds:()=>{},getElementsAtPoint:()=>{},setElementPosition:()=>{},previewElementPosition:()=>{},setElementKeyframes:()=>{},setElementScale:()=>{},setElementFontSize:()=>{},setElementTextContent:()=>{},setElementTextColor:()=>{},setElementTextShadow:()=>{},setElementTextFontWeight:()=>{},setElementTextFontFamily:()=>{},setElementTextOutline:()=>{},setElementTextHighlight:()=>{},setElementVolume:()=>{},setStageZoom:()=>{},getStageZoom:()=>f,setStageZoomKeyframes:()=>{},getStageZoomKeyframes:()=>p,addElement:()=>!1,removeElement:()=>!1,updateElementTiming:()=>!1,setElementTiming:()=>{},updateElementSrc:()=>!1,updateElementLayer:()=>!1,updateElementBasePosition:()=>!1,markTimelineDirty:()=>{},isTimelineDirty:()=>!1,rebuildTimeline:()=>{},ensureTimeline:()=>{},enableRenderMode:()=>{},disableRenderMode:()=>{},renderSeek:a.renderSeek,getElementVisibility:()=>({visible:!1}),getVisibleElements:()=>C,getRenderState:()=>({...y,time:a.getTime(),duration:a.getDuration(),isPlaying:a.isPlaying()})}},l=1/60,x=.75,h=.75,M=.35,D=900,k=3,w=2,j=.05,V=100,B=240,$=a=>{if(a instanceof Error)return a.message||String(a);if(typeof a=="string")return a;try{return JSON.stringify(a)}catch{return String(a??"")}},g=a=>{let f=a.toLowerCase();return f.includes("cannot read properties of null")||f.includes("cannot set properties of null")?{code:"runtime_null_dom_access",category:"dom-null-access"}:f.includes("failed to execute 'queryselector'")?{code:"runtime_invalid_selector",category:"selector-invalid"}:f.includes("is not defined")?{code:"runtime_reference_missing",category:"reference-missing"}:{code:"runtime_script_error",category:"script-error"}},d=a=>{if(a==null||a.trim()==="")return null;let f=Number.parseFloat(a);return!Number.isFinite(f)||f<=0?null:`${f}px`},S=()=>{let a=document.querySelector('[data-composition-id][data-root="true"]');if(a instanceof HTMLElement)return a;let f=Array.from(document.querySelectorAll("[data-composition-id]"));return f.length===0?null:f.find(p=>!p.parentElement?.closest("[data-composition-id]"))??f[0]??null},A=()=>{let a=S();if(!a)return;let f=d(a.getAttribute("data-width")),p=d(a.getAttribute("data-height"));f&&(a.style.width=f),p&&(a.style.height=p),f&&a.style.setProperty("--comp-width",f),p&&a.style.setProperty("--comp-height",p)},b=()=>{let a=S(),f=Array.from(document.querySelectorAll("[data-composition-id]")).filter(p=>p.hasAttribute("data-duration")||p.hasAttribute("data-end"));for(let p of f)a&&p===a||(p.removeAttribute("data-duration"),p.removeAttribute("data-end"))},E=()=>{let a=S();if(!a)return;a.style.position||(a.style.position="relative"),a.style.overflow="hidden";let f=d(a.getAttribute("data-width")),p=d(a.getAttribute("data-height"));f&&(a.style.width=f),p&&(a.style.height=p);let C=Array.from(a.children);for(let y of C){let Z=y.tagName.toLowerCase();if(Z==="script"||Z==="style"||Z==="link"||Z==="meta"||!y.hasAttribute("data-start"))continue;let se=(y.style.top==="0px"||y.style.top==="0")&&(y.style.left==="0px"||y.style.left==="0")&&y.style.width==="100%"&&y.style.height==="100%",Ee=/translate\(\s*-50%\s*,\s*-50%\s*\)/.test(y.style.transform);if(se&&Ee&&!y.hasAttribute("data-width")&&!y.hasAttribute("data-height")){let de=y.style.top,K=y.style.left,z=y.style.width,J=y.style.height;y.style.top="",y.style.left="",y.style.width="",y.style.height="";let G=window.getComputedStyle(y);G.top!=="auto"||G.bottom!=="auto"||G.left!=="auto"||G.right!=="auto"||G.width!=="0px"||G.height!=="0px"||(y.style.top=de,y.style.left=K,y.style.width=z,y.style.height=J)}let ne=window.getComputedStyle(y),ee=ne.position;if(ee!=="absolute"&&ee!=="fixed"&&(y.style.position="absolute"),!!y.style.top||!!y.style.bottom||ne.top!=="auto"||ne.bottom!=="auto"||(y.style.top="0"),!!y.style.left||!!y.style.right||ne.left!=="auto"||ne.right!=="auto"||(y.style.left="0"),Z!=="audio"){let de=d(y.getAttribute("data-width")),K=d(y.getAttribute("data-height")),z=ne.width!=="0px"&&ne.width!=="auto",J=ne.height!=="0px"&&ne.height!=="auto";de?!y.style.width&&!z&&(y.style.width=de):!y.style.width&&ne.width==="0px"&&(y.style.width="100%"),K?!y.style.height&&!J&&(y.style.height=K):!y.style.height&&ne.height==="0px"&&(y.style.height="100%")}}},v=(a,f=0)=>Ce({timelineRegistry:window.__timelines??{}}).resolveStartForElement(a,f),_=a=>Ce({timelineRegistry:window.__timelines??{}}).resolveDurationForElement(a),I=!!document.querySelector("[data-composition-src]"),X=!1;{let a=document.querySelectorAll("[data-composition-id]:not([data-composition-src])");for(let f of a){let p=f.getAttribute("data-composition-id");if(p&&f.children.length===0&&document.querySelector(`template#${CSS.escape(p)}-template`)){X=!0;break}}}let L=!I&&!X,U=a=>{if(!a||typeof a.duration!="function")return null;try{let f=Number(a.duration());return Number.isFinite(f)?Math.max(0,f):null}catch{return null}},te=a=>typeof a=="number"&&Number.isFinite(a)&&a>l,H=a=>{let f=Number(a.getAttribute("data-duration"));if(Number.isFinite(f)&&f>0)return f;let p=Number(a.getAttribute("data-playback-start")??a.getAttribute("data-media-start")??"0"),C=Number.isFinite(p)?Math.max(0,p):0;return Number.isFinite(a.duration)&&a.duration>C?Math.max(0,a.duration-C):null},q=()=>{let a=Array.from(document.querySelectorAll("video[data-start], audio[data-start]"));if(a.length===0)return null;let f=0;for(let p of a){let C=v(p,0);if(!Number.isFinite(C))continue;let y=H(p);y==null||y<=l||(f=Math.max(f,Math.max(0,C)+y))}return f>l?f:null},N=()=>{let a=q();return typeof a!="number"||!Number.isFinite(a)||a<=l?null:a},F=a=>te(a)?Math.max(l,a*x):l,T=(a,f=0)=>{let p=U(a),C=N(),y=Number.isFinite(f)&&f>l?f:0,Z=0;te(p)?Z=Math.max(p,y):te(C)?Z=Math.max(C,y):Z=y;let se=Math.max(1,Number(e.maxTimelineDurationSeconds)||1800);return Z>0?Math.max(0,Math.min(Z,se)):0},W=()=>{let a=window.__timelines??{},f=Ce({timelineRegistry:a}),p=N(),C=F(p),y=K=>{let z=document.querySelector(`[data-composition-id="${CSS.escape(K)}"]`);return z?f.resolveStartForElement(z,0):0},Z=K=>{let z=window.gsap;if(!z||typeof z.timeline!="function")return null;let J=z.timeline({paused:!0});for(let G of K)J.add(G.timeline,y(G.compositionId));return J},se=(K,z)=>{if(!te(K))return null;let J=window.gsap;if(!J||typeof J.timeline!="function")return null;let G=J.timeline({paused:!0});if(z)try{G.add(z,0)}catch{}let Y=G;if(typeof Y.to=="function")try{Y.to({},{duration:K})}catch{}return G},Ee=(K,z)=>{let J=K;if(typeof J.getChildren!="function")return[];try{let G=J.getChildren(!0,!0,!0)??[];if(!Array.isArray(G))return[];let Y=[];for(let oe of z)if(!G.some(Ae=>Ae===oe.timeline))try{let Ae=y(oe.compositionId);K.add(oe.timeline,Ae),Y.push(oe.compositionId)}catch{}return Y}catch{return[]}},ne=S(),ee=ne?.getAttribute("data-composition-id")??null;if(!ee)return{timeline:null};let ae=a[ee]??null,ie=(()=>{if(!ne)return[];let K=new Set,z=Array.from(ne.querySelectorAll("[data-composition-id]")),J=[];for(let G of z){let Y=G.getAttribute("data-composition-id");if(!Y||Y===ee||K.has(Y))continue;K.add(Y);let oe=a[Y]??null;if(!oe||typeof oe.play!="function"||typeof oe.pause!="function")continue;let Me=U(oe);J.push({compositionId:Y,timeline:oe,durationSeconds:Me??0})}return J})(),de=K=>{for(let z of K){let J=z.timeline;if(typeof J.paused=="function")try{J.paused(!1)}catch{}}};if(ie.length>0&&de(ie),ae){let K=ie.length>0?Ee(ae,ie):[];if((ie.length>0||!document.querySelector("[data-composition-id]:not([data-composition-id='"+ee+"'])"))&&(R=!0),K.length>0)try{let G=ae.time();ae.seek(G,!1)}catch{}let z=U(ae);if(!te(z)&&ie.length>0){let G=ie.map(xn=>xn.compositionId),Y=Z(ie),oe=U(Y);if(Y&&te(oe))return{timeline:Y,selectedTimelineIds:G,selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:C,selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,selectedTimelineIds:G,autoNestedChildren:K}}};let Me=se(p??0,ae),Ae=U(Me);if(Me&&te(Ae))return{timeline:Me,selectedTimelineIds:[ee],selectedDurationSeconds:Ae,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:p,selectedDurationSeconds:Ae,selectedTimelineIds:[ee],autoNestedChildren:K}}}}if(!te(z)&&ie.length===0){let G=se(p??0,ae),Y=U(G);if(G&&te(Y))return{timeline:G,selectedTimelineIds:[ee],selectedDurationSeconds:Y,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_unusable_media_floor_fallback",details:{rootCompositionId:ee,rootDurationSeconds:z,fallbackKind:"media_duration_floor",mediaDurationFloorSeconds:p,selectedDurationSeconds:Y,selectedTimelineIds:[ee]}}}}let J=ne?.getAttribute("data-duration");if(J){let G=parseFloat(J);if(te(G)&&te(z)&&G>=z+.5){let Y=ae;if(typeof Y.to=="function")try{Y.to({},{duration:0},G)}catch{}let oe=U(ae);if(te(oe))return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:oe,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_padded_to_declared_duration",details:{rootCompositionId:ee,rootDurationSeconds:z,rootDeclaredDur:G,newDur:oe}}}}}return{timeline:ae,selectedTimelineIds:[ee],selectedDurationSeconds:z,mediaDurationFloorSeconds:p,diagnostics:K.length>0?{code:"root_timeline_auto_nested_children",details:{rootCompositionId:ee,selectedDurationSeconds:z,autoNestedChildren:K}}:void 0}}if(ie.length>0){let K=ie.map(G=>G.compositionId),z=Z(ie),J=U(z);if(z)return{timeline:z,selectedTimelineIds:K,selectedDurationSeconds:J,mediaDurationFloorSeconds:p,diagnostics:{code:"root_timeline_missing_fallback",details:{rootCompositionId:ee,fallbackKind:"composite_by_root_children",minCandidateDurationSeconds:C,selectedDurationSeconds:J,mediaDurationFloorSeconds:p,selectedTimelineIds:K}}}}return{timeline:null}},Q=()=>{let a=e.capturedTimeline;if(!a||typeof a.time!="function")return;let f=Number(a.time());Number.isFinite(f)&&(e.currentTime=Math.max(0,f))},R=!1,P=()=>{if(!L)return!1;let a=e.capturedTimeline,f=U(a),p=te(f);if(a&&p&&R)return!1;let C=W();return C.timeline?a&&a===C.timeline?(typeof a.timeScale=="function"&&a.timeScale(e.playbackRate),!1):(e.capturedTimeline=C.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate),C.diagnostics&&ue({source:"hf-preview",type:"diagnostic",code:C.diagnostics.code,details:C.diagnostics.details}),ue({source:"hf-preview",type:"diagnostic",code:"timeline_bound",details:{selectedTimelineIds:C.selectedTimelineIds??[],selectedDurationSeconds:C.selectedDurationSeconds??null,mediaDurationFloorSeconds:C.mediaDurationFloorSeconds??null}}),!0):!1},O=()=>{let a=S();if(!(a instanceof HTMLElement))return;let f=a.getBoundingClientRect(),p=Number(a.getAttribute("data-width")),C=Number(a.getAttribute("data-height")),y=window.getComputedStyle(a),Z=Number.isFinite(p)&&p>0&&Number.isFinite(C)&&C>0,se=f.width<=0||f.height<=0||a.clientWidth<=0||a.clientHeight<=0;!Z||!se||u("root_stage_layout_zero",{compositionId:a.getAttribute("data-composition-id")??null,declaredWidth:p,declaredHeight:C,rectWidth:Math.round(f.width),rectHeight:Math.round(f.height),clientWidth:a.clientWidth,clientHeight:a.clientHeight,display:y.display,visibility:y.visibility,overflow:y.overflow},`root-stage-layout-zero:${a.getAttribute("data-composition-id")??"unknown"}`)},fe=()=>{e.tornDown||(c!=null&&window.cancelAnimationFrame(c),c=window.requestAnimationFrame(()=>{c=null,O()}))},le=()=>{n=a=>{let f=$(a.error??a.message).slice(0,B);if(!f)return;let p=g(f);ue({source:"hf-preview",type:"diagnostic",code:p.code,details:{category:p.category,message:f,filename:a.filename||null,line:Number.isFinite(a.lineno)?a.lineno:null,column:Number.isFinite(a.colno)?a.colno:null}})},r=a=>{let f=$(a.reason).slice(0,B);if(!f)return;let p=g(f);ue({source:"hf-preview",type:"diagnostic",code:`${p.code}_unhandled_rejection`,details:{category:`${p.category}-unhandled-rejection`,message:f}})},window.addEventListener("error",n),window.addEventListener("unhandledrejection",r)},Te=()=>{let a=Array.from(document.querySelectorAll("img, video, audio, source, link[rel='stylesheet']"));for(let p of a){let C=()=>{if(!(p instanceof Element))return;let y=p.tagName.toLowerCase(),Z=p.getAttribute("src")??p.getAttribute("href")??p.getAttribute("poster")??null,se=y==="link"?"runtime_stylesheet_load_failed":"runtime_asset_load_failed";u(se,{tagName:y,assetUrl:Z,currentSrc:(p instanceof HTMLImageElement||p instanceof HTMLMediaElement)&&p.currentSrc||null,readyState:p instanceof HTMLMediaElement?p.readyState:null,networkState:p instanceof HTMLMediaElement?p.networkState:null},`${se}:${y}:${Z??"unknown"}`)};p.addEventListener("error",C),m(()=>{p.removeEventListener("error",C)})}let f=document.fonts;f&&f.ready.then(()=>{if(e.tornDown)return;let p=Array.from(f).filter(C=>C.status==="error").map(C=>C.family).filter(C=>!!C).slice(0,10);p.length!==0&&u("runtime_font_load_issue",{failedFamilies:p,totalFaces:Array.from(f).length},`runtime-font-load-issue:${p.join("|")}`)}).catch(()=>{})},pe=(a,f)=>{if(!a.timeline)return!1;let p=e.capturedTimeline;if(p&&p===a.timeline)return!1;let C=Math.max(0,e.currentTime||0),y=e.isPlaying;e.capturedTimeline=a.timeline,typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);try{e.capturedTimeline.pause(),e.capturedTimeline.seek(C,!1),y&&e.capturedTimeline.play()}catch{}return ue({source:"hf-preview",type:"diagnostic",code:"timeline_loop_guard_rebind",details:{reason:f,previousTime:C,selectedTimelineIds:a.selectedTimelineIds??[],selectedDurationSeconds:a.selectedDurationSeconds??null,mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),!0},Ne=null,ct=!1,Oe=new Set,_e=()=>{e.tornDown||(Ne!=null&&window.clearTimeout(Ne),Ne=window.setTimeout(()=>{if(e.tornDown)return;Ne=null;let a=W();if(!a.timeline||!te(a.mediaDurationFloorSeconds??null))return;if(!e.capturedTimeline){P()&&(ye(),ge(!0));return}if(ct)return;let p=U(e.capturedTimeline),C=a.selectedDurationSeconds??U(a.timeline);te(C)&&(!te(p)||C>=p+j)&&pe(a,"manual")&&(ct=!0,ue({source:"hf-preview",type:"diagnostic",code:"timeline_rebind_after_media_metadata",details:{previousDurationSeconds:p??null,selectedDurationSeconds:C??null,selectedTimelineIds:a.selectedTimelineIds??[],mediaDurationFloorSeconds:a.mediaDurationFloorSeconds??null}}),ye(),ge(!0))},V))},cn=()=>{for(let a of Oe)a.removeEventListener("loadedmetadata",_e),a.removeEventListener("durationchange",_e);Oe.clear()},Ke=()=>{if(e.tornDown)return;let a=Array.from(document.querySelectorAll("video, audio"));for(let f of a)Oe.has(f)||(Oe.add(f),f.addEventListener("loadedmetadata",_e),f.addEventListener("durationchange",_e),f.preload!=="auto"&&(f.preload="auto"),f.readyState<HTMLMediaElement.HAVE_FUTURE_DATA&&f.load())},dt=()=>{let a=bt({resolveStartSeconds:C=>v(C,0)});Mt({clips:a.mediaClips,timeSeconds:e.currentTime,playing:e.isPlaying,playbackRate:e.playbackRate});let f=document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null,p=Array.from(document.querySelectorAll("[data-start]"));for(let C of p){if(!(C instanceof HTMLElement))continue;let y=C.tagName.toLowerCase();if(y==="script"||y==="style"||y==="link"||y==="meta")continue;if(!C.getAttribute("data-composition-id")){let de=C.closest("[data-composition-id]")?.getAttribute("data-composition-id")??null;if(de&&de!==f)continue}let se=v(C,0),Ee=_(C),ne=Ee!=null&&Ee>0?se+Ee:Number.POSITIVE_INFINITY,ee=ne,ae=C.getAttribute("data-composition-id");if(ae&&!Number.isFinite(ne)){let ie=(window.__timelines??{})[ae];if(ie&&typeof ie.duration=="function"){let de=ie.duration();de>0&&(ee=se+de)}}let Ze=e.currentTime>=se&&(Number.isFinite(ee)?e.currentTime<ee:!0);C.style.visibility=Ze?"visible":"hidden"}},ge=a=>{Q();let f=Math.max(0,Math.round((e.currentTime||0)*e.canonicalFps)),p=Date.now();(a||f!==e.bridgeLastPostedFrame||e.isPlaying!==e.bridgeLastPostedPlaying||e.bridgeMuted!==e.bridgeLastPostedMuted||p-e.bridgeLastPostedAt>=e.bridgeMaxPostIntervalMs)&&(e.bridgeLastPostedFrame=f,e.bridgeLastPostedPlaying=e.isPlaying,e.bridgeLastPostedMuted=e.bridgeMuted,e.bridgeLastPostedAt=p,ue({source:"hf-preview",type:"state",frame:f,isPlaying:e.isPlaying,muted:e.bridgeMuted,playbackRate:e.playbackRate}))},ye=()=>{b(),A(),E();let a=S();if(a){let p=d(a.getAttribute("data-width")),C=d(a.getAttribute("data-height")),y=p?parseInt(p,10):0,Z=C?parseInt(C,10):0;y>0&&Z>0&&ue({source:"hf-preview",type:"stage-size",width:y,height:Z})}P();let f=Bt({canonicalFps:e.canonicalFps,maxTimelineDurationSeconds:e.maxTimelineDurationSeconds});window.__clipManifest=f,ue(f),fe()},we=(a,f=0)=>{for(let p of e.deterministicAdapters){try{a==="discover"&&p.discover(),a==="pause"&&p.pause(),a==="play"&&p.play&&p.play()}catch{}if(a==="discover")try{p.seek({time:f})}catch{}}};if(L)tt();else{let a={injectedStyles:e.injectedCompStyles,injectedScripts:e.injectedCompScripts,parseDimensionPx:d,onDiagnostic:({code:f,details:p})=>{ue({source:"hf-preview",type:"diagnostic",code:f,details:p})}};It(a).then(()=>Rt(a)).finally(()=>{L=!0,we("discover",e.currentTime),Ke(),Te(),tt(),ye(),ge(!0)})}let We=Ct({postMessage:a=>ue(a)});We.installPickerApi();let mt=a=>{let f=Number(a);!Number.isFinite(f)||f<=0?e.playbackRate=1:e.playbackRate=Math.max(.1,Math.min(5,f)),e.capturedTimeline&&typeof e.capturedTimeline.timeScale=="function"&&e.capturedTimeline.timeScale(e.playbackRate);let p=document.querySelectorAll("video, audio");for(let C of p)if(C instanceof HTMLMediaElement)try{C.playbackRate=e.playbackRate}catch{}},re=Lt({getTimeline:()=>e.capturedTimeline,setTimeline:a=>{e.capturedTimeline=a},getIsPlaying:()=>e.isPlaying,setIsPlaying:a=>{e.isPlaying=a},getPlaybackRate:()=>e.playbackRate,setPlaybackRate:mt,getCanonicalFps:()=>e.canonicalFps,onSyncMedia:(a,f)=>{e.currentTime=Math.max(0,Number(a)||0),e.isPlaying=f,dt()},onStatePost:ge,onDeterministicSeek:a=>{for(let f of e.deterministicAdapters)try{f.seek({time:Number(a)||0})}catch{}},onDeterministicPause:()=>we("pause"),onDeterministicPlay:()=>we("play"),onRenderFrameSeek:()=>{},onShowNativeVideos:()=>{},getSafeDuration:()=>T(e.capturedTimeline,0)});window.__player=s(re),window.__playerReady=!0,window.__renderReady=!0,ht(ue),Be("composition_loaded",{duration:re.getDuration(),compositionId:document.querySelector("[data-composition-id]")?.getAttribute("data-composition-id")??null}),e.controlBridgeHandler=pt({onPlay:()=>{re.play(),Be("composition_played",{time:re.getTime()})},onPause:()=>{re.pause(),Be("composition_paused",{time:re.getTime()})},onSeek:(a,f)=>{let p=Math.max(0,a)/e.canonicalFps;re.seek(p),Be("composition_seeked",{time:p})},onSetMuted:a=>{e.bridgeMuted=a;let f=document.querySelectorAll("video, audio");for(let p of f)p instanceof HTMLMediaElement&&(p.muted=a)},onSetPlaybackRate:a=>mt(a),onEnablePickMode:()=>We.enablePickMode(),onDisablePickMode:()=>We.disablePickMode()}),P(),e.capturedTimeline&&(re._timeline=e.capturedTimeline),L&&setTimeout(()=>{let a=e.capturedTimeline;P()&&e.capturedTimeline!==a&&(re._timeline=e.capturedTimeline),we("discover",e.currentTime),ye(),ge(!0)},0),e.deterministicAdapters=[gt({resolveStartSeconds:a=>v(a,0)}),yt(),Et(),At(),St({getTimeline:()=>e.capturedTimeline})],le(),we("discover"),Ke(),e.timelinePollIntervalId&&clearInterval(e.timelinePollIntervalId);let Ve=0,He=null,xt=0,Je=!1,be=0,ft=()=>{xt=Date.now(),Je=!1,be=0};e.timelinePollIntervalId=setInterval(()=>{Ve+=1;let f=e.isPlaying&&e.capturedTimeline!=null&&Math.max(0,e.currentTime||0)<w?!1:P();if(e.capturedTimeline&&!re._timeline&&(re._timeline=e.capturedTimeline),(f||Ve%20===0)&&ye(),Ve%10===0&&Ke(),Q(),e.isPlaying&&e.capturedTimeline){let p=Math.max(0,e.currentTime||0),C=He,y=T(e.capturedTimeline,0);if(y>0&&p>=y){re.pause(),re.seek(y),He=y,be=0,ge(!0);return}if(C!=null&&C>=h&&p<=M?be+=1:be=0,!Je&&be>=k&&Date.now()-xt>D){let se=W();pe(se,"loop_guard")&&(Je=!0,be=0)}He=Math.max(0,e.currentTime||0)}else He=Math.max(0,e.currentTime||0);e.isPlaying&&dt(),ge(!1)},50),ye(),ge(!0);let dn=re.seek;re.seek=a=>{ft(),dn(a)};let mn=re.renderSeek;re.renderSeek=a=>{ft(),mn(a)};let Qe=()=>{if(!e.tornDown){e.tornDown=!0,e.timelinePollIntervalId&&(clearInterval(e.timelinePollIntervalId),e.timelinePollIntervalId=null),Ne!=null&&(window.clearTimeout(Ne),Ne=null),c!=null&&(window.cancelAnimationFrame(c),c=null),cn(),e.controlBridgeHandler&&(window.removeEventListener("message",e.controlBridgeHandler),e.controlBridgeHandler=null),n&&(window.removeEventListener("error",n),n=null),r&&(window.removeEventListener("unhandledrejection",r),r=null),e.beforeUnloadHandler&&(window.removeEventListener("beforeunload",e.beforeUnloadHandler),e.beforeUnloadHandler=null),We.disablePickMode();for(let a of e.deterministicAdapters)if(!(!a||typeof a.revert!="function"))try{a.revert()}catch{}e.deterministicAdapters=[];for(let a of o.splice(0))try{a()}catch{}for(let a of e.injectedCompStyles)try{a.remove()}catch{}e.injectedCompStyles=[];for(let a of e.injectedCompScripts)try{a.remove()}catch{}e.injectedCompScripts=[],e.capturedTimeline=null,t.__hfRuntimeTeardown===Qe&&(t.__hfRuntimeTeardown=null)}};t.__hfRuntimeTeardown=Qe,e.beforeUnloadHandler=Qe,window.addEventListener("beforeunload",e.beforeUnloadHandler)}var Ot=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],nt=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Nn(e){if(e<=255)return Ot[e];let t=0,n=nt.length-1;for(;t<=n;){let r=t+n>>1,o=nt[r];if(e<o[0]){n=r-1;continue}if(e>o[1]){t=r+1;continue}return o[2]}return"L"}function En(e){let t=e.length;if(t===0)return null;let n=new Array(t),r=!1;for(let s=0;s<t;){let l=e.charCodeAt(s),x=l,h=1;if(l>=55296&&l<=56319&&s+1<t){let D=e.charCodeAt(s+1);D>=56320&&D<=57343&&(x=(l-55296<<10)+(D-56320)+65536,h=2)}let M=Nn(x);(M==="R"||M==="AL"||M==="AN")&&(r=!0);for(let D=0;D<h;D++)n[s+D]=M;s+=h}if(!r)return null;let o=0;for(let s=0;s<t;s++){let l=n[s];if(l==="L"){o=0;break}if(l==="R"||l==="AL"){o=1;break}}let i=new Int8Array(t);for(let s=0;s<t;s++)i[s]=o;let c=o&1?"R":"L",m=c,u=m;for(let s=0;s<t;s++)n[s]==="NSM"?n[s]=u:u=n[s];u=m;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="AL"?"AN":"EN":(l==="R"||l==="L"||l==="AL")&&(u=l)}for(let s=0;s<t;s++)n[s]==="AL"&&(n[s]="R");for(let s=1;s<t-1;s++)n[s]==="ES"&&n[s-1]==="EN"&&n[s+1]==="EN"&&(n[s]="EN"),n[s]==="CS"&&(n[s-1]==="EN"||n[s-1]==="AN")&&n[s+1]===n[s-1]&&(n[s]=n[s-1]);for(let s=0;s<t;s++){if(n[s]!=="EN")continue;let l;for(l=s-1;l>=0&&n[l]==="ET";l--)n[l]="EN";for(l=s+1;l<t&&n[l]==="ET";l++)n[l]="EN"}for(let s=0;s<t;s++){let l=n[s];(l==="WS"||l==="ES"||l==="ET"||l==="CS")&&(n[s]="ON")}u=m;for(let s=0;s<t;s++){let l=n[s];l==="EN"?n[s]=u==="L"?"L":"EN":(l==="R"||l==="L")&&(u=l)}for(let s=0;s<t;s++){if(n[s]!=="ON")continue;let l=s+1;for(;l<t&&n[l]==="ON";)l++;let x=s>0?n[s-1]:m,h=l<t?n[l]:m,M=x!=="L"?"R":"L";if(M===(h!=="L"?"R":"L"))for(let k=s;k<l;k++)n[k]=M;s=l-1}for(let s=0;s<t;s++)n[s]==="ON"&&(n[s]=c);for(let s=0;s<t;s++){let l=n[s];(i[s]&1)===0?l==="R"?i[s]++:(l==="AN"||l==="EN")&&(i[s]+=2):(l==="L"||l==="AN"||l==="EN")&&i[s]++}return i}function _t(e,t){let n=En(e);if(n===null)return null;let r=new Int8Array(t.length);for(let o=0;o<t.length;o++)r[o]=n[t[o]];return r}var An=/[ \t\n\r\f]+/g,yn=/[\t\n\r\f]| {2,}|^ | $/;function bn(e){let t=e??"normal";return t==="pre-wrap"?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}function Mn(e){if(!yn.test(e))return e;let t=e.replace(An," ");return t.charCodeAt(0)===32&&(t=t.slice(1)),t.length>0&&t.charCodeAt(t.length-1)===32&&(t=t.slice(0,-1)),t}function Cn(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,`
13
13
  `).replace(/[\r\f]/g,`
14
14
  `):e.replace(/\r\n/g,`
15
- `)}var Ze=null,Sn;function Ln(){return Ze===null&&(Ze=new Intl.Segmenter(Sn,{granularity:"word"})),Ze}var An=/\p{Script=Arabic}/u,He=/\p{M}/u,Bt=/\p{Nd}/u;function Qe(e){return An.test(e)}function pe(e){for(let t of e){let n=t.codePointAt(0);if(n>=19968&&n<=40959||n>=13312&&n<=19903||n>=131072&&n<=173791||n>=173824&&n<=177983||n>=177984&&n<=178207||n>=178208&&n<=183983||n>=183984&&n<=191471||n>=196608&&n<=201551||n>=63744&&n<=64255||n>=194560&&n<=195103||n>=12288&&n<=12351||n>=12352&&n<=12447||n>=12448&&n<=12543||n>=44032&&n<=55215||n>=65280&&n<=65519)return!0}return!1}var et=new Set(["\uFF0C","\uFF0E","\uFF01","\uFF1A","\uFF1B","\uFF1F","\u3001","\u3002","\u30FB","\uFF09","\u3015","\u3009","\u300B","\u300D","\u300F","\u3011","\u3017","\u3019","\u301B","\u30FC","\u3005","\u303B","\u309D","\u309E","\u30FD","\u30FE"]),Ie=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),tt=new Set(["'","\u2019"]),Te=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),kn=new Set([":",".","\u060C","\u061B"]),xn=new Set(["\u104F"]),En=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function wn(e){if(nt(e))return!0;let t=!1;for(let n of e){if(Te.has(n)){t=!0;continue}if(!(t&&He.test(n)))return!1}return t}function Tn(e){for(let t of e)if(!et.has(t)&&!Te.has(t))return!1;return e.length>0}function Mn(e){if(nt(e))return!0;for(let t of e)if(!Ie.has(t)&&!tt.has(t)&&!He.test(t))return!1;return e.length>0}function nt(e){let t=!1;for(let n of e)if(!(n==="\\"||He.test(n))){if(Ie.has(n)||Te.has(n)||tt.has(n)){t=!0;continue}return!1}return t}function Nn(e){let t=Array.from(e),n=t.length;for(;n>0;){let s=t[n-1];if(He.test(s)){n--;continue}if(Ie.has(s)||tt.has(s)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function vn(e,t){if(e.length===0)return!1;for(let n of e)if(n!==t)return!1;return!0}function Rn(e){return!Qe(e)||e.length===0?!1:kn.has(e[e.length-1])}function Cn(e){return e.length===0?!1:xn.has(e[e.length-1])}function Pn(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function it(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(En.has(n))return!0;if(!Te.has(n))return!1}return!1}function Fn(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===`
16
- `)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}function In(e,t,n,s){let o=[],i=null,l="",d=n,c=!1,r=0;for(let u of e){let g=Fn(u,s),m=g==="text"&&t;if(i!==null&&g===i&&m===c){l+=u,r+=u.length;continue}i!==null&&o.push({text:l,isWordLike:c,kind:i,start:d}),i=g,l=u,d=n+r,c=m,r+=u.length}return i!==null&&o.push({text:l,isWordLike:c,kind:i,start:d}),o}function Ye(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Dn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function _n(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Dn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Wn(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Bn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),s=e.kinds.slice(),o=e.starts.slice();for(let l=0;l<e.len;l++){if(s[l]!=="text"||!_n(e,l))continue;let d=l+1;for(;d<e.len&&!Ye(s[d]);){t[l]+=t[d],n[l]=!0;let c=t[d].includes("?");if(s[d]="text",t[d]="",d++,c)break}}let i=0;for(let l=0;l<t.length;l++){let d=t[l];d.length!==0&&(i!==l&&(t[i]=d,n[i]=n[l],s[i]=s[l],o[i]=o[l]),i++)}return t.length=i,n.length=i,s.length=i,o.length=i,{len:i,texts:t,isWordLike:n,kinds:s,starts:o}}function Hn(e){let t=[],n=[],s=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i];if(t.push(l),n.push(e.isWordLike[i]),s.push(e.kinds[i]),o.push(e.starts[i]),!Wn(l))continue;let d=i+1;if(d>=e.len||Ye(e.kinds[d]))continue;let c="",r=e.starts[d],u=d;for(;u<e.len&&!Ye(e.kinds[u]);)c+=e.texts[u],u++;c.length>0&&(t.push(c),n.push(!0),s.push("text"),o.push(r),i=u-1)}return{len:t.length,texts:t,isWordLike:n,kinds:s,starts:o}}var On=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),Wt=/^[A-Za-z0-9_]+[,:;]*$/,jn=/[,:;]+$/;function Ht(e){for(let t of e)if(Bt.test(t))return!0;return!1}function Xe(e){if(e.length===0)return!1;for(let t of e)if(!(Bt.test(t)||On.has(t)))return!1;return!0}function zn(e){let t=[],n=[],s=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i],d=e.kinds[i];if(d==="text"&&Xe(l)&&Ht(l)){let c=l,r=i+1;for(;r<e.len&&e.kinds[r]==="text"&&Xe(e.texts[r]);)c+=e.texts[r],r++;t.push(c),n.push(!0),s.push("text"),o.push(e.starts[i]),i=r-1;continue}t.push(l),n.push(e.isWordLike[i]),s.push(d),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:s,starts:o}}function Gn(e){let t=[],n=[],s=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i],d=e.kinds[i],c=e.isWordLike[i];if(d==="text"&&c&&Wt.test(l)){let r=l,u=i+1;for(;jn.test(r)&&u<e.len&&e.kinds[u]==="text"&&e.isWordLike[u]&&Wt.test(e.texts[u]);)r+=e.texts[u],u++;t.push(r),n.push(!0),s.push("text"),o.push(e.starts[i]),i=u-1;continue}t.push(l),n.push(c),s.push(d),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:s,starts:o}}function qn(e){let t=[],n=[],s=[],o=[];for(let i=0;i<e.len;i++){let l=e.texts[i];if(e.kinds[i]==="text"&&l.includes("-")){let d=l.split("-"),c=d.length>1;for(let r=0;r<d.length;r++){let u=d[r];if(!c)break;(u.length===0||!Ht(u)||!Xe(u))&&(c=!1)}if(c){let r=0;for(let u=0;u<d.length;u++){let g=d[u],m=u<d.length-1?`${g}-`:g;t.push(m),n.push(!0),s.push("text"),o.push(e.starts[i]+r),r+=m.length}continue}}t.push(l),n.push(e.isWordLike[i]),s.push(e.kinds[i]),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:s,starts:o}}function Un(e){let t=[],n=[],s=[],o=[],i=0;for(;i<e.len;){let l=e.texts[i],d=e.isWordLike[i],c=e.kinds[i],r=e.starts[i];if(c==="glue"){let u=l,g=r;for(i++;i<e.len&&e.kinds[i]==="glue";)u+=e.texts[i],i++;if(i<e.len&&e.kinds[i]==="text")l=u+e.texts[i],d=e.isWordLike[i],c="text",r=g,i++;else{t.push(u),n.push(!1),s.push("glue"),o.push(g);continue}}else i++;if(c==="text")for(;i<e.len&&e.kinds[i]==="glue";){let u="";for(;i<e.len&&e.kinds[i]==="glue";)u+=e.texts[i],i++;if(i<e.len&&e.kinds[i]==="text"){l+=u+e.texts[i],d=d||e.isWordLike[i],i++;continue}l+=u}t.push(l),n.push(d),s.push(c),o.push(r)}return{len:t.length,texts:t,isWordLike:n,kinds:s,starts:o}}function $n(e){let t=e.texts.slice(),n=e.isWordLike.slice(),s=e.kinds.slice(),o=e.starts.slice();for(let i=0;i<t.length-1;i++){if(s[i]!=="text"||s[i+1]!=="text"||!pe(t[i])||!pe(t[i+1]))continue;let l=Nn(t[i]);l!==null&&(t[i]=l.head,t[i+1]=l.tail+t[i+1],o[i+1]=o[i]+l.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:s,starts:o}}function Vn(e,t,n){let s=Ln(),o=0,i=[],l=[],d=[],c=[];for(let m of s.segment(e))for(let b of In(m.segment,m.isWordLike??!1,m.index,n)){let T=b.kind==="text";t.carryCJKAfterClosingQuote&&T&&o>0&&d[o-1]==="text"&&pe(b.text)&&pe(i[o-1])&&it(i[o-1])||T&&o>0&&d[o-1]==="text"&&Tn(b.text)&&pe(i[o-1])||T&&o>0&&d[o-1]==="text"&&Cn(i[o-1])?(i[o-1]+=b.text,l[o-1]=l[o-1]||b.isWordLike):T&&o>0&&d[o-1]==="text"&&b.isWordLike&&Qe(b.text)&&Rn(i[o-1])?(i[o-1]+=b.text,l[o-1]=!0):T&&!b.isWordLike&&o>0&&d[o-1]==="text"&&b.text.length===1&&b.text!=="-"&&b.text!=="\u2014"&&vn(i[o-1],b.text)||T&&!b.isWordLike&&o>0&&d[o-1]==="text"&&(wn(b.text)||b.text==="-"&&l[o-1])?i[o-1]+=b.text:(i[o]=b.text,l[o]=b.isWordLike,d[o]=b.kind,c[o]=b.start,o++)}for(let m=1;m<o;m++)d[m]==="text"&&!l[m]&&nt(i[m])&&d[m-1]==="text"&&(i[m-1]+=i[m],l[m-1]=l[m-1]||l[m],i[m]="");for(let m=o-2;m>=0;m--)if(d[m]==="text"&&!l[m]&&Mn(i[m])){let b=m+1;for(;b<o&&i[b]==="";)b++;b<o&&d[b]==="text"&&(i[b]=i[m]+i[b],c[b]=c[m],i[m]="")}let r=0;for(let m=0;m<o;m++){let b=i[m];b.length!==0&&(r!==m&&(i[r]=b,l[r]=l[m],d[r]=d[m],c[r]=c[m]),r++)}i.length=r,l.length=r,d.length=r,c.length=r;let u=Un({len:r,texts:i,isWordLike:l,kinds:d,starts:c}),g=$n(Gn(qn(zn(Hn(Bn(u))))));for(let m=0;m<g.len-1;m++){let b=Pn(g.texts[m]);b!==null&&(g.kinds[m]!=="space"&&g.kinds[m]!=="preserved-space"||g.kinds[m+1]!=="text"||!Qe(g.texts[m+1])||(g.texts[m]=b.space,g.isWordLike[m]=!1,g.kinds[m]=g.kinds[m]==="preserved-space"?"preserved-space":"space",g.texts[m+1]=b.marks+g.texts[m+1],g.starts[m+1]=g.starts[m]+b.space.length))}return g}function Kn(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],s=0;for(let o=0;o<e.len;o++)e.kinds[o]==="hard-break"&&(n.push({startSegmentIndex:s,endSegmentIndex:o,consumedEndSegmentIndex:o+1}),s=o+1);return s<e.len&&n.push({startSegmentIndex:s,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function Ot(e,t,n="normal"){let s=gn(n),o=s.mode==="pre-wrap"?bn(e):yn(e);if(o.length===0)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let i=Vn(o,t,s);return{normalized:o,chunks:Kn(i,s),...i}}var Me=null,jt=new Map,Ne=null,Jn=/\p{Emoji_Presentation}/u,Zn=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,ot=null,zt=new Map;function rt(){if(Me!==null)return Me;if(typeof OffscreenCanvas<"u")return Me=new OffscreenCanvas(1,1).getContext("2d"),Me;if(typeof document<"u")return Me=document.createElement("canvas").getContext("2d"),Me;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Qn(e){let t=jt.get(e);return t||(t=new Map,jt.set(e,t)),t}function ge(e,t){let n=t.get(e);return n===void 0&&(n={width:rt().measureText(e).width,containsCJK:pe(e)},t.set(e,n)),n}function Ae(){if(Ne!==null)return Ne;if(typeof navigator>"u")return Ne={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},Ne;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),s=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return Ne={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:s,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},Ne}function Yn(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function st(){return ot===null&&(ot=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ot}function Xn(e){return Jn.test(e)||e.includes("\uFE0F")}function Gt(e){return Zn.test(e)}function ei(e,t){let n=zt.get(e);if(n!==void 0)return n;let s=rt();s.font=e;let o=s.measureText("\u{1F600}").width;if(n=0,o>t+.5&&typeof document<"u"&&document.body!==null){let i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="\u{1F600}",document.body.appendChild(i);let l=i.getBoundingClientRect().width;document.body.removeChild(i),o-l>.5&&(n=o-l)}return zt.set(e,n),n}function ti(e){let t=0,n=st();for(let s of n.segment(e))Xn(s.segment)&&t++;return t}function ni(e,t){return t.emojiCount===void 0&&(t.emojiCount=ti(e)),t.emojiCount}function ye(e,t,n){return n===0?t.width:t.width-ni(e,t)*n}function qt(e,t,n,s){if(t.graphemeWidths!==void 0)return t.graphemeWidths;let o=[],i=st();for(let l of i.segment(e)){let d=ge(l.segment,n);o.push(ye(l.segment,d,s))}return t.graphemeWidths=o.length>1?o:null,t.graphemeWidths}function Ut(e,t,n,s){if(t.graphemePrefixWidths!==void 0)return t.graphemePrefixWidths;let o=[],i=st(),l="";for(let d of i.segment(e)){l+=d.segment;let c=ge(l,n);o.push(ye(l,c,s))}return t.graphemePrefixWidths=o.length>1?o:null,t.graphemePrefixWidths}function $t(e,t){let n=rt();n.font=e;let s=Qn(e),o=Yn(e),i=t?ei(e,o):0;return{cache:s,fontSize:o,emojiCorrection:i}}function Oe(e){return e==="space"||e==="preserved-space"||e==="tab"||e==="zero-width-break"||e==="soft-hyphen"}function ii(e){return e==="space"}function oi(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function at(e,t,n,s){return!s||t===null?e[n]:t[n]-(n>0?t[n-1]:0)}function ri(e,t,n,s,o,i){let l=0,d=t;for(;l<e.length;){let c=i?t+e[l]:d+e[l];if((l+1<e.length?c+o:c)>n+s)break;d=c,l++}return{fitCount:l,fittedWidth:d}}function Vt(e,t){return e.simpleLineWalkFastPath?si(e,t):Kt(e,t)}function si(e,t){let{widths:n,kinds:s,breakableWidths:o,breakablePrefixWidths:i}=e;if(n.length===0)return 0;let l=Ae(),d=l.lineFitEpsilon,c=0,r=0,u=!1;function g(m){let b=n[m];if(b>t&&o[m]!==null){let T=o[m],M=i[m]??null;r=0;for(let _=0;_<T.length;_++){let V=at(T,M,_,l.preferPrefixWidthsForBreakableRuns);r>0&&r+V>t+d?(c++,r=V):(r===0&&c++,r+=V)}}else r=b,c++;u=!0}for(let m=0;m<n.length;m++){let b=n[m],T=s[m];if(!u){g(m);continue}let M=r+b;if(M>t+d){if(ii(T))continue;r=0,u=!1,g(m);continue}r=M}return u?c:c+1}function ai(e,t,n){let{widths:s,kinds:o,breakableWidths:i,breakablePrefixWidths:l}=e;if(s.length===0)return 0;let d=Ae(),c=d.lineFitEpsilon,r=0,u=0,g=!1,m=0,b=0,T=0,M=0,_=-1,V=0;function ee(){_=-1,V=0}function z(k=T,C=M,W=u){r++,n?.({startSegmentIndex:m,startGraphemeIndex:b,endSegmentIndex:k,endGraphemeIndex:C,width:W}),u=0,g=!1,ee()}function U(k,C){g=!0,m=k,b=0,T=k+1,M=0,u=C}function y(k,C,W){g=!0,m=k,b=C,T=k,M=C+1,u=W}function A(k,C){if(!g){U(k,C);return}u+=C,T=k+1,M=0}function N(k,C){Oe(o[k])&&(_=k+1,V=u-C)}function R(k){F(k,0)}function F(k,C){let W=i[k],Y=l[k]??null;for(let q=C;q<W.length;q++){let K=at(W,Y,q,d.preferPrefixWidthsForBreakableRuns);if(!g){y(k,q,K);continue}u+K>t+c?(z(),y(k,q,K)):(u+=K,T=k,M=q+1)}g&&T===k&&M===W.length&&(T=k+1,M=0)}let E=0;for(;E<s.length;){let k=s[E],C=o[E];if(!g){k>t&&i[E]!==null?R(E):U(E,k),N(E,k),E++;continue}if(u+k>t+c){if(Oe(C)){A(E,k),z(E+1,0,u-k),E++;continue}if(_>=0){z(_,0,V);continue}if(k>t&&i[E]!==null){z(),R(E),E++;continue}z();continue}A(E,k),N(E,k),E++}return g&&z(),r}function Kt(e,t,n){if(e.simpleLineWalkFastPath)return ai(e,t,n);let{widths:s,lineEndFitAdvances:o,lineEndPaintAdvances:i,kinds:l,breakableWidths:d,breakablePrefixWidths:c,discretionaryHyphenWidth:r,tabStopAdvance:u,chunks:g}=e;if(s.length===0||g.length===0)return 0;let m=Ae(),b=m.lineFitEpsilon,T=0,M=0,_=!1,V=0,ee=0,z=0,U=0,y=-1,A=0,N=0,R=null;function F(){y=-1,A=0,N=0,R=null}function E(v=z,S=U,h=M){T++,n?.({startSegmentIndex:V,startGraphemeIndex:ee,endSegmentIndex:v,endGraphemeIndex:S,width:h}),M=0,_=!1,F()}function k(v,S){_=!0,V=v,ee=0,z=v+1,U=0,M=S}function C(v,S,h){_=!0,V=v,ee=S,z=v,U=S+1,M=h}function W(v,S){if(!_){k(v,S);return}M+=S,z=v+1,U=0}function Y(v,S){if(!Oe(l[v]))return;let h=l[v]==="tab"?0:o[v],w=l[v]==="tab"?S:i[v];y=v+1,A=M-S+h,N=M-S+w,R=l[v]}function q(v){K(v,0)}function K(v,S){let h=d[v],w=c[v]??null;for(let P=S;P<h.length;P++){let G=at(h,w,P,m.preferPrefixWidthsForBreakableRuns);if(!_){C(v,P,G);continue}M+G>t+b?(E(),C(v,P,G)):(M+=G,z=v,U=P+1)}_&&z===v&&U===h.length&&(z=v+1,U=0)}function H(v){if(R!=="soft-hyphen")return!1;let S=d[v];if(S===null)return!1;let h=m.preferPrefixWidthsForBreakableRuns?c[v]??S:S,w=h!==S,{fitCount:P,fittedWidth:G}=ri(h,M,t,b,r,w);return P===0?!1:(M=G,z=v,U=P,F(),P===S.length?(z=v+1,U=0,!0):(E(v,P,G+r),K(v,P),!0))}function de(v){T++,n?.({startSegmentIndex:v.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:v.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),F()}for(let v=0;v<g.length;v++){let S=g[v];if(S.startSegmentIndex===S.endSegmentIndex){de(S);continue}_=!1,M=0,V=S.startSegmentIndex,ee=0,z=S.startSegmentIndex,U=0,F();let h=S.startSegmentIndex;for(;h<S.endSegmentIndex;){let w=l[h],P=w==="tab"?oi(M,u):s[h];if(w==="soft-hyphen"){_&&(z=h+1,U=0,y=h+1,A=M+r,N=M+r,R=w),h++;continue}if(!_){P>t&&d[h]!==null?q(h):k(h,P),Y(h,P),h++;continue}if(M+P>t+b){let I=M+(w==="tab"?0:o[h]),D=M+(w==="tab"?P:i[h]);if(R==="soft-hyphen"&&m.preferEarlySoftHyphenBreak&&A<=t+b){E(y,0,N);continue}if(R==="soft-hyphen"&&H(h)){h++;continue}if(Oe(w)&&I<=t+b){W(h,P),E(h+1,0,D),h++;continue}if(y>=0&&A<=t+b){E(y,0,N);continue}if(P>t&&d[h]!==null){E(),q(h),h++;continue}E();continue}W(h,P),Y(h,P),h++}if(_){let w=y===S.consumedEndSegmentIndex?N:M;E(S.consumedEndSegmentIndex,0,w)}}return T}var lt=null;function li(){return lt===null&&(lt=new Intl.Segmenter(void 0,{granularity:"grapheme"})),lt}function ui(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableWidths:[],breakablePrefixWidths:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableWidths:[],breakablePrefixWidths:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function ci(e,t,n){let s=li(),o=Ae(),{cache:i,emojiCorrection:l}=$t(t,Gt(e.normalized)),d=ye("-",ge("-",i),l),r=ye(" ",ge(" ",i),l)*8;if(e.len===0)return ui(n);let u=[],g=[],m=[],b=[],T=e.chunks.length<=1,M=n?[]:null,_=[],V=[],ee=n?[]:null,z=Array.from({length:e.len}),U=Array.from({length:e.len});function y(R,F,E,k,C,W,Y,q){C!=="text"&&C!=="space"&&C!=="zero-width-break"&&(T=!1),u.push(F),g.push(E),m.push(k),b.push(C),M?.push(W),_.push(Y),V.push(q),ee!==null&&ee.push(R)}for(let R=0;R<e.len;R++){z[R]=u.length;let F=e.texts[R],E=e.isWordLike[R],k=e.kinds[R],C=e.starts[R];if(k==="soft-hyphen"){y(F,0,d,d,k,C,null,null),U[R]=u.length;continue}if(k==="hard-break"){y(F,0,0,0,k,C,null,null),U[R]=u.length;continue}if(k==="tab"){y(F,0,0,0,k,C,null,null),U[R]=u.length;continue}let W=ge(F,i);if(k==="text"&&W.containsCJK){let H="",de=0;for(let v of s.segment(F)){let S=v.segment;if(H.length===0){H=S,de=v.index;continue}if(Ie.has(H)||et.has(S)||Te.has(S)||o.carryCJKAfterClosingQuote&&pe(S)&&it(H)){H+=S;continue}let h=ge(H,i),w=ye(H,h,l);y(H,w,w,w,"text",C+de,null,null),H=S,de=v.index}if(H.length>0){let v=ge(H,i),S=ye(H,v,l);y(H,S,S,S,"text",C+de,null,null)}U[R]=u.length;continue}let Y=ye(F,W,l),q=k==="space"||k==="preserved-space"||k==="zero-width-break"?0:Y,K=k==="space"||k==="zero-width-break"?0:Y;if(E&&F.length>1){let H=qt(F,W,i,l),de=o.preferPrefixWidthsForBreakableRuns?Ut(F,W,i,l):null;y(F,Y,q,K,k,C,H,de)}else y(F,Y,q,K,k,C,null,null);U[R]=u.length}let A=di(e.chunks,z,U),N=M===null?null:_t(e.normalized,M);return ee!==null?{widths:u,lineEndFitAdvances:g,lineEndPaintAdvances:m,kinds:b,simpleLineWalkFastPath:T,segLevels:N,breakableWidths:_,breakablePrefixWidths:V,discretionaryHyphenWidth:d,tabStopAdvance:r,chunks:A,segments:ee}:{widths:u,lineEndFitAdvances:g,lineEndPaintAdvances:m,kinds:b,simpleLineWalkFastPath:T,segLevels:N,breakableWidths:_,breakablePrefixWidths:V,discretionaryHyphenWidth:d,tabStopAdvance:r,chunks:A}}function di(e,t,n){let s=[];for(let o=0;o<e.length;o++){let i=e[o],l=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n[n.length-1]??0,d=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n[n.length-1]??0,c=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n[n.length-1]??0;s.push({startSegmentIndex:l,endSegmentIndex:d,consumedEndSegmentIndex:c})}return s}function mi(e,t,n,s){let o=Ot(e,Ae(),s?.whiteSpace);return ci(o,t,n)}function Jt(e,t,n){return mi(e,t,!1,n)}function Zt(e,t,n){let s=Vt(e,t);return{lineCount:s,height:s*n}}var fi={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function Qt(e,t){let n={...fi,...t},s=1.2;for(let o=n.baseFontSize;o>=n.minFontSize;o-=n.step){let i=`${n.fontWeight} ${o}px ${n.fontFamily}`,l=Jt(e,i),{lineCount:d}=Zt(l,n.maxWidth,o*s);if(d<=1)return{fontSize:o,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:Qt};function Yt(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Dt())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Yt,{once:!0}):Yt();})();
15
+ `)}var it=null,Dn;function kn(){return it===null&&(it=new Intl.Segmenter(Dn,{granularity:"word"})),it}var Ln=/\p{Script=Arabic}/u,ze=/\p{M}/u,$t=/\p{Nd}/u;function Wt(e){return Ln.test(e)}function Ht(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=44032&&e<=55215||e>=65280&&e<=65519}function xe(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){let r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){let o=(n-55296<<10)+(r-56320)+65536;if(Ht(o))return!0;t++;continue}}if(Ht(n))return!0}}return!1}function Tn(e){let t=qe(e);return t!==null&&(Ue.has(t)||Se.has(t))}var wn=new Set(["\xA0","\u202F","\u2060","\uFEFF"]);function Bn(e){return xe(e)}function vn(e){let t=qe(e);return t!==null&&wn.has(t)}function Ge(e){return!Tn(e)&&!vn(e)}var Ue=new Set(["\uFF0C","\uFF0E","\uFF01","\uFF1A","\uFF1B","\uFF1F","\u3001","\u3002","\u30FB","\uFF09","\u3015","\u3009","\u300B","\u300D","\u300F","\u3011","\u3017","\u3019","\u301B","\u30FC","\u3005","\u303B","\u309D","\u309E","\u30FD","\u30FE"]),Pe=new Set(['"',"(","[","{","\u201C","\u2018","\xAB","\u2039","\uFF08","\u3014","\u3008","\u300A","\u300C","\u300E","\u3010","\u3016","\u3018","\u301A"]),rt=new Set(["'","\u2019"]),Se=new Set([".",",","!","?",":",";","\u060C","\u061B","\u061F","\u0964","\u0965","\u104A","\u104B","\u104C","\u104D","\u104F",")","]","}","%",'"',"\u201D","\u2019","\xBB","\u203A","\u2026"]),Rn=new Set([":",".","\u060C","\u061B"]),In=new Set(["\u104F"]),Pn=new Set(["\u201D","\u2019","\xBB","\u203A","\u300D","\u300F","\u3011","\u300B","\u3009","\u3015","\uFF09"]);function On(e){if(st(e))return!0;let t=!1;for(let n of e){if(Se.has(n)){t=!0;continue}if(!(t&&ze.test(n)))return!1}return t}function _n(e){for(let t of e)if(!Ue.has(t)&&!Se.has(t))return!1;return e.length>0}function Wn(e){if(st(e))return!0;for(let t of e)if(!Pe.has(t)&&!rt.has(t)&&!ze.test(t))return!1;return e.length>0}function st(e){let t=!1;for(let n of e)if(!(n==="\\"||ze.test(n))){if(Pe.has(n)||Se.has(n)||rt.has(n)){t=!0;continue}return!1}return t}function Kt(e,t){let n=t-1;if(n<=0)return Math.max(n,0);let r=e.charCodeAt(n);if(r<56320||r>57343)return n;let o=n-1;if(o<0)return n;let i=e.charCodeAt(o);return i>=55296&&i<=56319?o:n}function qe(e){if(e.length===0)return null;let t=Kt(e,e.length);return e.slice(t)}function Hn(e){let t=Array.from(e),n=t.length;for(;n>0;){let r=t[n-1];if(ze.test(r)){n--;continue}if(Pe.has(r)||rt.has(r)){n--;continue}break}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function jn(e,t,n){return n==="text"&&!t&&e.length===1&&e!=="-"&&e!=="\u2014"?e:null}function jt(e,t,n,r){let o=t[r],i=e[r];if(o==null)return i;let c=n[r];if(i.length===c)return i;let m=o.repeat(c);return e[r]=m,m}function zt(e,t){return e&&t!==null&&Rn.has(t)}function zn(e){let t=qe(e);return t!==null&&In.has(t)}function Gn(e){if(e.length<2||e[0]!==" ")return null;let t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function $e(e){let t=e.length;for(;t>0;){let n=Kt(e,t),r=e.slice(n,t);if(Pn.has(r))return!0;if(!Se.has(r))return!1;t=n}return!1}function Un(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(e===" ")return"preserved-space";if(e===" ")return"tab";if(t.preserveHardBreaks&&e===`
16
+ `)return"hard-break"}return e===" "?"space":e==="\xA0"||e==="\u202F"||e==="\u2060"||e==="\uFEFF"?"glue":e==="\u200B"?"zero-width-break":e==="\xAD"?"soft-hyphen":"text"}var qn=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function me(e){return e.length===1?e[0]:e.join("")}function $n(e,t){let n=[];for(let r=e.length-1;r>=0;r--)n.push(e[r]);return n.push(t),me(n)}function Kn(e,t,n,r){if(!qn.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];let o=[],i=null,c=[],m=n,u=!1,s=0;for(let l of e){let x=Un(l,r),h=x==="text"&&t;if(i!==null&&x===i&&h===u){c.push(l),s+=l.length;continue}i!==null&&o.push({text:me(c),isWordLike:u,kind:i,start:m}),i=x,c=[l],m=n+s,u=h,s+=l.length}return i!==null&&o.push({text:me(c),isWordLike:u,kind:i,start:m}),o}function ot(e){return e==="space"||e==="preserved-space"||e==="zero-width-break"||e==="hard-break"}var Vn=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Jn(e,t){let n=e.texts[t];return n.startsWith("www.")?!0:Vn.test(n)&&t+1<e.len&&e.kinds[t+1]==="text"&&e.texts[t+1]==="//"}function Qn(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}function Zn(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let c=0;c<e.len;c++){if(r[c]!=="text"||!Jn(e,c))continue;let m=[t[c]],u=c+1;for(;u<e.len&&!ot(r[u]);){m.push(t[u]),n[c]=!0;let s=t[u].includes("?");if(r[u]="text",t[u]="",u++,s)break}t[c]=me(m)}let i=0;for(let c=0;c<t.length;c++){let m=t[c];m.length!==0&&(i!==c&&(t[i]=m,n[i]=n[c],r[i]=r[c],o[i]=o[c]),i++)}return t.length=i,n.length=i,r.length=i,o.length=i,{len:i,texts:t,isWordLike:n,kinds:r,starts:o}}function Yn(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(t.push(c),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i]),!Qn(c))continue;let m=i+1;if(m>=e.len||ot(e.kinds[m]))continue;let u=[],s=e.starts[m],l=m;for(;l<e.len&&!ot(e.kinds[l]);)u.push(e.texts[l]),l++;u.length>0&&(t.push(me(u)),n.push(!0),r.push("text"),o.push(s),i=l-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}var Xn=new Set([":","-","/","\xD7",",",".","+","\u2013","\u2014"]),Gt=/^[A-Za-z0-9_]+[,:;]*$/,Ut=/[,:;]+$/;function Vt(e){for(let t of e)if($t.test(t))return!0;return!1}function Ie(e){if(e.length===0)return!1;for(let t of e)if(!($t.test(t)||Xn.has(t)))return!1;return!0}function ei(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i],m=e.kinds[i];if(m==="text"&&Ie(c)&&Vt(c)){let u=[c],s=i+1;for(;s<e.len&&e.kinds[s]==="text"&&Ie(e.texts[s]);)u.push(e.texts[s]),s++;t.push(me(u)),n.push(!0),r.push("text"),o.push(e.starts[i]),i=s-1;continue}t.push(c),n.push(e.isWordLike[i]),r.push(m),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ti(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i],m=e.kinds[i],u=e.isWordLike[i];if(m==="text"&&u&&Gt.test(c)){let s=[c],l=Ut.test(c),x=i+1;for(;l&&x<e.len&&e.kinds[x]==="text"&&e.isWordLike[x]&&Gt.test(e.texts[x]);){let h=e.texts[x];s.push(h),l=Ut.test(h),x++}t.push(me(s)),n.push(!0),r.push("text"),o.push(e.starts[i]),i=x-1;continue}t.push(c),n.push(u),r.push(m),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ni(e){let t=[],n=[],r=[],o=[];for(let i=0;i<e.len;i++){let c=e.texts[i];if(e.kinds[i]==="text"&&c.includes("-")){let m=c.split("-"),u=m.length>1;for(let s=0;s<m.length;s++){let l=m[s];if(!u)break;(l.length===0||!Vt(l)||!Ie(l))&&(u=!1)}if(u){let s=0;for(let l=0;l<m.length;l++){let x=m[l],h=l<m.length-1?`${x}-`:x;t.push(h),n.push(!0),r.push("text"),o.push(e.starts[i]+s),s+=h.length}continue}}t.push(c),n.push(e.isWordLike[i]),r.push(e.kinds[i]),o.push(e.starts[i])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function ii(e){let t=[],n=[],r=[],o=[],i=0;for(;i<e.len;){let c=[e.texts[i]],m=e.isWordLike[i],u=e.kinds[i],s=e.starts[i];if(u==="glue"){let l=[c[0]],x=s;for(i++;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let h=me(l);if(i<e.len&&e.kinds[i]==="text")c[0]=h,c.push(e.texts[i]),m=e.isWordLike[i],u="text",s=x,i++;else{t.push(h),n.push(!1),r.push("glue"),o.push(x);continue}}else i++;if(u==="text")for(;i<e.len&&e.kinds[i]==="glue";){let l=[];for(;i<e.len&&e.kinds[i]==="glue";)l.push(e.texts[i]),i++;let x=me(l);if(i<e.len&&e.kinds[i]==="text"){c.push(x,e.texts[i]),m=m||e.isWordLike[i],i++;continue}c.push(x)}t.push(me(c)),n.push(m),r.push(u),o.push(s)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function oi(e){let t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),o=e.starts.slice();for(let i=0;i<t.length-1;i++){if(r[i]!=="text"||r[i+1]!=="text"||!xe(t[i])||!xe(t[i+1]))continue;let c=Hn(t[i]);c!==null&&(t[i]=c.head,t[i+1]=c.tail+t[i+1],o[i+1]=o[i]+c.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function qt(e,t,n){let r=kn(),o=0,i=[],c=[],m=[],u=[],s=[],l=[],x=[],h=[],M=[],D=[],k=[],w=[];for(let d of r.segment(e))for(let S of Kn(d.segment,d.isWordLike??!1,d.index,n)){let U=function(){l[L]!==null&&(c[L]=[jt(i,l,x,L)],l[L]=null),c[L].push(S.text),m[L]=m[L]||S.isWordLike,h[L]=h[L]||E,M[L]=M[L]||v,D[L]=I,k[L]=X,w[L]=zt(M[L],_)},A=S.kind==="text",b=jn(S.text,S.isWordLike,S.kind),E=xe(S.text),v=Wt(S.text),_=qe(S.text),I=$e(S.text),X=zn(S.text),L=o-1;t.carryCJKAfterClosingQuote&&A&&o>0&&u[L]==="text"&&E&&h[L]&&D[L]||A&&o>0&&u[L]==="text"&&_n(S.text)&&h[L]||A&&o>0&&u[L]==="text"&&k[L]?U():A&&o>0&&u[L]==="text"&&S.isWordLike&&v&&w[L]?(U(),m[L]=!0):b!==null&&o>0&&u[L]==="text"&&l[L]===b?x[L]=(x[L]??1)+1:A&&!S.isWordLike&&o>0&&u[L]==="text"&&(On(S.text)||S.text==="-"&&m[L])?U():(i[o]=S.text,c[o]=[S.text],m[o]=S.isWordLike,u[o]=S.kind,s[o]=S.start,l[o]=b,x[o]=b===null?0:1,h[o]=E,M[o]=v,D[o]=I,k[o]=X,w[o]=zt(v,_),o++)}for(let d=0;d<o;d++){if(l[d]!==null){i[d]=jt(i,l,x,d);continue}i[d]=me(c[d])}for(let d=1;d<o;d++)u[d]==="text"&&!m[d]&&st(i[d])&&u[d-1]==="text"&&(i[d-1]+=i[d],m[d-1]=m[d-1]||m[d],i[d]="");let j=Array.from({length:o},()=>null),V=-1;for(let d=o-1;d>=0;d--){let S=i[d];if(S.length!==0){if(u[d]==="text"&&!m[d]&&Wn(S)&&V>=0&&u[V]==="text"){let A=j[V]??[];A.push(S),j[V]=A,s[V]=s[d],i[d]="";continue}V=d}}for(let d=0;d<o;d++){let S=j[d];S!=null&&(i[d]=$n(S,i[d]))}let B=0;for(let d=0;d<o;d++){let S=i[d];S.length!==0&&(B!==d&&(i[B]=S,m[B]=m[d],u[B]=u[d],s[B]=s[d]),B++)}i.length=B,m.length=B,u.length=B,s.length=B;let $=ii({len:B,texts:i,isWordLike:m,kinds:u,starts:s}),g=oi(ti(ni(ei(Yn(Zn($))))));for(let d=0;d<g.len-1;d++){let S=Gn(g.texts[d]);S!==null&&(g.kinds[d]!=="space"&&g.kinds[d]!=="preserved-space"||g.kinds[d+1]!=="text"||!Wt(g.texts[d+1])||(g.texts[d]=S.space,g.isWordLike[d]=!1,g.kinds[d]=g.kinds[d]==="preserved-space"?"preserved-space":"space",g.texts[d+1]=S.marks+g.texts[d+1],g.starts[d+1]=g.starts[d]+S.space.length))}return g}function ri(e,t){if(e.len===0)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];let n=[],r=0;for(let o=0;o<e.len;o++)e.kinds[o]==="hard-break"&&(n.push({startSegmentIndex:r,endSegmentIndex:o,consumedEndSegmentIndex:o+1}),r=o+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function si(e){if(e.len<=1)return e;let t=[],n=[],r=[],o=[],i=null,c=!1,m=0,u=!1,s=!1;function l(){i!==null&&(t.push(me(i)),n.push(c),r.push("text"),o.push(m),i=null)}for(let x=0;x<e.len;x++){let h=e.texts[x],M=e.kinds[x],D=e.isWordLike[x],k=e.starts[x];if(M==="text"){let w=Bn(h),j=Ge(h);if(i!==null&&u&&s){i.push(h),c=c||D,u=u||w,s=j;continue}l(),i=[h],c=D,m=k,u=w,s=j;continue}l(),t.push(h),n.push(D),r.push(M),o.push(k)}return l(),{len:t.length,texts:t,isWordLike:n,kinds:r,starts:o}}function Jt(e,t,n="normal",r="normal"){let o=bn(n),i=o.mode==="pre-wrap"?Cn(e):Mn(e);if(i.length===0)return{normalized:i,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};let c=r==="keep-all"?si(qt(i,t,o)):qt(i,t,o);return{normalized:i,chunks:ri(c,o),...c}}var De=null,Qt=new Map,ke=null,ai=96,li=/\p{Emoji_Presentation}/u,ui=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u,at=null,Zt=new Map;function lt(){if(De!==null)return De;if(typeof OffscreenCanvas<"u")return De=new OffscreenCanvas(1,1).getContext("2d"),De;if(typeof document<"u")return De=document.createElement("canvas").getContext("2d"),De;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function ci(e){let t=Qt.get(e);return t||(t=new Map,Qt.set(e,t)),t}function he(e,t){let n=t.get(e);return n===void 0&&(n={width:lt().measureText(e).width,containsCJK:xe(e)},t.set(e,n)),n}function Le(){if(ke!==null)return ke;if(typeof navigator>"u")return ke={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},ke;let e=navigator.userAgent,n=navigator.vendor==="Apple Computer, Inc."&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),r=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return ke={lineFitEpsilon:n?1/64:.005,carryCJKAfterClosingQuote:r,preferPrefixWidthsForBreakableRuns:n,preferEarlySoftHyphenBreak:n},ke}function di(e){let t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}function Yt(){return at===null&&(at=new Intl.Segmenter(void 0,{granularity:"grapheme"})),at}function mi(e){return li.test(e)||e.includes("\uFE0F")}function Xt(e){return ui.test(e)}function xi(e,t){let n=Zt.get(e);if(n!==void 0)return n;let r=lt();r.font=e;let o=r.measureText("\u{1F600}").width;if(n=0,o>t+.5&&typeof document<"u"&&document.body!==null){let i=document.createElement("span");i.style.font=e,i.style.display="inline-block",i.style.visibility="hidden",i.style.position="absolute",i.textContent="\u{1F600}",document.body.appendChild(i);let c=i.getBoundingClientRect().width;document.body.removeChild(i),o-c>.5&&(n=o-c)}return Zt.set(e,n),n}function fi(e){let t=0,n=Yt();for(let r of n.segment(e))mi(r.segment)&&t++;return t}function pi(e,t){return t.emojiCount===void 0&&(t.emojiCount=fi(e)),t.emojiCount}function Fe(e,t,n){return n===0?t.width:t.width-pi(e,t)*n}function en(e,t,n,r,o){if(t.breakableFitAdvances!==void 0)return t.breakableFitAdvances;let i=Yt(),c=[];for(let l of i.segment(e))c.push(l.segment);if(c.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if(o==="sum-graphemes"){let l=[];for(let x of c){let h=he(x,n);l.push(Fe(x,h,r))}return t.breakableFitAdvances=l,t.breakableFitAdvances}if(o==="pair-context"||c.length>ai){let l=[],x=null,h=0;for(let M of c){let D=he(M,n),k=Fe(M,D,r);if(x===null)l.push(k);else{let w=x+M,j=he(w,n);l.push(Fe(w,j,r)-h)}x=M,h=k}return t.breakableFitAdvances=l,t.breakableFitAdvances}let m=[],u="",s=0;for(let l of c){u+=l;let x=he(u,n),h=Fe(u,x,r);m.push(h-s),s=h}return t.breakableFitAdvances=m,t.breakableFitAdvances}function tn(e,t){let n=lt();n.font=e;let r=ci(e),o=di(e),i=t?xi(e,o):0;return{cache:r,fontSize:o,emojiCorrection:i}}function hi(e,t){for(;t<e.widths.length;){let n=e.kinds[t];if(n!=="space"&&n!=="zero-width-break"&&n!=="soft-hyphen")break;t++}return t}function gi(e,t){if(t<=0)return 0;let n=e%t;return Math.abs(n)<=1e-6?t:t-n}function Si(e,t,n,r,o){let i=0,c=t;for(;i<e.length;){let m=c+e[i];if((i+1<e.length?m+o:m)>n+r)break;c=m,i++}return{fitCount:i,fittedWidth:c}}function nn(e,t){return e.simpleLineWalkFastPath?on(e,t):rn(e,t)}function on(e,t,n){let{widths:r,kinds:o,breakableFitAdvances:i}=e;if(r.length===0)return 0;let m=Le().lineFitEpsilon,u=t+m,s=0,l=0,x=!1,h=0,M=0,D=0,k=0,w=-1,j=0;function V(){w=-1,j=0}function B(b=D,E=k,v=l){s++,n?.({startSegmentIndex:h,startGraphemeIndex:M,endSegmentIndex:b,endGraphemeIndex:E,width:v}),l=0,x=!1,V()}function $(b,E){x=!0,h=b,M=0,D=b+1,k=0,l=E}function g(b,E,v){x=!0,h=b,M=E,D=b,k=E+1,l=v}function d(b,E){if(!x){$(b,E);return}l+=E,D=b+1,k=0}function S(b,E){let v=i[b];for(let _=E;_<v.length;_++){let I=v[_];x?l+I>u?(B(),g(b,_,I)):(l+=I,D=b,k=_+1):g(b,_,I)}x&&D===b&&k===v.length&&(D=b+1,k=0)}let A=0;for(;A<r.length&&!(!x&&(A=hi(e,A),A>=r.length));){let b=r[A],E=o[A],v=E==="space"||E==="preserved-space"||E==="tab"||E==="zero-width-break"||E==="soft-hyphen";if(!x){b>t&&i[A]!==null?S(A,0):$(A,b),v&&(w=A+1,j=l-b),A++;continue}if(l+b>u){if(v){d(A,b),B(A+1,0,l-b),A++;continue}if(w>=0){if(D>w||D===w&&k>0){B();continue}B(w,0,j);continue}if(b>t&&i[A]!==null){B(),S(A,0),A++;continue}B();continue}d(A,b),v&&(w=A+1,j=l-b),A++}return x&&B(),s}function rn(e,t,n){if(e.simpleLineWalkFastPath)return on(e,t,n);let{widths:r,lineEndFitAdvances:o,lineEndPaintAdvances:i,kinds:c,breakableFitAdvances:m,discretionaryHyphenWidth:u,tabStopAdvance:s,chunks:l}=e;if(r.length===0||l.length===0)return 0;let x=Le(),h=x.lineFitEpsilon,M=t+h,D=0,k=0,w=!1,j=0,V=0,B=0,$=0,g=-1,d=0,S=0,A=null;function b(){g=-1,d=0,S=0,A=null}function E(H=B,q=$,N=k){D++,n?.({startSegmentIndex:j,startGraphemeIndex:V,endSegmentIndex:H,endGraphemeIndex:q,width:N}),k=0,w=!1,b()}function v(H,q){w=!0,j=H,V=0,B=H+1,$=0,k=q}function _(H,q,N){w=!0,j=H,V=q,B=H,$=q+1,k=N}function I(H,q){if(!w){v(H,q);return}k+=q,B=H+1,$=0}function X(H,q,N,F){if(!q)return;let T=H==="tab"?0:o[N],W=H==="tab"?F:i[N];g=N+1,d=k-F+T,S=k-F+W,A=H}function L(H,q){let N=m[H];for(let F=q;F<N.length;F++){let T=N[F];w?k+T>M?(E(),_(H,F,T)):(k+=T,B=H,$=F+1):_(H,F,T)}w&&B===H&&$===N.length&&(B=H+1,$=0)}function U(H){if(A!=="soft-hyphen")return!1;let q=m[H];if(q==null)return!1;let{fitCount:N,fittedWidth:F}=Si(q,k,t,h,u);return N===0?!1:(k=F,B=H,$=N,b(),N===q.length?(B=H+1,$=0,!0):(E(H,N,F+u),L(H,N),!0))}function te(H){D++,n?.({startSegmentIndex:H.startSegmentIndex,startGraphemeIndex:0,endSegmentIndex:H.consumedEndSegmentIndex,endGraphemeIndex:0,width:0}),b()}for(let H=0;H<l.length;H++){let q=l[H];if(q.startSegmentIndex===q.endSegmentIndex){te(q);continue}w=!1,k=0,j=q.startSegmentIndex,V=0,B=q.startSegmentIndex,$=0,b();let N=q.startSegmentIndex;for(;N<q.endSegmentIndex;){let F=c[N],T=F==="space"||F==="preserved-space"||F==="tab"||F==="zero-width-break"||F==="soft-hyphen",W=F==="tab"?gi(k,s):r[N];if(F==="soft-hyphen"){w&&(B=N+1,$=0,g=N+1,d=k+u,S=k+u,A=F),N++;continue}if(!w){W>t&&m[N]!==null?L(N,0):v(N,W),X(F,T,N,W),N++;continue}if(k+W>M){let R=k+(F==="tab"?0:o[N]),P=k+(F==="tab"?W:i[N]);if(A==="soft-hyphen"&&x.preferEarlySoftHyphenBreak&&d<=M){E(g,0,S);continue}if(A==="soft-hyphen"&&U(N)){N++;continue}if(T&&R<=M){I(N,W),E(N+1,0,P),N++;continue}if(g>=0&&d<=M){if(B>g||B===g&&$>0){E();continue}let O=g;E(O,0,S),N=O;continue}if(W>t&&m[N]!==null){E(),L(N,0),N++;continue}E();continue}I(N,W),X(F,T,N,W),N++}if(w){let F=g===q.consumedEndSegmentIndex?S:k;E(q.consumedEndSegmentIndex,0,F)}}return D}var ut=null;function Fi(){return ut===null&&(ut=new Intl.Segmenter(void 0,{granularity:"grapheme"})),ut}function Ni(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}function Ei(e,t){let n=[],r=[],o=0,i=!1,c=!1,m=!1;function u(){r.length!==0&&(n.push({text:r.length===1?r[0]:r.join(""),start:o}),r=[],i=!1,c=!1,m=!1)}function s(x,h,M){r=[x],o=h,i=M,c=$e(x),m=Pe.has(x)}function l(x,h){r.push(x),i=i||h;let M=$e(x);x.length===1&&Se.has(x)?c=c||M:c=M,m=!1}for(let x of Fi().segment(e)){let h=x.segment,M=xe(h);if(r.length===0){s(h,x.index,M);continue}if(m||Ue.has(h)||Se.has(h)||t.carryCJKAfterClosingQuote&&M&&c){l(h,M);continue}if(!i&&!M){l(h,M);continue}u(),s(h,x.index,M)}return u(),n}function Ai(e){if(e.length<=1)return e;let t=[],n=[e[0].text],r=e[0].start,o=xe(e[0].text),i=Ge(e[0].text);function c(){t.push({text:n.length===1?n[0]:n.join(""),start:r})}for(let m=1;m<e.length;m++){let u=e[m],s=xe(u.text),l=Ge(u.text);if(o&&i){n.push(u.text),o=o||s,i=l;continue}c(),n=[u.text],r=u.start,o=s,i=l}return c(),t}function yi(e,t,n,r){let o=Le(),{cache:i,emojiCorrection:c}=tn(t,Xt(e.normalized)),m=Fe("-",he("-",i),c),s=Fe(" ",he(" ",i),c)*8;if(e.len===0)return Ni(n);let l=[],x=[],h=[],M=[],D=e.chunks.length<=1,k=n?[]:null,w=[],j=n?[]:null,V=Array.from({length:e.len});function B(S,A,b,E,v,_,I){v!=="text"&&v!=="space"&&v!=="zero-width-break"&&(D=!1),l.push(A),x.push(b),h.push(E),M.push(v),k?.push(_),w.push(I),j!==null&&j.push(S)}function $(S,A,b,E,v){let _=he(S,i),I=Fe(S,_,c),X=A==="space"||A==="preserved-space"||A==="zero-width-break"?0:I,L=A==="space"||A==="zero-width-break"?0:I;if(v&&E&&S.length>1){let U="sum-graphemes";Ie(S)?U="pair-context":o.preferPrefixWidthsForBreakableRuns&&(U="segment-prefixes");let te=en(S,_,i,c,U);B(S,I,X,L,A,b,te);return}B(S,I,X,L,A,b,null)}for(let S=0;S<e.len;S++){V[S]=l.length;let A=e.texts[S],b=e.isWordLike[S],E=e.kinds[S],v=e.starts[S];if(E==="soft-hyphen"){B(A,0,m,m,E,v,null);continue}if(E==="hard-break"){B(A,0,0,0,E,v,null);continue}if(E==="tab"){B(A,0,0,0,E,v,null);continue}let _=he(A,i);if(E==="text"&&_.containsCJK){let I=Ei(A,o),X=r==="keep-all"?Ai(I):I;for(let L=0;L<X.length;L++){let U=X[L];$(U.text,"text",v+U.start,b,r==="keep-all"||!xe(U.text))}continue}$(A,E,v,b,!0)}let g=bi(e.chunks,V,l.length),d=k===null?null:_t(e.normalized,k);return j!==null?{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:h,kinds:M,simpleLineWalkFastPath:D,segLevels:d,breakableFitAdvances:w,discretionaryHyphenWidth:m,tabStopAdvance:s,chunks:g,segments:j}:{widths:l,lineEndFitAdvances:x,lineEndPaintAdvances:h,kinds:M,simpleLineWalkFastPath:D,segLevels:d,breakableFitAdvances:w,discretionaryHyphenWidth:m,tabStopAdvance:s,chunks:g}}function bi(e,t,n){let r=[];for(let o=0;o<e.length;o++){let i=e[o],c=i.startSegmentIndex<t.length?t[i.startSegmentIndex]:n,m=i.endSegmentIndex<t.length?t[i.endSegmentIndex]:n,u=i.consumedEndSegmentIndex<t.length?t[i.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:c,endSegmentIndex:m,consumedEndSegmentIndex:u})}return r}function Mi(e,t,n,r){let o=r?.wordBreak??"normal",i=Jt(e,Le(),r?.whiteSpace,o);return yi(i,t,n,o)}function sn(e,t,n){return Mi(e,t,!1,n)}function an(e,t,n){let r=nn(e,t);return{lineCount:r,height:r*n}}var Ci={maxWidth:1600,baseFontSize:78,minFontSize:42,fontWeight:900,fontFamily:"Outfit",step:2};function ln(e,t){let n={...Ci,...t},r=1.2;for(let o=n.baseFontSize;o>=n.minFontSize;o-=n.step){let i=`${n.fontWeight} ${o}px ${n.fontFamily}`,c=sn(e,i),{lineCount:m}=an(c,n.maxWidth,o*r);if(m<=1)return{fontSize:o,fits:!0}}return{fontSize:n.minFontSize,fits:!1}}window.__timelines=window.__timelines||{};window.__hyperframes={fitTextFontSize:ln};function un(){let e=window;e.__hyperframeRuntimeBootstrapped||(e.__hyperframeRuntimeBootstrapped=!0,Pt())}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",un,{once:!0}):un();})();
17
17