@lumo-app/office 0.4.1 → 0.4.2

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.
package/index.js CHANGED
@@ -3848,7 +3848,7 @@ Error generating stack: `+y.message+`
3848
3848
  `+(y.join(" > ")+`
3849
3849
 
3850
3850
  No matching component was found for:
3851
- `)+s.join(" > ")}return null},Bt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return Rg(s.child.stateNode);default:return s.child.stateNode}},Bt.injectIntoDevTools=function(){var s={bundleType:0,version:p7,rendererPackageName:m7,currentDispatcherRef:vt,reconcilerVersion:"19.3.0"};if($k!==null&&(s.rendererConfig=$k),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)s=!0;else{try{Dg=u.inject(s),Vr=u}catch{}s=!!u.checkDCE}}return s},Bt.isAlreadyRendering=function(){return(Ft&6)!==0},Bt.observeVisibleRects=function(s,u,d,y){if(!Ig)throw Error(a(363));s=AC(s,u);var w=H7(s,d,y).disconnect;return{disconnect:function(){w()}}},Bt.shouldError=function(){return null},Bt.shouldSuspend=function(){return!1},Bt.startHostTransition=function(s,u,d,y){if(s.tag!==5)throw Error(a(476));var w=M3(s).queue;w3(s,w,u,uh,d===null?i:function(){var C=M3(s);return C.next===null&&(C=s.alternate.memoizedState),_g(s,C.next.queue,{},Br()),d(y)})},Bt.updateContainer=function(s,u,d,y){var w=u.current,C=Br();return Yk(w,C,s,u,d,y),C},Bt.updateContainerSync=function(s,u,d,y){return Yk(u.current,2,s,u,d,y),2},Bt},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(OI)),OI.exports}var Nte={exports:{}};Nte.exports;var z5;function zte(){return z5||(z5=1,O5.exports=Ote()),O5.exports}var Ute=zte(),Bte=kte(Ute),xM={},Fte=0,wM=n=>`${n[0].toUpperCase()}${n.slice(1)}`;function Hte(n){return n in xM}function jI(n){return xM[n]}function kb(n){if(typeof n=="function"){let e=`${Fte++}`;return xM[e]=n,e}else Object.assign(xM,n)}function Vte(n){let e=Bte(n);return e.injectIntoDevTools(),e}var e6=0,Gte=/^three(?=[A-Z])/;function t6(n,e){let t=wM(n),i=jI(t);if(n!=="primitive"&&!i)throw new Error(`R3F: ${t} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(n==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function Wte(n,e,t){var i;return n=Hte(wM(n))?n:n.replace(Gte,""),t6(n,e),n==="primitive"&&(i=e.object)!=null&&i.__r3f&&delete e.object.__r3f,vM(e.object,t,n,e)}function qte(n){if(!n.isHidden){var e;n.props.attach&&(e=n.parent)!=null&&e.object?bM(n.parent,n):sr(n.object)&&(n.previousVisible=n.object.visible,n.object.visible=!1),n.isHidden=!0,Pb(n)}}function n6(n){if(n.isHidden){var e;if(n.props.attach&&(e=n.parent)!=null&&e.object)yM(n.parent,n);else if(sr(n.object)){var t;n.object.visible=(t=n.previousVisible)!=null?t:!0}n.previousVisible=void 0,n.isHidden=!1,Pb(n)}}function ZI(n,e,t){let i=e.root.getState();if(!(!n.parent&&n.object!==i.scene)){if(!e.object){var a,r;let o=jI(wM(e.type));e.object=(a=e.props.object)!=null?a:new o(...(r=e.props.args)!=null?r:[]),e.object.__r3f=e}if(Bc(e.object,e.props),e.props.attach)yM(n,e);else if(sr(e.object)&&sr(n.object)){let o=n.object.children.indexOf(t?.object);if(t&&o!==-1){let l=n.object.children.indexOf(e.object);if(l!==-1){n.object.children.splice(l,1);let c=l<o?o-1:o;n.object.children.splice(c,0,e.object)}else e.object.parent=n.object,n.object.children.splice(o,0,e.object),e.object.dispatchEvent({type:"added"}),n.object.dispatchEvent({type:"childadded",child:e.object})}else n.object.add(e.object)}for(let o of e.children)ZI(e,o);Pb(e)}}function CI(n,e){if(e){if(e.parent===n){let t=n.children.indexOf(e);t!==-1&&n.children.splice(t,1)}e.parent=n,n.children.push(e),ZI(n,e)}}function U5(n,e,t){if(!e||!t)return;if(e.parent===n){let a=n.children.indexOf(e);a!==-1&&n.children.splice(a,1)}e.parent=n;let i=n.children.indexOf(t);i!==-1?n.children.splice(i,0,e):n.children.push(e),ZI(n,e,t)}function i6(n){if(typeof n.dispose=="function"){let e=()=>{try{n.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():(0,Ea.unstable_scheduleCallback)(Ea.unstable_IdlePriority,e)}}function NI(n,e,t){if(!e)return;let i=!!e.parent;e.parent=null;let a=n.children.indexOf(e);a!==-1&&n.children.splice(a,1),e.props.attach?bM(n,e):sr(e.object)&&sr(n.object)&&(n.object.remove(e.object),yte(FI(e),e.object));let r=e.props.dispose!==null&&t!==!1;for(let l=e.children.length-1;l>=0;l--){let c=e.children[l];NI(e,c,r)}if(e.children.length=0,delete e.object.__r3f,r&&e.type!=="primitive"&&e.object.type!=="Scene"&&i6(e.object),t===void 0&&i){var o;let l=(o=e.root)==null||o.getState==null?void 0:o.getState();l&&l.internal.frames===0&&l.invalidate()}}function Xte(n,e){for(let t of[n,n.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();let i=t.ref(e);typeof i=="function"&&(t.refCleanup=i)}else t.ref&&(t.ref.current=e)}var Ib=[];function Yte(){if(Ib.length!==0)try{jte()}finally{Ib.length=0}}function jte(){for(let[t]of Ib){let i=t.parent;if(i){t.props.attach?bM(i,t):sr(t.object)&&sr(i.object)&&i.object.remove(t.object);for(let a of t.children)a.props.attach?bM(t,a):sr(a.object)&&sr(t.object)&&t.object.remove(a.object)}t.isHidden&&n6(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&i6(t.object)}for(let[t,i,a]of Ib){t.props=i;let r=t.parent;if(r){var n,e;let o=jI(wM(t.type)),l=t.object;t.object=(n=t.props.object)!=null?n:new o(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,Xte(a,t.object),vte(FI(t),l,t.object),Bc(t.object,t.props),t.props.attach?yM(r,t):sr(t.object)&&sr(r.object)&&r.object.add(t.object);for(let c of t.children)c.props.attach?yM(t,c):sr(c.object)&&sr(t.object)&&t.object.add(c.object);Pb(t)}}}var EI=()=>{},B5={},mM=e6;function Zte(n){switch(n){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"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return k5;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 D5;case"message":switch((0,Ea.unstable_getCurrentPriorityLevel)()){case Ea.unstable_ImmediatePriority:return k5;case Ea.unstable_UserBlockingPriority:return D5;case Ea.unstable_NormalPriority:case Ea.unstable_LowPriority:return gM;case Ea.unstable_IdlePriority:return Ate;default:return gM}default:return gM}}function Kte(n){typeof queueMicrotask=="function"?queueMicrotask(n):typeof Promise<"u"?Promise.resolve().then(n).catch(e=>{setTimeout(()=>{throw e})}):setTimeout(n)}var Cd=Vte({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:Wte,removeChild:NI,appendChild:CI,appendInitialChild:CI,insertBefore:U5,appendChildToContainer(n,e){let t=n.getState().scene.__r3f;!e||!t||CI(t,e)},removeChildFromContainer(n,e){let t=n.getState().scene.__r3f;!e||!t||NI(t,e)},insertInContainerBefore(n,e,t){let i=n.getState().scene.__r3f;!e||!t||!i||U5(i,e,t)},getRootHostContext:()=>B5,getChildHostContext:()=>B5,commitUpdate(n,e,t,i,a){var r,o,l;t6(e,i);let c=!1;if((n.type==="primitive"&&t.object!==i.object||((r=i.args)==null?void 0:r.length)!==((o=t.args)==null?void 0:o.length)||(l=i.args)!=null&&l.some((f,h)=>{var p;return f!==((p=t.args)==null?void 0:p[h])}))&&(c=!0),c)Ib.push([n,DI(i),a]);else{let f=hte(n,i),h=n.props.attach;n.props=DI(i),h!==void 0?n.props.attach=h:delete n.props.attach,Object.keys(f).length&&Bc(n.object,f)}},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:n=>n?.object,prepareForCommit:()=>null,preparePortalMount:n=>vM(n.getState().scene,n,"",{}),resetAfterCommit:Yte,shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:qte,unhideInstance:n6,createTextInstance:EI,hideTextInstance:EI,unhideTextInstance:EI,supportsMicrotasks:!0,scheduleMicrotask:Kte,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:Yt.createContext(null),setCurrentUpdatePriority(n){mM=n},getCurrentUpdatePriority(){return mM},resolveUpdatePriority(){var n;if(mM!==e6)return mM;let e=typeof window<"u"?(n=window.event)==null?void 0:n.type:void 0;return e===void 0?gM:Zte(e)},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:Dte.version,applyViewTransitionName(n,e,t){},restoreViewTransitionName(n,e){},cancelViewTransitionName(n,e,t){},cancelRootViewTransitionName(n){},restoreRootViewTransitionName(n){},InstanceMeasurement:null,measureInstance:n=>null,wasInstanceInViewport:n=>!0,hasInstanceChanged:(n,e)=>!1,hasInstanceAffectedParent:(n,e)=>!1,suspendOnActiveViewTransition(n,e){},startViewTransition(n,e,t,i,a,r,o,l,c,f,h){return i(),a(),h?.(),o(),null},startGestureTransition(n,e,t,i,a,r,o,l,c,f){return o(),l(),f?.(),null},stopViewTransition(n){},addViewTransitionFinishedListener(n,e){e()},createViewTransitionInstance:n=>null,getCurrentGestureOffset(n){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(n,e){return n},cloneMutableTextInstance(n){return n},cloneRootViewTransitionContainer(n){throw new Error("Not implemented.")},removeRootViewTransitionClone(n,e){throw new Error("Not implemented.")},createFragmentInstance:n=>null,updateFragmentInstanceFiber(n,e){},commitNewChildToFragmentInstance(n,e){},deleteChildFromFragmentInstance(n,e){},measureClonedInstance:n=>null,maySuspendCommitOnUpdate:(n,e,t)=>!1,maySuspendCommitInSyncRender:(n,e)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(n,e)=>null});var hu=new Map;function _M(n,e){let t=n.state;switch(e.type){case"use":return t.status==="disposed"?!1:(n.state={status:"open"},!0);case"unmount":return t.status==="disposed"?!1:(n.state={status:"closing",token:e.token},!0);case"dispose":return t.status!=="closing"||t.token!==e.token?!1:(n.state={status:"disposed"},!0)}}function KI(n){let e=hu.get(n),t=e?.fiber,i=e?.store;e&&console.warn("R3F.createRoot should only be called once!");let a=typeof reportError=="function"?reportError:console.error,r=i||Tte(MM,QI),o=t||Cd.createContainer(r,Ete,null,!1,null,"",a,a,a,null),l=e||{fiber:o,store:r,state:{status:"open"},ready:bte(void 0),configuration:{},ownsRenderer:!1};e||hu.set(n,l);let c=!1;return{get ready(){return l.ready},configure(f={}){if(!_M(l,{type:"use"}))return xte(new Error("R3F: Cannot configure a root after disposal has started."));let h=l.ready,{promise:p,resolve:m,reject:g}=_te();l.ready=p;let b=_=>{let v=r.getState();v.gl||(l.ownsRenderer=!GI(f.gl),v.set({gl:_})),Ite(l,n,f),!l.unwatchDpr&&(f.dpr===void 0||Array.isArray(f.dpr))&&(l.unwatchDpr=Pte(l)),m(this)},x=()=>{try{var _;let v=(_=r.getState().gl)!=null?_:Ste(n,f.gl);VI(v)?Promise.resolve(v).then(b).catch(g):b(v)}catch(v){g(v)}};return h.status==="pending"?h.then(x,g):x(),p},render(f){if(!_M(l,{type:"use"}))return r;if(!r.getState().gl&&l.ready.status==="fulfilled"&&this.configure(),l.ready.status==="rejected")throw l.ready.reason;let h=()=>{var p;if(l.state.status!=="open"||l.ready.status==="rejected")return;if(l.ready.status==="pending"){l.ready.then(h,a);return}let m=(p=l.configuration.previous)==null?void 0:p.onCreated,g=(0,du.jsx)(Qte,{store:r,children:f,onCreated:m,rootElement:n});if(c){Cd.updateContainer(g,o,null,L5);return}c=!0,Cd.updateContainerSync(g,o,null,L5),Cd.flushSyncWork()};return h(),r},unmount(){hu.get(n)===l&&a6(n)}}}function Qte({store:n,children:e,onCreated:t,rootElement:i}){return Ed(()=>{let a=n.getState();a.set(r=>({internal:{...r.internal,active:!0}})),t&&t(a),n.getState().events.connected||a.events.connect==null||a.events.connect(i)},[]),(0,du.jsx)(WI.Provider,{value:n,children:e})}function Eb(n){try{return n()}catch(e){console.warn("[R3F] Error while unmounting root; teardown may be incomplete:",e)}}function a6(n,e){let t=hu.get(n),i=Symbol("unmount");if(!t||!_M(t,{type:"unmount",token:i}))return;let a=()=>{var r;if(t.ready.status==="pending"){t.ready.then(a,a);return}if(!_M(t,{type:"dispose",token:i}))return;hu.delete(n);let o=t.store.getState();o.internal.active=!1,Eb(()=>t.unwatchDpr==null?void 0:t.unwatchDpr()),Eb(()=>o.events.disconnect==null?void 0:o.events.disconnect()),(r=o.gl)!=null&&r.xr&&Eb(()=>o.xr.disconnect()),o.scene&&Eb(()=>Z5(o.scene));let l=Eb(()=>Mte(o.gl,t.ownsRenderer));VI(l)?l.then(()=>e?.(n)):e?.(n)};Cd.updateContainer(null,t.fiber,null,()=>{t.state.status!=="closing"||t.state.token!==i||Cd.updateContainer(null,t.fiber,null,a)})}var Jte=new Set,$te=new Set,ene=new Set;function AI(n,e){if(n.size)for(let{callback:t}of n.values())t(e)}function Gm(n,e){switch(n){case"before":return AI(Jte,e);case"after":return AI($te,e);case"tail":return AI(ene,e)}}var LI,RI;function zI(n,e,t){let i=e.clock.getDelta();e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),LI=e.internal.subscribers;for(let a=0;a<LI.length;a++)RI=LI[a],RI.ref.current(RI.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}var SM=!1,UI=!1,II,F5,Vm;function r6(n){F5=requestAnimationFrame(r6),SM=!0,II=0,Gm("before",n),UI=!0;for(let t of hu.values()){var e;Vm=t.store.getState(),Vm.internal.active&&(Vm.frameloop==="always"||Vm.internal.frames>0)&&!((e=Vm.gl.xr)!=null&&e.isPresenting)&&(II+=zI(n,Vm))}if(UI=!1,Gm("after",n),II===0)return Gm("tail",n),SM=!1,cancelAnimationFrame(F5)}function MM(n,e=1){var t;if(!n)return hu.forEach(i=>MM(i.store.getState(),e));(t=n.gl.xr)!=null&&t.isPresenting||!n.internal.active||n.frameloop==="never"||(e>1?n.internal.frames=Math.min(60,n.internal.frames+e):UI?n.internal.frames=2:n.internal.frames=1,SM||(SM=!0,requestAnimationFrame(r6)))}function QI(n,e=!0,t,i){if(e&&Gm("before",n),t)zI(n,t,i);else for(let a of hu.values())zI(n,a.store.getState());e&&Gm("after",n)}var PI={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function JI(n){let{handlePointer:e}=J5(n);return{priority:1,enabled:!0,compute(t,i,a){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(PI).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;let{events:i,internal:a}=n.getState();(t=a.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(a.lastEvent.current)},connect:t=>{let{set:i,events:a}=n.getState();if(a.disconnect==null||a.disconnect(),i(r=>({events:{...r.events,connected:t}})),a.handlers)for(let r in a.handlers){let o=a.handlers[r],[l,c]=PI[r];t.addEventListener(l,o,{passive:c})}},disconnect:()=>{let{set:t,events:i}=n.getState();if(i.connected){if(i.handlers)for(let a in i.handlers){let r=i.handlers[a],[o]=PI[a];i.connected.removeEventListener(o,r)}t(a=>({events:{...a.events,connected:void 0}}))}}}}var Si=ke(dt());var ho=ke(dt(),1);function o6(n,e){let t;return(...i)=>{window.clearTimeout(t),t=window.setTimeout(()=>n(...i),e)}}function s6({debounce:n,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){let a=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[r,o]=(0,ho.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=(0,ho.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:r,orientationHandler:null}),c=n?typeof n=="number"?n:n.scroll:null,f=n?typeof n=="number"?n:n.resize:null,h=(0,ho.useRef)(!1);(0,ho.useEffect)(()=>(h.current=!0,()=>{h.current=!1}));let[p,m,g]=(0,ho.useMemo)(()=>{let v=()=>{if(!l.current.element)return;let{left:S,top:M,width:T,height:E,bottom:L,right:P,x:I,y:R}=l.current.element.getBoundingClientRect(),A={left:S,top:M,width:T,height:E,bottom:L,right:P,x:I,y:R};l.current.element instanceof HTMLElement&&i&&(A.height=l.current.element.offsetHeight,A.width=l.current.element.offsetWidth),Object.freeze(A),h.current&&!ane(l.current.lastBounds,A)&&o(l.current.lastBounds=A)};return[v,f?o6(v,f):v,c?o6(v,c):v]},[o,i,c,f]);function b(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(v=>v.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null),l.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",l.current.orientationHandler))}function x(){l.current.element&&(l.current.resizeObserver=new a(g),l.current.resizeObserver.observe(l.current.element),e&&l.current.scrollContainers&&l.current.scrollContainers.forEach(v=>v.addEventListener("scroll",g,{capture:!0,passive:!0})),l.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",l.current.orientationHandler))}let _=v=>{!v||v===l.current.element||(b(),l.current.element=v,l.current.scrollContainers=l6(v),x())};return nne(g,!!e),tne(m),(0,ho.useEffect)(()=>{b(),x()},[e,g,m]),(0,ho.useEffect)(()=>b,[]),[_,r,p]}function tne(n){(0,ho.useEffect)(()=>{let e=n;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[n])}function nne(n,e){(0,ho.useEffect)(()=>{if(e){let t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[n,e])}function l6(n){let e=[];if(!n||n===document.body)return e;let{overflow:t,overflowX:i,overflowY:a}=window.getComputedStyle(n);return[t,i,a].some(r=>r==="auto"||r==="scroll")&&e.push(n),[...e,...l6(n.parentElement)]}var ine=["x","y","top","bottom","left","right","width","height"],ane=(n,e)=>ine.every(t=>n[t]===e[t]);var ys=ke(pn());var Nse=ke(TI());function rne({ref:n,children:e,fallback:t,resize:i,style:a,gl:r,events:o=JI,eventSource:l,eventPrefix:c,shadows:f,linear:h,flat:p,legacy:m,orthographic:g,frameloop:b,dpr:x,performance:_,raycaster:v,camera:S,scene:M,onPointerMissed:T,onCreated:E,...L}){Si.useMemo(()=>kb(lM),[]);let P=G5(),[I,R]=s6({scroll:!0,debounce:{scroll:50,resize:0},...i}),A=Si.useRef(null),D=Si.useRef(null);Si.useImperativeHandle(n,()=>A.current);let N=BI(T),H=Si.useCallback(Oe=>N.current==null?void 0:N.current(Oe),[N]),[X,W]=Si.useState(!1),[Y,V]=Si.useState(!1);if(X)throw X;if(Y)throw Y;let G=Si.useRef(null),[$,te]=V5(),ge=Si.useRef(null),Le=()=>l?Y5(l)?l.current:l:D.current;return Si.useInsertionEffect(()=>()=>{let Oe=G.current;G.current=null,Oe?.unmount()},[]),Ed(()=>{let Oe=A.current;R.width>0&&R.height>0&&Oe&&(G.current||(G.current=KI(Oe)),G.current.configure({gl:r,scene:M,events:o,shadows:f,linear:h,flat:p,legacy:m,orthographic:g,frameloop:b,dpr:x,performance:_,raycaster:v,camera:S,size:R,onPointerMissed:H,onCreated:ze=>{var ae;ge.current=ze,ze.events.connect==null||ze.events.connect((ae=Le())!=null?ae:D.current),c&&ze.setEvents({compute:(de,Ie)=>{let Xe=de[c+"X"],ve=de[c+"Y"];Ie.pointer.set(Xe/Ie.size.width*2-1,-(ve/Ie.size.height)*2+1),Ie.raycaster.setFromCamera(Ie.pointer,Ie.camera)}}),E?.(ze)}}).catch(V),G.current.ready.status==="fulfilled"?G.current.render((0,ys.jsx)(P,{children:(0,ys.jsx)(q5,{set:V,children:(0,ys.jsx)(Si.Suspense,{fallback:(0,ys.jsx)(W5,{set:W}),children:e??null})})})):G.current.ready.status==="pending"&&te(G.current.ready))}),Si.useEffect(()=>{var Oe;let ze=(Oe=ge.current)==null?void 0:Oe.get(),ae=Le();ze&&ae&&ze.events.connected!==ae&&(ze.events.connect==null||ze.events.connect(ae))}),Si.useEffect(()=>{let Oe=A.current;return()=>{var ze;Oe.isConnected||(ze=G.current)==null||ze.unmount()}},[]),(0,ys.jsxs)("div",{ref:D,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:l?"none":"auto",...a},...L,children:[(0,ys.jsx)("div",{ref:I,style:{width:"100%",height:"100%"},children:(0,ys.jsx)("canvas",{ref:A,style:{display:"block"},children:t})}),$]})}function u6(n){return(0,ys.jsx)(Sb,{children:(0,ys.jsx)(rne,{...n})})}var c6={type:"change"},eP={type:"start"},d6={type:"end"},TM=new fs,f6=new ao,one=Math.cos(70*nM.DEG2RAD),Zi=new U,Lr=2*Math.PI,wn={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},$I=1e-6,CM=class extends Mm{constructor(e,t=null){super(e,t),this.state=wn.NONE,this.target=new U,this.cursor=new U,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:su.ROTATE,MIDDLE:su.DOLLY,RIGHT:su.PAN},this.touches={ONE:lu.ROTATE,TWO:lu.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new U,this._lastQuaternion=new Di,this._lastTargetPosition=new U,this._quat=new Di().setFromUnitVectors(e.up,new U(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new fd,this._sphericalDelta=new fd,this._scale=1,this._panOffset=new U,this._rotateStart=new pe,this._rotateEnd=new pe,this._rotateDelta=new pe,this._panStart=new pe,this._panEnd=new pe,this._panDelta=new pe,this._dollyStart=new pe,this._dollyEnd=new pe,this._dollyDelta=new pe,this._dollyDirection=new U,this._mouse=new pe,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=lne.bind(this),this._onPointerDown=sne.bind(this),this._onPointerUp=une.bind(this),this._onContextMenu=gne.bind(this),this._onMouseWheel=dne.bind(this),this._onKeyDown=hne.bind(this),this._onTouchStart=pne.bind(this),this._onTouchMove=mne.bind(this),this._onMouseDown=cne.bind(this),this._onMouseMove=fne.bind(this),this._interceptControlDown=vne.bind(this),this._interceptControlUp=yne.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(c6),this.update(),this.state=wn.NONE}update(e=null){let t=this.object.position;Zi.copy(t).sub(this.target),Zi.applyQuaternion(this._quat),this._spherical.setFromVector3(Zi),this.autoRotate&&this.state===wn.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,a=this.maxAzimuthAngle;isFinite(i)&&isFinite(a)&&(i<-Math.PI?i+=Lr:i>Math.PI&&(i-=Lr),a<-Math.PI?a+=Lr:a>Math.PI&&(a-=Lr),i<=a?this._spherical.theta=Math.max(i,Math.min(a,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+a)/2?Math.max(i,this._spherical.theta):Math.min(a,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(Zi.setFromSpherical(this._spherical),Zi.applyQuaternion(this._quatInverse),t.copy(this.target).add(Zi),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){let l=Zi.length();o=this._clampDistance(l*this._scale);let c=l-o;this.object.position.addScaledVector(this._dollyDirection,c),this.object.updateMatrixWorld(),r=!!c}else if(this.object.isOrthographicCamera){let l=new U(this._mouse.x,this._mouse.y,0);l.unproject(this.object);let c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=c!==this.object.zoom;let f=new U(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(l),this.object.updateMatrixWorld(),o=Zi.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(TM.origin.copy(this.object.position),TM.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(TM.direction))<one?this.object.lookAt(this.target):(f6.setFromNormalAndCoplanarPoint(this.object.up,this.target),TM.intersectPlane(f6,this.target))))}else if(this.object.isOrthographicCamera){let o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>$I||8*(1-this._lastQuaternion.dot(this.object.quaternion))>$I||this._lastTargetPosition.distanceToSquared(this.target)>$I?(this.dispatchEvent(c6),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Lr/60*this.autoRotateSpeed*e:Lr/60/60*this.autoRotateSpeed}_getZoomScale(e){let t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Zi.setFromMatrixColumn(t,0),Zi.multiplyScalar(-e),this._panOffset.add(Zi)}_panUp(e,t){this.screenSpacePanning===!0?Zi.setFromMatrixColumn(t,1):(Zi.setFromMatrixColumn(t,0),Zi.crossVectors(this.object.up,Zi)),Zi.multiplyScalar(e),this._panOffset.add(Zi)}_pan(e,t){let i=this.domElement;if(this.object.isPerspectiveCamera){let a=this.object.position;Zi.copy(a).sub(this.target);let r=Zi.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/i.clientHeight,this.object.matrix),this._panUp(2*t*r/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let i=this.domElement.getBoundingClientRect(),a=e-i.left,r=t-i.top,o=i.width,l=i.height;this._mouse.x=a/o*2-1,this._mouse.y=-(r/l)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(Lr*this._rotateDelta.x/t.clientHeight),this._rotateUp(Lr*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),a=.5*(e.pageY+t.y);this._rotateStart.set(i,a)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),a=.5*(e.pageY+t.y);this._panStart.set(i,a)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,a=e.pageY-t.y,r=Math.sqrt(i*i+a*a);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let i=this._getSecondPointerPosition(e),a=.5*(e.pageX+i.x),r=.5*(e.pageY+i.y);this._rotateEnd.set(a,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(Lr*this._rotateDelta.x/t.clientHeight),this._rotateUp(Lr*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),a=.5*(e.pageY+t.y);this._panEnd.set(i,a)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,a=e.pageY-t.y,r=Math.sqrt(i*i+a*a);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let o=(e.pageX+t.x)*.5,l=(e.pageY+t.y)*.5;this._updateZoomParameters(o,l)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new pe,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){let t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){let t=e.deltaMode,i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}};function sne(n){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(n.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(n)&&(this._addPointer(n),n.pointerType==="touch"?this._onTouchStart(n):this._onMouseDown(n)))}function lne(n){this.enabled!==!1&&(n.pointerType==="touch"?this._onTouchMove(n):this._onMouseMove(n))}function une(n){switch(this._removePointer(n),this._pointers.length){case 0:this.domElement.releasePointerCapture(n.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(d6),this.state=wn.NONE;break;case 1:let e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function cne(n){let e;switch(n.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case su.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(n),this.state=wn.DOLLY;break;case su.ROTATE:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=wn.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=wn.ROTATE}break;case su.PAN:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=wn.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=wn.PAN}break;default:this.state=wn.NONE}this.state!==wn.NONE&&this.dispatchEvent(eP)}function fne(n){switch(this.state){case wn.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(n);break;case wn.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(n);break;case wn.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(n);break}}function dne(n){this.enabled===!1||this.enableZoom===!1||this.state!==wn.NONE||(n.preventDefault(),this.dispatchEvent(eP),this._handleMouseWheel(this._customWheelEvent(n)),this.dispatchEvent(d6))}function hne(n){this.enabled!==!1&&this._handleKeyDown(n)}function pne(n){switch(this._trackPointer(n),this._pointers.length){case 1:switch(this.touches.ONE){case lu.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(n),this.state=wn.TOUCH_ROTATE;break;case lu.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(n),this.state=wn.TOUCH_PAN;break;default:this.state=wn.NONE}break;case 2:switch(this.touches.TWO){case lu.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(n),this.state=wn.TOUCH_DOLLY_PAN;break;case lu.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(n),this.state=wn.TOUCH_DOLLY_ROTATE;break;default:this.state=wn.NONE}break;default:this.state=wn.NONE}this.state!==wn.NONE&&this.dispatchEvent(eP)}function mne(n){switch(this._trackPointer(n),this.state){case wn.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(n),this.update();break;case wn.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(n),this.update();break;case wn.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(n),this.update();break;case wn.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(n),this.update();break;default:this.state=wn.NONE}}function gne(n){this.enabled!==!1&&n.preventDefault()}function vne(n){n.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function yne(n){n.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var Ob=ke(dt(),1);function Oi({className:n="",...e}){return(0,Ob.createElement)("button",{...e,className:`lumo-button ${n}`})}function h6({className:n="",...e}){return(0,Ob.createElement)("input",{...e,type:"range",className:`lumo-slider ${n}`})}var IM=ke(dt(),1);var AM=ke(dt(),1);var Nb=new U;function Vo(n,e,t,i,a,r){let o=2*Math.PI*a/4,l=Math.max(r-2*a,0),c=Math.PI/4;Nb.copy(e),Nb[i]=0,Nb.normalize();let f=.5*o/(o+l),h=1-Nb.angleTo(n)/c;return Math.sign(Nb[t])===1?h*f:l/(o+l)+f+f*(1-h)}var EM=class n extends tl{constructor(e=1,t=1,i=1,a=2,r=.1){let o=a*2+1;if(r=Math.min(e/2,t/2,i/2,r),super(1,1,1,o,o,o),this.type="RoundedBoxGeometry",this.parameters={width:e,height:t,depth:i,segments:a,radius:r},o===1)return;let l=this.toNonIndexed();this.index=null,this.attributes.position=l.attributes.position,this.attributes.normal=l.attributes.normal,this.attributes.uv=l.attributes.uv;let c=new U,f=new U,h=new U(e,t,i).divideScalar(2).subScalar(r),p=this.attributes.position.array,m=this.attributes.normal.array,g=this.attributes.uv.array,b=p.length/6,x=new U,_=.5/o;for(let v=0,S=0;v<p.length;v+=3,S+=2)switch(c.fromArray(p,v),f.copy(c),f.x-=Math.sign(f.x)*_,f.y-=Math.sign(f.y)*_,f.z-=Math.sign(f.z)*_,f.normalize(),p[v+0]=h.x*Math.sign(c.x)+f.x*r,p[v+1]=h.y*Math.sign(c.y)+f.y*r,p[v+2]=h.z*Math.sign(c.z)+f.z*r,m[v+0]=f.x,m[v+1]=f.y,m[v+2]=f.z,Math.floor(v/b)){case 0:x.set(1,0,0),g[S+0]=Vo(x,f,"z","y",r,i),g[S+1]=1-Vo(x,f,"y","z",r,t);break;case 1:x.set(-1,0,0),g[S+0]=1-Vo(x,f,"z","y",r,i),g[S+1]=1-Vo(x,f,"y","z",r,t);break;case 2:x.set(0,1,0),g[S+0]=1-Vo(x,f,"x","z",r,e),g[S+1]=Vo(x,f,"z","x",r,i);break;case 3:x.set(0,-1,0),g[S+0]=1-Vo(x,f,"x","z",r,e),g[S+1]=1-Vo(x,f,"z","x",r,i);break;case 4:x.set(0,0,1),g[S+0]=1-Vo(x,f,"x","y",r,e),g[S+1]=1-Vo(x,f,"y","x",r,t);break;case 5:x.set(0,0,-1),g[S+0]=Vo(x,f,"x","y",r,e),g[S+1]=1-Vo(x,f,"y","x",r,t);break}}static fromJSON(e){return new n(e.width,e.height,e.depth,e.segments,e.radius)}};var Zt=ke(pn(),1);kb({RoundedBoxGeometry:EM});var _ne="#514b45",Sne="#fff5e4",wne="#ddbc97";function qe({size:n=[1,1,1],color:e=Sne,radius:t=.08,...i}){return(0,Zt.jsxs)("mesh",{castShadow:!0,receiveShadow:!0,...i,children:[(0,Zt.jsx)("roundedBoxGeometry",{args:[...n,3,Math.min(t,...n.map(a=>a/2))]}),(0,Zt.jsx)("meshStandardMaterial",{color:e,roughness:.85})]})}function Ln({size:n=[1,1,1],color:e,...t}){return(0,Zt.jsxs)("mesh",{castShadow:!0,...t,scale:n,children:[(0,Zt.jsx)("sphereGeometry",{args:[1,20,14]}),(0,Zt.jsx)("meshStandardMaterial",{color:e,roughness:.85})]})}function Bn({radius:n=.15,height:e=.3,color:t,...i}){return(0,Zt.jsxs)("mesh",{castShadow:!0,receiveShadow:!0,...i,children:[(0,Zt.jsx)("cylinderGeometry",{args:[n,n*.85,e,20]}),(0,Zt.jsx)("meshStandardMaterial",{color:t,roughness:.85})]})}function zb({text:n,position:e,small:t=!1,color:i=_ne,bg:a="#fffbf2"}){let r=(0,AM.useMemo)(()=>{let o=document.createElement("canvas");o.width=512,o.height=t?96:128;let l=o.getContext("2d");l.fillStyle=a,l.beginPath(),l.roundRect(0,0,o.width,o.height,32),l.fill(),l.fillStyle=i,l.textAlign="center",l.textBaseline="middle",l.font=`600 ${t?30:32}px -apple-system, sans-serif`,l.fillText(n.length>19?n.slice(0,18)+"\u2026":n,256,o.height/2,470);let c=new Ic(o);return c.colorSpace=hi,c},[n,t,i,a]);return(0,AM.useEffect)(()=>()=>r.dispose(),[r]),(0,Zt.jsx)("sprite",{position:e,scale:[t?1.9:2.35,t?.36:.58,1],children:(0,Zt.jsx)("spriteMaterial",{map:r,transparent:!0,depthTest:!1,toneMapped:!1})})}function pu({position:n,scale:e=1}){return(0,Zt.jsxs)("group",{position:n,scale:e,children:[(0,Zt.jsx)(Bn,{radius:.27,height:.43,position:[0,.22,0],color:"#dbb191"}),(0,Zt.jsx)(Bn,{radius:.22,height:.04,position:[0,.44,0],color:"#75634b"}),(0,Zt.jsx)(Bn,{radius:.035,height:.7,position:[0,.75,0],color:"#7f9a70"}),[0,1,2,3,4].map(t=>(0,Zt.jsx)(Ln,{size:[.19,.35,.11],color:t%2?"#a1b99a":"#7f9e7b",position:[Math.sin(t*2)*.22,.8+t*.11,Math.cos(t*2)*.2],rotation:[.2,t*2,.6]},t))]})}function p6({position:n,color:e,working:t}){return(0,Zt.jsxs)("group",{position:n,children:[(0,Zt.jsx)(qe,{position:[0,.8,0],size:[2.15,.17,1.05],color:wne,radius:.1}),[-.85,.85].flatMap(i=>[-.34,.34].map(a=>(0,Zt.jsx)(qe,{position:[i,.37,a],size:[.11,.75,.11],color:"#c3a486"},i+":"+a))),(0,Zt.jsx)(qe,{position:[0,1.22,-.25],size:[.8,.56,.1],color:"#f9f2e8",radius:.07}),(0,Zt.jsx)(qe,{position:[0,1.23,-.18],size:[.68,.43,.025],color:t?"#8aada6":"#adb4b2",radius:.04}),[0,1,2].map(i=>(0,Zt.jsx)(qe,{position:[-.11,1.32-i*.08,-.16],size:[.31-i*.06,.025,.01],color:t?"#e0ece1":"#c8d2ce"},i)),(0,Zt.jsx)(qe,{position:[0,.96,-.25],size:[.08,.2,.08],color:"#ebe2d6"}),(0,Zt.jsx)(qe,{position:[0,.9,-.22],size:[.34,.045,.21],color:"#f5ece0"}),(0,Zt.jsx)(qe,{position:[0,.91,.2],size:[.6,.045,.24],color:"#f9f0df"}),(0,Zt.jsx)(Bn,{position:[.77,.98,.12],radius:.1,height:.2,color:e}),(0,Zt.jsxs)("mesh",{position:[.88,.99,.12],rotation:[0,Math.PI/2,0],children:[(0,Zt.jsx)("torusGeometry",{args:[.07,.025,8,18]}),(0,Zt.jsx)("meshStandardMaterial",{color:e})]}),(0,Zt.jsx)(qe,{position:[-.77,.92,.03],size:[.26,.06,.34],color:"#a9bba5"}),(0,Zt.jsx)(qe,{position:[0,.4,.88],size:[.62,.13,.55],color:e}),(0,Zt.jsx)(qe,{position:[0,.8,1.1],size:[.65,.65,.14],color:e,radius:.14}),(0,Zt.jsx)(Bn,{radius:.06,height:.37,position:[0,.17,.88],color:"#b7a79a"})]})}function Ub(n){let e=Math.min(5,Math.max(2,Math.ceil(n/2))),t=Math.ceil(n/e);return{cols:e,rows:t,width:Math.max(15,e*2.5+2),depth:Math.max(12,t*5.2+1)}}function Fc(n,e){let{cols:t,rows:i}=Ub(e);return[(n%t-(t-1)/2)*2.5,0,-(i-1)*2.6-2+Math.floor(n/t)*2.6]}function m6(n,e=0){let t=0;for(let i of n)t=t*31+i.charCodeAt(0)>>>0;return{variant:e%6,fur:["#fff0d7","#e5c6a3","#e8dfd1","#f4d8c7","#d5dfd6","#eadcc8"][(t+e)%6],height:.94+e%3*.06,seed:t%997}}function g6(n,e){for(let i=1;i<n.length;i++){let a=n[i-1],r=n[i],o=Math.hypot(r[0]-a[0],r[1]-a[1]);if(e<=o)return{x:a[0]+(r[0]-a[0])*e/(o||1),z:a[1]+(r[1]-a[1])*e/(o||1),angle:Math.atan2(r[0]-a[0],r[1]-a[1])};e-=o}let t=n.at(-1);return{x:t[0],z:t[1],angle:Math.PI}}function v6(n){return n.slice(1).reduce((e,t,i)=>e+Math.hypot(t[0]-n[i][0],t[1]-n[i][1]),0)}var ole=ke(dt(),1);var Qe=ke(pn(),1),tP="#a6b9a5",LM="#ddb5a1",Bb="#fcf1dc";function y6({color:n}){return(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(Bn,{position:[-.82,.92,-.32],radius:.14,height:.04,color:tP}),(0,Qe.jsx)(Bn,{position:[-.82,1.1,-.32],radius:.025,height:.36,color:"#af9d83"}),(0,Qe.jsx)(Ln,{position:[-.76,1.31,-.28],size:[.2,.09,.16],color:tP}),(0,Qe.jsx)(Bn,{position:[.83,.99,-.32],radius:.075,height:.18,color:Bb}),[-.035,.025].map((e,t)=>(0,Qe.jsx)(qe,{position:[.83+e,1.15,-.32],size:[.023,.2,.023],color:t?n:"#7c8f9d","rotation-z":t?.15:-.12},t)),(0,Qe.jsx)(qe,{position:[-.47,.91,.2],size:[.2,.035,.26],color:n,"rotation-y":-.13}),(0,Qe.jsx)(qe,{position:[-.47,.93,.2],size:[.14,.008,.21],color:"#fff2d9"})]})}function Mne({position:n}){return(0,Qe.jsxs)("group",{position:n,children:[(0,Qe.jsx)(Bn,{radius:.3,height:.06,position:[0,.05,0],color:"#bda589"}),(0,Qe.jsx)(Bn,{radius:.035,height:1.9,position:[0,1,0],color:"#bda589"}),(0,Qe.jsx)(Ln,{position:[0,2,0],size:[.45,.23,.45],color:"#f2d6a3"}),(0,Qe.jsx)(Ln,{position:[0,1.88,0],size:[.32,.04,.32],color:"#fff3cf"})]})}function Tne({position:n}){return(0,Qe.jsxs)("group",{position:n,children:[(0,Qe.jsx)(Bn,{position:[0,.09,0],radius:.22,height:.08,color:LM}),(0,Qe.jsxs)("mesh",{position:[0,.34,0],"rotation-x":Math.PI/2,children:[(0,Qe.jsx)("cylinderGeometry",{args:[.28,.28,.08,24]}),(0,Qe.jsx)("meshStandardMaterial",{color:Bb})]}),(0,Qe.jsx)(qe,{position:[0,.4,.05],size:[.025,.14,.02],color:"#97816b"}),(0,Qe.jsx)(qe,{position:[.055,.34,.05],size:[.13,.025,.02],color:"#97816b"})]})}function Cne(){return(0,Qe.jsxs)("group",{position:[-5.4,0,5.7],"rotation-y":.25,children:[(0,Qe.jsx)(Bn,{position:[0,.12,0],radius:.55,height:.22,color:"#d8ba93"}),(0,Qe.jsx)(Ln,{position:[0,.27,0],size:[.46,.12,.43],color:"#d7cbb6"}),(0,Qe.jsx)(Ln,{position:[.02,.37,0],size:[.36,.2,.28],color:"#ecd3b2"}),(0,Qe.jsx)(Ln,{position:[.21,.4,.11],size:[.22,.19,.18],color:"#ecd3b2"}),[-1,1].map(n=>(0,Qe.jsx)(Ln,{position:[.21+n*.13,.55,.09],size:[.07,.12,.075],color:"#ecd3b2","rotation-z":n*.2},n)),[.13,.29].map(n=>(0,Qe.jsx)(qe,{position:[n,.41,.28],size:[.06,.012,.01],color:"#93795f","rotation-z":n>.2?-.15:.15},n)),(0,Qe.jsxs)("mesh",{position:[-.19,.4,.08],"rotation-x":Math.PI/2,children:[(0,Qe.jsx)("torusGeometry",{args:[.2,.065,8,20,Math.PI*1.6]}),(0,Qe.jsx)("meshStandardMaterial",{color:"#d8b78d"})]})]})}function b6({depth:n}){return(0,Qe.jsxs)("group",{name:"office-details",children:[(0,Qe.jsxs)("group",{position:[0,0,-n/2-.2],children:[(0,Qe.jsx)(qe,{size:[5,.8,.65],position:[0,.43,0],color:"#cfb495"}),(0,Qe.jsx)(qe,{size:[5.15,.09,.8],position:[0,.88,0],color:Bb}),[-1.65,-.55,.55,1.65].map((e,t)=>(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(qe,{size:[1,.61,.035],position:[e,.45,.35],color:["#b9c6ae","#e3c5aa","#c8bdd1","#b7c9cb"][t]}),(0,Qe.jsx)(qe,{size:[.13,.025,.03],position:[e,.63,.38],color:"#f9ecd4"})]},e)),(0,Qe.jsx)(qe,{size:[2.5,1.15,.1],position:[0,1.62,-.08],color:"#f7eacb"}),[-1,1].map(e=>(0,Qe.jsx)(qe,{size:[.045,1.3,.06],position:[e,1.35,-.12],color:"#b29b7b"},e)),Array.from({length:6},(e,t)=>(0,Qe.jsx)(qe,{size:[.42,.29,.02],position:[-.73+t%3*.7,1.82-Math.floor(t/3)*.45,-.015],color:[tP,LM,"#b4c6cf"][t%3],"rotation-z":(t%3-1)*.08},t)),(0,Qe.jsx)(pu,{position:[-2,.92,0],scale:.48}),(0,Qe.jsx)(Tne,{position:[2,.94,.04]})]}),(0,Qe.jsxs)("group",{position:[-6.8,0,-2.6],children:[(0,Qe.jsx)(qe,{size:[.75,.85,1.65],position:[0,.44,0],color:"#b8c2b6"}),(0,Qe.jsx)(qe,{size:[.85,.08,1.8],position:[0,.91,0],color:Bb}),(0,Qe.jsx)(qe,{size:[.65,.4,.67],position:[0,1.15,-.3],color:"#e5ded1"}),(0,Qe.jsx)(qe,{size:[.52,.08,.4],position:[0,1.38,-.3],color:"#bbb6aa"}),(0,Qe.jsx)(qe,{size:[.43,.02,.36],position:[0,1.43,-.2],color:"#fff9ed","rotation-x":-.1}),(0,Qe.jsx)(qe,{size:[.48,.07,.3],position:[0,.99,.48],color:LM}),(0,Qe.jsx)(qe,{size:[.42,.04,.27],position:[0,1.04,.48],color:Bb})]}),(0,Qe.jsx)(Mne,{position:[-6.5,0,4.8]}),(0,Qe.jsx)(Cne,{}),(0,Qe.jsx)(Bn,{position:[-3,.28,5.55],radius:.45,height:.5,color:LM}),(0,Qe.jsx)(Bn,{position:[-3,.55,5.55],radius:.46,height:.12,color:"#ecd0bb"}),(0,Qe.jsxs)("group",{position:[5.3,0,5.65],children:[[.25,.85].map(e=>(0,Qe.jsx)(qe,{position:[0,e,0],size:[1.4,.08,.7],color:"#c3b198"},e)),[-.58,.58].map(e=>(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(qe,{position:[e,.55,0],size:[.055,.75,.55],color:"#baa68c"}),[-.23,.23].map(t=>(0,Qe.jsx)(Ln,{position:[e,.12,t],size:[.08,.09,.06],color:"#8a8171"},t))]},e)),[-.4,0,.4].map((e,t)=>(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(Bn,{position:[e,1.03,0],radius:.13,height:.3,color:["#b9c9b4","#ead1aa","#d4bbce"][t]}),(0,Qe.jsx)(Bn,{position:[e,1.2,0],radius:.14,height:.045,color:"#bda78b"})]},e)),(0,Qe.jsx)(qe,{size:[.75,.22,.5],position:[-.15,.4,0],color:"#f0debf"})]}),(0,Qe.jsx)(pu,{position:[-7.1,0,-.7],scale:.7}),(0,Qe.jsx)(pu,{position:[3.2,0,-n/2-.5],scale:.85}),[-.9,-.3,.3,.9].map(e=>(0,Qe.jsx)(qe,{position:[2+e,.094,4.55],size:[.23,.012,.08],color:"#d1bda3",radius:.02},e))]})}var ul={pending:"\u7B49\u5F85\u4EFB\u52A1",running:"\u4E13\u6CE8\u5DE5\u4F5C",completed:"\u5DF2\u5B8C\u6210",error:"\u9700\u8981\u5E2E\u52A9",cancelled:"\u5DF2\u6682\u505C",superseded:"\u5DF2\u8C03\u6574",idle:"\u4F11\u606F\u4E2D",active:"\u534F\u4F5C\u4E2D",paused:"\u5DF2\u6682\u505C",waiting:"\u7B49\u5F85\u8865\u5145",complete:"\u5DF2\u5B8C\u6210",plan:"\u89C4\u5212",work:"\u6267\u884C",review:"\u8BC4\u5BA1",coordinate:"\u4EA4\u6D41",deliver:"\u4EA4\u4ED8"},lr=["#e2b77e","#a6bdb0","#bcaace","#e1a8a1","#9db9cf","#d0c184"],x6={general:"\u7EFC\u5408\u4EFB\u52A1",development:"\u5F00\u53D1\u4EFB\u52A1",presentation:"\u6F14\u793A\u6587\u7A3F"},_6={simple:"\u7B80\u5355",standard:"\u5E38\u89C4",complex:"\u590D\u6742"};function RM(n){return n.run?.timeline?.length?[...n.run.timeline].sort((e,t)=>e.at-t.at):(n.run?.tasks||[]).flatMap(e=>{let t=n.messages.filter(o=>o.taskId===e.id);if(!t.length)return[];let i=Math.min(...t.map(o=>o.time)),a=Math.max(...t.map(o=>o.finishedAt||0)),r={taskId:e.id,roleId:e.roleId,title:e.title,phase:e.phase,dependsOn:e.dependsOn,dependencyCount:e.dependencyCount,handoffFrom:e.handoffFrom,handoffCount:e.handoffCount};return[{...r,id:e.id+":start",at:i,status:"running"},...a>=i&&e.status!=="running"?[{...r,id:e.id+":end",at:a,status:e.status}]:[]]}).sort((e,t)=>e.at-t.at)}function Ene(n,e,t){let i=new Map;for(let r of e.slice(0,t+1))i.set(r.taskId,{id:r.taskId,roleId:r.roleId,title:r.title,phase:r.phase,status:r.status,dependsOn:r.dependsOn||[],dependencyCount:r.dependencyCount,handoffFrom:r.handoffFrom||[],handoffCount:r.handoffCount});let a=[...i.values()].reverse().find(r=>["plan","coordinate","deliver"].includes(r.phase))?.roleId;return{id:n.id,coordinatorId:a,status:"active",tasks:[...i.values()],artifacts:[]}}function Wm(n){let e=RM(n).map(i=>({...i,kind:"task"})),t=n.messages.flatMap(i=>{let a=new Set(i.mentionIds||[]);for(let r of n.roles){let o=r.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp("(^|[\\s\uFF0C,\uFF1A:\uFF1B;\u3002\uFF01\uFF1F!?])@"+o+"(?=$|[\\s\uFF0C,\uFF1A:\uFF1B;\u3002\uFF01\uFF1F!?])","u").test(i.text||"")&&a.add(r.id)}return a.size?[{id:"mention:"+i.id,kind:"mention",at:i.finishedAt||i.time,roleId:i.roleId,to:[...a],title:`${i.name||"\u7528\u6237"} \u5411 ${[...a].map(r=>n.roles.find(o=>o.id===r)?.name||"\u6210\u5458").join("\u3001")} \u53D1\u8D77\u4EA4\u6D41`,messageId:i.id}]:[]});return[...e,...t].sort((i,a)=>i.at-a.at)}function S6(n,e,t){if(t===null)return{...n,event:e.at(-1),frames:RM(n),historical:!1};let i=Math.max(0,Math.min(t,e.length-1)),a=e[i];if(!a)return{...n,roles:n.run?.selectionMode==="auto"?[]:n.roles,run:n.run?{id:n.run.id,tasks:[],artifacts:[]}:null,messages:[],activities:[],frames:[],asOf:0,historical:!0};let r=e.slice(0,i+1).filter(f=>f.kind==="task"),o=n.run?Ene(n.run,r,r.length-1):null,l=n.messages.filter(f=>f.time<=a.at).map(f=>f.role==="user"||f.finishedAt&&f.finishedAt<=a.at?f:{...f,text:"\u6B64\u65F6\u8F93\u51FA\u5C1A\u672A\u5B8C\u6210",tools:[],finishedAt:void 0,status:"thinking"}),c=n.run?.selectionMode==="auto"?n.roles.filter(f=>o?.tasks.some(h=>h.roleId===f.id)):n.roles;return{...n,roles:c,run:o,messages:l,activities:[],frames:r,asOf:a.at,event:a,historical:!0}}function mu(n,e){let t=n.run?.tasks.filter(o=>o.roleId===e&&o.status!=="superseded")||[],i=t.find(o=>o.status==="running")||t.find(o=>o.status==="error")||t.find(o=>o.status==="pending")||t.at(-1),a=!n.historical&&n.activities.find(o=>o.roleId===e),r=a?.state||(n.run?.status==="paused"?"paused":i?.status||"idle");return{tasks:t,task:i,state:r,label:a?.label||ul[r]||r,detail:a?.detail||i?.title||"\u968F\u65F6\u51C6\u5907\u52A0\u5165\u534F\u4F5C",working:["running","thinking","working","connecting"].includes(r)}}var ft=ke(pn(),1);function w6({position:n,rotation:e=0,color:t="#a5b8a4"}){return(0,ft.jsxs)("group",{position:n,"rotation-y":e,children:[(0,ft.jsx)(qe,{position:[0,.37,0],size:[2.8,.5,.95],color:t,radius:.2}),(0,ft.jsx)(qe,{position:[0,.82,-.4],size:[2.8,.9,.25],color:t,radius:.16}),[-1.35,1.35].map(i=>(0,ft.jsx)(qe,{position:[i,.66,0],size:[.24,.65,1],color:t},i)),[-.85,.85].map((i,a)=>(0,ft.jsx)(qe,{position:[i,.68,-.17],size:[.5,.4,.18],color:["#efcfaa","#f7e9ce","#c6d5c1"][a],"rotation-z":a*.15},i))]})}function Ane({position:n}){return(0,ft.jsxs)("group",{position:n,children:[(0,ft.jsx)(qe,{size:[2.3,2.3,.5],position:[0,1.2,0],color:"#c7a582"}),[.5,1.2,1.9].map((e,t)=>(0,ft.jsxs)("group",{children:[(0,ft.jsx)(qe,{size:[2.1,.55,.48],position:[0,e,.04],color:"#e9d7bc"}),Array.from({length:7},(i,a)=>(0,ft.jsx)(qe,{position:[-.88+a*.27,e,.17],size:[.16,.28+a%3*.06,.3],color:lr[(a+t)%lr.length],"rotation-z":a===5?.16:0},a))]},e))]})}function Lne(){let n=(0,IM.useMemo)(()=>{let e=document.createElement("canvas");e.width=256,e.height=256;let t=e.getContext("2d");t.fillStyle="#f2e6d4",t.fillRect(0,0,256,256),t.strokeStyle="#e0ceb4",t.lineWidth=1;for(let a=0;a<=4;a++)t.beginPath(),t.moveTo(a*64,0),t.lineTo(a*64,256),t.stroke();t.beginPath(),t.moveTo(0,128),t.lineTo(64,128),t.moveTo(128,64),t.lineTo(192,64),t.stroke();let i=new Ic(e);return i.wrapS=i.wrapT=Ac,i.repeat.set(45,45),i.colorSpace=hi,i},[]);return(0,IM.useEffect)(()=>()=>n.dispose(),[n]),(0,ft.jsxs)("mesh",{receiveShadow:!0,"rotation-x":-Math.PI/2,position:[0,.02,0],children:[(0,ft.jsx)("planeGeometry",{args:[180,180]}),(0,ft.jsx)("meshStandardMaterial",{map:n,roughness:.95})]})}function M6({view:n}){let{width:e,depth:t}=Ub(n.roles.length);return(0,ft.jsxs)("group",{children:[(0,ft.jsx)(Lne,{}),(0,ft.jsx)(b6,{depth:t}),n.roles.map((i,a)=>(0,ft.jsxs)("group",{position:Fc(a,n.roles.length),children:[(0,ft.jsx)(p6,{color:lr[a%lr.length],working:mu(n,i.id).working}),(0,ft.jsx)(y6,{color:lr[a%lr.length]})]},i.id)),(0,ft.jsx)(qe,{position:[-4,.065,3.45],size:[4.3,.04,3.3],color:"#d1d9c6",radius:.3}),(0,ft.jsx)(w6,{position:[-4,0,4.5],rotation:Math.PI}),(0,ft.jsx)(w6,{position:[-5.4,0,3],rotation:Math.PI/2,color:"#d9b3a0"}),(0,ft.jsx)(Bn,{radius:.75,height:.14,position:[-3.8,.55,2.9],color:"#f8e7cd"}),[-4.1,-3.5].map(i=>(0,ft.jsx)(qe,{size:[.1,.5,.1],position:[i,.25,2.9],color:"#b59a7d"},i)),(0,ft.jsx)(qe,{size:[.38,.04,.32],position:[-3.9,.65,2.9],color:"#a3b2bc"}),(0,ft.jsx)(Bn,{radius:.09,height:.16,position:[-3.5,.7,3],color:"#d6ab7f"}),(0,ft.jsx)(qe,{position:[2,.065,3],size:[4.3,.035,3.7],color:"#ead9c2",radius:.4}),(0,ft.jsx)(Bn,{position:[2,.85,3.2],radius:1.15,height:.15,color:"#e0bc91"}),(0,ft.jsx)(Bn,{position:[2,.42,3.2],radius:.3,height:.8,color:"#c6a17c"}),[0,1,2,3].map(i=>(0,ft.jsxs)("group",{position:[2+Math.sin(i*Math.PI/2)*1.65,0,3.2+Math.cos(i*Math.PI/2)*1.65],"rotation-y":i*Math.PI/2,children:[(0,ft.jsx)(qe,{position:[0,.45,0],size:[.57,.13,.57],color:"#b9c8bd"}),(0,ft.jsx)(qe,{position:[0,.8,.24],size:[.57,.6,.12],color:"#b9c8bd"}),(0,ft.jsx)(Bn,{position:[0,.2,0],radius:.06,height:.4,color:"#bdab94"})]},i)),[0,1,2].map(i=>(0,ft.jsx)(qe,{position:[1.5+i*.4,.96,3],size:[.27,.035,.36],color:lr[i],"rotation-y":i*.3},i)),(0,ft.jsxs)("group",{position:[4.7,0,4.8],"rotation-y":-.3,children:[(0,ft.jsx)(qe,{size:[2.1,1.3,.12],position:[0,1.6,0],color:"#fcf7e9"}),[-.8,.8].map(i=>(0,ft.jsx)(qe,{size:[.06,1.8,.06],position:[i,.9,0],color:"#b1a38f"},i)),[0,1,2,3].map(i=>(0,ft.jsx)(qe,{size:[.32,.28,.02],position:[-.65+i%2*.65,1.8-Math.floor(i/2)*.45,.08],color:lr[i],"rotation-z":i*.07},i))]}),(0,ft.jsx)("group",{position:[-5.8,0,-t/2+.5],children:(0,ft.jsx)(Ane,{position:[0,0,0]})}),(0,ft.jsxs)("group",{position:[5.3,0,-t/2+.6],children:[(0,ft.jsx)(qe,{position:[0,.55,0],size:[2.6,1.1,.8],color:"#a6b5aa"}),(0,ft.jsx)(qe,{position:[0,1.13,0],size:[2.75,.12,.95],color:"#f8eedd"}),(0,ft.jsx)(qe,{position:[-.65,1.5,0],size:[.65,.65,.55],color:"#716a5e"}),(0,ft.jsx)(qe,{position:[-.65,1.55,.29],size:[.45,.3,.03],color:"#babdaf"}),(0,ft.jsx)(Bn,{radius:.085,height:.18,position:[-.65,1.3,.32],color:"#fff0d3"}),[.2,.5,.8].map(i=>(0,ft.jsx)(Bn,{radius:.09,height:.2,position:[i,1.29,.13],color:"#ddba91"},i))]}),(0,ft.jsx)(pu,{position:[-6.65,0,.4],scale:1.3}),(0,ft.jsx)(pu,{position:[6.5,0,5.1],scale:1.4}),(0,ft.jsx)(pu,{position:[.1,0,5.3],scale:.9}),(0,ft.jsx)(pu,{position:[6.5,0,-t/2+.7],scale:1.2}),(0,ft.jsxs)("group",{position:[0,0,5.6],children:[(0,ft.jsx)(qe,{size:[2.1,.08,.55],position:[0,.09,0],color:"#beac8c"}),(0,ft.jsx)(zb,{text:"WELCOME HOME",small:!0,position:[0,.3,0]})]})]})}var oi=ke(dt(),1);function gu(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function D6(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}var Dr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},qb={duration:.5,overwrite:!1,delay:0},vP,Aa,jn,Wo=1e8,Mn=1/Wo,uP=Math.PI*2,Rne=uP/4,Ine=0,k6=Math.sqrt,Pne=Math.cos,Dne=Math.sin,Ki=function(e){return typeof e=="string"},mi=function(e){return typeof e=="function"},yu=function(e){return typeof e=="number"},GM=function(e){return typeof e>"u"},dl=function(e){return typeof e=="object"},Pr=function(e){return e!==!1},yP=function(){return typeof window<"u"},PM=function(e){return mi(e)||Ki(e)},O6=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ja=Array.isArray,kne=/random\([^)]+\)/g,One=/,\s*/g,T6=/(?:-?\.?\d|\.)+/gi,bP=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Id=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,nP=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,xP=/[+-]=-?[.\d]+/,Nne=/[^,'"\[\]\s]+/gi,zne=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ai,cl,cP,_P,mo={},NM={},N6,z6=function(e){return(NM=Xm(e,mo))&&Za},WM=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Xb=function(e,t){return!t&&console.warn(e)},U6=function(e,t){return e&&(mo[e]=t)&&NM&&(NM[e]=t)||mo},Yb=function(){return 0},Une={suppressEvents:!0,isStart:!0,kill:!1},DM={suppressEvents:!0,kill:!1},Bne={suppressEvents:!0},SP={},Vc=[],fP={},B6,Rr={},iP={},C6=30,kM=[],wP="",MP=function(e){var t=e[0],i,a;if(dl(t)||mi(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(a=kM.length;a--&&!kM[a].targetTest(t););i=kM[a]}for(a=e.length;a--;)e[a]&&(e[a]._gsap||(e[a]._gsap=new AP(e[a],i)))||e.splice(a,1);return e},Gc=function(e){return e._gsap||MP(qo(e))[0]._gsap},TP=function(e,t,i){return(i=e[t])&&mi(i)?e[t]():GM(i)&&e.getAttribute&&e.getAttribute(t)||i},ur=function(e,t){return(e=e.split(",")).forEach(t)||e},gi=function(e){return Math.round(e*1e5)/1e5||0},ii=function(e){return Math.round(e*1e7)/1e7||0},Pd=function(e,t){var i=t.charAt(0),a=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+a:i==="-"?e-a:i==="*"?e*a:e/a},Fne=function(e,t){for(var i=t.length,a=0;e.indexOf(t[a])<0&&++a<i;);return a<i},zM=function(){var e=Vc.length,t=Vc.slice(0),i,a;for(fP={},Vc.length=0,i=0;i<e;i++)a=t[i],a&&a._lazy&&(a.render(a._lazy[0],a._lazy[1],!0)._lazy=0)},CP=function(e){return!!(e._initted||e._startAt||e.add)},F6=function(e,t,i,a){Vc.length&&!Aa&&zM(),e.render(t,i,a||!!(Aa&&t<0&&CP(e))),Vc.length&&!Aa&&zM()},H6=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(Nne).length<2?t:Ki(e)?e.trim():e},V6=function(e){return e},go=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Hne=function(e){return function(t,i){for(var a in i)a in t||a==="duration"&&e||a==="ease"||(t[a]=i[a])}},Xm=function(e,t){for(var i in t)e[i]=t[i];return e},E6=function n(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=dl(t[i])?n(e[i]||(e[i]={}),t[i]):t[i]);return e},UM=function(e,t){var i={},a;for(a in e)a in t||(i[a]=e[a]);return i},Vb=function(e){var t=e.parent||ai,i=e.keyframes?Hne(ja(e.keyframes)):go;if(Pr(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},Vne=function(e,t){for(var i=e.length,a=i===t.length;a&&i--&&e[i]===t[i];);return i<0},G6=function(e,t,i,a,r){i===void 0&&(i="_first"),a===void 0&&(a="_last");var o=e[a],l;if(r)for(l=t[r];o&&o[r]>l;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[a]=t,t._prev=o,t.parent=t._dp=e,t},qM=function(e,t,i,a){i===void 0&&(i="_first"),a===void 0&&(a="_last");var r=t._prev,o=t._next;r?r._next=o:e[i]===t&&(e[i]=o),o?o._prev=r:e[a]===t&&(e[a]=r),t._next=t._prev=t.parent=null},Wc=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ad=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},Gne=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},dP=function(e,t,i,a){return e._startAt&&(Aa?e._startAt.revert(DM):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,a))},Wne=function n(e){return!e||e._ts&&n(e.parent)},A6=function(e){return e._repeat?Ym(e._tTime,e=e.duration()+e._rDelay)*e:0},Ym=function(e,t){var i=Math.floor(e=ii(e/t));return e&&i===e?i-1:i},BM=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},XM=function(e){return e._end=ii(e._start+(e._tDur/Math.abs(e._ts||e._rts||Mn)||0))},YM=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=ii(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),XM(e),i._dirty||Ad(i,e)),e},W6=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=BM(e.rawTime(),t),(!t._dur||Qb(0,t.totalDuration(),i)-t._tTime>Mn)&&t.render(i,!0)),Ad(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-Mn}},fl=function(e,t,i,a){return t.parent&&Wc(t),t._start=ii((yu(i)?i:!i&&FM(t)&&(!e._last||e._last._start>=e._time)?e._last?e._last._start:e._time:i||e!==ai?Go(e,i,t):e._time)+t._delay),t._end=ii(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),G6(e,t,"_first","_last",e._sort?"_start":0),FM(t)||(e._recent=t),a||W6(e,t),e._ts<0&&YM(e,e._tTime),e},q6=function(e,t){return(mo.ScrollTrigger||WM("scrollTrigger",t))&&mo.ScrollTrigger.create(t,e)},X6=function(e,t,i,a,r){if(IP(e,t,r),!e._initted)return 1;if(!i&&e._pt&&!Aa&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&B6!==Ir.frame)return Vc.push(e),e._lazy=[r,a],1},qne=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},FM=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Xne=function(e,t,i,a){var r=e.ratio,o=t<0||!t&&(!e._start&&qne(e)&&!(!e._initted&&FM(e))||(e._ts<0||e._dp._ts<0)&&!FM(e))?0:1,l=e._rDelay,c=0,f,h,p;if(l&&e._repeat&&(c=Qb(0,e._tDur,t),h=Ym(c,l),e._yoyo&&h&1&&(o=1-o),h!==Ym(e._tTime,l)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||Aa||a||e._zTime===Mn||!t&&e._zTime){if(!e._initted&&X6(e,t,a,i,c))return;for(p=e._zTime,e._zTime=t||(i?Mn:0),i||(i=t&&!p),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,f=e._pt;f;)f.r(o,f.d),f=f._next;t<0&&dP(e,t,i,!0),e._onUpdate&&!i&&po(e,"onUpdate"),c&&e._repeat&&!i&&e.parent&&po(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Wc(e,1),!i&&!Aa&&(po(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Yne=function(e,t,i){var a;if(i>t)for(a=e._first;a&&a._start<=i;){if(a.data==="isPause"&&a._start>t)return a;a=a._next}else for(a=e._last;a&&a._start>=i;){if(a.data==="isPause"&&a._start<t)return a;a=a._prev}},jm=function(e,t,i,a){var r=e._repeat,o=ii(t)||0,l=e._tTime/e._tDur;return l&&!a&&(e._time*=o/e._dur),e._dur=o,e._tDur=r?r<0?1e10:ii(o*(r+1)+e._rDelay*r):o,l>0&&!a&&YM(e,e._tTime=e._tDur*l),e.parent&&XM(e),i||Ad(e.parent,e),e},L6=function(e){return e instanceof Ya?Ad(e):jm(e,e._dur)},jne={_start:0,endTime:Yb,totalDuration:Yb},Go=function n(e,t,i){var a=e.labels,r=e._recent||jne,o=e.duration()>=Wo?r.endTime(!1):e._dur,l,c,f;return Ki(t)&&(isNaN(t)||t in a)?(c=t.charAt(0),f=t.substr(-1)==="%",l=t.indexOf("="),c==="<"||c===">"?(l>=0&&(t=t.replace(/=/,"")),(c==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(f?(l<0?r:i).totalDuration()/100:1)):l<0?(t in a||(a[t]=o),a[t]):(c=parseFloat(t.charAt(l-1)+t.substr(l+1)),f&&i&&(c=c/100*(ja(i)?i[0]:i).totalDuration()),l>1?n(e,t.substr(0,l-1),i)+c:o+c)):t==null?o:+t},Gb=function(e,t,i){var a=yu(t[1]),r=(a?2:1)+(e<2?0:1),o=t[r],l,c;if(a&&(o.duration=t[1]),o.parent=i,e){for(l=o,c=i;c&&!("immediateRender"in l);)l=c.vars.defaults||{},c=Pr(c.vars.inherit)&&c.parent;o.immediateRender=Pr(l.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new wi(t[0],o,t[r+1])},qc=function(e,t){return e||e===0?t(e):t},Qb=function(e,t,i){return i<e?e:i>t?t:i},La=function(e,t){return!Ki(e)||!(t=zne.exec(e))?"":t[1]},Zne=function(e,t,i){return qc(i,function(a){return Qb(e,t,a)})},hP=[].slice,Y6=function(e,t){return e&&dl(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&dl(e[0]))&&!e.nodeType&&e!==cl},Kne=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(a){var r;return Ki(a)&&!t||Y6(a,1)?(r=i).push.apply(r,qo(a)):i.push(a)})||i},qo=function(e,t,i){return jn&&!t&&jn.selector?jn.selector(e):Ki(e)&&!i&&(cP||!Zm())?hP.call((t||_P).querySelectorAll(e),0):ja(e)?Kne(e,i):Y6(e)?hP.call(e,0):e?[e]:[]},pP=function(e){return e=qo(e)[0]||Xb("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return qo(t,i.querySelectorAll?i:i===e?Xb("Invalid scope")||_P.createElement("div"):e)}},j6=function(e){return e.sort(function(){return .5-Math.random()})},Z6=function(e){if(mi(e))return e;var t=dl(e)?e:{each:e},i=Ld(t.ease),a=t.from||0,r=parseFloat(t.base)||0,o={},l=a>0&&a<1,c=isNaN(a)||l,f=t.axis,h=a,p=a;return Ki(a)?h=p={center:.5,edges:.5,end:1}[a]||0:!l&&c&&(h=a[0],p=a[1]),function(m,g,b){var x=(b||t).length,_=o[x],v,S,M,T,E,L,P,I,R;if(!_){if(R=t.grid==="auto"?0:(t.grid||[1,Wo])[1],!R){for(P=-Wo;P<(P=b[R++].getBoundingClientRect().left)&&R<x;);R<x&&R--}for(_=o[x]=[],v=c?Math.min(R,x)*h-.5:a%R,S=R===Wo?0:c?x*p/R-.5:a/R|0,P=0,I=Wo,L=0;L<x;L++)M=L%R-v,T=S-(L/R|0),_[L]=E=f?Math.abs(f==="y"?T:M):k6(M*M+T*T),E>P&&(P=E),E<I&&(I=E);a==="random"&&j6(_),_.max=P-I,_.min=I,_.v=x=(parseFloat(t.amount)||parseFloat(t.each)*(R>x?x-1:f?f==="y"?x/R:R:Math.max(R,x/R))||0)*(a==="edges"?-1:1),_.b=x<0?r-x:r,_.u=La(t.amount||t.each)||0,i=i&&x<0?uie(i):i}return x=(_[m]-_.min)/_.max||0,ii(_.b+(i?i(x):x)*_.v)+_.u}},mP=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var a=ii(Math.round(parseFloat(i)/e)*e*t);return(a-a%1)/t+(yu(i)?0:La(i))}},K6=function(e,t){var i=ja(e),a,r;return!i&&dl(e)&&(a=i=e.radius||Wo,e.values?(e=qo(e.values),(r=!yu(e[0]))&&(a*=a)):e=mP(e.increment)),qc(t,i?mi(e)?function(o){return r=e(o),Math.abs(r-o)<=a?r:o}:function(o){for(var l=parseFloat(r?o.x:o),c=parseFloat(r?o.y:0),f=Wo,h=0,p=e.length,m,g;p--;)r?(m=e[p].x-l,g=e[p].y-c,m=m*m+g*g):m=Math.abs(e[p]-l),m<f&&(f=m,h=p);return h=!a||f<=a?e[h]:o,r||h===o||yu(o)?h:h+La(o)}:mP(e))},Q6=function(e,t,i,a){return qc(ja(e)?!t:i===!0?!!(i=0):!a,function(){return ja(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(a=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*a)/a})},Qne=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(a){return t.reduce(function(r,o){return o(r)},a)}},Jne=function(e,t){return function(i){return e(parseFloat(i))+(t||La(i))}},$ne=function(e,t,i){return $6(e,t,0,1,i)},J6=function(e,t,i){return qc(i,function(a){return e[~~t(a)]})},eie=function n(e,t,i){var a=t-e;return ja(e)?J6(e,n(0,e.length),t):qc(i,function(r){return(a+(r-e)%a)%a+e})},tie=function n(e,t,i){var a=t-e,r=a*2;return ja(e)?J6(e,n(0,e.length-1),t):qc(i,function(o){return o=(r+(o-e)%r)%r||0,e+(o>a?r-o:o)})},Km=function(e){return e.replace(kne,function(t){var i=t.indexOf("[")+1,a=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(One);return Q6(i?a:+a[0],i?0:+a[1],+a[2]||1e-5)})},$6=function(e,t,i,a,r){var o=t-e,l=a-i;return qc(r,function(c){return i+((c-e)/o*l||0)})},nie=function n(e,t,i,a){var r=isNaN(e+t)?0:function(g){return(1-g)*e+g*t};if(!r){var o=Ki(e),l={},c,f,h,p,m;if(i===!0&&(a=1)&&(i=null),o)e={p:e},t={p:t};else if(ja(e)&&!ja(t)){for(h=[],p=e.length,m=p-2,f=1;f<p;f++)h.push(n(e[f-1],e[f]));p--,r=function(b){b*=p;var x=Math.min(m,~~b);return h[x](b-x)},i=t}else a||(e=Xm(ja(e)?[]:{},e));if(!h){for(c in t)LP.call(l,e,c,"get",t[c]);r=function(b){return kP(b,l)||(o?e.p:e)}}}return qc(i,r)},R6=function(e,t,i){var a=e.labels,r=Wo,o,l,c;for(o in a)l=a[o]-t,l<0==!!i&&l&&r>(l=Math.abs(l))&&(c=o,r=l);return c},po=function(e,t,i){var a=e.vars,r=a[t],o=jn,l=e._ctx,c,f,h;if(r)return c=a[t+"Params"],f=a.callbackScope||e,i&&Vc.length&&zM(),l&&(jn=l),h=c?r.apply(f,c):r.call(f),jn=o,h},Fb=function(e){return Wc(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Aa),e.progress()<1&&po(e,"onInterrupt"),e},qm,eV=[],tV=function(e){if(e)if(e=!e.name&&e.default||e,yP()||e.headless){var t=e.name,i=mi(e),a=t&&!i&&e.init?function(){this._props=[]}:e,r={init:Yb,render:kP,add:LP,kill:bie,modifier:yie,rawVars:0},o={targetTest:0,get:0,getSetter:jM,aliases:{},register:0};if(Zm(),e!==a){if(Rr[t])return;go(a,go(UM(e,r),o)),Xm(a.prototype,Xm(r,UM(e,o))),Rr[a.prop=t]=a,e.targetTest&&(kM.push(a),SP[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}U6(t,a),e.register&&e.register(Za,a,cr)}else eV.push(e)},Rn=255,Hb={aqua:[0,Rn,Rn],lime:[0,Rn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Rn],navy:[0,0,128],white:[Rn,Rn,Rn],olive:[128,128,0],yellow:[Rn,Rn,0],orange:[Rn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Rn,0,0],pink:[Rn,192,203],cyan:[0,Rn,Rn],transparent:[Rn,Rn,Rn,0]},aP=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*Rn+.5|0},nV=function(e,t,i){var a=e?yu(e)?[e>>16,e>>8&Rn,e&Rn]:0:Hb.black,r,o,l,c,f,h,p,m,g,b;if(!a){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Hb[e])a=Hb[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),o=e.charAt(2),l=e.charAt(3),e="#"+r+r+o+o+l+l+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return a=parseInt(e.substr(1,6),16),[a>>16,a>>8&Rn,a&Rn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),a=[e>>16,e>>8&Rn,e&Rn]}else if(e.substr(0,3)==="hsl"){if(a=b=e.match(T6),!t)c=+a[0]%360/360,f=+a[1]/100,h=+a[2]/100,o=h<=.5?h*(f+1):h+f-h*f,r=h*2-o,a.length>3&&(a[3]*=1),a[0]=aP(c+1/3,r,o),a[1]=aP(c,r,o),a[2]=aP(c-1/3,r,o);else if(~e.indexOf("="))return a=e.match(bP),i&&a.length<4&&(a[3]=1),a}else a=e.match(T6)||Hb.transparent;a=a.map(Number)}return t&&!b&&(r=a[0]/Rn,o=a[1]/Rn,l=a[2]/Rn,p=Math.max(r,o,l),m=Math.min(r,o,l),h=(p+m)/2,p===m?c=f=0:(g=p-m,f=h>.5?g/(2-p-m):g/(p+m),c=p===r?(o-l)/g+(o<l?6:0):p===o?(l-r)/g+2:(r-o)/g+4,c*=60),a[0]=~~(c+.5),a[1]=~~(f*100+.5),a[2]=~~(h*100+.5)),i&&a.length<4&&(a[3]=1),a},iV=function(e){var t=[],i=[],a=-1;return e.split(vu).forEach(function(r){var o=r.match(Id)||[];t.push.apply(t,o),i.push(a+=o.length+1)}),t.c=i,t},I6=function(e,t,i){var a="",r=(e+a).match(vu),o=t?"hsla(":"rgba(",l=0,c,f,h,p;if(!r)return e;if(r=r.map(function(m){return(m=nV(m,t,1))&&o+(t?m[0]+","+m[1]+"%,"+m[2]+"%,"+m[3]:m.join(","))+")"}),i&&(h=iV(e),c=i.c,c.join(a)!==h.c.join(a)))for(f=e.replace(vu,"1").split(Id),p=f.length-1;l<p;l++)a+=f[l]+(~c.indexOf(l)?r.shift()||o+"0,0,0,0)":(h.length?h:r.length?r:i).shift());if(!f)for(f=e.split(vu),p=f.length-1;l<p;l++)a+=f[l]+r[l];return a+f[p]},vu=(function(){var n="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Hb)n+="|"+e+"\\b";return new RegExp(n+")","gi")})(),iie=/hsl[a]?\(/,EP=function(e){var t=e.join(" "),i;if(vu.lastIndex=0,vu.test(t))return i=iie.test(t),e[1]=I6(e[1],i),e[0]=I6(e[0],i,iV(e[1])),!0},jb,Ir=(function(){var n=Date.now,e=500,t=33,i=n(),a=i,r=1e3/240,o=r,l=[],c,f,h,p,m,g,b=function x(_){var v=n()-a,S=_===!0,M,T,E,L;if((v>e||v<0)&&(i+=v-t),a+=v,E=a-i,M=E-o,(M>0||S)&&(L=++p.frame,m=E-p.time*1e3,p.time=E=E/1e3,o+=M+(M>=r?0:r-M),T=1),S||(c=f(x)),T)for(g=0;g<l.length;g++)l[g](E,m,L,_)};return p={time:0,frame:0,tick:function(){b(!0)},deltaRatio:function(_){return m/(1e3/(_||60))},wake:function(){N6&&(!cP&&yP()&&(cl=cP=window,_P=cl.document||{},mo.gsap=Za,(cl.gsapVersions||(cl.gsapVersions=[])).push(Za.version),z6(NM||cl.GreenSockGlobals||!cl.gsap&&cl||{}),eV.forEach(tV)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),f=h||function(_){return setTimeout(_,o-p.time*1e3+1|0)},jb=1,b(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(c),jb=0,f=Yb},lagSmoothing:function(_,v){e=_||1/0,t=Math.min(v||33,e)},fps:function(_){r=1e3/(_||240),o=p.time*1e3+r},add:function(_,v,S){var M=v?function(T,E,L,P){_(T,E,L,P),p.remove(M)}:_;return p.remove(_),l[S?"unshift":"push"](M),Zm(),M},remove:function(_,v){~(v=l.indexOf(_))&&l.splice(v,1)&&g>=v&&g--},_listeners:l},p})(),Zm=function(){return!jb&&Ir.wake()},Kt={},aie=/^[\d.\-M][\d.\-,\s]/,rie=/["']/g,oie=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),a=i[0],r=1,o=i.length,l,c,f;r<o;r++)c=i[r],l=r!==o-1?c.lastIndexOf(","):c.length,f=c.substr(0,l),t[a]=isNaN(f)?f.replace(rie,"").trim():+f,a=c.substr(l+1).trim();return t},sie=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),a=e.indexOf("(",t);return e.substring(t,~a&&a<i?e.indexOf(")",i+1):i)},lie=function(e){var t=(e+"").split("("),i=Kt[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[oie(t[1])]:sie(e).split(",").map(H6)):Kt._CE&&aie.test(e)?Kt._CE("",e):i},uie=function(e){return function(t){return 1-e(1-t)}},Ld=function(e,t){return e&&(mi(e)?e:Kt[e]||lie(e))||t},Dd=function(e,t,i,a){i===void 0&&(i=function(c){return 1-t(1-c)}),a===void 0&&(a=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var r={easeIn:t,easeOut:i,easeInOut:a},o;return ur(e,function(l){Kt[l]=mo[l]=r,Kt[o=l.toLowerCase()]=i;for(var c in r)Kt[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=Kt[l+"."+c]=r[c]}),r},aV=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},rP=function n(e,t,i){var a=t>=1?t:1,r=(i||(e?.3:.45))/(t<1?t:1),o=r/uP*(Math.asin(1/a)||0),l=function(h){return h===1?1:a*Math.pow(2,-10*h)*Dne((h-o)*r)+1},c=e==="out"?l:e==="in"?function(f){return 1-l(1-f)}:aV(l);return r=uP/r,c.config=function(f,h){return n(e,f,h)},c},oP=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},a=e==="out"?i:e==="in"?function(r){return 1-i(1-r)}:aV(i);return a.config=function(r){return n(e,r)},a};ur("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Dd(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});Kt.Linear.easeNone=Kt.none=Kt.Linear.easeIn;Dd("Elastic",rP("in"),rP("out"),rP());(function(n,e){var t=1/e,i=2*t,a=2.5*t,r=function(l){return l<t?n*l*l:l<i?n*Math.pow(l-1.5/e,2)+.75:l<a?n*(l-=2.25/e)*l+.9375:n*Math.pow(l-2.625/e,2)+.984375};Dd("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75);Dd("Expo",function(n){return Math.pow(2,10*(n-1))*n+n*n*n*n*n*n*(1-n)});Dd("Circ",function(n){return-(k6(1-n*n)-1)});Dd("Sine",function(n){return n===1?1:-Pne(n*Rne)+1});Dd("Back",oP("in"),oP("out"),oP());Kt.SteppedEase=Kt.steps=mo.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,a=e+(t?0:1),r=t?1:0,o=1-Mn;return function(l){return((a*Qb(0,o,l)|0)+r)*i}}};qb.ease=Kt["quad.out"];ur("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(n){return wP+=n+","+n+"Params,"});var AP=function(e,t){this.id=Ine++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:TP,this.set=t?t.getSetter:jM},Zb=(function(){function n(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,jm(this,+t.duration,1,1),this.data=t.data,jn&&(this._ctx=jn,jn.data.push(this)),jb||Ir.wake()}var e=n.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,jm(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,a){if(Zm(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(YM(this,i),!r._dp||r.parent||W6(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&fl(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!a||this._initted&&Math.abs(this._zTime)===Mn||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),F6(this,i,a)),this},e.time=function(i,a){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+A6(this))%(this._dur+this._rDelay)||(i?this._dur:0),a):this._time},e.totalProgress=function(i,a){return arguments.length?this.totalTime(this.totalDuration()*i,a):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,a){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+A6(this),a):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,a){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,a):this._repeat?Ym(this._tTime,r)+1:1},e.timeScale=function(i,a){if(!arguments.length)return this._rts===-Mn?0:this._rts;if(this._rts===i)return this;var r=this.parent&&this._ts?BM(this.parent._time,this):this._tTime,o=this._rts<0;this._rts=+i||0,this._ts=this._ps||i===-Mn?0:this._rts;var l=this.totalDuration();return(o!==this._rts<0||r>0&&r<l)&&this.totalTime(Qb(-Math.abs(this._delay),l,r),a!==!1),XM(this),Gne(this)},e.paused=function(i){if(!arguments.length)return this._ps;if(this._ps!==i)if(this._ps=i,i)this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0;else{Zm(),this._ts=this._rts;var a=this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,r=this.progress()===1&&Math.abs(this._zTime)!==Mn,o;if(r)for(this._tTime-=Mn,o=this._first;o;){if(!o._dur&&o._zTime<0&&o._ts&&o._start<=a+Mn){r=!1;break}o=o._next}this.totalTime(a,r)}return this},e.startTime=function(i){if(arguments.length){this._start=ii(i);var a=this.parent||this._dp;return a&&(a._sort||!this.parent)&&fl(a,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(Pr(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var a=this.parent||this._dp;return a?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?BM(a.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=Bne);var a=Aa;return Aa=i,CP(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Aa=a,this},e.globalTime=function(i){for(var a=this,r=arguments.length?i:a.rawTime();a;)r=a._start+r/(Math.abs(a._ts)||1),a=a._dp;return!this.parent&&this._sat?this._sat.globalTime(i):r},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,L6(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var a=this._time;return this._rDelay=i,L6(this),a?this.time(a):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,a){return this.totalTime(Go(this,i),Pr(a))},e.restart=function(i,a){return this.play().totalTime(i?-this._delay:0,Pr(a)),this._dur||(this._zTime=-Mn),this},e.play=function(i,a){return i!=null&&this.seek(i,a),this.reversed(!1).paused(!1)},e.reverse=function(i,a){return i!=null&&this.seek(i||this.totalDuration(),a),this.reversed(!0).paused(!1)},e.pause=function(i,a){return i!=null&&this.seek(i,a),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-Mn:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Mn,this},e.isActive=function(){var i=this.parent||this._dp,a=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=a&&r<this.endTime(!0)-Mn)},e.eventCallback=function(i,a,r){var o=this.vars;return arguments.length>1?(a?(o[i]=a,r&&(o[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=a)):delete o[i],this):o[i]},e.then=function(i){var a=this,r=a._prom;return new Promise(function(o){var l=mi(i)?i:V6,c=function(){var h=a.then;a.then=null,r&&r(),mi(l)&&(l=l(a))&&(l.then||l===a)&&(a.then=h),o(l),a.then=h};a._initted&&a.totalProgress()===1&&a._ts>=0||!a._tTime&&a._ts<0?c():a._prom=c})},e.kill=function(){Fb(this)},n})();go(Zb.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Mn,_prom:0,_ps:!1,_rts:1});var Ya=(function(n){D6(e,n);function e(i,a){var r;return i===void 0&&(i={}),r=n.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=Pr(i.sortChildren),ai&&fl(i.parent||ai,gu(r),a),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&q6(gu(r),i.scrollTrigger),r}var t=e.prototype;return t.to=function(a,r,o){return Gb(0,arguments,this),this},t.from=function(a,r,o){return Gb(1,arguments,this),this},t.fromTo=function(a,r,o,l){return Gb(2,arguments,this),this},t.set=function(a,r,o){return r.duration=0,r.parent=this,Vb(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new wi(a,r,Go(this,o),1),this},t.call=function(a,r,o){return fl(this,wi.delayedCall(0,a,r),o)},t.staggerTo=function(a,r,o,l,c,f,h){return o.duration=r,o.stagger=o.stagger||l,o.onComplete=f,o.onCompleteParams=h,o.parent=this,new wi(a,o,Go(this,c)),this},t.staggerFrom=function(a,r,o,l,c,f,h){return o.runBackwards=1,Vb(o).immediateRender=Pr(o.immediateRender),this.staggerTo(a,r,o,l,c,f,h)},t.staggerFromTo=function(a,r,o,l,c,f,h,p){return l.startAt=o,Vb(l).immediateRender=Pr(l.immediateRender),this.staggerTo(a,r,l,c,f,h,p)},t.render=function(a,r,o){var l=this._time,c=this._dirty?this.totalDuration():this._tDur,f=this._dur,h=a<=0?0:ii(a),p=this._zTime<0!=a<0&&(this._initted||!f),m,g,b,x,_,v,S,M,T,E,L,P;if(this!==ai&&h>c&&a>=0&&(h=c),h!==this._tTime||o||p){if(l!==this._time&&f&&(h+=this._time-l,a+=this._time-l),m=h,T=this._start,M=this._ts,v=!M,p&&(f||(l=this._zTime),(a||!r)&&(this._zTime=a)),this._repeat){if(L=this._yoyo,_=f+this._rDelay,this._repeat<-1&&a<0)return this.totalTime(_*100+a,r,o);if(m=ii(h%_),h===c?(x=this._repeat,m=f):(E=ii(h/_),x=~~E,x&&x===E&&(m=f,x--),m>f&&(m=f)),E=Ym(this._tTime,_),!l&&this._tTime&&E!==x&&this._tTime-E*_-this._dur<=0&&(E=x),L&&x&1&&(m=f-m,P=1),x!==E&&!this._lock){var I=L&&E&1,R=I===(L&&x&1);if(x<E&&(I=!I),l=I?0:h%f?f:h,this._lock=1,this.render(l||(P?0:ii(x*_)),r,!f)._lock=0,this._tTime=h,!r&&this.parent&&po(this,"onRepeat"),this.vars.repeatRefresh&&!P&&(this.invalidate()._lock=1,E=x),l&&l!==this._time||v!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(f=this._dur,c=this._tDur,R&&(this._lock=2,l=I?f:-1e-4,this.render(l,!0),this.vars.repeatRefresh&&!P&&this.invalidate()),this._lock=0,!this._ts&&!v)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=Yne(this,ii(l),ii(m)),S&&(h-=m-(m=S._start))),this._tTime=h,this._time=m,this._act=!!M,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=a,l=0),!l&&h&&f&&!r&&!E&&(po(this,"onStart"),this._tTime!==h))return this;if(m>=l&&a>=0)for(g=this._first;g;){if(b=g._next,(g._act||m>=g._start)&&g._ts&&S!==g){if(g.parent!==this)return this.render(a,r,o);if(g.render(g._ts>0?(m-g._start)*g._ts:(g._dirty?g.totalDuration():g._tDur)+(m-g._start)*g._ts,r,o),m!==this._time||!this._ts&&!v){S=0,b&&(h+=this._zTime=-Mn);break}}g=b}else{g=this._last;for(var A=a<0?a:m;g;){if(b=g._prev,(g._act||A<=g._end)&&g._ts&&S!==g){if(g.parent!==this)return this.render(a,r,o);if(g.render(g._ts>0?(A-g._start)*g._ts:(g._dirty?g.totalDuration():g._tDur)+(A-g._start)*g._ts,r,o||Aa&&CP(g)),m!==this._time||!this._ts&&!v){S=0,b&&(h+=this._zTime=A?-Mn:Mn);break}}g=b}}if(S&&!r&&(this.pause(),S.render(m>=l?0:-Mn)._zTime=m>=l?1:-1,this._ts))return this._start=T,XM(this),this.render(a,r,o);this._onUpdate&&!r&&po(this,"onUpdate",!0),(h===c&&this._tTime>=this.totalDuration()||!h&&l)&&(T===this._start||Math.abs(M)!==Math.abs(this._ts))&&(this._lock||((a||!f)&&(h===c&&this._ts>0||!h&&this._ts<0)&&Wc(this,1),!r&&!(a<0&&!l)&&(h||l||!c)&&(po(this,h===c&&a>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<c&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(a,r){var o=this;if(yu(r)||(r=Go(this,r,a)),!(a instanceof Zb)){if(ja(a))return a.forEach(function(l){return o.add(l,r)}),this;if(Ki(a))return this.addLabel(a,r);if(mi(a))a=wi.delayedCall(0,a);else return this}return this!==a?fl(this,a,r):this},t.getChildren=function(a,r,o,l){a===void 0&&(a=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),l===void 0&&(l=-Wo);for(var c=[],f=this._first;f;)f._start>=l&&(f instanceof wi?r&&c.push(f):(o&&c.push(f),a&&c.push.apply(c,f.getChildren(!0,r,o)))),f=f._next;return c},t.getById=function(a){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===a)return r[o]},t.remove=function(a){return Ki(a)?this.removeLabel(a):mi(a)?this.killTweensOf(a):(a.parent===this&&qM(this,a),a===this._recent&&(this._recent=this._last),Ad(this))},t.totalTime=function(a,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ii(Ir.time-(this._ts>0?a/this._ts:(this.totalDuration()-a)/-this._ts))),n.prototype.totalTime.call(this,a,r),this._forcing=0,this):this._tTime},t.addLabel=function(a,r){return this.labels[a]=Go(this,r),this},t.removeLabel=function(a){return delete this.labels[a],this},t.addPause=function(a,r,o){var l=wi.delayedCall(0,r||Yb,o);return l.data="isPause",this._hasPause=1,fl(this,l,Go(this,a))},t.removePause=function(a){var r=this._first;for(a=Go(this,a);r;)r._start===a&&r.data==="isPause"&&Wc(r),r=r._next},t.killTweensOf=function(a,r,o){for(var l=this.getTweensOf(a,o),c=l.length;c--;)Hc!==l[c]&&l[c].kill(a,r);return this},t.getTweensOf=function(a,r){for(var o=[],l=qo(a),c=this._first,f=yu(r),h;c;)c instanceof wi?Fne(c._targets,l)&&(f?(!Hc||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&o.push(c):(h=c.getTweensOf(l,r)).length&&o.push.apply(o,h),c=c._next;return o},t.tweenTo=function(a,r){r=r||{};var o=this,l=Go(o,a),c=r,f=c.startAt,h=c.onStart,p=c.onStartParams,m=c.immediateRender,g,b=wi.to(o,go({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:l,overwrite:"auto",duration:r.duration||Math.abs((l-(f&&"time"in f?f.time:o._time))/o.timeScale())||Mn,onStart:function(){if(o.pause(),!g){var _=r.duration||Math.abs((l-(f&&"time"in f?f.time:o._time))/o.timeScale());b._dur!==_&&jm(b,_,0,1).render(b._time,!0,!0),g=1}h&&h.apply(b,p||[])}},r));return m?b.render(0):b},t.tweenFromTo=function(a,r,o){return this.tweenTo(r,go({startAt:{time:Go(this,a)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(a){return a===void 0&&(a=this._time),R6(this,Go(this,a))},t.previousLabel=function(a){return a===void 0&&(a=this._time),R6(this,Go(this,a),1)},t.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.previousLabel(this._time+Mn)},t.shiftChildren=function(a,r,o){o===void 0&&(o=0);var l=this._first,c=this.labels,f;for(a=ii(a);l;)l._start>=o&&(l._start+=a,l._end+=a),l=l._next;if(r)for(f in c)c[f]>=o&&(c[f]+=a);return Ad(this)},t.invalidate=function(a){var r=this._first;for(this._lock=0;r;)r.invalidate(a),r=r._next;return n.prototype.invalidate.call(this,a)},t.clear=function(a){a===void 0&&(a=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),a&&(this.labels={}),Ad(this)},t.totalDuration=function(a){var r=0,o=this,l=o._last,c=Wo,f,h,p;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-a:a));if(o._dirty){for(p=o.parent;l;)f=l._prev,l._dirty&&l.totalDuration(),h=l._start,h>c&&o._sort&&l._ts&&!o._lock?(o._lock=1,fl(o,l,h-l._delay,1)._lock=0):c=h,h<0&&l._ts&&(r-=h,(!p&&!o._dp||p&&p.smoothChildTiming)&&(o._start+=ii(h/o._ts),o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),c=0),l._end>r&&l._ts&&(r=l._end),l=f;jm(o,o===ai&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(a){if(ai._ts&&(F6(ai,BM(a,ai)),B6=Ir.frame),Ir.frame>=C6){C6+=Dr.autoSleep||120;var r=ai._first;if((!r||!r._ts)&&Dr.autoSleep&&Ir._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||Ir.sleep()}}},e})(Zb);go(Ya.prototype,{_lock:0,_hasPause:0,_forcing:0});var cie=function(e,t,i,a,r,o,l){var c=new cr(this._pt,e,t,0,1,DP,null,r),f=0,h=0,p,m,g,b,x,_,v,S;for(c.b=i,c.e=a,i+="",a+="",(v=~a.indexOf("random("))&&(a=Km(a)),o&&(S=[i,a],o(S,e,t),i=S[0],a=S[1]),m=i.match(nP)||[];p=nP.exec(a);)b=p[0],x=a.substring(f,p.index),g?g=(g+1)%5:x.substr(-5)==="rgba("&&(g=1),b!==m[h++]&&(_=parseFloat(m[h-1])||0,c._pt={_next:c._pt,p:x||h===1?x:",",s:_,c:b.charAt(1)==="="?Pd(_,b)-_:parseFloat(b)-_,m:g&&g<4?Math.round:0},f=nP.lastIndex);return c.c=f<a.length?a.substring(f,a.length):"",c.fp=l,(xP.test(a)||v)&&(c.e=0),this._pt=c,c},LP=function(e,t,i,a,r,o,l,c,f,h){mi(a)&&(a=a(r||0,e,o));var p=e[t],m=i!=="get"?i:mi(p)?f?e[t.indexOf("set")||!mi(e["get"+t.substr(3)])?t:"get"+t.substr(3)](f):e[t]():p,g=mi(p)?f?mie:oV:PP,b;if(Ki(a)&&(~a.indexOf("random(")&&(a=Km(a)),a.charAt(1)==="="&&(b=Pd(m,a)+(La(m)||0),(b||b===0)&&(a=b))),!h||m!==a||gP)return!isNaN(m*a)&&a!==""?(b=new cr(this._pt,e,t,+m||0,a-(m||0),typeof p=="boolean"?vie:sV,0,g),f&&(b.fp=f),l&&b.modifier(l,this,e),this._pt=b):(!p&&!(t in e)&&WM(t,a),cie.call(this,e,t,m,a,g,c||Dr.stringFilter,f))},fie=function(e,t,i,a,r){if(mi(e)&&(e=Wb(e,r,t,i,a)),!dl(e)||e.style&&e.nodeType||ja(e)||O6(e))return Ki(e)?Wb(e,r,t,i,a):e;var o={},l;for(l in e)o[l]=Wb(e[l],r,t,i,a);return o},RP=function(e,t,i,a,r,o){var l,c,f,h;if(Rr[e]&&(l=new Rr[e]).init(r,l.rawVars?t[e]:fie(t[e],a,r,o,i),i,a,o)!==!1&&(i._pt=c=new cr(i._pt,r,e,0,1,l.render,l,0,l.priority),i!==qm))for(f=i._ptLookup[i._targets.indexOf(r)],h=l._props.length;h--;)f[l._props[h]]=c;return l},Hc,gP,IP=function n(e,t,i){var a=e.vars,r=a.ease,o=a.startAt,l=a.immediateRender,c=a.lazy,f=a.onUpdate,h=a.runBackwards,p=a.yoyoEase,m=a.keyframes,g=a.autoRevert,b=e._dur,x=e._startAt,_=e._targets,v=e.parent,S=v&&v.data==="nested"?v.vars.targets:_,M=e._overwrite==="auto"&&!vP,T=e.timeline,E=a.easeReverse||p,L,P,I,R,A,D,N,H,X,W,Y,V,G;if(T&&(!m||!r)&&(r="none"),e._ease=Ld(r,qb.ease),e._rEase=E&&(Ld(E)||e._ease),e._from=!T&&!!a.runBackwards,e._from&&(e.ratio=1),!T||m&&!a.stagger){if(H=_[0]?Gc(_[0]).harness:0,V=H&&a[H.prop],L=UM(a,SP),x&&(x._zTime<0&&x.progress(1),t<0&&h&&l&&!g?x.render(-1,!0):x.revert(h&&b?DM:Une),x._lazy=0),o){if(Wc(e._startAt=wi.set(_,go({data:"isStart",overwrite:!1,parent:v,immediateRender:!0,lazy:!x&&Pr(c),startAt:null,delay:0,onUpdate:f&&function(){return po(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Aa||!l&&!g)&&e._startAt.revert(DM),l&&b&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(h&&b&&!x){if(t&&(l=!1),I=go({overwrite:!1,data:"isFromStart",lazy:l&&!x&&Pr(c),immediateRender:l,stagger:0,parent:v},L),V&&(I[H.prop]=V),Wc(e._startAt=wi.set(_,I)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Aa?e._startAt.revert(DM):e._startAt.render(-1,!0)),e._zTime=t,!l)n(e._startAt,Mn,Mn);else if(!t)return}for(e._pt=e._ptCache=0,c=b&&Pr(c)||c&&!b,P=0;P<_.length;P++){if(A=_[P],N=A._gsap||MP(_)[P]._gsap,e._ptLookup[P]=W={},fP[N.id]&&Vc.length&&zM(),Y=S===_?P:S.indexOf(A),H&&(X=new H).init(A,V||L,e,Y,S)!==!1&&(e._pt=R=new cr(e._pt,A,X.name,0,1,X.render,X,0,X.priority),X._props.forEach(function($){W[$]=R}),X.priority&&(D=1)),!H||V)for(I in L)Rr[I]&&(X=RP(I,L,e,Y,A,S))?X.priority&&(D=1):W[I]=R=LP.call(e,A,I,"get",L[I],Y,S,0,a.stringFilter);e._op&&e._op[P]&&e.kill(A,e._op[P]),M&&e._pt&&(Hc=e,ai.killTweensOf(A,W,e.globalTime(t)),G=!e.parent,Hc=0),e._pt&&c&&(fP[N.id]=1)}D&&OP(e),e._onInit&&e._onInit(e)}e._onUpdate=f,e._initted=(!e._op||e._pt)&&!G,m&&t<=0&&T.render(Wo,!0,!0)},die=function(e,t,i,a,r,o,l,c){var f=(e._pt&&e._ptCache||(e._ptCache={}))[t],h,p,m,g;if(!f)for(f=e._ptCache[t]=[],m=e._ptLookup,g=e._targets.length;g--;){if(h=m[g][t],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==t&&h.fp!==t;)h=h._next;if(!h)return gP=1,e.vars[t]="+=0",IP(e,l),gP=0,c?Xb(t+" not eligible for reset. Try splitting into individual properties"):1;f.push(h)}for(g=f.length;g--;)p=f[g],h=p._pt||p,h.s=(a||a===0)&&!r?a:h.s+(a||0)+o*h.c,h.c=i-h.s,p.e&&(p.e=gi(i)+La(p.e)),p.b&&(p.b=h.s+La(p.b))},hie=function(e,t){var i=e[0]?Gc(e[0]).harness:0,a=i&&i.aliases,r,o,l,c;if(!a)return t;r=Xm({},t);for(o in a)if(o in r)for(c=a[o].split(","),l=c.length;l--;)r[c[l]]=r[o];return r},pie=function(e,t,i,a){var r=t.ease||a||"power1.inOut",o,l;if(ja(t))l=i[e]||(i[e]=[]),t.forEach(function(c,f){return l.push({t:f/(t.length-1)*100,v:c,e:r})});else for(o in t)l=i[o]||(i[o]=[]),o==="ease"||l.push({t:parseFloat(e),v:t[o],e:r})},Wb=function(e,t,i,a,r){return mi(e)?e.call(t,i,a,r):Ki(e)&&~e.indexOf("random(")?Km(e):e},HM=wP+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",rV={};ur(HM+",id,stagger,delay,duration,paused,scrollTrigger",function(n){return rV[n]=1});HM=HM.split(",");var wi=(function(n){D6(e,n);function e(i,a,r,o){var l;typeof a=="number"&&(r.duration=a,a=r,r=null),l=n.call(this,o?a:Vb(a))||this;var c=l.vars,f=c.duration,h=c.delay,p=c.immediateRender,m=c.stagger,g=c.overwrite,b=c.keyframes,x=c.defaults,_=c.scrollTrigger,v=a.parent||ai,S=(ja(i)||O6(i)?yu(i[0]):"length"in a)?[i]:qo(i),M,T,E,L,P,I,R,A;if(l._targets=S.length?MP(S):Xb("GSAP target "+i+" not found. https://gsap.com",!Dr.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=g,b||m||PM(f)||PM(h)){a=l.vars;var D=a.easeReverse||a.yoyoEase;if(M=l.timeline=new Ya({data:"nested",defaults:x||{},targets:v&&v.data==="nested"?v.vars.targets:S}),M.kill(),M.parent=M._dp=gu(l),M._start=0,m||PM(f)||PM(h)){if(L=S.length,R=m&&Z6(m),dl(m))for(P in m)~HM.indexOf(P)&&(A||(A={}),A[P]=m[P]);for(T=0;T<L;T++)E=UM(a,rV),E.stagger=0,D&&(E.easeReverse=D),A&&Xm(E,A),I=S[T],E.duration=+Wb(f,gu(l),T,I,S),E.delay=(+Wb(h,gu(l),T,I,S)||0)-l._delay,!m&&L===1&&E.delay&&(l._delay=h=E.delay,l._start+=h,E.delay=0),M.to(I,E,R?R(T,I,S):0),M._ease=Kt.none;M.duration()?f=h=0:l.timeline=0}else if(b){Vb(go(M.vars.defaults,{ease:"none"})),M._ease=Ld(b.ease||a.ease||"none");var N=0,H,X,W;if(ja(b))b.forEach(function(Y){return M.to(S,Y,">")}),M.duration();else{E={};for(P in b)P==="ease"||P==="easeEach"||pie(P,b[P],E,b.easeEach);for(P in E)for(H=E[P].sort(function(Y,V){return Y.t-V.t}),N=0,T=0;T<H.length;T++)X=H[T],W={ease:X.e,duration:(X.t-(T?H[T-1].t:0))/100*f},W[P]=X.v,M.to(S,W,N),N+=W.duration;M.duration()<f&&M.to({},{duration:f-M.duration()})}}f||l.duration(f=M.duration())}else l.timeline=0;return g===!0&&!vP&&(Hc=gu(l),ai.killTweensOf(S),Hc=0),fl(v,gu(l),r),a.reversed&&l.reverse(),a.paused&&l.paused(!0),(p||!f&&!b&&l._start===ii(v._time)&&Pr(p)&&Wne(gu(l))&&v.data!=="nested")&&(l._tTime=-Mn,l.render(Math.max(0,-h)||0)),_&&q6(gu(l),_),l}var t=e.prototype;return t.render=function(a,r,o){var l=this._time,c=this._tDur,f=this._dur,h=a<0,p=a>c-Mn&&!h?c:a<Mn?0:a,m,g,b,x,_,v,S,M;if(!f)Xne(this,a,r,o);else if(p!==this._tTime||!a||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(m=p,M=this.timeline,this._repeat){if(x=f+this._rDelay,this._repeat<-1&&h)return this.totalTime(x*100+a,r,o);if(m=ii(p%x),p===c?(b=this._repeat,m=f):(_=ii(p/x),b=~~_,b&&b===_?(m=f,b--):m>f&&(m=f)),v=this._yoyo&&b&1,v&&(m=f-m),_=Ym(this._tTime,x),m===l&&!o&&this._initted&&b===_)return this._tTime=p,this;b!==_&&this.vars.repeatRefresh&&!v&&!this._lock&&m!==x&&this._initted&&(this._lock=o=1,this.render(ii(x*b),!0).invalidate()._lock=0)}if(!this._initted){if(X6(this,h?a:m,o,r,p))return this._tTime=0,this;if(l!==this._time&&!(o&&this.vars.repeatRefresh&&b!==_))return this;if(f!==this._dur)return this.render(a,r,o)}if(this._rEase){var T=m<l;if(T!==this._inv){var E=T?l:f-l;this._inv=T,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=l,this._invRecip=E?(T?-1:1)/E:0,this._invScale=T?-this.ratio:1-this.ratio,this._invEase=T?this._rEase:this._ease}this.ratio=S=this._invRatio+this._invScale*this._invEase((m-this._invTime)*this._invRecip)}else this.ratio=S=this._ease(m/f);if(this._from&&(this.ratio=S=1-S),this._tTime=p,this._time=m,!this._act&&this._ts&&(this._act=1,this._lazy=0),!l&&p&&!r&&!_&&(po(this,"onStart"),this._tTime!==p))return this;for(g=this._pt;g;)g.r(S,g.d),g=g._next;M&&M.render(a<0?a:M._dur*M._ease(m/this._dur),r,o)||this._startAt&&(this._zTime=a),this._onUpdate&&!r&&(h&&dP(this,a,r,o),po(this,"onUpdate")),this._repeat&&b!==_&&this.vars.onRepeat&&!r&&this.parent&&po(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(h&&!this._onUpdate&&dP(this,a,!0,!0),(a||!f)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&Wc(this,1),!r&&!(h&&!l)&&(p||l||v)&&(po(this,p===c?"onComplete":"onReverseComplete",!0),this._prom&&!(p<c&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(a){return(!a||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(a),n.prototype.invalidate.call(this,a)},t.resetTo=function(a,r,o,l,c){jb||Ir.wake(),this._ts||this.play();var f=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||IP(this,f),h=this._ease(f/this._dur),die(this,a,r,o,l,h,f,c)?this.resetTo(a,r,o,l,1):(YM(this,0),this.parent||G6(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(a,r){if(r===void 0&&(r="all"),!a&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?Fb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Aa),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(a,r,Hc&&Hc.vars.overwrite!==!0)._first||Fb(this),this.parent&&o!==this.timeline.totalDuration()&&jm(this,this._dur*this.timeline._tDur/o,0,1),this}var l=this._targets,c=a?qo(a):l,f=this._ptLookup,h=this._pt,p,m,g,b,x,_,v;if((!r||r==="all")&&Vne(l,c))return r==="all"&&(this._pt=0),Fb(this);for(p=this._op=this._op||[],r!=="all"&&(Ki(r)&&(x={},ur(r,function(S){return x[S]=1}),r=x),r=hie(l,r)),v=l.length;v--;)if(~c.indexOf(l[v])){m=f[v],r==="all"?(p[v]=r,b=m,g={}):(g=p[v]=p[v]||{},b=r);for(x in b)_=m&&m[x],_&&((!("kill"in _.d)||_.d.kill(x)===!0)&&qM(this,_,"_pt"),delete m[x]),g!=="all"&&(g[x]=1)}return this._initted&&!this._pt&&h&&Fb(this),this},e.to=function(a,r){return new e(a,r,arguments[2])},e.from=function(a,r){return Gb(1,arguments)},e.delayedCall=function(a,r,o,l){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:a,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:l})},e.fromTo=function(a,r,o){return Gb(2,arguments)},e.set=function(a,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(a,r)},e.killTweensOf=function(a,r,o){return ai.killTweensOf(a,r,o)},e})(Zb);go(wi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ur("staggerTo,staggerFrom,staggerFromTo",function(n){wi[n]=function(){var e=new Ya,t=hP.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var PP=function(e,t,i){return e[t]=i},oV=function(e,t,i){return e[t](i)},mie=function(e,t,i,a){return e[t](a.fp,i)},gie=function(e,t,i){return e.setAttribute(t,i)},jM=function(e,t){return mi(e[t])?oV:GM(e[t])&&e.setAttribute?gie:PP},sV=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},vie=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},DP=function(e,t){var i=t._pt,a="";if(!e&&t.b)a=t.b;else if(e===1&&t.e)a=t.e;else{for(;i;)a=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+a,i=i._next;a+=t.c}t.set(t.t,t.p,a,t)},kP=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},yie=function(e,t,i,a){for(var r=this._pt,o;r;)o=r._next,r.p===a&&r.modifier(e,t,i),r=o},bie=function(e){for(var t=this._pt,i,a;t;)a=t._next,t.p===e&&!t.op||t.op===e?qM(this,t,"_pt"):t.dep||(i=1),t=a;return!i},xie=function(e,t,i,a){a.mSet(e,t,a.m.call(a.tween,i,a.mt),a)},OP=function(e){for(var t=e._pt,i,a,r,o;t;){for(i=t._next,a=r;a&&a.pr>t.pr;)a=a._next;(t._prev=a?a._prev:o)?t._prev._next=t:r=t,(t._next=a)?a._prev=t:o=t,t=i}e._pt=r},cr=(function(){function n(t,i,a,r,o,l,c,f,h){this.t=i,this.s=r,this.c=o,this.p=a,this.r=l||sV,this.d=c||this,this.set=f||PP,this.pr=h||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,a,r){this.mSet=this.mSet||this.set,this.set=xie,this.m=i,this.mt=r,this.tween=a},n})();ur(wP+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(n){return SP[n]=1});mo.TweenMax=mo.TweenLite=wi;mo.TimelineLite=mo.TimelineMax=Ya;ai=new Ya({sortChildren:!1,defaults:qb,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Dr.stringFilter=EP;var Rd=[],OM={},_ie=[],P6=0,Sie=0,sP=function(e){return(OM[e]||_ie).map(function(t){return t()})},Kb=function(){var e=Date.now(),t=[];e-P6>2&&(sP("matchMediaInit"),Rd.forEach(function(i){var a=i.queries,r=i.conditions,o,l,c,f;for(l in a)o=cl.matchMedia(a[l]).matches,o&&(c=1),o!==r[l]&&(r[l]=o,f=1);f&&(i.revert(),c&&t.push(i))}),sP("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(a){return i.add(null,a)})}),P6=e,sP("matchMedia"))},lV=(function(){function n(t,i){this.selector=i&&pP(i),this.data=[],this._r=[],this.isReverted=!1,this.id=Sie++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,a,r){mi(i)&&(r=a,a=i,i=mi);var o=this,l=function(){var f=jn,h=o.selector,p;return f&&f!==o&&f.data.push(o),r&&(o.selector=pP(r)),jn=o,p=a.apply(o,arguments),mi(p)&&o._r.push(p),jn=f,o.selector=h,o.isReverted=!1,p};return o.last=l,i===mi?l(o,function(c){return o.add(null,c)}):i?o[i]=l:l},e.ignore=function(i){var a=jn;jn=null,i(this),jn=a},e.getTweens=function(){var i=[];return this.data.forEach(function(a){return a instanceof n?i.push.apply(i,a.getTweens()):a instanceof wi&&!(a.parent&&a.parent.data==="nested")&&i.push(a)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,a){var r=this;if(i?(function(){for(var l=r.getTweens(),c=r.data.length,f;c--;)f=r.data[c],f.data==="isFlip"&&(f.revert(),f.getChildren(!0,!0,!1).forEach(function(h){return l.splice(l.indexOf(h),1)}));for(l.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,p){return p.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),c=r.data.length;c--;)f=r.data[c],f instanceof Ya?f.data!=="nested"&&(f.scrollTrigger&&f.scrollTrigger.revert(),f.kill()):!(f instanceof wi)&&f.revert&&f.revert(i);r._r.forEach(function(h){return h(i,r)}),r.isReverted=!0})():this.data.forEach(function(l){return l.kill&&l.kill()}),this.clear(),a){for(var o=Rd.length;o--;)Rd[o].id===this.id&&Rd.splice(o,1);this._mqs&&this._mqs.forEach(function(l){return l.removeListener?l.removeListener(Kb):l.removeEventListener("change",Kb)}),this._mqs=null}},e.revert=function(i){this.kill(i||{})},n})(),wie=(function(){function n(t){this.contexts=[],this.scope=t,jn&&jn.data.push(this)}var e=n.prototype;return e.add=function(i,a,r){dl(i)||(i={matches:i});var o=new lV(0,r||this.scope),l=o.conditions={},c,f,h;jn&&!o.selector&&(o.selector=jn.selector),this.contexts.push(o),a=o.add("onMatch",a),o.queries=i;for(f in i)f==="all"?h=1:(c=cl.matchMedia(i[f]),c&&(Rd.indexOf(o)<0&&Rd.push(o),(l[f]=c.matches)&&(h=1),c.addListener?c.addListener(Kb):c.addEventListener("change",Kb),(o._mqs||(o._mqs=[])).push(c)));return h&&a(o,function(p){return o.add(null,p)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(a){return a.kill(i,!0)})},n})(),VM={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(a){return tV(a)})},timeline:function(e){return new Ya(e)},getTweensOf:function(e,t){return ai.getTweensOf(e,t)},getProperty:function(e,t,i,a){Ki(e)&&(e=qo(e)[0]);var r=Gc(e||{}).get,o=i?V6:H6;return i==="native"&&(i=""),e&&(t?o((Rr[t]&&Rr[t].get||r)(e,t,i,a)):function(l,c,f){return o((Rr[l]&&Rr[l].get||r)(e,l,c,f))})},quickSetter:function(e,t,i){if(e=qo(e),e.length>1){var a=e.map(function(h){return Za.quickSetter(h,t,i)}),r=a.length;return function(h){for(var p=r;p--;)a[p](h)}}e=e[0]||{};var o=Rr[t],l=Gc(e),c=l.harness&&(l.harness.aliases||{})[t]||t,f=o?function(h){var p=new o;qm._pt=0,p.init(e,i?h+i:h,qm,0,[e]),p.render(1,p),qm._pt&&kP(1,qm)}:l.set(e,c);return o?f:function(h){return f(e,c,i?h+i:h,l,1)}},quickTo:function(e,t,i){var a,r=Za.to(e,go((a={},a[t]="+=0.1",a.paused=!0,a.stagger=0,a),i||{})),o=function(c,f,h){return r.resetTo(t,c,f,h)};return o.tween=r,o},isTweening:function(e){return ai.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Ld(e.ease,qb.ease)),E6(qb,e||{})},config:function(e){return E6(Dr,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,a=e.plugins,r=e.defaults,o=e.extendTimeline;(a||"").split(",").forEach(function(l){return l&&!Rr[l]&&!mo[l]&&Xb(t+" effect requires "+l+" plugin.")}),iP[t]=function(l,c,f){return i(qo(l),go(c||{},r),f)},o&&(Ya.prototype[t]=function(l,c,f){return this.add(iP[t](l,dl(c)?c:(f=c)&&{},this),f)})},registerEase:function(e,t){Kt[e]=Ld(t)},parseEase:function(e,t){return arguments.length?Ld(e,t):Kt},getById:function(e){return ai.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Ya(e),a,r;for(i.smoothChildTiming=Pr(e.smoothChildTiming),ai.remove(i),i._dp=0,i._time=i._tTime=ai._time,a=ai._first;a;)r=a._next,(t||!(!a._dur&&a instanceof wi&&a.vars.onComplete===a._targets[0]))&&fl(i,a,a._start-a._delay),a=r;return fl(ai,i,0),i},context:function(e,t){return e?new lV(e,t):jn},matchMedia:function(e){return new wie(e)},matchMediaRefresh:function(){return Rd.forEach(function(e){var t=e.conditions,i,a;for(a in t)t[a]&&(t[a]=!1,i=1);i&&e.revert()})||Kb()},addEventListener:function(e,t){var i=OM[e]||(OM[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=OM[e],a=i&&i.indexOf(t);a>=0&&i.splice(a,1)},utils:{wrap:eie,wrapYoyo:tie,distribute:Z6,random:Q6,snap:K6,normalize:$ne,getUnit:La,clamp:Zne,splitColor:nV,toArray:qo,selector:pP,mapRange:$6,pipe:Qne,unitize:Jne,interpolate:nie,shuffle:j6},install:z6,effects:iP,ticker:Ir,updateRoot:Ya.updateRoot,plugins:Rr,globalTimeline:ai,core:{PropTween:cr,globals:U6,Tween:wi,Timeline:Ya,Animation:Zb,getCache:Gc,_removeLinkedListItem:qM,reverting:function(){return Aa},context:function(e){return e&&jn&&(jn.data.push(e),e._ctx=jn),jn},suppressOverwrites:function(e){return vP=e}}};ur("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return VM[n]=wi[n]});Ir.add(Ya.updateRoot);qm=VM.to({},{duration:0});var Mie=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Tie=function(e,t){var i=e._targets,a,r,o;for(a in t)for(r=i.length;r--;)o=e._ptLookup[r][a],o&&(o=o.d)&&(o._pt&&(o=Mie(o,a)),o&&o.modifier&&o.modifier(t[a],e,i[r],a))},lP=function(e,t){return{name:e,headless:1,rawVars:1,init:function(a,r,o){o._onInit=function(l){var c,f;if(Ki(r)&&(c={},ur(r,function(h){return c[h]=1}),r=c),t){c={};for(f in r)c[f]=t(r[f]);r=c}Tie(l,r)}}}},Za=VM.registerPlugin({name:"attr",init:function(e,t,i,a,r){var o,l,c;this.tween=i;for(o in t)c=e.getAttribute(o)||"",l=this.add(e,"setAttribute",(c||0)+"",t[o],a,r,0,0,o),l.op=o,l.b=c,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Aa?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},lP("roundProps",mP),lP("modifiers"),lP("snap",K6))||VM;wi.version=Ya.version=Za.version="3.15.1";N6=1;yP()&&Zm();var Cie=Kt.Power0,Eie=Kt.Power1,Aie=Kt.Power2,Lie=Kt.Power3,Rie=Kt.Power4,Iie=Kt.Linear,Pie=Kt.Quad,Die=Kt.Cubic,kie=Kt.Quart,Oie=Kt.Quint,Nie=Kt.Strong,zie=Kt.Elastic,Uie=Kt.Back,Bie=Kt.SteppedEase,Fie=Kt.Bounce,Hie=Kt.Sine,Vie=Kt.Expo,Gie=Kt.Circ;var uV,Xc,Jm,HP,zd,Wie,cV,VP,qie=function(){return typeof window<"u"},xu={},Nd=180/Math.PI,$m=Math.PI/180,Qm=Math.atan2,fV=1e8,GP=/([A-Z])/g,Xie=/(left|right|width|margin|padding|x)/i,Yie=/[\s,\(]\S/,hl={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},zP=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},jie=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Zie=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Kie=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Qie=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},bV=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},xV=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Jie=function(e,t,i){return e.style[t]=i},$ie=function(e,t,i){return e.style.setProperty(t,i)},eae=function(e,t,i){return e._gsap[t]=i},tae=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},nae=function(e,t,i,a,r){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(r,o)},iae=function(e,t,i,a,r){var o=e._gsap;o[t]=i,o.renderTransform(r,o)},ri="transform",kr=ri+"Origin",aae=function n(e,t){var i=this,a=this.target,r=a.style,o=a._gsap;if(e in xu&&r){if(this.tfm=this.tfm||{},e!=="transform")e=hl[e]||e,~e.indexOf(",")?e.split(",").forEach(function(l){return i.tfm[l]=bu(a,l)}):this.tfm[e]=o.x?o[e]:bu(a,e),e===kr&&(this.tfm.zOrigin=o.zOrigin);else return hl.transform.split(",").forEach(function(l){return n.call(i,l,t)});if(this.props.indexOf(ri)>=0)return;o.svg&&(this.svgo=a.getAttribute("data-svg-origin"),this.props.push(kr,t,"")),e=ri}(r||t)&&this.props.push(e,t,r[e])},_V=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},rae=function(){var e=this.props,t=this.target,i=t.style,a=t._gsap,r,o;for(r=0;r<e.length;r+=3)e[r+1]?e[r+1]===2?t[e[r]](e[r+2]):t[e[r]]=e[r+2]:e[r+2]?i[e[r]]=e[r+2]:i.removeProperty(e[r].substr(0,2)==="--"?e[r]:e[r].replace(GP,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)a[o]=this.tfm[o];a.svg&&(a.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),r=VP(),(!r||!r.isStart)&&!i[ri]&&(_V(i),a.zOrigin&&i[kr]&&(i[kr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}},SV=function(e,t){var i={target:e,props:[],revert:rae,save:aae};return e._gsap||Za.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(a){return i.save(a)}),i},wV,UP=function(e,t){var i=Xc.createElementNS?Xc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Xc.createElement(e);return i&&i.style?i:Xc.createElement(e)},vo=function n(e,t,i){var a=getComputedStyle(e);return a[t]||a.getPropertyValue(t.replace(GP,"-$1").toLowerCase())||a.getPropertyValue(t)||!i&&n(e,eg(t)||t,1)||""},dV="O,Moz,ms,Ms,Webkit".split(","),eg=function(e,t,i){var a=t||zd,r=a.style,o=5;if(e in r&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(dV[o]+e in r););return o<0?null:(o===3?"ms":o>=0?dV[o]:"")+e},BP=function(){qie()&&window.document&&(uV=window,Xc=uV.document,Jm=Xc.documentElement,zd=UP("div")||{style:{}},Wie=UP("div"),ri=eg(ri),kr=ri+"Origin",zd.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",wV=!!eg("perspective"),VP=Za.core.reverting,HP=1)},hV=function(e){var t=e.ownerSVGElement,i=UP("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),a=e.cloneNode(!0),r;a.style.display="block",i.appendChild(a),Jm.appendChild(i);try{r=a.getBBox()}catch{}return i.removeChild(a),Jm.removeChild(i),r},pV=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},MV=function(e){var t,i;try{t=e.getBBox()}catch{t=hV(e),i=1}return t&&(t.width||t.height)||i||(t=hV(e)),t&&!t.width&&!t.x&&!t.y?{x:+pV(e,["x","cx","x1"])||0,y:+pV(e,["y","cy","y1"])||0,width:0,height:0}:t},TV=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&MV(e))},jc=function(e,t){if(t){var i=e.style,a;t in xu&&t!==kr&&(t=ri),i.removeProperty?(a=t.substr(0,2),(a==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(a==="--"?t:t.replace(GP,"-$1").toLowerCase())):i.removeAttribute(t)}},Yc=function(e,t,i,a,r,o){var l=new cr(e._pt,t,i,0,1,o?xV:bV);return e._pt=l,l.b=a,l.e=r,e._props.push(i),l},mV={deg:1,rad:1,turn:1},oae={grid:1,flex:1},Zc=function n(e,t,i,a){var r=parseFloat(i)||0,o=(i+"").trim().substr((r+"").length)||"px",l=zd.style,c=Xie.test(t),f=e.tagName.toLowerCase()==="svg",h=(f?"client":"offset")+(c?"Width":"Height"),p=100,m=a==="px",g=a==="%",b,x,_,v;if(a===o||!r||mV[a]||mV[o])return r;if(o!=="px"&&!m&&(r=n(e,t,i,"px")),v=e.getCTM&&TV(e),(g||o==="%")&&(xu[t]||~t.indexOf("adius")))return b=v?e.getBBox()[c?"width":"height"]:e[h],gi(g?r/b*p:r/100*b);if(l[c?"width":"height"]=p+(m?o:a),x=a!=="rem"&&~t.indexOf("adius")||a==="em"&&e.appendChild&&!f?e:e.parentNode,v&&(x=(e.ownerSVGElement||{}).parentNode),(!x||x===Xc||!x.appendChild)&&(x=Xc.body),_=x._gsap,_&&g&&_.width&&c&&_.time===Ir.time&&!_.uncache)return gi(r/_.width*p);if(g&&(t==="height"||t==="width")){var S=e.style[t];e.style[t]=p+a,b=e[h],S?e.style[t]=S:jc(e,t)}else(g||o==="%")&&!oae[vo(x,"display")]&&(l.position=vo(e,"position")),x===e&&(l.position="static"),x.appendChild(zd),b=zd[h],x.removeChild(zd),l.position="absolute";return c&&g&&(_=Gc(x),_.time=Ir.time,_.width=x[h]),gi(m?b*r/p:b&&r?p/b*r:0)},bu=function(e,t,i,a){var r;return HP||BP(),t in hl&&t!=="transform"&&(t=hl[t],~t.indexOf(",")&&(t=t.split(",")[0])),xu[t]&&t!=="transform"?(r=ex(e,a),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:KM(vo(e,kr))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||a||~(r+"").indexOf("calc("))&&(r=ZM[t]&&ZM[t](e,t,i)||vo(e,t)||TP(e,t)||(t==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?Zc(e,t,r,i)+i:r},sae=function(e,t,i,a){if(!i||i==="none"){var r=eg(t,e,1),o=r&&vo(e,r,1);o&&o!==i?(t=r,i=o):t==="borderColor"&&(i=vo(e,"borderTopColor"))}var l=new cr(this._pt,e.style,t,0,1,DP),c=0,f=0,h,p,m,g,b,x,_,v,S,M,T,E;if(l.b=i,l.e=a,i+="",a+="",a.substring(0,6)==="var(--"&&(a=vo(e,a.substring(4,a.indexOf(")")))),a==="auto"&&(x=e.style[t],e.style[t]=a,a=vo(e,t)||a,x?e.style[t]=x:jc(e,t)),h=[i,a],EP(h),i=h[0],a=h[1],m=i.match(Id)||[],E=a.match(Id)||[],E.length){for(;p=Id.exec(a);)_=p[0],S=a.substring(c,p.index),b?b=(b+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(b=1),_!==(x=m[f++]||"")&&(g=parseFloat(x)||0,T=x.substr((g+"").length),_.charAt(1)==="="&&(_=Pd(g,_)+T),v=parseFloat(_),M=_.substr((v+"").length),c=Id.lastIndex-M.length,M||(M=M||Dr.units[t]||T,c===a.length&&(a+=M,l.e+=M)),T!==M&&(g=Zc(e,t,x,M)||0),l._pt={_next:l._pt,p:S||f===1?S:",",s:g,c:v-g,m:b&&b<4||t==="zIndex"?Math.round:0});l.c=c<a.length?a.substring(c,a.length):""}else l.r=t==="display"&&a==="none"?xV:bV;return xP.test(a)&&(l.e=0),this._pt=l,l},gV={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},lae=function(e){var t=e.split(" "),i=t[0],a=t[1]||"50%";return(i==="top"||i==="bottom"||a==="left"||a==="right")&&(e=i,i=a,a=e),t[0]=gV[i]||i,t[1]=gV[a]||a,t.join(" ")},uae=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,a=i.style,r=t.u,o=i._gsap,l,c,f;if(r==="all"||r===!0)a.cssText="",c=1;else for(r=r.split(","),f=r.length;--f>-1;)l=r[f],xu[l]&&(c=1,l=l==="transformOrigin"?kr:ri),jc(i,l);c&&(jc(i,ri),o&&(o.svg&&i.removeAttribute("transform"),a.scale=a.rotate=a.translate="none",ex(i,1),o.uncache=1,_V(a)))}},ZM={clearProps:function(e,t,i,a,r){if(r.data!=="isFromStart"){var o=e._pt=new cr(e._pt,t,i,0,0,uae);return o.u=a,o.pr=-10,o.tween=r,e._props.push(i),1}}},$b=[1,0,0,1,0,0],CV={},EV=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},vV=function(e){var t=vo(e,ri);return EV(t)?$b:t.substr(7).match(bP).map(gi)},WP=function(e,t){var i=e._gsap||Gc(e),a=e.style,r=vV(e),o,l,c,f;return i.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,r=[c.a,c.b,c.c,c.d,c.e,c.f],r.join(",")==="1,0,0,1,0,0"?$b:r):(r===$b&&!e.offsetParent&&e!==Jm&&!i.svg&&(c=a.display,a.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(f=1,l=e.nextElementSibling,Jm.appendChild(e)),r=vV(e),c?a.display=c:jc(e,"display"),f&&(l?o.insertBefore(e,l):o?o.appendChild(e):Jm.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},FP=function(e,t,i,a,r,o){var l=e._gsap,c=r||WP(e,!0),f=l.xOrigin||0,h=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=c[0],b=c[1],x=c[2],_=c[3],v=c[4],S=c[5],M=t.split(" "),T=parseFloat(M[0])||0,E=parseFloat(M[1])||0,L,P,I,R;i?c!==$b&&(P=g*_-b*x)&&(I=T*(_/P)+E*(-x/P)+(x*S-_*v)/P,R=T*(-b/P)+E*(g/P)-(g*S-b*v)/P,T=I,E=R):(L=MV(e),T=L.x+(~M[0].indexOf("%")?T/100*L.width:T),E=L.y+(~(M[1]||M[0]).indexOf("%")?E/100*L.height:E)),a||a!==!1&&l.smooth?(v=T-f,S=E-h,l.xOffset=p+(v*g+S*x)-v,l.yOffset=m+(v*b+S*_)-S):l.xOffset=l.yOffset=0,l.xOrigin=T,l.yOrigin=E,l.smooth=!!a,l.origin=t,l.originIsAbsolute=!!i,e.style[kr]="0px 0px",o&&(Yc(o,l,"xOrigin",f,T),Yc(o,l,"yOrigin",h,E),Yc(o,l,"xOffset",p,l.xOffset),Yc(o,l,"yOffset",m,l.yOffset)),e.setAttribute("data-svg-origin",T+" "+E)},ex=function(e,t){var i=e._gsap||new AP(e);if("x"in i&&!t&&!i.uncache)return i;var a=e.style,r=i.scaleX<0,o="px",l="deg",c=getComputedStyle(e),f=vo(e,kr)||"0",h,p,m,g,b,x,_,v,S,M,T,E,L,P,I,R,A,D,N,H,X,W,Y,V,G,$,te,ge,Le,je,Oe,ze;return h=p=m=x=_=v=S=M=T=0,g=b=1,i.svg=!!(e.getCTM&&TV(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(a[ri]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[ri]!=="none"?c[ri]:"")),a.scale=a.rotate=a.translate="none"),P=WP(e,i.svg),i.svg&&(i.uncache?(G=e.getBBox(),f=i.xOrigin-G.x+"px "+(i.yOrigin-G.y)+"px",V=""):V=!t&&e.getAttribute("data-svg-origin"),FP(e,V||f,!!V||i.originIsAbsolute,i.smooth!==!1,P)),E=i.xOrigin||0,L=i.yOrigin||0,P!==$b&&(D=P[0],N=P[1],H=P[2],X=P[3],h=W=P[4],p=Y=P[5],P.length===6?(g=Math.sqrt(D*D+N*N),b=Math.sqrt(X*X+H*H),x=D||N?Qm(N,D)*Nd:0,S=H||X?Qm(H,X)*Nd+x:0,S&&(b*=Math.abs(Math.cos(S*$m))),i.svg&&(h-=E-(E*D+L*H),p-=L-(E*N+L*X))):(ze=P[6],je=P[7],te=P[8],ge=P[9],Le=P[10],Oe=P[11],h=P[12],p=P[13],m=P[14],I=Qm(ze,Le),_=I*Nd,I&&(R=Math.cos(-I),A=Math.sin(-I),V=W*R+te*A,G=Y*R+ge*A,$=ze*R+Le*A,te=W*-A+te*R,ge=Y*-A+ge*R,Le=ze*-A+Le*R,Oe=je*-A+Oe*R,W=V,Y=G,ze=$),I=Qm(-H,Le),v=I*Nd,I&&(R=Math.cos(-I),A=Math.sin(-I),V=D*R-te*A,G=N*R-ge*A,$=H*R-Le*A,Oe=X*A+Oe*R,D=V,N=G,H=$),I=Qm(N,D),x=I*Nd,I&&(R=Math.cos(I),A=Math.sin(I),V=D*R+N*A,G=W*R+Y*A,N=N*R-D*A,Y=Y*R-W*A,D=V,W=G),_&&Math.abs(_)+Math.abs(x)>359.9&&(_=x=0,v=180-v),g=gi(Math.sqrt(D*D+N*N+H*H)),b=gi(Math.sqrt(Y*Y+ze*ze)),I=Qm(W,Y),S=Math.abs(I)>2e-4?I*Nd:0,T=Oe?1/(Oe<0?-Oe:Oe):0),i.svg&&(V=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!EV(vo(e,ri)),V&&e.setAttribute("transform",V))),Math.abs(S)>90&&Math.abs(S)<270&&(r?(g*=-1,S+=x<=0?180:-180,x+=x<=0?180:-180):(b*=-1,S+=S<=0?180:-180)),t=t||i.uncache,i.x=h-((i.xPercent=h&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=p-((i.yPercent=p&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-p)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=m+o,i.scaleX=gi(g),i.scaleY=gi(b),i.rotation=gi(x)+l,i.rotationX=gi(_)+l,i.rotationY=gi(v)+l,i.skewX=S+l,i.skewY=M+l,i.transformPerspective=T+o,(i.zOrigin=parseFloat(f.split(" ")[2])||!t&&i.zOrigin||0)&&(a[kr]=KM(f)),i.xOffset=i.yOffset=0,i.force3D=Dr.force3D,i.renderTransform=i.svg?fae:wV?AV:cae,i.uncache=0,i},KM=function(e){return(e=e.split(" "))[0]+" "+e[1]},NP=function(e,t,i){var a=La(t);return gi(parseFloat(t)+parseFloat(Zc(e,"x",i+"px",a)))+a},cae=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,AV(e,t)},kd="0deg",Jb="0px",Od=") ",AV=function(e,t){var i=t||this,a=i.xPercent,r=i.yPercent,o=i.x,l=i.y,c=i.z,f=i.rotation,h=i.rotationY,p=i.rotationX,m=i.skewX,g=i.skewY,b=i.scaleX,x=i.scaleY,_=i.transformPerspective,v=i.force3D,S=i.target,M=i.zOrigin,T="",E=v==="auto"&&e&&e!==1||v===!0;if(M&&(p!==kd||h!==kd)){var L=parseFloat(h)*$m,P=Math.sin(L),I=Math.cos(L),R;L=parseFloat(p)*$m,R=Math.cos(L),o=NP(S,o,P*R*-M),l=NP(S,l,-Math.sin(L)*-M),c=NP(S,c,I*R*-M+M)}_!==Jb&&(T+="perspective("+_+Od),(a||r)&&(T+="translate("+a+"%, "+r+"%) "),(E||o!==Jb||l!==Jb||c!==Jb)&&(T+=c!==Jb||E?"translate3d("+o+", "+l+", "+c+") ":"translate("+o+", "+l+Od),f!==kd&&(T+="rotate("+f+Od),h!==kd&&(T+="rotateY("+h+Od),p!==kd&&(T+="rotateX("+p+Od),(m!==kd||g!==kd)&&(T+="skew("+m+", "+g+Od),(b!==1||x!==1)&&(T+="scale("+b+", "+x+Od),S.style[ri]=T||"translate(0, 0)"},fae=function(e,t){var i=t||this,a=i.xPercent,r=i.yPercent,o=i.x,l=i.y,c=i.rotation,f=i.skewX,h=i.skewY,p=i.scaleX,m=i.scaleY,g=i.target,b=i.xOrigin,x=i.yOrigin,_=i.xOffset,v=i.yOffset,S=i.forceCSS,M=parseFloat(o),T=parseFloat(l),E,L,P,I,R;c=parseFloat(c),f=parseFloat(f),h=parseFloat(h),h&&(h=parseFloat(h),f+=h,c+=h),c||f?(c*=$m,f*=$m,E=Math.cos(c)*p,L=Math.sin(c)*p,P=Math.sin(c-f)*-m,I=Math.cos(c-f)*m,f&&(h*=$m,R=Math.tan(f-h),R=Math.sqrt(1+R*R),P*=R,I*=R,h&&(R=Math.tan(h),R=Math.sqrt(1+R*R),E*=R,L*=R)),E=gi(E),L=gi(L),P=gi(P),I=gi(I)):(E=p,I=m,L=P=0),(M&&!~(o+"").indexOf("px")||T&&!~(l+"").indexOf("px"))&&(M=Zc(g,"x",o,"px"),T=Zc(g,"y",l,"px")),(b||x||_||v)&&(M=gi(M+b-(b*E+x*P)+_),T=gi(T+x-(b*L+x*I)+v)),(a||r)&&(R=g.getBBox(),M=gi(M+a/100*R.width),T=gi(T+r/100*R.height)),R="matrix("+E+","+L+","+P+","+I+","+M+","+T+")",g.setAttribute("transform",R),S&&(g.style[ri]=R)},dae=function(e,t,i,a,r){var o=360,l=Ki(r),c=parseFloat(r)*(l&&~r.indexOf("rad")?Nd:1),f=c-a,h=a+f+"deg",p,m;return l&&(p=r.split("_")[1],p==="short"&&(f%=o,f!==f%(o/2)&&(f+=f<0?o:-o)),p==="cw"&&f<0?f=(f+o*fV)%o-~~(f/o)*o:p==="ccw"&&f>0&&(f=(f-o*fV)%o-~~(f/o)*o)),e._pt=m=new cr(e._pt,t,i,a,f,jie),m.e=h,m.u="deg",e._props.push(i),m},yV=function(e,t){for(var i in t)e[i]=t[i];return e},hae=function(e,t,i){var a=yV({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=i.style,l,c,f,h,p,m,g,b;a.svg?(f=i.getAttribute("transform"),i.setAttribute("transform",""),o[ri]=t,l=ex(i,1),jc(i,ri),i.setAttribute("transform",f)):(f=getComputedStyle(i)[ri],o[ri]=t,l=ex(i,1),o[ri]=f);for(c in xu)f=a[c],h=l[c],f!==h&&r.indexOf(c)<0&&(g=La(f),b=La(h),p=g!==b?Zc(i,c,f,b):parseFloat(f),m=parseFloat(h),e._pt=new cr(e._pt,l,c,p,m-p,zP),e._pt.u=b||0,e._props.push(c));yV(l,a)};ur("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",a="Bottom",r="Left",o=(e<3?[t,i,a,r]:[t+r,t+i,a+i,a+r]).map(function(l){return e<2?n+l:"border"+l+n});ZM[e>1?"border"+n:n]=function(l,c,f,h,p){var m,g;if(arguments.length<4)return m=o.map(function(b){return bu(l,b,f)}),g=m.join(" "),g.split(m[0]).length===5?m[0]:g;m=(h+"").split(" "),g={},o.forEach(function(b,x){return g[b]=m[x]=m[x]||m[(x-1)/2|0]}),l.init(c,g,p)}});var qP={name:"css",register:BP,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,a,r){var o=this._props,l=e.style,c=i.vars.startAt,f,h,p,m,g,b,x,_,v,S,M,T,E,L,P,I,R;HP||BP(),this.styles=this.styles||SV(e),I=this.styles.props,this.tween=i;for(x in t)if(x!=="autoRound"&&(h=t[x],!(Rr[x]&&RP(x,t,i,a,e,r)))){if(g=typeof h,b=ZM[x],g==="function"&&(h=h.call(i,a,e,r),g=typeof h),g==="string"&&~h.indexOf("random(")&&(h=Km(h)),b)b(this,e,x,h,i)&&(P=1);else if(x.substr(0,2)==="--")f=(getComputedStyle(e).getPropertyValue(x)+"").trim(),h+="",vu.lastIndex=0,vu.test(f)||(_=La(f),v=La(h),v?_!==v&&(f=Zc(e,x,f,v)+v):_&&(h+=_)),this.add(l,"setProperty",f,h,a,r,0,0,x),o.push(x),I.push(x,0,l[x]);else if(g!=="undefined"){if(c&&x in c?(f=typeof c[x]=="function"?c[x].call(i,a,e,r):c[x],Ki(f)&&~f.indexOf("random(")&&(f=Km(f)),La(f+"")||f==="auto"||(f+=Dr.units[x]||La(bu(e,x))||""),(f+"").charAt(1)==="="&&(f=bu(e,x))):f=bu(e,x),m=parseFloat(f),S=g==="string"&&h.charAt(1)==="="&&h.substr(0,2),S&&(h=h.substr(2)),p=parseFloat(h),x in hl&&(x==="autoAlpha"&&(m===1&&bu(e,"visibility")==="hidden"&&p&&(m=0),I.push("visibility",0,l.visibility),Yc(this,l,"visibility",m?"inherit":"hidden",p?"inherit":"hidden",!p)),x!=="scale"&&x!=="transform"&&(x=hl[x],~x.indexOf(",")&&(x=x.split(",")[0]))),M=x in xu,M){if(this.styles.save(x),R=h,g==="string"&&h.substring(0,6)==="var(--"){if(h=vo(e,h.substring(4,h.indexOf(")"))),h.substring(0,5)==="calc("){var A=e.style.perspective;e.style.perspective=h,h=vo(e,"perspective"),A?e.style.perspective=A:jc(e,"perspective")}p=parseFloat(h)}if(T||(E=e._gsap,E.renderTransform&&!t.parseTransform||ex(e,t.parseTransform),L=t.smoothOrigin!==!1&&E.smooth,T=this._pt=new cr(this._pt,l,ri,0,1,E.renderTransform,E,0,-1),T.dep=1),x==="scale")this._pt=new cr(this._pt,E,"scaleY",E.scaleY,(S?Pd(E.scaleY,S+p):p)-E.scaleY||0,zP),this._pt.u=0,o.push("scaleY",x),x+="X";else if(x==="transformOrigin"){I.push(kr,0,l[kr]),h=lae(h),E.svg?FP(e,h,0,L,0,this):(v=parseFloat(h.split(" ")[2])||0,v!==E.zOrigin&&Yc(this,E,"zOrigin",E.zOrigin,v),Yc(this,l,x,KM(f),KM(h)));continue}else if(x==="svgOrigin"){FP(e,h,1,L,0,this);continue}else if(x in CV){dae(this,E,x,m,S?Pd(m,S+h):h);continue}else if(x==="smoothOrigin"){Yc(this,E,"smooth",E.smooth,h);continue}else if(x==="force3D"){E[x]=h;continue}else if(x==="transform"){hae(this,h,e);continue}}else x in l||(x=eg(x)||x);if(M||(p||p===0)&&(m||m===0)&&!Yie.test(h)&&x in l)_=(f+"").substr((m+"").length),p||(p=0),v=La(h)||(x in Dr.units?Dr.units[x]:_),_!==v&&(m=Zc(e,x,f,v)),this._pt=new cr(this._pt,M?E:l,x,m,(S?Pd(m,S+p):p)-m,!M&&(v==="px"||x==="zIndex")&&t.autoRound!==!1?Qie:zP),this._pt.u=v||0,M&&R!==h?(this._pt.b=f,this._pt.e=R,this._pt.r=Kie):_!==v&&v!=="%"&&(this._pt.b=f,this._pt.r=Zie);else if(x in l)sae.call(this,e,x,f,S?S+h:h);else if(x in e)this.add(e,x,f||e[x],S?S+h:h,a,r);else if(x!=="parseTransform"){WM(x,h);continue}M||(x in l?I.push(x,0,l[x]):typeof e[x]=="function"?I.push(x,2,e[x]()):I.push(x,1,f||e[x])),o.push(x)}}P&&OP(this)},render:function(e,t){if(t.tween._time||!VP())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:bu,aliases:hl,getSetter:function(e,t,i){var a=hl[t];return a&&a.indexOf(",")<0&&(t=a),t in xu&&t!==kr&&(e._gsap.x||bu(e,"x"))?i&&cV===i?t==="scale"?tae:eae:(cV=i||{})&&(t==="scale"?nae:iae):e.style&&!GM(e.style[t])?Jie:~t.indexOf("-")?$ie:jM(e,t)},core:{_removeProperty:jc,_getMatrix:WP}};Za.utils.checkPrefix=eg;Za.core.getStyleSaver=SV;(function(n,e,t,i){var a=ur(n+","+e+","+t,function(r){xu[r]=1});ur(e,function(r){Dr.units[r]="deg",CV[r]=1}),hl[a[13]]=n+","+e,ur(i,function(r){var o=r.split(":");hl[o[1]]=a[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ur("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Dr.units[n]="px"});Za.registerPlugin(qP);var QM=Za.registerPlugin(qP)||Za,Ale=QM.core.Tween;function XP(n){return n.run?.coordinatorId||n.roles.find(e=>/统领|协调者|分配者/.test(e.name||""))?.id||n.roles[0]?.id}function tg(n,e,t=!0){let i=n.roles[e],a=mu(n,i.id),r=Fc(e,n.roles.length),o=n.event,l={zone:"desk",point:[r[0],r[2]+.82],angle:Math.PI},c={zone:"meeting",point:[.1+e%5*1.05,1.05-Math.floor(e/5)*.85],angle:0};return n.run?.status==="paused"||["paused","error","cancelled"].includes(a.state)?{...l,pose:"waiting",label:a.state==="error"?"\u9700\u8981\u5E2E\u52A9":"\u6682\u505C\u5DE5\u4F5C"}:i.id===XP(n)?{zone:"sofa",point:[-4,4.45],angle:Math.PI,pose:"lead",label:a.working?"\u7EDF\u7B79\u4E0E\u5206\u914D\u4EFB\u52A1":"\u7EDF\u9886\u8005 \xB7 \u7B49\u5F85\u6C47\u62A5"}:o?.kind==="mention"&&(o.roleId===i.id||o.to?.includes(i.id))&&t?{...c,pose:"talk",label:"@ \u4EA4\u6D41\u4E2D"}:a.working?["plan","coordinate"].includes(a.task?.phase)||/讨论|分析|规划|梳理需求|需求梳理|头脑风暴/.test(a.task?.title||"")?{...c,pose:"talk",label:a.task.phase==="plan"?"\u8BA8\u8BBA\u65B9\u6848":"\u534F\u8C03\u4EFB\u52A1"}:a.task?.phase==="deliver"?{zone:"reception",point:[-2.45+e%3*.65,2.3],angle:-Math.PI/2,pose:"present",label:"\u63D0\u4EA4\u4EA4\u4ED8\u5185\u5BB9"}:a.task?.phase==="review"?{zone:"board",point:[5.2+e%2*.75,2.9+e%3*.42],angle:-.2,pose:"present",label:a.task.phase==="review"?"\u590D\u6838\u7ED3\u679C":"\u4EA4\u4ED8\u6210\u679C"}:{...l,pose:"type",label:a.state==="thinking"?"\u601D\u8003\u4E2D":"\u6B63\u5728\u5DE5\u4F5C"}:a.state==="pending"||a.state==="waiting"?{...l,pose:"read",label:a.task?.dependsOn?.length?"\u7B49\u5F85\u524D\u7F6E\u4EFB\u52A1":"\u7B49\u5F85\u5206\u5DE5"}:a.state==="completed"||a.state==="complete"?{...l,pose:"rest",label:"\u5DE5\u4F5C\u5B8C\u6210 \xB7 \u4F11\u606F\u4E2D"}:{...l,pose:"rest",label:"\u4F11\u606F\u4E2D"}}function LV(n,e,t){if(Math.hypot(n[0]-e[0],n[1]-e[1])<.02)return[n,e];let i=[n],a=l=>{Math.hypot(l[0]-i.at(-1)[0],l[1]-i.at(-1)[1])>.01&&i.push(l)},r=l=>l[1]<-.6&&l[0]<6.3,o=l=>{let c=-.35,f=1/0;for(let h=0;h<t;h++){let p=Fc(h,t),m=p[2]+1.65,g=Math.abs(l[1]-m);g<f&&(c=m,f=g)}return c};if(n[1]>3.7&&n[0]<-3&&(a([-2.1,n[1]]),a([-2.1,.5])),r(n)){let l=n[0];for(let c=0;c<t;c++){let f=Fc(c,t);if(Math.abs(n[0]-f[0])<.6&&Math.abs(n[1]-f[2]-.82)<.2){l=f[0]+.7;break}}a([l,n[1]]),a([l,o(n)]),a([6.7,o(n)])}else a([n[0],.5]),a([6.7,.5]);return r(e)?(a([6.7,o(e)]),a([e[0]+.7,o(e)]),a([e[0]+.7,e[1]])):(a([6.7,.5]),a([e[0],.5])),e[1]>3.7&&e[0]<-3&&(a([-2.1,.5]),a([-2.1,e[1]])),a(e),i}function pae(n,e,t){let i=n.roles[e].id,a=XP(n);if(!t)return[];if(i===a){let l=n.roles.find(c=>c.id===t.roleId)?.name||"\u6210\u5458";return t.kind==="task"&&t.roleId!==a&&["running","completed"].includes(t.status)?[{...tg(n,e,!1),label:t.status==="running"?"\u5206\u914D\u4EFB\u52A1 \xB7 "+l:"\u63A5\u6536\u4EA4\u4ED8 \xB7 "+l,dwell:12},tg(n,e,!1)]:[]}let r=tg(n,e,!1),o={zone:"reception",point:[-2+Math.floor(e/4)*.85,2.4+e%4*.75],angle:Math.atan2(-2-Math.floor(e/4)*.85,2.05-e%4*.75),pose:"present"};return t.kind==="mention"&&(t.roleId===i||t.to?.includes(i))?t.roleId===a||t.to?.includes(a)?[{...o,label:t.roleId===i?"\u5411\u7EDF\u9886\u8005\u6C47\u62A5":"\u9886\u53D6\u534F\u4F5C\u6D88\u606F",dwell:3},r]:[{zone:"meeting",point:[.1+e%5*1.05,1.05-Math.floor(e/5)*.85],angle:.1,pose:"talk",label:"\u8BA8\u8BBA\u5206\u6790",dwell:4},r]:t.kind!=="task"||t.roleId!==i?[]:t.status==="running"?[{...o,label:"\u9886\u53D6\u4EFB\u52A1",dwell:2.5},r]:t.status==="completed"?[{...o,label:"\u63D0\u4EA4\u4EA4\u4ED8\u5185\u5BB9",dwell:3.5},r]:[]}var JM=class{constructor(e,t){this.index=t,this.count=e.roles.length,this.base=tg(e,t,!1),this.point=[...this.base.point],this.action=this.base,this.queue=[],this.active=null,this.seen=new Set(e.historical?[]:Wm(e).map(i=>i.id)),this.mode=e.historical,this.lastAt=e.event?.at??-1/0,this.lastEvent=e.event?.id,e.event&&this.seen.add(e.event.id),e.historical&&this.enqueue(e,e.event)}enqueue(e,t){this.queue.push(...pae(e,this.index,t))}observe(e){this.base=tg(e,this.index,!1);let t=e.event;(e.historical!==this.mode||e.historical&&t?.at<this.lastAt)&&(this.queue=[],this.active=null,this.seen=new Set(e.historical?[]:Wm(e).map(i=>i.id)),this.mode=e.historical,this.action=this.base,this.point=[...this.base.point]);for(let i of e.historical?t?[t]:[]:Wm(e))this.seen.has(i.id)||(this.seen.add(i.id),this.enqueue(e,i));this.lastAt=t?.at??this.lastAt,this.lastEvent=t?.id}begin(e,t){let i=LV(this.point,e.point,this.count);this.active={action:e,fromEvent:t,route:i,length:v6(i),distance:0,remaining:e.dwell||0},this.action=e}tick(e,{animate:t=!0,snap:i=!1}={}){if(i)return this.queue=[],this.active=null,this.action=this.base,this.point=[...this.base.point],this.state(!1);if(!t)return this.state(!!this.active&&this.active.distance<this.active.length-.001);this.active||(this.queue.length?this.begin(this.queue.shift(),!0):this.actionKey(this.action)!==this.actionKey(this.base)||Math.hypot(this.point[0]-this.base.point[0],this.point[1]-this.base.point[1])>.01?this.begin(this.base,!1):this.action=this.base);let a=this.active;if(!a)return this.state(!1);if(t){let l=Math.min(a.length-a.distance,e*3.1);a.distance+=l;let c=Math.max(0,e-l/3.1);a.distance>=a.length-.001&&(a.remaining=Math.max(0,a.remaining-c))}let r=g6(a.route,a.distance);this.point=[r.x,r.z],this.angle=a.distance<a.length-.001?r.angle:a.action.angle;let o=a.distance<a.length-.001;return!o&&a.remaining<=0&&(this.active=null),this.state(o)}actionKey(e){return e.zone+":"+e.point.join(",")+":"+e.pose+":"+e.label}state(e){return{action:this.action,point:this.point,angle:this.angle??this.action.angle,walking:e,busy:!!this.active||this.queue.length>0}}};var ct=ke(pn(),1),$M="#514b45";function mae(){return(0,ct.jsxs)("group",{position:[0,1.23,.36],children:[[-.17,.17].map(n=>(0,ct.jsxs)("mesh",{position:[n,0,0],children:[(0,ct.jsx)("torusGeometry",{args:[.12,.018,6,20]}),(0,ct.jsx)("meshStandardMaterial",{color:$M})]},n)),(0,ct.jsx)(qe,{size:[.1,.025,.02],color:$M})]})}function RV({role:n,index:e,view:t,selected:i,onSelect:a,animate:r,snap:o,speed:l=1,onBusy:c,onActivity:f}){let h=mu(t,n.id),p=(0,oi.useMemo)(()=>m6(n.id,e),[n.id,e]),m=Fc(e,t.roles.length),g=lr[e%lr.length],b=(0,oi.useRef)(),x=(0,oi.useRef)(),_=(0,oi.useRef)(),v=(0,oi.useRef)(),S=(0,oi.useRef)(),M=(0,oi.useRef)(),T=(0,oi.useRef)(),E=(0,oi.useRef)(0),L=(0,oi.useRef)({wave:0}),P=(0,oi.useRef)(null),I=(0,oi.useRef)(!1),R=(0,oi.useRef)(r),A=(0,oi.useRef)(t.event?.id);P.current||(P.current=new JM(t,e));let[D,N]=(0,oi.useState)(()=>P.current.state(!1)),H=D.action,X=D.walking;(0,oi.useEffect)(()=>{P.current.observe(t),o&&A.current!==t.event?.id&&P.current.tick(0,{snap:!0}),A.current=t.event?.id,!R.current&&t.historical&&r&&!P.current.active&&!P.current.queue.length&&P.current.enqueue(t,t.event),R.current=r,r&&P.current.queue.length&&(I.current=!0,c(n.id,!0))},[t,r]),(0,oi.useEffect)(()=>()=>c(n.id,!1),[]),(0,oi.useEffect)(()=>f(n.id,{zone:D.action.zone,label:D.action.label,walking:D.walking}),[D.action,D.walking,f]),(0,oi.useEffect)(()=>{let V=QM.context(()=>{r&&(H.pose==="talk"||H.pose==="present"||H.pose==="lead"||i)&&QM.timeline({repeat:-1,repeatDelay:1.6}).to(L.current,{wave:1,duration:.4,ease:"sine.inOut"}).to(L.current,{wave:-.3,duration:.25,repeat:3,yoyo:!0}).to(L.current,{wave:0,duration:.4})});return()=>V.revert()},[r,H.pose,i]),Db((V,G)=>{if(!b.current)return;let $=Math.min(G,.15)*l;r&&(E.current+=$);let te=P.current.tick($,{animate:r}),ge=te.action,Le=te.walking;te.busy!==I.current&&(I.current=te.busy,c(n.id,te.busy)),(D.action!==ge||D.walking!==Le)&&N(te),b.current.position.set(te.point[0],0,te.point[1]);let je=te.angle;b.current.rotation.y+=Math.atan2(Math.sin(je-b.current.rotation.y),Math.cos(je-b.current.rotation.y))*(r?Math.min(1,G*9):1);let Oe=E.current,ze=r?Math.sin(Oe*11+e):0,ae=!Le&&ge.pose==="type",de=!Le&&["talk","present","lead"].includes(ge.pose),Ie=!Le&&(ge.zone==="desk"||ge.zone==="sofa");M.current.rotation.x=Le?ze*.65:Ie?-1.15:0,T.current.rotation.x=Le?-ze*.65:Ie?-1.15:0,v.current.rotation.x=Le?-ze*.5:ae?-1.3+ze*.08:ge.pose==="read"?-.7:0,S.current.rotation.x=Le?ze*.5:ae?-1.3-ze*.08:ge.pose==="read"?-.95:de?-.6:0,S.current.rotation.z=de?L.current.wave*.9:i?L.current.wave*.5:0,x.current.position.y=(Ie?ge.zone==="sofa"?.29:.13:0)+(r?Le?Math.abs(ze)*.065:Math.sin(Oe*2)*.018:0),_.current.rotation.y=r&&!Le?Math.sin(Oe*.9+e)*.14:0});let W=p.variant,Y=p.fur;return(0,ct.jsxs)("group",{ref:b,position:[P.current.point[0],0,P.current.point[1]],name:"employee-"+n.id,children:[(0,ct.jsxs)("group",{scale:p.height,onClick:V=>{V.delta>5||(V.stopPropagation(),a(n.id))},onPointerOver:V=>{V.stopPropagation(),document.body.style.cursor="pointer"},onPointerOut:()=>document.body.style.cursor="",children:[(0,ct.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[0,.055,0],children:[(0,ct.jsx)("ringGeometry",{args:[.39,i?.49:.42,40]}),(0,ct.jsx)("meshBasicMaterial",{color:i?"#b58750":g,transparent:!0,opacity:i?1:.55})]}),(0,ct.jsxs)("group",{ref:x,children:[[[-.17,M],[.17,T]].map(([V,G],$)=>(0,ct.jsxs)("group",{ref:G,position:[V,.38,0],children:[(0,ct.jsx)(qe,{position:[0,-.11,0],size:[.19,.28,.22],color:W===2?"#84938e":"#a48a70",radius:.07}),(0,ct.jsx)(Ln,{position:[0,-.28,.06],size:[.15,.1,.22],color:"#786c5e"})]},$)),(0,ct.jsx)(qe,{position:[0,.67,0],size:[W===4?.75:.65,.65,.44],color:g,radius:.21}),(0,ct.jsx)(qe,{position:[0,.7,.232],size:[.025,.44,.014],color:"#fff6df"}),(0,ct.jsx)(Ln,{size:[.025,.025,.015],position:[.08,.75,.24],color:"#fff6df"}),(0,ct.jsxs)("group",{ref:_,position:[0,0,0],children:[(0,ct.jsx)(Ln,{position:[0,1.24,0],size:[W===4?.5:.45,.4,.36],color:Y}),[-1,1].map(V=>W===1||W===5?(0,ct.jsxs)("group",{children:[(0,ct.jsx)(Ln,{position:[V*.28,1.64,-.03],size:[.105,W===1?.32:.23,.1],color:Y,"rotation-z":V*-.17}),(0,ct.jsx)(Ln,{position:[V*.28,1.66,.055],size:[.047,.17,.025],color:"#e6b9ac"})]},V):(0,ct.jsx)(Ln,{position:[V*.34,1.53,-.03],size:[W===3?.17:.14,.16,.13],color:Y},V)),(0,ct.jsx)(Ln,{position:[-.16,1.27,.332],size:[.034,.047,.024],color:$M}),(0,ct.jsx)(Ln,{position:[.16,1.27,.332],size:[.034,.047,.024],color:$M}),(0,ct.jsx)(Ln,{position:[0,1.15,.364],size:[.045,.03,.024],color:"#a77d67"}),[-.27,.27].map(V=>(0,ct.jsx)(Ln,{position:[V,1.16,.3],size:[.068,.035,.022],color:"#e7b6a2"},V)),(W===0||W===4)&&(0,ct.jsx)(mae,{}),W===1&&(0,ct.jsxs)("group",{children:[(0,ct.jsxs)("mesh",{position:[0,1.32,0],"rotation-z":Math.PI/2,children:[(0,ct.jsx)("torusGeometry",{args:[.43,.045,8,24,Math.PI]}),(0,ct.jsx)("meshStandardMaterial",{color:"#766d66"})]}),[-.44,.44].map(V=>(0,ct.jsx)(Ln,{position:[V,1.27,0],size:[.09,.15,.15],color:"#8d9c99"},V))]}),W===2&&(0,ct.jsxs)("group",{children:[(0,ct.jsx)(Ln,{position:[0,1.58,0],size:[.43,.14,.34],color:"#c1a0b8","rotation-z":-.16}),(0,ct.jsx)(Ln,{position:[.13,1.72,0],size:[.06,.06,.06],color:"#aa7e9f"})]}),W===3&&(0,ct.jsxs)("group",{children:[(0,ct.jsx)(qe,{position:[0,1.49,-.04],size:[.8,.21,.57],color:"#b0bf9f",radius:.1}),(0,ct.jsx)(qe,{position:[0,1.44,.34],size:[.63,.07,.35],color:"#b0bf9f"})]}),W===5&&(0,ct.jsx)(Ln,{position:[.25,1.48,.22],size:[.14,.09,.05],color:"#d39b84","rotation-z":-.3})]}),[[-.4,v],[.4,S]].map(([V,G],$)=>(0,ct.jsxs)("group",{ref:G,position:[V,.85,0],children:[(0,ct.jsx)(Ln,{position:[0,-.12,0],size:[.12,.2,.13],color:g}),(0,ct.jsx)(Ln,{position:[0,-.3,.01],size:[.11,.1,.11],color:Y})]},$)),W===0&&(0,ct.jsxs)("group",{position:[0,.9,.25],children:[(0,ct.jsx)(qe,{size:[.38,.07,.07],color:"#c18d76"}),(0,ct.jsx)(qe,{position:[.12,-.13,0],size:[.1,.3,.06],color:"#c18d76","rotation-z":-.15})]}),W===2&&(0,ct.jsx)(qe,{size:[.35,.36,.025],position:[0,.61,.25],color:"#f5e8d2",radius:.05}),W===3&&(0,ct.jsx)(qe,{size:[.18,.21,.025],position:[-.15,.65,.24],color:"#fff0d5",radius:.03}),W===4&&(0,ct.jsx)(qe,{size:[.41,.45,.15],position:[0,.73,-.27],color:"#c2956f",radius:.1}),H.pose==="read"&&(0,ct.jsxs)("group",{position:[0,.66,.48],"rotation-x":-.4,children:[(0,ct.jsx)(qe,{size:[.4,.3,.04],color:"#c69b79"}),(0,ct.jsx)(qe,{position:[0,.01,.03],size:[.35,.26,.025],color:"#fff3d8"})]}),H.pose==="present"&&(0,ct.jsx)(qe,{size:[.42,.32,.06],position:[.15,.8,.4],color:"#f6dfac"})]})]}),(0,ct.jsx)(zb,{text:n.name+" \xB7 "+(X?{desk:"\u8FD4\u56DE\u5DE5\u4F4D",meeting:"\u524D\u5F80\u4F1A\u8BAE\u533A",board:"\u524D\u5F80\u767D\u677F\u533A",lounge:"\u524D\u5F80\u4F11\u606F\u533A",coffee:"\u524D\u5F80\u8336\u6C34\u533A",sofa:"\u524D\u5F80\u7EDF\u7B79\u6C99\u53D1",reception:"\u524D\u5F80\u7EDF\u9886\u8005\u5904"}[H.zone]:H.label),small:!0,position:[0,2.15,0]}),!X&&H.pose==="present"&&(0,ct.jsx)(zb,{text:H.label,position:[0,2.65,0],bg:"#fff0cc"})]})}var Ra=ke(pn(),1);function gae({count:n,reset:e}){let{camera:t,gl:i,size:a,invalidate:r}=XI(),o=(0,Or.useRef)();return(0,Or.useEffect)(()=>{let l=new CM(t,i.domElement);return o.current=l,l.target.set(0,.3,0),l.enableDamping=!0,l.dampingFactor=.09,l.minPolarAngle=.28,l.maxPolarAngle=Math.PI/2.15,l.minZoom=12,l.maxZoom=130,l.screenSpacePanning=!0,l.addEventListener("change",r),()=>{l.removeEventListener("change",r),l.dispose()}},[t,i,r,e]),(0,Or.useEffect)(()=>{let{depth:l}=Ub(n),c=new U(-.1,.4,Math.min(0,3-l/3));t.position.set(c.x+8,20,c.z+12),t.zoom=1,t.lookAt(c),t.updateMatrixWorld();let f=[[-7,0,-l/2],[7,0,-l/2],[-7,0,5.6],[7,0,5.6],[-7,2.3,-l/2],[7,2.3,-l/2]].map(m=>new U(...m).applyMatrix4(t.matrixWorldInverse)),h=Math.max(...f.map(m=>m.x))-Math.min(...f.map(m=>m.x)),p=Math.max(...f.map(m=>m.y))-Math.min(...f.map(m=>m.y));t.zoom=Math.min(a.width/(h+.35),a.height/(p+.65)),t.updateProjectionMatrix(),o.current?.target.copy(c),o.current?.update(),r()},[n,a.width,a.height,e]),Db(()=>o.current?.update()),null}function IV({view:n,selected:e,onSelect:t,motion:i,visible:a,speed:r=1,snap:o=!1,onBusy:l=()=>{}}){let[c,f]=(0,Or.useState)(0),[h,p]=(0,Or.useState)(!1),m=i&&a,g=(0,Or.useRef)(new Set),[b,x]=(0,Or.useState)({}),_=(0,Or.useCallback)((S,M)=>x(T=>({...T,[S]:M})),[]),v=(0,Or.useCallback)((S,M)=>{M?g.current.add(S):g.current.delete(S),l(g.current.size>0)},[l]);return(0,Or.useEffect)(()=>()=>l(!1),[l]),(0,Ra.jsxs)("div",{className:"office-stage",children:[h?(0,Ra.jsxs)("div",{className:"empty",children:["\u7ACB\u4F53\u753B\u9762\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u53EF\u901A\u8FC7\u6210\u5458\u5217\u8868\u67E5\u770B\u6267\u884C\u8BB0\u5F55\u3002",(0,Ra.jsx)(Oi,{onClick:()=>p(!1),children:"\u91CD\u65B0\u52A0\u8F7D\u7A7A\u95F4"})]}):(0,Ra.jsxs)(u6,{orthographic:!0,shadows:"percentage",dpr:[1,1.5],frameloop:m?"always":"demand",camera:{position:[12,16,18],near:.1,far:100},gl:{antialias:!0,alpha:!0,powerPreference:"low-power"},onCreated:({gl:S})=>S.domElement.addEventListener("webglcontextlost",()=>p(!0),{once:!0}),children:[(0,Ra.jsx)(gae,{count:n.roles.length,reset:c}),(0,Ra.jsx)("ambientLight",{intensity:.85}),(0,Ra.jsx)("hemisphereLight",{args:["#fff7e8","#d3c8b5",.8]}),(0,Ra.jsx)("directionalLight",{position:[-3,12,7],intensity:2.5,castShadow:!0,"shadow-mapSize":[1024,1024],"shadow-camera-left":-15,"shadow-camera-right":15,"shadow-camera-top":15,"shadow-camera-bottom":-15,"shadow-normalBias":.045}),(0,Ra.jsx)(M6,{view:n}),n.roles.map((S,M)=>(0,Ra.jsx)(RV,{role:S,index:M,view:n,selected:e===S.id,onSelect:t,animate:m,snap:o,speed:r,onBusy:v,onActivity:_},(n.session.id||"")+":"+(n.run?.id||"")+":"+S.id))]}),(0,Ra.jsx)("div",{className:"scene-accessibility","aria-label":"\u529E\u516C\u5BA4\u52A8\u6001",children:n.roles.map(S=>{let M=b[S.id];return M&&(0,Ra.jsxs)("span",{"data-employee":S.id,"data-zone":M.zone,"data-moving":String(M.walking),children:[S.name," \xB7 ",M.walking?"\u524D\u5F80":"",M.label]},S.id)})}),(0,Ra.jsxs)("div",{className:"camera-controls glass",children:[(0,Ra.jsx)("span",{children:"\u62D6\u52A8\u65CB\u8F6C \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u53F3\u952E\u5E73\u79FB"}),(0,Ra.jsx)(Oi,{"aria-label":"\u8FD8\u539F\u89C6\u89D2",onClick:()=>f(S=>S+1),children:"\u2302"})]})]})}var Xo=ke(dt(),1);var tT=ke(dt());var PV=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eT=(...n)=>n.filter((e,t,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===t).join(" ").trim();var tx=ke(dt());var DV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var kV=(0,tx.forwardRef)(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:i,className:a="",children:r,iconNode:o,...l},c)=>(0,tx.createElement)("svg",{ref:c,...DV,width:e,height:e,stroke:n,strokeWidth:i?Number(t)*24/Number(e):t,className:eT("lucide",a),...l},[...o.map(([f,h])=>(0,tx.createElement)(f,h)),...Array.isArray(r)?r:[r]]));var On=(n,e)=>{let t=(0,tT.forwardRef)(({className:i,...a},r)=>(0,tT.createElement)(kV,{ref:r,iconNode:e,className:eT(`lucide-${PV(n)}`,i),...a}));return t.displayName=`${n}`,t};var nx=On("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var Ud=On("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bd=On("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var ix=On("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var _u=On("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);var ax=On("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);var rx=On("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);var ox=On("Expand",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]);var sx=On("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);var Kc=On("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var lx=On("LocateFixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var ux=On("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);var cx=On("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var OV=new Set(["completed","error","cancelled","superseded"]),YP=n=>Number.isFinite(n)?n:void 0;function jP(n){if(n===void 0)return"\u2014";let e=Math.max(0,Math.floor(n/1e3));return e<60?`${e}\u79D2`:e<3600?`${Math.floor(e/60)}\u5206${e%60}\u79D2`:`${Math.floor(e/3600)}\u5C0F\u65F6${Math.floor(e%3600/60)}\u5206`}function nT(n){return n===void 0?"\u2014":new Date(n).toLocaleTimeString("zh-CN",{hour12:!1})}function NV(n,e=Date.now()){let t=n.historical?n.asOf??0:e,i=n.frames??RM(n),a=new Map,r=new Map;for(let l of i){if(YP(l.at)===void 0||l.at>t)continue;let c=a.get(l.taskId)||[];c.push(l),a.set(l.taskId,c)}for(let l of n.messages||[]){if(!l.taskId||YP(l.time)===void 0||l.time>t)continue;let c=r.get(l.taskId)||[];c.push(l),r.set(l.taskId,c)}let o=new Map;for(let l of n.run?.tasks||[]){let c=(a.get(l.id)||[]).sort((b,x)=>b.at-x.at),f=[],h,p,m;for(let b of c)b.status==="running"?h===void 0&&(h=b.at,p??=b.at):h!==void 0&&(f.push([h,b.at]),h=void 0),OV.has(b.status)?m??=b.at:m=void 0;if(p===void 0)for(let b of r.get(l.id)||[]){p=p===void 0?b.time:Math.min(p,b.time);let x=YP(b.finishedAt);x!==void 0&&x<=t?(f.push([b.time,x]),m=Math.max(m??0,x)):l.status==="running"&&(h=b.time,m=void 0)}h!==void 0&&f.push([h,t]),OV.has(l.status)||(m=void 0);let g=c[0]?.at??p;o.set(l.id,{startedAt:p,endedAt:m,createdAt:g,elapsedMs:p===void 0?void 0:f.reduce((b,[x,_])=>b+Math.max(0,_-x),0),waitMs:g===void 0||p!==void 0?void 0:Math.max(0,t-g),attempts:f.length})}return o}function zV(n){let e=n.run?.tasks||[],t=new Map(e.map(N=>[N.id,N])),i=new Map,a=0,r=(N,H,X)=>{if(N===H)return;if(!t.has(N)){a++;return}let W=N+"\0"+H;(X==="dependency"||!i.has(W))&&i.set(W,{from:N,to:H,kind:X})};for(let N of e){for(let H of N.handoffFrom||[])r(H,N.id,"handoff");for(let H of N.dependsOn||[])r(H,N.id,"dependency");a+=Math.max(0,(N.dependencyCount||0)-(N.dependsOn?.length||0))+Math.max(0,(N.handoffCount||0)-(N.handoffFrom?.length||0))}let o=new Map(e.map(N=>[N.id,[]])),l=new Map(e.map(N=>[N.id,[]]));for(let N of i.values())o.get(N.from).push(N),l.get(N.to).push(N);let c=new Map(e.map(N=>[N.id,l.get(N.id).length])),f=new Map(e.map(N=>[N.id,0])),h=e.filter(N=>!c.get(N.id)).map(N=>N.id),p=[];for(let N=0;N<h.length;N++){let H=h[N];p.push(H);for(let X of o.get(H))f.set(X.to,Math.max(f.get(X.to),f.get(H)+1)),c.set(X.to,c.get(X.to)-1),c.get(X.to)||h.push(X.to)}let m=p.length!==e.length;if(m)for(let N of e)p.includes(N.id)||(f.set(N.id,0),p.push(N.id));let g=N=>{let H=o.get(N.from).filter(W=>W!==N).map(W=>W.to),X=new Set([N.from]);for(;H.length;){let W=H.pop();if(W===N.to)return!0;X.has(W)||(X.add(W),H.push(...o.get(W).map(Y=>Y.to)))}return!1},b=[...i.values()].filter(N=>!m&&(N.kind==="dependency"||!g(N))),x=[];for(let N of e){let H=f.get(N.id);(x[H]??=[]).push(N)}let _=b.filter(N=>f.get(N.to)-f.get(N.from)>1),v=240,S=76,M=184,T=28,E=24,L=E+Math.min(12,_.length)*12,P=Math.max(1,...x.map(N=>N?.length||0)),I=P*M+(P-1)*T,R=L+I+E,A=x.flatMap((N,H)=>{let X=N.length*M+(N.length-1)*T;return N.map((W,Y)=>({...W,x:E+H*(v+S),y:L+(I-X)/2+Y*(M+T),width:v,height:M,rank:H}))}),D=new Map(A.map(N=>[N.id,N]));return{nodes:A,cyclic:m,missing:a,width:Math.max(v+E*2,E*2+x.length*v+Math.max(0,x.length-1)*S),height:R,edges:b.map(N=>{let H=D.get(N.from),X=D.get(N.to),W=H.x+v,Y=H.y+M/2,V=X.x,G=X.y+M/2,$=W+(V-W)/2,te=_.indexOf(N),ge=te<0?`M ${W} ${Y} H ${$} V ${G} H ${V-8}`:`M ${W} ${Y} H ${W+20} V ${E+te%12*12} H ${V-20} V ${G} H ${V-8}`;return{...N,id:N.from+"\u2192"+N.to,path:ge,targetStatus:X.status}})}}function UV(n,e,t=Date.now()){let i=(n.run?.tasks||[]).filter(h=>h.status!=="superseded"),a=[...e.values()],r=a.map(h=>h.startedAt).filter(h=>h!==void 0),o=a.map(h=>h.endedAt).filter(h=>h!==void 0),l=r.length?Math.min(...r):void 0,c=i.length>0&&i.every(h=>e.get(h.id)?.endedAt!==void 0),f=n.run?.status==="complete"?c&&o.length?Math.max(...o):void 0:n.historical?n.asOf:t;return{total:i.length,completed:i.filter(h=>h.status==="completed").length,running:i.filter(h=>h.status==="running").length,elapsedMs:l===void 0||f===void 0?void 0:Math.max(0,f-l)}}var Ye=ke(pn(),1);function BV({view:n,onSelect:e,network:t=!1,motion:i=!0,visible:a=!0}){let[r,o]=(0,Xo.useState)(Date.now),[l,c]=(0,Xo.useState)(1),f=(0,Xo.useRef)(null),h=(0,Xo.useId)().replace(/:/g,""),p=a&&!n.historical&&n.run?.status==="active";(0,Xo.useEffect)(()=>{if(!p)return;let I=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(I)},[p]);let m=(0,Xo.useMemo)(()=>zV(n),[n]),g=(0,Xo.useMemo)(()=>NV(n,r),[n,r]),b=UV(n,g,r),x=new Map(n.roles.map(I=>[I.id,I])),_=t?150:0,v=m.width+_,S=Math.max(m.height,t?n.roles.length*62+70:0),M=new Map;for(let I of n.messages||[])I.taskId&&M.set(I.taskId,I);let T=t?m.nodes.filter(I=>I.status==="running"&&n.run?.status==="active"&&M.get(I.id)?.health?.state!=="retrying"):[],E=t?m.nodes.map(I=>{let R=n.roles.findIndex(N=>N.id===I.roleId),A=64+R*62,D=I.y+I.height/2;return{task:I,path:`M 116 ${A} C 144 ${A}, 132 ${D}, ${I.x+_-8} ${D}`}}):[],L=()=>{let I=f.current?.querySelector('[data-status="running"]');I&&f.current.scrollTo({left:I.offsetLeft*l-24,top:I.offsetTop*l-24,behavior:"auto"})},P=()=>{f.current&&(c(Math.min(1,(f.current.clientWidth-2)/v)),f.current.scrollTo({left:0,top:0,behavior:"auto"}))};return(0,Ye.jsxs)("section",{className:"pipeline-view","aria-label":"\u534F\u4F5C\u5DE5\u4F5C\u6D41\u6C34\u7EBF",children:[(0,Ye.jsxs)("div",{className:"pipeline-toolbar",children:[(0,Ye.jsxs)("div",{className:"pipeline-metrics",children:[(0,Ye.jsxs)("span",{children:[(0,Ye.jsxs)("strong",{children:[b.completed,"/",b.total]})," \u4EFB\u52A1\u5B8C\u6210"]}),(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("strong",{children:b.running})," \u6B63\u5728\u6267\u884C"]}),(0,Ye.jsxs)("span",{children:["\u6D41\u7A0B\u5386\u65F6 ",(0,Ye.jsx)("strong",{children:jP(b.elapsedMs)})]})]}),(0,Ye.jsxs)("div",{className:"pipeline-controls",children:[(0,Ye.jsxs)(Oi,{onClick:P,children:[(0,Ye.jsx)(ox,{size:14}),"\u9002\u5E94\u5BBD\u5EA6"]}),l<1&&(0,Ye.jsx)(Oi,{onClick:()=>c(1),children:"100%"}),(0,Ye.jsxs)(Oi,{onClick:L,disabled:!b.running,children:[(0,Ye.jsx)(lx,{size:14}),"\u5B9A\u4F4D\u6267\u884C\u4E2D"]})]})]}),(0,Ye.jsxs)("div",{className:"pipeline-legend",children:[(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("i",{className:"edge-key"}),"\u4EFB\u52A1\u4F9D\u8D56"]}),(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("i",{className:"edge-key handoff"}),"\u6D3E\u5DE5 / \u7ED3\u679C\u4EA4\u63A5"]}),(0,Ye.jsxs)("span",{title:"\u5B9E\u9645\u5E76\u53D1\u53D7\u89D2\u8272\u3001\u6587\u4EF6\u8303\u56F4\u548C\u6267\u884C\u540D\u989D\u7EA6\u675F",children:[(0,Ye.jsx)(sx,{size:13}),"\u540C\u5217\u4E3A\u72EC\u7ACB\u5206\u652F"]}),n.historical&&(0,Ye.jsxs)("span",{children:["\u56DE\u653E\u81F3 ",nT(n.asOf)]})]}),m.cyclic&&(0,Ye.jsx)("p",{className:"pipeline-warning",children:"\u90E8\u5206\u65E7\u4EFB\u52A1\u5B58\u5728\u5FAA\u73AF\u5173\u7CFB\uFF0C\u5DF2\u4FDD\u7559\u4EFB\u52A1\u8BE6\u60C5\uFF1B\u8FDE\u7EBF\u6682\u4E0D\u53EF\u7528\u3002"}),m.missing>0&&(0,Ye.jsxs)("p",{className:"pipeline-warning",children:["\u5F53\u524D\u8BB0\u5F55\u7701\u7565\u4E86 ",m.missing," \u9879\u4F9D\u8D56\u6216\u4EA4\u63A5\u5173\u7CFB\uFF0C\u56FE\u4E2D\u4EC5\u8FDE\u63A5\u5DF2\u8BB0\u5F55\u7684\u4EFB\u52A1\u3002"]}),(0,Ye.jsx)("div",{className:"pipeline-scroll",ref:f,tabIndex:0,"aria-label":"\u4EFB\u52A1\u4F9D\u8D56\u56FE\uFF0C\u53EF\u6A2A\u5411\u4E0E\u7EB5\u5411\u6EDA\u52A8",children:(0,Ye.jsx)("div",{className:"pipeline-size",style:{width:v*l,height:S*l},children:(0,Ye.jsxs)("div",{className:"pipeline-canvas",style:{width:v,height:S,transform:`scale(${l})`,transformOrigin:"top left"},children:[(0,Ye.jsxs)("svg",{className:"pipeline-edges",width:v,height:S,"aria-label":"\u4EFB\u52A1\u4E4B\u95F4\u7684\u4F9D\u8D56\u548C\u4EA4\u63A5\u8FDE\u7EBF",role:"img",children:[(0,Ye.jsx)("defs",{children:["dependency","handoff"].map(I=>(0,Ye.jsx)("marker",{id:h+I,markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:(0,Ye.jsx)("path",{d:"M 0 0 L 8 4 L 0 8 z"})},I))}),E.map(I=>(0,Ye.jsxs)("g",{children:[(0,Ye.jsx)("path",{className:"assignment-beam "+I.task.status+" "+(M.get(I.task.id)?.health?.state||""),d:I.path}),i&&T.some(R=>R.id===I.task.id)&&(0,Ye.jsx)("circle",{r:"2.5",className:"dispatch-packet",children:(0,Ye.jsx)("animateMotion",{dur:"3.2s",repeatCount:"indefinite",path:I.path})})]},"assign"+I.task.id)),(0,Ye.jsx)("g",{transform:`translate(${_},0)`,children:m.edges.map(I=>(0,Ye.jsxs)("g",{children:[(0,Ye.jsx)("path",{"data-from":I.from,"data-to":I.to,className:"pipeline-edge "+I.kind+" "+I.targetStatus,d:I.path,markerEnd:`url(#${h+I.kind})`,children:(0,Ye.jsxs)("title",{children:[m.nodes.find(R=>R.id===I.from)?.title," \u2192 ",m.nodes.find(R=>R.id===I.to)?.title," \xB7 ",I.kind==="dependency"?"\u4EFB\u52A1\u4F9D\u8D56":"\u6D3E\u5DE5 / \u7ED3\u679C\u4EA4\u63A5"]})}),t&&i&&T.some(R=>R.id===I.to)&&(0,Ye.jsx)("circle",{r:"2.5",className:"dispatch-packet",children:(0,Ye.jsx)("animateMotion",{dur:"2.7s",repeatCount:"indefinite",path:I.path})})]},I.id))})]}),t&&(0,Ye.jsxs)("div",{className:"network-roster",children:[(0,Ye.jsx)("small",{children:"ACTUAL AGENTS"}),n.roles.map((I,R)=>(0,Ye.jsxs)(Oi,{"data-agent-source":I.id,style:{top:44+R*62},onClick:()=>e(I.id),children:[(0,Ye.jsx)("i",{children:I.name.slice(0,1)}),(0,Ye.jsxs)("span",{children:[I.name,(0,Ye.jsx)("small",{children:I.id===n.run?.coordinatorId?"ORCHESTRATOR":"SPECIALIST"})]}),(0,Ye.jsx)("b",{})]},I.id))]}),m.nodes.map((I,R)=>{let A=g.get(I.id),D=x.get(I.roleId),N=I.status==="running"&&M.get(I.id)?.health?.state==="retrying",H=N?_u:I.status==="completed"?Ud:I.status==="running"?Kc:I.status==="error"?_u:rx;return(0,Ye.jsxs)(Oi,{"data-task-node":I.id,"data-status":I.status,"data-health":I.status==="running"?M.get(I.id)?.health?.state:void 0,className:"pipeline-node "+I.status,style:{left:I.x+_,top:I.y,width:I.width,height:I.height,"--role-color":D?.color||"#8ba588"},onClick:()=>e(I.roleId),"aria-label":`${I.title}\uFF0C${D?.name||I.roleId}\uFF0C${ul[I.status]||I.status}`,children:[(0,Ye.jsxs)("span",{className:"node-top",children:[(0,Ye.jsxs)("span",{className:"node-phase",children:[String(R+1).padStart(2,"0")," \xB7 ",ul[I.phase]||"\u6267\u884C"]}),(0,Ye.jsxs)("span",{className:"node-status",children:[(0,Ye.jsx)(H,{size:12}),N?"\u8FDE\u63A5\u91CD\u8BD5":ul[I.status]||I.status]})]}),(0,Ye.jsx)("strong",{className:"node-title",children:I.title}),(0,Ye.jsxs)("span",{className:"node-role",children:[(0,Ye.jsx)("i",{}),D?.name||I.roleId,I.roleId===n.run?.coordinatorId?" \xB7 \u603B\u8C03\u5EA6":"",(0,Ye.jsx)(nx,{size:12})]}),(0,Ye.jsxs)("span",{className:"node-times",children:[(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("span",{children:"\u5F00\u59CB"}),(0,Ye.jsx)("time",{children:A.startedAt===void 0?I.status==="pending"?"\u5C1A\u672A\u5F00\u59CB":"\u672A\u8BB0\u5F55":nT(A.startedAt)})]}),(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("span",{children:"\u7ED3\u675F"}),(0,Ye.jsx)("time",{children:A.endedAt!==void 0?nT(A.endedAt):I.status==="running"?"\u6267\u884C\u4E2D":"\u2014"})]}),(0,Ye.jsxs)("span",{className:"node-duration",children:[(0,Ye.jsx)("span",{children:A.startedAt===void 0&&I.status==="pending"?"\u5DF2\u7B49\u5F85":"\u6267\u884C\u8017\u65F6"}),(0,Ye.jsx)("strong",{children:jP(A.startedAt===void 0&&I.status==="pending"?A.waitMs:A.elapsedMs)})]})]}),I.waitingReason&&(0,Ye.jsx)("span",{className:"node-wait",title:I.waitingReason,children:I.waitingReason})]},I.id)})]})})}),!m.nodes.length&&(0,Ye.jsx)("p",{className:"pipeline-empty",children:"\u4EFB\u52A1\u5F00\u59CB\u540E\uFF0C\u5B9E\u9645\u6D3E\u5DE5\u3001\u5E76\u884C\u5206\u652F\u3001\u4EA4\u63A5\u548C\u6267\u884C\u65F6\u95F4\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"})]})}var Ge=ke(dt(),1),qD=ke(Ph(),1);var vae=Object.defineProperty,yae=(n,e)=>vae(n,"name",{value:e,configurable:!0});function iT(n,[e,t]){return Math.min(t,Math.max(e,n))}yae(iT,"clamp");var bae=Object.defineProperty,ng=(n,e)=>bae(n,"name",{value:e,configurable:!0}),FV=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ni(n,e,{checkForDefaultPrevented:t=!0}={}){return ng(function(a){if(n?.(a),t===!1||!a||!a.defaultPrevented)return e?.(a)},"handleEvent")}ng(Ni,"composeEventHandlers");function xae(n){if(!FV)throw new Error("Cannot access window outside of the DOM");return n?.ownerDocument?.defaultView??window}ng(xae,"getOwnerWindow");function ZP(n){if(!FV)throw new Error("Cannot access document outside of the DOM");return n?.ownerDocument??document}ng(ZP,"getOwnerDocument");function HV(n,e=!1){let{activeElement:t}=ZP(n);if(!t?.nodeName)return null;if(VV(t)&&t.contentDocument)return HV(t.contentDocument.body,e);if(e){let i=t.getAttribute("aria-activedescendant");if(i){let a=ZP(t).getElementById(i);if(a)return a}}return t}ng(HV,"getActiveElement");function VV(n){return n.tagName==="IFRAME"}ng(VV,"isFrame");var xs=ke(dt(),1);var jo=ke(dt(),1),KP=ke(pn(),1),_ae=Object.defineProperty,Yo=(n,e)=>_ae(n,"name",{value:e,configurable:!0});function Sae(n,e){let t=jo.createContext(e);t.displayName=n+"Context";let i=Yo(r=>{let{children:o,...l}=r,c=jo.useMemo(()=>l,Object.values(l));return(0,KP.jsx)(t.Provider,{value:c,children:o})},"Provider");i.displayName=n+"Provider";function a(r,o={}){let{optional:l=!1}=o,c=jo.useContext(t);if(c)return c;if(e!==void 0)return e;if(!l)throw new Error(`\`${r}\` must be used within \`${n}\``)}return Yo(a,"useContext"),[i,a]}Yo(Sae,"createContext");function Su(n,e=[]){let t=[];function i(r,o){let l=jo.createContext(o);l.displayName=r+"Context";let c=t.length;t=[...t,o];let f=Yo(p=>{let{scope:m,children:g,...b}=p,x=m?.[n]?.[c]||l,_=jo.useMemo(()=>b,Object.values(b));return(0,KP.jsx)(x.Provider,{value:_,children:g})},"Provider");f.displayName=r+"Provider";function h(p,m,g={}){let{optional:b=!1}=g,x=m?.[n]?.[c]||l,_=jo.useContext(x);if(_)return _;if(o!==void 0)return o;if(!b)throw new Error(`\`${p}\` must be used within \`${r}\``)}return Yo(h,"useContext"),[f,h]}Yo(i,"createContext");let a=Yo(()=>{let r=t.map(o=>jo.createContext(o));return Yo(function(l){let c=l?.[n]||r;return jo.useMemo(()=>({[`__scope${n}`]:{...l,[n]:c}}),[l,c])},"useScope")},"createScope");return a.scopeName=n,[i,GV(a,...e)]}Yo(Su,"createContextScope");function GV(...n){let e=n[0];if(n.length===1)return e;let t=Yo(()=>{let i=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return Yo(function(r){let o=i.reduce((l,{useScope:c,scopeName:f})=>{let p=c(r)[`__scope${f}`];return{...l,...p}},{});return jo.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return t.scopeName=e.scopeName,t}Yo(GV,"composeContextScopes");var WV=ke(dt(),1),wae=Object.defineProperty,JP=(n,e)=>wae(n,"name",{value:e,configurable:!0});function QP(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}JP(QP,"setRef");function qV(...n){return e=>{let t=!1,i=n.map(a=>{let r=QP(a,e);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let a=0;a<i.length;a++){let r=i[a];typeof r=="function"?r():QP(n[a],null)}}}}JP(qV,"composeRefs");function Nn(...n){return WV.useCallback(qV(...n),n)}JP(Nn,"useComposedRefs");var Ia=ke(dt(),1);var Mae=Object.defineProperty,yo=(n,e)=>Mae(n,"name",{value:e,configurable:!0});function bs(n){let e=Ia.forwardRef((t,i)=>{let{children:a,...r}=t,o=null,l=!1,c=[];a=QV(a),Ia.Children.forEach(a,m=>{if(ZV(m)){l=!0;let g=m,b="child"in g.props?g.props.child:g.props.children;for(;$P(b)&&typeof aT=="function";)b=aT(b._payload);o=Cae(g,b),c.push(o?.props?.children)}else c.push(m)}),o?o=Ia.cloneElement(o,void 0,c):!l&&Ia.Children.count(a)===1&&Ia.isValidElement(a)&&(o=a);let f=o?jV(o):void 0,h=Nn(i,f);if(!o){if(a||a===0)throw new Error(l?Lae(n):Aae(n));return a}let p=YV(r,o.props??{});return o.type!==Ia.Fragment&&(p.ref=i?h:f),Ia.cloneElement(o,p)});return e.displayName=`${n}.Slot`,e}yo(bs,"createSlot");var XV=Symbol.for("radix.slottable");function Tae(n){let e=yo(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${n}.Slottable`,e.__radixId=XV,e}yo(Tae,"createSlottable");var Cae=yo((n,e)=>"child"in n.props?Ia.isValidElement(e)?Ia.cloneElement(e,void 0,n.props.children(e.props.children)):null:Ia.isValidElement(e)?e:null,"getSlottableElementFromSlottable");function YV(n,e){let t={...e};for(let i in e){let a=n[i],r=e[i];/^on[A-Z]/.test(i)?a&&r?t[i]=(...l)=>{let c=r(...l);return a(...l),c}:a&&(t[i]=a):i==="style"?t[i]={...a,...r}:i==="className"?t[i]=[a,r].filter(Boolean).join(" "):i==="aria-describedby"&&(t[i]=JV(r,a))}return{...n,...t}}yo(YV,"mergeProps");function jV(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}yo(jV,"getElementRef");function ZV(n){return Ia.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===XV}yo(ZV,"isSlottable");var Eae=Symbol.for("react.lazy");function $P(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Eae&&"_payload"in n&&KV(n._payload)}yo($P,"isLazyComponent");function KV(n){return typeof n=="object"&&n!==null&&"then"in n}yo(KV,"isPromiseLike");function QV(n){let e=n;for(;$P(e)&&typeof aT=="function";)e=aT(e._payload);return e}yo(QV,"useUnwrappedLazy");function JV(...n){let e=new Set;for(let t of n)if(typeof t=="string")for(let i of String(t).trim().split(/\s+/))i&&e.add(i);return e.size>0?Array.from(e).join(" "):void 0}yo(JV,"concatAriaDescribedby");var Aae=yo(n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Lae=yo(n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),aT=Ia[" use ".trim().toString()];var oT=ke(pn(),1),Ji=ke(dt(),1);var $V=ke(dt(),1),In=globalThis?.document?$V.useLayoutEffect:()=>{};var Qc=ke(pn(),1);var Rae=Object.defineProperty,Qi=(n,e)=>Rae(n,"name",{value:e,configurable:!0});function eD(n){let e=n+"CollectionProvider",[t,i]=Su(e),[a,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=Qi(x=>{let{scope:_,children:v}=x,S=xs.useRef(null),M=xs.useRef(new Map).current;return(0,oT.jsx)(a,{scope:_,itemMap:M,collectionRef:S,children:v})},"CollectionProvider");o.displayName=e;let l=n+"CollectionSlot",c=bs(l),f=xs.forwardRef((x,_)=>{let{scope:v,children:S}=x,M=r(l,v),T=Nn(_,M.collectionRef);return(0,oT.jsx)(c,{ref:T,children:S})});f.displayName=l;let h=n+"CollectionItemSlot",p="data-radix-collection-item",m=bs(h),g=xs.forwardRef((x,_)=>{let{scope:v,children:S,...M}=x,T=xs.useRef(null),E=Nn(_,T),L=r(h,v);return xs.useEffect(()=>(L.itemMap.set(T,{ref:T,...M}),()=>{L.itemMap.delete(T)})),(0,oT.jsx)(m,{[p]:"",ref:E,children:S})});g.displayName=h;function b(x){let _=r(n+"CollectionConsumer",x);return xs.useCallback(()=>{let S=_.collectionRef.current;if(!S)return[];let M=Array.from(S.querySelectorAll(`[${p}]`));return Array.from(_.itemMap.values()).sort((L,P)=>M.indexOf(L.ref.current)-M.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return Qi(b,"useCollection"),[{Provider:o,Slot:f,ItemSlot:g},b,i]}Qi(eD,"createCollection");var e8=new WeakMap,Mi,bo,rT=(bo=class extends Map{constructor(t){super(t);zO(this,Mi);ME(this,Mi,[...super.keys()]),e8.set(this,!0)}set(t,i){return e8.get(this)&&!this.has(t)&&Sa(this,Mi).push(t),super.set(t,i),this}insert(t,i,a){let r=this.has(i),o=r?this.size:this.size+1,l=tD(t),c=l>=0?Math.min(l,o-1):Math.max(o+l,0);if(r?Sa(this,Mi).indexOf(i)===c:c===this.size)return this.set(i,a),this;let f=Sa(this,Mi).filter(p=>p!==i);f.splice(c,0,i);let h=f.map(p=>[p,p===i?a:this.get(p)]);this.clear();for(let[p,m]of h)this.set(p,m);return this}with(t,i,a){let r=new bo(this);return r.insert(t,i,a),r}before(t){let i=Sa(this,Mi).indexOf(t)-1;if(!(i<0))return this.entryAt(i)}setBefore(t,i,a){let r=Sa(this,Mi).indexOf(t);if(r===-1)return this;let o=Sa(this,Mi).indexOf(i),l=o!==-1&&o<r?r-1:r;return this.insert(l,i,a)}after(t){let i=Sa(this,Mi).indexOf(t);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(t,i,a){let r=Sa(this,Mi).indexOf(t);if(r===-1)return this;let o=Sa(this,Mi).indexOf(i),l=o!==-1&&o<=r?r:r+1;return this.insert(l,i,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ME(this,Mi,[]),super.clear()}delete(t){let i=super.delete(t);return i&&Sa(this,Mi).splice(Sa(this,Mi).indexOf(t),1),i}deleteAt(t){let i=this.keyAt(t);return i!==void 0?this.delete(i):!1}at(t){let i=sT(Sa(this,Mi),t);if(i!==void 0)return this.get(i)}entryAt(t){let i=sT(Sa(this,Mi),t);if(i!==void 0)return[i,this.get(i)]}indexOf(t){return Sa(this,Mi).indexOf(t)}keyAt(t){return sT(Sa(this,Mi),t)}from(t,i){let a=this.indexOf(t);if(a===-1)return;let r=a+i;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(t,i){let a=this.indexOf(t);if(a===-1)return;let r=a+i;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(t,i){let a=0;for(let r of this){if(Reflect.apply(t,i,[r,a,this]))return r;a++}}findIndex(t,i){let a=0;for(let r of this){if(Reflect.apply(t,i,[r,a,this]))return a;a++}return-1}filter(t,i){let a=[],r=0;for(let o of this)Reflect.apply(t,i,[o,r,this])&&a.push(o),r++;return new bo(a)}map(t,i){let a=[],r=0;for(let o of this)a.push([o[0],Reflect.apply(t,i,[o,r,this])]),r++;return new bo(a)}reduce(...t){let[i,a]=t,r=t.length>1;if(!r&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let o=0,l=a;for(let c of this)o===0&&!r?l=c:l=Reflect.apply(i,this,[l,c,o,this]),o++;return l}reduceRight(...t){let[i,a]=t,r=t.length>1;if(!r&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let o=a;for(let l=this.size-1;l>=0;l--){let c=this.entryAt(l);l===this.size-1&&!r?o=c:o=Reflect.apply(i,this,[o,c,l,this])}return o}sort(t){if(typeof t!="function")throw new TypeError("OrderedDict.sort requires a compare function");let i=[...this.entries()].sort(t);this.clear();for(let[a,r]of i)this.set(a,r);return this}toSorted(t){if(typeof t!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");let i=[...this.entries()].sort(t);return new bo(i)}toReversed(){let t=new bo;for(let i=this.size-1;i>=0;i--){let a=this.keyAt(i),r=this.get(a);t.set(a,r)}return t}toSpliced(...t){let i=[...this.entries()];return i.splice(...t),new bo(i)}slice(t,i){let a=new bo;for(let r of Sa(this,Mi).slice(t,i))a.set(r,this.get(r));return a}every(t,i){let a=0;for(let r of this){if(!Reflect.apply(t,i,[r,a,this]))return!1;a++}return!0}some(t,i){let a=0;for(let r of this){if(Reflect.apply(t,i,[r,a,this]))return!0;a++}return!1}},Mi=new WeakMap,Qi(bo,"OrderedDict"),bo);function sT(n,e){if("at"in Array.prototype)return Array.prototype.at.call(n,e);let t=t8(n,e);return t===-1?void 0:n[t]}Qi(sT,"at");function t8(n,e){let t=n.length,i=tD(e),a=i>=0?i:t+i;return a<0||a>=t?-1:a}Qi(t8,"toSafeIndex");function tD(n){return n!==n||n===0?0:Math.trunc(n)}Qi(tD,"toSafeInteger");function Iae(n){let e=n+"CollectionProvider",[t,i]=Su(e),[a,r]=t(e);a.displayName=n+"CollectionStableContextProvider";let[o,l]=t(e);o.displayName=n+"CollectionStatefulContextProvider";let c=Qi(({state:L,...P})=>L?(0,Qc.jsx)(h,{...P,state:L}):(0,Qc.jsx)(f,{...P}),"CollectionProvider");c.displayName=e;let f=Qi(L=>{let P=S();return(0,Qc.jsx)(h,{...L,state:P})},"CollectionInit");f.displayName=n+"CollectionInit";let h=Qi(L=>{let{scope:P,children:I,state:R}=L,A=Ji.useRef(null),[D,N]=Ji.useState(null),H=Nn(A,N),[X,W]=R,Y=Ji.useRef(new rT),V=Ji.useCallback(()=>{let G=Y.current;return a8(G)||G.sort(lT),G},[]);return Ji.useEffect(()=>{if(!D)return;let G=r8(()=>{W($=>{let te=$.toSorted(lT);return te.some(([Le],je)=>$.keyAt(je)!==Le)?te:$})});return G.observe(D,{childList:!0,subtree:!0}),()=>{G.disconnect()}},[D,W]),(0,Qc.jsx)(a,{scope:P,collectionElementRef:H,collectionElementRefObject:A,getCollection:V,setCollection:W,registryRef:Y,children:(0,Qc.jsx)(o,{scope:P,collectionElement:D,collection:X,children:I})})},"CollectionProviderImpl");h.displayName=n+"CollectionProviderImpl";let p=n+"CollectionSlot",m=bs(p),g=Ji.forwardRef((L,P)=>{let{scope:I,children:R}=L,A=r(p,I),D=Nn(P,A.collectionElementRef);return(0,Qc.jsx)(m,{ref:D,children:R})});g.displayName=p;let b=n+"CollectionItemSlot",x="data-radix-collection-item",_=bs(b),v=Ji.forwardRef((L,P)=>{let{scope:I,children:R,...A}=L,D=Ji.useRef(null),N=r(b,I),{setCollection:H,registryRef:X}=N,W=Ji.useRef(A);n8(W.current,A)||(W.current=A);let Y=W.current,V=Ji.useCallback(te=>{let ge=X.current;te?ge.set(te,{...W.current,element:te}):D.current&&ge.delete(D.current)},[X]),G=Nn(P,V,D);In(()=>{let te=D.current,ge=X.current;te&&ge.has(te)&&ge.set(te,{...Y,element:te})},[Y,X]);let $=Ji.useRef(null);return Ji.useEffect(()=>{let te=D.current,ge=$.current;(ge?.element??null)===te&&(!te||ge?.itemData===Y)||($.current=te?{element:te,itemData:Y}:null,H(Le=>{let je=new rT(Le);return ge&&ge.element!==te&&je.delete(ge.element),te&&je.set(te,{...Y,element:te}),je.sort(lT)}))}),Ji.useEffect(()=>()=>{let te=$.current;$.current=null,te&&H(ge=>{if(!ge.has(te.element))return ge;let Le=new rT(ge);return Le.delete(te.element),Le})},[H]),(0,Qc.jsx)(_,{[x]:"",ref:G,children:R})});v.displayName=b;function S(){return Ji.useState(new rT)}Qi(S,"useInitCollection");function M(L){let{collection:P}=l(n+"CollectionConsumer",L);return P}Qi(M,"useCollection");function T(L){let{getCollection:P}=r(n+"CollectionConsumer",L);return P}return Qi(T,"useGetCollection"),[{Provider:c,Slot:g,ItemSlot:v},{createCollectionScope:i,useCollection:M,useGetCollection:T,useInitCollection:S}]}Qi(Iae,"createCollection");function n8(n,e){if(n===e)return!0;if(typeof n!="object"||typeof e!="object"||n==null||e==null)return!1;let t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(let a of t)if(!Object.prototype.hasOwnProperty.call(e,a)||n[a]!==e[a])return!1;return!0}Qi(n8,"shallowEqual");function i8(n,e){return!!(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}Qi(i8,"isElementPreceding");function a8(n){let e;for(let t of n.keys()){if(e){let i=e.compareDocumentPosition(t);if(!(i&Node.DOCUMENT_POSITION_DISCONNECTED)&&i&Node.DOCUMENT_POSITION_PRECEDING)return!1}e=t}return!0}Qi(a8,"isInDocumentOrder");function lT(n,e){return!n[1].element||!e[1].element?0:i8(n[1].element,e[1].element)?-1:1}Qi(lT,"sortByDocumentPosition");function r8(n){return new MutationObserver(t=>{for(let i of t)if(i.type==="childList"){n();return}})}Qi(r8,"getChildListObserver");var uT=ke(dt(),1),kae=ke(pn(),1),Pae=Object.defineProperty,Dae=(n,e)=>Pae(n,"name",{value:e,configurable:!0}),Oae={LTR:"ltr",RTL:"rtl"},Nae=uT.createContext(void 0);function nD(n){let e=uT.useContext(Nae);return n||e||Oae.LTR}Dae(nD,"useDirection");var Tn=ke(dt(),1);var o8=ke(dt(),1),s8=ke(Ph(),1);var l8=ke(pn(),1),zae=Object.defineProperty,Uae=(n,e)=>zae(n,"name",{value:e,configurable:!0}),Bae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$i=Bae.reduce((n,e)=>{let t=bs(`Primitive.${e}`),i=o8.forwardRef((a,r)=>{let{asChild:o,...l}=a,c=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,l8.jsx)(c,{...l,ref:r})});return i.displayName=`Primitive.${e}`,{...n,[e]:i}},{});function iD(n,e){n&&s8.flushSync(()=>n.dispatchEvent(e))}Uae(iD,"dispatchDiscreteCustomEvent");var fx=ke(dt(),1),Fae=Object.defineProperty,Hae=(n,e)=>Fae(n,"name",{value:e,configurable:!0}),u8=fx[" useInsertionEffect ".trim().toString()];function Nr(n){let e=fx.useRef(n);return typeof u8=="function"?u8(()=>{e.current=n}):In(()=>{e.current=n}),fx.useMemo(()=>((...t)=>e.current?.(...t)),[])}Hae(Nr,"useCallbackRef");var f8=ke(pn(),1),Vae=Object.defineProperty,pa=(n,e)=>Vae(n,"name",{value:e,configurable:!0}),aD="dismissableLayer.update",Gae="dismissableLayer.pointerDownOutside",Wae="dismissableLayer.focusOutside",c8,d8=Tn.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),h8=Tn.forwardRef(pa(function(e,t){let{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...h}=e,p=Tn.useContext(d8),[m,g]=Tn.useState(null),b=m?.ownerDocument??globalThis?.document,[,x]=Tn.useState({}),_=Nn(t,g),v=Array.from(p.layers),[S]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),M=S?v.indexOf(S):-1,T=m?v.indexOf(m):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,L=T>=M,P=Tn.useRef(!1),I=p8(N=>{o?.(N),c?.(N),N.defaultPrevented||f?.()},{ownerDocument:b,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:Tn.useCallback(N=>{if(!(N instanceof Node))return!1;let H=[...p.branches].some(X=>X.contains(N));return L&&!H},[p.branches,L])}),R=m8(N=>{if(a&&P.current)return;let H=N.target;[...p.branches].some(W=>W.contains(H))||(l?.(N),c?.(N),N.defaultPrevented||f?.())},b),A=m?T===v.length-1:!1,D=Nr(N=>{N.key==="Escape"&&(r?.(N),!N.defaultPrevented&&f&&(N.preventDefault(),f()))});return Tn.useEffect(()=>{if(A)return b.addEventListener("keydown",D,{capture:!0}),()=>b.removeEventListener("keydown",D,{capture:!0})},[b,A,D]),Tn.useEffect(()=>{if(m)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(c8=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),rD(),()=>{i&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=c8))}},[m,b,i,p]),Tn.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),rD())},[m,p]),Tn.useEffect(()=>{let N=pa(()=>x({}),"handleUpdate");return document.addEventListener(aD,N),()=>document.removeEventListener(aD,N)},[]),(0,f8.jsx)($i.div,{...h,ref:_,style:{pointerEvents:E?L?"auto":"none":void 0,...e.style},onFocusCapture:Ni(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ni(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ni(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function qae(){let n=Tn.useContext(d8),[e,t]=Tn.useState(null);return Tn.useEffect(()=>{if(e)return n.dismissableSurfaces.add(e),()=>{n.dismissableSurfaces.delete(e)}},[e,n.dismissableSurfaces]),t}pa(qae,"useDismissableLayerSurface");var Xae=pa(()=>!0,"IS_TRUE");function p8(n,e){let{ownerDocument:t=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:r,shouldHandlePointerDownOutside:o=Xae}=e,l=Nr(n),c=Tn.useRef(!1),f=Tn.useRef(!1),h=Tn.useRef(new Map),p=Tn.useRef(()=>{});return Tn.useEffect(()=>{function m(){f.current=!1,a.current=!1,h.current.clear()}pa(m,"resetOutsideInteraction");function g(){return Array.from(h.current.values()).some(Boolean)}pa(g,"isOutsideInteractionIntercepted");function b(M){if(!f.current)return;let T=M.target;T instanceof Node&&[...r].some(L=>L.contains(T))||h.current.set(M.type,!0),M.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}pa(b,"handleInteractionCapture");function x(M){f.current&&h.current.set(M.type,!1)}pa(x,"handleInteractionBubble");let _=pa(M=>{if(M.target&&!c.current){let E=function(){t.removeEventListener("click",p.current);let P=g();m(),P||oD(Gae,l,L,{discrete:!0})};var T=E;if(pa(E,"handleAndDispatchPointerDownOutsideEvent"),!o(M.target)){t.removeEventListener("click",p.current),m(),c.current=!1;return}let L={originalEvent:M};f.current=!0,a.current=i&&M.button===0,h.current.clear(),!i||M.button!==0?E():(t.removeEventListener("click",p.current),p.current=E,t.addEventListener("click",p.current,{once:!0}))}else t.removeEventListener("click",p.current),m();c.current=!1},"handlePointerDown"),v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let M of v)t.addEventListener(M,b,!0),t.addEventListener(M,x);let S=window.setTimeout(()=>{t.addEventListener("pointerdown",_)},0);return()=>{window.clearTimeout(S),t.removeEventListener("pointerdown",_),t.removeEventListener("click",p.current);for(let M of v)t.removeEventListener(M,b,!0),t.removeEventListener(M,x)}},[t,l,i,a,r,o]),{onPointerDownCapture:pa(()=>c.current=!0,"onPointerDownCapture")}}pa(p8,"usePointerDownOutside");function m8(n,e=globalThis?.document){let t=Nr(n),i=Tn.useRef(!1);return Tn.useEffect(()=>{let a=pa(r=>{r.target&&!i.current&&oD(Wae,t,{originalEvent:r},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,t]),{onFocusCapture:pa(()=>i.current=!0,"onFocusCapture"),onBlurCapture:pa(()=>i.current=!1,"onBlurCapture")}}pa(m8,"useFocusOutside");function rD(){let n=new CustomEvent(aD);document.dispatchEvent(n)}pa(rD,"dispatchUpdate");function oD(n,e,t,{discrete:i}){let a=t.originalEvent.target,r=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&a.addEventListener(n,e,{once:!0}),i?iD(a,r):a.dispatchEvent(r)}pa(oD,"handleAndDispatchCustomEvent");var g8=ke(dt(),1),Yae=Object.defineProperty,lD=(n,e)=>Yae(n,"name",{value:e,configurable:!0}),cT=0,ig=null;function jae(n){return fT(),n.children}lD(jae,"FocusGuards");function fT(){g8.useEffect(()=>{ig||(ig={start:sD(),end:sD()});let{start:n,end:e}=ig;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),cT++,()=>{cT===1&&(ig?.start.remove(),ig?.end.remove(),ig=null),cT=Math.max(0,cT-1)}},[])}lD(fT,"useFocusGuards");function sD(){let n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}lD(sD,"createFocusGuard");var si=ke(dt(),1);var hD=ke(pn(),1),Zae=Object.defineProperty,zi=(n,e)=>Zae(n,"name",{value:e,configurable:!0}),uD="focusScope.autoFocusOnMount",cD="focusScope.autoFocusOnUnmount",v8={bubbles:!1,cancelable:!0},b8=si.forwardRef(zi(function(e,t){let{loop:i=!1,trapped:a=!1,branches:r,onMountAutoFocus:o,onUnmountAutoFocus:l,...c}=e,[f,h]=si.useState(null),p=Nr(o),m=Nr(l),g=si.useRef(null),b=Nn(t,h),x=si.useRef(r);si.useEffect(()=>{x.current=r});let _=si.useCallback(M=>M?f?.contains(M)?!0:!!x.current?.some(T=>T.contains(M)):!1,[f]),v=si.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;si.useEffect(()=>{if(a){let L=function(A){if(v.paused||!f)return;let D=A.target;_(D)?g.current=D:wu(g.current,{select:!0})},P=function(A){if(v.paused||!f)return;let D=A.relatedTarget;D!==null&&(_(D)||wu(g.current,{select:!0}))},I=function(A){if(document.activeElement===document.body)for(let N of A)N.removedNodes.length>0&&wu(f)};var M=L,T=P,E=I;zi(L,"handleFocusIn"),zi(P,"handleFocusOut"),zi(I,"handleMutations"),document.addEventListener("focusin",L),document.addEventListener("focusout",P);let R=new MutationObserver(I);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",L),document.removeEventListener("focusout",P),R.disconnect()}}},[a,f,v.paused,_]),si.useEffect(()=>{if(f){y8.add(v);let M=document.activeElement;if(!f.contains(M)){let E=new CustomEvent(uD,v8);f.addEventListener(uD,p),f.dispatchEvent(E),E.defaultPrevented||(_8(C8(pD(f)),{select:!0}),document.activeElement===M&&wu(f))}return()=>{f.removeEventListener(uD,p);let E=f.ownerDocument,L=CustomEvent;setTimeout(()=>{let P=new L(cD,v8);f.addEventListener(cD,m),f.dispatchEvent(P),P.defaultPrevented||wu(M??E.body,{select:!0}),f.removeEventListener(cD,m),y8.remove(v)},0)}}},[f,p,m,v]);let S=si.useCallback(M=>{if(!i&&!a||v.paused)return;let T=M.key==="Tab"&&!M.altKey&&!M.ctrlKey&&!M.metaKey,E=document.activeElement;if(T&&E){let L=M.currentTarget,[P,I]=S8(L);P&&I?!M.shiftKey&&E===I?(M.preventDefault(),i&&wu(P,{select:!0})):M.shiftKey&&E===P&&(M.preventDefault(),i&&wu(I,{select:!0})):E===L&&M.preventDefault()}},[i,a,v.paused]);return(0,hD.jsx)($i.div,{tabIndex:-1,...c,ref:b,onKeyDown:S})},"FocusScope")),x8=si.createContext(null);function Kae({registry:n,children:e}){return n?(0,hD.jsx)(x8.Provider,{value:n,children:e}):e}zi(Kae,"FocusScopeBranchProvider");function Qae(){let[n,e]=si.useState([]),t=si.useMemo(()=>({add:zi(i=>e(a=>a.includes(i)?a:[...a,i]),"add"),remove:zi(i=>e(a=>a.filter(r=>r!==i)),"remove")}),[]);return{nodes:n,registry:t}}zi(Qae,"useFocusScopeBranchRegistry");function Jae(n){let e=si.useContext(x8);si.useEffect(()=>{if(!(!n||!e))return e.add(n),()=>e.remove(n)},[n,e])}zi(Jae,"useFocusScopeBranch");function _8(n,{select:e=!1}={}){let t=document.activeElement;for(let i of n)if(wu(i,{select:e}),document.activeElement!==t)return}zi(_8,"focusFirst");function S8(n){let e=pD(n),t=fD(e,n),i=fD(e.reverse(),n);return[t,i]}zi(S8,"getTabbableEdges");function pD(n){let e=[],i=n.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:zi(a=>{let r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;i.nextNode();)e.push(i.currentNode);return e}zi(pD,"getTabbableCandidates");function fD(n,e){let t=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(let i of n)if(!(t?!i.checkVisibility({checkVisibilityCSS:!0}):w8(i,{upTo:e})))return i}zi(fD,"findVisible");function w8(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}zi(w8,"isHidden");function M8(n){return n.tagName==="INPUT"&&typeof n.select=="function"}zi(M8,"isSelectableInput");function wu(n,{select:e=!1}={}){if(n&&n.focus){let i=(n.ownerDocument??document).activeElement;n.focus({preventScroll:!0}),n!==i&&M8(n)&&e&&n.select()}}zi(wu,"focus");var y8=T8();function T8(){let n=[];return{add(e){let t=n[0];e!==t&&t?.pause(),n=dD(n,e),n.unshift(e)},remove(e){n=dD(n,e),n[0]?.resume()}}}zi(T8,"createFocusScopesStack");function dD(n,e){let t=[...n],i=t.indexOf(e);return i!==-1&&t.splice(i,1),t}zi(dD,"arrayRemove");function C8(n){return n.filter(e=>e.tagName!=="A")}zi(C8,"removeLinks");var mD=ke(dt(),1);var $ae=Object.defineProperty,ere=(n,e)=>$ae(n,"name",{value:e,configurable:!0}),tre=mD[" useId ".trim().toString()]||(()=>{}),nre=0;function dT(n){let[e,t]=mD.useState(tre());return In(()=>{n||t(i=>i??String(nre++))},[n]),n||(e?`radix-${e}`:"")}ere(dT,"useId");var Ka=ke(dt(),1);var L8=["top","right","bottom","left"];var pl=Math.min,_s=Math.max,hx=Math.round,px=Math.floor,ml=n=>({x:n,y:n}),ire={left:"right",right:"left",bottom:"top",top:"bottom"};function gD(n,e,t){return _s(n,pl(e,t))}function gl(n,e){return typeof n=="function"?n(e):n}function Mu(n){return n.split("-")[0]}function Fd(n){return n.split("-")[1]}function pT(n){return n==="x"?"y":"x"}function mT(n){return n==="y"?"height":"width"}function Ss(n){let e=n[0];return e==="t"||e==="b"?"y":"x"}function gT(n){return pT(Ss(n))}function R8(n,e,t){t===void 0&&(t=!1);let i=Fd(n),a=gT(n),r=mT(a),o=a==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=dx(o)),[o,dx(o)]}function I8(n){let e=dx(n);return[hT(n),e,hT(e)]}function hT(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var E8=["left","right"],A8=["right","left"],are=["top","bottom"],rre=["bottom","top"];function ore(n,e,t){switch(n){case"top":case"bottom":return t?e?A8:E8:e?E8:A8;case"left":case"right":return e?are:rre;default:return[]}}function P8(n,e,t,i){let a=Fd(n),r=ore(Mu(n),t==="start",i);return a&&(r=r.map(o=>o+"-"+a),e&&(r=r.concat(r.map(hT)))),r}function dx(n){let e=Mu(n);return ire[e]+n.slice(e.length)}function sre(n){var e,t,i,a;return{top:(e=n.top)!=null?e:0,right:(t=n.right)!=null?t:0,bottom:(i=n.bottom)!=null?i:0,left:(a=n.left)!=null?a:0}}function vD(n){return typeof n!="number"?sre(n):{top:n,right:n,bottom:n,left:n}}function Hd(n){let{x:e,y:t,width:i,height:a}=n;return{width:i,height:a,top:t,left:e,right:e+i,bottom:t+a,x:e,y:t}}function D8(n,e,t){let{reference:i,floating:a}=n,r=Ss(e),o=gT(e),l=mT(o),c=Mu(e),f=r==="y",h=i.x+i.width/2-a.width/2,p=i.y+i.height/2-a.height/2,m=i[l]/2-a[l]/2,g;switch(c){case"top":g={x:h,y:i.y-a.height};break;case"bottom":g={x:h,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:p};break;case"left":g={x:i.x-a.width,y:p};break;default:g={x:i.x,y:i.y}}let b=Fd(e);return b&&(g[o]+=m*(b==="end"?1:-1)*(t&&f?-1:1)),g}async function N8(n,e){var t;e===void 0&&(e={});let{x:i,y:a,platform:r,rects:o,elements:l,strategy:c}=n,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=gl(e,n),b=vD(g),_=l[m?p==="floating"?"reference":"floating":p],v=Hd(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(_)))==null||t?_:_.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:c})),S=p==="floating"?{x:i,y:a,width:o.floating.width,height:o.floating.height}:o.reference,M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),T=await(r.isElement==null?void 0:r.isElement(M))&&await(r.getScale==null?void 0:r.getScale(M))||{x:1,y:1},E=Hd(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:M,strategy:c}):S);return{top:(v.top-E.top+b.top)/T.y,bottom:(E.bottom-v.bottom+b.bottom)/T.y,left:(v.left-E.left+b.left)/T.x,right:(E.right-v.right+b.right)/T.x}}var lre=50,z8=async(n,e,t)=>{let{placement:i="bottom",strategy:a="absolute",middleware:r=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:N8},c=await(o.isRTL==null?void 0:o.isRTL(e)),f=await o.getElementRects({reference:n,floating:e,strategy:a}),{x:h,y:p}=D8(f,i,c),m=i,g=0,b={};for(let x=0;x<r.length;x++){let _=r[x];if(!_)continue;let{name:v,fn:S}=_,{x:M,y:T,data:E,reset:L}=await S({x:h,y:p,initialPlacement:i,placement:m,strategy:a,middlewareData:b,rects:f,platform:l,elements:{reference:n,floating:e}});h=M??h,p=T??p,b[v]={...b[v],...E},L&&g<lre&&(g++,typeof L=="object"&&(L.placement&&(m=L.placement),L.rects&&(f=L.rects===!0?await o.getElementRects({reference:n,floating:e,strategy:a}):L.rects),{x:h,y:p}=D8(f,m,c)),x=-1)}return{x:h,y:p,placement:m,strategy:a,middlewareData:b}},U8=n=>({name:"arrow",options:n,async fn(e){let{x:t,y:i,placement:a,rects:r,platform:o,elements:l,middlewareData:c}=e,{element:f,padding:h=0}=gl(n,e)||{};if(f==null)return{};let p=vD(h),m={x:t,y:i},g=gT(a),b=mT(g),x=await o.getDimensions(f),_=g==="y",v=_?"top":"left",S=_?"bottom":"right",M=_?"clientHeight":"clientWidth",T=r.reference[b]+r.reference[g]-m[g]-r.floating[b],E=m[g]-r.reference[g],L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f)),P=L?L[M]:0;(!P||!await(o.isElement==null?void 0:o.isElement(L)))&&(P=l.floating[M]||r.floating[b]);let I=T/2-E/2,R=P/2-x[b]/2-1,A=pl(p[v],R),D=pl(p[S],R),N=P-x[b]-D,H=P/2-x[b]/2+I,X=gD(A,H,N),W=!c.arrow&&Fd(a)!=null&&H!==X&&r.reference[b]/2-(H<A?A:D)-x[b]/2<0,Y=W?H<A?H-A:H-N:0;return{[g]:m[g]+Y,data:{[g]:X,centerOffset:H-X-Y,...W&&{alignmentOffset:Y}},reset:W}}});var B8=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,i;let{placement:a,middlewareData:r,rects:o,initialPlacement:l,platform:c,elements:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,..._}=gl(n,e);if((t=r.arrow)!=null&&t.alignmentOffset)return{};let v=Mu(a),S=Ss(l),M=Mu(l)===l,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),E=m||(M||!x?[dx(l)]:I8(l)),L=b!=="none";!m&&L&&E.push(...P8(l,x,b,T));let P=[l,...E],I=await c.detectOverflow(e,_),R=[],A=((i=r.flip)==null?void 0:i.overflows)||[];if(h&&R.push(I[v]),p){let X=R8(a,o,T);R.push(I[X[0]],I[X[1]])}if(A=[...A,{placement:a,overflows:R}],!R.every(X=>X<=0)){var D,N;let X=(((D=r.flip)==null?void 0:D.index)||0)+1,W=P[X];if(W&&(!(p==="alignment"?S!==Ss(W):!1)||A.every(G=>Ss(G.placement)===S?G.overflows[0]>0:!0)))return{data:{index:X,overflows:A},reset:{placement:W}};let Y=(N=A.filter(V=>V.overflows[0]<=0).sort((V,G)=>V.overflows[1]-G.overflows[1])[0])==null?void 0:N.placement;if(!Y)switch(g){case"bestFit":{var H;let V=(H=A.filter(G=>{if(L){let $=Ss(G.placement);return $===S||$==="y"}return!0}).map(G=>[G.placement,G.overflows.filter($=>$>0).reduce(($,te)=>$+te,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:H[0];V&&(Y=V);break}case"initialPlacement":Y=l;break}if(a!==Y)return{reset:{placement:Y}}}return{}}}};function k8(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function O8(n){return L8.some(e=>n[e]>=0)}var F8=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t,platform:i}=e,{strategy:a="referenceHidden",...r}=gl(n,e);switch(a){case"referenceHidden":{let o=await i.detectOverflow(e,{...r,elementContext:"reference"}),l=k8(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:O8(l)}}}case"escaped":{let o=await i.detectOverflow(e,{...r,altBoundary:!0}),l=k8(o,t.floating);return{data:{escapedOffsets:l,escaped:O8(l)}}}default:return{}}}}};var H8=new Set(["left","top"]);async function ure(n,e){let{placement:t,platform:i,elements:a}=n,r=await(i.isRTL==null?void 0:i.isRTL(a.floating)),o=Mu(t),l=Fd(t),c=Ss(t)==="y",f=H8.has(o)?-1:1,h=r&&c?-1:1,p=gl(e,n),{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}var V8=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,i;let{x:a,y:r,placement:o,middlewareData:l}=e,c=await ure(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:a+c.x,y:r+c.y,data:{...c,placement:o}}}}},G8=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:i,placement:a,platform:r}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:S=>{let{x:M,y:T}=S;return{x:M,y:T}}},...f}=gl(n,e),h={x:t,y:i},p=await r.detectOverflow(e,f),m=Ss(a),g=pT(m),b=h[g],x=h[m],_=(S,M)=>gD(M+p[S==="y"?"top":"left"],M,M-p[S==="y"?"bottom":"right"]);o&&(b=_(g,b)),l&&(x=_(m,x));let v=c.fn({...e,[g]:b,[m]:x});return{...v,data:{x:v.x-t,y:v.y-i,enabled:{[g]:o,[m]:l}}}}}},W8=function(n){return n===void 0&&(n={}),{options:n,fn(e){var t,i;let{x:a,y:r,placement:o,rects:l,middlewareData:c}=e,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=gl(n,e),m={x:a,y:r},g=Ss(o),b=pT(g),x=m[b],_=m[g],v=gl(f,e),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(t=v.mainAxis)!=null?t:0,crossAxis:(i=v.crossAxis)!=null?i:0};if(h){let E=b==="y"?"height":"width",L=l.reference[b]-l.floating[E]+S.mainAxis,P=l.reference[b]+l.reference[E]-S.mainAxis;x<L?x=L:x>P&&(x=P)}if(p){var M,T;let E=b==="y"?"width":"height",L=H8.has(Mu(o)),P=l.reference[g]-l.floating[E]+(L&&((M=c.offset)==null?void 0:M[g])||0)+(L?0:S.crossAxis),I=l.reference[g]+l.reference[E]+(L?0:((T=c.offset)==null?void 0:T[g])||0)-(L?S.crossAxis:0);_<P?_=P:_>I&&(_=I)}return{[b]:x,[g]:_}}}},q8=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){let{placement:t,rects:i,platform:a,elements:r}=e,{apply:o=()=>{},...l}=gl(n,e),c=await a.detectOverflow(e,l),f=Mu(t),h=Fd(t),p=Ss(t)==="y",{width:m,height:g}=i.floating,b,x;f==="top"||f==="bottom"?(b=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(x=f,b=h==="end"?"top":"bottom");let _=g-c.top-c.bottom,v=m-c.left-c.right,S=pl(g-c[b],_),M=pl(m-c[x],v),T=e.middlewareData.shift,E=!T,L=S,P=M;T!=null&&T.enabled.x&&(P=v),T!=null&&T.enabled.y&&(L=_),E&&!h&&(p?P=m-2*_s(c.left,c.right):L=g-2*_s(c.top,c.bottom)),await o({...e,availableWidth:P,availableHeight:L});let I=await a.getDimensions(r.floating);return m!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function vT(){return typeof window<"u"}function Wd(n){return Y8(n)?(n.nodeName||"").toLowerCase():"#document"}function fr(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function vl(n){var e;return(e=(Y8(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Y8(n){return vT()?n instanceof Node||n instanceof fr(n).Node:!1}function ws(n){return vT()?n instanceof Element||n instanceof fr(n).Element:!1}function Tu(n){return vT()?n instanceof HTMLElement||n instanceof fr(n).HTMLElement:!1}function X8(n){return!vT()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof fr(n).ShadowRoot}function mx(n){let{overflow:e,overflowX:t,overflowY:i,display:a}=Ms(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&a!=="inline"&&a!=="contents"}function j8(n){return/^(table|td|th)$/.test(Wd(n))}function gx(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var cre=/transform|translate|scale|rotate|perspective|filter/,fre=/paint|layout|strict|content/,Vd=n=>!!n&&n!=="none",yD;function yT(n){let e=ws(n)?Ms(n):n;return Vd(e.transform)||Vd(e.translate)||Vd(e.scale)||Vd(e.rotate)||Vd(e.perspective)||!bT()&&(Vd(e.backdropFilter)||Vd(e.filter))||cre.test(e.willChange||"")||fre.test(e.contain||"")}function Z8(n){let e=Jc(n);for(;Tu(e)&&!ag(e);){if(yT(e))return e;if(gx(e))return null;e=Jc(e)}return null}function bT(){return yD==null&&(yD=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yD}function ag(n){return/^(html|body|#document)$/.test(Wd(n))}function Ms(n){return fr(n).getComputedStyle(n)}function vx(n){return ws(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Jc(n){if(Wd(n)==="html")return n;let e=n.assignedSlot||n.parentNode||X8(n)&&n.host||vl(n);return X8(e)?e.host:e}function K8(n){let e=Jc(n);return ag(e)?(n.ownerDocument||n).body:Tu(e)&&mx(e)?e:K8(e)}function Gd(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);let a=K8(n),r=a===((i=n.ownerDocument)==null?void 0:i.body),o=fr(a);if(r){let l=xT(o);return e.concat(o,o.visualViewport||[],mx(a)?a:[],l&&t?Gd(l):[])}else return e.concat(a,Gd(a,[],t))}function xT(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function $8(n){let e=Ms(n),t=parseFloat(e.width)||0,i=parseFloat(e.height)||0,a=Tu(n),r=a?n.offsetWidth:t,o=a?n.offsetHeight:i,l=hx(t)!==r||hx(i)!==o;return l&&(t=r,i=o),{width:t,height:i,$:l}}function xD(n){return ws(n)?n:n.contextElement}function rg(n){let e=xD(n);if(!Tu(e))return ml(1);let t=e.getBoundingClientRect(),{width:i,height:a,$:r}=$8(e),o=(r?hx(t.width):t.width)/i,l=(r?hx(t.height):t.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}var dre=ml(0);function eG(n){let e=fr(n);return!bT()||!e.visualViewport?dre:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function hre(n,e,t){return e===void 0&&(e=!1),!!t&&e&&t===fr(n)}function qd(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);let a=n.getBoundingClientRect(),r=xD(n),o=ml(1);e&&(i?ws(i)&&(o=rg(i)):o=rg(n));let l=hre(r,t,i)?eG(r):ml(0),c=(a.left+l.x)/o.x,f=(a.top+l.y)/o.y,h=a.width/o.x,p=a.height/o.y;if(r&&i){let m=fr(r),g=ws(i)?fr(i):i,b=m,x=xT(b);for(;x&&g!==b;){let _=rg(x),v=x.getBoundingClientRect(),S=Ms(x),M=v.left+(x.clientLeft+parseFloat(S.paddingLeft))*_.x,T=v.top+(x.clientTop+parseFloat(S.paddingTop))*_.y;c*=_.x,f*=_.y,h*=_.x,p*=_.y,c+=M,f+=T,b=fr(x),x=xT(b)}}return Hd({width:h,height:p,x:c,y:f})}function _T(n,e){let t=vx(n).scrollLeft;return e?e.left+t:qd(vl(n)).left+t}function tG(n,e){let t=n.getBoundingClientRect(),i=t.left+e.scrollLeft-_T(n,t),a=t.top+e.scrollTop;return{x:i,y:a}}function pre(n){let{elements:e,rect:t,offsetParent:i,strategy:a}=n,r=a==="fixed",o=vl(i),l=e?gx(e.floating):!1;if(i===o||l&&r)return t;let c={scrollLeft:0,scrollTop:0},f=ml(1),h=ml(0),p=Tu(i);if((p||!r)&&((Wd(i)!=="body"||mx(o))&&(c=vx(i)),p)){let g=qd(i);f=rg(i),h.x=g.x+i.clientLeft,h.y=g.y+i.clientTop}let m=o&&!p&&!r?tG(o,c):ml(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:t.y*f.y-c.scrollTop*f.y+h.y+m.y}}function mre(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gre(n){let e=vx(n),t=n.ownerDocument.body,i=_s(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),a=_s(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight),r=-e.scrollLeft+_T(n),o=-e.scrollTop;return Ms(t).direction==="rtl"&&(r+=_s(n.clientWidth,t.clientWidth)-i),{width:i,height:a,x:r,y:o}}var vre=25;function yre(n,e,t){t===void 0&&(t="viewport");let i=t==="layoutViewport",a=fr(n),r=vl(n),o=a.visualViewport,l=r.clientWidth,c=r.clientHeight,f=0,h=0;if(o){let m=!bT()||e==="fixed";i?m||(f=-o.offsetLeft,h=-o.offsetTop):(l=o.width,c=o.height,m&&(f=o.offsetLeft,h=o.offsetTop))}if(_T(r)<=0){let m=r.ownerDocument,g=m.body,b=getComputedStyle(g),x=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-x),v=getComputedStyle(r).scrollbarGutter==="stable both-edges"?_/2:_;v<=vre&&(l-=v)}return{width:l,height:c,x:f,y:h}}function bre(n,e){let t=qd(n,!0,e==="fixed"),i=t.top+n.clientTop,a=t.left+n.clientLeft,r=rg(n),o=n.clientWidth*r.x,l=n.clientHeight*r.y,c=a*r.x,f=i*r.y;return{width:o,height:l,x:c,y:f}}function Q8(n,e,t){let i;if(e==="viewport"||e==="layoutViewport")i=yre(n,t,e);else if(e==="document")i=gre(vl(n));else if(ws(e))i=bre(e,t);else{let a=eG(n);i={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Hd(i)}function xre(n,e){let t=e.get(n);if(t)return t;let i=Gd(n,[],!1).filter(l=>ws(l)&&Wd(l)!=="body"),a=null,r=Ms(n).position==="fixed",o=r?Jc(n):n;for(;ws(o)&&!ag(o);){let l=Ms(o),c=yT(o),f=a?a.position:r?"fixed":"";!c&&(f==="fixed"||f==="absolute"&&l.position==="static")?i=i.filter(p=>p!==o):a=l,o=Jc(o)}return e.set(n,i),i}function _re(n){let{element:e,boundary:t,rootBoundary:i,strategy:a}=n,o=[...t==="clippingAncestors"?gx(e)?[]:xre(e,this._c):[].concat(t),i],l=Q8(e,o[0],a),c=l.top,f=l.right,h=l.bottom,p=l.left;for(let m=1;m<o.length;m++){let g=Q8(e,o[m],a);c=_s(g.top,c),f=pl(g.right,f),h=pl(g.bottom,h),p=_s(g.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function Sre(n){let{width:e,height:t}=$8(n);return{width:e,height:t}}function wre(n,e,t){let i=Tu(e),a=vl(e),r=t==="fixed",o=qd(n,!0,r,e),l={scrollLeft:0,scrollTop:0},c=ml(0);if((i||!r)&&((Wd(e)!=="body"||mx(a))&&(l=vx(e)),i)){let m=qd(e,!0,r,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}!i&&a&&(c.x=_T(a));let f=a&&!i&&!r?tG(a,l):ml(0),h=o.left+l.scrollLeft-c.x-f.x,p=o.top+l.scrollTop-c.y-f.y;return{x:h,y:p,width:o.width,height:o.height}}function bD(n){return Ms(n).position==="static"}function J8(n,e){if(!Tu(n)||Ms(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return vl(n)===t&&(t=t.ownerDocument.body),t}function nG(n,e){let t=fr(n);if(gx(n))return t;if(!Tu(n)){let a=Jc(n);for(;a&&!ag(a);){if(ws(a)&&!bD(a))return a;a=Jc(a)}return t}let i=J8(n,e);for(;i&&j8(i)&&bD(i);)i=J8(i,e);return i&&ag(i)&&bD(i)&&!yT(i)?t:i||Z8(n)||t}var Mre=async function(n){let e=this.getOffsetParent||nG,t=this.getDimensions,i=await t(n.floating);return{reference:wre(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Tre(n){return Ms(n).direction==="rtl"}var iG={convertOffsetParentRelativeRectToViewportRelativeRect:pre,getDocumentElement:vl,getClippingRect:_re,getOffsetParent:nG,getElementRects:Mre,getClientRects:mre,getDimensions:Sre,getScale:rg,isElement:ws,isRTL:Tre};function aG(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function Cre(n,e,t){let i=null,a,r=vl(n);function o(){var h;clearTimeout(a),(h=i)==null||h.disconnect(),i=null}function l(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),o();let m=n.getBoundingClientRect(),{left:g,top:b,width:x,height:_}=m;if(h||e(),!x||!_)return;let v=px(b),S=px(r.clientWidth-(g+x)),M=px(r.clientHeight-(b+_)),T=px(g),L={rootMargin:-v+"px "+-S+"px "+-M+"px "+-T+"px",threshold:_s(0,pl(1,p))||1},P=!0;function I(R){let A=R[0].intersectionRatio;if(!aG(m,n.getBoundingClientRect()))return l();if(A!==p){if(!P)return l();A?l(!1,A):a=setTimeout(()=>{l(!1,1e-7)},1e3)}P=!1}try{i=new IntersectionObserver(I,{...L,root:r.ownerDocument})}catch{i=new IntersectionObserver(I,L)}i.observe(n)}let c=fr(n),f=()=>l(t);return c.addEventListener("resize",f),l(!0),()=>{c.removeEventListener("resize",f),o()}}function _D(n,e,t,i){i===void 0&&(i={});let{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,f=xD(n),h=a||r?[...f?Gd(f):[],...e?Gd(e):[]]:[];h.forEach(v=>{a&&v.addEventListener("scroll",t),r&&v.addEventListener("resize",t)});let p=f&&l?Cre(f,t,r):null,m=-1,g=null;o&&(g=new ResizeObserver(v=>{let[S]=v;S&&S.target===f&&g&&e&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var M;(M=g)==null||M.observe(e)})),t()}),f&&!c&&g.observe(f),e&&g.observe(e));let b,x=c?qd(n):null;c&&_();function _(){let v=qd(n);x&&!aG(x,v)&&t(),x=v,b=requestAnimationFrame(_)}return t(),()=>{var v;h.forEach(S=>{a&&S.removeEventListener("scroll",t),r&&S.removeEventListener("resize",t)}),p?.(),(v=g)==null||v.disconnect(),g=null,c&&cancelAnimationFrame(b)}}var rG=V8;var oG=G8,sG=B8,lG=q8,uG=F8,SD=U8;var cG=W8,wD=(n,e,t)=>{let i=new Map,a=t??{},r={...iG,...a.platform,_c:i};return z8(n,e,{...a,platform:r})};var Ui=ke(dt(),1),dG=ke(dt(),1),hG=ke(Ph(),1),Ere=typeof document<"u",Are=function(){},ST=Ere?dG.useLayoutEffect:Are;function wT(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,i,a;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(i=t;i--!==0;)if(!wT(n[i],e[i]))return!1;return!0}if(a=Object.keys(n),t=a.length,t!==Object.keys(e).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(e,a[i]))return!1;for(i=t;i--!==0;){let r=a[i];if(!(r==="_owner"&&n.$$typeof)&&!wT(n[r],e[r]))return!1}return!0}return n!==n&&e!==e}function pG(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function fG(n,e){let t=pG(n);return Math.round(e*t)/t}function MD(n){let e=Ui.useRef(n);return ST(()=>{e.current=n}),e}function mG(n){n===void 0&&(n={});let{placement:e="bottom",strategy:t="absolute",middleware:i=[],platform:a,elements:{reference:r,floating:o}={},transform:l=!0,whileElementsMounted:c,open:f}=n,[h,p]=Ui.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,g]=Ui.useState(i);wT(m,i)||g(i);let[b,x]=Ui.useState(null),[_,v]=Ui.useState(null),S=Ui.useCallback(G=>{G!==L.current&&(L.current=G,x(G))},[]),M=Ui.useCallback(G=>{G!==P.current&&(P.current=G,v(G))},[]),T=r||b,E=o||_,L=Ui.useRef(null),P=Ui.useRef(null),I=Ui.useRef(h),R=c!=null,A=MD(c),D=MD(a),N=MD(f),H=Ui.useCallback(()=>{if(!L.current||!P.current)return;let G={placement:e,strategy:t,middleware:m};D.current&&(G.platform=D.current),wD(L.current,P.current,G).then($=>{let te={...$,isPositioned:N.current!==!1};X.current&&!wT(I.current,te)&&(I.current=te,hG.flushSync(()=>{p(te)}))})},[m,e,t,D,N]);ST(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[f]);let X=Ui.useRef(!1);ST(()=>(X.current=!0,()=>{X.current=!1}),[]),ST(()=>{if(T&&(L.current=T),E&&(P.current=E),T&&E){if(A.current)return A.current(T,E,H);H()}},[T,E,H,A,R]);let W=Ui.useMemo(()=>({reference:L,floating:P,setReference:S,setFloating:M}),[S,M]),Y=Ui.useMemo(()=>({reference:T,floating:E}),[T,E]),V=Ui.useMemo(()=>{let G={position:t,left:0,top:0};if(!Y.floating)return G;let $=fG(Y.floating,h.x),te=fG(Y.floating,h.y);return l?{...G,transform:"translate("+$+"px, "+te+"px)",...pG(Y.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:$,top:te}},[t,l,Y.floating,h.x,h.y]);return Ui.useMemo(()=>({...h,update:H,refs:W,elements:Y,floatingStyles:V}),[h,H,W,Y,V])}var Lre=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){let{element:i,padding:a}=typeof n=="function"?n(t):n;return i&&e(i)?i.current!=null?SD({element:i.current,padding:a}).fn(t):{}:i?SD({element:i,padding:a}).fn(t):{}}}},gG=(n,e)=>{let t=rG(n);return{name:t.name,fn:t.fn,options:[n,e]}},vG=(n,e)=>{let t=oG(n);return{name:t.name,fn:t.fn,options:[n,e]}},yG=(n,e)=>({fn:cG(n).fn,options:[n,e]}),bG=(n,e)=>{let t=sG(n);return{name:t.name,fn:t.fn,options:[n,e]}},xG=(n,e)=>{let t=lG(n);return{name:t.name,fn:t.fn,options:[n,e]}};var _G=(n,e)=>{let t=uG(n);return{name:t.name,fn:t.fn,options:[n,e]}};var SG=(n,e)=>{let t=Lre(n);return{name:t.name,fn:t.fn,options:[n,e]}};var wG=ke(dt(),1);var Rre=Object.defineProperty,Ire=(n,e)=>Rre(n,"name",{value:e,configurable:!0});function TD(n){let[e,t]=wG.useState(void 0);return In(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});let i=0,a=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let o=r[0];window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{let l,c;if("borderBoxSize"in o){let f=o.borderBoxSize,h=Array.isArray(f)?f[0]:f;l=h.inlineSize,c=h.blockSize}else l=n.offsetWidth,c=n.offsetHeight;t({width:l,height:c})})});return a.observe(n,{box:"border-box"}),()=>{window.cancelAnimationFrame(i),a.unobserve(n)}}else t(void 0)},[n]),e}Ire(TD,"useSize");var og=ke(pn(),1),Pre=Object.defineProperty,$c=(n,e)=>Pre(n,"name",{value:e,configurable:!0});var MG={Partial:"partial",Always:"always"},TG={Optimized:"optimized",Always:"always"},CG="Popper",[EG,CD]=Su(CG),[Dre,AG]=EG(CG),LG=$c(n=>{let{__scopePopper:e,children:t}=n,[i,a]=Ka.useState(null),[r,o]=Ka.useState(void 0);return(0,og.jsx)(Dre,{scope:e,anchor:i,onAnchorChange:a,placementState:r,setPlacementState:o,children:t})},"Popper"),kre="PopperAnchor",RG=Ka.forwardRef($c(function(e,t){let{__scopePopper:i,virtualRef:a,...r}=e,o=AG(kre,i),l=Ka.useRef(null),c=o.onAnchorChange,f=Ka.useCallback(x=>{l.current=x,x&&c(x)},[c]),h=Nn(t,f),p=Ka.useRef(null);Ka.useEffect(()=>{if(!a)return;let x=p.current;p.current=a.current,x!==p.current&&c(p.current)});let m=o.placementState&&MT(o.placementState),g=m?.[0],b=m?.[1];return a?null:(0,og.jsx)($i.div,{"data-radix-popper-side":g,"data-radix-popper-align":b,...r,ref:h})},"PopperAnchor")),IG="PopperContent",[Ore,gfe]=EG(IG),PG=Ka.forwardRef($c(function(e,t){let{__scopePopper:i,side:a="bottom",sideOffset:r=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m=MG.Partial,hideWhenDetached:g=!1,updatePositionStrategy:b=TG.Optimized,onPlaced:x,..._}=e,v=AG(IG,i),[S,M]=Ka.useState(null),T=Nn(t,M),[E,L]=Ka.useState(null),P=TD(E),I=P?.width??0,R=P?.height??0,A=a+(o!=="center"?"-"+o:""),D=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(h)?h:[h],H=N.length>0,X={padding:D,boundary:N.filter(DG),altBoundary:H},{refs:W,floatingStyles:Y,placement:V,isPositioned:G,middlewareData:$}=mG({strategy:"fixed",placement:A,whileElementsMounted:$c((...Xe)=>_D(...Xe,{animationFrame:b===TG.Always}),"whileElementsMounted"),elements:{reference:v.anchor},middleware:[gG({mainAxis:r+R,alignmentAxis:l}),f&&vG({mainAxis:!0,crossAxis:!1,...m===MG.Partial?{limiter:yG()}:{},...X}),f&&bG({...X}),xG({...X,apply:$c(({elements:Xe,rects:ve,availableWidth:st,availableHeight:ht})=>{let{width:F,height:ue}=ve.reference,le=Xe.floating.style;le.setProperty("--radix-popper-available-width",`${st}px`),le.setProperty("--radix-popper-available-height",`${ht}px`),le.setProperty("--radix-popper-anchor-width",`${F}px`),le.setProperty("--radix-popper-anchor-height",`${ue}px`)},"apply")}),E&&SG({element:E,padding:c}),Nre({arrowWidth:I,arrowHeight:R}),g&&_G(H?{strategy:"referenceHidden",...X}:{strategy:"referenceHidden",padding:X.padding,altBoundary:X.altBoundary})]}),te=v.setPlacementState;In(()=>(te(V),()=>{te(void 0)}),[V,te]);let[ge,Le]=MT(V),je=Nr(x);In(()=>{G&&je?.()},[G,je]);let Oe=$.arrow?.x,ze=$.arrow?.y,ae=$.arrow?.centerOffset!==0,[de,Ie]=Ka.useState();return In(()=>{S&&Ie(window.getComputedStyle(S).zIndex)},[S]),(0,og.jsx)("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:G?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,og.jsx)(Ore,{scope:i,placedSide:ge,placedAlign:Le,onArrowChange:L,arrowX:Oe,arrowY:ze,shouldHideArrow:ae,children:(0,og.jsx)($i.div,{"data-side":ge,"data-align":Le,..._,ref:T,style:{..._.style,animation:G?_.style?.animation:"none"}})})})},"PopperContent"));function DG(n){return n!==null}$c(DG,"isNotNull");var Nre=$c(n=>({name:"transformOrigin",options:n,fn(e){let{placement:t,rects:i,middlewareData:a}=e,o=a.arrow?.centerOffset!==0,l=o?0:n.arrowWidth,c=o?0:n.arrowHeight,[f,h]=MT(t),p={start:"0%",center:"50%",end:"100%"}[h],m=(a.arrow?.x??0)+l/2,g=(a.arrow?.y??0)+c/2,b="",x="";return f==="bottom"?(b=o?p:`${m}px`,x=`${-c}px`):f==="top"?(b=o?p:`${m}px`,x=`${i.floating.height+c}px`):f==="right"?(b=`${-c}px`,x=o?p:`${g}px`):f==="left"&&(b=`${i.floating.width+c}px`,x=o?p:`${g}px`),{data:{x:b,y:x}}}}),"transformOrigin");function MT(n){let[e,t="center"]=n.split("-");return[e,t]}$c(MT,"getSideAndAlignFromPlacement");var TT=ke(dt(),1),kG=ke(Ph(),1);var OG=ke(pn(),1),Ure=Object.defineProperty,Bre=(n,e)=>Ure(n,"name",{value:e,configurable:!0}),NG=TT.forwardRef(Bre(function(e,t){let{container:i,...a}=e,[r,o]=TT.useState(!1);In(()=>o(!0),[]);let l=i||r&&globalThis?.document?.body;return l?kG.createPortal((0,OG.jsx)($i.div,{...a,ref:t}),l):null},"Portal"));var Pa=ke(dt(),1);var zG=ke(dt(),1),Fre=Object.defineProperty,Cu=(n,e)=>Fre(n,"name",{value:e,configurable:!0});function UG(n,e){return zG.useReducer((t,i)=>e[t][i]??t,n)}Cu(UG,"useStateMachine");var BG=Cu(n=>{let{present:e,children:t}=n,i=FG(e),a=typeof t=="function"?t({present:i.isPresent}):Pa.Children.only(t),r=HG(i.ref,VG(a));return typeof t=="function"||i.isPresent?Pa.cloneElement(a,{ref:r}):null},"Presence");function FG(n){let[e,t]=Pa.useState(),i=Pa.useRef(null),a=Pa.useRef(n),r=Pa.useRef("none"),o=Pa.useRef(void 0),l=n?"mounted":"unmounted",[c,f]=UG(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Pa.useEffect(()=>{c==="mounted"?(r.current=o.current??sg(i.current),o.current=void 0):r.current="none"},[c]),In(()=>{let h=i.current,p=a.current;if(p!==n){let g=r.current,b=sg(h);n?(o.current=b,f("MOUNT")):b==="none"||h?.display==="none"?f("UNMOUNT"):f(p&&g!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,f]),In(()=>{if(e){let h,p=e.ownerDocument.defaultView??window,m=Cu(b=>{let _=sg(i.current).includes(CSS.escape(b.animationName));if(b.target===e&&_&&(f("ANIMATION_END"),!a.current)){let v=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},"handleAnimationEnd"),g=Cu(b=>{b.target===e&&(r.current=sg(i.current))},"handleAnimationStart");return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:Pa.useCallback(h=>{if(h){let p=getComputedStyle(h);i.current=p,o.current=sg(p)}else i.current=null;t(h)},[])}}Cu(FG,"usePresence");function ED(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}Cu(ED,"setRef");function HG(...n){let e=Pa.useRef(n);return e.current=n,Pa.useCallback(t=>{let i=e.current,a=!1,r=i.map(o=>{let l=ED(o,t);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let o=0;o<r.length;o++){let l=r[o];typeof l=="function"?l():ED(i[o],null)}}},[])}Cu(HG,"useStableComposedRefs");function sg(n){return n?.animationName||"none"}Cu(sg,"getAnimationName");function VG(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}Cu(VG,"getElementRef");var Zo=ke(dt(),1);var CT=!1;var Ts=ke(dt(),1);var lg=ke(dt(),1),Hre=Object.defineProperty,Vre=(n,e)=>Hre(n,"name",{value:e,configurable:!0}),GG=lg[" useEffectEvent ".trim().toString()],WG=lg[" useInsertionEffect ".trim().toString()];function AD(n){if(typeof GG=="function")return GG(n);let e=lg.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof WG=="function"?WG(()=>{e.current=n}):In(()=>{e.current=n}),lg.useMemo(()=>((...t)=>e.current?.(...t)),[])}Vre(AD,"useEffectEvent");var Gre=Object.defineProperty,yx=(n,e)=>Gre(n,"name",{value:e,configurable:!0}),Wre=Zo[" useInsertionEffect ".trim().toString()]||In;function ET({prop:n,defaultProp:e,onChange:t=yx(()=>{},"onChange"),caller:i}){let[a,r,o]=XG({defaultProp:e,onChange:t}),l=n!==void 0,c=l?n:a;if(CT){let h=Zo.useRef(n!==void 0);Zo.useEffect(()=>{let p=h.current;p!==l&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,i])}let f=Zo.useCallback(h=>{if(l){let p=YG(h)?h(n):h;p!==n&&o.current?.(p)}else r(h)},[l,n,r,o]);return[c,f]}yx(ET,"useControllableState");function XG({defaultProp:n,onChange:e}){let[t,i]=Zo.useState(n),a=Zo.useRef(t),r=Zo.useRef(e);return Wre(()=>{r.current=e},[e]),Zo.useEffect(()=>{a.current!==t&&(r.current?.(t),a.current=t)},[t,a]),[t,i,r]}yx(XG,"useUncontrolledState");function YG(n){return typeof n=="function"}yx(YG,"isFunction");var qG=Symbol("RADIX:SYNC_STATE");function qre(n,e,t,i){let{prop:a,defaultProp:r,onChange:o,caller:l}=e,c=a!==void 0,f=AD(o);if(CT){let _=Ts.useRef(a!==void 0);Ts.useEffect(()=>{let v=_.current;v!==c&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),_.current=c},[c,l])}let h=[{...t,state:r}];i&&h.push(i);let[p,m]=Ts.useReducer((_,v)=>{if(v.type===qG)return{..._,state:v.state};let S=n(_,v);return c&&!Object.is(S.state,_.state)&&f(S.state),S},...h),g=p.state,b=Ts.useRef(g);Ts.useEffect(()=>{b.current!==g&&(b.current=g,c||f(g))},[g,b,c]);let x=Ts.useMemo(()=>a!==void 0?{...p,state:a}:p,[p,a]);return Ts.useEffect(()=>{c&&!Object.is(a,p.state)&&m({type:qG,state:a})},[a,p.state,c]),[x,m]}yx(qre,"useControllableStateReducer");var Xre=ke(dt(),1);var Yre=ke(pn(),1);var jG=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});var jre=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},ug=new WeakMap,AT=new WeakMap,LT={},LD=0,ZG=function(n){return n&&(n.host||ZG(n.parentNode))},Zre=function(n,e){return e.map(function(t){if(n.contains(t))return t;var i=ZG(t);return i&&n.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},Kre=function(n,e,t,i){var a=Zre(e,Array.isArray(n)?n:[n]);LT[t]||(LT[t]=new WeakMap);var r=LT[t],o=[],l=new Set,c=new Set(a),f=function(p){!p||l.has(p)||(l.add(p),f(p.parentNode))};a.forEach(f);var h=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))h(m);else try{var g=m.getAttribute(i),b=g!==null&&g!=="false",x=(ug.get(m)||0)+1,_=(r.get(m)||0)+1;ug.set(m,x),r.set(m,_),o.push(m),x===1&&b&&AT.set(m,!0),_===1&&m.setAttribute(t,"true"),b||m.setAttribute(i,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return h(e),l.clear(),LD++,function(){o.forEach(function(p){var m=ug.get(p)-1,g=r.get(p)-1;ug.set(p,m),r.set(p,g),m||(AT.has(p)||p.removeAttribute(i),AT.delete(p)),g||p.removeAttribute(t)}),LD--,LD||(ug=new WeakMap,ug=new WeakMap,AT=new WeakMap,LT={})}},KG=function(n,e,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),a=e||jre(n);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live], script"))),Kre(i,a,t,"aria-hidden")):function(){return null}};var zr=function(){return zr=Object.assign||function(e){for(var t,i=1,a=arguments.length;i<a;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},zr.apply(this,arguments)};function RT(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(n);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(n,i[a])&&(t[i[a]]=n[i[a]]);return t}function QG(n,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,r;i<a;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return n.concat(r||Array.prototype.slice.call(e))}var OT=ke(dt());var Qa=ke(dt());var Xd="right-scroll-bar-position",Yd="width-before-scroll-bar",RD="with-scroll-bars-hidden",ID="--removed-body-scroll-bar-size";function IT(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}var JG=ke(dt());function $G(n,e){var t=(0,JG.useState)(function(){return{value:n,callback:e,facade:{get current(){return t.value},set current(i){var a=t.value;a!==i&&(t.value=i,t.callback(i,a))}}}})[0];return t.callback=e,t.facade}var PT=ke(dt());var Qre=typeof window<"u"?PT.useLayoutEffect:PT.useEffect,eW=new WeakMap;function PD(n,e){var t=$G(e||null,function(i){return n.forEach(function(a){return IT(a,i)})});return Qre(function(){var i=eW.get(t);if(i){var a=new Set(i),r=new Set(n),o=t.current;a.forEach(function(l){r.has(l)||IT(l,null)}),r.forEach(function(l){a.has(l)||IT(l,o)})}eW.set(t,n)},[n]),t}function Jre(n){return n}function $re(n,e){e===void 0&&(e=Jre);var t=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:n},useMedium:function(r){var o=e(r,i);return t.push(o),function(){t=t.filter(function(l){return l!==o})}},assignSyncMedium:function(r){for(i=!0;t.length;){var o=t;t=[],o.forEach(r)}t={push:function(l){return r(l)},filter:function(){return t}}},assignMedium:function(r){i=!0;var o=[];if(t.length){var l=t;t=[],l.forEach(r),o=t}var c=function(){var h=o;o=[],h.forEach(r)},f=function(){return Promise.resolve().then(c)};f(),t={push:function(h){o.push(h),f()},filter:function(h){return o=o.filter(h),t}}}};return a}function DD(n){n===void 0&&(n={});var e=$re(null);return e.options=zr({async:!0,ssr:!1},n),e}var tW=ke(dt()),nW=function(n){var e=n.sideCar,t=RT(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return tW.createElement(i,zr({},t))};nW.isSideCarExport=!0;function kD(n,e){return n.useMedium(e),nW}var DT=DD();var OD=function(){},bx=Qa.forwardRef(function(n,e){var t=Qa.useRef(null),i=Qa.useState({onScrollCapture:OD,onWheelCapture:OD,onTouchMoveCapture:OD}),a=i[0],r=i[1],o=n.forwardProps,l=n.children,c=n.className,f=n.removeScrollBar,h=n.enabled,p=n.shards,m=n.sideCar,g=n.noRelative,b=n.noIsolation,x=n.inert,_=n.allowPinchZoom,v=n.as,S=v===void 0?"div":v,M=n.gapMode,T=RT(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,L=PD([t,e]),P=zr(zr({},T),a);return Qa.createElement(Qa.Fragment,null,h&&Qa.createElement(E,{sideCar:DT,removeScrollBar:f,shards:p,noRelative:g,noIsolation:b,inert:x,setCallbacks:r,allowPinchZoom:!!_,lockRef:t,gapMode:M}),o?Qa.cloneElement(Qa.Children.only(l),zr(zr({},P),{ref:L})):Qa.createElement(S,zr({},P,{className:c,ref:L}),l))});bx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bx.classNames={fullWidth:Yd,zeroRight:Xd};var Fn=ke(dt());var fg=ke(dt());var rW=ke(dt());var iW;var aW=function(){if(iW)return iW;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eoe(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=aW();return e&&n.setAttribute("nonce",e),n}function toe(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function noe(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var ND=function(){var n=0,e=null;return{add:function(t){n==0&&(e=eoe())&&(toe(e,t),noe(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var zD=function(){var n=ND();return function(e,t){rW.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&t])}};var xx=function(){var n=zD(),e=function(t){var i=t.styles,a=t.dynamic;return n(i,a),null};return e};var ioe={left:0,top:0,right:0,gap:0},UD=function(n){return parseInt(n||"",10)||0},aoe=function(n){var e=window.getComputedStyle(document.body),t=e[n==="padding"?"paddingLeft":"marginLeft"],i=e[n==="padding"?"paddingTop":"marginTop"],a=e[n==="padding"?"paddingRight":"marginRight"];return[UD(t),UD(i),UD(a)]},BD=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return ioe;var e=aoe(n),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-t+e[2]-e[0])}};var roe=xx(),cg="data-scroll-locked",ooe=function(n,e,t,i){var a=n.left,r=n.top,o=n.right,l=n.gap;return t===void 0&&(t="margin"),`
3851
+ `)+s.join(" > ")}return null},Bt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return Rg(s.child.stateNode);default:return s.child.stateNode}},Bt.injectIntoDevTools=function(){var s={bundleType:0,version:p7,rendererPackageName:m7,currentDispatcherRef:vt,reconcilerVersion:"19.3.0"};if($k!==null&&(s.rendererConfig=$k),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)s=!0;else{try{Dg=u.inject(s),Vr=u}catch{}s=!!u.checkDCE}}return s},Bt.isAlreadyRendering=function(){return(Ft&6)!==0},Bt.observeVisibleRects=function(s,u,d,y){if(!Ig)throw Error(a(363));s=AC(s,u);var w=H7(s,d,y).disconnect;return{disconnect:function(){w()}}},Bt.shouldError=function(){return null},Bt.shouldSuspend=function(){return!1},Bt.startHostTransition=function(s,u,d,y){if(s.tag!==5)throw Error(a(476));var w=M3(s).queue;w3(s,w,u,uh,d===null?i:function(){var C=M3(s);return C.next===null&&(C=s.alternate.memoizedState),_g(s,C.next.queue,{},Br()),d(y)})},Bt.updateContainer=function(s,u,d,y){var w=u.current,C=Br();return Yk(w,C,s,u,d,y),C},Bt.updateContainerSync=function(s,u,d,y){return Yk(u.current,2,s,u,d,y),2},Bt},n.exports.default=n.exports,Object.defineProperty(n.exports,"__esModule",{value:!0})})(OI)),OI.exports}var Nte={exports:{}};Nte.exports;var z5;function zte(){return z5||(z5=1,O5.exports=Ote()),O5.exports}var Ute=zte(),Bte=kte(Ute),xM={},Fte=0,wM=n=>`${n[0].toUpperCase()}${n.slice(1)}`;function Hte(n){return n in xM}function jI(n){return xM[n]}function kb(n){if(typeof n=="function"){let e=`${Fte++}`;return xM[e]=n,e}else Object.assign(xM,n)}function Vte(n){let e=Bte(n);return e.injectIntoDevTools(),e}var e6=0,Gte=/^three(?=[A-Z])/;function t6(n,e){let t=wM(n),i=jI(t);if(n!=="primitive"&&!i)throw new Error(`R3F: ${t} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(n==="primitive"&&!e.object)throw new Error("R3F: Primitives without 'object' are invalid!");if(e.args!==void 0&&!Array.isArray(e.args))throw new Error("R3F: The args prop must be an array!")}function Wte(n,e,t){var i;return n=Hte(wM(n))?n:n.replace(Gte,""),t6(n,e),n==="primitive"&&(i=e.object)!=null&&i.__r3f&&delete e.object.__r3f,vM(e.object,t,n,e)}function qte(n){if(!n.isHidden){var e;n.props.attach&&(e=n.parent)!=null&&e.object?bM(n.parent,n):sr(n.object)&&(n.previousVisible=n.object.visible,n.object.visible=!1),n.isHidden=!0,Pb(n)}}function n6(n){if(n.isHidden){var e;if(n.props.attach&&(e=n.parent)!=null&&e.object)yM(n.parent,n);else if(sr(n.object)){var t;n.object.visible=(t=n.previousVisible)!=null?t:!0}n.previousVisible=void 0,n.isHidden=!1,Pb(n)}}function ZI(n,e,t){let i=e.root.getState();if(!(!n.parent&&n.object!==i.scene)){if(!e.object){var a,r;let o=jI(wM(e.type));e.object=(a=e.props.object)!=null?a:new o(...(r=e.props.args)!=null?r:[]),e.object.__r3f=e}if(Bc(e.object,e.props),e.props.attach)yM(n,e);else if(sr(e.object)&&sr(n.object)){let o=n.object.children.indexOf(t?.object);if(t&&o!==-1){let l=n.object.children.indexOf(e.object);if(l!==-1){n.object.children.splice(l,1);let c=l<o?o-1:o;n.object.children.splice(c,0,e.object)}else e.object.parent=n.object,n.object.children.splice(o,0,e.object),e.object.dispatchEvent({type:"added"}),n.object.dispatchEvent({type:"childadded",child:e.object})}else n.object.add(e.object)}for(let o of e.children)ZI(e,o);Pb(e)}}function CI(n,e){if(e){if(e.parent===n){let t=n.children.indexOf(e);t!==-1&&n.children.splice(t,1)}e.parent=n,n.children.push(e),ZI(n,e)}}function U5(n,e,t){if(!e||!t)return;if(e.parent===n){let a=n.children.indexOf(e);a!==-1&&n.children.splice(a,1)}e.parent=n;let i=n.children.indexOf(t);i!==-1?n.children.splice(i,0,e):n.children.push(e),ZI(n,e,t)}function i6(n){if(typeof n.dispose=="function"){let e=()=>{try{n.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT<"u"?e():(0,Ea.unstable_scheduleCallback)(Ea.unstable_IdlePriority,e)}}function NI(n,e,t){if(!e)return;let i=!!e.parent;e.parent=null;let a=n.children.indexOf(e);a!==-1&&n.children.splice(a,1),e.props.attach?bM(n,e):sr(e.object)&&sr(n.object)&&(n.object.remove(e.object),yte(FI(e),e.object));let r=e.props.dispose!==null&&t!==!1;for(let l=e.children.length-1;l>=0;l--){let c=e.children[l];NI(e,c,r)}if(e.children.length=0,delete e.object.__r3f,r&&e.type!=="primitive"&&e.object.type!=="Scene"&&i6(e.object),t===void 0&&i){var o;let l=(o=e.root)==null||o.getState==null?void 0:o.getState();l&&l.internal.frames===0&&l.invalidate()}}function Xte(n,e){for(let t of[n,n.alternate])if(t!==null)if(typeof t.ref=="function"){t.refCleanup==null||t.refCleanup();let i=t.ref(e);typeof i=="function"&&(t.refCleanup=i)}else t.ref&&(t.ref.current=e)}var Ib=[];function Yte(){if(Ib.length!==0)try{jte()}finally{Ib.length=0}}function jte(){for(let[t]of Ib){let i=t.parent;if(i){t.props.attach?bM(i,t):sr(t.object)&&sr(i.object)&&i.object.remove(t.object);for(let a of t.children)a.props.attach?bM(t,a):sr(a.object)&&sr(t.object)&&t.object.remove(a.object)}t.isHidden&&n6(t),t.object.__r3f&&delete t.object.__r3f,t.type!=="primitive"&&i6(t.object)}for(let[t,i,a]of Ib){t.props=i;let r=t.parent;if(r){var n,e;let o=jI(wM(t.type)),l=t.object;t.object=(n=t.props.object)!=null?n:new o(...(e=t.props.args)!=null?e:[]),t.object.__r3f=t,Xte(a,t.object),vte(FI(t),l,t.object),Bc(t.object,t.props),t.props.attach?yM(r,t):sr(t.object)&&sr(r.object)&&r.object.add(t.object);for(let c of t.children)c.props.attach?yM(t,c):sr(c.object)&&sr(t.object)&&t.object.add(c.object);Pb(t)}}}var EI=()=>{},B5={},mM=e6;function Zte(n){switch(n){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"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return k5;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 D5;case"message":switch((0,Ea.unstable_getCurrentPriorityLevel)()){case Ea.unstable_ImmediatePriority:return k5;case Ea.unstable_UserBlockingPriority:return D5;case Ea.unstable_NormalPriority:case Ea.unstable_LowPriority:return gM;case Ea.unstable_IdlePriority:return Ate;default:return gM}default:return gM}}function Kte(n){typeof queueMicrotask=="function"?queueMicrotask(n):typeof Promise<"u"?Promise.resolve().then(n).catch(e=>{setTimeout(()=>{throw e})}):setTimeout(n)}var Cd=Vte({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:Wte,removeChild:NI,appendChild:CI,appendInitialChild:CI,insertBefore:U5,appendChildToContainer(n,e){let t=n.getState().scene.__r3f;!e||!t||CI(t,e)},removeChildFromContainer(n,e){let t=n.getState().scene.__r3f;!e||!t||NI(t,e)},insertInContainerBefore(n,e,t){let i=n.getState().scene.__r3f;!e||!t||!i||U5(i,e,t)},getRootHostContext:()=>B5,getChildHostContext:()=>B5,commitUpdate(n,e,t,i,a){var r,o,l;t6(e,i);let c=!1;if((n.type==="primitive"&&t.object!==i.object||((r=i.args)==null?void 0:r.length)!==((o=t.args)==null?void 0:o.length)||(l=i.args)!=null&&l.some((f,h)=>{var p;return f!==((p=t.args)==null?void 0:p[h])}))&&(c=!0),c)Ib.push([n,DI(i),a]);else{let f=hte(n,i),h=n.props.attach;n.props=DI(i),h!==void 0?n.props.attach=h:delete n.props.attach,Object.keys(f).length&&Bc(n.object,f)}},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:n=>n?.object,prepareForCommit:()=>null,preparePortalMount:n=>vM(n.getState().scene,n,"",{}),resetAfterCommit:Yte,shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:qte,unhideInstance:n6,createTextInstance:EI,hideTextInstance:EI,unhideTextInstance:EI,supportsMicrotasks:!0,scheduleMicrotask:Kte,scheduleTimeout:typeof setTimeout=="function"?setTimeout:void 0,cancelTimeout:typeof clearTimeout=="function"?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:Yt.createContext(null),setCurrentUpdatePriority(n){mM=n},getCurrentUpdatePriority(){return mM},resolveUpdatePriority(){var n;if(mM!==e6)return mM;let e=typeof window<"u"?(n=window.event)==null?void 0:n.type:void 0;return e===void 0?gM:Zte(e)},resetFormInstance(){},rendererPackageName:"@react-three/fiber",rendererVersion:Dte.version,applyViewTransitionName(n,e,t){},restoreViewTransitionName(n,e){},cancelViewTransitionName(n,e,t){},cancelRootViewTransitionName(n){},restoreRootViewTransitionName(n){},InstanceMeasurement:null,measureInstance:n=>null,wasInstanceInViewport:n=>!0,hasInstanceChanged:(n,e)=>!1,hasInstanceAffectedParent:(n,e)=>!1,suspendOnActiveViewTransition(n,e){},startViewTransition(n,e,t,i,a,r,o,l,c,f,h){return i(),a(),h?.(),o(),null},startGestureTransition(n,e,t,i,a,r,o,l,c,f){return o(),l(),f?.(),null},stopViewTransition(n){},addViewTransitionFinishedListener(n,e){e()},createViewTransitionInstance:n=>null,getCurrentGestureOffset(n){throw new Error("startGestureTransition is not yet supported in react-three-fiber.")},cloneMutableInstance(n,e){return n},cloneMutableTextInstance(n){return n},cloneRootViewTransitionContainer(n){throw new Error("Not implemented.")},removeRootViewTransitionClone(n,e){throw new Error("Not implemented.")},createFragmentInstance:n=>null,updateFragmentInstanceFiber(n,e){},commitNewChildToFragmentInstance(n,e){},deleteChildFromFragmentInstance(n,e){},measureClonedInstance:n=>null,maySuspendCommitOnUpdate:(n,e,t)=>!1,maySuspendCommitInSyncRender:(n,e)=>!1,startSuspendingCommit:()=>null,getSuspendedCommitReason:(n,e)=>null});var hu=new Map;function _M(n,e){let t=n.state;switch(e.type){case"use":return t.status==="disposed"?!1:(n.state={status:"open"},!0);case"unmount":return t.status==="disposed"?!1:(n.state={status:"closing",token:e.token},!0);case"dispose":return t.status!=="closing"||t.token!==e.token?!1:(n.state={status:"disposed"},!0)}}function KI(n){let e=hu.get(n),t=e?.fiber,i=e?.store;e&&console.warn("R3F.createRoot should only be called once!");let a=typeof reportError=="function"?reportError:console.error,r=i||Tte(MM,QI),o=t||Cd.createContainer(r,Ete,null,!1,null,"",a,a,a,null),l=e||{fiber:o,store:r,state:{status:"open"},ready:bte(void 0),configuration:{},ownsRenderer:!1};e||hu.set(n,l);let c=!1;return{get ready(){return l.ready},configure(f={}){if(!_M(l,{type:"use"}))return xte(new Error("R3F: Cannot configure a root after disposal has started."));let h=l.ready,{promise:p,resolve:m,reject:g}=_te();l.ready=p;let b=_=>{let v=r.getState();v.gl||(l.ownsRenderer=!GI(f.gl),v.set({gl:_})),Ite(l,n,f),!l.unwatchDpr&&(f.dpr===void 0||Array.isArray(f.dpr))&&(l.unwatchDpr=Pte(l)),m(this)},x=()=>{try{var _;let v=(_=r.getState().gl)!=null?_:Ste(n,f.gl);VI(v)?Promise.resolve(v).then(b).catch(g):b(v)}catch(v){g(v)}};return h.status==="pending"?h.then(x,g):x(),p},render(f){if(!_M(l,{type:"use"}))return r;if(!r.getState().gl&&l.ready.status==="fulfilled"&&this.configure(),l.ready.status==="rejected")throw l.ready.reason;let h=()=>{var p;if(l.state.status!=="open"||l.ready.status==="rejected")return;if(l.ready.status==="pending"){l.ready.then(h,a);return}let m=(p=l.configuration.previous)==null?void 0:p.onCreated,g=(0,du.jsx)(Qte,{store:r,children:f,onCreated:m,rootElement:n});if(c){Cd.updateContainer(g,o,null,L5);return}c=!0,Cd.updateContainerSync(g,o,null,L5),Cd.flushSyncWork()};return h(),r},unmount(){hu.get(n)===l&&a6(n)}}}function Qte({store:n,children:e,onCreated:t,rootElement:i}){return Ed(()=>{let a=n.getState();a.set(r=>({internal:{...r.internal,active:!0}})),t&&t(a),n.getState().events.connected||a.events.connect==null||a.events.connect(i)},[]),(0,du.jsx)(WI.Provider,{value:n,children:e})}function Eb(n){try{return n()}catch(e){console.warn("[R3F] Error while unmounting root; teardown may be incomplete:",e)}}function a6(n,e){let t=hu.get(n),i=Symbol("unmount");if(!t||!_M(t,{type:"unmount",token:i}))return;let a=()=>{var r;if(t.ready.status==="pending"){t.ready.then(a,a);return}if(!_M(t,{type:"dispose",token:i}))return;hu.delete(n);let o=t.store.getState();o.internal.active=!1,Eb(()=>t.unwatchDpr==null?void 0:t.unwatchDpr()),Eb(()=>o.events.disconnect==null?void 0:o.events.disconnect()),(r=o.gl)!=null&&r.xr&&Eb(()=>o.xr.disconnect()),o.scene&&Eb(()=>Z5(o.scene));let l=Eb(()=>Mte(o.gl,t.ownsRenderer));VI(l)?l.then(()=>e?.(n)):e?.(n)};Cd.updateContainer(null,t.fiber,null,()=>{t.state.status!=="closing"||t.state.token!==i||Cd.updateContainer(null,t.fiber,null,a)})}var Jte=new Set,$te=new Set,ene=new Set;function AI(n,e){if(n.size)for(let{callback:t}of n.values())t(e)}function Gm(n,e){switch(n){case"before":return AI(Jte,e);case"after":return AI($te,e);case"tail":return AI(ene,e)}}var LI,RI;function zI(n,e,t){let i=e.clock.getDelta();e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),LI=e.internal.subscribers;for(let a=0;a<LI.length;a++)RI=LI[a],RI.ref.current(RI.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}var SM=!1,UI=!1,II,F5,Vm;function r6(n){F5=requestAnimationFrame(r6),SM=!0,II=0,Gm("before",n),UI=!0;for(let t of hu.values()){var e;Vm=t.store.getState(),Vm.internal.active&&(Vm.frameloop==="always"||Vm.internal.frames>0)&&!((e=Vm.gl.xr)!=null&&e.isPresenting)&&(II+=zI(n,Vm))}if(UI=!1,Gm("after",n),II===0)return Gm("tail",n),SM=!1,cancelAnimationFrame(F5)}function MM(n,e=1){var t;if(!n)return hu.forEach(i=>MM(i.store.getState(),e));(t=n.gl.xr)!=null&&t.isPresenting||!n.internal.active||n.frameloop==="never"||(e>1?n.internal.frames=Math.min(60,n.internal.frames+e):UI?n.internal.frames=2:n.internal.frames=1,SM||(SM=!0,requestAnimationFrame(r6)))}function QI(n,e=!0,t,i){if(e&&Gm("before",n),t)zI(n,t,i);else for(let a of hu.values())zI(n,a.store.getState());e&&Gm("after",n)}var PI={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function JI(n){let{handlePointer:e}=J5(n);return{priority:1,enabled:!0,compute(t,i,a){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(PI).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;let{events:i,internal:a}=n.getState();(t=a.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(a.lastEvent.current)},connect:t=>{let{set:i,events:a}=n.getState();if(a.disconnect==null||a.disconnect(),i(r=>({events:{...r.events,connected:t}})),a.handlers)for(let r in a.handlers){let o=a.handlers[r],[l,c]=PI[r];t.addEventListener(l,o,{passive:c})}},disconnect:()=>{let{set:t,events:i}=n.getState();if(i.connected){if(i.handlers)for(let a in i.handlers){let r=i.handlers[a],[o]=PI[a];i.connected.removeEventListener(o,r)}t(a=>({events:{...a.events,connected:void 0}}))}}}}var Si=ke(dt());var ho=ke(dt(),1);function o6(n,e){let t;return(...i)=>{window.clearTimeout(t),t=window.setTimeout(()=>n(...i),e)}}function s6({debounce:n,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){let a=t||(typeof window>"u"?class{}:window.ResizeObserver);if(!a)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[r,o]=(0,ho.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=(0,ho.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:r,orientationHandler:null}),c=n?typeof n=="number"?n:n.scroll:null,f=n?typeof n=="number"?n:n.resize:null,h=(0,ho.useRef)(!1);(0,ho.useEffect)(()=>(h.current=!0,()=>{h.current=!1}));let[p,m,g]=(0,ho.useMemo)(()=>{let v=()=>{if(!l.current.element)return;let{left:S,top:M,width:T,height:E,bottom:L,right:P,x:I,y:R}=l.current.element.getBoundingClientRect(),A={left:S,top:M,width:T,height:E,bottom:L,right:P,x:I,y:R};l.current.element instanceof HTMLElement&&i&&(A.height=l.current.element.offsetHeight,A.width=l.current.element.offsetWidth),Object.freeze(A),h.current&&!ane(l.current.lastBounds,A)&&o(l.current.lastBounds=A)};return[v,f?o6(v,f):v,c?o6(v,c):v]},[o,i,c,f]);function b(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(v=>v.removeEventListener("scroll",g,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null),l.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",l.current.orientationHandler))}function x(){l.current.element&&(l.current.resizeObserver=new a(g),l.current.resizeObserver.observe(l.current.element),e&&l.current.scrollContainers&&l.current.scrollContainers.forEach(v=>v.addEventListener("scroll",g,{capture:!0,passive:!0})),l.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",l.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",l.current.orientationHandler))}let _=v=>{!v||v===l.current.element||(b(),l.current.element=v,l.current.scrollContainers=l6(v),x())};return nne(g,!!e),tne(m),(0,ho.useEffect)(()=>{b(),x()},[e,g,m]),(0,ho.useEffect)(()=>b,[]),[_,r,p]}function tne(n){(0,ho.useEffect)(()=>{let e=n;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[n])}function nne(n,e){(0,ho.useEffect)(()=>{if(e){let t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",t,!0)}}},[n,e])}function l6(n){let e=[];if(!n||n===document.body)return e;let{overflow:t,overflowX:i,overflowY:a}=window.getComputedStyle(n);return[t,i,a].some(r=>r==="auto"||r==="scroll")&&e.push(n),[...e,...l6(n.parentElement)]}var ine=["x","y","top","bottom","left","right","width","height"],ane=(n,e)=>ine.every(t=>n[t]===e[t]);var ys=ke(pn());var Nse=ke(TI());function rne({ref:n,children:e,fallback:t,resize:i,style:a,gl:r,events:o=JI,eventSource:l,eventPrefix:c,shadows:f,linear:h,flat:p,legacy:m,orthographic:g,frameloop:b,dpr:x,performance:_,raycaster:v,camera:S,scene:M,onPointerMissed:T,onCreated:E,...L}){Si.useMemo(()=>kb(lM),[]);let P=G5(),[I,R]=s6({scroll:!0,debounce:{scroll:50,resize:0},...i}),A=Si.useRef(null),D=Si.useRef(null);Si.useImperativeHandle(n,()=>A.current);let N=BI(T),H=Si.useCallback(Oe=>N.current==null?void 0:N.current(Oe),[N]),[X,W]=Si.useState(!1),[Y,V]=Si.useState(!1);if(X)throw X;if(Y)throw Y;let G=Si.useRef(null),[$,te]=V5(),ge=Si.useRef(null),Le=()=>l?Y5(l)?l.current:l:D.current;return Si.useInsertionEffect(()=>()=>{let Oe=G.current;G.current=null,Oe?.unmount()},[]),Ed(()=>{let Oe=A.current;R.width>0&&R.height>0&&Oe&&(G.current||(G.current=KI(Oe)),G.current.configure({gl:r,scene:M,events:o,shadows:f,linear:h,flat:p,legacy:m,orthographic:g,frameloop:b,dpr:x,performance:_,raycaster:v,camera:S,size:R,onPointerMissed:H,onCreated:ze=>{var ae;ge.current=ze,ze.events.connect==null||ze.events.connect((ae=Le())!=null?ae:D.current),c&&ze.setEvents({compute:(de,Ie)=>{let Xe=de[c+"X"],ve=de[c+"Y"];Ie.pointer.set(Xe/Ie.size.width*2-1,-(ve/Ie.size.height)*2+1),Ie.raycaster.setFromCamera(Ie.pointer,Ie.camera)}}),E?.(ze)}}).catch(V),G.current.ready.status==="fulfilled"?G.current.render((0,ys.jsx)(P,{children:(0,ys.jsx)(q5,{set:V,children:(0,ys.jsx)(Si.Suspense,{fallback:(0,ys.jsx)(W5,{set:W}),children:e??null})})})):G.current.ready.status==="pending"&&te(G.current.ready))}),Si.useEffect(()=>{var Oe;let ze=(Oe=ge.current)==null?void 0:Oe.get(),ae=Le();ze&&ae&&ze.events.connected!==ae&&(ze.events.connect==null||ze.events.connect(ae))}),Si.useEffect(()=>{let Oe=A.current;return()=>{var ze;Oe.isConnected||(ze=G.current)==null||ze.unmount()}},[]),(0,ys.jsxs)("div",{ref:D,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:l?"none":"auto",...a},...L,children:[(0,ys.jsx)("div",{ref:I,style:{width:"100%",height:"100%"},children:(0,ys.jsx)("canvas",{ref:A,style:{display:"block"},children:t})}),$]})}function u6(n){return(0,ys.jsx)(Sb,{children:(0,ys.jsx)(rne,{...n})})}var c6={type:"change"},eP={type:"start"},d6={type:"end"},TM=new fs,f6=new ao,one=Math.cos(70*nM.DEG2RAD),Zi=new U,Lr=2*Math.PI,wn={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},$I=1e-6,CM=class extends Mm{constructor(e,t=null){super(e,t),this.state=wn.NONE,this.target=new U,this.cursor=new U,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:su.ROTATE,MIDDLE:su.DOLLY,RIGHT:su.PAN},this.touches={ONE:lu.ROTATE,TWO:lu.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new U,this._lastQuaternion=new Di,this._lastTargetPosition=new U,this._quat=new Di().setFromUnitVectors(e.up,new U(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new fd,this._sphericalDelta=new fd,this._scale=1,this._panOffset=new U,this._rotateStart=new pe,this._rotateEnd=new pe,this._rotateDelta=new pe,this._panStart=new pe,this._panEnd=new pe,this._panDelta=new pe,this._dollyStart=new pe,this._dollyEnd=new pe,this._dollyDelta=new pe,this._dollyDirection=new U,this._mouse=new pe,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=lne.bind(this),this._onPointerDown=sne.bind(this),this._onPointerUp=une.bind(this),this._onContextMenu=gne.bind(this),this._onMouseWheel=dne.bind(this),this._onKeyDown=hne.bind(this),this._onTouchStart=pne.bind(this),this._onTouchMove=mne.bind(this),this._onMouseDown=cne.bind(this),this._onMouseMove=fne.bind(this),this._interceptControlDown=vne.bind(this),this._interceptControlUp=yne.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(e){super.connect(e),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(e){e.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=e}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(c6),this.update(),this.state=wn.NONE}update(e=null){let t=this.object.position;Zi.copy(t).sub(this.target),Zi.applyQuaternion(this._quat),this._spherical.setFromVector3(Zi),this.autoRotate&&this.state===wn.NONE&&this._rotateLeft(this._getAutoRotationAngle(e)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let i=this.minAzimuthAngle,a=this.maxAzimuthAngle;isFinite(i)&&isFinite(a)&&(i<-Math.PI?i+=Lr:i>Math.PI&&(i-=Lr),a<-Math.PI?a+=Lr:a>Math.PI&&(a-=Lr),i<=a?this._spherical.theta=Math.max(i,Math.min(a,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+a)/2?Math.max(i,this._spherical.theta):Math.min(a,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{let o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(Zi.setFromSpherical(this._spherical),Zi.applyQuaternion(this._quatInverse),t.copy(this.target).add(Zi),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){let l=Zi.length();o=this._clampDistance(l*this._scale);let c=l-o;this.object.position.addScaledVector(this._dollyDirection,c),this.object.updateMatrixWorld(),r=!!c}else if(this.object.isOrthographicCamera){let l=new U(this._mouse.x,this._mouse.y,0);l.unproject(this.object);let c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=c!==this.object.zoom;let f=new U(this._mouse.x,this._mouse.y,0);f.unproject(this.object),this.object.position.sub(f).add(l),this.object.updateMatrixWorld(),o=Zi.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(TM.origin.copy(this.object.position),TM.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(TM.direction))<one?this.object.lookAt(this.target):(f6.setFromNormalAndCoplanarPoint(this.object.up,this.target),TM.intersectPlane(f6,this.target))))}else if(this.object.isOrthographicCamera){let o=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),o!==this.object.zoom&&(this.object.updateProjectionMatrix(),r=!0)}return this._scale=1,this._performCursorZoom=!1,r||this._lastPosition.distanceToSquared(this.object.position)>$I||8*(1-this._lastQuaternion.dot(this.object.quaternion))>$I||this._lastTargetPosition.distanceToSquared(this.target)>$I?(this.dispatchEvent(c6),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?Lr/60*this.autoRotateSpeed*e:Lr/60/60*this.autoRotateSpeed}_getZoomScale(e){let t=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*t)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,t){Zi.setFromMatrixColumn(t,0),Zi.multiplyScalar(-e),this._panOffset.add(Zi)}_panUp(e,t){this.screenSpacePanning===!0?Zi.setFromMatrixColumn(t,1):(Zi.setFromMatrixColumn(t,0),Zi.crossVectors(this.object.up,Zi)),Zi.multiplyScalar(e),this._panOffset.add(Zi)}_pan(e,t){let i=this.domElement;if(this.object.isPerspectiveCamera){let a=this.object.position;Zi.copy(a).sub(this.target);let r=Zi.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/i.clientHeight,this.object.matrix),this._panUp(2*t*r/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(t*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,t){if(!this.zoomToCursor)return;this._performCursorZoom=!0;let i=this.domElement.getBoundingClientRect(),a=e-i.left,r=t-i.top,o=i.width,l=i.height;this._mouse.x=a/o*2-1,this._mouse.y=-(r/l)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(Lr*this._rotateDelta.x/t.clientHeight),this._rotateUp(Lr*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let t=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),t=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),t=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),t=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-Lr*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),t=!0;break}t&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),a=.5*(e.pageY+t.y);this._rotateStart.set(i,a)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),a=.5*(e.pageY+t.y);this._panStart.set(i,a)}}_handleTouchStartDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,a=e.pageY-t.y,r=Math.sqrt(i*i+a*a);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{let i=this._getSecondPointerPosition(e),a=.5*(e.pageX+i.x),r=.5*(e.pageY+i.y);this._rotateEnd.set(a,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);let t=this.domElement;this._rotateLeft(Lr*this._rotateDelta.x/t.clientHeight),this._rotateUp(Lr*this._rotateDelta.y/t.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{let t=this._getSecondPointerPosition(e),i=.5*(e.pageX+t.x),a=.5*(e.pageY+t.y);this._panEnd.set(i,a)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){let t=this._getSecondPointerPosition(e),i=e.pageX-t.x,a=e.pageY-t.y,r=Math.sqrt(i*i+a*a);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);let o=(e.pageX+t.x)*.5,l=(e.pageY+t.y)*.5;this._updateZoomParameters(o,l)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId){this._pointers.splice(t,1);return}}_isTrackingPointer(e){for(let t=0;t<this._pointers.length;t++)if(this._pointers[t]==e.pointerId)return!0;return!1}_trackPointer(e){let t=this._pointerPositions[e.pointerId];t===void 0&&(t=new pe,this._pointerPositions[e.pointerId]=t),t.set(e.pageX,e.pageY)}_getSecondPointerPosition(e){let t=e.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[t]}_customWheelEvent(e){let t=e.deltaMode,i={clientX:e.clientX,clientY:e.clientY,deltaY:e.deltaY};switch(t){case 1:i.deltaY*=16;break;case 2:i.deltaY*=100;break}return e.ctrlKey&&!this._controlActive&&(i.deltaY*=10),i}};function sne(n){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(n.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(n)&&(this._addPointer(n),n.pointerType==="touch"?this._onTouchStart(n):this._onMouseDown(n)))}function lne(n){this.enabled!==!1&&(n.pointerType==="touch"?this._onTouchMove(n):this._onMouseMove(n))}function une(n){switch(this._removePointer(n),this._pointers.length){case 0:this.domElement.releasePointerCapture(n.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(d6),this.state=wn.NONE;break;case 1:let e=this._pointers[0],t=this._pointerPositions[e];this._onTouchStart({pointerId:e,pageX:t.x,pageY:t.y});break}}function cne(n){let e;switch(n.button){case 0:e=this.mouseButtons.LEFT;break;case 1:e=this.mouseButtons.MIDDLE;break;case 2:e=this.mouseButtons.RIGHT;break;default:e=-1}switch(e){case su.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(n),this.state=wn.DOLLY;break;case su.ROTATE:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=wn.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=wn.ROTATE}break;case su.PAN:if(n.ctrlKey||n.metaKey||n.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(n),this.state=wn.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(n),this.state=wn.PAN}break;default:this.state=wn.NONE}this.state!==wn.NONE&&this.dispatchEvent(eP)}function fne(n){switch(this.state){case wn.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(n);break;case wn.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(n);break;case wn.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(n);break}}function dne(n){this.enabled===!1||this.enableZoom===!1||this.state!==wn.NONE||(n.preventDefault(),this.dispatchEvent(eP),this._handleMouseWheel(this._customWheelEvent(n)),this.dispatchEvent(d6))}function hne(n){this.enabled!==!1&&this._handleKeyDown(n)}function pne(n){switch(this._trackPointer(n),this._pointers.length){case 1:switch(this.touches.ONE){case lu.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(n),this.state=wn.TOUCH_ROTATE;break;case lu.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(n),this.state=wn.TOUCH_PAN;break;default:this.state=wn.NONE}break;case 2:switch(this.touches.TWO){case lu.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(n),this.state=wn.TOUCH_DOLLY_PAN;break;case lu.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(n),this.state=wn.TOUCH_DOLLY_ROTATE;break;default:this.state=wn.NONE}break;default:this.state=wn.NONE}this.state!==wn.NONE&&this.dispatchEvent(eP)}function mne(n){switch(this._trackPointer(n),this.state){case wn.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(n),this.update();break;case wn.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(n),this.update();break;case wn.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(n),this.update();break;case wn.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(n),this.update();break;default:this.state=wn.NONE}}function gne(n){this.enabled!==!1&&n.preventDefault()}function vne(n){n.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function yne(n){n.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}var Ob=ke(dt(),1);function Oi({className:n="",...e}){return(0,Ob.createElement)("button",{...e,className:`lumo-button ${n}`})}function h6({className:n="",...e}){return(0,Ob.createElement)("input",{...e,type:"range",className:`lumo-slider ${n}`})}var IM=ke(dt(),1);var AM=ke(dt(),1);var Nb=new U;function Vo(n,e,t,i,a,r){let o=2*Math.PI*a/4,l=Math.max(r-2*a,0),c=Math.PI/4;Nb.copy(e),Nb[i]=0,Nb.normalize();let f=.5*o/(o+l),h=1-Nb.angleTo(n)/c;return Math.sign(Nb[t])===1?h*f:l/(o+l)+f+f*(1-h)}var EM=class n extends tl{constructor(e=1,t=1,i=1,a=2,r=.1){let o=a*2+1;if(r=Math.min(e/2,t/2,i/2,r),super(1,1,1,o,o,o),this.type="RoundedBoxGeometry",this.parameters={width:e,height:t,depth:i,segments:a,radius:r},o===1)return;let l=this.toNonIndexed();this.index=null,this.attributes.position=l.attributes.position,this.attributes.normal=l.attributes.normal,this.attributes.uv=l.attributes.uv;let c=new U,f=new U,h=new U(e,t,i).divideScalar(2).subScalar(r),p=this.attributes.position.array,m=this.attributes.normal.array,g=this.attributes.uv.array,b=p.length/6,x=new U,_=.5/o;for(let v=0,S=0;v<p.length;v+=3,S+=2)switch(c.fromArray(p,v),f.copy(c),f.x-=Math.sign(f.x)*_,f.y-=Math.sign(f.y)*_,f.z-=Math.sign(f.z)*_,f.normalize(),p[v+0]=h.x*Math.sign(c.x)+f.x*r,p[v+1]=h.y*Math.sign(c.y)+f.y*r,p[v+2]=h.z*Math.sign(c.z)+f.z*r,m[v+0]=f.x,m[v+1]=f.y,m[v+2]=f.z,Math.floor(v/b)){case 0:x.set(1,0,0),g[S+0]=Vo(x,f,"z","y",r,i),g[S+1]=1-Vo(x,f,"y","z",r,t);break;case 1:x.set(-1,0,0),g[S+0]=1-Vo(x,f,"z","y",r,i),g[S+1]=1-Vo(x,f,"y","z",r,t);break;case 2:x.set(0,1,0),g[S+0]=1-Vo(x,f,"x","z",r,e),g[S+1]=Vo(x,f,"z","x",r,i);break;case 3:x.set(0,-1,0),g[S+0]=1-Vo(x,f,"x","z",r,e),g[S+1]=1-Vo(x,f,"z","x",r,i);break;case 4:x.set(0,0,1),g[S+0]=1-Vo(x,f,"x","y",r,e),g[S+1]=1-Vo(x,f,"y","x",r,t);break;case 5:x.set(0,0,-1),g[S+0]=Vo(x,f,"x","y",r,e),g[S+1]=1-Vo(x,f,"y","x",r,t);break}}static fromJSON(e){return new n(e.width,e.height,e.depth,e.segments,e.radius)}};var Zt=ke(pn(),1);kb({RoundedBoxGeometry:EM});var _ne="#514b45",Sne="#fff5e4",wne="#ddbc97";function qe({size:n=[1,1,1],color:e=Sne,radius:t=.08,...i}){return(0,Zt.jsxs)("mesh",{castShadow:!0,receiveShadow:!0,...i,children:[(0,Zt.jsx)("roundedBoxGeometry",{args:[...n,3,Math.min(t,...n.map(a=>a/2))]}),(0,Zt.jsx)("meshStandardMaterial",{color:e,roughness:.85})]})}function Ln({size:n=[1,1,1],color:e,...t}){return(0,Zt.jsxs)("mesh",{castShadow:!0,...t,scale:n,children:[(0,Zt.jsx)("sphereGeometry",{args:[1,20,14]}),(0,Zt.jsx)("meshStandardMaterial",{color:e,roughness:.85})]})}function Bn({radius:n=.15,height:e=.3,color:t,...i}){return(0,Zt.jsxs)("mesh",{castShadow:!0,receiveShadow:!0,...i,children:[(0,Zt.jsx)("cylinderGeometry",{args:[n,n*.85,e,20]}),(0,Zt.jsx)("meshStandardMaterial",{color:t,roughness:.85})]})}function zb({text:n,position:e,small:t=!1,color:i=_ne,bg:a="#fffbf2"}){let r=(0,AM.useMemo)(()=>{let o=document.createElement("canvas");o.width=512,o.height=t?96:128;let l=o.getContext("2d");l.fillStyle=a,l.beginPath(),l.roundRect(0,0,o.width,o.height,32),l.fill(),l.fillStyle=i,l.textAlign="center",l.textBaseline="middle",l.font=`600 ${t?30:32}px -apple-system, sans-serif`,l.fillText(n.length>19?n.slice(0,18)+"\u2026":n,256,o.height/2,470);let c=new Ic(o);return c.colorSpace=hi,c},[n,t,i,a]);return(0,AM.useEffect)(()=>()=>r.dispose(),[r]),(0,Zt.jsx)("sprite",{position:e,scale:[t?1.9:2.35,t?.36:.58,1],children:(0,Zt.jsx)("spriteMaterial",{map:r,transparent:!0,depthTest:!1,toneMapped:!1})})}function pu({position:n,scale:e=1}){return(0,Zt.jsxs)("group",{position:n,scale:e,children:[(0,Zt.jsx)(Bn,{radius:.27,height:.43,position:[0,.22,0],color:"#dbb191"}),(0,Zt.jsx)(Bn,{radius:.22,height:.04,position:[0,.44,0],color:"#75634b"}),(0,Zt.jsx)(Bn,{radius:.035,height:.7,position:[0,.75,0],color:"#7f9a70"}),[0,1,2,3,4].map(t=>(0,Zt.jsx)(Ln,{size:[.19,.35,.11],color:t%2?"#a1b99a":"#7f9e7b",position:[Math.sin(t*2)*.22,.8+t*.11,Math.cos(t*2)*.2],rotation:[.2,t*2,.6]},t))]})}function p6({position:n,color:e,working:t}){return(0,Zt.jsxs)("group",{position:n,children:[(0,Zt.jsx)(qe,{position:[0,.8,0],size:[2.15,.17,1.05],color:wne,radius:.1}),[-.85,.85].flatMap(i=>[-.34,.34].map(a=>(0,Zt.jsx)(qe,{position:[i,.37,a],size:[.11,.75,.11],color:"#c3a486"},i+":"+a))),(0,Zt.jsx)(qe,{position:[0,1.22,-.25],size:[.8,.56,.1],color:"#f9f2e8",radius:.07}),(0,Zt.jsx)(qe,{position:[0,1.23,-.18],size:[.68,.43,.025],color:t?"#8aada6":"#adb4b2",radius:.04}),[0,1,2].map(i=>(0,Zt.jsx)(qe,{position:[-.11,1.32-i*.08,-.16],size:[.31-i*.06,.025,.01],color:t?"#e0ece1":"#c8d2ce"},i)),(0,Zt.jsx)(qe,{position:[0,.96,-.25],size:[.08,.2,.08],color:"#ebe2d6"}),(0,Zt.jsx)(qe,{position:[0,.9,-.22],size:[.34,.045,.21],color:"#f5ece0"}),(0,Zt.jsx)(qe,{position:[0,.91,.2],size:[.6,.045,.24],color:"#f9f0df"}),(0,Zt.jsx)(Bn,{position:[.77,.98,.12],radius:.1,height:.2,color:e}),(0,Zt.jsxs)("mesh",{position:[.88,.99,.12],rotation:[0,Math.PI/2,0],children:[(0,Zt.jsx)("torusGeometry",{args:[.07,.025,8,18]}),(0,Zt.jsx)("meshStandardMaterial",{color:e})]}),(0,Zt.jsx)(qe,{position:[-.77,.92,.03],size:[.26,.06,.34],color:"#a9bba5"}),(0,Zt.jsx)(qe,{position:[0,.4,.88],size:[.62,.13,.55],color:e}),(0,Zt.jsx)(qe,{position:[0,.8,1.1],size:[.65,.65,.14],color:e,radius:.14}),(0,Zt.jsx)(Bn,{radius:.06,height:.37,position:[0,.17,.88],color:"#b7a79a"})]})}function Ub(n){let e=Math.min(5,Math.max(2,Math.ceil(n/2))),t=Math.ceil(n/e);return{cols:e,rows:t,width:Math.max(15,e*2.5+2),depth:Math.max(12,t*5.2+1)}}function Fc(n,e){let{cols:t,rows:i}=Ub(e);return[(n%t-(t-1)/2)*2.5,0,-(i-1)*2.6-2+Math.floor(n/t)*2.6]}function m6(n,e=0){let t=0;for(let i of n)t=t*31+i.charCodeAt(0)>>>0;return{variant:e%6,fur:["#fff0d7","#e5c6a3","#e8dfd1","#f4d8c7","#d5dfd6","#eadcc8"][(t+e)%6],height:.94+e%3*.06,seed:t%997}}function g6(n,e){for(let i=1;i<n.length;i++){let a=n[i-1],r=n[i],o=Math.hypot(r[0]-a[0],r[1]-a[1]);if(e<=o)return{x:a[0]+(r[0]-a[0])*e/(o||1),z:a[1]+(r[1]-a[1])*e/(o||1),angle:Math.atan2(r[0]-a[0],r[1]-a[1])};e-=o}let t=n.at(-1);return{x:t[0],z:t[1],angle:Math.PI}}function v6(n){return n.slice(1).reduce((e,t,i)=>e+Math.hypot(t[0]-n[i][0],t[1]-n[i][1]),0)}var ole=ke(dt(),1);var Qe=ke(pn(),1),tP="#a6b9a5",LM="#ddb5a1",Bb="#fcf1dc";function y6({color:n}){return(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(Bn,{position:[-.82,.92,-.32],radius:.14,height:.04,color:tP}),(0,Qe.jsx)(Bn,{position:[-.82,1.1,-.32],radius:.025,height:.36,color:"#af9d83"}),(0,Qe.jsx)(Ln,{position:[-.76,1.31,-.28],size:[.2,.09,.16],color:tP}),(0,Qe.jsx)(Bn,{position:[.83,.99,-.32],radius:.075,height:.18,color:Bb}),[-.035,.025].map((e,t)=>(0,Qe.jsx)(qe,{position:[.83+e,1.15,-.32],size:[.023,.2,.023],color:t?n:"#7c8f9d","rotation-z":t?.15:-.12},t)),(0,Qe.jsx)(qe,{position:[-.47,.91,.2],size:[.2,.035,.26],color:n,"rotation-y":-.13}),(0,Qe.jsx)(qe,{position:[-.47,.93,.2],size:[.14,.008,.21],color:"#fff2d9"})]})}function Mne({position:n}){return(0,Qe.jsxs)("group",{position:n,children:[(0,Qe.jsx)(Bn,{radius:.3,height:.06,position:[0,.05,0],color:"#bda589"}),(0,Qe.jsx)(Bn,{radius:.035,height:1.9,position:[0,1,0],color:"#bda589"}),(0,Qe.jsx)(Ln,{position:[0,2,0],size:[.45,.23,.45],color:"#f2d6a3"}),(0,Qe.jsx)(Ln,{position:[0,1.88,0],size:[.32,.04,.32],color:"#fff3cf"})]})}function Tne({position:n}){return(0,Qe.jsxs)("group",{position:n,children:[(0,Qe.jsx)(Bn,{position:[0,.09,0],radius:.22,height:.08,color:LM}),(0,Qe.jsxs)("mesh",{position:[0,.34,0],"rotation-x":Math.PI/2,children:[(0,Qe.jsx)("cylinderGeometry",{args:[.28,.28,.08,24]}),(0,Qe.jsx)("meshStandardMaterial",{color:Bb})]}),(0,Qe.jsx)(qe,{position:[0,.4,.05],size:[.025,.14,.02],color:"#97816b"}),(0,Qe.jsx)(qe,{position:[.055,.34,.05],size:[.13,.025,.02],color:"#97816b"})]})}function Cne(){return(0,Qe.jsxs)("group",{position:[-5.4,0,5.7],"rotation-y":.25,children:[(0,Qe.jsx)(Bn,{position:[0,.12,0],radius:.55,height:.22,color:"#d8ba93"}),(0,Qe.jsx)(Ln,{position:[0,.27,0],size:[.46,.12,.43],color:"#d7cbb6"}),(0,Qe.jsx)(Ln,{position:[.02,.37,0],size:[.36,.2,.28],color:"#ecd3b2"}),(0,Qe.jsx)(Ln,{position:[.21,.4,.11],size:[.22,.19,.18],color:"#ecd3b2"}),[-1,1].map(n=>(0,Qe.jsx)(Ln,{position:[.21+n*.13,.55,.09],size:[.07,.12,.075],color:"#ecd3b2","rotation-z":n*.2},n)),[.13,.29].map(n=>(0,Qe.jsx)(qe,{position:[n,.41,.28],size:[.06,.012,.01],color:"#93795f","rotation-z":n>.2?-.15:.15},n)),(0,Qe.jsxs)("mesh",{position:[-.19,.4,.08],"rotation-x":Math.PI/2,children:[(0,Qe.jsx)("torusGeometry",{args:[.2,.065,8,20,Math.PI*1.6]}),(0,Qe.jsx)("meshStandardMaterial",{color:"#d8b78d"})]})]})}function b6({depth:n}){return(0,Qe.jsxs)("group",{name:"office-details",children:[(0,Qe.jsxs)("group",{position:[0,0,-n/2-.2],children:[(0,Qe.jsx)(qe,{size:[5,.8,.65],position:[0,.43,0],color:"#cfb495"}),(0,Qe.jsx)(qe,{size:[5.15,.09,.8],position:[0,.88,0],color:Bb}),[-1.65,-.55,.55,1.65].map((e,t)=>(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(qe,{size:[1,.61,.035],position:[e,.45,.35],color:["#b9c6ae","#e3c5aa","#c8bdd1","#b7c9cb"][t]}),(0,Qe.jsx)(qe,{size:[.13,.025,.03],position:[e,.63,.38],color:"#f9ecd4"})]},e)),(0,Qe.jsx)(qe,{size:[2.5,1.15,.1],position:[0,1.62,-.08],color:"#f7eacb"}),[-1,1].map(e=>(0,Qe.jsx)(qe,{size:[.045,1.3,.06],position:[e,1.35,-.12],color:"#b29b7b"},e)),Array.from({length:6},(e,t)=>(0,Qe.jsx)(qe,{size:[.42,.29,.02],position:[-.73+t%3*.7,1.82-Math.floor(t/3)*.45,-.015],color:[tP,LM,"#b4c6cf"][t%3],"rotation-z":(t%3-1)*.08},t)),(0,Qe.jsx)(pu,{position:[-2,.92,0],scale:.48}),(0,Qe.jsx)(Tne,{position:[2,.94,.04]})]}),(0,Qe.jsxs)("group",{position:[-6.8,0,-2.6],children:[(0,Qe.jsx)(qe,{size:[.75,.85,1.65],position:[0,.44,0],color:"#b8c2b6"}),(0,Qe.jsx)(qe,{size:[.85,.08,1.8],position:[0,.91,0],color:Bb}),(0,Qe.jsx)(qe,{size:[.65,.4,.67],position:[0,1.15,-.3],color:"#e5ded1"}),(0,Qe.jsx)(qe,{size:[.52,.08,.4],position:[0,1.38,-.3],color:"#bbb6aa"}),(0,Qe.jsx)(qe,{size:[.43,.02,.36],position:[0,1.43,-.2],color:"#fff9ed","rotation-x":-.1}),(0,Qe.jsx)(qe,{size:[.48,.07,.3],position:[0,.99,.48],color:LM}),(0,Qe.jsx)(qe,{size:[.42,.04,.27],position:[0,1.04,.48],color:Bb})]}),(0,Qe.jsx)(Mne,{position:[-6.5,0,4.8]}),(0,Qe.jsx)(Cne,{}),(0,Qe.jsx)(Bn,{position:[-3,.28,5.55],radius:.45,height:.5,color:LM}),(0,Qe.jsx)(Bn,{position:[-3,.55,5.55],radius:.46,height:.12,color:"#ecd0bb"}),(0,Qe.jsxs)("group",{position:[5.3,0,5.65],children:[[.25,.85].map(e=>(0,Qe.jsx)(qe,{position:[0,e,0],size:[1.4,.08,.7],color:"#c3b198"},e)),[-.58,.58].map(e=>(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(qe,{position:[e,.55,0],size:[.055,.75,.55],color:"#baa68c"}),[-.23,.23].map(t=>(0,Qe.jsx)(Ln,{position:[e,.12,t],size:[.08,.09,.06],color:"#8a8171"},t))]},e)),[-.4,0,.4].map((e,t)=>(0,Qe.jsxs)("group",{children:[(0,Qe.jsx)(Bn,{position:[e,1.03,0],radius:.13,height:.3,color:["#b9c9b4","#ead1aa","#d4bbce"][t]}),(0,Qe.jsx)(Bn,{position:[e,1.2,0],radius:.14,height:.045,color:"#bda78b"})]},e)),(0,Qe.jsx)(qe,{size:[.75,.22,.5],position:[-.15,.4,0],color:"#f0debf"})]}),(0,Qe.jsx)(pu,{position:[-7.1,0,-.7],scale:.7}),(0,Qe.jsx)(pu,{position:[3.2,0,-n/2-.5],scale:.85}),[-.9,-.3,.3,.9].map(e=>(0,Qe.jsx)(qe,{position:[2+e,.094,4.55],size:[.23,.012,.08],color:"#d1bda3",radius:.02},e))]})}var ul={pending:"\u7B49\u5F85\u4EFB\u52A1",running:"\u4E13\u6CE8\u5DE5\u4F5C",completed:"\u5DF2\u5B8C\u6210",error:"\u9700\u8981\u5E2E\u52A9",cancelled:"\u5DF2\u6682\u505C",superseded:"\u5DF2\u8C03\u6574",idle:"\u4F11\u606F\u4E2D",active:"\u534F\u4F5C\u4E2D",paused:"\u5DF2\u6682\u505C",waiting:"\u7B49\u5F85\u8865\u5145",complete:"\u5DF2\u5B8C\u6210",plan:"\u89C4\u5212",work:"\u6267\u884C",review:"\u8BC4\u5BA1",coordinate:"\u4EA4\u6D41",deliver:"\u4EA4\u4ED8"},lr=["#e2b77e","#a6bdb0","#bcaace","#e1a8a1","#9db9cf","#d0c184"],x6={general:"\u7EFC\u5408\u4EFB\u52A1",development:"\u5F00\u53D1\u4EFB\u52A1",presentation:"\u6F14\u793A\u6587\u7A3F"},_6={simple:"\u7B80\u5355",standard:"\u5E38\u89C4",complex:"\u590D\u6742"};function RM(n){return n.run?.timeline?.length?[...n.run.timeline].sort((e,t)=>e.at-t.at):(n.run?.tasks||[]).flatMap(e=>{let t=n.messages.filter(o=>o.taskId===e.id);if(!t.length)return[];let i=Math.min(...t.map(o=>o.time)),a=Math.max(...t.map(o=>o.finishedAt||0)),r={taskId:e.id,roleId:e.roleId,title:e.title,phase:e.phase,dependsOn:e.dependsOn,dependencyCount:e.dependencyCount,handoffFrom:e.handoffFrom,handoffCount:e.handoffCount};return[{...r,id:e.id+":start",at:i,status:"running"},...a>=i&&e.status!=="running"?[{...r,id:e.id+":end",at:a,status:e.status}]:[]]}).sort((e,t)=>e.at-t.at)}function Ene(n,e,t){let i=new Map;for(let r of e.slice(0,t+1))i.set(r.taskId,{id:r.taskId,roleId:r.roleId,title:r.title,phase:r.phase,status:r.status,dependsOn:r.dependsOn||[],dependencyCount:r.dependencyCount,handoffFrom:r.handoffFrom||[],handoffCount:r.handoffCount});let a=[...i.values()].reverse().find(r=>["plan","coordinate","deliver"].includes(r.phase))?.roleId;return{id:n.id,coordinatorId:a,status:"active",tasks:[...i.values()],artifacts:[]}}function Wm(n){let e=RM(n).map(i=>({...i,kind:"task"})),t=n.messages.flatMap(i=>{let a=new Set(i.mentionIds||[]);for(let r of n.roles){let o=r.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp("(^|[\\s\uFF0C,\uFF1A:\uFF1B;\u3002\uFF01\uFF1F!?])@"+o+"(?=$|[\\s\uFF0C,\uFF1A:\uFF1B;\u3002\uFF01\uFF1F!?])","u").test(i.text||"")&&a.add(r.id)}return a.size?[{id:"mention:"+i.id,kind:"mention",at:i.finishedAt||i.time,roleId:i.roleId,to:[...a],title:`${i.name||"\u7528\u6237"} \u5411 ${[...a].map(r=>n.roles.find(o=>o.id===r)?.name||"\u6210\u5458").join("\u3001")} \u53D1\u8D77\u4EA4\u6D41`,messageId:i.id}]:[]});return[...e,...t].sort((i,a)=>i.at-a.at)}function S6(n,e,t){if(t===null)return{...n,event:e.at(-1),frames:RM(n),historical:!1};let i=Math.max(0,Math.min(t,e.length-1)),a=e[i];if(!a)return{...n,roles:n.run?.selectionMode==="auto"?[]:n.roles,run:n.run?{id:n.run.id,tasks:[],artifacts:[]}:null,messages:[],activities:[],frames:[],asOf:0,historical:!0};let r=e.slice(0,i+1).filter(f=>f.kind==="task"),o=n.run?Ene(n.run,r,r.length-1):null,l=n.messages.filter(f=>f.time<=a.at).map(f=>f.role==="user"||f.finishedAt&&f.finishedAt<=a.at?f:{...f,text:"\u6B64\u65F6\u8F93\u51FA\u5C1A\u672A\u5B8C\u6210",tools:[],finishedAt:void 0,status:"thinking"}),c=n.run?.selectionMode==="auto"?n.roles.filter(f=>o?.tasks.some(h=>h.roleId===f.id)):n.roles;return{...n,roles:c,run:o,messages:l,activities:[],frames:r,asOf:a.at,event:a,historical:!0}}function mu(n,e){let t=n.run?.tasks.filter(o=>o.roleId===e&&o.status!=="superseded")||[],i=t.find(o=>o.status==="running")||t.find(o=>o.status==="error")||t.find(o=>o.status==="pending")||t.at(-1),a=!n.historical&&n.activities.find(o=>o.roleId===e),r=a?.state||(n.run?.status==="paused"?"paused":i?.status||"idle");return{tasks:t,task:i,state:r,label:a?.label||ul[r]||r,detail:a?.detail||i?.title||"\u968F\u65F6\u51C6\u5907\u52A0\u5165\u534F\u4F5C",working:["running","thinking","working","connecting"].includes(r)}}var ft=ke(pn(),1);function w6({position:n,rotation:e=0,color:t="#a5b8a4"}){return(0,ft.jsxs)("group",{position:n,"rotation-y":e,children:[(0,ft.jsx)(qe,{position:[0,.37,0],size:[2.8,.5,.95],color:t,radius:.2}),(0,ft.jsx)(qe,{position:[0,.82,-.4],size:[2.8,.9,.25],color:t,radius:.16}),[-1.35,1.35].map(i=>(0,ft.jsx)(qe,{position:[i,.66,0],size:[.24,.65,1],color:t},i)),[-.85,.85].map((i,a)=>(0,ft.jsx)(qe,{position:[i,.68,-.17],size:[.5,.4,.18],color:["#efcfaa","#f7e9ce","#c6d5c1"][a],"rotation-z":a*.15},i))]})}function Ane({position:n}){return(0,ft.jsxs)("group",{position:n,children:[(0,ft.jsx)(qe,{size:[2.3,2.3,.5],position:[0,1.2,0],color:"#c7a582"}),[.5,1.2,1.9].map((e,t)=>(0,ft.jsxs)("group",{children:[(0,ft.jsx)(qe,{size:[2.1,.55,.48],position:[0,e,.04],color:"#e9d7bc"}),Array.from({length:7},(i,a)=>(0,ft.jsx)(qe,{position:[-.88+a*.27,e,.17],size:[.16,.28+a%3*.06,.3],color:lr[(a+t)%lr.length],"rotation-z":a===5?.16:0},a))]},e))]})}function Lne(){let n=(0,IM.useMemo)(()=>{let e=document.createElement("canvas");e.width=256,e.height=256;let t=e.getContext("2d");t.fillStyle="#f2e6d4",t.fillRect(0,0,256,256),t.strokeStyle="#e0ceb4",t.lineWidth=1;for(let a=0;a<=4;a++)t.beginPath(),t.moveTo(a*64,0),t.lineTo(a*64,256),t.stroke();t.beginPath(),t.moveTo(0,128),t.lineTo(64,128),t.moveTo(128,64),t.lineTo(192,64),t.stroke();let i=new Ic(e);return i.wrapS=i.wrapT=Ac,i.repeat.set(45,45),i.colorSpace=hi,i},[]);return(0,IM.useEffect)(()=>()=>n.dispose(),[n]),(0,ft.jsxs)("mesh",{receiveShadow:!0,"rotation-x":-Math.PI/2,position:[0,.02,0],children:[(0,ft.jsx)("planeGeometry",{args:[180,180]}),(0,ft.jsx)("meshStandardMaterial",{map:n,roughness:.95})]})}function M6({view:n}){let{width:e,depth:t}=Ub(n.roles.length);return(0,ft.jsxs)("group",{children:[(0,ft.jsx)(Lne,{}),(0,ft.jsx)(b6,{depth:t}),n.roles.map((i,a)=>(0,ft.jsxs)("group",{position:Fc(a,n.roles.length),children:[(0,ft.jsx)(p6,{color:lr[a%lr.length],working:mu(n,i.id).working}),(0,ft.jsx)(y6,{color:lr[a%lr.length]})]},i.id)),(0,ft.jsx)(qe,{position:[-4,.065,3.45],size:[4.3,.04,3.3],color:"#d1d9c6",radius:.3}),(0,ft.jsx)(w6,{position:[-4,0,4.5],rotation:Math.PI}),(0,ft.jsx)(w6,{position:[-5.4,0,3],rotation:Math.PI/2,color:"#d9b3a0"}),(0,ft.jsx)(Bn,{radius:.75,height:.14,position:[-3.8,.55,2.9],color:"#f8e7cd"}),[-4.1,-3.5].map(i=>(0,ft.jsx)(qe,{size:[.1,.5,.1],position:[i,.25,2.9],color:"#b59a7d"},i)),(0,ft.jsx)(qe,{size:[.38,.04,.32],position:[-3.9,.65,2.9],color:"#a3b2bc"}),(0,ft.jsx)(Bn,{radius:.09,height:.16,position:[-3.5,.7,3],color:"#d6ab7f"}),(0,ft.jsx)(qe,{position:[2,.065,3],size:[4.3,.035,3.7],color:"#ead9c2",radius:.4}),(0,ft.jsx)(Bn,{position:[2,.85,3.2],radius:1.15,height:.15,color:"#e0bc91"}),(0,ft.jsx)(Bn,{position:[2,.42,3.2],radius:.3,height:.8,color:"#c6a17c"}),[0,1,2,3].map(i=>(0,ft.jsxs)("group",{position:[2+Math.sin(i*Math.PI/2)*1.65,0,3.2+Math.cos(i*Math.PI/2)*1.65],"rotation-y":i*Math.PI/2,children:[(0,ft.jsx)(qe,{position:[0,.45,0],size:[.57,.13,.57],color:"#b9c8bd"}),(0,ft.jsx)(qe,{position:[0,.8,.24],size:[.57,.6,.12],color:"#b9c8bd"}),(0,ft.jsx)(Bn,{position:[0,.2,0],radius:.06,height:.4,color:"#bdab94"})]},i)),[0,1,2].map(i=>(0,ft.jsx)(qe,{position:[1.5+i*.4,.96,3],size:[.27,.035,.36],color:lr[i],"rotation-y":i*.3},i)),(0,ft.jsxs)("group",{position:[4.7,0,4.8],"rotation-y":-.3,children:[(0,ft.jsx)(qe,{size:[2.1,1.3,.12],position:[0,1.6,0],color:"#fcf7e9"}),[-.8,.8].map(i=>(0,ft.jsx)(qe,{size:[.06,1.8,.06],position:[i,.9,0],color:"#b1a38f"},i)),[0,1,2,3].map(i=>(0,ft.jsx)(qe,{size:[.32,.28,.02],position:[-.65+i%2*.65,1.8-Math.floor(i/2)*.45,.08],color:lr[i],"rotation-z":i*.07},i))]}),(0,ft.jsx)("group",{position:[-5.8,0,-t/2+.5],children:(0,ft.jsx)(Ane,{position:[0,0,0]})}),(0,ft.jsxs)("group",{position:[5.3,0,-t/2+.6],children:[(0,ft.jsx)(qe,{position:[0,.55,0],size:[2.6,1.1,.8],color:"#a6b5aa"}),(0,ft.jsx)(qe,{position:[0,1.13,0],size:[2.75,.12,.95],color:"#f8eedd"}),(0,ft.jsx)(qe,{position:[-.65,1.5,0],size:[.65,.65,.55],color:"#716a5e"}),(0,ft.jsx)(qe,{position:[-.65,1.55,.29],size:[.45,.3,.03],color:"#babdaf"}),(0,ft.jsx)(Bn,{radius:.085,height:.18,position:[-.65,1.3,.32],color:"#fff0d3"}),[.2,.5,.8].map(i=>(0,ft.jsx)(Bn,{radius:.09,height:.2,position:[i,1.29,.13],color:"#ddba91"},i))]}),(0,ft.jsx)(pu,{position:[-6.65,0,.4],scale:1.3}),(0,ft.jsx)(pu,{position:[6.5,0,5.1],scale:1.4}),(0,ft.jsx)(pu,{position:[.1,0,5.3],scale:.9}),(0,ft.jsx)(pu,{position:[6.5,0,-t/2+.7],scale:1.2}),(0,ft.jsxs)("group",{position:[0,0,5.6],children:[(0,ft.jsx)(qe,{size:[2.1,.08,.55],position:[0,.09,0],color:"#beac8c"}),(0,ft.jsx)(zb,{text:"WELCOME HOME",small:!0,position:[0,.3,0]})]})]})}var oi=ke(dt(),1);function gu(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function D6(n,e){n.prototype=Object.create(e.prototype),n.prototype.constructor=n,n.__proto__=e}var Dr={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},qb={duration:.5,overwrite:!1,delay:0},vP,Aa,jn,Wo=1e8,Mn=1/Wo,uP=Math.PI*2,Rne=uP/4,Ine=0,k6=Math.sqrt,Pne=Math.cos,Dne=Math.sin,Ki=function(e){return typeof e=="string"},mi=function(e){return typeof e=="function"},yu=function(e){return typeof e=="number"},GM=function(e){return typeof e>"u"},dl=function(e){return typeof e=="object"},Pr=function(e){return e!==!1},yP=function(){return typeof window<"u"},PM=function(e){return mi(e)||Ki(e)},O6=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ja=Array.isArray,kne=/random\([^)]+\)/g,One=/,\s*/g,T6=/(?:-?\.?\d|\.)+/gi,bP=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Id=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,nP=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,xP=/[+-]=-?[.\d]+/,Nne=/[^,'"\[\]\s]+/gi,zne=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,ai,cl,cP,_P,mo={},NM={},N6,z6=function(e){return(NM=Xm(e,mo))&&Za},WM=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Xb=function(e,t){return!t&&console.warn(e)},U6=function(e,t){return e&&(mo[e]=t)&&NM&&(NM[e]=t)||mo},Yb=function(){return 0},Une={suppressEvents:!0,isStart:!0,kill:!1},DM={suppressEvents:!0,kill:!1},Bne={suppressEvents:!0},SP={},Vc=[],fP={},B6,Rr={},iP={},C6=30,kM=[],wP="",MP=function(e){var t=e[0],i,a;if(dl(t)||mi(t)||(e=[e]),!(i=(t._gsap||{}).harness)){for(a=kM.length;a--&&!kM[a].targetTest(t););i=kM[a]}for(a=e.length;a--;)e[a]&&(e[a]._gsap||(e[a]._gsap=new AP(e[a],i)))||e.splice(a,1);return e},Gc=function(e){return e._gsap||MP(qo(e))[0]._gsap},TP=function(e,t,i){return(i=e[t])&&mi(i)?e[t]():GM(i)&&e.getAttribute&&e.getAttribute(t)||i},ur=function(e,t){return(e=e.split(",")).forEach(t)||e},gi=function(e){return Math.round(e*1e5)/1e5||0},ii=function(e){return Math.round(e*1e7)/1e7||0},Pd=function(e,t){var i=t.charAt(0),a=parseFloat(t.substr(2));return e=parseFloat(e),i==="+"?e+a:i==="-"?e-a:i==="*"?e*a:e/a},Fne=function(e,t){for(var i=t.length,a=0;e.indexOf(t[a])<0&&++a<i;);return a<i},zM=function(){var e=Vc.length,t=Vc.slice(0),i,a;for(fP={},Vc.length=0,i=0;i<e;i++)a=t[i],a&&a._lazy&&(a.render(a._lazy[0],a._lazy[1],!0)._lazy=0)},CP=function(e){return!!(e._initted||e._startAt||e.add)},F6=function(e,t,i,a){Vc.length&&!Aa&&zM(),e.render(t,i,a||!!(Aa&&t<0&&CP(e))),Vc.length&&!Aa&&zM()},H6=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(Nne).length<2?t:Ki(e)?e.trim():e},V6=function(e){return e},go=function(e,t){for(var i in t)i in e||(e[i]=t[i]);return e},Hne=function(e){return function(t,i){for(var a in i)a in t||a==="duration"&&e||a==="ease"||(t[a]=i[a])}},Xm=function(e,t){for(var i in t)e[i]=t[i];return e},E6=function n(e,t){for(var i in t)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(e[i]=dl(t[i])?n(e[i]||(e[i]={}),t[i]):t[i]);return e},UM=function(e,t){var i={},a;for(a in e)a in t||(i[a]=e[a]);return i},Vb=function(e){var t=e.parent||ai,i=e.keyframes?Hne(ja(e.keyframes)):go;if(Pr(e.inherit))for(;t;)i(e,t.vars.defaults),t=t.parent||t._dp;return e},Vne=function(e,t){for(var i=e.length,a=i===t.length;a&&i--&&e[i]===t[i];);return i<0},G6=function(e,t,i,a,r){i===void 0&&(i="_first"),a===void 0&&(a="_last");var o=e[a],l;if(r)for(l=t[r];o&&o[r]>l;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[i],e[i]=t),t._next?t._next._prev=t:e[a]=t,t._prev=o,t.parent=t._dp=e,t},qM=function(e,t,i,a){i===void 0&&(i="_first"),a===void 0&&(a="_last");var r=t._prev,o=t._next;r?r._next=o:e[i]===t&&(e[i]=o),o?o._prev=r:e[a]===t&&(e[a]=r),t._next=t._prev=t.parent=null},Wc=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},Ad=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var i=e;i;)i._dirty=1,i=i.parent;return e},Gne=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},dP=function(e,t,i,a){return e._startAt&&(Aa?e._startAt.revert(DM):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,a))},Wne=function n(e){return!e||e._ts&&n(e.parent)},A6=function(e){return e._repeat?Ym(e._tTime,e=e.duration()+e._rDelay)*e:0},Ym=function(e,t){var i=Math.floor(e=ii(e/t));return e&&i===e?i-1:i},BM=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},XM=function(e){return e._end=ii(e._start+(e._tDur/Math.abs(e._ts||e._rts||Mn)||0))},YM=function(e,t){var i=e._dp;return i&&i.smoothChildTiming&&e._ts&&(e._start=ii(i._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),XM(e),i._dirty||Ad(i,e)),e},W6=function(e,t){var i;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(i=BM(e.rawTime(),t),(!t._dur||Qb(0,t.totalDuration(),i)-t._tTime>Mn)&&t.render(i,!0)),Ad(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(i=e;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;e._zTime=-Mn}},fl=function(e,t,i,a){return t.parent&&Wc(t),t._start=ii((yu(i)?i:!i&&FM(t)&&(!e._last||e._last._start>=e._time)?e._last?e._last._start:e._time:i||e!==ai?Go(e,i,t):e._time)+t._delay),t._end=ii(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),G6(e,t,"_first","_last",e._sort?"_start":0),FM(t)||(e._recent=t),a||W6(e,t),e._ts<0&&YM(e,e._tTime),e},q6=function(e,t){return(mo.ScrollTrigger||WM("scrollTrigger",t))&&mo.ScrollTrigger.create(t,e)},X6=function(e,t,i,a,r){if(IP(e,t,r),!e._initted)return 1;if(!i&&e._pt&&!Aa&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&B6!==Ir.frame)return Vc.push(e),e._lazy=[r,a],1},qne=function n(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||n(t))},FM=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},Xne=function(e,t,i,a){var r=e.ratio,o=t<0||!t&&(!e._start&&qne(e)&&!(!e._initted&&FM(e))||(e._ts<0||e._dp._ts<0)&&!FM(e))?0:1,l=e._rDelay,c=0,f,h,p;if(l&&e._repeat&&(c=Qb(0,e._tDur,t),h=Ym(c,l),e._yoyo&&h&1&&(o=1-o),h!==Ym(e._tTime,l)&&(r=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==r||Aa||a||e._zTime===Mn||!t&&e._zTime){if(!e._initted&&X6(e,t,a,i,c))return;for(p=e._zTime,e._zTime=t||(i?Mn:0),i||(i=t&&!p),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=c,f=e._pt;f;)f.r(o,f.d),f=f._next;t<0&&dP(e,t,i,!0),e._onUpdate&&!i&&po(e,"onUpdate"),c&&e._repeat&&!i&&e.parent&&po(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Wc(e,1),!i&&!Aa&&(po(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},Yne=function(e,t,i){var a;if(i>t)for(a=e._first;a&&a._start<=i;){if(a.data==="isPause"&&a._start>t)return a;a=a._next}else for(a=e._last;a&&a._start>=i;){if(a.data==="isPause"&&a._start<t)return a;a=a._prev}},jm=function(e,t,i,a){var r=e._repeat,o=ii(t)||0,l=e._tTime/e._tDur;return l&&!a&&(e._time*=o/e._dur),e._dur=o,e._tDur=r?r<0?1e10:ii(o*(r+1)+e._rDelay*r):o,l>0&&!a&&YM(e,e._tTime=e._tDur*l),e.parent&&XM(e),i||Ad(e.parent,e),e},L6=function(e){return e instanceof Ya?Ad(e):jm(e,e._dur)},jne={_start:0,endTime:Yb,totalDuration:Yb},Go=function n(e,t,i){var a=e.labels,r=e._recent||jne,o=e.duration()>=Wo?r.endTime(!1):e._dur,l,c,f;return Ki(t)&&(isNaN(t)||t in a)?(c=t.charAt(0),f=t.substr(-1)==="%",l=t.indexOf("="),c==="<"||c===">"?(l>=0&&(t=t.replace(/=/,"")),(c==="<"?r._start:r.endTime(r._repeat>=0))+(parseFloat(t.substr(1))||0)*(f?(l<0?r:i).totalDuration()/100:1)):l<0?(t in a||(a[t]=o),a[t]):(c=parseFloat(t.charAt(l-1)+t.substr(l+1)),f&&i&&(c=c/100*(ja(i)?i[0]:i).totalDuration()),l>1?n(e,t.substr(0,l-1),i)+c:o+c)):t==null?o:+t},Gb=function(e,t,i){var a=yu(t[1]),r=(a?2:1)+(e<2?0:1),o=t[r],l,c;if(a&&(o.duration=t[1]),o.parent=i,e){for(l=o,c=i;c&&!("immediateRender"in l);)l=c.vars.defaults||{},c=Pr(c.vars.inherit)&&c.parent;o.immediateRender=Pr(l.immediateRender),e<2?o.runBackwards=1:o.startAt=t[r-1]}return new wi(t[0],o,t[r+1])},qc=function(e,t){return e||e===0?t(e):t},Qb=function(e,t,i){return i<e?e:i>t?t:i},La=function(e,t){return!Ki(e)||!(t=zne.exec(e))?"":t[1]},Zne=function(e,t,i){return qc(i,function(a){return Qb(e,t,a)})},hP=[].slice,Y6=function(e,t){return e&&dl(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&dl(e[0]))&&!e.nodeType&&e!==cl},Kne=function(e,t,i){return i===void 0&&(i=[]),e.forEach(function(a){var r;return Ki(a)&&!t||Y6(a,1)?(r=i).push.apply(r,qo(a)):i.push(a)})||i},qo=function(e,t,i){return jn&&!t&&jn.selector?jn.selector(e):Ki(e)&&!i&&(cP||!Zm())?hP.call((t||_P).querySelectorAll(e),0):ja(e)?Kne(e,i):Y6(e)?hP.call(e,0):e?[e]:[]},pP=function(e){return e=qo(e)[0]||Xb("Invalid scope")||{},function(t){var i=e.current||e.nativeElement||e;return qo(t,i.querySelectorAll?i:i===e?Xb("Invalid scope")||_P.createElement("div"):e)}},j6=function(e){return e.sort(function(){return .5-Math.random()})},Z6=function(e){if(mi(e))return e;var t=dl(e)?e:{each:e},i=Ld(t.ease),a=t.from||0,r=parseFloat(t.base)||0,o={},l=a>0&&a<1,c=isNaN(a)||l,f=t.axis,h=a,p=a;return Ki(a)?h=p={center:.5,edges:.5,end:1}[a]||0:!l&&c&&(h=a[0],p=a[1]),function(m,g,b){var x=(b||t).length,_=o[x],v,S,M,T,E,L,P,I,R;if(!_){if(R=t.grid==="auto"?0:(t.grid||[1,Wo])[1],!R){for(P=-Wo;P<(P=b[R++].getBoundingClientRect().left)&&R<x;);R<x&&R--}for(_=o[x]=[],v=c?Math.min(R,x)*h-.5:a%R,S=R===Wo?0:c?x*p/R-.5:a/R|0,P=0,I=Wo,L=0;L<x;L++)M=L%R-v,T=S-(L/R|0),_[L]=E=f?Math.abs(f==="y"?T:M):k6(M*M+T*T),E>P&&(P=E),E<I&&(I=E);a==="random"&&j6(_),_.max=P-I,_.min=I,_.v=x=(parseFloat(t.amount)||parseFloat(t.each)*(R>x?x-1:f?f==="y"?x/R:R:Math.max(R,x/R))||0)*(a==="edges"?-1:1),_.b=x<0?r-x:r,_.u=La(t.amount||t.each)||0,i=i&&x<0?uie(i):i}return x=(_[m]-_.min)/_.max||0,ii(_.b+(i?i(x):x)*_.v)+_.u}},mP=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(i){var a=ii(Math.round(parseFloat(i)/e)*e*t);return(a-a%1)/t+(yu(i)?0:La(i))}},K6=function(e,t){var i=ja(e),a,r;return!i&&dl(e)&&(a=i=e.radius||Wo,e.values?(e=qo(e.values),(r=!yu(e[0]))&&(a*=a)):e=mP(e.increment)),qc(t,i?mi(e)?function(o){return r=e(o),Math.abs(r-o)<=a?r:o}:function(o){for(var l=parseFloat(r?o.x:o),c=parseFloat(r?o.y:0),f=Wo,h=0,p=e.length,m,g;p--;)r?(m=e[p].x-l,g=e[p].y-c,m=m*m+g*g):m=Math.abs(e[p]-l),m<f&&(f=m,h=p);return h=!a||f<=a?e[h]:o,r||h===o||yu(o)?h:h+La(o)}:mP(e))},Q6=function(e,t,i,a){return qc(ja(e)?!t:i===!0?!!(i=0):!a,function(){return ja(e)?e[~~(Math.random()*e.length)]:(i=i||1e-5)&&(a=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((e-i/2+Math.random()*(t-e+i*.99))/i)*i*a)/a})},Qne=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(a){return t.reduce(function(r,o){return o(r)},a)}},Jne=function(e,t){return function(i){return e(parseFloat(i))+(t||La(i))}},$ne=function(e,t,i){return $6(e,t,0,1,i)},J6=function(e,t,i){return qc(i,function(a){return e[~~t(a)]})},eie=function n(e,t,i){var a=t-e;return ja(e)?J6(e,n(0,e.length),t):qc(i,function(r){return(a+(r-e)%a)%a+e})},tie=function n(e,t,i){var a=t-e,r=a*2;return ja(e)?J6(e,n(0,e.length-1),t):qc(i,function(o){return o=(r+(o-e)%r)%r||0,e+(o>a?r-o:o)})},Km=function(e){return e.replace(kne,function(t){var i=t.indexOf("[")+1,a=t.substring(i||7,i?t.indexOf("]"):t.length-1).split(One);return Q6(i?a:+a[0],i?0:+a[1],+a[2]||1e-5)})},$6=function(e,t,i,a,r){var o=t-e,l=a-i;return qc(r,function(c){return i+((c-e)/o*l||0)})},nie=function n(e,t,i,a){var r=isNaN(e+t)?0:function(g){return(1-g)*e+g*t};if(!r){var o=Ki(e),l={},c,f,h,p,m;if(i===!0&&(a=1)&&(i=null),o)e={p:e},t={p:t};else if(ja(e)&&!ja(t)){for(h=[],p=e.length,m=p-2,f=1;f<p;f++)h.push(n(e[f-1],e[f]));p--,r=function(b){b*=p;var x=Math.min(m,~~b);return h[x](b-x)},i=t}else a||(e=Xm(ja(e)?[]:{},e));if(!h){for(c in t)LP.call(l,e,c,"get",t[c]);r=function(b){return kP(b,l)||(o?e.p:e)}}}return qc(i,r)},R6=function(e,t,i){var a=e.labels,r=Wo,o,l,c;for(o in a)l=a[o]-t,l<0==!!i&&l&&r>(l=Math.abs(l))&&(c=o,r=l);return c},po=function(e,t,i){var a=e.vars,r=a[t],o=jn,l=e._ctx,c,f,h;if(r)return c=a[t+"Params"],f=a.callbackScope||e,i&&Vc.length&&zM(),l&&(jn=l),h=c?r.apply(f,c):r.call(f),jn=o,h},Fb=function(e){return Wc(e),e.scrollTrigger&&e.scrollTrigger.kill(!!Aa),e.progress()<1&&po(e,"onInterrupt"),e},qm,eV=[],tV=function(e){if(e)if(e=!e.name&&e.default||e,yP()||e.headless){var t=e.name,i=mi(e),a=t&&!i&&e.init?function(){this._props=[]}:e,r={init:Yb,render:kP,add:LP,kill:bie,modifier:yie,rawVars:0},o={targetTest:0,get:0,getSetter:jM,aliases:{},register:0};if(Zm(),e!==a){if(Rr[t])return;go(a,go(UM(e,r),o)),Xm(a.prototype,Xm(r,UM(e,o))),Rr[a.prop=t]=a,e.targetTest&&(kM.push(a),SP[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}U6(t,a),e.register&&e.register(Za,a,cr)}else eV.push(e)},Rn=255,Hb={aqua:[0,Rn,Rn],lime:[0,Rn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,Rn],navy:[0,0,128],white:[Rn,Rn,Rn],olive:[128,128,0],yellow:[Rn,Rn,0],orange:[Rn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[Rn,0,0],pink:[Rn,192,203],cyan:[0,Rn,Rn],transparent:[Rn,Rn,Rn,0]},aP=function(e,t,i){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(i-t)*e*6:e<.5?i:e*3<2?t+(i-t)*(2/3-e)*6:t)*Rn+.5|0},nV=function(e,t,i){var a=e?yu(e)?[e>>16,e>>8&Rn,e&Rn]:0:Hb.black,r,o,l,c,f,h,p,m,g,b;if(!a){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),Hb[e])a=Hb[e];else if(e.charAt(0)==="#"){if(e.length<6&&(r=e.charAt(1),o=e.charAt(2),l=e.charAt(3),e="#"+r+r+o+o+l+l+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return a=parseInt(e.substr(1,6),16),[a>>16,a>>8&Rn,a&Rn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),a=[e>>16,e>>8&Rn,e&Rn]}else if(e.substr(0,3)==="hsl"){if(a=b=e.match(T6),!t)c=+a[0]%360/360,f=+a[1]/100,h=+a[2]/100,o=h<=.5?h*(f+1):h+f-h*f,r=h*2-o,a.length>3&&(a[3]*=1),a[0]=aP(c+1/3,r,o),a[1]=aP(c,r,o),a[2]=aP(c-1/3,r,o);else if(~e.indexOf("="))return a=e.match(bP),i&&a.length<4&&(a[3]=1),a}else a=e.match(T6)||Hb.transparent;a=a.map(Number)}return t&&!b&&(r=a[0]/Rn,o=a[1]/Rn,l=a[2]/Rn,p=Math.max(r,o,l),m=Math.min(r,o,l),h=(p+m)/2,p===m?c=f=0:(g=p-m,f=h>.5?g/(2-p-m):g/(p+m),c=p===r?(o-l)/g+(o<l?6:0):p===o?(l-r)/g+2:(r-o)/g+4,c*=60),a[0]=~~(c+.5),a[1]=~~(f*100+.5),a[2]=~~(h*100+.5)),i&&a.length<4&&(a[3]=1),a},iV=function(e){var t=[],i=[],a=-1;return e.split(vu).forEach(function(r){var o=r.match(Id)||[];t.push.apply(t,o),i.push(a+=o.length+1)}),t.c=i,t},I6=function(e,t,i){var a="",r=(e+a).match(vu),o=t?"hsla(":"rgba(",l=0,c,f,h,p;if(!r)return e;if(r=r.map(function(m){return(m=nV(m,t,1))&&o+(t?m[0]+","+m[1]+"%,"+m[2]+"%,"+m[3]:m.join(","))+")"}),i&&(h=iV(e),c=i.c,c.join(a)!==h.c.join(a)))for(f=e.replace(vu,"1").split(Id),p=f.length-1;l<p;l++)a+=f[l]+(~c.indexOf(l)?r.shift()||o+"0,0,0,0)":(h.length?h:r.length?r:i).shift());if(!f)for(f=e.split(vu),p=f.length-1;l<p;l++)a+=f[l]+r[l];return a+f[p]},vu=(function(){var n="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in Hb)n+="|"+e+"\\b";return new RegExp(n+")","gi")})(),iie=/hsl[a]?\(/,EP=function(e){var t=e.join(" "),i;if(vu.lastIndex=0,vu.test(t))return i=iie.test(t),e[1]=I6(e[1],i),e[0]=I6(e[0],i,iV(e[1])),!0},jb,Ir=(function(){var n=Date.now,e=500,t=33,i=n(),a=i,r=1e3/240,o=r,l=[],c,f,h,p,m,g,b=function x(_){var v=n()-a,S=_===!0,M,T,E,L;if((v>e||v<0)&&(i+=v-t),a+=v,E=a-i,M=E-o,(M>0||S)&&(L=++p.frame,m=E-p.time*1e3,p.time=E=E/1e3,o+=M+(M>=r?0:r-M),T=1),S||(c=f(x)),T)for(g=0;g<l.length;g++)l[g](E,m,L,_)};return p={time:0,frame:0,tick:function(){b(!0)},deltaRatio:function(_){return m/(1e3/(_||60))},wake:function(){N6&&(!cP&&yP()&&(cl=cP=window,_P=cl.document||{},mo.gsap=Za,(cl.gsapVersions||(cl.gsapVersions=[])).push(Za.version),z6(NM||cl.GreenSockGlobals||!cl.gsap&&cl||{}),eV.forEach(tV)),h=typeof requestAnimationFrame<"u"&&requestAnimationFrame,c&&p.sleep(),f=h||function(_){return setTimeout(_,o-p.time*1e3+1|0)},jb=1,b(2))},sleep:function(){(h?cancelAnimationFrame:clearTimeout)(c),jb=0,f=Yb},lagSmoothing:function(_,v){e=_||1/0,t=Math.min(v||33,e)},fps:function(_){r=1e3/(_||240),o=p.time*1e3+r},add:function(_,v,S){var M=v?function(T,E,L,P){_(T,E,L,P),p.remove(M)}:_;return p.remove(_),l[S?"unshift":"push"](M),Zm(),M},remove:function(_,v){~(v=l.indexOf(_))&&l.splice(v,1)&&g>=v&&g--},_listeners:l},p})(),Zm=function(){return!jb&&Ir.wake()},Kt={},aie=/^[\d.\-M][\d.\-,\s]/,rie=/["']/g,oie=function(e){for(var t={},i=e.substr(1,e.length-3).split(":"),a=i[0],r=1,o=i.length,l,c,f;r<o;r++)c=i[r],l=r!==o-1?c.lastIndexOf(","):c.length,f=c.substr(0,l),t[a]=isNaN(f)?f.replace(rie,"").trim():+f,a=c.substr(l+1).trim();return t},sie=function(e){var t=e.indexOf("(")+1,i=e.indexOf(")"),a=e.indexOf("(",t);return e.substring(t,~a&&a<i?e.indexOf(")",i+1):i)},lie=function(e){var t=(e+"").split("("),i=Kt[t[0]];return i&&t.length>1&&i.config?i.config.apply(null,~e.indexOf("{")?[oie(t[1])]:sie(e).split(",").map(H6)):Kt._CE&&aie.test(e)?Kt._CE("",e):i},uie=function(e){return function(t){return 1-e(1-t)}},Ld=function(e,t){return e&&(mi(e)?e:Kt[e]||lie(e))||t},Dd=function(e,t,i,a){i===void 0&&(i=function(c){return 1-t(1-c)}),a===void 0&&(a=function(c){return c<.5?t(c*2)/2:1-t((1-c)*2)/2});var r={easeIn:t,easeOut:i,easeInOut:a},o;return ur(e,function(l){Kt[l]=mo[l]=r,Kt[o=l.toLowerCase()]=i;for(var c in r)Kt[o+(c==="easeIn"?".in":c==="easeOut"?".out":".inOut")]=Kt[l+"."+c]=r[c]}),r},aV=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},rP=function n(e,t,i){var a=t>=1?t:1,r=(i||(e?.3:.45))/(t<1?t:1),o=r/uP*(Math.asin(1/a)||0),l=function(h){return h===1?1:a*Math.pow(2,-10*h)*Dne((h-o)*r)+1},c=e==="out"?l:e==="in"?function(f){return 1-l(1-f)}:aV(l);return r=uP/r,c.config=function(f,h){return n(e,f,h)},c},oP=function n(e,t){t===void 0&&(t=1.70158);var i=function(o){return o?--o*o*((t+1)*o+t)+1:0},a=e==="out"?i:e==="in"?function(r){return 1-i(1-r)}:aV(i);return a.config=function(r){return n(e,r)},a};ur("Linear,Quad,Cubic,Quart,Quint,Strong",function(n,e){var t=e<5?e+1:e;Dd(n+",Power"+(t-1),e?function(i){return Math.pow(i,t)}:function(i){return i},function(i){return 1-Math.pow(1-i,t)},function(i){return i<.5?Math.pow(i*2,t)/2:1-Math.pow((1-i)*2,t)/2})});Kt.Linear.easeNone=Kt.none=Kt.Linear.easeIn;Dd("Elastic",rP("in"),rP("out"),rP());(function(n,e){var t=1/e,i=2*t,a=2.5*t,r=function(l){return l<t?n*l*l:l<i?n*Math.pow(l-1.5/e,2)+.75:l<a?n*(l-=2.25/e)*l+.9375:n*Math.pow(l-2.625/e,2)+.984375};Dd("Bounce",function(o){return 1-r(1-o)},r)})(7.5625,2.75);Dd("Expo",function(n){return Math.pow(2,10*(n-1))*n+n*n*n*n*n*n*(1-n)});Dd("Circ",function(n){return-(k6(1-n*n)-1)});Dd("Sine",function(n){return n===1?1:-Pne(n*Rne)+1});Dd("Back",oP("in"),oP("out"),oP());Kt.SteppedEase=Kt.steps=mo.SteppedEase={config:function(e,t){e===void 0&&(e=1);var i=1/e,a=e+(t?0:1),r=t?1:0,o=1-Mn;return function(l){return((a*Qb(0,o,l)|0)+r)*i}}};qb.ease=Kt["quad.out"];ur("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(n){return wP+=n+","+n+"Params,"});var AP=function(e,t){this.id=Ine++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:TP,this.set=t?t.getSetter:jM},Zb=(function(){function n(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,jm(this,+t.duration,1,1),this.data=t.data,jn&&(this._ctx=jn,jn.data.push(this)),jb||Ir.wake()}var e=n.prototype;return e.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},e.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},e.totalDuration=function(i){return arguments.length?(this._dirty=0,jm(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(i,a){if(Zm(),!arguments.length)return this._tTime;var r=this._dp;if(r&&r.smoothChildTiming&&this._ts){for(YM(this,i),!r._dp||r.parent||W6(r,this);r&&r.parent;)r.parent._time!==r._start+(r._ts>=0?r._tTime/r._ts:(r.totalDuration()-r._tTime)/-r._ts)&&r.totalTime(r._tTime,!0),r=r.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&fl(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!a||this._initted&&Math.abs(this._zTime)===Mn||!this._initted&&this._dur&&i||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),F6(this,i,a)),this},e.time=function(i,a){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+A6(this))%(this._dur+this._rDelay)||(i?this._dur:0),a):this._time},e.totalProgress=function(i,a){return arguments.length?this.totalTime(this.totalDuration()*i,a):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(i,a){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+A6(this),a):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(i,a){var r=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*r,a):this._repeat?Ym(this._tTime,r)+1:1},e.timeScale=function(i,a){if(!arguments.length)return this._rts===-Mn?0:this._rts;if(this._rts===i)return this;var r=this.parent&&this._ts?BM(this.parent._time,this):this._tTime,o=this._rts<0;this._rts=+i||0,this._ts=this._ps||i===-Mn?0:this._rts;var l=this.totalDuration();return(o!==this._rts<0||r>0&&r<l)&&this.totalTime(Qb(-Math.abs(this._delay),l,r),a!==!1),XM(this),Gne(this)},e.paused=function(i){if(!arguments.length)return this._ps;if(this._ps!==i)if(this._ps=i,i)this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0;else{Zm(),this._ts=this._rts;var a=this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,r=this.progress()===1&&Math.abs(this._zTime)!==Mn,o;if(r)for(this._tTime-=Mn,o=this._first;o;){if(!o._dur&&o._zTime<0&&o._ts&&o._start<=a+Mn){r=!1;break}o=o._next}this.totalTime(a,r)}return this},e.startTime=function(i){if(arguments.length){this._start=ii(i);var a=this.parent||this._dp;return a&&(a._sort||!this.parent)&&fl(a,this,this._start-this._delay),this}return this._start},e.endTime=function(i){return this._start+(Pr(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(i){var a=this.parent||this._dp;return a?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?BM(a.rawTime(i),this):this._tTime:this._tTime},e.revert=function(i){i===void 0&&(i=Bne);var a=Aa;return Aa=i,CP(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),Aa=a,this},e.globalTime=function(i){for(var a=this,r=arguments.length?i:a.rawTime();a;)r=a._start+r/(Math.abs(a._ts)||1),a=a._dp;return!this.parent&&this._sat?this._sat.globalTime(i):r},e.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,L6(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(i){if(arguments.length){var a=this._time;return this._rDelay=i,L6(this),a?this.time(a):this}return this._rDelay},e.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},e.seek=function(i,a){return this.totalTime(Go(this,i),Pr(a))},e.restart=function(i,a){return this.play().totalTime(i?-this._delay:0,Pr(a)),this._dur||(this._zTime=-Mn),this},e.play=function(i,a){return i!=null&&this.seek(i,a),this.reversed(!1).paused(!1)},e.reverse=function(i,a){return i!=null&&this.seek(i||this.totalDuration(),a),this.reversed(!0).paused(!1)},e.pause=function(i,a){return i!=null&&this.seek(i,a),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-Mn:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-Mn,this},e.isActive=function(){var i=this.parent||this._dp,a=this._start,r;return!!(!i||this._ts&&this._initted&&i.isActive()&&(r=i.rawTime(!0))>=a&&r<this.endTime(!0)-Mn)},e.eventCallback=function(i,a,r){var o=this.vars;return arguments.length>1?(a?(o[i]=a,r&&(o[i+"Params"]=r),i==="onUpdate"&&(this._onUpdate=a)):delete o[i],this):o[i]},e.then=function(i){var a=this,r=a._prom;return new Promise(function(o){var l=mi(i)?i:V6,c=function(){var h=a.then;a.then=null,r&&r(),mi(l)&&(l=l(a))&&(l.then||l===a)&&(a.then=h),o(l),a.then=h};a._initted&&a.totalProgress()===1&&a._ts>=0||!a._tTime&&a._ts<0?c():a._prom=c})},e.kill=function(){Fb(this)},n})();go(Zb.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-Mn,_prom:0,_ps:!1,_rts:1});var Ya=(function(n){D6(e,n);function e(i,a){var r;return i===void 0&&(i={}),r=n.call(this,i)||this,r.labels={},r.smoothChildTiming=!!i.smoothChildTiming,r.autoRemoveChildren=!!i.autoRemoveChildren,r._sort=Pr(i.sortChildren),ai&&fl(i.parent||ai,gu(r),a),i.reversed&&r.reverse(),i.paused&&r.paused(!0),i.scrollTrigger&&q6(gu(r),i.scrollTrigger),r}var t=e.prototype;return t.to=function(a,r,o){return Gb(0,arguments,this),this},t.from=function(a,r,o){return Gb(1,arguments,this),this},t.fromTo=function(a,r,o,l){return Gb(2,arguments,this),this},t.set=function(a,r,o){return r.duration=0,r.parent=this,Vb(r).repeatDelay||(r.repeat=0),r.immediateRender=!!r.immediateRender,new wi(a,r,Go(this,o),1),this},t.call=function(a,r,o){return fl(this,wi.delayedCall(0,a,r),o)},t.staggerTo=function(a,r,o,l,c,f,h){return o.duration=r,o.stagger=o.stagger||l,o.onComplete=f,o.onCompleteParams=h,o.parent=this,new wi(a,o,Go(this,c)),this},t.staggerFrom=function(a,r,o,l,c,f,h){return o.runBackwards=1,Vb(o).immediateRender=Pr(o.immediateRender),this.staggerTo(a,r,o,l,c,f,h)},t.staggerFromTo=function(a,r,o,l,c,f,h,p){return l.startAt=o,Vb(l).immediateRender=Pr(l.immediateRender),this.staggerTo(a,r,l,c,f,h,p)},t.render=function(a,r,o){var l=this._time,c=this._dirty?this.totalDuration():this._tDur,f=this._dur,h=a<=0?0:ii(a),p=this._zTime<0!=a<0&&(this._initted||!f),m,g,b,x,_,v,S,M,T,E,L,P;if(this!==ai&&h>c&&a>=0&&(h=c),h!==this._tTime||o||p){if(l!==this._time&&f&&(h+=this._time-l,a+=this._time-l),m=h,T=this._start,M=this._ts,v=!M,p&&(f||(l=this._zTime),(a||!r)&&(this._zTime=a)),this._repeat){if(L=this._yoyo,_=f+this._rDelay,this._repeat<-1&&a<0)return this.totalTime(_*100+a,r,o);if(m=ii(h%_),h===c?(x=this._repeat,m=f):(E=ii(h/_),x=~~E,x&&x===E&&(m=f,x--),m>f&&(m=f)),E=Ym(this._tTime,_),!l&&this._tTime&&E!==x&&this._tTime-E*_-this._dur<=0&&(E=x),L&&x&1&&(m=f-m,P=1),x!==E&&!this._lock){var I=L&&E&1,R=I===(L&&x&1);if(x<E&&(I=!I),l=I?0:h%f?f:h,this._lock=1,this.render(l||(P?0:ii(x*_)),r,!f)._lock=0,this._tTime=h,!r&&this.parent&&po(this,"onRepeat"),this.vars.repeatRefresh&&!P&&(this.invalidate()._lock=1,E=x),l&&l!==this._time||v!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(f=this._dur,c=this._tDur,R&&(this._lock=2,l=I?f:-1e-4,this.render(l,!0),this.vars.repeatRefresh&&!P&&this.invalidate()),this._lock=0,!this._ts&&!v)return this}}if(this._hasPause&&!this._forcing&&this._lock<2&&(S=Yne(this,ii(l),ii(m)),S&&(h-=m-(m=S._start))),this._tTime=h,this._time=m,this._act=!!M,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=a,l=0),!l&&h&&f&&!r&&!E&&(po(this,"onStart"),this._tTime!==h))return this;if(m>=l&&a>=0)for(g=this._first;g;){if(b=g._next,(g._act||m>=g._start)&&g._ts&&S!==g){if(g.parent!==this)return this.render(a,r,o);if(g.render(g._ts>0?(m-g._start)*g._ts:(g._dirty?g.totalDuration():g._tDur)+(m-g._start)*g._ts,r,o),m!==this._time||!this._ts&&!v){S=0,b&&(h+=this._zTime=-Mn);break}}g=b}else{g=this._last;for(var A=a<0?a:m;g;){if(b=g._prev,(g._act||A<=g._end)&&g._ts&&S!==g){if(g.parent!==this)return this.render(a,r,o);if(g.render(g._ts>0?(A-g._start)*g._ts:(g._dirty?g.totalDuration():g._tDur)+(A-g._start)*g._ts,r,o||Aa&&CP(g)),m!==this._time||!this._ts&&!v){S=0,b&&(h+=this._zTime=A?-Mn:Mn);break}}g=b}}if(S&&!r&&(this.pause(),S.render(m>=l?0:-Mn)._zTime=m>=l?1:-1,this._ts))return this._start=T,XM(this),this.render(a,r,o);this._onUpdate&&!r&&po(this,"onUpdate",!0),(h===c&&this._tTime>=this.totalDuration()||!h&&l)&&(T===this._start||Math.abs(M)!==Math.abs(this._ts))&&(this._lock||((a||!f)&&(h===c&&this._ts>0||!h&&this._ts<0)&&Wc(this,1),!r&&!(a<0&&!l)&&(h||l||!c)&&(po(this,h===c&&a>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(h<c&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(a,r){var o=this;if(yu(r)||(r=Go(this,r,a)),!(a instanceof Zb)){if(ja(a))return a.forEach(function(l){return o.add(l,r)}),this;if(Ki(a))return this.addLabel(a,r);if(mi(a))a=wi.delayedCall(0,a);else return this}return this!==a?fl(this,a,r):this},t.getChildren=function(a,r,o,l){a===void 0&&(a=!0),r===void 0&&(r=!0),o===void 0&&(o=!0),l===void 0&&(l=-Wo);for(var c=[],f=this._first;f;)f._start>=l&&(f instanceof wi?r&&c.push(f):(o&&c.push(f),a&&c.push.apply(c,f.getChildren(!0,r,o)))),f=f._next;return c},t.getById=function(a){for(var r=this.getChildren(1,1,1),o=r.length;o--;)if(r[o].vars.id===a)return r[o]},t.remove=function(a){return Ki(a)?this.removeLabel(a):mi(a)?this.killTweensOf(a):(a.parent===this&&qM(this,a),a===this._recent&&(this._recent=this._last),Ad(this))},t.totalTime=function(a,r){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ii(Ir.time-(this._ts>0?a/this._ts:(this.totalDuration()-a)/-this._ts))),n.prototype.totalTime.call(this,a,r),this._forcing=0,this):this._tTime},t.addLabel=function(a,r){return this.labels[a]=Go(this,r),this},t.removeLabel=function(a){return delete this.labels[a],this},t.addPause=function(a,r,o){var l=wi.delayedCall(0,r||Yb,o);return l.data="isPause",this._hasPause=1,fl(this,l,Go(this,a))},t.removePause=function(a){var r=this._first;for(a=Go(this,a);r;)r._start===a&&r.data==="isPause"&&Wc(r),r=r._next},t.killTweensOf=function(a,r,o){for(var l=this.getTweensOf(a,o),c=l.length;c--;)Hc!==l[c]&&l[c].kill(a,r);return this},t.getTweensOf=function(a,r){for(var o=[],l=qo(a),c=this._first,f=yu(r),h;c;)c instanceof wi?Fne(c._targets,l)&&(f?(!Hc||c._initted&&c._ts)&&c.globalTime(0)<=r&&c.globalTime(c.totalDuration())>r:!r||c.isActive())&&o.push(c):(h=c.getTweensOf(l,r)).length&&o.push.apply(o,h),c=c._next;return o},t.tweenTo=function(a,r){r=r||{};var o=this,l=Go(o,a),c=r,f=c.startAt,h=c.onStart,p=c.onStartParams,m=c.immediateRender,g,b=wi.to(o,go({ease:r.ease||"none",lazy:!1,immediateRender:!1,time:l,overwrite:"auto",duration:r.duration||Math.abs((l-(f&&"time"in f?f.time:o._time))/o.timeScale())||Mn,onStart:function(){if(o.pause(),!g){var _=r.duration||Math.abs((l-(f&&"time"in f?f.time:o._time))/o.timeScale());b._dur!==_&&jm(b,_,0,1).render(b._time,!0,!0),g=1}h&&h.apply(b,p||[])}},r));return m?b.render(0):b},t.tweenFromTo=function(a,r,o){return this.tweenTo(r,go({startAt:{time:Go(this,a)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(a){return a===void 0&&(a=this._time),R6(this,Go(this,a))},t.previousLabel=function(a){return a===void 0&&(a=this._time),R6(this,Go(this,a),1)},t.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.previousLabel(this._time+Mn)},t.shiftChildren=function(a,r,o){o===void 0&&(o=0);var l=this._first,c=this.labels,f;for(a=ii(a);l;)l._start>=o&&(l._start+=a,l._end+=a),l=l._next;if(r)for(f in c)c[f]>=o&&(c[f]+=a);return Ad(this)},t.invalidate=function(a){var r=this._first;for(this._lock=0;r;)r.invalidate(a),r=r._next;return n.prototype.invalidate.call(this,a)},t.clear=function(a){a===void 0&&(a=!0);for(var r=this._first,o;r;)o=r._next,this.remove(r),r=o;return this._dp&&(this._time=this._tTime=this._pTime=0),a&&(this.labels={}),Ad(this)},t.totalDuration=function(a){var r=0,o=this,l=o._last,c=Wo,f,h,p;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-a:a));if(o._dirty){for(p=o.parent;l;)f=l._prev,l._dirty&&l.totalDuration(),h=l._start,h>c&&o._sort&&l._ts&&!o._lock?(o._lock=1,fl(o,l,h-l._delay,1)._lock=0):c=h,h<0&&l._ts&&(r-=h,(!p&&!o._dp||p&&p.smoothChildTiming)&&(o._start+=ii(h/o._ts),o._time-=h,o._tTime-=h),o.shiftChildren(-h,!1,-1/0),c=0),l._end>r&&l._ts&&(r=l._end),l=f;jm(o,o===ai&&o._time>r?o._time:r,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(a){if(ai._ts&&(F6(ai,BM(a,ai)),B6=Ir.frame),Ir.frame>=C6){C6+=Dr.autoSleep||120;var r=ai._first;if((!r||!r._ts)&&Dr.autoSleep&&Ir._listeners.length<2){for(;r&&!r._ts;)r=r._next;r||Ir.sleep()}}},e})(Zb);go(Ya.prototype,{_lock:0,_hasPause:0,_forcing:0});var cie=function(e,t,i,a,r,o,l){var c=new cr(this._pt,e,t,0,1,DP,null,r),f=0,h=0,p,m,g,b,x,_,v,S;for(c.b=i,c.e=a,i+="",a+="",(v=~a.indexOf("random("))&&(a=Km(a)),o&&(S=[i,a],o(S,e,t),i=S[0],a=S[1]),m=i.match(nP)||[];p=nP.exec(a);)b=p[0],x=a.substring(f,p.index),g?g=(g+1)%5:x.substr(-5)==="rgba("&&(g=1),b!==m[h++]&&(_=parseFloat(m[h-1])||0,c._pt={_next:c._pt,p:x||h===1?x:",",s:_,c:b.charAt(1)==="="?Pd(_,b)-_:parseFloat(b)-_,m:g&&g<4?Math.round:0},f=nP.lastIndex);return c.c=f<a.length?a.substring(f,a.length):"",c.fp=l,(xP.test(a)||v)&&(c.e=0),this._pt=c,c},LP=function(e,t,i,a,r,o,l,c,f,h){mi(a)&&(a=a(r||0,e,o));var p=e[t],m=i!=="get"?i:mi(p)?f?e[t.indexOf("set")||!mi(e["get"+t.substr(3)])?t:"get"+t.substr(3)](f):e[t]():p,g=mi(p)?f?mie:oV:PP,b;if(Ki(a)&&(~a.indexOf("random(")&&(a=Km(a)),a.charAt(1)==="="&&(b=Pd(m,a)+(La(m)||0),(b||b===0)&&(a=b))),!h||m!==a||gP)return!isNaN(m*a)&&a!==""?(b=new cr(this._pt,e,t,+m||0,a-(m||0),typeof p=="boolean"?vie:sV,0,g),f&&(b.fp=f),l&&b.modifier(l,this,e),this._pt=b):(!p&&!(t in e)&&WM(t,a),cie.call(this,e,t,m,a,g,c||Dr.stringFilter,f))},fie=function(e,t,i,a,r){if(mi(e)&&(e=Wb(e,r,t,i,a)),!dl(e)||e.style&&e.nodeType||ja(e)||O6(e))return Ki(e)?Wb(e,r,t,i,a):e;var o={},l;for(l in e)o[l]=Wb(e[l],r,t,i,a);return o},RP=function(e,t,i,a,r,o){var l,c,f,h;if(Rr[e]&&(l=new Rr[e]).init(r,l.rawVars?t[e]:fie(t[e],a,r,o,i),i,a,o)!==!1&&(i._pt=c=new cr(i._pt,r,e,0,1,l.render,l,0,l.priority),i!==qm))for(f=i._ptLookup[i._targets.indexOf(r)],h=l._props.length;h--;)f[l._props[h]]=c;return l},Hc,gP,IP=function n(e,t,i){var a=e.vars,r=a.ease,o=a.startAt,l=a.immediateRender,c=a.lazy,f=a.onUpdate,h=a.runBackwards,p=a.yoyoEase,m=a.keyframes,g=a.autoRevert,b=e._dur,x=e._startAt,_=e._targets,v=e.parent,S=v&&v.data==="nested"?v.vars.targets:_,M=e._overwrite==="auto"&&!vP,T=e.timeline,E=a.easeReverse||p,L,P,I,R,A,D,N,H,X,W,Y,V,G;if(T&&(!m||!r)&&(r="none"),e._ease=Ld(r,qb.ease),e._rEase=E&&(Ld(E)||e._ease),e._from=!T&&!!a.runBackwards,e._from&&(e.ratio=1),!T||m&&!a.stagger){if(H=_[0]?Gc(_[0]).harness:0,V=H&&a[H.prop],L=UM(a,SP),x&&(x._zTime<0&&x.progress(1),t<0&&h&&l&&!g?x.render(-1,!0):x.revert(h&&b?DM:Une),x._lazy=0),o){if(Wc(e._startAt=wi.set(_,go({data:"isStart",overwrite:!1,parent:v,immediateRender:!0,lazy:!x&&Pr(c),startAt:null,delay:0,onUpdate:f&&function(){return po(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Aa||!l&&!g)&&e._startAt.revert(DM),l&&b&&t<=0&&i<=0){t&&(e._zTime=t);return}}else if(h&&b&&!x){if(t&&(l=!1),I=go({overwrite:!1,data:"isFromStart",lazy:l&&!x&&Pr(c),immediateRender:l,stagger:0,parent:v},L),V&&(I[H.prop]=V),Wc(e._startAt=wi.set(_,I)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(Aa?e._startAt.revert(DM):e._startAt.render(-1,!0)),e._zTime=t,!l)n(e._startAt,Mn,Mn);else if(!t)return}for(e._pt=e._ptCache=0,c=b&&Pr(c)||c&&!b,P=0;P<_.length;P++){if(A=_[P],N=A._gsap||MP(_)[P]._gsap,e._ptLookup[P]=W={},fP[N.id]&&Vc.length&&zM(),Y=S===_?P:S.indexOf(A),H&&(X=new H).init(A,V||L,e,Y,S)!==!1&&(e._pt=R=new cr(e._pt,A,X.name,0,1,X.render,X,0,X.priority),X._props.forEach(function($){W[$]=R}),X.priority&&(D=1)),!H||V)for(I in L)Rr[I]&&(X=RP(I,L,e,Y,A,S))?X.priority&&(D=1):W[I]=R=LP.call(e,A,I,"get",L[I],Y,S,0,a.stringFilter);e._op&&e._op[P]&&e.kill(A,e._op[P]),M&&e._pt&&(Hc=e,ai.killTweensOf(A,W,e.globalTime(t)),G=!e.parent,Hc=0),e._pt&&c&&(fP[N.id]=1)}D&&OP(e),e._onInit&&e._onInit(e)}e._onUpdate=f,e._initted=(!e._op||e._pt)&&!G,m&&t<=0&&T.render(Wo,!0,!0)},die=function(e,t,i,a,r,o,l,c){var f=(e._pt&&e._ptCache||(e._ptCache={}))[t],h,p,m,g;if(!f)for(f=e._ptCache[t]=[],m=e._ptLookup,g=e._targets.length;g--;){if(h=m[g][t],h&&h.d&&h.d._pt)for(h=h.d._pt;h&&h.p!==t&&h.fp!==t;)h=h._next;if(!h)return gP=1,e.vars[t]="+=0",IP(e,l),gP=0,c?Xb(t+" not eligible for reset. Try splitting into individual properties"):1;f.push(h)}for(g=f.length;g--;)p=f[g],h=p._pt||p,h.s=(a||a===0)&&!r?a:h.s+(a||0)+o*h.c,h.c=i-h.s,p.e&&(p.e=gi(i)+La(p.e)),p.b&&(p.b=h.s+La(p.b))},hie=function(e,t){var i=e[0]?Gc(e[0]).harness:0,a=i&&i.aliases,r,o,l,c;if(!a)return t;r=Xm({},t);for(o in a)if(o in r)for(c=a[o].split(","),l=c.length;l--;)r[c[l]]=r[o];return r},pie=function(e,t,i,a){var r=t.ease||a||"power1.inOut",o,l;if(ja(t))l=i[e]||(i[e]=[]),t.forEach(function(c,f){return l.push({t:f/(t.length-1)*100,v:c,e:r})});else for(o in t)l=i[o]||(i[o]=[]),o==="ease"||l.push({t:parseFloat(e),v:t[o],e:r})},Wb=function(e,t,i,a,r){return mi(e)?e.call(t,i,a,r):Ki(e)&&~e.indexOf("random(")?Km(e):e},HM=wP+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,easeReverse,autoRevert",rV={};ur(HM+",id,stagger,delay,duration,paused,scrollTrigger",function(n){return rV[n]=1});HM=HM.split(",");var wi=(function(n){D6(e,n);function e(i,a,r,o){var l;typeof a=="number"&&(r.duration=a,a=r,r=null),l=n.call(this,o?a:Vb(a))||this;var c=l.vars,f=c.duration,h=c.delay,p=c.immediateRender,m=c.stagger,g=c.overwrite,b=c.keyframes,x=c.defaults,_=c.scrollTrigger,v=a.parent||ai,S=(ja(i)||O6(i)?yu(i[0]):"length"in a)?[i]:qo(i),M,T,E,L,P,I,R,A;if(l._targets=S.length?MP(S):Xb("GSAP target "+i+" not found. https://gsap.com",!Dr.nullTargetWarn)||[],l._ptLookup=[],l._overwrite=g,b||m||PM(f)||PM(h)){a=l.vars;var D=a.easeReverse||a.yoyoEase;if(M=l.timeline=new Ya({data:"nested",defaults:x||{},targets:v&&v.data==="nested"?v.vars.targets:S}),M.kill(),M.parent=M._dp=gu(l),M._start=0,m||PM(f)||PM(h)){if(L=S.length,R=m&&Z6(m),dl(m))for(P in m)~HM.indexOf(P)&&(A||(A={}),A[P]=m[P]);for(T=0;T<L;T++)E=UM(a,rV),E.stagger=0,D&&(E.easeReverse=D),A&&Xm(E,A),I=S[T],E.duration=+Wb(f,gu(l),T,I,S),E.delay=(+Wb(h,gu(l),T,I,S)||0)-l._delay,!m&&L===1&&E.delay&&(l._delay=h=E.delay,l._start+=h,E.delay=0),M.to(I,E,R?R(T,I,S):0),M._ease=Kt.none;M.duration()?f=h=0:l.timeline=0}else if(b){Vb(go(M.vars.defaults,{ease:"none"})),M._ease=Ld(b.ease||a.ease||"none");var N=0,H,X,W;if(ja(b))b.forEach(function(Y){return M.to(S,Y,">")}),M.duration();else{E={};for(P in b)P==="ease"||P==="easeEach"||pie(P,b[P],E,b.easeEach);for(P in E)for(H=E[P].sort(function(Y,V){return Y.t-V.t}),N=0,T=0;T<H.length;T++)X=H[T],W={ease:X.e,duration:(X.t-(T?H[T-1].t:0))/100*f},W[P]=X.v,M.to(S,W,N),N+=W.duration;M.duration()<f&&M.to({},{duration:f-M.duration()})}}f||l.duration(f=M.duration())}else l.timeline=0;return g===!0&&!vP&&(Hc=gu(l),ai.killTweensOf(S),Hc=0),fl(v,gu(l),r),a.reversed&&l.reverse(),a.paused&&l.paused(!0),(p||!f&&!b&&l._start===ii(v._time)&&Pr(p)&&Wne(gu(l))&&v.data!=="nested")&&(l._tTime=-Mn,l.render(Math.max(0,-h)||0)),_&&q6(gu(l),_),l}var t=e.prototype;return t.render=function(a,r,o){var l=this._time,c=this._tDur,f=this._dur,h=a<0,p=a>c-Mn&&!h?c:a<Mn?0:a,m,g,b,x,_,v,S,M;if(!f)Xne(this,a,r,o);else if(p!==this._tTime||!a||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==h||this._lazy){if(m=p,M=this.timeline,this._repeat){if(x=f+this._rDelay,this._repeat<-1&&h)return this.totalTime(x*100+a,r,o);if(m=ii(p%x),p===c?(b=this._repeat,m=f):(_=ii(p/x),b=~~_,b&&b===_?(m=f,b--):m>f&&(m=f)),v=this._yoyo&&b&1,v&&(m=f-m),_=Ym(this._tTime,x),m===l&&!o&&this._initted&&b===_)return this._tTime=p,this;b!==_&&this.vars.repeatRefresh&&!v&&!this._lock&&m!==x&&this._initted&&(this._lock=o=1,this.render(ii(x*b),!0).invalidate()._lock=0)}if(!this._initted){if(X6(this,h?a:m,o,r,p))return this._tTime=0,this;if(l!==this._time&&!(o&&this.vars.repeatRefresh&&b!==_))return this;if(f!==this._dur)return this.render(a,r,o)}if(this._rEase){var T=m<l;if(T!==this._inv){var E=T?l:f-l;this._inv=T,this._from&&(this.ratio=1-this.ratio),this._invRatio=this.ratio,this._invTime=l,this._invRecip=E?(T?-1:1)/E:0,this._invScale=T?-this.ratio:1-this.ratio,this._invEase=T?this._rEase:this._ease}this.ratio=S=this._invRatio+this._invScale*this._invEase((m-this._invTime)*this._invRecip)}else this.ratio=S=this._ease(m/f);if(this._from&&(this.ratio=S=1-S),this._tTime=p,this._time=m,!this._act&&this._ts&&(this._act=1,this._lazy=0),!l&&p&&!r&&!_&&(po(this,"onStart"),this._tTime!==p))return this;for(g=this._pt;g;)g.r(S,g.d),g=g._next;M&&M.render(a<0?a:M._dur*M._ease(m/this._dur),r,o)||this._startAt&&(this._zTime=a),this._onUpdate&&!r&&(h&&dP(this,a,r,o),po(this,"onUpdate")),this._repeat&&b!==_&&this.vars.onRepeat&&!r&&this.parent&&po(this,"onRepeat"),(p===this._tDur||!p)&&this._tTime===p&&(h&&!this._onUpdate&&dP(this,a,!0,!0),(a||!f)&&(p===this._tDur&&this._ts>0||!p&&this._ts<0)&&Wc(this,1),!r&&!(h&&!l)&&(p||l||v)&&(po(this,p===c?"onComplete":"onReverseComplete",!0),this._prom&&!(p<c&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(a){return(!a||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(a),n.prototype.invalidate.call(this,a)},t.resetTo=function(a,r,o,l,c){jb||Ir.wake(),this._ts||this.play();var f=Math.min(this._dur,(this._dp._time-this._start)*this._ts),h;return this._initted||IP(this,f),h=this._ease(f/this._dur),die(this,a,r,o,l,h,f,c)?this.resetTo(a,r,o,l,1):(YM(this,0),this.parent||G6(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(a,r){if(r===void 0&&(r="all"),!a&&(!r||r==="all"))return this._lazy=this._pt=0,this.parent?Fb(this):this.scrollTrigger&&this.scrollTrigger.kill(!!Aa),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(a,r,Hc&&Hc.vars.overwrite!==!0)._first||Fb(this),this.parent&&o!==this.timeline.totalDuration()&&jm(this,this._dur*this.timeline._tDur/o,0,1),this}var l=this._targets,c=a?qo(a):l,f=this._ptLookup,h=this._pt,p,m,g,b,x,_,v;if((!r||r==="all")&&Vne(l,c))return r==="all"&&(this._pt=0),Fb(this);for(p=this._op=this._op||[],r!=="all"&&(Ki(r)&&(x={},ur(r,function(S){return x[S]=1}),r=x),r=hie(l,r)),v=l.length;v--;)if(~c.indexOf(l[v])){m=f[v],r==="all"?(p[v]=r,b=m,g={}):(g=p[v]=p[v]||{},b=r);for(x in b)_=m&&m[x],_&&((!("kill"in _.d)||_.d.kill(x)===!0)&&qM(this,_,"_pt"),delete m[x]),g!=="all"&&(g[x]=1)}return this._initted&&!this._pt&&h&&Fb(this),this},e.to=function(a,r){return new e(a,r,arguments[2])},e.from=function(a,r){return Gb(1,arguments)},e.delayedCall=function(a,r,o,l){return new e(r,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:a,onComplete:r,onReverseComplete:r,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:l})},e.fromTo=function(a,r,o){return Gb(2,arguments)},e.set=function(a,r){return r.duration=0,r.repeatDelay||(r.repeat=0),new e(a,r)},e.killTweensOf=function(a,r,o){return ai.killTweensOf(a,r,o)},e})(Zb);go(wi.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});ur("staggerTo,staggerFrom,staggerFromTo",function(n){wi[n]=function(){var e=new Ya,t=hP.call(arguments,0);return t.splice(n==="staggerFromTo"?5:4,0,0),e[n].apply(e,t)}});var PP=function(e,t,i){return e[t]=i},oV=function(e,t,i){return e[t](i)},mie=function(e,t,i,a){return e[t](a.fp,i)},gie=function(e,t,i){return e.setAttribute(t,i)},jM=function(e,t){return mi(e[t])?oV:GM(e[t])&&e.setAttribute?gie:PP},sV=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},vie=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},DP=function(e,t){var i=t._pt,a="";if(!e&&t.b)a=t.b;else if(e===1&&t.e)a=t.e;else{for(;i;)a=i.p+(i.m?i.m(i.s+i.c*e):Math.round((i.s+i.c*e)*1e4)/1e4)+a,i=i._next;a+=t.c}t.set(t.t,t.p,a,t)},kP=function(e,t){for(var i=t._pt;i;)i.r(e,i.d),i=i._next},yie=function(e,t,i,a){for(var r=this._pt,o;r;)o=r._next,r.p===a&&r.modifier(e,t,i),r=o},bie=function(e){for(var t=this._pt,i,a;t;)a=t._next,t.p===e&&!t.op||t.op===e?qM(this,t,"_pt"):t.dep||(i=1),t=a;return!i},xie=function(e,t,i,a){a.mSet(e,t,a.m.call(a.tween,i,a.mt),a)},OP=function(e){for(var t=e._pt,i,a,r,o;t;){for(i=t._next,a=r;a&&a.pr>t.pr;)a=a._next;(t._prev=a?a._prev:o)?t._prev._next=t:r=t,(t._next=a)?a._prev=t:o=t,t=i}e._pt=r},cr=(function(){function n(t,i,a,r,o,l,c,f,h){this.t=i,this.s=r,this.c=o,this.p=a,this.r=l||sV,this.d=c||this,this.set=f||PP,this.pr=h||0,this._next=t,t&&(t._prev=this)}var e=n.prototype;return e.modifier=function(i,a,r){this.mSet=this.mSet||this.set,this.set=xie,this.m=i,this.mt=r,this.tween=a},n})();ur(wP+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger,easeReverse",function(n){return SP[n]=1});mo.TweenMax=mo.TweenLite=wi;mo.TimelineLite=mo.TimelineMax=Ya;ai=new Ya({sortChildren:!1,defaults:qb,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});Dr.stringFilter=EP;var Rd=[],OM={},_ie=[],P6=0,Sie=0,sP=function(e){return(OM[e]||_ie).map(function(t){return t()})},Kb=function(){var e=Date.now(),t=[];e-P6>2&&(sP("matchMediaInit"),Rd.forEach(function(i){var a=i.queries,r=i.conditions,o,l,c,f;for(l in a)o=cl.matchMedia(a[l]).matches,o&&(c=1),o!==r[l]&&(r[l]=o,f=1);f&&(i.revert(),c&&t.push(i))}),sP("matchMediaRevert"),t.forEach(function(i){return i.onMatch(i,function(a){return i.add(null,a)})}),P6=e,sP("matchMedia"))},lV=(function(){function n(t,i){this.selector=i&&pP(i),this.data=[],this._r=[],this.isReverted=!1,this.id=Sie++,t&&this.add(t)}var e=n.prototype;return e.add=function(i,a,r){mi(i)&&(r=a,a=i,i=mi);var o=this,l=function(){var f=jn,h=o.selector,p;return f&&f!==o&&f.data.push(o),r&&(o.selector=pP(r)),jn=o,p=a.apply(o,arguments),mi(p)&&o._r.push(p),jn=f,o.selector=h,o.isReverted=!1,p};return o.last=l,i===mi?l(o,function(c){return o.add(null,c)}):i?o[i]=l:l},e.ignore=function(i){var a=jn;jn=null,i(this),jn=a},e.getTweens=function(){var i=[];return this.data.forEach(function(a){return a instanceof n?i.push.apply(i,a.getTweens()):a instanceof wi&&!(a.parent&&a.parent.data==="nested")&&i.push(a)}),i},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(i,a){var r=this;if(i?(function(){for(var l=r.getTweens(),c=r.data.length,f;c--;)f=r.data[c],f.data==="isFlip"&&(f.revert(),f.getChildren(!0,!0,!1).forEach(function(h){return l.splice(l.indexOf(h),1)}));for(l.map(function(h){return{g:h._dur||h._delay||h._sat&&!h._sat.vars.immediateRender?h.globalTime(0):-1/0,t:h}}).sort(function(h,p){return p.g-h.g||-1/0}).forEach(function(h){return h.t.revert(i)}),c=r.data.length;c--;)f=r.data[c],f instanceof Ya?f.data!=="nested"&&(f.scrollTrigger&&f.scrollTrigger.revert(),f.kill()):!(f instanceof wi)&&f.revert&&f.revert(i);r._r.forEach(function(h){return h(i,r)}),r.isReverted=!0})():this.data.forEach(function(l){return l.kill&&l.kill()}),this.clear(),a){for(var o=Rd.length;o--;)Rd[o].id===this.id&&Rd.splice(o,1);this._mqs&&this._mqs.forEach(function(l){return l.removeListener?l.removeListener(Kb):l.removeEventListener("change",Kb)}),this._mqs=null}},e.revert=function(i){this.kill(i||{})},n})(),wie=(function(){function n(t){this.contexts=[],this.scope=t,jn&&jn.data.push(this)}var e=n.prototype;return e.add=function(i,a,r){dl(i)||(i={matches:i});var o=new lV(0,r||this.scope),l=o.conditions={},c,f,h;jn&&!o.selector&&(o.selector=jn.selector),this.contexts.push(o),a=o.add("onMatch",a),o.queries=i;for(f in i)f==="all"?h=1:(c=cl.matchMedia(i[f]),c&&(Rd.indexOf(o)<0&&Rd.push(o),(l[f]=c.matches)&&(h=1),c.addListener?c.addListener(Kb):c.addEventListener("change",Kb),(o._mqs||(o._mqs=[])).push(c)));return h&&a(o,function(p){return o.add(null,p)}),this},e.revert=function(i){this.kill(i||{})},e.kill=function(i){this.contexts.forEach(function(a){return a.kill(i,!0)})},n})(),VM={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];t.forEach(function(a){return tV(a)})},timeline:function(e){return new Ya(e)},getTweensOf:function(e,t){return ai.getTweensOf(e,t)},getProperty:function(e,t,i,a){Ki(e)&&(e=qo(e)[0]);var r=Gc(e||{}).get,o=i?V6:H6;return i==="native"&&(i=""),e&&(t?o((Rr[t]&&Rr[t].get||r)(e,t,i,a)):function(l,c,f){return o((Rr[l]&&Rr[l].get||r)(e,l,c,f))})},quickSetter:function(e,t,i){if(e=qo(e),e.length>1){var a=e.map(function(h){return Za.quickSetter(h,t,i)}),r=a.length;return function(h){for(var p=r;p--;)a[p](h)}}e=e[0]||{};var o=Rr[t],l=Gc(e),c=l.harness&&(l.harness.aliases||{})[t]||t,f=o?function(h){var p=new o;qm._pt=0,p.init(e,i?h+i:h,qm,0,[e]),p.render(1,p),qm._pt&&kP(1,qm)}:l.set(e,c);return o?f:function(h){return f(e,c,i?h+i:h,l,1)}},quickTo:function(e,t,i){var a,r=Za.to(e,go((a={},a[t]="+=0.1",a.paused=!0,a.stagger=0,a),i||{})),o=function(c,f,h){return r.resetTo(t,c,f,h)};return o.tween=r,o},isTweening:function(e){return ai.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Ld(e.ease,qb.ease)),E6(qb,e||{})},config:function(e){return E6(Dr,e||{})},registerEffect:function(e){var t=e.name,i=e.effect,a=e.plugins,r=e.defaults,o=e.extendTimeline;(a||"").split(",").forEach(function(l){return l&&!Rr[l]&&!mo[l]&&Xb(t+" effect requires "+l+" plugin.")}),iP[t]=function(l,c,f){return i(qo(l),go(c||{},r),f)},o&&(Ya.prototype[t]=function(l,c,f){return this.add(iP[t](l,dl(c)?c:(f=c)&&{},this),f)})},registerEase:function(e,t){Kt[e]=Ld(t)},parseEase:function(e,t){return arguments.length?Ld(e,t):Kt},getById:function(e){return ai.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var i=new Ya(e),a,r;for(i.smoothChildTiming=Pr(e.smoothChildTiming),ai.remove(i),i._dp=0,i._time=i._tTime=ai._time,a=ai._first;a;)r=a._next,(t||!(!a._dur&&a instanceof wi&&a.vars.onComplete===a._targets[0]))&&fl(i,a,a._start-a._delay),a=r;return fl(ai,i,0),i},context:function(e,t){return e?new lV(e,t):jn},matchMedia:function(e){return new wie(e)},matchMediaRefresh:function(){return Rd.forEach(function(e){var t=e.conditions,i,a;for(a in t)t[a]&&(t[a]=!1,i=1);i&&e.revert()})||Kb()},addEventListener:function(e,t){var i=OM[e]||(OM[e]=[]);~i.indexOf(t)||i.push(t)},removeEventListener:function(e,t){var i=OM[e],a=i&&i.indexOf(t);a>=0&&i.splice(a,1)},utils:{wrap:eie,wrapYoyo:tie,distribute:Z6,random:Q6,snap:K6,normalize:$ne,getUnit:La,clamp:Zne,splitColor:nV,toArray:qo,selector:pP,mapRange:$6,pipe:Qne,unitize:Jne,interpolate:nie,shuffle:j6},install:z6,effects:iP,ticker:Ir,updateRoot:Ya.updateRoot,plugins:Rr,globalTimeline:ai,core:{PropTween:cr,globals:U6,Tween:wi,Timeline:Ya,Animation:Zb,getCache:Gc,_removeLinkedListItem:qM,reverting:function(){return Aa},context:function(e){return e&&jn&&(jn.data.push(e),e._ctx=jn),jn},suppressOverwrites:function(e){return vP=e}}};ur("to,from,fromTo,delayedCall,set,killTweensOf",function(n){return VM[n]=wi[n]});Ir.add(Ya.updateRoot);qm=VM.to({},{duration:0});var Mie=function(e,t){for(var i=e._pt;i&&i.p!==t&&i.op!==t&&i.fp!==t;)i=i._next;return i},Tie=function(e,t){var i=e._targets,a,r,o;for(a in t)for(r=i.length;r--;)o=e._ptLookup[r][a],o&&(o=o.d)&&(o._pt&&(o=Mie(o,a)),o&&o.modifier&&o.modifier(t[a],e,i[r],a))},lP=function(e,t){return{name:e,headless:1,rawVars:1,init:function(a,r,o){o._onInit=function(l){var c,f;if(Ki(r)&&(c={},ur(r,function(h){return c[h]=1}),r=c),t){c={};for(f in r)c[f]=t(r[f]);r=c}Tie(l,r)}}}},Za=VM.registerPlugin({name:"attr",init:function(e,t,i,a,r){var o,l,c;this.tween=i;for(o in t)c=e.getAttribute(o)||"",l=this.add(e,"setAttribute",(c||0)+"",t[o],a,r,0,0,o),l.op=o,l.b=c,this._props.push(o)},render:function(e,t){for(var i=t._pt;i;)Aa?i.set(i.t,i.p,i.b,i):i.r(e,i.d),i=i._next}},{name:"endArray",headless:1,init:function(e,t){for(var i=t.length;i--;)this.add(e,i,e[i]||0,t[i],0,0,0,0,0,1)}},lP("roundProps",mP),lP("modifiers"),lP("snap",K6))||VM;wi.version=Ya.version=Za.version="3.15.1";N6=1;yP()&&Zm();var Cie=Kt.Power0,Eie=Kt.Power1,Aie=Kt.Power2,Lie=Kt.Power3,Rie=Kt.Power4,Iie=Kt.Linear,Pie=Kt.Quad,Die=Kt.Cubic,kie=Kt.Quart,Oie=Kt.Quint,Nie=Kt.Strong,zie=Kt.Elastic,Uie=Kt.Back,Bie=Kt.SteppedEase,Fie=Kt.Bounce,Hie=Kt.Sine,Vie=Kt.Expo,Gie=Kt.Circ;var uV,Xc,Jm,HP,zd,Wie,cV,VP,qie=function(){return typeof window<"u"},xu={},Nd=180/Math.PI,$m=Math.PI/180,Qm=Math.atan2,fV=1e8,GP=/([A-Z])/g,Xie=/(left|right|width|margin|padding|x)/i,Yie=/[\s,\(]\S/,hl={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},zP=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},jie=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},Zie=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Kie=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},Qie=function(e,t){var i=t.s+t.c*e;t.set(t.t,t.p,~~(i+(i<0?-.5:.5))+t.u,t)},bV=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},xV=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},Jie=function(e,t,i){return e.style[t]=i},$ie=function(e,t,i){return e.style.setProperty(t,i)},eae=function(e,t,i){return e._gsap[t]=i},tae=function(e,t,i){return e._gsap.scaleX=e._gsap.scaleY=i},nae=function(e,t,i,a,r){var o=e._gsap;o.scaleX=o.scaleY=i,o.renderTransform(r,o)},iae=function(e,t,i,a,r){var o=e._gsap;o[t]=i,o.renderTransform(r,o)},ri="transform",kr=ri+"Origin",aae=function n(e,t){var i=this,a=this.target,r=a.style,o=a._gsap;if(e in xu&&r){if(this.tfm=this.tfm||{},e!=="transform")e=hl[e]||e,~e.indexOf(",")?e.split(",").forEach(function(l){return i.tfm[l]=bu(a,l)}):this.tfm[e]=o.x?o[e]:bu(a,e),e===kr&&(this.tfm.zOrigin=o.zOrigin);else return hl.transform.split(",").forEach(function(l){return n.call(i,l,t)});if(this.props.indexOf(ri)>=0)return;o.svg&&(this.svgo=a.getAttribute("data-svg-origin"),this.props.push(kr,t,"")),e=ri}(r||t)&&this.props.push(e,t,r[e])},_V=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},rae=function(){var e=this.props,t=this.target,i=t.style,a=t._gsap,r,o;for(r=0;r<e.length;r+=3)e[r+1]?e[r+1]===2?t[e[r]](e[r+2]):t[e[r]]=e[r+2]:e[r+2]?i[e[r]]=e[r+2]:i.removeProperty(e[r].substr(0,2)==="--"?e[r]:e[r].replace(GP,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)a[o]=this.tfm[o];a.svg&&(a.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),r=VP(),(!r||!r.isStart)&&!i[ri]&&(_V(i),a.zOrigin&&i[kr]&&(i[kr]+=" "+a.zOrigin+"px",a.zOrigin=0,a.renderTransform()),a.uncache=1)}},SV=function(e,t){var i={target:e,props:[],revert:rae,save:aae};return e._gsap||Za.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(a){return i.save(a)}),i},wV,UP=function(e,t){var i=Xc.createElementNS?Xc.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):Xc.createElement(e);return i&&i.style?i:Xc.createElement(e)},vo=function n(e,t,i){var a=getComputedStyle(e);return a[t]||a.getPropertyValue(t.replace(GP,"-$1").toLowerCase())||a.getPropertyValue(t)||!i&&n(e,eg(t)||t,1)||""},dV="O,Moz,ms,Ms,Webkit".split(","),eg=function(e,t,i){var a=t||zd,r=a.style,o=5;if(e in r&&!i)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(dV[o]+e in r););return o<0?null:(o===3?"ms":o>=0?dV[o]:"")+e},BP=function(){qie()&&window.document&&(uV=window,Xc=uV.document,Jm=Xc.documentElement,zd=UP("div")||{style:{}},Wie=UP("div"),ri=eg(ri),kr=ri+"Origin",zd.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",wV=!!eg("perspective"),VP=Za.core.reverting,HP=1)},hV=function(e){var t=e.ownerSVGElement,i=UP("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),a=e.cloneNode(!0),r;a.style.display="block",i.appendChild(a),Jm.appendChild(i);try{r=a.getBBox()}catch{}return i.removeChild(a),Jm.removeChild(i),r},pV=function(e,t){for(var i=t.length;i--;)if(e.hasAttribute(t[i]))return e.getAttribute(t[i])},MV=function(e){var t,i;try{t=e.getBBox()}catch{t=hV(e),i=1}return t&&(t.width||t.height)||i||(t=hV(e)),t&&!t.width&&!t.x&&!t.y?{x:+pV(e,["x","cx","x1"])||0,y:+pV(e,["y","cy","y1"])||0,width:0,height:0}:t},TV=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&MV(e))},jc=function(e,t){if(t){var i=e.style,a;t in xu&&t!==kr&&(t=ri),i.removeProperty?(a=t.substr(0,2),(a==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),i.removeProperty(a==="--"?t:t.replace(GP,"-$1").toLowerCase())):i.removeAttribute(t)}},Yc=function(e,t,i,a,r,o){var l=new cr(e._pt,t,i,0,1,o?xV:bV);return e._pt=l,l.b=a,l.e=r,e._props.push(i),l},mV={deg:1,rad:1,turn:1},oae={grid:1,flex:1},Zc=function n(e,t,i,a){var r=parseFloat(i)||0,o=(i+"").trim().substr((r+"").length)||"px",l=zd.style,c=Xie.test(t),f=e.tagName.toLowerCase()==="svg",h=(f?"client":"offset")+(c?"Width":"Height"),p=100,m=a==="px",g=a==="%",b,x,_,v;if(a===o||!r||mV[a]||mV[o])return r;if(o!=="px"&&!m&&(r=n(e,t,i,"px")),v=e.getCTM&&TV(e),(g||o==="%")&&(xu[t]||~t.indexOf("adius")))return b=v?e.getBBox()[c?"width":"height"]:e[h],gi(g?r/b*p:r/100*b);if(l[c?"width":"height"]=p+(m?o:a),x=a!=="rem"&&~t.indexOf("adius")||a==="em"&&e.appendChild&&!f?e:e.parentNode,v&&(x=(e.ownerSVGElement||{}).parentNode),(!x||x===Xc||!x.appendChild)&&(x=Xc.body),_=x._gsap,_&&g&&_.width&&c&&_.time===Ir.time&&!_.uncache)return gi(r/_.width*p);if(g&&(t==="height"||t==="width")){var S=e.style[t];e.style[t]=p+a,b=e[h],S?e.style[t]=S:jc(e,t)}else(g||o==="%")&&!oae[vo(x,"display")]&&(l.position=vo(e,"position")),x===e&&(l.position="static"),x.appendChild(zd),b=zd[h],x.removeChild(zd),l.position="absolute";return c&&g&&(_=Gc(x),_.time=Ir.time,_.width=x[h]),gi(m?b*r/p:b&&r?p/b*r:0)},bu=function(e,t,i,a){var r;return HP||BP(),t in hl&&t!=="transform"&&(t=hl[t],~t.indexOf(",")&&(t=t.split(",")[0])),xu[t]&&t!=="transform"?(r=ex(e,a),r=t!=="transformOrigin"?r[t]:r.svg?r.origin:KM(vo(e,kr))+" "+r.zOrigin+"px"):(r=e.style[t],(!r||r==="auto"||a||~(r+"").indexOf("calc("))&&(r=ZM[t]&&ZM[t](e,t,i)||vo(e,t)||TP(e,t)||(t==="opacity"?1:0))),i&&!~(r+"").trim().indexOf(" ")?Zc(e,t,r,i)+i:r},sae=function(e,t,i,a){if(!i||i==="none"){var r=eg(t,e,1),o=r&&vo(e,r,1);o&&o!==i?(t=r,i=o):t==="borderColor"&&(i=vo(e,"borderTopColor"))}var l=new cr(this._pt,e.style,t,0,1,DP),c=0,f=0,h,p,m,g,b,x,_,v,S,M,T,E;if(l.b=i,l.e=a,i+="",a+="",a.substring(0,6)==="var(--"&&(a=vo(e,a.substring(4,a.indexOf(")")))),a==="auto"&&(x=e.style[t],e.style[t]=a,a=vo(e,t)||a,x?e.style[t]=x:jc(e,t)),h=[i,a],EP(h),i=h[0],a=h[1],m=i.match(Id)||[],E=a.match(Id)||[],E.length){for(;p=Id.exec(a);)_=p[0],S=a.substring(c,p.index),b?b=(b+1)%5:(S.substr(-5)==="rgba("||S.substr(-5)==="hsla(")&&(b=1),_!==(x=m[f++]||"")&&(g=parseFloat(x)||0,T=x.substr((g+"").length),_.charAt(1)==="="&&(_=Pd(g,_)+T),v=parseFloat(_),M=_.substr((v+"").length),c=Id.lastIndex-M.length,M||(M=M||Dr.units[t]||T,c===a.length&&(a+=M,l.e+=M)),T!==M&&(g=Zc(e,t,x,M)||0),l._pt={_next:l._pt,p:S||f===1?S:",",s:g,c:v-g,m:b&&b<4||t==="zIndex"?Math.round:0});l.c=c<a.length?a.substring(c,a.length):""}else l.r=t==="display"&&a==="none"?xV:bV;return xP.test(a)&&(l.e=0),this._pt=l,l},gV={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},lae=function(e){var t=e.split(" "),i=t[0],a=t[1]||"50%";return(i==="top"||i==="bottom"||a==="left"||a==="right")&&(e=i,i=a,a=e),t[0]=gV[i]||i,t[1]=gV[a]||a,t.join(" ")},uae=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var i=t.t,a=i.style,r=t.u,o=i._gsap,l,c,f;if(r==="all"||r===!0)a.cssText="",c=1;else for(r=r.split(","),f=r.length;--f>-1;)l=r[f],xu[l]&&(c=1,l=l==="transformOrigin"?kr:ri),jc(i,l);c&&(jc(i,ri),o&&(o.svg&&i.removeAttribute("transform"),a.scale=a.rotate=a.translate="none",ex(i,1),o.uncache=1,_V(a)))}},ZM={clearProps:function(e,t,i,a,r){if(r.data!=="isFromStart"){var o=e._pt=new cr(e._pt,t,i,0,0,uae);return o.u=a,o.pr=-10,o.tween=r,e._props.push(i),1}}},$b=[1,0,0,1,0,0],CV={},EV=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},vV=function(e){var t=vo(e,ri);return EV(t)?$b:t.substr(7).match(bP).map(gi)},WP=function(e,t){var i=e._gsap||Gc(e),a=e.style,r=vV(e),o,l,c,f;return i.svg&&e.getAttribute("transform")?(c=e.transform.baseVal.consolidate().matrix,r=[c.a,c.b,c.c,c.d,c.e,c.f],r.join(",")==="1,0,0,1,0,0"?$b:r):(r===$b&&!e.offsetParent&&e!==Jm&&!i.svg&&(c=a.display,a.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(f=1,l=e.nextElementSibling,Jm.appendChild(e)),r=vV(e),c?a.display=c:jc(e,"display"),f&&(l?o.insertBefore(e,l):o?o.appendChild(e):Jm.removeChild(e))),t&&r.length>6?[r[0],r[1],r[4],r[5],r[12],r[13]]:r)},FP=function(e,t,i,a,r,o){var l=e._gsap,c=r||WP(e,!0),f=l.xOrigin||0,h=l.yOrigin||0,p=l.xOffset||0,m=l.yOffset||0,g=c[0],b=c[1],x=c[2],_=c[3],v=c[4],S=c[5],M=t.split(" "),T=parseFloat(M[0])||0,E=parseFloat(M[1])||0,L,P,I,R;i?c!==$b&&(P=g*_-b*x)&&(I=T*(_/P)+E*(-x/P)+(x*S-_*v)/P,R=T*(-b/P)+E*(g/P)-(g*S-b*v)/P,T=I,E=R):(L=MV(e),T=L.x+(~M[0].indexOf("%")?T/100*L.width:T),E=L.y+(~(M[1]||M[0]).indexOf("%")?E/100*L.height:E)),a||a!==!1&&l.smooth?(v=T-f,S=E-h,l.xOffset=p+(v*g+S*x)-v,l.yOffset=m+(v*b+S*_)-S):l.xOffset=l.yOffset=0,l.xOrigin=T,l.yOrigin=E,l.smooth=!!a,l.origin=t,l.originIsAbsolute=!!i,e.style[kr]="0px 0px",o&&(Yc(o,l,"xOrigin",f,T),Yc(o,l,"yOrigin",h,E),Yc(o,l,"xOffset",p,l.xOffset),Yc(o,l,"yOffset",m,l.yOffset)),e.setAttribute("data-svg-origin",T+" "+E)},ex=function(e,t){var i=e._gsap||new AP(e);if("x"in i&&!t&&!i.uncache)return i;var a=e.style,r=i.scaleX<0,o="px",l="deg",c=getComputedStyle(e),f=vo(e,kr)||"0",h,p,m,g,b,x,_,v,S,M,T,E,L,P,I,R,A,D,N,H,X,W,Y,V,G,$,te,ge,Le,je,Oe,ze;return h=p=m=x=_=v=S=M=T=0,g=b=1,i.svg=!!(e.getCTM&&TV(e)),c.translate&&((c.translate!=="none"||c.scale!=="none"||c.rotate!=="none")&&(a[ri]=(c.translate!=="none"?"translate3d("+(c.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(c.rotate!=="none"?"rotate("+c.rotate+") ":"")+(c.scale!=="none"?"scale("+c.scale.split(" ").join(",")+") ":"")+(c[ri]!=="none"?c[ri]:"")),a.scale=a.rotate=a.translate="none"),P=WP(e,i.svg),i.svg&&(i.uncache?(G=e.getBBox(),f=i.xOrigin-G.x+"px "+(i.yOrigin-G.y)+"px",V=""):V=!t&&e.getAttribute("data-svg-origin"),FP(e,V||f,!!V||i.originIsAbsolute,i.smooth!==!1,P)),E=i.xOrigin||0,L=i.yOrigin||0,P!==$b&&(D=P[0],N=P[1],H=P[2],X=P[3],h=W=P[4],p=Y=P[5],P.length===6?(g=Math.sqrt(D*D+N*N),b=Math.sqrt(X*X+H*H),x=D||N?Qm(N,D)*Nd:0,S=H||X?Qm(H,X)*Nd+x:0,S&&(b*=Math.abs(Math.cos(S*$m))),i.svg&&(h-=E-(E*D+L*H),p-=L-(E*N+L*X))):(ze=P[6],je=P[7],te=P[8],ge=P[9],Le=P[10],Oe=P[11],h=P[12],p=P[13],m=P[14],I=Qm(ze,Le),_=I*Nd,I&&(R=Math.cos(-I),A=Math.sin(-I),V=W*R+te*A,G=Y*R+ge*A,$=ze*R+Le*A,te=W*-A+te*R,ge=Y*-A+ge*R,Le=ze*-A+Le*R,Oe=je*-A+Oe*R,W=V,Y=G,ze=$),I=Qm(-H,Le),v=I*Nd,I&&(R=Math.cos(-I),A=Math.sin(-I),V=D*R-te*A,G=N*R-ge*A,$=H*R-Le*A,Oe=X*A+Oe*R,D=V,N=G,H=$),I=Qm(N,D),x=I*Nd,I&&(R=Math.cos(I),A=Math.sin(I),V=D*R+N*A,G=W*R+Y*A,N=N*R-D*A,Y=Y*R-W*A,D=V,W=G),_&&Math.abs(_)+Math.abs(x)>359.9&&(_=x=0,v=180-v),g=gi(Math.sqrt(D*D+N*N+H*H)),b=gi(Math.sqrt(Y*Y+ze*ze)),I=Qm(W,Y),S=Math.abs(I)>2e-4?I*Nd:0,T=Oe?1/(Oe<0?-Oe:Oe):0),i.svg&&(V=e.getAttribute("transform"),i.forceCSS=e.setAttribute("transform","")||!EV(vo(e,ri)),V&&e.setAttribute("transform",V))),Math.abs(S)>90&&Math.abs(S)<270&&(r?(g*=-1,S+=x<=0?180:-180,x+=x<=0?180:-180):(b*=-1,S+=S<=0?180:-180)),t=t||i.uncache,i.x=h-((i.xPercent=h&&(!t&&i.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-h)?-50:0)))?e.offsetWidth*i.xPercent/100:0)+o,i.y=p-((i.yPercent=p&&(!t&&i.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-p)?-50:0)))?e.offsetHeight*i.yPercent/100:0)+o,i.z=m+o,i.scaleX=gi(g),i.scaleY=gi(b),i.rotation=gi(x)+l,i.rotationX=gi(_)+l,i.rotationY=gi(v)+l,i.skewX=S+l,i.skewY=M+l,i.transformPerspective=T+o,(i.zOrigin=parseFloat(f.split(" ")[2])||!t&&i.zOrigin||0)&&(a[kr]=KM(f)),i.xOffset=i.yOffset=0,i.force3D=Dr.force3D,i.renderTransform=i.svg?fae:wV?AV:cae,i.uncache=0,i},KM=function(e){return(e=e.split(" "))[0]+" "+e[1]},NP=function(e,t,i){var a=La(t);return gi(parseFloat(t)+parseFloat(Zc(e,"x",i+"px",a)))+a},cae=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,AV(e,t)},kd="0deg",Jb="0px",Od=") ",AV=function(e,t){var i=t||this,a=i.xPercent,r=i.yPercent,o=i.x,l=i.y,c=i.z,f=i.rotation,h=i.rotationY,p=i.rotationX,m=i.skewX,g=i.skewY,b=i.scaleX,x=i.scaleY,_=i.transformPerspective,v=i.force3D,S=i.target,M=i.zOrigin,T="",E=v==="auto"&&e&&e!==1||v===!0;if(M&&(p!==kd||h!==kd)){var L=parseFloat(h)*$m,P=Math.sin(L),I=Math.cos(L),R;L=parseFloat(p)*$m,R=Math.cos(L),o=NP(S,o,P*R*-M),l=NP(S,l,-Math.sin(L)*-M),c=NP(S,c,I*R*-M+M)}_!==Jb&&(T+="perspective("+_+Od),(a||r)&&(T+="translate("+a+"%, "+r+"%) "),(E||o!==Jb||l!==Jb||c!==Jb)&&(T+=c!==Jb||E?"translate3d("+o+", "+l+", "+c+") ":"translate("+o+", "+l+Od),f!==kd&&(T+="rotate("+f+Od),h!==kd&&(T+="rotateY("+h+Od),p!==kd&&(T+="rotateX("+p+Od),(m!==kd||g!==kd)&&(T+="skew("+m+", "+g+Od),(b!==1||x!==1)&&(T+="scale("+b+", "+x+Od),S.style[ri]=T||"translate(0, 0)"},fae=function(e,t){var i=t||this,a=i.xPercent,r=i.yPercent,o=i.x,l=i.y,c=i.rotation,f=i.skewX,h=i.skewY,p=i.scaleX,m=i.scaleY,g=i.target,b=i.xOrigin,x=i.yOrigin,_=i.xOffset,v=i.yOffset,S=i.forceCSS,M=parseFloat(o),T=parseFloat(l),E,L,P,I,R;c=parseFloat(c),f=parseFloat(f),h=parseFloat(h),h&&(h=parseFloat(h),f+=h,c+=h),c||f?(c*=$m,f*=$m,E=Math.cos(c)*p,L=Math.sin(c)*p,P=Math.sin(c-f)*-m,I=Math.cos(c-f)*m,f&&(h*=$m,R=Math.tan(f-h),R=Math.sqrt(1+R*R),P*=R,I*=R,h&&(R=Math.tan(h),R=Math.sqrt(1+R*R),E*=R,L*=R)),E=gi(E),L=gi(L),P=gi(P),I=gi(I)):(E=p,I=m,L=P=0),(M&&!~(o+"").indexOf("px")||T&&!~(l+"").indexOf("px"))&&(M=Zc(g,"x",o,"px"),T=Zc(g,"y",l,"px")),(b||x||_||v)&&(M=gi(M+b-(b*E+x*P)+_),T=gi(T+x-(b*L+x*I)+v)),(a||r)&&(R=g.getBBox(),M=gi(M+a/100*R.width),T=gi(T+r/100*R.height)),R="matrix("+E+","+L+","+P+","+I+","+M+","+T+")",g.setAttribute("transform",R),S&&(g.style[ri]=R)},dae=function(e,t,i,a,r){var o=360,l=Ki(r),c=parseFloat(r)*(l&&~r.indexOf("rad")?Nd:1),f=c-a,h=a+f+"deg",p,m;return l&&(p=r.split("_")[1],p==="short"&&(f%=o,f!==f%(o/2)&&(f+=f<0?o:-o)),p==="cw"&&f<0?f=(f+o*fV)%o-~~(f/o)*o:p==="ccw"&&f>0&&(f=(f-o*fV)%o-~~(f/o)*o)),e._pt=m=new cr(e._pt,t,i,a,f,jie),m.e=h,m.u="deg",e._props.push(i),m},yV=function(e,t){for(var i in t)e[i]=t[i];return e},hae=function(e,t,i){var a=yV({},i._gsap),r="perspective,force3D,transformOrigin,svgOrigin",o=i.style,l,c,f,h,p,m,g,b;a.svg?(f=i.getAttribute("transform"),i.setAttribute("transform",""),o[ri]=t,l=ex(i,1),jc(i,ri),i.setAttribute("transform",f)):(f=getComputedStyle(i)[ri],o[ri]=t,l=ex(i,1),o[ri]=f);for(c in xu)f=a[c],h=l[c],f!==h&&r.indexOf(c)<0&&(g=La(f),b=La(h),p=g!==b?Zc(i,c,f,b):parseFloat(f),m=parseFloat(h),e._pt=new cr(e._pt,l,c,p,m-p,zP),e._pt.u=b||0,e._props.push(c));yV(l,a)};ur("padding,margin,Width,Radius",function(n,e){var t="Top",i="Right",a="Bottom",r="Left",o=(e<3?[t,i,a,r]:[t+r,t+i,a+i,a+r]).map(function(l){return e<2?n+l:"border"+l+n});ZM[e>1?"border"+n:n]=function(l,c,f,h,p){var m,g;if(arguments.length<4)return m=o.map(function(b){return bu(l,b,f)}),g=m.join(" "),g.split(m[0]).length===5?m[0]:g;m=(h+"").split(" "),g={},o.forEach(function(b,x){return g[b]=m[x]=m[x]||m[(x-1)/2|0]}),l.init(c,g,p)}});var qP={name:"css",register:BP,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,i,a,r){var o=this._props,l=e.style,c=i.vars.startAt,f,h,p,m,g,b,x,_,v,S,M,T,E,L,P,I,R;HP||BP(),this.styles=this.styles||SV(e),I=this.styles.props,this.tween=i;for(x in t)if(x!=="autoRound"&&(h=t[x],!(Rr[x]&&RP(x,t,i,a,e,r)))){if(g=typeof h,b=ZM[x],g==="function"&&(h=h.call(i,a,e,r),g=typeof h),g==="string"&&~h.indexOf("random(")&&(h=Km(h)),b)b(this,e,x,h,i)&&(P=1);else if(x.substr(0,2)==="--")f=(getComputedStyle(e).getPropertyValue(x)+"").trim(),h+="",vu.lastIndex=0,vu.test(f)||(_=La(f),v=La(h),v?_!==v&&(f=Zc(e,x,f,v)+v):_&&(h+=_)),this.add(l,"setProperty",f,h,a,r,0,0,x),o.push(x),I.push(x,0,l[x]);else if(g!=="undefined"){if(c&&x in c?(f=typeof c[x]=="function"?c[x].call(i,a,e,r):c[x],Ki(f)&&~f.indexOf("random(")&&(f=Km(f)),La(f+"")||f==="auto"||(f+=Dr.units[x]||La(bu(e,x))||""),(f+"").charAt(1)==="="&&(f=bu(e,x))):f=bu(e,x),m=parseFloat(f),S=g==="string"&&h.charAt(1)==="="&&h.substr(0,2),S&&(h=h.substr(2)),p=parseFloat(h),x in hl&&(x==="autoAlpha"&&(m===1&&bu(e,"visibility")==="hidden"&&p&&(m=0),I.push("visibility",0,l.visibility),Yc(this,l,"visibility",m?"inherit":"hidden",p?"inherit":"hidden",!p)),x!=="scale"&&x!=="transform"&&(x=hl[x],~x.indexOf(",")&&(x=x.split(",")[0]))),M=x in xu,M){if(this.styles.save(x),R=h,g==="string"&&h.substring(0,6)==="var(--"){if(h=vo(e,h.substring(4,h.indexOf(")"))),h.substring(0,5)==="calc("){var A=e.style.perspective;e.style.perspective=h,h=vo(e,"perspective"),A?e.style.perspective=A:jc(e,"perspective")}p=parseFloat(h)}if(T||(E=e._gsap,E.renderTransform&&!t.parseTransform||ex(e,t.parseTransform),L=t.smoothOrigin!==!1&&E.smooth,T=this._pt=new cr(this._pt,l,ri,0,1,E.renderTransform,E,0,-1),T.dep=1),x==="scale")this._pt=new cr(this._pt,E,"scaleY",E.scaleY,(S?Pd(E.scaleY,S+p):p)-E.scaleY||0,zP),this._pt.u=0,o.push("scaleY",x),x+="X";else if(x==="transformOrigin"){I.push(kr,0,l[kr]),h=lae(h),E.svg?FP(e,h,0,L,0,this):(v=parseFloat(h.split(" ")[2])||0,v!==E.zOrigin&&Yc(this,E,"zOrigin",E.zOrigin,v),Yc(this,l,x,KM(f),KM(h)));continue}else if(x==="svgOrigin"){FP(e,h,1,L,0,this);continue}else if(x in CV){dae(this,E,x,m,S?Pd(m,S+h):h);continue}else if(x==="smoothOrigin"){Yc(this,E,"smooth",E.smooth,h);continue}else if(x==="force3D"){E[x]=h;continue}else if(x==="transform"){hae(this,h,e);continue}}else x in l||(x=eg(x)||x);if(M||(p||p===0)&&(m||m===0)&&!Yie.test(h)&&x in l)_=(f+"").substr((m+"").length),p||(p=0),v=La(h)||(x in Dr.units?Dr.units[x]:_),_!==v&&(m=Zc(e,x,f,v)),this._pt=new cr(this._pt,M?E:l,x,m,(S?Pd(m,S+p):p)-m,!M&&(v==="px"||x==="zIndex")&&t.autoRound!==!1?Qie:zP),this._pt.u=v||0,M&&R!==h?(this._pt.b=f,this._pt.e=R,this._pt.r=Kie):_!==v&&v!=="%"&&(this._pt.b=f,this._pt.r=Zie);else if(x in l)sae.call(this,e,x,f,S?S+h:h);else if(x in e)this.add(e,x,f||e[x],S?S+h:h,a,r);else if(x!=="parseTransform"){WM(x,h);continue}M||(x in l?I.push(x,0,l[x]):typeof e[x]=="function"?I.push(x,2,e[x]()):I.push(x,1,f||e[x])),o.push(x)}}P&&OP(this)},render:function(e,t){if(t.tween._time||!VP())for(var i=t._pt;i;)i.r(e,i.d),i=i._next;else t.styles.revert()},get:bu,aliases:hl,getSetter:function(e,t,i){var a=hl[t];return a&&a.indexOf(",")<0&&(t=a),t in xu&&t!==kr&&(e._gsap.x||bu(e,"x"))?i&&cV===i?t==="scale"?tae:eae:(cV=i||{})&&(t==="scale"?nae:iae):e.style&&!GM(e.style[t])?Jie:~t.indexOf("-")?$ie:jM(e,t)},core:{_removeProperty:jc,_getMatrix:WP}};Za.utils.checkPrefix=eg;Za.core.getStyleSaver=SV;(function(n,e,t,i){var a=ur(n+","+e+","+t,function(r){xu[r]=1});ur(e,function(r){Dr.units[r]="deg",CV[r]=1}),hl[a[13]]=n+","+e,ur(i,function(r){var o=r.split(":");hl[o[1]]=a[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");ur("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(n){Dr.units[n]="px"});Za.registerPlugin(qP);var QM=Za.registerPlugin(qP)||Za,Ale=QM.core.Tween;function XP(n){return n.run?.coordinatorId||n.roles.find(e=>/统领|协调者|分配者/.test(e.name||""))?.id||n.roles[0]?.id}function tg(n,e,t=!0){let i=n.roles[e],a=mu(n,i.id),r=Fc(e,n.roles.length),o=n.event,l={zone:"desk",point:[r[0],r[2]+.82],angle:Math.PI},c={zone:"meeting",point:[.1+e%5*1.05,1.05-Math.floor(e/5)*.85],angle:0};return n.run?.status==="paused"||["paused","error","cancelled"].includes(a.state)?{...l,pose:"waiting",label:a.state==="error"?"\u9700\u8981\u5E2E\u52A9":"\u6682\u505C\u5DE5\u4F5C"}:i.id===XP(n)?{zone:"sofa",point:[-4,4.45],angle:Math.PI,pose:"lead",label:a.working?"\u7EDF\u7B79\u4E0E\u5206\u914D\u4EFB\u52A1":"\u7EDF\u9886\u8005 \xB7 \u7B49\u5F85\u6C47\u62A5"}:o?.kind==="mention"&&(o.roleId===i.id||o.to?.includes(i.id))&&t?{...c,pose:"talk",label:"@ \u4EA4\u6D41\u4E2D"}:a.working?["plan","coordinate"].includes(a.task?.phase)||/讨论|分析|规划|梳理需求|需求梳理|头脑风暴/.test(a.task?.title||"")?{...c,pose:"talk",label:a.task.phase==="plan"?"\u8BA8\u8BBA\u65B9\u6848":"\u534F\u8C03\u4EFB\u52A1"}:a.task?.phase==="deliver"?{zone:"reception",point:[-2.45+e%3*.65,2.3],angle:-Math.PI/2,pose:"present",label:"\u63D0\u4EA4\u4EA4\u4ED8\u5185\u5BB9"}:a.task?.phase==="review"?{zone:"board",point:[5.2+e%2*.75,2.9+e%3*.42],angle:-.2,pose:"present",label:a.task.phase==="review"?"\u590D\u6838\u7ED3\u679C":"\u4EA4\u4ED8\u6210\u679C"}:{...l,pose:"type",label:a.state==="thinking"?"\u601D\u8003\u4E2D":"\u6B63\u5728\u5DE5\u4F5C"}:a.state==="pending"||a.state==="waiting"?{...l,pose:"read",label:a.task?.dependsOn?.length?"\u7B49\u5F85\u524D\u7F6E\u4EFB\u52A1":"\u7B49\u5F85\u5206\u5DE5"}:a.state==="completed"||a.state==="complete"?{...l,pose:"rest",label:"\u5DE5\u4F5C\u5B8C\u6210 \xB7 \u4F11\u606F\u4E2D"}:{...l,pose:"rest",label:"\u4F11\u606F\u4E2D"}}function LV(n,e,t){if(Math.hypot(n[0]-e[0],n[1]-e[1])<.02)return[n,e];let i=[n],a=l=>{Math.hypot(l[0]-i.at(-1)[0],l[1]-i.at(-1)[1])>.01&&i.push(l)},r=l=>l[1]<-.6&&l[0]<6.3,o=l=>{let c=-.35,f=1/0;for(let h=0;h<t;h++){let p=Fc(h,t),m=p[2]+1.65,g=Math.abs(l[1]-m);g<f&&(c=m,f=g)}return c};if(n[1]>3.7&&n[0]<-3&&(a([-2.1,n[1]]),a([-2.1,.5])),r(n)){let l=n[0];for(let c=0;c<t;c++){let f=Fc(c,t);if(Math.abs(n[0]-f[0])<.6&&Math.abs(n[1]-f[2]-.82)<.2){l=f[0]+.7;break}}a([l,n[1]]),a([l,o(n)]),a([6.7,o(n)])}else a([n[0],.5]),a([6.7,.5]);return r(e)?(a([6.7,o(e)]),a([e[0]+.7,o(e)]),a([e[0]+.7,e[1]])):(a([6.7,.5]),a([e[0],.5])),e[1]>3.7&&e[0]<-3&&(a([-2.1,.5]),a([-2.1,e[1]])),a(e),i}function pae(n,e,t){let i=n.roles[e].id,a=XP(n);if(!t)return[];if(i===a){let l=n.roles.find(c=>c.id===t.roleId)?.name||"\u6210\u5458";return t.kind==="task"&&t.roleId!==a&&["running","completed"].includes(t.status)?[{...tg(n,e,!1),label:t.status==="running"?"\u5206\u914D\u4EFB\u52A1 \xB7 "+l:"\u63A5\u6536\u4EA4\u4ED8 \xB7 "+l,dwell:12},tg(n,e,!1)]:[]}let r=tg(n,e,!1),o={zone:"reception",point:[-2+Math.floor(e/4)*.85,2.4+e%4*.75],angle:Math.atan2(-2-Math.floor(e/4)*.85,2.05-e%4*.75),pose:"present"};return t.kind==="mention"&&(t.roleId===i||t.to?.includes(i))?t.roleId===a||t.to?.includes(a)?[{...o,label:t.roleId===i?"\u5411\u7EDF\u9886\u8005\u6C47\u62A5":"\u9886\u53D6\u534F\u4F5C\u6D88\u606F",dwell:3},r]:[{zone:"meeting",point:[.1+e%5*1.05,1.05-Math.floor(e/5)*.85],angle:.1,pose:"talk",label:"\u8BA8\u8BBA\u5206\u6790",dwell:4},r]:t.kind!=="task"||t.roleId!==i?[]:t.status==="running"?[{...o,label:"\u9886\u53D6\u4EFB\u52A1",dwell:2.5},r]:t.status==="completed"?[{...o,label:"\u63D0\u4EA4\u4EA4\u4ED8\u5185\u5BB9",dwell:3.5},r]:[]}var JM=class{constructor(e,t){this.index=t,this.count=e.roles.length,this.base=tg(e,t,!1),this.point=[...this.base.point],this.action=this.base,this.queue=[],this.active=null,this.seen=new Set(e.historical?[]:Wm(e).map(i=>i.id)),this.mode=e.historical,this.lastAt=e.event?.at??-1/0,this.lastEvent=e.event?.id,e.event&&this.seen.add(e.event.id),e.historical&&this.enqueue(e,e.event)}enqueue(e,t){this.queue.push(...pae(e,this.index,t))}observe(e){this.base=tg(e,this.index,!1);let t=e.event;(e.historical!==this.mode||e.historical&&t?.at<this.lastAt)&&(this.queue=[],this.active=null,this.seen=new Set(e.historical?[]:Wm(e).map(i=>i.id)),this.mode=e.historical,this.action=this.base,this.point=[...this.base.point]);for(let i of e.historical?t?[t]:[]:Wm(e))this.seen.has(i.id)||(this.seen.add(i.id),this.enqueue(e,i));this.lastAt=t?.at??this.lastAt,this.lastEvent=t?.id}begin(e,t){let i=LV(this.point,e.point,this.count);this.active={action:e,fromEvent:t,route:i,length:v6(i),distance:0,remaining:e.dwell||0},this.action=e}tick(e,{animate:t=!0,snap:i=!1}={}){if(i)return this.queue=[],this.active=null,this.action=this.base,this.point=[...this.base.point],this.state(!1);if(!t)return this.state(!!this.active&&this.active.distance<this.active.length-.001);this.active||(this.queue.length?this.begin(this.queue.shift(),!0):this.actionKey(this.action)!==this.actionKey(this.base)||Math.hypot(this.point[0]-this.base.point[0],this.point[1]-this.base.point[1])>.01?this.begin(this.base,!1):this.action=this.base);let a=this.active;if(!a)return this.state(!1);if(t){let l=Math.min(a.length-a.distance,e*3.1);a.distance+=l;let c=Math.max(0,e-l/3.1);a.distance>=a.length-.001&&(a.remaining=Math.max(0,a.remaining-c))}let r=g6(a.route,a.distance);this.point=[r.x,r.z],this.angle=a.distance<a.length-.001?r.angle:a.action.angle;let o=a.distance<a.length-.001;return!o&&a.remaining<=0&&(this.active=null),this.state(o)}actionKey(e){return e.zone+":"+e.point.join(",")+":"+e.pose+":"+e.label}state(e){return{action:this.action,point:this.point,angle:this.angle??this.action.angle,walking:e,busy:!!this.active||this.queue.length>0}}};var ct=ke(pn(),1),$M="#514b45";function mae(){return(0,ct.jsxs)("group",{position:[0,1.23,.36],children:[[-.17,.17].map(n=>(0,ct.jsxs)("mesh",{position:[n,0,0],children:[(0,ct.jsx)("torusGeometry",{args:[.12,.018,6,20]}),(0,ct.jsx)("meshStandardMaterial",{color:$M})]},n)),(0,ct.jsx)(qe,{size:[.1,.025,.02],color:$M})]})}function RV({role:n,index:e,view:t,selected:i,onSelect:a,animate:r,snap:o,speed:l=1,onBusy:c,onActivity:f}){let h=mu(t,n.id),p=(0,oi.useMemo)(()=>m6(n.id,e),[n.id,e]),m=Fc(e,t.roles.length),g=lr[e%lr.length],b=(0,oi.useRef)(),x=(0,oi.useRef)(),_=(0,oi.useRef)(),v=(0,oi.useRef)(),S=(0,oi.useRef)(),M=(0,oi.useRef)(),T=(0,oi.useRef)(),E=(0,oi.useRef)(0),L=(0,oi.useRef)({wave:0}),P=(0,oi.useRef)(null),I=(0,oi.useRef)(!1),R=(0,oi.useRef)(r),A=(0,oi.useRef)(t.event?.id);P.current||(P.current=new JM(t,e));let[D,N]=(0,oi.useState)(()=>P.current.state(!1)),H=D.action,X=D.walking;(0,oi.useEffect)(()=>{P.current.observe(t),o&&A.current!==t.event?.id&&P.current.tick(0,{snap:!0}),A.current=t.event?.id,!R.current&&t.historical&&r&&!P.current.active&&!P.current.queue.length&&P.current.enqueue(t,t.event),R.current=r,r&&P.current.queue.length&&(I.current=!0,c(n.id,!0))},[t,r]),(0,oi.useEffect)(()=>()=>c(n.id,!1),[]),(0,oi.useEffect)(()=>f(n.id,{zone:D.action.zone,label:D.action.label,walking:D.walking}),[D.action,D.walking,f]),(0,oi.useEffect)(()=>{let V=QM.context(()=>{r&&(H.pose==="talk"||H.pose==="present"||H.pose==="lead"||i)&&QM.timeline({repeat:-1,repeatDelay:1.6}).to(L.current,{wave:1,duration:.4,ease:"sine.inOut"}).to(L.current,{wave:-.3,duration:.25,repeat:3,yoyo:!0}).to(L.current,{wave:0,duration:.4})});return()=>V.revert()},[r,H.pose,i]),Db((V,G)=>{if(!b.current)return;let $=Math.min(G,.15)*l;r&&(E.current+=$);let te=P.current.tick($,{animate:r}),ge=te.action,Le=te.walking;te.busy!==I.current&&(I.current=te.busy,c(n.id,te.busy)),(D.action!==ge||D.walking!==Le)&&N(te),b.current.position.set(te.point[0],0,te.point[1]);let je=te.angle;b.current.rotation.y+=Math.atan2(Math.sin(je-b.current.rotation.y),Math.cos(je-b.current.rotation.y))*(r?Math.min(1,G*9):1);let Oe=E.current,ze=r?Math.sin(Oe*11+e):0,ae=!Le&&ge.pose==="type",de=!Le&&["talk","present","lead"].includes(ge.pose),Ie=!Le&&(ge.zone==="desk"||ge.zone==="sofa");M.current.rotation.x=Le?ze*.65:Ie?-1.15:0,T.current.rotation.x=Le?-ze*.65:Ie?-1.15:0,v.current.rotation.x=Le?-ze*.5:ae?-1.3+ze*.08:ge.pose==="read"?-.7:0,S.current.rotation.x=Le?ze*.5:ae?-1.3-ze*.08:ge.pose==="read"?-.95:de?-.6:0,S.current.rotation.z=de?L.current.wave*.9:i?L.current.wave*.5:0,x.current.position.y=(Ie?ge.zone==="sofa"?.29:.13:0)+(r?Le?Math.abs(ze)*.065:Math.sin(Oe*2)*.018:0),_.current.rotation.y=r&&!Le?Math.sin(Oe*.9+e)*.14:0});let W=p.variant,Y=p.fur;return(0,ct.jsxs)("group",{ref:b,position:[P.current.point[0],0,P.current.point[1]],name:"employee-"+n.id,children:[(0,ct.jsxs)("group",{scale:p.height,onClick:V=>{V.delta>5||(V.stopPropagation(),a(n.id))},onPointerOver:V=>{V.stopPropagation(),document.body.style.cursor="pointer"},onPointerOut:()=>document.body.style.cursor="",children:[(0,ct.jsxs)("mesh",{"rotation-x":-Math.PI/2,position:[0,.055,0],children:[(0,ct.jsx)("ringGeometry",{args:[.39,i?.49:.42,40]}),(0,ct.jsx)("meshBasicMaterial",{color:i?"#b58750":g,transparent:!0,opacity:i?1:.55})]}),(0,ct.jsxs)("group",{ref:x,children:[[[-.17,M],[.17,T]].map(([V,G],$)=>(0,ct.jsxs)("group",{ref:G,position:[V,.38,0],children:[(0,ct.jsx)(qe,{position:[0,-.11,0],size:[.19,.28,.22],color:W===2?"#84938e":"#a48a70",radius:.07}),(0,ct.jsx)(Ln,{position:[0,-.28,.06],size:[.15,.1,.22],color:"#786c5e"})]},$)),(0,ct.jsx)(qe,{position:[0,.67,0],size:[W===4?.75:.65,.65,.44],color:g,radius:.21}),(0,ct.jsx)(qe,{position:[0,.7,.232],size:[.025,.44,.014],color:"#fff6df"}),(0,ct.jsx)(Ln,{size:[.025,.025,.015],position:[.08,.75,.24],color:"#fff6df"}),(0,ct.jsxs)("group",{ref:_,position:[0,0,0],children:[(0,ct.jsx)(Ln,{position:[0,1.24,0],size:[W===4?.5:.45,.4,.36],color:Y}),[-1,1].map(V=>W===1||W===5?(0,ct.jsxs)("group",{children:[(0,ct.jsx)(Ln,{position:[V*.28,1.64,-.03],size:[.105,W===1?.32:.23,.1],color:Y,"rotation-z":V*-.17}),(0,ct.jsx)(Ln,{position:[V*.28,1.66,.055],size:[.047,.17,.025],color:"#e6b9ac"})]},V):(0,ct.jsx)(Ln,{position:[V*.34,1.53,-.03],size:[W===3?.17:.14,.16,.13],color:Y},V)),(0,ct.jsx)(Ln,{position:[-.16,1.27,.332],size:[.034,.047,.024],color:$M}),(0,ct.jsx)(Ln,{position:[.16,1.27,.332],size:[.034,.047,.024],color:$M}),(0,ct.jsx)(Ln,{position:[0,1.15,.364],size:[.045,.03,.024],color:"#a77d67"}),[-.27,.27].map(V=>(0,ct.jsx)(Ln,{position:[V,1.16,.3],size:[.068,.035,.022],color:"#e7b6a2"},V)),(W===0||W===4)&&(0,ct.jsx)(mae,{}),W===1&&(0,ct.jsxs)("group",{children:[(0,ct.jsxs)("mesh",{position:[0,1.32,0],"rotation-z":Math.PI/2,children:[(0,ct.jsx)("torusGeometry",{args:[.43,.045,8,24,Math.PI]}),(0,ct.jsx)("meshStandardMaterial",{color:"#766d66"})]}),[-.44,.44].map(V=>(0,ct.jsx)(Ln,{position:[V,1.27,0],size:[.09,.15,.15],color:"#8d9c99"},V))]}),W===2&&(0,ct.jsxs)("group",{children:[(0,ct.jsx)(Ln,{position:[0,1.58,0],size:[.43,.14,.34],color:"#c1a0b8","rotation-z":-.16}),(0,ct.jsx)(Ln,{position:[.13,1.72,0],size:[.06,.06,.06],color:"#aa7e9f"})]}),W===3&&(0,ct.jsxs)("group",{children:[(0,ct.jsx)(qe,{position:[0,1.49,-.04],size:[.8,.21,.57],color:"#b0bf9f",radius:.1}),(0,ct.jsx)(qe,{position:[0,1.44,.34],size:[.63,.07,.35],color:"#b0bf9f"})]}),W===5&&(0,ct.jsx)(Ln,{position:[.25,1.48,.22],size:[.14,.09,.05],color:"#d39b84","rotation-z":-.3})]}),[[-.4,v],[.4,S]].map(([V,G],$)=>(0,ct.jsxs)("group",{ref:G,position:[V,.85,0],children:[(0,ct.jsx)(Ln,{position:[0,-.12,0],size:[.12,.2,.13],color:g}),(0,ct.jsx)(Ln,{position:[0,-.3,.01],size:[.11,.1,.11],color:Y})]},$)),W===0&&(0,ct.jsxs)("group",{position:[0,.9,.25],children:[(0,ct.jsx)(qe,{size:[.38,.07,.07],color:"#c18d76"}),(0,ct.jsx)(qe,{position:[.12,-.13,0],size:[.1,.3,.06],color:"#c18d76","rotation-z":-.15})]}),W===2&&(0,ct.jsx)(qe,{size:[.35,.36,.025],position:[0,.61,.25],color:"#f5e8d2",radius:.05}),W===3&&(0,ct.jsx)(qe,{size:[.18,.21,.025],position:[-.15,.65,.24],color:"#fff0d5",radius:.03}),W===4&&(0,ct.jsx)(qe,{size:[.41,.45,.15],position:[0,.73,-.27],color:"#c2956f",radius:.1}),H.pose==="read"&&(0,ct.jsxs)("group",{position:[0,.66,.48],"rotation-x":-.4,children:[(0,ct.jsx)(qe,{size:[.4,.3,.04],color:"#c69b79"}),(0,ct.jsx)(qe,{position:[0,.01,.03],size:[.35,.26,.025],color:"#fff3d8"})]}),H.pose==="present"&&(0,ct.jsx)(qe,{size:[.42,.32,.06],position:[.15,.8,.4],color:"#f6dfac"})]})]}),(0,ct.jsx)(zb,{text:n.name+" \xB7 "+(X?{desk:"\u8FD4\u56DE\u5DE5\u4F4D",meeting:"\u524D\u5F80\u4F1A\u8BAE\u533A",board:"\u524D\u5F80\u767D\u677F\u533A",lounge:"\u524D\u5F80\u4F11\u606F\u533A",coffee:"\u524D\u5F80\u8336\u6C34\u533A",sofa:"\u524D\u5F80\u7EDF\u7B79\u6C99\u53D1",reception:"\u524D\u5F80\u7EDF\u9886\u8005\u5904"}[H.zone]:H.label),small:!0,position:[0,2.15,0]}),!X&&H.pose==="present"&&(0,ct.jsx)(zb,{text:H.label,position:[0,2.65,0],bg:"#fff0cc"})]})}var Ra=ke(pn(),1);function gae({count:n,reset:e}){let{camera:t,gl:i,size:a,invalidate:r}=XI(),o=(0,Or.useRef)();return(0,Or.useEffect)(()=>{let l=new CM(t,i.domElement);return o.current=l,l.target.set(0,.3,0),l.enableDamping=!0,l.dampingFactor=.09,l.minPolarAngle=.28,l.maxPolarAngle=Math.PI/2.15,l.minZoom=12,l.maxZoom=130,l.screenSpacePanning=!0,l.addEventListener("change",r),()=>{l.removeEventListener("change",r),l.dispose()}},[t,i,r,e]),(0,Or.useEffect)(()=>{let{depth:l}=Ub(n),c=new U(-.1,.4,Math.min(0,3-l/3));t.position.set(c.x+8,20,c.z+12),t.zoom=1,t.lookAt(c),t.updateMatrixWorld();let f=[[-7,0,-l/2],[7,0,-l/2],[-7,0,5.6],[7,0,5.6],[-7,2.3,-l/2],[7,2.3,-l/2]].map(m=>new U(...m).applyMatrix4(t.matrixWorldInverse)),h=Math.max(...f.map(m=>m.x))-Math.min(...f.map(m=>m.x)),p=Math.max(...f.map(m=>m.y))-Math.min(...f.map(m=>m.y));t.zoom=Math.min(a.width/(h+.35),a.height/(p+.65)),t.updateProjectionMatrix(),o.current?.target.copy(c),o.current?.update(),r()},[n,a.width,a.height,e]),Db(()=>o.current?.update()),null}function IV({view:n,selected:e,onSelect:t,motion:i,visible:a,speed:r=1,snap:o=!1,onBusy:l=()=>{}}){let[c,f]=(0,Or.useState)(0),[h,p]=(0,Or.useState)(!1),m=i&&a,g=(0,Or.useRef)(new Set),[b,x]=(0,Or.useState)({}),_=(0,Or.useCallback)((S,M)=>x(T=>({...T,[S]:M})),[]),v=(0,Or.useCallback)((S,M)=>{M?g.current.add(S):g.current.delete(S),l(g.current.size>0)},[l]);return(0,Or.useEffect)(()=>()=>l(!1),[l]),(0,Ra.jsxs)("div",{className:"office-stage",children:[h?(0,Ra.jsxs)("div",{className:"empty",children:["\u7ACB\u4F53\u753B\u9762\u6682\u65F6\u4E0D\u53EF\u7528\uFF0C\u53EF\u901A\u8FC7\u6210\u5458\u5217\u8868\u67E5\u770B\u6267\u884C\u8BB0\u5F55\u3002",(0,Ra.jsx)(Oi,{onClick:()=>p(!1),children:"\u91CD\u65B0\u52A0\u8F7D\u7A7A\u95F4"})]}):(0,Ra.jsxs)(u6,{orthographic:!0,shadows:"percentage",dpr:[1,1.5],frameloop:m?"always":"demand",camera:{position:[12,16,18],near:.1,far:100},gl:{antialias:!0,alpha:!0,powerPreference:"low-power"},onCreated:({gl:S})=>S.domElement.addEventListener("webglcontextlost",()=>p(!0),{once:!0}),children:[(0,Ra.jsx)(gae,{count:n.roles.length,reset:c}),(0,Ra.jsx)("ambientLight",{intensity:.85}),(0,Ra.jsx)("hemisphereLight",{args:["#fff7e8","#d3c8b5",.8]}),(0,Ra.jsx)("directionalLight",{position:[-3,12,7],intensity:2.5,castShadow:!0,"shadow-mapSize":[1024,1024],"shadow-camera-left":-15,"shadow-camera-right":15,"shadow-camera-top":15,"shadow-camera-bottom":-15,"shadow-normalBias":.045}),(0,Ra.jsx)(M6,{view:n}),n.roles.map((S,M)=>(0,Ra.jsx)(RV,{role:S,index:M,view:n,selected:e===S.id,onSelect:t,animate:m,snap:o,speed:r,onBusy:v,onActivity:_},(n.session.id||"")+":"+(n.run?.id||"")+":"+S.id))]}),(0,Ra.jsx)("div",{className:"scene-accessibility","aria-label":"\u529E\u516C\u5BA4\u52A8\u6001",children:n.roles.map(S=>{let M=b[S.id];return M&&(0,Ra.jsxs)("span",{"data-employee":S.id,"data-zone":M.zone,"data-moving":String(M.walking),children:[S.name," \xB7 ",M.walking?"\u524D\u5F80":"",M.label]},S.id)})}),(0,Ra.jsxs)("div",{className:"camera-controls glass",children:[(0,Ra.jsx)("span",{children:"\u62D6\u52A8\u65CB\u8F6C \xB7 \u6EDA\u8F6E\u7F29\u653E \xB7 \u53F3\u952E\u5E73\u79FB"}),(0,Ra.jsx)(Oi,{"aria-label":"\u8FD8\u539F\u89C6\u89D2",onClick:()=>f(S=>S+1),children:"\u2302"})]})]})}var Xo=ke(dt(),1);var tT=ke(dt());var PV=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),eT=(...n)=>n.filter((e,t,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===t).join(" ").trim();var tx=ke(dt());var DV={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var kV=(0,tx.forwardRef)(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:i,className:a="",children:r,iconNode:o,...l},c)=>(0,tx.createElement)("svg",{ref:c,...DV,width:e,height:e,stroke:n,strokeWidth:i?Number(t)*24/Number(e):t,className:eT("lucide",a),...l},[...o.map(([f,h])=>(0,tx.createElement)(f,h)),...Array.isArray(r)?r:[r]]));var On=(n,e)=>{let t=(0,tT.forwardRef)(({className:i,...a},r)=>(0,tT.createElement)(kV,{ref:r,iconNode:e,className:eT(`lucide-${PV(n)}`,i),...a}));return t.displayName=`${n}`,t};var nx=On("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var Ud=On("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);var Bd=On("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);var ix=On("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var _u=On("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);var ax=On("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]);var rx=On("Clock3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16.5 12",key:"1aq6pp"}]]);var ox=On("Expand",[["path",{d:"m21 21-6-6m6 6v-4.8m0 4.8h-4.8",key:"1c15vz"}],["path",{d:"M3 16.2V21m0 0h4.8M3 21l6-6",key:"1fsnz2"}],["path",{d:"M21 7.8V3m0 0h-4.8M21 3l-6 6",key:"hawz9i"}],["path",{d:"M3 7.8V3m0 0h4.8M3 3l6 6",key:"u9ee12"}]]);var sx=On("GitBranch",[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]]);var Kc=On("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);var lx=On("LocateFixed",[["line",{x1:"2",x2:"5",y1:"12",y2:"12",key:"bvdh0s"}],["line",{x1:"19",x2:"22",y1:"12",y2:"12",key:"1tbv5k"}],["line",{x1:"12",x2:"12",y1:"2",y2:"5",key:"11lu5j"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}],["circle",{cx:"12",cy:"12",r:"7",key:"fim9np"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);var ux=On("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);var cx=On("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var OV=new Set(["completed","error","cancelled","superseded"]),YP=n=>Number.isFinite(n)?n:void 0;function jP(n){if(n===void 0)return"\u2014";let e=Math.max(0,Math.floor(n/1e3));return e<60?`${e}\u79D2`:e<3600?`${Math.floor(e/60)}\u5206${e%60}\u79D2`:`${Math.floor(e/3600)}\u5C0F\u65F6${Math.floor(e%3600/60)}\u5206`}function nT(n){return n===void 0?"\u2014":new Date(n).toLocaleTimeString("zh-CN",{hour12:!1})}function NV(n,e=Date.now()){let t=n.historical?n.asOf??0:e,i=n.frames??RM(n),a=new Map,r=new Map;for(let l of i){if(YP(l.at)===void 0||l.at>t)continue;let c=a.get(l.taskId)||[];c.push(l),a.set(l.taskId,c)}for(let l of n.messages||[]){if(!l.taskId||YP(l.time)===void 0||l.time>t)continue;let c=r.get(l.taskId)||[];c.push(l),r.set(l.taskId,c)}let o=new Map;for(let l of n.run?.tasks||[]){let c=(a.get(l.id)||[]).sort((b,x)=>b.at-x.at),f=[],h,p,m;for(let b of c)b.status==="running"?h===void 0&&(h=b.at,p??=b.at):h!==void 0&&(f.push([h,b.at]),h=void 0),OV.has(b.status)?m??=b.at:m=void 0;if(p===void 0)for(let b of r.get(l.id)||[]){p=p===void 0?b.time:Math.min(p,b.time);let x=YP(b.finishedAt);x!==void 0&&x<=t?(f.push([b.time,x]),m=Math.max(m??0,x)):l.status==="running"&&(h=b.time,m=void 0)}h!==void 0&&f.push([h,t]),OV.has(l.status)||(m=void 0);let g=c[0]?.at??p;o.set(l.id,{startedAt:p,endedAt:m,createdAt:g,elapsedMs:p===void 0?void 0:f.reduce((b,[x,_])=>b+Math.max(0,_-x),0),waitMs:g===void 0||p!==void 0?void 0:Math.max(0,t-g),attempts:f.length})}return o}function zV(n){let e=n.run?.tasks||[],t=new Map(e.map(N=>[N.id,N])),i=new Map,a=0,r=(N,H,X)=>{if(N===H)return;if(!t.has(N)){a++;return}let W=N+"\0"+H;(X==="dependency"||!i.has(W))&&i.set(W,{from:N,to:H,kind:X})};for(let N of e){for(let H of N.handoffFrom||[])r(H,N.id,"handoff");for(let H of N.dependsOn||[])r(H,N.id,"dependency");a+=Math.max(0,(N.dependencyCount||0)-(N.dependsOn?.length||0))+Math.max(0,(N.handoffCount||0)-(N.handoffFrom?.length||0))}let o=new Map(e.map(N=>[N.id,[]])),l=new Map(e.map(N=>[N.id,[]]));for(let N of i.values())o.get(N.from).push(N),l.get(N.to).push(N);let c=new Map(e.map(N=>[N.id,l.get(N.id).length])),f=new Map(e.map(N=>[N.id,0])),h=e.filter(N=>!c.get(N.id)).map(N=>N.id),p=[];for(let N=0;N<h.length;N++){let H=h[N];p.push(H);for(let X of o.get(H))f.set(X.to,Math.max(f.get(X.to),f.get(H)+1)),c.set(X.to,c.get(X.to)-1),c.get(X.to)||h.push(X.to)}let m=p.length!==e.length;if(m)for(let N of e)p.includes(N.id)||(f.set(N.id,0),p.push(N.id));let g=N=>{let H=o.get(N.from).filter(W=>W!==N).map(W=>W.to),X=new Set([N.from]);for(;H.length;){let W=H.pop();if(W===N.to)return!0;X.has(W)||(X.add(W),H.push(...o.get(W).map(Y=>Y.to)))}return!1},b=[...i.values()].filter(N=>!m&&(N.kind==="dependency"||!g(N))),x=[];for(let N of e){let H=f.get(N.id);(x[H]??=[]).push(N)}let _=b.filter(N=>f.get(N.to)-f.get(N.from)>1),v=240,S=76,M=184,T=28,E=24,L=E+Math.min(12,_.length)*12,P=Math.max(1,...x.map(N=>N?.length||0)),I=P*M+(P-1)*T,R=L+I+E,A=x.flatMap((N,H)=>{let X=N.length*M+(N.length-1)*T;return N.map((W,Y)=>({...W,x:E+H*(v+S),y:L+(I-X)/2+Y*(M+T),width:v,height:M,rank:H}))}),D=new Map(A.map(N=>[N.id,N]));return{nodes:A,cyclic:m,missing:a,width:Math.max(v+E*2,E*2+x.length*v+Math.max(0,x.length-1)*S),height:R,edges:b.map(N=>{let H=D.get(N.from),X=D.get(N.to),W=H.x+v,Y=H.y+M/2,V=X.x,G=X.y+M/2,$=W+(V-W)/2,te=_.indexOf(N),ge=te<0?`M ${W} ${Y} H ${$} V ${G} H ${V-8}`:`M ${W} ${Y} H ${W+20} V ${E+te%12*12} H ${V-20} V ${G} H ${V-8}`;return{...N,id:N.from+"\u2192"+N.to,path:ge,targetStatus:X.status}})}}function UV(n,e,t=Date.now()){let i=(n.run?.tasks||[]).filter(p=>p.status!=="superseded"),a=[...e.values()],r=a.map(p=>p.startedAt).filter(p=>p!==void 0),o=a.map(p=>p.endedAt).filter(p=>p!==void 0),l=r.length?Math.min(...r):void 0,c=i.length>0&&i.every(p=>e.get(p.id)?.endedAt!==void 0),f=n.run?.status==="complete"?c&&o.length?Math.max(...o):void 0:n.historical?n.asOf:t,h=i.filter(p=>p.phase==="work");return{workTotal:h.length,workCompleted:h.filter(p=>p.status==="completed").length,planningOnly:h.length===0,total:i.length,completed:i.filter(p=>p.status==="completed").length,running:i.filter(p=>p.status==="running").length,elapsedMs:l===void 0||f===void 0?void 0:Math.max(0,f-l)}}var Ye=ke(pn(),1);function BV({view:n,onSelect:e,network:t=!1,motion:i=!0,visible:a=!0}){let[r,o]=(0,Xo.useState)(Date.now),[l,c]=(0,Xo.useState)(1),f=(0,Xo.useRef)(null),h=(0,Xo.useId)().replace(/:/g,""),p=a&&!n.historical&&n.run?.status==="active";(0,Xo.useEffect)(()=>{if(!p)return;let I=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(I)},[p]);let m=(0,Xo.useMemo)(()=>zV(n),[n]),g=(0,Xo.useMemo)(()=>NV(n,r),[n,r]),b=UV(n,g,r),x=new Map(n.roles.map(I=>[I.id,I])),_=t?150:0,v=m.width+_,S=Math.max(m.height,t?n.roles.length*62+70:0),M=new Map;for(let I of n.messages||[])I.taskId&&M.set(I.taskId,I);let T=t?m.nodes.filter(I=>I.status==="running"&&n.run?.status==="active"&&M.get(I.id)?.health?.state!=="retrying"):[],E=t?m.nodes.map(I=>{let R=n.roles.findIndex(N=>N.id===I.roleId),A=64+R*62,D=I.y+I.height/2;return{task:I,path:`M 116 ${A} C 144 ${A}, 132 ${D}, ${I.x+_-8} ${D}`}}):[],L=()=>{let I=f.current?.querySelector('[data-status="running"]');I&&f.current.scrollTo({left:I.offsetLeft*l-24,top:I.offsetTop*l-24,behavior:"auto"})},P=()=>{f.current&&(c(Math.min(1,(f.current.clientWidth-2)/v)),f.current.scrollTo({left:0,top:0,behavior:"auto"}))};return(0,Ye.jsxs)("section",{className:"pipeline-view","aria-label":"\u534F\u4F5C\u5DE5\u4F5C\u6D41\u6C34\u7EBF",children:[(0,Ye.jsxs)("div",{className:"pipeline-toolbar",children:[(0,Ye.jsxs)("div",{className:"pipeline-metrics",children:[(0,Ye.jsxs)("span",{children:[(0,Ye.jsxs)("strong",{children:[b.workCompleted,"/",b.workTotal]})," \u6267\u884C\u4EFB\u52A1\u5B8C\u6210",b.planningOnly&&" \xB7 \u5C1A\u672A\u6D3E\u5DE5"]}),(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("strong",{children:b.running})," \u6B63\u5728\u6267\u884C"]}),(0,Ye.jsxs)("span",{children:["\u6D41\u7A0B\u5386\u65F6 ",(0,Ye.jsx)("strong",{children:jP(b.elapsedMs)})]})]}),(0,Ye.jsxs)("div",{className:"pipeline-controls",children:[(0,Ye.jsxs)(Oi,{onClick:P,children:[(0,Ye.jsx)(ox,{size:14}),"\u9002\u5E94\u5BBD\u5EA6"]}),l<1&&(0,Ye.jsx)(Oi,{onClick:()=>c(1),children:"100%"}),(0,Ye.jsxs)(Oi,{onClick:L,disabled:!b.running,children:[(0,Ye.jsx)(lx,{size:14}),"\u5B9A\u4F4D\u6267\u884C\u4E2D"]})]})]}),(0,Ye.jsxs)("div",{className:"pipeline-legend",children:[(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("i",{className:"edge-key"}),"\u4EFB\u52A1\u4F9D\u8D56"]}),(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("i",{className:"edge-key handoff"}),"\u6D3E\u5DE5 / \u7ED3\u679C\u4EA4\u63A5"]}),(0,Ye.jsxs)("span",{title:"\u5B9E\u9645\u5E76\u53D1\u53D7\u89D2\u8272\u3001\u6587\u4EF6\u8303\u56F4\u548C\u6267\u884C\u540D\u989D\u7EA6\u675F",children:[(0,Ye.jsx)(sx,{size:13}),"\u540C\u5217\u4E3A\u72EC\u7ACB\u5206\u652F"]}),n.historical&&(0,Ye.jsxs)("span",{children:["\u56DE\u653E\u81F3 ",nT(n.asOf)]})]}),m.cyclic&&(0,Ye.jsx)("p",{className:"pipeline-warning",children:"\u90E8\u5206\u65E7\u4EFB\u52A1\u5B58\u5728\u5FAA\u73AF\u5173\u7CFB\uFF0C\u5DF2\u4FDD\u7559\u4EFB\u52A1\u8BE6\u60C5\uFF1B\u8FDE\u7EBF\u6682\u4E0D\u53EF\u7528\u3002"}),m.missing>0&&(0,Ye.jsxs)("p",{className:"pipeline-warning",children:["\u5F53\u524D\u8BB0\u5F55\u7701\u7565\u4E86 ",m.missing," \u9879\u4F9D\u8D56\u6216\u4EA4\u63A5\u5173\u7CFB\uFF0C\u56FE\u4E2D\u4EC5\u8FDE\u63A5\u5DF2\u8BB0\u5F55\u7684\u4EFB\u52A1\u3002"]}),(0,Ye.jsx)("div",{className:"pipeline-scroll",ref:f,tabIndex:0,"aria-label":"\u4EFB\u52A1\u4F9D\u8D56\u56FE\uFF0C\u53EF\u6A2A\u5411\u4E0E\u7EB5\u5411\u6EDA\u52A8",children:(0,Ye.jsx)("div",{className:"pipeline-size",style:{width:v*l,height:S*l},children:(0,Ye.jsxs)("div",{className:"pipeline-canvas",style:{width:v,height:S,transform:`scale(${l})`,transformOrigin:"top left"},children:[(0,Ye.jsxs)("svg",{className:"pipeline-edges",width:v,height:S,"aria-label":"\u4EFB\u52A1\u4E4B\u95F4\u7684\u4F9D\u8D56\u548C\u4EA4\u63A5\u8FDE\u7EBF",role:"img",children:[(0,Ye.jsx)("defs",{children:["dependency","handoff"].map(I=>(0,Ye.jsx)("marker",{id:h+I,markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:(0,Ye.jsx)("path",{d:"M 0 0 L 8 4 L 0 8 z"})},I))}),E.map(I=>(0,Ye.jsxs)("g",{children:[(0,Ye.jsx)("path",{className:"assignment-beam "+I.task.status+" "+(M.get(I.task.id)?.health?.state||""),d:I.path}),i&&T.some(R=>R.id===I.task.id)&&(0,Ye.jsx)("circle",{r:"2.5",className:"dispatch-packet",children:(0,Ye.jsx)("animateMotion",{dur:"3.2s",repeatCount:"indefinite",path:I.path})})]},"assign"+I.task.id)),(0,Ye.jsx)("g",{transform:`translate(${_},0)`,children:m.edges.map(I=>(0,Ye.jsxs)("g",{children:[(0,Ye.jsx)("path",{"data-from":I.from,"data-to":I.to,className:"pipeline-edge "+I.kind+" "+I.targetStatus,d:I.path,markerEnd:`url(#${h+I.kind})`,children:(0,Ye.jsxs)("title",{children:[m.nodes.find(R=>R.id===I.from)?.title," \u2192 ",m.nodes.find(R=>R.id===I.to)?.title," \xB7 ",I.kind==="dependency"?"\u4EFB\u52A1\u4F9D\u8D56":"\u6D3E\u5DE5 / \u7ED3\u679C\u4EA4\u63A5"]})}),t&&i&&T.some(R=>R.id===I.to)&&(0,Ye.jsx)("circle",{r:"2.5",className:"dispatch-packet",children:(0,Ye.jsx)("animateMotion",{dur:"2.7s",repeatCount:"indefinite",path:I.path})})]},I.id))})]}),t&&(0,Ye.jsxs)("div",{className:"network-roster",children:[(0,Ye.jsx)("small",{children:"ACTUAL AGENTS"}),n.roles.map((I,R)=>(0,Ye.jsxs)(Oi,{"data-agent-source":I.id,style:{top:44+R*62},onClick:()=>e(I.id),children:[(0,Ye.jsx)("i",{children:I.name.slice(0,1)}),(0,Ye.jsxs)("span",{children:[I.name,(0,Ye.jsx)("small",{children:I.id===n.run?.coordinatorId?"ORCHESTRATOR":"SPECIALIST"})]}),(0,Ye.jsx)("b",{})]},I.id))]}),m.nodes.map((I,R)=>{let A=g.get(I.id),D=x.get(I.roleId),N=I.status==="running"&&M.get(I.id)?.health?.state==="retrying",H=N?_u:I.status==="completed"?Ud:I.status==="running"?Kc:I.status==="error"?_u:rx;return(0,Ye.jsxs)(Oi,{"data-task-node":I.id,"data-status":I.status,"data-health":I.status==="running"?M.get(I.id)?.health?.state:void 0,className:"pipeline-node "+I.status,style:{left:I.x+_,top:I.y,width:I.width,height:I.height,"--role-color":D?.color||"#8ba588"},onClick:()=>e(I.roleId),"aria-label":`${I.title}\uFF0C${D?.name||I.roleId}\uFF0C${ul[I.status]||I.status}`,children:[(0,Ye.jsxs)("span",{className:"node-top",children:[(0,Ye.jsxs)("span",{className:"node-phase",children:[String(R+1).padStart(2,"0")," \xB7 ",ul[I.phase]||"\u6267\u884C"]}),(0,Ye.jsxs)("span",{className:"node-status",children:[(0,Ye.jsx)(H,{size:12}),N?"\u8FDE\u63A5\u91CD\u8BD5":ul[I.status]||I.status]})]}),(0,Ye.jsx)("strong",{className:"node-title",children:I.title}),(0,Ye.jsxs)("span",{className:"node-role",children:[(0,Ye.jsx)("i",{}),D?.name||I.roleId,I.roleId===n.run?.coordinatorId?" \xB7 \u603B\u8C03\u5EA6":"",(0,Ye.jsx)(nx,{size:12})]}),(0,Ye.jsxs)("span",{className:"node-times",children:[(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("span",{children:"\u5F00\u59CB"}),(0,Ye.jsx)("time",{children:A.startedAt===void 0?I.status==="pending"?"\u5C1A\u672A\u5F00\u59CB":"\u672A\u8BB0\u5F55":nT(A.startedAt)})]}),(0,Ye.jsxs)("span",{children:[(0,Ye.jsx)("span",{children:"\u7ED3\u675F"}),(0,Ye.jsx)("time",{children:A.endedAt!==void 0?nT(A.endedAt):I.status==="running"?"\u6267\u884C\u4E2D":"\u2014"})]}),(0,Ye.jsxs)("span",{className:"node-duration",children:[(0,Ye.jsx)("span",{children:A.startedAt===void 0&&I.status==="pending"?"\u5DF2\u7B49\u5F85":"\u6267\u884C\u8017\u65F6"}),(0,Ye.jsx)("strong",{children:jP(A.startedAt===void 0&&I.status==="pending"?A.waitMs:A.elapsedMs)})]})]}),I.waitingReason&&(0,Ye.jsx)("span",{className:"node-wait",title:I.waitingReason,children:I.waitingReason})]},I.id)})]})})}),!m.nodes.length&&(0,Ye.jsx)("p",{className:"pipeline-empty",children:"\u4EFB\u52A1\u5F00\u59CB\u540E\uFF0C\u5B9E\u9645\u6D3E\u5DE5\u3001\u5E76\u884C\u5206\u652F\u3001\u4EA4\u63A5\u548C\u6267\u884C\u65F6\u95F4\u4F1A\u663E\u793A\u5728\u8FD9\u91CC\u3002"})]})}var Ge=ke(dt(),1),qD=ke(Ph(),1);var vae=Object.defineProperty,yae=(n,e)=>vae(n,"name",{value:e,configurable:!0});function iT(n,[e,t]){return Math.min(t,Math.max(e,n))}yae(iT,"clamp");var bae=Object.defineProperty,ng=(n,e)=>bae(n,"name",{value:e,configurable:!0}),FV=!!(typeof window<"u"&&window.document&&window.document.createElement);function Ni(n,e,{checkForDefaultPrevented:t=!0}={}){return ng(function(a){if(n?.(a),t===!1||!a||!a.defaultPrevented)return e?.(a)},"handleEvent")}ng(Ni,"composeEventHandlers");function xae(n){if(!FV)throw new Error("Cannot access window outside of the DOM");return n?.ownerDocument?.defaultView??window}ng(xae,"getOwnerWindow");function ZP(n){if(!FV)throw new Error("Cannot access document outside of the DOM");return n?.ownerDocument??document}ng(ZP,"getOwnerDocument");function HV(n,e=!1){let{activeElement:t}=ZP(n);if(!t?.nodeName)return null;if(VV(t)&&t.contentDocument)return HV(t.contentDocument.body,e);if(e){let i=t.getAttribute("aria-activedescendant");if(i){let a=ZP(t).getElementById(i);if(a)return a}}return t}ng(HV,"getActiveElement");function VV(n){return n.tagName==="IFRAME"}ng(VV,"isFrame");var xs=ke(dt(),1);var jo=ke(dt(),1),KP=ke(pn(),1),_ae=Object.defineProperty,Yo=(n,e)=>_ae(n,"name",{value:e,configurable:!0});function Sae(n,e){let t=jo.createContext(e);t.displayName=n+"Context";let i=Yo(r=>{let{children:o,...l}=r,c=jo.useMemo(()=>l,Object.values(l));return(0,KP.jsx)(t.Provider,{value:c,children:o})},"Provider");i.displayName=n+"Provider";function a(r,o={}){let{optional:l=!1}=o,c=jo.useContext(t);if(c)return c;if(e!==void 0)return e;if(!l)throw new Error(`\`${r}\` must be used within \`${n}\``)}return Yo(a,"useContext"),[i,a]}Yo(Sae,"createContext");function Su(n,e=[]){let t=[];function i(r,o){let l=jo.createContext(o);l.displayName=r+"Context";let c=t.length;t=[...t,o];let f=Yo(p=>{let{scope:m,children:g,...b}=p,x=m?.[n]?.[c]||l,_=jo.useMemo(()=>b,Object.values(b));return(0,KP.jsx)(x.Provider,{value:_,children:g})},"Provider");f.displayName=r+"Provider";function h(p,m,g={}){let{optional:b=!1}=g,x=m?.[n]?.[c]||l,_=jo.useContext(x);if(_)return _;if(o!==void 0)return o;if(!b)throw new Error(`\`${p}\` must be used within \`${r}\``)}return Yo(h,"useContext"),[f,h]}Yo(i,"createContext");let a=Yo(()=>{let r=t.map(o=>jo.createContext(o));return Yo(function(l){let c=l?.[n]||r;return jo.useMemo(()=>({[`__scope${n}`]:{...l,[n]:c}}),[l,c])},"useScope")},"createScope");return a.scopeName=n,[i,GV(a,...e)]}Yo(Su,"createContextScope");function GV(...n){let e=n[0];if(n.length===1)return e;let t=Yo(()=>{let i=n.map(a=>({useScope:a(),scopeName:a.scopeName}));return Yo(function(r){let o=i.reduce((l,{useScope:c,scopeName:f})=>{let p=c(r)[`__scope${f}`];return{...l,...p}},{});return jo.useMemo(()=>({[`__scope${e.scopeName}`]:o}),[o])},"useComposedScopes")},"createScope");return t.scopeName=e.scopeName,t}Yo(GV,"composeContextScopes");var WV=ke(dt(),1),wae=Object.defineProperty,JP=(n,e)=>wae(n,"name",{value:e,configurable:!0});function QP(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}JP(QP,"setRef");function qV(...n){return e=>{let t=!1,i=n.map(a=>{let r=QP(a,e);return!t&&typeof r=="function"&&(t=!0),r});if(t)return()=>{for(let a=0;a<i.length;a++){let r=i[a];typeof r=="function"?r():QP(n[a],null)}}}}JP(qV,"composeRefs");function Nn(...n){return WV.useCallback(qV(...n),n)}JP(Nn,"useComposedRefs");var Ia=ke(dt(),1);var Mae=Object.defineProperty,yo=(n,e)=>Mae(n,"name",{value:e,configurable:!0});function bs(n){let e=Ia.forwardRef((t,i)=>{let{children:a,...r}=t,o=null,l=!1,c=[];a=QV(a),Ia.Children.forEach(a,m=>{if(ZV(m)){l=!0;let g=m,b="child"in g.props?g.props.child:g.props.children;for(;$P(b)&&typeof aT=="function";)b=aT(b._payload);o=Cae(g,b),c.push(o?.props?.children)}else c.push(m)}),o?o=Ia.cloneElement(o,void 0,c):!l&&Ia.Children.count(a)===1&&Ia.isValidElement(a)&&(o=a);let f=o?jV(o):void 0,h=Nn(i,f);if(!o){if(a||a===0)throw new Error(l?Lae(n):Aae(n));return a}let p=YV(r,o.props??{});return o.type!==Ia.Fragment&&(p.ref=i?h:f),Ia.cloneElement(o,p)});return e.displayName=`${n}.Slot`,e}yo(bs,"createSlot");var XV=Symbol.for("radix.slottable");function Tae(n){let e=yo(t=>"child"in t?t.children(t.child):t.children,"Slottable");return e.displayName=`${n}.Slottable`,e.__radixId=XV,e}yo(Tae,"createSlottable");var Cae=yo((n,e)=>"child"in n.props?Ia.isValidElement(e)?Ia.cloneElement(e,void 0,n.props.children(e.props.children)):null:Ia.isValidElement(e)?e:null,"getSlottableElementFromSlottable");function YV(n,e){let t={...e};for(let i in e){let a=n[i],r=e[i];/^on[A-Z]/.test(i)?a&&r?t[i]=(...l)=>{let c=r(...l);return a(...l),c}:a&&(t[i]=a):i==="style"?t[i]={...a,...r}:i==="className"?t[i]=[a,r].filter(Boolean).join(" "):i==="aria-describedby"&&(t[i]=JV(r,a))}return{...n,...t}}yo(YV,"mergeProps");function jV(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}yo(jV,"getElementRef");function ZV(n){return Ia.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===XV}yo(ZV,"isSlottable");var Eae=Symbol.for("react.lazy");function $P(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===Eae&&"_payload"in n&&KV(n._payload)}yo($P,"isLazyComponent");function KV(n){return typeof n=="object"&&n!==null&&"then"in n}yo(KV,"isPromiseLike");function QV(n){let e=n;for(;$P(e)&&typeof aT=="function";)e=aT(e._payload);return e}yo(QV,"useUnwrappedLazy");function JV(...n){let e=new Set;for(let t of n)if(typeof t=="string")for(let i of String(t).trim().split(/\s+/))i&&e.add(i);return e.size>0?Array.from(e).join(" "):void 0}yo(JV,"concatAriaDescribedby");var Aae=yo(n=>`${n} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Lae=yo(n=>`${n} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),aT=Ia[" use ".trim().toString()];var oT=ke(pn(),1),Ji=ke(dt(),1);var $V=ke(dt(),1),In=globalThis?.document?$V.useLayoutEffect:()=>{};var Qc=ke(pn(),1);var Rae=Object.defineProperty,Qi=(n,e)=>Rae(n,"name",{value:e,configurable:!0});function eD(n){let e=n+"CollectionProvider",[t,i]=Su(e),[a,r]=t(e,{collectionRef:{current:null},itemMap:new Map}),o=Qi(x=>{let{scope:_,children:v}=x,S=xs.useRef(null),M=xs.useRef(new Map).current;return(0,oT.jsx)(a,{scope:_,itemMap:M,collectionRef:S,children:v})},"CollectionProvider");o.displayName=e;let l=n+"CollectionSlot",c=bs(l),f=xs.forwardRef((x,_)=>{let{scope:v,children:S}=x,M=r(l,v),T=Nn(_,M.collectionRef);return(0,oT.jsx)(c,{ref:T,children:S})});f.displayName=l;let h=n+"CollectionItemSlot",p="data-radix-collection-item",m=bs(h),g=xs.forwardRef((x,_)=>{let{scope:v,children:S,...M}=x,T=xs.useRef(null),E=Nn(_,T),L=r(h,v);return xs.useEffect(()=>(L.itemMap.set(T,{ref:T,...M}),()=>{L.itemMap.delete(T)})),(0,oT.jsx)(m,{[p]:"",ref:E,children:S})});g.displayName=h;function b(x){let _=r(n+"CollectionConsumer",x);return xs.useCallback(()=>{let S=_.collectionRef.current;if(!S)return[];let M=Array.from(S.querySelectorAll(`[${p}]`));return Array.from(_.itemMap.values()).sort((L,P)=>M.indexOf(L.ref.current)-M.indexOf(P.ref.current))},[_.collectionRef,_.itemMap])}return Qi(b,"useCollection"),[{Provider:o,Slot:f,ItemSlot:g},b,i]}Qi(eD,"createCollection");var e8=new WeakMap,Mi,bo,rT=(bo=class extends Map{constructor(t){super(t);zO(this,Mi);ME(this,Mi,[...super.keys()]),e8.set(this,!0)}set(t,i){return e8.get(this)&&!this.has(t)&&Sa(this,Mi).push(t),super.set(t,i),this}insert(t,i,a){let r=this.has(i),o=r?this.size:this.size+1,l=tD(t),c=l>=0?Math.min(l,o-1):Math.max(o+l,0);if(r?Sa(this,Mi).indexOf(i)===c:c===this.size)return this.set(i,a),this;let f=Sa(this,Mi).filter(p=>p!==i);f.splice(c,0,i);let h=f.map(p=>[p,p===i?a:this.get(p)]);this.clear();for(let[p,m]of h)this.set(p,m);return this}with(t,i,a){let r=new bo(this);return r.insert(t,i,a),r}before(t){let i=Sa(this,Mi).indexOf(t)-1;if(!(i<0))return this.entryAt(i)}setBefore(t,i,a){let r=Sa(this,Mi).indexOf(t);if(r===-1)return this;let o=Sa(this,Mi).indexOf(i),l=o!==-1&&o<r?r-1:r;return this.insert(l,i,a)}after(t){let i=Sa(this,Mi).indexOf(t);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(t,i,a){let r=Sa(this,Mi).indexOf(t);if(r===-1)return this;let o=Sa(this,Mi).indexOf(i),l=o!==-1&&o<=r?r:r+1;return this.insert(l,i,a)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return ME(this,Mi,[]),super.clear()}delete(t){let i=super.delete(t);return i&&Sa(this,Mi).splice(Sa(this,Mi).indexOf(t),1),i}deleteAt(t){let i=this.keyAt(t);return i!==void 0?this.delete(i):!1}at(t){let i=sT(Sa(this,Mi),t);if(i!==void 0)return this.get(i)}entryAt(t){let i=sT(Sa(this,Mi),t);if(i!==void 0)return[i,this.get(i)]}indexOf(t){return Sa(this,Mi).indexOf(t)}keyAt(t){return sT(Sa(this,Mi),t)}from(t,i){let a=this.indexOf(t);if(a===-1)return;let r=a+i;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(t,i){let a=this.indexOf(t);if(a===-1)return;let r=a+i;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(t,i){let a=0;for(let r of this){if(Reflect.apply(t,i,[r,a,this]))return r;a++}}findIndex(t,i){let a=0;for(let r of this){if(Reflect.apply(t,i,[r,a,this]))return a;a++}return-1}filter(t,i){let a=[],r=0;for(let o of this)Reflect.apply(t,i,[o,r,this])&&a.push(o),r++;return new bo(a)}map(t,i){let a=[],r=0;for(let o of this)a.push([o[0],Reflect.apply(t,i,[o,r,this])]),r++;return new bo(a)}reduce(...t){let[i,a]=t,r=t.length>1;if(!r&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let o=0,l=a;for(let c of this)o===0&&!r?l=c:l=Reflect.apply(i,this,[l,c,o,this]),o++;return l}reduceRight(...t){let[i,a]=t,r=t.length>1;if(!r&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let o=a;for(let l=this.size-1;l>=0;l--){let c=this.entryAt(l);l===this.size-1&&!r?o=c:o=Reflect.apply(i,this,[o,c,l,this])}return o}sort(t){if(typeof t!="function")throw new TypeError("OrderedDict.sort requires a compare function");let i=[...this.entries()].sort(t);this.clear();for(let[a,r]of i)this.set(a,r);return this}toSorted(t){if(typeof t!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");let i=[...this.entries()].sort(t);return new bo(i)}toReversed(){let t=new bo;for(let i=this.size-1;i>=0;i--){let a=this.keyAt(i),r=this.get(a);t.set(a,r)}return t}toSpliced(...t){let i=[...this.entries()];return i.splice(...t),new bo(i)}slice(t,i){let a=new bo;for(let r of Sa(this,Mi).slice(t,i))a.set(r,this.get(r));return a}every(t,i){let a=0;for(let r of this){if(!Reflect.apply(t,i,[r,a,this]))return!1;a++}return!0}some(t,i){let a=0;for(let r of this){if(Reflect.apply(t,i,[r,a,this]))return!0;a++}return!1}},Mi=new WeakMap,Qi(bo,"OrderedDict"),bo);function sT(n,e){if("at"in Array.prototype)return Array.prototype.at.call(n,e);let t=t8(n,e);return t===-1?void 0:n[t]}Qi(sT,"at");function t8(n,e){let t=n.length,i=tD(e),a=i>=0?i:t+i;return a<0||a>=t?-1:a}Qi(t8,"toSafeIndex");function tD(n){return n!==n||n===0?0:Math.trunc(n)}Qi(tD,"toSafeInteger");function Iae(n){let e=n+"CollectionProvider",[t,i]=Su(e),[a,r]=t(e);a.displayName=n+"CollectionStableContextProvider";let[o,l]=t(e);o.displayName=n+"CollectionStatefulContextProvider";let c=Qi(({state:L,...P})=>L?(0,Qc.jsx)(h,{...P,state:L}):(0,Qc.jsx)(f,{...P}),"CollectionProvider");c.displayName=e;let f=Qi(L=>{let P=S();return(0,Qc.jsx)(h,{...L,state:P})},"CollectionInit");f.displayName=n+"CollectionInit";let h=Qi(L=>{let{scope:P,children:I,state:R}=L,A=Ji.useRef(null),[D,N]=Ji.useState(null),H=Nn(A,N),[X,W]=R,Y=Ji.useRef(new rT),V=Ji.useCallback(()=>{let G=Y.current;return a8(G)||G.sort(lT),G},[]);return Ji.useEffect(()=>{if(!D)return;let G=r8(()=>{W($=>{let te=$.toSorted(lT);return te.some(([Le],je)=>$.keyAt(je)!==Le)?te:$})});return G.observe(D,{childList:!0,subtree:!0}),()=>{G.disconnect()}},[D,W]),(0,Qc.jsx)(a,{scope:P,collectionElementRef:H,collectionElementRefObject:A,getCollection:V,setCollection:W,registryRef:Y,children:(0,Qc.jsx)(o,{scope:P,collectionElement:D,collection:X,children:I})})},"CollectionProviderImpl");h.displayName=n+"CollectionProviderImpl";let p=n+"CollectionSlot",m=bs(p),g=Ji.forwardRef((L,P)=>{let{scope:I,children:R}=L,A=r(p,I),D=Nn(P,A.collectionElementRef);return(0,Qc.jsx)(m,{ref:D,children:R})});g.displayName=p;let b=n+"CollectionItemSlot",x="data-radix-collection-item",_=bs(b),v=Ji.forwardRef((L,P)=>{let{scope:I,children:R,...A}=L,D=Ji.useRef(null),N=r(b,I),{setCollection:H,registryRef:X}=N,W=Ji.useRef(A);n8(W.current,A)||(W.current=A);let Y=W.current,V=Ji.useCallback(te=>{let ge=X.current;te?ge.set(te,{...W.current,element:te}):D.current&&ge.delete(D.current)},[X]),G=Nn(P,V,D);In(()=>{let te=D.current,ge=X.current;te&&ge.has(te)&&ge.set(te,{...Y,element:te})},[Y,X]);let $=Ji.useRef(null);return Ji.useEffect(()=>{let te=D.current,ge=$.current;(ge?.element??null)===te&&(!te||ge?.itemData===Y)||($.current=te?{element:te,itemData:Y}:null,H(Le=>{let je=new rT(Le);return ge&&ge.element!==te&&je.delete(ge.element),te&&je.set(te,{...Y,element:te}),je.sort(lT)}))}),Ji.useEffect(()=>()=>{let te=$.current;$.current=null,te&&H(ge=>{if(!ge.has(te.element))return ge;let Le=new rT(ge);return Le.delete(te.element),Le})},[H]),(0,Qc.jsx)(_,{[x]:"",ref:G,children:R})});v.displayName=b;function S(){return Ji.useState(new rT)}Qi(S,"useInitCollection");function M(L){let{collection:P}=l(n+"CollectionConsumer",L);return P}Qi(M,"useCollection");function T(L){let{getCollection:P}=r(n+"CollectionConsumer",L);return P}return Qi(T,"useGetCollection"),[{Provider:c,Slot:g,ItemSlot:v},{createCollectionScope:i,useCollection:M,useGetCollection:T,useInitCollection:S}]}Qi(Iae,"createCollection");function n8(n,e){if(n===e)return!0;if(typeof n!="object"||typeof e!="object"||n==null||e==null)return!1;let t=Object.keys(n),i=Object.keys(e);if(t.length!==i.length)return!1;for(let a of t)if(!Object.prototype.hasOwnProperty.call(e,a)||n[a]!==e[a])return!1;return!0}Qi(n8,"shallowEqual");function i8(n,e){return!!(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_PRECEDING)}Qi(i8,"isElementPreceding");function a8(n){let e;for(let t of n.keys()){if(e){let i=e.compareDocumentPosition(t);if(!(i&Node.DOCUMENT_POSITION_DISCONNECTED)&&i&Node.DOCUMENT_POSITION_PRECEDING)return!1}e=t}return!0}Qi(a8,"isInDocumentOrder");function lT(n,e){return!n[1].element||!e[1].element?0:i8(n[1].element,e[1].element)?-1:1}Qi(lT,"sortByDocumentPosition");function r8(n){return new MutationObserver(t=>{for(let i of t)if(i.type==="childList"){n();return}})}Qi(r8,"getChildListObserver");var uT=ke(dt(),1),kae=ke(pn(),1),Pae=Object.defineProperty,Dae=(n,e)=>Pae(n,"name",{value:e,configurable:!0}),Oae={LTR:"ltr",RTL:"rtl"},Nae=uT.createContext(void 0);function nD(n){let e=uT.useContext(Nae);return n||e||Oae.LTR}Dae(nD,"useDirection");var Tn=ke(dt(),1);var o8=ke(dt(),1),s8=ke(Ph(),1);var l8=ke(pn(),1),zae=Object.defineProperty,Uae=(n,e)=>zae(n,"name",{value:e,configurable:!0}),Bae=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],$i=Bae.reduce((n,e)=>{let t=bs(`Primitive.${e}`),i=o8.forwardRef((a,r)=>{let{asChild:o,...l}=a,c=o?t:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,l8.jsx)(c,{...l,ref:r})});return i.displayName=`Primitive.${e}`,{...n,[e]:i}},{});function iD(n,e){n&&s8.flushSync(()=>n.dispatchEvent(e))}Uae(iD,"dispatchDiscreteCustomEvent");var fx=ke(dt(),1),Fae=Object.defineProperty,Hae=(n,e)=>Fae(n,"name",{value:e,configurable:!0}),u8=fx[" useInsertionEffect ".trim().toString()];function Nr(n){let e=fx.useRef(n);return typeof u8=="function"?u8(()=>{e.current=n}):In(()=>{e.current=n}),fx.useMemo(()=>((...t)=>e.current?.(...t)),[])}Hae(Nr,"useCallbackRef");var f8=ke(pn(),1),Vae=Object.defineProperty,pa=(n,e)=>Vae(n,"name",{value:e,configurable:!0}),aD="dismissableLayer.update",Gae="dismissableLayer.pointerDownOutside",Wae="dismissableLayer.focusOutside",c8,d8=Tn.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),h8=Tn.forwardRef(pa(function(e,t){let{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:a=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...h}=e,p=Tn.useContext(d8),[m,g]=Tn.useState(null),b=m?.ownerDocument??globalThis?.document,[,x]=Tn.useState({}),_=Nn(t,g),v=Array.from(p.layers),[S]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),M=S?v.indexOf(S):-1,T=m?v.indexOf(m):-1,E=p.layersWithOutsidePointerEventsDisabled.size>0,L=T>=M,P=Tn.useRef(!1),I=p8(N=>{o?.(N),c?.(N),N.defaultPrevented||f?.()},{ownerDocument:b,deferPointerDownOutside:a,isDeferredPointerDownOutsideRef:P,dismissableSurfaces:p.dismissableSurfaces,shouldHandlePointerDownOutside:Tn.useCallback(N=>{if(!(N instanceof Node))return!1;let H=[...p.branches].some(X=>X.contains(N));return L&&!H},[p.branches,L])}),R=m8(N=>{if(a&&P.current)return;let H=N.target;[...p.branches].some(W=>W.contains(H))||(l?.(N),c?.(N),N.defaultPrevented||f?.())},b),A=m?T===v.length-1:!1,D=Nr(N=>{N.key==="Escape"&&(r?.(N),!N.defaultPrevented&&f&&(N.preventDefault(),f()))});return Tn.useEffect(()=>{if(A)return b.addEventListener("keydown",D,{capture:!0}),()=>b.removeEventListener("keydown",D,{capture:!0})},[b,A,D]),Tn.useEffect(()=>{if(m)return i&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(c8=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),rD(),()=>{i&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(b.body.style.pointerEvents=c8))}},[m,b,i,p]),Tn.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),rD())},[m,p]),Tn.useEffect(()=>{let N=pa(()=>x({}),"handleUpdate");return document.addEventListener(aD,N),()=>document.removeEventListener(aD,N)},[]),(0,f8.jsx)($i.div,{...h,ref:_,style:{pointerEvents:E?L?"auto":"none":void 0,...e.style},onFocusCapture:Ni(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ni(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ni(e.onPointerDownCapture,I.onPointerDownCapture)})},"DismissableLayer"));function qae(){let n=Tn.useContext(d8),[e,t]=Tn.useState(null);return Tn.useEffect(()=>{if(e)return n.dismissableSurfaces.add(e),()=>{n.dismissableSurfaces.delete(e)}},[e,n.dismissableSurfaces]),t}pa(qae,"useDismissableLayerSurface");var Xae=pa(()=>!0,"IS_TRUE");function p8(n,e){let{ownerDocument:t=globalThis?.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:a,dismissableSurfaces:r,shouldHandlePointerDownOutside:o=Xae}=e,l=Nr(n),c=Tn.useRef(!1),f=Tn.useRef(!1),h=Tn.useRef(new Map),p=Tn.useRef(()=>{});return Tn.useEffect(()=>{function m(){f.current=!1,a.current=!1,h.current.clear()}pa(m,"resetOutsideInteraction");function g(){return Array.from(h.current.values()).some(Boolean)}pa(g,"isOutsideInteractionIntercepted");function b(M){if(!f.current)return;let T=M.target;T instanceof Node&&[...r].some(L=>L.contains(T))||h.current.set(M.type,!0),M.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}pa(b,"handleInteractionCapture");function x(M){f.current&&h.current.set(M.type,!1)}pa(x,"handleInteractionBubble");let _=pa(M=>{if(M.target&&!c.current){let E=function(){t.removeEventListener("click",p.current);let P=g();m(),P||oD(Gae,l,L,{discrete:!0})};var T=E;if(pa(E,"handleAndDispatchPointerDownOutsideEvent"),!o(M.target)){t.removeEventListener("click",p.current),m(),c.current=!1;return}let L={originalEvent:M};f.current=!0,a.current=i&&M.button===0,h.current.clear(),!i||M.button!==0?E():(t.removeEventListener("click",p.current),p.current=E,t.addEventListener("click",p.current,{once:!0}))}else t.removeEventListener("click",p.current),m();c.current=!1},"handlePointerDown"),v=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let M of v)t.addEventListener(M,b,!0),t.addEventListener(M,x);let S=window.setTimeout(()=>{t.addEventListener("pointerdown",_)},0);return()=>{window.clearTimeout(S),t.removeEventListener("pointerdown",_),t.removeEventListener("click",p.current);for(let M of v)t.removeEventListener(M,b,!0),t.removeEventListener(M,x)}},[t,l,i,a,r,o]),{onPointerDownCapture:pa(()=>c.current=!0,"onPointerDownCapture")}}pa(p8,"usePointerDownOutside");function m8(n,e=globalThis?.document){let t=Nr(n),i=Tn.useRef(!1);return Tn.useEffect(()=>{let a=pa(r=>{r.target&&!i.current&&oD(Wae,t,{originalEvent:r},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",a),()=>e.removeEventListener("focusin",a)},[e,t]),{onFocusCapture:pa(()=>i.current=!0,"onFocusCapture"),onBlurCapture:pa(()=>i.current=!1,"onBlurCapture")}}pa(m8,"useFocusOutside");function rD(){let n=new CustomEvent(aD);document.dispatchEvent(n)}pa(rD,"dispatchUpdate");function oD(n,e,t,{discrete:i}){let a=t.originalEvent.target,r=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:t});e&&a.addEventListener(n,e,{once:!0}),i?iD(a,r):a.dispatchEvent(r)}pa(oD,"handleAndDispatchCustomEvent");var g8=ke(dt(),1),Yae=Object.defineProperty,lD=(n,e)=>Yae(n,"name",{value:e,configurable:!0}),cT=0,ig=null;function jae(n){return fT(),n.children}lD(jae,"FocusGuards");function fT(){g8.useEffect(()=>{ig||(ig={start:sD(),end:sD()});let{start:n,end:e}=ig;return document.body.firstElementChild!==n&&document.body.insertAdjacentElement("afterbegin",n),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),cT++,()=>{cT===1&&(ig?.start.remove(),ig?.end.remove(),ig=null),cT=Math.max(0,cT-1)}},[])}lD(fT,"useFocusGuards");function sD(){let n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}lD(sD,"createFocusGuard");var si=ke(dt(),1);var hD=ke(pn(),1),Zae=Object.defineProperty,zi=(n,e)=>Zae(n,"name",{value:e,configurable:!0}),uD="focusScope.autoFocusOnMount",cD="focusScope.autoFocusOnUnmount",v8={bubbles:!1,cancelable:!0},b8=si.forwardRef(zi(function(e,t){let{loop:i=!1,trapped:a=!1,branches:r,onMountAutoFocus:o,onUnmountAutoFocus:l,...c}=e,[f,h]=si.useState(null),p=Nr(o),m=Nr(l),g=si.useRef(null),b=Nn(t,h),x=si.useRef(r);si.useEffect(()=>{x.current=r});let _=si.useCallback(M=>M?f?.contains(M)?!0:!!x.current?.some(T=>T.contains(M)):!1,[f]),v=si.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;si.useEffect(()=>{if(a){let L=function(A){if(v.paused||!f)return;let D=A.target;_(D)?g.current=D:wu(g.current,{select:!0})},P=function(A){if(v.paused||!f)return;let D=A.relatedTarget;D!==null&&(_(D)||wu(g.current,{select:!0}))},I=function(A){if(document.activeElement===document.body)for(let N of A)N.removedNodes.length>0&&wu(f)};var M=L,T=P,E=I;zi(L,"handleFocusIn"),zi(P,"handleFocusOut"),zi(I,"handleMutations"),document.addEventListener("focusin",L),document.addEventListener("focusout",P);let R=new MutationObserver(I);return f&&R.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",L),document.removeEventListener("focusout",P),R.disconnect()}}},[a,f,v.paused,_]),si.useEffect(()=>{if(f){y8.add(v);let M=document.activeElement;if(!f.contains(M)){let E=new CustomEvent(uD,v8);f.addEventListener(uD,p),f.dispatchEvent(E),E.defaultPrevented||(_8(C8(pD(f)),{select:!0}),document.activeElement===M&&wu(f))}return()=>{f.removeEventListener(uD,p);let E=f.ownerDocument,L=CustomEvent;setTimeout(()=>{let P=new L(cD,v8);f.addEventListener(cD,m),f.dispatchEvent(P),P.defaultPrevented||wu(M??E.body,{select:!0}),f.removeEventListener(cD,m),y8.remove(v)},0)}}},[f,p,m,v]);let S=si.useCallback(M=>{if(!i&&!a||v.paused)return;let T=M.key==="Tab"&&!M.altKey&&!M.ctrlKey&&!M.metaKey,E=document.activeElement;if(T&&E){let L=M.currentTarget,[P,I]=S8(L);P&&I?!M.shiftKey&&E===I?(M.preventDefault(),i&&wu(P,{select:!0})):M.shiftKey&&E===P&&(M.preventDefault(),i&&wu(I,{select:!0})):E===L&&M.preventDefault()}},[i,a,v.paused]);return(0,hD.jsx)($i.div,{tabIndex:-1,...c,ref:b,onKeyDown:S})},"FocusScope")),x8=si.createContext(null);function Kae({registry:n,children:e}){return n?(0,hD.jsx)(x8.Provider,{value:n,children:e}):e}zi(Kae,"FocusScopeBranchProvider");function Qae(){let[n,e]=si.useState([]),t=si.useMemo(()=>({add:zi(i=>e(a=>a.includes(i)?a:[...a,i]),"add"),remove:zi(i=>e(a=>a.filter(r=>r!==i)),"remove")}),[]);return{nodes:n,registry:t}}zi(Qae,"useFocusScopeBranchRegistry");function Jae(n){let e=si.useContext(x8);si.useEffect(()=>{if(!(!n||!e))return e.add(n),()=>e.remove(n)},[n,e])}zi(Jae,"useFocusScopeBranch");function _8(n,{select:e=!1}={}){let t=document.activeElement;for(let i of n)if(wu(i,{select:e}),document.activeElement!==t)return}zi(_8,"focusFirst");function S8(n){let e=pD(n),t=fD(e,n),i=fD(e.reverse(),n);return[t,i]}zi(S8,"getTabbableEdges");function pD(n){let e=[],i=n.ownerDocument.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:zi(a=>{let r=a.tagName==="INPUT"&&a.type==="hidden";return a.disabled||a.hidden||r?NodeFilter.FILTER_SKIP:a.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;i.nextNode();)e.push(i.currentNode);return e}zi(pD,"getTabbableCandidates");function fD(n,e){let t=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(let i of n)if(!(t?!i.checkVisibility({checkVisibilityCSS:!0}):w8(i,{upTo:e})))return i}zi(fD,"findVisible");function w8(n,{upTo:e}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(e!==void 0&&n===e)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}zi(w8,"isHidden");function M8(n){return n.tagName==="INPUT"&&typeof n.select=="function"}zi(M8,"isSelectableInput");function wu(n,{select:e=!1}={}){if(n&&n.focus){let i=(n.ownerDocument??document).activeElement;n.focus({preventScroll:!0}),n!==i&&M8(n)&&e&&n.select()}}zi(wu,"focus");var y8=T8();function T8(){let n=[];return{add(e){let t=n[0];e!==t&&t?.pause(),n=dD(n,e),n.unshift(e)},remove(e){n=dD(n,e),n[0]?.resume()}}}zi(T8,"createFocusScopesStack");function dD(n,e){let t=[...n],i=t.indexOf(e);return i!==-1&&t.splice(i,1),t}zi(dD,"arrayRemove");function C8(n){return n.filter(e=>e.tagName!=="A")}zi(C8,"removeLinks");var mD=ke(dt(),1);var $ae=Object.defineProperty,ere=(n,e)=>$ae(n,"name",{value:e,configurable:!0}),tre=mD[" useId ".trim().toString()]||(()=>{}),nre=0;function dT(n){let[e,t]=mD.useState(tre());return In(()=>{n||t(i=>i??String(nre++))},[n]),n||(e?`radix-${e}`:"")}ere(dT,"useId");var Ka=ke(dt(),1);var L8=["top","right","bottom","left"];var pl=Math.min,_s=Math.max,hx=Math.round,px=Math.floor,ml=n=>({x:n,y:n}),ire={left:"right",right:"left",bottom:"top",top:"bottom"};function gD(n,e,t){return _s(n,pl(e,t))}function gl(n,e){return typeof n=="function"?n(e):n}function Mu(n){return n.split("-")[0]}function Fd(n){return n.split("-")[1]}function pT(n){return n==="x"?"y":"x"}function mT(n){return n==="y"?"height":"width"}function Ss(n){let e=n[0];return e==="t"||e==="b"?"y":"x"}function gT(n){return pT(Ss(n))}function R8(n,e,t){t===void 0&&(t=!1);let i=Fd(n),a=gT(n),r=mT(a),o=a==="x"?i===(t?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=dx(o)),[o,dx(o)]}function I8(n){let e=dx(n);return[hT(n),e,hT(e)]}function hT(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}var E8=["left","right"],A8=["right","left"],are=["top","bottom"],rre=["bottom","top"];function ore(n,e,t){switch(n){case"top":case"bottom":return t?e?A8:E8:e?E8:A8;case"left":case"right":return e?are:rre;default:return[]}}function P8(n,e,t,i){let a=Fd(n),r=ore(Mu(n),t==="start",i);return a&&(r=r.map(o=>o+"-"+a),e&&(r=r.concat(r.map(hT)))),r}function dx(n){let e=Mu(n);return ire[e]+n.slice(e.length)}function sre(n){var e,t,i,a;return{top:(e=n.top)!=null?e:0,right:(t=n.right)!=null?t:0,bottom:(i=n.bottom)!=null?i:0,left:(a=n.left)!=null?a:0}}function vD(n){return typeof n!="number"?sre(n):{top:n,right:n,bottom:n,left:n}}function Hd(n){let{x:e,y:t,width:i,height:a}=n;return{width:i,height:a,top:t,left:e,right:e+i,bottom:t+a,x:e,y:t}}function D8(n,e,t){let{reference:i,floating:a}=n,r=Ss(e),o=gT(e),l=mT(o),c=Mu(e),f=r==="y",h=i.x+i.width/2-a.width/2,p=i.y+i.height/2-a.height/2,m=i[l]/2-a[l]/2,g;switch(c){case"top":g={x:h,y:i.y-a.height};break;case"bottom":g={x:h,y:i.y+i.height};break;case"right":g={x:i.x+i.width,y:p};break;case"left":g={x:i.x-a.width,y:p};break;default:g={x:i.x,y:i.y}}let b=Fd(e);return b&&(g[o]+=m*(b==="end"?1:-1)*(t&&f?-1:1)),g}async function N8(n,e){var t;e===void 0&&(e={});let{x:i,y:a,platform:r,rects:o,elements:l,strategy:c}=n,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=gl(e,n),b=vD(g),_=l[m?p==="floating"?"reference":"floating":p],v=Hd(await r.getClippingRect({element:(t=await(r.isElement==null?void 0:r.isElement(_)))==null||t?_:_.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(l.floating)),boundary:f,rootBoundary:h,strategy:c})),S=p==="floating"?{x:i,y:a,width:o.floating.width,height:o.floating.height}:o.reference,M=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l.floating)),T=await(r.isElement==null?void 0:r.isElement(M))&&await(r.getScale==null?void 0:r.getScale(M))||{x:1,y:1},E=Hd(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:S,offsetParent:M,strategy:c}):S);return{top:(v.top-E.top+b.top)/T.y,bottom:(E.bottom-v.bottom+b.bottom)/T.y,left:(v.left-E.left+b.left)/T.x,right:(E.right-v.right+b.right)/T.x}}var lre=50,z8=async(n,e,t)=>{let{placement:i="bottom",strategy:a="absolute",middleware:r=[],platform:o}=t,l=o.detectOverflow?o:{...o,detectOverflow:N8},c=await(o.isRTL==null?void 0:o.isRTL(e)),f=await o.getElementRects({reference:n,floating:e,strategy:a}),{x:h,y:p}=D8(f,i,c),m=i,g=0,b={};for(let x=0;x<r.length;x++){let _=r[x];if(!_)continue;let{name:v,fn:S}=_,{x:M,y:T,data:E,reset:L}=await S({x:h,y:p,initialPlacement:i,placement:m,strategy:a,middlewareData:b,rects:f,platform:l,elements:{reference:n,floating:e}});h=M??h,p=T??p,b[v]={...b[v],...E},L&&g<lre&&(g++,typeof L=="object"&&(L.placement&&(m=L.placement),L.rects&&(f=L.rects===!0?await o.getElementRects({reference:n,floating:e,strategy:a}):L.rects),{x:h,y:p}=D8(f,m,c)),x=-1)}return{x:h,y:p,placement:m,strategy:a,middlewareData:b}},U8=n=>({name:"arrow",options:n,async fn(e){let{x:t,y:i,placement:a,rects:r,platform:o,elements:l,middlewareData:c}=e,{element:f,padding:h=0}=gl(n,e)||{};if(f==null)return{};let p=vD(h),m={x:t,y:i},g=gT(a),b=mT(g),x=await o.getDimensions(f),_=g==="y",v=_?"top":"left",S=_?"bottom":"right",M=_?"clientHeight":"clientWidth",T=r.reference[b]+r.reference[g]-m[g]-r.floating[b],E=m[g]-r.reference[g],L=await(o.getOffsetParent==null?void 0:o.getOffsetParent(f)),P=L?L[M]:0;(!P||!await(o.isElement==null?void 0:o.isElement(L)))&&(P=l.floating[M]||r.floating[b]);let I=T/2-E/2,R=P/2-x[b]/2-1,A=pl(p[v],R),D=pl(p[S],R),N=P-x[b]-D,H=P/2-x[b]/2+I,X=gD(A,H,N),W=!c.arrow&&Fd(a)!=null&&H!==X&&r.reference[b]/2-(H<A?A:D)-x[b]/2<0,Y=W?H<A?H-A:H-N:0;return{[g]:m[g]+Y,data:{[g]:X,centerOffset:H-X-Y,...W&&{alignmentOffset:Y}},reset:W}}});var B8=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(e){var t,i;let{placement:a,middlewareData:r,rects:o,initialPlacement:l,platform:c,elements:f}=e,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:x=!0,..._}=gl(n,e);if((t=r.arrow)!=null&&t.alignmentOffset)return{};let v=Mu(a),S=Ss(l),M=Mu(l)===l,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),E=m||(M||!x?[dx(l)]:I8(l)),L=b!=="none";!m&&L&&E.push(...P8(l,x,b,T));let P=[l,...E],I=await c.detectOverflow(e,_),R=[],A=((i=r.flip)==null?void 0:i.overflows)||[];if(h&&R.push(I[v]),p){let X=R8(a,o,T);R.push(I[X[0]],I[X[1]])}if(A=[...A,{placement:a,overflows:R}],!R.every(X=>X<=0)){var D,N;let X=(((D=r.flip)==null?void 0:D.index)||0)+1,W=P[X];if(W&&(!(p==="alignment"?S!==Ss(W):!1)||A.every(G=>Ss(G.placement)===S?G.overflows[0]>0:!0)))return{data:{index:X,overflows:A},reset:{placement:W}};let Y=(N=A.filter(V=>V.overflows[0]<=0).sort((V,G)=>V.overflows[1]-G.overflows[1])[0])==null?void 0:N.placement;if(!Y)switch(g){case"bestFit":{var H;let V=(H=A.filter(G=>{if(L){let $=Ss(G.placement);return $===S||$==="y"}return!0}).map(G=>[G.placement,G.overflows.filter($=>$>0).reduce(($,te)=>$+te,0)]).sort((G,$)=>G[1]-$[1])[0])==null?void 0:H[0];V&&(Y=V);break}case"initialPlacement":Y=l;break}if(a!==Y)return{reset:{placement:Y}}}return{}}}};function k8(n,e){return{top:n.top-e.height,right:n.right-e.width,bottom:n.bottom-e.height,left:n.left-e.width}}function O8(n){return L8.some(e=>n[e]>=0)}var F8=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t,platform:i}=e,{strategy:a="referenceHidden",...r}=gl(n,e);switch(a){case"referenceHidden":{let o=await i.detectOverflow(e,{...r,elementContext:"reference"}),l=k8(o,t.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:O8(l)}}}case"escaped":{let o=await i.detectOverflow(e,{...r,altBoundary:!0}),l=k8(o,t.floating);return{data:{escapedOffsets:l,escaped:O8(l)}}}default:return{}}}}};var H8=new Set(["left","top"]);async function ure(n,e){let{placement:t,platform:i,elements:a}=n,r=await(i.isRTL==null?void 0:i.isRTL(a.floating)),o=Mu(t),l=Fd(t),c=Ss(t)==="y",f=H8.has(o)?-1:1,h=r&&c?-1:1,p=gl(e,n),{mainAxis:m,crossAxis:g,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(g=l==="end"?b*-1:b),c?{x:g*h,y:m*f}:{x:m*f,y:g*h}}var V8=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(e){var t,i;let{x:a,y:r,placement:o,middlewareData:l}=e,c=await ure(e,n);return o===((t=l.offset)==null?void 0:t.placement)&&(i=l.arrow)!=null&&i.alignmentOffset?{}:{x:a+c.x,y:r+c.y,data:{...c,placement:o}}}}},G8=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:i,placement:a,platform:r}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:S=>{let{x:M,y:T}=S;return{x:M,y:T}}},...f}=gl(n,e),h={x:t,y:i},p=await r.detectOverflow(e,f),m=Ss(a),g=pT(m),b=h[g],x=h[m],_=(S,M)=>gD(M+p[S==="y"?"top":"left"],M,M-p[S==="y"?"bottom":"right"]);o&&(b=_(g,b)),l&&(x=_(m,x));let v=c.fn({...e,[g]:b,[m]:x});return{...v,data:{x:v.x-t,y:v.y-i,enabled:{[g]:o,[m]:l}}}}}},W8=function(n){return n===void 0&&(n={}),{options:n,fn(e){var t,i;let{x:a,y:r,placement:o,rects:l,middlewareData:c}=e,{offset:f=0,mainAxis:h=!0,crossAxis:p=!0}=gl(n,e),m={x:a,y:r},g=Ss(o),b=pT(g),x=m[b],_=m[g],v=gl(f,e),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(t=v.mainAxis)!=null?t:0,crossAxis:(i=v.crossAxis)!=null?i:0};if(h){let E=b==="y"?"height":"width",L=l.reference[b]-l.floating[E]+S.mainAxis,P=l.reference[b]+l.reference[E]-S.mainAxis;x<L?x=L:x>P&&(x=P)}if(p){var M,T;let E=b==="y"?"width":"height",L=H8.has(Mu(o)),P=l.reference[g]-l.floating[E]+(L&&((M=c.offset)==null?void 0:M[g])||0)+(L?0:S.crossAxis),I=l.reference[g]+l.reference[E]+(L?0:((T=c.offset)==null?void 0:T[g])||0)-(L?S.crossAxis:0);_<P?_=P:_>I&&(_=I)}return{[b]:x,[g]:_}}}},q8=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(e){let{placement:t,rects:i,platform:a,elements:r}=e,{apply:o=()=>{},...l}=gl(n,e),c=await a.detectOverflow(e,l),f=Mu(t),h=Fd(t),p=Ss(t)==="y",{width:m,height:g}=i.floating,b,x;f==="top"||f==="bottom"?(b=f,x=h===(await(a.isRTL==null?void 0:a.isRTL(r.floating))?"start":"end")?"left":"right"):(x=f,b=h==="end"?"top":"bottom");let _=g-c.top-c.bottom,v=m-c.left-c.right,S=pl(g-c[b],_),M=pl(m-c[x],v),T=e.middlewareData.shift,E=!T,L=S,P=M;T!=null&&T.enabled.x&&(P=v),T!=null&&T.enabled.y&&(L=_),E&&!h&&(p?P=m-2*_s(c.left,c.right):L=g-2*_s(c.top,c.bottom)),await o({...e,availableWidth:P,availableHeight:L});let I=await a.getDimensions(r.floating);return m!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function vT(){return typeof window<"u"}function Wd(n){return Y8(n)?(n.nodeName||"").toLowerCase():"#document"}function fr(n){var e;return(n==null||(e=n.ownerDocument)==null?void 0:e.defaultView)||window}function vl(n){var e;return(e=(Y8(n)?n.ownerDocument:n.document)||window.document)==null?void 0:e.documentElement}function Y8(n){return vT()?n instanceof Node||n instanceof fr(n).Node:!1}function ws(n){return vT()?n instanceof Element||n instanceof fr(n).Element:!1}function Tu(n){return vT()?n instanceof HTMLElement||n instanceof fr(n).HTMLElement:!1}function X8(n){return!vT()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof fr(n).ShadowRoot}function mx(n){let{overflow:e,overflowX:t,overflowY:i,display:a}=Ms(n);return/auto|scroll|overlay|hidden|clip/.test(e+i+t)&&a!=="inline"&&a!=="contents"}function j8(n){return/^(table|td|th)$/.test(Wd(n))}function gx(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}var cre=/transform|translate|scale|rotate|perspective|filter/,fre=/paint|layout|strict|content/,Vd=n=>!!n&&n!=="none",yD;function yT(n){let e=ws(n)?Ms(n):n;return Vd(e.transform)||Vd(e.translate)||Vd(e.scale)||Vd(e.rotate)||Vd(e.perspective)||!bT()&&(Vd(e.backdropFilter)||Vd(e.filter))||cre.test(e.willChange||"")||fre.test(e.contain||"")}function Z8(n){let e=Jc(n);for(;Tu(e)&&!ag(e);){if(yT(e))return e;if(gx(e))return null;e=Jc(e)}return null}function bT(){return yD==null&&(yD=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),yD}function ag(n){return/^(html|body|#document)$/.test(Wd(n))}function Ms(n){return fr(n).getComputedStyle(n)}function vx(n){return ws(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function Jc(n){if(Wd(n)==="html")return n;let e=n.assignedSlot||n.parentNode||X8(n)&&n.host||vl(n);return X8(e)?e.host:e}function K8(n){let e=Jc(n);return ag(e)?(n.ownerDocument||n).body:Tu(e)&&mx(e)?e:K8(e)}function Gd(n,e,t){var i;e===void 0&&(e=[]),t===void 0&&(t=!0);let a=K8(n),r=a===((i=n.ownerDocument)==null?void 0:i.body),o=fr(a);if(r){let l=xT(o);return e.concat(o,o.visualViewport||[],mx(a)?a:[],l&&t?Gd(l):[])}else return e.concat(a,Gd(a,[],t))}function xT(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function $8(n){let e=Ms(n),t=parseFloat(e.width)||0,i=parseFloat(e.height)||0,a=Tu(n),r=a?n.offsetWidth:t,o=a?n.offsetHeight:i,l=hx(t)!==r||hx(i)!==o;return l&&(t=r,i=o),{width:t,height:i,$:l}}function xD(n){return ws(n)?n:n.contextElement}function rg(n){let e=xD(n);if(!Tu(e))return ml(1);let t=e.getBoundingClientRect(),{width:i,height:a,$:r}=$8(e),o=(r?hx(t.width):t.width)/i,l=(r?hx(t.height):t.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}var dre=ml(0);function eG(n){let e=fr(n);return!bT()||!e.visualViewport?dre:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function hre(n,e,t){return e===void 0&&(e=!1),!!t&&e&&t===fr(n)}function qd(n,e,t,i){e===void 0&&(e=!1),t===void 0&&(t=!1);let a=n.getBoundingClientRect(),r=xD(n),o=ml(1);e&&(i?ws(i)&&(o=rg(i)):o=rg(n));let l=hre(r,t,i)?eG(r):ml(0),c=(a.left+l.x)/o.x,f=(a.top+l.y)/o.y,h=a.width/o.x,p=a.height/o.y;if(r&&i){let m=fr(r),g=ws(i)?fr(i):i,b=m,x=xT(b);for(;x&&g!==b;){let _=rg(x),v=x.getBoundingClientRect(),S=Ms(x),M=v.left+(x.clientLeft+parseFloat(S.paddingLeft))*_.x,T=v.top+(x.clientTop+parseFloat(S.paddingTop))*_.y;c*=_.x,f*=_.y,h*=_.x,p*=_.y,c+=M,f+=T,b=fr(x),x=xT(b)}}return Hd({width:h,height:p,x:c,y:f})}function _T(n,e){let t=vx(n).scrollLeft;return e?e.left+t:qd(vl(n)).left+t}function tG(n,e){let t=n.getBoundingClientRect(),i=t.left+e.scrollLeft-_T(n,t),a=t.top+e.scrollTop;return{x:i,y:a}}function pre(n){let{elements:e,rect:t,offsetParent:i,strategy:a}=n,r=a==="fixed",o=vl(i),l=e?gx(e.floating):!1;if(i===o||l&&r)return t;let c={scrollLeft:0,scrollTop:0},f=ml(1),h=ml(0),p=Tu(i);if((p||!r)&&((Wd(i)!=="body"||mx(o))&&(c=vx(i)),p)){let g=qd(i);f=rg(i),h.x=g.x+i.clientLeft,h.y=g.y+i.clientTop}let m=o&&!p&&!r?tG(o,c):ml(0);return{width:t.width*f.x,height:t.height*f.y,x:t.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:t.y*f.y-c.scrollTop*f.y+h.y+m.y}}function mre(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function gre(n){let e=vx(n),t=n.ownerDocument.body,i=_s(n.scrollWidth,n.clientWidth,t.scrollWidth,t.clientWidth),a=_s(n.scrollHeight,n.clientHeight,t.scrollHeight,t.clientHeight),r=-e.scrollLeft+_T(n),o=-e.scrollTop;return Ms(t).direction==="rtl"&&(r+=_s(n.clientWidth,t.clientWidth)-i),{width:i,height:a,x:r,y:o}}var vre=25;function yre(n,e,t){t===void 0&&(t="viewport");let i=t==="layoutViewport",a=fr(n),r=vl(n),o=a.visualViewport,l=r.clientWidth,c=r.clientHeight,f=0,h=0;if(o){let m=!bT()||e==="fixed";i?m||(f=-o.offsetLeft,h=-o.offsetTop):(l=o.width,c=o.height,m&&(f=o.offsetLeft,h=o.offsetTop))}if(_T(r)<=0){let m=r.ownerDocument,g=m.body,b=getComputedStyle(g),x=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-g.clientWidth-x),v=getComputedStyle(r).scrollbarGutter==="stable both-edges"?_/2:_;v<=vre&&(l-=v)}return{width:l,height:c,x:f,y:h}}function bre(n,e){let t=qd(n,!0,e==="fixed"),i=t.top+n.clientTop,a=t.left+n.clientLeft,r=rg(n),o=n.clientWidth*r.x,l=n.clientHeight*r.y,c=a*r.x,f=i*r.y;return{width:o,height:l,x:c,y:f}}function Q8(n,e,t){let i;if(e==="viewport"||e==="layoutViewport")i=yre(n,t,e);else if(e==="document")i=gre(vl(n));else if(ws(e))i=bre(e,t);else{let a=eG(n);i={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return Hd(i)}function xre(n,e){let t=e.get(n);if(t)return t;let i=Gd(n,[],!1).filter(l=>ws(l)&&Wd(l)!=="body"),a=null,r=Ms(n).position==="fixed",o=r?Jc(n):n;for(;ws(o)&&!ag(o);){let l=Ms(o),c=yT(o),f=a?a.position:r?"fixed":"";!c&&(f==="fixed"||f==="absolute"&&l.position==="static")?i=i.filter(p=>p!==o):a=l,o=Jc(o)}return e.set(n,i),i}function _re(n){let{element:e,boundary:t,rootBoundary:i,strategy:a}=n,o=[...t==="clippingAncestors"?gx(e)?[]:xre(e,this._c):[].concat(t),i],l=Q8(e,o[0],a),c=l.top,f=l.right,h=l.bottom,p=l.left;for(let m=1;m<o.length;m++){let g=Q8(e,o[m],a);c=_s(g.top,c),f=pl(g.right,f),h=pl(g.bottom,h),p=_s(g.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function Sre(n){let{width:e,height:t}=$8(n);return{width:e,height:t}}function wre(n,e,t){let i=Tu(e),a=vl(e),r=t==="fixed",o=qd(n,!0,r,e),l={scrollLeft:0,scrollTop:0},c=ml(0);if((i||!r)&&((Wd(e)!=="body"||mx(a))&&(l=vx(e)),i)){let m=qd(e,!0,r,e);c.x=m.x+e.clientLeft,c.y=m.y+e.clientTop}!i&&a&&(c.x=_T(a));let f=a&&!i&&!r?tG(a,l):ml(0),h=o.left+l.scrollLeft-c.x-f.x,p=o.top+l.scrollTop-c.y-f.y;return{x:h,y:p,width:o.width,height:o.height}}function bD(n){return Ms(n).position==="static"}function J8(n,e){if(!Tu(n)||Ms(n).position==="fixed")return null;if(e)return e(n);let t=n.offsetParent;return vl(n)===t&&(t=t.ownerDocument.body),t}function nG(n,e){let t=fr(n);if(gx(n))return t;if(!Tu(n)){let a=Jc(n);for(;a&&!ag(a);){if(ws(a)&&!bD(a))return a;a=Jc(a)}return t}let i=J8(n,e);for(;i&&j8(i)&&bD(i);)i=J8(i,e);return i&&ag(i)&&bD(i)&&!yT(i)?t:i||Z8(n)||t}var Mre=async function(n){let e=this.getOffsetParent||nG,t=this.getDimensions,i=await t(n.floating);return{reference:wre(n.reference,await e(n.floating),n.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Tre(n){return Ms(n).direction==="rtl"}var iG={convertOffsetParentRelativeRectToViewportRelativeRect:pre,getDocumentElement:vl,getClippingRect:_re,getOffsetParent:nG,getElementRects:Mre,getClientRects:mre,getDimensions:Sre,getScale:rg,isElement:ws,isRTL:Tre};function aG(n,e){return n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height}function Cre(n,e,t){let i=null,a,r=vl(n);function o(){var h;clearTimeout(a),(h=i)==null||h.disconnect(),i=null}function l(h,p){h===void 0&&(h=!1),p===void 0&&(p=1),o();let m=n.getBoundingClientRect(),{left:g,top:b,width:x,height:_}=m;if(h||e(),!x||!_)return;let v=px(b),S=px(r.clientWidth-(g+x)),M=px(r.clientHeight-(b+_)),T=px(g),L={rootMargin:-v+"px "+-S+"px "+-M+"px "+-T+"px",threshold:_s(0,pl(1,p))||1},P=!0;function I(R){let A=R[0].intersectionRatio;if(!aG(m,n.getBoundingClientRect()))return l();if(A!==p){if(!P)return l();A?l(!1,A):a=setTimeout(()=>{l(!1,1e-7)},1e3)}P=!1}try{i=new IntersectionObserver(I,{...L,root:r.ownerDocument})}catch{i=new IntersectionObserver(I,L)}i.observe(n)}let c=fr(n),f=()=>l(t);return c.addEventListener("resize",f),l(!0),()=>{c.removeEventListener("resize",f),o()}}function _D(n,e,t,i){i===void 0&&(i={});let{ancestorScroll:a=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=i,f=xD(n),h=a||r?[...f?Gd(f):[],...e?Gd(e):[]]:[];h.forEach(v=>{a&&v.addEventListener("scroll",t),r&&v.addEventListener("resize",t)});let p=f&&l?Cre(f,t,r):null,m=-1,g=null;o&&(g=new ResizeObserver(v=>{let[S]=v;S&&S.target===f&&g&&e&&(g.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var M;(M=g)==null||M.observe(e)})),t()}),f&&!c&&g.observe(f),e&&g.observe(e));let b,x=c?qd(n):null;c&&_();function _(){let v=qd(n);x&&!aG(x,v)&&t(),x=v,b=requestAnimationFrame(_)}return t(),()=>{var v;h.forEach(S=>{a&&S.removeEventListener("scroll",t),r&&S.removeEventListener("resize",t)}),p?.(),(v=g)==null||v.disconnect(),g=null,c&&cancelAnimationFrame(b)}}var rG=V8;var oG=G8,sG=B8,lG=q8,uG=F8,SD=U8;var cG=W8,wD=(n,e,t)=>{let i=new Map,a=t??{},r={...iG,...a.platform,_c:i};return z8(n,e,{...a,platform:r})};var Ui=ke(dt(),1),dG=ke(dt(),1),hG=ke(Ph(),1),Ere=typeof document<"u",Are=function(){},ST=Ere?dG.useLayoutEffect:Are;function wT(n,e){if(n===e)return!0;if(typeof n!=typeof e)return!1;if(typeof n=="function"&&n.toString()===e.toString())return!0;let t,i,a;if(n&&e&&typeof n=="object"){if(Array.isArray(n)){if(t=n.length,t!==e.length)return!1;for(i=t;i--!==0;)if(!wT(n[i],e[i]))return!1;return!0}if(a=Object.keys(n),t=a.length,t!==Object.keys(e).length)return!1;for(i=t;i--!==0;)if(!{}.hasOwnProperty.call(e,a[i]))return!1;for(i=t;i--!==0;){let r=a[i];if(!(r==="_owner"&&n.$$typeof)&&!wT(n[r],e[r]))return!1}return!0}return n!==n&&e!==e}function pG(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function fG(n,e){let t=pG(n);return Math.round(e*t)/t}function MD(n){let e=Ui.useRef(n);return ST(()=>{e.current=n}),e}function mG(n){n===void 0&&(n={});let{placement:e="bottom",strategy:t="absolute",middleware:i=[],platform:a,elements:{reference:r,floating:o}={},transform:l=!0,whileElementsMounted:c,open:f}=n,[h,p]=Ui.useState({x:0,y:0,strategy:t,placement:e,middlewareData:{},isPositioned:!1}),[m,g]=Ui.useState(i);wT(m,i)||g(i);let[b,x]=Ui.useState(null),[_,v]=Ui.useState(null),S=Ui.useCallback(G=>{G!==L.current&&(L.current=G,x(G))},[]),M=Ui.useCallback(G=>{G!==P.current&&(P.current=G,v(G))},[]),T=r||b,E=o||_,L=Ui.useRef(null),P=Ui.useRef(null),I=Ui.useRef(h),R=c!=null,A=MD(c),D=MD(a),N=MD(f),H=Ui.useCallback(()=>{if(!L.current||!P.current)return;let G={placement:e,strategy:t,middleware:m};D.current&&(G.platform=D.current),wD(L.current,P.current,G).then($=>{let te={...$,isPositioned:N.current!==!1};X.current&&!wT(I.current,te)&&(I.current=te,hG.flushSync(()=>{p(te)}))})},[m,e,t,D,N]);ST(()=>{f===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,p(G=>({...G,isPositioned:!1})))},[f]);let X=Ui.useRef(!1);ST(()=>(X.current=!0,()=>{X.current=!1}),[]),ST(()=>{if(T&&(L.current=T),E&&(P.current=E),T&&E){if(A.current)return A.current(T,E,H);H()}},[T,E,H,A,R]);let W=Ui.useMemo(()=>({reference:L,floating:P,setReference:S,setFloating:M}),[S,M]),Y=Ui.useMemo(()=>({reference:T,floating:E}),[T,E]),V=Ui.useMemo(()=>{let G={position:t,left:0,top:0};if(!Y.floating)return G;let $=fG(Y.floating,h.x),te=fG(Y.floating,h.y);return l?{...G,transform:"translate("+$+"px, "+te+"px)",...pG(Y.floating)>=1.5&&{willChange:"transform"}}:{position:t,left:$,top:te}},[t,l,Y.floating,h.x,h.y]);return Ui.useMemo(()=>({...h,update:H,refs:W,elements:Y,floatingStyles:V}),[h,H,W,Y,V])}var Lre=n=>{function e(t){return{}.hasOwnProperty.call(t,"current")}return{name:"arrow",options:n,fn(t){let{element:i,padding:a}=typeof n=="function"?n(t):n;return i&&e(i)?i.current!=null?SD({element:i.current,padding:a}).fn(t):{}:i?SD({element:i,padding:a}).fn(t):{}}}},gG=(n,e)=>{let t=rG(n);return{name:t.name,fn:t.fn,options:[n,e]}},vG=(n,e)=>{let t=oG(n);return{name:t.name,fn:t.fn,options:[n,e]}},yG=(n,e)=>({fn:cG(n).fn,options:[n,e]}),bG=(n,e)=>{let t=sG(n);return{name:t.name,fn:t.fn,options:[n,e]}},xG=(n,e)=>{let t=lG(n);return{name:t.name,fn:t.fn,options:[n,e]}};var _G=(n,e)=>{let t=uG(n);return{name:t.name,fn:t.fn,options:[n,e]}};var SG=(n,e)=>{let t=Lre(n);return{name:t.name,fn:t.fn,options:[n,e]}};var wG=ke(dt(),1);var Rre=Object.defineProperty,Ire=(n,e)=>Rre(n,"name",{value:e,configurable:!0});function TD(n){let[e,t]=wG.useState(void 0);return In(()=>{if(n){t({width:n.offsetWidth,height:n.offsetHeight});let i=0,a=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let o=r[0];window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{let l,c;if("borderBoxSize"in o){let f=o.borderBoxSize,h=Array.isArray(f)?f[0]:f;l=h.inlineSize,c=h.blockSize}else l=n.offsetWidth,c=n.offsetHeight;t({width:l,height:c})})});return a.observe(n,{box:"border-box"}),()=>{window.cancelAnimationFrame(i),a.unobserve(n)}}else t(void 0)},[n]),e}Ire(TD,"useSize");var og=ke(pn(),1),Pre=Object.defineProperty,$c=(n,e)=>Pre(n,"name",{value:e,configurable:!0});var MG={Partial:"partial",Always:"always"},TG={Optimized:"optimized",Always:"always"},CG="Popper",[EG,CD]=Su(CG),[Dre,AG]=EG(CG),LG=$c(n=>{let{__scopePopper:e,children:t}=n,[i,a]=Ka.useState(null),[r,o]=Ka.useState(void 0);return(0,og.jsx)(Dre,{scope:e,anchor:i,onAnchorChange:a,placementState:r,setPlacementState:o,children:t})},"Popper"),kre="PopperAnchor",RG=Ka.forwardRef($c(function(e,t){let{__scopePopper:i,virtualRef:a,...r}=e,o=AG(kre,i),l=Ka.useRef(null),c=o.onAnchorChange,f=Ka.useCallback(x=>{l.current=x,x&&c(x)},[c]),h=Nn(t,f),p=Ka.useRef(null);Ka.useEffect(()=>{if(!a)return;let x=p.current;p.current=a.current,x!==p.current&&c(p.current)});let m=o.placementState&&MT(o.placementState),g=m?.[0],b=m?.[1];return a?null:(0,og.jsx)($i.div,{"data-radix-popper-side":g,"data-radix-popper-align":b,...r,ref:h})},"PopperAnchor")),IG="PopperContent",[Ore,gfe]=EG(IG),PG=Ka.forwardRef($c(function(e,t){let{__scopePopper:i,side:a="bottom",sideOffset:r=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m=MG.Partial,hideWhenDetached:g=!1,updatePositionStrategy:b=TG.Optimized,onPlaced:x,..._}=e,v=AG(IG,i),[S,M]=Ka.useState(null),T=Nn(t,M),[E,L]=Ka.useState(null),P=TD(E),I=P?.width??0,R=P?.height??0,A=a+(o!=="center"?"-"+o:""),D=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},N=Array.isArray(h)?h:[h],H=N.length>0,X={padding:D,boundary:N.filter(DG),altBoundary:H},{refs:W,floatingStyles:Y,placement:V,isPositioned:G,middlewareData:$}=mG({strategy:"fixed",placement:A,whileElementsMounted:$c((...Xe)=>_D(...Xe,{animationFrame:b===TG.Always}),"whileElementsMounted"),elements:{reference:v.anchor},middleware:[gG({mainAxis:r+R,alignmentAxis:l}),f&&vG({mainAxis:!0,crossAxis:!1,...m===MG.Partial?{limiter:yG()}:{},...X}),f&&bG({...X}),xG({...X,apply:$c(({elements:Xe,rects:ve,availableWidth:st,availableHeight:ht})=>{let{width:F,height:ue}=ve.reference,le=Xe.floating.style;le.setProperty("--radix-popper-available-width",`${st}px`),le.setProperty("--radix-popper-available-height",`${ht}px`),le.setProperty("--radix-popper-anchor-width",`${F}px`),le.setProperty("--radix-popper-anchor-height",`${ue}px`)},"apply")}),E&&SG({element:E,padding:c}),Nre({arrowWidth:I,arrowHeight:R}),g&&_G(H?{strategy:"referenceHidden",...X}:{strategy:"referenceHidden",padding:X.padding,altBoundary:X.altBoundary})]}),te=v.setPlacementState;In(()=>(te(V),()=>{te(void 0)}),[V,te]);let[ge,Le]=MT(V),je=Nr(x);In(()=>{G&&je?.()},[G,je]);let Oe=$.arrow?.x,ze=$.arrow?.y,ae=$.arrow?.centerOffset!==0,[de,Ie]=Ka.useState();return In(()=>{S&&Ie(window.getComputedStyle(S).zIndex)},[S]),(0,og.jsx)("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:G?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[$.transformOrigin?.x,$.transformOrigin?.y].join(" "),...$.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,og.jsx)(Ore,{scope:i,placedSide:ge,placedAlign:Le,onArrowChange:L,arrowX:Oe,arrowY:ze,shouldHideArrow:ae,children:(0,og.jsx)($i.div,{"data-side":ge,"data-align":Le,..._,ref:T,style:{..._.style,animation:G?_.style?.animation:"none"}})})})},"PopperContent"));function DG(n){return n!==null}$c(DG,"isNotNull");var Nre=$c(n=>({name:"transformOrigin",options:n,fn(e){let{placement:t,rects:i,middlewareData:a}=e,o=a.arrow?.centerOffset!==0,l=o?0:n.arrowWidth,c=o?0:n.arrowHeight,[f,h]=MT(t),p={start:"0%",center:"50%",end:"100%"}[h],m=(a.arrow?.x??0)+l/2,g=(a.arrow?.y??0)+c/2,b="",x="";return f==="bottom"?(b=o?p:`${m}px`,x=`${-c}px`):f==="top"?(b=o?p:`${m}px`,x=`${i.floating.height+c}px`):f==="right"?(b=`${-c}px`,x=o?p:`${g}px`):f==="left"&&(b=`${i.floating.width+c}px`,x=o?p:`${g}px`),{data:{x:b,y:x}}}}),"transformOrigin");function MT(n){let[e,t="center"]=n.split("-");return[e,t]}$c(MT,"getSideAndAlignFromPlacement");var TT=ke(dt(),1),kG=ke(Ph(),1);var OG=ke(pn(),1),Ure=Object.defineProperty,Bre=(n,e)=>Ure(n,"name",{value:e,configurable:!0}),NG=TT.forwardRef(Bre(function(e,t){let{container:i,...a}=e,[r,o]=TT.useState(!1);In(()=>o(!0),[]);let l=i||r&&globalThis?.document?.body;return l?kG.createPortal((0,OG.jsx)($i.div,{...a,ref:t}),l):null},"Portal"));var Pa=ke(dt(),1);var zG=ke(dt(),1),Fre=Object.defineProperty,Cu=(n,e)=>Fre(n,"name",{value:e,configurable:!0});function UG(n,e){return zG.useReducer((t,i)=>e[t][i]??t,n)}Cu(UG,"useStateMachine");var BG=Cu(n=>{let{present:e,children:t}=n,i=FG(e),a=typeof t=="function"?t({present:i.isPresent}):Pa.Children.only(t),r=HG(i.ref,VG(a));return typeof t=="function"||i.isPresent?Pa.cloneElement(a,{ref:r}):null},"Presence");function FG(n){let[e,t]=Pa.useState(),i=Pa.useRef(null),a=Pa.useRef(n),r=Pa.useRef("none"),o=Pa.useRef(void 0),l=n?"mounted":"unmounted",[c,f]=UG(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Pa.useEffect(()=>{c==="mounted"?(r.current=o.current??sg(i.current),o.current=void 0):r.current="none"},[c]),In(()=>{let h=i.current,p=a.current;if(p!==n){let g=r.current,b=sg(h);n?(o.current=b,f("MOUNT")):b==="none"||h?.display==="none"?f("UNMOUNT"):f(p&&g!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=n}},[n,f]),In(()=>{if(e){let h,p=e.ownerDocument.defaultView??window,m=Cu(b=>{let _=sg(i.current).includes(CSS.escape(b.animationName));if(b.target===e&&_&&(f("ANIMATION_END"),!a.current)){let v=e.style.animationFillMode;e.style.animationFillMode="forwards",h=p.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=v)})}},"handleAnimationEnd"),g=Cu(b=>{b.target===e&&(r.current=sg(i.current))},"handleAnimationStart");return e.addEventListener("animationstart",g),e.addEventListener("animationcancel",m),e.addEventListener("animationend",m),()=>{p.clearTimeout(h),e.removeEventListener("animationstart",g),e.removeEventListener("animationcancel",m),e.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[e,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:Pa.useCallback(h=>{if(h){let p=getComputedStyle(h);i.current=p,o.current=sg(p)}else i.current=null;t(h)},[])}}Cu(FG,"usePresence");function ED(n,e){if(typeof n=="function")return n(e);n!=null&&(n.current=e)}Cu(ED,"setRef");function HG(...n){let e=Pa.useRef(n);return e.current=n,Pa.useCallback(t=>{let i=e.current,a=!1,r=i.map(o=>{let l=ED(o,t);return!a&&typeof l=="function"&&(a=!0),l});if(a)return()=>{for(let o=0;o<r.length;o++){let l=r[o];typeof l=="function"?l():ED(i[o],null)}}},[])}Cu(HG,"useStableComposedRefs");function sg(n){return n?.animationName||"none"}Cu(sg,"getAnimationName");function VG(n){let e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning;return t?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get,t=e&&"isReactWarning"in e&&e.isReactWarning,t?n.props.ref:n.props.ref||n.ref)}Cu(VG,"getElementRef");var Zo=ke(dt(),1);var CT=!1;var Ts=ke(dt(),1);var lg=ke(dt(),1),Hre=Object.defineProperty,Vre=(n,e)=>Hre(n,"name",{value:e,configurable:!0}),GG=lg[" useEffectEvent ".trim().toString()],WG=lg[" useInsertionEffect ".trim().toString()];function AD(n){if(typeof GG=="function")return GG(n);let e=lg.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof WG=="function"?WG(()=>{e.current=n}):In(()=>{e.current=n}),lg.useMemo(()=>((...t)=>e.current?.(...t)),[])}Vre(AD,"useEffectEvent");var Gre=Object.defineProperty,yx=(n,e)=>Gre(n,"name",{value:e,configurable:!0}),Wre=Zo[" useInsertionEffect ".trim().toString()]||In;function ET({prop:n,defaultProp:e,onChange:t=yx(()=>{},"onChange"),caller:i}){let[a,r,o]=XG({defaultProp:e,onChange:t}),l=n!==void 0,c=l?n:a;if(CT){let h=Zo.useRef(n!==void 0);Zo.useEffect(()=>{let p=h.current;p!==l&&console.warn(`${i} is changing from ${p?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),h.current=l},[l,i])}let f=Zo.useCallback(h=>{if(l){let p=YG(h)?h(n):h;p!==n&&o.current?.(p)}else r(h)},[l,n,r,o]);return[c,f]}yx(ET,"useControllableState");function XG({defaultProp:n,onChange:e}){let[t,i]=Zo.useState(n),a=Zo.useRef(t),r=Zo.useRef(e);return Wre(()=>{r.current=e},[e]),Zo.useEffect(()=>{a.current!==t&&(r.current?.(t),a.current=t)},[t,a]),[t,i,r]}yx(XG,"useUncontrolledState");function YG(n){return typeof n=="function"}yx(YG,"isFunction");var qG=Symbol("RADIX:SYNC_STATE");function qre(n,e,t,i){let{prop:a,defaultProp:r,onChange:o,caller:l}=e,c=a!==void 0,f=AD(o);if(CT){let _=Ts.useRef(a!==void 0);Ts.useEffect(()=>{let v=_.current;v!==c&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),_.current=c},[c,l])}let h=[{...t,state:r}];i&&h.push(i);let[p,m]=Ts.useReducer((_,v)=>{if(v.type===qG)return{..._,state:v.state};let S=n(_,v);return c&&!Object.is(S.state,_.state)&&f(S.state),S},...h),g=p.state,b=Ts.useRef(g);Ts.useEffect(()=>{b.current!==g&&(b.current=g,c||f(g))},[g,b,c]);let x=Ts.useMemo(()=>a!==void 0?{...p,state:a}:p,[p,a]);return Ts.useEffect(()=>{c&&!Object.is(a,p.state)&&m({type:qG,state:a})},[a,p.state,c]),[x,m]}yx(qre,"useControllableStateReducer");var Xre=ke(dt(),1);var Yre=ke(pn(),1);var jG=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"});var jre=function(n){if(typeof document>"u")return null;var e=Array.isArray(n)?n[0]:n;return e.ownerDocument.body},ug=new WeakMap,AT=new WeakMap,LT={},LD=0,ZG=function(n){return n&&(n.host||ZG(n.parentNode))},Zre=function(n,e){return e.map(function(t){if(n.contains(t))return t;var i=ZG(t);return i&&n.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",n,". Doing nothing"),null)}).filter(function(t){return!!t})},Kre=function(n,e,t,i){var a=Zre(e,Array.isArray(n)?n:[n]);LT[t]||(LT[t]=new WeakMap);var r=LT[t],o=[],l=new Set,c=new Set(a),f=function(p){!p||l.has(p)||(l.add(p),f(p.parentNode))};a.forEach(f);var h=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(l.has(m))h(m);else try{var g=m.getAttribute(i),b=g!==null&&g!=="false",x=(ug.get(m)||0)+1,_=(r.get(m)||0)+1;ug.set(m,x),r.set(m,_),o.push(m),x===1&&b&&AT.set(m,!0),_===1&&m.setAttribute(t,"true"),b||m.setAttribute(i,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return h(e),l.clear(),LD++,function(){o.forEach(function(p){var m=ug.get(p)-1,g=r.get(p)-1;ug.set(p,m),r.set(p,g),m||(AT.has(p)||p.removeAttribute(i),AT.delete(p)),g||p.removeAttribute(t)}),LD--,LD||(ug=new WeakMap,ug=new WeakMap,AT=new WeakMap,LT={})}},KG=function(n,e,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(n)?n:[n]),a=e||jre(n);return a?(i.push.apply(i,Array.from(a.querySelectorAll("[aria-live], script"))),Kre(i,a,t,"aria-hidden")):function(){return null}};var zr=function(){return zr=Object.assign||function(e){for(var t,i=1,a=arguments.length;i<a;i++){t=arguments[i];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},zr.apply(this,arguments)};function RT(n,e){var t={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&e.indexOf(i)<0&&(t[i]=n[i]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,i=Object.getOwnPropertySymbols(n);a<i.length;a++)e.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(n,i[a])&&(t[i[a]]=n[i[a]]);return t}function QG(n,e,t){if(t||arguments.length===2)for(var i=0,a=e.length,r;i<a;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return n.concat(r||Array.prototype.slice.call(e))}var OT=ke(dt());var Qa=ke(dt());var Xd="right-scroll-bar-position",Yd="width-before-scroll-bar",RD="with-scroll-bars-hidden",ID="--removed-body-scroll-bar-size";function IT(n,e){return typeof n=="function"?n(e):n&&(n.current=e),n}var JG=ke(dt());function $G(n,e){var t=(0,JG.useState)(function(){return{value:n,callback:e,facade:{get current(){return t.value},set current(i){var a=t.value;a!==i&&(t.value=i,t.callback(i,a))}}}})[0];return t.callback=e,t.facade}var PT=ke(dt());var Qre=typeof window<"u"?PT.useLayoutEffect:PT.useEffect,eW=new WeakMap;function PD(n,e){var t=$G(e||null,function(i){return n.forEach(function(a){return IT(a,i)})});return Qre(function(){var i=eW.get(t);if(i){var a=new Set(i),r=new Set(n),o=t.current;a.forEach(function(l){r.has(l)||IT(l,null)}),r.forEach(function(l){a.has(l)||IT(l,o)})}eW.set(t,n)},[n]),t}function Jre(n){return n}function $re(n,e){e===void 0&&(e=Jre);var t=[],i=!1,a={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return t.length?t[t.length-1]:n},useMedium:function(r){var o=e(r,i);return t.push(o),function(){t=t.filter(function(l){return l!==o})}},assignSyncMedium:function(r){for(i=!0;t.length;){var o=t;t=[],o.forEach(r)}t={push:function(l){return r(l)},filter:function(){return t}}},assignMedium:function(r){i=!0;var o=[];if(t.length){var l=t;t=[],l.forEach(r),o=t}var c=function(){var h=o;o=[],h.forEach(r)},f=function(){return Promise.resolve().then(c)};f(),t={push:function(h){o.push(h),f()},filter:function(h){return o=o.filter(h),t}}}};return a}function DD(n){n===void 0&&(n={});var e=$re(null);return e.options=zr({async:!0,ssr:!1},n),e}var tW=ke(dt()),nW=function(n){var e=n.sideCar,t=RT(n,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return tW.createElement(i,zr({},t))};nW.isSideCarExport=!0;function kD(n,e){return n.useMedium(e),nW}var DT=DD();var OD=function(){},bx=Qa.forwardRef(function(n,e){var t=Qa.useRef(null),i=Qa.useState({onScrollCapture:OD,onWheelCapture:OD,onTouchMoveCapture:OD}),a=i[0],r=i[1],o=n.forwardProps,l=n.children,c=n.className,f=n.removeScrollBar,h=n.enabled,p=n.shards,m=n.sideCar,g=n.noRelative,b=n.noIsolation,x=n.inert,_=n.allowPinchZoom,v=n.as,S=v===void 0?"div":v,M=n.gapMode,T=RT(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=m,L=PD([t,e]),P=zr(zr({},T),a);return Qa.createElement(Qa.Fragment,null,h&&Qa.createElement(E,{sideCar:DT,removeScrollBar:f,shards:p,noRelative:g,noIsolation:b,inert:x,setCallbacks:r,allowPinchZoom:!!_,lockRef:t,gapMode:M}),o?Qa.cloneElement(Qa.Children.only(l),zr(zr({},P),{ref:L})):Qa.createElement(S,zr({},P,{className:c,ref:L}),l))});bx.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};bx.classNames={fullWidth:Yd,zeroRight:Xd};var Fn=ke(dt());var fg=ke(dt());var rW=ke(dt());var iW;var aW=function(){if(iW)return iW;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eoe(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var e=aW();return e&&n.setAttribute("nonce",e),n}function toe(n,e){n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}function noe(n){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(n)}var ND=function(){var n=0,e=null;return{add:function(t){n==0&&(e=eoe())&&(toe(e,t),noe(e)),n++},remove:function(){n--,!n&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}};var zD=function(){var n=ND();return function(e,t){rW.useEffect(function(){return n.add(e),function(){n.remove()}},[e&&t])}};var xx=function(){var n=zD(),e=function(t){var i=t.styles,a=t.dynamic;return n(i,a),null};return e};var ioe={left:0,top:0,right:0,gap:0},UD=function(n){return parseInt(n||"",10)||0},aoe=function(n){var e=window.getComputedStyle(document.body),t=e[n==="padding"?"paddingLeft":"marginLeft"],i=e[n==="padding"?"paddingTop":"marginTop"],a=e[n==="padding"?"paddingRight":"marginRight"];return[UD(t),UD(i),UD(a)]},BD=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return ioe;var e=aoe(n),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-t+e[2]-e[0])}};var roe=xx(),cg="data-scroll-locked",ooe=function(n,e,t,i){var a=n.left,r=n.top,o=n.right,l=n.gap;return t===void 0&&(t="margin"),`
3852
3852
  .`.concat(RD,` {
3853
3853
  overflow: hidden `).concat(i,`;
3854
3854
  padding-right: `).concat(l,"px ").concat(i,`;