@hyperframes/studio 0.6.85 → 0.6.86

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.
@@ -415,4 +415,4 @@ var le=Object.defineProperty;var he=(n,t,e)=>t in n?le(n,t,{enumerable:!0,config
415
415
  background: var(--hfp-accent, #fff);
416
416
  pointer-events: none;
417
417
  }
418
- `,te='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><polygon points="4,2 16,9 4,16"/></svg>',be='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><rect x="3" y="2" width="4" height="14"/><rect x="11" y="2" width="4" height="14"/></svg>',ie='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/><path d="M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></svg>',re='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/></svg>',ve='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z" opacity="0.3"/><line x1="18" y1="7" x2="14" y2="17" stroke="currentColor" stroke-width="2"/></svg>',ye=[.25,.5,1,1.5,2,4];function N(n){return Number.isInteger(n)?`${n}x`:`${n}x`}function ne(n){if(!Number.isFinite(n)||n<0)return"0:00";const t=Math.floor(n),e=Math.floor(t/60),i=t%60;return`${e}:${i.toString().padStart(2,"0")}`}function we(n,t,e={}){const i=e.speedPresets??ye,r=document.createElement("div");r.className="hfp-controls",r.addEventListener("click",o=>{o.stopPropagation()});const s=document.createElement("button");s.className="hfp-play-btn",s.type="button",s.innerHTML=te,s.setAttribute("aria-label","Play");const a=document.createElement("div");a.className="hfp-scrubber";const d=document.createElement("div");d.className="hfp-progress",d.style.width="0%",a.appendChild(d);const c=document.createElement("span");c.className="hfp-time",c.textContent="0:00 / 0:00";const m=document.createElement("div");m.className="hfp-speed-wrap";const u=document.createElement("button");u.className="hfp-speed-btn",u.type="button",u.textContent="1x",u.setAttribute("aria-label","Playback speed");const p=document.createElement("div");p.className="hfp-speed-menu",p.setAttribute("role","menu");for(const o of i){const l=document.createElement("button");l.className="hfp-speed-option",l.type="button",l.setAttribute("role","menuitem"),l.dataset.speed=String(o),l.textContent=N(o),o===1&&l.classList.add("hfp-active"),p.appendChild(l)}m.appendChild(p),m.appendChild(u);const g=document.createElement("div");g.className="hfp-volume-wrap";const f=document.createElement("button");f.className="hfp-mute-btn",f.type="button",f.innerHTML=ie,f.setAttribute("aria-label","Mute");const b=document.createElement("div");b.className="hfp-volume-slider-wrap";const _=document.createElement("div");_.className="hfp-volume-slider",_.setAttribute("role","slider"),_.setAttribute("aria-label","Volume"),_.setAttribute("aria-valuemin","0"),_.setAttribute("aria-valuemax","100"),_.setAttribute("aria-valuenow","100"),_.tabIndex=0;const y=document.createElement("div");y.className="hfp-volume-fill",y.style.width="100%",_.appendChild(y),b.appendChild(_),g.appendChild(b),g.appendChild(f),e.audioLocked&&(g.style.display="none"),r.appendChild(s),r.appendChild(a),r.appendChild(c),r.appendChild(g),r.appendChild(m),n.appendChild(r);let S=!1,A=!1,w=1,C=null;i.indexOf(1);const M=(o,l)=>o?ve:l===0||l<.5?re:ie;s.addEventListener("click",o=>{o.stopPropagation(),S?t.onPause():t.onPlay()}),f.addEventListener("click",o=>{o.stopPropagation(),t.onMuteToggle()});let E=!1;const P=o=>{const l=_.getBoundingClientRect(),v=Math.max(0,Math.min(1,(o-l.left)/l.width));w=v,y.style.width=`${v*100}%`,_.setAttribute("aria-valuenow",String(Math.round(v*100))),A&&v>0&&t.onMuteToggle(),f.innerHTML=M(A,v),t.onVolumeChange(v)};_.addEventListener("mousedown",o=>{o.stopPropagation(),E=!0,P(o.clientX)});const $=o=>{E&&P(o.clientX)},z=()=>{E=!1};document.addEventListener("mousemove",$),document.addEventListener("mouseup",z),_.addEventListener("touchstart",o=>{E=!0;const l=o.touches[0];l&&P(l.clientX)},{passive:!0});const j=o=>{if(E){const l=o.touches[0];l&&P(l.clientX)}},q=()=>{E=!1};document.addEventListener("touchmove",j,{passive:!0}),document.addEventListener("touchend",q);const B=.05;_.addEventListener("keydown",o=>{let l=w;if(o.key==="ArrowRight"||o.key==="ArrowUp")l=Math.min(1,w+B);else if(o.key==="ArrowLeft"||o.key==="ArrowDown")l=Math.max(0,w-B);else return;o.preventDefault(),o.stopPropagation(),w=l,y.style.width=`${l*100}%`,_.setAttribute("aria-valuenow",String(Math.round(l*100))),A&&l>0&&t.onMuteToggle(),f.innerHTML=M(A,l),t.onVolumeChange(l)});const W=o=>{for(const l of p.querySelectorAll(".hfp-speed-option"))l.classList.toggle("hfp-active",l.dataset.speed===String(o))};u.addEventListener("click",o=>{o.stopPropagation();const l=p.classList.toggle("hfp-open");u.setAttribute("aria-expanded",String(l))}),p.addEventListener("click",o=>{o.stopPropagation();const l=o.target.closest(".hfp-speed-option");if(!l)return;const v=parseFloat(l.dataset.speed);i.indexOf(v),u.textContent=N(v),W(v),p.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false"),t.onSpeedChange(v)});const X=()=>{p.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false")};document.addEventListener("click",X);const R=o=>{const l=a.getBoundingClientRect(),v=Math.max(0,Math.min(1,(o-l.left)/l.width));t.onSeek(v)};let T=!1;a.addEventListener("mousedown",o=>{o.stopPropagation(),T=!0,R(o.clientX)});const G=o=>{T&&R(o.clientX)},Y=()=>{T=!1};document.addEventListener("mousemove",G),document.addEventListener("mouseup",Y),a.addEventListener("touchstart",o=>{T=!0;const l=o.touches[0];l&&R(l.clientX)},{passive:!0});const Q=o=>{if(T){const l=o.touches[0];l&&R(l.clientX)}},J=()=>{T=!1};document.addEventListener("touchmove",Q,{passive:!0}),document.addEventListener("touchend",J);const K=()=>{C&&clearTimeout(C),C=setTimeout(()=>{S&&r.classList.add("hfp-hidden")},3e3)},Z=n instanceof ShadowRoot?n.host:n;return Z.addEventListener("mousemove",()=>{r.classList.remove("hfp-hidden"),K()}),Z.addEventListener("mouseleave",()=>{S&&r.classList.add("hfp-hidden")}),{updateTime(o,l){const v=l>0?Math.min(o,l):o,de=l>0?v/l*100:0;d.style.width=`${de}%`,c.textContent=`${ne(v)} / ${ne(l)}`},updatePlaying(o){S=o,s.innerHTML=o?be:te,s.setAttribute("aria-label",o?"Pause":"Play"),o?K():r.classList.remove("hfp-hidden")},updateSpeed(o){i.indexOf(o),u.textContent=N(o),W(o)},updateMuted(o){A=o,f.innerHTML=M(o,w),f.setAttribute("aria-label",o?"Unmute":"Mute")},updateVolume(o){w=o,y.style.width=`${o*100}%`,_.setAttribute("aria-valuenow",String(Math.round(o*100))),f.innerHTML=M(A,o)},setVolumeControlsHidden(o){g.style.display=o?"none":""},show(){r.style.display=""},hide(){r.style.display="none"},destroy(){document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",Y),document.removeEventListener("touchmove",Q),document.removeEventListener("touchend",J),document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",j),document.removeEventListener("touchend",q),document.removeEventListener("click",X),C&&clearTimeout(C)}}}function Ae(n,t,e,i,r,s=!1){const a=i?i.split(",").map(Number).filter(m=>!isNaN(m)&&m>0):void 0,d={...a?{speedPresets:a}:{},audioLocked:s},c=we(n,r,d);return c.updateMuted(t),c.updateVolume(e),c}function se(n,t,e){return t?(e||(e=document.createElement("img"),e.className="hfp-poster",n.appendChild(e)),e.src=t,e):(e==null||e.remove(),null)}function Ee(n){return n.composedPath().some(t=>t instanceof HTMLElement&&t.classList.contains("hfp-controls"))}let I=null;function Te(n,t){if(typeof CSSStyleSheet<"u")try{I||(I=new CSSStyleSheet,I.replaceSync(t)),n.adoptedStyleSheets=[I];return}catch{}const e=document.createElement("style");e.textContent=t,n.appendChild(e)}function ke(){const n=document.createElement("div");n.className="hfp-container";const t=document.createElement("iframe");return t.className="hfp-iframe",t.sandbox.add("allow-scripts","allow-same-origin"),t.allow="autoplay; fullscreen",t.referrerPolicy="no-referrer",t.title="HyperFrames Composition",n.appendChild(t),{container:n,iframe:t}}function Ce(n,t,e,i){const r=n.offsetWidth,s=n.offsetHeight;if(r===0||s===0)return;const a=Math.min(r/e,s/i);t.style.width=`${e}px`,t.style.height=`${i}px`,t.style.transform=`translate(-50%, -50%) scale(${a})`}const xe=100;class Le{constructor(t){h(this,"_raf",null);h(this,"_lastUpdateMs",0);this._callbacks=t}start(t,e,i,r){this.stop();const s=()=>{if(r()){this._raf=null;return}let a;try{a=t.time()}catch{this._raf=null;return}const d=i();d>0&&(a=Math.min(a,d));const c=d>0&&a>=d,m=performance.now();if((m-this._lastUpdateMs>xe||c)&&(this._lastUpdateMs=m,this._callbacks.onTimeUpdate(a,d)),c){if(this._callbacks.getLoop()){this._callbacks.restart();return}try{t.pause()}catch{}this._callbacks.onPaused(),this._raf=null;return}this._raf=requestAnimationFrame(s)};this._raf=requestAnimationFrame(s)}stop(){this._raf!==null&&(cancelAnimationFrame(this._raf),this._raf=null)}get isRunning(){return this._raf!==null}}function Se(n){const t=Array.from(n.querySelectorAll("[data-composition-id]"));if(t.length===0)return n.body?[n.body]:[];const e=[];for(const i of t)Pe(i)||e.push(i);return Me(n),e}function Me(n){const t=n.body;if(!t||typeof console>"u"||typeof console.warn!="function")return;const e=t.querySelectorAll("audio[data-start], video[data-start]");if(e.length===0)return;const i=[];for(const r of e)r.closest("[data-composition-id]")||i.push(r);i.length!==0&&console.warn(`[hyperframes-player] selectMediaObserverTargets: composition hosts are present, but ${i.length} body-level timed media element(s) sit outside every [data-composition-id] subtree and will not be observed. Move them inside a composition host or the parent-frame proxy will never adopt them.`,i)}function Pe(n){let t=n.parentElement;for(;t;){if(t.hasAttribute("data-composition-id"))return!0;t=t.parentElement}return!1}const Re=.05,Ie=2;class Oe{constructor(t){h(this,"_entries",[]);h(this,"_mediaObserver");h(this,"_playbackErrorPosted",!1);h(this,"_audioOwner","runtime");h(this,"_dispatchEvent");h(this,"_getMuted");h(this,"_getVolume");h(this,"_getPlaybackRate");h(this,"_getCurrentTime");h(this,"_isPaused");this._dispatchEvent=t.dispatchEvent,this._getMuted=t.getMuted,this._getVolume=t.getVolume,this._getPlaybackRate=t.getPlaybackRate,this._getCurrentTime=t.getCurrentTime,this._isPaused=t.isPaused}get audioOwner(){return this._audioOwner}get entries(){return this._entries}get playbackErrorPosted(){return this._playbackErrorPosted}resetForIframeLoad(){this._playbackErrorPosted=!1;const t=this._audioOwner==="parent";this._audioOwner="runtime",this.pauseAll(),this.teardownObserver(),t&&this._dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"runtime",reason:"iframe-reload"}}))}destroy(){this.teardownObserver();for(const t of this._entries)t.el.pause(),t.el.src="";this._entries=[]}updateMuted(t){for(const e of this._entries)e.el.muted=t}updateVolume(t){for(const e of this._entries)e.el.volume=t}updatePlaybackRate(t){for(const e of this._entries)e.el.playbackRate=t}playAll(){for(const t of this._entries)t.el.src&&t.el.play().catch(e=>this._reportPlaybackError(e))}pauseAll(){for(const t of this._entries)t.el.pause()}seekAll(t){for(const e of this._entries){const i=t-e.start;i>=0&&i<e.duration&&(e.el.currentTime=i)}}mirrorTime(t,e){const i=(e==null?void 0:e.force)===!0;for(const r of this._entries){const s=t-r.start;if(s<0||s>=r.duration){r.driftSamples=0;continue}Math.abs(r.el.currentTime-s)>Re?(r.driftSamples+=1,(i||r.driftSamples>=Ie)&&(r.el.currentTime=s,r.driftSamples=0)):r.driftSamples=0}}promoteToParentProxy(t,e){if(this._audioOwner==="parent")return;if(this._audioOwner="parent",t)for(const r of t.querySelectorAll("video, audio"))r.muted=!0;const i=this._getCurrentTime();e?e(i,{force:!0}):this.mirrorTime(i,{force:!0}),this._isPaused()||this.playAll(),this._dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}}))}setupFromIframe(t){const e=t.querySelectorAll("audio[data-start], video[data-start]");for(const i of e)this._adoptIframeMedia(i);this._observeDynamicMedia(t)}setupFromUrl(t){this._createEntry(t,"audio",0,1/0)}teardownObserver(){var t;(t=this._mediaObserver)==null||t.disconnect(),this._mediaObserver=void 0}_reportPlaybackError(t){this._playbackErrorPosted||(this._playbackErrorPosted=!0,this._dispatchEvent(new CustomEvent("playbackerror",{detail:{source:"parent-proxy",error:t}})))}_createEntry(t,e,i,r){if(this._entries.some(c=>c.el.src===t))return null;const s=e==="video"?document.createElement("video"):new Audio;s.preload="auto",s.src=t,s.load(),s.muted=this._getMuted(),s.volume=this._getVolume();const a=this._getPlaybackRate();a!==1&&(s.playbackRate=a);const d={el:s,start:i,duration:r,driftSamples:0};return this._entries.push(d),d}_adoptIframeMedia(t){var c;if(t.preload==="metadata"||t.preload==="none")return;const e=t.getAttribute("src")||((c=t.querySelector("source"))==null?void 0:c.getAttribute("src"));if(!e)return;const i=new URL(e,t.ownerDocument.baseURI).href,r=parseFloat(t.getAttribute("data-start")||"0"),s=parseFloat(t.getAttribute("data-duration")||"Infinity"),a=t.tagName==="VIDEO"?"video":"audio",d=this._createEntry(i,a,r,s);d&&this._audioOwner==="parent"&&(this.mirrorTime(this._getCurrentTime(),{force:!0}),!this._isPaused()&&d.el.src&&d.el.play().catch(m=>this._reportPlaybackError(m)))}_detachIframeMedia(t){var a;const e=t.getAttribute("src")||((a=t.querySelector("source"))==null?void 0:a.getAttribute("src"));if(!e)return;const i=new URL(e,t.ownerDocument.baseURI).href,r=this._entries.findIndex(d=>d.el.src===i);if(r===-1)return;const s=this._entries[r];s.el.pause(),s.el.src="",this._entries.splice(r,1)}_observeDynamicMedia(t){if(this.teardownObserver(),typeof MutationObserver>"u"||!t.body)return;const e=new MutationObserver(s=>{var a,d,c,m;for(const u of s){if(u.type==="attributes"&&u.attributeName==="preload"){const p=u.target;p instanceof HTMLMediaElement&&p.matches("audio[data-start], video[data-start]")&&p.preload==="auto"&&this._adoptIframeMedia(p);continue}for(const p of u.addedNodes){if(!(p instanceof Element))continue;const g=[];(a=p.matches)!=null&&a.call(p,"audio[data-start], video[data-start]")&&g.push(p);const f=(d=p.querySelectorAll)==null?void 0:d.call(p,"audio[data-start], video[data-start]");if(f)for(const b of f)g.push(b);for(const b of g)this._adoptIframeMedia(b)}for(const p of u.removedNodes){if(!(p instanceof Element))continue;const g=[];(c=p.matches)!=null&&c.call(p,"audio[data-start], video[data-start]")&&g.push(p);const f=(m=p.querySelectorAll)==null?void 0:m.call(p,"audio[data-start], video[data-start]");if(f)for(const b of f)g.push(b);for(const b of g)this._detachIframeMedia(b)}}}),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:["preload"]},r=Se(t);for(const s of r)e.observe(s,i);this._mediaObserver=e}}const De=100;function Ne(n,t,e,i){const r=(n.frame??0)/t,s=e.duration>0?Math.min(r,e.duration):r,a=!e.paused,d=!n.isPlaying,c=e.duration>0&&s>=e.duration&&(a||n.isPlaying);if(c&&i.getLoop())return i.media.audioOwner==="parent"&&i.media.pauseAll(),i.seek(0),i.play(),{...e,currentTime:s,paused:!1};const m={...e,currentTime:s,paused:d};i.media.audioOwner==="parent"&&(a&&d?i.media.pauseAll():!a&&!d&&i.media.playAll(),i.media.mirrorTime(s));const u=performance.now(),p=d!==e.paused;return(u-e.lastUpdateMs>De||p)&&(m.lastUpdateMs=u,i.updateControlsTime(s,e.duration),i.updateControlsPlaying(!d),i.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:s}}))),c&&(i.media.audioOwner==="parent"&&i.media.pauseAll(),m.paused=!0,i.updateControlsPlaying(!1),i.dispatchEvent(new Event("ended"))),m}const oe=30;function Fe(n,t,e){if(n.source!==t)return;const i=n.data;if(!(!i||i.source!=="hf-preview")){if(i.type==="shader-transition-state"){const r=i.state&&typeof i.state=="object"?i.state:{};e.shaderLoader.update(r,e.getShaderLoadingMode()),e.dispatchEvent(new CustomEvent("shadertransitionstate",{detail:{compositionId:i.compositionId,state:r}}));return}if(i.type==="state"){e.setPlaybackState(Ne({frame:i.frame??0,isPlaying:!!i.isPlaying},oe,e.getPlaybackState(),e));return}if(i.type==="media-autoplay-blocked"){let r=null;try{r=e.getIframeDoc()}catch{}e.media.promoteToParentProxy(r,(s,a)=>e.media.mirrorTime(s,a)),e.sendControl("set-media-output-muted",{muted:!0});return}if(i.type==="timeline"&&i.durationInFrames>0){if(Number.isFinite(i.durationInFrames)){const r=e.getPlaybackState(),s=i.durationInFrames/oe;e.setPlaybackState({...r,duration:s}),e.updateControlsTime(r.currentTime,s)}return}i.type==="stage-size"&&i.width>0&&i.height>0&&e.setCompositionSize(i.width,i.height)}}const k="shader-capture-scale",x="shader-loading",Ue="__hf_shader_capture_scale",He="__hf_shader_loading",O=["Preparing scene transitions","Sampling outgoing scene motion","Sampling incoming scene motion","Caching transition frames","Finalizing transition preview"];function V(n){if(n===null)return null;const t=Number(n);return!Number.isFinite(t)||t<=0?null:String(Math.min(1,Math.max(.25,t)))}function Ve(n){if(n===null||n.trim()==="")return"composition";const t=n.trim().toLowerCase();return t==="none"||t==="false"||t==="0"||t==="off"?"none":t==="player"||t==="true"||t==="1"||t==="on"?"player":"composition"}function ae(n,t,e){e===null?n.delete(t):n.set(t,e)}function $e(n,t,e){const i=n.indexOf("#"),r=i>=0?n.slice(0,i):n,s=i>=0?n.slice(i):"",a=r.indexOf("?"),d=a>=0?r.slice(0,a):r,c=a>=0?r.slice(a+1):"",m=new URLSearchParams(c);ae(m,Ue,t),ae(m,He,e==="composition"?null:e);const u=m.toString();return`${d}${u?`?${u}`:""}${s}`}function ze(n,t,e){if(t===null&&e==="composition")return n;const i=[];t!==null&&i.push(`window.__HF_SHADER_CAPTURE_SCALE=${JSON.stringify(t)};`),e!=="composition"&&i.push(`window.__HF_SHADER_LOADING=${JSON.stringify(e)};`);const r=`<script data-hyperframes-player-shader-options>${i.join("")}<\/script>`;return/<head\b[^>]*>/i.test(n)?n.replace(/<head\b[^>]*>/i,s=>`${s}${r}`):/<html\b[^>]*>/i.test(n)?n.replace(/<html\b[^>]*>/i,s=>`${s}${r}`):`${r}${n}`}function L(n){return Ve(n.getAttribute(x))}function je(n){return Number(V(n.getAttribute(k))??"1")}function F(n,t){return $e(t,V(n.getAttribute(k)),L(n))}function U(n,t){return ze(t,V(n.getAttribute(k)),L(n))}function qe(){const n=document.createElement("div");n.className="hfp-shader-loader",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-label","Preparing scene transitions"),n.setAttribute("data-hyperframes-ignore",""),n.draggable=!1;const t=f=>{f.preventDefault(),f.stopPropagation()};for(const f of["selectstart","dragstart","pointerdown","mousedown","click","dblclick","contextmenu","touchstart"])n.addEventListener(f,t,{capture:!0});const e=document.createElement("div");e.className="hfp-shader-loader-panel",e.draggable=!1;const i=document.createElement("div");i.className="hfp-shader-loader-mark",i.draggable=!1,i.innerHTML=['<svg width="78" height="78" viewBox="0 0 100 100" fill="none" aria-hidden="true" draggable="false">','<path d="M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z" fill="url(#hfp-shader-loader-grad-left)"/>','<path d="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z" fill="url(#hfp-shader-loader-grad-right)"/>',"<defs>",'<linearGradient id="hfp-shader-loader-grad-left" x1="48.5676" y1="25" x2="44.7804" y2="71.9384" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>",'<linearGradient id="hfp-shader-loader-grad-right" x1="54.8282" y1="73.8392" x2="72.0989" y2="32.8932" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>","</defs>","</svg>"].join("");const r=document.createElement("div");r.className="hfp-shader-loader-title";const s=document.createElement("span");s.className="hfp-shader-loader-title-text",s.textContent=O[0],r.appendChild(s);const a=document.createElement("div");a.className="hfp-shader-loader-detail",a.textContent="Rendering animated scene samples for shader transitions.";const d=document.createElement("div");d.className="hfp-shader-loader-track",d.setAttribute("aria-hidden","true");const c=document.createElement("div");c.className="hfp-shader-loader-fill",d.appendChild(c);const m=document.createElement("div");m.className="hfp-shader-loader-progress";const u=f=>{const b=document.createElement("div");b.className="hfp-shader-loader-row";const _=document.createElement("span");_.className="hfp-shader-loader-label",_.textContent=f;const y=document.createElement("span");return y.className="hfp-shader-loader-value",b.appendChild(_),b.appendChild(y),m.appendChild(b),{row:b,label:_,value:y}},p=u("transition"),g=u("transition frame");return e.appendChild(i),e.appendChild(r),e.appendChild(a),e.appendChild(d),e.appendChild(m),n.appendChild(e),{root:n,fill:c,title:s,detail:a,transitionValue:p.value,frameLabel:g.label,frameValue:g.value,frameRow:g.row}}const Be=420;class We{constructor(t){h(this,"_el");h(this,"_hideTimeout",null);this._el=t}show(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._el.root.classList.remove("hfp-hiding"),this._el.root.classList.add("hfp-visible")}hide(){if(this._el.root.classList.contains("hfp-hiding")){this._hideTimeout||this._scheduleCleanup();return}this._el.root.classList.contains("hfp-visible")&&(this._el.root.classList.add("hfp-hiding"),this._el.root.classList.remove("hfp-visible"),this._scheduleCleanup())}reset(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._el.root.classList.remove("hfp-visible","hfp-hiding"),this._el.fill.style.transform="scaleX(0)",this._el.transitionValue.textContent="",this._el.frameValue.textContent="",this._el.frameRow.style.visibility="hidden"}update(t,e){if(e!=="player"){this.reset();return}if(t.ready||!t.loading){this.hide();return}const i=typeof t.progress=="number"&&Number.isFinite(t.progress)?t.progress:0,r=typeof t.total=="number"&&Number.isFinite(t.total)?t.total:0,s=r>0?Math.min(1,Math.max(0,i/r)):0,a=Math.min(O.length-1,Math.floor(s*O.length));this._el.title.textContent=O[a]||"Preparing scene transitions",this._el.detail.textContent=t.phase==="cached"?"Loading cached transition frames before playback.":t.phase==="finalizing"?"Uploading transition textures for smooth playback.":"Rendering animated scene samples for shader transitions.",this._el.fill.style.transform=`scaleX(${s})`,this._el.transitionValue.textContent=t.currentTransition!==void 0&&t.transitionTotal!==void 0?`${t.currentTransition}/${t.transitionTotal}`:r>0?`${i}/${r}`:"";const d=t.transitionFrame!==void 0&&t.transitionFrames!==void 0?`${t.transitionFrame}/${t.transitionFrames}`:"";this._el.frameLabel.textContent=t.phase==="cached"?"cached transition frames":t.phase==="finalizing"?"finalizing transition frames":"rendering transition frames",this._el.frameValue.textContent=d,this._el.frameRow.style.visibility=d?"visible":"hidden",this._el.root.setAttribute("aria-valuenow",String(Math.round(s*100))),this.show()}get hideTimeout(){return this._hideTimeout}destroy(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null)}_scheduleCleanup(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(()=>{this._el.root.classList.remove("hfp-hiding"),this._hideTimeout=null},Be)}}const Xe=.1,Ge=5;function H(n){return!Number.isFinite(n)||n<=0?1:Math.max(Xe,Math.min(Ge,n))}class Ye extends HTMLElement{constructor(){super();h(this,"shadow");h(this,"container");h(this,"iframe");h(this,"posterEl",null);h(this,"controlsApi",null);h(this,"resizeObserver");h(this,"shaderLoader");h(this,"probe");h(this,"_ready",!1);h(this,"_currentTime",0);h(this,"_duration",0);h(this,"_paused",!0);h(this,"_lastUpdateMs",0);h(this,"_volume",1);h(this,"_compositionWidth",1920);h(this,"_compositionHeight",1080);h(this,"_directTimelineAdapter",null);h(this,"_directTimelineClock");h(this,"_parentTickRaf",null);h(this,"_media");this.shadow=this.attachShadow({mode:"open"}),Te(this.shadow,ge),{container:this.container,iframe:this.iframe}=ke(),this.shadow.appendChild(this.container);const e=qe();this.shadow.appendChild(e.root),this.shaderLoader=new We(e),this._media=new Oe({dispatchEvent:i=>this.dispatchEvent(i),getMuted:()=>this.muted,getVolume:()=>this._volume,getPlaybackRate:()=>this.playbackRate,getCurrentTime:()=>this._currentTime,isPaused:()=>this._paused}),this._directTimelineClock=new Le({onTimeUpdate:(i,r)=>{var s;this._currentTime=i,(s=this.controlsApi)==null||s.updateTime(i,r),this.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:i}}))},getLoop:()=>this.loop,restart:()=>{this.seek(0),this.play()},onPaused:()=>{var i;this._media.audioOwner==="parent"&&this._media.pauseAll(),this._paused=!0,(i=this.controlsApi)==null||i.updatePlaying(!1),this.dispatchEvent(new Event("ended"))},onEnded:()=>this.loop}),this.probe=new _e(this.iframe,{onReady:i=>this._onProbeReady(i),onError:i=>this.dispatchEvent(new CustomEvent("error",{detail:{message:i}}))}),this.addEventListener("click",i=>{Ee(i)||(this._paused?this.play():this.pause())}),this.resizeObserver=new ResizeObserver(()=>this._rescale()),this._onMessage=this._onMessage.bind(this),this._onIframeLoad=this._onIframeLoad.bind(this)}static get observedAttributes(){return["src","srcdoc","width","height","controls","muted","audio-locked","volume","poster","playback-rate","audio-src",k,x]}connectedCallback(){this.resizeObserver.observe(this),window.addEventListener("message",this._onMessage),this.iframe.addEventListener("load",this._onIframeLoad),this.hasAttribute("controls")&&this._setupControls(),this.hasAttribute("poster")&&(this.posterEl=se(this.shadow,this.getAttribute("poster"),this.posterEl)),this.hasAttribute("audio-src")&&this._media.setupFromUrl(this.getAttribute("audio-src")),this.hasAttribute("srcdoc")&&(this.iframe.srcdoc=U(this,this.getAttribute("srcdoc"))),this.hasAttribute("src")&&(this.iframe.src=F(this,this.getAttribute("src"))),!this.hasAttribute("audio-locked")&&this._isLockedHostEnvironment()&&this._applyAudioLock(!0)}disconnectedCallback(){var e;this.resizeObserver.disconnect(),window.removeEventListener("message",this._onMessage),this.iframe.removeEventListener("load",this._onIframeLoad),this.probe.stop(),this._directTimelineClock.stop(),this._stopParentTickClock(),this._directTimelineAdapter=null,this.shaderLoader.destroy(),this._media.destroy(),(e=this.controlsApi)==null||e.destroy()}attributeChangedCallback(e,i,r){var s,a,d,c,m;switch(e){case"src":r&&(this._ready=!1,this.iframe.src=F(this,r));break;case"srcdoc":this._ready=!1,r!==null?this.iframe.srcdoc=U(this,r):this.iframe.removeAttribute("srcdoc");break;case"width":this._compositionWidth=parseInt(r||"1920",10),this._rescale();break;case"height":this._compositionHeight=parseInt(r||"1080",10),this._rescale();break;case"controls":r!==null?this._setupControls():((s=this.controlsApi)==null||s.destroy(),this.controlsApi=null);break;case"poster":this.posterEl=se(this.shadow,r,this.posterEl);break;case"playback-rate":{const u=H(parseFloat(r||"1"));this._media.updatePlaybackRate(u),this._sendControl("set-playback-rate",{playbackRate:u}),(d=(a=this._directTimelineAdapter)==null?void 0:a.timeScale)==null||d.call(a,u),(c=this.controlsApi)==null||c.updateSpeed(u),this.dispatchEvent(new Event("ratechange"));break}case"muted":this._handleMutedChange(r);break;case"audio-locked":this._applyAudioLock(r!==null);break;case"volume":{const u=Math.max(0,Math.min(1,parseFloat(r||"1")));this._volume=u,this._media.updateVolume(u),this._sendControl("set-volume",{volume:u}),(m=this.controlsApi)==null||m.updateVolume(u),this.dispatchEvent(new Event("volumechange"));break}case"audio-src":r&&this._media.setupFromUrl(r);break;case k:case x:this._reloadShaderOptions();break}}get iframeElement(){return this.iframe}play(){var i,r;(i=this.posterEl)==null||i.remove(),this.posterEl=null,this._duration>0&&this._currentTime>=this._duration&&this.seek(0),this._paused=!1;const e=this._tryDirectTimelinePlay();e||(this._sendControl("play"),this._ready&&!this._directTimelineAdapter&&this._startParentTickClock()),this._media.audioOwner==="parent"&&this._media.playAll(),(r=this.controlsApi)==null||r.updatePlaying(!0),this.dispatchEvent(new Event("play")),e&&this._directTimelineAdapter&&this._directTimelineClock.start(this._directTimelineAdapter,()=>this._currentTime,()=>this._duration,()=>this._paused)}pause(){var e;this._tryDirectTimelinePause()||this._sendControl("pause"),this._directTimelineClock.stop(),this._stopParentTickClock(),this._media.audioOwner==="parent"&&this._media.pauseAll(),this._paused=!0,(e=this.controlsApi)==null||e.updatePlaying(!1),this.dispatchEvent(new Event("pause"))}seek(e){var i,r;!this._trySyncSeek(e)&&!this._tryDirectTimelineSeek(e)&&this._sendControl("seek",{frame:Math.round(e*30)}),this._directTimelineClock.stop(),this._stopParentTickClock(),this._currentTime=e,this._media.audioOwner==="parent"&&(this._media.pauseAll(),this._media.seekAll(e)),this._paused=!0,(i=this.controlsApi)==null||i.updatePlaying(!1),(r=this.controlsApi)==null||r.updateTime(this._currentTime,this._duration)}get currentTime(){return this._currentTime}set currentTime(e){this.seek(e)}get duration(){return this._duration}get paused(){return this._paused}get ready(){return this._ready}get playbackRate(){return H(parseFloat(this.getAttribute("playback-rate")||"1"))}set playbackRate(e){this.setAttribute("playback-rate",String(H(e)))}get shaderCaptureScale(){return je(this)}set shaderCaptureScale(e){this.setAttribute(k,String(e))}get shaderLoading(){return L(this)}set shaderLoading(e){e==="composition"?this.removeAttribute(x):this.setAttribute(x,e)}get muted(){return this.hasAttribute("muted")}set muted(e){e?this.setAttribute("muted",""):this.removeAttribute("muted")}get audioLocked(){return this.hasAttribute("audio-locked")}set audioLocked(e){e?this.setAttribute("audio-locked",""):this.removeAttribute("audio-locked")}_isLockedHostEnvironment(){if(typeof navigator>"u")return!1;const e=navigator.userAgent||"";return/\bClaude\/\d/.test(e)&&/\bElectron\b/.test(e)}_isAudioLocked(){return this.hasAttribute("audio-locked")||this._isLockedHostEnvironment()}_handleMutedChange(e){var i;if(e===null&&this._isAudioLocked()){this.setAttribute("muted","");return}this._media.updateMuted(e!==null),this._sendControl("set-muted",{muted:e!==null}),(i=this.controlsApi)==null||i.updateMuted(e!==null),this.dispatchEvent(new Event("volumechange"))}_applyAudioLock(e){var i;e&&(this.muted=!0),(i=this.controlsApi)==null||i.setVolumeControlsHidden(e)}get volume(){return this._volume}set volume(e){this.setAttribute("volume",String(Math.max(0,Math.min(1,e))))}get loop(){return this.hasAttribute("loop")}set loop(e){e?this.setAttribute("loop",""):this.removeAttribute("loop")}_sendControl(e,i={}){var r;try{(r=this.iframe.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...i},"*")}catch{}}_reloadShaderOptions(){if(L(this)!=="player"&&this.shaderLoader.reset(),this.hasAttribute("srcdoc")){this.iframe.srcdoc=U(this,this.getAttribute("srcdoc")||"");return}this.hasAttribute("src")&&(this.iframe.src=F(this,this.getAttribute("src")||""))}_trySyncSeek(e){try{const i=this.iframe.contentWindow,r=i==null?void 0:i.__player;return typeof(r==null?void 0:r.seek)!="function"?!1:(r.seek.call(r,e),!0)}catch{return!1}}_withDirectTimeline(e){const i=this._directTimelineAdapter||this.probe.resolveDirectTimelineAdapter();if(!i)return!1;try{return e(i),this._directTimelineAdapter=i,!0}catch{return!1}}_tryDirectTimelineSeek(e){return this._withDirectTimeline(i=>{i.seek(e),i.pause()})}_tryDirectTimelinePlay(){return this._withDirectTimeline(e=>void e.play())}_tryDirectTimelinePause(){return this._withDirectTimeline(e=>void e.pause())}_startParentTickClock(){this._stopParentTickClock();const e=()=>{if(this._paused){this._parentTickRaf=null;return}this._sendControl("tick"),this._parentTickRaf=requestAnimationFrame(e)};this._parentTickRaf=requestAnimationFrame(e)}_stopParentTickClock(){this._parentTickRaf!==null&&(cancelAnimationFrame(this._parentTickRaf),this._parentTickRaf=null)}_onMessage(e){Fe(e,this.iframe.contentWindow,{getPlaybackState:()=>({currentTime:this._currentTime,duration:this._duration,paused:this._paused,lastUpdateMs:this._lastUpdateMs}),setPlaybackState:({currentTime:i,duration:r,paused:s,lastUpdateMs:a})=>{this._currentTime=i,this._duration=r,this._paused=s,this._lastUpdateMs=a},getShaderLoadingMode:()=>L(this),shaderLoader:this.shaderLoader,setCompositionSize:(i,r)=>{this._compositionWidth=i,this._compositionHeight=r,this._rescale()},sendControl:(i,r)=>this._sendControl(i,r),getIframeDoc:()=>this.iframe.contentDocument,updateControlsTime:(i,r)=>{var s;return(s=this.controlsApi)==null?void 0:s.updateTime(i,r)},updateControlsPlaying:i=>{var r;return(r=this.controlsApi)==null?void 0:r.updatePlaying(i)},dispatchEvent:i=>this.dispatchEvent(i),seek:i=>this.seek(i),play:()=>this.play(),getLoop:()=>this.loop,media:this._media})}_onProbeReady({duration:e,adapter:i,compositionSize:r}){var s;this._duration=e,this._directTimelineAdapter=i.kind==="direct-timeline"?i.timeline:null,this._ready=!0,(s=this.controlsApi)==null||s.updateTime(0,e),this.dispatchEvent(new CustomEvent("ready",{detail:{duration:e}})),r&&(this._compositionWidth=r.width,this._compositionHeight=r.height,this._rescale());try{const a=this.iframe.contentDocument;a&&this._media.setupFromIframe(a)}catch{}this.hasAttribute("autoplay")&&this.play()}_rescale(){Ce(this,this.iframe,this._compositionWidth,this._compositionHeight)}_onIframeLoad(){this._directTimelineAdapter=null,this._directTimelineClock.stop(),this._stopParentTickClock(),this.shaderLoader.reset(),this._media.resetForIframeLoad(),this.probe.start()}_setupControls(){this.controlsApi||(this.controlsApi=Ae(this.shadow,this.muted,this._volume,this.getAttribute("speed-presets"),{onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:e=>this.seek(e*this._duration),onSpeedChange:e=>void(this.playbackRate=e),onMuteToggle:()=>void(this.muted=!this.muted),onVolumeChange:e=>void(this.volume=e)},this._isAudioLocked()))}get _audioOwner(){return this._media.audioOwner}get _parentMedia(){return this._media.entries}_mirrorParentMediaTime(e,i){this._media.mirrorTime(e,i)}_promoteToParentProxy(){let e=null;try{e=this.iframe.contentDocument}catch{}this._media.promoteToParentProxy(e,(i,r)=>this._mirrorParentMediaTime(i,r)),this._sendControl("set-media-output-muted",{muted:!0})}_observeDynamicMedia(e){this._media.setupFromIframe(e)}}customElements.get("hyperframes-player")||customElements.define("hyperframes-player",Ye);export{Ye as HyperframesPlayer,ye as SPEED_PRESETS,N as formatSpeed,ne as formatTime};
418
+ `,te='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><polygon points="4,2 16,9 4,16"/></svg>',be='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><rect x="3" y="2" width="4" height="14"/><rect x="11" y="2" width="4" height="14"/></svg>',ie='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/><path d="M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"/></svg>',re='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z"/></svg>',ve='<svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor"><path d="M3 9v6h4l5 5V4L7 9H3z"/><path d="M16.5 12c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02z" opacity="0.3"/><line x1="18" y1="7" x2="14" y2="17" stroke="currentColor" stroke-width="2"/></svg>',ye=[.25,.5,1,1.5,2,4];function N(n){return Number.isInteger(n)?`${n}x`:`${n}x`}function ne(n){if(!Number.isFinite(n)||n<0)return"0:00";const t=Math.floor(n),e=Math.floor(t/60),i=t%60;return`${e}:${i.toString().padStart(2,"0")}`}function we(n,t,e={}){const i=e.speedPresets??ye,r=document.createElement("div");r.className="hfp-controls",r.addEventListener("click",o=>{o.stopPropagation()});const s=document.createElement("button");s.className="hfp-play-btn",s.type="button",s.innerHTML=te,s.setAttribute("aria-label","Play");const a=document.createElement("div");a.className="hfp-scrubber";const d=document.createElement("div");d.className="hfp-progress",d.style.width="0%",a.appendChild(d);const c=document.createElement("span");c.className="hfp-time",c.textContent="0:00 / 0:00";const m=document.createElement("div");m.className="hfp-speed-wrap";const u=document.createElement("button");u.className="hfp-speed-btn",u.type="button",u.textContent="1x",u.setAttribute("aria-label","Playback speed");const p=document.createElement("div");p.className="hfp-speed-menu",p.setAttribute("role","menu");for(const o of i){const l=document.createElement("button");l.className="hfp-speed-option",l.type="button",l.setAttribute("role","menuitem"),l.dataset.speed=String(o),l.textContent=N(o),o===1&&l.classList.add("hfp-active"),p.appendChild(l)}m.appendChild(p),m.appendChild(u);const g=document.createElement("div");g.className="hfp-volume-wrap";const f=document.createElement("button");f.className="hfp-mute-btn",f.type="button",f.innerHTML=ie,f.setAttribute("aria-label","Mute");const b=document.createElement("div");b.className="hfp-volume-slider-wrap";const _=document.createElement("div");_.className="hfp-volume-slider",_.setAttribute("role","slider"),_.setAttribute("aria-label","Volume"),_.setAttribute("aria-valuemin","0"),_.setAttribute("aria-valuemax","100"),_.setAttribute("aria-valuenow","100"),_.tabIndex=0;const y=document.createElement("div");y.className="hfp-volume-fill",y.style.width="100%",_.appendChild(y),b.appendChild(_),g.appendChild(b),g.appendChild(f),e.audioLocked&&(g.style.display="none"),r.appendChild(s),r.appendChild(a),r.appendChild(c),r.appendChild(g),r.appendChild(m),n.appendChild(r);let S=!1,A=!1,w=1,k=null;i.indexOf(1);const M=(o,l)=>o?ve:l===0||l<.5?re:ie;s.addEventListener("click",o=>{o.stopPropagation(),S?t.onPause():t.onPlay()}),f.addEventListener("click",o=>{o.stopPropagation(),t.onMuteToggle()});let E=!1;const P=o=>{const l=_.getBoundingClientRect(),v=Math.max(0,Math.min(1,(o-l.left)/l.width));w=v,y.style.width=`${v*100}%`,_.setAttribute("aria-valuenow",String(Math.round(v*100))),A&&v>0&&t.onMuteToggle(),f.innerHTML=M(A,v),t.onVolumeChange(v)};_.addEventListener("mousedown",o=>{o.stopPropagation(),E=!0,P(o.clientX)});const $=o=>{E&&P(o.clientX)},z=()=>{E=!1};document.addEventListener("mousemove",$),document.addEventListener("mouseup",z),_.addEventListener("touchstart",o=>{E=!0;const l=o.touches[0];l&&P(l.clientX)},{passive:!0});const j=o=>{if(E){const l=o.touches[0];l&&P(l.clientX)}},B=()=>{E=!1};document.addEventListener("touchmove",j,{passive:!0}),document.addEventListener("touchend",B);const q=.05;_.addEventListener("keydown",o=>{let l=w;if(o.key==="ArrowRight"||o.key==="ArrowUp")l=Math.min(1,w+q);else if(o.key==="ArrowLeft"||o.key==="ArrowDown")l=Math.max(0,w-q);else return;o.preventDefault(),o.stopPropagation(),w=l,y.style.width=`${l*100}%`,_.setAttribute("aria-valuenow",String(Math.round(l*100))),A&&l>0&&t.onMuteToggle(),f.innerHTML=M(A,l),t.onVolumeChange(l)});const W=o=>{for(const l of p.querySelectorAll(".hfp-speed-option"))l.classList.toggle("hfp-active",l.dataset.speed===String(o))};u.addEventListener("click",o=>{o.stopPropagation();const l=p.classList.toggle("hfp-open");u.setAttribute("aria-expanded",String(l))}),p.addEventListener("click",o=>{o.stopPropagation();const l=o.target.closest(".hfp-speed-option");if(!l)return;const v=parseFloat(l.dataset.speed);i.indexOf(v),u.textContent=N(v),W(v),p.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false"),t.onSpeedChange(v)});const X=()=>{p.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false")};document.addEventListener("click",X);const R=o=>{const l=a.getBoundingClientRect(),v=Math.max(0,Math.min(1,(o-l.left)/l.width));t.onSeek(v)};let T=!1;a.addEventListener("mousedown",o=>{o.stopPropagation(),T=!0,R(o.clientX)});const G=o=>{T&&R(o.clientX)},Y=()=>{T=!1};document.addEventListener("mousemove",G),document.addEventListener("mouseup",Y),a.addEventListener("touchstart",o=>{T=!0;const l=o.touches[0];l&&R(l.clientX)},{passive:!0});const Q=o=>{if(T){const l=o.touches[0];l&&R(l.clientX)}},J=()=>{T=!1};document.addEventListener("touchmove",Q,{passive:!0}),document.addEventListener("touchend",J);const K=()=>{k&&clearTimeout(k),k=setTimeout(()=>{S&&r.classList.add("hfp-hidden")},3e3)},Z=n instanceof ShadowRoot?n.host:n;return Z.addEventListener("mousemove",()=>{r.classList.remove("hfp-hidden"),K()}),Z.addEventListener("mouseleave",()=>{S&&r.classList.add("hfp-hidden")}),{updateTime(o,l){const v=l>0?Math.min(o,l):o,de=l>0?v/l*100:0;d.style.width=`${de}%`,c.textContent=`${ne(v)} / ${ne(l)}`},updatePlaying(o){S=o,s.innerHTML=o?be:te,s.setAttribute("aria-label",o?"Pause":"Play"),o?K():r.classList.remove("hfp-hidden")},updateSpeed(o){i.indexOf(o),u.textContent=N(o),W(o)},updateMuted(o){A=o,f.innerHTML=M(o,w),f.setAttribute("aria-label",o?"Unmute":"Mute")},updateVolume(o){w=o,y.style.width=`${o*100}%`,_.setAttribute("aria-valuenow",String(Math.round(o*100))),f.innerHTML=M(A,o)},setVolumeControlsHidden(o){g.style.display=o?"none":""},show(){r.style.display=""},hide(){r.style.display="none"},destroy(){document.removeEventListener("mousemove",G),document.removeEventListener("mouseup",Y),document.removeEventListener("touchmove",Q),document.removeEventListener("touchend",J),document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",j),document.removeEventListener("touchend",B),document.removeEventListener("click",X),k&&clearTimeout(k)}}}function Ae(n,t,e,i,r,s=!1){const a=i?i.split(",").map(Number).filter(m=>!isNaN(m)&&m>0):void 0,d={...a?{speedPresets:a}:{},audioLocked:s},c=we(n,r,d);return c.updateMuted(t),c.updateVolume(e),c}function se(n,t,e){return t?(e||(e=document.createElement("img"),e.className="hfp-poster",n.appendChild(e)),e.src=t,e):(e==null||e.remove(),null)}function Ee(n){return n.composedPath().some(t=>t instanceof HTMLElement&&t.classList.contains("hfp-controls"))}let I=null;function Te(n,t){if(typeof CSSStyleSheet<"u")try{I||(I=new CSSStyleSheet,I.replaceSync(t)),n.adoptedStyleSheets=[I];return}catch{}const e=document.createElement("style");e.textContent=t,n.appendChild(e)}function Ce(){const n=document.createElement("div");n.className="hfp-container";const t=document.createElement("iframe");return t.className="hfp-iframe",t.sandbox.add("allow-scripts","allow-same-origin"),t.allow="autoplay; fullscreen",t.referrerPolicy="no-referrer",t.title="HyperFrames Composition",n.appendChild(t),{container:n,iframe:t}}function ke(n,t,e,i){const r=n.offsetWidth,s=n.offsetHeight;if(r===0||s===0)return;const a=Math.min(r/e,s/i);t.style.width=`${e}px`,t.style.height=`${i}px`,t.style.transform=`translate(-50%, -50%) scale(${a})`}const xe=100;class Le{constructor(t){h(this,"_raf",null);h(this,"_lastUpdateMs",0);this._callbacks=t}start(t,e,i,r){this.stop();const s=()=>{if(r()){this._raf=null;return}let a;try{a=t.time()}catch{this._raf=null;return}const d=i();d>0&&(a=Math.min(a,d));const c=d>0&&a>=d,m=performance.now();if((m-this._lastUpdateMs>xe||c)&&(this._lastUpdateMs=m,this._callbacks.onTimeUpdate(a,d)),c){if(this._callbacks.getLoop()){this._callbacks.restart();return}try{t.pause()}catch{}this._callbacks.onPaused(),this._raf=null;return}this._raf=requestAnimationFrame(s)};this._raf=requestAnimationFrame(s)}stop(){this._raf!==null&&(cancelAnimationFrame(this._raf),this._raf=null)}get isRunning(){return this._raf!==null}}function Se(n){const t=Array.from(n.querySelectorAll("[data-composition-id]"));if(t.length===0)return n.body?[n.body]:[];const e=[];for(const i of t)Pe(i)||e.push(i);return Me(n),e}function Me(n){const t=n.body;if(!t||typeof console>"u"||typeof console.warn!="function")return;const e=t.querySelectorAll("audio[data-start], video[data-start]");if(e.length===0)return;const i=[];for(const r of e)r.closest("[data-composition-id]")||i.push(r);i.length!==0&&console.warn(`[hyperframes-player] selectMediaObserverTargets: composition hosts are present, but ${i.length} body-level timed media element(s) sit outside every [data-composition-id] subtree and will not be observed. Move them inside a composition host or the parent-frame proxy will never adopt them.`,i)}function Pe(n){let t=n.parentElement;for(;t;){if(t.hasAttribute("data-composition-id"))return!0;t=t.parentElement}return!1}const Re=.05,Ie=2;class Oe{constructor(t){h(this,"_entries",[]);h(this,"_mediaObserver");h(this,"_playbackErrorPosted",!1);h(this,"_audioOwner","runtime");h(this,"_dispatchEvent");h(this,"_getMuted");h(this,"_getVolume");h(this,"_getPlaybackRate");h(this,"_getCurrentTime");h(this,"_isPaused");this._dispatchEvent=t.dispatchEvent,this._getMuted=t.getMuted,this._getVolume=t.getVolume,this._getPlaybackRate=t.getPlaybackRate,this._getCurrentTime=t.getCurrentTime,this._isPaused=t.isPaused}get audioOwner(){return this._audioOwner}get entries(){return this._entries}get playbackErrorPosted(){return this._playbackErrorPosted}resetForIframeLoad(){this._playbackErrorPosted=!1;const t=this._audioOwner==="parent";this._audioOwner="runtime",this.pauseAll(),this.teardownObserver(),t&&this._dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"runtime",reason:"iframe-reload"}}))}destroy(){this.teardownObserver();for(const t of this._entries)t.el.pause(),t.el.src="";this._entries=[]}updateMuted(t){for(const e of this._entries)e.el.muted=t}updateVolume(t){for(const e of this._entries)e.el.volume=t}updatePlaybackRate(t){for(const e of this._entries)e.el.playbackRate=t}playAll(){for(const t of this._entries)t.el.src&&t.el.play().catch(e=>this._reportPlaybackError(e))}pauseAll(){for(const t of this._entries)t.el.pause()}seekAll(t){for(const e of this._entries){const i=t-e.start;i>=0&&i<e.duration&&(e.el.currentTime=i)}}mirrorTime(t,e){const i=(e==null?void 0:e.force)===!0;for(const r of this._entries){const s=t-r.start;if(s<0||s>=r.duration){r.driftSamples=0;continue}Math.abs(r.el.currentTime-s)>Re?(r.driftSamples+=1,(i||r.driftSamples>=Ie)&&(r.el.currentTime=s,r.driftSamples=0)):r.driftSamples=0}}promoteToParentProxy(t,e){if(this._audioOwner==="parent")return;if(this._audioOwner="parent",t)for(const r of t.querySelectorAll("video, audio"))r.muted=!0;const i=this._getCurrentTime();e?e(i,{force:!0}):this.mirrorTime(i,{force:!0}),this._isPaused()||this.playAll(),this._dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}}))}setupFromIframe(t){const e=t.querySelectorAll("audio[data-start], video[data-start]");for(const i of e)this._adoptIframeMedia(i);this._observeDynamicMedia(t)}setupFromUrl(t){this._createEntry(t,"audio",0,1/0)}teardownObserver(){var t;(t=this._mediaObserver)==null||t.disconnect(),this._mediaObserver=void 0}_reportPlaybackError(t){this._playbackErrorPosted||(this._playbackErrorPosted=!0,this._dispatchEvent(new CustomEvent("playbackerror",{detail:{source:"parent-proxy",error:t}})))}_createEntry(t,e,i,r){if(this._entries.some(c=>c.el.src===t))return null;const s=e==="video"?document.createElement("video"):new Audio;s.preload="auto",s.src=t,s.load(),s.muted=this._getMuted(),s.volume=this._getVolume();const a=this._getPlaybackRate();a!==1&&(s.playbackRate=a);const d={el:s,start:i,duration:r,driftSamples:0};return this._entries.push(d),d}_adoptIframeMedia(t){var c;if(t.preload==="metadata"||t.preload==="none")return;const e=t.getAttribute("src")||((c=t.querySelector("source"))==null?void 0:c.getAttribute("src"));if(!e)return;const i=new URL(e,t.ownerDocument.baseURI).href,r=parseFloat(t.getAttribute("data-start")||"0"),s=parseFloat(t.getAttribute("data-duration")||"Infinity"),a=t.tagName==="VIDEO"?"video":"audio",d=this._createEntry(i,a,r,s);d&&this._audioOwner==="parent"&&(this.mirrorTime(this._getCurrentTime(),{force:!0}),!this._isPaused()&&d.el.src&&d.el.play().catch(m=>this._reportPlaybackError(m)))}_detachIframeMedia(t){var a;const e=t.getAttribute("src")||((a=t.querySelector("source"))==null?void 0:a.getAttribute("src"));if(!e)return;const i=new URL(e,t.ownerDocument.baseURI).href,r=this._entries.findIndex(d=>d.el.src===i);if(r===-1)return;const s=this._entries[r];s.el.pause(),s.el.src="",this._entries.splice(r,1)}_observeDynamicMedia(t){if(this.teardownObserver(),typeof MutationObserver>"u"||!t.body)return;const e=new MutationObserver(s=>{var a,d,c,m;for(const u of s){if(u.type==="attributes"&&u.attributeName==="preload"){const p=u.target;p instanceof HTMLMediaElement&&p.matches("audio[data-start], video[data-start]")&&p.preload==="auto"&&this._adoptIframeMedia(p);continue}for(const p of u.addedNodes){if(!(p instanceof Element))continue;const g=[];(a=p.matches)!=null&&a.call(p,"audio[data-start], video[data-start]")&&g.push(p);const f=(d=p.querySelectorAll)==null?void 0:d.call(p,"audio[data-start], video[data-start]");if(f)for(const b of f)g.push(b);for(const b of g)this._adoptIframeMedia(b)}for(const p of u.removedNodes){if(!(p instanceof Element))continue;const g=[];(c=p.matches)!=null&&c.call(p,"audio[data-start], video[data-start]")&&g.push(p);const f=(m=p.querySelectorAll)==null?void 0:m.call(p,"audio[data-start], video[data-start]");if(f)for(const b of f)g.push(b);for(const b of g)this._detachIframeMedia(b)}}}),i={childList:!0,subtree:!0,attributes:!0,attributeFilter:["preload"]},r=Se(t);for(const s of r)e.observe(s,i);this._mediaObserver=e}}const De=100;function Ne(n,t,e,i){const r=(n.frame??0)/t,s=e.duration>0?Math.min(r,e.duration):r,a=!e.paused,d=!n.isPlaying,c=e.duration>0&&s>=e.duration&&(a||n.isPlaying);if(c&&i.getLoop())return i.media.audioOwner==="parent"&&i.media.pauseAll(),i.seek(0),i.play(),{...e,currentTime:s,paused:!1};const m={...e,currentTime:s,paused:d};i.media.audioOwner==="parent"&&(a&&d?i.media.pauseAll():!a&&!d&&i.media.playAll(),i.media.mirrorTime(s));const u=performance.now(),p=d!==e.paused;return(u-e.lastUpdateMs>De||p)&&(m.lastUpdateMs=u,i.updateControlsTime(s,e.duration),i.updateControlsPlaying(!d),i.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:s}}))),c&&(i.media.audioOwner==="parent"&&i.media.pauseAll(),m.paused=!0,i.updateControlsPlaying(!1),i.dispatchEvent(new Event("ended"))),m}const oe=30;function Fe(n,t,e){if(n.source!==t)return;const i=n.data;if(!(!i||i.source!=="hf-preview")){if(i.type==="shader-transition-state"){const r=i.state&&typeof i.state=="object"?i.state:{};e.shaderLoader.update(r,e.getShaderLoadingMode()),e.dispatchEvent(new CustomEvent("shadertransitionstate",{detail:{compositionId:i.compositionId,state:r}}));return}if(i.type==="ready"){e.onRuntimeReady();return}if(i.type==="state"){e.setPlaybackState(Ne({frame:i.frame??0,isPlaying:!!i.isPlaying},oe,e.getPlaybackState(),e));return}if(i.type==="media-autoplay-blocked"){let r=null;try{r=e.getIframeDoc()}catch{}e.media.promoteToParentProxy(r,(s,a)=>e.media.mirrorTime(s,a)),e.sendControl("set-media-output-muted",{muted:!0});return}if(i.type==="timeline"&&i.durationInFrames>0){if(Number.isFinite(i.durationInFrames)){const r=e.getPlaybackState(),s=i.durationInFrames/oe;e.setPlaybackState({...r,duration:s}),e.updateControlsTime(r.currentTime,s)}return}i.type==="stage-size"&&i.width>0&&i.height>0&&e.setCompositionSize(i.width,i.height)}}const C="shader-capture-scale",x="shader-loading",Ue="__hf_shader_capture_scale",He="__hf_shader_loading",O=["Preparing scene transitions","Sampling outgoing scene motion","Sampling incoming scene motion","Caching transition frames","Finalizing transition preview"];function V(n){if(n===null)return null;const t=Number(n);return!Number.isFinite(t)||t<=0?null:String(Math.min(1,Math.max(.25,t)))}function Ve(n){if(n===null||n.trim()==="")return"composition";const t=n.trim().toLowerCase();return t==="none"||t==="false"||t==="0"||t==="off"?"none":t==="player"||t==="true"||t==="1"||t==="on"?"player":"composition"}function ae(n,t,e){e===null?n.delete(t):n.set(t,e)}function $e(n,t,e){const i=n.indexOf("#"),r=i>=0?n.slice(0,i):n,s=i>=0?n.slice(i):"",a=r.indexOf("?"),d=a>=0?r.slice(0,a):r,c=a>=0?r.slice(a+1):"",m=new URLSearchParams(c);ae(m,Ue,t),ae(m,He,e==="composition"?null:e);const u=m.toString();return`${d}${u?`?${u}`:""}${s}`}function ze(n,t,e){if(t===null&&e==="composition")return n;const i=[];t!==null&&i.push(`window.__HF_SHADER_CAPTURE_SCALE=${JSON.stringify(t)};`),e!=="composition"&&i.push(`window.__HF_SHADER_LOADING=${JSON.stringify(e)};`);const r=`<script data-hyperframes-player-shader-options>${i.join("")}<\/script>`;return/<head\b[^>]*>/i.test(n)?n.replace(/<head\b[^>]*>/i,s=>`${s}${r}`):/<html\b[^>]*>/i.test(n)?n.replace(/<html\b[^>]*>/i,s=>`${s}${r}`):`${r}${n}`}function L(n){return Ve(n.getAttribute(x))}function je(n){return Number(V(n.getAttribute(C))??"1")}function F(n,t){return $e(t,V(n.getAttribute(C)),L(n))}function U(n,t){return ze(t,V(n.getAttribute(C)),L(n))}function Be(){const n=document.createElement("div");n.className="hfp-shader-loader",n.setAttribute("role","status"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-label","Preparing scene transitions"),n.setAttribute("data-hyperframes-ignore",""),n.draggable=!1;const t=f=>{f.preventDefault(),f.stopPropagation()};for(const f of["selectstart","dragstart","pointerdown","mousedown","click","dblclick","contextmenu","touchstart"])n.addEventListener(f,t,{capture:!0});const e=document.createElement("div");e.className="hfp-shader-loader-panel",e.draggable=!1;const i=document.createElement("div");i.className="hfp-shader-loader-mark",i.draggable=!1,i.innerHTML=['<svg width="78" height="78" viewBox="0 0 100 100" fill="none" aria-hidden="true" draggable="false">','<path d="M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z" fill="url(#hfp-shader-loader-grad-left)"/>','<path d="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z" fill="url(#hfp-shader-loader-grad-right)"/>',"<defs>",'<linearGradient id="hfp-shader-loader-grad-left" x1="48.5676" y1="25" x2="44.7804" y2="71.9384" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>",'<linearGradient id="hfp-shader-loader-grad-right" x1="54.8282" y1="73.8392" x2="72.0989" y2="32.8932" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>","</defs>","</svg>"].join("");const r=document.createElement("div");r.className="hfp-shader-loader-title";const s=document.createElement("span");s.className="hfp-shader-loader-title-text",s.textContent=O[0],r.appendChild(s);const a=document.createElement("div");a.className="hfp-shader-loader-detail",a.textContent="Rendering animated scene samples for shader transitions.";const d=document.createElement("div");d.className="hfp-shader-loader-track",d.setAttribute("aria-hidden","true");const c=document.createElement("div");c.className="hfp-shader-loader-fill",d.appendChild(c);const m=document.createElement("div");m.className="hfp-shader-loader-progress";const u=f=>{const b=document.createElement("div");b.className="hfp-shader-loader-row";const _=document.createElement("span");_.className="hfp-shader-loader-label",_.textContent=f;const y=document.createElement("span");return y.className="hfp-shader-loader-value",b.appendChild(_),b.appendChild(y),m.appendChild(b),{row:b,label:_,value:y}},p=u("transition"),g=u("transition frame");return e.appendChild(i),e.appendChild(r),e.appendChild(a),e.appendChild(d),e.appendChild(m),n.appendChild(e),{root:n,fill:c,title:s,detail:a,transitionValue:p.value,frameLabel:g.label,frameValue:g.value,frameRow:g.row}}const qe=420;class We{constructor(t){h(this,"_el");h(this,"_hideTimeout",null);this._el=t}show(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._el.root.classList.remove("hfp-hiding"),this._el.root.classList.add("hfp-visible")}hide(){if(this._el.root.classList.contains("hfp-hiding")){this._hideTimeout||this._scheduleCleanup();return}this._el.root.classList.contains("hfp-visible")&&(this._el.root.classList.add("hfp-hiding"),this._el.root.classList.remove("hfp-visible"),this._scheduleCleanup())}reset(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null),this._el.root.classList.remove("hfp-visible","hfp-hiding"),this._el.fill.style.transform="scaleX(0)",this._el.transitionValue.textContent="",this._el.frameValue.textContent="",this._el.frameRow.style.visibility="hidden"}update(t,e){if(e!=="player"){this.reset();return}if(t.ready||!t.loading){this.hide();return}const i=typeof t.progress=="number"&&Number.isFinite(t.progress)?t.progress:0,r=typeof t.total=="number"&&Number.isFinite(t.total)?t.total:0,s=r>0?Math.min(1,Math.max(0,i/r)):0,a=Math.min(O.length-1,Math.floor(s*O.length));this._el.title.textContent=O[a]||"Preparing scene transitions",this._el.detail.textContent=t.phase==="cached"?"Loading cached transition frames before playback.":t.phase==="finalizing"?"Uploading transition textures for smooth playback.":"Rendering animated scene samples for shader transitions.",this._el.fill.style.transform=`scaleX(${s})`,this._el.transitionValue.textContent=t.currentTransition!==void 0&&t.transitionTotal!==void 0?`${t.currentTransition}/${t.transitionTotal}`:r>0?`${i}/${r}`:"";const d=t.transitionFrame!==void 0&&t.transitionFrames!==void 0?`${t.transitionFrame}/${t.transitionFrames}`:"";this._el.frameLabel.textContent=t.phase==="cached"?"cached transition frames":t.phase==="finalizing"?"finalizing transition frames":"rendering transition frames",this._el.frameValue.textContent=d,this._el.frameRow.style.visibility=d?"visible":"hidden",this._el.root.setAttribute("aria-valuenow",String(Math.round(s*100))),this.show()}get hideTimeout(){return this._hideTimeout}destroy(){this._hideTimeout&&(clearTimeout(this._hideTimeout),this._hideTimeout=null)}_scheduleCleanup(){this._hideTimeout&&clearTimeout(this._hideTimeout),this._hideTimeout=setTimeout(()=>{this._el.root.classList.remove("hfp-hiding"),this._hideTimeout=null},qe)}}const Xe=.1,Ge=5;function H(n){return!Number.isFinite(n)||n<=0?1:Math.max(Xe,Math.min(Ge,n))}class Ye extends HTMLElement{constructor(){super();h(this,"shadow");h(this,"container");h(this,"iframe");h(this,"posterEl",null);h(this,"controlsApi",null);h(this,"resizeObserver");h(this,"shaderLoader");h(this,"probe");h(this,"_ready",!1);h(this,"_currentTime",0);h(this,"_duration",0);h(this,"_paused",!0);h(this,"_lastUpdateMs",0);h(this,"_volume",1);h(this,"_compositionWidth",1920);h(this,"_compositionHeight",1080);h(this,"_directTimelineAdapter",null);h(this,"_directTimelineClock");h(this,"_parentTickRaf",null);h(this,"_media");this.shadow=this.attachShadow({mode:"open"}),Te(this.shadow,ge),{container:this.container,iframe:this.iframe}=Ce(),this.shadow.appendChild(this.container);const e=Be();this.shadow.appendChild(e.root),this.shaderLoader=new We(e),this._media=new Oe({dispatchEvent:i=>this.dispatchEvent(i),getMuted:()=>this.muted,getVolume:()=>this._volume,getPlaybackRate:()=>this.playbackRate,getCurrentTime:()=>this._currentTime,isPaused:()=>this._paused}),this._directTimelineClock=new Le({onTimeUpdate:(i,r)=>{var s;this._currentTime=i,(s=this.controlsApi)==null||s.updateTime(i,r),this.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:i}}))},getLoop:()=>this.loop,restart:()=>{this.seek(0),this.play()},onPaused:()=>{var i;this._media.audioOwner==="parent"&&this._media.pauseAll(),this._paused=!0,(i=this.controlsApi)==null||i.updatePlaying(!1),this.dispatchEvent(new Event("ended"))},onEnded:()=>this.loop}),this.probe=new _e(this.iframe,{onReady:i=>this._onProbeReady(i),onError:i=>this.dispatchEvent(new CustomEvent("error",{detail:{message:i}}))}),this.addEventListener("click",i=>{Ee(i)||(this._paused?this.play():this.pause())}),this.resizeObserver=new ResizeObserver(()=>this._rescale()),this._onMessage=this._onMessage.bind(this),this._onIframeLoad=this._onIframeLoad.bind(this)}static get observedAttributes(){return["src","srcdoc","width","height","controls","muted","audio-locked","volume","poster","playback-rate","audio-src",C,x]}connectedCallback(){this.resizeObserver.observe(this),window.addEventListener("message",this._onMessage),this.iframe.addEventListener("load",this._onIframeLoad),this.hasAttribute("controls")&&this._setupControls(),this.hasAttribute("poster")&&(this.posterEl=se(this.shadow,this.getAttribute("poster"),this.posterEl)),this.hasAttribute("audio-src")&&this._media.setupFromUrl(this.getAttribute("audio-src")),this.hasAttribute("srcdoc")&&(this.iframe.srcdoc=U(this,this.getAttribute("srcdoc"))),this.hasAttribute("src")&&(this.iframe.src=F(this,this.getAttribute("src"))),!this.hasAttribute("audio-locked")&&this._isLockedHostEnvironment()&&this._applyAudioLock(!0)}disconnectedCallback(){var e;this.resizeObserver.disconnect(),window.removeEventListener("message",this._onMessage),this.iframe.removeEventListener("load",this._onIframeLoad),this.probe.stop(),this._directTimelineClock.stop(),this._stopParentTickClock(),this._directTimelineAdapter=null,this.shaderLoader.destroy(),this._media.destroy(),(e=this.controlsApi)==null||e.destroy()}attributeChangedCallback(e,i,r){var s,a,d,c,m;switch(e){case"src":r&&(this._ready=!1,this.iframe.src=F(this,r));break;case"srcdoc":this._ready=!1,r!==null?this.iframe.srcdoc=U(this,r):this.iframe.removeAttribute("srcdoc");break;case"width":this._compositionWidth=parseInt(r||"1920",10),this._rescale();break;case"height":this._compositionHeight=parseInt(r||"1080",10),this._rescale();break;case"controls":r!==null?this._setupControls():((s=this.controlsApi)==null||s.destroy(),this.controlsApi=null);break;case"poster":this.posterEl=se(this.shadow,r,this.posterEl);break;case"playback-rate":{const u=H(parseFloat(r||"1"));this._media.updatePlaybackRate(u),this._sendControl("set-playback-rate",{playbackRate:u}),(d=(a=this._directTimelineAdapter)==null?void 0:a.timeScale)==null||d.call(a,u),(c=this.controlsApi)==null||c.updateSpeed(u),this.dispatchEvent(new Event("ratechange"));break}case"muted":this._handleMutedChange(r);break;case"audio-locked":this._applyAudioLock(r!==null);break;case"volume":{const u=Math.max(0,Math.min(1,parseFloat(r||"1")));this._volume=u,this._media.updateVolume(u),this._sendControl("set-volume",{volume:u}),(m=this.controlsApi)==null||m.updateVolume(u),this.dispatchEvent(new Event("volumechange"));break}case"audio-src":r&&this._media.setupFromUrl(r);break;case C:case x:this._reloadShaderOptions();break}}get iframeElement(){return this.iframe}play(){var i,r;(i=this.posterEl)==null||i.remove(),this.posterEl=null,this._duration>0&&this._currentTime>=this._duration&&this.seek(0),this._paused=!1;const e=this._tryDirectTimelinePlay();e||(this._sendControl("play"),this._ready&&!this._directTimelineAdapter&&this._startParentTickClock()),this._media.audioOwner==="parent"&&this._media.playAll(),(r=this.controlsApi)==null||r.updatePlaying(!0),this.dispatchEvent(new Event("play")),e&&this._directTimelineAdapter&&this._directTimelineClock.start(this._directTimelineAdapter,()=>this._currentTime,()=>this._duration,()=>this._paused)}pause(){var e;this._tryDirectTimelinePause()||this._sendControl("pause"),this._directTimelineClock.stop(),this._stopParentTickClock(),this._media.audioOwner==="parent"&&this._media.pauseAll(),this._paused=!0,(e=this.controlsApi)==null||e.updatePlaying(!1),this.dispatchEvent(new Event("pause"))}seek(e){var i,r;!this._trySyncSeek(e)&&!this._tryDirectTimelineSeek(e)&&this._sendControl("seek",{frame:Math.round(e*30)}),this._directTimelineClock.stop(),this._stopParentTickClock(),this._currentTime=e,this._media.audioOwner==="parent"&&(this._media.pauseAll(),this._media.seekAll(e)),this._paused=!0,(i=this.controlsApi)==null||i.updatePlaying(!1),(r=this.controlsApi)==null||r.updateTime(this._currentTime,this._duration)}get currentTime(){return this._currentTime}set currentTime(e){this.seek(e)}get duration(){return this._duration}get paused(){return this._paused}get ready(){return this._ready}get playbackRate(){return H(parseFloat(this.getAttribute("playback-rate")||"1"))}set playbackRate(e){this.setAttribute("playback-rate",String(H(e)))}get shaderCaptureScale(){return je(this)}set shaderCaptureScale(e){this.setAttribute(C,String(e))}get shaderLoading(){return L(this)}set shaderLoading(e){e==="composition"?this.removeAttribute(x):this.setAttribute(x,e)}get muted(){return this.hasAttribute("muted")}set muted(e){e?this.setAttribute("muted",""):this.removeAttribute("muted")}get audioLocked(){return this.hasAttribute("audio-locked")}set audioLocked(e){e?this.setAttribute("audio-locked",""):this.removeAttribute("audio-locked")}_isLockedHostEnvironment(){if(typeof navigator>"u")return!1;const e=navigator.userAgent||"";return/\bClaude\/\d/.test(e)&&/\bElectron\b/.test(e)}_isAudioLocked(){return this.hasAttribute("audio-locked")||this._isLockedHostEnvironment()}_handleMutedChange(e){var i;if(e===null&&this._isAudioLocked()){this.setAttribute("muted","");return}this._media.updateMuted(e!==null),this._sendControl("set-muted",{muted:e!==null}),(i=this.controlsApi)==null||i.updateMuted(e!==null),this.dispatchEvent(new Event("volumechange"))}_applyAudioLock(e){var i;e&&(this.muted=!0),(i=this.controlsApi)==null||i.setVolumeControlsHidden(e)}get volume(){return this._volume}set volume(e){this.setAttribute("volume",String(Math.max(0,Math.min(1,e))))}get loop(){return this.hasAttribute("loop")}set loop(e){e?this.setAttribute("loop",""):this.removeAttribute("loop")}_sendControl(e,i={}){var r;try{(r=this.iframe.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...i},"*")}catch{}}_replayBridgeState(){this._sendControl("set-muted",{muted:this.muted}),this._sendControl("set-volume",{volume:this._volume}),this._sendControl("set-playback-rate",{playbackRate:this.playbackRate})}_reloadShaderOptions(){if(L(this)!=="player"&&this.shaderLoader.reset(),this.hasAttribute("srcdoc")){this.iframe.srcdoc=U(this,this.getAttribute("srcdoc")||"");return}this.hasAttribute("src")&&(this.iframe.src=F(this,this.getAttribute("src")||""))}_trySyncSeek(e){try{const i=this.iframe.contentWindow,r=i==null?void 0:i.__player;return typeof(r==null?void 0:r.seek)!="function"?!1:(r.seek.call(r,e),!0)}catch{return!1}}_withDirectTimeline(e){const i=this._directTimelineAdapter||this.probe.resolveDirectTimelineAdapter();if(!i)return!1;try{return e(i),this._directTimelineAdapter=i,!0}catch{return!1}}_tryDirectTimelineSeek(e){return this._withDirectTimeline(i=>{i.seek(e),i.pause()})}_tryDirectTimelinePlay(){return this._withDirectTimeline(e=>void e.play())}_tryDirectTimelinePause(){return this._withDirectTimeline(e=>void e.pause())}_startParentTickClock(){this._stopParentTickClock();const e=()=>{if(this._paused){this._parentTickRaf=null;return}this._sendControl("tick"),this._parentTickRaf=requestAnimationFrame(e)};this._parentTickRaf=requestAnimationFrame(e)}_stopParentTickClock(){this._parentTickRaf!==null&&(cancelAnimationFrame(this._parentTickRaf),this._parentTickRaf=null)}_onMessage(e){Fe(e,this.iframe.contentWindow,{getPlaybackState:()=>({currentTime:this._currentTime,duration:this._duration,paused:this._paused,lastUpdateMs:this._lastUpdateMs}),setPlaybackState:({currentTime:i,duration:r,paused:s,lastUpdateMs:a})=>{this._currentTime=i,this._duration=r,this._paused=s,this._lastUpdateMs=a},getShaderLoadingMode:()=>L(this),shaderLoader:this.shaderLoader,setCompositionSize:(i,r)=>{this._compositionWidth=i,this._compositionHeight=r,this._rescale()},sendControl:(i,r)=>this._sendControl(i,r),getIframeDoc:()=>this.iframe.contentDocument,onRuntimeReady:()=>this._replayBridgeState(),updateControlsTime:(i,r)=>{var s;return(s=this.controlsApi)==null?void 0:s.updateTime(i,r)},updateControlsPlaying:i=>{var r;return(r=this.controlsApi)==null?void 0:r.updatePlaying(i)},dispatchEvent:i=>this.dispatchEvent(i),seek:i=>this.seek(i),play:()=>this.play(),getLoop:()=>this.loop,media:this._media})}_onProbeReady({duration:e,adapter:i,compositionSize:r}){var s;this._duration=e,this._directTimelineAdapter=i.kind==="direct-timeline"?i.timeline:null,this._ready=!0,(s=this.controlsApi)==null||s.updateTime(0,e),this.dispatchEvent(new CustomEvent("ready",{detail:{duration:e}})),r&&(this._compositionWidth=r.width,this._compositionHeight=r.height,this._rescale());try{const a=this.iframe.contentDocument;a&&this._media.setupFromIframe(a)}catch{}this.hasAttribute("autoplay")&&this.play()}_rescale(){ke(this,this.iframe,this._compositionWidth,this._compositionHeight)}_onIframeLoad(){this._directTimelineAdapter=null,this._directTimelineClock.stop(),this._stopParentTickClock(),this.shaderLoader.reset(),this._media.resetForIframeLoad(),this.probe.start()}_setupControls(){this.controlsApi||(this.controlsApi=Ae(this.shadow,this.muted,this._volume,this.getAttribute("speed-presets"),{onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:e=>this.seek(e*this._duration),onSpeedChange:e=>void(this.playbackRate=e),onMuteToggle:()=>void(this.muted=!this.muted),onVolumeChange:e=>void(this.volume=e)},this._isAudioLocked()))}get _audioOwner(){return this._media.audioOwner}get _parentMedia(){return this._media.entries}_mirrorParentMediaTime(e,i){this._media.mirrorTime(e,i)}_promoteToParentProxy(){let e=null;try{e=this.iframe.contentDocument}catch{}this._media.promoteToParentProxy(e,(i,r)=>this._mirrorParentMediaTime(i,r)),this._sendControl("set-media-output-muted",{muted:!0})}_observeDynamicMedia(e){this._media.setupFromIframe(e)}}customElements.get("hyperframes-player")||customElements.define("hyperframes-player",Ye);export{Ye as HyperframesPlayer,ye as SPEED_PRESETS,N as formatSpeed,ne as formatTime};
@@ -46,7 +46,7 @@ var aT=Object.defineProperty;var lT=(t,e,n)=>e in t?aT(t,e,{enumerable:!0,config
46
46
  `+W[p].replace(" at new "," at ");return a.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",a.displayName)),de}while(1<=p&&0<=b);break}}}finally{Ae=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?Se(f):""}function Ve(a,o){switch(a.tag){case 26:case 27:case 5:return Se(a.type);case 16:return Se("Lazy");case 13:return a.child!==o&&o!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return Me(a.type,!1);case 11:return Me(a.type.render,!1);case 1:return Me(a.type,!0);case 31:return Se("Activity");default:return""}}function Pe(a){try{var o="",f=null;do o+=Ve(a,f),f=a,a=a.return;while(a);return o}catch(p){return`
47
47
  Error generating stack: `+p.message+`
48
48
  `+p.stack}}var ft=Object.prototype.hasOwnProperty,yt=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,Ye=t.unstable_shouldYield,_e=t.unstable_requestPaint,be=t.unstable_now,dt=t.unstable_getCurrentPriorityLevel,Ue=t.unstable_ImmediatePriority,bt=t.unstable_UserBlockingPriority,Re=t.unstable_NormalPriority,on=t.unstable_LowPriority,Rt=t.unstable_IdlePriority,we=t.log,ht=t.unstable_setDisableYieldValue,Mt=null,ot=null;function ve(a){if(typeof we=="function"&&ht(a),ot&&typeof ot.setStrictMode=="function")try{ot.setStrictMode(Mt,a)}catch{}}var ze=Math.clz32?Math.clz32:vt,Ze=Math.log,Be=Math.LN2;function vt(a){return a>>>=0,a===0?32:31-(Ze(a)/Be|0)|0}var lt=256,Je=262144,mt=4194304;function Tt(a){var o=a&42;if(o!==0)return o;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function cn(a,o,f){var p=a.pendingLanes;if(p===0)return 0;var b=0,S=a.suspendedLanes,Q=a.pingedLanes;a=a.warmLanes;var _=p&134217727;return _!==0?(p=_&~S,p!==0?b=Tt(p):(Q&=_,Q!==0?b=Tt(Q):f||(f=_&~a,f!==0&&(b=Tt(f))))):(_=p&~S,_!==0?b=Tt(_):Q!==0?b=Tt(Q):f||(f=p&~a,f!==0&&(b=Tt(f)))),b===0?0:o!==0&&o!==b&&(o&S)===0&&(S=b&-b,f=o&-o,S>=f||S===32&&(f&4194048)!==0)?o:b}function Bn(a,o){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&o)===0}function bl(a,o){switch(a){case 1:case 2:case 4:case 8:case 64:return o+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Sa(){var a=mt;return mt<<=1,(mt&62914560)===0&&(mt=4194304),a}function Zi(a){for(var o=[],f=0;31>f;f++)o.push(a);return o}function En(a,o){a.pendingLanes|=o,o!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function di(a,o,f,p,b,S){var Q=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var _=a.entanglements,W=a.expirationTimes,se=a.hiddenUpdates;for(f=Q&~f;0<f;){var de=31-ze(f),pe=1<<de;_[de]=0,W[de]=-1;var oe=se[de];if(oe!==null)for(se[de]=null,de=0;de<oe.length;de++){var ce=oe[de];ce!==null&&(ce.lane&=-536870913)}f&=~pe}p!==0&&wa(a,p,0),S!==0&&b===0&&a.tag!==0&&(a.suspendedLanes|=S&~(Q&~o))}function wa(a,o,f){a.pendingLanes|=o,a.suspendedLanes&=~o;var p=31-ze(o);a.entangledLanes|=o,a.entanglements[p]=a.entanglements[p]|1073741824|f&261930}function ka(a,o){var f=a.entangledLanes|=o;for(a=a.entanglements;f;){var p=31-ze(f),b=1<<p;b&o|a[p]&o&&(a[p]|=o),f&=~b}}function Ce(a,o){var f=o&-o;return f=(f&42)!==0?1:rt(f),(f&(a.suspendedLanes|o))!==0?0:f}function rt(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function bn(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function mr(){var a=q.p;return a!==0?a:(a=window.event,a===void 0?32:v5(a.type))}function vl(a,o){var f=q.p;try{return q.p=a,o()}finally{q.p=f}}var jr=Math.random().toString(36).slice(2),tn="__reactFiber$"+jr,vn="__reactProps$"+jr,Ur="__reactContainer$"+jr,Aa="__reactEvents$"+jr,Ni="__reactListeners$"+jr,xe="__reactHandles$"+jr,Fe="__reactResources$"+jr,ct="__reactMarker$"+jr;function zt(a){delete a[tn],delete a[vn],delete a[Aa],delete a[Ni],delete a[xe]}function Tn(a){var o=a[tn];if(o)return o;for(var f=a.parentNode;f;){if(o=f[Ur]||f[tn]){if(f=o.alternate,o.child!==null||f!==null&&f.child!==null)for(a=a5(a);a!==null;){if(f=a[tn])return f;a=a5(a)}return o}a=f,f=a.parentNode}return null}function Pr(a){if(a=a[tn]||a[Ur]){var o=a.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return a}return null}function Kn(a){var o=a.tag;if(o===5||o===26||o===27||o===6)return a.stateNode;throw Error(r(33))}function Ma(a){var o=a[Fe];return o||(o=a[Fe]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function un(a){a[ct]=!0}var r0=new Set,i0={};function Ri(a,o){Ca(a,o),Ca(a+"Capture",o)}function Ca(a,o){for(i0[a]=o,a=0;a<o.length;a++)r0.add(o[a])}var Ud=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),a0={},l0={};function Wd(a){return ft.call(l0,a)?!0:ft.call(a0,a)?!1:Ud.test(a)?l0[a]=!0:(a0[a]=!0,!1)}function Ea(a,o,f){if(Wd(o))if(f===null)a.removeAttribute(o);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){a.removeAttribute(o);return}}a.setAttribute(o,""+f)}}function pt(a,o,f){if(f===null)a.removeAttribute(o);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(o);return}a.setAttribute(o,""+f)}}function $t(a,o,f,p){if(p===null)a.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(o,f,""+p)}}function _t(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Jn(a){var o=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Wr(a,o,f){var p=Object.getOwnPropertyDescriptor(a.constructor.prototype,o);if(!a.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var b=p.get,S=p.set;return Object.defineProperty(a,o,{configurable:!0,get:function(){return b.call(this)},set:function(Q){f=""+Q,S.call(this,Q)}}),Object.defineProperty(a,o,{enumerable:p.enumerable}),{getValue:function(){return f},setValue:function(Q){f=""+Q},stopTracking:function(){a._valueTracker=null,delete a[o]}}}}function Kr(a){if(!a._valueTracker){var o=Jn(a)?"checked":"value";a._valueTracker=Wr(a,o,""+a[o])}}function F6(a){if(!a)return!1;var o=a._valueTracker;if(!o)return!0;var f=o.getValue(),p="";return a&&(p=Jn(a)?a.checked?"true":"false":a.value),a=p,a!==f?(o.setValue(a),!0):!1}function s0(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var JM=/[\n"\\]/g;function Qr(a){return a.replace(JM,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Kd(a,o,f,p,b,S,Q,_){a.name="",Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"?a.type=Q:a.removeAttribute("type"),o!=null?Q==="number"?(o===0&&a.value===""||a.value!=o)&&(a.value=""+_t(o)):a.value!==""+_t(o)&&(a.value=""+_t(o)):Q!=="submit"&&Q!=="reset"||a.removeAttribute("value"),o!=null?Jd(a,Q,_t(o)):f!=null?Jd(a,Q,_t(f)):p!=null&&a.removeAttribute("value"),b==null&&S!=null&&(a.defaultChecked=!!S),b!=null&&(a.checked=b&&typeof b!="function"&&typeof b!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?a.name=""+_t(_):a.removeAttribute("name")}function B6(a,o,f,p,b,S,Q,_){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(a.type=S),o!=null||f!=null){if(!(S!=="submit"&&S!=="reset"||o!=null)){Kr(a);return}f=f!=null?""+_t(f):"",o=o!=null?""+_t(o):f,_||o===a.value||(a.value=o),a.defaultValue=o}p=p??b,p=typeof p!="function"&&typeof p!="symbol"&&!!p,a.checked=_?a.checked:!!p,a.defaultChecked=!!p,Q!=null&&typeof Q!="function"&&typeof Q!="symbol"&&typeof Q!="boolean"&&(a.name=Q),Kr(a)}function Jd(a,o,f){o==="number"&&s0(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function ls(a,o,f,p){if(a=a.options,o){o={};for(var b=0;b<f.length;b++)o["$"+f[b]]=!0;for(f=0;f<a.length;f++)b=o.hasOwnProperty("$"+a[f].value),a[f].selected!==b&&(a[f].selected=b),b&&p&&(a[f].defaultSelected=!0)}else{for(f=""+_t(f),o=null,b=0;b<a.length;b++){if(a[b].value===f){a[b].selected=!0,p&&(a[b].defaultSelected=!0);return}o!==null||a[b].disabled||(o=a[b])}o!==null&&(o.selected=!0)}}function Y6(a,o,f){if(o!=null&&(o=""+_t(o),o!==a.value&&(a.value=o),f==null)){a.defaultValue!==o&&(a.defaultValue=o);return}a.defaultValue=f!=null?""+_t(f):""}function I6(a,o,f,p){if(o==null){if(p!=null){if(f!=null)throw Error(r(92));if(K(p)){if(1<p.length)throw Error(r(93));p=p[0]}f=p}f==null&&(f=""),o=f}f=_t(o),a.defaultValue=f,p=a.textContent,p===f&&p!==""&&p!==null&&(a.value=p),Kr(a)}function ss(a,o){if(o){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=o;return}}a.textContent=o}var eC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function q6(a,o,f){var p=o.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?a.setProperty(o,""):o==="float"?a.cssFloat="":a[o]="":p?a.setProperty(o,f):typeof f!="number"||f===0||eC.has(o)?o==="float"?a.cssFloat=f:a[o]=(""+f).trim():a[o]=f+"px"}function G6(a,o,f){if(o!=null&&typeof o!="object")throw Error(r(62));if(a=a.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?a.setProperty(p,""):p==="float"?a.cssFloat="":a[p]="");for(var b in o)p=o[b],o.hasOwnProperty(b)&&f[b]!==p&&q6(a,b,p)}else for(var S in o)o.hasOwnProperty(S)&&q6(a,S,o[S])}function eh(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var tC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),nC=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function o0(a){return nC.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Vi(){}var th=null;function nh(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var os=null,cs=null;function U6(a){var o=Pr(a);if(o&&(a=o.stateNode)){var f=a[vn]||null;e:switch(a=o.stateNode,o.type){case"input":if(Kd(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),o=f.name,f.type==="radio"&&o!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Qr(""+o)+'"][type="radio"]'),o=0;o<f.length;o++){var p=f[o];if(p!==a&&p.form===a.form){var b=p[vn]||null;if(!b)throw Error(r(90));Kd(p,b.value,b.defaultValue,b.defaultValue,b.checked,b.defaultChecked,b.type,b.name)}}for(o=0;o<f.length;o++)p=f[o],p.form===a.form&&F6(p)}break e;case"textarea":Y6(a,f.value,f.defaultValue);break e;case"select":o=f.value,o!=null&&ls(a,!!f.multiple,o,!1)}}}var rh=!1;function W6(a,o,f){if(rh)return a(o,f);rh=!0;try{var p=a(o);return p}finally{if(rh=!1,(os!==null||cs!==null)&&(G0(),os&&(o=os,a=cs,cs=os=null,U6(o),a)))for(o=0;o<a.length;o++)U6(a[o])}}function Xo(a,o){var f=a.stateNode;if(f===null)return null;var p=f[vn]||null;if(p===null)return null;f=p[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(a=a.type,p=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!p;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(r(231,o,typeof f));return f}var Li=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ih=!1;if(Li)try{var zo={};Object.defineProperty(zo,"passive",{get:function(){ih=!0}}),window.addEventListener("test",zo,zo),window.removeEventListener("test",zo,zo)}catch{ih=!1}var Ta=null,ah=null,c0=null;function K6(){if(c0)return c0;var a,o=ah,f=o.length,p,b="value"in Ta?Ta.value:Ta.textContent,S=b.length;for(a=0;a<f&&o[a]===b[a];a++);var Q=f-a;for(p=1;p<=Q&&o[f-p]===b[S-p];p++);return c0=b.slice(a,1<p?1-p:void 0)}function u0(a){var o=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&o===13&&(a=13)):a=o,a===10&&(a=13),32<=a||a===13?a:0}function f0(){return!0}function J6(){return!1}function er(a){function o(f,p,b,S,Q){this._reactName=f,this._targetInst=b,this.type=p,this.nativeEvent=S,this.target=Q,this.currentTarget=null;for(var _ in a)a.hasOwnProperty(_)&&(f=a[_],this[_]=f?f(S):S[_]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?f0:J6,this.isPropagationStopped=J6,this}return O(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=f0)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=f0)},persist:function(){},isPersistent:f0}),o}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},d0=er(Sl),Fo=O({},Sl,{view:0,detail:0}),rC=er(Fo),lh,sh,Bo,h0=O({},Fo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ch,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Bo&&(Bo&&a.type==="mousemove"?(lh=a.screenX-Bo.screenX,sh=a.screenY-Bo.screenY):sh=lh=0,Bo=a),lh)},movementY:function(a){return"movementY"in a?a.movementY:sh}}),eO=er(h0),iC=O({},h0,{dataTransfer:0}),aC=er(iC),lC=O({},Fo,{relatedTarget:0}),oh=er(lC),sC=O({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),oC=er(sC),cC=O({},Sl,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),uC=er(cC),fC=O({},Sl,{data:0}),tO=er(fC),dC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},hC={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pC(a){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(a):(a=mC[a])?!!o[a]:!1}function ch(){return pC}var gC=O({},Fo,{key:function(a){if(a.key){var o=dC[a.key]||a.key;if(o!=="Unidentified")return o}return a.type==="keypress"?(a=u0(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?hC[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ch,charCode:function(a){return a.type==="keypress"?u0(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?u0(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),OC=er(gC),xC=O({},h0,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nO=er(xC),yC=O({},Fo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ch}),bC=er(yC),vC=O({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),SC=er(vC),wC=O({},h0,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),kC=er(wC),AC=O({},Sl,{newState:0,oldState:0}),MC=er(AC),CC=[9,13,27,32],uh=Li&&"CompositionEvent"in window,Yo=null;Li&&"documentMode"in document&&(Yo=document.documentMode);var EC=Li&&"TextEvent"in window&&!Yo,rO=Li&&(!uh||Yo&&8<Yo&&11>=Yo),iO=" ",aO=!1;function lO(a,o){switch(a){case"keyup":return CC.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function sO(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var us=!1;function TC(a,o){switch(a){case"compositionend":return sO(o);case"keypress":return o.which!==32?null:(aO=!0,iO);case"textInput":return a=o.data,a===iO&&aO?null:a;default:return null}}function $C(a,o){if(us)return a==="compositionend"||!uh&&lO(a,o)?(a=K6(),c0=ah=Ta=null,us=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return rO&&o.locale!=="ko"?null:o.data;default:return null}}var jC={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function oO(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o==="input"?!!jC[a.type]:o==="textarea"}function cO(a,o,f,p){os?cs?cs.push(p):cs=[p]:os=p,o=n1(o,"onChange"),0<o.length&&(f=new d0("onChange","change",null,f,p),a.push({event:f,listeners:o}))}var Io=null,qo=null;function PC(a){Bx(a,0)}function m0(a){var o=Kn(a);if(F6(o))return a}function uO(a,o){if(a==="change")return o}var fO=!1;if(Li){var fh;if(Li){var dh="oninput"in document;if(!dh){var dO=document.createElement("div");dO.setAttribute("oninput","return;"),dh=typeof dO.oninput=="function"}fh=dh}else fh=!1;fO=fh&&(!document.documentMode||9<document.documentMode)}function hO(){Io&&(Io.detachEvent("onpropertychange",mO),qo=Io=null)}function mO(a){if(a.propertyName==="value"&&m0(qo)){var o=[];cO(o,qo,a,nh(a)),W6(PC,o)}}function QC(a,o,f){a==="focusin"?(hO(),Io=o,qo=f,Io.attachEvent("onpropertychange",mO)):a==="focusout"&&hO()}function ZC(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return m0(qo)}function NC(a,o){if(a==="click")return m0(o)}function RC(a,o){if(a==="input"||a==="change")return m0(o)}function VC(a,o){return a===o&&(a!==0||1/a===1/o)||a!==a&&o!==o}var pr=typeof Object.is=="function"?Object.is:VC;function Go(a,o){if(pr(a,o))return!0;if(typeof a!="object"||a===null||typeof o!="object"||o===null)return!1;var f=Object.keys(a),p=Object.keys(o);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var b=f[p];if(!ft.call(o,b)||!pr(a[b],o[b]))return!1}return!0}function pO(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function gO(a,o){var f=pO(a);a=0;for(var p;f;){if(f.nodeType===3){if(p=a+f.textContent.length,a<=o&&p>=o)return{node:f,offset:o-a};a=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=pO(f)}}function OO(a,o){return a&&o?a===o?!0:a&&a.nodeType===3?!1:o&&o.nodeType===3?OO(a,o.parentNode):"contains"in a?a.contains(o):a.compareDocumentPosition?!!(a.compareDocumentPosition(o)&16):!1:!1}function xO(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var o=s0(a.document);o instanceof a.HTMLIFrameElement;){try{var f=typeof o.contentWindow.location.href=="string"}catch{f=!1}if(f)a=o.contentWindow;else break;o=s0(a.document)}return o}function hh(a){var o=a&&a.nodeName&&a.nodeName.toLowerCase();return o&&(o==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||o==="textarea"||a.contentEditable==="true")}var LC=Li&&"documentMode"in document&&11>=document.documentMode,fs=null,mh=null,Uo=null,ph=!1;function yO(a,o,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;ph||fs==null||fs!==s0(p)||(p=fs,"selectionStart"in p&&hh(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Uo&&Go(Uo,p)||(Uo=p,p=n1(mh,"onSelect"),0<p.length&&(o=new d0("onSelect","select",null,o,f),a.push({event:o,listeners:p}),o.target=fs)))}function wl(a,o){var f={};return f[a.toLowerCase()]=o.toLowerCase(),f["Webkit"+a]="webkit"+o,f["Moz"+a]="moz"+o,f}var ds={animationend:wl("Animation","AnimationEnd"),animationiteration:wl("Animation","AnimationIteration"),animationstart:wl("Animation","AnimationStart"),transitionrun:wl("Transition","TransitionRun"),transitionstart:wl("Transition","TransitionStart"),transitioncancel:wl("Transition","TransitionCancel"),transitionend:wl("Transition","TransitionEnd")},gh={},bO={};Li&&(bO=document.createElement("div").style,"AnimationEvent"in window||(delete ds.animationend.animation,delete ds.animationiteration.animation,delete ds.animationstart.animation),"TransitionEvent"in window||delete ds.transitionend.transition);function kl(a){if(gh[a])return gh[a];if(!ds[a])return a;var o=ds[a],f;for(f in o)if(o.hasOwnProperty(f)&&f in bO)return gh[a]=o[f];return a}var vO=kl("animationend"),SO=kl("animationiteration"),wO=kl("animationstart"),_C=kl("transitionrun"),DC=kl("transitionstart"),HC=kl("transitioncancel"),kO=kl("transitionend"),AO=new Map,Oh="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Oh.push("scrollEnd");function Jr(a,o){AO.set(a,o),Ri(o,[a])}var p0=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Zr=[],hs=0,xh=0;function g0(){for(var a=hs,o=xh=hs=0;o<a;){var f=Zr[o];Zr[o++]=null;var p=Zr[o];Zr[o++]=null;var b=Zr[o];Zr[o++]=null;var S=Zr[o];if(Zr[o++]=null,p!==null&&b!==null){var Q=p.pending;Q===null?b.next=b:(b.next=Q.next,Q.next=b),p.pending=b}S!==0&&MO(f,b,S)}}function O0(a,o,f,p){Zr[hs++]=a,Zr[hs++]=o,Zr[hs++]=f,Zr[hs++]=p,xh|=p,a.lanes|=p,a=a.alternate,a!==null&&(a.lanes|=p)}function yh(a,o,f,p){return O0(a,o,f,p),x0(a)}function Al(a,o){return O0(a,null,null,o),x0(a)}function MO(a,o,f){a.lanes|=f;var p=a.alternate;p!==null&&(p.lanes|=f);for(var b=!1,S=a.return;S!==null;)S.childLanes|=f,p=S.alternate,p!==null&&(p.childLanes|=f),S.tag===22&&(a=S.stateNode,a===null||a._visibility&1||(b=!0)),a=S,S=S.return;return a.tag===3?(S=a.stateNode,b&&o!==null&&(b=31-ze(f),a=S.hiddenUpdates,p=a[b],p===null?a[b]=[o]:p.push(o),o.lane=f|536870912),S):null}function x0(a){if(50<xc)throw xc=0,Em=null,Error(r(185));for(var o=a.return;o!==null;)a=o,o=a.return;return a.tag===3?a.stateNode:null}var ms={};function XC(a,o,f,p){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gr(a,o,f,p){return new XC(a,o,f,p)}function bh(a){return a=a.prototype,!(!a||!a.isReactComponent)}function _i(a,o){var f=a.alternate;return f===null?(f=gr(a.tag,o,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=o,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,o=a.dependencies,f.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function CO(a,o){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=o,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,o=f.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),a}function y0(a,o,f,p,b,S){var Q=0;if(p=a,typeof a=="function")bh(a)&&(Q=1);else if(typeof a=="string")Q=IE(a,f,B.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case R:return a=gr(31,f,o,b),a.elementType=R,a.lanes=S,a;case w:return Ml(f.children,b,S,o);case A:Q=8,b|=24;break;case k:return a=gr(12,f,o,b|2),a.elementType=k,a.lanes=S,a;case C:return a=gr(13,f,o,b),a.elementType=C,a.lanes=S,a;case j:return a=gr(19,f,o,b),a.elementType=j,a.lanes=S,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case E:Q=10;break e;case M:Q=9;break e;case $:Q=11;break e;case T:Q=14;break e;case N:Q=16,p=null;break e}Q=29,f=Error(r(130,a===null?"null":typeof a,"")),p=null}return o=gr(Q,f,o,b),o.elementType=a,o.type=p,o.lanes=S,o}function Ml(a,o,f,p){return a=gr(7,a,p,o),a.lanes=f,a}function vh(a,o,f){return a=gr(6,a,null,o),a.lanes=f,a}function EO(a){var o=gr(18,null,null,0);return o.stateNode=a,o}function Sh(a,o,f){return o=gr(4,a.children!==null?a.children:[],a.key,o),o.lanes=f,o.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},o}var TO=new WeakMap;function Nr(a,o){if(typeof a=="object"&&a!==null){var f=TO.get(a);return f!==void 0?f:(o={value:a,source:o,stack:Pe(o)},TO.set(a,o),o)}return{value:a,source:o,stack:Pe(o)}}var ps=[],gs=0,b0=null,Wo=0,Rr=[],Vr=0,$a=null,hi=1,mi="";function Di(a,o){ps[gs++]=Wo,ps[gs++]=b0,b0=a,Wo=o}function $O(a,o,f){Rr[Vr++]=hi,Rr[Vr++]=mi,Rr[Vr++]=$a,$a=a;var p=hi;a=mi;var b=32-ze(p)-1;p&=~(1<<b),f+=1;var S=32-ze(o)+b;if(30<S){var Q=b-b%5;S=(p&(1<<Q)-1).toString(32),p>>=Q,b-=Q,hi=1<<32-ze(o)+b|f<<b|p,mi=S+a}else hi=1<<S|f<<b|p,mi=a}function wh(a){a.return!==null&&(Di(a,1),$O(a,1,0))}function kh(a){for(;a===b0;)b0=ps[--gs],ps[gs]=null,Wo=ps[--gs],ps[gs]=null;for(;a===$a;)$a=Rr[--Vr],Rr[Vr]=null,mi=Rr[--Vr],Rr[Vr]=null,hi=Rr[--Vr],Rr[Vr]=null}function jO(a,o){Rr[Vr++]=hi,Rr[Vr++]=mi,Rr[Vr++]=$a,hi=o.id,mi=o.overflow,$a=a}var $n=null,Dt=null,st=!1,ja=null,Lr=!1,Ah=Error(r(519));function Pa(a){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ko(Nr(o,a)),Ah}function PO(a){var o=a.stateNode,f=a.type,p=a.memoizedProps;switch(o[tn]=a,o[vn]=p,f){case"dialog":tt("cancel",o),tt("close",o);break;case"iframe":case"object":case"embed":tt("load",o);break;case"video":case"audio":for(f=0;f<bc.length;f++)tt(bc[f],o);break;case"source":tt("error",o);break;case"img":case"image":case"link":tt("error",o),tt("load",o);break;case"details":tt("toggle",o);break;case"input":tt("invalid",o),B6(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":tt("invalid",o);break;case"textarea":tt("invalid",o),I6(o,p.value,p.defaultValue,p.children)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||o.textContent===""+f||p.suppressHydrationWarning===!0||Gx(o.textContent,f)?(p.popover!=null&&(tt("beforetoggle",o),tt("toggle",o)),p.onScroll!=null&&tt("scroll",o),p.onScrollEnd!=null&&tt("scrollend",o),p.onClick!=null&&(o.onclick=Vi),o=!0):o=!1,o||Pa(a,!0)}function QO(a){for($n=a.return;$n;)switch($n.tag){case 5:case 31:case 13:Lr=!1;return;case 27:case 3:Lr=!0;return;default:$n=$n.return}}function Os(a){if(a!==$n)return!1;if(!st)return QO(a),st=!0,!1;var o=a.tag,f;if((f=o!==3&&o!==27)&&((f=o===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||zm(a.type,a.memoizedProps)),f=!f),f&&Dt&&Pa(a),QO(a),o===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));Dt=i5(a)}else if(o===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));Dt=i5(a)}else o===27?(o=Dt,Ya(a.type)?(a=qm,qm=null,Dt=a):Dt=o):Dt=$n?Dr(a.stateNode.nextSibling):null;return!0}function Cl(){Dt=$n=null,st=!1}function Mh(){var a=ja;return a!==null&&(ir===null?ir=a:ir.push.apply(ir,a),ja=null),a}function Ko(a){ja===null?ja=[a]:ja.push(a)}var Ch=P(null),El=null,Hi=null;function Qa(a,o,f){L(Ch,o._currentValue),o._currentValue=f}function Xi(a){a._currentValue=Ch.current,Z(Ch)}function Eh(a,o,f){for(;a!==null;){var p=a.alternate;if((a.childLanes&o)!==o?(a.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),a===f)break;a=a.return}}function Th(a,o,f,p){var b=a.child;for(b!==null&&(b.return=a);b!==null;){var S=b.dependencies;if(S!==null){var Q=b.child;S=S.firstContext;e:for(;S!==null;){var _=S;S=b;for(var W=0;W<o.length;W++)if(_.context===o[W]){S.lanes|=f,_=S.alternate,_!==null&&(_.lanes|=f),Eh(S.return,f,a),p||(Q=null);break e}S=_.next}}else if(b.tag===18){if(Q=b.return,Q===null)throw Error(r(341));Q.lanes|=f,S=Q.alternate,S!==null&&(S.lanes|=f),Eh(Q,f,a),Q=null}else Q=b.child;if(Q!==null)Q.return=b;else for(Q=b;Q!==null;){if(Q===a){Q=null;break}if(b=Q.sibling,b!==null){b.return=Q.return,Q=b;break}Q=Q.return}b=Q}}function xs(a,o,f,p){a=null;for(var b=o,S=!1;b!==null;){if(!S){if((b.flags&524288)!==0)S=!0;else if((b.flags&262144)!==0)break}if(b.tag===10){var Q=b.alternate;if(Q===null)throw Error(r(387));if(Q=Q.memoizedProps,Q!==null){var _=b.type;pr(b.pendingProps.value,Q.value)||(a!==null?a.push(_):a=[_])}}else if(b===Y.current){if(Q=b.alternate,Q===null)throw Error(r(387));Q.memoizedState.memoizedState!==b.memoizedState.memoizedState&&(a!==null?a.push(Ac):a=[Ac])}b=b.return}a!==null&&Th(o,a,f,p),o.flags|=262144}function v0(a){for(a=a.firstContext;a!==null;){if(!pr(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function Tl(a){El=a,Hi=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function jn(a){return ZO(El,a)}function S0(a,o){return El===null&&Tl(a),ZO(a,o)}function ZO(a,o){var f=o._currentValue;if(o={context:o,memoizedValue:f,next:null},Hi===null){if(a===null)throw Error(r(308));Hi=o,a.dependencies={lanes:0,firstContext:o},a.flags|=524288}else Hi=Hi.next=o;return f}var zC=typeof AbortController<"u"?AbortController:function(){var a=[],o=this.signal={aborted:!1,addEventListener:function(f,p){a.push(p)}};this.abort=function(){o.aborted=!0,a.forEach(function(f){return f()})}},FC=t.unstable_scheduleCallback,BC=t.unstable_NormalPriority,fn={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $h(){return{controller:new zC,data:new Map,refCount:0}}function Jo(a){a.refCount--,a.refCount===0&&FC(BC,function(){a.controller.abort()})}var ec=null,jh=0,ys=0,bs=null;function YC(a,o){if(ec===null){var f=ec=[];jh=0,ys=Zm(),bs={status:"pending",value:void 0,then:function(p){f.push(p)}}}return jh++,o.then(NO,NO),o}function NO(){if(--jh===0&&ec!==null){bs!==null&&(bs.status="fulfilled");var a=ec;ec=null,ys=0,bs=null;for(var o=0;o<a.length;o++)(0,a[o])()}}function IC(a,o){var f=[],p={status:"pending",value:null,reason:null,then:function(b){f.push(b)}};return a.then(function(){p.status="fulfilled",p.value=o;for(var b=0;b<f.length;b++)(0,f[b])(o)},function(b){for(p.status="rejected",p.reason=b,b=0;b<f.length;b++)(0,f[b])(void 0)}),p}var RO=H.S;H.S=function(a,o){yx=be(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&YC(a,o),RO!==null&&RO(a,o)};var $l=P(null);function Ph(){var a=$l.current;return a!==null?a:Zt.pooledCache}function w0(a,o){o===null?L($l,$l.current):L($l,o.pool)}function VO(){var a=Ph();return a===null?null:{parent:fn._currentValue,pool:a}}var vs=Error(r(460)),Qh=Error(r(474)),k0=Error(r(542)),A0={then:function(){}};function LO(a){return a=a.status,a==="fulfilled"||a==="rejected"}function _O(a,o,f){switch(f=a[f],f===void 0?a.push(o):f!==o&&(o.then(Vi,Vi),o=f),o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,HO(a),a;default:if(typeof o.status=="string")o.then(Vi,Vi);else{if(a=Zt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=o,a.status="pending",a.then(function(p){if(o.status==="pending"){var b=o;b.status="fulfilled",b.value=p}},function(p){if(o.status==="pending"){var b=o;b.status="rejected",b.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw a=o.reason,HO(a),a}throw Pl=o,vs}}function jl(a){try{var o=a._init;return o(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(Pl=f,vs):f}}var Pl=null;function DO(){if(Pl===null)throw Error(r(459));var a=Pl;return Pl=null,a}function HO(a){if(a===vs||a===k0)throw Error(r(483))}var Ss=null,tc=0;function M0(a){var o=tc;return tc+=1,Ss===null&&(Ss=[]),_O(Ss,a,o)}function nc(a,o){o=o.props.ref,a.ref=o!==void 0?o:null}function C0(a,o){throw o.$$typeof===x?Error(r(525)):(a=Object.prototype.toString.call(o),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":a)))}function XO(a){function o(ie,ne){if(a){var le=ie.deletions;le===null?(ie.deletions=[ne],ie.flags|=16):le.push(ne)}}function f(ie,ne){if(!a)return null;for(;ne!==null;)o(ie,ne),ne=ne.sibling;return null}function p(ie){for(var ne=new Map;ie!==null;)ie.key!==null?ne.set(ie.key,ie):ne.set(ie.index,ie),ie=ie.sibling;return ne}function b(ie,ne){return ie=_i(ie,ne),ie.index=0,ie.sibling=null,ie}function S(ie,ne,le){return ie.index=le,a?(le=ie.alternate,le!==null?(le=le.index,le<ne?(ie.flags|=67108866,ne):le):(ie.flags|=67108866,ne)):(ie.flags|=1048576,ne)}function Q(ie){return a&&ie.alternate===null&&(ie.flags|=67108866),ie}function _(ie,ne,le,he){return ne===null||ne.tag!==6?(ne=vh(le,ie.mode,he),ne.return=ie,ne):(ne=b(ne,le),ne.return=ie,ne)}function W(ie,ne,le,he){var De=le.type;return De===w?de(ie,ne,le.props.children,he,le.key):ne!==null&&(ne.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===N&&jl(De)===ne.type)?(ne=b(ne,le.props),nc(ne,le),ne.return=ie,ne):(ne=y0(le.type,le.key,le.props,null,ie.mode,he),nc(ne,le),ne.return=ie,ne)}function se(ie,ne,le,he){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==le.containerInfo||ne.stateNode.implementation!==le.implementation?(ne=Sh(le,ie.mode,he),ne.return=ie,ne):(ne=b(ne,le.children||[]),ne.return=ie,ne)}function de(ie,ne,le,he,De){return ne===null||ne.tag!==7?(ne=Ml(le,ie.mode,he,De),ne.return=ie,ne):(ne=b(ne,le),ne.return=ie,ne)}function pe(ie,ne,le){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=vh(""+ne,ie.mode,le),ne.return=ie,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:return le=y0(ne.type,ne.key,ne.props,null,ie.mode,le),nc(le,ne),le.return=ie,le;case v:return ne=Sh(ne,ie.mode,le),ne.return=ie,ne;case N:return ne=jl(ne),pe(ie,ne,le)}if(K(ne)||z(ne))return ne=Ml(ne,ie.mode,le,null),ne.return=ie,ne;if(typeof ne.then=="function")return pe(ie,M0(ne),le);if(ne.$$typeof===E)return pe(ie,S0(ie,ne),le);C0(ie,ne)}return null}function oe(ie,ne,le,he){var De=ne!==null?ne.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return De!==null?null:_(ie,ne,""+le,he);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case y:return le.key===De?W(ie,ne,le,he):null;case v:return le.key===De?se(ie,ne,le,he):null;case N:return le=jl(le),oe(ie,ne,le,he)}if(K(le)||z(le))return De!==null?null:de(ie,ne,le,he,null);if(typeof le.then=="function")return oe(ie,ne,M0(le),he);if(le.$$typeof===E)return oe(ie,ne,S0(ie,le),he);C0(ie,le)}return null}function ce(ie,ne,le,he,De){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return ie=ie.get(le)||null,_(ne,ie,""+he,De);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case y:return ie=ie.get(he.key===null?le:he.key)||null,W(ne,ie,he,De);case v:return ie=ie.get(he.key===null?le:he.key)||null,se(ne,ie,he,De);case N:return he=jl(he),ce(ie,ne,le,he,De)}if(K(he)||z(he))return ie=ie.get(le)||null,de(ne,ie,he,De,null);if(typeof he.then=="function")return ce(ie,ne,le,M0(he),De);if(he.$$typeof===E)return ce(ie,ne,le,S0(ne,he),De);C0(ne,he)}return null}function Te(ie,ne,le,he){for(var De=null,St=null,Qe=ne,We=ne=0,at=null;Qe!==null&&We<le.length;We++){Qe.index>We?(at=Qe,Qe=null):at=Qe.sibling;var wt=oe(ie,Qe,le[We],he);if(wt===null){Qe===null&&(Qe=at);break}a&&Qe&&wt.alternate===null&&o(ie,Qe),ne=S(wt,ne,We),St===null?De=wt:St.sibling=wt,St=wt,Qe=at}if(We===le.length)return f(ie,Qe),st&&Di(ie,We),De;if(Qe===null){for(;We<le.length;We++)Qe=pe(ie,le[We],he),Qe!==null&&(ne=S(Qe,ne,We),St===null?De=Qe:St.sibling=Qe,St=Qe);return st&&Di(ie,We),De}for(Qe=p(Qe);We<le.length;We++)at=ce(Qe,ie,We,le[We],he),at!==null&&(a&&at.alternate!==null&&Qe.delete(at.key===null?We:at.key),ne=S(at,ne,We),St===null?De=at:St.sibling=at,St=at);return a&&Qe.forEach(function(Wa){return o(ie,Wa)}),st&&Di(ie,We),De}function He(ie,ne,le,he){if(le==null)throw Error(r(151));for(var De=null,St=null,Qe=ne,We=ne=0,at=null,wt=le.next();Qe!==null&&!wt.done;We++,wt=le.next()){Qe.index>We?(at=Qe,Qe=null):at=Qe.sibling;var Wa=oe(ie,Qe,wt.value,he);if(Wa===null){Qe===null&&(Qe=at);break}a&&Qe&&Wa.alternate===null&&o(ie,Qe),ne=S(Wa,ne,We),St===null?De=Wa:St.sibling=Wa,St=Wa,Qe=at}if(wt.done)return f(ie,Qe),st&&Di(ie,We),De;if(Qe===null){for(;!wt.done;We++,wt=le.next())wt=pe(ie,wt.value,he),wt!==null&&(ne=S(wt,ne,We),St===null?De=wt:St.sibling=wt,St=wt);return st&&Di(ie,We),De}for(Qe=p(Qe);!wt.done;We++,wt=le.next())wt=ce(Qe,ie,We,wt.value,he),wt!==null&&(a&&wt.alternate!==null&&Qe.delete(wt.key===null?We:wt.key),ne=S(wt,ne,We),St===null?De=wt:St.sibling=wt,St=wt);return a&&Qe.forEach(function(iT){return o(ie,iT)}),st&&Di(ie,We),De}function Qt(ie,ne,le,he){if(typeof le=="object"&&le!==null&&le.type===w&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case y:e:{for(var De=le.key;ne!==null;){if(ne.key===De){if(De=le.type,De===w){if(ne.tag===7){f(ie,ne.sibling),he=b(ne,le.props.children),he.return=ie,ie=he;break e}}else if(ne.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===N&&jl(De)===ne.type){f(ie,ne.sibling),he=b(ne,le.props),nc(he,le),he.return=ie,ie=he;break e}f(ie,ne);break}else o(ie,ne);ne=ne.sibling}le.type===w?(he=Ml(le.props.children,ie.mode,he,le.key),he.return=ie,ie=he):(he=y0(le.type,le.key,le.props,null,ie.mode,he),nc(he,le),he.return=ie,ie=he)}return Q(ie);case v:e:{for(De=le.key;ne!==null;){if(ne.key===De)if(ne.tag===4&&ne.stateNode.containerInfo===le.containerInfo&&ne.stateNode.implementation===le.implementation){f(ie,ne.sibling),he=b(ne,le.children||[]),he.return=ie,ie=he;break e}else{f(ie,ne);break}else o(ie,ne);ne=ne.sibling}he=Sh(le,ie.mode,he),he.return=ie,ie=he}return Q(ie);case N:return le=jl(le),Qt(ie,ne,le,he)}if(K(le))return Te(ie,ne,le,he);if(z(le)){if(De=z(le),typeof De!="function")throw Error(r(150));return le=De.call(le),He(ie,ne,le,he)}if(typeof le.then=="function")return Qt(ie,ne,M0(le),he);if(le.$$typeof===E)return Qt(ie,ne,S0(ie,le),he);C0(ie,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,ne!==null&&ne.tag===6?(f(ie,ne.sibling),he=b(ne,le),he.return=ie,ie=he):(f(ie,ne),he=vh(le,ie.mode,he),he.return=ie,ie=he),Q(ie)):f(ie,ne)}return function(ie,ne,le,he){try{tc=0;var De=Qt(ie,ne,le,he);return Ss=null,De}catch(Qe){if(Qe===vs||Qe===k0)throw Qe;var St=gr(29,Qe,null,ie.mode);return St.lanes=he,St.return=ie,St}finally{}}}var Ql=XO(!0),zO=XO(!1),Za=!1;function Zh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nh(a,o){a=a.updateQueue,o.updateQueue===a&&(o.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Na(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Ra(a,o,f){var p=a.updateQueue;if(p===null)return null;if(p=p.shared,(kt&2)!==0){var b=p.pending;return b===null?o.next=o:(o.next=b.next,b.next=o),p.pending=o,o=x0(a),MO(a,null,f),o}return O0(a,p,o,f),x0(a)}function rc(a,o,f){if(o=o.updateQueue,o!==null&&(o=o.shared,(f&4194048)!==0)){var p=o.lanes;p&=a.pendingLanes,f|=p,o.lanes=f,ka(a,f)}}function Rh(a,o){var f=a.updateQueue,p=a.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var b=null,S=null;if(f=f.firstBaseUpdate,f!==null){do{var Q={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};S===null?b=S=Q:S=S.next=Q,f=f.next}while(f!==null);S===null?b=S=o:S=S.next=o}else b=S=o;f={baseState:p.baseState,firstBaseUpdate:b,lastBaseUpdate:S,shared:p.shared,callbacks:p.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=o:a.next=o,f.lastBaseUpdate=o}var Vh=!1;function ic(){if(Vh){var a=bs;if(a!==null)throw a}}function ac(a,o,f,p){Vh=!1;var b=a.updateQueue;Za=!1;var S=b.firstBaseUpdate,Q=b.lastBaseUpdate,_=b.shared.pending;if(_!==null){b.shared.pending=null;var W=_,se=W.next;W.next=null,Q===null?S=se:Q.next=se,Q=W;var de=a.alternate;de!==null&&(de=de.updateQueue,_=de.lastBaseUpdate,_!==Q&&(_===null?de.firstBaseUpdate=se:_.next=se,de.lastBaseUpdate=W))}if(S!==null){var pe=b.baseState;Q=0,de=se=W=null,_=S;do{var oe=_.lane&-536870913,ce=oe!==_.lane;if(ce?(it&oe)===oe:(p&oe)===oe){oe!==0&&oe===ys&&(Vh=!0),de!==null&&(de=de.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var Te=a,He=_;oe=o;var Qt=f;switch(He.tag){case 1:if(Te=He.payload,typeof Te=="function"){pe=Te.call(Qt,pe,oe);break e}pe=Te;break e;case 3:Te.flags=Te.flags&-65537|128;case 0:if(Te=He.payload,oe=typeof Te=="function"?Te.call(Qt,pe,oe):Te,oe==null)break e;pe=O({},pe,oe);break e;case 2:Za=!0}}oe=_.callback,oe!==null&&(a.flags|=64,ce&&(a.flags|=8192),ce=b.callbacks,ce===null?b.callbacks=[oe]:ce.push(oe))}else ce={lane:oe,tag:_.tag,payload:_.payload,callback:_.callback,next:null},de===null?(se=de=ce,W=pe):de=de.next=ce,Q|=oe;if(_=_.next,_===null){if(_=b.shared.pending,_===null)break;ce=_,_=ce.next,ce.next=null,b.lastBaseUpdate=ce,b.shared.pending=null}}while(!0);de===null&&(W=pe),b.baseState=W,b.firstBaseUpdate=se,b.lastBaseUpdate=de,S===null&&(b.shared.lanes=0),Ha|=Q,a.lanes=Q,a.memoizedState=pe}}function FO(a,o){if(typeof a!="function")throw Error(r(191,a));a.call(o)}function BO(a,o){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)FO(f[a],o)}var ws=P(null),E0=P(0);function YO(a,o){a=Wi,L(E0,a),L(ws,o),Wi=a|o.baseLanes}function Lh(){L(E0,Wi),L(ws,ws.current)}function _h(){Wi=E0.current,Z(ws),Z(E0)}var Or=P(null),_r=null;function Va(a){var o=a.alternate;L(nn,nn.current&1),L(Or,a),_r===null&&(o===null||ws.current!==null||o.memoizedState!==null)&&(_r=a)}function Dh(a){L(nn,nn.current),L(Or,a),_r===null&&(_r=a)}function IO(a){a.tag===22?(L(nn,nn.current),L(Or,a),_r===null&&(_r=a)):La()}function La(){L(nn,nn.current),L(Or,Or.current)}function xr(a){Z(Or),_r===a&&(_r=null),Z(nn)}var nn=P(0);function T0(a){for(var o=a;o!==null;){if(o.tag===13){var f=o.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Ym(f)||Im(f)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var zi=0,Ge=null,jt=null,dn=null,$0=!1,ks=!1,Zl=!1,j0=0,lc=0,As=null,qC=0;function Gt(){throw Error(r(321))}function Hh(a,o){if(o===null)return!1;for(var f=0;f<o.length&&f<a.length;f++)if(!pr(a[f],o[f]))return!1;return!0}function Xh(a,o,f,p,b,S){return zi=S,Ge=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,H.H=a===null||a.memoizedState===null?$4:rm,Zl=!1,S=f(p,b),Zl=!1,ks&&(S=GO(o,f,p,b)),qO(a),S}function qO(a){H.H=cc;var o=jt!==null&&jt.next!==null;if(zi=0,dn=jt=Ge=null,$0=!1,lc=0,As=null,o)throw Error(r(300));a===null||hn||(a=a.dependencies,a!==null&&v0(a)&&(hn=!0))}function GO(a,o,f,p){Ge=a;var b=0;do{if(ks&&(As=null),lc=0,ks=!1,25<=b)throw Error(r(301));if(b+=1,dn=jt=null,a.updateQueue!=null){var S=a.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}H.H=j4,S=o(f,p)}while(ks);return S}function GC(){var a=H.H,o=a.useState()[0];return o=typeof o.then=="function"?sc(o):o,a=a.useState()[0],(jt!==null?jt.memoizedState:null)!==a&&(Ge.flags|=1024),o}function zh(){var a=j0!==0;return j0=0,a}function Fh(a,o,f){o.updateQueue=a.updateQueue,o.flags&=-2053,a.lanes&=~f}function Bh(a){if($0){for(a=a.memoizedState;a!==null;){var o=a.queue;o!==null&&(o.pending=null),a=a.next}$0=!1}zi=0,dn=jt=Ge=null,ks=!1,lc=j0=0,As=null}function Yn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?Ge.memoizedState=dn=a:dn=dn.next=a,dn}function rn(){if(jt===null){var a=Ge.alternate;a=a!==null?a.memoizedState:null}else a=jt.next;var o=dn===null?Ge.memoizedState:dn.next;if(o!==null)dn=o,jt=a;else{if(a===null)throw Ge.alternate===null?Error(r(467)):Error(r(310));jt=a,a={memoizedState:jt.memoizedState,baseState:jt.baseState,baseQueue:jt.baseQueue,queue:jt.queue,next:null},dn===null?Ge.memoizedState=dn=a:dn=dn.next=a}return dn}function P0(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function sc(a){var o=lc;return lc+=1,As===null&&(As=[]),a=_O(As,a,o),o=Ge,(dn===null?o.memoizedState:dn.next)===null&&(o=o.alternate,H.H=o===null||o.memoizedState===null?$4:rm),a}function Q0(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return sc(a);if(a.$$typeof===E)return jn(a)}throw Error(r(438,String(a)))}function Yh(a){var o=null,f=Ge.updateQueue;if(f!==null&&(o=f.memoCache),o==null){var p=Ge.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(b){return b.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),f===null&&(f=P0(),Ge.updateQueue=f),f.memoCache=o,f=o.data[o.index],f===void 0)for(f=o.data[o.index]=Array(a),p=0;p<a;p++)f[p]=D;return o.index++,f}function Fi(a,o){return typeof o=="function"?o(a):o}function Z0(a){var o=rn();return Ih(o,jt,a)}function Ih(a,o,f){var p=a.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=f;var b=a.baseQueue,S=p.pending;if(S!==null){if(b!==null){var Q=b.next;b.next=S.next,S.next=Q}o.baseQueue=b=S,p.pending=null}if(S=a.baseState,b===null)a.memoizedState=S;else{o=b.next;var _=Q=null,W=null,se=o,de=!1;do{var pe=se.lane&-536870913;if(pe!==se.lane?(it&pe)===pe:(zi&pe)===pe){var oe=se.revertLane;if(oe===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null}),pe===ys&&(de=!0);else if((zi&oe)===oe){se=se.next,oe===ys&&(de=!0);continue}else pe={lane:0,revertLane:se.revertLane,gesture:null,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},W===null?(_=W=pe,Q=S):W=W.next=pe,Ge.lanes|=oe,Ha|=oe;pe=se.action,Zl&&f(S,pe),S=se.hasEagerState?se.eagerState:f(S,pe)}else oe={lane:pe,revertLane:se.revertLane,gesture:se.gesture,action:se.action,hasEagerState:se.hasEagerState,eagerState:se.eagerState,next:null},W===null?(_=W=oe,Q=S):W=W.next=oe,Ge.lanes|=pe,Ha|=pe;se=se.next}while(se!==null&&se!==o);if(W===null?Q=S:W.next=_,!pr(S,a.memoizedState)&&(hn=!0,de&&(f=bs,f!==null)))throw f;a.memoizedState=S,a.baseState=Q,a.baseQueue=W,p.lastRenderedState=S}return b===null&&(p.lanes=0),[a.memoizedState,p.dispatch]}function qh(a){var o=rn(),f=o.queue;if(f===null)throw Error(r(311));f.lastRenderedReducer=a;var p=f.dispatch,b=f.pending,S=o.memoizedState;if(b!==null){f.pending=null;var Q=b=b.next;do S=a(S,Q.action),Q=Q.next;while(Q!==b);pr(S,o.memoizedState)||(hn=!0),o.memoizedState=S,o.baseQueue===null&&(o.baseState=S),f.lastRenderedState=S}return[S,p]}function UO(a,o,f){var p=Ge,b=rn(),S=st;if(S){if(f===void 0)throw Error(r(407));f=f()}else f=o();var Q=!pr((jt||b).memoizedState,f);if(Q&&(b.memoizedState=f,hn=!0),b=b.queue,Wh(JO.bind(null,p,b,a),[a]),b.getSnapshot!==o||Q||dn!==null&&dn.memoizedState.tag&1){if(p.flags|=2048,Ms(9,{destroy:void 0},KO.bind(null,p,b,f,o),null),Zt===null)throw Error(r(349));S||(zi&127)!==0||WO(p,o,f)}return f}function WO(a,o,f){a.flags|=16384,a={getSnapshot:o,value:f},o=Ge.updateQueue,o===null?(o=P0(),Ge.updateQueue=o,o.stores=[a]):(f=o.stores,f===null?o.stores=[a]:f.push(a))}function KO(a,o,f,p){o.value=f,o.getSnapshot=p,e4(o)&&t4(a)}function JO(a,o,f){return f(function(){e4(o)&&t4(a)})}function e4(a){var o=a.getSnapshot;a=a.value;try{var f=o();return!pr(a,f)}catch{return!0}}function t4(a){var o=Al(a,2);o!==null&&ar(o,a,2)}function Gh(a){var o=Yn();if(typeof a=="function"){var f=a;if(a=f(),Zl){ve(!0);try{f()}finally{ve(!1)}}}return o.memoizedState=o.baseState=a,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:a},o}function n4(a,o,f,p){return a.baseState=f,Ih(a,jt,typeof p=="function"?p:Fi)}function UC(a,o,f,p,b){if(V0(a))throw Error(r(485));if(a=o.action,a!==null){var S={payload:b,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(Q){S.listeners.push(Q)}};H.T!==null?f(!0):S.isTransition=!1,p(S),f=o.pending,f===null?(S.next=o.pending=S,r4(o,S)):(S.next=f.next,o.pending=f.next=S)}}function r4(a,o){var f=o.action,p=o.payload,b=a.state;if(o.isTransition){var S=H.T,Q={};H.T=Q;try{var _=f(b,p),W=H.S;W!==null&&W(Q,_),i4(a,o,_)}catch(se){Uh(a,o,se)}finally{S!==null&&Q.types!==null&&(S.types=Q.types),H.T=S}}else try{S=f(b,p),i4(a,o,S)}catch(se){Uh(a,o,se)}}function i4(a,o,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){a4(a,o,p)},function(p){return Uh(a,o,p)}):a4(a,o,f)}function a4(a,o,f){o.status="fulfilled",o.value=f,l4(o),a.state=f,o=a.pending,o!==null&&(f=o.next,f===o?a.pending=null:(f=f.next,o.next=f,r4(a,f)))}function Uh(a,o,f){var p=a.pending;if(a.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=f,l4(o),o=o.next;while(o!==p)}a.action=null}function l4(a){a=a.listeners;for(var o=0;o<a.length;o++)(0,a[o])()}function s4(a,o){return o}function o4(a,o){if(st){var f=Zt.formState;if(f!==null){e:{var p=Ge;if(st){if(Dt){t:{for(var b=Dt,S=Lr;b.nodeType!==8;){if(!S){b=null;break t}if(b=Dr(b.nextSibling),b===null){b=null;break t}}S=b.data,b=S==="F!"||S==="F"?b:null}if(b){Dt=Dr(b.nextSibling),p=b.data==="F!";break e}}Pa(p)}p=!1}p&&(o=f[0])}}return f=Yn(),f.memoizedState=f.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s4,lastRenderedState:o},f.queue=p,f=C4.bind(null,Ge,p),p.dispatch=f,p=Gh(!1),S=nm.bind(null,Ge,!1,p.queue),p=Yn(),b={state:o,dispatch:null,action:a,pending:null},p.queue=b,f=UC.bind(null,Ge,b,S,f),b.dispatch=f,p.memoizedState=a,[o,f,!1]}function c4(a){var o=rn();return u4(o,jt,a)}function u4(a,o,f){if(o=Ih(a,o,s4)[0],a=Z0(Fi)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=sc(o)}catch(Q){throw Q===vs?k0:Q}else p=o;o=rn();var b=o.queue,S=b.dispatch;return f!==o.memoizedState&&(Ge.flags|=2048,Ms(9,{destroy:void 0},WC.bind(null,b,f),null)),[p,S,a]}function WC(a,o){a.action=o}function f4(a){var o=rn(),f=jt;if(f!==null)return u4(o,f,a);rn(),o=o.memoizedState,f=rn();var p=f.queue.dispatch;return f.memoizedState=a,[o,p,!1]}function Ms(a,o,f,p){return a={tag:a,create:f,deps:p,inst:o,next:null},o=Ge.updateQueue,o===null&&(o=P0(),Ge.updateQueue=o),f=o.lastEffect,f===null?o.lastEffect=a.next=a:(p=f.next,f.next=a,a.next=p,o.lastEffect=a),a}function d4(){return rn().memoizedState}function N0(a,o,f,p){var b=Yn();Ge.flags|=a,b.memoizedState=Ms(1|o,{destroy:void 0},f,p===void 0?null:p)}function R0(a,o,f,p){var b=rn();p=p===void 0?null:p;var S=b.memoizedState.inst;jt!==null&&p!==null&&Hh(p,jt.memoizedState.deps)?b.memoizedState=Ms(o,S,f,p):(Ge.flags|=a,b.memoizedState=Ms(1|o,S,f,p))}function h4(a,o){N0(8390656,8,a,o)}function Wh(a,o){R0(2048,8,a,o)}function KC(a){Ge.flags|=4;var o=Ge.updateQueue;if(o===null)o=P0(),Ge.updateQueue=o,o.events=[a];else{var f=o.events;f===null?o.events=[a]:f.push(a)}}function m4(a){var o=rn().memoizedState;return KC({ref:o,nextImpl:a}),function(){if((kt&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function p4(a,o){return R0(4,2,a,o)}function g4(a,o){return R0(4,4,a,o)}function O4(a,o){if(typeof o=="function"){a=a();var f=o(a);return function(){typeof f=="function"?f():o(null)}}if(o!=null)return a=a(),o.current=a,function(){o.current=null}}function x4(a,o,f){f=f!=null?f.concat([a]):null,R0(4,4,O4.bind(null,o,a),f)}function Kh(){}function y4(a,o){var f=rn();o=o===void 0?null:o;var p=f.memoizedState;return o!==null&&Hh(o,p[1])?p[0]:(f.memoizedState=[a,o],a)}function b4(a,o){var f=rn();o=o===void 0?null:o;var p=f.memoizedState;if(o!==null&&Hh(o,p[1]))return p[0];if(p=a(),Zl){ve(!0);try{a()}finally{ve(!1)}}return f.memoizedState=[p,o],p}function Jh(a,o,f){return f===void 0||(zi&1073741824)!==0&&(it&261930)===0?a.memoizedState=o:(a.memoizedState=f,a=vx(),Ge.lanes|=a,Ha|=a,f)}function v4(a,o,f,p){return pr(f,o)?f:ws.current!==null?(a=Jh(a,f,p),pr(a,o)||(hn=!0),a):(zi&42)===0||(zi&1073741824)!==0&&(it&261930)===0?(hn=!0,a.memoizedState=f):(a=vx(),Ge.lanes|=a,Ha|=a,o)}function S4(a,o,f,p,b){var S=q.p;q.p=S!==0&&8>S?S:8;var Q=H.T,_={};H.T=_,nm(a,!1,o,f);try{var W=b(),se=H.S;if(se!==null&&se(_,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var de=IC(W,p);oc(a,o,de,vr(a))}else oc(a,o,p,vr(a))}catch(pe){oc(a,o,{then:function(){},status:"rejected",reason:pe},vr())}finally{q.p=S,Q!==null&&_.types!==null&&(Q.types=_.types),H.T=Q}}function JC(){}function em(a,o,f,p){if(a.tag!==5)throw Error(r(476));var b=w4(a).queue;S4(a,b,o,X,f===null?JC:function(){return k4(a),f(p)})}function w4(a){var o=a.memoizedState;if(o!==null)return o;o={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:X},next:null};var f={};return o.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:f},next:null},a.memoizedState=o,a=a.alternate,a!==null&&(a.memoizedState=o),o}function k4(a){var o=w4(a);o.next===null&&(o=a.alternate.memoizedState),oc(a,o.next.queue,{},vr())}function tm(){return jn(Ac)}function A4(){return rn().memoizedState}function M4(){return rn().memoizedState}function eE(a){for(var o=a.return;o!==null;){switch(o.tag){case 24:case 3:var f=vr();a=Na(f);var p=Ra(o,a,f);p!==null&&(ar(p,o,f),rc(p,o,f)),o={cache:$h()},a.payload=o;return}o=o.return}}function tE(a,o,f){var p=vr();f={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},V0(a)?E4(o,f):(f=yh(a,o,f,p),f!==null&&(ar(f,a,p),T4(f,o,p)))}function C4(a,o,f){var p=vr();oc(a,o,f,p)}function oc(a,o,f,p){var b={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(V0(a))E4(o,b);else{var S=a.alternate;if(a.lanes===0&&(S===null||S.lanes===0)&&(S=o.lastRenderedReducer,S!==null))try{var Q=o.lastRenderedState,_=S(Q,f);if(b.hasEagerState=!0,b.eagerState=_,pr(_,Q))return O0(a,o,b,0),Zt===null&&g0(),!1}catch{}finally{}if(f=yh(a,o,b,p),f!==null)return ar(f,a,p),T4(f,o,p),!0}return!1}function nm(a,o,f,p){if(p={lane:2,revertLane:Zm(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},V0(a)){if(o)throw Error(r(479))}else o=yh(a,f,p,2),o!==null&&ar(o,a,2)}function V0(a){var o=a.alternate;return a===Ge||o!==null&&o===Ge}function E4(a,o){ks=$0=!0;var f=a.pending;f===null?o.next=o:(o.next=f.next,f.next=o),a.pending=o}function T4(a,o,f){if((f&4194048)!==0){var p=o.lanes;p&=a.pendingLanes,f|=p,o.lanes=f,ka(a,f)}}var cc={readContext:jn,use:Q0,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useLayoutEffect:Gt,useInsertionEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useSyncExternalStore:Gt,useId:Gt,useHostTransitionStatus:Gt,useFormState:Gt,useActionState:Gt,useOptimistic:Gt,useMemoCache:Gt,useCacheRefresh:Gt};cc.useEffectEvent=Gt;var $4={readContext:jn,use:Q0,useCallback:function(a,o){return Yn().memoizedState=[a,o===void 0?null:o],a},useContext:jn,useEffect:h4,useImperativeHandle:function(a,o,f){f=f!=null?f.concat([a]):null,N0(4194308,4,O4.bind(null,o,a),f)},useLayoutEffect:function(a,o){return N0(4194308,4,a,o)},useInsertionEffect:function(a,o){N0(4,2,a,o)},useMemo:function(a,o){var f=Yn();o=o===void 0?null:o;var p=a();if(Zl){ve(!0);try{a()}finally{ve(!1)}}return f.memoizedState=[p,o],p},useReducer:function(a,o,f){var p=Yn();if(f!==void 0){var b=f(o);if(Zl){ve(!0);try{f(o)}finally{ve(!1)}}}else b=o;return p.memoizedState=p.baseState=b,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b},p.queue=a,a=a.dispatch=tE.bind(null,Ge,a),[p.memoizedState,a]},useRef:function(a){var o=Yn();return a={current:a},o.memoizedState=a},useState:function(a){a=Gh(a);var o=a.queue,f=C4.bind(null,Ge,o);return o.dispatch=f,[a.memoizedState,f]},useDebugValue:Kh,useDeferredValue:function(a,o){var f=Yn();return Jh(f,a,o)},useTransition:function(){var a=Gh(!1);return a=S4.bind(null,Ge,a.queue,!0,!1),Yn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,o,f){var p=Ge,b=Yn();if(st){if(f===void 0)throw Error(r(407));f=f()}else{if(f=o(),Zt===null)throw Error(r(349));(it&127)!==0||WO(p,o,f)}b.memoizedState=f;var S={value:f,getSnapshot:o};return b.queue=S,h4(JO.bind(null,p,S,a),[a]),p.flags|=2048,Ms(9,{destroy:void 0},KO.bind(null,p,S,f,o),null),f},useId:function(){var a=Yn(),o=Zt.identifierPrefix;if(st){var f=mi,p=hi;f=(p&~(1<<32-ze(p)-1)).toString(32)+f,o="_"+o+"R_"+f,f=j0++,0<f&&(o+="H"+f.toString(32)),o+="_"}else f=qC++,o="_"+o+"r_"+f.toString(32)+"_";return a.memoizedState=o},useHostTransitionStatus:tm,useFormState:o4,useActionState:o4,useOptimistic:function(a){var o=Yn();o.memoizedState=o.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=f,o=nm.bind(null,Ge,!0,f),f.dispatch=o,[a,o]},useMemoCache:Yh,useCacheRefresh:function(){return Yn().memoizedState=eE.bind(null,Ge)},useEffectEvent:function(a){var o=Yn(),f={impl:a};return o.memoizedState=f,function(){if((kt&2)!==0)throw Error(r(440));return f.impl.apply(void 0,arguments)}}},rm={readContext:jn,use:Q0,useCallback:y4,useContext:jn,useEffect:Wh,useImperativeHandle:x4,useInsertionEffect:p4,useLayoutEffect:g4,useMemo:b4,useReducer:Z0,useRef:d4,useState:function(){return Z0(Fi)},useDebugValue:Kh,useDeferredValue:function(a,o){var f=rn();return v4(f,jt.memoizedState,a,o)},useTransition:function(){var a=Z0(Fi)[0],o=rn().memoizedState;return[typeof a=="boolean"?a:sc(a),o]},useSyncExternalStore:UO,useId:A4,useHostTransitionStatus:tm,useFormState:c4,useActionState:c4,useOptimistic:function(a,o){var f=rn();return n4(f,jt,a,o)},useMemoCache:Yh,useCacheRefresh:M4};rm.useEffectEvent=m4;var j4={readContext:jn,use:Q0,useCallback:y4,useContext:jn,useEffect:Wh,useImperativeHandle:x4,useInsertionEffect:p4,useLayoutEffect:g4,useMemo:b4,useReducer:qh,useRef:d4,useState:function(){return qh(Fi)},useDebugValue:Kh,useDeferredValue:function(a,o){var f=rn();return jt===null?Jh(f,a,o):v4(f,jt.memoizedState,a,o)},useTransition:function(){var a=qh(Fi)[0],o=rn().memoizedState;return[typeof a=="boolean"?a:sc(a),o]},useSyncExternalStore:UO,useId:A4,useHostTransitionStatus:tm,useFormState:f4,useActionState:f4,useOptimistic:function(a,o){var f=rn();return jt!==null?n4(f,jt,a,o):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:Yh,useCacheRefresh:M4};j4.useEffectEvent=m4;function im(a,o,f,p){o=a.memoizedState,f=f(p,o),f=f==null?o:O({},o,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var am={enqueueSetState:function(a,o,f){a=a._reactInternals;var p=vr(),b=Na(p);b.payload=o,f!=null&&(b.callback=f),o=Ra(a,b,p),o!==null&&(ar(o,a,p),rc(o,a,p))},enqueueReplaceState:function(a,o,f){a=a._reactInternals;var p=vr(),b=Na(p);b.tag=1,b.payload=o,f!=null&&(b.callback=f),o=Ra(a,b,p),o!==null&&(ar(o,a,p),rc(o,a,p))},enqueueForceUpdate:function(a,o){a=a._reactInternals;var f=vr(),p=Na(f);p.tag=2,o!=null&&(p.callback=o),o=Ra(a,p,f),o!==null&&(ar(o,a,f),rc(o,a,f))}};function P4(a,o,f,p,b,S,Q){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(p,S,Q):o.prototype&&o.prototype.isPureReactComponent?!Go(f,p)||!Go(b,S):!0}function Q4(a,o,f,p){a=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(f,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(f,p),o.state!==a&&am.enqueueReplaceState(o,o.state,null)}function Nl(a,o){var f=o;if("ref"in o){f={};for(var p in o)p!=="ref"&&(f[p]=o[p])}if(a=a.defaultProps){f===o&&(f=O({},f));for(var b in a)f[b]===void 0&&(f[b]=a[b])}return f}function Z4(a){p0(a)}function N4(a){console.error(a)}function R4(a){p0(a)}function L0(a,o){try{var f=a.onUncaughtError;f(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function V4(a,o,f){try{var p=a.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(b){setTimeout(function(){throw b})}}function lm(a,o,f){return f=Na(f),f.tag=3,f.payload={element:null},f.callback=function(){L0(a,o)},f}function L4(a){return a=Na(a),a.tag=3,a}function _4(a,o,f,p){var b=f.type.getDerivedStateFromError;if(typeof b=="function"){var S=p.value;a.payload=function(){return b(S)},a.callback=function(){V4(o,f,p)}}var Q=f.stateNode;Q!==null&&typeof Q.componentDidCatch=="function"&&(a.callback=function(){V4(o,f,p),typeof b!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var _=p.stack;this.componentDidCatch(p.value,{componentStack:_!==null?_:""})})}function nE(a,o,f,p,b){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=f.alternate,o!==null&&xs(o,f,b,!0),f=Or.current,f!==null){switch(f.tag){case 31:case 13:return _r===null?U0():f.alternate===null&&Ut===0&&(Ut=3),f.flags&=-257,f.flags|=65536,f.lanes=b,p===A0?f.flags|=16384:(o=f.updateQueue,o===null?f.updateQueue=new Set([p]):o.add(p),jm(a,p,b)),!1;case 22:return f.flags|=65536,p===A0?f.flags|=16384:(o=f.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=o):(f=o.retryQueue,f===null?o.retryQueue=new Set([p]):f.add(p)),jm(a,p,b)),!1}throw Error(r(435,f.tag))}return jm(a,p,b),U0(),!1}if(st)return o=Or.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=b,p!==Ah&&(a=Error(r(422),{cause:p}),Ko(Nr(a,f)))):(p!==Ah&&(o=Error(r(423),{cause:p}),Ko(Nr(o,f))),a=a.current.alternate,a.flags|=65536,b&=-b,a.lanes|=b,p=Nr(p,f),b=lm(a.stateNode,p,b),Rh(a,b),Ut!==4&&(Ut=2)),!1;var S=Error(r(520),{cause:p});if(S=Nr(S,f),Oc===null?Oc=[S]:Oc.push(S),Ut!==4&&(Ut=2),o===null)return!0;p=Nr(p,f),f=o;do{switch(f.tag){case 3:return f.flags|=65536,a=b&-b,f.lanes|=a,a=lm(f.stateNode,p,a),Rh(f,a),!1;case 1:if(o=f.type,S=f.stateNode,(f.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Xa===null||!Xa.has(S))))return f.flags|=65536,b&=-b,f.lanes|=b,b=L4(b),_4(b,a,f,p),Rh(f,b),!1}f=f.return}while(f!==null);return!1}var sm=Error(r(461)),hn=!1;function Pn(a,o,f,p){o.child=a===null?zO(o,null,f,p):Ql(o,a.child,f,p)}function D4(a,o,f,p,b){f=f.render;var S=o.ref;if("ref"in p){var Q={};for(var _ in p)_!=="ref"&&(Q[_]=p[_])}else Q=p;return Tl(o),p=Xh(a,o,f,Q,S,b),_=zh(),a!==null&&!hn?(Fh(a,o,b),Bi(a,o,b)):(st&&_&&wh(o),o.flags|=1,Pn(a,o,p,b),o.child)}function H4(a,o,f,p,b){if(a===null){var S=f.type;return typeof S=="function"&&!bh(S)&&S.defaultProps===void 0&&f.compare===null?(o.tag=15,o.type=S,X4(a,o,S,p,b)):(a=y0(f.type,null,p,o,o.mode,b),a.ref=o.ref,a.return=o,o.child=a)}if(S=a.child,!pm(a,b)){var Q=S.memoizedProps;if(f=f.compare,f=f!==null?f:Go,f(Q,p)&&a.ref===o.ref)return Bi(a,o,b)}return o.flags|=1,a=_i(S,p),a.ref=o.ref,a.return=o,o.child=a}function X4(a,o,f,p,b){if(a!==null){var S=a.memoizedProps;if(Go(S,p)&&a.ref===o.ref)if(hn=!1,o.pendingProps=p=S,pm(a,b))(a.flags&131072)!==0&&(hn=!0);else return o.lanes=a.lanes,Bi(a,o,b)}return om(a,o,f,p,b)}function z4(a,o,f,p){var b=p.children,S=a!==null?a.memoizedState:null;if(a===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(S=S!==null?S.baseLanes|f:f,a!==null){for(p=o.child=a.child,b=0;p!==null;)b=b|p.lanes|p.childLanes,p=p.sibling;p=b&~S}else p=0,o.child=null;return F4(a,o,S,f,p)}if((f&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},a!==null&&w0(o,S!==null?S.cachePool:null),S!==null?YO(o,S):Lh(),IO(o);else return p=o.lanes=536870912,F4(a,o,S!==null?S.baseLanes|f:f,f,p)}else S!==null?(w0(o,S.cachePool),YO(o,S),La(),o.memoizedState=null):(a!==null&&w0(o,null),Lh(),La());return Pn(a,o,b,f),o.child}function uc(a,o){return a!==null&&a.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function F4(a,o,f,p,b){var S=Ph();return S=S===null?null:{parent:fn._currentValue,pool:S},o.memoizedState={baseLanes:f,cachePool:S},a!==null&&w0(o,null),Lh(),IO(o),a!==null&&xs(a,o,p,!0),o.childLanes=b,null}function _0(a,o){return o=H0({mode:o.mode,children:o.children},a.mode),o.ref=a.ref,a.child=o,o.return=a,o}function B4(a,o,f){return Ql(o,a.child,null,f),a=_0(o,o.pendingProps),a.flags|=2,xr(o),o.memoizedState=null,a}function rE(a,o,f){var p=o.pendingProps,b=(o.flags&128)!==0;if(o.flags&=-129,a===null){if(st){if(p.mode==="hidden")return a=_0(o,p),o.lanes=536870912,uc(null,a);if(Dh(o),(a=Dt)?(a=r5(a,Lr),a=a!==null&&a.data==="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:$a!==null?{id:hi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},f=EO(a),f.return=o,o.child=f,$n=o,Dt=null)):a=null,a===null)throw Pa(o);return o.lanes=536870912,null}return _0(o,p)}var S=a.memoizedState;if(S!==null){var Q=S.dehydrated;if(Dh(o),b)if(o.flags&256)o.flags&=-257,o=B4(a,o,f);else if(o.memoizedState!==null)o.child=a.child,o.flags|=128,o=null;else throw Error(r(558));else if(hn||xs(a,o,f,!1),b=(f&a.childLanes)!==0,hn||b){if(p=Zt,p!==null&&(Q=Ce(p,f),Q!==0&&Q!==S.retryLane))throw S.retryLane=Q,Al(a,Q),ar(p,a,Q),sm;U0(),o=B4(a,o,f)}else a=S.treeContext,Dt=Dr(Q.nextSibling),$n=o,st=!0,ja=null,Lr=!1,a!==null&&jO(o,a),o=_0(o,p),o.flags|=4096;return o}return a=_i(a.child,{mode:p.mode,children:p.children}),a.ref=o.ref,o.child=a,a.return=o,a}function D0(a,o){var f=o.ref;if(f===null)a!==null&&a.ref!==null&&(o.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(r(284));(a===null||a.ref!==f)&&(o.flags|=4194816)}}function om(a,o,f,p,b){return Tl(o),f=Xh(a,o,f,p,void 0,b),p=zh(),a!==null&&!hn?(Fh(a,o,b),Bi(a,o,b)):(st&&p&&wh(o),o.flags|=1,Pn(a,o,f,b),o.child)}function Y4(a,o,f,p,b,S){return Tl(o),o.updateQueue=null,f=GO(o,p,f,b),qO(a),p=zh(),a!==null&&!hn?(Fh(a,o,S),Bi(a,o,S)):(st&&p&&wh(o),o.flags|=1,Pn(a,o,f,S),o.child)}function I4(a,o,f,p,b){if(Tl(o),o.stateNode===null){var S=ms,Q=f.contextType;typeof Q=="object"&&Q!==null&&(S=jn(Q)),S=new f(p,S),o.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=am,o.stateNode=S,S._reactInternals=o,S=o.stateNode,S.props=p,S.state=o.memoizedState,S.refs={},Zh(o),Q=f.contextType,S.context=typeof Q=="object"&&Q!==null?jn(Q):ms,S.state=o.memoizedState,Q=f.getDerivedStateFromProps,typeof Q=="function"&&(im(o,f,Q,p),S.state=o.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(Q=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),Q!==S.state&&am.enqueueReplaceState(S,S.state,null),ac(o,p,S,b),ic(),S.state=o.memoizedState),typeof S.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(a===null){S=o.stateNode;var _=o.memoizedProps,W=Nl(f,_);S.props=W;var se=S.context,de=f.contextType;Q=ms,typeof de=="object"&&de!==null&&(Q=jn(de));var pe=f.getDerivedStateFromProps;de=typeof pe=="function"||typeof S.getSnapshotBeforeUpdate=="function",_=o.pendingProps!==_,de||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(_||se!==Q)&&Q4(o,S,p,Q),Za=!1;var oe=o.memoizedState;S.state=oe,ac(o,p,S,b),ic(),se=o.memoizedState,_||oe!==se||Za?(typeof pe=="function"&&(im(o,f,pe,p),se=o.memoizedState),(W=Za||P4(o,f,W,p,oe,se,Q))?(de||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(o.flags|=4194308)):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=se),S.props=p,S.state=se,S.context=Q,p=W):(typeof S.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{S=o.stateNode,Nh(a,o),Q=o.memoizedProps,de=Nl(f,Q),S.props=de,pe=o.pendingProps,oe=S.context,se=f.contextType,W=ms,typeof se=="object"&&se!==null&&(W=jn(se)),_=f.getDerivedStateFromProps,(se=typeof _=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(Q!==pe||oe!==W)&&Q4(o,S,p,W),Za=!1,oe=o.memoizedState,S.state=oe,ac(o,p,S,b),ic();var ce=o.memoizedState;Q!==pe||oe!==ce||Za||a!==null&&a.dependencies!==null&&v0(a.dependencies)?(typeof _=="function"&&(im(o,f,_,p),ce=o.memoizedState),(de=Za||P4(o,f,de,p,oe,ce,W)||a!==null&&a.dependencies!==null&&v0(a.dependencies))?(se||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(p,ce,W),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(p,ce,W)),typeof S.componentDidUpdate=="function"&&(o.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof S.componentDidUpdate!="function"||Q===a.memoizedProps&&oe===a.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||Q===a.memoizedProps&&oe===a.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ce),S.props=p,S.state=ce,S.context=W,p=de):(typeof S.componentDidUpdate!="function"||Q===a.memoizedProps&&oe===a.memoizedState||(o.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||Q===a.memoizedProps&&oe===a.memoizedState||(o.flags|=1024),p=!1)}return S=p,D0(a,o),p=(o.flags&128)!==0,S||p?(S=o.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:S.render(),o.flags|=1,a!==null&&p?(o.child=Ql(o,a.child,null,b),o.child=Ql(o,null,f,b)):Pn(a,o,f,b),o.memoizedState=S.state,a=o.child):a=Bi(a,o,b),a}function q4(a,o,f,p){return Cl(),o.flags|=256,Pn(a,o,f,p),o.child}var cm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function um(a){return{baseLanes:a,cachePool:VO()}}function fm(a,o,f){return a=a!==null?a.childLanes&~f:0,o&&(a|=br),a}function G4(a,o,f){var p=o.pendingProps,b=!1,S=(o.flags&128)!==0,Q;if((Q=S)||(Q=a!==null&&a.memoizedState===null?!1:(nn.current&2)!==0),Q&&(b=!0,o.flags&=-129),Q=(o.flags&32)!==0,o.flags&=-33,a===null){if(st){if(b?Va(o):La(),(a=Dt)?(a=r5(a,Lr),a=a!==null&&a.data!=="&"?a:null,a!==null&&(o.memoizedState={dehydrated:a,treeContext:$a!==null?{id:hi,overflow:mi}:null,retryLane:536870912,hydrationErrors:null},f=EO(a),f.return=o,o.child=f,$n=o,Dt=null)):a=null,a===null)throw Pa(o);return Im(a)?o.lanes=32:o.lanes=536870912,null}var _=p.children;return p=p.fallback,b?(La(),b=o.mode,_=H0({mode:"hidden",children:_},b),p=Ml(p,b,f,null),_.return=o,p.return=o,_.sibling=p,o.child=_,p=o.child,p.memoizedState=um(f),p.childLanes=fm(a,Q,f),o.memoizedState=cm,uc(null,p)):(Va(o),dm(o,_))}var W=a.memoizedState;if(W!==null&&(_=W.dehydrated,_!==null)){if(S)o.flags&256?(Va(o),o.flags&=-257,o=hm(a,o,f)):o.memoizedState!==null?(La(),o.child=a.child,o.flags|=128,o=null):(La(),_=p.fallback,b=o.mode,p=H0({mode:"visible",children:p.children},b),_=Ml(_,b,f,null),_.flags|=2,p.return=o,_.return=o,p.sibling=_,o.child=p,Ql(o,a.child,null,f),p=o.child,p.memoizedState=um(f),p.childLanes=fm(a,Q,f),o.memoizedState=cm,o=uc(null,p));else if(Va(o),Im(_)){if(Q=_.nextSibling&&_.nextSibling.dataset,Q)var se=Q.dgst;Q=se,p=Error(r(419)),p.stack="",p.digest=Q,Ko({value:p,source:null,stack:null}),o=hm(a,o,f)}else if(hn||xs(a,o,f,!1),Q=(f&a.childLanes)!==0,hn||Q){if(Q=Zt,Q!==null&&(p=Ce(Q,f),p!==0&&p!==W.retryLane))throw W.retryLane=p,Al(a,p),ar(Q,a,p),sm;Ym(_)||U0(),o=hm(a,o,f)}else Ym(_)?(o.flags|=192,o.child=a.child,o=null):(a=W.treeContext,Dt=Dr(_.nextSibling),$n=o,st=!0,ja=null,Lr=!1,a!==null&&jO(o,a),o=dm(o,p.children),o.flags|=4096);return o}return b?(La(),_=p.fallback,b=o.mode,W=a.child,se=W.sibling,p=_i(W,{mode:"hidden",children:p.children}),p.subtreeFlags=W.subtreeFlags&65011712,se!==null?_=_i(se,_):(_=Ml(_,b,f,null),_.flags|=2),_.return=o,p.return=o,p.sibling=_,o.child=p,uc(null,p),p=o.child,_=a.child.memoizedState,_===null?_=um(f):(b=_.cachePool,b!==null?(W=fn._currentValue,b=b.parent!==W?{parent:W,pool:W}:b):b=VO(),_={baseLanes:_.baseLanes|f,cachePool:b}),p.memoizedState=_,p.childLanes=fm(a,Q,f),o.memoizedState=cm,uc(a.child,p)):(Va(o),f=a.child,a=f.sibling,f=_i(f,{mode:"visible",children:p.children}),f.return=o,f.sibling=null,a!==null&&(Q=o.deletions,Q===null?(o.deletions=[a],o.flags|=16):Q.push(a)),o.child=f,o.memoizedState=null,f)}function dm(a,o){return o=H0({mode:"visible",children:o},a.mode),o.return=a,a.child=o}function H0(a,o){return a=gr(22,a,null,o),a.lanes=0,a}function hm(a,o,f){return Ql(o,a.child,null,f),a=dm(o,o.pendingProps.children),a.flags|=2,o.memoizedState=null,a}function U4(a,o,f){a.lanes|=o;var p=a.alternate;p!==null&&(p.lanes|=o),Eh(a.return,o,f)}function mm(a,o,f,p,b,S){var Q=a.memoizedState;Q===null?a.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:b,treeForkCount:S}:(Q.isBackwards=o,Q.rendering=null,Q.renderingStartTime=0,Q.last=p,Q.tail=f,Q.tailMode=b,Q.treeForkCount=S)}function W4(a,o,f){var p=o.pendingProps,b=p.revealOrder,S=p.tail;p=p.children;var Q=nn.current,_=(Q&2)!==0;if(_?(Q=Q&1|2,o.flags|=128):Q&=1,L(nn,Q),Pn(a,o,p,f),p=st?Wo:0,!_&&a!==null&&(a.flags&128)!==0)e:for(a=o.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&U4(a,f,o);else if(a.tag===19)U4(a,f,o);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break e;for(;a.sibling===null;){if(a.return===null||a.return===o)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(b){case"forwards":for(f=o.child,b=null;f!==null;)a=f.alternate,a!==null&&T0(a)===null&&(b=f),f=f.sibling;f=b,f===null?(b=o.child,o.child=null):(b=f.sibling,f.sibling=null),mm(o,!1,b,f,S,p);break;case"backwards":case"unstable_legacy-backwards":for(f=null,b=o.child,o.child=null;b!==null;){if(a=b.alternate,a!==null&&T0(a)===null){o.child=b;break}a=b.sibling,b.sibling=f,f=b,b=a}mm(o,!0,f,null,S,p);break;case"together":mm(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function Bi(a,o,f){if(a!==null&&(o.dependencies=a.dependencies),Ha|=o.lanes,(f&o.childLanes)===0)if(a!==null){if(xs(a,o,f,!1),(f&o.childLanes)===0)return null}else return null;if(a!==null&&o.child!==a.child)throw Error(r(153));if(o.child!==null){for(a=o.child,f=_i(a,a.pendingProps),o.child=f,f.return=o;a.sibling!==null;)a=a.sibling,f=f.sibling=_i(a,a.pendingProps),f.return=o;f.sibling=null}return o.child}function pm(a,o){return(a.lanes&o)!==0?!0:(a=a.dependencies,!!(a!==null&&v0(a)))}function iE(a,o,f){switch(o.tag){case 3:re(o,o.stateNode.containerInfo),Qa(o,fn,a.memoizedState.cache),Cl();break;case 27:case 5:ue(o);break;case 4:re(o,o.stateNode.containerInfo);break;case 10:Qa(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Dh(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Va(o),o.flags|=128,null):(f&o.child.childLanes)!==0?G4(a,o,f):(Va(o),a=Bi(a,o,f),a!==null?a.sibling:null);Va(o);break;case 19:var b=(a.flags&128)!==0;if(p=(f&o.childLanes)!==0,p||(xs(a,o,f,!1),p=(f&o.childLanes)!==0),b){if(p)return W4(a,o,f);o.flags|=128}if(b=o.memoizedState,b!==null&&(b.rendering=null,b.tail=null,b.lastEffect=null),L(nn,nn.current),p)break;return null;case 22:return o.lanes=0,z4(a,o,f,o.pendingProps);case 24:Qa(o,fn,a.memoizedState.cache)}return Bi(a,o,f)}function K4(a,o,f){if(a!==null)if(a.memoizedProps!==o.pendingProps)hn=!0;else{if(!pm(a,f)&&(o.flags&128)===0)return hn=!1,iE(a,o,f);hn=(a.flags&131072)!==0}else hn=!1,st&&(o.flags&1048576)!==0&&$O(o,Wo,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(a=jl(o.elementType),o.type=a,typeof a=="function")bh(a)?(p=Nl(a,p),o.tag=1,o=I4(null,o,a,p,f)):(o.tag=0,o=om(null,o,a,p,f));else{if(a!=null){var b=a.$$typeof;if(b===$){o.tag=11,o=D4(null,o,a,p,f);break e}else if(b===T){o.tag=14,o=H4(null,o,a,p,f);break e}}throw o=U(a)||a,Error(r(306,o,""))}}return o;case 0:return om(a,o,o.type,o.pendingProps,f);case 1:return p=o.type,b=Nl(p,o.pendingProps),I4(a,o,p,b,f);case 3:e:{if(re(o,o.stateNode.containerInfo),a===null)throw Error(r(387));p=o.pendingProps;var S=o.memoizedState;b=S.element,Nh(a,o),ac(o,p,null,f);var Q=o.memoizedState;if(p=Q.cache,Qa(o,fn,p),p!==S.cache&&Th(o,[fn],f,!0),ic(),p=Q.element,S.isDehydrated)if(S={element:p,isDehydrated:!1,cache:Q.cache},o.updateQueue.baseState=S,o.memoizedState=S,o.flags&256){o=q4(a,o,p,f);break e}else if(p!==b){b=Nr(Error(r(424)),o),Ko(b),o=q4(a,o,p,f);break e}else{switch(a=o.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Dt=Dr(a.firstChild),$n=o,st=!0,ja=null,Lr=!0,f=zO(o,null,p,f),o.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(Cl(),p===b){o=Bi(a,o,f);break e}Pn(a,o,p,f)}o=o.child}return o;case 26:return D0(a,o),a===null?(f=c5(o.type,null,o.pendingProps,null))?o.memoizedState=f:st||(f=o.type,a=o.pendingProps,p=r1(te.current).createElement(f),p[tn]=o,p[vn]=a,Qn(p,f,a),un(p),o.stateNode=p):o.memoizedState=c5(o.type,a.memoizedProps,o.pendingProps,a.memoizedState),null;case 27:return ue(o),a===null&&st&&(p=o.stateNode=l5(o.type,o.pendingProps,te.current),$n=o,Lr=!0,b=Dt,Ya(o.type)?(qm=b,Dt=Dr(p.firstChild)):Dt=b),Pn(a,o,o.pendingProps.children,f),D0(a,o),a===null&&(o.flags|=4194304),o.child;case 5:return a===null&&st&&((b=p=Dt)&&(p=ZE(p,o.type,o.pendingProps,Lr),p!==null?(o.stateNode=p,$n=o,Dt=Dr(p.firstChild),Lr=!1,b=!0):b=!1),b||Pa(o)),ue(o),b=o.type,S=o.pendingProps,Q=a!==null?a.memoizedProps:null,p=S.children,zm(b,S)?p=null:Q!==null&&zm(b,Q)&&(o.flags|=32),o.memoizedState!==null&&(b=Xh(a,o,GC,null,null,f),Ac._currentValue=b),D0(a,o),Pn(a,o,p,f),o.child;case 6:return a===null&&st&&((a=f=Dt)&&(f=NE(f,o.pendingProps,Lr),f!==null?(o.stateNode=f,$n=o,Dt=null,a=!0):a=!1),a||Pa(o)),null;case 13:return G4(a,o,f);case 4:return re(o,o.stateNode.containerInfo),p=o.pendingProps,a===null?o.child=Ql(o,null,p,f):Pn(a,o,p,f),o.child;case 11:return D4(a,o,o.type,o.pendingProps,f);case 7:return Pn(a,o,o.pendingProps,f),o.child;case 8:return Pn(a,o,o.pendingProps.children,f),o.child;case 12:return Pn(a,o,o.pendingProps.children,f),o.child;case 10:return p=o.pendingProps,Qa(o,o.type,p.value),Pn(a,o,p.children,f),o.child;case 9:return b=o.type._context,p=o.pendingProps.children,Tl(o),b=jn(b),p=p(b),o.flags|=1,Pn(a,o,p,f),o.child;case 14:return H4(a,o,o.type,o.pendingProps,f);case 15:return X4(a,o,o.type,o.pendingProps,f);case 19:return W4(a,o,f);case 31:return rE(a,o,f);case 22:return z4(a,o,f,o.pendingProps);case 24:return Tl(o),p=jn(fn),a===null?(b=Ph(),b===null&&(b=Zt,S=$h(),b.pooledCache=S,S.refCount++,S!==null&&(b.pooledCacheLanes|=f),b=S),o.memoizedState={parent:p,cache:b},Zh(o),Qa(o,fn,b)):((a.lanes&f)!==0&&(Nh(a,o),ac(o,null,null,f),ic()),b=a.memoizedState,S=o.memoizedState,b.parent!==p?(b={parent:p,cache:p},o.memoizedState=b,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=b),Qa(o,fn,p)):(p=S.cache,Qa(o,fn,p),p!==b.cache&&Th(o,[fn],f,!0))),Pn(a,o,o.pendingProps.children,f),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function Yi(a){a.flags|=4}function gm(a,o,f,p,b){if((o=(a.mode&32)!==0)&&(o=!1),o){if(a.flags|=16777216,(b&335544128)===b)if(a.stateNode.complete)a.flags|=8192;else if(Ax())a.flags|=8192;else throw Pl=A0,Qh}else a.flags&=-16777217}function J4(a,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!m5(o))if(Ax())a.flags|=8192;else throw Pl=A0,Qh}function X0(a,o){o!==null&&(a.flags|=4),a.flags&16384&&(o=a.tag!==22?Sa():536870912,a.lanes|=o,$s|=o)}function fc(a,o){if(!st)switch(a.tailMode){case"hidden":o=a.tail;for(var f=null;o!==null;)o.alternate!==null&&(f=o),o=o.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?o||a.tail===null?a.tail=null:a.tail.sibling=null:p.sibling=null}}function Ht(a){var o=a.alternate!==null&&a.alternate.child===a.child,f=0,p=0;if(o)for(var b=a.child;b!==null;)f|=b.lanes|b.childLanes,p|=b.subtreeFlags&65011712,p|=b.flags&65011712,b.return=a,b=b.sibling;else for(b=a.child;b!==null;)f|=b.lanes|b.childLanes,p|=b.subtreeFlags,p|=b.flags,b.return=a,b=b.sibling;return a.subtreeFlags|=p,a.childLanes=f,o}function aE(a,o,f){var p=o.pendingProps;switch(kh(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ht(o),null;case 1:return Ht(o),null;case 3:return f=o.stateNode,p=null,a!==null&&(p=a.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),Xi(fn),ae(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Os(o)?Yi(o):a===null||a.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Mh())),Ht(o),null;case 26:var b=o.type,S=o.memoizedState;return a===null?(Yi(o),S!==null?(Ht(o),J4(o,S)):(Ht(o),gm(o,b,null,p,f))):S?S!==a.memoizedState?(Yi(o),Ht(o),J4(o,S)):(Ht(o),o.flags&=-16777217):(a=a.memoizedProps,a!==p&&Yi(o),Ht(o),gm(o,b,a,p,f)),null;case 27:if(me(o),f=te.current,b=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==p&&Yi(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Ht(o),null}a=B.current,Os(o)?PO(o):(a=l5(b,p,f),o.stateNode=a,Yi(o))}return Ht(o),null;case 5:if(me(o),b=o.type,a!==null&&o.stateNode!=null)a.memoizedProps!==p&&Yi(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Ht(o),null}if(S=B.current,Os(o))PO(o);else{var Q=r1(te.current);switch(S){case 1:S=Q.createElementNS("http://www.w3.org/2000/svg",b);break;case 2:S=Q.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;default:switch(b){case"svg":S=Q.createElementNS("http://www.w3.org/2000/svg",b);break;case"math":S=Q.createElementNS("http://www.w3.org/1998/Math/MathML",b);break;case"script":S=Q.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof p.is=="string"?Q.createElement("select",{is:p.is}):Q.createElement("select"),p.multiple?S.multiple=!0:p.size&&(S.size=p.size);break;default:S=typeof p.is=="string"?Q.createElement(b,{is:p.is}):Q.createElement(b)}}S[tn]=o,S[vn]=p;e:for(Q=o.child;Q!==null;){if(Q.tag===5||Q.tag===6)S.appendChild(Q.stateNode);else if(Q.tag!==4&&Q.tag!==27&&Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===o)break e;for(;Q.sibling===null;){if(Q.return===null||Q.return===o)break e;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}o.stateNode=S;e:switch(Qn(S,b,p),b){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&Yi(o)}}return Ht(o),gm(o,o.type,a===null?null:a.memoizedProps,o.pendingProps,f),null;case 6:if(a&&o.stateNode!=null)a.memoizedProps!==p&&Yi(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(r(166));if(a=te.current,Os(o)){if(a=o.stateNode,f=o.memoizedProps,p=null,b=$n,b!==null)switch(b.tag){case 27:case 5:p=b.memoizedProps}a[tn]=o,a=!!(a.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||Gx(a.nodeValue,f)),a||Pa(o,!0)}else a=r1(a).createTextNode(p),a[tn]=o,o.stateNode=a}return Ht(o),null;case 31:if(f=o.memoizedState,a===null||a.memoizedState!==null){if(p=Os(o),f!==null){if(a===null){if(!p)throw Error(r(318));if(a=o.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[tn]=o}else Cl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ht(o),a=!1}else f=Mh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return o.flags&256?(xr(o),o):(xr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Ht(o),null;case 13:if(p=o.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(b=Os(o),p!==null&&p.dehydrated!==null){if(a===null){if(!b)throw Error(r(318));if(b=o.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(r(317));b[tn]=o}else Cl(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Ht(o),b=!1}else b=Mh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=b),b=!0;if(!b)return o.flags&256?(xr(o),o):(xr(o),null)}return xr(o),(o.flags&128)!==0?(o.lanes=f,o):(f=p!==null,a=a!==null&&a.memoizedState!==null,f&&(p=o.child,b=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(b=p.alternate.memoizedState.cachePool.pool),S=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(S=p.memoizedState.cachePool.pool),S!==b&&(p.flags|=2048)),f!==a&&f&&(o.child.flags|=8192),X0(o,o.updateQueue),Ht(o),null);case 4:return ae(),a===null&&Lm(o.stateNode.containerInfo),Ht(o),null;case 10:return Xi(o.type),Ht(o),null;case 19:if(Z(nn),p=o.memoizedState,p===null)return Ht(o),null;if(b=(o.flags&128)!==0,S=p.rendering,S===null)if(b)fc(p,!1);else{if(Ut!==0||a!==null&&(a.flags&128)!==0)for(a=o.child;a!==null;){if(S=T0(a),S!==null){for(o.flags|=128,fc(p,!1),a=S.updateQueue,o.updateQueue=a,X0(o,a),o.subtreeFlags=0,a=f,f=o.child;f!==null;)CO(f,a),f=f.sibling;return L(nn,nn.current&1|2),st&&Di(o,p.treeForkCount),o.child}a=a.sibling}p.tail!==null&&be()>I0&&(o.flags|=128,b=!0,fc(p,!1),o.lanes=4194304)}else{if(!b)if(a=T0(S),a!==null){if(o.flags|=128,b=!0,a=a.updateQueue,o.updateQueue=a,X0(o,a),fc(p,!0),p.tail===null&&p.tailMode==="hidden"&&!S.alternate&&!st)return Ht(o),null}else 2*be()-p.renderingStartTime>I0&&f!==536870912&&(o.flags|=128,b=!0,fc(p,!1),o.lanes=4194304);p.isBackwards?(S.sibling=o.child,o.child=S):(a=p.last,a!==null?a.sibling=S:o.child=S,p.last=S)}return p.tail!==null?(a=p.tail,p.rendering=a,p.tail=a.sibling,p.renderingStartTime=be(),a.sibling=null,f=nn.current,L(nn,b?f&1|2:f&1),st&&Di(o,p.treeForkCount),a):(Ht(o),null);case 22:case 23:return xr(o),_h(),p=o.memoizedState!==null,a!==null?a.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(f&536870912)!==0&&(o.flags&128)===0&&(Ht(o),o.subtreeFlags&6&&(o.flags|=8192)):Ht(o),f=o.updateQueue,f!==null&&X0(o,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==f&&(o.flags|=2048),a!==null&&Z($l),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),o.memoizedState.cache!==f&&(o.flags|=2048),Xi(fn),Ht(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function lE(a,o){switch(kh(o),o.tag){case 1:return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 3:return Xi(fn),ae(),a=o.flags,(a&65536)!==0&&(a&128)===0?(o.flags=a&-65537|128,o):null;case 26:case 27:case 5:return me(o),null;case 31:if(o.memoizedState!==null){if(xr(o),o.alternate===null)throw Error(r(340));Cl()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 13:if(xr(o),a=o.memoizedState,a!==null&&a.dehydrated!==null){if(o.alternate===null)throw Error(r(340));Cl()}return a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 19:return Z(nn),null;case 4:return ae(),null;case 10:return Xi(o.type),null;case 22:case 23:return xr(o),_h(),a!==null&&Z($l),a=o.flags,a&65536?(o.flags=a&-65537|128,o):null;case 24:return Xi(fn),null;case 25:return null;default:return null}}function ex(a,o){switch(kh(o),o.tag){case 3:Xi(fn),ae();break;case 26:case 27:case 5:me(o);break;case 4:ae();break;case 31:o.memoizedState!==null&&xr(o);break;case 13:xr(o);break;case 19:Z(nn);break;case 10:Xi(o.type);break;case 22:case 23:xr(o),_h(),a!==null&&Z($l);break;case 24:Xi(fn)}}function dc(a,o){try{var f=o.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var b=p.next;f=b;do{if((f.tag&a)===a){p=void 0;var S=f.create,Q=f.inst;p=S(),Q.destroy=p}f=f.next}while(f!==b)}}catch(_){Et(o,o.return,_)}}function _a(a,o,f){try{var p=o.updateQueue,b=p!==null?p.lastEffect:null;if(b!==null){var S=b.next;p=S;do{if((p.tag&a)===a){var Q=p.inst,_=Q.destroy;if(_!==void 0){Q.destroy=void 0,b=o;var W=f,se=_;try{se()}catch(de){Et(b,W,de)}}}p=p.next}while(p!==S)}}catch(de){Et(o,o.return,de)}}function tx(a){var o=a.updateQueue;if(o!==null){var f=a.stateNode;try{BO(o,f)}catch(p){Et(a,a.return,p)}}}function nx(a,o,f){f.props=Nl(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(p){Et(a,o,p)}}function hc(a,o){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var p=a.stateNode;break;case 30:p=a.stateNode;break;default:p=a.stateNode}typeof f=="function"?a.refCleanup=f(p):f.current=p}}catch(b){Et(a,o,b)}}function pi(a,o){var f=a.ref,p=a.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(b){Et(a,o,b)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(b){Et(a,o,b)}else f.current=null}function rx(a){var o=a.type,f=a.memoizedProps,p=a.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(b){Et(a,a.return,b)}}function Om(a,o,f){try{var p=a.stateNode;EE(p,a.type,f,o),p[vn]=o}catch(b){Et(a,a.return,b)}}function ix(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ya(a.type)||a.tag===4}function xm(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||ix(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ya(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function ym(a,o,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,o?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,o):(o=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,o.appendChild(a),f=f._reactRootContainer,f!=null||o.onclick!==null||(o.onclick=Vi));else if(p!==4&&(p===27&&Ya(a.type)&&(f=a.stateNode,o=null),a=a.child,a!==null))for(ym(a,o,f),a=a.sibling;a!==null;)ym(a,o,f),a=a.sibling}function z0(a,o,f){var p=a.tag;if(p===5||p===6)a=a.stateNode,o?f.insertBefore(a,o):f.appendChild(a);else if(p!==4&&(p===27&&Ya(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(z0(a,o,f),a=a.sibling;a!==null;)z0(a,o,f),a=a.sibling}function ax(a){var o=a.stateNode,f=a.memoizedProps;try{for(var p=a.type,b=o.attributes;b.length;)o.removeAttributeNode(b[0]);Qn(o,p,f),o[tn]=a,o[vn]=f}catch(S){Et(a,a.return,S)}}var Ii=!1,mn=!1,bm=!1,lx=typeof WeakSet=="function"?WeakSet:Set,Sn=null;function sE(a,o){if(a=a.containerInfo,Hm=u1,a=xO(a),hh(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var p=f.getSelection&&f.getSelection();if(p&&p.rangeCount!==0){f=p.anchorNode;var b=p.anchorOffset,S=p.focusNode;p=p.focusOffset;try{f.nodeType,S.nodeType}catch{f=null;break e}var Q=0,_=-1,W=-1,se=0,de=0,pe=a,oe=null;t:for(;;){for(var ce;pe!==f||b!==0&&pe.nodeType!==3||(_=Q+b),pe!==S||p!==0&&pe.nodeType!==3||(W=Q+p),pe.nodeType===3&&(Q+=pe.nodeValue.length),(ce=pe.firstChild)!==null;)oe=pe,pe=ce;for(;;){if(pe===a)break t;if(oe===f&&++se===b&&(_=Q),oe===S&&++de===p&&(W=Q),(ce=pe.nextSibling)!==null)break;pe=oe,oe=pe.parentNode}pe=ce}f=_===-1||W===-1?null:{start:_,end:W}}else f=null}f=f||{start:0,end:0}}else f=null;for(Xm={focusedElem:a,selectionRange:f},u1=!1,Sn=o;Sn!==null;)if(o=Sn,a=o.child,(o.subtreeFlags&1028)!==0&&a!==null)a.return=o,Sn=a;else for(;Sn!==null;){switch(o=Sn,S=o.alternate,a=o.flags,o.tag){case 0:if((a&4)!==0&&(a=o.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)b=a[f],b.ref.impl=b.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&S!==null){a=void 0,f=o,b=S.memoizedProps,S=S.memoizedState,p=f.stateNode;try{var Te=Nl(f.type,b);a=p.getSnapshotBeforeUpdate(Te,S),p.__reactInternalSnapshotBeforeUpdate=a}catch(He){Et(f,f.return,He)}}break;case 3:if((a&1024)!==0){if(a=o.stateNode.containerInfo,f=a.nodeType,f===9)Bm(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Bm(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=o.sibling,a!==null){a.return=o.return,Sn=a;break}Sn=o.return}}function sx(a,o,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:Gi(a,f),p&4&&dc(5,f);break;case 1:if(Gi(a,f),p&4)if(a=f.stateNode,o===null)try{a.componentDidMount()}catch(Q){Et(f,f.return,Q)}else{var b=Nl(f.type,o.memoizedProps);o=o.memoizedState;try{a.componentDidUpdate(b,o,a.__reactInternalSnapshotBeforeUpdate)}catch(Q){Et(f,f.return,Q)}}p&64&&tx(f),p&512&&hc(f,f.return);break;case 3:if(Gi(a,f),p&64&&(a=f.updateQueue,a!==null)){if(o=null,f.child!==null)switch(f.child.tag){case 27:case 5:o=f.child.stateNode;break;case 1:o=f.child.stateNode}try{BO(a,o)}catch(Q){Et(f,f.return,Q)}}break;case 27:o===null&&p&4&&ax(f);case 26:case 5:Gi(a,f),o===null&&p&4&&rx(f),p&512&&hc(f,f.return);break;case 12:Gi(a,f);break;case 31:Gi(a,f),p&4&&ux(a,f);break;case 13:Gi(a,f),p&4&&fx(a,f),p&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=gE.bind(null,f),RE(a,f))));break;case 22:if(p=f.memoizedState!==null||Ii,!p){o=o!==null&&o.memoizedState!==null||mn,b=Ii;var S=mn;Ii=p,(mn=o)&&!S?Ui(a,f,(f.subtreeFlags&8772)!==0):Gi(a,f),Ii=b,mn=S}break;case 30:break;default:Gi(a,f)}}function ox(a){var o=a.alternate;o!==null&&(a.alternate=null,ox(o)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(o=a.stateNode,o!==null&&zt(o)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Ft=null,tr=!1;function qi(a,o,f){for(f=f.child;f!==null;)cx(a,o,f),f=f.sibling}function cx(a,o,f){if(ot&&typeof ot.onCommitFiberUnmount=="function")try{ot.onCommitFiberUnmount(Mt,f)}catch{}switch(f.tag){case 26:mn||pi(f,o),qi(a,o,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:mn||pi(f,o);var p=Ft,b=tr;Ya(f.type)&&(Ft=f.stateNode,tr=!1),qi(a,o,f),Sc(f.stateNode),Ft=p,tr=b;break;case 5:mn||pi(f,o);case 6:if(p=Ft,b=tr,Ft=null,qi(a,o,f),Ft=p,tr=b,Ft!==null)if(tr)try{(Ft.nodeType===9?Ft.body:Ft.nodeName==="HTML"?Ft.ownerDocument.body:Ft).removeChild(f.stateNode)}catch(S){Et(f,o,S)}else try{Ft.removeChild(f.stateNode)}catch(S){Et(f,o,S)}break;case 18:Ft!==null&&(tr?(a=Ft,t5(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),Ls(a)):t5(Ft,f.stateNode));break;case 4:p=Ft,b=tr,Ft=f.stateNode.containerInfo,tr=!0,qi(a,o,f),Ft=p,tr=b;break;case 0:case 11:case 14:case 15:_a(2,f,o),mn||_a(4,f,o),qi(a,o,f);break;case 1:mn||(pi(f,o),p=f.stateNode,typeof p.componentWillUnmount=="function"&&nx(f,o,p)),qi(a,o,f);break;case 21:qi(a,o,f);break;case 22:mn=(p=mn)||f.memoizedState!==null,qi(a,o,f),mn=p;break;default:qi(a,o,f)}}function ux(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Ls(a)}catch(f){Et(o,o.return,f)}}}function fx(a,o){if(o.memoizedState===null&&(a=o.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Ls(a)}catch(f){Et(o,o.return,f)}}function oE(a){switch(a.tag){case 31:case 13:case 19:var o=a.stateNode;return o===null&&(o=a.stateNode=new lx),o;case 22:return a=a.stateNode,o=a._retryCache,o===null&&(o=a._retryCache=new lx),o;default:throw Error(r(435,a.tag))}}function F0(a,o){var f=oE(a);o.forEach(function(p){if(!f.has(p)){f.add(p);var b=OE.bind(null,a,p);p.then(b,b)}})}function nr(a,o){var f=o.deletions;if(f!==null)for(var p=0;p<f.length;p++){var b=f[p],S=a,Q=o,_=Q;e:for(;_!==null;){switch(_.tag){case 27:if(Ya(_.type)){Ft=_.stateNode,tr=!1;break e}break;case 5:Ft=_.stateNode,tr=!1;break e;case 3:case 4:Ft=_.stateNode.containerInfo,tr=!0;break e}_=_.return}if(Ft===null)throw Error(r(160));cx(S,Q,b),Ft=null,tr=!1,S=b.alternate,S!==null&&(S.return=null),b.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)dx(o,a),o=o.sibling}var ei=null;function dx(a,o){var f=a.alternate,p=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:nr(o,a),rr(a),p&4&&(_a(3,a,a.return),dc(3,a),_a(5,a,a.return));break;case 1:nr(o,a),rr(a),p&512&&(mn||f===null||pi(f,f.return)),p&64&&Ii&&(a=a.updateQueue,a!==null&&(p=a.callbacks,p!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?p:f.concat(p))));break;case 26:var b=ei;if(nr(o,a),rr(a),p&512&&(mn||f===null||pi(f,f.return)),p&4){var S=f!==null?f.memoizedState:null;if(p=a.memoizedState,f===null)if(p===null)if(a.stateNode===null){e:{p=a.type,f=a.memoizedProps,b=b.ownerDocument||b;t:switch(p){case"title":S=b.getElementsByTagName("title")[0],(!S||S[ct]||S[tn]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=b.createElement(p),b.head.insertBefore(S,b.querySelector("head > title"))),Qn(S,p,f),S[tn]=a,un(S),p=S;break e;case"link":var Q=d5("link","href",b).get(p+(f.href||""));if(Q){for(var _=0;_<Q.length;_++)if(S=Q[_],S.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&S.getAttribute("rel")===(f.rel==null?null:f.rel)&&S.getAttribute("title")===(f.title==null?null:f.title)&&S.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){Q.splice(_,1);break t}}S=b.createElement(p),Qn(S,p,f),b.head.appendChild(S);break;case"meta":if(Q=d5("meta","content",b).get(p+(f.content||""))){for(_=0;_<Q.length;_++)if(S=Q[_],S.getAttribute("content")===(f.content==null?null:""+f.content)&&S.getAttribute("name")===(f.name==null?null:f.name)&&S.getAttribute("property")===(f.property==null?null:f.property)&&S.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&S.getAttribute("charset")===(f.charSet==null?null:f.charSet)){Q.splice(_,1);break t}}S=b.createElement(p),Qn(S,p,f),b.head.appendChild(S);break;default:throw Error(r(468,p))}S[tn]=a,un(S),p=S}a.stateNode=p}else h5(b,a.type,a.stateNode);else a.stateNode=f5(b,p,a.memoizedProps);else S!==p?(S===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):S.count--,p===null?h5(b,a.type,a.stateNode):f5(b,p,a.memoizedProps)):p===null&&a.stateNode!==null&&Om(a,a.memoizedProps,f.memoizedProps)}break;case 27:nr(o,a),rr(a),p&512&&(mn||f===null||pi(f,f.return)),f!==null&&p&4&&Om(a,a.memoizedProps,f.memoizedProps);break;case 5:if(nr(o,a),rr(a),p&512&&(mn||f===null||pi(f,f.return)),a.flags&32){b=a.stateNode;try{ss(b,"")}catch(Te){Et(a,a.return,Te)}}p&4&&a.stateNode!=null&&(b=a.memoizedProps,Om(a,b,f!==null?f.memoizedProps:b)),p&1024&&(bm=!0);break;case 6:if(nr(o,a),rr(a),p&4){if(a.stateNode===null)throw Error(r(162));p=a.memoizedProps,f=a.stateNode;try{f.nodeValue=p}catch(Te){Et(a,a.return,Te)}}break;case 3:if(l1=null,b=ei,ei=i1(o.containerInfo),nr(o,a),ei=b,rr(a),p&4&&f!==null&&f.memoizedState.isDehydrated)try{Ls(o.containerInfo)}catch(Te){Et(a,a.return,Te)}bm&&(bm=!1,hx(a));break;case 4:p=ei,ei=i1(a.stateNode.containerInfo),nr(o,a),rr(a),ei=p;break;case 12:nr(o,a),rr(a);break;case 31:nr(o,a),rr(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,F0(a,p)));break;case 13:nr(o,a),rr(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Y0=be()),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,F0(a,p)));break;case 22:b=a.memoizedState!==null;var W=f!==null&&f.memoizedState!==null,se=Ii,de=mn;if(Ii=se||b,mn=de||W,nr(o,a),mn=de,Ii=se,rr(a),p&8192)e:for(o=a.stateNode,o._visibility=b?o._visibility&-2:o._visibility|1,b&&(f===null||W||Ii||mn||Rl(a)),f=null,o=a;;){if(o.tag===5||o.tag===26){if(f===null){W=f=o;try{if(S=W.stateNode,b)Q=S.style,typeof Q.setProperty=="function"?Q.setProperty("display","none","important"):Q.display="none";else{_=W.stateNode;var pe=W.memoizedProps.style,oe=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;_.style.display=oe==null||typeof oe=="boolean"?"":(""+oe).trim()}}catch(Te){Et(W,W.return,Te)}}}else if(o.tag===6){if(f===null){W=o;try{W.stateNode.nodeValue=b?"":W.memoizedProps}catch(Te){Et(W,W.return,Te)}}}else if(o.tag===18){if(f===null){W=o;try{var ce=W.stateNode;b?n5(ce,!0):n5(W.stateNode,!1)}catch(Te){Et(W,W.return,Te)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===a)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;f===o&&(f=null),o=o.return}f===o&&(f=null),o.sibling.return=o.return,o=o.sibling}p&4&&(p=a.updateQueue,p!==null&&(f=p.retryQueue,f!==null&&(p.retryQueue=null,F0(a,f))));break;case 19:nr(o,a),rr(a),p&4&&(p=a.updateQueue,p!==null&&(a.updateQueue=null,F0(a,p)));break;case 30:break;case 21:break;default:nr(o,a),rr(a)}}function rr(a){var o=a.flags;if(o&2){try{for(var f,p=a.return;p!==null;){if(ix(p)){f=p;break}p=p.return}if(f==null)throw Error(r(160));switch(f.tag){case 27:var b=f.stateNode,S=xm(a);z0(a,S,b);break;case 5:var Q=f.stateNode;f.flags&32&&(ss(Q,""),f.flags&=-33);var _=xm(a);z0(a,_,Q);break;case 3:case 4:var W=f.stateNode.containerInfo,se=xm(a);ym(a,se,W);break;default:throw Error(r(161))}}catch(de){Et(a,a.return,de)}a.flags&=-3}o&4096&&(a.flags&=-4097)}function hx(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var o=a;hx(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),a=a.sibling}}function Gi(a,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)sx(a,o.alternate,o),o=o.sibling}function Rl(a){for(a=a.child;a!==null;){var o=a;switch(o.tag){case 0:case 11:case 14:case 15:_a(4,o,o.return),Rl(o);break;case 1:pi(o,o.return);var f=o.stateNode;typeof f.componentWillUnmount=="function"&&nx(o,o.return,f),Rl(o);break;case 27:Sc(o.stateNode);case 26:case 5:pi(o,o.return),Rl(o);break;case 22:o.memoizedState===null&&Rl(o);break;case 30:Rl(o);break;default:Rl(o)}a=a.sibling}}function Ui(a,o,f){for(f=f&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,b=a,S=o,Q=S.flags;switch(S.tag){case 0:case 11:case 15:Ui(b,S,f),dc(4,S);break;case 1:if(Ui(b,S,f),p=S,b=p.stateNode,typeof b.componentDidMount=="function")try{b.componentDidMount()}catch(se){Et(p,p.return,se)}if(p=S,b=p.updateQueue,b!==null){var _=p.stateNode;try{var W=b.shared.hiddenCallbacks;if(W!==null)for(b.shared.hiddenCallbacks=null,b=0;b<W.length;b++)FO(W[b],_)}catch(se){Et(p,p.return,se)}}f&&Q&64&&tx(S),hc(S,S.return);break;case 27:ax(S);case 26:case 5:Ui(b,S,f),f&&p===null&&Q&4&&rx(S),hc(S,S.return);break;case 12:Ui(b,S,f);break;case 31:Ui(b,S,f),f&&Q&4&&ux(b,S);break;case 13:Ui(b,S,f),f&&Q&4&&fx(b,S);break;case 22:S.memoizedState===null&&Ui(b,S,f),hc(S,S.return);break;case 30:break;default:Ui(b,S,f)}o=o.sibling}}function vm(a,o){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(a=o.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&Jo(f))}function Sm(a,o){a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Jo(a))}function ti(a,o,f,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)mx(a,o,f,p),o=o.sibling}function mx(a,o,f,p){var b=o.flags;switch(o.tag){case 0:case 11:case 15:ti(a,o,f,p),b&2048&&dc(9,o);break;case 1:ti(a,o,f,p);break;case 3:ti(a,o,f,p),b&2048&&(a=null,o.alternate!==null&&(a=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==a&&(o.refCount++,a!=null&&Jo(a)));break;case 12:if(b&2048){ti(a,o,f,p),a=o.stateNode;try{var S=o.memoizedProps,Q=S.id,_=S.onPostCommit;typeof _=="function"&&_(Q,o.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(W){Et(o,o.return,W)}}else ti(a,o,f,p);break;case 31:ti(a,o,f,p);break;case 13:ti(a,o,f,p);break;case 23:break;case 22:S=o.stateNode,Q=o.alternate,o.memoizedState!==null?S._visibility&2?ti(a,o,f,p):mc(a,o):S._visibility&2?ti(a,o,f,p):(S._visibility|=2,Cs(a,o,f,p,(o.subtreeFlags&10256)!==0||!1)),b&2048&&vm(Q,o);break;case 24:ti(a,o,f,p),b&2048&&Sm(o.alternate,o);break;default:ti(a,o,f,p)}}function Cs(a,o,f,p,b){for(b=b&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var S=a,Q=o,_=f,W=p,se=Q.flags;switch(Q.tag){case 0:case 11:case 15:Cs(S,Q,_,W,b),dc(8,Q);break;case 23:break;case 22:var de=Q.stateNode;Q.memoizedState!==null?de._visibility&2?Cs(S,Q,_,W,b):mc(S,Q):(de._visibility|=2,Cs(S,Q,_,W,b)),b&&se&2048&&vm(Q.alternate,Q);break;case 24:Cs(S,Q,_,W,b),b&&se&2048&&Sm(Q.alternate,Q);break;default:Cs(S,Q,_,W,b)}o=o.sibling}}function mc(a,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var f=a,p=o,b=p.flags;switch(p.tag){case 22:mc(f,p),b&2048&&vm(p.alternate,p);break;case 24:mc(f,p),b&2048&&Sm(p.alternate,p);break;default:mc(f,p)}o=o.sibling}}var pc=8192;function Es(a,o,f){if(a.subtreeFlags&pc)for(a=a.child;a!==null;)px(a,o,f),a=a.sibling}function px(a,o,f){switch(a.tag){case 26:Es(a,o,f),a.flags&pc&&a.memoizedState!==null&&qE(f,ei,a.memoizedState,a.memoizedProps);break;case 5:Es(a,o,f);break;case 3:case 4:var p=ei;ei=i1(a.stateNode.containerInfo),Es(a,o,f),ei=p;break;case 22:a.memoizedState===null&&(p=a.alternate,p!==null&&p.memoizedState!==null?(p=pc,pc=16777216,Es(a,o,f),pc=p):Es(a,o,f));break;default:Es(a,o,f)}}function gx(a){var o=a.alternate;if(o!==null&&(a=o.child,a!==null)){o.child=null;do o=a.sibling,a.sibling=null,a=o;while(a!==null)}}function gc(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var f=0;f<o.length;f++){var p=o[f];Sn=p,xx(p,a)}gx(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Ox(a),a=a.sibling}function Ox(a){switch(a.tag){case 0:case 11:case 15:gc(a),a.flags&2048&&_a(9,a,a.return);break;case 3:gc(a);break;case 12:gc(a);break;case 22:var o=a.stateNode;a.memoizedState!==null&&o._visibility&2&&(a.return===null||a.return.tag!==13)?(o._visibility&=-3,B0(a)):gc(a);break;default:gc(a)}}function B0(a){var o=a.deletions;if((a.flags&16)!==0){if(o!==null)for(var f=0;f<o.length;f++){var p=o[f];Sn=p,xx(p,a)}gx(a)}for(a=a.child;a!==null;){switch(o=a,o.tag){case 0:case 11:case 15:_a(8,o,o.return),B0(o);break;case 22:f=o.stateNode,f._visibility&2&&(f._visibility&=-3,B0(o));break;default:B0(o)}a=a.sibling}}function xx(a,o){for(;Sn!==null;){var f=Sn;switch(f.tag){case 0:case 11:case 15:_a(8,f,o);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Jo(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,Sn=p;else e:for(f=a;Sn!==null;){p=Sn;var b=p.sibling,S=p.return;if(ox(p),p===f){Sn=null;break e}if(b!==null){b.return=S,Sn=b;break e}Sn=S}}}var cE={getCacheForType:function(a){var o=jn(fn),f=o.data.get(a);return f===void 0&&(f=a(),o.data.set(a,f)),f},cacheSignal:function(){return jn(fn).controller.signal}},uE=typeof WeakMap=="function"?WeakMap:Map,kt=0,Zt=null,et=null,it=0,Ct=0,yr=null,Da=!1,Ts=!1,wm=!1,Wi=0,Ut=0,Ha=0,Vl=0,km=0,br=0,$s=0,Oc=null,ir=null,Am=!1,Y0=0,yx=0,I0=1/0,q0=null,Xa=null,On=0,za=null,js=null,Ki=0,Mm=0,Cm=null,bx=null,xc=0,Em=null;function vr(){return(kt&2)!==0&&it!==0?it&-it:H.T!==null?Zm():mr()}function vx(){if(br===0)if((it&536870912)===0||st){var a=Je;Je<<=1,(Je&3932160)===0&&(Je=262144),br=a}else br=536870912;return a=Or.current,a!==null&&(a.flags|=32),br}function ar(a,o,f){(a===Zt&&(Ct===2||Ct===9)||a.cancelPendingCommit!==null)&&(Ps(a,0),Fa(a,it,br,!1)),En(a,f),((kt&2)===0||a!==Zt)&&(a===Zt&&((kt&2)===0&&(Vl|=f),Ut===4&&Fa(a,it,br,!1)),gi(a))}function Sx(a,o,f){if((kt&6)!==0)throw Error(r(327));var p=!f&&(o&127)===0&&(o&a.expiredLanes)===0||Bn(a,o),b=p?hE(a,o):$m(a,o,!0),S=p;do{if(b===0){Ts&&!p&&Fa(a,o,0,!1);break}else{if(f=a.current.alternate,S&&!fE(f)){b=$m(a,o,!1),S=!1;continue}if(b===2){if(S=o,a.errorRecoveryDisabledLanes&S)var Q=0;else Q=a.pendingLanes&-536870913,Q=Q!==0?Q:Q&536870912?536870912:0;if(Q!==0){o=Q;e:{var _=a;b=Oc;var W=_.current.memoizedState.isDehydrated;if(W&&(Ps(_,Q).flags|=256),Q=$m(_,Q,!1),Q!==2){if(wm&&!W){_.errorRecoveryDisabledLanes|=S,Vl|=S,b=4;break e}S=ir,ir=b,S!==null&&(ir===null?ir=S:ir.push.apply(ir,S))}b=Q}if(S=!1,b!==2)continue}}if(b===1){Ps(a,0),Fa(a,o,0,!0);break}e:{switch(p=a,S=b,S){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:Fa(p,o,br,!Da);break e;case 2:ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(b=Y0+300-be(),10<b)){if(Fa(p,o,br,!Da),cn(p,0,!0)!==0)break e;Ki=o,p.timeoutHandle=Jx(wx.bind(null,p,f,ir,q0,Am,o,br,Vl,$s,Da,S,"Throttled",-0,0),b);break e}wx(p,f,ir,q0,Am,o,br,Vl,$s,Da,S,null,-0,0)}}break}while(!0);gi(a)}function wx(a,o,f,p,b,S,Q,_,W,se,de,pe,oe,ce){if(a.timeoutHandle=-1,pe=o.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Vi},px(o,S,pe);var Te=(S&62914560)===S?Y0-be():(S&4194048)===S?yx-be():0;if(Te=GE(pe,Te),Te!==null){Ki=S,a.cancelPendingCommit=Te(jx.bind(null,a,o,S,f,p,b,Q,_,W,de,pe,null,oe,ce)),Fa(a,S,Q,!se);return}}jx(a,o,S,f,p,b,Q,_,W)}function fE(a){for(var o=a;;){var f=o.tag;if((f===0||f===11||f===15)&&o.flags&16384&&(f=o.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var b=f[p],S=b.getSnapshot;b=b.value;try{if(!pr(S(),b))return!1}catch{return!1}}if(f=o.child,o.subtreeFlags&16384&&f!==null)f.return=o,o=f;else{if(o===a)break;for(;o.sibling===null;){if(o.return===null||o.return===a)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Fa(a,o,f,p){o&=~km,o&=~Vl,a.suspendedLanes|=o,a.pingedLanes&=~o,p&&(a.warmLanes|=o),p=a.expirationTimes;for(var b=o;0<b;){var S=31-ze(b),Q=1<<S;p[S]=-1,b&=~Q}f!==0&&wa(a,f,o)}function G0(){return(kt&6)===0?(yc(0),!1):!0}function Tm(){if(et!==null){if(Ct===0)var a=et.return;else a=et,Hi=El=null,Bh(a),Ss=null,tc=0,a=et;for(;a!==null;)ex(a.alternate,a),a=a.return;et=null}}function Ps(a,o){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,jE(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),Ki=0,Tm(),Zt=a,et=f=_i(a.current,null),it=o,Ct=0,yr=null,Da=!1,Ts=Bn(a,o),wm=!1,$s=br=km=Vl=Ha=Ut=0,ir=Oc=null,Am=!1,(o&8)!==0&&(o|=o&32);var p=a.entangledLanes;if(p!==0)for(a=a.entanglements,p&=o;0<p;){var b=31-ze(p),S=1<<b;o|=a[b],p&=~S}return Wi=o,g0(),f}function kx(a,o){Ge=null,H.H=cc,o===vs||o===k0?(o=DO(),Ct=3):o===Qh?(o=DO(),Ct=4):Ct=o===sm?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,yr=o,et===null&&(Ut=1,L0(a,Nr(o,a.current)))}function Ax(){var a=Or.current;return a===null?!0:(it&4194048)===it?_r===null:(it&62914560)===it||(it&536870912)!==0?a===_r:!1}function Mx(){var a=H.H;return H.H=cc,a===null?cc:a}function Cx(){var a=H.A;return H.A=cE,a}function U0(){Ut=4,Da||(it&4194048)!==it&&Or.current!==null||(Ts=!0),(Ha&134217727)===0&&(Vl&134217727)===0||Zt===null||Fa(Zt,it,br,!1)}function $m(a,o,f){var p=kt;kt|=2;var b=Mx(),S=Cx();(Zt!==a||it!==o)&&(q0=null,Ps(a,o)),o=!1;var Q=Ut;e:do try{if(Ct!==0&&et!==null){var _=et,W=yr;switch(Ct){case 8:Tm(),Q=6;break e;case 3:case 2:case 9:case 6:Or.current===null&&(o=!0);var se=Ct;if(Ct=0,yr=null,Qs(a,_,W,se),f&&Ts){Q=0;break e}break;default:se=Ct,Ct=0,yr=null,Qs(a,_,W,se)}}dE(),Q=Ut;break}catch(de){kx(a,de)}while(!0);return o&&a.shellSuspendCounter++,Hi=El=null,kt=p,H.H=b,H.A=S,et===null&&(Zt=null,it=0,g0()),Q}function dE(){for(;et!==null;)Ex(et)}function hE(a,o){var f=kt;kt|=2;var p=Mx(),b=Cx();Zt!==a||it!==o?(q0=null,I0=be()+500,Ps(a,o)):Ts=Bn(a,o);e:do try{if(Ct!==0&&et!==null){o=et;var S=yr;t:switch(Ct){case 1:Ct=0,yr=null,Qs(a,o,S,1);break;case 2:case 9:if(LO(S)){Ct=0,yr=null,Tx(o);break}o=function(){Ct!==2&&Ct!==9||Zt!==a||(Ct=7),gi(a)},S.then(o,o);break e;case 3:Ct=7;break e;case 4:Ct=5;break e;case 7:LO(S)?(Ct=0,yr=null,Tx(o)):(Ct=0,yr=null,Qs(a,o,S,7));break;case 5:var Q=null;switch(et.tag){case 26:Q=et.memoizedState;case 5:case 27:var _=et;if(Q?m5(Q):_.stateNode.complete){Ct=0,yr=null;var W=_.sibling;if(W!==null)et=W;else{var se=_.return;se!==null?(et=se,W0(se)):et=null}break t}}Ct=0,yr=null,Qs(a,o,S,5);break;case 6:Ct=0,yr=null,Qs(a,o,S,6);break;case 8:Tm(),Ut=6;break e;default:throw Error(r(462))}}mE();break}catch(de){kx(a,de)}while(!0);return Hi=El=null,H.H=p,H.A=b,kt=f,et!==null?0:(Zt=null,it=0,g0(),Ut)}function mE(){for(;et!==null&&!Ye();)Ex(et)}function Ex(a){var o=K4(a.alternate,a,Wi);a.memoizedProps=a.pendingProps,o===null?W0(a):et=o}function Tx(a){var o=a,f=o.alternate;switch(o.tag){case 15:case 0:o=Y4(f,o,o.pendingProps,o.type,void 0,it);break;case 11:o=Y4(f,o,o.pendingProps,o.type.render,o.ref,it);break;case 5:Bh(o);default:ex(f,o),o=et=CO(o,Wi),o=K4(f,o,Wi)}a.memoizedProps=a.pendingProps,o===null?W0(a):et=o}function Qs(a,o,f,p){Hi=El=null,Bh(o),Ss=null,tc=0;var b=o.return;try{if(nE(a,b,o,f,it)){Ut=1,L0(a,Nr(f,a.current)),et=null;return}}catch(S){if(b!==null)throw et=b,S;Ut=1,L0(a,Nr(f,a.current)),et=null;return}o.flags&32768?(st||p===1?a=!0:Ts||(it&536870912)!==0?a=!1:(Da=a=!0,(p===2||p===9||p===3||p===6)&&(p=Or.current,p!==null&&p.tag===13&&(p.flags|=16384))),$x(o,a)):W0(o)}function W0(a){var o=a;do{if((o.flags&32768)!==0){$x(o,Da);return}a=o.return;var f=aE(o.alternate,o,Wi);if(f!==null){et=f;return}if(o=o.sibling,o!==null){et=o;return}et=o=a}while(o!==null);Ut===0&&(Ut=5)}function $x(a,o){do{var f=lE(a.alternate,a);if(f!==null){f.flags&=32767,et=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!o&&(a=a.sibling,a!==null)){et=a;return}et=a=f}while(a!==null);Ut=6,et=null}function jx(a,o,f,p,b,S,Q,_,W){a.cancelPendingCommit=null;do K0();while(On!==0);if((kt&6)!==0)throw Error(r(327));if(o!==null){if(o===a.current)throw Error(r(177));if(S=o.lanes|o.childLanes,S|=xh,di(a,f,S,Q,_,W),a===Zt&&(et=Zt=null,it=0),js=o,za=a,Ki=f,Mm=S,Cm=b,bx=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,xE(Re,function(){return Rx(),null})):(a.callbackNode=null,a.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=H.T,H.T=null,b=q.p,q.p=2,Q=kt,kt|=4;try{sE(a,o,f)}finally{kt=Q,q.p=b,H.T=p}}On=1,Px(),Qx(),Zx()}}function Px(){if(On===1){On=0;var a=za,o=js,f=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||f){f=H.T,H.T=null;var p=q.p;q.p=2;var b=kt;kt|=4;try{dx(o,a);var S=Xm,Q=xO(a.containerInfo),_=S.focusedElem,W=S.selectionRange;if(Q!==_&&_&&_.ownerDocument&&OO(_.ownerDocument.documentElement,_)){if(W!==null&&hh(_)){var se=W.start,de=W.end;if(de===void 0&&(de=se),"selectionStart"in _)_.selectionStart=se,_.selectionEnd=Math.min(de,_.value.length);else{var pe=_.ownerDocument||document,oe=pe&&pe.defaultView||window;if(oe.getSelection){var ce=oe.getSelection(),Te=_.textContent.length,He=Math.min(W.start,Te),Qt=W.end===void 0?He:Math.min(W.end,Te);!ce.extend&&He>Qt&&(Q=Qt,Qt=He,He=Q);var ie=gO(_,He),ne=gO(_,Qt);if(ie&&ne&&(ce.rangeCount!==1||ce.anchorNode!==ie.node||ce.anchorOffset!==ie.offset||ce.focusNode!==ne.node||ce.focusOffset!==ne.offset)){var le=pe.createRange();le.setStart(ie.node,ie.offset),ce.removeAllRanges(),He>Qt?(ce.addRange(le),ce.extend(ne.node,ne.offset)):(le.setEnd(ne.node,ne.offset),ce.addRange(le))}}}}for(pe=[],ce=_;ce=ce.parentNode;)ce.nodeType===1&&pe.push({element:ce,left:ce.scrollLeft,top:ce.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<pe.length;_++){var he=pe[_];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}u1=!!Hm,Xm=Hm=null}finally{kt=b,q.p=p,H.T=f}}a.current=o,On=2}}function Qx(){if(On===2){On=0;var a=za,o=js,f=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||f){f=H.T,H.T=null;var p=q.p;q.p=2;var b=kt;kt|=4;try{sx(a,o.alternate,o)}finally{kt=b,q.p=p,H.T=f}}On=3}}function Zx(){if(On===4||On===3){On=0,_e();var a=za,o=js,f=Ki,p=bx;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?On=5:(On=0,js=za=null,Nx(a,a.pendingLanes));var b=a.pendingLanes;if(b===0&&(Xa=null),bn(f),o=o.stateNode,ot&&typeof ot.onCommitFiberRoot=="function")try{ot.onCommitFiberRoot(Mt,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=H.T,b=q.p,q.p=2,H.T=null;try{for(var S=a.onRecoverableError,Q=0;Q<p.length;Q++){var _=p[Q];S(_.value,{componentStack:_.stack})}}finally{H.T=o,q.p=b}}(Ki&3)!==0&&K0(),gi(a),b=a.pendingLanes,(f&261930)!==0&&(b&42)!==0?a===Em?xc++:(xc=0,Em=a):xc=0,yc(0)}}function Nx(a,o){(a.pooledCacheLanes&=o)===0&&(o=a.pooledCache,o!=null&&(a.pooledCache=null,Jo(o)))}function K0(){return Px(),Qx(),Zx(),Rx()}function Rx(){if(On!==5)return!1;var a=za,o=Mm;Mm=0;var f=bn(Ki),p=H.T,b=q.p;try{q.p=32>f?32:f,H.T=null,f=Cm,Cm=null;var S=za,Q=Ki;if(On=0,js=za=null,Ki=0,(kt&6)!==0)throw Error(r(331));var _=kt;if(kt|=4,Ox(S.current),mx(S,S.current,Q,f),kt=_,yc(0,!1),ot&&typeof ot.onPostCommitFiberRoot=="function")try{ot.onPostCommitFiberRoot(Mt,S)}catch{}return!0}finally{q.p=b,H.T=p,Nx(a,o)}}function Vx(a,o,f){o=Nr(f,o),o=lm(a.stateNode,o,2),a=Ra(a,o,2),a!==null&&(En(a,2),gi(a))}function Et(a,o,f){if(a.tag===3)Vx(a,a,f);else for(;o!==null;){if(o.tag===3){Vx(o,a,f);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Xa===null||!Xa.has(p))){a=Nr(f,a),f=L4(2),p=Ra(o,f,2),p!==null&&(_4(f,p,o,a),En(p,2),gi(p));break}}o=o.return}}function jm(a,o,f){var p=a.pingCache;if(p===null){p=a.pingCache=new uE;var b=new Set;p.set(o,b)}else b=p.get(o),b===void 0&&(b=new Set,p.set(o,b));b.has(f)||(wm=!0,b.add(f),a=pE.bind(null,a,o,f),o.then(a,a))}function pE(a,o,f){var p=a.pingCache;p!==null&&p.delete(o),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,Zt===a&&(it&f)===f&&(Ut===4||Ut===3&&(it&62914560)===it&&300>be()-Y0?(kt&2)===0&&Ps(a,0):km|=f,$s===it&&($s=0)),gi(a)}function Lx(a,o){o===0&&(o=Sa()),a=Al(a,o),a!==null&&(En(a,o),gi(a))}function gE(a){var o=a.memoizedState,f=0;o!==null&&(f=o.retryLane),Lx(a,f)}function OE(a,o){var f=0;switch(a.tag){case 31:case 13:var p=a.stateNode,b=a.memoizedState;b!==null&&(f=b.retryLane);break;case 19:p=a.stateNode;break;case 22:p=a.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(o),Lx(a,f)}function xE(a,o){return yt(a,o)}var J0=null,Zs=null,Pm=!1,e1=!1,Qm=!1,Ba=0;function gi(a){a!==Zs&&a.next===null&&(Zs===null?J0=Zs=a:Zs=Zs.next=a),e1=!0,Pm||(Pm=!0,bE())}function yc(a,o){if(!Qm&&e1){Qm=!0;do for(var f=!1,p=J0;p!==null;){if(a!==0){var b=p.pendingLanes;if(b===0)var S=0;else{var Q=p.suspendedLanes,_=p.pingedLanes;S=(1<<31-ze(42|a)+1)-1,S&=b&~(Q&~_),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(f=!0,Xx(p,S))}else S=it,S=cn(p,p===Zt?S:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(S&3)===0||Bn(p,S)||(f=!0,Xx(p,S));p=p.next}while(f);Qm=!1}}function yE(){_x()}function _x(){e1=Pm=!1;var a=0;Ba!==0&&$E()&&(a=Ba);for(var o=be(),f=null,p=J0;p!==null;){var b=p.next,S=Dx(p,o);S===0?(p.next=null,f===null?J0=b:f.next=b,b===null&&(Zs=f)):(f=p,(a!==0||(S&3)!==0)&&(e1=!0)),p=b}On!==0&&On!==5||yc(a),Ba!==0&&(Ba=0)}function Dx(a,o){for(var f=a.suspendedLanes,p=a.pingedLanes,b=a.expirationTimes,S=a.pendingLanes&-62914561;0<S;){var Q=31-ze(S),_=1<<Q,W=b[Q];W===-1?((_&f)===0||(_&p)!==0)&&(b[Q]=bl(_,o)):W<=o&&(a.expiredLanes|=_),S&=~_}if(o=Zt,f=it,f=cn(a,a===o?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p=a.callbackNode,f===0||a===o&&(Ct===2||Ct===9)||a.cancelPendingCommit!==null)return p!==null&&p!==null&&Le(p),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||Bn(a,f)){if(o=f&-f,o===a.callbackPriority)return o;switch(p!==null&&Le(p),bn(f)){case 2:case 8:f=bt;break;case 32:f=Re;break;case 268435456:f=Rt;break;default:f=Re}return p=Hx.bind(null,a),f=yt(f,p),a.callbackPriority=o,a.callbackNode=f,o}return p!==null&&p!==null&&Le(p),a.callbackPriority=2,a.callbackNode=null,2}function Hx(a,o){if(On!==0&&On!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(K0()&&a.callbackNode!==f)return null;var p=it;return p=cn(a,a===Zt?p:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),p===0?null:(Sx(a,p,o),Dx(a,be()),a.callbackNode!=null&&a.callbackNode===f?Hx.bind(null,a):null)}function Xx(a,o){if(K0())return null;Sx(a,o,!0)}function bE(){PE(function(){(kt&6)!==0?yt(Ue,yE):_x()})}function Zm(){if(Ba===0){var a=ys;a===0&&(a=lt,lt<<=1,(lt&261888)===0&&(lt=256)),Ba=a}return Ba}function zx(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:o0(""+a)}function Fx(a,o){var f=o.ownerDocument.createElement("input");return f.name=o.name,f.value=o.value,a.id&&f.setAttribute("form",a.id),o.parentNode.insertBefore(f,o),a=new FormData(a),f.parentNode.removeChild(f),a}function vE(a,o,f,p,b){if(o==="submit"&&f&&f.stateNode===b){var S=zx((b[vn]||null).action),Q=p.submitter;Q&&(o=(o=Q[vn]||null)?zx(o.formAction):Q.getAttribute("formAction"),o!==null&&(S=o,Q=null));var _=new d0("action","action",null,p,b);a.push({event:_,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(Ba!==0){var W=Q?Fx(b,Q):new FormData(b);em(f,{pending:!0,data:W,method:b.method,action:S},null,W)}}else typeof S=="function"&&(_.preventDefault(),W=Q?Fx(b,Q):new FormData(b),em(f,{pending:!0,data:W,method:b.method,action:S},S,W))},currentTarget:b}]})}}for(var Nm=0;Nm<Oh.length;Nm++){var Rm=Oh[Nm],SE=Rm.toLowerCase(),wE=Rm[0].toUpperCase()+Rm.slice(1);Jr(SE,"on"+wE)}Jr(vO,"onAnimationEnd"),Jr(SO,"onAnimationIteration"),Jr(wO,"onAnimationStart"),Jr("dblclick","onDoubleClick"),Jr("focusin","onFocus"),Jr("focusout","onBlur"),Jr(_C,"onTransitionRun"),Jr(DC,"onTransitionStart"),Jr(HC,"onTransitionCancel"),Jr(kO,"onTransitionEnd"),Ca("onMouseEnter",["mouseout","mouseover"]),Ca("onMouseLeave",["mouseout","mouseover"]),Ca("onPointerEnter",["pointerout","pointerover"]),Ca("onPointerLeave",["pointerout","pointerover"]),Ri("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ri("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ri("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ri("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ri("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var bc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),kE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(bc));function Bx(a,o){o=(o&4)!==0;for(var f=0;f<a.length;f++){var p=a[f],b=p.event;p=p.listeners;e:{var S=void 0;if(o)for(var Q=p.length-1;0<=Q;Q--){var _=p[Q],W=_.instance,se=_.currentTarget;if(_=_.listener,W!==S&&b.isPropagationStopped())break e;S=_,b.currentTarget=se;try{S(b)}catch(de){p0(de)}b.currentTarget=null,S=W}else for(Q=0;Q<p.length;Q++){if(_=p[Q],W=_.instance,se=_.currentTarget,_=_.listener,W!==S&&b.isPropagationStopped())break e;S=_,b.currentTarget=se;try{S(b)}catch(de){p0(de)}b.currentTarget=null,S=W}}}}function tt(a,o){var f=o[Aa];f===void 0&&(f=o[Aa]=new Set);var p=a+"__bubble";f.has(p)||(Yx(o,a,2,!1),f.add(p))}function Vm(a,o,f){var p=0;o&&(p|=4),Yx(f,a,p,o)}var t1="_reactListening"+Math.random().toString(36).slice(2);function Lm(a){if(!a[t1]){a[t1]=!0,r0.forEach(function(f){f!=="selectionchange"&&(kE.has(f)||Vm(f,!1,a),Vm(f,!0,a))});var o=a.nodeType===9?a:a.ownerDocument;o===null||o[t1]||(o[t1]=!0,Vm("selectionchange",!1,o))}}function Yx(a,o,f,p){switch(v5(o)){case 2:var b=KE;break;case 8:b=JE;break;default:b=Jm}f=b.bind(null,o,f,a),b=void 0,!ih||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(b=!0),p?b!==void 0?a.addEventListener(o,f,{capture:!0,passive:b}):a.addEventListener(o,f,!0):b!==void 0?a.addEventListener(o,f,{passive:b}):a.addEventListener(o,f,!1)}function _m(a,o,f,p,b){var S=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var Q=p.tag;if(Q===3||Q===4){var _=p.stateNode.containerInfo;if(_===b)break;if(Q===4)for(Q=p.return;Q!==null;){var W=Q.tag;if((W===3||W===4)&&Q.stateNode.containerInfo===b)return;Q=Q.return}for(;_!==null;){if(Q=Tn(_),Q===null)return;if(W=Q.tag,W===5||W===6||W===26||W===27){p=S=Q;continue e}_=_.parentNode}}p=p.return}W6(function(){var se=S,de=nh(f),pe=[];e:{var oe=AO.get(a);if(oe!==void 0){var ce=d0,Te=a;switch(a){case"keypress":if(u0(f)===0)break e;case"keydown":case"keyup":ce=OC;break;case"focusin":Te="focus",ce=oh;break;case"focusout":Te="blur",ce=oh;break;case"beforeblur":case"afterblur":ce=oh;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ce=eO;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ce=aC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ce=bC;break;case vO:case SO:case wO:ce=oC;break;case kO:ce=SC;break;case"scroll":case"scrollend":ce=rC;break;case"wheel":ce=kC;break;case"copy":case"cut":case"paste":ce=uC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ce=nO;break;case"toggle":case"beforetoggle":ce=MC}var He=(o&4)!==0,Qt=!He&&(a==="scroll"||a==="scrollend"),ie=He?oe!==null?oe+"Capture":null:oe;He=[];for(var ne=se,le;ne!==null;){var he=ne;if(le=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||le===null||ie===null||(he=Xo(ne,ie),he!=null&&He.push(vc(ne,he,le))),Qt)break;ne=ne.return}0<He.length&&(oe=new ce(oe,Te,null,f,de),pe.push({event:oe,listeners:He}))}}if((o&7)===0){e:{if(oe=a==="mouseover"||a==="pointerover",ce=a==="mouseout"||a==="pointerout",oe&&f!==th&&(Te=f.relatedTarget||f.fromElement)&&(Tn(Te)||Te[Ur]))break e;if((ce||oe)&&(oe=de.window===de?de:(oe=de.ownerDocument)?oe.defaultView||oe.parentWindow:window,ce?(Te=f.relatedTarget||f.toElement,ce=se,Te=Te?Tn(Te):null,Te!==null&&(Qt=l(Te),He=Te.tag,Te!==Qt||He!==5&&He!==27&&He!==6)&&(Te=null)):(ce=null,Te=se),ce!==Te)){if(He=eO,he="onMouseLeave",ie="onMouseEnter",ne="mouse",(a==="pointerout"||a==="pointerover")&&(He=nO,he="onPointerLeave",ie="onPointerEnter",ne="pointer"),Qt=ce==null?oe:Kn(ce),le=Te==null?oe:Kn(Te),oe=new He(he,ne+"leave",ce,f,de),oe.target=Qt,oe.relatedTarget=le,he=null,Tn(de)===se&&(He=new He(ie,ne+"enter",Te,f,de),He.target=le,He.relatedTarget=Qt,he=He),Qt=he,ce&&Te)t:{for(He=AE,ie=ce,ne=Te,le=0,he=ie;he;he=He(he))le++;he=0;for(var De=ne;De;De=He(De))he++;for(;0<le-he;)ie=He(ie),le--;for(;0<he-le;)ne=He(ne),he--;for(;le--;){if(ie===ne||ne!==null&&ie===ne.alternate){He=ie;break t}ie=He(ie),ne=He(ne)}He=null}else He=null;ce!==null&&Ix(pe,oe,ce,He,!1),Te!==null&&Qt!==null&&Ix(pe,Qt,Te,He,!0)}}e:{if(oe=se?Kn(se):window,ce=oe.nodeName&&oe.nodeName.toLowerCase(),ce==="select"||ce==="input"&&oe.type==="file")var St=uO;else if(oO(oe))if(fO)St=RC;else{St=ZC;var Qe=QC}else ce=oe.nodeName,!ce||ce.toLowerCase()!=="input"||oe.type!=="checkbox"&&oe.type!=="radio"?se&&eh(se.elementType)&&(St=uO):St=NC;if(St&&(St=St(a,se))){cO(pe,St,f,de);break e}Qe&&Qe(a,oe,se),a==="focusout"&&se&&oe.type==="number"&&se.memoizedProps.value!=null&&Jd(oe,"number",oe.value)}switch(Qe=se?Kn(se):window,a){case"focusin":(oO(Qe)||Qe.contentEditable==="true")&&(fs=Qe,mh=se,Uo=null);break;case"focusout":Uo=mh=fs=null;break;case"mousedown":ph=!0;break;case"contextmenu":case"mouseup":case"dragend":ph=!1,yO(pe,f,de);break;case"selectionchange":if(LC)break;case"keydown":case"keyup":yO(pe,f,de)}var We;if(uh)e:{switch(a){case"compositionstart":var at="onCompositionStart";break e;case"compositionend":at="onCompositionEnd";break e;case"compositionupdate":at="onCompositionUpdate";break e}at=void 0}else us?lO(a,f)&&(at="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(at="onCompositionStart");at&&(rO&&f.locale!=="ko"&&(us||at!=="onCompositionStart"?at==="onCompositionEnd"&&us&&(We=K6()):(Ta=de,ah="value"in Ta?Ta.value:Ta.textContent,us=!0)),Qe=n1(se,at),0<Qe.length&&(at=new tO(at,a,null,f,de),pe.push({event:at,listeners:Qe}),We?at.data=We:(We=sO(f),We!==null&&(at.data=We)))),(We=EC?TC(a,f):$C(a,f))&&(at=n1(se,"onBeforeInput"),0<at.length&&(Qe=new tO("onBeforeInput","beforeinput",null,f,de),pe.push({event:Qe,listeners:at}),Qe.data=We)),vE(pe,a,se,f,de)}Bx(pe,o)})}function vc(a,o,f){return{instance:a,listener:o,currentTarget:f}}function n1(a,o){for(var f=o+"Capture",p=[];a!==null;){var b=a,S=b.stateNode;if(b=b.tag,b!==5&&b!==26&&b!==27||S===null||(b=Xo(a,f),b!=null&&p.unshift(vc(a,b,S)),b=Xo(a,o),b!=null&&p.push(vc(a,b,S))),a.tag===3)return p;a=a.return}return[]}function AE(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function Ix(a,o,f,p,b){for(var S=o._reactName,Q=[];f!==null&&f!==p;){var _=f,W=_.alternate,se=_.stateNode;if(_=_.tag,W!==null&&W===p)break;_!==5&&_!==26&&_!==27||se===null||(W=se,b?(se=Xo(f,S),se!=null&&Q.unshift(vc(f,se,W))):b||(se=Xo(f,S),se!=null&&Q.push(vc(f,se,W)))),f=f.return}Q.length!==0&&a.push({event:o,listeners:Q})}var ME=/\r\n?/g,CE=/\u0000|\uFFFD/g;function qx(a){return(typeof a=="string"?a:""+a).replace(ME,`
49
- `).replace(CE,"")}function Gx(a,o){return o=qx(o),qx(a)===o}function Pt(a,o,f,p,b,S){switch(f){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||ss(a,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&ss(a,""+p);break;case"className":pt(a,"class",p);break;case"tabIndex":pt(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":pt(a,f,p);break;case"style":G6(a,p,S);break;case"data":if(o!=="object"){pt(a,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||f!=="href")){a.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=o0(""+p),a.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(f==="formAction"?(o!=="input"&&Pt(a,o,"name",b.name,b,null),Pt(a,o,"formEncType",b.formEncType,b,null),Pt(a,o,"formMethod",b.formMethod,b,null),Pt(a,o,"formTarget",b.formTarget,b,null)):(Pt(a,o,"encType",b.encType,b,null),Pt(a,o,"method",b.method,b,null),Pt(a,o,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=o0(""+p),a.setAttribute(f,p);break;case"onClick":p!=null&&(a.onclick=Vi);break;case"onScroll":p!=null&&tt("scroll",a);break;case"onScrollEnd":p!=null&&tt("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(b.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}f=o0(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""+p):a.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":p===!0?a.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,p):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(f,p):a.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(f):a.setAttribute(f,p);break;case"popover":tt("beforetoggle",a),tt("toggle",a),Ea(a,"popover",p);break;case"xlinkActuate":$t(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":$t(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":$t(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":$t(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":$t(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":$t(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":$t(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":$t(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":$t(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Ea(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=tC.get(f)||f,Ea(a,f,p))}}function Dm(a,o,f,p,b,S){switch(f){case"style":G6(a,p,S);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(b.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"children":typeof p=="string"?ss(a,p):(typeof p=="number"||typeof p=="bigint")&&ss(a,""+p);break;case"onScroll":p!=null&&tt("scroll",a);break;case"onScrollEnd":p!=null&&tt("scrollend",a);break;case"onClick":p!=null&&(a.onclick=Vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!i0.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(b=f.endsWith("Capture"),o=f.slice(2,b?f.length-7:void 0),S=a[vn]||null,S=S!=null?S[f]:null,typeof S=="function"&&a.removeEventListener(o,S,b),typeof p=="function")){typeof S!="function"&&S!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(o,p,b);break e}f in a?a[f]=p:p===!0?a.setAttribute(f,""):Ea(a,f,p)}}}function Qn(a,o,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",a),tt("load",a);var p=!1,b=!1,S;for(S in f)if(f.hasOwnProperty(S)){var Q=f[S];if(Q!=null)switch(S){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Pt(a,o,S,Q,f,null)}}b&&Pt(a,o,"srcSet",f.srcSet,f,null),p&&Pt(a,o,"src",f.src,f,null);return;case"input":tt("invalid",a);var _=S=Q=b=null,W=null,se=null;for(p in f)if(f.hasOwnProperty(p)){var de=f[p];if(de!=null)switch(p){case"name":b=de;break;case"type":Q=de;break;case"checked":W=de;break;case"defaultChecked":se=de;break;case"value":S=de;break;case"defaultValue":_=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,o));break;default:Pt(a,o,p,de,f,null)}}B6(a,S,_,W,se,Q,b,!1);return;case"select":tt("invalid",a),p=Q=S=null;for(b in f)if(f.hasOwnProperty(b)&&(_=f[b],_!=null))switch(b){case"value":S=_;break;case"defaultValue":Q=_;break;case"multiple":p=_;default:Pt(a,o,b,_,f,null)}o=S,f=Q,a.multiple=!!p,o!=null?ls(a,!!p,o,!1):f!=null&&ls(a,!!p,f,!0);return;case"textarea":tt("invalid",a),S=b=p=null;for(Q in f)if(f.hasOwnProperty(Q)&&(_=f[Q],_!=null))switch(Q){case"value":p=_;break;case"defaultValue":b=_;break;case"children":S=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:Pt(a,o,Q,_,f,null)}I6(a,p,b,S);return;case"option":for(W in f)if(f.hasOwnProperty(W)&&(p=f[W],p!=null))switch(W){case"selected":a.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:Pt(a,o,W,p,f,null)}return;case"dialog":tt("beforetoggle",a),tt("toggle",a),tt("cancel",a),tt("close",a);break;case"iframe":case"object":tt("load",a);break;case"video":case"audio":for(p=0;p<bc.length;p++)tt(bc[p],a);break;case"image":tt("error",a),tt("load",a);break;case"details":tt("toggle",a);break;case"embed":case"source":case"link":tt("error",a),tt("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in f)if(f.hasOwnProperty(se)&&(p=f[se],p!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Pt(a,o,se,p,f,null)}return;default:if(eh(o)){for(de in f)f.hasOwnProperty(de)&&(p=f[de],p!==void 0&&Dm(a,o,de,p,f,void 0));return}}for(_ in f)f.hasOwnProperty(_)&&(p=f[_],p!=null&&Pt(a,o,_,p,f,null))}function EE(a,o,f,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,S=null,Q=null,_=null,W=null,se=null,de=null;for(ce in f){var pe=f[ce];if(f.hasOwnProperty(ce)&&pe!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":W=pe;default:p.hasOwnProperty(ce)||Pt(a,o,ce,null,p,pe)}}for(var oe in p){var ce=p[oe];if(pe=f[oe],p.hasOwnProperty(oe)&&(ce!=null||pe!=null))switch(oe){case"type":S=ce;break;case"name":b=ce;break;case"checked":se=ce;break;case"defaultChecked":de=ce;break;case"value":Q=ce;break;case"defaultValue":_=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,o));break;default:ce!==pe&&Pt(a,o,oe,ce,p,pe)}}Kd(a,Q,_,W,se,de,S,b);return;case"select":ce=Q=_=oe=null;for(S in f)if(W=f[S],f.hasOwnProperty(S)&&W!=null)switch(S){case"value":break;case"multiple":ce=W;default:p.hasOwnProperty(S)||Pt(a,o,S,null,p,W)}for(b in p)if(S=p[b],W=f[b],p.hasOwnProperty(b)&&(S!=null||W!=null))switch(b){case"value":oe=S;break;case"defaultValue":_=S;break;case"multiple":Q=S;default:S!==W&&Pt(a,o,b,S,p,W)}o=_,f=Q,p=ce,oe!=null?ls(a,!!f,oe,!1):!!p!=!!f&&(o!=null?ls(a,!!f,o,!0):ls(a,!!f,f?[]:"",!1));return;case"textarea":ce=oe=null;for(_ in f)if(b=f[_],f.hasOwnProperty(_)&&b!=null&&!p.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Pt(a,o,_,null,p,b)}for(Q in p)if(b=p[Q],S=f[Q],p.hasOwnProperty(Q)&&(b!=null||S!=null))switch(Q){case"value":oe=b;break;case"defaultValue":ce=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==S&&Pt(a,o,Q,b,p,S)}Y6(a,oe,ce);return;case"option":for(var Te in f)if(oe=f[Te],f.hasOwnProperty(Te)&&oe!=null&&!p.hasOwnProperty(Te))switch(Te){case"selected":a.selected=!1;break;default:Pt(a,o,Te,null,p,oe)}for(W in p)if(oe=p[W],ce=f[W],p.hasOwnProperty(W)&&oe!==ce&&(oe!=null||ce!=null))switch(W){case"selected":a.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Pt(a,o,W,oe,p,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var He in f)oe=f[He],f.hasOwnProperty(He)&&oe!=null&&!p.hasOwnProperty(He)&&Pt(a,o,He,null,p,oe);for(se in p)if(oe=p[se],ce=f[se],p.hasOwnProperty(se)&&oe!==ce&&(oe!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,o));break;default:Pt(a,o,se,oe,p,ce)}return;default:if(eh(o)){for(var Qt in f)oe=f[Qt],f.hasOwnProperty(Qt)&&oe!==void 0&&!p.hasOwnProperty(Qt)&&Dm(a,o,Qt,void 0,p,oe);for(de in p)oe=p[de],ce=f[de],!p.hasOwnProperty(de)||oe===ce||oe===void 0&&ce===void 0||Dm(a,o,de,oe,p,ce);return}}for(var ie in f)oe=f[ie],f.hasOwnProperty(ie)&&oe!=null&&!p.hasOwnProperty(ie)&&Pt(a,o,ie,null,p,oe);for(pe in p)oe=p[pe],ce=f[pe],!p.hasOwnProperty(pe)||oe===ce||oe==null&&ce==null||Pt(a,o,pe,oe,p,ce)}function Ux(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TE(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var b=f[p],S=b.transferSize,Q=b.initiatorType,_=b.duration;if(S&&_&&Ux(Q)){for(Q=0,_=b.responseEnd,p+=1;p<f.length;p++){var W=f[p],se=W.startTime;if(se>_)break;var de=W.transferSize,pe=W.initiatorType;de&&Ux(pe)&&(W=W.responseEnd,Q+=de*(W<_?1:(_-se)/(W-se)))}if(--p,o+=8*(S+Q)/(b.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Hm=null,Xm=null;function r1(a){return a.nodeType===9?a:a.ownerDocument}function Wx(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kx(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function zm(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Fm=null;function $E(){var a=window.event;return a&&a.type==="popstate"?a===Fm?!1:(Fm=a,!0):(Fm=null,!1)}var Jx=typeof setTimeout=="function"?setTimeout:void 0,jE=typeof clearTimeout=="function"?clearTimeout:void 0,e5=typeof Promise=="function"?Promise:void 0,PE=typeof queueMicrotask=="function"?queueMicrotask:typeof e5<"u"?function(a){return e5.resolve(null).then(a).catch(QE)}:Jx;function QE(a){setTimeout(function(){throw a})}function Ya(a){return a==="head"}function t5(a,o){var f=o,p=0;do{var b=f.nextSibling;if(a.removeChild(f),b&&b.nodeType===8)if(f=b.data,f==="/$"||f==="/&"){if(p===0){a.removeChild(b),Ls(o);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")Sc(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Sc(f);for(var S=f.firstChild;S;){var Q=S.nextSibling,_=S.nodeName;S[ct]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&S.rel.toLowerCase()==="stylesheet"||f.removeChild(S),S=Q}}else f==="body"&&Sc(a.ownerDocument.body);f=b}while(f);Ls(o)}function n5(a,o){var f=a;a=0;do{var p=f.nextSibling;if(f.nodeType===1?o?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(o?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=p}while(f)}function Bm(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var f=o;switch(o=o.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Bm(f),zt(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function ZE(a,o,f,p){for(;a.nodeType===1;){var b=f;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[ct])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(S=a.getAttribute("rel"),S==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(S!==b.rel||a.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||a.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||a.getAttribute("title")!==(b.title==null?null:b.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(S=a.getAttribute("src"),(S!==(b.src==null?null:b.src)||a.getAttribute("type")!==(b.type==null?null:b.type)||a.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&S&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var S=b.name==null?null:""+b.name;if(b.type==="hidden"&&a.getAttribute("name")===S)return a}else return a;if(a=Dr(a.nextSibling),a===null)break}return null}function NE(a,o,f){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=Dr(a.nextSibling),a===null))return null;return a}function r5(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Dr(a.nextSibling),a===null))return null;return a}function Ym(a){return a.data==="$?"||a.data==="$~"}function Im(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function RE(a,o){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||f.readyState!=="loading")o();else{var p=function(){o(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function Dr(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var qm=null;function i5(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(o===0)return Dr(a.nextSibling);o--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||o++}a=a.nextSibling}return null}function a5(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(o===0)return a;o--}else f!=="/$"&&f!=="/&"||o++}a=a.previousSibling}return null}function l5(a,o,f){switch(o=r1(f),a){case"html":if(a=o.documentElement,!a)throw Error(r(452));return a;case"head":if(a=o.head,!a)throw Error(r(453));return a;case"body":if(a=o.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Sc(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);zt(a)}var Hr=new Map,s5=new Set;function i1(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ji=q.d;q.d={f:VE,r:LE,D:_E,C:DE,L:HE,m:XE,X:FE,S:zE,M:BE};function VE(){var a=Ji.f(),o=G0();return a||o}function LE(a){var o=Pr(a);o!==null&&o.tag===5&&o.type==="form"?k4(o):Ji.r(a)}var Ns=typeof document>"u"?null:document;function o5(a,o,f){var p=Ns;if(p&&typeof o=="string"&&o){var b=Qr(o);b='link[rel="'+a+'"][href="'+b+'"]',typeof f=="string"&&(b+='[crossorigin="'+f+'"]'),s5.has(b)||(s5.add(b),a={rel:a,crossOrigin:f,href:o},p.querySelector(b)===null&&(o=p.createElement("link"),Qn(o,"link",a),un(o),p.head.appendChild(o)))}}function _E(a){Ji.D(a),o5("dns-prefetch",a,null)}function DE(a,o){Ji.C(a,o),o5("preconnect",a,o)}function HE(a,o,f){Ji.L(a,o,f);var p=Ns;if(p&&a&&o){var b='link[rel="preload"][as="'+Qr(o)+'"]';o==="image"&&f&&f.imageSrcSet?(b+='[imagesrcset="'+Qr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(b+='[imagesizes="'+Qr(f.imageSizes)+'"]')):b+='[href="'+Qr(a)+'"]';var S=b;switch(o){case"style":S=Rs(a);break;case"script":S=Vs(a)}Hr.has(S)||(a=O({rel:"preload",href:o==="image"&&f&&f.imageSrcSet?void 0:a,as:o},f),Hr.set(S,a),p.querySelector(b)!==null||o==="style"&&p.querySelector(wc(S))||o==="script"&&p.querySelector(kc(S))||(o=p.createElement("link"),Qn(o,"link",a),un(o),p.head.appendChild(o)))}}function XE(a,o){Ji.m(a,o);var f=Ns;if(f&&a){var p=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+Qr(p)+'"][href="'+Qr(a)+'"]',S=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Vs(a)}if(!Hr.has(S)&&(a=O({rel:"modulepreload",href:a},o),Hr.set(S,a),f.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(kc(S)))return}p=f.createElement("link"),Qn(p,"link",a),un(p),f.head.appendChild(p)}}}function zE(a,o,f){Ji.S(a,o,f);var p=Ns;if(p&&a){var b=Ma(p).hoistableStyles,S=Rs(a);o=o||"default";var Q=b.get(S);if(!Q){var _={loading:0,preload:null};if(Q=p.querySelector(wc(S)))_.loading=5;else{a=O({rel:"stylesheet",href:a,"data-precedence":o},f),(f=Hr.get(S))&&Gm(a,f);var W=Q=p.createElement("link");un(W),Qn(W,"link",a),W._p=new Promise(function(se,de){W.onload=se,W.onerror=de}),W.addEventListener("load",function(){_.loading|=1}),W.addEventListener("error",function(){_.loading|=2}),_.loading|=4,a1(Q,o,p)}Q={type:"stylesheet",instance:Q,count:1,state:_},b.set(S,Q)}}}function FE(a,o){Ji.X(a,o);var f=Ns;if(f&&a){var p=Ma(f).hoistableScripts,b=Vs(a),S=p.get(b);S||(S=f.querySelector(kc(b)),S||(a=O({src:a,async:!0},o),(o=Hr.get(b))&&Um(a,o),S=f.createElement("script"),un(S),Qn(S,"link",a),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(b,S))}}function BE(a,o){Ji.M(a,o);var f=Ns;if(f&&a){var p=Ma(f).hoistableScripts,b=Vs(a),S=p.get(b);S||(S=f.querySelector(kc(b)),S||(a=O({src:a,async:!0,type:"module"},o),(o=Hr.get(b))&&Um(a,o),S=f.createElement("script"),un(S),Qn(S,"link",a),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(b,S))}}function c5(a,o,f,p){var b=(b=te.current)?i1(b):null;if(!b)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(o=Rs(f.href),f=Ma(b).hoistableStyles,p=f.get(o),p||(p={type:"style",instance:null,count:0,state:null},f.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=Rs(f.href);var S=Ma(b).hoistableStyles,Q=S.get(a);if(Q||(b=b.ownerDocument||b,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(a,Q),(S=b.querySelector(wc(a)))&&!S._p&&(Q.instance=S,Q.state.loading=5),Hr.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Hr.set(a,f),S||YE(b,a,f,Q.state))),o&&p===null)throw Error(r(528,""));return Q}if(o&&p!==null)throw Error(r(529,""));return null;case"script":return o=f.async,f=f.src,typeof f=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Vs(f),f=Ma(b).hoistableScripts,p=f.get(o),p||(p={type:"script",instance:null,count:0,state:null},f.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Rs(a){return'href="'+Qr(a)+'"'}function wc(a){return'link[rel="stylesheet"]['+a+"]"}function u5(a){return O({},a,{"data-precedence":a.precedence,precedence:null})}function YE(a,o,f,p){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=a.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),Qn(o,"link",f),un(o),a.head.appendChild(o))}function Vs(a){return'[src="'+Qr(a)+'"]'}function kc(a){return"script[async]"+a}function f5(a,o,f){if(o.count++,o.instance===null)switch(o.type){case"style":var p=a.querySelector('style[data-href~="'+Qr(f.href)+'"]');if(p)return o.instance=p,un(p),p;var b=O({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),un(p),Qn(p,"style",b),a1(p,f.precedence,a),o.instance=p;case"stylesheet":b=Rs(f.href);var S=a.querySelector(wc(b));if(S)return o.state.loading|=4,o.instance=S,un(S),S;p=u5(f),(b=Hr.get(b))&&Gm(p,b),S=(a.ownerDocument||a).createElement("link"),un(S);var Q=S;return Q._p=new Promise(function(_,W){Q.onload=_,Q.onerror=W}),Qn(S,"link",p),o.state.loading|=4,a1(S,f.precedence,a),o.instance=S;case"script":return S=Vs(f.src),(b=a.querySelector(kc(S)))?(o.instance=b,un(b),b):(p=f,(b=Hr.get(S))&&(p=O({},f),Um(p,b)),a=a.ownerDocument||a,b=a.createElement("script"),un(b),Qn(b,"link",p),a.head.appendChild(b),o.instance=b);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,a1(p,f.precedence,a));return o.instance}function a1(a,o,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,S=b,Q=0;Q<p.length;Q++){var _=p[Q];if(_.dataset.precedence===o)S=_;else if(S!==b)break}S?S.parentNode.insertBefore(a,S.nextSibling):(o=f.nodeType===9?f.head:f,o.insertBefore(a,o.firstChild))}function Gm(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function Um(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var l1=null;function d5(a,o,f){if(l1===null){var p=new Map,b=l1=new Map;b.set(f,p)}else b=l1,p=b.get(f),p||(p=new Map,b.set(f,p));if(p.has(a))return p;for(p.set(a,null),f=f.getElementsByTagName(a),b=0;b<f.length;b++){var S=f[b];if(!(S[ct]||S[tn]||a==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var Q=S.getAttribute(o)||"";Q=a+Q;var _=p.get(Q);_?_.push(S):p.set(Q,[S])}}return p}function h5(a,o,f){a=a.ownerDocument||a,a.head.insertBefore(f,o==="title"?a.querySelector("head > title"):null)}function IE(a,o,f){if(f===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function m5(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function qE(a,o,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var b=Rs(p.href),S=o.querySelector(wc(b));if(S){o=S._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=s1.bind(a),o.then(a,a)),f.state.loading|=4,f.instance=S,un(S);return}S=o.ownerDocument||o,p=u5(p),(b=Hr.get(b))&&Gm(p,b),S=S.createElement("link"),un(S);var Q=S;Q._p=new Promise(function(_,W){Q.onload=_,Q.onerror=W}),Qn(S,"link",p),f.instance=S}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,o),(o=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=s1.bind(a),o.addEventListener("load",f),o.addEventListener("error",f))}}var Wm=0;function GE(a,o){return a.stylesheets&&a.count===0&&c1(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var p=setTimeout(function(){if(a.stylesheets&&c1(a,a.stylesheets),a.unsuspend){var S=a.unsuspend;a.unsuspend=null,S()}},6e4+o);0<a.imgBytes&&Wm===0&&(Wm=62500*TE());var b=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&c1(a,a.stylesheets),a.unsuspend)){var S=a.unsuspend;a.unsuspend=null,S()}},(a.imgBytes>Wm?50:800)+o);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(b)}}:null}function s1(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)c1(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var o1=null;function c1(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,o1=new Map,o.forEach(UE,a),o1=null,s1.call(a))}function UE(a,o){if(!(o.state.loading&4)){var f=o1.get(a);if(f)var p=f.get(null);else{f=new Map,o1.set(a,f);for(var b=a.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<b.length;S++){var Q=b[S];(Q.nodeName==="LINK"||Q.getAttribute("media")!=="not all")&&(f.set(Q.dataset.precedence,Q),p=Q)}p&&f.set(null,p)}b=o.instance,Q=b.getAttribute("data-precedence"),S=f.get(Q)||p,S===p&&f.set(null,b),f.set(Q,b),this.count++,p=s1.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),S?S.parentNode.insertBefore(b,S.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(b,a.firstChild)),o.state.loading|=4}}var Ac={$$typeof:E,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function WE(a,o,f,p,b,S,Q,_,W){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zi(0),this.hiddenUpdates=Zi(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=S,this.onRecoverableError=Q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function p5(a,o,f,p,b,S,Q,_,W,se,de,pe){return a=new WE(a,o,f,Q,W,se,de,pe,_),o=1,S===!0&&(o|=24),S=gr(3,null,null,o),a.current=S,S.stateNode=a,o=$h(),o.refCount++,a.pooledCache=o,o.refCount++,S.memoizedState={element:p,isDehydrated:f,cache:o},Zh(S),a}function g5(a){return a?(a=ms,a):ms}function O5(a,o,f,p,b,S){b=g5(b),p.context===null?p.context=b:p.pendingContext=b,p=Na(o),p.payload={element:f},S=S===void 0?null:S,S!==null&&(p.callback=S),f=Ra(a,p,o),f!==null&&(ar(f,a,o),rc(f,a,o))}function x5(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<o?f:o}}function Km(a,o){x5(a,o),(a=a.alternate)&&x5(a,o)}function y5(a){if(a.tag===13||a.tag===31){var o=Al(a,67108864);o!==null&&ar(o,a,67108864),Km(a,67108864)}}function b5(a){if(a.tag===13||a.tag===31){var o=vr();o=rt(o);var f=Al(a,o);f!==null&&ar(f,a,o),Km(a,o)}}var u1=!0;function KE(a,o,f,p){var b=H.T;H.T=null;var S=q.p;try{q.p=2,Jm(a,o,f,p)}finally{q.p=S,H.T=b}}function JE(a,o,f,p){var b=H.T;H.T=null;var S=q.p;try{q.p=8,Jm(a,o,f,p)}finally{q.p=S,H.T=b}}function Jm(a,o,f,p){if(u1){var b=ep(p);if(b===null)_m(a,o,p,f1,f),S5(a,p);else if(tT(b,a,o,f,p))p.stopPropagation();else if(S5(a,p),o&4&&-1<eT.indexOf(a)){for(;b!==null;){var S=Pr(b);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var Q=Tt(S.pendingLanes);if(Q!==0){var _=S;for(_.pendingLanes|=2,_.entangledLanes|=2;Q;){var W=1<<31-ze(Q);_.entanglements[1]|=W,Q&=~W}gi(S),(kt&6)===0&&(I0=be()+500,yc(0))}}break;case 31:case 13:_=Al(S,2),_!==null&&ar(_,S,2),G0(),Km(S,2)}if(S=ep(p),S===null&&_m(a,o,p,f1,f),S===b)break;b=S}b!==null&&p.stopPropagation()}else _m(a,o,p,null,f)}}function ep(a){return a=nh(a),tp(a)}var f1=null;function tp(a){if(f1=null,a=Tn(a),a!==null){var o=l(a);if(o===null)a=null;else{var f=o.tag;if(f===13){if(a=s(o),a!==null)return a;a=null}else if(f===31){if(a=c(o),a!==null)return a;a=null}else if(f===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return f1=a,null}function v5(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dt()){case Ue:return 2;case bt:return 8;case Re:case on:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var np=!1,Ia=null,qa=null,Ga=null,Mc=new Map,Cc=new Map,Ua=[],eT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function S5(a,o){switch(a){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":qa=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":Mc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cc.delete(o.pointerId)}}function Ec(a,o,f,p,b,S){return a===null||a.nativeEvent!==S?(a={blockedOn:o,domEventName:f,eventSystemFlags:p,nativeEvent:S,targetContainers:[b]},o!==null&&(o=Pr(o),o!==null&&y5(o)),a):(a.eventSystemFlags|=p,o=a.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),a)}function tT(a,o,f,p,b){switch(o){case"focusin":return Ia=Ec(Ia,a,o,f,p,b),!0;case"dragenter":return qa=Ec(qa,a,o,f,p,b),!0;case"mouseover":return Ga=Ec(Ga,a,o,f,p,b),!0;case"pointerover":var S=b.pointerId;return Mc.set(S,Ec(Mc.get(S)||null,a,o,f,p,b)),!0;case"gotpointercapture":return S=b.pointerId,Cc.set(S,Ec(Cc.get(S)||null,a,o,f,p,b)),!0}return!1}function w5(a){var o=Tn(a.target);if(o!==null){var f=l(o);if(f!==null){if(o=f.tag,o===13){if(o=s(f),o!==null){a.blockedOn=o,vl(a.priority,function(){b5(f)});return}}else if(o===31){if(o=c(f),o!==null){a.blockedOn=o,vl(a.priority,function(){b5(f)});return}}else if(o===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function d1(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var f=ep(a.nativeEvent);if(f===null){f=a.nativeEvent;var p=new f.constructor(f.type,f);th=p,f.target.dispatchEvent(p),th=null}else return o=Pr(f),o!==null&&y5(o),a.blockedOn=f,!1;o.shift()}return!0}function k5(a,o,f){d1(a)&&f.delete(o)}function nT(){np=!1,Ia!==null&&d1(Ia)&&(Ia=null),qa!==null&&d1(qa)&&(qa=null),Ga!==null&&d1(Ga)&&(Ga=null),Mc.forEach(k5),Cc.forEach(k5)}function h1(a,o){a.blockedOn===o&&(a.blockedOn=null,np||(np=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nT)))}var m1=null;function A5(a){m1!==a&&(m1=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){m1===a&&(m1=null);for(var o=0;o<a.length;o+=3){var f=a[o],p=a[o+1],b=a[o+2];if(typeof p!="function"){if(tp(p||f)===null)continue;break}var S=Pr(f);S!==null&&(a.splice(o,3),o-=3,em(S,{pending:!0,data:b,method:f.method,action:p},p,b))}}))}function Ls(a){function o(W){return h1(W,a)}Ia!==null&&h1(Ia,a),qa!==null&&h1(qa,a),Ga!==null&&h1(Ga,a),Mc.forEach(o),Cc.forEach(o);for(var f=0;f<Ua.length;f++){var p=Ua[f];p.blockedOn===a&&(p.blockedOn=null)}for(;0<Ua.length&&(f=Ua[0],f.blockedOn===null);)w5(f),f.blockedOn===null&&Ua.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var b=f[p],S=f[p+1],Q=b[vn]||null;if(typeof S=="function")Q||A5(f);else if(Q){var _=null;if(S&&S.hasAttribute("formAction")){if(b=S,Q=S[vn]||null)_=Q.formAction;else if(tp(b)!==null)continue}else _=Q.action;typeof _=="function"?f[p+1]=_:(f.splice(p,3),p-=3),A5(f)}}}function M5(){function a(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(Q){return b=Q})},focusReset:"manual",scroll:"manual"})}function o(){b!==null&&(b(),b=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,b=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),b!==null&&(b(),b=null)}}}function rp(a){this._internalRoot=a}p1.prototype.render=rp.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var f=o.current,p=vr();O5(f,p,a,o,null,null)},p1.prototype.unmount=rp.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;O5(a.current,2,null,a,null,null),G0(),o[Ur]=null}};function p1(a){this._internalRoot=a}p1.prototype.unstable_scheduleHydration=function(a){if(a){var o=mr();a={blockedOn:null,target:a,priority:o};for(var f=0;f<Ua.length&&o!==0&&o<Ua[f].priority;f++);Ua.splice(f,0,a),f===0&&w5(a)}};var C5=e.version;if(C5!=="19.2.6")throw Error(r(527,C5,"19.2.6"));q.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(o),a=a!==null?g(a):null,a=a===null?null:a.stateNode,a};var rT={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var g1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!g1.isDisabled&&g1.supportsFiber)try{Mt=g1.inject(rT),ot=g1}catch{}}return $c.createRoot=function(a,o){if(!i(a))throw Error(r(299));var f=!1,p="",b=Z4,S=N4,Q=R4;return o!=null&&(o.unstable_strictMode===!0&&(f=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(Q=o.onRecoverableError)),o=p5(a,1,!1,null,null,f,p,null,b,S,Q,M5),a[Ur]=o.current,Lm(a),new rp(o)},$c.hydrateRoot=function(a,o,f){if(!i(a))throw Error(r(299));var p=!1,b="",S=Z4,Q=N4,_=R4,W=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(b=f.identifierPrefix),f.onUncaughtError!==void 0&&(S=f.onUncaughtError),f.onCaughtError!==void 0&&(Q=f.onCaughtError),f.onRecoverableError!==void 0&&(_=f.onRecoverableError),f.formState!==void 0&&(W=f.formState)),o=p5(a,1,!0,o,f??null,p,b,W,S,Q,_,M5),o.context=g5(null),f=o.current,p=vr(),p=rt(p),b=Na(p),b.callback=null,Ra(f,b,p),f=p,o.current.lanes=f,En(o,f),gi(o),a[Ur]=o.current,Lm(a),new p1(o)},$c.version="19.2.6",$c}var L5;function pT(){if(L5)return lp.exports;L5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),lp.exports=mT(),lp.exports}var gT=pT();const _5="hyperframes-studio:anonymousId",OT="hyperframes-studio:telemetryDisabled",ES="hyperframes-studio:telemetryNoticeShown";function wd(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function xT(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`anon-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function yT(){const t=wd();if(!t)return"anonymous";const e=t.getItem(_5);if(e)return e;const n=xT();try{t.setItem(_5,n)}catch{}return n}function bT(){var t;return((t=wd())==null?void 0:t.getItem(OT))==="1"}function vT(){var t;return((t=wd())==null?void 0:t.getItem(ES))==="1"}function ST(){var t;try{(t=wd())==null||t.setItem(ES,"1")}catch{}}const TS="hyperframes-studio:sessionStartFired";function $S(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}function wT(){var t;return((t=$S())==null?void 0:t.getItem(TS))==="1"}function kT(){var t;try{(t=$S())==null||t.setItem(TS,"1")}catch{}}const AT={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1,studio_version:"dev"};let _s=null;function MT(){if(_s)return _s;if(typeof navigator>"u"||typeof window>"u")return _s=AT,_s;const t=navigator.userAgent,e=window.screen;return _s={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t),studio_version:"0.6.85"},_s}const jS="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",CT="https://us.i.posthog.com",ET=1e3;let Of=[],up=null,x1=null;function TT(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function $T(){return jS.startsWith("phc_")}function jT(){try{return!1}catch{return!1}}function PT(){try{return!1}catch{return!1}}function QT(){return x1!==null||(x1=$T()&&!jT()&&!PT()&&!bT()&&!TT()),x1}function S8(t,e={}){if(!QT())return;const n=MT();Of.push({event:t,properties:{...e,...n},timestamp:new Date().toISOString()}),up===null&&(up=setTimeout(()=>{up=null,_2()},ET)),NT()}function _2(){if(Of.length===0)return;const t=yT(),e=Of.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));Of=[],ZT(`${CT}/batch/`,JSON.stringify({api_key:jS,batch:e}))}function ZT(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function NT(){vT()||(ST(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>_2(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&_2()}));function RT(t){S8("studio_session_start",{has_project:t.has_project})}function VT(t){S8("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function LT(){var t,e;try{const n=navigator,i=[`ua=${((t=n.userAgentData)==null?void 0:t.platform)??navigator.platform??"unknown"}`,`screen=${screen.width}x${screen.height}@${devicePixelRatio}x`,`lang=${navigator.language}`];return n.deviceMemory&&i.push(`mem=${n.deviceMemory}GB`),(e=n.connection)!=null&&e.effectiveType&&i.push(`net=${n.connection.effectiveType}`),navigator.hardwareConcurrency&&i.push(`cpu=${navigator.hardwareConcurrency}cores`),i.join(" ")}catch{return""}}function _T(t){S8("survey sent",{$survey_id:"studio_experience",$survey_response:t.rating,...t.comment?{$survey_response_2:t.comment}:{},doctor_summary:LT(),source:"studio"})}function DT(t){const[e,n]=d.useState([]),r=d.useRef(null),i=d.useRef(null),l=d.useCallback(async()=>{if(t)try{const h=await fetch(`/api/projects/${t}/renders`);if(!h.ok)return;const g=await h.json();Array.isArray(g.renders)&&n(O=>{const x=new Set(O.map(v=>v.id)),y=g.renders.filter(v=>!x.has(v.id)).map(v=>({id:v.id,status:v.status==="failed"?"failed":"complete",progress:100,filename:v.filename,createdAt:v.createdAt,durationMs:v.durationMs}));return[...O,...y]})}catch{}},[t]);d.useEffect(()=>{l()},[l]);const s=d.useCallback(async(h={})=>{if(!t)return;const g=h.fps??30,O=h.quality??"standard",x=h.format??"mp4",y=h.resolution,v=h.composition;VT({fps:g,quality:O,format:x,resolution:y,composition:v});const w=Date.now(),A={fps:g,quality:O,format:x};y&&y!=="auto"&&(A.resolution=y),v&&(A.composition=v);let k;try{k=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})}catch{const T={id:crypto.randomUUID(),status:"failed",progress:0,error:"Could not reach render server. Use `hyperframes render` from the CLI instead.",filename:"Export failed",createdAt:w};n(N=>[...N,T]);return}if(!k.ok){const T={id:crypto.randomUUID(),status:"failed",progress:0,error:`Server error (${k.status}). Check the terminal for details.`,filename:"Export failed",createdAt:w};n(N=>[...N,T]);return}const{jobId:M}=await k.json(),$={mp4:".mp4",webm:".webm",mov:".mov"}[x]??".mp4",C={id:M,status:"rendering",progress:0,filename:`${M}${$}`,createdAt:w};n(T=>[...T,C]),i.current=M;const j=new EventSource(`/api/render/${M}/progress`);return r.current=j,j.addEventListener("progress",T=>{try{const N=JSON.parse(T.data);n(R=>R.map(D=>D.id===M?{...D,progress:N.progress??D.progress,stage:N.stage??N.message??D.stage,status:N.status==="complete"?"complete":N.status==="failed"?"failed":D.status,durationMs:N.status==="complete"?Date.now()-w:void 0,error:N.error??D.error}:D)),(N.status==="complete"||N.status==="failed")&&(j.close(),i.current=null)}catch{}}),j.onerror=()=>{j.close(),n(T=>T.map(N=>N.id===M&&N.status==="rendering"?{...N,status:"failed",error:"Connection lost. Is the render server running?"}:N)),i.current=null},M},[t]),c=d.useCallback(async h=>{try{await fetch(`/api/render/${h}`,{method:"DELETE"})}catch{}n(g=>g.filter(O=>O.id!==h))},[]),u=d.useCallback(()=>{n(h=>h.filter(g=>g.status==="rendering"))},[]);return d.useEffect(()=>()=>{var h;(h=r.current)==null||h.close(),r.current=null},[t]),{jobs:e,startRender:s,deleteRender:c,clearCompleted:u,isRendering:e.some(h=>h.status==="rendering")}}const HT="modulepreload",XT=function(t){return"/"+t},D5={},PS=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=s(n.map(h=>{if(h=XT(h),h in D5)return;D5[h]=!0;const g=h.endsWith(".css"),O=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${O}`))return;const x=document.createElement("link");if(x.rel=g?"stylesheet":HT,g||(x.as="script"),x.crossOrigin="",x.href=h,u&&x.setAttribute("nonce",u),document.head.appendChild(x),g)return new Promise((y,v)=>{x.addEventListener("load",y),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(s){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s}return i.then(s=>{for(const c of s||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function zT(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function Xt(t){d.useEffect(t,[])}const QS={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","hover:bg-neutral-200","active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","hover:bg-surface-hover hover:text-white hover:border-border-strong","active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","hover:bg-red-600","active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","hover:bg-surface-hover hover:text-white","active:scale-[0.98]"].join(" ")},FT={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},BT=d.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:l="",disabled:s,...c},u)=>m.jsxs("button",{ref:u,disabled:s||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",QS[t],FT[e],l].join(" "),...c,children:[n?m.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?m.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&m.jsx("span",{children:i})]}));BT.displayName="Button";const YT={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},IT=d.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},l)=>m.jsx("button",{ref:l,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",QS[n],YT[e],r].join(" "),...i,children:t}));IT.displayName="IconButton";function H5({title:t,detail:e,mono:n,size:r=64,progress:i}){const l=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,s=Math.round(r*1.16);return m.jsxs("div",{className:"hf-loader",draggable:!1,children:[m.jsx("div",{className:"hf-loader-mark-frame",style:{width:s,height:s},draggable:!1,children:m.jsxs("svg",{className:"hf-loader-mark",width:r,height:r,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[m.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:m.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:m.jsxs("g",{transform:"translate(-50 -50)",children:[m.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:"url(#hf-loader-grad-left)"}),m.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:"url(#hf-loader-grad-right)"})]})})}),m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),m.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),m.jsx("div",{className:"hf-loader-title",children:t}),e&&m.jsx("div",{className:"hf-loader-detail",children:e}),l!==void 0&&m.jsx("div",{className:"hf-loader-progress","aria-hidden":"true",children:m.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${l})`}})}),n&&m.jsx("div",{className:"hf-loader-mono",children:n})]})}var w8=CS();function Yt({label:t,children:e,delay:n=400,side:r="top"}){const[i,l]=d.useState(!1),[s,c]=d.useState({x:0,y:0}),u=d.useRef(null),h=d.useRef(null),g=d.useCallback(()=>{u.current=setTimeout(()=>{const x=h.current;if(!x)return;const v=(x.firstElementChild??x).getBoundingClientRect();v.width===0&&v.height===0||(c({x:v.left+v.width/2,y:r==="top"?v.top-6:v.bottom+6}),l(!0))},n)},[n,r]),O=d.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),l(!1)},[]);return m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:h,onPointerEnter:g,onPointerLeave:O,className:"contents",children:e}),i&&w8.createPortal(m.jsx("div",{className:"fixed z-[200] pointer-events-none",style:{left:s.x,top:s.y,transform:r==="top"?"translate(-50%, -100%)":"translate(-50%, 0)"},children:m.jsx("div",{className:"px-2 py-1 rounded-md bg-neutral-800 border border-neutral-700/50 text-[10px] font-medium text-neutral-200 whitespace-nowrap shadow-lg",children:t})}),document.body)]})}const qT=3,GT=3;function X5(t){return typeof t=="object"&&t!==null}function UT(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!X5(e))return null;const n=e.state;return X5(n)?n.loading===!0&&n.ready!==!0:null}const WT=400;function KT(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function JT(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function z5(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const l of r.querySelectorAll("video, audio"))if(JT(l)&&!l.error&&l.networkState!==GT&&l.readyState<qT)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const l of i)if(!zT(l))return!0}return!1}catch{return e}}const D2=d.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:l,suppressLoadingOverlay:s},c)=>{const u=d.useRef(null),h=d.useRef(0),g=d.useRef(null),O=d.useRef(null),[x,y]=d.useState(!1),[v,w]=d.useState(!1),[A,k]=d.useState(!1),[M,E]=d.useState(!1),[$,C]=d.useState(!0),[j,T]=d.useState(!0);d.useEffect(()=>{if(!$){T(!0);return}const D=setTimeout(()=>T(!1),WT);return()=>clearTimeout(D)},[$]),Xt(()=>{const D=u.current;if(!D)return;let V=!1,z;return PS(()=>import("./hyperframes-player-DRpY3xHh.js"),[]).then(()=>{if(V)return;const I=document.createElement("hyperframes-player"),U=e||`/api/projects/${t}/preview`;if(I.setAttribute("shader-capture-scale","1"),I.setAttribute("shader-loading","player"),I.setAttribute("src",U),I.setAttribute("width",String(i?1080:1920)),I.setAttribute("height",String(i?1920:1080)),I.style.width="100%",I.style.height="100%",I.style.display="block",I.style.background="transparent",D.appendChild(I),I.shadowRoot){const P=document.createElement("style");P.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",I.shadowRoot.appendChild(P)}KT(I);const K=I.iframeElement;typeof c=="function"?c(K):c&&(c.current=K);const H=P=>P.stopImmediatePropagation();I.addEventListener("click",H,{capture:!0});const q=P=>{const Z=UT(P);Z!==null&&E(Z)};I.addEventListener("shadertransitionstate",q);const X=()=>{C(!1)},G=()=>{C(!1)};I.addEventListener("ready",X),I.addEventListener("error",G);const F=()=>{if(h.current++,E(!1),C(!0),h.current>1){D.classList.remove("preview-revealing"),D.offsetWidth,D.classList.add("preview-revealing");const L=()=>D.classList.remove("preview-revealing");D.addEventListener("animationend",L,{once:!0})}n(),g.current&&clearInterval(g.current);let Z=h.current>1?!1:z5(K,!1);if(Z){y(!0);let L=0;g.current=setInterval(()=>{L+=1,Z=z5(K,Z),(!Z||L>100)&&(g.current&&clearInterval(g.current),g.current=null,y(!1),Z&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else y(!1)};K.addEventListener("load",F),z=()=>{if(K.removeEventListener("load",F),I.removeEventListener("click",H,{capture:!0}),I.removeEventListener("shadertransitionstate",q),I.removeEventListener("ready",X),I.removeEventListener("error",G),g.current&&clearInterval(g.current),g.current=null,D.removeChild(I),typeof c!="function"){if(c){const P=c;P.current===K&&(P.current=null)}}}}),()=>{V=!0,z==null||z()}}),d.useEffect(()=>{if(O.current&&(clearTimeout(O.current),O.current=null),x){w(!0),k(!1);return}return k(!0),O.current=setTimeout(()=>{w(!1),k(!1),O.current=null},240),()=>{O.current&&(clearTimeout(O.current),O.current=null)}},[x]);const N=!s&&!j&&$,R=v&&!M&&!N;return d.useEffect(()=>{r==null||r(N||R)},[r,N,R]),m.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:l,children:[m.jsx("div",{ref:u,className:"w-full h-full"}),N&&m.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-30 select-none","data-hyperframes-ignore":"","data-testid":"composition-loading-overlay",draggable:!1,onDragStart:D=>D.preventDefault(),onMouseDown:D=>D.preventDefault(),onPointerDown:D=>D.preventDefault(),children:m.jsx(H5,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),R&&m.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:A?0:1,pointerEvents:A?"none":"auto",transition:"opacity 240ms ease-out"},onDragStart:D=>D.preventDefault(),onMouseDown:D=>D.preventDefault(),onPointerDown:D=>D.preventDefault(),children:m.jsx(H5,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56})})]})});D2.displayName="Player";const Zu=30;function yn(t){if(!Number.isFinite(t)||t<0)return"0:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n.toString().padStart(2,"0")}`}function H2(t,e=Zu){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function ZS(t,e=Zu){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function X2(t,e,n=Zu){const r=H2(t,n),i=Math.max(0,r+e);return ZS(i,n)}function NS(t,e,n=Zu){const r=H2(t,n),i=H2(e,n);return`${r}f / ${i}f`}function RS(t){return Number.isFinite(t)&&t>0}function F5(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function fp(t){if(!t)return 0;try{const e=Number(t.getDuration());return RS(e)?e:0}catch{return 0}}function e$(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function t$(t,e,n,r=()=>1){var y;const i=Math.max(0,Number.isFinite(e)?e:0);let l=F5(Number(((y=t.getTime)==null?void 0:y.call(t))??0),i),s=!1,c=0,u=l,h=n.now();const g=v=>{var w;if(l=F5(v,i),typeof t.renderSeek=="function"){t.renderSeek(l);return}(w=t.seek)==null||w.call(t,l)},O=()=>{c&&(n.cancelAnimationFrame(c),c=0)},x=v=>{if(!s)return;const w=Math.max(.1,Number(r())||1),A=(v-h)/1e3*w;if(g(u+A),l>=i){s=!1,c=0;return}c=n.requestAnimationFrame(x)};return{play:()=>{s||i<=0||(l>=i&&g(0),s=!0,u=l,h=n.now(),O(),c=n.requestAnimationFrame(x))},pause:()=>{s=!1,O()},seek:(v,w)=>{if(g(v),w!=null&&w.keepPlaying){s&&(u=l,h=n.now());return}s=!1,O()},getTime:()=>l,getDuration:()=>i,isPlaying:()=>s}}function B5(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{const r=!(n!=null&&n.keepPlaying);r&&t.pause(),t.seek(e),r&&t.pause()},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function Y5(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return RS(e)?e:0}function n$(t){if(!t)return 0;const e=Y5(t.querySelector("[data-composition-id]"));if(e>0)return e;let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){const i=Number.parseFloat(r.getAttribute("data-start")??""),l=Y5(r);!Number.isFinite(i)||i<0||l<=0||(n=Math.max(n,i+l))}return n}function z2(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function VS(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function LS(t,e){const n=e.getAttribute("data-playback-start")?"playback-start":e.getAttribute("data-media-start")?"media-start":void 0,r=e.getAttribute("data-playback-start")??e.getAttribute("data-media-start");if(r!=null){const O=parseFloat(r);Number.isFinite(O)&&(t.playbackStart=O)}n&&(t.playbackStartAttr=n);const i=VS(e);if(!i)return;t.tag=i.tagName.toLowerCase();const l=i.getAttribute("src");l&&(t.src=l);const c=(i.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof c>"u"||!(i instanceof c))return;const u=e.getAttribute("data-source-duration")??i.getAttribute("data-source-duration"),h=u?parseFloat(u):i.duration;Number.isFinite(h)&&h>0&&(t.sourceDuration=h);const g=i.defaultPlaybackRate;Number.isFinite(g)&&g>0&&(t.playbackRate=g)}function Nu(t){var i,l,s;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(l=t.id)==null?void 0:l.trim();if(n)return n;const r=(s=t.tag)==null?void 0:s.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const r$=new Set(["base","link","meta","noscript","script","style","template"]);function I5(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function i$(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return I5(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?I5(r):Nu({tag:t.tagName})}function Ul(t){if(z2(t)&&t.id)return`#${t.id}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${e}"]`;if(z2(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${r}`}}function au(t){var n;const e=(n=t.parentElement)==null?void 0:n.closest("[data-composition-id]");return(e==null?void 0:e.getAttribute("data-composition-file"))??(e==null?void 0:e.getAttribute("data-composition-src"))??void 0}function lu(t,e,n){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const i=Array.from(t.querySelectorAll(n)).indexOf(e);return i>=0?i:void 0}catch{return}}function F2(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function su(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||F2({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=F2({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function B2(t){return t.key??t.id}function a$(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e)}function q5(t,e){return Math.abs(t-e)<.001}function l$(t,e){var s;const n=(s=e.tagName)==null?void 0:s.toLowerCase();if(n&&t.tagName.toLowerCase()!==n)return!1;const r=Number.parseFloat(t.getAttribute("data-start")??"");if(Number.isFinite(r)&&!q5(r,e.start))return!1;const i=Number.parseFloat(t.getAttribute("data-duration")??"");if(Number.isFinite(i)&&!q5(i,e.duration))return!1;const l=Number.parseInt(t.getAttribute("data-track-index")??"",10);return!(Number.isFinite(l)&&l!==e.track)}function s$(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${e}"]`)??t.querySelector(`.${e}`)??null}function o$(t,e,n,r=new Set){const i=e.id?s$(t,e.id):null;if(i&&!r.has(i))return i;const l=a$(t).filter(c=>!r.has(c)),s=l.find(c=>l$(c,e));return s||(l[n]??null)}function c$(t,e){if(!z2(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return r$.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!Ul(e)}function u$(t,e){t.documentElement&&(t.documentElement.style.overflow="hidden",t.documentElement.style.margin="0"),t.body&&(t.body.style.overflow="hidden",t.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function f$(t){const e=/data-composition-id=["']([^"']+)["']/gi,n=new Set,r=Array.from(t.querySelectorAll("style, script"));for(const s of r){const c=s.textContent||"";if(!c)continue;let u;for(;(u=e.exec(c))!==null;){const h=(u[1]||"").trim();h&&n.add(h)}}if(n.size===0)return;const i=new Set,l=Array.from(t.querySelectorAll("[data-composition-id]"));for(const s of l){const c=s.getAttribute("data-composition-id");c&&i.add(c)}for(const s of n){if(s==="root"||i.has(s))continue;const c=t.getElementById(`${s}-layer`)||t.getElementById(`${s}-comp`)||t.getElementById(s);c&&(c.getAttribute("data-composition-id")||c.setAttribute("data-composition-id",s))}}function d$(t){return t instanceof HTMLElement}function _S(t){const e=t.getRootNode();return typeof ShadowRoot<"u"&&e instanceof ShadowRoot&&d$(e.host)?e.host:null}function DS(t,e,n){var r;(r=t.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...n},"*")}function HS(t,e){return t||e>1}function h$(t,e){if(t)try{const n=_S(t);if(n&&typeof n.muted=="boolean"){n.muted=e;return}DS(t,"set-muted",{muted:e})}catch(n){console.warn("[useTimelinePlayer] Failed to set preview media mute state",n)}}function m$(t,e){if(!t)return;const n=Number.isFinite(e)&&e>0?e:1;try{const r=_S(t);if(r&&typeof r.playbackRate=="number"){r.playbackRate=n;return}DS(t,"set-playback-rate",{playbackRate:n})}catch(r){console.warn("[useTimelinePlayer] Failed to set preview playback rate",r)}}function p$(t,e,n,r){const i=new Set(n.map(O=>O.id)),l=t.querySelector("[data-composition-id]"),s=l==null?void 0:l.getAttribute("data-composition-id"),c=t.querySelectorAll("[data-composition-id][data-start]"),u=[];c.forEach(O=>{var D,V,z,I,U,K,H,q,X;const x=O,y=x.getAttribute("data-composition-id");if(!y||y===s||i.has(x.id)||i.has(y))return;const v=x.getAttribute("data-start")??"0";let w=parseFloat(v);if(isNaN(w)){const G=t.getElementById(v)||t.querySelector(`[data-composition-id="${v}"]`);if(G){const F=G.getAttribute("data-start")??"0";let P=parseFloat(F);if(isNaN(P)){const B=t.getElementById(F)||t.querySelector(`[data-composition-id="${F}"]`),J=parseFloat((B==null?void 0:B.getAttribute("data-start"))??"0")||0,te=B==null?void 0:B.getAttribute("data-composition-id"),Y=parseFloat((B==null?void 0:B.getAttribute("data-duration"))??"")||(te?((z=(V=(D=e.__timelines)==null?void 0:D[te])==null?void 0:V.duration)==null?void 0:z.call(V))??0:0);P=J+Y}const Z=G.getAttribute("data-composition-id"),L=parseFloat(G.getAttribute("data-duration")??"")||(Z?((K=(U=(I=e.__timelines)==null?void 0:I[Z])==null?void 0:U.duration)==null?void 0:K.call(U))??0:0);w=P+L}else w=0}let A=parseFloat(x.getAttribute("data-duration")??"");if((isNaN(A)||A<=0)&&(A=((X=(q=(H=e.__timelines)==null?void 0:H[y])==null?void 0:q.duration)==null?void 0:X.call(q))??0),!Number.isFinite(A)||A<=0||(Number.isFinite(w)||(w=0),Number.isFinite(r)&&r>0&&(w>=r||(A=Math.min(A,Math.max(0,r-w)),A<=0))))return;const k=x.getAttribute("data-track-index"),M=k!=null?parseInt(k,10):0,E=x.getAttribute("data-composition-src")||x.getAttribute("data-composition-file"),$=Ul(x),C=au(x),j=lu(t,x,$),T=Nu({id:x.id||y||null,label:x.getAttribute("data-timeline-label")??x.getAttribute("data-label"),tag:x.tagName}),N=su({preferredId:x.id||y||null,label:T,fallbackIndex:u.length,domId:x.id||void 0,selector:$,selectorIndex:j,sourceFile:C}),R={id:N.id,label:T,key:N.key,tag:x.tagName.toLowerCase(),start:w,duration:A,track:isNaN(M)?0:M,domId:x.id||void 0,selector:$,selectorIndex:j,sourceFile:C};if(E)R.compositionSrc=E;else{const G=x.querySelector("video[src]");G&&(R.src=G.getAttribute("src")||void 0,R.tag="video")}u.push(R)});let h=!1;const g=n.map(O=>{if(O.compositionSrc)return O;const x=t.getElementById(O.id)??t.querySelector(`[data-composition-id="${O.id}"]`);if(!x)return O;const y=x.getAttribute("data-composition-src")||x.getAttribute("data-composition-file");return y?(h=!0,{...O,compositionSrc:y}):O});return{missing:u,updatedEls:g,patched:h}}const G5=t=>{let e;const n=new Set,r=(h,g)=>{const O=typeof h=="function"?h(e):h;if(!Object.is(O,e)){const x=e;e=g??(typeof O!="object"||O===null)?O:Object.assign({},e,O),n.forEach(y=>y(e,x))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>u,subscribe:h=>(n.add(h),()=>n.delete(h))},u=e=t(r,i,c);return c},g$=(t=>t?G5(t):G5),O$=t=>t;function x$(t,e=O$){const n=O1.useSyncExternalStore(t.subscribe,O1.useCallback(()=>e(t.getState()),[t,e]),O1.useCallback(()=>e(t.getInitialState()),[t,e]));return O1.useDebugValue(n),n}const U5=t=>{const e=g$(t),n=r=>x$(e,r);return Object.assign(n,e),n},XS=(t=>t?U5(t):U5),zS="hf-studio-ui-preferences";function W5(t){return typeof t=="object"&&t!==null}function FS(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function BS(t){if(!t)return{};try{const e=t.getItem(zS);if(!e)return{};const n=JSON.parse(e);if(!W5(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),W5(n.previewZoom)){const{zoomPercent:i,panX:l,panY:s}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof l=="number"&&Number.isFinite(l)&&typeof s=="number"&&Number.isFinite(s)&&(r.previewZoom={zoomPercent:i,panX:l,panY:s})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),typeof n.snapEnabled=="boolean"&&(r.snapEnabled=n.snapEnabled),typeof n.gridVisible=="boolean"&&(r.gridVisible=n.gridVisible),typeof n.gridSpacing=="number"&&Number.isFinite(n.gridSpacing)&&(r.gridSpacing=n.gridSpacing),typeof n.snapToGrid=="boolean"&&(r.snapToGrid=n.snapToGrid),r}catch{return{}}}function ul(t=FS()){return BS(t)}function ho(t,e=FS()){if(e)try{const n={...BS(e),...t};e.setItem(zS,JSON.stringify(n))}catch{}}const dp=new Set,zr={notify:t=>dp.forEach(e=>e(t)),subscribe:t=>(dp.add(t),()=>dp.delete(t))},fe=XS(t=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:ul().playbackRate??1,audioMuted:ul().audioMuted??!1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,inPoint:null,outPoint:null,selectedKeyframes:new Set,toggleSelectedKeyframe:e=>t(n=>{const r=new Set(n.selectedKeyframes);return r.has(e)?r.delete(e):r.add(e),{selectedKeyframes:r}}),clearSelectedKeyframes:()=>t({selectedKeyframes:new Set}),keyframeCache:new Map,setKeyframeCache:(e,n)=>t(r=>{const i=new Map(r.keyframeCache);return n?i.set(e,n):i.delete(e),{keyframeCache:i}}),requestedSeekTime:null,requestSeek:e=>t({requestedSeekTime:e}),clearSeekRequest:()=>t({requestedSeekTime:null}),setIsPlaying:e=>t({isPlaying:e}),setPlaybackRate:e=>{ho({playbackRate:e}),t({playbackRate:e})},setAudioMuted:e=>{ho({audioMuted:e}),t({audioMuted:e})},setLoopEnabled:e=>t({loopEnabled:e}),setZoomMode:e=>t({zoomMode:e}),setInPoint:e=>t(n=>{const r=e!==null&&Number.isFinite(e)?e:null;return{inPoint:r,outPoint:r!==null&&n.outPoint!==null&&r>=n.outPoint?null:n.outPoint,loopEnabled:r!==null?!0:n.loopEnabled}}),setOutPoint:e=>t(n=>{const r=e!==null&&Number.isFinite(e)?e:null;return{outPoint:r,inPoint:r!==null&&n.inPoint!==null&&r<=n.inPoint?null:n.inPoint,loopEnabled:r!==null?!0:n.loopEnabled}}),setManualZoomPercent:e=>t({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>t({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>t({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>t({timelineReady:e}),setElements:e=>t({elements:e}),setSelectedElementId:e=>t({selectedElementId:e}),updateElement:(e,n)=>t(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...n}:i)})),reset:()=>t({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,inPoint:null,outPoint:null,selectedKeyframes:new Set,keyframeCache:new Map})})),YS="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",IS="https://us.i.posthog.com",y$=3e4,b$=5e3;let ql=[],qc=null,Ds=null;function qS(){if(Ds)return Ds;try{const t=localStorage.getItem("hf-studio-anon-id");if(t)return Ds=t,t}catch{}Ds=crypto.randomUUID();try{localStorage.setItem("hf-studio-anon-id",Ds)}catch{}return Ds}function v$(){try{return localStorage.getItem("hf-studio-telemetry-opt-out")!=="1"}catch{return!0}}function S$(){var t,e;return{studio_version:"0.6.85",screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"")}}function Lt(t,e={}){v$()&&(ql.push({event:`studio:${t}`,properties:{...S$(),...e},timestamp:new Date().toISOString()}),qc||(qc=setInterval(w$,y$)))}async function w$(){if(ql.length===0)return;const t=ql.map(r=>({event:r.event,properties:{...r.properties,$ip:null},distinct_id:qS(),timestamp:r.timestamp}));ql=[];const e=new AbortController,n=setTimeout(()=>e.abort(),b$);try{await fetch(`${IS}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:YS,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){if(qc&&(clearInterval(qc),qc=null),ql.length===0)return;const t=ql.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:qS(),timestamp:n.timestamp}));ql=[];const e=JSON.stringify({api_key:YS,batch:t});try{navigator.sendBeacon(`${IS}/batch/`,e)}catch{}}});const k$=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}],A$=d.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,setInPoint:l,setOutPoint:s,onSeek:c}){const[u,h]=d.useState(!1),[g,O]=d.useState(""),x=d.useRef(null);d.useEffect(()=>{if(!u)return;const A=k=>{x.current&&!x.current.contains(k.target)&&h(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[u]);const y=d.useCallback(()=>{if(e)return;const A=Number.parseInt(g,10);!Number.isFinite(A)||n<=0||c(Math.min(n,ZS(Math.max(0,A))))},[e,n,g,c]),v=d.useCallback(A=>{A.preventDefault(),y()},[y]),w=d.useCallback(A=>{A.key==="Enter"&&(A.preventDefault(),y())},[y]);return m.jsxs("div",{ref:x,className:"relative flex-shrink-0",children:[m.jsx(Yt,{label:"Shortcuts and tools",children:m.jsx("button",{type:"button",onClick:()=>h(A=>!A),className:`w-6 h-6 flex items-center justify-center rounded border transition-colors ${u?"border-neutral-600 text-neutral-200 bg-neutral-800":"border-neutral-800 text-neutral-600 hover:text-neutral-300 hover:border-neutral-600"}`,"aria-label":"Shortcuts and tools","aria-expanded":u,children:m.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),m.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})})}),u&&m.jsxs("div",{className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[m.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),m.jsxs("form",{onSubmit:v,className:"flex items-center gap-1.5",children:[m.jsx("input",{value:g,onChange:A=>O(A.target.value),disabled:e,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:w,onBlur:y}),m.jsx(Yt,{label:"Jump to frame",children:m.jsx("button",{type:"submit",disabled:e,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:r!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:yn(r)}),m.jsx(Yt,{label:"Clear in-point",children:m.jsx("button",{type:"button",onClick:()=>l(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:i!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:yn(i)}),m.jsx(Yt,{label:"Clear out-point",children:m.jsx("button",{type:"button",onClick:()=>s(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:k$.map(A=>m.jsxs("div",{children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:A.title}),m.jsx("div",{className:"flex flex-col gap-1",children:A.hints.map(k=>m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:k.key}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:k.label})]},k.key))})]},A.title))})]})]})}),M$=[.25,.5,1,1.5,2],C$=d.memo(function({playbackRate:e,setPlaybackRate:n,disabled:r}){const[i,l]=d.useState(!1),s=d.useRef(null);return d.useEffect(()=>{if(!i)return;const c=u=>{s.current&&!s.current.contains(u.target)&&l(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[i]),m.jsxs("div",{ref:s,className:"relative flex-shrink-0",children:[m.jsx(Yt,{label:"Playback speed",children:m.jsx("button",{type:"button",onClick:()=>l(c=>!c),disabled:r,className:"w-10 px-2 py-1 rounded-md text-[10px] font-mono tabular-nums transition-colors",style:{color:"#71717A",background:"rgba(255,255,255,0.04)"},children:e===1?"1x":`${e}x`})}),i&&m.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:M$.map(c=>m.jsxs("button",{onClick:()=>{Lt("playback",{action:"speed_change",rate:c}),n(c),l(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:c===e?"#FAFAFA":"#71717A",background:c===e?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:u=>{c!==e&&(u.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:u=>{c!==e&&(u.currentTarget.style.background="transparent")},children:[c,"x"]},c))})]})}),E$=8;function K5(t,e,n){if(!Number.isFinite(n)||n<=0)return 0;const r=(t-e)/n,i=Math.max(0,Math.min(1,r)),l=Math.min(.5,E$/n);return i<=l?0:i>=1-l?1:i}function y1(t,e,n){t.current&&(t.current.style.width=`${n}%`),e.current&&(e.current.style.left=`${n}%`)}function T$(t,e,n,r){const i=d.useCallback(s=>{if(n)return;const c=t.seekBarRef.current;if(!c||r<=0)return;const u=c.getBoundingClientRect(),h=K5(s,u.left,u.width);y1(t.progressFillRef,t.progressThumbRef,h*100),e(h*r)},[n,r,e,t]),l=d.useCallback(s=>{if(s.button!==0)return;s.preventDefault(),s.currentTarget.focus(),t.isDraggingRef.current=!0;const c=s.currentTarget,u=s.pointerId;try{c.setPointerCapture(u)}catch{}i(s.clientX);let h=0,g=s.clientX;const O=w=>{if(w.pointerId!==u||!t.isDraggingRef.current)return;g=w.clientX;const A=t.seekBarRef.current,k=t.durationRef.current;if(A&&k>0){const M=A.getBoundingClientRect(),E=K5(w.clientX,M.left,M.width)*100;y1(t.progressFillRef,t.progressThumbRef,E)}h||(h=requestAnimationFrame(()=>{h=0,t.isDraggingRef.current&&i(g)}))},x=()=>{t.isDraggingRef.current=!1,h&&(cancelAnimationFrame(h),h=0),i(g);try{c.releasePointerCapture(u)}catch{}c.removeEventListener("pointermove",O),c.removeEventListener("pointerup",y),c.removeEventListener("pointercancel",y),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.removeEventListener("visibilitychange",v),window.removeEventListener("blur",x),c.blur()},y=w=>{w.pointerId===u&&x()},v=()=>{document.visibilityState==="hidden"&&x()};c.addEventListener("pointermove",O),c.addEventListener("pointerup",y),c.addEventListener("pointercancel",y),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y),document.addEventListener("visibilitychange",v),window.addEventListener("blur",x)},[i,t]);return Xt(()=>{const s=h=>{t.currentTimeRef.current=h;const g=t.durationRef.current,O=g>0?Math.min(100,h/g*100):0;y1(t.progressFillRef,t.progressThumbRef,O),t.timeDisplayRef.current&&(t.timeDisplayRef.current.textContent=t.timeDisplayModeRef.current==="frame"?NS(h,g):yn(h)),t.sliderRef.current&&t.sliderRef.current.setAttribute("aria-valuenow",String(Math.round(h)))},c=zr.subscribe(s);s(fe.getState().currentTime);const u=setInterval(()=>{const h=fe.getState().currentTime,g=fe.getState().duration;g>0&&h>0&&y1(t.progressFillRef,t.progressThumbRef,Math.min(100,h/g*100))},500);return()=>{c(),clearInterval(u)}}),{handlePointerDown:l}}function $$(){return m.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:m.jsx("polygon",{points:"6,3 20,12 6,21"})})}function j$(){return m.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[m.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),m.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]})}const P$=d.memo(function({audioMuted:e,audioAutoMuted:n,effectiveAudioMuted:r,controlsDisabled:i,setAudioMuted:l}){const s=n?"Audio muted above 1x speed":e?"Unmute audio":"Mute audio";return m.jsx(Yt,{label:s,children:m.jsx("button",{type:"button",onClick:()=>{n||(Lt("playback",{action:"mute_toggle",muted:!e}),l(!e))},disabled:i||n,"aria-label":s,"aria-pressed":r,className:`h-7 w-7 flex-shrink-0 flex items-center justify-center rounded-md border transition-colors disabled:pointer-events-none ${r?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"} ${n?"opacity-70":""}`,children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),r?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"m19 9-6 6"}),m.jsx("path",{d:"m13 9 6 6"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),m.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"})]})]})})})}),Q$=d.memo(function({loopEnabled:e,disabled:n,setLoopEnabled:r}){return m.jsx(Yt,{label:"Loop playback",children:m.jsx("button",{type:"button",onClick:()=>{Lt("playback",{action:"loop_toggle",enabled:!e}),r(!e)},disabled:n,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${e?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,"aria-label":e?"Disable loop playback":"Enable loop playback","aria-pressed":e,children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M17 2l4 4-4 4"}),m.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),m.jsx("path",{d:"M7 22l-4-4 4-4"}),m.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})})})}),Z$=d.memo(function({isFullscreen:e,onToggleFullscreen:n}){return m.jsx(Yt,{label:e?"Exit fullscreen (F)":"Enter fullscreen (F)",children:m.jsx("button",{type:"button",onClick:()=>{Lt("playback",{action:"fullscreen_toggle",active:!e}),n()},className:`h-7 w-7 flex-shrink-0 flex items-center justify-center rounded-md border transition-colors ${e?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,"aria-label":e?"Exit fullscreen":"Enter fullscreen",children:m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),m.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),m.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),m.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),m.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),m.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),m.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})})})})});function J5({position:t,duration:e}){return e<=0?null:m.jsx("div",{className:"absolute z-[3] pointer-events-none",style:{left:`${Math.min(100,t/e*100)}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"10px",background:"#3CE6AC",borderRadius:"1px"}})}function N$({inPoint:t,outPoint:e,duration:n}){return t===null&&e===null||n<=0?null:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${t!==null?Math.min(100,t/n*100):0}%`,right:`${e!==null?100-Math.min(100,e/n*100):0}%`,background:"rgba(60,230,172,0.15)"}}),t!==null&&m.jsx(J5,{position:t,duration:n}),e!==null&&m.jsx(J5,{position:e,duration:n})]})}const R$=d.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,progressFillRef:l,progressThumbRef:s,seekBarRef:c,sliderRef:u,onPointerDown:h,onKeyDown:g}){return m.jsx("div",{ref:O=>{c.current=O,u.current=O},role:"slider",tabIndex:e?-1:0,"aria-label":"Seek","aria-disabled":e||void 0,"aria-valuemin":0,"aria-valuemax":Math.round(n),"aria-valuenow":0,className:`min-w-[96px] flex-1 h-6 flex items-center group outline-none focus-visible:ring-1 focus-visible:ring-white/30 focus-visible:rounded ${e?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{touchAction:"none"},onPointerDown:h,onKeyDown:g,children:m.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[m.jsx(N$,{inPoint:r,outPoint:i,duration:n}),m.jsx("div",{ref:l,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),m.jsx("div",{ref:s,className:"absolute top-1/2 z-[4] w-3 h-3 rounded-full -translate-y-1/2 -translate-x-1/2 transition-transform group-hover:scale-125",style:{background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 6px rgba(60,230,172,0.4), 0 1px 4px rgba(0,0,0,0.4)"}})]})})}),V$=d.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:l}){const s=fe(G=>G.isPlaying),c=fe(G=>G.duration),u=fe(G=>G.timelineReady),h=fe(G=>G.playbackRate),g=fe(G=>G.audioMuted),O=fe(G=>G.loopEnabled),x=fe.getState().setPlaybackRate,y=fe.getState().setAudioMuted,v=fe.getState().setLoopEnabled,w=fe(G=>G.inPoint),A=fe(G=>G.outPoint),k=fe.getState().setInPoint,M=fe.getState().setOutPoint,[E,$]=d.useState("time"),C=d.useRef(null),j=d.useRef(null),T=d.useRef(null),N=d.useRef(null),R=d.useRef(null),D=d.useRef(!1),V=d.useRef(0),z=d.useRef(E);z.current=E;const I=d.useRef(c);I.current=c;const U=r||!u,K=h>1,H=HS(g,h);d.useEffect(()=>{if(!T.current)return;const G=V.current;T.current.textContent=E==="frame"?NS(G,c):yn(G)},[c,E]);const{handlePointerDown:q}=T$({seekBarRef:N,progressFillRef:C,progressThumbRef:j,sliderRef:R,timeDisplayRef:T,isDraggingRef:D,durationRef:I,currentTimeRef:V,timeDisplayModeRef:z},n,r,c),X=d.useCallback(G=>{if(r||!u||c<=0)return;const F=G.shiftKey?10:1;G.key==="ArrowLeft"?(G.preventDefault(),n(X2(V.current,-F))):G.key==="ArrowRight"&&(G.preventDefault(),n(Math.min(c,X2(V.current,F))))},[r,u,c,n]);return m.jsxs("div",{className:"px-4 py-2 flex flex-wrap items-center gap-x-2 gap-y-1","aria-disabled":r||void 0,style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[m.jsx(Yt,{label:s?"Pause":"Play",children:m.jsx("button",{type:"button","aria-label":s?"Pause":"Play",onClick:()=>{Lt("playback",{action:s?"pause":"play"}),e()},disabled:U,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg disabled:opacity-30 disabled:pointer-events-none transition-colors",style:{background:"rgba(255,255,255,0.06)"},children:s?m.jsx(j$,{}):m.jsx($$,{})})}),m.jsx(Yt,{label:E==="time"?"Switch to frame display":"Switch to time display",children:m.jsxs("button",{type:"button",onClick:()=>$(G=>G==="time"?"frame":"time"),disabled:r,className:"font-mono text-[11px] tabular-nums flex-shrink-0 w-[118px] text-left transition-colors disabled:pointer-events-none hover:opacity-80",style:{color:"#A1A1AA",cursor:"pointer"},children:[m.jsx("span",{ref:T,children:yn(0)}),E==="time"?m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),m.jsx("span",{style:{color:"#52525B"},children:yn(c)})]}):null]})}),m.jsx(R$,{disabled:r,duration:c,inPoint:w,outPoint:A,progressFillRef:C,progressThumbRef:j,seekBarRef:N,sliderRef:R,onPointerDown:q,onKeyDown:X}),m.jsx(P$,{audioMuted:g,audioAutoMuted:K,effectiveAudioMuted:H,controlsDisabled:U,setAudioMuted:y}),m.jsx(C$,{playbackRate:h,setPlaybackRate:x,disabled:r}),m.jsx(Q$,{loopEnabled:O,disabled:r,setLoopEnabled:v}),l&&m.jsx(Z$,{isFullscreen:i,onToggleFullscreen:l}),m.jsx(A$,{disabled:r,duration:c,inPoint:w,outPoint:A,setInPoint:k,setOutPoint:M,onSeek:n})]})}),ey=100;function qs(t){return Math.round(t*ey)/ey}function ou(t,e,n){return Math.min(Math.max(t,e),n)}const ty=.55,b1=40,ny=12;function ry(t,e,n){const r=(i,l,s)=>{if(s<i+b1){const c=Math.max(0,1-(s-i)/b1);return-Math.round(ny*c)}if(s>l-b1){const c=Math.max(0,1-(l-s)/b1);return Math.round(ny*c)}return 0};return{x:r(t.left,t.right,e),y:r(t.top,t.bottom,n)}}function L$(t,e,n){const r=(t.currentScrollLeft??0)-(t.originScrollLeft??0),i=(t.currentScrollTop??0)-(t.originScrollTop??0),l=(e-t.originClientX+r)/Math.max(t.pixelsPerSecond,1),s=(n-t.originClientY+i)/Math.max(t.trackHeight,1),c=Math.round(s),u=Math.max(0,t.trackOrder.indexOf(t.track)),h=u+c,g=ou(h,0,Math.max(0,t.trackOrder.length-1)),O=Math.min(...t.trackOrder),x=Math.max(...t.trackOrder);let y=t.trackOrder[g]??t.track;const v=u===0,w=u===t.trackOrder.length-1;return v&&h<0&&u+s<=-ty?y=O-1:w&&h>t.trackOrder.length-1&&u+s>=t.trackOrder.length-1+ty&&(y=x+1),{start:ou(qs(t.start+l),0,Math.max(0,t.maxStart)),track:y}}function _$(t,e,n){const r=Math.max(.05,t.minDuration??.1),i=(n-t.originClientX)/Math.max(t.pixelsPerSecond,1);if(e==="end"){const y=ou(qs(t.duration+i),r,Math.max(r,t.maxEnd-t.start));return{start:t.start,duration:y,playbackStart:t.playbackStart}}const l=Math.max(.1,t.playbackRate??1),s=t.playbackStart!=null?t.playbackStart/l:Number.POSITIVE_INFINITY,c=-Math.min(t.start-t.minStart,s),u=t.duration-r,h=ou(i,c,u),g=qs(t.start+h),O=qs(t.duration-h),x=t.playbackStart!=null?qs(Math.max(0,t.playbackStart+h*l)):void 0;return{start:g,duration:O,playbackStart:x}}function D$(t){if(t.compositionSrc||t.playbackStartAttr!=null||t.sourceDuration!=null&&Number.isFinite(t.sourceDuration)&&t.sourceDuration>0)return!0;const e=t.tag.toLowerCase();return["video","audio","img"].includes(e)}function H$(t){return!!(t.domId||t.selector)}function iy(t){if(t.timingSource==="implicit"||t.timelineLocked)return{canMove:!1,canTrimStart:!1,canTrimEnd:!1};const e=H$(t),n=Number.isFinite(t.duration)&&t.duration>0,r=D$(t);return{canMove:e&&(r||n),canTrimEnd:e&&n,canTrimStart:e&&n}}function X$(t){if(t.capabilities.canMove)return null;const e=Math.max(0,t.width),n=ou(t.offsetX,0,e),r=Math.max(0,t.handleWidth);return n<=r&&!t.capabilities.canTrimStart?"resize-start":n>=Math.max(0,e-r)&&!t.capabilities.canTrimEnd?"resize-end":"move"}function z$(t,e){return{start:t.start,end:t.start+t.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function F$({rangeStart:t,rangeEnd:e,elements:n,prompt:r}){const i=Math.min(t,e),l=Math.max(t,e),s=n.map(c=>`- #${c.id} (${c.tag}) — ${yn(c.start)} to ${yn(c.start+c.duration)}, track ${c.track}`).join(`
49
+ `).replace(CE,"")}function Gx(a,o){return o=qx(o),qx(a)===o}function Pt(a,o,f,p,b,S){switch(f){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||ss(a,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&ss(a,""+p);break;case"className":pt(a,"class",p);break;case"tabIndex":pt(a,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":pt(a,f,p);break;case"style":G6(a,p,S);break;case"data":if(o!=="object"){pt(a,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||f!=="href")){a.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=o0(""+p),a.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){a.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(f==="formAction"?(o!=="input"&&Pt(a,o,"name",b.name,b,null),Pt(a,o,"formEncType",b.formEncType,b,null),Pt(a,o,"formMethod",b.formMethod,b,null),Pt(a,o,"formTarget",b.formTarget,b,null)):(Pt(a,o,"encType",b.encType,b,null),Pt(a,o,"method",b.method,b,null),Pt(a,o,"target",b.target,b,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){a.removeAttribute(f);break}p=o0(""+p),a.setAttribute(f,p);break;case"onClick":p!=null&&(a.onclick=Vi);break;case"onScroll":p!=null&&tt("scroll",a);break;case"onScrollEnd":p!=null&&tt("scrollend",a);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(b.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"multiple":a.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":a.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){a.removeAttribute("xlink:href");break}f=o0(""+p),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""+p):a.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":p===!0?a.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?a.setAttribute(f,p):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?a.setAttribute(f,p):a.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?a.removeAttribute(f):a.setAttribute(f,p);break;case"popover":tt("beforetoggle",a),tt("toggle",a),Ea(a,"popover",p);break;case"xlinkActuate":$t(a,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":$t(a,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":$t(a,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":$t(a,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":$t(a,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":$t(a,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":$t(a,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":$t(a,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":$t(a,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":Ea(a,"is",p);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=tC.get(f)||f,Ea(a,f,p))}}function Dm(a,o,f,p,b,S){switch(f){case"style":G6(a,p,S);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(f=p.__html,f!=null){if(b.children!=null)throw Error(r(60));a.innerHTML=f}}break;case"children":typeof p=="string"?ss(a,p):(typeof p=="number"||typeof p=="bigint")&&ss(a,""+p);break;case"onScroll":p!=null&&tt("scroll",a);break;case"onScrollEnd":p!=null&&tt("scrollend",a);break;case"onClick":p!=null&&(a.onclick=Vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!i0.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(b=f.endsWith("Capture"),o=f.slice(2,b?f.length-7:void 0),S=a[vn]||null,S=S!=null?S[f]:null,typeof S=="function"&&a.removeEventListener(o,S,b),typeof p=="function")){typeof S!="function"&&S!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(o,p,b);break e}f in a?a[f]=p:p===!0?a.setAttribute(f,""):Ea(a,f,p)}}}function Qn(a,o,f){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",a),tt("load",a);var p=!1,b=!1,S;for(S in f)if(f.hasOwnProperty(S)){var Q=f[S];if(Q!=null)switch(S){case"src":p=!0;break;case"srcSet":b=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Pt(a,o,S,Q,f,null)}}b&&Pt(a,o,"srcSet",f.srcSet,f,null),p&&Pt(a,o,"src",f.src,f,null);return;case"input":tt("invalid",a);var _=S=Q=b=null,W=null,se=null;for(p in f)if(f.hasOwnProperty(p)){var de=f[p];if(de!=null)switch(p){case"name":b=de;break;case"type":Q=de;break;case"checked":W=de;break;case"defaultChecked":se=de;break;case"value":S=de;break;case"defaultValue":_=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(r(137,o));break;default:Pt(a,o,p,de,f,null)}}B6(a,S,_,W,se,Q,b,!1);return;case"select":tt("invalid",a),p=Q=S=null;for(b in f)if(f.hasOwnProperty(b)&&(_=f[b],_!=null))switch(b){case"value":S=_;break;case"defaultValue":Q=_;break;case"multiple":p=_;default:Pt(a,o,b,_,f,null)}o=S,f=Q,a.multiple=!!p,o!=null?ls(a,!!p,o,!1):f!=null&&ls(a,!!p,f,!0);return;case"textarea":tt("invalid",a),S=b=p=null;for(Q in f)if(f.hasOwnProperty(Q)&&(_=f[Q],_!=null))switch(Q){case"value":p=_;break;case"defaultValue":b=_;break;case"children":S=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:Pt(a,o,Q,_,f,null)}I6(a,p,b,S);return;case"option":for(W in f)if(f.hasOwnProperty(W)&&(p=f[W],p!=null))switch(W){case"selected":a.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:Pt(a,o,W,p,f,null)}return;case"dialog":tt("beforetoggle",a),tt("toggle",a),tt("cancel",a),tt("close",a);break;case"iframe":case"object":tt("load",a);break;case"video":case"audio":for(p=0;p<bc.length;p++)tt(bc[p],a);break;case"image":tt("error",a),tt("load",a);break;case"details":tt("toggle",a);break;case"embed":case"source":case"link":tt("error",a),tt("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(se in f)if(f.hasOwnProperty(se)&&(p=f[se],p!=null))switch(se){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:Pt(a,o,se,p,f,null)}return;default:if(eh(o)){for(de in f)f.hasOwnProperty(de)&&(p=f[de],p!==void 0&&Dm(a,o,de,p,f,void 0));return}}for(_ in f)f.hasOwnProperty(_)&&(p=f[_],p!=null&&Pt(a,o,_,p,f,null))}function EE(a,o,f,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var b=null,S=null,Q=null,_=null,W=null,se=null,de=null;for(ce in f){var pe=f[ce];if(f.hasOwnProperty(ce)&&pe!=null)switch(ce){case"checked":break;case"value":break;case"defaultValue":W=pe;default:p.hasOwnProperty(ce)||Pt(a,o,ce,null,p,pe)}}for(var oe in p){var ce=p[oe];if(pe=f[oe],p.hasOwnProperty(oe)&&(ce!=null||pe!=null))switch(oe){case"type":S=ce;break;case"name":b=ce;break;case"checked":se=ce;break;case"defaultChecked":de=ce;break;case"value":Q=ce;break;case"defaultValue":_=ce;break;case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(r(137,o));break;default:ce!==pe&&Pt(a,o,oe,ce,p,pe)}}Kd(a,Q,_,W,se,de,S,b);return;case"select":ce=Q=_=oe=null;for(S in f)if(W=f[S],f.hasOwnProperty(S)&&W!=null)switch(S){case"value":break;case"multiple":ce=W;default:p.hasOwnProperty(S)||Pt(a,o,S,null,p,W)}for(b in p)if(S=p[b],W=f[b],p.hasOwnProperty(b)&&(S!=null||W!=null))switch(b){case"value":oe=S;break;case"defaultValue":_=S;break;case"multiple":Q=S;default:S!==W&&Pt(a,o,b,S,p,W)}o=_,f=Q,p=ce,oe!=null?ls(a,!!f,oe,!1):!!p!=!!f&&(o!=null?ls(a,!!f,o,!0):ls(a,!!f,f?[]:"",!1));return;case"textarea":ce=oe=null;for(_ in f)if(b=f[_],f.hasOwnProperty(_)&&b!=null&&!p.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Pt(a,o,_,null,p,b)}for(Q in p)if(b=p[Q],S=f[Q],p.hasOwnProperty(Q)&&(b!=null||S!=null))switch(Q){case"value":oe=b;break;case"defaultValue":ce=b;break;case"children":break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:b!==S&&Pt(a,o,Q,b,p,S)}Y6(a,oe,ce);return;case"option":for(var Te in f)if(oe=f[Te],f.hasOwnProperty(Te)&&oe!=null&&!p.hasOwnProperty(Te))switch(Te){case"selected":a.selected=!1;break;default:Pt(a,o,Te,null,p,oe)}for(W in p)if(oe=p[W],ce=f[W],p.hasOwnProperty(W)&&oe!==ce&&(oe!=null||ce!=null))switch(W){case"selected":a.selected=oe&&typeof oe!="function"&&typeof oe!="symbol";break;default:Pt(a,o,W,oe,p,ce)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var He in f)oe=f[He],f.hasOwnProperty(He)&&oe!=null&&!p.hasOwnProperty(He)&&Pt(a,o,He,null,p,oe);for(se in p)if(oe=p[se],ce=f[se],p.hasOwnProperty(se)&&oe!==ce&&(oe!=null||ce!=null))switch(se){case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(r(137,o));break;default:Pt(a,o,se,oe,p,ce)}return;default:if(eh(o)){for(var Qt in f)oe=f[Qt],f.hasOwnProperty(Qt)&&oe!==void 0&&!p.hasOwnProperty(Qt)&&Dm(a,o,Qt,void 0,p,oe);for(de in p)oe=p[de],ce=f[de],!p.hasOwnProperty(de)||oe===ce||oe===void 0&&ce===void 0||Dm(a,o,de,oe,p,ce);return}}for(var ie in f)oe=f[ie],f.hasOwnProperty(ie)&&oe!=null&&!p.hasOwnProperty(ie)&&Pt(a,o,ie,null,p,oe);for(pe in p)oe=p[pe],ce=f[pe],!p.hasOwnProperty(pe)||oe===ce||oe==null&&ce==null||Pt(a,o,pe,oe,p,ce)}function Ux(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TE(){if(typeof performance.getEntriesByType=="function"){for(var a=0,o=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var b=f[p],S=b.transferSize,Q=b.initiatorType,_=b.duration;if(S&&_&&Ux(Q)){for(Q=0,_=b.responseEnd,p+=1;p<f.length;p++){var W=f[p],se=W.startTime;if(se>_)break;var de=W.transferSize,pe=W.initiatorType;de&&Ux(pe)&&(W=W.responseEnd,Q+=de*(W<_?1:(_-se)/(W-se)))}if(--p,o+=8*(S+Q)/(b.duration/1e3),a++,10<a)break}}if(0<a)return o/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Hm=null,Xm=null;function r1(a){return a.nodeType===9?a:a.ownerDocument}function Wx(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Kx(a,o){if(a===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&o==="foreignObject"?0:a}function zm(a,o){return a==="textarea"||a==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Fm=null;function $E(){var a=window.event;return a&&a.type==="popstate"?a===Fm?!1:(Fm=a,!0):(Fm=null,!1)}var Jx=typeof setTimeout=="function"?setTimeout:void 0,jE=typeof clearTimeout=="function"?clearTimeout:void 0,e5=typeof Promise=="function"?Promise:void 0,PE=typeof queueMicrotask=="function"?queueMicrotask:typeof e5<"u"?function(a){return e5.resolve(null).then(a).catch(QE)}:Jx;function QE(a){setTimeout(function(){throw a})}function Ya(a){return a==="head"}function t5(a,o){var f=o,p=0;do{var b=f.nextSibling;if(a.removeChild(f),b&&b.nodeType===8)if(f=b.data,f==="/$"||f==="/&"){if(p===0){a.removeChild(b),Ls(o);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")Sc(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Sc(f);for(var S=f.firstChild;S;){var Q=S.nextSibling,_=S.nodeName;S[ct]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&S.rel.toLowerCase()==="stylesheet"||f.removeChild(S),S=Q}}else f==="body"&&Sc(a.ownerDocument.body);f=b}while(f);Ls(o)}function n5(a,o){var f=a;a=0;do{var p=f.nextSibling;if(f.nodeType===1?o?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(o?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=p}while(f)}function Bm(a){var o=a.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var f=o;switch(o=o.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Bm(f),zt(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function ZE(a,o,f,p){for(;a.nodeType===1;){var b=f;if(a.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(p){if(!a[ct])switch(o){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(S=a.getAttribute("rel"),S==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(S!==b.rel||a.getAttribute("href")!==(b.href==null||b.href===""?null:b.href)||a.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin)||a.getAttribute("title")!==(b.title==null?null:b.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(S=a.getAttribute("src"),(S!==(b.src==null?null:b.src)||a.getAttribute("type")!==(b.type==null?null:b.type)||a.getAttribute("crossorigin")!==(b.crossOrigin==null?null:b.crossOrigin))&&S&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(o==="input"&&a.type==="hidden"){var S=b.name==null?null:""+b.name;if(b.type==="hidden"&&a.getAttribute("name")===S)return a}else return a;if(a=Dr(a.nextSibling),a===null)break}return null}function NE(a,o,f){if(o==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=Dr(a.nextSibling),a===null))return null;return a}function r5(a,o){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!o||(a=Dr(a.nextSibling),a===null))return null;return a}function Ym(a){return a.data==="$?"||a.data==="$~"}function Im(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function RE(a,o){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=o;else if(a.data!=="$?"||f.readyState!=="loading")o();else{var p=function(){o(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),a._reactRetry=p}}function Dr(a){for(;a!=null;a=a.nextSibling){var o=a.nodeType;if(o===1||o===3)break;if(o===8){if(o=a.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return a}var qm=null;function i5(a){a=a.nextSibling;for(var o=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(o===0)return Dr(a.nextSibling);o--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||o++}a=a.nextSibling}return null}function a5(a){a=a.previousSibling;for(var o=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(o===0)return a;o--}else f!=="/$"&&f!=="/&"||o++}a=a.previousSibling}return null}function l5(a,o,f){switch(o=r1(f),a){case"html":if(a=o.documentElement,!a)throw Error(r(452));return a;case"head":if(a=o.head,!a)throw Error(r(453));return a;case"body":if(a=o.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function Sc(a){for(var o=a.attributes;o.length;)a.removeAttributeNode(o[0]);zt(a)}var Hr=new Map,s5=new Set;function i1(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var Ji=q.d;q.d={f:VE,r:LE,D:_E,C:DE,L:HE,m:XE,X:FE,S:zE,M:BE};function VE(){var a=Ji.f(),o=G0();return a||o}function LE(a){var o=Pr(a);o!==null&&o.tag===5&&o.type==="form"?k4(o):Ji.r(a)}var Ns=typeof document>"u"?null:document;function o5(a,o,f){var p=Ns;if(p&&typeof o=="string"&&o){var b=Qr(o);b='link[rel="'+a+'"][href="'+b+'"]',typeof f=="string"&&(b+='[crossorigin="'+f+'"]'),s5.has(b)||(s5.add(b),a={rel:a,crossOrigin:f,href:o},p.querySelector(b)===null&&(o=p.createElement("link"),Qn(o,"link",a),un(o),p.head.appendChild(o)))}}function _E(a){Ji.D(a),o5("dns-prefetch",a,null)}function DE(a,o){Ji.C(a,o),o5("preconnect",a,o)}function HE(a,o,f){Ji.L(a,o,f);var p=Ns;if(p&&a&&o){var b='link[rel="preload"][as="'+Qr(o)+'"]';o==="image"&&f&&f.imageSrcSet?(b+='[imagesrcset="'+Qr(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(b+='[imagesizes="'+Qr(f.imageSizes)+'"]')):b+='[href="'+Qr(a)+'"]';var S=b;switch(o){case"style":S=Rs(a);break;case"script":S=Vs(a)}Hr.has(S)||(a=O({rel:"preload",href:o==="image"&&f&&f.imageSrcSet?void 0:a,as:o},f),Hr.set(S,a),p.querySelector(b)!==null||o==="style"&&p.querySelector(wc(S))||o==="script"&&p.querySelector(kc(S))||(o=p.createElement("link"),Qn(o,"link",a),un(o),p.head.appendChild(o)))}}function XE(a,o){Ji.m(a,o);var f=Ns;if(f&&a){var p=o&&typeof o.as=="string"?o.as:"script",b='link[rel="modulepreload"][as="'+Qr(p)+'"][href="'+Qr(a)+'"]',S=b;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Vs(a)}if(!Hr.has(S)&&(a=O({rel:"modulepreload",href:a},o),Hr.set(S,a),f.querySelector(b)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(kc(S)))return}p=f.createElement("link"),Qn(p,"link",a),un(p),f.head.appendChild(p)}}}function zE(a,o,f){Ji.S(a,o,f);var p=Ns;if(p&&a){var b=Ma(p).hoistableStyles,S=Rs(a);o=o||"default";var Q=b.get(S);if(!Q){var _={loading:0,preload:null};if(Q=p.querySelector(wc(S)))_.loading=5;else{a=O({rel:"stylesheet",href:a,"data-precedence":o},f),(f=Hr.get(S))&&Gm(a,f);var W=Q=p.createElement("link");un(W),Qn(W,"link",a),W._p=new Promise(function(se,de){W.onload=se,W.onerror=de}),W.addEventListener("load",function(){_.loading|=1}),W.addEventListener("error",function(){_.loading|=2}),_.loading|=4,a1(Q,o,p)}Q={type:"stylesheet",instance:Q,count:1,state:_},b.set(S,Q)}}}function FE(a,o){Ji.X(a,o);var f=Ns;if(f&&a){var p=Ma(f).hoistableScripts,b=Vs(a),S=p.get(b);S||(S=f.querySelector(kc(b)),S||(a=O({src:a,async:!0},o),(o=Hr.get(b))&&Um(a,o),S=f.createElement("script"),un(S),Qn(S,"link",a),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(b,S))}}function BE(a,o){Ji.M(a,o);var f=Ns;if(f&&a){var p=Ma(f).hoistableScripts,b=Vs(a),S=p.get(b);S||(S=f.querySelector(kc(b)),S||(a=O({src:a,async:!0,type:"module"},o),(o=Hr.get(b))&&Um(a,o),S=f.createElement("script"),un(S),Qn(S,"link",a),f.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},p.set(b,S))}}function c5(a,o,f,p){var b=(b=te.current)?i1(b):null;if(!b)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(o=Rs(f.href),f=Ma(b).hoistableStyles,p=f.get(o),p||(p={type:"style",instance:null,count:0,state:null},f.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=Rs(f.href);var S=Ma(b).hoistableStyles,Q=S.get(a);if(Q||(b=b.ownerDocument||b,Q={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(a,Q),(S=b.querySelector(wc(a)))&&!S._p&&(Q.instance=S,Q.state.loading=5),Hr.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},Hr.set(a,f),S||YE(b,a,f,Q.state))),o&&p===null)throw Error(r(528,""));return Q}if(o&&p!==null)throw Error(r(529,""));return null;case"script":return o=f.async,f=f.src,typeof f=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=Vs(f),f=Ma(b).hoistableScripts,p=f.get(o),p||(p={type:"script",instance:null,count:0,state:null},f.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Rs(a){return'href="'+Qr(a)+'"'}function wc(a){return'link[rel="stylesheet"]['+a+"]"}function u5(a){return O({},a,{"data-precedence":a.precedence,precedence:null})}function YE(a,o,f,p){a.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=a.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),Qn(o,"link",f),un(o),a.head.appendChild(o))}function Vs(a){return'[src="'+Qr(a)+'"]'}function kc(a){return"script[async]"+a}function f5(a,o,f){if(o.count++,o.instance===null)switch(o.type){case"style":var p=a.querySelector('style[data-href~="'+Qr(f.href)+'"]');if(p)return o.instance=p,un(p),p;var b=O({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(a.ownerDocument||a).createElement("style"),un(p),Qn(p,"style",b),a1(p,f.precedence,a),o.instance=p;case"stylesheet":b=Rs(f.href);var S=a.querySelector(wc(b));if(S)return o.state.loading|=4,o.instance=S,un(S),S;p=u5(f),(b=Hr.get(b))&&Gm(p,b),S=(a.ownerDocument||a).createElement("link"),un(S);var Q=S;return Q._p=new Promise(function(_,W){Q.onload=_,Q.onerror=W}),Qn(S,"link",p),o.state.loading|=4,a1(S,f.precedence,a),o.instance=S;case"script":return S=Vs(f.src),(b=a.querySelector(kc(S)))?(o.instance=b,un(b),b):(p=f,(b=Hr.get(S))&&(p=O({},f),Um(p,b)),a=a.ownerDocument||a,b=a.createElement("script"),un(b),Qn(b,"link",p),a.head.appendChild(b),o.instance=b);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,a1(p,f.precedence,a));return o.instance}function a1(a,o,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),b=p.length?p[p.length-1]:null,S=b,Q=0;Q<p.length;Q++){var _=p[Q];if(_.dataset.precedence===o)S=_;else if(S!==b)break}S?S.parentNode.insertBefore(a,S.nextSibling):(o=f.nodeType===9?f.head:f,o.insertBefore(a,o.firstChild))}function Gm(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.title==null&&(a.title=o.title)}function Um(a,o){a.crossOrigin==null&&(a.crossOrigin=o.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=o.referrerPolicy),a.integrity==null&&(a.integrity=o.integrity)}var l1=null;function d5(a,o,f){if(l1===null){var p=new Map,b=l1=new Map;b.set(f,p)}else b=l1,p=b.get(f),p||(p=new Map,b.set(f,p));if(p.has(a))return p;for(p.set(a,null),f=f.getElementsByTagName(a),b=0;b<f.length;b++){var S=f[b];if(!(S[ct]||S[tn]||a==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var Q=S.getAttribute(o)||"";Q=a+Q;var _=p.get(Q);_?_.push(S):p.set(Q,[S])}}return p}function h5(a,o,f){a=a.ownerDocument||a,a.head.insertBefore(f,o==="title"?a.querySelector("head > title"):null)}function IE(a,o,f){if(f===1||o.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;switch(o.rel){case"stylesheet":return a=o.disabled,typeof o.precedence=="string"&&a==null;default:return!0}case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function m5(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function qE(a,o,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var b=Rs(p.href),S=o.querySelector(wc(b));if(S){o=S._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(a.count++,a=s1.bind(a),o.then(a,a)),f.state.loading|=4,f.instance=S,un(S);return}S=o.ownerDocument||o,p=u5(p),(b=Hr.get(b))&&Gm(p,b),S=S.createElement("link"),un(S);var Q=S;Q._p=new Promise(function(_,W){Q.onload=_,Q.onerror=W}),Qn(S,"link",p),f.instance=S}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,o),(o=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=s1.bind(a),o.addEventListener("load",f),o.addEventListener("error",f))}}var Wm=0;function GE(a,o){return a.stylesheets&&a.count===0&&c1(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var p=setTimeout(function(){if(a.stylesheets&&c1(a,a.stylesheets),a.unsuspend){var S=a.unsuspend;a.unsuspend=null,S()}},6e4+o);0<a.imgBytes&&Wm===0&&(Wm=62500*TE());var b=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&c1(a,a.stylesheets),a.unsuspend)){var S=a.unsuspend;a.unsuspend=null,S()}},(a.imgBytes>Wm?50:800)+o);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(p),clearTimeout(b)}}:null}function s1(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)c1(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var o1=null;function c1(a,o){a.stylesheets=null,a.unsuspend!==null&&(a.count++,o1=new Map,o.forEach(UE,a),o1=null,s1.call(a))}function UE(a,o){if(!(o.state.loading&4)){var f=o1.get(a);if(f)var p=f.get(null);else{f=new Map,o1.set(a,f);for(var b=a.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<b.length;S++){var Q=b[S];(Q.nodeName==="LINK"||Q.getAttribute("media")!=="not all")&&(f.set(Q.dataset.precedence,Q),p=Q)}p&&f.set(null,p)}b=o.instance,Q=b.getAttribute("data-precedence"),S=f.get(Q)||p,S===p&&f.set(null,b),f.set(Q,b),this.count++,p=s1.bind(this),b.addEventListener("load",p),b.addEventListener("error",p),S?S.parentNode.insertBefore(b,S.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(b,a.firstChild)),o.state.loading|=4}}var Ac={$$typeof:E,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function WE(a,o,f,p,b,S,Q,_,W){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Zi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zi(0),this.hiddenUpdates=Zi(null),this.identifierPrefix=p,this.onUncaughtError=b,this.onCaughtError=S,this.onRecoverableError=Q,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function p5(a,o,f,p,b,S,Q,_,W,se,de,pe){return a=new WE(a,o,f,Q,W,se,de,pe,_),o=1,S===!0&&(o|=24),S=gr(3,null,null,o),a.current=S,S.stateNode=a,o=$h(),o.refCount++,a.pooledCache=o,o.refCount++,S.memoizedState={element:p,isDehydrated:f,cache:o},Zh(S),a}function g5(a){return a?(a=ms,a):ms}function O5(a,o,f,p,b,S){b=g5(b),p.context===null?p.context=b:p.pendingContext=b,p=Na(o),p.payload={element:f},S=S===void 0?null:S,S!==null&&(p.callback=S),f=Ra(a,p,o),f!==null&&(ar(f,a,o),rc(f,a,o))}function x5(a,o){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<o?f:o}}function Km(a,o){x5(a,o),(a=a.alternate)&&x5(a,o)}function y5(a){if(a.tag===13||a.tag===31){var o=Al(a,67108864);o!==null&&ar(o,a,67108864),Km(a,67108864)}}function b5(a){if(a.tag===13||a.tag===31){var o=vr();o=rt(o);var f=Al(a,o);f!==null&&ar(f,a,o),Km(a,o)}}var u1=!0;function KE(a,o,f,p){var b=H.T;H.T=null;var S=q.p;try{q.p=2,Jm(a,o,f,p)}finally{q.p=S,H.T=b}}function JE(a,o,f,p){var b=H.T;H.T=null;var S=q.p;try{q.p=8,Jm(a,o,f,p)}finally{q.p=S,H.T=b}}function Jm(a,o,f,p){if(u1){var b=ep(p);if(b===null)_m(a,o,p,f1,f),S5(a,p);else if(tT(b,a,o,f,p))p.stopPropagation();else if(S5(a,p),o&4&&-1<eT.indexOf(a)){for(;b!==null;){var S=Pr(b);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var Q=Tt(S.pendingLanes);if(Q!==0){var _=S;for(_.pendingLanes|=2,_.entangledLanes|=2;Q;){var W=1<<31-ze(Q);_.entanglements[1]|=W,Q&=~W}gi(S),(kt&6)===0&&(I0=be()+500,yc(0))}}break;case 31:case 13:_=Al(S,2),_!==null&&ar(_,S,2),G0(),Km(S,2)}if(S=ep(p),S===null&&_m(a,o,p,f1,f),S===b)break;b=S}b!==null&&p.stopPropagation()}else _m(a,o,p,null,f)}}function ep(a){return a=nh(a),tp(a)}var f1=null;function tp(a){if(f1=null,a=Tn(a),a!==null){var o=l(a);if(o===null)a=null;else{var f=o.tag;if(f===13){if(a=s(o),a!==null)return a;a=null}else if(f===31){if(a=c(o),a!==null)return a;a=null}else if(f===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;a=null}else o!==a&&(a=null)}}return f1=a,null}function v5(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(dt()){case Ue:return 2;case bt:return 8;case Re:case on:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var np=!1,Ia=null,qa=null,Ga=null,Mc=new Map,Cc=new Map,Ua=[],eT="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function S5(a,o){switch(a){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":qa=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":Mc.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Cc.delete(o.pointerId)}}function Ec(a,o,f,p,b,S){return a===null||a.nativeEvent!==S?(a={blockedOn:o,domEventName:f,eventSystemFlags:p,nativeEvent:S,targetContainers:[b]},o!==null&&(o=Pr(o),o!==null&&y5(o)),a):(a.eventSystemFlags|=p,o=a.targetContainers,b!==null&&o.indexOf(b)===-1&&o.push(b),a)}function tT(a,o,f,p,b){switch(o){case"focusin":return Ia=Ec(Ia,a,o,f,p,b),!0;case"dragenter":return qa=Ec(qa,a,o,f,p,b),!0;case"mouseover":return Ga=Ec(Ga,a,o,f,p,b),!0;case"pointerover":var S=b.pointerId;return Mc.set(S,Ec(Mc.get(S)||null,a,o,f,p,b)),!0;case"gotpointercapture":return S=b.pointerId,Cc.set(S,Ec(Cc.get(S)||null,a,o,f,p,b)),!0}return!1}function w5(a){var o=Tn(a.target);if(o!==null){var f=l(o);if(f!==null){if(o=f.tag,o===13){if(o=s(f),o!==null){a.blockedOn=o,vl(a.priority,function(){b5(f)});return}}else if(o===31){if(o=c(f),o!==null){a.blockedOn=o,vl(a.priority,function(){b5(f)});return}}else if(o===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function d1(a){if(a.blockedOn!==null)return!1;for(var o=a.targetContainers;0<o.length;){var f=ep(a.nativeEvent);if(f===null){f=a.nativeEvent;var p=new f.constructor(f.type,f);th=p,f.target.dispatchEvent(p),th=null}else return o=Pr(f),o!==null&&y5(o),a.blockedOn=f,!1;o.shift()}return!0}function k5(a,o,f){d1(a)&&f.delete(o)}function nT(){np=!1,Ia!==null&&d1(Ia)&&(Ia=null),qa!==null&&d1(qa)&&(qa=null),Ga!==null&&d1(Ga)&&(Ga=null),Mc.forEach(k5),Cc.forEach(k5)}function h1(a,o){a.blockedOn===o&&(a.blockedOn=null,np||(np=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,nT)))}var m1=null;function A5(a){m1!==a&&(m1=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){m1===a&&(m1=null);for(var o=0;o<a.length;o+=3){var f=a[o],p=a[o+1],b=a[o+2];if(typeof p!="function"){if(tp(p||f)===null)continue;break}var S=Pr(f);S!==null&&(a.splice(o,3),o-=3,em(S,{pending:!0,data:b,method:f.method,action:p},p,b))}}))}function Ls(a){function o(W){return h1(W,a)}Ia!==null&&h1(Ia,a),qa!==null&&h1(qa,a),Ga!==null&&h1(Ga,a),Mc.forEach(o),Cc.forEach(o);for(var f=0;f<Ua.length;f++){var p=Ua[f];p.blockedOn===a&&(p.blockedOn=null)}for(;0<Ua.length&&(f=Ua[0],f.blockedOn===null);)w5(f),f.blockedOn===null&&Ua.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var b=f[p],S=f[p+1],Q=b[vn]||null;if(typeof S=="function")Q||A5(f);else if(Q){var _=null;if(S&&S.hasAttribute("formAction")){if(b=S,Q=S[vn]||null)_=Q.formAction;else if(tp(b)!==null)continue}else _=Q.action;typeof _=="function"?f[p+1]=_:(f.splice(p,3),p-=3),A5(f)}}}function M5(){function a(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(Q){return b=Q})},focusReset:"manual",scroll:"manual"})}function o(){b!==null&&(b(),b=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,b=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),b!==null&&(b(),b=null)}}}function rp(a){this._internalRoot=a}p1.prototype.render=rp.prototype.render=function(a){var o=this._internalRoot;if(o===null)throw Error(r(409));var f=o.current,p=vr();O5(f,p,a,o,null,null)},p1.prototype.unmount=rp.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var o=a.containerInfo;O5(a.current,2,null,a,null,null),G0(),o[Ur]=null}};function p1(a){this._internalRoot=a}p1.prototype.unstable_scheduleHydration=function(a){if(a){var o=mr();a={blockedOn:null,target:a,priority:o};for(var f=0;f<Ua.length&&o!==0&&o<Ua[f].priority;f++);Ua.splice(f,0,a),f===0&&w5(a)}};var C5=e.version;if(C5!=="19.2.6")throw Error(r(527,C5,"19.2.6"));q.findDOMNode=function(a){var o=a._reactInternals;if(o===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(o),a=a!==null?g(a):null,a=a===null?null:a.stateNode,a};var rT={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var g1=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!g1.isDisabled&&g1.supportsFiber)try{Mt=g1.inject(rT),ot=g1}catch{}}return $c.createRoot=function(a,o){if(!i(a))throw Error(r(299));var f=!1,p="",b=Z4,S=N4,Q=R4;return o!=null&&(o.unstable_strictMode===!0&&(f=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(b=o.onUncaughtError),o.onCaughtError!==void 0&&(S=o.onCaughtError),o.onRecoverableError!==void 0&&(Q=o.onRecoverableError)),o=p5(a,1,!1,null,null,f,p,null,b,S,Q,M5),a[Ur]=o.current,Lm(a),new rp(o)},$c.hydrateRoot=function(a,o,f){if(!i(a))throw Error(r(299));var p=!1,b="",S=Z4,Q=N4,_=R4,W=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(b=f.identifierPrefix),f.onUncaughtError!==void 0&&(S=f.onUncaughtError),f.onCaughtError!==void 0&&(Q=f.onCaughtError),f.onRecoverableError!==void 0&&(_=f.onRecoverableError),f.formState!==void 0&&(W=f.formState)),o=p5(a,1,!0,o,f??null,p,b,W,S,Q,_,M5),o.context=g5(null),f=o.current,p=vr(),p=rt(p),b=Na(p),b.callback=null,Ra(f,b,p),f=p,o.current.lanes=f,En(o,f),gi(o),a[Ur]=o.current,Lm(a),new p1(o)},$c.version="19.2.6",$c}var L5;function pT(){if(L5)return lp.exports;L5=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),lp.exports=mT(),lp.exports}var gT=pT();const _5="hyperframes-studio:anonymousId",OT="hyperframes-studio:telemetryDisabled",ES="hyperframes-studio:telemetryNoticeShown";function wd(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}function xT(){return typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`anon-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function yT(){const t=wd();if(!t)return"anonymous";const e=t.getItem(_5);if(e)return e;const n=xT();try{t.setItem(_5,n)}catch{}return n}function bT(){var t;return((t=wd())==null?void 0:t.getItem(OT))==="1"}function vT(){var t;return((t=wd())==null?void 0:t.getItem(ES))==="1"}function ST(){var t;try{(t=wd())==null||t.setItem(ES,"1")}catch{}}const TS="hyperframes-studio:sessionStartFired";function $S(){try{return typeof sessionStorage>"u"?null:sessionStorage}catch{return null}}function wT(){var t;return((t=$S())==null?void 0:t.getItem(TS))==="1"}function kT(){var t;try{(t=$S())==null||t.setItem(TS,"1")}catch{}}const AT={user_agent:"",language:"",screen_width:0,screen_height:0,device_pixel_ratio:0,timezone_offset_minutes:0,is_mobile:!1,studio_version:"dev"};let _s=null;function MT(){if(_s)return _s;if(typeof navigator>"u"||typeof window>"u")return _s=AT,_s;const t=navigator.userAgent,e=window.screen;return _s={user_agent:t,language:navigator.language,screen_width:e.width,screen_height:e.height,device_pixel_ratio:window.devicePixelRatio,timezone_offset_minutes:new Date().getTimezoneOffset(),is_mobile:/Android|iPhone|iPad/i.test(t),studio_version:"0.6.86"},_s}const jS="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",CT="https://us.i.posthog.com",ET=1e3;let Of=[],up=null,x1=null;function TT(){return typeof navigator<"u"&&navigator.doNotTrack==="1"}function $T(){return jS.startsWith("phc_")}function jT(){try{return!1}catch{return!1}}function PT(){try{return!1}catch{return!1}}function QT(){return x1!==null||(x1=$T()&&!jT()&&!PT()&&!bT()&&!TT()),x1}function S8(t,e={}){if(!QT())return;const n=MT();Of.push({event:t,properties:{...e,...n},timestamp:new Date().toISOString()}),up===null&&(up=setTimeout(()=>{up=null,_2()},ET)),NT()}function _2(){if(Of.length===0)return;const t=yT(),e=Of.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:t,timestamp:n.timestamp}));Of=[],ZT(`${CT}/batch/`,JSON.stringify({api_key:jS,batch:e}))}function ZT(t,e){try{fetch(t,{method:"POST",headers:{"Content-Type":"application/json"},body:e,keepalive:!0}).catch(()=>{});return}catch{}try{navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))}catch{}}function NT(){vT()||(ST(),console.info("%c[HyperFrames]%c Anonymous studio usage analytics enabled. Disable: localStorage.setItem('hyperframes-studio:telemetryDisabled','1') (then reload).","color:#7c3aed;font-weight:bold","color:inherit"))}typeof window<"u"&&(window.addEventListener("pagehide",()=>_2(),{capture:!0}),window.addEventListener("visibilitychange",()=>{typeof document<"u"&&document.visibilityState==="hidden"&&_2()}));function RT(t){S8("studio_session_start",{has_project:t.has_project})}function VT(t){S8("studio_render_start",{fps:t.fps,quality:t.quality,format:t.format,resolution:t.resolution,composition:t.composition})}function LT(){var t,e;try{const n=navigator,i=[`ua=${((t=n.userAgentData)==null?void 0:t.platform)??navigator.platform??"unknown"}`,`screen=${screen.width}x${screen.height}@${devicePixelRatio}x`,`lang=${navigator.language}`];return n.deviceMemory&&i.push(`mem=${n.deviceMemory}GB`),(e=n.connection)!=null&&e.effectiveType&&i.push(`net=${n.connection.effectiveType}`),navigator.hardwareConcurrency&&i.push(`cpu=${navigator.hardwareConcurrency}cores`),i.join(" ")}catch{return""}}function _T(t){S8("survey sent",{$survey_id:"studio_experience",$survey_response:t.rating,...t.comment?{$survey_response_2:t.comment}:{},doctor_summary:LT(),source:"studio"})}function DT(t){const[e,n]=d.useState([]),r=d.useRef(null),i=d.useRef(null),l=d.useCallback(async()=>{if(t)try{const h=await fetch(`/api/projects/${t}/renders`);if(!h.ok)return;const g=await h.json();Array.isArray(g.renders)&&n(O=>{const x=new Set(O.map(v=>v.id)),y=g.renders.filter(v=>!x.has(v.id)).map(v=>({id:v.id,status:v.status==="failed"?"failed":"complete",progress:100,filename:v.filename,createdAt:v.createdAt,durationMs:v.durationMs}));return[...O,...y]})}catch{}},[t]);d.useEffect(()=>{l()},[l]);const s=d.useCallback(async(h={})=>{if(!t)return;const g=h.fps??30,O=h.quality??"standard",x=h.format??"mp4",y=h.resolution,v=h.composition;VT({fps:g,quality:O,format:x,resolution:y,composition:v});const w=Date.now(),A={fps:g,quality:O,format:x};y&&y!=="auto"&&(A.resolution=y),v&&(A.composition=v);let k;try{k=await fetch(`/api/projects/${t}/render`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)})}catch{const T={id:crypto.randomUUID(),status:"failed",progress:0,error:"Could not reach render server. Use `hyperframes render` from the CLI instead.",filename:"Export failed",createdAt:w};n(N=>[...N,T]);return}if(!k.ok){const T={id:crypto.randomUUID(),status:"failed",progress:0,error:`Server error (${k.status}). Check the terminal for details.`,filename:"Export failed",createdAt:w};n(N=>[...N,T]);return}const{jobId:M}=await k.json(),$={mp4:".mp4",webm:".webm",mov:".mov"}[x]??".mp4",C={id:M,status:"rendering",progress:0,filename:`${M}${$}`,createdAt:w};n(T=>[...T,C]),i.current=M;const j=new EventSource(`/api/render/${M}/progress`);return r.current=j,j.addEventListener("progress",T=>{try{const N=JSON.parse(T.data);n(R=>R.map(D=>D.id===M?{...D,progress:N.progress??D.progress,stage:N.stage??N.message??D.stage,status:N.status==="complete"?"complete":N.status==="failed"?"failed":D.status,durationMs:N.status==="complete"?Date.now()-w:void 0,error:N.error??D.error}:D)),(N.status==="complete"||N.status==="failed")&&(j.close(),i.current=null)}catch{}}),j.onerror=()=>{j.close(),n(T=>T.map(N=>N.id===M&&N.status==="rendering"?{...N,status:"failed",error:"Connection lost. Is the render server running?"}:N)),i.current=null},M},[t]),c=d.useCallback(async h=>{try{await fetch(`/api/render/${h}`,{method:"DELETE"})}catch{}n(g=>g.filter(O=>O.id!==h))},[]),u=d.useCallback(()=>{n(h=>h.filter(g=>g.status==="rendering"))},[]);return d.useEffect(()=>()=>{var h;(h=r.current)==null||h.close(),r.current=null},[t]),{jobs:e,startRender:s,deleteRender:c,clearCompleted:u,isRendering:e.some(h=>h.status==="rendering")}}const HT="modulepreload",XT=function(t){return"/"+t},D5={},PS=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){let s=function(h){return Promise.all(h.map(g=>Promise.resolve(g).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=s(n.map(h=>{if(h=XT(h),h in D5)return;D5[h]=!0;const g=h.endsWith(".css"),O=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${O}`))return;const x=document.createElement("link");if(x.rel=g?"stylesheet":HT,g||(x.as="script"),x.crossOrigin="",x.href=h,u&&x.setAttribute("nonce",u),document.head.appendChild(x),g)return new Promise((y,v)=>{x.addEventListener("load",y),x.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function l(s){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=s,window.dispatchEvent(c),!c.defaultPrevented)throw s}return i.then(s=>{for(const c of s||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function zT(t){if(typeof t!="object"||t===null)return!0;const e=t;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function Xt(t){d.useEffect(t,[])}const QS={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","hover:bg-neutral-200","active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","hover:bg-surface-hover hover:text-white hover:border-border-strong","active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","hover:bg-red-600","active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","hover:bg-surface-hover hover:text-white","active:scale-[0.98]"].join(" ")},FT={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},BT=d.forwardRef(({variant:t="secondary",size:e="md",loading:n,icon:r,children:i,className:l="",disabled:s,...c},u)=>m.jsxs("button",{ref:u,disabled:s||n,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",QS[t],FT[e],l].join(" "),...c,children:[n?m.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[m.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),m.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?m.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&m.jsx("span",{children:i})]}));BT.displayName="Button";const YT={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},IT=d.forwardRef(({icon:t,size:e="md",variant:n="ghost",className:r="",...i},l)=>m.jsx("button",{ref:l,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",QS[n],YT[e],r].join(" "),...i,children:t}));IT.displayName="IconButton";function H5({title:t,detail:e,mono:n,size:r=64,progress:i}){const l=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,s=Math.round(r*1.16);return m.jsxs("div",{className:"hf-loader",draggable:!1,children:[m.jsx("div",{className:"hf-loader-mark-frame",style:{width:s,height:s},draggable:!1,children:m.jsxs("svg",{className:"hf-loader-mark",width:r,height:r,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[m.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:m.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:m.jsxs("g",{transform:"translate(-50 -50)",children:[m.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:"url(#hf-loader-grad-left)"}),m.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:"url(#hf-loader-grad-right)"})]})})}),m.jsxs("defs",{children:[m.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),m.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[m.jsx("stop",{stopColor:"#06E3FA"}),m.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),m.jsx("div",{className:"hf-loader-title",children:t}),e&&m.jsx("div",{className:"hf-loader-detail",children:e}),l!==void 0&&m.jsx("div",{className:"hf-loader-progress","aria-hidden":"true",children:m.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${l})`}})}),n&&m.jsx("div",{className:"hf-loader-mono",children:n})]})}var w8=CS();function Yt({label:t,children:e,delay:n=400,side:r="top"}){const[i,l]=d.useState(!1),[s,c]=d.useState({x:0,y:0}),u=d.useRef(null),h=d.useRef(null),g=d.useCallback(()=>{u.current=setTimeout(()=>{const x=h.current;if(!x)return;const v=(x.firstElementChild??x).getBoundingClientRect();v.width===0&&v.height===0||(c({x:v.left+v.width/2,y:r==="top"?v.top-6:v.bottom+6}),l(!0))},n)},[n,r]),O=d.useCallback(()=>{u.current&&(clearTimeout(u.current),u.current=null),l(!1)},[]);return m.jsxs(m.Fragment,{children:[m.jsx("span",{ref:h,onPointerEnter:g,onPointerLeave:O,className:"contents",children:e}),i&&w8.createPortal(m.jsx("div",{className:"fixed z-[200] pointer-events-none",style:{left:s.x,top:s.y,transform:r==="top"?"translate(-50%, -100%)":"translate(-50%, 0)"},children:m.jsx("div",{className:"px-2 py-1 rounded-md bg-neutral-800 border border-neutral-700/50 text-[10px] font-medium text-neutral-200 whitespace-nowrap shadow-lg",children:t})}),document.body)]})}const qT=3,GT=3;function X5(t){return typeof t=="object"&&t!==null}function UT(t){if(!(t instanceof CustomEvent))return null;const e=t.detail;if(!X5(e))return null;const n=e.state;return X5(n)?n.loading===!0&&n.ready!==!0:null}const WT=400;function KT(t){const e=t.shadowRoot;if(!e)return;const n=e.querySelector(".hfp-container"),r=e.querySelector(".hfp-iframe");n==null||n.style.setProperty("pointer-events","auto"),r==null||r.style.setProperty("pointer-events","auto")}function JT(t){const e=t.tagName.toLowerCase();return e==="video"||e==="audio"}function z5(t,e){try{const n=t.contentWindow,r=t.contentDocument;if(!n||!r)return e;for(const l of r.querySelectorAll("video, audio"))if(JT(l)&&!l.error&&l.networkState!==GT&&l.readyState<qT)return!0;const i=n.__hfLottie;if(i!=null&&i.length){for(const l of i)if(!zT(l))return!0}return!1}catch{return e}}const D2=d.forwardRef(({projectId:t,directUrl:e,onLoad:n,onCompositionLoadingChange:r,portrait:i,style:l,suppressLoadingOverlay:s},c)=>{const u=d.useRef(null),h=d.useRef(0),g=d.useRef(null),O=d.useRef(null),[x,y]=d.useState(!1),[v,w]=d.useState(!1),[A,k]=d.useState(!1),[M,E]=d.useState(!1),[$,C]=d.useState(!0),[j,T]=d.useState(!0);d.useEffect(()=>{if(!$){T(!0);return}const D=setTimeout(()=>T(!1),WT);return()=>clearTimeout(D)},[$]),Xt(()=>{const D=u.current;if(!D)return;let V=!1,z;return PS(()=>import("./hyperframes-player-0esDKGRk.js"),[]).then(()=>{if(V)return;const I=document.createElement("hyperframes-player"),U=e||`/api/projects/${t}/preview`;if(I.setAttribute("shader-capture-scale","1"),I.setAttribute("shader-loading","player"),I.setAttribute("src",U),I.setAttribute("width",String(i?1080:1920)),I.setAttribute("height",String(i?1920:1080)),I.style.width="100%",I.style.height="100%",I.style.display="block",I.style.background="transparent",D.appendChild(I),I.shadowRoot){const P=document.createElement("style");P.textContent=".hfp-container{overflow:visible}.hfp-iframe{box-shadow:0 0 0 1px rgba(255,255,255,0.08),0 4px 32px rgba(0,0,0,.7)}",I.shadowRoot.appendChild(P)}KT(I);const K=I.iframeElement;typeof c=="function"?c(K):c&&(c.current=K);const H=P=>P.stopImmediatePropagation();I.addEventListener("click",H,{capture:!0});const q=P=>{const Z=UT(P);Z!==null&&E(Z)};I.addEventListener("shadertransitionstate",q);const X=()=>{C(!1)},G=()=>{C(!1)};I.addEventListener("ready",X),I.addEventListener("error",G);const F=()=>{if(h.current++,E(!1),C(!0),h.current>1){D.classList.remove("preview-revealing"),D.offsetWidth,D.classList.add("preview-revealing");const L=()=>D.classList.remove("preview-revealing");D.addEventListener("animationend",L,{once:!0})}n(),g.current&&clearInterval(g.current);let Z=h.current>1?!1:z5(K,!1);if(Z){y(!0);let L=0;g.current=setInterval(()=>{L+=1,Z=z5(K,Z),(!Z||L>100)&&(g.current&&clearInterval(g.current),g.current=null,y(!1),Z&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else y(!1)};K.addEventListener("load",F),z=()=>{if(K.removeEventListener("load",F),I.removeEventListener("click",H,{capture:!0}),I.removeEventListener("shadertransitionstate",q),I.removeEventListener("ready",X),I.removeEventListener("error",G),g.current&&clearInterval(g.current),g.current=null,D.removeChild(I),typeof c!="function"){if(c){const P=c;P.current===K&&(P.current=null)}}}}),()=>{V=!0,z==null||z()}}),d.useEffect(()=>{if(O.current&&(clearTimeout(O.current),O.current=null),x){w(!0),k(!1);return}return k(!0),O.current=setTimeout(()=>{w(!1),k(!1),O.current=null},240),()=>{O.current&&(clearTimeout(O.current),O.current=null)}},[x]);const N=!s&&!j&&$,R=v&&!M&&!N;return d.useEffect(()=>{r==null||r(N||R)},[r,N,R]),m.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden flex items-center justify-center",style:l,children:[m.jsx("div",{ref:u,className:"w-full h-full"}),N&&m.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-30 select-none","data-hyperframes-ignore":"","data-testid":"composition-loading-overlay",draggable:!1,onDragStart:D=>D.preventDefault(),onMouseDown:D=>D.preventDefault(),onPointerDown:D=>D.preventDefault(),children:m.jsx(H5,{title:"Loading composition",detail:"Preparing the Studio preview.",size:56})}),R&&m.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:A?0:1,pointerEvents:A?"none":"auto",transition:"opacity 240ms ease-out"},onDragStart:D=>D.preventDefault(),onMouseDown:D=>D.preventDefault(),onPointerDown:D=>D.preventDefault(),children:m.jsx(H5,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56})})]})});D2.displayName="Player";const Zu=30;function yn(t){if(!Number.isFinite(t)||t<0)return"0:00";const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n.toString().padStart(2,"0")}`}function H2(t,e=Zu){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:Math.round(t*e)}function ZS(t,e=Zu){return!Number.isFinite(t)||t<=0||!Number.isFinite(e)||e<=0?0:t/e}function X2(t,e,n=Zu){const r=H2(t,n),i=Math.max(0,r+e);return ZS(i,n)}function NS(t,e,n=Zu){const r=H2(t,n),i=H2(e,n);return`${r}f / ${i}f`}function RS(t){return Number.isFinite(t)&&t>0}function F5(t,e){const n=Math.max(0,Number.isFinite(e)?e:0),r=Math.max(0,Number.isFinite(t)?t:0);return n>0?Math.min(r,n):r}function fp(t){if(!t)return 0;try{const e=Number(t.getDuration());return RS(e)?e:0}catch{return 0}}function e$(t){return{now:()=>t.performance.now(),requestAnimationFrame:e=>t.requestAnimationFrame(e),cancelAnimationFrame:e=>t.cancelAnimationFrame(e)}}function t$(t,e,n,r=()=>1){var y;const i=Math.max(0,Number.isFinite(e)?e:0);let l=F5(Number(((y=t.getTime)==null?void 0:y.call(t))??0),i),s=!1,c=0,u=l,h=n.now();const g=v=>{var w;if(l=F5(v,i),typeof t.renderSeek=="function"){t.renderSeek(l);return}(w=t.seek)==null||w.call(t,l)},O=()=>{c&&(n.cancelAnimationFrame(c),c=0)},x=v=>{if(!s)return;const w=Math.max(.1,Number(r())||1),A=(v-h)/1e3*w;if(g(u+A),l>=i){s=!1,c=0;return}c=n.requestAnimationFrame(x)};return{play:()=>{s||i<=0||(l>=i&&g(0),s=!0,u=l,h=n.now(),O(),c=n.requestAnimationFrame(x))},pause:()=>{s=!1,O()},seek:(v,w)=>{if(g(v),w!=null&&w.keepPlaying){s&&(u=l,h=n.now());return}s=!1,O()},getTime:()=>l,getDuration:()=>i,isPlaying:()=>s}}function B5(t){return{play:()=>t.play(),pause:()=>t.pause(),seek:(e,n)=>{const r=!(n!=null&&n.keepPlaying);r&&t.pause(),t.seek(e),r&&t.pause()},getTime:()=>t.time(),getDuration:()=>t.duration(),isPlaying:()=>t.isActive()}}function Y5(t){if(!t)return 0;const e=Number.parseFloat(t.getAttribute("data-duration")??"")||Number.parseFloat(t.getAttribute("data-hf-authored-duration")??"");return RS(e)?e:0}function n$(t){if(!t)return 0;const e=Y5(t.querySelector("[data-composition-id]"));if(e>0)return e;let n=0;for(const r of Array.from(t.querySelectorAll("[data-start]"))){const i=Number.parseFloat(r.getAttribute("data-start")??""),l=Y5(r);!Number.isFinite(i)||i<0||l<=0||(n=Math.max(n,i+l))}return n}function z2(t){var n;const e=((n=t.ownerDocument.defaultView)==null?void 0:n.HTMLElement)??globalThis.HTMLElement;return typeof e<"u"&&t instanceof e}function VS(t){const e=t.ownerDocument.defaultView??window,n=e.HTMLMediaElement??globalThis.HTMLMediaElement,r=e.HTMLImageElement??globalThis.HTMLImageElement;if(t instanceof n||t instanceof r)return t;const i=t.querySelector("video, audio, img");return i instanceof n||i instanceof r?i:null}function LS(t,e){const n=e.getAttribute("data-playback-start")?"playback-start":e.getAttribute("data-media-start")?"media-start":void 0,r=e.getAttribute("data-playback-start")??e.getAttribute("data-media-start");if(r!=null){const O=parseFloat(r);Number.isFinite(O)&&(t.playbackStart=O)}n&&(t.playbackStartAttr=n);const i=VS(e);if(!i)return;t.tag=i.tagName.toLowerCase();const l=i.getAttribute("src");l&&(t.src=l);const c=(i.ownerDocument.defaultView??window).HTMLMediaElement??globalThis.HTMLMediaElement;if(typeof c>"u"||!(i instanceof c))return;const u=e.getAttribute("data-source-duration")??i.getAttribute("data-source-duration"),h=u?parseFloat(u):i.duration;Number.isFinite(h)&&h>0&&(t.sourceDuration=h);const g=i.defaultPlaybackRate;Number.isFinite(g)&&g>0&&(t.playbackRate=g)}function Nu(t){var i,l,s;const e=(i=t.label)==null?void 0:i.trim();if(e)return e;const n=(l=t.id)==null?void 0:l.trim();if(n)return n;const r=(s=t.tag)==null?void 0:s.trim().toLowerCase();return r?`${r} clip`:"Timeline clip"}const r$=new Set(["base","link","meta","noscript","script","style","template"]);function I5(t){return t.trim().replace(/[_-]+/g," ").replace(/\s+/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function i$(t){const e=t.getAttribute("data-timeline-label")??t.getAttribute("data-label")??t.getAttribute("aria-label");if(e!=null&&e.trim())return e.trim();if(t.id.trim())return I5(t.id);const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];return r?I5(r):Nu({tag:t.tagName})}function Ul(t){if(z2(t)&&t.id)return`#${t.id}`;const e=t.getAttribute("data-composition-id");if(e)return`[data-composition-id="${e}"]`;if(z2(t)){const n=t.className.split(/\s+/).filter(Boolean),r=n.find(i=>i!=="clip")??n[0];if(r)return`.${r}`}}function au(t){var n;const e=(n=t.parentElement)==null?void 0:n.closest("[data-composition-id]");return(e==null?void 0:e.getAttribute("data-composition-file"))??(e==null?void 0:e.getAttribute("data-composition-src"))??void 0}function lu(t,e,n){if(!(!n||n.startsWith("#")||n.startsWith("[data-composition-id=")))try{const i=Array.from(t.querySelectorAll(n)).indexOf(e);return i>=0?i:void 0}catch{return}}function F2(t){const e=t.sourceFile??"index.html";return t.domId?`${e}#${t.domId}`:t.selector?`${e}:${t.selector}:${t.selectorIndex??0}`:`${e}:${t.id}:${t.fallbackIndex}`}function su(t){var r;const e=((r=t.preferredId)==null?void 0:r.trim())||F2({id:t.label,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile}),n=F2({id:e,fallbackIndex:t.fallbackIndex,domId:t.domId,selector:t.selector,selectorIndex:t.selectorIndex,sourceFile:t.sourceFile});return{id:e,key:n}}function B2(t){return t.key??t.id}function a$(t){const e=t.querySelector("[data-composition-id]");return Array.from(t.querySelectorAll("[data-start]")).filter(n=>n!==e)}function q5(t,e){return Math.abs(t-e)<.001}function l$(t,e){var s;const n=(s=e.tagName)==null?void 0:s.toLowerCase();if(n&&t.tagName.toLowerCase()!==n)return!1;const r=Number.parseFloat(t.getAttribute("data-start")??"");if(Number.isFinite(r)&&!q5(r,e.start))return!1;const i=Number.parseFloat(t.getAttribute("data-duration")??"");if(Number.isFinite(i)&&!q5(i,e.duration))return!1;const l=Number.parseInt(t.getAttribute("data-track-index")??"",10);return!(Number.isFinite(l)&&l!==e.track)}function s$(t,e){return t.getElementById(e)??t.querySelector(`[data-composition-id="${e}"]`)??t.querySelector(`.${e}`)??null}function o$(t,e,n,r=new Set){const i=e.id?s$(t,e.id):null;if(i&&!r.has(i))return i;const l=a$(t).filter(c=>!r.has(c)),s=l.find(c=>l$(c,e));return s||(l[n]??null)}function c$(t,e){if(!z2(e)||e.parentElement!==t)return!1;const n=e.tagName.toLowerCase();return r$.has(n)||e.hasAttribute("data-start")||e.hasAttribute("data-track-index")?!1:!!Ul(e)}function u$(t,e){t.documentElement&&(t.documentElement.style.overflow="hidden",t.documentElement.style.margin="0"),t.body&&(t.body.style.overflow="hidden",t.body.style.margin="0"),e.scrollTo({top:0,left:0,behavior:"auto"})}function f$(t){const e=/data-composition-id=["']([^"']+)["']/gi,n=new Set,r=Array.from(t.querySelectorAll("style, script"));for(const s of r){const c=s.textContent||"";if(!c)continue;let u;for(;(u=e.exec(c))!==null;){const h=(u[1]||"").trim();h&&n.add(h)}}if(n.size===0)return;const i=new Set,l=Array.from(t.querySelectorAll("[data-composition-id]"));for(const s of l){const c=s.getAttribute("data-composition-id");c&&i.add(c)}for(const s of n){if(s==="root"||i.has(s))continue;const c=t.getElementById(`${s}-layer`)||t.getElementById(`${s}-comp`)||t.getElementById(s);c&&(c.getAttribute("data-composition-id")||c.setAttribute("data-composition-id",s))}}function d$(t){return t instanceof HTMLElement}function _S(t){const e=t.getRootNode();return typeof ShadowRoot<"u"&&e instanceof ShadowRoot&&d$(e.host)?e.host:null}function DS(t,e,n){var r;(r=t.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...n},"*")}function HS(t,e){return t||e>1}function h$(t,e){if(t)try{const n=_S(t);if(n&&typeof n.muted=="boolean"){n.muted=e;return}DS(t,"set-muted",{muted:e})}catch(n){console.warn("[useTimelinePlayer] Failed to set preview media mute state",n)}}function m$(t,e){if(!t)return;const n=Number.isFinite(e)&&e>0?e:1;try{const r=_S(t);if(r&&typeof r.playbackRate=="number"){r.playbackRate=n;return}DS(t,"set-playback-rate",{playbackRate:n})}catch(r){console.warn("[useTimelinePlayer] Failed to set preview playback rate",r)}}function p$(t,e,n,r){const i=new Set(n.map(O=>O.id)),l=t.querySelector("[data-composition-id]"),s=l==null?void 0:l.getAttribute("data-composition-id"),c=t.querySelectorAll("[data-composition-id][data-start]"),u=[];c.forEach(O=>{var D,V,z,I,U,K,H,q,X;const x=O,y=x.getAttribute("data-composition-id");if(!y||y===s||i.has(x.id)||i.has(y))return;const v=x.getAttribute("data-start")??"0";let w=parseFloat(v);if(isNaN(w)){const G=t.getElementById(v)||t.querySelector(`[data-composition-id="${v}"]`);if(G){const F=G.getAttribute("data-start")??"0";let P=parseFloat(F);if(isNaN(P)){const B=t.getElementById(F)||t.querySelector(`[data-composition-id="${F}"]`),J=parseFloat((B==null?void 0:B.getAttribute("data-start"))??"0")||0,te=B==null?void 0:B.getAttribute("data-composition-id"),Y=parseFloat((B==null?void 0:B.getAttribute("data-duration"))??"")||(te?((z=(V=(D=e.__timelines)==null?void 0:D[te])==null?void 0:V.duration)==null?void 0:z.call(V))??0:0);P=J+Y}const Z=G.getAttribute("data-composition-id"),L=parseFloat(G.getAttribute("data-duration")??"")||(Z?((K=(U=(I=e.__timelines)==null?void 0:I[Z])==null?void 0:U.duration)==null?void 0:K.call(U))??0:0);w=P+L}else w=0}let A=parseFloat(x.getAttribute("data-duration")??"");if((isNaN(A)||A<=0)&&(A=((X=(q=(H=e.__timelines)==null?void 0:H[y])==null?void 0:q.duration)==null?void 0:X.call(q))??0),!Number.isFinite(A)||A<=0||(Number.isFinite(w)||(w=0),Number.isFinite(r)&&r>0&&(w>=r||(A=Math.min(A,Math.max(0,r-w)),A<=0))))return;const k=x.getAttribute("data-track-index"),M=k!=null?parseInt(k,10):0,E=x.getAttribute("data-composition-src")||x.getAttribute("data-composition-file"),$=Ul(x),C=au(x),j=lu(t,x,$),T=Nu({id:x.id||y||null,label:x.getAttribute("data-timeline-label")??x.getAttribute("data-label"),tag:x.tagName}),N=su({preferredId:x.id||y||null,label:T,fallbackIndex:u.length,domId:x.id||void 0,selector:$,selectorIndex:j,sourceFile:C}),R={id:N.id,label:T,key:N.key,tag:x.tagName.toLowerCase(),start:w,duration:A,track:isNaN(M)?0:M,domId:x.id||void 0,selector:$,selectorIndex:j,sourceFile:C};if(E)R.compositionSrc=E;else{const G=x.querySelector("video[src]");G&&(R.src=G.getAttribute("src")||void 0,R.tag="video")}u.push(R)});let h=!1;const g=n.map(O=>{if(O.compositionSrc)return O;const x=t.getElementById(O.id)??t.querySelector(`[data-composition-id="${O.id}"]`);if(!x)return O;const y=x.getAttribute("data-composition-src")||x.getAttribute("data-composition-file");return y?(h=!0,{...O,compositionSrc:y}):O});return{missing:u,updatedEls:g,patched:h}}const G5=t=>{let e;const n=new Set,r=(h,g)=>{const O=typeof h=="function"?h(e):h;if(!Object.is(O,e)){const x=e;e=g??(typeof O!="object"||O===null)?O:Object.assign({},e,O),n.forEach(y=>y(e,x))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>u,subscribe:h=>(n.add(h),()=>n.delete(h))},u=e=t(r,i,c);return c},g$=(t=>t?G5(t):G5),O$=t=>t;function x$(t,e=O$){const n=O1.useSyncExternalStore(t.subscribe,O1.useCallback(()=>e(t.getState()),[t,e]),O1.useCallback(()=>e(t.getInitialState()),[t,e]));return O1.useDebugValue(n),n}const U5=t=>{const e=g$(t),n=r=>x$(e,r);return Object.assign(n,e),n},XS=(t=>t?U5(t):U5),zS="hf-studio-ui-preferences";function W5(t){return typeof t=="object"&&t!==null}function FS(){if(typeof window>"u")return null;try{return window.localStorage}catch{return null}}function BS(t){if(!t)return{};try{const e=t.getItem(zS);if(!e)return{};const n=JSON.parse(e);if(!W5(n))return{};const r={};if(typeof n.leftCollapsed=="boolean"&&(r.leftCollapsed=n.leftCollapsed),typeof n.timelineVisible=="boolean"&&(r.timelineVisible=n.timelineVisible),typeof n.playbackRate=="number"&&Number.isFinite(n.playbackRate)&&(r.playbackRate=n.playbackRate),typeof n.audioMuted=="boolean"&&(r.audioMuted=n.audioMuted),W5(n.previewZoom)){const{zoomPercent:i,panX:l,panY:s}=n.previewZoom;typeof i=="number"&&Number.isFinite(i)&&typeof l=="number"&&Number.isFinite(l)&&typeof s=="number"&&Number.isFinite(s)&&(r.previewZoom={zoomPercent:i,panX:l,panY:s})}return Array.isArray(n.recentBlocks)&&(r.recentBlocks=n.recentBlocks.filter(i=>typeof i=="string")),typeof n.snapEnabled=="boolean"&&(r.snapEnabled=n.snapEnabled),typeof n.gridVisible=="boolean"&&(r.gridVisible=n.gridVisible),typeof n.gridSpacing=="number"&&Number.isFinite(n.gridSpacing)&&(r.gridSpacing=n.gridSpacing),typeof n.snapToGrid=="boolean"&&(r.snapToGrid=n.snapToGrid),r}catch{return{}}}function ul(t=FS()){return BS(t)}function ho(t,e=FS()){if(e)try{const n={...BS(e),...t};e.setItem(zS,JSON.stringify(n))}catch{}}const dp=new Set,zr={notify:t=>dp.forEach(e=>e(t)),subscribe:t=>(dp.add(t),()=>dp.delete(t))},fe=XS(t=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:ul().playbackRate??1,audioMuted:ul().audioMuted??!1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,inPoint:null,outPoint:null,selectedKeyframes:new Set,toggleSelectedKeyframe:e=>t(n=>{const r=new Set(n.selectedKeyframes);return r.has(e)?r.delete(e):r.add(e),{selectedKeyframes:r}}),clearSelectedKeyframes:()=>t({selectedKeyframes:new Set}),keyframeCache:new Map,setKeyframeCache:(e,n)=>t(r=>{const i=new Map(r.keyframeCache);return n?i.set(e,n):i.delete(e),{keyframeCache:i}}),requestedSeekTime:null,requestSeek:e=>t({requestedSeekTime:e}),clearSeekRequest:()=>t({requestedSeekTime:null}),setIsPlaying:e=>t({isPlaying:e}),setPlaybackRate:e=>{ho({playbackRate:e}),t({playbackRate:e})},setAudioMuted:e=>{ho({audioMuted:e}),t({audioMuted:e})},setLoopEnabled:e=>t({loopEnabled:e}),setZoomMode:e=>t({zoomMode:e}),setInPoint:e=>t(n=>{const r=e!==null&&Number.isFinite(e)?e:null;return{inPoint:r,outPoint:r!==null&&n.outPoint!==null&&r>=n.outPoint?null:n.outPoint,loopEnabled:r!==null?!0:n.loopEnabled}}),setOutPoint:e=>t(n=>{const r=e!==null&&Number.isFinite(e)?e:null;return{outPoint:r,inPoint:r!==null&&n.inPoint!==null&&r<=n.inPoint?null:n.inPoint,loopEnabled:r!==null?!0:n.loopEnabled}}),setManualZoomPercent:e=>t({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>t({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>t({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>t({timelineReady:e}),setElements:e=>t({elements:e}),setSelectedElementId:e=>t({selectedElementId:e}),updateElement:(e,n)=>t(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...n}:i)})),reset:()=>t({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,inPoint:null,outPoint:null,selectedKeyframes:new Set,keyframeCache:new Map})})),YS="phc_zjjbX0PnWxERXrMHhkEJWj9A9BhGVLRReICgsfTMmpx",IS="https://us.i.posthog.com",y$=3e4,b$=5e3;let ql=[],qc=null,Ds=null;function qS(){if(Ds)return Ds;try{const t=localStorage.getItem("hf-studio-anon-id");if(t)return Ds=t,t}catch{}Ds=crypto.randomUUID();try{localStorage.setItem("hf-studio-anon-id",Ds)}catch{}return Ds}function v$(){try{return localStorage.getItem("hf-studio-telemetry-opt-out")!=="1"}catch{return!0}}function S$(){var t,e;return{studio_version:"0.6.86",screen_width:(t=window.screen)==null?void 0:t.width,screen_height:(e=window.screen)==null?void 0:e.height,viewport_width:window.innerWidth,viewport_height:window.innerHeight,user_agent:navigator.userAgent,url_hash:location.hash.replace(/#project\//,"")}}function Lt(t,e={}){v$()&&(ql.push({event:`studio:${t}`,properties:{...S$(),...e},timestamp:new Date().toISOString()}),qc||(qc=setInterval(w$,y$)))}async function w$(){if(ql.length===0)return;const t=ql.map(r=>({event:r.event,properties:{...r.properties,$ip:null},distinct_id:qS(),timestamp:r.timestamp}));ql=[];const e=new AbortController,n=setTimeout(()=>e.abort(),b$);try{await fetch(`${IS}/batch/`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({api_key:YS,batch:t}),signal:e.signal})}catch{}finally{clearTimeout(n)}}typeof window<"u"&&window.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){if(qc&&(clearInterval(qc),qc=null),ql.length===0)return;const t=ql.map(n=>({event:n.event,properties:{...n.properties,$ip:null},distinct_id:qS(),timestamp:n.timestamp}));ql=[];const e=JSON.stringify({api_key:YS,batch:t});try{navigator.sendBeacon(`${IS}/batch/`,e)}catch{}}});const k$=[{title:"Playback",hints:[{key:"Space",label:"Play / Pause"},{key:"J",label:"Play backward"},{key:"K",label:"Stop"},{key:"L",label:"Play forward"},{key:"M",label:"Toggle mute"},{key:"⇧L",label:"Toggle loop"},{key:"←/→",label:"Step 1 frame"},{key:"⇧←/⇧→",label:"Step 10 frames"},{key:"F",label:"Toggle fullscreen"}]},{title:"Work area",hints:[{key:"I",label:"Set in-point"},{key:"⇧I",label:"Clear in-point"},{key:"O",label:"Set out-point"},{key:"⇧O",label:"Clear out-point"},{key:"A",label:"Jump to in-point"},{key:"E",label:"Jump to out-point"}]}],A$=d.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,setInPoint:l,setOutPoint:s,onSeek:c}){const[u,h]=d.useState(!1),[g,O]=d.useState(""),x=d.useRef(null);d.useEffect(()=>{if(!u)return;const A=k=>{x.current&&!x.current.contains(k.target)&&h(!1)};return document.addEventListener("mousedown",A),()=>{document.removeEventListener("mousedown",A)}},[u]);const y=d.useCallback(()=>{if(e)return;const A=Number.parseInt(g,10);!Number.isFinite(A)||n<=0||c(Math.min(n,ZS(Math.max(0,A))))},[e,n,g,c]),v=d.useCallback(A=>{A.preventDefault(),y()},[y]),w=d.useCallback(A=>{A.key==="Enter"&&(A.preventDefault(),y())},[y]);return m.jsxs("div",{ref:x,className:"relative flex-shrink-0",children:[m.jsx(Yt,{label:"Shortcuts and tools",children:m.jsx("button",{type:"button",onClick:()=>h(A=>!A),className:`w-6 h-6 flex items-center justify-center rounded border transition-colors ${u?"border-neutral-600 text-neutral-200 bg-neutral-800":"border-neutral-800 text-neutral-600 hover:text-neutral-300 hover:border-neutral-600"}`,"aria-label":"Shortcuts and tools","aria-expanded":u,children:m.jsxs("svg",{width:"11",height:"11",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),m.jsx("path",{d:"M6 8h.01M10 8h.01M14 8h.01M18 8h.01M6 12h.01M10 12h.01M14 12h.01M18 12h.01M8 16h8"})]})})}),u&&m.jsxs("div",{className:"absolute bottom-full right-0 mb-2 z-50 rounded-lg shadow-xl min-w-[220px] overflow-y-auto",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)",maxHeight:"min(280px, calc(100vh - 80px))"},children:[m.jsxs("div",{className:"px-3 pt-3 pb-2.5",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Jump to frame"}),m.jsxs("form",{onSubmit:v,className:"flex items-center gap-1.5",children:[m.jsx("input",{value:g,onChange:A=>O(A.target.value),disabled:e,inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame number",className:"h-6 flex-1 rounded border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:w,onBlur:y}),m.jsx(Yt,{label:"Jump to frame",children:m.jsx("button",{type:"submit",disabled:e,className:"h-6 px-2 rounded border border-neutral-700 text-[10px] text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800 disabled:opacity-40",children:"Go"})})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsxs("div",{className:"px-3 pt-2.5 pb-2",children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:"Work area"}),m.jsxs("div",{className:"flex flex-col gap-1",children:[m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"I"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"In-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:r!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:yn(r)}),m.jsx(Yt,{label:"Clear in-point",children:m.jsx("button",{type:"button",onClick:()=>l(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear in-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]}),m.jsxs("div",{className:"flex items-center justify-between gap-2",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[20px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:"O"}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:"Out-point"})]}),m.jsx("div",{className:"flex items-center gap-1.5",children:i!==null?m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"font-mono text-[10px] text-neutral-300",children:yn(i)}),m.jsx(Yt,{label:"Clear out-point",children:m.jsx("button",{type:"button",onClick:()=>s(null),className:"w-4 h-4 flex items-center justify-center rounded text-neutral-500 hover:text-neutral-200 transition-colors","aria-label":"Clear out-point",children:m.jsx("svg",{width:"8",height:"8",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",children:m.jsx("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}):m.jsx("span",{className:"text-[10px] text-neutral-600",children:"—"})})]})]})]}),m.jsx("div",{style:{borderTop:"1px solid rgba(255,255,255,0.06)"}}),m.jsx("div",{className:"px-3 pt-2.5 pb-3 flex flex-col gap-3",children:k$.map(A=>m.jsxs("div",{children:[m.jsx("p",{className:"text-[9px] font-medium text-neutral-500 uppercase tracking-wider mb-1.5",children:A.title}),m.jsx("div",{className:"flex flex-col gap-1",children:A.hints.map(k=>m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("span",{className:"font-mono text-[10px] rounded border border-neutral-700 px-1.5 py-0.5 text-neutral-300 min-w-[36px] text-center",style:{background:"rgba(255,255,255,0.05)"},children:k.key}),m.jsx("span",{className:"text-[10px] text-neutral-400",children:k.label})]},k.key))})]},A.title))})]})]})}),M$=[.25,.5,1,1.5,2],C$=d.memo(function({playbackRate:e,setPlaybackRate:n,disabled:r}){const[i,l]=d.useState(!1),s=d.useRef(null);return d.useEffect(()=>{if(!i)return;const c=u=>{s.current&&!s.current.contains(u.target)&&l(!1)};return document.addEventListener("mousedown",c),()=>{document.removeEventListener("mousedown",c)}},[i]),m.jsxs("div",{ref:s,className:"relative flex-shrink-0",children:[m.jsx(Yt,{label:"Playback speed",children:m.jsx("button",{type:"button",onClick:()=>l(c=>!c),disabled:r,className:"w-10 px-2 py-1 rounded-md text-[10px] font-mono tabular-nums transition-colors",style:{color:"#71717A",background:"rgba(255,255,255,0.04)"},children:e===1?"1x":`${e}x`})}),i&&m.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:M$.map(c=>m.jsxs("button",{onClick:()=>{Lt("playback",{action:"speed_change",rate:c}),n(c),l(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:c===e?"#FAFAFA":"#71717A",background:c===e?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:u=>{c!==e&&(u.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:u=>{c!==e&&(u.currentTarget.style.background="transparent")},children:[c,"x"]},c))})]})}),E$=8;function K5(t,e,n){if(!Number.isFinite(n)||n<=0)return 0;const r=(t-e)/n,i=Math.max(0,Math.min(1,r)),l=Math.min(.5,E$/n);return i<=l?0:i>=1-l?1:i}function y1(t,e,n){t.current&&(t.current.style.width=`${n}%`),e.current&&(e.current.style.left=`${n}%`)}function T$(t,e,n,r){const i=d.useCallback(s=>{if(n)return;const c=t.seekBarRef.current;if(!c||r<=0)return;const u=c.getBoundingClientRect(),h=K5(s,u.left,u.width);y1(t.progressFillRef,t.progressThumbRef,h*100),e(h*r)},[n,r,e,t]),l=d.useCallback(s=>{if(s.button!==0)return;s.preventDefault(),s.currentTarget.focus(),t.isDraggingRef.current=!0;const c=s.currentTarget,u=s.pointerId;try{c.setPointerCapture(u)}catch{}i(s.clientX);let h=0,g=s.clientX;const O=w=>{if(w.pointerId!==u||!t.isDraggingRef.current)return;g=w.clientX;const A=t.seekBarRef.current,k=t.durationRef.current;if(A&&k>0){const M=A.getBoundingClientRect(),E=K5(w.clientX,M.left,M.width)*100;y1(t.progressFillRef,t.progressThumbRef,E)}h||(h=requestAnimationFrame(()=>{h=0,t.isDraggingRef.current&&i(g)}))},x=()=>{t.isDraggingRef.current=!1,h&&(cancelAnimationFrame(h),h=0),i(g);try{c.releasePointerCapture(u)}catch{}c.removeEventListener("pointermove",O),c.removeEventListener("pointerup",y),c.removeEventListener("pointercancel",y),window.removeEventListener("pointerup",y),window.removeEventListener("pointercancel",y),document.removeEventListener("visibilitychange",v),window.removeEventListener("blur",x),c.blur()},y=w=>{w.pointerId===u&&x()},v=()=>{document.visibilityState==="hidden"&&x()};c.addEventListener("pointermove",O),c.addEventListener("pointerup",y),c.addEventListener("pointercancel",y),window.addEventListener("pointerup",y),window.addEventListener("pointercancel",y),document.addEventListener("visibilitychange",v),window.addEventListener("blur",x)},[i,t]);return Xt(()=>{const s=h=>{t.currentTimeRef.current=h;const g=t.durationRef.current,O=g>0?Math.min(100,h/g*100):0;y1(t.progressFillRef,t.progressThumbRef,O),t.timeDisplayRef.current&&(t.timeDisplayRef.current.textContent=t.timeDisplayModeRef.current==="frame"?NS(h,g):yn(h)),t.sliderRef.current&&t.sliderRef.current.setAttribute("aria-valuenow",String(Math.round(h)))},c=zr.subscribe(s);s(fe.getState().currentTime);const u=setInterval(()=>{const h=fe.getState().currentTime,g=fe.getState().duration;g>0&&h>0&&y1(t.progressFillRef,t.progressThumbRef,Math.min(100,h/g*100))},500);return()=>{c(),clearInterval(u)}}),{handlePointerDown:l}}function $$(){return m.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:m.jsx("polygon",{points:"6,3 20,12 6,21"})})}function j$(){return m.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[m.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),m.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]})}const P$=d.memo(function({audioMuted:e,audioAutoMuted:n,effectiveAudioMuted:r,controlsDisabled:i,setAudioMuted:l}){const s=n?"Audio muted above 1x speed":e?"Unmute audio":"Mute audio";return m.jsx(Yt,{label:s,children:m.jsx("button",{type:"button",onClick:()=>{n||(Lt("playback",{action:"mute_toggle",muted:!e}),l(!e))},disabled:i||n,"aria-label":s,"aria-pressed":r,className:`h-7 w-7 flex-shrink-0 flex items-center justify-center rounded-md border transition-colors disabled:pointer-events-none ${r?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"} ${n?"opacity-70":""}`,children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M11 5 6 9H3v6h3l5 4V5Z"}),r?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"m19 9-6 6"}),m.jsx("path",{d:"m13 9 6 6"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M15.5 8.5a5 5 0 0 1 0 7"}),m.jsx("path",{d:"M18.5 5.5a9 9 0 0 1 0 13"})]})]})})})}),Q$=d.memo(function({loopEnabled:e,disabled:n,setLoopEnabled:r}){return m.jsx(Yt,{label:"Loop playback",children:m.jsx("button",{type:"button",onClick:()=>{Lt("playback",{action:"loop_toggle",enabled:!e}),r(!e)},disabled:n,className:`h-7 w-7 flex items-center justify-center rounded-md border transition-colors ${e?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,"aria-label":e?"Disable loop playback":"Enable loop playback","aria-pressed":e,children:m.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[m.jsx("path",{d:"M17 2l4 4-4 4"}),m.jsx("path",{d:"M3 11V9a4 4 0 0 1 4-4h14"}),m.jsx("path",{d:"M7 22l-4-4 4-4"}),m.jsx("path",{d:"M21 13v2a4 4 0 0 1-4 4H3"})]})})})}),Z$=d.memo(function({isFullscreen:e,onToggleFullscreen:n}){return m.jsx(Yt,{label:e?"Exit fullscreen (F)":"Enter fullscreen (F)",children:m.jsx("button",{type:"button",onClick:()=>{Lt("playback",{action:"fullscreen_toggle",active:!e}),n()},className:`h-7 w-7 flex-shrink-0 flex items-center justify-center rounded-md border transition-colors ${e?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,"aria-label":e?"Exit fullscreen":"Enter fullscreen",children:m.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3v3a2 2 0 0 1-2 2H3"}),m.jsx("path",{d:"M21 8h-3a2 2 0 0 1-2-2V3"}),m.jsx("path",{d:"M3 16h3a2 2 0 0 1 2 2v3"}),m.jsx("path",{d:"M16 21v-3a2 2 0 0 1 2-2h3"})]}):m.jsxs(m.Fragment,{children:[m.jsx("path",{d:"M8 3H5a2 2 0 0 0-2 2v3"}),m.jsx("path",{d:"M21 8V5a2 2 0 0 0-2-2h-3"}),m.jsx("path",{d:"M3 16v3a2 2 0 0 0 2 2h3"}),m.jsx("path",{d:"M16 21h3a2 2 0 0 0 2-2v-3"})]})})})})});function J5({position:t,duration:e}){return e<=0?null:m.jsx("div",{className:"absolute z-[3] pointer-events-none",style:{left:`${Math.min(100,t/e*100)}%`,top:"50%",transform:"translate(-50%, -50%)",width:"2px",height:"10px",background:"#3CE6AC",borderRadius:"1px"}})}function N$({inPoint:t,outPoint:e,duration:n}){return t===null&&e===null||n<=0?null:m.jsxs(m.Fragment,{children:[m.jsx("div",{className:"absolute top-0 bottom-0 pointer-events-none",style:{left:`${t!==null?Math.min(100,t/n*100):0}%`,right:`${e!==null?100-Math.min(100,e/n*100):0}%`,background:"rgba(60,230,172,0.15)"}}),t!==null&&m.jsx(J5,{position:t,duration:n}),e!==null&&m.jsx(J5,{position:e,duration:n})]})}const R$=d.memo(function({disabled:e,duration:n,inPoint:r,outPoint:i,progressFillRef:l,progressThumbRef:s,seekBarRef:c,sliderRef:u,onPointerDown:h,onKeyDown:g}){return m.jsx("div",{ref:O=>{c.current=O,u.current=O},role:"slider",tabIndex:e?-1:0,"aria-label":"Seek","aria-disabled":e||void 0,"aria-valuemin":0,"aria-valuemax":Math.round(n),"aria-valuenow":0,className:`min-w-[96px] flex-1 h-6 flex items-center group outline-none focus-visible:ring-1 focus-visible:ring-white/30 focus-visible:rounded ${e?"cursor-not-allowed opacity-50":"cursor-pointer"}`,style:{touchAction:"none"},onPointerDown:h,onKeyDown:g,children:m.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[m.jsx(N$,{inPoint:r,outPoint:i,duration:n}),m.jsx("div",{ref:l,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),m.jsx("div",{ref:s,className:"absolute top-1/2 z-[4] w-3 h-3 rounded-full -translate-y-1/2 -translate-x-1/2 transition-transform group-hover:scale-125",style:{background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 6px rgba(60,230,172,0.4), 0 1px 4px rgba(0,0,0,0.4)"}})]})})}),V$=d.memo(function({onTogglePlay:e,onSeek:n,disabled:r=!1,isFullscreen:i=!1,onToggleFullscreen:l}){const s=fe(G=>G.isPlaying),c=fe(G=>G.duration),u=fe(G=>G.timelineReady),h=fe(G=>G.playbackRate),g=fe(G=>G.audioMuted),O=fe(G=>G.loopEnabled),x=fe.getState().setPlaybackRate,y=fe.getState().setAudioMuted,v=fe.getState().setLoopEnabled,w=fe(G=>G.inPoint),A=fe(G=>G.outPoint),k=fe.getState().setInPoint,M=fe.getState().setOutPoint,[E,$]=d.useState("time"),C=d.useRef(null),j=d.useRef(null),T=d.useRef(null),N=d.useRef(null),R=d.useRef(null),D=d.useRef(!1),V=d.useRef(0),z=d.useRef(E);z.current=E;const I=d.useRef(c);I.current=c;const U=r||!u,K=h>1,H=HS(g,h);d.useEffect(()=>{if(!T.current)return;const G=V.current;T.current.textContent=E==="frame"?NS(G,c):yn(G)},[c,E]);const{handlePointerDown:q}=T$({seekBarRef:N,progressFillRef:C,progressThumbRef:j,sliderRef:R,timeDisplayRef:T,isDraggingRef:D,durationRef:I,currentTimeRef:V,timeDisplayModeRef:z},n,r,c),X=d.useCallback(G=>{if(r||!u||c<=0)return;const F=G.shiftKey?10:1;G.key==="ArrowLeft"?(G.preventDefault(),n(X2(V.current,-F))):G.key==="ArrowRight"&&(G.preventDefault(),n(Math.min(c,X2(V.current,F))))},[r,u,c,n]);return m.jsxs("div",{className:"px-4 py-2 flex flex-wrap items-center gap-x-2 gap-y-1","aria-disabled":r||void 0,style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[m.jsx(Yt,{label:s?"Pause":"Play",children:m.jsx("button",{type:"button","aria-label":s?"Pause":"Play",onClick:()=>{Lt("playback",{action:s?"pause":"play"}),e()},disabled:U,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg disabled:opacity-30 disabled:pointer-events-none transition-colors",style:{background:"rgba(255,255,255,0.06)"},children:s?m.jsx(j$,{}):m.jsx($$,{})})}),m.jsx(Yt,{label:E==="time"?"Switch to frame display":"Switch to time display",children:m.jsxs("button",{type:"button",onClick:()=>$(G=>G==="time"?"frame":"time"),disabled:r,className:"font-mono text-[11px] tabular-nums flex-shrink-0 w-[118px] text-left transition-colors disabled:pointer-events-none hover:opacity-80",style:{color:"#A1A1AA",cursor:"pointer"},children:[m.jsx("span",{ref:T,children:yn(0)}),E==="time"?m.jsxs(m.Fragment,{children:[m.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),m.jsx("span",{style:{color:"#52525B"},children:yn(c)})]}):null]})}),m.jsx(R$,{disabled:r,duration:c,inPoint:w,outPoint:A,progressFillRef:C,progressThumbRef:j,seekBarRef:N,sliderRef:R,onPointerDown:q,onKeyDown:X}),m.jsx(P$,{audioMuted:g,audioAutoMuted:K,effectiveAudioMuted:H,controlsDisabled:U,setAudioMuted:y}),m.jsx(C$,{playbackRate:h,setPlaybackRate:x,disabled:r}),m.jsx(Q$,{loopEnabled:O,disabled:r,setLoopEnabled:v}),l&&m.jsx(Z$,{isFullscreen:i,onToggleFullscreen:l}),m.jsx(A$,{disabled:r,duration:c,inPoint:w,outPoint:A,setInPoint:k,setOutPoint:M,onSeek:n})]})}),ey=100;function qs(t){return Math.round(t*ey)/ey}function ou(t,e,n){return Math.min(Math.max(t,e),n)}const ty=.55,b1=40,ny=12;function ry(t,e,n){const r=(i,l,s)=>{if(s<i+b1){const c=Math.max(0,1-(s-i)/b1);return-Math.round(ny*c)}if(s>l-b1){const c=Math.max(0,1-(l-s)/b1);return Math.round(ny*c)}return 0};return{x:r(t.left,t.right,e),y:r(t.top,t.bottom,n)}}function L$(t,e,n){const r=(t.currentScrollLeft??0)-(t.originScrollLeft??0),i=(t.currentScrollTop??0)-(t.originScrollTop??0),l=(e-t.originClientX+r)/Math.max(t.pixelsPerSecond,1),s=(n-t.originClientY+i)/Math.max(t.trackHeight,1),c=Math.round(s),u=Math.max(0,t.trackOrder.indexOf(t.track)),h=u+c,g=ou(h,0,Math.max(0,t.trackOrder.length-1)),O=Math.min(...t.trackOrder),x=Math.max(...t.trackOrder);let y=t.trackOrder[g]??t.track;const v=u===0,w=u===t.trackOrder.length-1;return v&&h<0&&u+s<=-ty?y=O-1:w&&h>t.trackOrder.length-1&&u+s>=t.trackOrder.length-1+ty&&(y=x+1),{start:ou(qs(t.start+l),0,Math.max(0,t.maxStart)),track:y}}function _$(t,e,n){const r=Math.max(.05,t.minDuration??.1),i=(n-t.originClientX)/Math.max(t.pixelsPerSecond,1);if(e==="end"){const y=ou(qs(t.duration+i),r,Math.max(r,t.maxEnd-t.start));return{start:t.start,duration:y,playbackStart:t.playbackStart}}const l=Math.max(.1,t.playbackRate??1),s=t.playbackStart!=null?t.playbackStart/l:Number.POSITIVE_INFINITY,c=-Math.min(t.start-t.minStart,s),u=t.duration-r,h=ou(i,c,u),g=qs(t.start+h),O=qs(t.duration-h),x=t.playbackStart!=null?qs(Math.max(0,t.playbackStart+h*l)):void 0;return{start:g,duration:O,playbackStart:x}}function D$(t){if(t.compositionSrc||t.playbackStartAttr!=null||t.sourceDuration!=null&&Number.isFinite(t.sourceDuration)&&t.sourceDuration>0)return!0;const e=t.tag.toLowerCase();return["video","audio","img"].includes(e)}function H$(t){return!!(t.domId||t.selector)}function iy(t){if(t.timingSource==="implicit"||t.timelineLocked)return{canMove:!1,canTrimStart:!1,canTrimEnd:!1};const e=H$(t),n=Number.isFinite(t.duration)&&t.duration>0,r=D$(t);return{canMove:e&&(r||n),canTrimEnd:e&&n,canTrimStart:e&&n}}function X$(t){if(t.capabilities.canMove)return null;const e=Math.max(0,t.width),n=ou(t.offsetX,0,e),r=Math.max(0,t.handleWidth);return n<=r&&!t.capabilities.canTrimStart?"resize-start":n>=Math.max(0,e-r)&&!t.capabilities.canTrimEnd?"resize-end":"move"}function z$(t,e){return{start:t.start,end:t.start+t.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function F$({rangeStart:t,rangeEnd:e,elements:n,prompt:r}){const i=Math.min(t,e),l=Math.max(t,e),s=n.map(c=>`- #${c.id} (${c.tag}) — ${yn(c.start)} to ${yn(c.start+c.duration)}, track ${c.track}`).join(`
50
50
  `);return`Edit the following HyperFrames composition:
51
51
 
52
52
  Time range: ${yn(i)} — ${yn(l)}
package/dist/index.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
7
  <title>HyperFrames Studio</title>
8
- <script type="module" crossorigin src="/assets/index-DtSCUvYQ.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-BT9VHgSy.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-DHcptK1_.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio",
3
- "version": "0.6.85",
3
+ "version": "0.6.86",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,8 +31,8 @@
31
31
  "@codemirror/view": "6.40.0",
32
32
  "@phosphor-icons/react": "^2.1.10",
33
33
  "mediabunny": "^1.45.3",
34
- "@hyperframes/core": "0.6.85",
35
- "@hyperframes/player": "0.6.85"
34
+ "@hyperframes/core": "0.6.86",
35
+ "@hyperframes/player": "0.6.86"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/react": "19",
@@ -46,7 +46,7 @@
46
46
  "vite": "^6.4.2",
47
47
  "vitest": "^3.2.4",
48
48
  "zustand": "^5.0.0",
49
- "@hyperframes/producer": "0.6.85"
49
+ "@hyperframes/producer": "0.6.86"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "react": "19",