expxagents 0.7.4 → 0.7.6
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/dist/dashboard/assets/BufferResource-Dj9SLiH3.js +185 -0
- package/dist/dashboard/assets/BufferResource-gLBr4ZPz.js +185 -0
- package/dist/dashboard/assets/CanvasRenderer-BwnTm9_4.js +1 -0
- package/dist/dashboard/assets/CanvasRenderer-CXWPwY8u.js +1 -0
- package/dist/dashboard/assets/RenderTargetSystem-8UzvJaaM.js +172 -0
- package/dist/dashboard/assets/RenderTargetSystem-J1eg3avP.js +172 -0
- package/dist/dashboard/assets/WebGLRenderer-CivCN7xy.js +156 -0
- package/dist/dashboard/assets/WebGLRenderer-D5DPC49-.js +156 -0
- package/dist/dashboard/assets/WebGPURenderer-BxaF3qLS.js +41 -0
- package/dist/dashboard/assets/WebGPURenderer-VhPALZiv.js +41 -0
- package/dist/dashboard/assets/browserAll-BbiQUc2F.js +14 -0
- package/dist/dashboard/assets/browserAll-UaM9FmiB.js +14 -0
- package/dist/dashboard/assets/index-BpBtthlo.js +344 -0
- package/dist/dashboard/assets/index-JuIYZnY7.js +344 -0
- package/dist/dashboard/assets/webworkerAll-Bbzbnqr0.js +83 -0
- package/dist/dashboard/assets/webworkerAll-CuTXgacx.js +83 -0
- package/dist/dashboard/index.html +1 -1
- package/dist/data/opensquad.db +0 -0
- package/dist/data/opensquad.db-shm +0 -0
- package/dist/data/opensquad.db-wal +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/browserAll-BbiQUc2F.js","assets/webworkerAll-Bbzbnqr0.js","assets/WebGPURenderer-BxaF3qLS.js","assets/BufferResource-gLBr4ZPz.js","assets/RenderTargetSystem-J1eg3avP.js","assets/WebGLRenderer-D5DPC49-.js","assets/CanvasRenderer-CXWPwY8u.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const f of o)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).observe(document,{childList:!0,subtree:!0});function n(o){const f={};return o.integrity&&(f.integrity=o.integrity),o.referrerPolicy&&(f.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?f.credentials="include":o.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function l(o){if(o.ep)return;o.ep=!0;const f=n(o);fetch(o.href,f)}})();function mp(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var oy={exports:{}},Eh={};/**
|
|
3
|
+
* @license React
|
|
4
|
+
* react-jsx-runtime.production.js
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
+
*
|
|
8
|
+
* This source code is licensed under the MIT license found in the
|
|
9
|
+
* LICENSE file in the root directory of this source tree.
|
|
10
|
+
*/var k0;function IS(){if(k0)return Eh;k0=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(l,o,f){var d=null;if(f!==void 0&&(d=""+f),o.key!==void 0&&(d=""+o.key),"key"in o){f={};for(var m in o)m!=="key"&&(f[m]=o[m])}else f=o;return o=f.ref,{$$typeof:i,type:l,key:d,ref:o!==void 0?o:null,props:f}}return Eh.Fragment=t,Eh.jsx=n,Eh.jsxs=n,Eh}var J0;function $S(){return J0||(J0=1,oy.exports=IS()),oy.exports}var L=$S(),cy={exports:{}},Xt={};/**
|
|
11
|
+
* @license React
|
|
12
|
+
* react.production.js
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
+
*
|
|
16
|
+
* This source code is licensed under the MIT license found in the
|
|
17
|
+
* LICENSE file in the root directory of this source tree.
|
|
18
|
+
*/var P0;function tb(){if(P0)return Xt;P0=1;var i=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),C=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=C&&j[C]||j["@@iterator"],typeof j=="function"?j:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,z={};function O(j,I,st){this.props=j,this.context=I,this.refs=z,this.updater=st||M}O.prototype.isReactComponent={},O.prototype.setState=function(j,I){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,I,"setState")},O.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function B(){}B.prototype=O.prototype;function U(j,I,st){this.props=j,this.context=I,this.refs=z,this.updater=st||M}var G=U.prototype=new B;G.constructor=U,R(G,O.prototype),G.isPureReactComponent=!0;var Z=Array.isArray;function Q(){}var K={H:null,A:null,T:null,S:null},gt=Object.prototype.hasOwnProperty;function ct(j,I,st){var pt=st.ref;return{$$typeof:i,type:j,key:I,ref:pt!==void 0?pt:null,props:st}}function ht(j,I){return ct(j.type,I,j.props)}function dt(j){return typeof j=="object"&&j!==null&&j.$$typeof===i}function vt(j){var I={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(st){return I[st]})}var _t=/\/+/g;function xt(j,I){return typeof j=="object"&&j!==null&&j.key!=null?vt(""+j.key):I.toString(36)}function Dt(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(Q,Q):(j.status="pending",j.then(function(I){j.status==="pending"&&(j.status="fulfilled",j.value=I)},function(I){j.status==="pending"&&(j.status="rejected",j.reason=I)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function w(j,I,st,pt,Tt){var Ot=typeof j;(Ot==="undefined"||Ot==="boolean")&&(j=null);var Bt=!1;if(j===null)Bt=!0;else switch(Ot){case"bigint":case"string":case"number":Bt=!0;break;case"object":switch(j.$$typeof){case i:case t:Bt=!0;break;case _:return Bt=j._init,w(Bt(j._payload),I,st,pt,Tt)}}if(Bt)return Tt=Tt(j),Bt=pt===""?"."+xt(j,0):pt,Z(Tt)?(st="",Bt!=null&&(st=Bt.replace(_t,"$&/")+"/"),w(Tt,I,st,"",function(ma){return ma})):Tt!=null&&(dt(Tt)&&(Tt=ht(Tt,st+(Tt.key==null||j&&j.key===Tt.key?"":(""+Tt.key).replace(_t,"$&/")+"/")+Bt)),I.push(Tt)),1;Bt=0;var ce=pt===""?".":pt+":";if(Z(j))for(var oe=0;oe<j.length;oe++)pt=j[oe],Ot=ce+xt(pt,oe),Bt+=w(pt,I,st,Ot,Tt);else if(oe=E(j),typeof oe=="function")for(j=oe.call(j),oe=0;!(pt=j.next()).done;)pt=pt.value,Ot=ce+xt(pt,oe++),Bt+=w(pt,I,st,Ot,Tt);else if(Ot==="object"){if(typeof j.then=="function")return w(Dt(j),I,st,pt,Tt);throw I=String(j),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return Bt}function H(j,I,st){if(j==null)return j;var pt=[],Tt=0;return w(j,pt,"","",function(Ot){return I.call(st,Ot,Tt++)}),pt}function at(j){if(j._status===-1){var I=j._result;I=I(),I.then(function(st){(j._status===0||j._status===-1)&&(j._status=1,j._result=st)},function(st){(j._status===0||j._status===-1)&&(j._status=2,j._result=st)}),j._status===-1&&(j._status=0,j._result=I)}if(j._status===1)return j._result.default;throw j._result}var et=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(I))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},ft={map:H,forEach:function(j,I,st){H(j,function(){I.apply(this,arguments)},st)},count:function(j){var I=0;return H(j,function(){I++}),I},toArray:function(j){return H(j,function(I){return I})||[]},only:function(j){if(!dt(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return Xt.Activity=b,Xt.Children=ft,Xt.Component=O,Xt.Fragment=n,Xt.Profiler=o,Xt.PureComponent=U,Xt.StrictMode=l,Xt.Suspense=g,Xt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,Xt.__COMPILER_RUNTIME={__proto__:null,c:function(j){return K.H.useMemoCache(j)}},Xt.cache=function(j){return function(){return j.apply(null,arguments)}},Xt.cacheSignal=function(){return null},Xt.cloneElement=function(j,I,st){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var pt=R({},j.props),Tt=j.key;if(I!=null)for(Ot in I.key!==void 0&&(Tt=""+I.key),I)!gt.call(I,Ot)||Ot==="key"||Ot==="__self"||Ot==="__source"||Ot==="ref"&&I.ref===void 0||(pt[Ot]=I[Ot]);var Ot=arguments.length-2;if(Ot===1)pt.children=st;else if(1<Ot){for(var Bt=Array(Ot),ce=0;ce<Ot;ce++)Bt[ce]=arguments[ce+2];pt.children=Bt}return ct(j.type,Tt,pt)},Xt.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:f,_context:j},j},Xt.createElement=function(j,I,st){var pt,Tt={},Ot=null;if(I!=null)for(pt in I.key!==void 0&&(Ot=""+I.key),I)gt.call(I,pt)&&pt!=="key"&&pt!=="__self"&&pt!=="__source"&&(Tt[pt]=I[pt]);var Bt=arguments.length-2;if(Bt===1)Tt.children=st;else if(1<Bt){for(var ce=Array(Bt),oe=0;oe<Bt;oe++)ce[oe]=arguments[oe+2];Tt.children=ce}if(j&&j.defaultProps)for(pt in Bt=j.defaultProps,Bt)Tt[pt]===void 0&&(Tt[pt]=Bt[pt]);return ct(j,Ot,Tt)},Xt.createRef=function(){return{current:null}},Xt.forwardRef=function(j){return{$$typeof:m,render:j}},Xt.isValidElement=dt,Xt.lazy=function(j){return{$$typeof:_,_payload:{_status:-1,_result:j},_init:at}},Xt.memo=function(j,I){return{$$typeof:v,type:j,compare:I===void 0?null:I}},Xt.startTransition=function(j){var I=K.T,st={};K.T=st;try{var pt=j(),Tt=K.S;Tt!==null&&Tt(st,pt),typeof pt=="object"&&pt!==null&&typeof pt.then=="function"&&pt.then(Q,et)}catch(Ot){et(Ot)}finally{I!==null&&st.types!==null&&(I.types=st.types),K.T=I}},Xt.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},Xt.use=function(j){return K.H.use(j)},Xt.useActionState=function(j,I,st){return K.H.useActionState(j,I,st)},Xt.useCallback=function(j,I){return K.H.useCallback(j,I)},Xt.useContext=function(j){return K.H.useContext(j)},Xt.useDebugValue=function(){},Xt.useDeferredValue=function(j,I){return K.H.useDeferredValue(j,I)},Xt.useEffect=function(j,I){return K.H.useEffect(j,I)},Xt.useEffectEvent=function(j){return K.H.useEffectEvent(j)},Xt.useId=function(){return K.H.useId()},Xt.useImperativeHandle=function(j,I,st){return K.H.useImperativeHandle(j,I,st)},Xt.useInsertionEffect=function(j,I){return K.H.useInsertionEffect(j,I)},Xt.useLayoutEffect=function(j,I){return K.H.useLayoutEffect(j,I)},Xt.useMemo=function(j,I){return K.H.useMemo(j,I)},Xt.useOptimistic=function(j,I){return K.H.useOptimistic(j,I)},Xt.useReducer=function(j,I,st){return K.H.useReducer(j,I,st)},Xt.useRef=function(j){return K.H.useRef(j)},Xt.useState=function(j){return K.H.useState(j)},Xt.useSyncExternalStore=function(j,I,st){return K.H.useSyncExternalStore(j,I,st)},Xt.useTransition=function(){return K.H.useTransition()},Xt.version="19.2.4",Xt}var W0;function pp(){return W0||(W0=1,cy.exports=tb()),cy.exports}var X=pp();const Bm=mp(X);var fy={exports:{}},Ch={},hy={exports:{}},dy={};/**
|
|
19
|
+
* @license React
|
|
20
|
+
* scheduler.production.js
|
|
21
|
+
*
|
|
22
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the MIT license found in the
|
|
25
|
+
* LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/var F0;function eb(){return F0||(F0=1,(function(i){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,ft=w[et];if(0<o(ft,H))w[et]=H,w[at]=ft,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function l(w){if(w.length===0)return null;var H=w[0],at=w.pop();if(at!==H){w[0]=at;t:for(var et=0,ft=w.length,j=ft>>>1;et<j;){var I=2*(et+1)-1,st=w[I],pt=I+1,Tt=w[pt];if(0>o(st,at))pt<ft&&0>o(Tt,st)?(w[et]=Tt,w[pt]=at,et=pt):(w[et]=st,w[I]=at,et=I);else if(pt<ft&&0>o(Tt,at))w[et]=Tt,w[pt]=at,et=pt;else break t}}return H}function o(w,H){var at=w.sortIndex-H.sortIndex;return at!==0?at:w.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();i.unstable_now=function(){return d.now()-m}}var g=[],v=[],_=1,b=null,C=3,E=!1,M=!1,R=!1,z=!1,O=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function G(w){for(var H=n(v);H!==null;){if(H.callback===null)l(v);else if(H.startTime<=w)l(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function Z(w){if(R=!1,G(w),!M)if(n(g)!==null)M=!0,Q||(Q=!0,vt());else{var H=n(v);H!==null&&Dt(Z,H.startTime-w)}}var Q=!1,K=-1,gt=5,ct=-1;function ht(){return z?!0:!(i.unstable_now()-ct<gt)}function dt(){if(z=!1,Q){var w=i.unstable_now();ct=w;var H=!0;try{t:{M=!1,R&&(R=!1,B(K),K=-1),E=!0;var at=C;try{e:{for(G(w),b=n(g);b!==null&&!(b.expirationTime>w&&ht());){var et=b.callback;if(typeof et=="function"){b.callback=null,C=b.priorityLevel;var ft=et(b.expirationTime<=w);if(w=i.unstable_now(),typeof ft=="function"){b.callback=ft,G(w),H=!0;break e}b===n(g)&&l(g),G(w)}else l(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(Z,j.startTime-w),H=!1}}break t}finally{b=null,C=at,E=!1}H=void 0}}finally{H?vt():Q=!1}}}var vt;if(typeof U=="function")vt=function(){U(dt)};else if(typeof MessageChannel<"u"){var _t=new MessageChannel,xt=_t.port2;_t.port1.onmessage=dt,vt=function(){xt.postMessage(null)}}else vt=function(){O(dt,0)};function Dt(w,H){K=O(function(){w(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(w){w.callback=null},i.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):gt=0<w?Math.floor(1e3/w):5},i.unstable_getCurrentPriorityLevel=function(){return C},i.unstable_next=function(w){switch(C){case 1:case 2:case 3:var H=3;break;default:H=C}var at=C;C=H;try{return w()}finally{C=at}},i.unstable_requestPaint=function(){z=!0},i.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=C;C=w;try{return H()}finally{C=at}},i.unstable_scheduleCallback=function(w,H,at){var et=i.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,w){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=at+ft,w={id:_++,callback:H,priorityLevel:w,startTime:at,expirationTime:ft,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(R?(B(K),K=-1):R=!0,Dt(Z,at-et))):(w.sortIndex=ft,t(g,w),M||E||(M=!0,Q||(Q=!0,vt()))),w},i.unstable_shouldYield=ht,i.unstable_wrapCallback=function(w){var H=C;return function(){var at=C;C=H;try{return w.apply(this,arguments)}finally{C=at}}}})(dy)),dy}var I0;function nb(){return I0||(I0=1,hy.exports=eb()),hy.exports}var my={exports:{}},ca={};/**
|
|
27
|
+
* @license React
|
|
28
|
+
* react-dom.production.js
|
|
29
|
+
*
|
|
30
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
+
*
|
|
32
|
+
* This source code is licensed under the MIT license found in the
|
|
33
|
+
* LICENSE file in the root directory of this source tree.
|
|
34
|
+
*/var $0;function ab(){if($0)return ca;$0=1;var i=pp();function t(g){var v="https://react.dev/errors/"+g;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)v+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+g+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var l={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},o=Symbol.for("react.portal");function f(g,v,_){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:b==null?null:""+b,children:g,containerInfo:v,implementation:_}}var d=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,v){if(g==="font")return"";if(typeof v=="string")return v==="use-credentials"?v:""}return ca.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,ca.createPortal=function(g,v){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v||v.nodeType!==1&&v.nodeType!==9&&v.nodeType!==11)throw Error(t(299));return f(g,v,null,_)},ca.flushSync=function(g){var v=d.T,_=l.p;try{if(d.T=null,l.p=2,g)return g()}finally{d.T=v,l.p=_,l.d.f()}},ca.preconnect=function(g,v){typeof g=="string"&&(v?(v=v.crossOrigin,v=typeof v=="string"?v==="use-credentials"?v:"":void 0):v=null,l.d.C(g,v))},ca.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},ca.preinit=function(g,v){if(typeof g=="string"&&v&&typeof v.as=="string"){var _=v.as,b=m(_,v.crossOrigin),C=typeof v.integrity=="string"?v.integrity:void 0,E=typeof v.fetchPriority=="string"?v.fetchPriority:void 0;_==="style"?l.d.S(g,typeof v.precedence=="string"?v.precedence:void 0,{crossOrigin:b,integrity:C,fetchPriority:E}):_==="script"&&l.d.X(g,{crossOrigin:b,integrity:C,fetchPriority:E,nonce:typeof v.nonce=="string"?v.nonce:void 0})}},ca.preinitModule=function(g,v){if(typeof g=="string")if(typeof v=="object"&&v!==null){if(v.as==null||v.as==="script"){var _=m(v.as,v.crossOrigin);l.d.M(g,{crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0})}}else v==null&&l.d.M(g)},ca.preload=function(g,v){if(typeof g=="string"&&typeof v=="object"&&v!==null&&typeof v.as=="string"){var _=v.as,b=m(_,v.crossOrigin);l.d.L(g,_,{crossOrigin:b,integrity:typeof v.integrity=="string"?v.integrity:void 0,nonce:typeof v.nonce=="string"?v.nonce:void 0,type:typeof v.type=="string"?v.type:void 0,fetchPriority:typeof v.fetchPriority=="string"?v.fetchPriority:void 0,referrerPolicy:typeof v.referrerPolicy=="string"?v.referrerPolicy:void 0,imageSrcSet:typeof v.imageSrcSet=="string"?v.imageSrcSet:void 0,imageSizes:typeof v.imageSizes=="string"?v.imageSizes:void 0,media:typeof v.media=="string"?v.media:void 0})}},ca.preloadModule=function(g,v){if(typeof g=="string")if(v){var _=m(v.as,v.crossOrigin);l.d.m(g,{as:typeof v.as=="string"&&v.as!=="script"?v.as:void 0,crossOrigin:_,integrity:typeof v.integrity=="string"?v.integrity:void 0})}else l.d.m(g)},ca.requestFormReset=function(g){l.d.r(g)},ca.unstable_batchedUpdates=function(g,v){return g(v)},ca.useFormState=function(g,v,_){return d.H.useFormState(g,v,_)},ca.useFormStatus=function(){return d.H.useHostTransitionStatus()},ca.version="19.2.4",ca}var tv;function ib(){if(tv)return my.exports;tv=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(t){console.error(t)}}return i(),my.exports=ab(),my.exports}/**
|
|
35
|
+
* @license React
|
|
36
|
+
* react-dom-client.production.js
|
|
37
|
+
*
|
|
38
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the MIT license found in the
|
|
41
|
+
* LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/var ev;function lb(){if(ev)return Ch;ev=1;var i=nb(),t=pp(),n=ib();function l(e){var a="https://react.dev/errors/"+e;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)a+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+e+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var a=e,r=e;if(e.alternate)for(;a.return;)a=a.return;else{e=a;do a=e,(a.flags&4098)!==0&&(r=a.return),e=a.return;while(e)}return a.tag===3?r:null}function d(e){if(e.tag===13){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function m(e){if(e.tag===31){var a=e.memoizedState;if(a===null&&(e=e.alternate,e!==null&&(a=e.memoizedState)),a!==null)return a.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(l(188))}function v(e){var a=e.alternate;if(!a){if(a=f(e),a===null)throw Error(l(188));return a!==e?null:e}for(var r=e,c=a;;){var p=r.return;if(p===null)break;var x=p.alternate;if(x===null){if(c=p.return,c!==null){r=c;continue}break}if(p.child===x.child){for(x=p.child;x;){if(x===r)return g(p),e;if(x===c)return g(p),a;x=x.sibling}throw Error(l(188))}if(r.return!==c.return)r=p,c=x;else{for(var A=!1,D=p.child;D;){if(D===r){A=!0,r=p,c=x;break}if(D===c){A=!0,c=p,r=x;break}D=D.sibling}if(!A){for(D=x.child;D;){if(D===r){A=!0,r=x,c=p;break}if(D===c){A=!0,c=x,r=p;break}D=D.sibling}if(!A)throw Error(l(189))}}if(r.alternate!==c)throw Error(l(190))}if(r.tag!==3)throw Error(l(188));return r.stateNode.current===r?e:a}function _(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e;for(e=e.child;e!==null;){if(a=_(e),a!==null)return a;e=e.sibling}return null}var b=Object.assign,C=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),B=Symbol.for("react.consumer"),U=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),Z=Symbol.for("react.suspense"),Q=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),gt=Symbol.for("react.lazy"),ct=Symbol.for("react.activity"),ht=Symbol.for("react.memo_cache_sentinel"),dt=Symbol.iterator;function vt(e){return e===null||typeof e!="object"?null:(e=dt&&e[dt]||e["@@iterator"],typeof e=="function"?e:null)}var _t=Symbol.for("react.client.reference");function xt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_t?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case O:return"Profiler";case z:return"StrictMode";case Z:return"Suspense";case Q:return"SuspenseList";case ct:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case U:return e.displayName||"Context";case B:return(e._context.displayName||"Context")+".Consumer";case G:var a=e.render;return e=e.displayName,e||(e=a.displayName||a.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return a=e.displayName||null,a!==null?a:xt(e.type)||"Memo";case gt:a=e._payload,e=e._init;try{return xt(e(a))}catch{}}return null}var Dt=Array.isArray,w=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,at={pending:!1,data:null,method:null,action:null},et=[],ft=-1;function j(e){return{current:e}}function I(e){0>ft||(e.current=et[ft],et[ft]=null,ft--)}function st(e,a){ft++,et[ft]=e.current,e.current=a}var pt=j(null),Tt=j(null),Ot=j(null),Bt=j(null);function ce(e,a){switch(st(Ot,a),st(Tt,e),st(pt,null),a.nodeType){case 9:case 11:e=(e=a.documentElement)&&(e=e.namespaceURI)?y0(e):0;break;default:if(e=a.tagName,a=a.namespaceURI)a=y0(a),e=g0(a,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}I(pt),st(pt,e)}function oe(){I(pt),I(Tt),I(Ot)}function ma(e){e.memoizedState!==null&&st(Bt,e);var a=pt.current,r=g0(a,e.type);a!==r&&(st(Tt,e),st(pt,r))}function Ga(e){Tt.current===e&&(I(pt),I(Tt)),Bt.current===e&&(I(Bt),_h._currentValue=at)}var qn,Wn;function mn(e){if(qn===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);qn=a&&a[1]||"",Wn=-1<r.stack.indexOf(`
|
|
43
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
+
`+qn+e+Wn}var Fn=!1;function rs(e,a){if(!e||Fn)return"";Fn=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var ot=function(){throw Error()};if(Object.defineProperty(ot.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ot,[])}catch(it){var tt=it}Reflect.construct(e,[],ot)}else{try{ot.call()}catch(it){tt=it}e.call(ot.prototype)}}else{try{throw Error()}catch(it){tt=it}(ot=e())&&typeof ot.catch=="function"&&ot.catch(function(){})}}catch(it){if(it&&tt&&typeof it.stack=="string")return[it.stack,tt.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var x=c.DetermineComponentFrameRoot(),A=x[0],D=x[1];if(A&&D){var Y=A.split(`
|
|
45
|
+
`),F=D.split(`
|
|
46
|
+
`);for(p=c=0;c<Y.length&&!Y[c].includes("DetermineComponentFrameRoot");)c++;for(;p<F.length&&!F[p].includes("DetermineComponentFrameRoot");)p++;if(c===Y.length||p===F.length)for(c=Y.length-1,p=F.length-1;1<=c&&0<=p&&Y[c]!==F[p];)p--;for(;1<=c&&0<=p;c--,p--)if(Y[c]!==F[p]){if(c!==1||p!==1)do if(c--,p--,0>p||Y[c]!==F[p]){var lt=`
|
|
47
|
+
`+Y[c].replace(" at new "," at ");return e.displayName&<.includes("<anonymous>")&&(lt=lt.replace("<anonymous>",e.displayName)),lt}while(1<=c&&0<=p);break}}}finally{Fn=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?mn(r):""}function Fa(e,a){switch(e.tag){case 26:case 27:case 5:return mn(e.type);case 16:return mn("Lazy");case 13:return e.child!==a&&a!==null?mn("Suspense Fallback"):mn("Suspense");case 19:return mn("SuspenseList");case 0:case 15:return rs(e.type,!1);case 11:return rs(e.type.render,!1);case 1:return rs(e.type,!0);case 31:return mn("Activity");default:return""}}function Ku(e){try{var a="",r=null;do a+=Fa(e,r),r=e,e=e.return;while(e);return a}catch(c){return`
|
|
48
|
+
Error generating stack: `+c.message+`
|
|
49
|
+
`+c.stack}}var os=Object.prototype.hasOwnProperty,ja=i.unstable_scheduleCallback,bl=i.unstable_cancelCallback,Ap=i.unstable_shouldYield,nd=i.unstable_requestPaint,In=i.unstable_now,ad=i.unstable_getCurrentPriorityLevel,id=i.unstable_ImmediatePriority,lo=i.unstable_UserBlockingPriority,so=i.unstable_NormalPriority,ld=i.unstable_LowPriority,sd=i.unstable_IdlePriority,Zc=i.log,Kc=i.unstable_setDisableYieldValue,qa=null,Ie=null;function Ya(e){if(typeof Zc=="function"&&Kc(e),Ie&&typeof Ie.setStrictMode=="function")try{Ie.setStrictMode(qa,e)}catch{}}var Yn=Math.clz32?Math.clz32:ud,ku=Math.log,Ju=Math.LN2;function ud(e){return e>>>=0,e===0?32:31-(ku(e)/Ju|0)|0}var Pu=256,cs=262144,Wu=4194304;function mi(e){var a=e&42;if(a!==0)return a;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Fu(e,a,r){var c=e.pendingLanes;if(c===0)return 0;var p=0,x=e.suspendedLanes,A=e.pingedLanes;e=e.warmLanes;var D=c&134217727;return D!==0?(c=D&~x,c!==0?p=mi(c):(A&=D,A!==0?p=mi(A):r||(r=D&~e,r!==0&&(p=mi(r))))):(D=c&~x,D!==0?p=mi(D):A!==0?p=mi(A):r||(r=c&~e,r!==0&&(p=mi(r)))),p===0?0:a!==0&&a!==p&&(a&x)===0&&(x=p&-p,r=a&-a,x>=r||x===32&&(r&4194048)!==0)?a:p}function Is(e,a){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&a)===0}function uo(e,a){switch(e){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $s(){var e=Wu;return Wu<<=1,(Wu&62914560)===0&&(Wu=4194304),e}function tu(e){for(var a=[],r=0;31>r;r++)a.push(e);return a}function eu(e,a){e.pendingLanes|=a,a!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rd(e,a,r,c,p,x){var A=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var D=e.entanglements,Y=e.expirationTimes,F=e.hiddenUpdates;for(r=A&~r;0<r;){var lt=31-Yn(r),ot=1<<lt;D[lt]=0,Y[lt]=-1;var tt=F[lt];if(tt!==null)for(F[lt]=null,lt=0;lt<tt.length;lt++){var it=tt[lt];it!==null&&(it.lane&=-536870913)}r&=~ot}c!==0&&kc(e,c,0),x!==0&&p===0&&e.tag!==0&&(e.suspendedLanes|=x&~(A&~a))}function kc(e,a,r){e.pendingLanes|=a,e.suspendedLanes&=~a;var c=31-Yn(a);e.entangledLanes|=a,e.entanglements[c]=e.entanglements[c]|1073741824|r&261930}function ro(e,a){var r=e.entangledLanes|=a;for(e=e.entanglements;r;){var c=31-Yn(r),p=1<<c;p&a|e[c]&a&&(e[c]|=a),r&=~p}}function oo(e,a){var r=a&-a;return r=(r&42)!==0?1:pi(r),(r&(e.suspendedLanes|a))!==0?0:r}function pi(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function co(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Zi(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Y0(e.type))}function yi(e,a){var r=H.p;try{return H.p=e,a()}finally{H.p=r}}var Ia=Math.random().toString(36).slice(2),Wt="__reactFiber$"+Ia,Rn="__reactProps$"+Ia,Tl="__reactContainer$"+Ia,fo="__reactEvents$"+Ia,od="__reactListeners$"+Ia,Mp="__reactHandles$"+Ia,ho="__reactResources$"+Ia,fs="__reactMarker$"+Ia;function Iu(e){delete e[Wt],delete e[Rn],delete e[fo],delete e[od],delete e[Mp]}function on(e){var a=e[Wt];if(a)return a;for(var r=e.parentNode;r;){if(a=r[Tl]||r[Wt]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(e=E0(e);e!==null;){if(r=e[Wt])return r;e=E0(e)}return a}e=r,r=e.parentNode}return null}function ze(e){if(e=e[Wt]||e[Tl]){var a=e.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return e}return null}function Ki(e){var a=e.tag;if(a===5||a===26||a===27||a===6)return e.stateNode;throw Error(l(33))}function ki(e){var a=e[ho];return a||(a=e[ho]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function $e(e){e[fs]=!0}var gi=new Set,$u={};function Ji(e,a){El(e,a),El(e+"Capture",a)}function El(e,a){for($u[e]=a,e=0;e<a.length;e++)gi.add(a[e])}var cd=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Jc={},Pc={};function fd(e){return os.call(Pc,e)?!0:os.call(Jc,e)?!1:cd.test(e)?Pc[e]=!0:(Jc[e]=!0,!1)}function tr(e,a,r){if(fd(a))if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){e.removeAttribute(a);return}}e.setAttribute(a,""+r)}}function er(e,a,r){if(r===null)e.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttribute(a,""+r)}}function $a(e,a,r,c){if(c===null)e.removeAttribute(r);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(a,r,""+c)}}function pa(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hd(e){var a=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function dd(e,a,r){var c=Object.getOwnPropertyDescriptor(e.constructor.prototype,a);if(!e.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var p=c.get,x=c.set;return Object.defineProperty(e,a,{configurable:!0,get:function(){return p.call(this)},set:function(A){r=""+A,x.call(this,A)}}),Object.defineProperty(e,a,{enumerable:c.enumerable}),{getValue:function(){return r},setValue:function(A){r=""+A},stopTracking:function(){e._valueTracker=null,delete e[a]}}}}function mo(e){if(!e._valueTracker){var a=hd(e)?"checked":"value";e._valueTracker=dd(e,a,""+e[a])}}function Wc(e){if(!e)return!1;var a=e._valueTracker;if(!a)return!0;var r=a.getValue(),c="";return e&&(c=hd(e)?e.checked?"true":"false":e.value),e=c,e!==r?(a.setValue(e),!0):!1}function nu(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var md=/[\n"\\]/g;function ya(e){return e.replace(md,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function po(e,a,r,c,p,x,A,D){e.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.type=A:e.removeAttribute("type"),a!=null?A==="number"?(a===0&&e.value===""||e.value!=a)&&(e.value=""+pa(a)):e.value!==""+pa(a)&&(e.value=""+pa(a)):A!=="submit"&&A!=="reset"||e.removeAttribute("value"),a!=null?yo(e,A,pa(a)):r!=null?yo(e,A,pa(r)):c!=null&&e.removeAttribute("value"),p==null&&x!=null&&(e.defaultChecked=!!x),p!=null&&(e.checked=p&&typeof p!="function"&&typeof p!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?e.name=""+pa(D):e.removeAttribute("name")}function Fc(e,a,r,c,p,x,A,D){if(x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.type=x),a!=null||r!=null){if(!(x!=="submit"&&x!=="reset"||a!=null)){mo(e);return}r=r!=null?""+pa(r):"",a=a!=null?""+pa(a):r,D||a===e.value||(e.value=a),e.defaultValue=a}c=c??p,c=typeof c!="function"&&typeof c!="symbol"&&!!c,e.checked=D?e.checked:!!c,e.defaultChecked=!!c,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(e.name=A),mo(e)}function yo(e,a,r){a==="number"&&nu(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function au(e,a,r,c){if(e=e.options,a){a={};for(var p=0;p<r.length;p++)a["$"+r[p]]=!0;for(r=0;r<e.length;r++)p=a.hasOwnProperty("$"+e[r].value),e[r].selected!==p&&(e[r].selected=p),p&&c&&(e[r].defaultSelected=!0)}else{for(r=""+pa(r),a=null,p=0;p<e.length;p++){if(e[p].value===r){e[p].selected=!0,c&&(e[p].defaultSelected=!0);return}a!==null||e[p].disabled||(a=e[p])}a!==null&&(a.selected=!0)}}function Ic(e,a,r){if(a!=null&&(a=""+pa(a),a!==e.value&&(e.value=a),r==null)){e.defaultValue!==a&&(e.defaultValue=a);return}e.defaultValue=r!=null?""+pa(r):""}function hs(e,a,r,c){if(a==null){if(c!=null){if(r!=null)throw Error(l(92));if(Dt(c)){if(1<c.length)throw Error(l(93));c=c[0]}r=c}r==null&&(r=""),a=r}r=pa(a),e.defaultValue=r,c=e.textContent,c===r&&c!==""&&c!==null&&(e.value=c),mo(e)}function ds(e,a){if(a){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=a;return}}e.textContent=a}var go=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function nr(e,a,r){var c=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?c?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="":c?e.setProperty(a,r):typeof r!="number"||r===0||go.has(a)?a==="float"?e.cssFloat=r:e[a]=(""+r).trim():e[a]=r+"px"}function $c(e,a,r){if(a!=null&&typeof a!="object")throw Error(l(62));if(e=e.style,r!=null){for(var c in r)!r.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?e.setProperty(c,""):c==="float"?e.cssFloat="":e[c]="");for(var p in a)c=a[p],a.hasOwnProperty(p)&&r[p]!==c&&nr(e,p,c)}else for(var x in a)a.hasOwnProperty(x)&&nr(e,x,a[x])}function ar(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pd=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yd=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ir(e){return yd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function vi(){}var lr=null;function vo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ms=null,Cl=null;function tf(e){var a=ze(e);if(a&&(e=a.stateNode)){var r=e[Rn]||null;t:switch(e=a.stateNode,a.type){case"input":if(po(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+ya(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var c=r[a];if(c!==e&&c.form===e.form){var p=c[Rn]||null;if(!p)throw Error(l(90));po(c,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<r.length;a++)c=r[a],c.form===e.form&&Wc(c)}break t;case"textarea":Ic(e,r.value,r.defaultValue);break t;case"select":a=r.value,a!=null&&au(e,!!r.multiple,a,!1)}}}var xo=!1;function ef(e,a,r){if(xo)return e(a,r);xo=!0;try{var c=e(a);return c}finally{if(xo=!1,(ms!==null||Cl!==null)&&(N(),ms&&(a=ms,e=Cl,Cl=ms=null,tf(a),e)))for(a=0;a<e.length;a++)tf(e[a])}}function ps(e,a){var r=e.stateNode;if(r===null)return null;var c=r[Rn]||null;if(c===null)return null;r=c[a];t:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(e=e.type,c=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!c;break t;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(l(231,a,typeof r));return r}var xi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_o=!1;if(xi)try{var sr={};Object.defineProperty(sr,"passive",{get:function(){_o=!0}}),window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch{_o=!1}var Al=null,So=null,Ml=null;function bo(){if(Ml)return Ml;var e,a=So,r=a.length,c,p="value"in Al?Al.value:Al.textContent,x=p.length;for(e=0;e<r&&a[e]===p[e];e++);var A=r-e;for(c=1;c<=A&&a[r-c]===p[x-c];c++);return Ml=p.slice(e,1<c?1-c:void 0)}function ys(e){var a=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&a===13&&(e=13)):e=a,e===10&&(e=13),32<=e||e===13?e:0}function ur(){return!0}function nf(){return!1}function zn(e){function a(r,c,p,x,A){this._reactName=r,this._targetInst=p,this.type=c,this.nativeEvent=x,this.target=A,this.currentTarget=null;for(var D in e)e.hasOwnProperty(D)&&(r=e[D],this[D]=r?r(x):x[D]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?ur:nf,this.isPropagationStopped=nf,this}return b(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=ur)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=ur)},persist:function(){},isPersistent:ur}),a}var Rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rr=zn(Rl),ti=b({},Rl,{view:0,detail:0}),To=zn(ti),Eo,or,iu,cr=b({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==iu&&(iu&&e.type==="mousemove"?(Eo=e.screenX-iu.screenX,or=e.screenY-iu.screenY):or=Eo=0,iu=e),Eo)},movementY:function(e){return"movementY"in e?e.movementY:or}}),gd=zn(cr),_n=b({},cr,{dataTransfer:0}),vd=zn(_n),xd=b({},ti,{relatedTarget:0}),Co=zn(xd),_d=b({},Rl,{animationName:0,elapsedTime:0,pseudoElement:0}),Sd=zn(_d),fr=b({},Rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),af=zn(fr),bd=b({},Rl,{data:0}),lf=zn(bd),Td={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sf={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ed(e){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(e):(e=uf[e])?!!a[e]:!1}function hr(){return Ed}var rf=b({},ti,{key:function(e){if(e.key){var a=Td[e.key]||e.key;if(a!=="Unidentified")return a}return e.type==="keypress"?(e=ys(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hr,charCode:function(e){return e.type==="keypress"?ys(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ys(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),of=zn(rf),Cd=b({},cr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ao=zn(Cd),Ad=b({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hr}),Pi=zn(Ad),cf=b({},Rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Rp=zn(cf),Md=b({},cr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zl=zn(Md),Wi=b({},Rl,{newState:0,oldState:0}),ff=zn(Wi),hf=[9,13,27,32],gs=xi&&"CompositionEvent"in window,Dl=null;xi&&"documentMode"in document&&(Dl=document.documentMode);var vs=xi&&"TextEvent"in window&&!Dl,Sn=xi&&(!gs||Dl&&8<Dl&&11>=Dl),dr=" ",df=!1;function Mo(e,a){switch(e){case"keyup":return hf.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function lu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ol=!1;function Ro(e,a){switch(e){case"compositionend":return lu(a);case"keypress":return a.which!==32?null:(df=!0,dr);case"textInput":return e=a.data,e===dr&&df?null:e;default:return null}}function Rd(e,a){if(Ol)return e==="compositionend"||!gs&&Mo(e,a)?(e=bo(),Ml=So=Al=null,Ol=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Sn&&a.locale!=="ko"?null:a.data;default:return null}}var ga={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function mf(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a==="input"?!!ga[e.type]:a==="textarea"}function zo(e,a,r,c){ms?Cl?Cl.push(c):Cl=[c]:ms=c,a=xm(a,"onChange"),0<a.length&&(r=new rr("onChange","change",null,r,c),e.push({event:r,listeners:a}))}var su=null,uu=null;function pf(e){c0(e,0)}function ru(e){var a=Ki(e);if(Wc(a))return e}function yf(e,a){if(e==="change")return a}var mr=!1;if(xi){var xs;if(xi){var De="oninput"in document;if(!De){var zd=document.createElement("div");zd.setAttribute("oninput","return;"),De=typeof zd.oninput=="function"}xs=De}else xs=!1;mr=xs&&(!document.documentMode||9<document.documentMode)}function Dd(){su&&(su.detachEvent("onpropertychange",gf),uu=su=null)}function gf(e){if(e.propertyName==="value"&&ru(uu)){var a=[];zo(a,uu,e,vo(e)),ef(pf,a)}}function pr(e,a,r){e==="focusin"?(Dd(),su=a,uu=r,su.attachEvent("onpropertychange",gf)):e==="focusout"&&Dd()}function Nl(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ru(uu)}function Od(e,a){if(e==="click")return ru(a)}function Nd(e,a){if(e==="input"||e==="change")return ru(a)}function _s(e,a){return e===a&&(e!==0||1/e===1/a)||e!==e&&a!==a}var Oe=typeof Object.is=="function"?Object.is:_s;function ou(e,a){if(Oe(e,a))return!0;if(typeof e!="object"||e===null||typeof a!="object"||a===null)return!1;var r=Object.keys(e),c=Object.keys(a);if(r.length!==c.length)return!1;for(c=0;c<r.length;c++){var p=r[c];if(!os.call(a,p)||!Oe(e[p],a[p]))return!1}return!0}function vf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function xf(e,a){var r=vf(e);e=0;for(var c;r;){if(r.nodeType===3){if(c=e+r.textContent.length,e<=a&&c>=a)return{node:r,offset:a-e};e=c}t:{for(;r;){if(r.nextSibling){r=r.nextSibling;break t}r=r.parentNode}r=void 0}r=vf(r)}}function Do(e,a){return e&&a?e===a?!0:e&&e.nodeType===3?!1:a&&a.nodeType===3?Do(e,a.parentNode):"contains"in e?e.contains(a):e.compareDocumentPosition?!!(e.compareDocumentPosition(a)&16):!1:!1}function Oo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var a=nu(e.document);a instanceof e.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)e=a.contentWindow;else break;a=nu(e.document)}return a}function cu(e){var a=e&&e.nodeName&&e.nodeName.toLowerCase();return a&&(a==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||a==="textarea"||e.contentEditable==="true")}var Ud=xi&&"documentMode"in document&&11>=document.documentMode,fu=null,No=null,hu=null,va=!1;function Uo(e,a,r){var c=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;va||fu==null||fu!==nu(c)||(c=fu,"selectionStart"in c&&cu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),hu&&ou(hu,c)||(hu=c,c=xm(No,"onSelect"),0<c.length&&(a=new rr("onSelect","select",null,a,r),e.push({event:a,listeners:c}),a.target=fu)))}function Ul(e,a){var r={};return r[e.toLowerCase()]=a.toLowerCase(),r["Webkit"+e]="webkit"+a,r["Moz"+e]="moz"+a,r}var du={animationend:Ul("Animation","AnimationEnd"),animationiteration:Ul("Animation","AnimationIteration"),animationstart:Ul("Animation","AnimationStart"),transitionrun:Ul("Transition","TransitionRun"),transitionstart:Ul("Transition","TransitionStart"),transitioncancel:Ul("Transition","TransitionCancel"),transitionend:Ul("Transition","TransitionEnd")},yr={},Ln={};xi&&(Ln=document.createElement("div").style,"AnimationEvent"in window||(delete du.animationend.animation,delete du.animationiteration.animation,delete du.animationstart.animation),"TransitionEvent"in window||delete du.transitionend.transition);function Bl(e){if(yr[e])return yr[e];if(!du[e])return e;var a=du[e],r;for(r in a)if(a.hasOwnProperty(r)&&r in Ln)return yr[e]=a[r];return e}var $n=Bl("animationend"),_f=Bl("animationiteration"),_i=Bl("animationstart"),mu=Bl("transitionrun"),wl=Bl("transitionstart"),Sf=Bl("transitioncancel"),Bo=Bl("transitionend"),Fi=new Map,wo="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");wo.push("scrollEnd");function Dn(e,a){Fi.set(e,a),Ji(a,[e])}var Hl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},pn=[],Ss=0,Ho=0;function Gl(){for(var e=Ss,a=Ho=Ss=0;a<e;){var r=pn[a];pn[a++]=null;var c=pn[a];pn[a++]=null;var p=pn[a];pn[a++]=null;var x=pn[a];if(pn[a++]=null,c!==null&&p!==null){var A=c.pending;A===null?p.next=p:(p.next=A.next,A.next=p),c.pending=p}x!==0&&Go(r,p,x)}}function gr(e,a,r,c){pn[Ss++]=e,pn[Ss++]=a,pn[Ss++]=r,pn[Ss++]=c,Ho|=c,e.lanes|=c,e=e.alternate,e!==null&&(e.lanes|=c)}function pu(e,a,r,c){return gr(e,a,r,c),yu(e)}function jl(e,a){return gr(e,null,null,a),yu(e)}function Go(e,a,r){e.lanes|=r;var c=e.alternate;c!==null&&(c.lanes|=r);for(var p=!1,x=e.return;x!==null;)x.childLanes|=r,c=x.alternate,c!==null&&(c.childLanes|=r),x.tag===22&&(e=x.stateNode,e===null||e._visibility&1||(p=!0)),e=x,x=x.return;return e.tag===3?(x=e.stateNode,p&&a!==null&&(p=31-Yn(r),e=x.hiddenUpdates,c=e[p],c===null?e[p]=[a]:c.push(a),a.lane=r|536870912),x):null}function yu(e){if(50<js)throw js=0,qs=null,Error(l(185));for(var a=e.return;a!==null;)e=a,a=e.return;return e.tag===3?e.stateNode:null}var ql={};function Bd(e,a,r,c){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xn(e,a,r,c){return new Bd(e,a,r,c)}function Vn(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Si(e,a){var r=e.alternate;return r===null?(r=Xn(e.tag,a,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=a,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,a=e.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function On(e,a){e.flags&=65011714;var r=e.alternate;return r===null?(e.childLanes=0,e.lanes=a,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,a=r.dependencies,e.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),e}function vr(e,a,r,c,p,x){var A=0;if(c=e,typeof e=="function")Vn(e)&&(A=1);else if(typeof e=="string")A=YS(e,r,pt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else t:switch(e){case ct:return e=Xn(31,r,a,p),e.elementType=ct,e.lanes=x,e;case R:return Ii(r.children,p,x,a);case z:A=8,p|=24;break;case O:return e=Xn(12,r,a,p|2),e.elementType=O,e.lanes=x,e;case Z:return e=Xn(13,r,a,p),e.elementType=Z,e.lanes=x,e;case Q:return e=Xn(19,r,a,p),e.elementType=Q,e.lanes=x,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:A=10;break t;case B:A=9;break t;case G:A=11;break t;case K:A=14;break t;case gt:A=16,c=null;break t}A=29,r=Error(l(130,e===null?"null":typeof e,"")),c=null}return a=Xn(A,r,a,p),a.elementType=e,a.type=c,a.lanes=x,a}function Ii(e,a,r,c){return e=Xn(7,e,c,a),e.lanes=r,e}function jo(e,a,r){return e=Xn(6,e,null,a),e.lanes=r,e}function wd(e){var a=Xn(18,null,null,0);return a.stateNode=e,a}function ei(e,a,r){return a=Xn(4,e.children!==null?e.children:[],e.key,a),a.lanes=r,a.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},a}var bf=new WeakMap;function ta(e,a){if(typeof e=="object"&&e!==null){var r=bf.get(e);return r!==void 0?r:(a={value:e,source:a,stack:Ku(a)},bf.set(e,a),a)}return{value:e,source:a,stack:Ku(a)}}var ni=[],bs=0,xr=null,gu=0,xa=[],ea=0,bi=null,Ti=1,Ei="";function $i(e,a){ni[bs++]=gu,ni[bs++]=xr,xr=e,gu=a}function Tf(e,a,r){xa[ea++]=Ti,xa[ea++]=Ei,xa[ea++]=bi,bi=e;var c=Ti;e=Ei;var p=32-Yn(c)-1;c&=~(1<<p),r+=1;var x=32-Yn(a)+p;if(30<x){var A=p-p%5;x=(c&(1<<A)-1).toString(32),c>>=A,p-=A,Ti=1<<32-Yn(a)+p|r<<p|c,Ei=x+e}else Ti=1<<x|r<<p|c,Ei=e}function qo(e){e.return!==null&&($i(e,1),Tf(e,1,0))}function Yl(e){for(;e===xr;)xr=ni[--bs],ni[bs]=null,gu=ni[--bs],ni[bs]=null;for(;e===bi;)bi=xa[--ea],xa[ea]=null,Ei=xa[--ea],xa[ea]=null,Ti=xa[--ea],xa[ea]=null}function _r(e,a){xa[ea++]=Ti,xa[ea++]=Ei,xa[ea++]=bi,Ti=a.id,Ei=a.overflow,bi=e}var yn=null,Ee=null,$t=!1,tl=null,gn=!1,Yo=Error(l(519));function Ft(e){var a=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Sr(ta(a,e)),Yo}function Lo(e){var a=e.stateNode,r=e.type,c=e.memoizedProps;switch(a[Wt]=e,a[Rn]=c,r){case"dialog":te("cancel",a),te("close",a);break;case"iframe":case"object":case"embed":te("load",a);break;case"video":case"audio":for(r=0;r<ph.length;r++)te(ph[r],a);break;case"source":te("error",a);break;case"img":case"image":case"link":te("error",a),te("load",a);break;case"details":te("toggle",a);break;case"input":te("invalid",a),Fc(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":te("invalid",a);break;case"textarea":te("invalid",a),hs(a,c.value,c.defaultValue,c.children)}r=c.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||c.suppressHydrationWarning===!0||m0(a.textContent,r)?(c.popover!=null&&(te("beforetoggle",a),te("toggle",a)),c.onScroll!=null&&te("scroll",a),c.onScrollEnd!=null&&te("scrollend",a),c.onClick!=null&&(a.onclick=vi),a=!0):a=!1,a||Ft(e,!0)}function Hd(e){for(yn=e.return;yn;)switch(yn.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:yn=yn.return}}function Ts(e){if(e!==yn)return!1;if(!$t)return Hd(e),$t=!0,!1;var a=e.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Jp(e.type,e.memoizedProps)),r=!r),r&&Ee&&Ft(e),Hd(e),a===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ee=T0(e)}else if(a===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ee=T0(e)}else a===27?(a=Ee,Hu(e.type)?(e=$p,$p=null,Ee=e):Ee=a):Ee=yn?wi(e.stateNode.nextSibling):null;return!0}function Es(){Ee=yn=null,$t=!1}function Ef(){var e=tl;return e!==null&&(Gn===null?Gn=e:Gn.push.apply(Gn,e),tl=null),e}function Sr(e){tl===null?tl=[e]:tl.push(e)}var Cf=j(null),el=null,Nn=null;function nl(e,a,r){st(Cf,a._currentValue),a._currentValue=r}function La(e){e._currentValue=Cf.current,I(Cf)}function al(e,a,r){for(;e!==null;){var c=e.alternate;if((e.childLanes&a)!==a?(e.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),e===r)break;e=e.return}}function Xo(e,a,r,c){var p=e.child;for(p!==null&&(p.return=e);p!==null;){var x=p.dependencies;if(x!==null){var A=p.child;x=x.firstContext;t:for(;x!==null;){var D=x;x=p;for(var Y=0;Y<a.length;Y++)if(D.context===a[Y]){x.lanes|=r,D=x.alternate,D!==null&&(D.lanes|=r),al(x.return,r,e),c||(A=null);break t}x=D.next}}else if(p.tag===18){if(A=p.return,A===null)throw Error(l(341));A.lanes|=r,x=A.alternate,x!==null&&(x.lanes|=r),al(A,r,e),A=null}else A=p.child;if(A!==null)A.return=p;else for(A=p;A!==null;){if(A===e){A=null;break}if(p=A.sibling,p!==null){p.return=A.return,A=p;break}A=A.return}p=A}}function Ll(e,a,r,c){e=null;for(var p=a,x=!1;p!==null;){if(!x){if((p.flags&524288)!==0)x=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var A=p.alternate;if(A===null)throw Error(l(387));if(A=A.memoizedProps,A!==null){var D=p.type;Oe(p.pendingProps.value,A.value)||(e!==null?e.push(D):e=[D])}}else if(p===Bt.current){if(A=p.alternate,A===null)throw Error(l(387));A.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(e!==null?e.push(_h):e=[_h])}p=p.return}e!==null&&Xo(a,e,r,c),a.flags|=262144}function vu(e){for(e=e.firstContext;e!==null;){if(!Oe(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cs(e){el=e,Nn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function vn(e){return Af(el,e)}function br(e,a){return el===null&&Cs(e),Af(e,a)}function Af(e,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},Nn===null){if(e===null)throw Error(l(308));Nn=a,e.dependencies={lanes:0,firstContext:a},e.flags|=524288}else Nn=Nn.next=a;return r}var Gd=typeof AbortController<"u"?AbortController:function(){var e=[],a=this.signal={aborted:!1,addEventListener:function(r,c){e.push(c)}};this.abort=function(){a.aborted=!0,e.forEach(function(r){return r()})}},jd=i.unstable_scheduleCallback,Mf=i.unstable_NormalPriority,Mt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rf(){return{controller:new Gd,data:new Map,refCount:0}}function bn(e){e.refCount--,e.refCount===0&&jd(Mf,function(){e.controller.abort()})}var As=null,zf=0,il=0,ai=null;function xu(e,a){if(As===null){var r=As=[];zf=0,il=qp(),ai={status:"pending",value:void 0,then:function(c){r.push(c)}}}return zf++,a.then(Df,Df),a}function Df(){if(--zf===0&&As!==null){ai!==null&&(ai.status="fulfilled");var e=As;As=null,il=0,ai=null;for(var a=0;a<e.length;a++)(0,e[a])()}}function Of(e,a){var r=[],c={status:"pending",value:null,reason:null,then:function(p){r.push(p)}};return e.then(function(){c.status="fulfilled",c.value=a;for(var p=0;p<r.length;p++)(0,r[p])(a)},function(p){for(c.status="rejected",c.reason=p,p=0;p<r.length;p++)(0,r[p])(void 0)}),c}var qd=w.S;w.S=function(e,a){Uu=In(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&xu(e,a),qd!==null&&qd(e,a)};var Xl=j(null);function Ci(){var e=Xl.current;return e!==null?e:me.pooledCache}function _u(e,a){a===null?st(Xl,Xl.current):st(Xl,a.pool)}function Vo(){var e=Ci();return e===null?null:{parent:Mt._currentValue,pool:e}}var Vl=Error(l(460)),Tr=Error(l(474)),ii=Error(l(542)),Er={then:function(){}};function Yd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Nf(e,a,r){switch(r=e[r],r===void 0?e.push(a):r!==a&&(a.then(vi,vi),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Uf(e),e;default:if(typeof a.status=="string")a.then(vi,vi);else{if(e=me,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=a,e.status="pending",e.then(function(c){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=c}},function(c){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw e=a.reason,Uf(e),e}throw Nt=a,Vl}}function Ms(e){try{var a=e._init;return a(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Nt=r,Vl):r}}var Nt=null;function Qo(){if(Nt===null)throw Error(l(459));var e=Nt;return Nt=null,e}function Uf(e){if(e===Vl||e===ii)throw Error(l(483))}var Ql=null,Zl=0;function Zo(e){var a=Zl;return Zl+=1,Ql===null&&(Ql=[]),Nf(Ql,e,a)}function Cr(e,a){a=a.props.ref,e.ref=a!==void 0?a:null}function Ar(e,a){throw a.$$typeof===C?Error(l(525)):(e=Object.prototype.toString.call(a),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":e)))}function Su(e){function a(J,V){if(e){var W=J.deletions;W===null?(J.deletions=[V],J.flags|=16):W.push(V)}}function r(J,V){if(!e)return null;for(;V!==null;)a(J,V),V=V.sibling;return null}function c(J){for(var V=new Map;J!==null;)J.key!==null?V.set(J.key,J):V.set(J.index,J),J=J.sibling;return V}function p(J,V){return J=Si(J,V),J.index=0,J.sibling=null,J}function x(J,V,W){return J.index=W,e?(W=J.alternate,W!==null?(W=W.index,W<V?(J.flags|=67108866,V):W):(J.flags|=67108866,V)):(J.flags|=1048576,V)}function A(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function D(J,V,W,rt){return V===null||V.tag!==6?(V=jo(W,J.mode,rt),V.return=J,V):(V=p(V,W),V.return=J,V)}function Y(J,V,W,rt){var zt=W.type;return zt===R?lt(J,V,W.props.children,rt,W.key):V!==null&&(V.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===gt&&Ms(zt)===V.type)?(V=p(V,W.props),Cr(V,W),V.return=J,V):(V=vr(W.type,W.key,W.props,null,J.mode,rt),Cr(V,W),V.return=J,V)}function F(J,V,W,rt){return V===null||V.tag!==4||V.stateNode.containerInfo!==W.containerInfo||V.stateNode.implementation!==W.implementation?(V=ei(W,J.mode,rt),V.return=J,V):(V=p(V,W.children||[]),V.return=J,V)}function lt(J,V,W,rt,zt){return V===null||V.tag!==7?(V=Ii(W,J.mode,rt,zt),V.return=J,V):(V=p(V,W),V.return=J,V)}function ot(J,V,W){if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return V=jo(""+V,J.mode,W),V.return=J,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case E:return W=vr(V.type,V.key,V.props,null,J.mode,W),Cr(W,V),W.return=J,W;case M:return V=ei(V,J.mode,W),V.return=J,V;case gt:return V=Ms(V),ot(J,V,W)}if(Dt(V)||vt(V))return V=Ii(V,J.mode,W,null),V.return=J,V;if(typeof V.then=="function")return ot(J,Zo(V),W);if(V.$$typeof===U)return ot(J,br(J,V),W);Ar(J,V)}return null}function tt(J,V,W,rt){var zt=V!==null?V.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return zt!==null?null:D(J,V,""+W,rt);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===zt?Y(J,V,W,rt):null;case M:return W.key===zt?F(J,V,W,rt):null;case gt:return W=Ms(W),tt(J,V,W,rt)}if(Dt(W)||vt(W))return zt!==null?null:lt(J,V,W,rt,null);if(typeof W.then=="function")return tt(J,V,Zo(W),rt);if(W.$$typeof===U)return tt(J,V,br(J,W),rt);Ar(J,W)}return null}function it(J,V,W,rt,zt){if(typeof rt=="string"&&rt!==""||typeof rt=="number"||typeof rt=="bigint")return J=J.get(W)||null,D(V,J,""+rt,zt);if(typeof rt=="object"&&rt!==null){switch(rt.$$typeof){case E:return J=J.get(rt.key===null?W:rt.key)||null,Y(V,J,rt,zt);case M:return J=J.get(rt.key===null?W:rt.key)||null,F(V,J,rt,zt);case gt:return rt=Ms(rt),it(J,V,W,rt,zt)}if(Dt(rt)||vt(rt))return J=J.get(W)||null,lt(V,J,rt,zt,null);if(typeof rt.then=="function")return it(J,V,W,Zo(rt),zt);if(rt.$$typeof===U)return it(J,V,W,br(V,rt),zt);Ar(V,rt)}return null}function Et(J,V,W,rt){for(var zt=null,ye=null,Ct=V,Kt=V=0,ae=null;Ct!==null&&Kt<W.length;Kt++){Ct.index>Kt?(ae=Ct,Ct=null):ae=Ct.sibling;var ge=tt(J,Ct,W[Kt],rt);if(ge===null){Ct===null&&(Ct=ae);break}e&&Ct&&ge.alternate===null&&a(J,Ct),V=x(ge,V,Kt),ye===null?zt=ge:ye.sibling=ge,ye=ge,Ct=ae}if(Kt===W.length)return r(J,Ct),$t&&$i(J,Kt),zt;if(Ct===null){for(;Kt<W.length;Kt++)Ct=ot(J,W[Kt],rt),Ct!==null&&(V=x(Ct,V,Kt),ye===null?zt=Ct:ye.sibling=Ct,ye=Ct);return $t&&$i(J,Kt),zt}for(Ct=c(Ct);Kt<W.length;Kt++)ae=it(Ct,J,Kt,W[Kt],rt),ae!==null&&(e&&ae.alternate!==null&&Ct.delete(ae.key===null?Kt:ae.key),V=x(ae,V,Kt),ye===null?zt=ae:ye.sibling=ae,ye=ae);return e&&Ct.forEach(function(Lu){return a(J,Lu)}),$t&&$i(J,Kt),zt}function wt(J,V,W,rt){if(W==null)throw Error(l(151));for(var zt=null,ye=null,Ct=V,Kt=V=0,ae=null,ge=W.next();Ct!==null&&!ge.done;Kt++,ge=W.next()){Ct.index>Kt?(ae=Ct,Ct=null):ae=Ct.sibling;var Lu=tt(J,Ct,ge.value,rt);if(Lu===null){Ct===null&&(Ct=ae);break}e&&Ct&&Lu.alternate===null&&a(J,Ct),V=x(Lu,V,Kt),ye===null?zt=Lu:ye.sibling=Lu,ye=Lu,Ct=ae}if(ge.done)return r(J,Ct),$t&&$i(J,Kt),zt;if(Ct===null){for(;!ge.done;Kt++,ge=W.next())ge=ot(J,ge.value,rt),ge!==null&&(V=x(ge,V,Kt),ye===null?zt=ge:ye.sibling=ge,ye=ge);return $t&&$i(J,Kt),zt}for(Ct=c(Ct);!ge.done;Kt++,ge=W.next())ge=it(Ct,J,Kt,ge.value,rt),ge!==null&&(e&&ge.alternate!==null&&Ct.delete(ge.key===null?Kt:ge.key),V=x(ge,V,Kt),ye===null?zt=ge:ye.sibling=ge,ye=ge);return e&&Ct.forEach(function(FS){return a(J,FS)}),$t&&$i(J,Kt),zt}function Me(J,V,W,rt){if(typeof W=="object"&&W!==null&&W.type===R&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:t:{for(var zt=W.key;V!==null;){if(V.key===zt){if(zt=W.type,zt===R){if(V.tag===7){r(J,V.sibling),rt=p(V,W.props.children),rt.return=J,J=rt;break t}}else if(V.elementType===zt||typeof zt=="object"&&zt!==null&&zt.$$typeof===gt&&Ms(zt)===V.type){r(J,V.sibling),rt=p(V,W.props),Cr(rt,W),rt.return=J,J=rt;break t}r(J,V);break}else a(J,V);V=V.sibling}W.type===R?(rt=Ii(W.props.children,J.mode,rt,W.key),rt.return=J,J=rt):(rt=vr(W.type,W.key,W.props,null,J.mode,rt),Cr(rt,W),rt.return=J,J=rt)}return A(J);case M:t:{for(zt=W.key;V!==null;){if(V.key===zt)if(V.tag===4&&V.stateNode.containerInfo===W.containerInfo&&V.stateNode.implementation===W.implementation){r(J,V.sibling),rt=p(V,W.children||[]),rt.return=J,J=rt;break t}else{r(J,V);break}else a(J,V);V=V.sibling}rt=ei(W,J.mode,rt),rt.return=J,J=rt}return A(J);case gt:return W=Ms(W),Me(J,V,W,rt)}if(Dt(W))return Et(J,V,W,rt);if(vt(W)){if(zt=vt(W),typeof zt!="function")throw Error(l(150));return W=zt.call(W),wt(J,V,W,rt)}if(typeof W.then=="function")return Me(J,V,Zo(W),rt);if(W.$$typeof===U)return Me(J,V,br(J,W),rt);Ar(J,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,V!==null&&V.tag===6?(r(J,V.sibling),rt=p(V,W),rt.return=J,J=rt):(r(J,V),rt=jo(W,J.mode,rt),rt.return=J,J=rt),A(J)):r(J,V)}return function(J,V,W,rt){try{Zl=0;var zt=Me(J,V,W,rt);return Ql=null,zt}catch(Ct){if(Ct===Vl||Ct===ii)throw Ct;var ye=Xn(29,Ct,null,J.mode);return ye.lanes=rt,ye.return=J,ye}finally{}}}var Rs=Su(!0),Ld=Su(!1),Kl=!1;function Bf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wf(e,a){e=e.updateQueue,a.updateQueue===e&&(a.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ai(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ll(e,a,r){var c=e.updateQueue;if(c===null)return null;if(c=c.shared,(ee&2)!==0){var p=c.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),c.pending=a,a=yu(e),Go(e,null,r),a}return gr(e,c,a,r),yu(e)}function kl(e,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var c=a.lanes;c&=e.pendingLanes,r|=c,a.lanes=r,ro(e,r)}}function Ko(e,a){var r=e.updateQueue,c=e.alternate;if(c!==null&&(c=c.updateQueue,r===c)){var p=null,x=null;if(r=r.firstBaseUpdate,r!==null){do{var A={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};x===null?p=x=A:x=x.next=A,r=r.next}while(r!==null);x===null?p=x=a:x=x.next=a}else p=x=a;r={baseState:c.baseState,firstBaseUpdate:p,lastBaseUpdate:x,shared:c.shared,callbacks:c.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=a:e.next=a,r.lastBaseUpdate=a}var Hf=!1;function Mr(){if(Hf){var e=ai;if(e!==null)throw e}}function zs(e,a,r,c){Hf=!1;var p=e.updateQueue;Kl=!1;var x=p.firstBaseUpdate,A=p.lastBaseUpdate,D=p.shared.pending;if(D!==null){p.shared.pending=null;var Y=D,F=Y.next;Y.next=null,A===null?x=F:A.next=F,A=Y;var lt=e.alternate;lt!==null&&(lt=lt.updateQueue,D=lt.lastBaseUpdate,D!==A&&(D===null?lt.firstBaseUpdate=F:D.next=F,lt.lastBaseUpdate=Y))}if(x!==null){var ot=p.baseState;A=0,lt=F=Y=null,D=x;do{var tt=D.lane&-536870913,it=tt!==D.lane;if(it?(It&tt)===tt:(c&tt)===tt){tt!==0&&tt===il&&(Hf=!0),lt!==null&&(lt=lt.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});t:{var Et=e,wt=D;tt=a;var Me=r;switch(wt.tag){case 1:if(Et=wt.payload,typeof Et=="function"){ot=Et.call(Me,ot,tt);break t}ot=Et;break t;case 3:Et.flags=Et.flags&-65537|128;case 0:if(Et=wt.payload,tt=typeof Et=="function"?Et.call(Me,ot,tt):Et,tt==null)break t;ot=b({},ot,tt);break t;case 2:Kl=!0}}tt=D.callback,tt!==null&&(e.flags|=64,it&&(e.flags|=8192),it=p.callbacks,it===null?p.callbacks=[tt]:it.push(tt))}else it={lane:tt,tag:D.tag,payload:D.payload,callback:D.callback,next:null},lt===null?(F=lt=it,Y=ot):lt=lt.next=it,A|=tt;if(D=D.next,D===null){if(D=p.shared.pending,D===null)break;it=D,D=it.next,it.next=null,p.lastBaseUpdate=it,p.shared.pending=null}}while(!0);lt===null&&(Y=ot),p.baseState=Y,p.firstBaseUpdate=F,p.lastBaseUpdate=lt,x===null&&(p.shared.lanes=0),Da|=A,e.lanes=A,e.memoizedState=ot}}function Mi(e,a){if(typeof e!="function")throw Error(l(191,e));e.call(a)}function Tn(e,a){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)Mi(r[e],a)}var _a=j(null),Qn=j(0);function Gf(e,a){e=Je,st(Qn,e),st(_a,a),Je=e|a.baseLanes}function jf(){st(Qn,Je),st(_a,_a.current)}function Un(){Je=Qn.current,I(_a),I(Qn)}var cn=j(null),Xa=null;function Jl(e){var a=e.alternate;st(Ge,Ge.current&1),st(cn,e),Xa===null&&(a===null||_a.current!==null||a.memoizedState!==null)&&(Xa=e)}function qf(e){st(Ge,Ge.current),st(cn,e),Xa===null&&(Xa=e)}function Xd(e){e.tag===22?(st(Ge,Ge.current),st(cn,e),Xa===null&&(Xa=e)):sl()}function sl(){st(Ge,Ge.current),st(cn,cn.current)}function Sa(e){I(cn),Xa===e&&(Xa=null),I(Ge)}var Ge=j(0);function ko(e){for(var a=e;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Fp(r)||Ip(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var na=0,Ht=null,_e=null,tn=null,Jo=!1,Ri=!1,Ds=!1,Po=0,Rr=0,zi=null,zp=0;function je(){throw Error(l(321))}function Yf(e,a){if(a===null)return!1;for(var r=0;r<a.length&&r<e.length;r++)if(!Oe(e[r],a[r]))return!1;return!0}function Lf(e,a,r,c,p,x){return na=x,Ht=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,w.H=e===null||e.memoizedState===null?rm:Eu,Ds=!1,x=r(c,p),Ds=!1,Ri&&(x=Qd(a,r,c,p)),Vd(e),x}function Vd(e){w.H=Ur;var a=_e!==null&&_e.next!==null;if(na=0,tn=_e=Ht=null,Jo=!1,Rr=0,zi=null,a)throw Error(l(300));e===null||Ne||(e=e.dependencies,e!==null&&vu(e)&&(Ne=!0))}function Qd(e,a,r,c){Ht=e;var p=0;do{if(Ri&&(zi=null),Rr=0,Ri=!1,25<=p)throw Error(l(301));if(p+=1,tn=_e=null,e.updateQueue!=null){var x=e.updateQueue;x.lastEffect=null,x.events=null,x.stores=null,x.memoCache!=null&&(x.memoCache.index=0)}w.H=Br,x=a(r,c)}while(Ri);return x}function Dp(){var e=w.H,a=e.useState()[0];return a=typeof a.then=="function"?Dr(a):a,e=e.useState()[0],(_e!==null?_e.memoizedState:null)!==e&&(Ht.flags|=1024),a}function Xf(){var e=Po!==0;return Po=0,e}function Vf(e,a,r){a.updateQueue=e.updateQueue,a.flags&=-2053,e.lanes&=~r}function Qf(e){if(Jo){for(e=e.memoizedState;e!==null;){var a=e.queue;a!==null&&(a.pending=null),e=e.next}Jo=!1}na=0,tn=_e=Ht=null,Ri=!1,Rr=Po=0,zi=null}function Zn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tn===null?Ht.memoizedState=tn=e:tn=tn.next=e,tn}function Qe(){if(_e===null){var e=Ht.alternate;e=e!==null?e.memoizedState:null}else e=_e.next;var a=tn===null?Ht.memoizedState:tn.next;if(a!==null)tn=a,_e=e;else{if(e===null)throw Ht.alternate===null?Error(l(467)):Error(l(310));_e=e,e={memoizedState:_e.memoizedState,baseState:_e.baseState,baseQueue:_e.baseQueue,queue:_e.queue,next:null},tn===null?Ht.memoizedState=tn=e:tn=tn.next=e}return tn}function zr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Dr(e){var a=Rr;return Rr+=1,zi===null&&(zi=[]),e=Nf(zi,e,a),a=Ht,(tn===null?a.memoizedState:tn.next)===null&&(a=a.alternate,w.H=a===null||a.memoizedState===null?rm:Eu),e}function Wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Dr(e);if(e.$$typeof===U)return vn(e)}throw Error(l(438,String(e)))}function Zf(e){var a=null,r=Ht.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var c=Ht.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(p){return p.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),r===null&&(r=zr(),Ht.updateQueue=r),r.memoCache=a,r=a.data[a.index],r===void 0)for(r=a.data[a.index]=Array(e),c=0;c<e;c++)r[c]=ht;return a.index++,r}function ul(e,a){return typeof a=="function"?a(e):a}function Fo(e){var a=Qe();return Kf(a,_e,e)}function Kf(e,a,r){var c=e.queue;if(c===null)throw Error(l(311));c.lastRenderedReducer=r;var p=e.baseQueue,x=c.pending;if(x!==null){if(p!==null){var A=p.next;p.next=x.next,x.next=A}a.baseQueue=p=x,c.pending=null}if(x=e.baseState,p===null)e.memoizedState=x;else{a=p.next;var D=A=null,Y=null,F=a,lt=!1;do{var ot=F.lane&-536870913;if(ot!==F.lane?(It&ot)===ot:(na&ot)===ot){var tt=F.revertLane;if(tt===0)Y!==null&&(Y=Y.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),ot===il&&(lt=!0);else if((na&tt)===tt){F=F.next,tt===il&&(lt=!0);continue}else ot={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(D=Y=ot,A=x):Y=Y.next=ot,Ht.lanes|=tt,Da|=tt;ot=F.action,Ds&&r(x,ot),x=F.hasEagerState?F.eagerState:r(x,ot)}else tt={lane:ot,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},Y===null?(D=Y=tt,A=x):Y=Y.next=tt,Ht.lanes|=ot,Da|=ot;F=F.next}while(F!==null&&F!==a);if(Y===null?A=x:Y.next=D,!Oe(x,e.memoizedState)&&(Ne=!0,lt&&(r=ai,r!==null)))throw r;e.memoizedState=x,e.baseState=A,e.baseQueue=Y,c.lastRenderedState=x}return p===null&&(c.lanes=0),[e.memoizedState,c.dispatch]}function Io(e){var a=Qe(),r=a.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=e;var c=r.dispatch,p=r.pending,x=a.memoizedState;if(p!==null){r.pending=null;var A=p=p.next;do x=e(x,A.action),A=A.next;while(A!==p);Oe(x,a.memoizedState)||(Ne=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),r.lastRenderedState=x}return[x,c]}function kf(e,a,r){var c=Ht,p=Qe(),x=$t;if(x){if(r===void 0)throw Error(l(407));r=r()}else r=a();var A=!Oe((_e||p).memoizedState,r);if(A&&(p.memoizedState=r,Ne=!0),p=p.queue,If(Pf.bind(null,c,p,e),[e]),p.getSnapshot!==a||A||tn!==null&&tn.memoizedState.tag&1){if(c.flags|=2048,bu(9,{destroy:void 0},Jf.bind(null,c,p,r,a),null),me===null)throw Error(l(349));x||(na&127)!==0||Zd(c,a,r)}return r}function Zd(e,a,r){e.flags|=16384,e={getSnapshot:a,value:r},a=Ht.updateQueue,a===null?(a=zr(),Ht.updateQueue=a,a.stores=[e]):(r=a.stores,r===null?a.stores=[e]:r.push(e))}function Jf(e,a,r,c){a.value=r,a.getSnapshot=c,Wf(a)&&$o(e)}function Pf(e,a,r){return r(function(){Wf(a)&&$o(e)})}function Wf(e){var a=e.getSnapshot;e=e.value;try{var r=a();return!Oe(e,r)}catch{return!0}}function $o(e){var a=jl(e,2);a!==null&&u(a,e,2)}function Or(e){var a=Zn();if(typeof e=="function"){var r=e;if(e=r(),Ds){Ya(!0);try{r()}finally{Ya(!1)}}}return a.memoizedState=a.baseState=e,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:e},a}function Kd(e,a,r,c){return e.baseState=r,Kf(e,_e,typeof c=="function"?c:ul)}function Op(e,a,r,c,p){if(rl(e))throw Error(l(485));if(e=a.action,e!==null){var x={payload:p,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){x.listeners.push(A)}};w.T!==null?r(!0):x.isTransition=!1,c(x),r=a.pending,r===null?(x.next=a.pending=x,kd(a,x)):(x.next=r.next,a.pending=r.next=x)}}function kd(e,a){var r=a.action,c=a.payload,p=e.state;if(a.isTransition){var x=w.T,A={};w.T=A;try{var D=r(p,c),Y=w.S;Y!==null&&Y(A,D),Jd(e,a,D)}catch(F){tc(e,a,F)}finally{x!==null&&A.types!==null&&(x.types=A.types),w.T=x}}else try{x=r(p,c),Jd(e,a,x)}catch(F){tc(e,a,F)}}function Jd(e,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(c){Ff(e,a,c)},function(c){return tc(e,a,c)}):Ff(e,a,r)}function Ff(e,a,r){a.status="fulfilled",a.value=r,Pd(a),e.state=r,a=e.pending,a!==null&&(r=a.next,r===a?e.pending=null:(r=r.next,a.next=r,kd(e,r)))}function tc(e,a,r){var c=e.pending;if(e.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=r,Pd(a),a=a.next;while(a!==c)}e.action=null}function Pd(e){e=e.listeners;for(var a=0;a<e.length;a++)(0,e[a])()}function Wd(e,a){return a}function Fd(e,a){if($t){var r=me.formState;if(r!==null){t:{var c=Ht;if($t){if(Ee){e:{for(var p=Ee,x=gn;p.nodeType!==8;){if(!x){p=null;break e}if(p=wi(p.nextSibling),p===null){p=null;break e}}x=p.data,p=x==="F!"||x==="F"?p:null}if(p){Ee=wi(p.nextSibling),c=p.data==="F!";break t}}Ft(c)}c=!1}c&&(a=r[0])}}return r=Zn(),r.memoizedState=r.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wd,lastRenderedState:a},r.queue=c,r=um.bind(null,Ht,c),c.dispatch=r,c=Or(!1),x=Nr.bind(null,Ht,!1,c.queue),c=Zn(),p={state:a,dispatch:null,action:e,pending:null},c.queue=p,r=Op.bind(null,Ht,p,x,r),p.dispatch=r,c.memoizedState=e,[a,r,!1]}function Id(e){var a=Qe();return $d(a,_e,e)}function $d(e,a,r){if(a=Kf(e,a,Wd)[0],e=Fo(ul)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=Dr(a)}catch(A){throw A===Vl?ii:A}else c=a;a=Qe();var p=a.queue,x=p.dispatch;return r!==a.memoizedState&&(Ht.flags|=2048,bu(9,{destroy:void 0},Np.bind(null,p,r),null)),[c,x,e]}function Np(e,a){e.action=a}function tm(e){var a=Qe(),r=_e;if(r!==null)return $d(a,r,e);Qe(),a=a.memoizedState,r=Qe();var c=r.queue.dispatch;return r.memoizedState=e,[a,c,!1]}function bu(e,a,r,c){return e={tag:e,create:r,deps:c,inst:a,next:null},a=Ht.updateQueue,a===null&&(a=zr(),Ht.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=e.next=e:(c=r.next,r.next=e,e.next=c,a.lastEffect=e),e}function em(){return Qe().memoizedState}function ec(e,a,r,c){var p=Zn();Ht.flags|=e,p.memoizedState=bu(1|a,{destroy:void 0},r,c===void 0?null:c)}function nc(e,a,r,c){var p=Qe();c=c===void 0?null:c;var x=p.memoizedState.inst;_e!==null&&c!==null&&Yf(c,_e.memoizedState.deps)?p.memoizedState=bu(a,x,r,c):(Ht.flags|=e,p.memoizedState=bu(1|a,x,r,c))}function nm(e,a){ec(8390656,8,e,a)}function If(e,a){nc(2048,8,e,a)}function am(e){Ht.flags|=4;var a=Ht.updateQueue;if(a===null)a=zr(),Ht.updateQueue=a,a.events=[e];else{var r=a.events;r===null?a.events=[e]:r.push(e)}}function im(e){var a=Qe().memoizedState;return am({ref:a,nextImpl:e}),function(){if((ee&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}function lm(e,a){return nc(4,2,e,a)}function ba(e,a){return nc(4,4,e,a)}function $f(e,a){if(typeof a=="function"){e=e();var r=a(e);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return e=e(),a.current=e,function(){a.current=null}}function ac(e,a,r){r=r!=null?r.concat([e]):null,nc(4,4,$f.bind(null,a,e),r)}function ic(){}function th(e,a){var r=Qe();a=a===void 0?null:a;var c=r.memoizedState;return a!==null&&Yf(a,c[1])?c[0]:(r.memoizedState=[e,a],e)}function eh(e,a){var r=Qe();a=a===void 0?null:a;var c=r.memoizedState;if(a!==null&&Yf(a,c[1]))return c[0];if(c=e(),Ds){Ya(!0);try{e()}finally{Ya(!1)}}return r.memoizedState=[c,a],c}function nh(e,a,r){return r===void 0||(na&1073741824)!==0&&(It&261930)===0?e.memoizedState=a:(e.memoizedState=r,e=s(),Ht.lanes|=e,Da|=e,r)}function ah(e,a,r,c){return Oe(r,a)?r:_a.current!==null?(e=nh(e,r,c),Oe(e,a)||(Ne=!0),e):(na&42)===0||(na&1073741824)!==0&&(It&261930)===0?(Ne=!0,e.memoizedState=r):(e=s(),Ht.lanes|=e,Da|=e,a)}function ih(e,a,r,c,p){var x=H.p;H.p=x!==0&&8>x?x:8;var A=w.T,D={};w.T=D,Nr(e,!1,a,r);try{var Y=p(),F=w.S;if(F!==null&&F(D,Y),Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var lt=Of(Y,c);Tu(e,a,lt,kn(e))}else Tu(e,a,c,kn(e))}catch(ot){Tu(e,a,{then:function(){},status:"rejected",reason:ot},kn())}finally{H.p=x,A!==null&&D.types!==null&&(A.types=D.types),w.T=A}}function Up(){}function lh(e,a,r,c){if(e.tag!==5)throw Error(l(476));var p=sm(e).queue;ih(e,p,a,at,r===null?Up:function(){return sh(e),r(c)})}function sm(e){var a=e.memoizedState;if(a!==null)return a;a={memoizedState:at,baseState:at,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:at},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ul,lastRenderedState:r},next:null},e.memoizedState=a,e=e.alternate,e!==null&&(e.memoizedState=a),a}function sh(e){var a=sm(e);a.next===null&&(a=e.alternate.memoizedState),Tu(e,a.next.queue,{},kn())}function uh(){return vn(_h)}function En(){return Qe().memoizedState}function rh(){return Qe().memoizedState}function Bp(e){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var r=kn();e=Ai(r);var c=ll(a,e,r);c!==null&&(u(c,a,r),kl(c,a,r)),a={cache:Rf()},e.payload=a;return}a=a.return}}function wp(e,a,r){var c=kn();r={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},rl(e)?Os(a,r):(r=pu(e,a,r,c),r!==null&&(u(r,e,c),aa(r,a,c)))}function um(e,a,r){var c=kn();Tu(e,a,r,c)}function Tu(e,a,r,c){var p={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(rl(e))Os(a,p);else{var x=e.alternate;if(e.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var A=a.lastRenderedState,D=x(A,r);if(p.hasEagerState=!0,p.eagerState=D,Oe(D,A))return gr(e,a,p,0),me===null&&Gl(),!1}catch{}finally{}if(r=pu(e,a,p,c),r!==null)return u(r,e,c),aa(r,a,c),!0}return!1}function Nr(e,a,r,c){if(c={lane:2,revertLane:qp(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},rl(e)){if(a)throw Error(l(479))}else a=pu(e,r,c,2),a!==null&&u(a,e,2)}function rl(e){var a=e.alternate;return e===Ht||a!==null&&a===Ht}function Os(e,a){Ri=Jo=!0;var r=e.pending;r===null?a.next=a:(a.next=r.next,r.next=a),e.pending=a}function aa(e,a,r){if((r&4194048)!==0){var c=a.lanes;c&=e.pendingLanes,r|=c,a.lanes=r,ro(e,r)}}var Ur={readContext:vn,use:Wo,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useLayoutEffect:je,useInsertionEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useSyncExternalStore:je,useId:je,useHostTransitionStatus:je,useFormState:je,useActionState:je,useOptimistic:je,useMemoCache:je,useCacheRefresh:je};Ur.useEffectEvent=je;var rm={readContext:vn,use:Wo,useCallback:function(e,a){return Zn().memoizedState=[e,a===void 0?null:a],e},useContext:vn,useEffect:nm,useImperativeHandle:function(e,a,r){r=r!=null?r.concat([e]):null,ec(4194308,4,$f.bind(null,a,e),r)},useLayoutEffect:function(e,a){return ec(4194308,4,e,a)},useInsertionEffect:function(e,a){ec(4,2,e,a)},useMemo:function(e,a){var r=Zn();a=a===void 0?null:a;var c=e();if(Ds){Ya(!0);try{e()}finally{Ya(!1)}}return r.memoizedState=[c,a],c},useReducer:function(e,a,r){var c=Zn();if(r!==void 0){var p=r(a);if(Ds){Ya(!0);try{r(a)}finally{Ya(!1)}}}else p=a;return c.memoizedState=c.baseState=p,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:p},c.queue=e,e=e.dispatch=wp.bind(null,Ht,e),[c.memoizedState,e]},useRef:function(e){var a=Zn();return e={current:e},a.memoizedState=e},useState:function(e){e=Or(e);var a=e.queue,r=um.bind(null,Ht,a);return a.dispatch=r,[e.memoizedState,r]},useDebugValue:ic,useDeferredValue:function(e,a){var r=Zn();return nh(r,e,a)},useTransition:function(){var e=Or(!1);return e=ih.bind(null,Ht,e.queue,!0,!1),Zn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,a,r){var c=Ht,p=Zn();if($t){if(r===void 0)throw Error(l(407));r=r()}else{if(r=a(),me===null)throw Error(l(349));(It&127)!==0||Zd(c,a,r)}p.memoizedState=r;var x={value:r,getSnapshot:a};return p.queue=x,nm(Pf.bind(null,c,x,e),[e]),c.flags|=2048,bu(9,{destroy:void 0},Jf.bind(null,c,x,r,a),null),r},useId:function(){var e=Zn(),a=me.identifierPrefix;if($t){var r=Ei,c=Ti;r=(c&~(1<<32-Yn(c)-1)).toString(32)+r,a="_"+a+"R_"+r,r=Po++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=zp++,a="_"+a+"r_"+r.toString(32)+"_";return e.memoizedState=a},useHostTransitionStatus:uh,useFormState:Fd,useActionState:Fd,useOptimistic:function(e){var a=Zn();a.memoizedState=a.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=r,a=Nr.bind(null,Ht,!0,r),r.dispatch=a,[e,a]},useMemoCache:Zf,useCacheRefresh:function(){return Zn().memoizedState=Bp.bind(null,Ht)},useEffectEvent:function(e){var a=Zn(),r={impl:e};return a.memoizedState=r,function(){if((ee&2)!==0)throw Error(l(440));return r.impl.apply(void 0,arguments)}}},Eu={readContext:vn,use:Wo,useCallback:th,useContext:vn,useEffect:If,useImperativeHandle:ac,useInsertionEffect:lm,useLayoutEffect:ba,useMemo:eh,useReducer:Fo,useRef:em,useState:function(){return Fo(ul)},useDebugValue:ic,useDeferredValue:function(e,a){var r=Qe();return ah(r,_e.memoizedState,e,a)},useTransition:function(){var e=Fo(ul)[0],a=Qe().memoizedState;return[typeof e=="boolean"?e:Dr(e),a]},useSyncExternalStore:kf,useId:En,useHostTransitionStatus:uh,useFormState:Id,useActionState:Id,useOptimistic:function(e,a){var r=Qe();return Kd(r,_e,e,a)},useMemoCache:Zf,useCacheRefresh:rh};Eu.useEffectEvent=im;var Br={readContext:vn,use:Wo,useCallback:th,useContext:vn,useEffect:If,useImperativeHandle:ac,useInsertionEffect:lm,useLayoutEffect:ba,useMemo:eh,useReducer:Io,useRef:em,useState:function(){return Io(ul)},useDebugValue:ic,useDeferredValue:function(e,a){var r=Qe();return _e===null?nh(r,e,a):ah(r,_e.memoizedState,e,a)},useTransition:function(){var e=Io(ul)[0],a=Qe().memoizedState;return[typeof e=="boolean"?e:Dr(e),a]},useSyncExternalStore:kf,useId:En,useHostTransitionStatus:uh,useFormState:tm,useActionState:tm,useOptimistic:function(e,a){var r=Qe();return _e!==null?Kd(r,_e,e,a):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Zf,useCacheRefresh:rh};Br.useEffectEvent=im;function Cu(e,a,r,c){a=e.memoizedState,r=r(c,a),r=r==null?a:b({},a,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var wr={enqueueSetState:function(e,a,r){e=e._reactInternals;var c=kn(),p=Ai(c);p.payload=a,r!=null&&(p.callback=r),a=ll(e,p,c),a!==null&&(u(a,e,c),kl(a,e,c))},enqueueReplaceState:function(e,a,r){e=e._reactInternals;var c=kn(),p=Ai(c);p.tag=1,p.payload=a,r!=null&&(p.callback=r),a=ll(e,p,c),a!==null&&(u(a,e,c),kl(a,e,c))},enqueueForceUpdate:function(e,a){e=e._reactInternals;var r=kn(),c=Ai(r);c.tag=2,a!=null&&(c.callback=a),a=ll(e,c,r),a!==null&&(u(a,e,r),kl(a,e,r))}};function om(e,a,r,c,p,x,A){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(c,x,A):a.prototype&&a.prototype.isPureReactComponent?!ou(r,c)||!ou(p,x):!0}function cm(e,a,r,c){e=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,c),a.state!==e&&wr.enqueueReplaceState(a,a.state,null)}function Cn(e,a){var r=a;if("ref"in a){r={};for(var c in a)c!=="ref"&&(r[c]=a[c])}if(e=e.defaultProps){r===a&&(r=b({},r));for(var p in e)r[p]===void 0&&(r[p]=e[p])}return r}function oh(e){Hl(e)}function fm(e){console.error(e)}function lc(e){Hl(e)}function sc(e,a){try{var r=e.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function hm(e,a,r){try{var c=e.onCaughtError;c(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function ch(e,a,r){return r=Ai(r),r.tag=3,r.payload={element:null},r.callback=function(){sc(e,a)},r}function Au(e){return e=Ai(e),e.tag=3,e}function ia(e,a,r,c){var p=r.type.getDerivedStateFromError;if(typeof p=="function"){var x=c.value;e.payload=function(){return p(x)},e.callback=function(){hm(a,r,c)}}var A=r.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(e.callback=function(){hm(a,r,c),typeof p!="function"&&(Bi===null?Bi=new Set([this]):Bi.add(this));var D=c.stack;this.componentDidCatch(c.value,{componentStack:D!==null?D:""})})}function Ta(e,a,r,c,p){if(r.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=r.alternate,a!==null&&Ll(a,r,p,!0),r=cn.current,r!==null){switch(r.tag){case 31:case 13:return Xa===null?qt():r.alternate===null&&pe===0&&(pe=3),r.flags&=-257,r.flags|=65536,r.lanes=p,c===Er?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([c]):a.add(c),Hp(e,c,p)),!1;case 22:return r.flags|=65536,c===Er?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([c]):r.add(c)),Hp(e,c,p)),!1}throw Error(l(435,r.tag))}return Hp(e,c,p),qt(),!1}if($t)return a=cn.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,c!==Yo&&(e=Error(l(422),{cause:c}),Sr(ta(e,r)))):(c!==Yo&&(a=Error(l(423),{cause:c}),Sr(ta(a,r))),e=e.current.alternate,e.flags|=65536,p&=-p,e.lanes|=p,c=ta(c,r),p=ch(e.stateNode,c,p),Ko(e,p),pe!==4&&(pe=2)),!1;var x=Error(l(520),{cause:c});if(x=ta(x,r),oi===null?oi=[x]:oi.push(x),pe!==4&&(pe=2),a===null)return!0;c=ta(c,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,e=p&-p,r.lanes|=e,e=ch(r.stateNode,c,e),Ko(r,e),!1;case 1:if(a=r.type,x=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Bi===null||!Bi.has(x))))return r.flags|=65536,p&=-p,r.lanes|=p,p=Au(p),ia(p,e,r,c),Ko(r,p),!1}r=r.return}while(r!==null);return!1}var uc=Error(l(461)),Ne=!1;function qe(e,a,r,c){a.child=e===null?Ld(a,null,r,c):Rs(a,e.child,r,c)}function Hr(e,a,r,c,p){r=r.render;var x=a.ref;if("ref"in c){var A={};for(var D in c)D!=="ref"&&(A[D]=c[D])}else A=c;return Cs(a),c=Lf(e,a,r,A,x,p),D=Xf(),e!==null&&!Ne?(Vf(e,a,p),ui(e,a,p)):($t&&D&&qo(a),a.flags|=1,qe(e,a,c,p),a.child)}function Gr(e,a,r,c,p){if(e===null){var x=r.type;return typeof x=="function"&&!Vn(x)&&x.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=x,Ea(e,a,x,c,p)):(e=vr(r.type,null,c,a,a.mode,p),e.ref=a.ref,e.return=a,a.child=e)}if(x=e.child,!Wl(e,p)){var A=x.memoizedProps;if(r=r.compare,r=r!==null?r:ou,r(A,c)&&e.ref===a.ref)return ui(e,a,p)}return a.flags|=1,e=Si(x,c),e.ref=a.ref,e.return=a,a.child=e}function Ea(e,a,r,c,p){if(e!==null){var x=e.memoizedProps;if(ou(x,c)&&e.ref===a.ref)if(Ne=!1,a.pendingProps=c=x,Wl(e,p))(e.flags&131072)!==0&&(Ne=!0);else return a.lanes=e.lanes,ui(e,a,p)}return Mu(e,a,r,c,p)}function Ca(e,a,r,c){var p=c.children,x=e!==null?e.memoizedState:null;if(e===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(x=x!==null?x.baseLanes|r:r,e!==null){for(c=a.child=e.child,p=0;c!==null;)p=p|c.lanes|c.childLanes,c=c.sibling;c=p&~x}else c=0,a.child=null;return Di(e,a,x,r,c)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},e!==null&&_u(a,x!==null?x.cachePool:null),x!==null?Gf(a,x):jf(),Xd(a);else return c=a.lanes=536870912,Di(e,a,x!==null?x.baseLanes|r:r,r,c)}else x!==null?(_u(a,x.cachePool),Gf(a,x),sl(),a.memoizedState=null):(e!==null&&_u(a,null),jf(),sl());return qe(e,a,p,r),a.child}function li(e,a){return e!==null&&e.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function Di(e,a,r,c,p){var x=Ci();return x=x===null?null:{parent:Mt._currentValue,pool:x},a.memoizedState={baseLanes:r,cachePool:x},e!==null&&_u(a,null),jf(),Xd(a),e!==null&&Ll(e,a,c,!0),a.childLanes=p,null}function Va(e,a){return a=Ru({mode:a.mode,children:a.children},e.mode),a.ref=e.ref,e.child=a,a.return=e,a}function xn(e,a,r){return Rs(a,e.child,null,r),e=Va(a,a.pendingProps),e.flags|=2,Sa(a),a.memoizedState=null,e}function jr(e,a,r){var c=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,e===null){if($t){if(c.mode==="hidden")return e=Va(a,c),a.lanes=536870912,li(null,e);if(qf(a),(e=Ee)?(e=b0(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:bi!==null?{id:Ti,overflow:Ei}:null,retryLane:536870912,hydrationErrors:null},r=wd(e),r.return=a,a.child=r,yn=a,Ee=null)):e=null,e===null)throw Ft(a);return a.lanes=536870912,null}return Va(a,c)}var x=e.memoizedState;if(x!==null){var A=x.dehydrated;if(qf(a),p)if(a.flags&256)a.flags&=-257,a=xn(e,a,r);else if(a.memoizedState!==null)a.child=e.child,a.flags|=128,a=null;else throw Error(l(558));else if(Ne||Ll(e,a,r,!1),p=(r&e.childLanes)!==0,Ne||p){if(c=me,c!==null&&(A=oo(c,r),A!==0&&A!==x.retryLane))throw x.retryLane=A,jl(e,A),u(c,e,A),uc;qt(),a=xn(e,a,r)}else e=x.treeContext,Ee=wi(A.nextSibling),yn=a,$t=!0,tl=null,gn=!1,e!==null&&_r(a,e),a=Va(a,c),a.flags|=4096;return a}return e=Si(e.child,{mode:c.mode,children:c.children}),e.ref=a.ref,a.child=e,e.return=a,e}function si(e,a){var r=a.ref;if(r===null)e!==null&&e.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(l(284));(e===null||e.ref!==r)&&(a.flags|=4194816)}}function Mu(e,a,r,c,p){return Cs(a),r=Lf(e,a,r,c,void 0,p),c=Xf(),e!==null&&!Ne?(Vf(e,a,p),ui(e,a,p)):($t&&c&&qo(a),a.flags|=1,qe(e,a,r,p),a.child)}function Bn(e,a,r,c,p,x){return Cs(a),a.updateQueue=null,r=Qd(a,c,r,p),Vd(e),c=Xf(),e!==null&&!Ne?(Vf(e,a,x),ui(e,a,x)):($t&&c&&qo(a),a.flags|=1,qe(e,a,r,x),a.child)}function An(e,a,r,c,p){if(Cs(a),a.stateNode===null){var x=ql,A=r.contextType;typeof A=="object"&&A!==null&&(x=vn(A)),x=new r(c,x),a.memoizedState=x.state!==null&&x.state!==void 0?x.state:null,x.updater=wr,a.stateNode=x,x._reactInternals=a,x=a.stateNode,x.props=c,x.state=a.memoizedState,x.refs={},Bf(a),A=r.contextType,x.context=typeof A=="object"&&A!==null?vn(A):ql,x.state=a.memoizedState,A=r.getDerivedStateFromProps,typeof A=="function"&&(Cu(a,r,A,c),x.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof x.getSnapshotBeforeUpdate=="function"||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(A=x.state,typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount(),A!==x.state&&wr.enqueueReplaceState(x,x.state,null),zs(a,c,x,p),Mr(),x.state=a.memoizedState),typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(e===null){x=a.stateNode;var D=a.memoizedProps,Y=Cn(r,D);x.props=Y;var F=x.context,lt=r.contextType;A=ql,typeof lt=="object"&<!==null&&(A=vn(lt));var ot=r.getDerivedStateFromProps;lt=typeof ot=="function"||typeof x.getSnapshotBeforeUpdate=="function",D=a.pendingProps!==D,lt||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(D||F!==A)&&cm(a,x,c,A),Kl=!1;var tt=a.memoizedState;x.state=tt,zs(a,c,x,p),Mr(),F=a.memoizedState,D||tt!==F||Kl?(typeof ot=="function"&&(Cu(a,r,ot,c),F=a.memoizedState),(Y=Kl||om(a,r,Y,c,tt,F,A))?(lt||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(a.flags|=4194308)):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=F),x.props=c,x.state=F,x.context=A,c=Y):(typeof x.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{x=a.stateNode,wf(e,a),A=a.memoizedProps,lt=Cn(r,A),x.props=lt,ot=a.pendingProps,tt=x.context,F=r.contextType,Y=ql,typeof F=="object"&&F!==null&&(Y=vn(F)),D=r.getDerivedStateFromProps,(F=typeof D=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(A!==ot||tt!==Y)&&cm(a,x,c,Y),Kl=!1,tt=a.memoizedState,x.state=tt,zs(a,c,x,p),Mr();var it=a.memoizedState;A!==ot||tt!==it||Kl||e!==null&&e.dependencies!==null&&vu(e.dependencies)?(typeof D=="function"&&(Cu(a,r,D,c),it=a.memoizedState),(lt=Kl||om(a,r,lt,c,tt,it,Y)||e!==null&&e.dependencies!==null&&vu(e.dependencies))?(F||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(c,it,Y),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(c,it,Y)),typeof x.componentDidUpdate=="function"&&(a.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof x.componentDidUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=it),x.props=c,x.state=it,x.context=Y,c=lt):(typeof x.componentDidUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(a.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||A===e.memoizedProps&&tt===e.memoizedState||(a.flags|=1024),c=!1)}return x=c,si(e,a),c=(a.flags&128)!==0,x||c?(x=a.stateNode,r=c&&typeof r.getDerivedStateFromError!="function"?null:x.render(),a.flags|=1,e!==null&&c?(a.child=Rs(a,e.child,null,p),a.child=Rs(a,null,r,p)):qe(e,a,r,p),a.memoizedState=x.state,e=a.child):e=ui(e,a,p),e}function le(e,a,r,c){return Es(),a.flags|=256,qe(e,a,r,c),a.child}var Aa={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Qa(e){return{baseLanes:e,cachePool:Vo()}}function qr(e,a,r){return e=e!==null?e.childLanes&~r:0,a&&(e|=ne),e}function Ma(e,a,r){var c=a.pendingProps,p=!1,x=(a.flags&128)!==0,A;if((A=x)||(A=e!==null&&e.memoizedState===null?!1:(Ge.current&2)!==0),A&&(p=!0,a.flags&=-129),A=(a.flags&32)!==0,a.flags&=-33,e===null){if($t){if(p?Jl(a):sl(),(e=Ee)?(e=b0(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(a.memoizedState={dehydrated:e,treeContext:bi!==null?{id:Ti,overflow:Ei}:null,retryLane:536870912,hydrationErrors:null},r=wd(e),r.return=a,a.child=r,yn=a,Ee=null)):e=null,e===null)throw Ft(a);return Ip(e)?a.lanes=32:a.lanes=536870912,null}var D=c.children;return c=c.fallback,p?(sl(),p=a.mode,D=Ru({mode:"hidden",children:D},p),c=Ii(c,p,r,null),D.return=a,c.return=a,D.sibling=c,a.child=D,c=a.child,c.memoizedState=Qa(r),c.childLanes=qr(e,A,r),a.memoizedState=Aa,li(null,c)):(Jl(a),Pl(a,D))}var Y=e.memoizedState;if(Y!==null&&(D=Y.dehydrated,D!==null)){if(x)a.flags&256?(Jl(a),a.flags&=-257,a=zu(e,a,r)):a.memoizedState!==null?(sl(),a.child=e.child,a.flags|=128,a=null):(sl(),D=c.fallback,p=a.mode,c=Ru({mode:"visible",children:c.children},p),D=Ii(D,p,r,null),D.flags|=2,c.return=a,D.return=a,c.sibling=D,a.child=c,Rs(a,e.child,null,r),c=a.child,c.memoizedState=Qa(r),c.childLanes=qr(e,A,r),a.memoizedState=Aa,a=li(null,c));else if(Jl(a),Ip(D)){if(A=D.nextSibling&&D.nextSibling.dataset,A)var F=A.dgst;A=F,c=Error(l(419)),c.stack="",c.digest=A,Sr({value:c,source:null,stack:null}),a=zu(e,a,r)}else if(Ne||Ll(e,a,r,!1),A=(r&e.childLanes)!==0,Ne||A){if(A=me,A!==null&&(c=oo(A,r),c!==0&&c!==Y.retryLane))throw Y.retryLane=c,jl(e,c),u(A,e,c),uc;Fp(D)||qt(),a=zu(e,a,r)}else Fp(D)?(a.flags|=192,a.child=e.child,a=null):(e=Y.treeContext,Ee=wi(D.nextSibling),yn=a,$t=!0,tl=null,gn=!1,e!==null&&_r(a,e),a=Pl(a,c.children),a.flags|=4096);return a}return p?(sl(),D=c.fallback,p=a.mode,Y=e.child,F=Y.sibling,c=Si(Y,{mode:"hidden",children:c.children}),c.subtreeFlags=Y.subtreeFlags&65011712,F!==null?D=Si(F,D):(D=Ii(D,p,r,null),D.flags|=2),D.return=a,c.return=a,c.sibling=D,a.child=c,li(null,c),c=a.child,D=e.child.memoizedState,D===null?D=Qa(r):(p=D.cachePool,p!==null?(Y=Mt._currentValue,p=p.parent!==Y?{parent:Y,pool:Y}:p):p=Vo(),D={baseLanes:D.baseLanes|r,cachePool:p}),c.memoizedState=D,c.childLanes=qr(e,A,r),a.memoizedState=Aa,li(e.child,c)):(Jl(a),r=e.child,e=r.sibling,r=Si(r,{mode:"visible",children:c.children}),r.return=a,r.sibling=null,e!==null&&(A=a.deletions,A===null?(a.deletions=[e],a.flags|=16):A.push(e)),a.child=r,a.memoizedState=null,r)}function Pl(e,a){return a=Ru({mode:"visible",children:a},e.mode),a.return=e,e.child=a}function Ru(e,a){return e=Xn(22,e,null,a),e.lanes=0,e}function zu(e,a,r){return Rs(a,e.child,null,r),e=Pl(a,a.pendingProps.children),e.flags|=2,a.memoizedState=null,e}function Ns(e,a,r){e.lanes|=a;var c=e.alternate;c!==null&&(c.lanes|=a),al(e.return,a,r)}function Yr(e,a,r,c,p,x){var A=e.memoizedState;A===null?e.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:r,tailMode:p,treeForkCount:x}:(A.isBackwards=a,A.rendering=null,A.renderingStartTime=0,A.last=c,A.tail=r,A.tailMode=p,A.treeForkCount=x)}function Lr(e,a,r){var c=a.pendingProps,p=c.revealOrder,x=c.tail;c=c.children;var A=Ge.current,D=(A&2)!==0;if(D?(A=A&1|2,a.flags|=128):A&=1,st(Ge,A),qe(e,a,c,r),c=$t?gu:0,!D&&e!==null&&(e.flags&128)!==0)t:for(e=a.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ns(e,r,a);else if(e.tag===19)Ns(e,r,a);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===a)break t;for(;e.sibling===null;){if(e.return===null||e.return===a)break t;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(p){case"forwards":for(r=a.child,p=null;r!==null;)e=r.alternate,e!==null&&ko(e)===null&&(p=r),r=r.sibling;r=p,r===null?(p=a.child,a.child=null):(p=r.sibling,r.sibling=null),Yr(a,!1,p,r,x,c);break;case"backwards":case"unstable_legacy-backwards":for(r=null,p=a.child,a.child=null;p!==null;){if(e=p.alternate,e!==null&&ko(e)===null){a.child=p;break}e=p.sibling,p.sibling=r,r=p,p=e}Yr(a,!0,r,null,x,c);break;case"together":Yr(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function ui(e,a,r){if(e!==null&&(a.dependencies=e.dependencies),Da|=a.lanes,(r&a.childLanes)===0)if(e!==null){if(Ll(e,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(e!==null&&a.child!==e.child)throw Error(l(153));if(a.child!==null){for(e=a.child,r=Si(e,e.pendingProps),a.child=r,r.return=a;e.sibling!==null;)e=e.sibling,r=r.sibling=Si(e,e.pendingProps),r.return=a;r.sibling=null}return a.child}function Wl(e,a){return(e.lanes&a)!==0?!0:(e=e.dependencies,!!(e!==null&&vu(e)))}function Xr(e,a,r){switch(a.tag){case 3:ce(a,a.stateNode.containerInfo),nl(a,Mt,e.memoizedState.cache),Es();break;case 27:case 5:ma(a);break;case 4:ce(a,a.stateNode.containerInfo);break;case 10:nl(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,qf(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Jl(a),a.flags|=128,null):(r&a.child.childLanes)!==0?Ma(e,a,r):(Jl(a),e=ui(e,a,r),e!==null?e.sibling:null);Jl(a);break;case 19:var p=(e.flags&128)!==0;if(c=(r&a.childLanes)!==0,c||(Ll(e,a,r,!1),c=(r&a.childLanes)!==0),p){if(c)return Lr(e,a,r);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),st(Ge,Ge.current),c)break;return null;case 22:return a.lanes=0,Ca(e,a,r,a.pendingProps);case 24:nl(a,Mt,e.memoizedState.cache)}return ui(e,a,r)}function rc(e,a,r){if(e!==null)if(e.memoizedProps!==a.pendingProps)Ne=!0;else{if(!Wl(e,r)&&(a.flags&128)===0)return Ne=!1,Xr(e,a,r);Ne=(e.flags&131072)!==0}else Ne=!1,$t&&(a.flags&1048576)!==0&&Tf(a,gu,a.index);switch(a.lanes=0,a.tag){case 16:t:{var c=a.pendingProps;if(e=Ms(a.elementType),a.type=e,typeof e=="function")Vn(e)?(c=Cn(e,c),a.tag=1,a=An(null,a,e,c,r)):(a.tag=0,a=Mu(null,a,e,c,r));else{if(e!=null){var p=e.$$typeof;if(p===G){a.tag=11,a=Hr(null,a,e,c,r);break t}else if(p===K){a.tag=14,a=Gr(null,a,e,c,r);break t}}throw a=xt(e)||e,Error(l(306,a,""))}}return a;case 0:return Mu(e,a,a.type,a.pendingProps,r);case 1:return c=a.type,p=Cn(c,a.pendingProps),An(e,a,c,p,r);case 3:t:{if(ce(a,a.stateNode.containerInfo),e===null)throw Error(l(387));c=a.pendingProps;var x=a.memoizedState;p=x.element,wf(e,a),zs(a,c,null,r);var A=a.memoizedState;if(c=A.cache,nl(a,Mt,c),c!==x.cache&&Xo(a,[Mt],r,!0),Mr(),c=A.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:A.cache},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){a=le(e,a,c,r);break t}else if(c!==p){p=ta(Error(l(424)),a),Sr(p),a=le(e,a,c,r);break t}else{switch(e=a.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ee=wi(e.firstChild),yn=a,$t=!0,tl=null,gn=!0,r=Ld(a,null,c,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling}else{if(Es(),c===p){a=ui(e,a,r);break t}qe(e,a,c,r)}a=a.child}return a;case 26:return si(e,a),e===null?(r=R0(a.type,null,a.pendingProps,null))?a.memoizedState=r:$t||(r=a.type,e=a.pendingProps,c=_m(Ot.current).createElement(r),c[Wt]=a,c[Rn]=e,Jn(c,r,e),$e(c),a.stateNode=c):a.memoizedState=R0(a.type,e.memoizedProps,a.pendingProps,e.memoizedState),null;case 27:return ma(a),e===null&&$t&&(c=a.stateNode=C0(a.type,a.pendingProps,Ot.current),yn=a,gn=!0,p=Ee,Hu(a.type)?($p=p,Ee=wi(c.firstChild)):Ee=p),qe(e,a,a.pendingProps.children,r),si(e,a),e===null&&(a.flags|=4194304),a.child;case 5:return e===null&&$t&&((p=c=Ee)&&(c=MS(c,a.type,a.pendingProps,gn),c!==null?(a.stateNode=c,yn=a,Ee=wi(c.firstChild),gn=!1,p=!0):p=!1),p||Ft(a)),ma(a),p=a.type,x=a.pendingProps,A=e!==null?e.memoizedProps:null,c=x.children,Jp(p,x)?c=null:A!==null&&Jp(p,A)&&(a.flags|=32),a.memoizedState!==null&&(p=Lf(e,a,Dp,null,null,r),_h._currentValue=p),si(e,a),qe(e,a,c,r),a.child;case 6:return e===null&&$t&&((e=r=Ee)&&(r=RS(r,a.pendingProps,gn),r!==null?(a.stateNode=r,yn=a,Ee=null,e=!0):e=!1),e||Ft(a)),null;case 13:return Ma(e,a,r);case 4:return ce(a,a.stateNode.containerInfo),c=a.pendingProps,e===null?a.child=Rs(a,null,c,r):qe(e,a,c,r),a.child;case 11:return Hr(e,a,a.type,a.pendingProps,r);case 7:return qe(e,a,a.pendingProps,r),a.child;case 8:return qe(e,a,a.pendingProps.children,r),a.child;case 12:return qe(e,a,a.pendingProps.children,r),a.child;case 10:return c=a.pendingProps,nl(a,a.type,c.value),qe(e,a,c.children,r),a.child;case 9:return p=a.type._context,c=a.pendingProps.children,Cs(a),p=vn(p),c=c(p),a.flags|=1,qe(e,a,c,r),a.child;case 14:return Gr(e,a,a.type,a.pendingProps,r);case 15:return Ea(e,a,a.type,a.pendingProps,r);case 19:return Lr(e,a,r);case 31:return jr(e,a,r);case 22:return Ca(e,a,r,a.pendingProps);case 24:return Cs(a),c=vn(Mt),e===null?(p=Ci(),p===null&&(p=me,x=Rf(),p.pooledCache=x,x.refCount++,x!==null&&(p.pooledCacheLanes|=r),p=x),a.memoizedState={parent:c,cache:p},Bf(a),nl(a,Mt,p)):((e.lanes&r)!==0&&(wf(e,a),zs(a,null,null,r),Mr()),p=e.memoizedState,x=a.memoizedState,p.parent!==c?(p={parent:c,cache:c},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),nl(a,Mt,c)):(c=x.cache,nl(a,Mt,c),c!==p.cache&&Xo(a,[Mt],r,!0))),qe(e,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(l(156,a.tag))}function la(e){e.flags|=4}function Fl(e,a,r,c,p){if((a=(e.mode&32)!==0)&&(a=!1),a){if(e.flags|=16777216,(p&335544128)===p)if(e.stateNode.complete)e.flags|=8192;else if(yt())e.flags|=8192;else throw Nt=Er,Tr}else e.flags&=-16777217}function ol(e,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!U0(a))if(yt())e.flags|=8192;else throw Nt=Er,Tr}function Du(e,a){a!==null&&(e.flags|=4),e.flags&16384&&(a=e.tag!==22?$s():536870912,e.lanes|=a,Oa|=a)}function Vr(e,a){if(!$t)switch(e.tailMode){case"hidden":a=e.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var c=null;r!==null;)r.alternate!==null&&(c=r),r=r.sibling;c===null?a||e.tail===null?e.tail=null:e.tail.sibling=null:c.sibling=null}}function ve(e){var a=e.alternate!==null&&e.alternate.child===e.child,r=0,c=0;if(a)for(var p=e.child;p!==null;)r|=p.lanes|p.childLanes,c|=p.subtreeFlags&65011712,c|=p.flags&65011712,p.return=e,p=p.sibling;else for(p=e.child;p!==null;)r|=p.lanes|p.childLanes,c|=p.subtreeFlags,c|=p.flags,p.return=e,p=p.sibling;return e.subtreeFlags|=c,e.childLanes=r,a}function fh(e,a,r){var c=a.pendingProps;switch(Yl(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ve(a),null;case 1:return ve(a),null;case 3:return r=a.stateNode,c=null,e!==null&&(c=e.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),La(Mt),oe(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Ts(a)?la(a):e===null||e.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ef())),ve(a),null;case 26:var p=a.type,x=a.memoizedState;return e===null?(la(a),x!==null?(ve(a),ol(a,x)):(ve(a),Fl(a,p,null,c,r))):x?x!==e.memoizedState?(la(a),ve(a),ol(a,x)):(ve(a),a.flags&=-16777217):(e=e.memoizedProps,e!==c&&la(a),ve(a),Fl(a,p,e,c,r)),null;case 27:if(Ga(a),r=Ot.current,p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==c&&la(a);else{if(!c){if(a.stateNode===null)throw Error(l(166));return ve(a),null}e=pt.current,Ts(a)?Lo(a):(e=C0(p,c,r),a.stateNode=e,la(a))}return ve(a),null;case 5:if(Ga(a),p=a.type,e!==null&&a.stateNode!=null)e.memoizedProps!==c&&la(a);else{if(!c){if(a.stateNode===null)throw Error(l(166));return ve(a),null}if(x=pt.current,Ts(a))Lo(a);else{var A=_m(Ot.current);switch(x){case 1:x=A.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:x=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":x=A.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":x=A.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":x=A.createElement("div"),x.innerHTML="<script><\/script>",x=x.removeChild(x.firstChild);break;case"select":x=typeof c.is=="string"?A.createElement("select",{is:c.is}):A.createElement("select"),c.multiple?x.multiple=!0:c.size&&(x.size=c.size);break;default:x=typeof c.is=="string"?A.createElement(p,{is:c.is}):A.createElement(p)}}x[Wt]=a,x[Rn]=c;t:for(A=a.child;A!==null;){if(A.tag===5||A.tag===6)x.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===a)break t;for(;A.sibling===null;){if(A.return===null||A.return===a)break t;A=A.return}A.sibling.return=A.return,A=A.sibling}a.stateNode=x;t:switch(Jn(x,p,c),p){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break t;case"img":c=!0;break t;default:c=!1}c&&la(a)}}return ve(a),Fl(a,a.type,e===null?null:e.memoizedProps,a.pendingProps,r),null;case 6:if(e&&a.stateNode!=null)e.memoizedProps!==c&&la(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(l(166));if(e=Ot.current,Ts(a)){if(e=a.stateNode,r=a.memoizedProps,c=null,p=yn,p!==null)switch(p.tag){case 27:case 5:c=p.memoizedProps}e[Wt]=a,e=!!(e.nodeValue===r||c!==null&&c.suppressHydrationWarning===!0||m0(e.nodeValue,r)),e||Ft(a,!0)}else e=_m(e).createTextNode(c),e[Wt]=a,a.stateNode=e}return ve(a),null;case 31:if(r=a.memoizedState,e===null||e.memoizedState!==null){if(c=Ts(a),r!==null){if(e===null){if(!c)throw Error(l(318));if(e=a.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[Wt]=a}else Es(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ve(a),e=!1}else r=Ef(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return a.flags&256?(Sa(a),a):(Sa(a),null);if((a.flags&128)!==0)throw Error(l(558))}return ve(a),null;case 13:if(c=a.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(p=Ts(a),c!==null&&c.dehydrated!==null){if(e===null){if(!p)throw Error(l(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(l(317));p[Wt]=a}else Es(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;ve(a),p=!1}else p=Ef(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Sa(a),a):(Sa(a),null)}return Sa(a),(a.flags&128)!==0?(a.lanes=r,a):(r=c!==null,e=e!==null&&e.memoizedState!==null,r&&(c=a.child,p=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(p=c.alternate.memoizedState.cachePool.pool),x=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(x=c.memoizedState.cachePool.pool),x!==p&&(c.flags|=2048)),r!==e&&r&&(a.child.flags|=8192),Du(a,a.updateQueue),ve(a),null);case 4:return oe(),e===null&&Vp(a.stateNode.containerInfo),ve(a),null;case 10:return La(a.type),ve(a),null;case 19:if(I(Ge),c=a.memoizedState,c===null)return ve(a),null;if(p=(a.flags&128)!==0,x=c.rendering,x===null)if(p)Vr(c,!1);else{if(pe!==0||e!==null&&(e.flags&128)!==0)for(e=a.child;e!==null;){if(x=ko(e),x!==null){for(a.flags|=128,Vr(c,!1),e=x.updateQueue,a.updateQueue=e,Du(a,e),a.subtreeFlags=0,e=r,r=a.child;r!==null;)On(r,e),r=r.sibling;return st(Ge,Ge.current&1|2),$t&&$i(a,c.treeForkCount),a.child}e=e.sibling}c.tail!==null&&In()>Na&&(a.flags|=128,p=!0,Vr(c,!1),a.lanes=4194304)}else{if(!p)if(e=ko(x),e!==null){if(a.flags|=128,p=!0,e=e.updateQueue,a.updateQueue=e,Du(a,e),Vr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!x.alternate&&!$t)return ve(a),null}else 2*In()-c.renderingStartTime>Na&&r!==536870912&&(a.flags|=128,p=!0,Vr(c,!1),a.lanes=4194304);c.isBackwards?(x.sibling=a.child,a.child=x):(e=c.last,e!==null?e.sibling=x:a.child=x,c.last=x)}return c.tail!==null?(e=c.tail,c.rendering=e,c.tail=e.sibling,c.renderingStartTime=In(),e.sibling=null,r=Ge.current,st(Ge,p?r&1|2:r&1),$t&&$i(a,c.treeForkCount),e):(ve(a),null);case 22:case 23:return Sa(a),Un(),c=a.memoizedState!==null,e!==null?e.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(r&536870912)!==0&&(a.flags&128)===0&&(ve(a),a.subtreeFlags&6&&(a.flags|=8192)):ve(a),r=a.updateQueue,r!==null&&Du(a,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==r&&(a.flags|=2048),e!==null&&I(Xl),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),La(Mt),ve(a),null;case 25:return null;case 30:return null}throw Error(l(156,a.tag))}function oc(e,a){switch(Yl(a),a.tag){case 1:return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 3:return La(Mt),oe(),e=a.flags,(e&65536)!==0&&(e&128)===0?(a.flags=e&-65537|128,a):null;case 26:case 27:case 5:return Ga(a),null;case 31:if(a.memoizedState!==null){if(Sa(a),a.alternate===null)throw Error(l(340));Es()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 13:if(Sa(a),e=a.memoizedState,e!==null&&e.dehydrated!==null){if(a.alternate===null)throw Error(l(340));Es()}return e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 19:return I(Ge),null;case 4:return oe(),null;case 10:return La(a.type),null;case 22:case 23:return Sa(a),Un(),e!==null&&I(Xl),e=a.flags,e&65536?(a.flags=e&-65537|128,a):null;case 24:return La(Mt),null;case 25:return null;default:return null}}function Us(e,a){switch(Yl(a),a.tag){case 3:La(Mt),oe();break;case 26:case 27:case 5:Ga(a);break;case 4:oe();break;case 31:a.memoizedState!==null&&Sa(a);break;case 13:Sa(a);break;case 19:I(Ge);break;case 10:La(a.type);break;case 22:case 23:Sa(a),Un(),e!==null&&I(Xl);break;case 24:La(Mt)}}function Oi(e,a){try{var r=a.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var p=c.next;r=p;do{if((r.tag&e)===e){c=void 0;var x=r.create,A=r.inst;c=x(),A.destroy=c}r=r.next}while(r!==p)}}catch(D){Te(a,a.return,D)}}function Za(e,a,r){try{var c=a.updateQueue,p=c!==null?c.lastEffect:null;if(p!==null){var x=p.next;c=x;do{if((c.tag&e)===e){var A=c.inst,D=A.destroy;if(D!==void 0){A.destroy=void 0,p=a;var Y=r,F=D;try{F()}catch(lt){Te(p,Y,lt)}}}c=c.next}while(c!==x)}}catch(lt){Te(a,a.return,lt)}}function Il(e){var a=e.updateQueue;if(a!==null){var r=e.stateNode;try{Tn(a,r)}catch(c){Te(e,e.return,c)}}}function hh(e,a,r){r.props=Cn(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(c){Te(e,a,c)}}function Ni(e,a){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var c=e.stateNode;break;case 30:c=e.stateNode;break;default:c=e.stateNode}typeof r=="function"?e.refCleanup=r(c):r.current=c}}catch(p){Te(e,a,p)}}function Ra(e,a){var r=e.ref,c=e.refCleanup;if(r!==null)if(typeof c=="function")try{c()}catch(p){Te(e,a,p)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(p){Te(e,a,p)}else r.current=null}function za(e){var a=e.type,r=e.memoizedProps,c=e.stateNode;try{t:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&c.focus();break t;case"img":r.src?c.src=r.src:r.srcSet&&(c.srcset=r.srcSet)}}catch(p){Te(e,e.return,p)}}function Ka(e,a,r){try{var c=e.stateNode;SS(c,e.type,r,a),c[Rn]=a}catch(p){Te(e,e.return,p)}}function en(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Hu(e.type)||e.tag===4}function Ui(e){t:for(;;){for(;e.sibling===null;){if(e.return===null||en(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Hu(e.type)||e.flags&2||e.child===null||e.tag===4)continue t;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vt(e,a,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(e),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=vi));else if(c!==4&&(c===27&&Hu(e.type)&&(r=e.stateNode,a=null),e=e.child,e!==null))for(Vt(e,a,r),e=e.sibling;e!==null;)Vt(e,a,r),e=e.sibling}function fe(e,a,r){var c=e.tag;if(c===5||c===6)e=e.stateNode,a?r.insertBefore(e,a):r.appendChild(e);else if(c!==4&&(c===27&&Hu(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(fe(e,a,r),e=e.sibling;e!==null;)fe(e,a,r),e=e.sibling}function Ze(e){var a=e.stateNode,r=e.memoizedProps;try{for(var c=e.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);Jn(a,c,r),a[Wt]=e,a[Rn]=r}catch(x){Te(e,e.return,x)}}var ka=!1,Ue=!1,cl=!1,Qr=typeof WeakSet=="function"?WeakSet:Set,Ye=null;function Ou(e,a){if(e=e.containerInfo,Kp=Mm,e=Oo(e),cu(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else t:{r=(r=e.ownerDocument)&&r.defaultView||window;var c=r.getSelection&&r.getSelection();if(c&&c.rangeCount!==0){r=c.anchorNode;var p=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{r.nodeType,x.nodeType}catch{r=null;break t}var A=0,D=-1,Y=-1,F=0,lt=0,ot=e,tt=null;e:for(;;){for(var it;ot!==r||p!==0&&ot.nodeType!==3||(D=A+p),ot!==x||c!==0&&ot.nodeType!==3||(Y=A+c),ot.nodeType===3&&(A+=ot.nodeValue.length),(it=ot.firstChild)!==null;)tt=ot,ot=it;for(;;){if(ot===e)break e;if(tt===r&&++F===p&&(D=A),tt===x&&++lt===c&&(Y=A),(it=ot.nextSibling)!==null)break;ot=tt,tt=ot.parentNode}ot=it}r=D===-1||Y===-1?null:{start:D,end:Y}}else r=null}r=r||{start:0,end:0}}else r=null;for(kp={focusedElem:e,selectionRange:r},Mm=!1,Ye=a;Ye!==null;)if(a=Ye,e=a.child,(a.subtreeFlags&1028)!==0&&e!==null)e.return=a,Ye=e;else for(;Ye!==null;){switch(a=Ye,x=a.alternate,e=a.flags,a.tag){case 0:if((e&4)!==0&&(e=a.updateQueue,e=e!==null?e.events:null,e!==null))for(r=0;r<e.length;r++)p=e[r],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&x!==null){e=void 0,r=a,p=x.memoizedProps,x=x.memoizedState,c=r.stateNode;try{var Et=Cn(r.type,p);e=c.getSnapshotBeforeUpdate(Et,x),c.__reactInternalSnapshotBeforeUpdate=e}catch(wt){Te(r,r.return,wt)}}break;case 3:if((e&1024)!==0){if(e=a.stateNode.containerInfo,r=e.nodeType,r===9)Wp(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=a.sibling,e!==null){e.return=a.return,Ye=e;break}Ye=a.return}}function dm(e,a,r){var c=r.flags;switch(r.tag){case 0:case 11:case 15:fl(e,r),c&4&&Oi(5,r);break;case 1:if(fl(e,r),c&4)if(e=r.stateNode,a===null)try{e.componentDidMount()}catch(A){Te(r,r.return,A)}else{var p=Cn(r.type,a.memoizedProps);a=a.memoizedState;try{e.componentDidUpdate(p,a,e.__reactInternalSnapshotBeforeUpdate)}catch(A){Te(r,r.return,A)}}c&64&&Il(r),c&512&&Ni(r,r.return);break;case 3:if(fl(e,r),c&64&&(e=r.updateQueue,e!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{Tn(e,a)}catch(A){Te(r,r.return,A)}}break;case 27:a===null&&c&4&&Ze(r);case 26:case 5:fl(e,r),a===null&&c&4&&za(r),c&512&&Ni(r,r.return);break;case 12:fl(e,r);break;case 31:fl(e,r),c&4&&fc(e,r);break;case 13:fl(e,r),c&4&&dh(e,r),c&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=oS.bind(null,r),zS(e,r))));break;case 22:if(c=r.memoizedState!==null||ka,!c){a=a!==null&&a.memoizedState!==null||Ue,p=ka;var x=Ue;ka=c,(Ue=a)&&!x?de(e,r,(r.subtreeFlags&8772)!==0):fl(e,r),ka=p,Ue=x}break;case 30:break;default:fl(e,r)}}function cc(e){var a=e.alternate;a!==null&&(e.alternate=null,cc(a)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(a=e.stateNode,a!==null&&Iu(a)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var se=null,nn=!1;function wn(e,a,r){for(r=r.child;r!==null;)$l(e,a,r),r=r.sibling}function $l(e,a,r){if(Ie&&typeof Ie.onCommitFiberUnmount=="function")try{Ie.onCommitFiberUnmount(qa,r)}catch{}switch(r.tag){case 26:Ue||Ra(r,a),wn(e,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Ue||Ra(r,a);var c=se,p=nn;Hu(r.type)&&(se=r.stateNode,nn=!1),wn(e,a,r),gh(r.stateNode),se=c,nn=p;break;case 5:Ue||Ra(r,a);case 6:if(c=se,p=nn,se=null,wn(e,a,r),se=c,nn=p,se!==null)if(nn)try{(se.nodeType===9?se.body:se.nodeName==="HTML"?se.ownerDocument.body:se).removeChild(r.stateNode)}catch(x){Te(r,a,x)}else try{se.removeChild(r.stateNode)}catch(x){Te(r,a,x)}break;case 18:se!==null&&(nn?(e=se,_0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),bc(e)):_0(se,r.stateNode));break;case 4:c=se,p=nn,se=r.stateNode.containerInfo,nn=!0,wn(e,a,r),se=c,nn=p;break;case 0:case 11:case 14:case 15:Za(2,r,a),Ue||Za(4,r,a),wn(e,a,r);break;case 1:Ue||(Ra(r,a),c=r.stateNode,typeof c.componentWillUnmount=="function"&&hh(r,a,c)),wn(e,a,r);break;case 21:wn(e,a,r);break;case 22:Ue=(c=Ue)||r.memoizedState!==null,wn(e,a,r),Ue=c;break;default:wn(e,a,r)}}function fc(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bc(e)}catch(r){Te(a,a.return,r)}}}function dh(e,a){if(a.memoizedState===null&&(e=a.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bc(e)}catch(r){Te(a,a.return,r)}}function mm(e){switch(e.tag){case 31:case 13:case 19:var a=e.stateNode;return a===null&&(a=e.stateNode=new Qr),a;case 22:return e=e.stateNode,a=e._retryCache,a===null&&(a=e._retryCache=new Qr),a;default:throw Error(l(435,e.tag))}}function Ke(e,a){var r=mm(e);a.forEach(function(c){if(!r.has(c)){r.add(c);var p=cS.bind(null,e,c);c.then(p,p)}})}function Hn(e,a){var r=a.deletions;if(r!==null)for(var c=0;c<r.length;c++){var p=r[c],x=e,A=a,D=A;t:for(;D!==null;){switch(D.tag){case 27:if(Hu(D.type)){se=D.stateNode,nn=!1;break t}break;case 5:se=D.stateNode,nn=!1;break t;case 3:case 4:se=D.stateNode.containerInfo,nn=!0;break t}D=D.return}if(se===null)throw Error(l(160));$l(x,A,p),se=null,nn=!1,x=p.alternate,x!==null&&(x.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)ts(a,e),a=a.sibling}var sa=null;function ts(e,a){var r=e.alternate,c=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Hn(a,e),Le(e),c&4&&(Za(3,e,e.return),Oi(3,e),Za(5,e,e.return));break;case 1:Hn(a,e),Le(e),c&512&&(Ue||r===null||Ra(r,r.return)),c&64&&ka&&(e=e.updateQueue,e!==null&&(c=e.callbacks,c!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?c:r.concat(c))));break;case 26:var p=sa;if(Hn(a,e),Le(e),c&512&&(Ue||r===null||Ra(r,r.return)),c&4){var x=r!==null?r.memoizedState:null;if(c=e.memoizedState,r===null)if(c===null)if(e.stateNode===null){t:{c=e.type,r=e.memoizedProps,p=p.ownerDocument||p;e:switch(c){case"title":x=p.getElementsByTagName("title")[0],(!x||x[fs]||x[Wt]||x.namespaceURI==="http://www.w3.org/2000/svg"||x.hasAttribute("itemprop"))&&(x=p.createElement(c),p.head.insertBefore(x,p.querySelector("head > title"))),Jn(x,c,r),x[Wt]=e,$e(x),c=x;break t;case"link":var A=O0("link","href",p).get(c+(r.href||""));if(A){for(var D=0;D<A.length;D++)if(x=A[D],x.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&x.getAttribute("rel")===(r.rel==null?null:r.rel)&&x.getAttribute("title")===(r.title==null?null:r.title)&&x.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){A.splice(D,1);break e}}x=p.createElement(c),Jn(x,c,r),p.head.appendChild(x);break;case"meta":if(A=O0("meta","content",p).get(c+(r.content||""))){for(D=0;D<A.length;D++)if(x=A[D],x.getAttribute("content")===(r.content==null?null:""+r.content)&&x.getAttribute("name")===(r.name==null?null:r.name)&&x.getAttribute("property")===(r.property==null?null:r.property)&&x.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&x.getAttribute("charset")===(r.charSet==null?null:r.charSet)){A.splice(D,1);break e}}x=p.createElement(c),Jn(x,c,r),p.head.appendChild(x);break;default:throw Error(l(468,c))}x[Wt]=e,$e(x),c=x}e.stateNode=c}else N0(p,e.type,e.stateNode);else e.stateNode=D0(p,c,e.memoizedProps);else x!==c?(x===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):x.count--,c===null?N0(p,e.type,e.stateNode):D0(p,c,e.memoizedProps)):c===null&&e.stateNode!==null&&Ka(e,e.memoizedProps,r.memoizedProps)}break;case 27:Hn(a,e),Le(e),c&512&&(Ue||r===null||Ra(r,r.return)),r!==null&&c&4&&Ka(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Hn(a,e),Le(e),c&512&&(Ue||r===null||Ra(r,r.return)),e.flags&32){p=e.stateNode;try{ds(p,"")}catch(Et){Te(e,e.return,Et)}}c&4&&e.stateNode!=null&&(p=e.memoizedProps,Ka(e,p,r!==null?r.memoizedProps:p)),c&1024&&(cl=!0);break;case 6:if(Hn(a,e),Le(e),c&4){if(e.stateNode===null)throw Error(l(162));c=e.memoizedProps,r=e.stateNode;try{r.nodeValue=c}catch(Et){Te(e,e.return,Et)}}break;case 3:if(Tm=null,p=sa,sa=Sm(a.containerInfo),Hn(a,e),sa=p,Le(e),c&4&&r!==null&&r.memoizedState.isDehydrated)try{bc(a.containerInfo)}catch(Et){Te(e,e.return,Et)}cl&&(cl=!1,pm(e));break;case 4:c=sa,sa=Sm(e.stateNode.containerInfo),Hn(a,e),Le(e),sa=c;break;case 12:Hn(a,e),Le(e);break;case 31:Hn(a,e),Le(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Ke(e,c)));break;case 13:Hn(a,e),Le(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(ml=In()),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Ke(e,c)));break;case 22:p=e.memoizedState!==null;var Y=r!==null&&r.memoizedState!==null,F=ka,lt=Ue;if(ka=F||p,Ue=lt||Y,Hn(a,e),Ue=lt,ka=F,Le(e),c&8192)t:for(a=e.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(r===null||Y||ka||Ue||Bs(e)),r=null,a=e;;){if(a.tag===5||a.tag===26){if(r===null){Y=r=a;try{if(x=Y.stateNode,p)A=x.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{D=Y.stateNode;var ot=Y.memoizedProps.style,tt=ot!=null&&ot.hasOwnProperty("display")?ot.display:null;D.style.display=tt==null||typeof tt=="boolean"?"":(""+tt).trim()}}catch(Et){Te(Y,Y.return,Et)}}}else if(a.tag===6){if(r===null){Y=a;try{Y.stateNode.nodeValue=p?"":Y.memoizedProps}catch(Et){Te(Y,Y.return,Et)}}}else if(a.tag===18){if(r===null){Y=a;try{var it=Y.stateNode;p?S0(it,!0):S0(Y.stateNode,!1)}catch(Et){Te(Y,Y.return,Et)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===e)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===e)break t;for(;a.sibling===null;){if(a.return===null||a.return===e)break t;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=e.updateQueue,c!==null&&(r=c.retryQueue,r!==null&&(c.retryQueue=null,Ke(e,r))));break;case 19:Hn(a,e),Le(e),c&4&&(c=e.updateQueue,c!==null&&(e.updateQueue=null,Ke(e,c)));break;case 30:break;case 21:break;default:Hn(a,e),Le(e)}}function Le(e){var a=e.flags;if(a&2){try{for(var r,c=e.return;c!==null;){if(en(c)){r=c;break}c=c.return}if(r==null)throw Error(l(160));switch(r.tag){case 27:var p=r.stateNode,x=Ui(e);fe(e,x,p);break;case 5:var A=r.stateNode;r.flags&32&&(ds(A,""),r.flags&=-33);var D=Ui(e);fe(e,D,A);break;case 3:case 4:var Y=r.stateNode.containerInfo,F=Ui(e);Vt(e,F,Y);break;default:throw Error(l(161))}}catch(lt){Te(e,e.return,lt)}e.flags&=-3}a&4096&&(e.flags&=-4097)}function pm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var a=e;pm(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),e=e.sibling}}function fl(e,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)dm(e,a.alternate,a),a=a.sibling}function Bs(e){for(e=e.child;e!==null;){var a=e;switch(a.tag){case 0:case 11:case 14:case 15:Za(4,a,a.return),Bs(a);break;case 1:Ra(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&hh(a,a.return,r),Bs(a);break;case 27:gh(a.stateNode);case 26:case 5:Ra(a,a.return),Bs(a);break;case 22:a.memoizedState===null&&Bs(a);break;case 30:Bs(a);break;default:Bs(a)}e=e.sibling}}function de(e,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,p=e,x=a,A=x.flags;switch(x.tag){case 0:case 11:case 15:de(p,x,r),Oi(4,x);break;case 1:if(de(p,x,r),c=x,p=c.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(F){Te(c,c.return,F)}if(c=x,p=c.updateQueue,p!==null){var D=c.stateNode;try{var Y=p.shared.hiddenCallbacks;if(Y!==null)for(p.shared.hiddenCallbacks=null,p=0;p<Y.length;p++)Mi(Y[p],D)}catch(F){Te(c,c.return,F)}}r&&A&64&&Il(x),Ni(x,x.return);break;case 27:Ze(x);case 26:case 5:de(p,x,r),r&&c===null&&A&4&&za(x),Ni(x,x.return);break;case 12:de(p,x,r);break;case 31:de(p,x,r),r&&A&4&&fc(p,x);break;case 13:de(p,x,r),r&&A&4&&dh(p,x);break;case 22:x.memoizedState===null&&de(p,x,r),Ni(x,x.return);break;case 30:break;default:de(p,x,r)}a=a.sibling}}function hc(e,a){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(e=a.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&bn(r))}function hl(e,a){e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&bn(e))}function fn(e,a,r,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)we(e,a,r,c),a=a.sibling}function we(e,a,r,c){var p=a.flags;switch(a.tag){case 0:case 11:case 15:fn(e,a,r,c),p&2048&&Oi(9,a);break;case 1:fn(e,a,r,c);break;case 3:fn(e,a,r,c),p&2048&&(e=null,a.alternate!==null&&(e=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==e&&(a.refCount++,e!=null&&bn(e)));break;case 12:if(p&2048){fn(e,a,r,c),e=a.stateNode;try{var x=a.memoizedProps,A=x.id,D=x.onPostCommit;typeof D=="function"&&D(A,a.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Y){Te(a,a.return,Y)}}else fn(e,a,r,c);break;case 31:fn(e,a,r,c);break;case 13:fn(e,a,r,c);break;case 23:break;case 22:x=a.stateNode,A=a.alternate,a.memoizedState!==null?x._visibility&2?fn(e,a,r,c):Nu(e,a):x._visibility&2?fn(e,a,r,c):(x._visibility|=2,es(e,a,r,c,(a.subtreeFlags&10256)!==0||!1)),p&2048&&hc(A,a);break;case 24:fn(e,a,r,c),p&2048&&hl(a.alternate,a);break;default:fn(e,a,r,c)}}function es(e,a,r,c,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var x=e,A=a,D=r,Y=c,F=A.flags;switch(A.tag){case 0:case 11:case 15:es(x,A,D,Y,p),Oi(8,A);break;case 23:break;case 22:var lt=A.stateNode;A.memoizedState!==null?lt._visibility&2?es(x,A,D,Y,p):Nu(x,A):(lt._visibility|=2,es(x,A,D,Y,p)),p&&F&2048&&hc(A.alternate,A);break;case 24:es(x,A,D,Y,p),p&&F&2048&&hl(A.alternate,A);break;default:es(x,A,D,Y,p)}a=a.sibling}}function Nu(e,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var r=e,c=a,p=c.flags;switch(c.tag){case 22:Nu(r,c),p&2048&&hc(c.alternate,c);break;case 24:Nu(r,c),p&2048&&hl(c.alternate,c);break;default:Nu(r,c)}a=a.sibling}}var Xe=8192;function ws(e,a,r){if(e.subtreeFlags&Xe)for(e=e.child;e!==null;)ke(e,a,r),e=e.sibling}function ke(e,a,r){switch(e.tag){case 26:ws(e,a,r),e.flags&Xe&&e.memoizedState!==null&&LS(r,sa,e.memoizedState,e.memoizedProps);break;case 5:ws(e,a,r);break;case 3:case 4:var c=sa;sa=Sm(e.stateNode.containerInfo),ws(e,a,r),sa=c;break;case 22:e.memoizedState===null&&(c=e.alternate,c!==null&&c.memoizedState!==null?(c=Xe,Xe=16777216,ws(e,a,r),Xe=c):ws(e,a,r));break;default:ws(e,a,r)}}function ua(e){var a=e.alternate;if(a!==null&&(e=a.child,e!==null)){a.child=null;do a=e.sibling,e.sibling=null,e=a;while(e!==null)}}function Kn(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];Ye=c,Zr(c,e)}ua(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hs(e),e=e.sibling}function Hs(e){switch(e.tag){case 0:case 11:case 15:Kn(e),e.flags&2048&&Za(9,e,e.return);break;case 3:Kn(e);break;case 12:Kn(e);break;case 22:var a=e.stateNode;e.memoizedState!==null&&a._visibility&2&&(e.return===null||e.return.tag!==13)?(a._visibility&=-3,dc(e)):Kn(e);break;default:Kn(e)}}function dc(e){var a=e.deletions;if((e.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];Ye=c,Zr(c,e)}ua(e)}for(e=e.child;e!==null;){switch(a=e,a.tag){case 0:case 11:case 15:Za(8,a,a.return),dc(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,dc(a));break;default:dc(a)}e=e.sibling}}function Zr(e,a){for(;Ye!==null;){var r=Ye;switch(r.tag){case 0:case 11:case 15:Za(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var c=r.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:bn(r.memoizedState.cache)}if(c=r.child,c!==null)c.return=r,Ye=c;else t:for(r=e;Ye!==null;){c=Ye;var p=c.sibling,x=c.return;if(cc(c),c===r){Ye=null;break t}if(p!==null){p.return=x,Ye=p;break t}Ye=x}}}var mc={getCacheForType:function(e){var a=vn(Mt),r=a.data.get(e);return r===void 0&&(r=e(),a.data.set(e,r)),r},cacheSignal:function(){return vn(Mt).controller.signal}},pc=typeof WeakMap=="function"?WeakMap:Map,ee=0,me=null,Qt=null,It=0,Rt=0,Jt=null,Lt=!1,Zt=!1,Se=!1,Je=0,pe=0,Da=0,dl=0,ri=0,ne=0,Oa=0,oi=null,Gn=null,ra=!1,ml=0,Uu=0,Na=1/0,Bu=null,Bi=null,He=0,ci=null,Ua=null,Ja=0,pl=0,Gs=null,yc=null,js=0,qs=null;function kn(){return(ee&2)!==0&&It!==0?It&-It:w.T!==null?qp():Zi()}function s(){if(ne===0)if((It&536870912)===0||$t){var e=cs;cs<<=1,(cs&3932160)===0&&(cs=262144),ne=e}else ne=536870912;return e=cn.current,e!==null&&(e.flags|=32),ne}function u(e,a,r){(e===me&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)&&(P(e,0),T(e,It,ne,!1)),eu(e,r),((ee&2)===0||e!==me)&&(e===me&&((ee&2)===0&&(dl|=r),pe===4&&T(e,It,ne,!1)),ns(e))}function h(e,a,r){if((ee&6)!==0)throw Error(l(327));var c=!r&&(a&127)===0&&(a&e.expiredLanes)===0||Is(e,a),p=c?Ys(e,a):oa(e,a,!0),x=c;do{if(p===0){Zt&&!c&&T(e,a,0,!1);break}else{if(r=e.current.alternate,x&&!S(r)){p=oa(e,a,!1),x=!1;continue}if(p===2){if(x=a,e.errorRecoveryDisabledLanes&x)var A=0;else A=e.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){a=A;t:{var D=e;p=oi;var Y=D.current.memoizedState.isDehydrated;if(Y&&(P(D,A).flags|=256),A=oa(D,A,!1),A!==2){if(Se&&!Y){D.errorRecoveryDisabledLanes|=x,dl|=x,p=4;break t}x=Gn,Gn=p,x!==null&&(Gn===null?Gn=x:Gn.push.apply(Gn,x))}p=A}if(x=!1,p!==2)continue}}if(p===1){P(e,0),T(e,a,0,!0);break}t:{switch(c=e,x=p,x){case 0:case 1:throw Error(l(345));case 4:if((a&4194048)!==a)break;case 6:T(c,a,ne,!Lt);break t;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((a&62914560)===a&&(p=ml+300-In(),10<p)){if(T(c,a,ne,!Lt),Fu(c,0,!0)!==0)break t;Ja=a,c.timeoutHandle=v0(y.bind(null,c,r,Gn,Bu,ra,a,ne,dl,Oa,Lt,x,"Throttled",-0,0),p);break t}y(c,r,Gn,Bu,ra,a,ne,dl,Oa,Lt,x,null,-0,0)}}break}while(!0);ns(e)}function y(e,a,r,c,p,x,A,D,Y,F,lt,ot,tt,it){if(e.timeoutHandle=-1,ot=a.subtreeFlags,ot&8192||(ot&16785408)===16785408){ot={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vi},ke(a,x,ot);var Et=(x&62914560)===x?ml-In():(x&4194048)===x?Uu-In():0;if(Et=XS(ot,Et),Et!==null){Ja=x,e.cancelPendingCommit=Et(Gt.bind(null,e,a,x,r,c,p,A,D,Y,lt,ot,null,tt,it)),T(e,x,A,!F);return}}Gt(e,a,x,r,c,p,A,D,Y)}function S(e){for(var a=e;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var c=0;c<r.length;c++){var p=r[c],x=p.getSnapshot;p=p.value;try{if(!Oe(x(),p))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===e)break;for(;a.sibling===null;){if(a.return===null||a.return===e)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function T(e,a,r,c){a&=~ri,a&=~dl,e.suspendedLanes|=a,e.pingedLanes&=~a,c&&(e.warmLanes|=a),c=e.expirationTimes;for(var p=a;0<p;){var x=31-Yn(p),A=1<<x;c[x]=-1,p&=~A}r!==0&&kc(e,r,a)}function N(){return(ee&6)===0?(mh(0),!1):!0}function q(){if(Qt!==null){if(Rt===0)var e=Qt.return;else e=Qt,Nn=el=null,Qf(e),Ql=null,Zl=0,e=Qt;for(;e!==null;)Us(e.alternate,e),e=e.return;Qt=null}}function P(e,a){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,ES(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),Ja=0,q(),me=e,Qt=r=Si(e.current,null),It=a,Rt=0,Jt=null,Lt=!1,Zt=Is(e,a),Se=!1,Oa=ne=ri=dl=Da=pe=0,Gn=oi=null,ra=!1,(a&8)!==0&&(a|=a&32);var c=e.entangledLanes;if(c!==0)for(e=e.entanglements,c&=a;0<c;){var p=31-Yn(c),x=1<<p;a|=e[p],c&=~x}return Je=a,Gl(),r}function ut(e,a){Ht=null,w.H=Ur,a===Vl||a===ii?(a=Qo(),Rt=3):a===Tr?(a=Qo(),Rt=4):Rt=a===uc?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Jt=a,Qt===null&&(pe=1,sc(e,ta(a,e.current)))}function yt(){var e=cn.current;return e===null?!0:(It&4194048)===It?Xa===null:(It&62914560)===It||(It&536870912)!==0?e===Xa:!1}function St(){var e=w.H;return w.H=Ur,e===null?Ur:e}function bt(){var e=w.A;return w.A=mc,e}function qt(){pe=4,Lt||(It&4194048)!==It&&cn.current!==null||(Zt=!0),(Da&134217727)===0&&(dl&134217727)===0||me===null||T(me,It,ne,!1)}function oa(e,a,r){var c=ee;ee|=2;var p=St(),x=bt();(me!==e||It!==a)&&(Bu=null,P(e,a)),a=!1;var A=pe;t:do try{if(Rt!==0&&Qt!==null){var D=Qt,Y=Jt;switch(Rt){case 8:q(),A=6;break t;case 3:case 2:case 9:case 6:cn.current===null&&(a=!0);var F=Rt;if(Rt=0,Jt=null,mt(e,D,Y,F),r&&Zt){A=0;break t}break;default:F=Rt,Rt=0,Jt=null,mt(e,D,Y,F)}}Kr(),A=pe;break}catch(lt){ut(e,lt)}while(!0);return a&&e.shellSuspendCounter++,Nn=el=null,ee=c,w.H=p,w.A=x,Qt===null&&(me=null,It=0,Gl()),A}function Kr(){for(;Qt!==null;)k(Qt)}function Ys(e,a){var r=ee;ee|=2;var c=St(),p=bt();me!==e||It!==a?(Bu=null,Na=In()+500,P(e,a)):Zt=Is(e,a);t:do try{if(Rt!==0&&Qt!==null){a=Qt;var x=Jt;e:switch(Rt){case 1:Rt=0,Jt=null,mt(e,a,x,1);break;case 2:case 9:if(Yd(x)){Rt=0,Jt=null,nt(a);break}a=function(){Rt!==2&&Rt!==9||me!==e||(Rt=7),ns(e)},x.then(a,a);break t;case 3:Rt=7;break t;case 4:Rt=5;break t;case 7:Yd(x)?(Rt=0,Jt=null,nt(a)):(Rt=0,Jt=null,mt(e,a,x,7));break;case 5:var A=null;switch(Qt.tag){case 26:A=Qt.memoizedState;case 5:case 27:var D=Qt;if(A?U0(A):D.stateNode.complete){Rt=0,Jt=null;var Y=D.sibling;if(Y!==null)Qt=Y;else{var F=D.return;F!==null?(Qt=F,At(F)):Qt=null}break e}}Rt=0,Jt=null,mt(e,a,x,5);break;case 6:Rt=0,Jt=null,mt(e,a,x,6);break;case 8:q(),pe=6;break t;default:throw Error(l(462))}}$();break}catch(lt){ut(e,lt)}while(!0);return Nn=el=null,w.H=c,w.A=p,ee=r,Qt!==null?0:(me=null,It=0,Gl(),pe)}function $(){for(;Qt!==null&&!Ap();)k(Qt)}function k(e){var a=rc(e.alternate,e,Je);e.memoizedProps=e.pendingProps,a===null?At(e):Qt=a}function nt(e){var a=e,r=a.alternate;switch(a.tag){case 15:case 0:a=Bn(r,a,a.pendingProps,a.type,void 0,It);break;case 11:a=Bn(r,a,a.pendingProps,a.type.render,a.ref,It);break;case 5:Qf(a);default:Us(r,a),a=Qt=On(a,Je),a=rc(r,a,Je)}e.memoizedProps=e.pendingProps,a===null?At(e):Qt=a}function mt(e,a,r,c){Nn=el=null,Qf(a),Ql=null,Zl=0;var p=a.return;try{if(Ta(e,p,a,r,It)){pe=1,sc(e,ta(r,e.current)),Qt=null;return}}catch(x){if(p!==null)throw Qt=p,x;pe=1,sc(e,ta(r,e.current)),Qt=null;return}a.flags&32768?($t||c===1?e=!0:Zt||(It&536870912)!==0?e=!1:(Lt=e=!0,(c===2||c===9||c===3||c===6)&&(c=cn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Ce(a,e)):At(a)}function At(e){var a=e;do{if((a.flags&32768)!==0){Ce(a,Lt);return}e=a.return;var r=fh(a.alternate,a,Je);if(r!==null){Qt=r;return}if(a=a.sibling,a!==null){Qt=a;return}Qt=a=e}while(a!==null);pe===0&&(pe=5)}function Ce(e,a){do{var r=oc(e.alternate,e);if(r!==null){r.flags&=32767,Qt=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(e=e.sibling,e!==null)){Qt=e;return}Qt=e=r}while(e!==null);pe=6,Qt=null}function Gt(e,a,r,c,p,x,A,D,Y){e.cancelPendingCommit=null;do gc();while(He!==0);if((ee&6)!==0)throw Error(l(327));if(a!==null){if(a===e.current)throw Error(l(177));if(x=a.lanes|a.childLanes,x|=Ho,rd(e,r,x,A,D,Y),e===me&&(Qt=me=null,It=0),Ua=a,ci=e,Ja=r,pl=x,Gs=p,yc=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fS(so,function(){return e0(),null})):(e.callbackNode=null,e.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=w.T,w.T=null,p=H.p,H.p=2,A=ee,ee|=4;try{Ou(e,a,r)}finally{ee=A,H.p=p,w.T=c}}He=1,ue(),hn(),re()}}function ue(){if(He===1){He=0;var e=ci,a=Ua,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=ee;ee|=4;try{ts(a,e);var x=kp,A=Oo(e.containerInfo),D=x.focusedElem,Y=x.selectionRange;if(A!==D&&D&&D.ownerDocument&&Do(D.ownerDocument.documentElement,D)){if(Y!==null&&cu(D)){var F=Y.start,lt=Y.end;if(lt===void 0&&(lt=F),"selectionStart"in D)D.selectionStart=F,D.selectionEnd=Math.min(lt,D.value.length);else{var ot=D.ownerDocument||document,tt=ot&&ot.defaultView||window;if(tt.getSelection){var it=tt.getSelection(),Et=D.textContent.length,wt=Math.min(Y.start,Et),Me=Y.end===void 0?wt:Math.min(Y.end,Et);!it.extend&&wt>Me&&(A=Me,Me=wt,wt=A);var J=xf(D,wt),V=xf(D,Me);if(J&&V&&(it.rangeCount!==1||it.anchorNode!==J.node||it.anchorOffset!==J.offset||it.focusNode!==V.node||it.focusOffset!==V.offset)){var W=ot.createRange();W.setStart(J.node,J.offset),it.removeAllRanges(),wt>Me?(it.addRange(W),it.extend(V.node,V.offset)):(W.setEnd(V.node,V.offset),it.addRange(W))}}}}for(ot=[],it=D;it=it.parentNode;)it.nodeType===1&&ot.push({element:it,left:it.scrollLeft,top:it.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;D<ot.length;D++){var rt=ot[D];rt.element.scrollLeft=rt.left,rt.element.scrollTop=rt.top}}Mm=!!Kp,kp=Kp=null}finally{ee=p,H.p=c,w.T=r}}e.current=a,He=2}}function hn(){if(He===2){He=0;var e=ci,a=Ua,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=w.T,w.T=null;var c=H.p;H.p=2;var p=ee;ee|=4;try{dm(e,a.alternate,a)}finally{ee=p,H.p=c,w.T=r}}He=3}}function re(){if(He===4||He===3){He=0,nd();var e=ci,a=Ua,r=Ja,c=yc;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?He=5:(He=0,Ua=ci=null,yl(e,e.pendingLanes));var p=e.pendingLanes;if(p===0&&(Bi=null),co(r),a=a.stateNode,Ie&&typeof Ie.onCommitFiberRoot=="function")try{Ie.onCommitFiberRoot(qa,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=w.T,p=H.p,H.p=2,w.T=null;try{for(var x=e.onRecoverableError,A=0;A<c.length;A++){var D=c[A];x(D.value,{componentStack:D.stack})}}finally{w.T=a,H.p=p}}(Ja&3)!==0&&gc(),ns(e),p=e.pendingLanes,(r&261930)!==0&&(p&42)!==0?e===qs?js++:(js=0,qs=e):js=0,mh(0)}}function yl(e,a){(e.pooledCacheLanes&=a)===0&&(a=e.pooledCache,a!=null&&(e.pooledCache=null,bn(a)))}function gc(){return ue(),hn(),re(),e0()}function e0(){if(He!==5)return!1;var e=ci,a=pl;pl=0;var r=co(Ja),c=w.T,p=H.p;try{H.p=32>r?32:r,w.T=null,r=Gs,Gs=null;var x=ci,A=Ja;if(He=0,Ua=ci=null,Ja=0,(ee&6)!==0)throw Error(l(331));var D=ee;if(ee|=4,Hs(x.current),we(x,x.current,A,r),ee=D,mh(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot=="function")try{Ie.onPostCommitFiberRoot(qa,x)}catch{}return!0}finally{H.p=p,w.T=c,yl(e,a)}}function n0(e,a,r){a=ta(r,a),a=ch(e.stateNode,a,2),e=ll(e,a,2),e!==null&&(eu(e,2),ns(e))}function Te(e,a,r){if(e.tag===3)n0(e,e,r);else for(;a!==null;){if(a.tag===3){n0(a,e,r);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Bi===null||!Bi.has(c))){e=ta(r,e),r=Au(2),c=ll(a,r,2),c!==null&&(ia(r,c,a,e),eu(c,2),ns(c));break}}a=a.return}}function Hp(e,a,r){var c=e.pingCache;if(c===null){c=e.pingCache=new pc;var p=new Set;c.set(a,p)}else p=c.get(a),p===void 0&&(p=new Set,c.set(a,p));p.has(r)||(Se=!0,p.add(r),e=rS.bind(null,e,a,r),a.then(e,e))}function rS(e,a,r){var c=e.pingCache;c!==null&&c.delete(a),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,me===e&&(It&r)===r&&(pe===4||pe===3&&(It&62914560)===It&&300>In()-ml?(ee&2)===0&&P(e,0):ri|=r,Oa===It&&(Oa=0)),ns(e)}function a0(e,a){a===0&&(a=$s()),e=jl(e,a),e!==null&&(eu(e,a),ns(e))}function oS(e){var a=e.memoizedState,r=0;a!==null&&(r=a.retryLane),a0(e,r)}function cS(e,a){var r=0;switch(e.tag){case 31:case 13:var c=e.stateNode,p=e.memoizedState;p!==null&&(r=p.retryLane);break;case 19:c=e.stateNode;break;case 22:c=e.stateNode._retryCache;break;default:throw Error(l(314))}c!==null&&c.delete(a),a0(e,r)}function fS(e,a){return ja(e,a)}var ym=null,vc=null,Gp=!1,gm=!1,jp=!1,wu=0;function ns(e){e!==vc&&e.next===null&&(vc===null?ym=vc=e:vc=vc.next=e),gm=!0,Gp||(Gp=!0,dS())}function mh(e,a){if(!jp&&gm){jp=!0;do for(var r=!1,c=ym;c!==null;){if(e!==0){var p=c.pendingLanes;if(p===0)var x=0;else{var A=c.suspendedLanes,D=c.pingedLanes;x=(1<<31-Yn(42|e)+1)-1,x&=p&~(A&~D),x=x&201326741?x&201326741|1:x?x|2:0}x!==0&&(r=!0,u0(c,x))}else x=It,x=Fu(c,c===me?x:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(x&3)===0||Is(c,x)||(r=!0,u0(c,x));c=c.next}while(r);jp=!1}}function hS(){i0()}function i0(){gm=Gp=!1;var e=0;wu!==0&&TS()&&(e=wu);for(var a=In(),r=null,c=ym;c!==null;){var p=c.next,x=l0(c,a);x===0?(c.next=null,r===null?ym=p:r.next=p,p===null&&(vc=r)):(r=c,(e!==0||(x&3)!==0)&&(gm=!0)),c=p}He!==0&&He!==5||mh(e),wu!==0&&(wu=0)}function l0(e,a){for(var r=e.suspendedLanes,c=e.pingedLanes,p=e.expirationTimes,x=e.pendingLanes&-62914561;0<x;){var A=31-Yn(x),D=1<<A,Y=p[A];Y===-1?((D&r)===0||(D&c)!==0)&&(p[A]=uo(D,a)):Y<=a&&(e.expiredLanes|=D),x&=~D}if(a=me,r=It,r=Fu(e,e===a?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c=e.callbackNode,r===0||e===a&&(Rt===2||Rt===9)||e.cancelPendingCommit!==null)return c!==null&&c!==null&&bl(c),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Is(e,r)){if(a=r&-r,a===e.callbackPriority)return a;switch(c!==null&&bl(c),co(r)){case 2:case 8:r=lo;break;case 32:r=so;break;case 268435456:r=sd;break;default:r=so}return c=s0.bind(null,e),r=ja(r,c),e.callbackPriority=a,e.callbackNode=r,a}return c!==null&&c!==null&&bl(c),e.callbackPriority=2,e.callbackNode=null,2}function s0(e,a){if(He!==0&&He!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(gc()&&e.callbackNode!==r)return null;var c=It;return c=Fu(e,e===me?c:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),c===0?null:(h(e,c,a),l0(e,In()),e.callbackNode!=null&&e.callbackNode===r?s0.bind(null,e):null)}function u0(e,a){if(gc())return null;h(e,a,!0)}function dS(){CS(function(){(ee&6)!==0?ja(id,hS):i0()})}function qp(){if(wu===0){var e=il;e===0&&(e=Pu,Pu<<=1,(Pu&261888)===0&&(Pu=256)),wu=e}return wu}function r0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ir(""+e)}function o0(e,a){var r=a.ownerDocument.createElement("input");return r.name=a.name,r.value=a.value,e.id&&r.setAttribute("form",e.id),a.parentNode.insertBefore(r,a),e=new FormData(e),r.parentNode.removeChild(r),e}function mS(e,a,r,c,p){if(a==="submit"&&r&&r.stateNode===p){var x=r0((p[Rn]||null).action),A=c.submitter;A&&(a=(a=A[Rn]||null)?r0(a.formAction):A.getAttribute("formAction"),a!==null&&(x=a,A=null));var D=new rr("action","action",null,c,p);e.push({event:D,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(wu!==0){var Y=A?o0(p,A):new FormData(p);lh(r,{pending:!0,data:Y,method:p.method,action:x},null,Y)}}else typeof x=="function"&&(D.preventDefault(),Y=A?o0(p,A):new FormData(p),lh(r,{pending:!0,data:Y,method:p.method,action:x},x,Y))},currentTarget:p}]})}}for(var Yp=0;Yp<wo.length;Yp++){var Lp=wo[Yp],pS=Lp.toLowerCase(),yS=Lp[0].toUpperCase()+Lp.slice(1);Dn(pS,"on"+yS)}Dn($n,"onAnimationEnd"),Dn(_f,"onAnimationIteration"),Dn(_i,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(mu,"onTransitionRun"),Dn(wl,"onTransitionStart"),Dn(Sf,"onTransitionCancel"),Dn(Bo,"onTransitionEnd"),El("onMouseEnter",["mouseout","mouseover"]),El("onMouseLeave",["mouseout","mouseover"]),El("onPointerEnter",["pointerout","pointerover"]),El("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ph="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ph));function c0(e,a){a=(a&4)!==0;for(var r=0;r<e.length;r++){var c=e[r],p=c.event;c=c.listeners;t:{var x=void 0;if(a)for(var A=c.length-1;0<=A;A--){var D=c[A],Y=D.instance,F=D.currentTarget;if(D=D.listener,Y!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=F;try{x(p)}catch(lt){Hl(lt)}p.currentTarget=null,x=Y}else for(A=0;A<c.length;A++){if(D=c[A],Y=D.instance,F=D.currentTarget,D=D.listener,Y!==x&&p.isPropagationStopped())break t;x=D,p.currentTarget=F;try{x(p)}catch(lt){Hl(lt)}p.currentTarget=null,x=Y}}}}function te(e,a){var r=a[fo];r===void 0&&(r=a[fo]=new Set);var c=e+"__bubble";r.has(c)||(f0(a,e,2,!1),r.add(c))}function Xp(e,a,r){var c=0;a&&(c|=4),f0(r,e,c,a)}var vm="_reactListening"+Math.random().toString(36).slice(2);function Vp(e){if(!e[vm]){e[vm]=!0,gi.forEach(function(r){r!=="selectionchange"&&(gS.has(r)||Xp(r,!1,e),Xp(r,!0,e))});var a=e.nodeType===9?e:e.ownerDocument;a===null||a[vm]||(a[vm]=!0,Xp("selectionchange",!1,a))}}function f0(e,a,r,c){switch(Y0(a)){case 2:var p=ZS;break;case 8:p=KS;break;default:p=iy}r=p.bind(null,a,r,e),p=void 0,!_o||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),c?p!==void 0?e.addEventListener(a,r,{capture:!0,passive:p}):e.addEventListener(a,r,!0):p!==void 0?e.addEventListener(a,r,{passive:p}):e.addEventListener(a,r,!1)}function Qp(e,a,r,c,p){var x=c;if((a&1)===0&&(a&2)===0&&c!==null)t:for(;;){if(c===null)return;var A=c.tag;if(A===3||A===4){var D=c.stateNode.containerInfo;if(D===p)break;if(A===4)for(A=c.return;A!==null;){var Y=A.tag;if((Y===3||Y===4)&&A.stateNode.containerInfo===p)return;A=A.return}for(;D!==null;){if(A=on(D),A===null)return;if(Y=A.tag,Y===5||Y===6||Y===26||Y===27){c=x=A;continue t}D=D.parentNode}}c=c.return}ef(function(){var F=x,lt=vo(r),ot=[];t:{var tt=Fi.get(e);if(tt!==void 0){var it=rr,Et=e;switch(e){case"keypress":if(ys(r)===0)break t;case"keydown":case"keyup":it=of;break;case"focusin":Et="focus",it=Co;break;case"focusout":Et="blur",it=Co;break;case"beforeblur":case"afterblur":it=Co;break;case"click":if(r.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":it=gd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":it=vd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":it=Pi;break;case $n:case _f:case _i:it=Sd;break;case Bo:it=Rp;break;case"scroll":case"scrollend":it=To;break;case"wheel":it=zl;break;case"copy":case"cut":case"paste":it=af;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":it=Ao;break;case"toggle":case"beforetoggle":it=ff}var wt=(a&4)!==0,Me=!wt&&(e==="scroll"||e==="scrollend"),J=wt?tt!==null?tt+"Capture":null:tt;wt=[];for(var V=F,W;V!==null;){var rt=V;if(W=rt.stateNode,rt=rt.tag,rt!==5&&rt!==26&&rt!==27||W===null||J===null||(rt=ps(V,J),rt!=null&&wt.push(yh(V,rt,W))),Me)break;V=V.return}0<wt.length&&(tt=new it(tt,Et,null,r,lt),ot.push({event:tt,listeners:wt}))}}if((a&7)===0){t:{if(tt=e==="mouseover"||e==="pointerover",it=e==="mouseout"||e==="pointerout",tt&&r!==lr&&(Et=r.relatedTarget||r.fromElement)&&(on(Et)||Et[Tl]))break t;if((it||tt)&&(tt=lt.window===lt?lt:(tt=lt.ownerDocument)?tt.defaultView||tt.parentWindow:window,it?(Et=r.relatedTarget||r.toElement,it=F,Et=Et?on(Et):null,Et!==null&&(Me=f(Et),wt=Et.tag,Et!==Me||wt!==5&&wt!==27&&wt!==6)&&(Et=null)):(it=null,Et=F),it!==Et)){if(wt=gd,rt="onMouseLeave",J="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(wt=Ao,rt="onPointerLeave",J="onPointerEnter",V="pointer"),Me=it==null?tt:Ki(it),W=Et==null?tt:Ki(Et),tt=new wt(rt,V+"leave",it,r,lt),tt.target=Me,tt.relatedTarget=W,rt=null,on(lt)===F&&(wt=new wt(J,V+"enter",Et,r,lt),wt.target=W,wt.relatedTarget=Me,rt=wt),Me=rt,it&&Et)e:{for(wt=vS,J=it,V=Et,W=0,rt=J;rt;rt=wt(rt))W++;rt=0;for(var zt=V;zt;zt=wt(zt))rt++;for(;0<W-rt;)J=wt(J),W--;for(;0<rt-W;)V=wt(V),rt--;for(;W--;){if(J===V||V!==null&&J===V.alternate){wt=J;break e}J=wt(J),V=wt(V)}wt=null}else wt=null;it!==null&&h0(ot,tt,it,wt,!1),Et!==null&&Me!==null&&h0(ot,Me,Et,wt,!0)}}t:{if(tt=F?Ki(F):window,it=tt.nodeName&&tt.nodeName.toLowerCase(),it==="select"||it==="input"&&tt.type==="file")var ye=yf;else if(mf(tt))if(mr)ye=Nd;else{ye=Nl;var Ct=pr}else it=tt.nodeName,!it||it.toLowerCase()!=="input"||tt.type!=="checkbox"&&tt.type!=="radio"?F&&ar(F.elementType)&&(ye=yf):ye=Od;if(ye&&(ye=ye(e,F))){zo(ot,ye,r,lt);break t}Ct&&Ct(e,tt,F),e==="focusout"&&F&&tt.type==="number"&&F.memoizedProps.value!=null&&yo(tt,"number",tt.value)}switch(Ct=F?Ki(F):window,e){case"focusin":(mf(Ct)||Ct.contentEditable==="true")&&(fu=Ct,No=F,hu=null);break;case"focusout":hu=No=fu=null;break;case"mousedown":va=!0;break;case"contextmenu":case"mouseup":case"dragend":va=!1,Uo(ot,r,lt);break;case"selectionchange":if(Ud)break;case"keydown":case"keyup":Uo(ot,r,lt)}var Kt;if(gs)t:{switch(e){case"compositionstart":var ae="onCompositionStart";break t;case"compositionend":ae="onCompositionEnd";break t;case"compositionupdate":ae="onCompositionUpdate";break t}ae=void 0}else Ol?Mo(e,r)&&(ae="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(ae="onCompositionStart");ae&&(Sn&&r.locale!=="ko"&&(Ol||ae!=="onCompositionStart"?ae==="onCompositionEnd"&&Ol&&(Kt=bo()):(Al=lt,So="value"in Al?Al.value:Al.textContent,Ol=!0)),Ct=xm(F,ae),0<Ct.length&&(ae=new lf(ae,e,null,r,lt),ot.push({event:ae,listeners:Ct}),Kt?ae.data=Kt:(Kt=lu(r),Kt!==null&&(ae.data=Kt)))),(Kt=vs?Ro(e,r):Rd(e,r))&&(ae=xm(F,"onBeforeInput"),0<ae.length&&(Ct=new lf("onBeforeInput","beforeinput",null,r,lt),ot.push({event:Ct,listeners:ae}),Ct.data=Kt)),mS(ot,e,F,r,lt)}c0(ot,a)})}function yh(e,a,r){return{instance:e,listener:a,currentTarget:r}}function xm(e,a){for(var r=a+"Capture",c=[];e!==null;){var p=e,x=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||x===null||(p=ps(e,r),p!=null&&c.unshift(yh(e,p,x)),p=ps(e,a),p!=null&&c.push(yh(e,p,x))),e.tag===3)return c;e=e.return}return[]}function vS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function h0(e,a,r,c,p){for(var x=a._reactName,A=[];r!==null&&r!==c;){var D=r,Y=D.alternate,F=D.stateNode;if(D=D.tag,Y!==null&&Y===c)break;D!==5&&D!==26&&D!==27||F===null||(Y=F,p?(F=ps(r,x),F!=null&&A.unshift(yh(r,F,Y))):p||(F=ps(r,x),F!=null&&A.push(yh(r,F,Y)))),r=r.return}A.length!==0&&e.push({event:a,listeners:A})}var xS=/\r\n?/g,_S=/\u0000|\uFFFD/g;function d0(e){return(typeof e=="string"?e:""+e).replace(xS,`
|
|
50
|
+
`).replace(_S,"")}function m0(e,a){return a=d0(a),d0(e)===a}function Ae(e,a,r,c,p,x){switch(r){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||ds(e,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&ds(e,""+c);break;case"className":er(e,"class",c);break;case"tabIndex":er(e,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":er(e,r,c);break;case"style":$c(e,c,x);break;case"data":if(a!=="object"){er(e,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||r!=="href")){e.removeAttribute(r);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=ir(""+c),e.setAttribute(r,c);break;case"action":case"formAction":if(typeof c=="function"){e.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof x=="function"&&(r==="formAction"?(a!=="input"&&Ae(e,a,"name",p.name,p,null),Ae(e,a,"formEncType",p.formEncType,p,null),Ae(e,a,"formMethod",p.formMethod,p,null),Ae(e,a,"formTarget",p.formTarget,p,null)):(Ae(e,a,"encType",p.encType,p,null),Ae(e,a,"method",p.method,p,null),Ae(e,a,"target",p.target,p,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){e.removeAttribute(r);break}c=ir(""+c),e.setAttribute(r,c);break;case"onClick":c!=null&&(e.onclick=vi);break;case"onScroll":c!=null&&te("scroll",e);break;case"onScrollEnd":c!=null&&te("scrollend",e);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"multiple":e.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":e.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){e.removeAttribute("xlink:href");break}r=ir(""+c),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,""+c):e.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":c===!0?e.setAttribute(r,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?e.setAttribute(r,c):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?e.setAttribute(r,c):e.removeAttribute(r);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?e.removeAttribute(r):e.setAttribute(r,c);break;case"popover":te("beforetoggle",e),te("toggle",e),tr(e,"popover",c);break;case"xlinkActuate":$a(e,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":$a(e,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":$a(e,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":$a(e,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":$a(e,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":$a(e,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":$a(e,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":$a(e,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":$a(e,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":tr(e,"is",c);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=pd.get(r)||r,tr(e,r,c))}}function Zp(e,a,r,c,p,x){switch(r){case"style":$c(e,c,x);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(l(61));if(r=c.__html,r!=null){if(p.children!=null)throw Error(l(60));e.innerHTML=r}}break;case"children":typeof c=="string"?ds(e,c):(typeof c=="number"||typeof c=="bigint")&&ds(e,""+c);break;case"onScroll":c!=null&&te("scroll",e);break;case"onScrollEnd":c!=null&&te("scrollend",e);break;case"onClick":c!=null&&(e.onclick=vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!$u.hasOwnProperty(r))t:{if(r[0]==="o"&&r[1]==="n"&&(p=r.endsWith("Capture"),a=r.slice(2,p?r.length-7:void 0),x=e[Rn]||null,x=x!=null?x[r]:null,typeof x=="function"&&e.removeEventListener(a,x,p),typeof c=="function")){typeof x!="function"&&x!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(a,c,p);break t}r in e?e[r]=c:c===!0?e.setAttribute(r,""):tr(e,r,c)}}}function Jn(e,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":te("error",e),te("load",e);var c=!1,p=!1,x;for(x in r)if(r.hasOwnProperty(x)){var A=r[x];if(A!=null)switch(x){case"src":c=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Ae(e,a,x,A,r,null)}}p&&Ae(e,a,"srcSet",r.srcSet,r,null),c&&Ae(e,a,"src",r.src,r,null);return;case"input":te("invalid",e);var D=x=A=p=null,Y=null,F=null;for(c in r)if(r.hasOwnProperty(c)){var lt=r[c];if(lt!=null)switch(c){case"name":p=lt;break;case"type":A=lt;break;case"checked":Y=lt;break;case"defaultChecked":F=lt;break;case"value":x=lt;break;case"defaultValue":D=lt;break;case"children":case"dangerouslySetInnerHTML":if(lt!=null)throw Error(l(137,a));break;default:Ae(e,a,c,lt,r,null)}}Fc(e,x,D,Y,F,A,p,!1);return;case"select":te("invalid",e),c=A=x=null;for(p in r)if(r.hasOwnProperty(p)&&(D=r[p],D!=null))switch(p){case"value":x=D;break;case"defaultValue":A=D;break;case"multiple":c=D;default:Ae(e,a,p,D,r,null)}a=x,r=A,e.multiple=!!c,a!=null?au(e,!!c,a,!1):r!=null&&au(e,!!c,r,!0);return;case"textarea":te("invalid",e),x=p=c=null;for(A in r)if(r.hasOwnProperty(A)&&(D=r[A],D!=null))switch(A){case"value":c=D;break;case"defaultValue":p=D;break;case"children":x=D;break;case"dangerouslySetInnerHTML":if(D!=null)throw Error(l(91));break;default:Ae(e,a,A,D,r,null)}hs(e,c,p,x);return;case"option":for(Y in r)if(r.hasOwnProperty(Y)&&(c=r[Y],c!=null))switch(Y){case"selected":e.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:Ae(e,a,Y,c,r,null)}return;case"dialog":te("beforetoggle",e),te("toggle",e),te("cancel",e),te("close",e);break;case"iframe":case"object":te("load",e);break;case"video":case"audio":for(c=0;c<ph.length;c++)te(ph[c],e);break;case"image":te("error",e),te("load",e);break;case"details":te("toggle",e);break;case"embed":case"source":case"link":te("error",e),te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(F in r)if(r.hasOwnProperty(F)&&(c=r[F],c!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,a));default:Ae(e,a,F,c,r,null)}return;default:if(ar(a)){for(lt in r)r.hasOwnProperty(lt)&&(c=r[lt],c!==void 0&&Zp(e,a,lt,c,r,void 0));return}}for(D in r)r.hasOwnProperty(D)&&(c=r[D],c!=null&&Ae(e,a,D,c,r,null))}function SS(e,a,r,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,x=null,A=null,D=null,Y=null,F=null,lt=null;for(it in r){var ot=r[it];if(r.hasOwnProperty(it)&&ot!=null)switch(it){case"checked":break;case"value":break;case"defaultValue":Y=ot;default:c.hasOwnProperty(it)||Ae(e,a,it,null,c,ot)}}for(var tt in c){var it=c[tt];if(ot=r[tt],c.hasOwnProperty(tt)&&(it!=null||ot!=null))switch(tt){case"type":x=it;break;case"name":p=it;break;case"checked":F=it;break;case"defaultChecked":lt=it;break;case"value":A=it;break;case"defaultValue":D=it;break;case"children":case"dangerouslySetInnerHTML":if(it!=null)throw Error(l(137,a));break;default:it!==ot&&Ae(e,a,tt,it,c,ot)}}po(e,A,D,Y,F,lt,x,p);return;case"select":it=A=D=tt=null;for(x in r)if(Y=r[x],r.hasOwnProperty(x)&&Y!=null)switch(x){case"value":break;case"multiple":it=Y;default:c.hasOwnProperty(x)||Ae(e,a,x,null,c,Y)}for(p in c)if(x=c[p],Y=r[p],c.hasOwnProperty(p)&&(x!=null||Y!=null))switch(p){case"value":tt=x;break;case"defaultValue":D=x;break;case"multiple":A=x;default:x!==Y&&Ae(e,a,p,x,c,Y)}a=D,r=A,c=it,tt!=null?au(e,!!r,tt,!1):!!c!=!!r&&(a!=null?au(e,!!r,a,!0):au(e,!!r,r?[]:"",!1));return;case"textarea":it=tt=null;for(D in r)if(p=r[D],r.hasOwnProperty(D)&&p!=null&&!c.hasOwnProperty(D))switch(D){case"value":break;case"children":break;default:Ae(e,a,D,null,c,p)}for(A in c)if(p=c[A],x=r[A],c.hasOwnProperty(A)&&(p!=null||x!=null))switch(A){case"value":tt=p;break;case"defaultValue":it=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(l(91));break;default:p!==x&&Ae(e,a,A,p,c,x)}Ic(e,tt,it);return;case"option":for(var Et in r)if(tt=r[Et],r.hasOwnProperty(Et)&&tt!=null&&!c.hasOwnProperty(Et))switch(Et){case"selected":e.selected=!1;break;default:Ae(e,a,Et,null,c,tt)}for(Y in c)if(tt=c[Y],it=r[Y],c.hasOwnProperty(Y)&&tt!==it&&(tt!=null||it!=null))switch(Y){case"selected":e.selected=tt&&typeof tt!="function"&&typeof tt!="symbol";break;default:Ae(e,a,Y,tt,c,it)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var wt in r)tt=r[wt],r.hasOwnProperty(wt)&&tt!=null&&!c.hasOwnProperty(wt)&&Ae(e,a,wt,null,c,tt);for(F in c)if(tt=c[F],it=r[F],c.hasOwnProperty(F)&&tt!==it&&(tt!=null||it!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(tt!=null)throw Error(l(137,a));break;default:Ae(e,a,F,tt,c,it)}return;default:if(ar(a)){for(var Me in r)tt=r[Me],r.hasOwnProperty(Me)&&tt!==void 0&&!c.hasOwnProperty(Me)&&Zp(e,a,Me,void 0,c,tt);for(lt in c)tt=c[lt],it=r[lt],!c.hasOwnProperty(lt)||tt===it||tt===void 0&&it===void 0||Zp(e,a,lt,tt,c,it);return}}for(var J in r)tt=r[J],r.hasOwnProperty(J)&&tt!=null&&!c.hasOwnProperty(J)&&Ae(e,a,J,null,c,tt);for(ot in c)tt=c[ot],it=r[ot],!c.hasOwnProperty(ot)||tt===it||tt==null&&it==null||Ae(e,a,ot,tt,c,it)}function p0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,a=0,r=performance.getEntriesByType("resource"),c=0;c<r.length;c++){var p=r[c],x=p.transferSize,A=p.initiatorType,D=p.duration;if(x&&D&&p0(A)){for(A=0,D=p.responseEnd,c+=1;c<r.length;c++){var Y=r[c],F=Y.startTime;if(F>D)break;var lt=Y.transferSize,ot=Y.initiatorType;lt&&p0(ot)&&(Y=Y.responseEnd,A+=lt*(Y<D?1:(D-F)/(Y-F)))}if(--c,a+=8*(x+A)/(p.duration/1e3),e++,10<e)break}}if(0<e)return a/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Kp=null,kp=null;function _m(e){return e.nodeType===9?e:e.ownerDocument}function y0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function g0(e,a){if(e===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&a==="foreignObject"?0:e}function Jp(e,a){return e==="textarea"||e==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Pp=null;function TS(){var e=window.event;return e&&e.type==="popstate"?e===Pp?!1:(Pp=e,!0):(Pp=null,!1)}var v0=typeof setTimeout=="function"?setTimeout:void 0,ES=typeof clearTimeout=="function"?clearTimeout:void 0,x0=typeof Promise=="function"?Promise:void 0,CS=typeof queueMicrotask=="function"?queueMicrotask:typeof x0<"u"?function(e){return x0.resolve(null).then(e).catch(AS)}:v0;function AS(e){setTimeout(function(){throw e})}function Hu(e){return e==="head"}function _0(e,a){var r=a,c=0;do{var p=r.nextSibling;if(e.removeChild(r),p&&p.nodeType===8)if(r=p.data,r==="/$"||r==="/&"){if(c===0){e.removeChild(p),bc(a);return}c--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")c++;else if(r==="html")gh(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,gh(r);for(var x=r.firstChild;x;){var A=x.nextSibling,D=x.nodeName;x[fs]||D==="SCRIPT"||D==="STYLE"||D==="LINK"&&x.rel.toLowerCase()==="stylesheet"||r.removeChild(x),x=A}}else r==="body"&&gh(e.ownerDocument.body);r=p}while(r);bc(a)}function S0(e,a){var r=e;e=0;do{var c=r.nextSibling;if(r.nodeType===1?a?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(a?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=c}while(r)}function Wp(e){var a=e.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var r=a;switch(a=a.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Wp(r),Iu(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function MS(e,a,r,c){for(;e.nodeType===1;){var p=r;if(e.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(c){if(!e[fs])switch(a){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(x=e.getAttribute("rel"),x==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(x!==p.rel||e.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||e.getAttribute("title")!==(p.title==null?null:p.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(x=e.getAttribute("src"),(x!==(p.src==null?null:p.src)||e.getAttribute("type")!==(p.type==null?null:p.type)||e.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&x&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(a==="input"&&e.type==="hidden"){var x=p.name==null?null:""+p.name;if(p.type==="hidden"&&e.getAttribute("name")===x)return e}else return e;if(e=wi(e.nextSibling),e===null)break}return null}function RS(e,a,r){if(a==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=wi(e.nextSibling),e===null))return null;return e}function b0(e,a){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=wi(e.nextSibling),e===null))return null;return e}function Fp(e){return e.data==="$?"||e.data==="$~"}function Ip(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function zS(e,a){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=a;else if(e.data!=="$?"||r.readyState!=="loading")a();else{var c=function(){a(),r.removeEventListener("DOMContentLoaded",c)};r.addEventListener("DOMContentLoaded",c),e._reactRetry=c}}function wi(e){for(;e!=null;e=e.nextSibling){var a=e.nodeType;if(a===1||a===3)break;if(a===8){if(a=e.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return e}var $p=null;function T0(e){e=e.nextSibling;for(var a=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(a===0)return wi(e.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}e=e.nextSibling}return null}function E0(e){e=e.previousSibling;for(var a=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(a===0)return e;a--}else r!=="/$"&&r!=="/&"||a++}e=e.previousSibling}return null}function C0(e,a,r){switch(a=_m(r),e){case"html":if(e=a.documentElement,!e)throw Error(l(452));return e;case"head":if(e=a.head,!e)throw Error(l(453));return e;case"body":if(e=a.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function gh(e){for(var a=e.attributes;a.length;)e.removeAttributeNode(a[0]);Iu(e)}var Hi=new Map,A0=new Set;function Sm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ls=H.d;H.d={f:DS,r:OS,D:NS,C:US,L:BS,m:wS,X:GS,S:HS,M:jS};function DS(){var e=Ls.f(),a=N();return e||a}function OS(e){var a=ze(e);a!==null&&a.tag===5&&a.type==="form"?sh(a):Ls.r(e)}var xc=typeof document>"u"?null:document;function M0(e,a,r){var c=xc;if(c&&typeof a=="string"&&a){var p=ya(a);p='link[rel="'+e+'"][href="'+p+'"]',typeof r=="string"&&(p+='[crossorigin="'+r+'"]'),A0.has(p)||(A0.add(p),e={rel:e,crossOrigin:r,href:a},c.querySelector(p)===null&&(a=c.createElement("link"),Jn(a,"link",e),$e(a),c.head.appendChild(a)))}}function NS(e){Ls.D(e),M0("dns-prefetch",e,null)}function US(e,a){Ls.C(e,a),M0("preconnect",e,a)}function BS(e,a,r){Ls.L(e,a,r);var c=xc;if(c&&e&&a){var p='link[rel="preload"][as="'+ya(a)+'"]';a==="image"&&r&&r.imageSrcSet?(p+='[imagesrcset="'+ya(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(p+='[imagesizes="'+ya(r.imageSizes)+'"]')):p+='[href="'+ya(e)+'"]';var x=p;switch(a){case"style":x=_c(e);break;case"script":x=Sc(e)}Hi.has(x)||(e=b({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:e,as:a},r),Hi.set(x,e),c.querySelector(p)!==null||a==="style"&&c.querySelector(vh(x))||a==="script"&&c.querySelector(xh(x))||(a=c.createElement("link"),Jn(a,"link",e),$e(a),c.head.appendChild(a)))}}function wS(e,a){Ls.m(e,a);var r=xc;if(r&&e){var c=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+ya(c)+'"][href="'+ya(e)+'"]',x=p;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":x=Sc(e)}if(!Hi.has(x)&&(e=b({rel:"modulepreload",href:e},a),Hi.set(x,e),r.querySelector(p)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(xh(x)))return}c=r.createElement("link"),Jn(c,"link",e),$e(c),r.head.appendChild(c)}}}function HS(e,a,r){Ls.S(e,a,r);var c=xc;if(c&&e){var p=ki(c).hoistableStyles,x=_c(e);a=a||"default";var A=p.get(x);if(!A){var D={loading:0,preload:null};if(A=c.querySelector(vh(x)))D.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":a},r),(r=Hi.get(x))&&ty(e,r);var Y=A=c.createElement("link");$e(Y),Jn(Y,"link",e),Y._p=new Promise(function(F,lt){Y.onload=F,Y.onerror=lt}),Y.addEventListener("load",function(){D.loading|=1}),Y.addEventListener("error",function(){D.loading|=2}),D.loading|=4,bm(A,a,c)}A={type:"stylesheet",instance:A,count:1,state:D},p.set(x,A)}}}function GS(e,a){Ls.X(e,a);var r=xc;if(r&&e){var c=ki(r).hoistableScripts,p=Sc(e),x=c.get(p);x||(x=r.querySelector(xh(p)),x||(e=b({src:e,async:!0},a),(a=Hi.get(p))&&ey(e,a),x=r.createElement("script"),$e(x),Jn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function jS(e,a){Ls.M(e,a);var r=xc;if(r&&e){var c=ki(r).hoistableScripts,p=Sc(e),x=c.get(p);x||(x=r.querySelector(xh(p)),x||(e=b({src:e,async:!0,type:"module"},a),(a=Hi.get(p))&&ey(e,a),x=r.createElement("script"),$e(x),Jn(x,"link",e),r.head.appendChild(x)),x={type:"script",instance:x,count:1,state:null},c.set(p,x))}}function R0(e,a,r,c){var p=(p=Ot.current)?Sm(p):null;if(!p)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=_c(r.href),r=ki(p).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=_c(r.href);var x=ki(p).hoistableStyles,A=x.get(e);if(A||(p=p.ownerDocument||p,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},x.set(e,A),(x=p.querySelector(vh(e)))&&!x._p&&(A.instance=x,A.state.loading=5),Hi.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Hi.set(e,r),x||qS(p,e,r,A.state))),a&&c===null)throw Error(l(528,""));return A}if(a&&c!==null)throw Error(l(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Sc(r),r=ki(p).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function _c(e){return'href="'+ya(e)+'"'}function vh(e){return'link[rel="stylesheet"]['+e+"]"}function z0(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function qS(e,a,r,c){e.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=e.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),Jn(a,"link",r),$e(a),e.head.appendChild(a))}function Sc(e){return'[src="'+ya(e)+'"]'}function xh(e){return"script[async]"+e}function D0(e,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var c=e.querySelector('style[data-href~="'+ya(r.href)+'"]');if(c)return a.instance=c,$e(c),c;var p=b({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return c=(e.ownerDocument||e).createElement("style"),$e(c),Jn(c,"style",p),bm(c,r.precedence,e),a.instance=c;case"stylesheet":p=_c(r.href);var x=e.querySelector(vh(p));if(x)return a.state.loading|=4,a.instance=x,$e(x),x;c=z0(r),(p=Hi.get(p))&&ty(c,p),x=(e.ownerDocument||e).createElement("link"),$e(x);var A=x;return A._p=new Promise(function(D,Y){A.onload=D,A.onerror=Y}),Jn(x,"link",c),a.state.loading|=4,bm(x,r.precedence,e),a.instance=x;case"script":return x=Sc(r.src),(p=e.querySelector(xh(x)))?(a.instance=p,$e(p),p):(c=r,(p=Hi.get(x))&&(c=b({},r),ey(c,p)),e=e.ownerDocument||e,p=e.createElement("script"),$e(p),Jn(p,"link",c),e.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(l(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,bm(c,r.precedence,e));return a.instance}function bm(e,a,r){for(var c=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=c.length?c[c.length-1]:null,x=p,A=0;A<c.length;A++){var D=c[A];if(D.dataset.precedence===a)x=D;else if(x!==p)break}x?x.parentNode.insertBefore(e,x.nextSibling):(a=r.nodeType===9?r.head:r,a.insertBefore(e,a.firstChild))}function ty(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.title==null&&(e.title=a.title)}function ey(e,a){e.crossOrigin==null&&(e.crossOrigin=a.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=a.referrerPolicy),e.integrity==null&&(e.integrity=a.integrity)}var Tm=null;function O0(e,a,r){if(Tm===null){var c=new Map,p=Tm=new Map;p.set(r,c)}else p=Tm,c=p.get(r),c||(c=new Map,p.set(r,c));if(c.has(e))return c;for(c.set(e,null),r=r.getElementsByTagName(e),p=0;p<r.length;p++){var x=r[p];if(!(x[fs]||x[Wt]||e==="link"&&x.getAttribute("rel")==="stylesheet")&&x.namespaceURI!=="http://www.w3.org/2000/svg"){var A=x.getAttribute(a)||"";A=e+A;var D=c.get(A);D?D.push(x):c.set(A,[x])}}return c}function N0(e,a,r){e=e.ownerDocument||e,e.head.insertBefore(r,a==="title"?e.querySelector("head > title"):null)}function YS(e,a,r){if(r===1||a.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;switch(a.rel){case"stylesheet":return e=a.disabled,typeof a.precedence=="string"&&e==null;default:return!0}case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function U0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function LS(e,a,r,c){if(r.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var p=_c(c.href),x=a.querySelector(vh(p));if(x){a=x._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(e.count++,e=Em.bind(e),a.then(e,e)),r.state.loading|=4,r.instance=x,$e(x);return}x=a.ownerDocument||a,c=z0(c),(p=Hi.get(p))&&ty(c,p),x=x.createElement("link"),$e(x);var A=x;A._p=new Promise(function(D,Y){A.onload=D,A.onerror=Y}),Jn(x,"link",c),r.instance=x}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Em.bind(e),a.addEventListener("load",r),a.addEventListener("error",r))}}var ny=0;function XS(e,a){return e.stylesheets&&e.count===0&&Am(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var c=setTimeout(function(){if(e.stylesheets&&Am(e,e.stylesheets),e.unsuspend){var x=e.unsuspend;e.unsuspend=null,x()}},6e4+a);0<e.imgBytes&&ny===0&&(ny=62500*bS());var p=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Am(e,e.stylesheets),e.unsuspend)){var x=e.unsuspend;e.unsuspend=null,x()}},(e.imgBytes>ny?50:800)+a);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(c),clearTimeout(p)}}:null}function Em(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Am(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cm=null;function Am(e,a){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cm=new Map,a.forEach(VS,e),Cm=null,Em.call(e))}function VS(e,a){if(!(a.state.loading&4)){var r=Cm.get(e);if(r)var c=r.get(null);else{r=new Map,Cm.set(e,r);for(var p=e.querySelectorAll("link[data-precedence],style[data-precedence]"),x=0;x<p.length;x++){var A=p[x];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(r.set(A.dataset.precedence,A),c=A)}c&&r.set(null,c)}p=a.instance,A=p.getAttribute("data-precedence"),x=r.get(A)||c,x===c&&r.set(null,p),r.set(A,p),this.count++,c=Em.bind(this),p.addEventListener("load",c),p.addEventListener("error",c),x?x.parentNode.insertBefore(p,x.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(p,e.firstChild)),a.state.loading|=4}}var _h={$$typeof:U,Provider:null,Consumer:null,_currentValue:at,_currentValue2:at,_threadCount:0};function QS(e,a,r,c,p,x,A,D,Y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=tu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=tu(0),this.hiddenUpdates=tu(null),this.identifierPrefix=c,this.onUncaughtError=p,this.onCaughtError=x,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Y,this.incompleteTransitions=new Map}function B0(e,a,r,c,p,x,A,D,Y,F,lt,ot){return e=new QS(e,a,r,A,Y,F,lt,ot,D),a=1,x===!0&&(a|=24),x=Xn(3,null,null,a),e.current=x,x.stateNode=e,a=Rf(),a.refCount++,e.pooledCache=a,a.refCount++,x.memoizedState={element:c,isDehydrated:r,cache:a},Bf(x),e}function w0(e){return e?(e=ql,e):ql}function H0(e,a,r,c,p,x){p=w0(p),c.context===null?c.context=p:c.pendingContext=p,c=Ai(a),c.payload={element:r},x=x===void 0?null:x,x!==null&&(c.callback=x),r=ll(e,c,a),r!==null&&(u(r,e,a),kl(r,e,a))}function G0(e,a){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<a?r:a}}function ay(e,a){G0(e,a),(e=e.alternate)&&G0(e,a)}function j0(e){if(e.tag===13||e.tag===31){var a=jl(e,67108864);a!==null&&u(a,e,67108864),ay(e,67108864)}}function q0(e){if(e.tag===13||e.tag===31){var a=kn();a=pi(a);var r=jl(e,a);r!==null&&u(r,e,a),ay(e,a)}}var Mm=!0;function ZS(e,a,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=2,iy(e,a,r,c)}finally{H.p=x,w.T=p}}function KS(e,a,r,c){var p=w.T;w.T=null;var x=H.p;try{H.p=8,iy(e,a,r,c)}finally{H.p=x,w.T=p}}function iy(e,a,r,c){if(Mm){var p=ly(c);if(p===null)Qp(e,a,c,Rm,r),L0(e,c);else if(JS(p,e,a,r,c))c.stopPropagation();else if(L0(e,c),a&4&&-1<kS.indexOf(e)){for(;p!==null;){var x=ze(p);if(x!==null)switch(x.tag){case 3:if(x=x.stateNode,x.current.memoizedState.isDehydrated){var A=mi(x.pendingLanes);if(A!==0){var D=x;for(D.pendingLanes|=2,D.entangledLanes|=2;A;){var Y=1<<31-Yn(A);D.entanglements[1]|=Y,A&=~Y}ns(x),(ee&6)===0&&(Na=In()+500,mh(0))}}break;case 31:case 13:D=jl(x,2),D!==null&&u(D,x,2),N(),ay(x,2)}if(x=ly(c),x===null&&Qp(e,a,c,Rm,r),x===p)break;p=x}p!==null&&c.stopPropagation()}else Qp(e,a,c,null,r)}}function ly(e){return e=vo(e),sy(e)}var Rm=null;function sy(e){if(Rm=null,e=on(e),e!==null){var a=f(e);if(a===null)e=null;else{var r=a.tag;if(r===13){if(e=d(a),e!==null)return e;e=null}else if(r===31){if(e=m(a),e!==null)return e;e=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;e=null}else a!==e&&(e=null)}}return Rm=e,null}function Y0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ad()){case id:return 2;case lo:return 8;case so:case ld:return 32;case sd:return 268435456;default:return 32}default:return 32}}var uy=!1,Gu=null,ju=null,qu=null,Sh=new Map,bh=new Map,Yu=[],kS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function L0(e,a){switch(e){case"focusin":case"focusout":Gu=null;break;case"dragenter":case"dragleave":ju=null;break;case"mouseover":case"mouseout":qu=null;break;case"pointerover":case"pointerout":Sh.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":bh.delete(a.pointerId)}}function Th(e,a,r,c,p,x){return e===null||e.nativeEvent!==x?(e={blockedOn:a,domEventName:r,eventSystemFlags:c,nativeEvent:x,targetContainers:[p]},a!==null&&(a=ze(a),a!==null&&j0(a)),e):(e.eventSystemFlags|=c,a=e.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),e)}function JS(e,a,r,c,p){switch(a){case"focusin":return Gu=Th(Gu,e,a,r,c,p),!0;case"dragenter":return ju=Th(ju,e,a,r,c,p),!0;case"mouseover":return qu=Th(qu,e,a,r,c,p),!0;case"pointerover":var x=p.pointerId;return Sh.set(x,Th(Sh.get(x)||null,e,a,r,c,p)),!0;case"gotpointercapture":return x=p.pointerId,bh.set(x,Th(bh.get(x)||null,e,a,r,c,p)),!0}return!1}function X0(e){var a=on(e.target);if(a!==null){var r=f(a);if(r!==null){if(a=r.tag,a===13){if(a=d(r),a!==null){e.blockedOn=a,yi(e.priority,function(){q0(r)});return}}else if(a===31){if(a=m(r),a!==null){e.blockedOn=a,yi(e.priority,function(){q0(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zm(e){if(e.blockedOn!==null)return!1;for(var a=e.targetContainers;0<a.length;){var r=ly(e.nativeEvent);if(r===null){r=e.nativeEvent;var c=new r.constructor(r.type,r);lr=c,r.target.dispatchEvent(c),lr=null}else return a=ze(r),a!==null&&j0(a),e.blockedOn=r,!1;a.shift()}return!0}function V0(e,a,r){zm(e)&&r.delete(a)}function PS(){uy=!1,Gu!==null&&zm(Gu)&&(Gu=null),ju!==null&&zm(ju)&&(ju=null),qu!==null&&zm(qu)&&(qu=null),Sh.forEach(V0),bh.forEach(V0)}function Dm(e,a){e.blockedOn===a&&(e.blockedOn=null,uy||(uy=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,PS)))}var Om=null;function Q0(e){Om!==e&&(Om=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Om===e&&(Om=null);for(var a=0;a<e.length;a+=3){var r=e[a],c=e[a+1],p=e[a+2];if(typeof c!="function"){if(sy(c||r)===null)continue;break}var x=ze(r);x!==null&&(e.splice(a,3),a-=3,lh(x,{pending:!0,data:p,method:r.method,action:c},c,p))}}))}function bc(e){function a(Y){return Dm(Y,e)}Gu!==null&&Dm(Gu,e),ju!==null&&Dm(ju,e),qu!==null&&Dm(qu,e),Sh.forEach(a),bh.forEach(a);for(var r=0;r<Yu.length;r++){var c=Yu[r];c.blockedOn===e&&(c.blockedOn=null)}for(;0<Yu.length&&(r=Yu[0],r.blockedOn===null);)X0(r),r.blockedOn===null&&Yu.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(c=0;c<r.length;c+=3){var p=r[c],x=r[c+1],A=p[Rn]||null;if(typeof x=="function")A||Q0(r);else if(A){var D=null;if(x&&x.hasAttribute("formAction")){if(p=x,A=x[Rn]||null)D=A.formAction;else if(sy(p)!==null)continue}else D=A.action;typeof D=="function"?r[c+1]=D:(r.splice(c,3),c-=3),Q0(r)}}}function Z0(){function e(x){x.canIntercept&&x.info==="react-transition"&&x.intercept({handler:function(){return new Promise(function(A){return p=A})},focusReset:"manual",scroll:"manual"})}function a(){p!==null&&(p(),p=null),c||setTimeout(r,20)}function r(){if(!c&&!navigation.transition){var x=navigation.currentEntry;x&&x.url!=null&&navigation.navigate(x.url,{state:x.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,p=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){c=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}function ry(e){this._internalRoot=e}Nm.prototype.render=ry.prototype.render=function(e){var a=this._internalRoot;if(a===null)throw Error(l(409));var r=a.current,c=kn();H0(r,c,e,a,null,null)},Nm.prototype.unmount=ry.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var a=e.containerInfo;H0(e.current,2,null,e,null,null),N(),a[Tl]=null}};function Nm(e){this._internalRoot=e}Nm.prototype.unstable_scheduleHydration=function(e){if(e){var a=Zi();e={blockedOn:null,target:e,priority:a};for(var r=0;r<Yu.length&&a!==0&&a<Yu[r].priority;r++);Yu.splice(r,0,e),r===0&&X0(e)}};var K0=t.version;if(K0!=="19.2.4")throw Error(l(527,K0,"19.2.4"));H.findDOMNode=function(e){var a=e._reactInternals;if(a===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=v(a),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var WS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:w,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Um=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Um.isDisabled&&Um.supportsFiber)try{qa=Um.inject(WS),Ie=Um}catch{}}return Ch.createRoot=function(e,a){if(!o(e))throw Error(l(299));var r=!1,c="",p=oh,x=fm,A=lc;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError)),a=B0(e,1,!1,null,null,r,c,null,p,x,A,Z0),e[Tl]=a.current,Vp(e),new ry(a)},Ch.hydrateRoot=function(e,a,r){if(!o(e))throw Error(l(299));var c=!1,p="",x=oh,A=fm,D=lc,Y=null;return r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(p=r.identifierPrefix),r.onUncaughtError!==void 0&&(x=r.onUncaughtError),r.onCaughtError!==void 0&&(A=r.onCaughtError),r.onRecoverableError!==void 0&&(D=r.onRecoverableError),r.formState!==void 0&&(Y=r.formState)),a=B0(e,1,!0,a,r??null,c,p,Y,x,A,D,Z0),a.context=w0(null),r=a.current,c=kn(),c=pi(c),p=Ai(c),p.callback=null,ll(r,p,c),r=c,a.current.lanes=r,eu(a,r),ns(a),e[Tl]=a.current,Vp(e),new Nm(a)},Ch.version="19.2.4",Ch}var nv;function sb(){if(nv)return fy.exports;nv=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(t){console.error(t)}}return i(),fy.exports=lb(),fy.exports}var ub=sb();/**
|
|
51
|
+
* react-router v7.13.1
|
|
52
|
+
*
|
|
53
|
+
* Copyright (c) Remix Software Inc.
|
|
54
|
+
*
|
|
55
|
+
* This source code is licensed under the MIT license found in the
|
|
56
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
57
|
+
*
|
|
58
|
+
* @license MIT
|
|
59
|
+
*/var av="popstate";function iv(i){return typeof i=="object"&&i!=null&&"pathname"in i&&"search"in i&&"hash"in i&&"state"in i&&"key"in i}function rb(i={}){function t(l,o){var v;let f=(v=o.state)==null?void 0:v.masked,{pathname:d,search:m,hash:g}=f||l.location;return $y("",{pathname:d,search:m,hash:g},o.state&&o.state.usr||null,o.state&&o.state.key||"default",f?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function n(l,o){return typeof o=="string"?o:Qh(o)}return cb(t,n,null,i)}function Ve(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function _l(i,t){if(!i){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ob(){return Math.random().toString(36).substring(2,10)}function lv(i,t){return{usr:i.state,key:i.key,idx:t,masked:i.unstable_mask?{pathname:i.pathname,search:i.search,hash:i.hash}:void 0}}function $y(i,t,n=null,l,o){return{pathname:typeof i=="string"?i:i.pathname,search:"",hash:"",...typeof t=="string"?Xc(t):t,state:n,key:t&&t.key||l||ob(),unstable_mask:o}}function Qh({pathname:i="/",search:t="",hash:n=""}){return t&&t!=="?"&&(i+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(i+=n.charAt(0)==="#"?n:"#"+n),i}function Xc(i){let t={};if(i){let n=i.indexOf("#");n>=0&&(t.hash=i.substring(n),i=i.substring(0,n));let l=i.indexOf("?");l>=0&&(t.search=i.substring(l),i=i.substring(0,l)),i&&(t.pathname=i)}return t}function cb(i,t,n,l={}){let{window:o=document.defaultView,v5Compat:f=!1}=l,d=o.history,m="POP",g=null,v=_();v==null&&(v=0,d.replaceState({...d.state,idx:v},""));function _(){return(d.state||{idx:null}).idx}function b(){m="POP";let z=_(),O=z==null?null:z-v;v=z,g&&g({action:m,location:R.location,delta:O})}function C(z,O){m="PUSH";let B=iv(z)?z:$y(R.location,z,O);v=_()+1;let U=lv(B,v),G=R.createHref(B.unstable_mask||B);try{d.pushState(U,"",G)}catch(Z){if(Z instanceof DOMException&&Z.name==="DataCloneError")throw Z;o.location.assign(G)}f&&g&&g({action:m,location:R.location,delta:1})}function E(z,O){m="REPLACE";let B=iv(z)?z:$y(R.location,z,O);v=_();let U=lv(B,v),G=R.createHref(B.unstable_mask||B);d.replaceState(U,"",G),f&&g&&g({action:m,location:R.location,delta:0})}function M(z){return fb(z)}let R={get action(){return m},get location(){return i(o,d)},listen(z){if(g)throw new Error("A history only accepts one active listener");return o.addEventListener(av,b),g=z,()=>{o.removeEventListener(av,b),g=null}},createHref(z){return t(o,z)},createURL:M,encodeLocation(z){let O=M(z);return{pathname:O.pathname,search:O.search,hash:O.hash}},push:C,replace:E,go(z){return d.go(z)}};return R}function fb(i,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ve(n,"No window.location.(origin|href) available to create URL");let l=typeof i=="string"?i:Qh(i);return l=l.replace(/ $/,"%20"),!t&&l.startsWith("//")&&(l=n+l),new URL(l,n)}function tx(i,t,n="/"){return hb(i,t,n,!1)}function hb(i,t,n,l){let o=typeof t=="string"?Xc(t):t,f=Ps(o.pathname||"/",n);if(f==null)return null;let d=ex(i);db(d);let m=null;for(let g=0;m==null&&g<d.length;++g){let v=Eb(f);m=bb(d[g],v,l)}return m}function ex(i,t=[],n=[],l="",o=!1){let f=(d,m,g=o,v)=>{let _={relativePath:v===void 0?d.path||"":v,caseSensitive:d.caseSensitive===!0,childrenIndex:m,route:d};if(_.relativePath.startsWith("/")){if(!_.relativePath.startsWith(l)&&g)return;Ve(_.relativePath.startsWith(l),`Absolute route path "${_.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),_.relativePath=_.relativePath.slice(l.length)}let b=ls([l,_.relativePath]),C=n.concat(_);d.children&&d.children.length>0&&(Ve(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${b}".`),ex(d.children,t,C,b,g)),!(d.path==null&&!d.index)&&t.push({path:b,score:_b(b,d.index),routesMeta:C})};return i.forEach((d,m)=>{var g;if(d.path===""||!((g=d.path)!=null&&g.includes("?")))f(d,m);else for(let v of nx(d.path))f(d,m,!0,v)}),t}function nx(i){let t=i.split("/");if(t.length===0)return[];let[n,...l]=t,o=n.endsWith("?"),f=n.replace(/\?$/,"");if(l.length===0)return o?[f,""]:[f];let d=nx(l.join("/")),m=[];return m.push(...d.map(g=>g===""?f:[f,g].join("/"))),o&&m.push(...d),m.map(g=>i.startsWith("/")&&g===""?"/":g)}function db(i){i.sort((t,n)=>t.score!==n.score?n.score-t.score:Sb(t.routesMeta.map(l=>l.childrenIndex),n.routesMeta.map(l=>l.childrenIndex)))}var mb=/^:[\w-]+$/,pb=3,yb=2,gb=1,vb=10,xb=-2,sv=i=>i==="*";function _b(i,t){let n=i.split("/"),l=n.length;return n.some(sv)&&(l+=xb),t&&(l+=yb),n.filter(o=>!sv(o)).reduce((o,f)=>o+(mb.test(f)?pb:f===""?gb:vb),l)}function Sb(i,t){return i.length===t.length&&i.slice(0,-1).every((l,o)=>l===t[o])?i[i.length-1]-t[t.length-1]:0}function bb(i,t,n=!1){let{routesMeta:l}=i,o={},f="/",d=[];for(let m=0;m<l.length;++m){let g=l[m],v=m===l.length-1,_=f==="/"?t:t.slice(f.length)||"/",b=sp({path:g.relativePath,caseSensitive:g.caseSensitive,end:v},_),C=g.route;if(!b&&v&&n&&!l[l.length-1].route.index&&(b=sp({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},_)),!b)return null;Object.assign(o,b.params),d.push({params:o,pathname:ls([f,b.pathname]),pathnameBase:Rb(ls([f,b.pathnameBase])),route:C}),b.pathnameBase!=="/"&&(f=ls([f,b.pathnameBase]))}return d}function sp(i,t){typeof i=="string"&&(i={path:i,caseSensitive:!1,end:!0});let[n,l]=Tb(i.path,i.caseSensitive,i.end),o=t.match(n);if(!o)return null;let f=o[0],d=f.replace(/(.)\/+$/,"$1"),m=o.slice(1);return{params:l.reduce((v,{paramName:_,isOptional:b},C)=>{if(_==="*"){let M=m[C]||"";d=f.slice(0,f.length-M.length).replace(/(.)\/+$/,"$1")}const E=m[C];return b&&!E?v[_]=void 0:v[_]=(E||"").replace(/%2F/g,"/"),v},{}),pathname:f,pathnameBase:d,pattern:i}}function Tb(i,t=!1,n=!0){_l(i==="*"||!i.endsWith("*")||i.endsWith("/*"),`Route path "${i}" will be treated as if it were "${i.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${i.replace(/\*$/,"/*")}".`);let l=[],o="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,m,g,v,_)=>{if(l.push({paramName:m,isOptional:g!=null}),g){let b=_.charAt(v+d.length);return b&&b!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return i.endsWith("*")?(l.push({paramName:"*"}),o+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":i!==""&&i!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),l]}function Eb(i){try{return i.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return _l(!1,`The URL path "${i}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),i}}function Ps(i,t){if(t==="/")return i;if(!i.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,l=i.charAt(n);return l&&l!=="/"?null:i.slice(n)||"/"}var Cb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Ab(i,t="/"){let{pathname:n,search:l="",hash:o=""}=typeof i=="string"?Xc(i):i,f;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?f=uv(n.substring(1),"/"):f=uv(n,t)):f=t,{pathname:f,search:zb(l),hash:Db(o)}}function uv(i,t){let n=t.replace(/\/+$/,"").split("/");return i.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function py(i,t,n,l){return`Cannot include a '${i}' character in a manually specified \`to.${t}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Mb(i){return i.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Rg(i){let t=Mb(i);return t.map((n,l)=>l===t.length-1?n.pathname:n.pathnameBase)}function yp(i,t,n,l=!1){let o;typeof i=="string"?o=Xc(i):(o={...i},Ve(!o.pathname||!o.pathname.includes("?"),py("?","pathname","search",o)),Ve(!o.pathname||!o.pathname.includes("#"),py("#","pathname","hash",o)),Ve(!o.search||!o.search.includes("#"),py("#","search","hash",o)));let f=i===""||o.pathname==="",d=f?"/":o.pathname,m;if(d==null)m=n;else{let b=t.length-1;if(!l&&d.startsWith("..")){let C=d.split("/");for(;C[0]==="..";)C.shift(),b-=1;o.pathname=C.join("/")}m=b>=0?t[b]:"/"}let g=Ab(o,m),v=d&&d!=="/"&&d.endsWith("/"),_=(f||d===".")&&n.endsWith("/");return!g.pathname.endsWith("/")&&(v||_)&&(g.pathname+="/"),g}var ls=i=>i.join("/").replace(/\/\/+/g,"/"),Rb=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),zb=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,Db=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i,Ob=class{constructor(i,t,n,l=!1){this.status=i,this.statusText=t||"",this.internal=l,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Nb(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}function Ub(i){return i.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var ax=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function ix(i,t){let n=i;if(typeof n!="string"||!Cb.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let l=n,o=!1;if(ax)try{let f=new URL(window.location.href),d=n.startsWith("//")?new URL(f.protocol+n):new URL(n),m=Ps(d.pathname,t);d.origin===f.origin&&m!=null?n=m+d.search+d.hash:o=!0}catch{_l(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:o,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var lx=["POST","PUT","PATCH","DELETE"];new Set(lx);var Bb=["GET",...lx];new Set(Bb);var Vc=X.createContext(null);Vc.displayName="DataRouter";var gp=X.createContext(null);gp.displayName="DataRouterState";var wb=X.createContext(!1),sx=X.createContext({isTransitioning:!1});sx.displayName="ViewTransition";var Hb=X.createContext(new Map);Hb.displayName="Fetchers";var Gb=X.createContext(null);Gb.displayName="Await";var di=X.createContext(null);di.displayName="Navigation";var Fh=X.createContext(null);Fh.displayName="Location";var Sl=X.createContext({outlet:null,matches:[],isDataRoute:!1});Sl.displayName="Route";var zg=X.createContext(null);zg.displayName="RouteError";var ux="REACT_ROUTER_ERROR",jb="REDIRECT",qb="ROUTE_ERROR_RESPONSE";function Yb(i){if(i.startsWith(`${ux}:${jb}:{`))try{let t=JSON.parse(i.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function Lb(i){if(i.startsWith(`${ux}:${qb}:{`))try{let t=JSON.parse(i.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Ob(t.status,t.statusText,t.data)}catch{}}function Xb(i,{relative:t}={}){Ve(Qc(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:l}=X.useContext(di),{hash:o,pathname:f,search:d}=Ih(i,{relative:t}),m=f;return n!=="/"&&(m=f==="/"?n:ls([n,f])),l.createHref({pathname:m,search:d,hash:o})}function Qc(){return X.useContext(Fh)!=null}function ss(){return Ve(Qc(),"useLocation() may be used only in the context of a <Router> component."),X.useContext(Fh).location}var rx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ox(i){X.useContext(di).static||X.useLayoutEffect(i)}function vp(){let{isDataRoute:i}=X.useContext(Sl);return i?a2():Vb()}function Vb(){Ve(Qc(),"useNavigate() may be used only in the context of a <Router> component.");let i=X.useContext(Vc),{basename:t,navigator:n}=X.useContext(di),{matches:l}=X.useContext(Sl),{pathname:o}=ss(),f=JSON.stringify(Rg(l)),d=X.useRef(!1);return ox(()=>{d.current=!0}),X.useCallback((g,v={})=>{if(_l(d.current,rx),!d.current)return;if(typeof g=="number"){n.go(g);return}let _=yp(g,JSON.parse(f),o,v.relative==="path");i==null&&t!=="/"&&(_.pathname=_.pathname==="/"?t:ls([t,_.pathname])),(v.replace?n.replace:n.push)(_,v.state,v)},[t,n,f,o,i])}var Qb=X.createContext(null);function Zb(i){let t=X.useContext(Sl).outlet;return X.useMemo(()=>t&&X.createElement(Qb.Provider,{value:i},t),[t,i])}function Ih(i,{relative:t}={}){let{matches:n}=X.useContext(Sl),{pathname:l}=ss(),o=JSON.stringify(Rg(n));return X.useMemo(()=>yp(i,JSON.parse(o),l,t==="path"),[i,o,l,t])}function Kb(i,t){return cx(i,t)}function cx(i,t,n){var z;Ve(Qc(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=X.useContext(di),{matches:o}=X.useContext(Sl),f=o[o.length-1],d=f?f.params:{},m=f?f.pathname:"/",g=f?f.pathnameBase:"/",v=f&&f.route;{let O=v&&v.path||"";hx(m,!v||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${O}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
60
|
+
|
|
61
|
+
Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let _=ss(),b;if(t){let O=typeof t=="string"?Xc(t):t;Ve(g==="/"||((z=O.pathname)==null?void 0:z.startsWith(g)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${g}" but pathname "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=_;let C=b.pathname||"/",E=C;if(g!=="/"){let O=g.replace(/^\//,"").split("/");E="/"+C.replace(/^\//,"").split("/").slice(O.length).join("/")}let M=tx(i,{pathname:E});_l(v||M!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),_l(M==null||M[M.length-1].route.element!==void 0||M[M.length-1].route.Component!==void 0||M[M.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let R=Fb(M&&M.map(O=>Object.assign({},O,{params:Object.assign({},d,O.params),pathname:ls([g,l.encodeLocation?l.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?g:ls([g,l.encodeLocation?l.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),o,n);return t&&R?X.createElement(Fh.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...b},navigationType:"POP"}},R):R}function kb(){let i=n2(),t=Nb(i)?`${i.status} ${i.statusText}`:i instanceof Error?i.message:JSON.stringify(i),n=i instanceof Error?i.stack:null,l="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:l},f={padding:"2px 4px",backgroundColor:l},d=null;return console.error("Error handled by React Router default ErrorBoundary:",i),d=X.createElement(X.Fragment,null,X.createElement("p",null,"💿 Hey developer 👋"),X.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",X.createElement("code",{style:f},"ErrorBoundary")," or"," ",X.createElement("code",{style:f},"errorElement")," prop on your route.")),X.createElement(X.Fragment,null,X.createElement("h2",null,"Unexpected Application Error!"),X.createElement("h3",{style:{fontStyle:"italic"}},t),n?X.createElement("pre",{style:o},n):null,d)}var Jb=X.createElement(kb,null),fx=class extends X.Component{constructor(i){super(i),this.state={location:i.location,revalidation:i.revalidation,error:i.error}}static getDerivedStateFromError(i){return{error:i}}static getDerivedStateFromProps(i,t){return t.location!==i.location||t.revalidation!=="idle"&&i.revalidation==="idle"?{error:i.error,location:i.location,revalidation:i.revalidation}:{error:i.error!==void 0?i.error:t.error,location:t.location,revalidation:i.revalidation||t.revalidation}}componentDidCatch(i,t){this.props.onError?this.props.onError(i,t):console.error("React Router caught the following error during render",i)}render(){let i=this.state.error;if(this.context&&typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){const n=Lb(i.digest);n&&(i=n)}let t=i!==void 0?X.createElement(Sl.Provider,{value:this.props.routeContext},X.createElement(zg.Provider,{value:i,children:this.props.component})):this.props.children;return this.context?X.createElement(Pb,{error:i},t):t}};fx.contextType=wb;var yy=new WeakMap;function Pb({children:i,error:t}){let{basename:n}=X.useContext(di);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let l=Yb(t.digest);if(l){let o=yy.get(t);if(o)throw o;let f=ix(l.location,n);if(ax&&!yy.get(t))if(f.isExternal||l.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:l.replace}));throw yy.set(t,d),d}return X.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return i}function Wb({routeContext:i,match:t,children:n}){let l=X.useContext(Vc);return l&&l.static&&l.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=t.route.id),X.createElement(Sl.Provider,{value:i},n)}function Fb(i,t=[],n){let l=n==null?void 0:n.state;if(i==null){if(!l)return null;if(l.errors)i=l.matches;else if(t.length===0&&!l.initialized&&l.matches.length>0)i=l.matches;else return null}let o=i,f=l==null?void 0:l.errors;if(f!=null){let _=o.findIndex(b=>b.route.id&&(f==null?void 0:f[b.route.id])!==void 0);Ve(_>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),o=o.slice(0,Math.min(o.length,_+1))}let d=!1,m=-1;if(n&&l){d=l.renderFallback;for(let _=0;_<o.length;_++){let b=o[_];if((b.route.HydrateFallback||b.route.hydrateFallbackElement)&&(m=_),b.route.id){let{loaderData:C,errors:E}=l,M=b.route.loader&&!C.hasOwnProperty(b.route.id)&&(!E||E[b.route.id]===void 0);if(b.route.lazy||M){n.isStatic&&(d=!0),m>=0?o=o.slice(0,m+1):o=[o[0]];break}}}}let g=n==null?void 0:n.onError,v=l&&g?(_,b)=>{var C,E;g(_,{location:l.location,params:((E=(C=l.matches)==null?void 0:C[0])==null?void 0:E.params)??{},unstable_pattern:Ub(l.matches),errorInfo:b})}:void 0;return o.reduceRight((_,b,C)=>{let E,M=!1,R=null,z=null;l&&(E=f&&b.route.id?f[b.route.id]:void 0,R=b.route.errorElement||Jb,d&&(m<0&&C===0?(hx("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),M=!0,z=null):m===C&&(M=!0,z=b.route.hydrateFallbackElement||null)));let O=t.concat(o.slice(0,C+1)),B=()=>{let U;return E?U=R:M?U=z:b.route.Component?U=X.createElement(b.route.Component,null):b.route.element?U=b.route.element:U=_,X.createElement(Wb,{match:b,routeContext:{outlet:_,matches:O,isDataRoute:l!=null},children:U})};return l&&(b.route.ErrorBoundary||b.route.errorElement||C===0)?X.createElement(fx,{location:l.location,revalidation:l.revalidation,component:R,error:E,children:B(),routeContext:{outlet:null,matches:O,isDataRoute:!0},onError:v}):B()},null)}function Dg(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ib(i){let t=X.useContext(Vc);return Ve(t,Dg(i)),t}function $b(i){let t=X.useContext(gp);return Ve(t,Dg(i)),t}function t2(i){let t=X.useContext(Sl);return Ve(t,Dg(i)),t}function Og(i){let t=t2(i),n=t.matches[t.matches.length-1];return Ve(n.route.id,`${i} can only be used on routes that contain a unique "id"`),n.route.id}function e2(){return Og("useRouteId")}function n2(){var l;let i=X.useContext(zg),t=$b("useRouteError"),n=Og("useRouteError");return i!==void 0?i:(l=t.errors)==null?void 0:l[n]}function a2(){let{router:i}=Ib("useNavigate"),t=Og("useNavigate"),n=X.useRef(!1);return ox(()=>{n.current=!0}),X.useCallback(async(o,f={})=>{_l(n.current,rx),n.current&&(typeof o=="number"?await i.navigate(o):await i.navigate(o,{fromRouteId:t,...f}))},[i,t])}var rv={};function hx(i,t,n){!t&&!rv[i]&&(rv[i]=!0,_l(!1,n))}X.memo(i2);function i2({routes:i,future:t,state:n,isStatic:l,onError:o}){return cx(i,void 0,{state:n,isStatic:l,onError:o})}function l2({to:i,replace:t,state:n,relative:l}){Ve(Qc(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=X.useContext(di);_l(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:f}=X.useContext(Sl),{pathname:d}=ss(),m=vp(),g=yp(i,Rg(f),d,l==="path"),v=JSON.stringify(g);return X.useEffect(()=>{m(JSON.parse(v),{replace:t,state:n,relative:l})},[m,v,l,t,n]),null}function s2(i){return Zb(i.context)}function Xu(i){Ve(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function u2({basename:i="/",children:t=null,location:n,navigationType:l="POP",navigator:o,static:f=!1,unstable_useTransitions:d}){Ve(!Qc(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let m=i.replace(/^\/*/,"/"),g=X.useMemo(()=>({basename:m,navigator:o,static:f,unstable_useTransitions:d,future:{}}),[m,o,f,d]);typeof n=="string"&&(n=Xc(n));let{pathname:v="/",search:_="",hash:b="",state:C=null,key:E="default",unstable_mask:M}=n,R=X.useMemo(()=>{let z=Ps(v,m);return z==null?null:{location:{pathname:z,search:_,hash:b,state:C,key:E,unstable_mask:M},navigationType:l}},[m,v,_,b,C,E,l,M]);return _l(R!=null,`<Router basename="${m}"> is not able to match the URL "${v}${_}${b}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:X.createElement(di.Provider,{value:g},X.createElement(Fh.Provider,{children:t,value:R}))}function r2({children:i,location:t}){return Kb(tg(i),t)}function tg(i,t=[]){let n=[];return X.Children.forEach(i,(l,o)=>{if(!X.isValidElement(l))return;let f=[...t,o];if(l.type===X.Fragment){n.push.apply(n,tg(l.props.children,f));return}Ve(l.type===Xu,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ve(!l.props.index||!l.props.children,"An index route cannot have child routes.");let d={id:l.props.id||f.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(d.children=tg(l.props.children,f)),n.push(d)}),n}var $m="get",tp="application/x-www-form-urlencoded";function xp(i){return typeof HTMLElement<"u"&&i instanceof HTMLElement}function o2(i){return xp(i)&&i.tagName.toLowerCase()==="button"}function c2(i){return xp(i)&&i.tagName.toLowerCase()==="form"}function f2(i){return xp(i)&&i.tagName.toLowerCase()==="input"}function h2(i){return!!(i.metaKey||i.altKey||i.ctrlKey||i.shiftKey)}function d2(i,t){return i.button===0&&(!t||t==="_self")&&!h2(i)}var wm=null;function m2(){if(wm===null)try{new FormData(document.createElement("form"),0),wm=!1}catch{wm=!0}return wm}var p2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gy(i){return i!=null&&!p2.has(i)?(_l(!1,`"${i}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${tp}"`),null):i}function y2(i,t){let n,l,o,f,d;if(c2(i)){let m=i.getAttribute("action");l=m?Ps(m,t):null,n=i.getAttribute("method")||$m,o=gy(i.getAttribute("enctype"))||tp,f=new FormData(i)}else if(o2(i)||f2(i)&&(i.type==="submit"||i.type==="image")){let m=i.form;if(m==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=i.getAttribute("formaction")||m.getAttribute("action");if(l=g?Ps(g,t):null,n=i.getAttribute("formmethod")||m.getAttribute("method")||$m,o=gy(i.getAttribute("formenctype"))||gy(m.getAttribute("enctype"))||tp,f=new FormData(m,i),!m2()){let{name:v,type:_,value:b}=i;if(_==="image"){let C=v?`${v}.`:"";f.append(`${C}x`,"0"),f.append(`${C}y`,"0")}else v&&f.append(v,b)}}else{if(xp(i))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=$m,l=null,o=tp,d=i}return f&&o==="text/plain"&&(d=f,f=void 0),{action:l,method:n.toLowerCase(),encType:o,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ng(i,t){if(i===!1||i===null||typeof i>"u")throw new Error(t)}function g2(i,t,n,l){let o=typeof i=="string"?new URL(i,typeof window>"u"?"server://singlefetch/":window.location.origin):i;return n?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${l}`:o.pathname=`${o.pathname}.${l}`:o.pathname==="/"?o.pathname=`_root.${l}`:t&&Ps(o.pathname,t)==="/"?o.pathname=`${t.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function v2(i,t){if(i.id in t)return t[i.id];try{let n=await import(i.module);return t[i.id]=n,n}catch(n){return console.error(`Error loading route module \`${i.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function x2(i){return i==null?!1:i.href==null?i.rel==="preload"&&typeof i.imageSrcSet=="string"&&typeof i.imageSizes=="string":typeof i.rel=="string"&&typeof i.href=="string"}async function _2(i,t,n){let l=await Promise.all(i.map(async o=>{let f=t.routes[o.route.id];if(f){let d=await v2(f,n);return d.links?d.links():[]}return[]}));return E2(l.flat(1).filter(x2).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function ov(i,t,n,l,o,f){let d=(g,v)=>n[v]?g.route.id!==n[v].route.id:!0,m=(g,v)=>{var _;return n[v].pathname!==g.pathname||((_=n[v].route.path)==null?void 0:_.endsWith("*"))&&n[v].params["*"]!==g.params["*"]};return f==="assets"?t.filter((g,v)=>d(g,v)||m(g,v)):f==="data"?t.filter((g,v)=>{var b;let _=l.routes[g.route.id];if(!_||!_.hasLoader)return!1;if(d(g,v)||m(g,v))return!0;if(g.route.shouldRevalidate){let C=g.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((b=n[0])==null?void 0:b.params)||{},nextUrl:new URL(i,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof C=="boolean")return C}return!0}):[]}function S2(i,t,{includeHydrateFallback:n}={}){return b2(i.map(l=>{let o=t.routes[l.route.id];if(!o)return[];let f=[o.module];return o.clientActionModule&&(f=f.concat(o.clientActionModule)),o.clientLoaderModule&&(f=f.concat(o.clientLoaderModule)),n&&o.hydrateFallbackModule&&(f=f.concat(o.hydrateFallbackModule)),o.imports&&(f=f.concat(o.imports)),f}).flat(1))}function b2(i){return[...new Set(i)]}function T2(i){let t={},n=Object.keys(i).sort();for(let l of n)t[l]=i[l];return t}function E2(i,t){let n=new Set;return new Set(t),i.reduce((l,o)=>{let f=JSON.stringify(T2(o));return n.has(f)||(n.add(f),l.push({key:f,link:o})),l},[])}function dx(){let i=X.useContext(Vc);return Ng(i,"You must render this element inside a <DataRouterContext.Provider> element"),i}function C2(){let i=X.useContext(gp);return Ng(i,"You must render this element inside a <DataRouterStateContext.Provider> element"),i}var Ug=X.createContext(void 0);Ug.displayName="FrameworkContext";function mx(){let i=X.useContext(Ug);return Ng(i,"You must render this element inside a <HydratedRouter> element"),i}function A2(i,t){let n=X.useContext(Ug),[l,o]=X.useState(!1),[f,d]=X.useState(!1),{onFocus:m,onBlur:g,onMouseEnter:v,onMouseLeave:_,onTouchStart:b}=t,C=X.useRef(null);X.useEffect(()=>{if(i==="render"&&d(!0),i==="viewport"){let R=O=>{O.forEach(B=>{d(B.isIntersecting)})},z=new IntersectionObserver(R,{threshold:.5});return C.current&&z.observe(C.current),()=>{z.disconnect()}}},[i]),X.useEffect(()=>{if(l){let R=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(R)}}},[l]);let E=()=>{o(!0)},M=()=>{o(!1),d(!1)};return n?i!=="intent"?[f,C,{}]:[f,C,{onFocus:Ah(m,E),onBlur:Ah(g,M),onMouseEnter:Ah(v,E),onMouseLeave:Ah(_,M),onTouchStart:Ah(b,E)}]:[!1,C,{}]}function Ah(i,t){return n=>{i&&i(n),n.defaultPrevented||t(n)}}function M2({page:i,...t}){let{router:n}=dx(),l=X.useMemo(()=>tx(n.routes,i,n.basename),[n.routes,i,n.basename]);return l?X.createElement(z2,{page:i,matches:l,...t}):null}function R2(i){let{manifest:t,routeModules:n}=mx(),[l,o]=X.useState([]);return X.useEffect(()=>{let f=!1;return _2(i,t,n).then(d=>{f||o(d)}),()=>{f=!0}},[i,t,n]),l}function z2({page:i,matches:t,...n}){let l=ss(),{future:o,manifest:f,routeModules:d}=mx(),{basename:m}=dx(),{loaderData:g,matches:v}=C2(),_=X.useMemo(()=>ov(i,t,v,f,l,"data"),[i,t,v,f,l]),b=X.useMemo(()=>ov(i,t,v,f,l,"assets"),[i,t,v,f,l]),C=X.useMemo(()=>{if(i===l.pathname+l.search+l.hash)return[];let R=new Set,z=!1;if(t.forEach(B=>{var G;let U=f.routes[B.route.id];!U||!U.hasLoader||(!_.some(Z=>Z.route.id===B.route.id)&&B.route.id in g&&((G=d[B.route.id])!=null&&G.shouldRevalidate)||U.hasClientLoader?z=!0:R.add(B.route.id))}),R.size===0)return[];let O=g2(i,m,o.unstable_trailingSlashAwareDataRequests,"data");return z&&R.size>0&&O.searchParams.set("_routes",t.filter(B=>R.has(B.route.id)).map(B=>B.route.id).join(",")),[O.pathname+O.search]},[m,o.unstable_trailingSlashAwareDataRequests,g,l,f,_,t,i,d]),E=X.useMemo(()=>S2(b,f),[b,f]),M=R2(b);return X.createElement(X.Fragment,null,C.map(R=>X.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...n})),E.map(R=>X.createElement("link",{key:R,rel:"modulepreload",href:R,...n})),M.map(({key:R,link:z})=>X.createElement("link",{key:R,nonce:n.nonce,...z,crossOrigin:z.crossOrigin??n.crossOrigin})))}function D2(...i){return t=>{i.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var O2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{O2&&(window.__reactRouterVersion="7.13.1")}catch{}function N2({basename:i,children:t,unstable_useTransitions:n,window:l}){let o=X.useRef();o.current==null&&(o.current=rb({window:l,v5Compat:!0}));let f=o.current,[d,m]=X.useState({action:f.action,location:f.location}),g=X.useCallback(v=>{n===!1?m(v):X.startTransition(()=>m(v))},[n]);return X.useLayoutEffect(()=>f.listen(g),[f,g]),X.createElement(u2,{basename:i,children:t,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:n})}var px=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yx=X.forwardRef(function({onClick:t,discover:n="render",prefetch:l="none",relative:o,reloadDocument:f,replace:d,unstable_mask:m,state:g,target:v,to:_,preventScrollReset:b,viewTransition:C,unstable_defaultShouldRevalidate:E,...M},R){let{basename:z,navigator:O,unstable_useTransitions:B}=X.useContext(di),U=typeof _=="string"&&px.test(_),G=ix(_,z);_=G.to;let Z=Xb(_,{relative:o}),Q=ss(),K=null;if(m){let Dt=yp(m,[],Q.unstable_mask?Q.unstable_mask.pathname:"/",!0);z!=="/"&&(Dt.pathname=Dt.pathname==="/"?z:ls([z,Dt.pathname])),K=O.createHref(Dt)}let[gt,ct,ht]=A2(l,M),dt=w2(_,{replace:d,unstable_mask:m,state:g,target:v,preventScrollReset:b,relative:o,viewTransition:C,unstable_defaultShouldRevalidate:E,unstable_useTransitions:B});function vt(Dt){t&&t(Dt),Dt.defaultPrevented||dt(Dt)}let _t=!(G.isExternal||f),xt=X.createElement("a",{...M,...ht,href:(_t?K:void 0)||G.absoluteURL||Z,onClick:_t?vt:t,ref:D2(R,ct),target:v,"data-discover":!U&&n==="render"?"true":void 0});return gt&&!U?X.createElement(X.Fragment,null,xt,X.createElement(M2,{page:Z})):xt});yx.displayName="Link";var Bh=X.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:l="",end:o=!1,style:f,to:d,viewTransition:m,children:g,...v},_){let b=Ih(d,{relative:v.relative}),C=ss(),E=X.useContext(gp),{navigator:M,basename:R}=X.useContext(di),z=E!=null&&Y2(b)&&m===!0,O=M.encodeLocation?M.encodeLocation(b).pathname:b.pathname,B=C.pathname,U=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;n||(B=B.toLowerCase(),U=U?U.toLowerCase():null,O=O.toLowerCase()),U&&R&&(U=Ps(U,R)||U);const G=O!=="/"&&O.endsWith("/")?O.length-1:O.length;let Z=B===O||!o&&B.startsWith(O)&&B.charAt(G)==="/",Q=U!=null&&(U===O||!o&&U.startsWith(O)&&U.charAt(O.length)==="/"),K={isActive:Z,isPending:Q,isTransitioning:z},gt=Z?t:void 0,ct;typeof l=="function"?ct=l(K):ct=[l,Z?"active":null,Q?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let ht=typeof f=="function"?f(K):f;return X.createElement(yx,{...v,"aria-current":gt,className:ct,ref:_,style:ht,to:d,viewTransition:m},typeof g=="function"?g(K):g)});Bh.displayName="NavLink";var U2=X.forwardRef(({discover:i="render",fetcherKey:t,navigate:n,reloadDocument:l,replace:o,state:f,method:d=$m,action:m,onSubmit:g,relative:v,preventScrollReset:_,viewTransition:b,unstable_defaultShouldRevalidate:C,...E},M)=>{let{unstable_useTransitions:R}=X.useContext(di),z=j2(),O=q2(m,{relative:v}),B=d.toLowerCase()==="get"?"get":"post",U=typeof m=="string"&&px.test(m),G=Z=>{if(g&&g(Z),Z.defaultPrevented)return;Z.preventDefault();let Q=Z.nativeEvent.submitter,K=(Q==null?void 0:Q.getAttribute("formmethod"))||d,gt=()=>z(Q||Z.currentTarget,{fetcherKey:t,method:K,navigate:n,replace:o,state:f,relative:v,preventScrollReset:_,viewTransition:b,unstable_defaultShouldRevalidate:C});R&&n!==!1?X.startTransition(()=>gt()):gt()};return X.createElement("form",{ref:M,method:B,action:O,onSubmit:l?g:G,...E,"data-discover":!U&&i==="render"?"true":void 0})});U2.displayName="Form";function B2(i){return`${i} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function gx(i){let t=X.useContext(Vc);return Ve(t,B2(i)),t}function w2(i,{target:t,replace:n,unstable_mask:l,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g,unstable_useTransitions:v}={}){let _=vp(),b=ss(),C=Ih(i,{relative:d});return X.useCallback(E=>{if(d2(E,t)){E.preventDefault();let M=n!==void 0?n:Qh(b)===Qh(C),R=()=>_(i,{replace:M,unstable_mask:l,state:o,preventScrollReset:f,relative:d,viewTransition:m,unstable_defaultShouldRevalidate:g});v?X.startTransition(()=>R()):R()}},[b,_,C,n,l,o,t,i,f,d,m,g,v])}var H2=0,G2=()=>`__${String(++H2)}__`;function j2(){let{router:i}=gx("useSubmit"),{basename:t}=X.useContext(di),n=e2(),l=i.fetch,o=i.navigate;return X.useCallback(async(f,d={})=>{let{action:m,method:g,encType:v,formData:_,body:b}=y2(f,t);if(d.navigate===!1){let C=d.fetcherKey||G2();await l(C,n,d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:_,body:b,formMethod:d.method||g,formEncType:d.encType||v,flushSync:d.flushSync})}else await o(d.action||m,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:_,body:b,formMethod:d.method||g,formEncType:d.encType||v,replace:d.replace,state:d.state,fromRouteId:n,flushSync:d.flushSync,viewTransition:d.viewTransition})},[l,o,t,n])}function q2(i,{relative:t}={}){let{basename:n}=X.useContext(di),l=X.useContext(Sl);Ve(l,"useFormAction must be used inside a RouteContext");let[o]=l.matches.slice(-1),f={...Ih(i||".",{relative:t})},d=ss();if(i==null){f.search=d.search;let m=new URLSearchParams(f.search),g=m.getAll("index");if(g.some(_=>_==="")){m.delete("index"),g.filter(b=>b).forEach(b=>m.append("index",b));let _=m.toString();f.search=_?`?${_}`:""}}return(!i||i===".")&&o.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(f.pathname=f.pathname==="/"?n:ls([n,f.pathname])),Qh(f)}function Y2(i,{relative:t}={}){let n=X.useContext(sx);Ve(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=gx("useViewTransitionState"),o=Ih(i,{relative:t});if(!n.isTransitioning)return!1;let f=Ps(n.currentLocation.pathname,l)||n.currentLocation.pathname,d=Ps(n.nextLocation.pathname,l)||n.nextLocation.pathname;return sp(o.pathname,d)!=null||sp(o.pathname,f)!=null}const cv=i=>{let t;const n=new Set,l=(v,_)=>{const b=typeof v=="function"?v(t):v;if(!Object.is(b,t)){const C=t;t=_??(typeof b!="object"||b===null)?b:Object.assign({},t,b),n.forEach(E=>E(t,C))}},o=()=>t,m={setState:l,getState:o,getInitialState:()=>g,subscribe:v=>(n.add(v),()=>n.delete(v))},g=t=i(l,o,m);return m},L2=(i=>i?cv(i):cv),X2=i=>i;function V2(i,t=X2){const n=Bm.useSyncExternalStore(i.subscribe,Bm.useCallback(()=>t(i.getState()),[i,t]),Bm.useCallback(()=>t(i.getInitialState()),[i,t]));return Bm.useDebugValue(n),n}const fv=i=>{const t=L2(i),n=l=>V2(t,l);return Object.assign(n,t),n},_p=(i=>i?fv(i):fv),xl=_p(i=>({user:null,isAuthenticated:!1,loading:!1,error:null,login:async(t,n)=>{i({loading:!0,error:null});try{const l=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:t,password:n}),credentials:"include"}),o=await l.json();if(!l.ok){i({loading:!1,error:o.error||"Login failed"});return}i({user:o.user,isAuthenticated:!0,loading:!1,error:null})}catch{i({loading:!1,error:"Network error"})}},logout:async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"include"})}catch{}i({user:null,isAuthenticated:!1,error:null})},checkAuth:async()=>{i({loading:!0});try{const t=await fetch("/api/auth/me",{credentials:"include"});if(t.ok){const n=await t.json();i({user:n.user,isAuthenticated:!0,loading:!1})}else i({user:null,isAuthenticated:!1,loading:!1})}catch{i({user:null,isAuthenticated:!1,loading:!1})}},reset:()=>i({user:null,isAuthenticated:!1,loading:!1,error:null})})),Ba=_p((i,t)=>({squads:[],selectedSquad:null,activeStates:{},fetchSquads:async()=>{try{const n=await fetch("/api/squads",{credentials:"include"});if(n.ok){const l=await n.json();i({squads:l.squads})}}catch{}},selectSquad:n=>i({selectedSquad:n}),setSquadState:(n,l)=>i(o=>({activeStates:{...o.activeStates,[n]:l}})),clearSquadState:n=>i(l=>{const{[n]:o,...f}=l.activeStates;return{activeStates:f}}),reset:()=>i({squads:[],selectedSquad:null,activeStates:{}})}));let Q2=0;function hv(){return`local-${Date.now()}-${++Q2}`}const qi=_p((i,t)=>({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null,addUserMessage:n=>{const l={id:hv(),role:"user",content:n,createdAt:new Date().toISOString()};i(o=>({messages:[...o.messages,l],error:null}))},setConversationId:n=>{i({conversationId:n})},startStreaming:()=>{i({streaming:!0,streamingText:"",error:null})},appendChunk:n=>{i(l=>({streamingText:l.streamingText+n}))},finishStreaming:n=>{const{streamingText:l}=t(),o={id:n,role:"assistant",content:l,createdAt:new Date().toISOString()};i(f=>({messages:[...f.messages,o],streaming:!1,streamingText:""}))},addAgentDm:n=>{const l={id:hv(),role:"agent_dm",content:n.content,agentId:n.agentId,agentName:n.agentName,createdAt:new Date().toISOString()};i(o=>({messages:[...o.messages,l]}))},setError:n=>{i({error:n,streaming:!1,streamingText:""})},loadHistory:async n=>{try{const l=await fetch(`/api/squads/${n}/conversations`,{credentials:"include"});if(!l.ok)return;const o=await l.json();if(!o.data||o.data.length===0){i({conversationId:null,messages:[]});return}const f=o.data[0];i({conversationId:f.id});const d=await fetch(`/api/conversations/${f.id}/messages`,{credentials:"include"});if(!d.ok)return;const g=((await d.json()).data||[]).map(v=>({id:v.id,role:v.role,content:v.content,agentId:v.agent_id??void 0,agentName:v.agent_name??void 0,createdAt:v.created_at}));i({messages:g})}catch{}},reset:()=>i({messages:[],conversationId:null,streaming:!1,streamingText:"",error:null})}));function Z2(i){const n=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,l=new WebSocket(n),o=[];let f=!0;function d(m){l.readyState===WebSocket.OPEN?l.send(JSON.stringify(m)):l.readyState===WebSocket.CONNECTING&&o.push(m)}return l.onopen=()=>{var m,g;f||(g=(m=i.current).onReconnect)==null||g.call(m),f=!1;for(const v of o)l.send(JSON.stringify(v));o.length=0},l.onmessage=m=>{var g,v,_,b,C,E,M,R,z,O,B;try{const U=JSON.parse(m.data),G=i.current;switch(U.type){case"squad:state":(g=G.onSquadState)==null||g.call(G,U.squadName,U.state);break;case"squad:inactive":(v=G.onSquadInactive)==null||v.call(G,U.squadName,U.reason);break;case"chat:chunk":(_=G.onChatChunk)==null||_.call(G,U.squadName,U.conversationId,U.delta);break;case"chat:done":(b=G.onChatDone)==null||b.call(G,U.squadName,U.conversationId,U.messageId);break;case"chat:error":(C=G.onChatError)==null||C.call(G,U.squadName,U.error);break;case"chat:agent_dm":(E=G.onChatAgentDm)==null||E.call(G,U.squadName,U.conversationId,U.agentId,U.agentName,U.message);break;case"chat:conversation_created":(M=G.onChatConversationCreated)==null||M.call(G,U.squadName,U.conversationId);break;case"agent:output_chunk":(R=G.onAgentOutputChunk)==null||R.call(G,U.squadName,U.agentId,U.agentName,U.delta);break;case"agent:step_start":(z=G.onAgentStepStart)==null||z.call(G,U.squadName,U.agentId,U.agentName,U.stepIndex,U.stepLabel);break;case"agent:step_complete":(O=G.onAgentStepComplete)==null||O.call(G,U.squadName,U.agentId,U.agentName,U.stepIndex,U.stepLabel);break;case"squad:checkpoint":(B=G.onSquadCheckpoint)==null||B.call(G,U.squadName,U.agentId,U.agentName,U.question);break}}catch{}},{subscribe:m=>{d({type:"squad:subscribe",squadName:m})},unsubscribe:m=>{d({type:"squad:unsubscribe",squadName:m})},sendChat:(m,g)=>{d({type:"chat:send",squadName:m,message:g})},newConversation:m=>{d({type:"chat:new_conversation",squadName:m})},sendCheckpointResponse:(m,g)=>{d({type:"squad:checkpoint_response",squadName:m,answer:g})},disconnect:()=>{l.close()}}}function K2(i={}){const t=X.useRef(null),n=X.useRef(i),l=X.useRef(new Set);n.current=i,X.useEffect(()=>{const g=Z2(n);t.current=g;for(const v of l.current)g.subscribe(v);return()=>{g.disconnect()}},[]);const o=X.useCallback(g=>{var v;l.current.add(g),(v=t.current)==null||v.subscribe(g)},[]),f=X.useCallback(g=>{var v;l.current.delete(g),(v=t.current)==null||v.unsubscribe(g)},[]),d=X.useCallback((g,v)=>{var _;(_=t.current)==null||_.sendChat(g,v)},[]),m=X.useCallback((g,v)=>{var _;(_=t.current)==null||_.sendCheckpointResponse(g,v)},[]);return{subscribe:o,unsubscribe:f,sendChat:d,sendCheckpointResponse:m}}const k2={idle:"#888",working:"#4caf50",delivering:"#4fc3f7",done:"#4caf50",checkpoint:"#ff9800",running:"#4caf50",completed:"#4caf50"},J2={idle:"○",working:"●",delivering:"→",done:"✓",checkpoint:"◆",running:"●",completed:"✓"};function P2({status:i}){if(!i)return null;const t=k2[i]||"#888",n=J2[i]||"○";return L.jsxs("span",{style:{color:t,fontSize:"0.75rem"},children:[n," ",i]})}function W2({squad:i,selected:t,onClick:n}){return L.jsxs("div",{onClick:n,style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:t?"#1a3a5c":"transparent",borderLeft:t?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px"},children:[L.jsx("div",{style:{fontSize:"0.875rem",color:t?"#e0e0e0":"#aaa"},children:i.name}),L.jsx(P2,{status:i.status})]})}function F2({squads:i,selectedSquad:t,onSelect:n}){return L.jsxs("div",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Squads"}),i.length===0&&L.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No squads found"}),i.map(l=>L.jsx(W2,{squad:l,selected:l.code===t,onClick:()=>n(l.code)},l.code))]})}function I2(i){const t=Math.floor(i/3600),n=Math.floor(i%3600/60),l=i%60,o=f=>f.toString().padStart(2,"0");return t>0?`${t}h ${o(n)}m ${o(l)}s`:`${n}m ${o(l)}s`}function $2({state:i}){const[t,n]=X.useState(0);return X.useEffect(()=>{if(!(i!=null&&i.startedAt)||i.status!=="running"){n(0);return}const l=new Date(i.startedAt).getTime(),o=()=>n(Math.floor((Date.now()-l)/1e3));o();const f=setInterval(o,1e3);return()=>clearInterval(f)},[i==null?void 0:i.startedAt,i==null?void 0:i.status]),i?L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"6px 16px",background:"#16213e",fontSize:"0.8rem",color:"#aaa",borderTop:"1px solid #1a1a2e"},children:[L.jsxs("span",{children:["Step ",i.step.current,"/",i.step.total,": ",i.step.label]}),i.status==="running"&&L.jsxs("span",{children:["Elapsed: ",I2(t)]}),i.handoff&&L.jsxs("span",{style:{color:"#4caf50"},children:[i.handoff.from," → ",i.handoff.to]})]}):L.jsx("div",{})}let eg=null;function tT(i){eg=i}function eT(i,t){eg&&eg(i,t)}let ng=null;function nT(i){ng=i}function aT(i,t){ng&&ng(i,t)}const ep=32,np=96,vx=64,fa={floor:3813150,floorPlank:4865838,wall:16117992,desk:9139029,deskTop:10518624,deskShadow:7033653,monitor:1710638,monitorScreen:1450302,plant:5025616,pot:9127187,bookshelf:9139029,bookColors:[15022389,2001125,4431943,16750592,9315498]},ag=[5227511,5025616,16750592,15022389,9315498,16771899],iT={idle:8947848,working:5025616,delivering:5227511,done:5025616,checkpoint:16750592},Hm={counter:4073251,machine:4342338,machineLight:16711680,cup:14142664},vy={table:5125166,chair:6111287,border:4073251},Dc={background:1713022,statusRunning:5025616,statusIdle:8947848,statusCheckpoint:16750592},Ks=640,wc=480,dv=64,lT=64,sT=80,uT=np+32,rT=vx+48,mv=2,pv=3;function yv(i,t,n){const l=Math.max(0,Math.min(1,n));return i+(t-i)*l}function oT(i){return i<.5?2*i*i:1-Math.pow(-2*i+2,2)/2}function cT(i,t){const n=i%pv,l=Math.floor(i/pv);return{x:n*(Ks+dv),y:l*(wc+dv)}}function ap(i,t){const n=i%mv,l=Math.floor(i/mv);return{x:t.x+lT+n*uT,y:t.y+sT+l*rT}}function jh(i){return{x:i.x+Ks-80,y:i.y+wc-80}}function xx(i){return{x:i.x+Ks-160,y:i.y+Math.floor(wc/2)}}const gv=500,vv=50;let xv=0;function _v(i){return{idle:"idle",working:"working",delivering:"walking",done:"idle",checkpoint:"checkpoint"}[i]??"idle"}const Pe=_p(i=>({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{},appendBubble:(t,n,l)=>{const o=`${t}:${n}`;i(f=>{var g;let m=(((g=f.bubbles[o])==null?void 0:g.text)??"")+l;return m.length>gv&&(m=m.slice(m.length-gv)),{bubbles:{...f.bubbles,[o]:{text:m,updatedAt:Date.now()}}}})},clearBubble:(t,n)=>{const l=`${t}:${n}`;i(o=>{const{[l]:f,...d}=o.bubbles;return{bubbles:d}})},clearAllBubbles:()=>i({bubbles:{}}),addActivity:(t,n,l)=>{const f={id:++xv,agentName:n,action:l,timestamp:Date.now()};i(d=>{var _;const g=[...((_=d.activityLog[t])==null?void 0:_.entries)??[],f],v=g.length>vv?g.slice(g.length-vv):g;return{activityLog:{...d.activityLog,[t]:{entries:v}}}})},setCheckpoint:(t,n,l,o)=>i(f=>({checkpoints:{...f.checkpoints,[t]:{agentId:n,agentName:l,question:o}}})),clearCheckpoint:t=>i(n=>{const{[t]:l,...o}=n.checkpoints;return{checkpoints:o}}),setActiveRoom:t=>i({activeRoom:t}),syncRooms:t=>i(n=>{const l=t;let o;return l.length===0?o=null:n.activeRoom===null||!l.includes(n.activeRoom)?o=l[0]:o=n.activeRoom,{rooms:l,activeRoom:o}}),setAgents:(t,n)=>i(l=>{const o=l.agentVisuals[t]??[],f=new Map(o.map(g=>[g.id,g])),d={x:0,y:0},m=n.map((g,v)=>{const _=f.get(g.id);if(_){const E=g.status?_v(g.status):_.status,M=E!==_.status;let R=_.targetPosition;return M&&(E==="working"||E==="checkpoint"?R=ap(v,d):R=jh(d)),{..._,name:g.name,deskIndex:v,status:E,targetPosition:R}}const b=g.status?_v(g.status):"idle",C=b==="working"||b==="checkpoint"?ap(v,d):jh(d);return{id:g.id,name:g.name,colorIndex:v%6,status:b,deskIndex:v,position:C,targetPosition:null}});return{agentVisuals:{...l.agentVisuals,[t]:m}}}),setAgentStatus:(t,n,l)=>i(o=>{const f=o.agentVisuals[t];if(!f)return o;const d={x:0,y:0},m=f.map(g=>{if(g.id!==n)return g;let v;return l==="working"||l==="checkpoint"?v=ap(g.deskIndex,d):v=jh(d),{...g,status:l,targetPosition:v}});return{agentVisuals:{...o.agentVisuals,[t]:m}}}),reset:()=>{xv=0,i({rooms:[],activeRoom:null,bubbles:{},activityLog:{},checkpoints:{},agentVisuals:{}})}}));function fT(){const i=xl(H=>H.user),t=xl(H=>H.isAuthenticated),n=xl(H=>H.loading),l=xl(H=>H.logout),o=xl(H=>H.checkAuth),f=vp(),d=ss(),m=d.pathname==="/office"||d.pathname==="/",g=Ba(H=>H.squads),v=Ba(H=>H.selectedSquad),_=Ba(H=>v?H.activeStates[v]:null),b=Ba(H=>H.fetchSquads),C=Ba(H=>H.selectSquad),E=Ba(H=>H.setSquadState),M=Ba(H=>H.clearSquadState),R=X.useCallback((H,at)=>{E(H,at);const et=Pe.getState();et.rooms.includes(H)||et.syncRooms([...et.rooms,H]),at.status!=="checkpoint"&&et.clearCheckpoint(H),at.agents&&et.setAgents(H,at.agents.map(ft=>({id:ft.id,name:ft.name,status:ft.status})))},[E]),z=X.useCallback(H=>{M(H);const at=Pe.getState(),et=at.agentVisuals[H];if(et)for(const ft of et)at.setAgentStatus(H,ft.id,"idle")},[M]),O=X.useCallback((H,at)=>{qi.getState().setConversationId(at)},[]),B=X.useCallback((H,at,et)=>{const ft=qi.getState();ft.streaming||ft.startStreaming(),ft.appendChunk(et)},[]),U=X.useCallback((H,at,et)=>{qi.getState().finishStreaming(et)},[]),G=X.useCallback((H,at)=>{qi.getState().setError(at)},[]),Z=X.useCallback((H,at,et,ft,j)=>{qi.getState().addAgentDm({agentId:et,agentName:ft,content:j})},[]),Q=X.useCallback((H,at,et,ft)=>{Pe.getState().appendBubble(H,at,ft)},[]),K=X.useCallback((H,at,et,ft,j)=>{Pe.getState().addActivity(H,et,`started "${j}"`),Pe.getState().setAgentStatus(H,at,"working")},[]),gt=X.useCallback((H,at,et,ft,j)=>{Pe.getState().addActivity(H,et,`completed "${j}"`),Pe.getState().setAgentStatus(H,at,"idle")},[]),ct=X.useCallback((H,at,et,ft)=>{Pe.getState().setCheckpoint(H,at,et,ft),Pe.getState().setAgentStatus(H,at,"checkpoint")},[]),ht=X.useCallback(()=>{Pe.getState().clearAllBubbles()},[]),{subscribe:dt,unsubscribe:vt,sendChat:_t,sendCheckpointResponse:xt}=K2({onSquadState:R,onSquadInactive:z,onChatConversationCreated:O,onChatChunk:B,onChatDone:U,onChatError:G,onChatAgentDm:Z,onAgentOutputChunk:Q,onAgentStepStart:K,onAgentStepComplete:gt,onSquadCheckpoint:ct,onReconnect:ht});X.useEffect(()=>{tT(_t)},[_t]),X.useEffect(()=>{nT(xt)},[xt]),X.useEffect(()=>{b().then(()=>{const{squads:H}=Ba.getState();if(H.length>0){const at=Pe.getState(),et=H.map(I=>I.code),ft=at.rooms,j=[...new Set([...ft,...et])];at.syncRooms(j);for(const I of H)!at.agentVisuals[I.code]&&I.agents&&I.agents.length>0&&at.setAgents(I.code,I.agents.map(st=>({id:st.id,name:st.name,status:"idle"})))}})},[b]);const Dt=Pe(H=>H.rooms);X.useEffect(()=>{for(const H of Dt)dt(H);return()=>{for(const H of Dt)vt(H)}},[Dt,dt,vt]),X.useEffect(()=>{t||o()},[]),X.useEffect(()=>{!n&&!t&&f("/login")},[n,t,f]);const w=H=>({padding:"6px 12px",color:H?"#4fc3f7":"#888",textDecoration:"none",fontSize:"0.85rem"});return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100vh",background:"#0f0f1a",color:"#e0e0e0"},children:[L.jsxs("header",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"8px 16px",background:"#16213e",borderBottom:"1px solid #1a1a2e"},children:[L.jsx("span",{style:{color:"#4fc3f7",fontWeight:"bold",fontSize:"1.1rem"},children:"ExpxAgents"}),L.jsxs("span",{style:{color:"#888",fontSize:"0.85rem"},children:[i==null?void 0:i.username," | ",L.jsx("span",{style:{color:"#4caf50"},children:"● Connected"}),L.jsx("button",{onClick:l,style:{marginLeft:"12px",background:"none",border:"none",color:"#888",cursor:"pointer",fontSize:"0.8rem"},children:"Logout"})]})]}),L.jsxs("div",{style:{display:"flex",flex:1,overflow:"hidden"},children:[L.jsxs("aside",{style:{width:"200px",background:"#16213e",borderRight:"1px solid #1a1a2e",display:"flex",flexDirection:"column",overflowY:"auto"},children:[!m&&L.jsx(F2,{squads:g,selectedSquad:v,onSelect:C}),!m&&L.jsx("hr",{style:{border:"none",borderTop:"1px solid #333",margin:"8px 12px"}}),L.jsxs("nav",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Views"}),L.jsx(Bh,{to:"/office",style:({isActive:H})=>w(H),children:"Office"}),L.jsx("br",{}),L.jsx(Bh,{to:"/chat",style:({isActive:H})=>w(H),children:"Chat"}),L.jsx("br",{}),L.jsx(Bh,{to:"/kanban",style:({isActive:H})=>w(H),children:"Kanban"}),L.jsx("br",{}),L.jsx(Bh,{to:"/settings",style:({isActive:H})=>w(H),children:"Settings"})]})]}),L.jsx("main",{style:{flex:1,overflow:"auto"},children:L.jsx(s2,{})})]}),L.jsx($2,{state:_})]})}function hT(){const[i,t]=X.useState(""),[n,l]=X.useState(""),o=xl(_=>_.login),f=xl(_=>_.loading),d=xl(_=>_.error),m=xl(_=>_.isAuthenticated),g=vp();X.useEffect(()=>{m&&g("/",{replace:!0})},[m,g]);const v=_=>{_.preventDefault(),o(i,n)};return L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"#0f0f1a"},children:L.jsxs("form",{onSubmit:v,style:{background:"#1a1a2e",padding:"2rem",borderRadius:"8px",width:"320px"},children:[L.jsx("h1",{style:{color:"#4fc3f7",marginBottom:"1.5rem",textAlign:"center",fontSize:"1.5rem"},children:"ExpxAgents"}),d&&L.jsx("div",{style:{color:"#ef5350",marginBottom:"1rem",fontSize:"0.875rem"},children:d}),L.jsx("input",{type:"text",placeholder:"Username",value:i,onChange:_=>t(_.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"0.75rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),L.jsx("input",{type:"password",placeholder:"Password",value:n,onChange:_=>l(_.target.value),style:{width:"100%",padding:"0.75rem",marginBottom:"1rem",background:"#16213e",border:"1px solid #333",borderRadius:"4px",color:"#e0e0e0",fontSize:"1rem"}}),L.jsx("button",{type:"submit",disabled:f,style:{width:"100%",padding:"0.75rem",background:"#4fc3f7",color:"#0f0f1a",border:"none",borderRadius:"4px",fontSize:"1rem",fontWeight:"bold",cursor:f?"wait":"pointer"},children:f?"Logging in...":"Login"})]})})}function _x(i,t,n){if(!i)return;if(n(i)===!0)return i;let l=i.child;for(;l;){const o=_x(l,t,n);if(o)return o;l=l.sibling}}function Sx(i){try{return Object.defineProperties(i,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return i}}const Bg=Sx(X.createContext(null));let bx=class extends X.Component{render(){return X.createElement(Bg.Provider,{value:this._reactInternals},this.props.children)}};function dT(){const i=X.useContext(Bg);if(i===null)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=X.useId();return X.useMemo(()=>{for(const n of[i,i==null?void 0:i.alternate]){if(!n)continue;const l=_x(n,!1,o=>{let f=o.memoizedState;for(;f;){if(f.memoizedState===t)return!0;f=f.next}});if(l)return l}},[i,t])}const mT=Symbol.for("react.context"),pT=i=>i!==null&&typeof i=="object"&&"$$typeof"in i&&i.$$typeof===mT;function yT(){const i=dT(),[t]=X.useState(()=>new Map);t.clear();let n=i;for(;n;){const l=n.type;pT(l)&&l!==Bg&&!t.has(l)&&t.set(l,X.use(Sx(l))),n=n.return}return t}function gT(){const i=yT();return X.useMemo(()=>Array.from(i.keys()).reduce((t,n)=>l=>X.createElement(t,null,X.createElement(n.Provider,{...l,value:i.get(n)})),t=>X.createElement(bx,{...t})),[i])}const vT="modulepreload",xT=function(i){return"/"+i},Sv={},qh=function(t,n,l){let o=Promise.resolve();if(n&&n.length>0){let d=function(v){return Promise.all(v.map(_=>Promise.resolve(_).then(b=>({status:"fulfilled",value:b}),b=>({status:"rejected",reason:b}))))};document.getElementsByTagName("link");const m=document.querySelector("meta[property=csp-nonce]"),g=(m==null?void 0:m.nonce)||(m==null?void 0:m.getAttribute("nonce"));o=d(n.map(v=>{if(v=xT(v),v in Sv)return;Sv[v]=!0;const _=v.endsWith(".css"),b=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${b}`))return;const C=document.createElement("link");if(C.rel=_?"stylesheet":vT,_||(C.as="script"),C.crossOrigin="",C.href=v,g&&C.setAttribute("nonce",g),document.head.appendChild(C),_)return new Promise((E,M)=>{C.addEventListener("load",E),C.addEventListener("error",()=>M(new Error(`Unable to preload CSS for ${v}`)))})}))}function f(d){const m=new Event("vite:preloadError",{cancelable:!0});if(m.payload=d,window.dispatchEvent(m),!m.defaultPrevented)throw d}return o.then(d=>{for(const m of d||[])m.status==="rejected"&&f(m.reason);return t().catch(f)})};var Pt=(i=>(i.Application="application",i.WebGLPipes="webgl-pipes",i.WebGLPipesAdaptor="webgl-pipes-adaptor",i.WebGLSystem="webgl-system",i.WebGPUPipes="webgpu-pipes",i.WebGPUPipesAdaptor="webgpu-pipes-adaptor",i.WebGPUSystem="webgpu-system",i.CanvasSystem="canvas-system",i.CanvasPipesAdaptor="canvas-pipes-adaptor",i.CanvasPipes="canvas-pipes",i.Asset="asset",i.LoadParser="load-parser",i.ResolveParser="resolve-parser",i.CacheParser="cache-parser",i.DetectionParser="detection-parser",i.MaskEffect="mask-effect",i.BlendMode="blend-mode",i.TextureSource="texture-source",i.Environment="environment",i.ShapeBuilder="shape-builder",i.Batcher="batcher",i))(Pt||{});const ig=i=>{if(typeof i=="function"||typeof i=="object"&&i.extension){if(!i.extension)throw new Error("Extension class must have an extension object");i={...typeof i.extension!="object"?{type:i.extension}:i.extension,ref:i}}if(typeof i=="object")i={...i};else throw new Error("Invalid extension type");return typeof i.type=="string"&&(i.type=[i.type]),i},Gm=(i,t)=>ig(i).priority??t,Fe={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...i){return i.map(ig).forEach(t=>{t.type.forEach(n=>{var l,o;return(o=(l=this._removeHandlers)[n])==null?void 0:o.call(l,t)})}),this},add(...i){return i.map(ig).forEach(t=>{t.type.forEach(n=>{var f,d;const l=this._addHandlers,o=this._queue;l[n]?(d=l[n])==null||d.call(l,t):(o[n]=o[n]||[],(f=o[n])==null||f.push(t))})}),this},handle(i,t,n){var d;const l=this._addHandlers,o=this._removeHandlers;if(l[i]||o[i])throw new Error(`Extension type ${i} already has a handler`);l[i]=t,o[i]=n;const f=this._queue;return f[i]&&((d=f[i])==null||d.forEach(m=>t(m)),delete f[i]),this},handleByMap(i,t){return this.handle(i,n=>{n.name&&(t[n.name]=n.ref)},n=>{n.name&&delete t[n.name]})},handleByNamedList(i,t,n=-1){return this.handle(i,l=>{t.findIndex(f=>f.name===l.name)>=0||(t.push({name:l.name,value:l.ref}),t.sort((f,d)=>Gm(d.value,n)-Gm(f.value,n)))},l=>{const o=t.findIndex(f=>f.name===l.name);o!==-1&&t.splice(o,1)})},handleByList(i,t,n=-1){return this.handle(i,l=>{t.includes(l.ref)||(t.push(l.ref),t.sort((o,f)=>Gm(f,n)-Gm(o,n)))},l=>{const o=t.indexOf(l.ref);o!==-1&&t.splice(o,1)})},mixin(i,...t){for(const n of t)Object.defineProperties(i.prototype,Object.getOwnPropertyDescriptors(n))}},_T={extension:{type:Pt.Environment,name:"browser",priority:-1},test:()=>!0,load:async()=>{await qh(()=>import("./browserAll-BbiQUc2F.js"),__vite__mapDeps([0,1]))}},ST={extension:{type:Pt.Environment,name:"webworker",priority:0},test:()=>typeof self<"u"&&self.WorkerGlobalScope!==void 0,load:async()=>{await qh(()=>import("./webworkerAll-Bbzbnqr0.js"),[])}};class Pn{constructor(t,n,l){this._x=n||0,this._y=l||0,this._observer=t}clone(t){return new Pn(t??this._observer,this._x,this._y)}set(t=0,n=t){return(this._x!==t||this._y!==n)&&(this._x=t,this._y=n,this._observer._onUpdate(this)),this}copyFrom(t){return(this._x!==t.x||this._y!==t.y)&&(this._x=t.x,this._y=t.y,this._observer._onUpdate(this)),this}copyTo(t){return t.set(this._x,this._y),t}equals(t){return t.x===this._x&&t.y===this._y}toString(){return`[pixi.js/math:ObservablePoint x=${this._x} y=${this._y} scope=${this._observer}]`}get x(){return this._x}set x(t){this._x!==t&&(this._x=t,this._observer._onUpdate(this))}get y(){return this._y}set y(t){this._y!==t&&(this._y=t,this._observer._onUpdate(this))}}var xy={exports:{}},bv;function bT(){return bv||(bv=1,(function(i){var t=Object.prototype.hasOwnProperty,n="~";function l(){}Object.create&&(l.prototype=Object.create(null),new l().__proto__||(n=!1));function o(g,v,_){this.fn=g,this.context=v,this.once=_||!1}function f(g,v,_,b,C){if(typeof _!="function")throw new TypeError("The listener must be a function");var E=new o(_,b||g,C),M=n?n+v:v;return g._events[M]?g._events[M].fn?g._events[M]=[g._events[M],E]:g._events[M].push(E):(g._events[M]=E,g._eventsCount++),g}function d(g,v){--g._eventsCount===0?g._events=new l:delete g._events[v]}function m(){this._events=new l,this._eventsCount=0}m.prototype.eventNames=function(){var v=[],_,b;if(this._eventsCount===0)return v;for(b in _=this._events)t.call(_,b)&&v.push(n?b.slice(1):b);return Object.getOwnPropertySymbols?v.concat(Object.getOwnPropertySymbols(_)):v},m.prototype.listeners=function(v){var _=n?n+v:v,b=this._events[_];if(!b)return[];if(b.fn)return[b.fn];for(var C=0,E=b.length,M=new Array(E);C<E;C++)M[C]=b[C].fn;return M},m.prototype.listenerCount=function(v){var _=n?n+v:v,b=this._events[_];return b?b.fn?1:b.length:0},m.prototype.emit=function(v,_,b,C,E,M){var R=n?n+v:v;if(!this._events[R])return!1;var z=this._events[R],O=arguments.length,B,U;if(z.fn){switch(z.once&&this.removeListener(v,z.fn,void 0,!0),O){case 1:return z.fn.call(z.context),!0;case 2:return z.fn.call(z.context,_),!0;case 3:return z.fn.call(z.context,_,b),!0;case 4:return z.fn.call(z.context,_,b,C),!0;case 5:return z.fn.call(z.context,_,b,C,E),!0;case 6:return z.fn.call(z.context,_,b,C,E,M),!0}for(U=1,B=new Array(O-1);U<O;U++)B[U-1]=arguments[U];z.fn.apply(z.context,B)}else{var G=z.length,Z;for(U=0;U<G;U++)switch(z[U].once&&this.removeListener(v,z[U].fn,void 0,!0),O){case 1:z[U].fn.call(z[U].context);break;case 2:z[U].fn.call(z[U].context,_);break;case 3:z[U].fn.call(z[U].context,_,b);break;case 4:z[U].fn.call(z[U].context,_,b,C);break;default:if(!B)for(Z=1,B=new Array(O-1);Z<O;Z++)B[Z-1]=arguments[Z];z[U].fn.apply(z[U].context,B)}}return!0},m.prototype.on=function(v,_,b){return f(this,v,_,b,!1)},m.prototype.once=function(v,_,b){return f(this,v,_,b,!0)},m.prototype.removeListener=function(v,_,b,C){var E=n?n+v:v;if(!this._events[E])return this;if(!_)return d(this,E),this;var M=this._events[E];if(M.fn)M.fn===_&&(!C||M.once)&&(!b||M.context===b)&&d(this,E);else{for(var R=0,z=[],O=M.length;R<O;R++)(M[R].fn!==_||C&&!M[R].once||b&&M[R].context!==b)&&z.push(M[R]);z.length?this._events[E]=z.length===1?z[0]:z:d(this,E)}return this},m.prototype.removeAllListeners=function(v){var _;return v?(_=n?n+v:v,this._events[_]&&d(this,_)):(this._events=new l,this._eventsCount=0),this},m.prototype.off=m.prototype.removeListener,m.prototype.addListener=m.prototype.on,m.prefixed=n,m.EventEmitter=m,i.exports=m})(xy)),xy.exports}var TT=bT();const us=mp(TT),ET=Math.PI*2,CT=180/Math.PI,AT=Math.PI/180;class ha{constructor(t=0,n=0){this.x=0,this.y=0,this.x=t,this.y=n}clone(){return new ha(this.x,this.y)}copyFrom(t){return this.set(t.x,t.y),this}copyTo(t){return t.set(this.x,this.y),t}equals(t){return t.x===this.x&&t.y===this.y}set(t=0,n=t){return this.x=t,this.y=n,this}toString(){return`[pixi.js/math:Point x=${this.x} y=${this.y}]`}static get shared(){return _y.x=0,_y.y=0,_y}}const _y=new ha;class ie{constructor(t=1,n=0,l=0,o=1,f=0,d=0){this.array=null,this.a=t,this.b=n,this.c=l,this.d=o,this.tx=f,this.ty=d}fromArray(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]}set(t,n,l,o,f,d){return this.a=t,this.b=n,this.c=l,this.d=o,this.tx=f,this.ty=d,this}toArray(t,n){this.array||(this.array=new Float32Array(9));const l=n||this.array;return t?(l[0]=this.a,l[1]=this.b,l[2]=0,l[3]=this.c,l[4]=this.d,l[5]=0,l[6]=this.tx,l[7]=this.ty,l[8]=1):(l[0]=this.a,l[1]=this.c,l[2]=this.tx,l[3]=this.b,l[4]=this.d,l[5]=this.ty,l[6]=0,l[7]=0,l[8]=1),l}apply(t,n){n=n||new ha;const l=t.x,o=t.y;return n.x=this.a*l+this.c*o+this.tx,n.y=this.b*l+this.d*o+this.ty,n}applyInverse(t,n){n=n||new ha;const l=this.a,o=this.b,f=this.c,d=this.d,m=this.tx,g=this.ty,v=1/(l*d+f*-o),_=t.x,b=t.y;return n.x=d*v*_+-f*v*b+(g*f-m*d)*v,n.y=l*v*b+-o*v*_+(-g*l+m*o)*v,n}translate(t,n){return this.tx+=t,this.ty+=n,this}scale(t,n){return this.a*=t,this.d*=n,this.c*=t,this.b*=n,this.tx*=t,this.ty*=n,this}rotate(t){const n=Math.cos(t),l=Math.sin(t),o=this.a,f=this.c,d=this.tx;return this.a=o*n-this.b*l,this.b=o*l+this.b*n,this.c=f*n-this.d*l,this.d=f*l+this.d*n,this.tx=d*n-this.ty*l,this.ty=d*l+this.ty*n,this}append(t){const n=this.a,l=this.b,o=this.c,f=this.d;return this.a=t.a*n+t.b*o,this.b=t.a*l+t.b*f,this.c=t.c*n+t.d*o,this.d=t.c*l+t.d*f,this.tx=t.tx*n+t.ty*o+this.tx,this.ty=t.tx*l+t.ty*f+this.ty,this}appendFrom(t,n){const l=t.a,o=t.b,f=t.c,d=t.d,m=t.tx,g=t.ty,v=n.a,_=n.b,b=n.c,C=n.d;return this.a=l*v+o*b,this.b=l*_+o*C,this.c=f*v+d*b,this.d=f*_+d*C,this.tx=m*v+g*b+n.tx,this.ty=m*_+g*C+n.ty,this}setTransform(t,n,l,o,f,d,m,g,v){return this.a=Math.cos(m+v)*f,this.b=Math.sin(m+v)*f,this.c=-Math.sin(m-g)*d,this.d=Math.cos(m-g)*d,this.tx=t-(l*this.a+o*this.c),this.ty=n-(l*this.b+o*this.d),this}prepend(t){const n=this.tx;if(t.a!==1||t.b!==0||t.c!==0||t.d!==1){const l=this.a,o=this.c;this.a=l*t.a+this.b*t.c,this.b=l*t.b+this.b*t.d,this.c=o*t.a+this.d*t.c,this.d=o*t.b+this.d*t.d}return this.tx=n*t.a+this.ty*t.c+t.tx,this.ty=n*t.b+this.ty*t.d+t.ty,this}decompose(t){const n=this.a,l=this.b,o=this.c,f=this.d,d=t.pivot,m=-Math.atan2(-o,f),g=Math.atan2(l,n),v=Math.abs(m+g);return v<1e-5||Math.abs(ET-v)<1e-5?(t.rotation=g,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=m,t.skew.y=g),t.scale.x=Math.sqrt(n*n+l*l),t.scale.y=Math.sqrt(o*o+f*f),t.position.x=this.tx+(d.x*n+d.y*o),t.position.y=this.ty+(d.x*l+d.y*f),t}invert(){const t=this.a,n=this.b,l=this.c,o=this.d,f=this.tx,d=t*o-n*l;return this.a=o/d,this.b=-n/d,this.c=-l/d,this.d=t/d,this.tx=(l*this.ty-o*f)/d,this.ty=-(t*this.ty-n*f)/d,this}isIdentity(){return this.a===1&&this.b===0&&this.c===0&&this.d===1&&this.tx===0&&this.ty===0}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){const t=new ie;return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyTo(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t}copyFrom(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this}equals(t){return t.a===this.a&&t.b===this.b&&t.c===this.c&&t.d===this.d&&t.tx===this.tx&&t.ty===this.ty}toString(){return`[pixi.js:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return RT.identity()}static get shared(){return MT.identity()}}const MT=new ie,RT=new ie,Pr=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],Wr=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],Fr=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],Ir=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],lg=[],Tx=[],jm=Math.sign;function zT(){for(let i=0;i<16;i++){const t=[];lg.push(t);for(let n=0;n<16;n++){const l=jm(Pr[i]*Pr[n]+Fr[i]*Wr[n]),o=jm(Wr[i]*Pr[n]+Ir[i]*Wr[n]),f=jm(Pr[i]*Fr[n]+Fr[i]*Ir[n]),d=jm(Wr[i]*Fr[n]+Ir[i]*Ir[n]);for(let m=0;m<16;m++)if(Pr[m]===l&&Wr[m]===o&&Fr[m]===f&&Ir[m]===d){t.push(m);break}}}for(let i=0;i<16;i++){const t=new ie;t.set(Pr[i],Wr[i],Fr[i],Ir[i],0,0),Tx.push(t)}}zT();const Be={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:i=>Pr[i],uY:i=>Wr[i],vX:i=>Fr[i],vY:i=>Ir[i],inv:i=>i&8?i&15:-i&7,add:(i,t)=>lg[i][t],sub:(i,t)=>lg[i][Be.inv(t)],rotate180:i=>i^4,isVertical:i=>(i&3)===2,byDirection:(i,t)=>Math.abs(i)*2<=Math.abs(t)?t>=0?Be.S:Be.N:Math.abs(t)*2<=Math.abs(i)?i>0?Be.E:Be.W:t>0?i>0?Be.SE:Be.SW:i>0?Be.NE:Be.NW,matrixAppendRotationInv:(i,t,n=0,l=0,o=0,f=0)=>{const d=Tx[Be.inv(t)],m=d.a,g=d.b,v=d.c,_=d.d,b=n-Math.min(0,m*o,v*f,m*o+v*f),C=l-Math.min(0,g*o,_*f,g*o+_*f),E=i.a,M=i.b,R=i.c,z=i.d;i.a=m*E+g*R,i.b=m*M+g*z,i.c=v*E+_*R,i.d=v*M+_*z,i.tx=b*E+C*R+i.tx,i.ty=b*M+C*z+i.ty},transformRectCoords:(i,t,n,l)=>{const{x:o,y:f,width:d,height:m}=i,{x:g,y:v,width:_,height:b}=t;return n===Be.E?(l.set(o+g,f+v,d,m),l):n===Be.S?l.set(_-f-m+g,o+v,m,d):n===Be.W?l.set(_-o-d+g,b-f-m+v,d,m):n===Be.N?l.set(f+g,b-o-d+v,m,d):l.set(o+g,f+v,d,m)}},qm=[new ha,new ha,new ha,new ha];class dn{constructor(t=0,n=0,l=0,o=0){this.type="rectangle",this.x=Number(t),this.y=Number(n),this.width=Number(l),this.height=Number(o)}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}isEmpty(){return this.left===this.right||this.top===this.bottom}static get EMPTY(){return new dn(0,0,0,0)}clone(){return new dn(this.x,this.y,this.width,this.height)}copyFromBounds(t){return this.x=t.minX,this.y=t.minY,this.width=t.maxX-t.minX,this.height=t.maxY-t.minY,this}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,n){return this.width<=0||this.height<=0?!1:t>=this.x&&t<this.x+this.width&&n>=this.y&&n<this.y+this.height}strokeContains(t,n,l,o=.5){const{width:f,height:d}=this;if(f<=0||d<=0)return!1;const m=this.x,g=this.y,v=l*(1-o),_=l-v,b=m-v,C=m+f+v,E=g-v,M=g+d+v,R=m+_,z=m+f-_,O=g+_,B=g+d-_;return t>=b&&t<=C&&n>=E&&n<=M&&!(t>R&&t<z&&n>O&&n<B)}intersects(t,n){if(!n){const gt=this.x<t.x?t.x:this.x;if((this.right>t.right?t.right:this.right)<=gt)return!1;const ht=this.y<t.y?t.y:this.y;return(this.bottom>t.bottom?t.bottom:this.bottom)>ht}const l=this.left,o=this.right,f=this.top,d=this.bottom;if(o<=l||d<=f)return!1;const m=qm[0].set(t.left,t.top),g=qm[1].set(t.left,t.bottom),v=qm[2].set(t.right,t.top),_=qm[3].set(t.right,t.bottom);if(v.x<=m.x||g.y<=m.y)return!1;const b=Math.sign(n.a*n.d-n.b*n.c);if(b===0||(n.apply(m,m),n.apply(g,g),n.apply(v,v),n.apply(_,_),Math.max(m.x,g.x,v.x,_.x)<=l||Math.min(m.x,g.x,v.x,_.x)>=o||Math.max(m.y,g.y,v.y,_.y)<=f||Math.min(m.y,g.y,v.y,_.y)>=d))return!1;const C=b*(g.y-m.y),E=b*(m.x-g.x),M=C*l+E*f,R=C*o+E*f,z=C*l+E*d,O=C*o+E*d;if(Math.max(M,R,z,O)<=C*m.x+E*m.y||Math.min(M,R,z,O)>=C*_.x+E*_.y)return!1;const B=b*(m.y-v.y),U=b*(v.x-m.x),G=B*l+U*f,Z=B*o+U*f,Q=B*l+U*d,K=B*o+U*d;return!(Math.max(G,Z,Q,K)<=B*m.x+U*m.y||Math.min(G,Z,Q,K)>=B*_.x+U*_.y)}pad(t=0,n=t){return this.x-=t,this.y-=n,this.width+=t*2,this.height+=n*2,this}fit(t){const n=Math.max(this.x,t.x),l=Math.min(this.x+this.width,t.x+t.width),o=Math.max(this.y,t.y),f=Math.min(this.y+this.height,t.y+t.height);return this.x=n,this.width=Math.max(l-n,0),this.y=o,this.height=Math.max(f-o,0),this}ceil(t=1,n=.001){const l=Math.ceil((this.x+this.width-n)*t)/t,o=Math.ceil((this.y+this.height-n)*t)/t;return this.x=Math.floor((this.x+n)*t)/t,this.y=Math.floor((this.y+n)*t)/t,this.width=l-this.x,this.height=o-this.y,this}scale(t,n=t){return this.x*=t,this.y*=n,this.width*=t,this.height*=n,this}enlarge(t){const n=Math.min(this.x,t.x),l=Math.max(this.x+this.width,t.x+t.width),o=Math.min(this.y,t.y),f=Math.max(this.y+this.height,t.y+t.height);return this.x=n,this.width=l-n,this.y=o,this.height=f-o,this}getBounds(t){return t||(t=new dn),t.copyFrom(this),t}containsRect(t){if(this.width<=0||this.height<=0)return!1;const n=t.x,l=t.y,o=t.x+t.width,f=t.y+t.height;return n>=this.x&&n<this.x+this.width&&l>=this.y&&l<this.y+this.height&&o>=this.x&&o<this.x+this.width&&f>=this.y&&f<this.y+this.height}set(t,n,l,o){return this.x=t,this.y=n,this.width=l,this.height=o,this}toString(){return`[pixi.js/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}}const Sy={default:-1};function rn(i="default"){return Sy[i]===void 0&&(Sy[i]=-1),++Sy[i]}const Tv=new Set,un="8.0.0",DT="8.3.4",Oc={quiet:!1,noColor:!1},he=((i,t,n=3)=>{if(Oc.quiet||Tv.has(t))return;let l=new Error().stack;const o=`${t}
|
|
62
|
+
Deprecated since v${i}`,f=typeof console.groupCollapsed=="function"&&!Oc.noColor;typeof l>"u"?console.warn("PixiJS Deprecation Warning: ",o):(l=l.split(`
|
|
63
|
+
`).splice(n).join(`
|
|
64
|
+
`),f?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",o),console.warn(l),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",o),console.warn(l))),Tv.add(t)});Object.defineProperties(he,{quiet:{get:()=>Oc.quiet,set:i=>{Oc.quiet=i},enumerable:!0,configurable:!1},noColor:{get:()=>Oc.noColor,set:i=>{Oc.noColor=i},enumerable:!0,configurable:!1}});const Ex=()=>{};function Hc(i){return i+=i===0?1:0,--i,i|=i>>>1,i|=i>>>2,i|=i>>>4,i|=i>>>8,i|=i>>>16,i+1}function Ev(i){return!(i&i-1)&&!!i}function Cx(i){const t={};for(const n in i)i[n]!==void 0&&(t[n]=i[n]);return t}const Cv=Object.create(null);function OT(i){const t=Cv[i];return t===void 0&&(Cv[i]=rn("resource")),t}const Ax=class Mx extends us{constructor(t={}){super(),this._resourceType="textureSampler",this._touched=0,this._maxAnisotropy=1,this.destroyed=!1,t={...Mx.defaultOptions,...t},this.addressMode=t.addressMode,this.addressModeU=t.addressModeU??this.addressModeU,this.addressModeV=t.addressModeV??this.addressModeV,this.addressModeW=t.addressModeW??this.addressModeW,this.scaleMode=t.scaleMode,this.magFilter=t.magFilter??this.magFilter,this.minFilter=t.minFilter??this.minFilter,this.mipmapFilter=t.mipmapFilter??this.mipmapFilter,this.lodMinClamp=t.lodMinClamp,this.lodMaxClamp=t.lodMaxClamp,this.compare=t.compare,this.maxAnisotropy=t.maxAnisotropy??1}set addressMode(t){this.addressModeU=t,this.addressModeV=t,this.addressModeW=t}get addressMode(){return this.addressModeU}set wrapMode(t){he(un,"TextureStyle.wrapMode is now TextureStyle.addressMode"),this.addressMode=t}get wrapMode(){return this.addressMode}set scaleMode(t){this.magFilter=t,this.minFilter=t,this.mipmapFilter=t}get scaleMode(){return this.magFilter}set maxAnisotropy(t){this._maxAnisotropy=Math.min(t,16),this._maxAnisotropy>1&&(this.scaleMode="linear")}get maxAnisotropy(){return this._maxAnisotropy}get _resourceId(){return this._sharedResourceId||this._generateResourceId()}update(){this._sharedResourceId=null,this.emit("change",this)}_generateResourceId(){const t=`${this.addressModeU}-${this.addressModeV}-${this.addressModeW}-${this.magFilter}-${this.minFilter}-${this.mipmapFilter}-${this.lodMinClamp}-${this.lodMaxClamp}-${this.compare}-${this._maxAnisotropy}`;return this._sharedResourceId=OT(t),this._resourceId}destroy(){this.destroyed=!0,this.emit("destroy",this),this.emit("change",this),this.removeAllListeners()}};Ax.defaultOptions={addressMode:"clamp-to-edge",scaleMode:"linear"};let Gc=Ax;const Rx=class zx extends us{constructor(t={}){super(),this.options=t,this._gpuData=Object.create(null),this._gcLastUsed=-1,this.uid=rn("textureSource"),this._resourceType="textureSource",this._resourceId=rn("resource"),this.uploadMethodId="unknown",this._resolution=1,this.pixelWidth=1,this.pixelHeight=1,this.width=1,this.height=1,this.sampleCount=1,this.mipLevelCount=1,this.autoGenerateMipmaps=!1,this.format="rgba8unorm",this.dimension="2d",this.viewDimension="2d",this.arrayLayerCount=1,this.antialias=!1,this._touched=0,this._batchTick=-1,this._textureBindLocation=-1,t={...zx.defaultOptions,...t},this.label=t.label??"",this.resource=t.resource,this.autoGarbageCollect=t.autoGarbageCollect,this._resolution=t.resolution,t.width?this.pixelWidth=t.width*this._resolution:this.pixelWidth=this.resource?this.resourceWidth??1:1,t.height?this.pixelHeight=t.height*this._resolution:this.pixelHeight=this.resource?this.resourceHeight??1:1,this.width=this.pixelWidth/this._resolution,this.height=this.pixelHeight/this._resolution,this.format=t.format,this.dimension=t.dimensions,this.viewDimension=t.viewDimension??t.dimensions,this.arrayLayerCount=t.arrayLayerCount,this.mipLevelCount=t.mipLevelCount,this.autoGenerateMipmaps=t.autoGenerateMipmaps,this.sampleCount=t.sampleCount,this.antialias=t.antialias,this.alphaMode=t.alphaMode,this.style=new Gc(Cx(t)),this.destroyed=!1,this._refreshPOT()}get source(){return this}get style(){return this._style}set style(t){var n,l;this.style!==t&&((n=this._style)==null||n.off("change",this._onStyleChange,this),this._style=t,(l=this._style)==null||l.on("change",this._onStyleChange,this),this._onStyleChange())}set maxAnisotropy(t){this._style.maxAnisotropy=t}get maxAnisotropy(){return this._style.maxAnisotropy}get addressMode(){return this._style.addressMode}set addressMode(t){this._style.addressMode=t}get repeatMode(){return this._style.addressMode}set repeatMode(t){this._style.addressMode=t}get magFilter(){return this._style.magFilter}set magFilter(t){this._style.magFilter=t}get minFilter(){return this._style.minFilter}set minFilter(t){this._style.minFilter=t}get mipmapFilter(){return this._style.mipmapFilter}set mipmapFilter(t){this._style.mipmapFilter=t}get lodMinClamp(){return this._style.lodMinClamp}set lodMinClamp(t){this._style.lodMinClamp=t}get lodMaxClamp(){return this._style.lodMaxClamp}set lodMaxClamp(t){this._style.lodMaxClamp=t}_onStyleChange(){this.emit("styleChange",this)}update(){if(this.resource){const t=this._resolution;if(this.resize(this.resourceWidth/t,this.resourceHeight/t))return}this.emit("update",this)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this._style&&(this._style.destroy(),this._style=null),this.uploadMethodId=null,this.resource=null,this.removeAllListeners()}unload(){var t,n;this._resourceId=rn("resource"),this.emit("change",this),this.emit("unload",this);for(const l in this._gpuData)(n=(t=this._gpuData[l])==null?void 0:t.destroy)==null||n.call(t);this._gpuData=Object.create(null)}get resourceWidth(){const{resource:t}=this;return t.naturalWidth||t.videoWidth||t.displayWidth||t.width}get resourceHeight(){const{resource:t}=this;return t.naturalHeight||t.videoHeight||t.displayHeight||t.height}get resolution(){return this._resolution}set resolution(t){this._resolution!==t&&(this._resolution=t,this.width=this.pixelWidth/t,this.height=this.pixelHeight/t)}resize(t,n,l){l||(l=this._resolution),t||(t=this.width),n||(n=this.height);const o=Math.round(t*l),f=Math.round(n*l);return this.width=o/l,this.height=f/l,this._resolution=l,this.pixelWidth===o&&this.pixelHeight===f?!1:(this._refreshPOT(),this.pixelWidth=o,this.pixelHeight=f,this.emit("resize",this),this._resourceId=rn("resource"),this.emit("change",this),!0)}updateMipmaps(){this.autoGenerateMipmaps&&this.mipLevelCount>1&&this.emit("updateMipmaps",this)}set wrapMode(t){this._style.wrapMode=t}get wrapMode(){return this._style.wrapMode}set scaleMode(t){this._style.scaleMode=t}get scaleMode(){return this._style.scaleMode}_refreshPOT(){this.isPowerOfTwo=Ev(this.pixelWidth)&&Ev(this.pixelHeight)}static test(t){throw new Error("Unimplemented")}};Rx.defaultOptions={resolution:1,format:"bgra8unorm",alphaMode:"premultiply-alpha-on-upload",dimensions:"2d",viewDimension:"2d",arrayLayerCount:1,mipLevelCount:1,autoGenerateMipmaps:!1,sampleCount:1,antialias:!1,autoGarbageCollect:!1};let Qi=Rx;class wg extends Qi{constructor(t){const n=t.resource||new Float32Array(t.width*t.height*4);let l=t.format;l||(n instanceof Float32Array?l="rgba32float":n instanceof Int32Array||n instanceof Uint32Array?l="rgba32uint":n instanceof Int16Array||n instanceof Uint16Array?l="rgba16uint":(n instanceof Int8Array,l="bgra8unorm")),super({...t,resource:n,format:l}),this.uploadMethodId="buffer"}static test(t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array}}wg.extension=Pt.TextureSource;const Av=new ie;class NT{constructor(t,n){this.mapCoord=new ie,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,typeof n>"u"?this.clampMargin=t.width<10?0:.5:this.clampMargin=n,this.isSimple=!1,this.texture=t}get texture(){return this._texture}set texture(t){var n;this.texture!==t&&((n=this._texture)==null||n.removeListener("update",this.update,this),this._texture=t,this._texture.addListener("update",this.update,this),this.update())}multiplyUvs(t,n){n===void 0&&(n=t);const l=this.mapCoord;for(let o=0;o<t.length;o+=2){const f=t[o],d=t[o+1];n[o]=f*l.a+d*l.c+l.tx,n[o+1]=f*l.b+d*l.d+l.ty}return n}update(){const t=this._texture;this._updateID++;const n=t.uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);const l=t.orig,o=t.trim;o&&(Av.set(l.width/o.width,0,0,l.height/o.height,-o.x/o.width,-o.y/o.height),this.mapCoord.append(Av));const f=t.source,d=this.uClampFrame,m=this.clampMargin/f._resolution,g=this.clampOffset/f._resolution;return d[0]=(t.frame.x+m+g)/f.width,d[1]=(t.frame.y+m+g)/f.height,d[2]=(t.frame.x+t.frame.width-m+g)/f.width,d[3]=(t.frame.y+t.frame.height-m+g)/f.height,this.uClampOffset[0]=this.clampOffset/f.pixelWidth,this.uClampOffset[1]=this.clampOffset/f.pixelHeight,this.isSimple=t.frame.width===f.width&&t.frame.height===f.height&&t.rotate===0,!0}}class Re extends us{constructor({source:t,label:n,frame:l,orig:o,trim:f,defaultAnchor:d,defaultBorders:m,rotate:g,dynamic:v}={}){if(super(),this.uid=rn("texture"),this.uvs={x0:0,y0:0,x1:0,y1:0,x2:0,y2:0,x3:0,y3:0},this.frame=new dn,this.noFrame=!1,this.dynamic=!1,this.isTexture=!0,this.label=n,this.source=(t==null?void 0:t.source)??new Qi,this.noFrame=!l,l)this.frame.copyFrom(l);else{const{width:_,height:b}=this._source;this.frame.width=_,this.frame.height=b}this.orig=o||this.frame,this.trim=f,this.rotate=g??0,this.defaultAnchor=d,this.defaultBorders=m,this.destroyed=!1,this.dynamic=v||!1,this.updateUvs()}set source(t){this._source&&this._source.off("resize",this.update,this),this._source=t,t.on("resize",this.update,this),this.emit("update",this)}get source(){return this._source}get textureMatrix(){return this._textureMatrix||(this._textureMatrix=new NT(this)),this._textureMatrix}get width(){return this.orig.width}get height(){return this.orig.height}updateUvs(){const{uvs:t,frame:n}=this,{width:l,height:o}=this._source,f=n.x/l,d=n.y/o,m=n.width/l,g=n.height/o;let v=this.rotate;if(v){const _=m/2,b=g/2,C=f+_,E=d+b;v=Be.add(v,Be.NW),t.x0=C+_*Be.uX(v),t.y0=E+b*Be.uY(v),v=Be.add(v,2),t.x1=C+_*Be.uX(v),t.y1=E+b*Be.uY(v),v=Be.add(v,2),t.x2=C+_*Be.uX(v),t.y2=E+b*Be.uY(v),v=Be.add(v,2),t.x3=C+_*Be.uX(v),t.y3=E+b*Be.uY(v)}else t.x0=f,t.y0=d,t.x1=f+m,t.y1=d,t.x2=f+m,t.y2=d+g,t.x3=f,t.y3=d+g}destroy(t=!1){this._source&&(this._source.off("resize",this.update,this),t&&(this._source.destroy(),this._source=null)),this._textureMatrix=null,this.destroyed=!0,this.emit("destroy",this),this.removeAllListeners()}update(){this.noFrame&&(this.frame.width=this._source.width,this.frame.height=this._source.height),this.updateUvs(),this.emit("update",this)}get baseTexture(){return he(un,"Texture.baseTexture is now Texture.source"),this._source}}Re.EMPTY=new Re({label:"EMPTY",source:new Qi({label:"EMPTY"})});Re.EMPTY.destroy=Ex;Re.WHITE=new Re({source:new wg({resource:new Uint8Array([255,255,255,255]),width:1,height:1,alphaMode:"premultiply-alpha-on-upload",label:"WHITE"}),label:"WHITE"});Re.WHITE.destroy=Ex;function Dx(i,t,n){const{width:l,height:o}=n.orig,f=n.trim;if(f){const d=f.width,m=f.height;i.minX=f.x-t._x*l,i.maxX=i.minX+d,i.minY=f.y-t._y*o,i.maxY=i.minY+m}else i.minX=-t._x*l,i.maxX=i.minX+l,i.minY=-t._y*o,i.maxY=i.minY+o}const Mv=new ie;class Vi{constructor(t=1/0,n=1/0,l=-1/0,o=-1/0){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Mv,this.minX=t,this.minY=n,this.maxX=l,this.maxY=o}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}get rectangle(){this._rectangle||(this._rectangle=new dn);const t=this._rectangle;return this.minX>this.maxX||this.minY>this.maxY?(t.x=0,t.y=0,t.width=0,t.height=0):t.copyFromBounds(this),t}clear(){return this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.matrix=Mv,this}set(t,n,l,o){this.minX=t,this.minY=n,this.maxX=l,this.maxY=o}addFrame(t,n,l,o,f){f||(f=this.matrix);const d=f.a,m=f.b,g=f.c,v=f.d,_=f.tx,b=f.ty;let C=this.minX,E=this.minY,M=this.maxX,R=this.maxY,z=d*t+g*n+_,O=m*t+v*n+b;z<C&&(C=z),O<E&&(E=O),z>M&&(M=z),O>R&&(R=O),z=d*l+g*n+_,O=m*l+v*n+b,z<C&&(C=z),O<E&&(E=O),z>M&&(M=z),O>R&&(R=O),z=d*t+g*o+_,O=m*t+v*o+b,z<C&&(C=z),O<E&&(E=O),z>M&&(M=z),O>R&&(R=O),z=d*l+g*o+_,O=m*l+v*o+b,z<C&&(C=z),O<E&&(E=O),z>M&&(M=z),O>R&&(R=O),this.minX=C,this.minY=E,this.maxX=M,this.maxY=R}addRect(t,n){this.addFrame(t.x,t.y,t.x+t.width,t.y+t.height,n)}addBounds(t,n){this.addFrame(t.minX,t.minY,t.maxX,t.maxY,n)}addBoundsMask(t){this.minX=this.minX>t.minX?this.minX:t.minX,this.minY=this.minY>t.minY?this.minY:t.minY,this.maxX=this.maxX<t.maxX?this.maxX:t.maxX,this.maxY=this.maxY<t.maxY?this.maxY:t.maxY}applyMatrix(t){const n=this.minX,l=this.minY,o=this.maxX,f=this.maxY,{a:d,b:m,c:g,d:v,tx:_,ty:b}=t;let C=d*n+g*l+_,E=m*n+v*l+b;this.minX=C,this.minY=E,this.maxX=C,this.maxY=E,C=d*o+g*l+_,E=m*o+v*l+b,this.minX=C<this.minX?C:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=C>this.maxX?C:this.maxX,this.maxY=E>this.maxY?E:this.maxY,C=d*n+g*f+_,E=m*n+v*f+b,this.minX=C<this.minX?C:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=C>this.maxX?C:this.maxX,this.maxY=E>this.maxY?E:this.maxY,C=d*o+g*f+_,E=m*o+v*f+b,this.minX=C<this.minX?C:this.minX,this.minY=E<this.minY?E:this.minY,this.maxX=C>this.maxX?C:this.maxX,this.maxY=E>this.maxY?E:this.maxY}fit(t){return this.minX<t.left&&(this.minX=t.left),this.maxX>t.right&&(this.maxX=t.right),this.minY<t.top&&(this.minY=t.top),this.maxY>t.bottom&&(this.maxY=t.bottom),this}fitBounds(t,n,l,o){return this.minX<t&&(this.minX=t),this.maxX>n&&(this.maxX=n),this.minY<l&&(this.minY=l),this.maxY>o&&(this.maxY=o),this}pad(t,n=t){return this.minX-=t,this.maxX+=t,this.minY-=n,this.maxY+=n,this}ceil(){return this.minX=Math.floor(this.minX),this.minY=Math.floor(this.minY),this.maxX=Math.ceil(this.maxX),this.maxY=Math.ceil(this.maxY),this}clone(){return new Vi(this.minX,this.minY,this.maxX,this.maxY)}scale(t,n=t){return this.minX*=t,this.minY*=n,this.maxX*=t,this.maxY*=n,this}get x(){return this.minX}set x(t){const n=this.maxX-this.minX;this.minX=t,this.maxX=t+n}get y(){return this.minY}set y(t){const n=this.maxY-this.minY;this.minY=t,this.maxY=t+n}get width(){return this.maxX-this.minX}set width(t){this.maxX=this.minX+t}get height(){return this.maxY-this.minY}set height(t){this.maxY=this.minY+t}get left(){return this.minX}get right(){return this.maxX}get top(){return this.minY}get bottom(){return this.maxY}get isPositive(){return this.maxX-this.minX>0&&this.maxY-this.minY>0}get isValid(){return this.minX+this.minY!==1/0}addVertexData(t,n,l,o){let f=this.minX,d=this.minY,m=this.maxX,g=this.maxY;o||(o=this.matrix);const v=o.a,_=o.b,b=o.c,C=o.d,E=o.tx,M=o.ty;for(let R=n;R<l;R+=2){const z=t[R],O=t[R+1],B=v*z+b*O+E,U=_*z+C*O+M;f=B<f?B:f,d=U<d?U:d,m=B>m?B:m,g=U>g?U:g}this.minX=f,this.minY=d,this.maxX=m,this.maxY=g}containsPoint(t,n){return this.minX<=t&&this.minY<=n&&this.maxX>=t&&this.maxY>=n}toString(){return`[pixi.js:Bounds minX=${this.minX} minY=${this.minY} maxX=${this.maxX} maxY=${this.maxY} width=${this.width} height=${this.height}]`}copyFrom(t){return this.minX=t.minX,this.minY=t.minY,this.maxX=t.maxX,this.maxY=t.maxY,this}}var UT={grad:.9,turn:360,rad:360/(2*Math.PI)},Xs=function(i){return typeof i=="string"?i.length>0:typeof i=="number"},jn=function(i,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*i)/n+0},Li=function(i,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),i>n?n:i>t?i:t},Ox=function(i){return(i=isFinite(i)?i%360:0)>0?i:i+360},Rv=function(i){return{r:Li(i.r,0,255),g:Li(i.g,0,255),b:Li(i.b,0,255),a:Li(i.a)}},by=function(i){return{r:jn(i.r),g:jn(i.g),b:jn(i.b),a:jn(i.a,3)}},BT=/^#([0-9a-f]{3,8})$/i,Ym=function(i){var t=i.toString(16);return t.length<2?"0"+t:t},Nx=function(i){var t=i.r,n=i.g,l=i.b,o=i.a,f=Math.max(t,n,l),d=f-Math.min(t,n,l),m=d?f===t?(n-l)/d:f===n?2+(l-t)/d:4+(t-n)/d:0;return{h:60*(m<0?m+6:m),s:f?d/f*100:0,v:f/255*100,a:o}},Ux=function(i){var t=i.h,n=i.s,l=i.v,o=i.a;t=t/360*6,n/=100,l/=100;var f=Math.floor(t),d=l*(1-n),m=l*(1-(t-f)*n),g=l*(1-(1-t+f)*n),v=f%6;return{r:255*[l,m,d,d,g,l][v],g:255*[g,l,l,m,d,d][v],b:255*[d,d,g,l,l,m][v],a:o}},zv=function(i){return{h:Ox(i.h),s:Li(i.s,0,100),l:Li(i.l,0,100),a:Li(i.a)}},Dv=function(i){return{h:jn(i.h),s:jn(i.s),l:jn(i.l),a:jn(i.a,3)}},Ov=function(i){return Ux((n=(t=i).s,{h:t.h,s:(n*=((l=t.l)<50?l:100-l)/100)>0?2*n/(l+n)*100:0,v:l+n,a:t.a}));var t,n,l},Yh=function(i){return{h:(t=Nx(i)).h,s:(o=(200-(n=t.s))*(l=t.v)/100)>0&&o<200?n*l/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,n,l,o},wT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,HT=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,GT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,jT=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,sg={string:[[function(i){var t=BT.exec(i);return t?(i=t[1]).length<=4?{r:parseInt(i[0]+i[0],16),g:parseInt(i[1]+i[1],16),b:parseInt(i[2]+i[2],16),a:i.length===4?jn(parseInt(i[3]+i[3],16)/255,2):1}:i.length===6||i.length===8?{r:parseInt(i.substr(0,2),16),g:parseInt(i.substr(2,2),16),b:parseInt(i.substr(4,2),16),a:i.length===8?jn(parseInt(i.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(i){var t=GT.exec(i)||jT.exec(i);return t?t[2]!==t[4]||t[4]!==t[6]?null:Rv({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(i){var t=wT.exec(i)||HT.exec(i);if(!t)return null;var n,l,o=zv({h:(n=t[1],l=t[2],l===void 0&&(l="deg"),Number(n)*(UT[l]||1)),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)});return Ov(o)},"hsl"]],object:[[function(i){var t=i.r,n=i.g,l=i.b,o=i.a,f=o===void 0?1:o;return Xs(t)&&Xs(n)&&Xs(l)?Rv({r:Number(t),g:Number(n),b:Number(l),a:Number(f)}):null},"rgb"],[function(i){var t=i.h,n=i.s,l=i.l,o=i.a,f=o===void 0?1:o;if(!Xs(t)||!Xs(n)||!Xs(l))return null;var d=zv({h:Number(t),s:Number(n),l:Number(l),a:Number(f)});return Ov(d)},"hsl"],[function(i){var t=i.h,n=i.s,l=i.v,o=i.a,f=o===void 0?1:o;if(!Xs(t)||!Xs(n)||!Xs(l))return null;var d=(function(m){return{h:Ox(m.h),s:Li(m.s,0,100),v:Li(m.v,0,100),a:Li(m.a)}})({h:Number(t),s:Number(n),v:Number(l),a:Number(f)});return Ux(d)},"hsv"]]},Nv=function(i,t){for(var n=0;n<t.length;n++){var l=t[n][0](i);if(l)return[l,t[n][1]]}return[null,void 0]},qT=function(i){return typeof i=="string"?Nv(i.trim(),sg.string):typeof i=="object"&&i!==null?Nv(i,sg.object):[null,void 0]},Ty=function(i,t){var n=Yh(i);return{h:n.h,s:Li(n.s+100*t,0,100),l:n.l,a:n.a}},Ey=function(i){return(299*i.r+587*i.g+114*i.b)/1e3/255},Uv=function(i,t){var n=Yh(i);return{h:n.h,s:n.s,l:Li(n.l+100*t,0,100),a:n.a}},ug=(function(){function i(t){this.parsed=qT(t)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return i.prototype.isValid=function(){return this.parsed!==null},i.prototype.brightness=function(){return jn(Ey(this.rgba),2)},i.prototype.isDark=function(){return Ey(this.rgba)<.5},i.prototype.isLight=function(){return Ey(this.rgba)>=.5},i.prototype.toHex=function(){return t=by(this.rgba),n=t.r,l=t.g,o=t.b,d=(f=t.a)<1?Ym(jn(255*f)):"","#"+Ym(n)+Ym(l)+Ym(o)+d;var t,n,l,o,f,d},i.prototype.toRgb=function(){return by(this.rgba)},i.prototype.toRgbString=function(){return t=by(this.rgba),n=t.r,l=t.g,o=t.b,(f=t.a)<1?"rgba("+n+", "+l+", "+o+", "+f+")":"rgb("+n+", "+l+", "+o+")";var t,n,l,o,f},i.prototype.toHsl=function(){return Dv(Yh(this.rgba))},i.prototype.toHslString=function(){return t=Dv(Yh(this.rgba)),n=t.h,l=t.s,o=t.l,(f=t.a)<1?"hsla("+n+", "+l+"%, "+o+"%, "+f+")":"hsl("+n+", "+l+"%, "+o+"%)";var t,n,l,o,f},i.prototype.toHsv=function(){return t=Nx(this.rgba),{h:jn(t.h),s:jn(t.s),v:jn(t.v),a:jn(t.a,3)};var t},i.prototype.invert=function(){return as({r:255-(t=this.rgba).r,g:255-t.g,b:255-t.b,a:t.a});var t},i.prototype.saturate=function(t){return t===void 0&&(t=.1),as(Ty(this.rgba,t))},i.prototype.desaturate=function(t){return t===void 0&&(t=.1),as(Ty(this.rgba,-t))},i.prototype.grayscale=function(){return as(Ty(this.rgba,-1))},i.prototype.lighten=function(t){return t===void 0&&(t=.1),as(Uv(this.rgba,t))},i.prototype.darken=function(t){return t===void 0&&(t=.1),as(Uv(this.rgba,-t))},i.prototype.rotate=function(t){return t===void 0&&(t=15),this.hue(this.hue()+t)},i.prototype.alpha=function(t){return typeof t=="number"?as({r:(n=this.rgba).r,g:n.g,b:n.b,a:t}):jn(this.rgba.a,3);var n},i.prototype.hue=function(t){var n=Yh(this.rgba);return typeof t=="number"?as({h:t,s:n.s,l:n.l,a:n.a}):jn(n.h)},i.prototype.isEqual=function(t){return this.toHex()===as(t).toHex()},i})(),as=function(i){return i instanceof ug?i:new ug(i)},Bv=[],YT=function(i){i.forEach(function(t){Bv.indexOf(t)<0&&(t(ug,sg),Bv.push(t))})};function LT(i,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},l={};for(var o in n)l[n[o]]=o;var f={};i.prototype.toName=function(d){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var m,g,v=l[this.toHex()];if(v)return v;if(d!=null&&d.closest){var _=this.toRgb(),b=1/0,C="black";if(!f.length)for(var E in n)f[E]=new i(n[E]).toRgb();for(var M in n){var R=(m=_,g=f[M],Math.pow(m.r-g.r,2)+Math.pow(m.g-g.g,2)+Math.pow(m.b-g.b,2));R<b&&(b=R,C=M)}return C}},t.string.push([function(d){var m=d.toLowerCase(),g=m==="transparent"?"#0000":n[m];return g?new i(g).toRgb():null},"name"])}YT([LT]);const jc=class wh{constructor(t=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=t}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(t){return this.value=t,this}set value(t){if(t instanceof wh)this._value=this._cloneSource(t._value),this._int=t._int,this._components.set(t._components);else{if(t===null)throw new Error("Cannot set Color#value to null");(this._value===null||!this._isSourceEqual(this._value,t))&&(this._value=this._cloneSource(t),this._normalize(this._value))}}get value(){return this._value}_cloneSource(t){return typeof t=="string"||typeof t=="number"||t instanceof Number||t===null?t:Array.isArray(t)||ArrayBuffer.isView(t)?t.slice(0):typeof t=="object"&&t!==null?{...t}:t}_isSourceEqual(t,n){const l=typeof t;if(l!==typeof n)return!1;if(l==="number"||l==="string"||t instanceof Number)return t===n;if(Array.isArray(t)&&Array.isArray(n)||ArrayBuffer.isView(t)&&ArrayBuffer.isView(n))return t.length!==n.length?!1:t.every((f,d)=>f===n[d]);if(t!==null&&n!==null){const f=Object.keys(t),d=Object.keys(n);return f.length!==d.length?!1:f.every(m=>t[m]===n[m])}return t===n}toRgba(){const[t,n,l,o]=this._components;return{r:t,g:n,b:l,a:o}}toRgb(){const[t,n,l]=this._components;return{r:t,g:n,b:l}}toRgbaString(){const[t,n,l]=this.toUint8RgbArray();return`rgba(${t},${n},${l},${this.alpha})`}toUint8RgbArray(t){const[n,l,o]=this._components;return this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb),t[0]=Math.round(n*255),t[1]=Math.round(l*255),t[2]=Math.round(o*255),t}toArray(t){this._arrayRgba||(this._arrayRgba=[]),t||(t=this._arrayRgba);const[n,l,o,f]=this._components;return t[0]=n,t[1]=l,t[2]=o,t[3]=f,t}toRgbArray(t){this._arrayRgb||(this._arrayRgb=[]),t||(t=this._arrayRgb);const[n,l,o]=this._components;return t[0]=n,t[1]=l,t[2]=o,t}toNumber(){return this._int}toBgrNumber(){const[t,n,l]=this.toUint8RgbArray();return(l<<16)+(n<<8)+t}toLittleEndianNumber(){const t=this._int;return(t>>16)+(t&65280)+((t&255)<<16)}multiply(t){const[n,l,o,f]=wh._temp.setValue(t)._components;return this._components[0]*=n,this._components[1]*=l,this._components[2]*=o,this._components[3]*=f,this._refreshInt(),this._value=null,this}premultiply(t,n=!0){return n&&(this._components[0]*=t,this._components[1]*=t,this._components[2]*=t),this._components[3]=t,this._refreshInt(),this._value=null,this}toPremultiplied(t,n=!0){if(t===1)return(255<<24)+this._int;if(t===0)return n?0:this._int;let l=this._int>>16&255,o=this._int>>8&255,f=this._int&255;return n&&(l=l*t+.5|0,o=o*t+.5|0,f=f*t+.5|0),(t*255<<24)+(l<<16)+(o<<8)+f}toHex(){const t=this._int.toString(16);return`#${"000000".substring(0,6-t.length)+t}`}toHexa(){const n=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-n.length)+n}setAlpha(t){return this._components[3]=this._clamp(t),this._value=null,this}_normalize(t){let n,l,o,f;if((typeof t=="number"||t instanceof Number)&&t>=0&&t<=16777215){const d=t;n=(d>>16&255)/255,l=(d>>8&255)/255,o=(d&255)/255,f=1}else if((Array.isArray(t)||t instanceof Float32Array)&&t.length>=3&&t.length<=4)t=this._clamp(t),[n,l,o,f=1]=t;else if((t instanceof Uint8Array||t instanceof Uint8ClampedArray)&&t.length>=3&&t.length<=4)t=this._clamp(t,0,255),[n,l,o,f=255]=t,n/=255,l/=255,o/=255,f/=255;else if(typeof t=="string"||typeof t=="object"){if(typeof t=="string"){const m=wh.HEX_PATTERN.exec(t);m&&(t=`#${m[2]}`)}const d=as(t);d.isValid()&&({r:n,g:l,b:o,a:f}=d.rgba,n/=255,l/=255,o/=255)}if(n!==void 0)this._components[0]=n,this._components[1]=l,this._components[2]=o,this._components[3]=f,this._refreshInt();else throw new Error(`Unable to convert color ${t}`)}_refreshInt(){this._clamp(this._components);const[t,n,l]=this._components;this._int=(t*255<<16)+(n*255<<8)+(l*255|0)}_clamp(t,n=0,l=1){return typeof t=="number"?Math.min(Math.max(t,n),l):(t.forEach((o,f)=>{t[f]=Math.min(Math.max(o,n),l)}),t)}static isColorLike(t){return typeof t=="number"||typeof t=="string"||t instanceof Number||t instanceof wh||Array.isArray(t)||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Float32Array||t.r!==void 0&&t.g!==void 0&&t.b!==void 0||t.r!==void 0&&t.g!==void 0&&t.b!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0||t.h!==void 0&&t.s!==void 0&&t.l!==void 0&&t.a!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0||t.h!==void 0&&t.s!==void 0&&t.v!==void 0&&t.a!==void 0}};jc.shared=new jc;jc._temp=new jc;jc.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;let Mn=jc;const XT={cullArea:null,cullable:!1,cullableChildren:!0};let Cy=0;const wv=500;function Ha(...i){Cy!==wv&&(Cy++,Cy===wv?console.warn("PixiJS Warning: too many warnings, no more warnings will be reported to the console by PixiJS."):console.warn("PixiJS Warning: ",...i))}const $h={_registeredResources:new Set,register(i){this._registeredResources.add(i)},unregister(i){this._registeredResources.delete(i)},release(){this._registeredResources.forEach(i=>i.clear())},get registeredCount(){return this._registeredResources.size},isRegistered(i){return this._registeredResources.has(i)},reset(){this._registeredResources.clear()}};class VT{constructor(t,n){this._pool=[],this._count=0,this._index=0,this._classType=t,n&&this.prepopulate(n)}prepopulate(t){for(let n=0;n<t;n++)this._pool[this._index++]=new this._classType;this._count+=t}get(t){var l;let n;return this._index>0?n=this._pool[--this._index]:(n=new this._classType,this._count++),(l=n.init)==null||l.call(n,t),n}return(t){var n;(n=t.reset)==null||n.call(t),this._pool[this._index++]=t}get totalSize(){return this._count}get totalFree(){return this._index}get totalUsed(){return this._count-this._index}clear(){if(this._pool.length>0&&this._pool[0].destroy)for(let t=0;t<this._index;t++)this._pool[t].destroy();this._pool.length=0,this._count=0,this._index=0}}class QT{constructor(){this._poolsByClass=new Map}prepopulate(t,n){this.getPool(t).prepopulate(n)}get(t,n){return this.getPool(t).get(n)}return(t){this.getPool(t.constructor).return(t)}getPool(t){return this._poolsByClass.has(t)||this._poolsByClass.set(t,new VT(t)),this._poolsByClass.get(t)}stats(){const t={};return this._poolsByClass.forEach(n=>{const l=t[n._classType.name]?n._classType.name+n._classType.ID:n._classType.name;t[l]={free:n.totalFree,used:n.totalUsed,size:n.totalSize}}),t}clear(){this._poolsByClass.forEach(t=>t.clear()),this._poolsByClass.clear()}}const Wa=new QT;$h.register(Wa);const ZT={get isCachedAsTexture(){var i;return!!((i=this.renderGroup)!=null&&i.isCachedAsTexture)},cacheAsTexture(i){typeof i=="boolean"&&i===!1?this.disableRenderGroup():(this.enableRenderGroup(),this.renderGroup.enableCacheAsTexture(i===!0?{}:i))},updateCacheTexture(){var i;(i=this.renderGroup)==null||i.updateCacheTexture()},get cacheAsBitmap(){return this.isCachedAsTexture},set cacheAsBitmap(i){he("v8.6.0","cacheAsBitmap is deprecated, use cacheAsTexture instead."),this.cacheAsTexture(i)}};function KT(i,t,n){const l=i.length;let o;if(t>=l||n===0)return;n=t+n>l?l-t:n;const f=l-n;for(o=t;o<f;++o)i[o]=i[o+n];i.length=f}const kT={allowChildren:!0,removeChildren(i=0,t){var f;const n=t??this.children.length,l=n-i,o=[];if(l>0&&l<=n){for(let m=n-1;m>=i;m--){const g=this.children[m];g&&(o.push(g),g.parent=null)}KT(this.children,i,n);const d=this.renderGroup||this.parentRenderGroup;d&&d.removeChildren(o);for(let m=0;m<o.length;++m){const g=o[m];(f=g.parentRenderLayer)==null||f.detach(g),this.emit("childRemoved",g,this,m),o[m].emit("removed",this)}return o.length>0&&this._didViewChangeTick++,o}else if(l===0&&this.children.length===0)return o;throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},removeChildAt(i){const t=this.getChildAt(i);return this.removeChild(t)},getChildAt(i){if(i<0||i>=this.children.length)throw new Error(`getChildAt: Index (${i}) does not exist.`);return this.children[i]},setChildIndex(i,t){if(t<0||t>=this.children.length)throw new Error(`The index ${t} supplied is out of bounds ${this.children.length}`);this.getChildIndex(i),this.addChildAt(i,t)},getChildIndex(i){const t=this.children.indexOf(i);if(t===-1)throw new Error("The supplied Container must be a child of the caller");return t},addChildAt(i,t){this.allowChildren||he(un,"addChildAt: Only Containers will be allowed to add children in v8.0.0");const{children:n}=this;if(t<0||t>n.length)throw new Error(`${i}addChildAt: The index ${t} supplied is out of bounds ${n.length}`);const l=i.parent===this;if(i.parent){const f=i.parent.children.indexOf(i);if(l){if(f===t)return i;i.parent.children.splice(f,1)}else i.removeFromParent()}t===n.length?n.push(i):n.splice(t,0,i),i.parent=this,i.didChange=!0,i._updateFlags=15;const o=this.renderGroup||this.parentRenderGroup;return o&&o.addChild(i),this.sortableChildren&&(this.sortDirty=!0),l||(this.emit("childAdded",i,this,t),i.emit("added",this)),i},swapChildren(i,t){if(i===t)return;const n=this.getChildIndex(i),l=this.getChildIndex(t);this.children[n]=t,this.children[l]=i;const o=this.renderGroup||this.parentRenderGroup;o&&(o.structureDidChange=!0),this._didContainerChangeTick++},removeFromParent(){var i;(i=this.parent)==null||i.removeChild(this)},reparentChild(...i){return i.length===1?this.reparentChildAt(i[0],this.children.length):(i.forEach(t=>this.reparentChildAt(t,this.children.length)),i[0])},reparentChildAt(i,t){if(i.parent===this)return this.setChildIndex(i,t),i;const n=i.worldTransform.clone();i.removeFromParent(),this.addChildAt(i,t);const l=this.worldTransform.clone();return l.invert(),n.prepend(l),i.setFromMatrix(n),i},replaceChild(i,t){i.updateLocalTransform(),this.addChildAt(t,this.getChildIndex(i)),t.setFromMatrix(i.localTransform),t.updateLocalTransform(),this.removeChild(i)}},JT={collectRenderables(i,t,n){this.parentRenderLayer&&this.parentRenderLayer!==n||this.globalDisplayStatus<7||!this.includeInBuild||(this.sortableChildren&&this.sortChildren(),this.isSimple?this.collectRenderablesSimple(i,t,n):this.renderGroup?t.renderPipes.renderGroup.addRenderGroup(this.renderGroup,i):this.collectRenderablesWithEffects(i,t,n))},collectRenderablesSimple(i,t,n){const l=this.children,o=l.length;for(let f=0;f<o;f++)l[f].collectRenderables(i,t,n)},collectRenderablesWithEffects(i,t,n){const{renderPipes:l}=t;for(let o=0;o<this.effects.length;o++){const f=this.effects[o];l[f.pipe].push(f,this,i)}this.collectRenderablesSimple(i,t,n);for(let o=this.effects.length-1;o>=0;o--){const f=this.effects[o];l[f.pipe].pop(f,this,i)}}};class Hv{constructor(){this.pipe="filter",this.priority=1}destroy(){for(let t=0;t<this.filters.length;t++)this.filters[t].destroy();this.filters=null,this.filterArea=null}}class PT{constructor(){this._effectClasses=[],this._tests=[],this._initialized=!1}init(){this._initialized||(this._initialized=!0,this._effectClasses.forEach(t=>{this.add({test:t.test,maskClass:t})}))}add(t){this._tests.push(t)}getMaskEffect(t){this._initialized||this.init();for(let n=0;n<this._tests.length;n++){const l=this._tests[n];if(l.test(t))return Wa.get(l.maskClass,t)}return t}returnMaskEffect(t){Wa.return(t)}}const rg=new PT;Fe.handleByList(Pt.MaskEffect,rg._effectClasses);const WT={_maskEffect:null,_maskOptions:{inverse:!1},_filterEffect:null,effects:[],_markStructureAsChanged(){const i=this.renderGroup||this.parentRenderGroup;i&&(i.structureDidChange=!0)},addEffect(i){this.effects.indexOf(i)===-1&&(this.effects.push(i),this.effects.sort((n,l)=>n.priority-l.priority),this._markStructureAsChanged(),this._updateIsSimple())},removeEffect(i){const t=this.effects.indexOf(i);t!==-1&&(this.effects.splice(t,1),this._markStructureAsChanged(),this._updateIsSimple())},set mask(i){const t=this._maskEffect;(t==null?void 0:t.mask)!==i&&(t&&(this.removeEffect(t),rg.returnMaskEffect(t),this._maskEffect=null),i!=null&&(this._maskEffect=rg.getMaskEffect(i),this.addEffect(this._maskEffect)))},get mask(){var i;return(i=this._maskEffect)==null?void 0:i.mask},setMask(i){this._maskOptions={...this._maskOptions,...i},i.mask&&(this.mask=i.mask),this._markStructureAsChanged()},set filters(i){var f;!Array.isArray(i)&&i&&(i=[i]);const t=this._filterEffect||(this._filterEffect=new Hv);i=i;const n=(i==null?void 0:i.length)>0,l=((f=t.filters)==null?void 0:f.length)>0,o=n!==l;i=Array.isArray(i)?i.slice(0):i,t.filters=Object.freeze(i),o&&(n?this.addEffect(t):(this.removeEffect(t),t.filters=i??null))},get filters(){var i;return(i=this._filterEffect)==null?void 0:i.filters},set filterArea(i){this._filterEffect||(this._filterEffect=new Hv),this._filterEffect.filterArea=i},get filterArea(){var i;return(i=this._filterEffect)==null?void 0:i.filterArea}},FT={label:null,get name(){return he(un,"Container.name property has been removed, use Container.label instead"),this.label},set name(i){he(un,"Container.name property has been removed, use Container.label instead"),this.label=i},getChildByName(i,t=!1){return this.getChildByLabel(i,t)},getChildByLabel(i,t=!1){const n=this.children;for(let l=0;l<n.length;l++){const o=n[l];if(o.label===i||i instanceof RegExp&&i.test(o.label))return o}if(t)for(let l=0;l<n.length;l++){const f=n[l].getChildByLabel(i,!0);if(f)return f}return null},getChildrenByLabel(i,t=!1,n=[]){const l=this.children;for(let o=0;o<l.length;o++){const f=l[o];(f.label===i||i instanceof RegExp&&i.test(f.label))&&n.push(f)}if(t)for(let o=0;o<l.length;o++)l[o].getChildrenByLabel(i,!0,n);return n}},wa=Wa.getPool(ie),ks=Wa.getPool(Vi),IT=new ie,$T={getFastGlobalBounds(i,t){t||(t=new Vi),t.clear(),this._getGlobalBoundsRecursive(!!i,t,this.parentRenderLayer),t.isValid||t.set(0,0,0,0);const n=this.renderGroup||this.parentRenderGroup;return t.applyMatrix(n.worldTransform),t},_getGlobalBoundsRecursive(i,t,n){let l=t;if(i&&this.parentRenderLayer&&this.parentRenderLayer!==n||this.localDisplayStatus!==7||!this.measurable)return;const o=!!this.effects.length;if((this.renderGroup||o)&&(l=ks.get().clear()),this.boundsArea)t.addRect(this.boundsArea,this.worldTransform);else{if(this.renderPipeId){const d=this.bounds;l.addFrame(d.minX,d.minY,d.maxX,d.maxY,this.groupTransform)}const f=this.children;for(let d=0;d<f.length;d++)f[d]._getGlobalBoundsRecursive(i,l,n)}if(o){let f=!1;const d=this.renderGroup||this.parentRenderGroup;for(let m=0;m<this.effects.length;m++)this.effects[m].addBounds&&(f||(f=!0,l.applyMatrix(d.worldTransform)),this.effects[m].addBounds(l,!0));f&&l.applyMatrix(d.worldTransform.copyTo(IT).invert()),t.addBounds(l),ks.return(l)}else this.renderGroup&&(t.addBounds(l,this.relativeGroupTransform),ks.return(l))}};function Bx(i,t,n){n.clear();let l,o;return i.parent?t?l=i.parent.worldTransform:(o=wa.get().identity(),l=Hg(i,o)):l=ie.IDENTITY,wx(i,n,l,t),o&&wa.return(o),n.isValid||n.set(0,0,0,0),n}function wx(i,t,n,l){var m,g;if(!i.visible||!i.measurable)return;let o;l?o=i.worldTransform:(i.updateLocalTransform(),o=wa.get(),o.appendFrom(i.localTransform,n));const f=t,d=!!i.effects.length;if(d&&(t=ks.get().clear()),i.boundsArea)t.addRect(i.boundsArea,o);else{const v=i.bounds;v&&!v.isEmpty()&&(t.matrix=o,t.addBounds(v));for(let _=0;_<i.children.length;_++)wx(i.children[_],t,o,l)}if(d){for(let v=0;v<i.effects.length;v++)(g=(m=i.effects[v]).addBounds)==null||g.call(m,t);f.addBounds(t,ie.IDENTITY),ks.return(t)}l||wa.return(o)}function Hg(i,t){const n=i.parent;return n&&(Hg(n,t),n.updateLocalTransform(),t.append(n.localTransform)),t}function Hx(i,t){if(i===16777215||!t)return t;if(t===16777215||!i)return i;const n=i>>16&255,l=i>>8&255,o=i&255,f=t>>16&255,d=t>>8&255,m=t&255,g=n*f/255|0,v=l*d/255|0,_=o*m/255|0;return(g<<16)+(v<<8)+_}const Gv=16777215;function jv(i,t){return i===Gv?t:t===Gv?i:Hx(i,t)}function ip(i){return((i&255)<<16)+(i&65280)+(i>>16&255)}const tE={getGlobalAlpha(i){if(i)return this.renderGroup?this.renderGroup.worldAlpha:this.parentRenderGroup?this.parentRenderGroup.worldAlpha*this.alpha:this.alpha;let t=this.alpha,n=this.parent;for(;n;)t*=n.alpha,n=n.parent;return t},getGlobalTransform(i=new ie,t){if(t)return i.copyFrom(this.worldTransform);this.updateLocalTransform();const n=Hg(this,wa.get().identity());return i.appendFrom(this.localTransform,n),wa.return(n),i},getGlobalTint(i){if(i)return this.renderGroup?ip(this.renderGroup.worldColor):this.parentRenderGroup?ip(jv(this.localColor,this.parentRenderGroup.worldColor)):this.tint;let t=this.localColor,n=this.parent;for(;n;)t=jv(t,n.localColor),n=n.parent;return ip(t)}};function Gx(i,t,n){return t.clear(),n||(n=ie.IDENTITY),jx(i,t,n,i,!0),t.isValid||t.set(0,0,0,0),t}function jx(i,t,n,l,o){var g,v;let f;if(o)f=wa.get(),f=n.copyTo(f);else{if(!i.visible||!i.measurable)return;i.updateLocalTransform();const _=i.localTransform;f=wa.get(),f.appendFrom(_,n)}const d=t,m=!!i.effects.length;if(m&&(t=ks.get().clear()),i.boundsArea)t.addRect(i.boundsArea,f);else{i.renderPipeId&&(t.matrix=f,t.addBounds(i.bounds));const _=i.children;for(let b=0;b<_.length;b++)jx(_[b],t,f,l,!1)}if(m){for(let _=0;_<i.effects.length;_++)(v=(g=i.effects[_]).addLocalBounds)==null||v.call(g,t,l);d.addBounds(t,ie.IDENTITY),ks.return(t)}wa.return(f)}function qx(i,t){const n=i.children;for(let l=0;l<n.length;l++){const o=n[l],f=o.uid,d=(o._didViewChangeTick&65535)<<16|o._didContainerChangeTick&65535,m=t.index;(t.data[m]!==f||t.data[m+1]!==d)&&(t.data[t.index]=f,t.data[t.index+1]=d,t.didChange=!0),t.index=m+2,o.children.length&&qx(o,t)}return t.didChange}const eE=new ie,nE={_localBoundsCacheId:-1,_localBoundsCacheData:null,_setWidth(i,t){const n=Math.sign(this.scale.x)||1;t!==0?this.scale.x=i/t*n:this.scale.x=n},_setHeight(i,t){const n=Math.sign(this.scale.y)||1;t!==0?this.scale.y=i/t*n:this.scale.y=n},getLocalBounds(){this._localBoundsCacheData||(this._localBoundsCacheData={data:[],index:1,didChange:!1,localBounds:new Vi});const i=this._localBoundsCacheData;return i.index=1,i.didChange=!1,i.data[0]!==this._didViewChangeTick&&(i.didChange=!0,i.data[0]=this._didViewChangeTick),qx(this,i),i.didChange&&Gx(this,i.localBounds,eE),i.localBounds},getBounds(i,t){return Bx(this,i,t||new Vi)}},aE={_onRender:null,set onRender(i){const t=this.renderGroup||this.parentRenderGroup;if(!i){this._onRender&&(t==null||t.removeOnRender(this)),this._onRender=null;return}this._onRender||t==null||t.addOnRender(this),this._onRender=i},get onRender(){return this._onRender}},iE={_zIndex:0,sortDirty:!1,sortableChildren:!1,get zIndex(){return this._zIndex},set zIndex(i){this._zIndex!==i&&(this._zIndex=i,this.depthOfChildModified())},depthOfChildModified(){this.parent&&(this.parent.sortableChildren=!0,this.parent.sortDirty=!0),this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0)},sortChildren(){this.sortDirty&&(this.sortDirty=!1,this.children.sort(lE))}};function lE(i,t){return i._zIndex-t._zIndex}const sE={getGlobalPosition(i=new ha,t=!1){return this.parent?this.parent.toGlobal(this._position,i,t):(i.x=this._position.x,i.y=this._position.y),i},toGlobal(i,t,n=!1){const l=this.getGlobalTransform(wa.get(),n);return t=l.apply(i,t),wa.return(l),t},toLocal(i,t,n,l){t&&(i=t.toGlobal(i,n,l));const o=this.getGlobalTransform(wa.get(),l);return n=o.applyInverse(i,n),wa.return(o),n}};class Gg{constructor(){this.uid=rn("instructionSet"),this.instructions=[],this.instructionSize=0,this.renderables=[],this.gcTick=0}reset(){this.instructionSize=0}destroy(){this.instructions.length=0,this.renderables.length=0,this.renderPipes=null,this.gcTick=0}add(t){this.instructions[this.instructionSize++]=t}log(){this.instructions.length=this.instructionSize,console.table(this.instructions,["type","action"])}}let uE=0;class rE{constructor(t){this._poolKeyHash=Object.create(null),this._texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this.textureStyle=new Gc(this.textureOptions)}createTexture(t,n,l,o){const f=new Qi({...this.textureOptions,width:t,height:n,resolution:1,antialias:l,autoGarbageCollect:!1,autoGenerateMipmaps:o});return new Re({source:f,label:`texturePool_${uE++}`})}getOptimalTexture(t,n,l=1,o,f=!1){let d=Math.ceil(t*l-1e-6),m=Math.ceil(n*l-1e-6);d=Hc(d),m=Hc(m);const g=o?1:0,v=f?1:0,_=(d<<17)+(m<<2)+(v<<1)+g;this._texturePool[_]||(this._texturePool[_]=[]);let b=this._texturePool[_].pop();return b||(b=this.createTexture(d,m,o,f)),b.source._resolution=l,b.source.width=d/l,b.source.height=m/l,b.source.pixelWidth=d,b.source.pixelHeight=m,b.frame.x=0,b.frame.y=0,b.frame.width=t,b.frame.height=n,b.updateUvs(),this._poolKeyHash[b.uid]=_,b}getSameSizeTexture(t,n=!1){const l=t.source;return this.getOptimalTexture(t.width,t.height,l._resolution,n)}returnTexture(t,n=!1){const l=this._poolKeyHash[t.uid];n&&(t.source.style=this.textureStyle),this._texturePool[l].push(t)}clear(t){if(t=t!==!1,t)for(const n in this._texturePool){const l=this._texturePool[n];if(l)for(let o=0;o<l.length;o++)l[o].destroy(!0)}this._texturePool={}}}const Sp=new rE;$h.register(Sp);class oE{constructor(){this.renderPipeId="renderGroup",this.root=null,this.canBundle=!1,this.renderGroupParent=null,this.renderGroupChildren=[],this.worldTransform=new ie,this.worldColorAlpha=4294967295,this.worldColor=16777215,this.worldAlpha=1,this.childrenToUpdate=Object.create(null),this.updateTick=0,this.gcTick=0,this.childrenRenderablesToUpdate={list:[],index:0},this.structureDidChange=!0,this.instructionSet=new Gg,this._onRenderContainers=[],this.textureNeedsUpdate=!0,this.isCachedAsTexture=!1,this._matrixDirty=7}init(t){this.root=t,t._onRender&&this.addOnRender(t),t.didChange=!0;const n=t.children;for(let l=0;l<n.length;l++){const o=n[l];o._updateFlags=15,this.addChild(o)}}enableCacheAsTexture(t={}){this.textureOptions=t,this.isCachedAsTexture=!0,this.textureNeedsUpdate=!0}disableCacheAsTexture(){this.isCachedAsTexture=!1,this.texture&&(Sp.returnTexture(this.texture,!0),this.texture=null)}updateCacheTexture(){this.textureNeedsUpdate=!0;const t=this._parentCacheAsTextureRenderGroup;t&&!t.textureNeedsUpdate&&t.updateCacheTexture()}reset(){this.renderGroupChildren.length=0;for(const t in this.childrenToUpdate){const n=this.childrenToUpdate[t];n.list.fill(null),n.index=0}this.childrenRenderablesToUpdate.index=0,this.childrenRenderablesToUpdate.list.fill(null),this.root=null,this.updateTick=0,this.structureDidChange=!0,this._onRenderContainers.length=0,this.renderGroupParent=null,this.disableCacheAsTexture()}get localTransform(){return this.root.localTransform}addRenderGroupChild(t){t.renderGroupParent&&t.renderGroupParent._removeRenderGroupChild(t),t.renderGroupParent=this,this.renderGroupChildren.push(t)}_removeRenderGroupChild(t){const n=this.renderGroupChildren.indexOf(t);n>-1&&this.renderGroupChildren.splice(n,1),t.renderGroupParent=null}addChild(t){if(this.structureDidChange=!0,t.parentRenderGroup=this,t.updateTick=-1,t.parent===this.root?t.relativeRenderGroupDepth=1:t.relativeRenderGroupDepth=t.parent.relativeRenderGroupDepth+1,t.didChange=!0,this.onChildUpdate(t),t.renderGroup){this.addRenderGroupChild(t.renderGroup);return}t._onRender&&this.addOnRender(t);const n=t.children;for(let l=0;l<n.length;l++)this.addChild(n[l])}removeChild(t){if(this.structureDidChange=!0,t._onRender&&(t.renderGroup||this.removeOnRender(t)),t.parentRenderGroup=null,t.renderGroup){this._removeRenderGroupChild(t.renderGroup);return}const n=t.children;for(let l=0;l<n.length;l++)this.removeChild(n[l])}removeChildren(t){for(let n=0;n<t.length;n++)this.removeChild(t[n])}onChildUpdate(t){let n=this.childrenToUpdate[t.relativeRenderGroupDepth];n||(n=this.childrenToUpdate[t.relativeRenderGroupDepth]={index:0,list:[]}),n.list[n.index++]=t}updateRenderable(t){t.globalDisplayStatus<7||(this.instructionSet.renderPipes[t.renderPipeId].updateRenderable(t),t.didViewUpdate=!1)}onChildViewUpdate(t){this.childrenRenderablesToUpdate.list[this.childrenRenderablesToUpdate.index++]=t}get isRenderable(){return this.root.localDisplayStatus===7&&this.worldAlpha>0}addOnRender(t){this._onRenderContainers.push(t)}removeOnRender(t){this._onRenderContainers.splice(this._onRenderContainers.indexOf(t),1)}runOnRender(t){for(let n=0;n<this._onRenderContainers.length;n++)this._onRenderContainers[n]._onRender(t)}destroy(){this.disableCacheAsTexture(),this.renderGroupParent=null,this.root=null,this.childrenRenderablesToUpdate=null,this.childrenToUpdate=null,this.renderGroupChildren=null,this._onRenderContainers=null,this.instructionSet=null}getChildren(t=[]){const n=this.root.children;for(let l=0;l<n.length;l++)this._getChildren(n[l],t);return t}_getChildren(t,n=[]){if(n.push(t),t.renderGroup)return n;const l=t.children;for(let o=0;o<l.length;o++)this._getChildren(l[o],n);return n}invalidateMatrices(){this._matrixDirty=7}get inverseWorldTransform(){return(this._matrixDirty&1)===0?this._inverseWorldTransform:(this._matrixDirty&=-2,this._inverseWorldTransform||(this._inverseWorldTransform=new ie),this._inverseWorldTransform.copyFrom(this.worldTransform).invert())}get textureOffsetInverseTransform(){return(this._matrixDirty&2)===0?this._textureOffsetInverseTransform:(this._matrixDirty&=-3,this._textureOffsetInverseTransform||(this._textureOffsetInverseTransform=new ie),this._textureOffsetInverseTransform.copyFrom(this.inverseWorldTransform).translate(-this._textureBounds.x,-this._textureBounds.y))}get inverseParentTextureTransform(){if((this._matrixDirty&4)===0)return this._inverseParentTextureTransform;this._matrixDirty&=-5;const t=this._parentCacheAsTextureRenderGroup;return t?(this._inverseParentTextureTransform||(this._inverseParentTextureTransform=new ie),this._inverseParentTextureTransform.copyFrom(this.worldTransform).prepend(t.inverseWorldTransform).translate(-t._textureBounds.x,-t._textureBounds.y)):this.worldTransform}get cacheToLocalTransform(){return this.isCachedAsTexture?this.textureOffsetInverseTransform:this._parentCacheAsTextureRenderGroup?this._parentCacheAsTextureRenderGroup.textureOffsetInverseTransform:null}}function cE(i,t,n={}){for(const l in t)!n[l]&&t[l]!==void 0&&(i[l]=t[l])}const Ay=new Pn(null),Lm=new Pn(null),My=new Pn(null,1,1),Xm=new Pn(null),qv=1,fE=2,Ry=4;class da extends us{constructor(t={}){var n,l;super(),this.uid=rn("renderable"),this._updateFlags=15,this.renderGroup=null,this.parentRenderGroup=null,this.parentRenderGroupIndex=0,this.didChange=!1,this.didViewUpdate=!1,this.relativeRenderGroupDepth=0,this.children=[],this.parent=null,this.includeInBuild=!0,this.measurable=!0,this.isSimple=!0,this.parentRenderLayer=null,this.updateTick=-1,this.localTransform=new ie,this.relativeGroupTransform=new ie,this.groupTransform=this.relativeGroupTransform,this.destroyed=!1,this._position=new Pn(this,0,0),this._scale=My,this._pivot=Lm,this._origin=Xm,this._skew=Ay,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._rotation=0,this.localColor=16777215,this.localAlpha=1,this.groupAlpha=1,this.groupColor=16777215,this.groupColorAlpha=4294967295,this.localBlendMode="inherit",this.groupBlendMode="normal",this.localDisplayStatus=7,this.globalDisplayStatus=7,this._didContainerChangeTick=0,this._didViewChangeTick=0,this._didLocalTransformChangeId=-1,this.effects=[],cE(this,t,{children:!0,parent:!0,effects:!0}),(n=t.children)==null||n.forEach(o=>this.addChild(o)),(l=t.parent)==null||l.addChild(this)}static mixin(t){he("8.8.0","Container.mixin is deprecated, please use extensions.mixin instead."),Fe.mixin(da,t)}set _didChangeId(t){this._didViewChangeTick=t>>12&4095,this._didContainerChangeTick=t&4095}get _didChangeId(){return this._didContainerChangeTick&4095|(this._didViewChangeTick&4095)<<12}addChild(...t){if(this.allowChildren||he(un,"addChild: Only Containers will be allowed to add children in v8.0.0"),t.length>1){for(let o=0;o<t.length;o++)this.addChild(t[o]);return t[0]}const n=t[0],l=this.renderGroup||this.parentRenderGroup;return n.parent===this?(this.children.splice(this.children.indexOf(n),1),this.children.push(n),l&&(l.structureDidChange=!0),n):(n.parent&&n.parent.removeChild(n),this.children.push(n),this.sortableChildren&&(this.sortDirty=!0),n.parent=this,n.didChange=!0,n._updateFlags=15,l&&l.addChild(n),this.emit("childAdded",n,this,this.children.length-1),n.emit("added",this),this._didViewChangeTick++,n._zIndex!==0&&n.depthOfChildModified(),n)}removeChild(...t){if(t.length>1){for(let o=0;o<t.length;o++)this.removeChild(t[o]);return t[0]}const n=t[0],l=this.children.indexOf(n);return l>-1&&(this._didViewChangeTick++,this.children.splice(l,1),this.renderGroup?this.renderGroup.removeChild(n):this.parentRenderGroup&&this.parentRenderGroup.removeChild(n),n.parentRenderLayer&&n.parentRenderLayer.detach(n),n.parent=null,this.emit("childRemoved",n,this,l),n.emit("removed",this)),n}_onUpdate(t){t&&t===this._skew&&this._updateSkew(),this._didContainerChangeTick++,!this.didChange&&(this.didChange=!0,this.parentRenderGroup&&this.parentRenderGroup.onChildUpdate(this))}set isRenderGroup(t){!!this.renderGroup!==t&&(t?this.enableRenderGroup():this.disableRenderGroup())}get isRenderGroup(){return!!this.renderGroup}enableRenderGroup(){if(this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),this.renderGroup=Wa.get(oE,this),this.groupTransform=ie.IDENTITY,t==null||t.addChild(this),this._updateIsSimple()}disableRenderGroup(){if(!this.renderGroup)return;const t=this.parentRenderGroup;t==null||t.removeChild(this),Wa.return(this.renderGroup),this.renderGroup=null,this.groupTransform=this.relativeGroupTransform,t==null||t.addChild(this),this._updateIsSimple()}_updateIsSimple(){this.isSimple=!this.renderGroup&&this.effects.length===0}get worldTransform(){return this._worldTransform||(this._worldTransform=new ie),this.renderGroup?this._worldTransform.copyFrom(this.renderGroup.worldTransform):this.parentRenderGroup&&this._worldTransform.appendFrom(this.relativeGroupTransform,this.parentRenderGroup.worldTransform),this._worldTransform}get x(){return this._position.x}set x(t){this._position.x=t}get y(){return this._position.y}set y(t){this._position.y=t}get position(){return this._position}set position(t){this._position.copyFrom(t)}get rotation(){return this._rotation}set rotation(t){this._rotation!==t&&(this._rotation=t,this._onUpdate(this._skew))}get angle(){return this.rotation*CT}set angle(t){this.rotation=t*AT}get pivot(){return this._pivot===Lm&&(this._pivot=new Pn(this,0,0)),this._pivot}set pivot(t){this._pivot===Lm&&(this._pivot=new Pn(this,0,0),this._origin!==Xm&&Ha("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._pivot.set(t):this._pivot.copyFrom(t)}get skew(){return this._skew===Ay&&(this._skew=new Pn(this,0,0)),this._skew}set skew(t){this._skew===Ay&&(this._skew=new Pn(this,0,0)),this._skew.copyFrom(t)}get scale(){return this._scale===My&&(this._scale=new Pn(this,1,1)),this._scale}set scale(t){this._scale===My&&(this._scale=new Pn(this,0,0)),typeof t=="string"&&(t=parseFloat(t)),typeof t=="number"?this._scale.set(t):this._scale.copyFrom(t)}get origin(){return this._origin===Xm&&(this._origin=new Pn(this,0,0)),this._origin}set origin(t){this._origin===Xm&&(this._origin=new Pn(this,0,0),this._pivot!==Lm&&Ha("Setting both a pivot and origin on a Container is not recommended. This can lead to unexpected behavior if not handled carefully.")),typeof t=="number"?this._origin.set(t):this._origin.copyFrom(t)}get width(){return Math.abs(this.scale.x*this.getLocalBounds().width)}set width(t){const n=this.getLocalBounds().width;this._setWidth(t,n)}get height(){return Math.abs(this.scale.y*this.getLocalBounds().height)}set height(t){const n=this.getLocalBounds().height;this._setHeight(t,n)}getSize(t){t||(t={});const n=this.getLocalBounds();return t.width=Math.abs(this.scale.x*n.width),t.height=Math.abs(this.scale.y*n.height),t}setSize(t,n){const l=this.getLocalBounds();typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,l.width),n!==void 0&&this._setHeight(n,l.height)}_updateSkew(){const t=this._rotation,n=this._skew;this._cx=Math.cos(t+n._y),this._sx=Math.sin(t+n._y),this._cy=-Math.sin(t-n._x),this._sy=Math.cos(t-n._x)}updateTransform(t){return this.position.set(typeof t.x=="number"?t.x:this.position.x,typeof t.y=="number"?t.y:this.position.y),this.scale.set(typeof t.scaleX=="number"?t.scaleX||1:this.scale.x,typeof t.scaleY=="number"?t.scaleY||1:this.scale.y),this.rotation=typeof t.rotation=="number"?t.rotation:this.rotation,this.skew.set(typeof t.skewX=="number"?t.skewX:this.skew.x,typeof t.skewY=="number"?t.skewY:this.skew.y),this.pivot.set(typeof t.pivotX=="number"?t.pivotX:this.pivot.x,typeof t.pivotY=="number"?t.pivotY:this.pivot.y),this.origin.set(typeof t.originX=="number"?t.originX:this.origin.x,typeof t.originY=="number"?t.originY:this.origin.y),this}setFromMatrix(t){t.decompose(this)}updateLocalTransform(){const t=this._didContainerChangeTick;if(this._didLocalTransformChangeId===t)return;this._didLocalTransformChangeId=t;const n=this.localTransform,l=this._scale,o=this._pivot,f=this._origin,d=this._position,m=l._x,g=l._y,v=o._x,_=o._y,b=-f._x,C=-f._y;n.a=this._cx*m,n.b=this._sx*m,n.c=this._cy*g,n.d=this._sy*g,n.tx=d._x-(v*n.a+_*n.c)+(b*n.a+C*n.c)-b,n.ty=d._y-(v*n.b+_*n.d)+(b*n.b+C*n.d)-C}set alpha(t){t!==this.localAlpha&&(this.localAlpha=t,this._updateFlags|=qv,this._onUpdate())}get alpha(){return this.localAlpha}set tint(t){const l=Mn.shared.setValue(t??16777215).toBgrNumber();l!==this.localColor&&(this.localColor=l,this._updateFlags|=qv,this._onUpdate())}get tint(){return ip(this.localColor)}set blendMode(t){this.localBlendMode!==t&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=fE,this.localBlendMode=t,this._onUpdate())}get blendMode(){return this.localBlendMode}get visible(){return!!(this.localDisplayStatus&2)}set visible(t){const n=t?2:0;(this.localDisplayStatus&2)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Ry,this.localDisplayStatus^=2,this._onUpdate(),this.emit("visibleChanged",t))}get culled(){return!(this.localDisplayStatus&4)}set culled(t){const n=t?0:4;(this.localDisplayStatus&4)!==n&&(this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._updateFlags|=Ry,this.localDisplayStatus^=4,this._onUpdate())}get renderable(){return!!(this.localDisplayStatus&1)}set renderable(t){const n=t?1:0;(this.localDisplayStatus&1)!==n&&(this._updateFlags|=Ry,this.localDisplayStatus^=1,this.parentRenderGroup&&(this.parentRenderGroup.structureDidChange=!0),this._onUpdate())}get isRenderable(){return this.localDisplayStatus===7&&this.groupAlpha>0}destroy(t=!1){var o;if(this.destroyed)return;this.destroyed=!0;let n;if(this.children.length&&(n=this.removeChildren(0,this.children.length)),this.removeFromParent(),this.parent=null,this._maskEffect=null,this._filterEffect=null,this.effects=null,this._position=null,this._scale=null,this._pivot=null,this._origin=null,this._skew=null,this.emit("destroyed",this),this.removeAllListeners(),(typeof t=="boolean"?t:t==null?void 0:t.children)&&n)for(let f=0;f<n.length;++f)n[f].destroy(t);(o=this.renderGroup)==null||o.destroy(),this.renderGroup=null}}Fe.mixin(da,kT,$T,sE,aE,nE,WT,FT,iE,XT,ZT,tE,JT);class jg extends da{constructor(t){super(t),this.canBundle=!0,this.allowChildren=!1,this._roundPixels=0,this._lastUsed=-1,this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this._bounds=new Vi(0,1,0,0),this._boundsDirty=!0,this.autoGarbageCollect=t.autoGarbageCollect??!0}get bounds(){return this._boundsDirty?(this.updateBounds(),this._boundsDirty=!1,this._bounds):this._bounds}get roundPixels(){return!!this._roundPixels}set roundPixels(t){this._roundPixels=t?1:0}containsPoint(t){const n=this.bounds,{x:l,y:o}=t;return l>=n.minX&&l<=n.maxX&&o>=n.minY&&o<=n.maxY}onViewUpdate(){if(this._didViewChangeTick++,this._boundsDirty=!0,this.didViewUpdate)return;this.didViewUpdate=!0;const t=this.renderGroup||this.parentRenderGroup;t&&t.onChildViewUpdate(this)}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null),this.onViewUpdate()}destroy(t){this.unload(),super.destroy(t),this._bounds=null}collectRenderablesSimple(t,n,l){const{renderPipes:o}=n;o.blendMode.pushBlendMode(this,this.groupBlendMode,t);const d=o[this.renderPipeId];d!=null&&d.addRenderable&&d.addRenderable(this,t),this.didViewUpdate=!1;const m=this.children,g=m.length;for(let v=0;v<g;v++)m[v].collectRenderables(t,n,l);o.blendMode.popBlendMode(t)}}class qc extends jg{constructor(t=Re.EMPTY){t instanceof Re&&(t={texture:t});const{texture:n=Re.EMPTY,anchor:l,roundPixels:o,width:f,height:d,...m}=t;super({label:"Sprite",...m}),this.renderPipeId="sprite",this.batched=!0,this._visualBounds={minX:0,maxX:1,minY:0,maxY:0},this._anchor=new Pn({_onUpdate:()=>{this.onViewUpdate()}}),l?this.anchor=l:n.defaultAnchor&&(this.anchor=n.defaultAnchor),this.texture=n,this.allowChildren=!1,this.roundPixels=o??!1,f!==void 0&&(this.width=f),d!==void 0&&(this.height=d)}static from(t,n=!1){return t instanceof Re?new qc(t):new qc(Re.from(t,n))}set texture(t){t||(t=Re.EMPTY);const n=this._texture;n!==t&&(n&&n.dynamic&&n.off("update",this.onViewUpdate,this),t.dynamic&&t.on("update",this.onViewUpdate,this),this._texture=t,this._width&&this._setWidth(this._width,this._texture.orig.width),this._height&&this._setHeight(this._height,this._texture.orig.height),this.onViewUpdate())}get texture(){return this._texture}get visualBounds(){return Dx(this._visualBounds,this._anchor,this._texture),this._visualBounds}get sourceBounds(){return he("8.6.1","Sprite.sourceBounds is deprecated, use visualBounds instead."),this.visualBounds}updateBounds(){const t=this._anchor,n=this._texture,l=this._bounds,{width:o,height:f}=n.orig;l.minX=-t._x*o,l.maxX=l.minX+o,l.minY=-t._y*f,l.maxY=l.minY+f}destroy(t=!1){if(super.destroy(t),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._texture.destroy(l)}this._texture=null,this._visualBounds=null,this._bounds=null,this._anchor=null}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(t){this._setWidth(t,this._texture.orig.width),this._width=t}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(t){this._setHeight(t,this._texture.orig.height),this._height=t}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this._texture.orig.width,t.height=Math.abs(this.scale.y)*this._texture.orig.height,t}setSize(t,n){typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,this._texture.orig.width),n!==void 0&&this._setHeight(n,this._texture.orig.height)}}const hE=new Vi;function Yx(i,t,n){const l=hE;i.measurable=!0,Bx(i,n,l),t.addBoundsMask(l),i.measurable=!1}function Lx(i,t,n){const l=ks.get();i.measurable=!0;const o=wa.get().identity(),f=Xx(i,n,o);Gx(i,l,f),i.measurable=!1,t.addBoundsMask(l),wa.return(o),ks.return(l)}function Xx(i,t,n){return i?(i!==t&&(Xx(i.parent,t,n),i.updateLocalTransform(),n.append(i.localTransform)),n):(Ha("Mask bounds, renderable is not inside the root container"),n)}class Vx{constructor(t){this.priority=0,this.inverse=!1,this.pipe="alphaMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.renderMaskToTexture=!(t instanceof qc),this.mask.renderable=this.renderMaskToTexture,this.mask.includeInBuild=!this.renderMaskToTexture,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask=null)}addBounds(t,n){this.inverse||Yx(this.mask,t,n)}addLocalBounds(t,n){Lx(this.mask,t,n)}containsPoint(t,n){const l=this.mask;return n(l,t)}destroy(){this.reset()}static test(t){return t instanceof qc}}Vx.extension=Pt.MaskEffect;class Qx{constructor(t){this.priority=0,this.pipe="colorMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t}destroy(){}static test(t){return typeof t=="number"}}Qx.extension=Pt.MaskEffect;class Zx{constructor(t){this.priority=0,this.pipe="stencilMask",t!=null&&t.mask&&this.init(t.mask)}init(t){this.mask=t,this.mask.includeInBuild=!1,this.mask.measurable=!1}reset(){this.mask!==null&&(this.mask.measurable=!0,this.mask.includeInBuild=!0,this.mask=null)}addBounds(t,n){Yx(this.mask,t,n)}addLocalBounds(t,n){Lx(this.mask,t,n)}containsPoint(t,n){const l=this.mask;return n(l,t)}destroy(){this.reset()}static test(t){return t instanceof da}}Zx.extension=Pt.MaskEffect;const dE={createCanvas:(i,t)=>{const n=document.createElement("canvas");return n.width=i,n.height=t,n},createImage:()=>new Image,getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(i,t)=>fetch(i,t),parseXML:i=>new DOMParser().parseFromString(i,"text/xml")};let Yv=dE;const hi={get(){return Yv},set(i){Yv=i}};class Kx extends Qi{constructor(t){t.resource||(t.resource=hi.get().createCanvas()),t.width||(t.width=t.resource.width,t.autoDensity||(t.width/=t.resolution)),t.height||(t.height=t.resource.height,t.autoDensity||(t.height/=t.resolution)),super(t),this.uploadMethodId="image",this.autoDensity=t.autoDensity,this.resizeCanvas(),this.transparent=!!t.transparent}resizeCanvas(){this.autoDensity&&"style"in this.resource&&(this.resource.style.width=`${this.width}px`,this.resource.style.height=`${this.height}px`),(this.resource.width!==this.pixelWidth||this.resource.height!==this.pixelHeight)&&(this.resource.width=this.pixelWidth,this.resource.height=this.pixelHeight)}resize(t=this.width,n=this.height,l=this._resolution){const o=super.resize(t,n,l);return o&&this.resizeCanvas(),o}static test(t){return globalThis.HTMLCanvasElement&&t instanceof HTMLCanvasElement||globalThis.OffscreenCanvas&&t instanceof OffscreenCanvas}get context2D(){return this._context2D||(this._context2D=this.resource.getContext("2d"))}}Kx.extension=Pt.TextureSource;class up extends Qi{constructor(t){super(t),this.uploadMethodId="image",this.autoGarbageCollect=!0}static test(t){return globalThis.HTMLImageElement&&t instanceof HTMLImageElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap||globalThis.VideoFrame&&t instanceof VideoFrame}}up.extension=Pt.TextureSource;var rp=(i=>(i[i.INTERACTION=50]="INTERACTION",i[i.HIGH=25]="HIGH",i[i.NORMAL=0]="NORMAL",i[i.LOW=-25]="LOW",i[i.UTILITY=-50]="UTILITY",i))(rp||{});class zy{constructor(t,n=null,l=0,o=!1){this.next=null,this.previous=null,this._destroyed=!1,this._fn=t,this._context=n,this.priority=l,this._once=o}match(t,n=null){return this._fn===t&&this._context===n}emit(t){this._fn&&(this._context?this._fn.call(this._context,t):this._fn(t));const n=this.next;return this._once&&this.destroy(!0),this._destroyed&&(this.next=null),n}connect(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this}destroy(t=!1){this._destroyed=!0,this._fn=null,this._context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);const n=this.next;return this.next=t?null:n,this.previous=null,n}}const kx=class fi{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new zy(null,null,1/0),this.deltaMS=1/fi.targetFPMS,this.elapsedMS=1/fi.targetFPMS,this._tick=t=>{this._requestId=null,this.started&&(this.update(t),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(t,n,l=rp.NORMAL){return this._addListener(new zy(t,n,l))}addOnce(t,n,l=rp.NORMAL){return this._addListener(new zy(t,n,l,!0))}_addListener(t){let n=this._head.next,l=this._head;if(!n)t.connect(l);else{for(;n;){if(t.priority>n.priority){t.connect(l);break}l=n,n=n.next}t.previous||t.connect(l)}return this._startIfPossible(),this}remove(t,n){let l=this._head.next;for(;l;)l.match(t,n)?l=l.destroy():l=l.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let t=0,n=this._head;for(;n=n.next;)t++;return t}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let t=this._head.next;for(;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}}update(t=performance.now()){let n;if(t>this.lastTime){if(n=this.elapsedMS=t-this.lastTime,n>this._maxElapsedMS&&(n=this._maxElapsedMS),n*=this.speed,this._minElapsedMS){const f=t-this._lastFrame|0;if(f<this._minElapsedMS)return;this._lastFrame=t-f%this._minElapsedMS}this.deltaMS=n,this.deltaTime=this.deltaMS*fi.targetFPMS;const l=this._head;let o=l.next;for(;o;)o=o.emit(this);l.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(t){const n=Math.min(Math.max(0,t)/1e3,fi.targetFPMS);this._maxElapsedMS=1/n,this._minElapsedMS&&t>this.maxFPS&&(this.maxFPS=t)}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(t){t===0?this._minElapsedMS=0:(t<this.minFPS&&(this.minFPS=t),this._minElapsedMS=1/(t/1e3))}static get shared(){if(!fi._shared){const t=fi._shared=new fi;t.autoStart=!0,t._protected=!0}return fi._shared}static get system(){if(!fi._system){const t=fi._system=new fi;t.autoStart=!0,t._protected=!0}return fi._system}};kx.targetFPMS=.06;let Nc=kx,Dy;async function mE(){return Dy??(Dy=(async()=>{var d;const t=hi.get().createCanvas(1,1).getContext("webgl");if(!t)return"premultiply-alpha-on-upload";const n=await new Promise(m=>{const g=document.createElement("video");g.onloadeddata=()=>m(g),g.onerror=()=>m(null),g.autoplay=!1,g.crossOrigin="anonymous",g.preload="auto",g.src="data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAHTEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHGTbuMU6uEElTDZ1OsggEXTbuMU6uEHFO7a1OsggG97AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmoCrXsYMPQkBNgIRMYXZmV0GETGF2ZkSJiEBEAAAAAAAAFlSua8yuAQAAAAAAAEPXgQFzxYgAAAAAAAAAAZyBACK1nIN1bmSIgQCGhVZfVlA5g4EBI+ODhAJiWgDglLCBArqBApqBAlPAgQFVsIRVuYEBElTDZ9Vzc9JjwItjxYgAAAAAAAAAAWfInEWjh0VOQ09ERVJEh49MYXZjIGxpYnZweC12cDlnyKJFo4hEVVJBVElPTkSHlDAwOjAwOjAwLjA0MDAwMDAwMAAAH0O2dcfngQCgwqGggQAAAIJJg0IAABAAFgA4JBwYSgAAICAAEb///4r+AAB1oZ2mm+6BAaWWgkmDQgAAEAAWADgkHBhKAAAgIABIQBxTu2uRu4+zgQC3iveBAfGCAXHwgQM=",g.load()});if(!n)return"premultiply-alpha-on-upload";const l=t.createTexture();t.bindTexture(t.TEXTURE_2D,l);const o=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,o),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,l,0),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,t.NONE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,n);const f=new Uint8Array(4);return t.readPixels(0,0,1,1,t.RGBA,t.UNSIGNED_BYTE,f),t.deleteFramebuffer(o),t.deleteTexture(l),(d=t.getExtension("WEBGL_lose_context"))==null||d.loseContext(),f[0]<=f[3]?"premultiplied-alpha":"premultiply-alpha-on-upload"})()),Dy}const bp=class Jx extends Qi{constructor(t){super(t),this.isReady=!1,this.uploadMethodId="video",t={...Jx.defaultOptions,...t},this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=t.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=t.autoPlay!==!1,this.alphaMode=t.alphaMode??"premultiply-alpha-on-upload",this._videoFrameRequestCallback=this._videoFrameRequestCallback.bind(this),this._videoFrameRequestCallbackHandle=null,this._load=null,this._resolve=null,this._reject=null,this._onCanPlay=this._onCanPlay.bind(this),this._onCanPlayThrough=this._onCanPlayThrough.bind(this),this._onError=this._onError.bind(this),this._onPlayStart=this._onPlayStart.bind(this),this._onPlayStop=this._onPlayStop.bind(this),this._onSeeked=this._onSeeked.bind(this),t.autoLoad!==!1&&this.load()}updateFrame(){if(!this.destroyed){if(this._updateFPS){const t=Nc.shared.elapsedMS*this.resource.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-t)}(!this._updateFPS||this._msToNextUpdate<=0)&&(this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0),this.isValid&&this.update()}}_videoFrameRequestCallback(){this.updateFrame(),this.destroyed?this._videoFrameRequestCallbackHandle=null:this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback)}get isValid(){return!!this.resource.videoWidth&&!!this.resource.videoHeight}async load(){if(this._load)return this._load;const t=this.resource,n=this.options;return(t.readyState===t.HAVE_ENOUGH_DATA||t.readyState===t.HAVE_FUTURE_DATA)&&t.width&&t.height&&(t.complete=!0),t.addEventListener("play",this._onPlayStart),t.addEventListener("pause",this._onPlayStop),t.addEventListener("seeked",this._onSeeked),this._isSourceReady()?this._mediaReady():(n.preload||t.addEventListener("canplay",this._onCanPlay),t.addEventListener("canplaythrough",this._onCanPlayThrough),t.addEventListener("error",this._onError,!0)),this.alphaMode=await mE(),this._load=new Promise((l,o)=>{this.isValid?l(this):(this._resolve=l,this._reject=o,n.preloadTimeoutMs!==void 0&&(this._preloadTimeout=setTimeout(()=>{this._onError(new ErrorEvent(`Preload exceeded timeout of ${n.preloadTimeoutMs}ms`))})),t.load())}),this._load}_onError(t){this.resource.removeEventListener("error",this._onError,!0),this.emit("error",t),this._reject&&(this._reject(t),this._reject=null,this._resolve=null)}_isSourcePlaying(){const t=this.resource;return!t.paused&&!t.ended}_isSourceReady(){return this.resource.readyState>2}_onPlayStart(){this.isValid||this._mediaReady(),this._configureAutoUpdate()}_onPlayStop(){this._configureAutoUpdate()}_onSeeked(){this._autoUpdate&&!this._isSourcePlaying()&&(this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0)}_onCanPlay(){this.resource.removeEventListener("canplay",this._onCanPlay),this._mediaReady()}_onCanPlayThrough(){this.resource.removeEventListener("canplaythrough",this._onCanPlay),this._preloadTimeout&&(clearTimeout(this._preloadTimeout),this._preloadTimeout=void 0),this._mediaReady()}_mediaReady(){const t=this.resource;this.isValid&&(this.isReady=!0,this.resize(t.videoWidth,t.videoHeight)),this._msToNextUpdate=0,this.updateFrame(),this._msToNextUpdate=0,this._resolve&&(this._resolve(this),this._resolve=null,this._reject=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&this.resource.play()}destroy(){this._configureAutoUpdate();const t=this.resource;t&&(t.removeEventListener("play",this._onPlayStart),t.removeEventListener("pause",this._onPlayStop),t.removeEventListener("seeked",this._onSeeked),t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlayThrough),t.removeEventListener("error",this._onError,!0),t.pause(),t.src="",t.load()),super.destroy()}get autoUpdate(){return this._autoUpdate}set autoUpdate(t){t!==this._autoUpdate&&(this._autoUpdate=t,this._configureAutoUpdate())}get updateFPS(){return this._updateFPS}set updateFPS(t){t!==this._updateFPS&&(this._updateFPS=t,this._configureAutoUpdate())}_configureAutoUpdate(){this._autoUpdate&&this._isSourcePlaying()?!this._updateFPS&&this.resource.requestVideoFrameCallback?(this._isConnectedToTicker&&(Nc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0),this._videoFrameRequestCallbackHandle===null&&(this._videoFrameRequestCallbackHandle=this.resource.requestVideoFrameCallback(this._videoFrameRequestCallback))):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker||(Nc.shared.add(this.updateFrame,this),this._isConnectedToTicker=!0,this._msToNextUpdate=0)):(this._videoFrameRequestCallbackHandle!==null&&(this.resource.cancelVideoFrameCallback(this._videoFrameRequestCallbackHandle),this._videoFrameRequestCallbackHandle=null),this._isConnectedToTicker&&(Nc.shared.remove(this.updateFrame,this),this._isConnectedToTicker=!1,this._msToNextUpdate=0))}static test(t){return globalThis.HTMLVideoElement&&t instanceof HTMLVideoElement}};bp.extension=Pt.TextureSource;bp.defaultOptions={...Qi.defaultOptions,autoLoad:!0,autoPlay:!0,updateFPS:0,crossorigin:!0,loop:!1,muted:!0,playsinline:!0,preload:!1};bp.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};let pE=bp;const Rc=(i,t,n=!1)=>(Array.isArray(i)||(i=[i]),t?i.map(l=>typeof l=="string"||n?t(l):l):i);class yE{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(t){return this._cache.has(t)}get(t){const n=this._cache.get(t);return n||Ha(`[Assets] Asset id ${t} was not found in the Cache`),n}set(t,n){const l=Rc(t);let o;for(let g=0;g<this.parsers.length;g++){const v=this.parsers[g];if(v.test(n)){o=v.getCacheableAssets(l,n);break}}const f=new Map(Object.entries(o||{}));o||l.forEach(g=>{f.set(g,n)});const d=[...f.keys()],m={cacheKeys:d,keys:l};l.forEach(g=>{this._cacheMap.set(g,m)}),d.forEach(g=>{const v=o?o[g]:n;this._cache.has(g)&&this._cache.get(g)!==v&&Ha("[Cache] already has key:",g),this._cache.set(g,f.get(g))})}remove(t){if(!this._cacheMap.has(t)){Ha(`[Assets] Asset id ${t} was not found in the Cache`);return}const n=this._cacheMap.get(t);n.cacheKeys.forEach(o=>{this._cache.delete(o)}),n.keys.forEach(o=>{this._cacheMap.delete(o)})}get parsers(){return this._parsers}}const zc=new yE,og=[];Fe.handleByList(Pt.TextureSource,og);function Px(i={}){const t=i&&i.resource,n=t?i.resource:i,l=t?i:{resource:i};for(let o=0;o<og.length;o++){const f=og[o];if(f.test(n))return new f(l)}throw new Error(`Could not find a source type for resource: ${l.resource}`)}function gE(i={},t=!1){const n=i&&i.resource,l=n?i.resource:i,o=n?i:{resource:i};if(!t&&zc.has(l))return zc.get(l);const f=new Re({source:Px(o)});return f.on("destroy",()=>{zc.has(l)&&zc.remove(l)}),t||zc.set(l,f),f}function vE(i,t=!1){return typeof i=="string"?zc.get(i):i instanceof Qi?new Re({source:i}):gE(i,t)}Re.from=vE;Qi.from=Px;Fe.add(Vx,Qx,Zx,pE,up,Kx,wg);var Wx=(i=>(i[i.Low=0]="Low",i[i.Normal=1]="Normal",i[i.High=2]="High",i))(Wx||{});function gl(i){if(typeof i!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(i)}`)}function Mh(i){return i.split("?")[0].split("#")[0]}function xE(i){return i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function _E(i,t,n){return i.replace(new RegExp(xE(t),"g"),n)}function SE(i,t){let n="",l=0,o=-1,f=0,d=-1;for(let m=0;m<=i.length;++m){if(m<i.length)d=i.charCodeAt(m);else{if(d===47)break;d=47}if(d===47){if(!(o===m-1||f===1))if(o!==m-1&&f===2){if(n.length<2||l!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){const g=n.lastIndexOf("/");if(g!==n.length-1){g===-1?(n="",l=0):(n=n.slice(0,g),l=n.length-1-n.lastIndexOf("/")),o=m,f=0;continue}}else if(n.length===2||n.length===1){n="",l=0,o=m,f=0;continue}}}else n.length>0?n+=`/${i.slice(o+1,m)}`:n=i.slice(o+1,m),l=m-o-1;o=m,f=0}else d===46&&f!==-1?++f:f=-1}return n}const Zh={toPosix(i){return _E(i,"\\","/")},isUrl(i){return/^https?:/.test(this.toPosix(i))},isDataUrl(i){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(i)},isBlobUrl(i){return i.startsWith("blob:")},hasProtocol(i){return/^[^/:]+:/.test(this.toPosix(i))},getProtocol(i){gl(i),i=this.toPosix(i);const t=/^file:\/\/\//.exec(i);if(t)return t[0];const n=/^[^/:]+:\/{0,2}/.exec(i);return n?n[0]:""},toAbsolute(i,t,n){if(gl(i),this.isDataUrl(i)||this.isBlobUrl(i))return i;const l=Mh(this.toPosix(t??hi.get().getBaseUrl())),o=Mh(this.toPosix(n??this.rootname(l)));return i=this.toPosix(i),i.startsWith("/")?Zh.join(o,i.slice(1)):this.isAbsolute(i)?i:this.join(l,i)},normalize(i){if(gl(i),i.length===0)return".";if(this.isDataUrl(i)||this.isBlobUrl(i))return i;i=this.toPosix(i);let t="";const n=i.startsWith("/");this.hasProtocol(i)&&(t=this.rootname(i),i=i.slice(t.length));const l=i.endsWith("/");return i=SE(i),i.length>0&&l&&(i+="/"),n?`/${i}`:t+i},isAbsolute(i){return gl(i),i=this.toPosix(i),this.hasProtocol(i)?!0:i.startsWith("/")},join(...i){if(i.length===0)return".";let t;for(let n=0;n<i.length;++n){const l=i[n];if(gl(l),l.length>0)if(t===void 0)t=l;else{const o=i[n-1]??"";this.joinExtensions.includes(this.extname(o).toLowerCase())?t+=`/../${l}`:t+=`/${l}`}}return t===void 0?".":this.normalize(t)},dirname(i){if(gl(i),i.length===0)return".";i=this.toPosix(i);let t=i.charCodeAt(0);const n=t===47;let l=-1,o=!0;const f=this.getProtocol(i),d=i;i=i.slice(f.length);for(let m=i.length-1;m>=1;--m)if(t=i.charCodeAt(m),t===47){if(!o){l=m;break}}else o=!1;return l===-1?n?"/":this.isUrl(d)?f+i:f:n&&l===1?"//":f+i.slice(0,l)},rootname(i){gl(i),i=this.toPosix(i);let t="";if(i.startsWith("/")?t="/":t=this.getProtocol(i),this.isUrl(i)){const n=i.indexOf("/",t.length);n!==-1?t=i.slice(0,n):t=i,t.endsWith("/")||(t+="/")}return t},basename(i,t){gl(i),t&&gl(t),i=Mh(this.toPosix(i));let n=0,l=-1,o=!0,f;if(t!==void 0&&t.length>0&&t.length<=i.length){if(t.length===i.length&&t===i)return"";let d=t.length-1,m=-1;for(f=i.length-1;f>=0;--f){const g=i.charCodeAt(f);if(g===47){if(!o){n=f+1;break}}else m===-1&&(o=!1,m=f+1),d>=0&&(g===t.charCodeAt(d)?--d===-1&&(l=f):(d=-1,l=m))}return n===l?l=m:l===-1&&(l=i.length),i.slice(n,l)}for(f=i.length-1;f>=0;--f)if(i.charCodeAt(f)===47){if(!o){n=f+1;break}}else l===-1&&(o=!1,l=f+1);return l===-1?"":i.slice(n,l)},extname(i){gl(i),i=Mh(this.toPosix(i));let t=-1,n=0,l=-1,o=!0,f=0;for(let d=i.length-1;d>=0;--d){const m=i.charCodeAt(d);if(m===47){if(!o){n=d+1;break}continue}l===-1&&(o=!1,l=d+1),m===46?t===-1?t=d:f!==1&&(f=1):t!==-1&&(f=-1)}return t===-1||l===-1||f===0||f===1&&t===l-1&&t===n+1?"":i.slice(t,l)},parse(i){gl(i);const t={root:"",dir:"",base:"",ext:"",name:""};if(i.length===0)return t;i=Mh(this.toPosix(i));let n=i.charCodeAt(0);const l=this.isAbsolute(i);let o;t.root=this.rootname(i),l||this.hasProtocol(i)?o=1:o=0;let f=-1,d=0,m=-1,g=!0,v=i.length-1,_=0;for(;v>=o;--v){if(n=i.charCodeAt(v),n===47){if(!g){d=v+1;break}continue}m===-1&&(g=!1,m=v+1),n===46?f===-1?f=v:_!==1&&(_=1):f!==-1&&(_=-1)}return f===-1||m===-1||_===0||_===1&&f===m-1&&f===d+1?m!==-1&&(d===0&&l?t.base=t.name=i.slice(1,m):t.base=t.name=i.slice(d,m)):(d===0&&l?(t.name=i.slice(1,f),t.base=i.slice(1,m)):(t.name=i.slice(d,f),t.base=i.slice(d,m)),t.ext=i.slice(f,m)),t.dir=this.dirname(i),t},sep:"/",delimiter:":",joinExtensions:[".html"]};function Fx(i,t,n,l,o){const f=t[n];for(let d=0;d<f.length;d++){const m=f[d];n<t.length-1?Fx(i.replace(l[n],m),t,n+1,l,o):o.push(i.replace(l[n],m))}}function bE(i){const t=/\{(.*?)\}/g,n=i.match(t),l=[];if(n){const o=[];n.forEach(f=>{const d=f.substring(1,f.length-1).split(",");o.push(d)}),Fx(i,o,0,n,l)}else l.push(i);return l}const Lv=i=>!Array.isArray(i);class Ix{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(t,n)=>`${t}${this._bundleIdConnector}${n}`,extractAssetIdFromBundle:(t,n)=>n.replace(`${t}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(t){if(this._bundleIdConnector=t.connector??this._bundleIdConnector,this._createBundleAssetId=t.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=t.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...t){t.forEach(n=>{this._preferredOrder.push(n),n.priority||(n.priority=Object.keys(n.params))}),this._resolverHash={}}set basePath(t){this._basePath=t}get basePath(){return this._basePath}set rootPath(t){this._rootPath=t}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(t){if(typeof t=="string")this._defaultSearchParams=t;else{const n=t;this._defaultSearchParams=Object.keys(n).map(l=>`${encodeURIComponent(l)}=${encodeURIComponent(n[l])}`).join("&")}}getAlias(t){const{alias:n,src:l}=t;return Rc(n||l,f=>typeof f=="string"?f:Array.isArray(f)?f.map(d=>(d==null?void 0:d.src)??d):f!=null&&f.src?f.src:f,!0)}removeAlias(t,n){this._assetMap[t]&&(n&&n!==this._resolverHash[t]||(delete this._resolverHash[t],delete this._assetMap[t]))}addManifest(t){this._manifest&&Ha("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=t,t.bundles.forEach(n=>{this.addBundle(n.name,n.assets)})}addBundle(t,n){const l=[];let o=n;Array.isArray(n)||(o=Object.entries(n).map(([f,d])=>typeof d=="string"||Array.isArray(d)?{alias:f,src:d}:{alias:f,...d})),o.forEach(f=>{const d=f.src,m=f.alias;let g;if(typeof m=="string"){const v=this._createBundleAssetId(t,m);l.push(v),g=[m,v]}else{const v=m.map(_=>this._createBundleAssetId(t,_));l.push(...v),g=[...m,...v]}this.add({...f,alias:g,src:d})}),this._bundles[t]=l}add(t){const n=[];Array.isArray(t)?n.push(...t):n.push(t);let l;l=f=>{this.hasKey(f)&&Ha(`[Resolver] already has key: ${f} overwriting`)},Rc(n).forEach(f=>{const{src:d}=f;let{data:m,format:g,loadParser:v,parser:_}=f;const b=Rc(d).map(R=>typeof R=="string"?bE(R):Array.isArray(R)?R:[R]),C=this.getAlias(f);Array.isArray(C)?C.forEach(l):l(C);const E=[],M=R=>{const z=this._parsers.find(O=>O.test(R));return{src:R,...z==null?void 0:z.parse(R)}};b.forEach(R=>{R.forEach(z=>{let O={};if(typeof z!="object"?O=M(z):(m=z.data??m,g=z.format??g,(z.loadParser||z.parser)&&(v=z.loadParser??v,_=z.parser??_),O={...M(z.src),...z}),!C)throw new Error(`[Resolver] alias is undefined for this asset: ${O.src}`);O=this._buildResolvedAsset(O,{aliases:C,data:m,format:g,loadParser:v,parser:_,progressSize:f.progressSize}),E.push(O)})}),C.forEach(R=>{this._assetMap[R]=E})})}resolveBundle(t){const n=Lv(t);t=Rc(t);const l={};return t.forEach(o=>{const f=this._bundles[o];if(f){const d=this.resolve(f),m={};for(const g in d){const v=d[g];m[this._extractAssetIdFromBundle(o,g)]=v}l[o]=m}}),n?l[t[0]]:l}resolveUrl(t){const n=this.resolve(t);if(typeof t!="string"){const l={};for(const o in n)l[o]=n[o].src;return l}return n.src}resolve(t){const n=Lv(t);t=Rc(t);const l={};return t.forEach(o=>{if(!this._resolverHash[o])if(this._assetMap[o]){let f=this._assetMap[o];const d=this._getPreferredOrder(f);d==null||d.priority.forEach(m=>{d.params[m].forEach(g=>{const v=f.filter(_=>_[m]?_[m]===g:!1);v.length&&(f=v)})}),this._resolverHash[o]=f[0]}else this._resolverHash[o]=this._buildResolvedAsset({alias:[o],src:o},{});l[o]=this._resolverHash[o]}),n?l[t[0]]:l}hasKey(t){return!!this._assetMap[t]}hasBundle(t){return!!this._bundles[t]}_getPreferredOrder(t){for(let n=0;n<t.length;n++){const l=t[n],o=this._preferredOrder.find(f=>f.params.format.includes(l.format));if(o)return o}return this._preferredOrder[0]}_appendDefaultSearchParams(t){if(!this._defaultSearchParams)return t;const n=/\?/.test(t)?"&":"?";return`${t}${n}${this._defaultSearchParams}`}_buildResolvedAsset(t,n){const{aliases:l,data:o,loadParser:f,parser:d,format:m,progressSize:g}=n;return(this._basePath||this._rootPath)&&(t.src=Zh.toAbsolute(t.src,this._basePath,this._rootPath)),t.alias=l??t.alias??[t.src],t.src=this._appendDefaultSearchParams(t.src),t.data={...o||{},...t.data},t.loadParser=f??t.loadParser,t.parser=d??t.parser,t.format=m??t.format??TE(t.src),g!==void 0&&(t.progressSize=g),t}}Ix.RETINA_PREFIX=/@([0-9\.]+)x/;function TE(i){return i.split(".").pop().split("?").shift().split("#").shift()}const Xv=(i,t)=>{const n=t.split("?")[1];return n&&(i+=`?${n}`),i},$x=class Hh{constructor(t,n){this.linkedSheets=[];let l=t;(t==null?void 0:t.source)instanceof Qi&&(l={texture:t,data:n});const{texture:o,data:f,cachePrefix:d=""}=l;this.cachePrefix=d,this._texture=o instanceof Re?o:null,this.textureSource=o.source,this.textures={},this.animations={},this.data=f;const m=parseFloat(f.meta.scale);m?(this.resolution=m,o.source.resolution=this.resolution):this.resolution=o.source._resolution,this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}parse(){return new Promise(t=>{this._callback=t,this._batchIndex=0,this._frameKeys.length<=Hh.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}parseSync(){return this._processFrames(0,!0),this._processAnimations(),this.textures}_processFrames(t,n=!1){let l=t;const o=n?1/0:Hh.BATCH_SIZE;for(;l-t<o&&l<this._frameKeys.length;){const f=this._frameKeys[l],d=this._frames[f],m=d.frame;if(m){let g=null,v=null;const _=d.trimmed!==!1&&d.sourceSize?d.sourceSize:d.frame,b=new dn(0,0,Math.floor(_.w)/this.resolution,Math.floor(_.h)/this.resolution);d.rotated?g=new dn(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.h)/this.resolution,Math.floor(m.w)/this.resolution):g=new dn(Math.floor(m.x)/this.resolution,Math.floor(m.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution),d.trimmed!==!1&&d.spriteSourceSize&&(v=new dn(Math.floor(d.spriteSourceSize.x)/this.resolution,Math.floor(d.spriteSourceSize.y)/this.resolution,Math.floor(m.w)/this.resolution,Math.floor(m.h)/this.resolution)),this.textures[f]=new Re({source:this.textureSource,frame:g,orig:b,trim:v,rotate:d.rotated?2:0,defaultAnchor:d.anchor,defaultBorders:d.borders,label:f.toString()})}l++}}_processAnimations(){const t=this.data.animations||{};for(const n in t){this.animations[n]=[];for(let l=0;l<t[n].length;l++){const o=t[n][l];this.animations[n].push(this.textures[o])}}}_parseComplete(){const t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Hh.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Hh.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(t=!1){var n;for(const l in this.textures)this.textures[l].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&((n=this._texture)==null||n.destroy(),this.textureSource.destroy()),this._texture=null,this.textureSource=null,this.linkedSheets=[]}};$x.BATCH_SIZE=1e3;let Vv=$x;const EE=["jpg","png","jpeg","avif","webp","basis","etc2","bc7","bc6h","bc5","bc4","bc3","bc2","bc1","eac","astc"];function t_(i,t,n){const l={};if(i.forEach(o=>{l[o]=t}),Object.keys(t.textures).forEach(o=>{l[`${t.cachePrefix}${o}`]=t.textures[o]}),!n){const o=Zh.dirname(i[0]);t.linkedSheets.forEach((f,d)=>{const m=t_([`${o}/${t.data.meta.related_multi_packs[d]}`],f,!0);Object.assign(l,m)})}return l}const CE={extension:Pt.Asset,cache:{test:i=>i instanceof Vv,getCacheableAssets:(i,t)=>t_(i,t,!1)},resolver:{extension:{type:Pt.ResolveParser,name:"resolveSpritesheet"},test:i=>{const n=i.split("?")[0].split("."),l=n.pop(),o=n.pop();return l==="json"&&EE.includes(o)},parse:i=>{var n;const t=i.split(".");return{resolution:parseFloat(((n=Ix.RETINA_PREFIX.exec(i))==null?void 0:n[1])??"1"),format:t[t.length-2],src:i}}},loader:{name:"spritesheetLoader",id:"spritesheet",extension:{type:Pt.LoadParser,priority:Wx.Normal,name:"spritesheetLoader"},async testParse(i,t){return Zh.extname(t.src).toLowerCase()===".json"&&!!i.frames},async parse(i,t,n){var b,C;const{texture:l,imageFilename:o,textureOptions:f,cachePrefix:d}=(t==null?void 0:t.data)??{};let m=Zh.dirname(t.src);m&&m.lastIndexOf("/")!==m.length-1&&(m+="/");let g;if(l instanceof Re)g=l;else{const E=Xv(m+(o??i.meta.image),t.src);g=(await n.load([{src:E,data:f}]))[E]}const v=new Vv({texture:g.source,data:i,cachePrefix:d});await v.parse();const _=(b=i==null?void 0:i.meta)==null?void 0:b.related_multi_packs;if(Array.isArray(_)){const E=[];for(const R of _){if(typeof R!="string")continue;let z=m+R;(C=t.data)!=null&&C.ignoreMultiPack||(z=Xv(z,t.src),E.push(n.load({src:z,data:{textureOptions:f,ignoreMultiPack:!0}})))}const M=await Promise.all(E);v.linkedSheets=M,M.forEach(R=>{R.linkedSheets=[v].concat(v.linkedSheets.filter(z=>z!==R))})}return v},async unload(i,t,n){await n.unload(i.textureSource._sourceOrigin),i.destroy(!1)}}};Fe.add(CE);const Oy=Object.create(null),Qv=Object.create(null);function qg(i,t){let n=Qv[i];return n===void 0&&(Oy[t]===void 0&&(Oy[t]=1),Qv[i]=n=Oy[t]++),n}let Tc;function e_(){return(!Tc||Tc!=null&&Tc.isContextLost())&&(Tc=hi.get().createCanvas().getContext("webgl",{})),Tc}let Vm;function AE(){if(!Vm){Vm="mediump";const i=e_();i&&i.getShaderPrecisionFormat&&(Vm=i.getShaderPrecisionFormat(i.FRAGMENT_SHADER,i.HIGH_FLOAT).precision?"highp":"mediump")}return Vm}function ME(i,t,n){return t?i:n?(i=i.replace("out vec4 finalColor;",""),`
|
|
65
|
+
|
|
66
|
+
#ifdef GL_ES // This checks if it is WebGL1
|
|
67
|
+
#define in varying
|
|
68
|
+
#define finalColor gl_FragColor
|
|
69
|
+
#define texture texture2D
|
|
70
|
+
#endif
|
|
71
|
+
${i}
|
|
72
|
+
`):`
|
|
73
|
+
|
|
74
|
+
#ifdef GL_ES // This checks if it is WebGL1
|
|
75
|
+
#define in attribute
|
|
76
|
+
#define out varying
|
|
77
|
+
#endif
|
|
78
|
+
${i}
|
|
79
|
+
`}function RE(i,t,n){const l=n?t.maxSupportedFragmentPrecision:t.maxSupportedVertexPrecision;if(i.substring(0,9)!=="precision"){let o=n?t.requestedFragmentPrecision:t.requestedVertexPrecision;return o==="highp"&&l!=="highp"&&(o="mediump"),`precision ${o} float;
|
|
80
|
+
${i}`}else if(l!=="highp"&&i.substring(0,15)==="precision highp")return i.replace("precision highp","precision mediump");return i}function zE(i,t){return t?`#version 300 es
|
|
81
|
+
${i}`:i}const DE={},OE={};function NE(i,{name:t="pixi-program"},n=!0){t=t.replace(/\s+/g,"-"),t+=n?"-fragment":"-vertex";const l=n?DE:OE;return l[t]?(l[t]++,t+=`-${l[t]}`):l[t]=1,i.indexOf("#define SHADER_NAME")!==-1?i:`${`#define SHADER_NAME ${t}`}
|
|
82
|
+
${i}`}function UE(i,t){return t?i.replace("#version 300 es",""):i}const Ny={stripVersion:UE,ensurePrecision:RE,addProgramDefines:ME,setProgramName:NE,insertVersion:zE},Rh=Object.create(null),n_=class cg{constructor(t){t={...cg.defaultOptions,...t};const n=t.fragment.indexOf("#version 300 es")!==-1,l={stripVersion:n,ensurePrecision:{requestedFragmentPrecision:t.preferredFragmentPrecision,requestedVertexPrecision:t.preferredVertexPrecision,maxSupportedVertexPrecision:"highp",maxSupportedFragmentPrecision:AE()},setProgramName:{name:t.name},addProgramDefines:n,insertVersion:n};let o=t.fragment,f=t.vertex;Object.keys(Ny).forEach(d=>{const m=l[d];o=Ny[d](o,m,!0),f=Ny[d](f,m,!1)}),this.fragment=o,this.vertex=f,this.transformFeedbackVaryings=t.transformFeedbackVaryings,this._key=qg(`${this.vertex}:${this.fragment}`,"gl-program")}destroy(){this.fragment=null,this.vertex=null,this._attributeData=null,this._uniformData=null,this._uniformBlockData=null,this.transformFeedbackVaryings=null,Rh[this._cacheKey]=null}static from(t){const n=`${t.vertex}:${t.fragment}`;return Rh[n]||(Rh[n]=new cg(t),Rh[n]._cacheKey=n),Rh[n]}};n_.defaultOptions={preferredVertexPrecision:"highp",preferredFragmentPrecision:"mediump"};let Yg=n_;const Zv={uint8x2:{size:2,stride:2,normalised:!1},uint8x4:{size:4,stride:4,normalised:!1},sint8x2:{size:2,stride:2,normalised:!1},sint8x4:{size:4,stride:4,normalised:!1},unorm8x2:{size:2,stride:2,normalised:!0},unorm8x4:{size:4,stride:4,normalised:!0},snorm8x2:{size:2,stride:2,normalised:!0},snorm8x4:{size:4,stride:4,normalised:!0},uint16x2:{size:2,stride:4,normalised:!1},uint16x4:{size:4,stride:8,normalised:!1},sint16x2:{size:2,stride:4,normalised:!1},sint16x4:{size:4,stride:8,normalised:!1},unorm16x2:{size:2,stride:4,normalised:!0},unorm16x4:{size:4,stride:8,normalised:!0},snorm16x2:{size:2,stride:4,normalised:!0},snorm16x4:{size:4,stride:8,normalised:!0},float16x2:{size:2,stride:4,normalised:!1},float16x4:{size:4,stride:8,normalised:!1},float32:{size:1,stride:4,normalised:!1},float32x2:{size:2,stride:8,normalised:!1},float32x3:{size:3,stride:12,normalised:!1},float32x4:{size:4,stride:16,normalised:!1},uint32:{size:1,stride:4,normalised:!1},uint32x2:{size:2,stride:8,normalised:!1},uint32x3:{size:3,stride:12,normalised:!1},uint32x4:{size:4,stride:16,normalised:!1},sint32:{size:1,stride:4,normalised:!1},sint32x2:{size:2,stride:8,normalised:!1},sint32x3:{size:3,stride:12,normalised:!1},sint32x4:{size:4,stride:16,normalised:!1}};function BE(i){return Zv[i]??Zv.float32}const wE={f32:"float32","vec2<f32>":"float32x2","vec3<f32>":"float32x3","vec4<f32>":"float32x4",vec2f:"float32x2",vec3f:"float32x3",vec4f:"float32x4",i32:"sint32","vec2<i32>":"sint32x2","vec3<i32>":"sint32x3","vec4<i32>":"sint32x4",vec2i:"sint32x2",vec3i:"sint32x3",vec4i:"sint32x4",u32:"uint32","vec2<u32>":"uint32x2","vec3<u32>":"uint32x3","vec4<u32>":"uint32x4",vec2u:"uint32x2",vec3u:"uint32x3",vec4u:"uint32x4",bool:"uint32","vec2<bool>":"uint32x2","vec3<bool>":"uint32x3","vec4<bool>":"uint32x4"},Kv=/@location\((\d+)\)\s+([a-zA-Z0-9_]+)\s*:\s*([a-zA-Z0-9_<>]+)(?:,|\s|\)|$)/g;function kv(i,t){let n;for(;(n=Kv.exec(i))!==null;){const l=wE[n[3]]??"float32";t[n[2]]={location:parseInt(n[1],10),format:l,stride:BE(l).stride,offset:0,instance:!1,start:0}}Kv.lastIndex=0}function HE(i){return i.replace(/\/\/.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"")}function GE({source:i,entryPoint:t}){const n={},l=HE(i),o=l.indexOf(`fn ${t}(`);if(o===-1)return n;const f=l.indexOf("->",o);if(f===-1)return n;const d=l.substring(o,f);if(kv(d,n),Object.keys(n).length===0){const m=d.match(/\(\s*\w+\s*:\s*(\w+)/);if(m){const g=m[1],v=new RegExp(`struct\\s+${g}\\s*\\{([^}]+)\\}`,"s"),_=l.match(v);_&&kv(_[1],n)}}return n}function Uy(i){var b,C;const t=/(^|[^/])@(group|binding)\(\d+\)[^;]+;/g,n=/@group\((\d+)\)/,l=/@binding\((\d+)\)/,o=/var(<[^>]+>)? (\w+)/,f=/:\s*([\w<>]+)/,d=/struct\s+(\w+)\s*{([^}]+)}/g,m=/(\w+)\s*:\s*([\w\<\>]+)/g,g=/struct\s+(\w+)/,v=(b=i.match(t))==null?void 0:b.map(E=>({group:parseInt(E.match(n)[1],10),binding:parseInt(E.match(l)[1],10),name:E.match(o)[2],isUniform:E.match(o)[1]==="<uniform>",type:E.match(f)[1]}));if(!v)return{groups:[],structs:[]};const _=((C=i.match(d))==null?void 0:C.map(E=>{const M=E.match(g)[1],R=E.match(m).reduce((z,O)=>{const[B,U]=O.split(":");return z[B.trim()]=U.trim(),z},{});return R?{name:M,members:R}:null}).filter(({name:E})=>v.some(M=>M.type===E||M.type.includes(`<${E}>`))))??[];return{groups:v,structs:_}}var $r=(i=>(i[i.VERTEX=1]="VERTEX",i[i.FRAGMENT=2]="FRAGMENT",i[i.COMPUTE=4]="COMPUTE",i))($r||{});function jE({groups:i}){const t=[];for(let n=0;n<i.length;n++){const l=i[n];t[l.group]||(t[l.group]=[]),l.isUniform?t[l.group].push({binding:l.binding,visibility:$r.VERTEX|$r.FRAGMENT,buffer:{type:"uniform"}}):l.type==="sampler"?t[l.group].push({binding:l.binding,visibility:$r.FRAGMENT,sampler:{type:"filtering"}}):l.type==="texture_2d"||l.type.startsWith("texture_2d<")?t[l.group].push({binding:l.binding,visibility:$r.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d",multisampled:!1}}):l.type==="texture_2d_array"||l.type.startsWith("texture_2d_array<")?t[l.group].push({binding:l.binding,visibility:$r.FRAGMENT,texture:{sampleType:"float",viewDimension:"2d-array",multisampled:!1}}):(l.type==="texture_cube"||l.type.startsWith("texture_cube<"))&&t[l.group].push({binding:l.binding,visibility:$r.FRAGMENT,texture:{sampleType:"float",viewDimension:"cube",multisampled:!1}})}for(let n=0;n<t.length;n++)t[n]||(t[n]=[]);return t}function qE({groups:i}){const t=[];for(let n=0;n<i.length;n++){const l=i[n];t[l.group]||(t[l.group]={}),t[l.group][l.name]=l.binding}return t}function YE(i,t){const n=new Set,l=new Set,o=[...i.structs,...t.structs].filter(d=>n.has(d.name)?!1:(n.add(d.name),!0)),f=[...i.groups,...t.groups].filter(d=>{const m=`${d.name}-${d.binding}`;return l.has(m)?!1:(l.add(m),!0)});return{structs:o,groups:f}}const zh=Object.create(null);class td{constructor(t){var m,g;this._layoutKey=0,this._attributeLocationsKey=0;const{fragment:n,vertex:l,layout:o,gpuLayout:f,name:d}=t;if(this.name=d,this.fragment=n,this.vertex=l,n.source===l.source){const v=Uy(n.source);this.structsAndGroups=v}else{const v=Uy(l.source),_=Uy(n.source);this.structsAndGroups=YE(v,_)}this.layout=o??qE(this.structsAndGroups),this.gpuLayout=f??jE(this.structsAndGroups),this.autoAssignGlobalUniforms=((m=this.layout[0])==null?void 0:m.globalUniforms)!==void 0,this.autoAssignLocalUniforms=((g=this.layout[1])==null?void 0:g.localUniforms)!==void 0,this._generateProgramKey()}_generateProgramKey(){const{vertex:t,fragment:n}=this,l=t.source+n.source+t.entryPoint+n.entryPoint;this._layoutKey=qg(l,"program")}get attributeData(){return this._attributeData??(this._attributeData=GE(this.vertex)),this._attributeData}destroy(){this.gpuLayout=null,this.layout=null,this.structsAndGroups=null,this.fragment=null,this.vertex=null,zh[this._cacheKey]=null}static from(t){const n=`${t.vertex.source}:${t.fragment.source}:${t.fragment.entryPoint}:${t.vertex.entryPoint}`;return zh[n]||(zh[n]=new td(t),zh[n]._cacheKey=n),zh[n]}}const a_=["f32","i32","vec2<f32>","vec3<f32>","vec4<f32>","mat2x2<f32>","mat3x3<f32>","mat4x4<f32>","mat3x2<f32>","mat4x2<f32>","mat2x3<f32>","mat4x3<f32>","mat2x4<f32>","mat3x4<f32>","vec2<i32>","vec3<i32>","vec4<i32>"],LE=a_.reduce((i,t)=>(i[t]=!0,i),{});function XE(i,t){switch(i){case"f32":return 0;case"vec2<f32>":return new Float32Array(2*t);case"vec3<f32>":return new Float32Array(3*t);case"vec4<f32>":return new Float32Array(4*t);case"mat2x2<f32>":return new Float32Array([1,0,0,1]);case"mat3x3<f32>":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4x4<f32>":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}const i_=class l_{constructor(t,n){this._touched=0,this.uid=rn("uniform"),this._resourceType="uniformGroup",this._resourceId=rn("resource"),this.isUniformGroup=!0,this._dirtyId=0,this.destroyed=!1,n={...l_.defaultOptions,...n},this.uniformStructures=t;const l={};for(const o in t){const f=t[o];if(f.name=o,f.size=f.size??1,!LE[f.type]){const d=f.type.match(/^array<(\w+(?:<\w+>)?),\s*(\d+)>$/);if(d){const[,m,g]=d;throw new Error(`Uniform type ${f.type} is not supported. Use type: '${m}', size: ${g} instead.`)}throw new Error(`Uniform type ${f.type} is not supported. Supported uniform types are: ${a_.join(", ")}`)}f.value??(f.value=XE(f.type,f.size)),l[o]=f.value}this.uniforms=l,this._dirtyId=1,this.ubo=n.ubo,this.isStatic=n.isStatic,this._signature=qg(Object.keys(l).map(o=>`${o}-${t[o].type}`).join("-"),"uniform-group")}update(){this._dirtyId++}};i_.defaultOptions={ubo:!1,isStatic:!1};let s_=i_;class lp{constructor(t){this.resources=Object.create(null),this._dirty=!0;let n=0;for(const l in t){const o=t[l];this.setResource(o,n++)}this._updateKey()}_updateKey(){if(!this._dirty)return;this._dirty=!1;const t=[];let n=0;for(const l in this.resources)t[n++]=this.resources[l]._resourceId;this._key=t.join("|")}setResource(t,n){var o,f;const l=this.resources[n];t!==l&&((o=l==null?void 0:l.off)==null||o.call(l,"change",this.onResourceChange,this),(f=t.on)==null||f.call(t,"change",this.onResourceChange,this),this.resources[n]=t,this._dirty=!0)}getResource(t){return this.resources[t]}_touch(t,n){const l=this.resources;for(const o in l)l[o]._gcLastUsed=t,l[o]._touched=n}destroy(){var n;const t=this.resources;for(const l in t){const o=t[l];(n=o==null?void 0:o.off)==null||n.call(o,"change",this.onResourceChange,this)}this.resources=null}onResourceChange(t){this._dirty=!0,t.destroyed?this.destroy():this._updateKey()}}var fg=(i=>(i[i.WEBGL=1]="WEBGL",i[i.WEBGPU=2]="WEBGPU",i[i.CANVAS=4]="CANVAS",i[i.BOTH=3]="BOTH",i))(fg||{});class Tp extends us{constructor(t){super(),this.uid=rn("shader"),this._uniformBindMap=Object.create(null),this._ownedBindGroups=[],this._destroyed=!1;let{gpuProgram:n,glProgram:l,groups:o,resources:f,compatibleRenderers:d,groupMap:m}=t;this.gpuProgram=n,this.glProgram=l,d===void 0&&(d=0,n&&(d|=fg.WEBGPU),l&&(d|=fg.WEBGL)),this.compatibleRenderers=d;const g={};if(!f&&!o&&(f={}),f&&o)throw new Error("[Shader] Cannot have both resources and groups");if(!n&&o&&!m)throw new Error("[Shader] No group map or WebGPU shader provided - consider using resources instead.");if(!n&&o&&m)for(const v in m)for(const _ in m[v]){const b=m[v][_];g[b]={group:v,binding:_,name:b}}else if(n&&o&&!m){const v=n.structsAndGroups.groups;m={},v.forEach(_=>{m[_.group]=m[_.group]||{},m[_.group][_.binding]=_.name,g[_.name]=_})}else if(f){o={},m={},n&&n.structsAndGroups.groups.forEach(b=>{m[b.group]=m[b.group]||{},m[b.group][b.binding]=b.name,g[b.name]=b});let v=0;for(const _ in f)g[_]||(o[99]||(o[99]=new lp,this._ownedBindGroups.push(o[99])),g[_]={group:99,binding:v,name:_},m[99]=m[99]||{},m[99][v]=_,v++);for(const _ in f){const b=_;let C=f[_];!C.source&&!C._resourceType&&(C=new s_(C));const E=g[b];E&&(o[E.group]||(o[E.group]=new lp,this._ownedBindGroups.push(o[E.group])),o[E.group].setResource(C,E.binding))}}this.groups=o,this._uniformBindMap=m,this.resources=this._buildResourceAccessor(o,g)}addResource(t,n,l){var o,f;(o=this._uniformBindMap)[n]||(o[n]={}),(f=this._uniformBindMap[n])[l]||(f[l]=t),this.groups[n]||(this.groups[n]=new lp,this._ownedBindGroups.push(this.groups[n]))}_buildResourceAccessor(t,n){const l={};for(const o in n){const f=n[o];Object.defineProperty(l,f.name,{get(){return t[f.group].getResource(f.binding)},set(d){t[f.group].setResource(d,f.binding)}})}return l}destroy(t=!1){var n,l;this._destroyed||(this._destroyed=!0,this.emit("destroy",this),t&&((n=this.gpuProgram)==null||n.destroy(),(l=this.glProgram)==null||l.destroy()),this.gpuProgram=null,this.glProgram=null,this.removeAllListeners(),this._uniformBindMap=null,this._ownedBindGroups.forEach(o=>{o.destroy()}),this._ownedBindGroups=null,this.resources=null,this.groups=null)}static from(t){const{gpu:n,gl:l,...o}=t;let f,d;return n&&(f=td.from(n)),l&&(d=Yg.from(l)),new Tp({gpuProgram:f,glProgram:d,...o})}}const VE={normal:0,add:1,multiply:2,screen:3,overlay:4,erase:5,"normal-npm":6,"add-npm":7,"screen-npm":8,min:9,max:10},By=0,wy=1,Hy=2,Gy=3,jy=4,qy=5,hg=class u_{constructor(){this.data=0,this.blendMode="normal",this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<By)}set blend(t){!!(this.data&1<<By)!==t&&(this.data^=1<<By)}get offsets(){return!!(this.data&1<<wy)}set offsets(t){!!(this.data&1<<wy)!==t&&(this.data^=1<<wy)}set cullMode(t){if(t==="none"){this.culling=!1;return}this.culling=!0,this.clockwiseFrontFace=t==="front"}get cullMode(){return this.culling?this.clockwiseFrontFace?"front":"back":"none"}get culling(){return!!(this.data&1<<Hy)}set culling(t){!!(this.data&1<<Hy)!==t&&(this.data^=1<<Hy)}get depthTest(){return!!(this.data&1<<Gy)}set depthTest(t){!!(this.data&1<<Gy)!==t&&(this.data^=1<<Gy)}get depthMask(){return!!(this.data&1<<qy)}set depthMask(t){!!(this.data&1<<qy)!==t&&(this.data^=1<<qy)}get clockwiseFrontFace(){return!!(this.data&1<<jy)}set clockwiseFrontFace(t){!!(this.data&1<<jy)!==t&&(this.data^=1<<jy)}get blendMode(){return this._blendMode}set blendMode(t){this.blend=t!=="none",this._blendMode=t,this._blendModeId=VE[t]||0}get polygonOffset(){return this._polygonOffset}set polygonOffset(t){this.offsets=!!t,this._polygonOffset=t}toString(){return`[pixi.js/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){const t=new u_;return t.depthTest=!1,t.blend=!0,t}};hg.default2d=hg.for2d();let Lg=hg;const r_=class dg extends Tp{constructor(t){t={...dg.defaultOptions,...t},super(t),this.enabled=!0,this._state=Lg.for2d(),this.blendMode=t.blendMode,this.padding=t.padding,typeof t.antialias=="boolean"?this.antialias=t.antialias?"on":"off":this.antialias=t.antialias,this.resolution=t.resolution,this.blendRequired=t.blendRequired,this.clipToViewport=t.clipToViewport,this.addResource("uTexture",0,1),t.blendRequired&&this.addResource("uBackTexture",0,3)}apply(t,n,l,o){t.applyFilter(this,n,l,o)}get blendMode(){return this._state.blendMode}set blendMode(t){this._state.blendMode=t}static from(t){const{gpu:n,gl:l,...o}=t;let f,d;return n&&(f=td.from(n)),l&&(d=Yg.from(l)),new dg({gpuProgram:f,glProgram:d,...o})}};r_.defaultOptions={blendMode:"normal",resolution:1,padding:0,antialias:"off",blendRequired:!1,clipToViewport:!0};let io=r_;const mg=[];Fe.handleByNamedList(Pt.Environment,mg);async function QE(i){if(!i)for(let t=0;t<mg.length;t++){const n=mg[t];if(n.value.test()){await n.value.load();return}}}let Dh;function ZE(){if(typeof Dh=="boolean")return Dh;try{Dh=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Dh=!1}return Dh}function Jv(i,t,n=2){const l=t&&t.length,o=l?t[0]*n:i.length;let f=o_(i,0,o,n,!0);const d=[];if(!f||f.next===f.prev)return d;let m,g,v;if(l&&(f=WE(i,t,f,n)),i.length>80*n){m=i[0],g=i[1];let _=m,b=g;for(let C=n;C<o;C+=n){const E=i[C],M=i[C+1];E<m&&(m=E),M<g&&(g=M),E>_&&(_=E),M>b&&(b=M)}v=Math.max(_-m,b-g),v=v!==0?32767/v:0}return Kh(f,d,n,m,g,v,0),d}function o_(i,t,n,l,o){let f;if(o===uC(i,t,n,l)>0)for(let d=t;d<n;d+=l)f=Pv(d/l|0,i[d],i[d+1],f);else for(let d=n-l;d>=t;d-=l)f=Pv(d/l|0,i[d],i[d+1],f);return f&&Yc(f,f.next)&&(Jh(f),f=f.next),f}function no(i,t){if(!i)return i;t||(t=i);let n=i,l;do if(l=!1,!n.steiner&&(Yc(n,n.next)||We(n.prev,n,n.next)===0)){if(Jh(n),n=t=n.prev,n===n.next)break;l=!0}else n=n.next;while(l||n!==t);return t}function Kh(i,t,n,l,o,f,d){if(!i)return;!d&&f&&eC(i,l,o,f);let m=i;for(;i.prev!==i.next;){const g=i.prev,v=i.next;if(f?kE(i,l,o,f):KE(i)){t.push(g.i,i.i,v.i),Jh(i),i=v.next,m=v.next;continue}if(i=v,i===m){d?d===1?(i=JE(no(i),t),Kh(i,t,n,l,o,f,2)):d===2&&PE(i,t,n,l,o,f):Kh(no(i),t,n,l,o,f,1);break}}}function KE(i){const t=i.prev,n=i,l=i.next;if(We(t,n,l)>=0)return!1;const o=t.x,f=n.x,d=l.x,m=t.y,g=n.y,v=l.y,_=Math.min(o,f,d),b=Math.min(m,g,v),C=Math.max(o,f,d),E=Math.max(m,g,v);let M=l.next;for(;M!==t;){if(M.x>=_&&M.x<=C&&M.y>=b&&M.y<=E&&Gh(o,m,f,g,d,v,M.x,M.y)&&We(M.prev,M,M.next)>=0)return!1;M=M.next}return!0}function kE(i,t,n,l){const o=i.prev,f=i,d=i.next;if(We(o,f,d)>=0)return!1;const m=o.x,g=f.x,v=d.x,_=o.y,b=f.y,C=d.y,E=Math.min(m,g,v),M=Math.min(_,b,C),R=Math.max(m,g,v),z=Math.max(_,b,C),O=pg(E,M,t,n,l),B=pg(R,z,t,n,l);let U=i.prevZ,G=i.nextZ;for(;U&&U.z>=O&&G&&G.z<=B;){if(U.x>=E&&U.x<=R&&U.y>=M&&U.y<=z&&U!==o&&U!==d&&Gh(m,_,g,b,v,C,U.x,U.y)&&We(U.prev,U,U.next)>=0||(U=U.prevZ,G.x>=E&&G.x<=R&&G.y>=M&&G.y<=z&&G!==o&&G!==d&&Gh(m,_,g,b,v,C,G.x,G.y)&&We(G.prev,G,G.next)>=0))return!1;G=G.nextZ}for(;U&&U.z>=O;){if(U.x>=E&&U.x<=R&&U.y>=M&&U.y<=z&&U!==o&&U!==d&&Gh(m,_,g,b,v,C,U.x,U.y)&&We(U.prev,U,U.next)>=0)return!1;U=U.prevZ}for(;G&&G.z<=B;){if(G.x>=E&&G.x<=R&&G.y>=M&&G.y<=z&&G!==o&&G!==d&&Gh(m,_,g,b,v,C,G.x,G.y)&&We(G.prev,G,G.next)>=0)return!1;G=G.nextZ}return!0}function JE(i,t){let n=i;do{const l=n.prev,o=n.next.next;!Yc(l,o)&&f_(l,n,n.next,o)&&kh(l,o)&&kh(o,l)&&(t.push(l.i,n.i,o.i),Jh(n),Jh(n.next),n=i=o),n=n.next}while(n!==i);return no(n)}function PE(i,t,n,l,o,f){let d=i;do{let m=d.next.next;for(;m!==d.prev;){if(d.i!==m.i&&iC(d,m)){let g=h_(d,m);d=no(d,d.next),g=no(g,g.next),Kh(d,t,n,l,o,f,0),Kh(g,t,n,l,o,f,0);return}m=m.next}d=d.next}while(d!==i)}function WE(i,t,n,l){const o=[];for(let f=0,d=t.length;f<d;f++){const m=t[f]*l,g=f<d-1?t[f+1]*l:i.length,v=o_(i,m,g,l,!1);v===v.next&&(v.steiner=!0),o.push(aC(v))}o.sort(FE);for(let f=0;f<o.length;f++)n=IE(o[f],n);return n}function FE(i,t){let n=i.x-t.x;if(n===0&&(n=i.y-t.y,n===0)){const l=(i.next.y-i.y)/(i.next.x-i.x),o=(t.next.y-t.y)/(t.next.x-t.x);n=l-o}return n}function IE(i,t){const n=$E(i,t);if(!n)return t;const l=h_(n,i);return no(l,l.next),no(n,n.next)}function $E(i,t){let n=t;const l=i.x,o=i.y;let f=-1/0,d;if(Yc(i,n))return n;do{if(Yc(i,n.next))return n.next;if(o<=n.y&&o>=n.next.y&&n.next.y!==n.y){const b=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(b<=l&&b>f&&(f=b,d=n.x<n.next.x?n:n.next,b===l))return d}n=n.next}while(n!==t);if(!d)return null;const m=d,g=d.x,v=d.y;let _=1/0;n=d;do{if(l>=n.x&&n.x>=g&&l!==n.x&&c_(o<v?l:f,o,g,v,o<v?f:l,o,n.x,n.y)){const b=Math.abs(o-n.y)/(l-n.x);kh(n,i)&&(b<_||b===_&&(n.x>d.x||n.x===d.x&&tC(d,n)))&&(d=n,_=b)}n=n.next}while(n!==m);return d}function tC(i,t){return We(i.prev,i,t.prev)<0&&We(t.next,i,i.next)<0}function eC(i,t,n,l){let o=i;do o.z===0&&(o.z=pg(o.x,o.y,t,n,l)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next;while(o!==i);o.prevZ.nextZ=null,o.prevZ=null,nC(o)}function nC(i){let t,n=1;do{let l=i,o;i=null;let f=null;for(t=0;l;){t++;let d=l,m=0;for(let v=0;v<n&&(m++,d=d.nextZ,!!d);v++);let g=n;for(;m>0||g>0&&d;)m!==0&&(g===0||!d||l.z<=d.z)?(o=l,l=l.nextZ,m--):(o=d,d=d.nextZ,g--),f?f.nextZ=o:i=o,o.prevZ=f,f=o;l=d}f.nextZ=null,n*=2}while(t>1);return i}function pg(i,t,n,l,o){return i=(i-n)*o|0,t=(t-l)*o|0,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function aC(i){let t=i,n=i;do(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next;while(t!==i);return n}function c_(i,t,n,l,o,f,d,m){return(o-d)*(t-m)>=(i-d)*(f-m)&&(i-d)*(l-m)>=(n-d)*(t-m)&&(n-d)*(f-m)>=(o-d)*(l-m)}function Gh(i,t,n,l,o,f,d,m){return!(i===d&&t===m)&&c_(i,t,n,l,o,f,d,m)}function iC(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!lC(i,t)&&(kh(i,t)&&kh(t,i)&&sC(i,t)&&(We(i.prev,i,t.prev)||We(i,t.prev,t))||Yc(i,t)&&We(i.prev,i,i.next)>0&&We(t.prev,t,t.next)>0)}function We(i,t,n){return(t.y-i.y)*(n.x-t.x)-(t.x-i.x)*(n.y-t.y)}function Yc(i,t){return i.x===t.x&&i.y===t.y}function f_(i,t,n,l){const o=Zm(We(i,t,n)),f=Zm(We(i,t,l)),d=Zm(We(n,l,i)),m=Zm(We(n,l,t));return!!(o!==f&&d!==m||o===0&&Qm(i,n,t)||f===0&&Qm(i,l,t)||d===0&&Qm(n,i,l)||m===0&&Qm(n,t,l))}function Qm(i,t,n){return t.x<=Math.max(i.x,n.x)&&t.x>=Math.min(i.x,n.x)&&t.y<=Math.max(i.y,n.y)&&t.y>=Math.min(i.y,n.y)}function Zm(i){return i>0?1:i<0?-1:0}function lC(i,t){let n=i;do{if(n.i!==i.i&&n.next.i!==i.i&&n.i!==t.i&&n.next.i!==t.i&&f_(n,n.next,i,t))return!0;n=n.next}while(n!==i);return!1}function kh(i,t){return We(i.prev,i,i.next)<0?We(i,t,i.next)>=0&&We(i,i.prev,t)>=0:We(i,t,i.prev)<0||We(i,i.next,t)<0}function sC(i,t){let n=i,l=!1;const o=(i.x+t.x)/2,f=(i.y+t.y)/2;do n.y>f!=n.next.y>f&&n.next.y!==n.y&&o<(n.next.x-n.x)*(f-n.y)/(n.next.y-n.y)+n.x&&(l=!l),n=n.next;while(n!==i);return l}function h_(i,t){const n=yg(i.i,i.x,i.y),l=yg(t.i,t.x,t.y),o=i.next,f=t.prev;return i.next=t,t.prev=i,n.next=o,o.prev=n,l.next=n,n.prev=l,f.next=l,l.prev=f,l}function Pv(i,t,n,l){const o=yg(i,t,n);return l?(o.next=l.next,o.prev=l,l.next.prev=o,l.next=o):(o.prev=o,o.next=o),o}function Jh(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function yg(i,t,n){return{i,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function uC(i,t,n,l){let o=0;for(let f=t,d=n-l;f<n;f+=l)o+=(i[d]-i[f])*(i[f+1]+i[d+1]),d=f;return o}const rC=Jv.default||Jv;var d_=(i=>(i[i.NONE=0]="NONE",i[i.COLOR=16384]="COLOR",i[i.STENCIL=1024]="STENCIL",i[i.DEPTH=256]="DEPTH",i[i.COLOR_DEPTH=16640]="COLOR_DEPTH",i[i.COLOR_STENCIL=17408]="COLOR_STENCIL",i[i.DEPTH_STENCIL=1280]="DEPTH_STENCIL",i[i.ALL=17664]="ALL",i))(d_||{});class oC{constructor(t){this.items=[],this._name=t}emit(t,n,l,o,f,d,m,g){const{name:v,items:_}=this;for(let b=0,C=_.length;b<C;b++)_[b][v](t,n,l,o,f,d,m,g);return this}add(t){return t[this._name]&&(this.remove(t),this.items.push(t)),this}remove(t){const n=this.items.indexOf(t);return n!==-1&&this.items.splice(n,1),this}contains(t){return this.items.indexOf(t)!==-1}removeAll(){return this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}}const cC=["init","destroy","contextChange","resolutionChange","resetState","renderEnd","renderStart","render","update","postrender","prerender"],m_=class p_ extends us{constructor(t){super(),this.tick=0,this.uid=rn("renderer"),this.runners=Object.create(null),this.renderPipes=Object.create(null),this._initOptions={},this._systemsHash=Object.create(null),this.type=t.type,this.name=t.name,this.config=t;const n=[...cC,...this.config.runners??[]];this._addRunners(...n),this._unsafeEvalCheck()}async init(t={}){const n=t.skipExtensionImports===!0?!0:t.manageImports===!1;await QE(n),this._addSystems(this.config.systems),this._addPipes(this.config.renderPipes,this.config.renderPipeAdaptors);for(const l in this._systemsHash)t={...this._systemsHash[l].constructor.defaultOptions,...t};t={...p_.defaultOptions,...t},this._roundPixels=t.roundPixels?1:0;for(let l=0;l<this.runners.init.items.length;l++)await this.runners.init.items[l].init(t);this._initOptions=t}render(t,n){this.tick++;let l=t;if(l instanceof da&&(l={container:l},n&&(he(un,"passing a second argument is deprecated, please use render options instead"),l.target=n.renderTexture)),l.target||(l.target=this.view.renderTarget),l.target===this.view.renderTarget&&(this._lastObjectRendered=l.container,l.clearColor??(l.clearColor=this.background.colorRgba),l.clear??(l.clear=this.background.clearBeforeRender)),l.clearColor){const o=Array.isArray(l.clearColor)&&l.clearColor.length===4;l.clearColor=o?l.clearColor:Mn.shared.setValue(l.clearColor).toArray()}l.transform||(l.container.updateLocalTransform(),l.transform=l.container.localTransform),l.container.visible&&(l.container.enableRenderGroup(),this.runners.prerender.emit(l),this.runners.renderStart.emit(l),this.runners.render.emit(l),this.runners.renderEnd.emit(l),this.runners.postrender.emit(l))}resize(t,n,l){const o=this.view.resolution;this.view.resize(t,n,l),this.emit("resize",this.view.screen.width,this.view.screen.height,this.view.resolution),l!==void 0&&l!==o&&this.runners.resolutionChange.emit(l)}clear(t={}){const n=this;t.target||(t.target=n.renderTarget.renderTarget),t.clearColor||(t.clearColor=this.background.colorRgba),t.clear??(t.clear=d_.ALL);const{clear:l,clearColor:o,target:f,mipLevel:d,layer:m}=t;Mn.shared.setValue(o??this.background.colorRgba),n.renderTarget.clear(f,l,Mn.shared.toArray(),d??0,m??0)}get resolution(){return this.view.resolution}set resolution(t){this.view.resolution=t,this.runners.resolutionChange.emit(t)}get width(){return this.view.texture.frame.width}get height(){return this.view.texture.frame.height}get canvas(){return this.view.canvas}get lastObjectRendered(){return this._lastObjectRendered}get renderingToScreen(){return this.renderTarget.renderingToScreen}get screen(){return this.view.screen}_addRunners(...t){t.forEach(n=>{this.runners[n]=new oC(n)})}_addSystems(t){let n;for(n in t){const l=t[n];this._addSystem(l.value,l.name)}}_addSystem(t,n){const l=new t(this);if(this[n])throw new Error(`Whoops! The name "${n}" is already in use`);this[n]=l,this._systemsHash[n]=l;for(const o in this.runners)this.runners[o].add(l);return this}_addPipes(t,n){const l=n.reduce((o,f)=>(o[f.name]=f.value,o),{});t.forEach(o=>{const f=o.value,d=o.name,m=l[d];this.renderPipes[d]=new f(this,m?new m:null),this.runners.destroy.add(this.renderPipes[d])})}destroy(t=!1){this.runners.destroy.items.reverse(),this.runners.destroy.emit(t),(t===!0||typeof t=="object"&&t.releaseGlobalResources)&&$h.release(),Object.values(this.runners).forEach(n=>{n.destroy()}),this._systemsHash=null,this.renderPipes=null,this.removeAllListeners()}generateTexture(t){return this.textureGenerator.generateTexture(t)}get roundPixels(){return!!this._roundPixels}_unsafeEvalCheck(){if(!ZE())throw new Error("Current environment does not allow unsafe-eval, please use pixi.js/unsafe-eval module to enable support.")}resetState(){this.runners.resetState.emit()}};m_.defaultOptions={resolution:1,failIfMajorPerformanceCaveat:!1,roundPixels:!1};let y_=m_,Km;function fC(i){return Km!==void 0||(Km=(()=>{var n;const t={stencil:!0,failIfMajorPerformanceCaveat:i??y_.defaultOptions.failIfMajorPerformanceCaveat};try{if(!hi.get().getWebGLRenderingContext())return!1;let o=hi.get().createCanvas().getContext("webgl",t);const f=!!((n=o==null?void 0:o.getContextAttributes())!=null&&n.stencil);if(o){const d=o.getExtension("WEBGL_lose_context");d&&d.loseContext()}return o=null,f}catch{return!1}})()),Km}let km;async function hC(i={}){return km!==void 0||(km=await(async()=>{const t=hi.get().getNavigator().gpu;if(!t)return!1;try{return await(await t.requestAdapter(i)).requestDevice(),!0}catch{return!1}})()),km}const Wv=["webgl","webgpu","canvas"];async function dC(i){let t=[];i.preference?(t.push(i.preference),Wv.forEach(f=>{f!==i.preference&&t.push(f)})):t=Wv.slice();let n,l={};for(let f=0;f<t.length;f++){const d=t[f];if(d==="webgpu"&&await hC()){const{WebGPURenderer:m}=await qh(async()=>{const{WebGPURenderer:g}=await import("./WebGPURenderer-BxaF3qLS.js");return{WebGPURenderer:g}},__vite__mapDeps([2,3,4]));n=m,l={...i,...i.webgpu};break}else if(d==="webgl"&&fC(i.failIfMajorPerformanceCaveat??y_.defaultOptions.failIfMajorPerformanceCaveat)){const{WebGLRenderer:m}=await qh(async()=>{const{WebGLRenderer:g}=await import("./WebGLRenderer-D5DPC49-.js");return{WebGLRenderer:g}},__vite__mapDeps([5,3,4]));n=m,l={...i,...i.webgl};break}else if(d==="canvas"){const{CanvasRenderer:m}=await qh(async()=>{const{CanvasRenderer:g}=await import("./CanvasRenderer-CXWPwY8u.js");return{CanvasRenderer:g}},__vite__mapDeps([6,4]));n=m,l={...i,...i.canvasOptions};break}}if(delete l.webgpu,delete l.webgl,delete l.canvasOptions,!n)throw new Error("No available renderer for the current environment");const o=new n;return await o.init(l),o}const g_="8.17.0";class v_{static init(){var t;(t=globalThis.__PIXI_APP_INIT__)==null||t.call(globalThis,this,g_)}static destroy(){}}v_.extension=Pt.Application;class mC{constructor(t){this._renderer=t}init(){var t;(t=globalThis.__PIXI_RENDERER_INIT__)==null||t.call(globalThis,this._renderer,g_)}destroy(){this._renderer=null}}mC.extension={type:[Pt.WebGLSystem,Pt.WebGPUSystem],name:"initHook",priority:-10};class x_{static init(t){Object.defineProperty(this,"resizeTo",{configurable:!0,set(n){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=n,n&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this._cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this._cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this._cancelResize();let n,l;if(this._resizeTo===globalThis.window)n=globalThis.innerWidth,l=globalThis.innerHeight;else{const{clientWidth:o,clientHeight:f}=this._resizeTo;n=o,l=f}this.renderer.resize(n,l),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this._cancelResize(),this._cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}}x_.extension=Pt.Application;class __{static init(t){t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{configurable:!0,set(n){this._ticker&&this._ticker.remove(this.render,this),this._ticker=n,n&&n.add(this.render,this,rp.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Nc.shared:new Nc,t.autoStart&&this.start()}static destroy(){if(this._ticker){const t=this._ticker;this.ticker=null,t.destroy()}}}__.extension=Pt.Application;Fe.add(x_);Fe.add(__);const S_=class gg{constructor(...t){this.stage=new da,t[0]!==void 0&&he(un,"Application constructor options are deprecated, please use Application.init() instead.")}async init(t){t={...t},this.stage||(this.stage=new da),this.renderer=await dC(t),gg._plugins.forEach(n=>{n.init.call(this,t)})}render(){this.renderer.render({container:this.stage})}get canvas(){return this.renderer.canvas}get view(){return he(un,"Application.view is deprecated, please use Application.canvas instead."),this.renderer.canvas}get screen(){return this.renderer.screen}destroy(t=!1,n=!1){const l=gg._plugins.slice(0);l.reverse(),l.forEach(o=>{o.destroy.call(this)}),this.stage.destroy(n),this.stage=null,this.renderer.destroy(t),this.renderer=null}};S_._plugins=[];let Xg=S_;Fe.handleByList(Pt.Application,Xg._plugins);Fe.add(v_);var Yy,Fv;function pC(){if(Fv)return Yy;Fv=1,Yy=n;var i={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},t=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function n(f){var d=[];return f.replace(t,function(m,g,v){var _=g.toLowerCase();for(v=o(v),_=="m"&&v.length>2&&(d.push([g].concat(v.splice(0,2))),_="l",g=g=="m"?"l":"L");;){if(v.length==i[_])return v.unshift(g),d.push(v);if(v.length<i[_])throw new Error("malformed path data");d.push([g].concat(v.splice(0,i[_])))}}),d}var l=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/ig;function o(f){var d=f.match(l);return d?d.map(Number):[]}return Yy}var yC=pC();const gC=mp(yC);function vC(i,t){const n=gC(i),l=[];let o=null,f=0,d=0;for(let m=0;m<n.length;m++){const g=n[m],v=g[0],_=g;switch(v){case"M":f=_[1],d=_[2],t.moveTo(f,d);break;case"m":f+=_[1],d+=_[2],t.moveTo(f,d);break;case"H":f=_[1],t.lineTo(f,d);break;case"h":f+=_[1],t.lineTo(f,d);break;case"V":d=_[1],t.lineTo(f,d);break;case"v":d+=_[1],t.lineTo(f,d);break;case"L":f=_[1],d=_[2],t.lineTo(f,d);break;case"l":f+=_[1],d+=_[2],t.lineTo(f,d);break;case"C":f=_[5],d=_[6],t.bezierCurveTo(_[1],_[2],_[3],_[4],f,d);break;case"c":t.bezierCurveTo(f+_[1],d+_[2],f+_[3],d+_[4],f+_[5],d+_[6]),f+=_[5],d+=_[6];break;case"S":f=_[3],d=_[4],t.bezierCurveToShort(_[1],_[2],f,d);break;case"s":t.bezierCurveToShort(f+_[1],d+_[2],f+_[3],d+_[4]),f+=_[3],d+=_[4];break;case"Q":f=_[3],d=_[4],t.quadraticCurveTo(_[1],_[2],f,d);break;case"q":t.quadraticCurveTo(f+_[1],d+_[2],f+_[3],d+_[4]),f+=_[3],d+=_[4];break;case"T":f=_[1],d=_[2],t.quadraticCurveToShort(f,d);break;case"t":f+=_[1],d+=_[2],t.quadraticCurveToShort(f,d);break;case"A":f=_[6],d=_[7],t.arcToSvg(_[1],_[2],_[3],_[4],_[5],f,d);break;case"a":f+=_[6],d+=_[7],t.arcToSvg(_[1],_[2],_[3],_[4],_[5],f,d);break;case"Z":case"z":t.closePath(),l.length>0&&(o=l.pop(),o?(f=o.startX,d=o.startY):(f=0,d=0)),o=null;break;default:Ha(`Unknown SVG path command: ${v}`)}v!=="Z"&&v!=="z"&&o===null&&(o={startX:f,startY:d},l.push(o))}return t}class Vg{constructor(t=0,n=0,l=0){this.type="circle",this.x=t,this.y=n,this.radius=l}clone(){return new Vg(this.x,this.y,this.radius)}contains(t,n){if(this.radius<=0)return!1;const l=this.radius*this.radius;let o=this.x-t,f=this.y-n;return o*=o,f*=f,o+f<=l}strokeContains(t,n,l,o=.5){if(this.radius===0)return!1;const f=this.x-t,d=this.y-n,m=this.radius,g=(1-o)*l,v=Math.sqrt(f*f+d*d);return v<=m+g&&v>m-(l-g)}getBounds(t){return t||(t=new dn),t.x=this.x-this.radius,t.y=this.y-this.radius,t.width=this.radius*2,t.height=this.radius*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.radius=t.radius,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}}class Qg{constructor(t=0,n=0,l=0,o=0){this.type="ellipse",this.x=t,this.y=n,this.halfWidth=l,this.halfHeight=o}clone(){return new Qg(this.x,this.y,this.halfWidth,this.halfHeight)}contains(t,n){if(this.halfWidth<=0||this.halfHeight<=0)return!1;let l=(t-this.x)/this.halfWidth,o=(n-this.y)/this.halfHeight;return l*=l,o*=o,l+o<=1}strokeContains(t,n,l,o=.5){const{halfWidth:f,halfHeight:d}=this;if(f<=0||d<=0)return!1;const m=l*(1-o),g=l-m,v=f-g,_=d-g,b=f+m,C=d+m,E=t-this.x,M=n-this.y,R=E*E/(v*v)+M*M/(_*_),z=E*E/(b*b)+M*M/(C*C);return R>1&&z<=1}getBounds(t){return t||(t=new dn),t.x=this.x-this.halfWidth,t.y=this.y-this.halfHeight,t.width=this.halfWidth*2,t.height=this.halfHeight*2,t}copyFrom(t){return this.x=t.x,this.y=t.y,this.halfWidth=t.halfWidth,this.halfHeight=t.halfHeight,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:Ellipse x=${this.x} y=${this.y} halfWidth=${this.halfWidth} halfHeight=${this.halfHeight}]`}}function xC(i,t,n,l,o,f){const d=i-n,m=t-l,g=o-n,v=f-l,_=d*g+m*v,b=g*g+v*v;let C=-1;b!==0&&(C=_/b);let E,M;C<0?(E=n,M=l):C>1?(E=o,M=f):(E=n+C*g,M=l+C*v);const R=i-E,z=t-M;return R*R+z*z}let _C,SC;class Lh{constructor(...t){this.type="polygon";let n=Array.isArray(t[0])?t[0]:t;if(typeof n[0]!="number"){const l=[];for(let o=0,f=n.length;o<f;o++)l.push(n[o].x,n[o].y);n=l}this.points=n,this.closePath=!0}isClockwise(){let t=0;const n=this.points,l=n.length;for(let o=0;o<l;o+=2){const f=n[o],d=n[o+1],m=n[(o+2)%l],g=n[(o+3)%l];t+=(m-f)*(g+d)}return t<0}containsPolygon(t){const n=this.getBounds(_C),l=t.getBounds(SC);if(!n.containsRect(l))return!1;const o=t.points;for(let f=0;f<o.length;f+=2){const d=o[f],m=o[f+1];if(!this.contains(d,m))return!1}return!0}clone(){const t=this.points.slice(),n=new Lh(t);return n.closePath=this.closePath,n}contains(t,n){let l=!1;const o=this.points.length/2;for(let f=0,d=o-1;f<o;d=f++){const m=this.points[f*2],g=this.points[f*2+1],v=this.points[d*2],_=this.points[d*2+1];g>n!=_>n&&t<(v-m)*((n-g)/(_-g))+m&&(l=!l)}return l}strokeContains(t,n,l,o=.5){const f=l*l,d=f*(1-o),m=f-d,{points:g}=this,v=g.length-(this.closePath?0:2);for(let _=0;_<v;_+=2){const b=g[_],C=g[_+1],E=g[(_+2)%g.length],M=g[(_+3)%g.length],R=xC(t,n,b,C,E,M),z=Math.sign((E-b)*(n-C)-(M-C)*(t-b));if(R<=(z<0?m:d))return!0}return!1}getBounds(t){t||(t=new dn);const n=this.points;let l=1/0,o=-1/0,f=1/0,d=-1/0;for(let m=0,g=n.length;m<g;m+=2){const v=n[m],_=n[m+1];l=v<l?v:l,o=v>o?v:o,f=_<f?_:f,d=_>d?_:d}return t.x=l,t.width=o-l,t.y=f,t.height=d-f,t}copyFrom(t){return this.points=t.points.slice(),this.closePath=t.closePath,this}copyTo(t){return t.copyFrom(this),t}toString(){return`[pixi.js/math:PolygoncloseStroke=${this.closePath}points=${this.points.reduce((t,n)=>`${t}, ${n}`,"")}]`}get lastX(){return this.points[this.points.length-2]}get lastY(){return this.points[this.points.length-1]}get x(){return he("8.11.0","Polygon.lastX is deprecated, please use Polygon.lastX instead."),this.points[this.points.length-2]}get y(){return he("8.11.0","Polygon.y is deprecated, please use Polygon.lastY instead."),this.points[this.points.length-1]}get startX(){return this.points[0]}get startY(){return this.points[1]}}const Jm=(i,t,n,l,o,f,d)=>{const m=i-n,g=t-l,v=Math.sqrt(m*m+g*g);return v>=o-f&&v<=o+d};class Zg{constructor(t=0,n=0,l=0,o=0,f=20){this.type="roundedRectangle",this.x=t,this.y=n,this.width=l,this.height=o,this.radius=f}getBounds(t){return t||(t=new dn),t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t}clone(){return new Zg(this.x,this.y,this.width,this.height,this.radius)}copyFrom(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this}copyTo(t){return t.copyFrom(this),t}contains(t,n){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&n>=this.y&&n<=this.y+this.height){const l=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(n>=this.y+l&&n<=this.y+this.height-l||t>=this.x+l&&t<=this.x+this.width-l)return!0;let o=t-(this.x+l),f=n-(this.y+l);const d=l*l;if(o*o+f*f<=d||(o=t-(this.x+this.width-l),o*o+f*f<=d)||(f=n-(this.y+this.height-l),o*o+f*f<=d)||(o=t-(this.x+l),o*o+f*f<=d))return!0}return!1}strokeContains(t,n,l,o=.5){const{x:f,y:d,width:m,height:g,radius:v}=this,_=l*(1-o),b=l-_,C=f+v,E=d+v,M=m-v*2,R=g-v*2,z=f+m,O=d+g;return(t>=f-_&&t<=f+b||t>=z-b&&t<=z+_)&&n>=E&&n<=E+R||(n>=d-_&&n<=d+b||n>=O-b&&n<=O+_)&&t>=C&&t<=C+M?!0:t<C&&n<E&&Jm(t,n,C,E,v,b,_)||t>z-v&&n<E&&Jm(t,n,z-v,E,v,b,_)||t>z-v&&n>O-v&&Jm(t,n,z-v,O-v,v,b,_)||t<C&&n>O-v&&Jm(t,n,C,O-v,v,b,_)}toString(){return`[pixi.js/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}}const b_={};function bC(i,t,n){let l=2166136261;for(let o=0;o<t;o++)l^=i[o].uid,l=Math.imul(l,16777619),l>>>=0;return b_[l]||TC(i,t,l,n)}function TC(i,t,n,l){const o={};let f=0;for(let m=0;m<l;m++){const g=m<t?i[m]:Re.EMPTY.source;o[f++]=g.source,o[f++]=g.style}const d=new lp(o);return b_[n]=d,d}class Iv{constructor(t){typeof t=="number"?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData),this.size=this.rawBinaryData.byteLength}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}get float64View(){return this._float64Array||(this._float64Array=new Float64Array(this.rawBinaryData)),this._float64Array}get bigUint64View(){return this._bigUint64Array||(this._bigUint64Array=new BigUint64Array(this.rawBinaryData)),this._bigUint64Array}view(t){return this[`${t}View`]}destroy(){this.rawBinaryData=null,this.uint32View=null,this.float32View=null,this.uint16View=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._int32View=null,this._float64Array=null,this._bigUint64Array=null}static sizeOf(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${t} isn't a valid view type`)}}}function $v(i,t,n,l){if(n??(n=0),l??(l=Math.min(i.byteLength-n,t.byteLength)),!(n&7)&&!(l&7)){const o=l/8;new Float64Array(t,0,o).set(new Float64Array(i,n,o))}else if(!(n&3)&&!(l&3)){const o=l/4;new Float32Array(t,0,o).set(new Float32Array(i,n,o))}else new Uint8Array(t).set(new Uint8Array(i,n,l))}const EC={normal:"normal-npm",add:"add-npm",screen:"screen-npm"};var CC=(i=>(i[i.DISABLED=0]="DISABLED",i[i.RENDERING_MASK_ADD=1]="RENDERING_MASK_ADD",i[i.MASK_ACTIVE=2]="MASK_ACTIVE",i[i.INVERSE_MASK_ACTIVE=3]="INVERSE_MASK_ACTIVE",i[i.RENDERING_MASK_REMOVE=4]="RENDERING_MASK_REMOVE",i[i.NONE=5]="NONE",i))(CC||{});function t1(i,t){return t.alphaMode==="no-premultiply-alpha"&&EC[i]||i}const AC=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
83
|
+
`);function MC(i){let t="";for(let n=0;n<i;++n)n>0&&(t+=`
|
|
84
|
+
else `),n<i-1&&(t+=`if(test == ${n}.0){}`);return t}function RC(i,t){if(i===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");const n=t.createShader(t.FRAGMENT_SHADER);try{for(;;){const l=AC.replace(/%forloop%/gi,MC(i));if(t.shaderSource(n,l),t.compileShader(n),!t.getShaderParameter(n,t.COMPILE_STATUS))i=i/2|0;else break}}finally{t.deleteShader(n)}return i}let Ec=null;function zC(){var t;if(Ec)return Ec;const i=e_();return Ec=i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS),Ec=RC(Ec,i),(t=i.getExtension("WEBGL_lose_context"))==null||t.loseContext(),Ec}class DC{constructor(){this.ids=Object.create(null),this.textures=[],this.count=0}clear(){for(let t=0;t<this.count;t++){const n=this.textures[t];this.textures[t]=null,this.ids[n.uid]=null}this.count=0}}class OC{constructor(){this.renderPipeId="batch",this.action="startBatch",this.start=0,this.size=0,this.textures=new DC,this.blendMode="normal",this.topology="triangle-strip",this.canBundle=!0}destroy(){this.textures=null,this.gpuBindGroup=null,this.bindGroup=null,this.batcher=null,this.elements=null}}const Xh=[];let op=0;$h.register({clear:()=>{if(Xh.length>0)for(const i of Xh)i&&i.destroy();Xh.length=0,op=0}});function e1(){return op>0?Xh[--op]:new OC}function n1(i){i.elements=null,Xh[op++]=i}let Oh=0;const T_=class E_{constructor(t){this.uid=rn("batcher"),this.dirty=!0,this.batchIndex=0,this.batches=[],this._elements=[],t={...E_.defaultOptions,...t},t.maxTextures||(he("v8.8.0","maxTextures is a required option for Batcher now, please pass it in the options"),t.maxTextures=zC());const{maxTextures:n,attributesInitialSize:l,indicesInitialSize:o}=t;this.attributeBuffer=new Iv(l*4),this.indexBuffer=new Uint16Array(o),this.maxTextures=n}begin(){this.elementSize=0,this.elementStart=0,this.indexSize=0,this.attributeSize=0;for(let t=0;t<this.batchIndex;t++)n1(this.batches[t]);this.batchIndex=0,this._batchIndexStart=0,this._batchIndexSize=0,this.dirty=!0}add(t){this._elements[this.elementSize++]=t,t._indexStart=this.indexSize,t._attributeStart=this.attributeSize,t._batcher=this,this.indexSize+=t.indexSize,this.attributeSize+=t.attributeSize*this.vertexSize}checkAndUpdateTexture(t,n){const l=t._batch.textures.ids[n._source.uid];return!l&&l!==0?!1:(t._textureId=l,t.texture=n,!0)}updateElement(t){this.dirty=!0;const n=this.attributeBuffer;t.packAsQuad?this.packQuadAttributes(t,n.float32View,n.uint32View,t._attributeStart,t._textureId):this.packAttributes(t,n.float32View,n.uint32View,t._attributeStart,t._textureId)}break(t){const n=this._elements;if(!n[this.elementStart])return;let l=e1(),o=l.textures;o.clear();const f=n[this.elementStart];let d=t1(f.blendMode,f.texture._source),m=f.topology;this.attributeSize*4>this.attributeBuffer.size&&this._resizeAttributeBuffer(this.attributeSize*4),this.indexSize>this.indexBuffer.length&&this._resizeIndexBuffer(this.indexSize);const g=this.attributeBuffer.float32View,v=this.attributeBuffer.uint32View,_=this.indexBuffer;let b=this._batchIndexSize,C=this._batchIndexStart,E="startBatch",M=[];const R=this.maxTextures;for(let z=this.elementStart;z<this.elementSize;++z){const O=n[z];n[z]=null;const U=O.texture._source,G=t1(O.blendMode,U),Z=d!==G||m!==O.topology;if(U._batchTick===Oh&&!Z){O._textureId=U._textureBindLocation,b+=O.indexSize,O.packAsQuad?(this.packQuadAttributes(O,g,v,O._attributeStart,O._textureId),this.packQuadIndex(_,O._indexStart,O._attributeStart/this.vertexSize)):(this.packAttributes(O,g,v,O._attributeStart,O._textureId),this.packIndex(O,_,O._indexStart,O._attributeStart/this.vertexSize)),O._batch=l,M.push(O);continue}U._batchTick=Oh,(o.count>=R||Z)&&(this._finishBatch(l,C,b-C,o,d,m,t,E,M),E="renderBatch",C=b,d=G,m=O.topology,l=e1(),o=l.textures,o.clear(),M=[],++Oh),O._textureId=U._textureBindLocation=o.count,o.ids[U.uid]=o.count,o.textures[o.count++]=U,O._batch=l,M.push(O),b+=O.indexSize,O.packAsQuad?(this.packQuadAttributes(O,g,v,O._attributeStart,O._textureId),this.packQuadIndex(_,O._indexStart,O._attributeStart/this.vertexSize)):(this.packAttributes(O,g,v,O._attributeStart,O._textureId),this.packIndex(O,_,O._indexStart,O._attributeStart/this.vertexSize))}o.count>0&&(this._finishBatch(l,C,b-C,o,d,m,t,E,M),C=b,++Oh),this.elementStart=this.elementSize,this._batchIndexStart=C,this._batchIndexSize=b}_finishBatch(t,n,l,o,f,d,m,g,v){t.gpuBindGroup=null,t.bindGroup=null,t.action=g,t.batcher=this,t.textures=o,t.blendMode=f,t.topology=d,t.start=n,t.size=l,t.elements=v,++Oh,this.batches[this.batchIndex++]=t,m.add(t)}finish(t){this.break(t)}ensureAttributeBuffer(t){t*4<=this.attributeBuffer.size||this._resizeAttributeBuffer(t*4)}ensureIndexBuffer(t){t<=this.indexBuffer.length||this._resizeIndexBuffer(t)}_resizeAttributeBuffer(t){const n=Math.max(t,this.attributeBuffer.size*2),l=new Iv(n);$v(this.attributeBuffer.rawBinaryData,l.rawBinaryData),this.attributeBuffer=l}_resizeIndexBuffer(t){const n=this.indexBuffer;let l=Math.max(t,n.length*1.5);l+=l%2;const o=l>65535?new Uint32Array(l):new Uint16Array(l);if(o.BYTES_PER_ELEMENT!==n.BYTES_PER_ELEMENT)for(let f=0;f<n.length;f++)o[f]=n[f];else $v(n.buffer,o.buffer);this.indexBuffer=o}packQuadIndex(t,n,l){t[n]=l+0,t[n+1]=l+1,t[n+2]=l+2,t[n+3]=l+0,t[n+4]=l+2,t[n+5]=l+3}packIndex(t,n,l,o){const f=t.indices,d=t.indexSize,m=t.indexOffset,g=t.attributeOffset;for(let v=0;v<d;v++)n[l++]=o+f[v+m]-g}destroy(t={}){var n;if(this.batches!==null){for(let l=0;l<this.batchIndex;l++)n1(this.batches[l]);this.batches=null,this.geometry.destroy(!0),this.geometry=null,t.shader&&((n=this.shader)==null||n.destroy(),this.shader=null);for(let l=0;l<this._elements.length;l++)this._elements[l]&&(this._elements[l]._batch=null);this._elements=null,this.indexBuffer=null,this.attributeBuffer.destroy(),this.attributeBuffer=null}}};T_.defaultOptions={maxTextures:null,attributesInitialSize:4,indicesInitialSize:6};let NC=T_;var Pa=(i=>(i[i.MAP_READ=1]="MAP_READ",i[i.MAP_WRITE=2]="MAP_WRITE",i[i.COPY_SRC=4]="COPY_SRC",i[i.COPY_DST=8]="COPY_DST",i[i.INDEX=16]="INDEX",i[i.VERTEX=32]="VERTEX",i[i.UNIFORM=64]="UNIFORM",i[i.STORAGE=128]="STORAGE",i[i.INDIRECT=256]="INDIRECT",i[i.QUERY_RESOLVE=512]="QUERY_RESOLVE",i[i.STATIC=1024]="STATIC",i))(Pa||{});class Ph extends us{constructor(t){let{data:n,size:l}=t;const{usage:o,label:f,shrinkToFit:d}=t;super(),this._gpuData=Object.create(null),this._gcLastUsed=-1,this.autoGarbageCollect=!0,this.uid=rn("buffer"),this._resourceType="buffer",this._resourceId=rn("resource"),this._touched=0,this._updateID=1,this._dataInt32=null,this.shrinkToFit=!0,this.destroyed=!1,n instanceof Array&&(n=new Float32Array(n)),this._data=n,l??(l=n==null?void 0:n.byteLength);const m=!!n;this.descriptor={size:l,usage:o,mappedAtCreation:m,label:f},this.shrinkToFit=d??!0}get data(){return this._data}set data(t){this.setDataWithSize(t,t.length,!0)}get dataInt32(){return this._dataInt32||(this._dataInt32=new Int32Array(this.data.buffer)),this._dataInt32}get static(){return!!(this.descriptor.usage&Pa.STATIC)}set static(t){t?this.descriptor.usage|=Pa.STATIC:this.descriptor.usage&=~Pa.STATIC}setDataWithSize(t,n,l){if(this._updateID++,this._updateSize=n*t.BYTES_PER_ELEMENT,this._data===t){l&&this.emit("update",this);return}const o=this._data;if(this._data=t,this._dataInt32=null,!o||o.length!==t.length){!this.shrinkToFit&&o&&t.byteLength<o.byteLength?l&&this.emit("update",this):(this.descriptor.size=t.byteLength,this._resourceId=rn("resource"),this.emit("change",this));return}l&&this.emit("update",this)}update(t){this._updateSize=t??this._updateSize,this._updateID++,this.emit("update",this)}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(){this.destroyed=!0,this.unload(),this.emit("destroy",this),this.emit("change",this),this._data=null,this.descriptor=null,this.removeAllListeners()}}function C_(i,t){if(!(i instanceof Ph)){let n=t?Pa.INDEX:Pa.VERTEX;i instanceof Array&&(t?(i=new Uint32Array(i),n=Pa.INDEX|Pa.COPY_DST):(i=new Float32Array(i),n=Pa.VERTEX|Pa.COPY_DST)),i=new Ph({data:i,label:t?"index-mesh-buffer":"vertex-mesh-buffer",usage:n})}return i}function UC(i,t,n){const l=i.getAttribute(t);if(!l)return n.minX=0,n.minY=0,n.maxX=0,n.maxY=0,n;const o=l.buffer.data;let f=1/0,d=1/0,m=-1/0,g=-1/0;const v=o.BYTES_PER_ELEMENT,_=(l.offset||0)/v,b=(l.stride||8)/v;for(let C=_;C<o.length;C+=b){const E=o[C],M=o[C+1];E>m&&(m=E),M>g&&(g=M),E<f&&(f=E),M<d&&(d=M)}return n.minX=f,n.minY=d,n.maxX=m,n.maxY=g,n}function BC(i){return(i instanceof Ph||Array.isArray(i)||i.BYTES_PER_ELEMENT)&&(i={buffer:i}),i.buffer=C_(i.buffer,!1),i}class wC extends us{constructor(t={}){super(),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=rn("geometry"),this._layoutKey=0,this.instanceCount=1,this._bounds=new Vi,this._boundsDirty=!0;const{attributes:n,indexBuffer:l,topology:o}=t;if(this.buffers=[],this.attributes={},n)for(const f in n)this.addAttribute(f,n[f]);this.instanceCount=t.instanceCount??1,l&&this.addIndex(l),this.topology=o||"triangle-list"}onBufferUpdate(){this._boundsDirty=!0,this.emit("update",this)}getAttribute(t){return this.attributes[t]}getIndex(){return this.indexBuffer}getBuffer(t){return this.getAttribute(t).buffer}getSize(){for(const t in this.attributes){const n=this.attributes[t];return n.buffer.data.length/(n.stride/4||n.size)}return 0}addAttribute(t,n){const l=BC(n);this.buffers.indexOf(l.buffer)===-1&&(this.buffers.push(l.buffer),l.buffer.on("update",this.onBufferUpdate,this),l.buffer.on("change",this.onBufferUpdate,this)),this.attributes[t]=l}addIndex(t){this.indexBuffer=C_(t,!0),this.buffers.push(this.indexBuffer)}get bounds(){return this._boundsDirty?(this._boundsDirty=!1,UC(this,"aPosition",this._bounds)):this._bounds}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){var n;this.emit("destroy",this),this.removeAllListeners(),t&&this.buffers.forEach(l=>l.destroy()),this.unload(),(n=this.indexBuffer)==null||n.destroy(),this.attributes=null,this.buffers=null,this.indexBuffer=null,this._bounds=null}}const HC=new Float32Array(1),GC=new Uint32Array(1);class jC extends wC{constructor(){const n=new Ph({data:HC,label:"attribute-batch-buffer",usage:Pa.VERTEX|Pa.COPY_DST,shrinkToFit:!1}),l=new Ph({data:GC,label:"index-batch-buffer",usage:Pa.INDEX|Pa.COPY_DST,shrinkToFit:!1}),o=24;super({attributes:{aPosition:{buffer:n,format:"float32x2",stride:o,offset:0},aUV:{buffer:n,format:"float32x2",stride:o,offset:8},aColor:{buffer:n,format:"unorm8x4",stride:o,offset:16},aTextureIdAndRound:{buffer:n,format:"uint16x2",stride:o,offset:20}},indexBuffer:l})}}function a1(i,t,n){if(i)for(const l in i){const o=l.toLocaleLowerCase(),f=t[o];if(f){let d=i[l];l==="header"&&(d=d.replace(/@in\s+[^;]+;\s*/g,"").replace(/@out\s+[^;]+;\s*/g,"")),n&&f.push(`//----${n}----//`),f.push(d)}else Ha(`${l} placement hook does not exist in shader`)}}const qC=/\{\{(.*?)\}\}/g;function i1(i){var l;const t={};return(((l=i.match(qC))==null?void 0:l.map(o=>o.replace(/[{()}]/g,"")))??[]).forEach(o=>{t[o]=[]}),t}function l1(i,t){let n;const l=/@in\s+([^;]+);/g;for(;(n=l.exec(i))!==null;)t.push(n[1])}function s1(i,t,n=!1){const l=[];l1(t,l),i.forEach(m=>{m.header&&l1(m.header,l)});const o=l;n&&o.sort();const f=o.map((m,g)=>` @location(${g}) ${m},`).join(`
|
|
85
|
+
`);let d=t.replace(/@in\s+[^;]+;\s*/g,"");return d=d.replace("{{in}}",`
|
|
86
|
+
${f}
|
|
87
|
+
`),d}function u1(i,t){let n;const l=/@out\s+([^;]+);/g;for(;(n=l.exec(i))!==null;)t.push(n[1])}function YC(i){const n=/\b(\w+)\s*:/g.exec(i);return n?n[1]:""}function LC(i){const t=/@.*?\s+/g;return i.replace(t,"")}function XC(i,t){const n=[];u1(t,n),i.forEach(g=>{g.header&&u1(g.header,n)});let l=0;const o=n.sort().map(g=>g.indexOf("builtin")>-1?g:`@location(${l++}) ${g}`).join(`,
|
|
88
|
+
`),f=n.sort().map(g=>` var ${LC(g)};`).join(`
|
|
89
|
+
`),d=`return VSOutput(
|
|
90
|
+
${n.sort().map(g=>` ${YC(g)}`).join(`,
|
|
91
|
+
`)});`;let m=t.replace(/@out\s+[^;]+;\s*/g,"");return m=m.replace("{{struct}}",`
|
|
92
|
+
${o}
|
|
93
|
+
`),m=m.replace("{{start}}",`
|
|
94
|
+
${f}
|
|
95
|
+
`),m=m.replace("{{return}}",`
|
|
96
|
+
${d}
|
|
97
|
+
`),m}function r1(i,t){let n=i;for(const l in t){const o=t[l];o.join(`
|
|
98
|
+
`).length?n=n.replace(`{{${l}}}`,`//-----${l} START-----//
|
|
99
|
+
${o.join(`
|
|
100
|
+
`)}
|
|
101
|
+
//----${l} FINISH----//`):n=n.replace(`{{${l}}}`,"")}return n}const Qu=Object.create(null),Ly=new Map;let VC=0;function QC({template:i,bits:t}){const n=A_(i,t);if(Qu[n])return Qu[n];const{vertex:l,fragment:o}=KC(i,t);return Qu[n]=M_(l,o,t),Qu[n]}function ZC({template:i,bits:t}){const n=A_(i,t);return Qu[n]||(Qu[n]=M_(i.vertex,i.fragment,t)),Qu[n]}function KC(i,t){const n=t.map(d=>d.vertex).filter(d=>!!d),l=t.map(d=>d.fragment).filter(d=>!!d);let o=s1(n,i.vertex,!0);o=XC(n,o);const f=s1(l,i.fragment,!0);return{vertex:o,fragment:f}}function A_(i,t){return t.map(n=>(Ly.has(n)||Ly.set(n,VC++),Ly.get(n))).sort((n,l)=>n-l).join("-")+i.vertex+i.fragment}function M_(i,t,n){const l=i1(i),o=i1(t);return n.forEach(f=>{a1(f.vertex,l,f.name),a1(f.fragment,o,f.name)}),{vertex:r1(i,l),fragment:r1(t,o)}}const kC=`
|
|
102
|
+
@in aPosition: vec2<f32>;
|
|
103
|
+
@in aUV: vec2<f32>;
|
|
104
|
+
|
|
105
|
+
@out @builtin(position) vPosition: vec4<f32>;
|
|
106
|
+
@out vUV : vec2<f32>;
|
|
107
|
+
@out vColor : vec4<f32>;
|
|
108
|
+
|
|
109
|
+
{{header}}
|
|
110
|
+
|
|
111
|
+
struct VSOutput {
|
|
112
|
+
{{struct}}
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
@vertex
|
|
116
|
+
fn main( {{in}} ) -> VSOutput {
|
|
117
|
+
|
|
118
|
+
var worldTransformMatrix = globalUniforms.uWorldTransformMatrix;
|
|
119
|
+
var modelMatrix = mat3x3<f32>(
|
|
120
|
+
1.0, 0.0, 0.0,
|
|
121
|
+
0.0, 1.0, 0.0,
|
|
122
|
+
0.0, 0.0, 1.0
|
|
123
|
+
);
|
|
124
|
+
var position = aPosition;
|
|
125
|
+
var uv = aUV;
|
|
126
|
+
|
|
127
|
+
{{start}}
|
|
128
|
+
|
|
129
|
+
vColor = vec4<f32>(1., 1., 1., 1.);
|
|
130
|
+
|
|
131
|
+
{{main}}
|
|
132
|
+
|
|
133
|
+
vUV = uv;
|
|
134
|
+
|
|
135
|
+
var modelViewProjectionMatrix = globalUniforms.uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
|
136
|
+
|
|
137
|
+
vPosition = vec4<f32>((modelViewProjectionMatrix * vec3<f32>(position, 1.0)).xy, 0.0, 1.0);
|
|
138
|
+
|
|
139
|
+
vColor *= globalUniforms.uWorldColorAlpha;
|
|
140
|
+
|
|
141
|
+
{{end}}
|
|
142
|
+
|
|
143
|
+
{{return}}
|
|
144
|
+
};
|
|
145
|
+
`,JC=`
|
|
146
|
+
@in vUV : vec2<f32>;
|
|
147
|
+
@in vColor : vec4<f32>;
|
|
148
|
+
|
|
149
|
+
{{header}}
|
|
150
|
+
|
|
151
|
+
@fragment
|
|
152
|
+
fn main(
|
|
153
|
+
{{in}}
|
|
154
|
+
) -> @location(0) vec4<f32> {
|
|
155
|
+
|
|
156
|
+
{{start}}
|
|
157
|
+
|
|
158
|
+
var outColor:vec4<f32>;
|
|
159
|
+
|
|
160
|
+
{{main}}
|
|
161
|
+
|
|
162
|
+
var finalColor:vec4<f32> = outColor * vColor;
|
|
163
|
+
|
|
164
|
+
{{end}}
|
|
165
|
+
|
|
166
|
+
return finalColor;
|
|
167
|
+
};
|
|
168
|
+
`,PC=`
|
|
169
|
+
in vec2 aPosition;
|
|
170
|
+
in vec2 aUV;
|
|
171
|
+
|
|
172
|
+
out vec4 vColor;
|
|
173
|
+
out vec2 vUV;
|
|
174
|
+
|
|
175
|
+
{{header}}
|
|
176
|
+
|
|
177
|
+
void main(void){
|
|
178
|
+
|
|
179
|
+
mat3 worldTransformMatrix = uWorldTransformMatrix;
|
|
180
|
+
mat3 modelMatrix = mat3(
|
|
181
|
+
1.0, 0.0, 0.0,
|
|
182
|
+
0.0, 1.0, 0.0,
|
|
183
|
+
0.0, 0.0, 1.0
|
|
184
|
+
);
|
|
185
|
+
vec2 position = aPosition;
|
|
186
|
+
vec2 uv = aUV;
|
|
187
|
+
|
|
188
|
+
{{start}}
|
|
189
|
+
|
|
190
|
+
vColor = vec4(1.);
|
|
191
|
+
|
|
192
|
+
{{main}}
|
|
193
|
+
|
|
194
|
+
vUV = uv;
|
|
195
|
+
|
|
196
|
+
mat3 modelViewProjectionMatrix = uProjectionMatrix * worldTransformMatrix * modelMatrix;
|
|
197
|
+
|
|
198
|
+
gl_Position = vec4((modelViewProjectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
199
|
+
|
|
200
|
+
vColor *= uWorldColorAlpha;
|
|
201
|
+
|
|
202
|
+
{{end}}
|
|
203
|
+
}
|
|
204
|
+
`,WC=`
|
|
205
|
+
|
|
206
|
+
in vec4 vColor;
|
|
207
|
+
in vec2 vUV;
|
|
208
|
+
|
|
209
|
+
out vec4 finalColor;
|
|
210
|
+
|
|
211
|
+
{{header}}
|
|
212
|
+
|
|
213
|
+
void main(void) {
|
|
214
|
+
|
|
215
|
+
{{start}}
|
|
216
|
+
|
|
217
|
+
vec4 outColor;
|
|
218
|
+
|
|
219
|
+
{{main}}
|
|
220
|
+
|
|
221
|
+
finalColor = outColor * vColor;
|
|
222
|
+
|
|
223
|
+
{{end}}
|
|
224
|
+
}
|
|
225
|
+
`,FC={name:"global-uniforms-bit",vertex:{header:`
|
|
226
|
+
struct GlobalUniforms {
|
|
227
|
+
uProjectionMatrix:mat3x3<f32>,
|
|
228
|
+
uWorldTransformMatrix:mat3x3<f32>,
|
|
229
|
+
uWorldColorAlpha: vec4<f32>,
|
|
230
|
+
uResolution: vec2<f32>,
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@group(0) @binding(0) var<uniform> globalUniforms : GlobalUniforms;
|
|
234
|
+
`}},IC={name:"global-uniforms-bit",vertex:{header:`
|
|
235
|
+
uniform mat3 uProjectionMatrix;
|
|
236
|
+
uniform mat3 uWorldTransformMatrix;
|
|
237
|
+
uniform vec4 uWorldColorAlpha;
|
|
238
|
+
uniform vec2 uResolution;
|
|
239
|
+
`}};function $C({bits:i,name:t}){const n=QC({template:{fragment:JC,vertex:kC},bits:[FC,...i]});return td.from({name:t,vertex:{source:n.vertex,entryPoint:"main"},fragment:{source:n.fragment,entryPoint:"main"}})}function tA({bits:i,name:t}){return new Yg({name:t,...ZC({template:{vertex:PC,fragment:WC},bits:[IC,...i]})})}const eA={name:"color-bit",vertex:{header:`
|
|
240
|
+
@in aColor: vec4<f32>;
|
|
241
|
+
`,main:`
|
|
242
|
+
vColor *= vec4<f32>(aColor.rgb * aColor.a, aColor.a);
|
|
243
|
+
`}},nA={name:"color-bit",vertex:{header:`
|
|
244
|
+
in vec4 aColor;
|
|
245
|
+
`,main:`
|
|
246
|
+
vColor *= vec4(aColor.rgb * aColor.a, aColor.a);
|
|
247
|
+
`}},Xy={};function aA(i){const t=[];if(i===1)t.push("@group(1) @binding(0) var textureSource1: texture_2d<f32>;"),t.push("@group(1) @binding(1) var textureSampler1: sampler;");else{let n=0;for(let l=0;l<i;l++)t.push(`@group(1) @binding(${n++}) var textureSource${l+1}: texture_2d<f32>;`),t.push(`@group(1) @binding(${n++}) var textureSampler${l+1}: sampler;`)}return t.join(`
|
|
248
|
+
`)}function iA(i){const t=[];if(i===1)t.push("outColor = textureSampleGrad(textureSource1, textureSampler1, vUV, uvDx, uvDy);");else{t.push("switch vTextureId {");for(let n=0;n<i;n++)n===i-1?t.push(" default:{"):t.push(` case ${n}:{`),t.push(` outColor = textureSampleGrad(textureSource${n+1}, textureSampler${n+1}, vUV, uvDx, uvDy);`),t.push(" break;}");t.push("}")}return t.join(`
|
|
249
|
+
`)}function lA(i){return Xy[i]||(Xy[i]={name:"texture-batch-bit",vertex:{header:`
|
|
250
|
+
@in aTextureIdAndRound: vec2<u32>;
|
|
251
|
+
@out @interpolate(flat) vTextureId : u32;
|
|
252
|
+
`,main:`
|
|
253
|
+
vTextureId = aTextureIdAndRound.y;
|
|
254
|
+
`,end:`
|
|
255
|
+
if(aTextureIdAndRound.x == 1)
|
|
256
|
+
{
|
|
257
|
+
vPosition = vec4<f32>(roundPixels(vPosition.xy, globalUniforms.uResolution), vPosition.zw);
|
|
258
|
+
}
|
|
259
|
+
`},fragment:{header:`
|
|
260
|
+
@in @interpolate(flat) vTextureId: u32;
|
|
261
|
+
|
|
262
|
+
${aA(i)}
|
|
263
|
+
`,main:`
|
|
264
|
+
var uvDx = dpdx(vUV);
|
|
265
|
+
var uvDy = dpdy(vUV);
|
|
266
|
+
|
|
267
|
+
${iA(i)}
|
|
268
|
+
`}}),Xy[i]}const Vy={};function sA(i){const t=[];for(let n=0;n<i;n++)n>0&&t.push("else"),n<i-1&&t.push(`if(vTextureId < ${n}.5)`),t.push("{"),t.push(` outColor = texture(uTextures[${n}], vUV);`),t.push("}");return t.join(`
|
|
269
|
+
`)}function uA(i){return Vy[i]||(Vy[i]={name:"texture-batch-bit",vertex:{header:`
|
|
270
|
+
in vec2 aTextureIdAndRound;
|
|
271
|
+
out float vTextureId;
|
|
272
|
+
|
|
273
|
+
`,main:`
|
|
274
|
+
vTextureId = aTextureIdAndRound.y;
|
|
275
|
+
`,end:`
|
|
276
|
+
if(aTextureIdAndRound.x == 1.)
|
|
277
|
+
{
|
|
278
|
+
gl_Position.xy = roundPixels(gl_Position.xy, uResolution);
|
|
279
|
+
}
|
|
280
|
+
`},fragment:{header:`
|
|
281
|
+
in float vTextureId;
|
|
282
|
+
|
|
283
|
+
uniform sampler2D uTextures[${i}];
|
|
284
|
+
|
|
285
|
+
`,main:`
|
|
286
|
+
|
|
287
|
+
${sA(i)}
|
|
288
|
+
`}}),Vy[i]}const rA={name:"round-pixels-bit",vertex:{header:`
|
|
289
|
+
fn roundPixels(position: vec2<f32>, targetSize: vec2<f32>) -> vec2<f32>
|
|
290
|
+
{
|
|
291
|
+
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
292
|
+
}
|
|
293
|
+
`}},oA={name:"round-pixels-bit",vertex:{header:`
|
|
294
|
+
vec2 roundPixels(vec2 position, vec2 targetSize)
|
|
295
|
+
{
|
|
296
|
+
return (floor(((position * 0.5 + 0.5) * targetSize) + 0.5) / targetSize) * 2.0 - 1.0;
|
|
297
|
+
}
|
|
298
|
+
`}},o1={};function cA(i){let t=o1[i];if(t)return t;const n=new Int32Array(i);for(let l=0;l<i;l++)n[l]=l;return t=o1[i]=new s_({uTextures:{value:n,type:"i32",size:i}},{isStatic:!0}),t}class c1 extends Tp{constructor(t){const n=tA({name:"batch",bits:[nA,uA(t),oA]}),l=$C({name:"batch",bits:[eA,lA(t),rA]});super({glProgram:n,gpuProgram:l,resources:{batchSamplers:cA(t)}}),this.maxTextures=t}}let Nh=null;const R_=class z_ extends NC{constructor(t){super(t),this.geometry=new jC,this.name=z_.extension.name,this.vertexSize=6,Nh??(Nh=new c1(t.maxTextures)),this.shader=Nh}packAttributes(t,n,l,o,f){const d=f<<16|t.roundPixels&65535,m=t.transform,g=m.a,v=m.b,_=m.c,b=m.d,C=m.tx,E=m.ty,{positions:M,uvs:R}=t,z=t.color,O=t.attributeOffset,B=O+t.attributeSize;for(let U=O;U<B;U++){const G=U*2,Z=M[G],Q=M[G+1];n[o++]=g*Z+_*Q+C,n[o++]=b*Q+v*Z+E,n[o++]=R[G],n[o++]=R[G+1],l[o++]=z,l[o++]=d}}packQuadAttributes(t,n,l,o,f){const d=t.texture,m=t.transform,g=m.a,v=m.b,_=m.c,b=m.d,C=m.tx,E=m.ty,M=t.bounds,R=M.maxX,z=M.minX,O=M.maxY,B=M.minY,U=d.uvs,G=t.color,Z=f<<16|t.roundPixels&65535;n[o+0]=g*z+_*B+C,n[o+1]=b*B+v*z+E,n[o+2]=U.x0,n[o+3]=U.y0,l[o+4]=G,l[o+5]=Z,n[o+6]=g*R+_*B+C,n[o+7]=b*B+v*R+E,n[o+8]=U.x1,n[o+9]=U.y1,l[o+10]=G,l[o+11]=Z,n[o+12]=g*R+_*O+C,n[o+13]=b*O+v*R+E,n[o+14]=U.x2,n[o+15]=U.y2,l[o+16]=G,l[o+17]=Z,n[o+18]=g*z+_*O+C,n[o+19]=b*O+v*z+E,n[o+20]=U.x3,n[o+21]=U.y3,l[o+22]=G,l[o+23]=Z}_updateMaxTextures(t){this.shader.maxTextures!==t&&(Nh=new c1(t),this.shader=Nh)}destroy(){this.shader=null,super.destroy()}};R_.extension={type:[Pt.Batcher],name:"default"};let fA=R_;class ed{constructor(t){this.items=Object.create(null);const{renderer:n,type:l,onUnload:o,priority:f,name:d}=t;this._renderer=n,n.gc.addResourceHash(this,"items",l,f??0),this._onUnload=o,this.name=d}add(t){return this.items[t.uid]?!1:(this.items[t.uid]=t,t.once("unload",this.remove,this),t._gcLastUsed=this._renderer.gc.now,!0)}remove(t,...n){var o;if(!this.items[t.uid])return;const l=t._gpuData[this._renderer.uid];l&&((o=this._onUnload)==null||o.call(this,t,...n),l.destroy(),t._gpuData[this._renderer.uid]=null,this.items[t.uid]=null)}removeAll(...t){Object.values(this.items).forEach(n=>n&&this.remove(n,...t))}destroy(...t){this.removeAll(...t),this.items=Object.create(null),this._renderer=null,this._onUnload=null}}function hA(i,t,n,l,o,f,d,m=null){let g=0;n*=t,o*=f;const v=m.a,_=m.b,b=m.c,C=m.d,E=m.tx,M=m.ty;for(;g<d;){const R=i[n],z=i[n+1];l[o]=v*R+b*z+E,l[o+1]=_*R+C*z+M,o+=f,n+=t,g++}}function dA(i,t,n,l){let o=0;for(t*=n;o<l;)i[t]=0,i[t+1]=0,t+=n,o++}function D_(i,t,n,l,o){const f=t.a,d=t.b,m=t.c,g=t.d,v=t.tx,_=t.ty;n||(n=0),l||(l=2),o||(o=i.length/l-n);let b=n*l;for(let C=0;C<o;C++){const E=i[b],M=i[b+1];i[b]=f*E+m*M+v,i[b+1]=d*E+g*M+_,b+=l}}const mA=new ie;class Kg{constructor(){this.packAsQuad=!1,this.batcherName="default",this.topology="triangle-list",this.applyTransform=!0,this.roundPixels=0,this._batcher=null,this._batch=null}get uvs(){return this.geometryData.uvs}get positions(){return this.geometryData.vertices}get indices(){return this.geometryData.indices}get blendMode(){return this.renderable&&this.applyTransform?this.renderable.groupBlendMode:"normal"}get color(){const t=this.baseColor,n=t>>16|t&65280|(t&255)<<16,l=this.renderable;return l?Hx(n,l.groupColor)+(this.alpha*l.groupAlpha*255<<24):n+(this.alpha*255<<24)}get transform(){var t;return((t=this.renderable)==null?void 0:t.groupTransform)||mA}copyTo(t){t.indexOffset=this.indexOffset,t.indexSize=this.indexSize,t.attributeOffset=this.attributeOffset,t.attributeSize=this.attributeSize,t.baseColor=this.baseColor,t.alpha=this.alpha,t.texture=this.texture,t.geometryData=this.geometryData,t.topology=this.topology}reset(){this.applyTransform=!0,this.renderable=null,this.topology="triangle-list"}destroy(){this.renderable=null,this.texture=null,this.geometryData=null,this._batcher=null,this._batch=null}}const Wh={extension:{type:Pt.ShapeBuilder,name:"circle"},build(i,t){let n,l,o,f,d,m;if(i.type==="circle"){const G=i;if(d=m=G.radius,d<=0)return!1;n=G.x,l=G.y,o=f=0}else if(i.type==="ellipse"){const G=i;if(d=G.halfWidth,m=G.halfHeight,d<=0||m<=0)return!1;n=G.x,l=G.y,o=f=0}else{const G=i,Z=G.width/2,Q=G.height/2;n=G.x+Z,l=G.y+Q,d=m=Math.max(0,Math.min(G.radius,Math.min(Z,Q))),o=Z-d,f=Q-m}if(o<0||f<0)return!1;const g=Math.ceil(2.3*Math.sqrt(d+m)),v=g*8+(o?4:0)+(f?4:0);if(v===0)return!1;if(g===0)return t[0]=t[6]=n+o,t[1]=t[3]=l+f,t[2]=t[4]=n-o,t[5]=t[7]=l-f,!0;let _=0,b=g*4+(o?2:0)+2,C=b,E=v,M=o+d,R=f,z=n+M,O=n-M,B=l+R;if(t[_++]=z,t[_++]=B,t[--b]=B,t[--b]=O,f){const G=l-R;t[C++]=O,t[C++]=G,t[--E]=G,t[--E]=z}for(let G=1;G<g;G++){const Z=Math.PI/2*(G/g),Q=o+Math.cos(Z)*d,K=f+Math.sin(Z)*m,gt=n+Q,ct=n-Q,ht=l+K,dt=l-K;t[_++]=gt,t[_++]=ht,t[--b]=ht,t[--b]=ct,t[C++]=ct,t[C++]=dt,t[--E]=dt,t[--E]=gt}M=o,R=f+m,z=n+M,O=n-M,B=l+R;const U=l-R;return t[_++]=z,t[_++]=B,t[--E]=U,t[--E]=z,o&&(t[_++]=O,t[_++]=B,t[--E]=U,t[--E]=O),!0},triangulate(i,t,n,l,o,f){if(i.length===0)return;let d=0,m=0;for(let _=0;_<i.length;_+=2)d+=i[_],m+=i[_+1];d/=i.length/2,m/=i.length/2;let g=l;t[g*n]=d,t[g*n+1]=m;const v=g++;for(let _=0;_<i.length;_+=2)t[g*n]=i[_],t[g*n+1]=i[_+1],_>0&&(o[f++]=g,o[f++]=v,o[f++]=g-1),g++;o[f++]=v+1,o[f++]=v,o[f++]=g-1}},pA={...Wh,extension:{...Wh.extension,name:"ellipse"}},yA={...Wh,extension:{...Wh.extension,name:"roundedRectangle"}},O_=1e-4,f1=1e-4;function gA(i){const t=i.length;if(t<6)return 1;let n=0;for(let l=0,o=i[t-2],f=i[t-1];l<t;l+=2){const d=i[l],m=i[l+1];n+=(d-o)*(m+f),o=d,f=m}return n<0?-1:1}function h1(i,t,n,l,o,f,d,m){const g=i-n*o,v=t-l*o,_=i+n*f,b=t+l*f;let C,E;d?(C=l,E=-n):(C=-l,E=n);const M=g+C,R=v+E,z=_+C,O=b+E;return m.push(M,R),m.push(z,O),2}function kr(i,t,n,l,o,f,d,m){const g=n-i,v=l-t;let _=Math.atan2(g,v),b=Math.atan2(o-i,f-t);m&&_<b?_+=Math.PI*2:!m&&_>b&&(b+=Math.PI*2);let C=_;const E=b-_,M=Math.abs(E),R=Math.sqrt(g*g+v*v),z=(15*M*Math.sqrt(R)/Math.PI>>0)+1,O=E/z;if(C+=O,m){d.push(i,t),d.push(n,l);for(let B=1,U=C;B<z;B++,U+=O)d.push(i,t),d.push(i+Math.sin(U)*R,t+Math.cos(U)*R);d.push(i,t),d.push(o,f)}else{d.push(n,l),d.push(i,t);for(let B=1,U=C;B<z;B++,U+=O)d.push(i+Math.sin(U)*R,t+Math.cos(U)*R),d.push(i,t);d.push(o,f),d.push(i,t)}return z*2}function vA(i,t,n,l,o,f){const d=O_;if(i.length===0)return;const m=t;let g=m.alignment;if(t.alignment!==.5){let et=gA(i);g=(g-.5)*et+.5}const v=new ha(i[0],i[1]),_=new ha(i[i.length-2],i[i.length-1]),b=l,C=Math.abs(v.x-_.x)<d&&Math.abs(v.y-_.y)<d;if(b){i=i.slice(),C&&(i.pop(),i.pop(),_.set(i[i.length-2],i[i.length-1]));const et=(v.x+_.x)*.5,ft=(_.y+v.y)*.5;i.unshift(et,ft),i.push(et,ft)}const E=o,M=i.length/2;let R=i.length;const z=E.length/2,O=m.width/2,B=O*O,U=m.miterLimit*m.miterLimit;let G=i[0],Z=i[1],Q=i[2],K=i[3],gt=0,ct=0,ht=-(Z-K),dt=G-Q,vt=0,_t=0,xt=Math.sqrt(ht*ht+dt*dt);ht/=xt,dt/=xt,ht*=O,dt*=O;const Dt=g,w=(1-Dt)*2,H=Dt*2;b||(m.cap==="round"?R+=kr(G-ht*(w-H)*.5,Z-dt*(w-H)*.5,G-ht*w,Z-dt*w,G+ht*H,Z+dt*H,E,!0)+2:m.cap==="square"&&(R+=h1(G,Z,ht,dt,w,H,!0,E))),E.push(G-ht*w,Z-dt*w),E.push(G+ht*H,Z+dt*H);for(let et=1;et<M-1;++et){G=i[(et-1)*2],Z=i[(et-1)*2+1],Q=i[et*2],K=i[et*2+1],gt=i[(et+1)*2],ct=i[(et+1)*2+1],ht=-(Z-K),dt=G-Q,xt=Math.sqrt(ht*ht+dt*dt),ht/=xt,dt/=xt,ht*=O,dt*=O,vt=-(K-ct),_t=Q-gt,xt=Math.sqrt(vt*vt+_t*_t),vt/=xt,_t/=xt,vt*=O,_t*=O;const ft=Q-G,j=Z-K,I=Q-gt,st=ct-K,pt=ft*I+j*st,Tt=j*I-st*ft,Ot=Tt<0;if(Math.abs(Tt)<.001*Math.abs(pt)){E.push(Q-ht*w,K-dt*w),E.push(Q+ht*H,K+dt*H),pt>=0&&(m.join==="round"?R+=kr(Q,K,Q-ht*w,K-dt*w,Q-vt*w,K-_t*w,E,!1)+4:R+=2,E.push(Q-vt*H,K-_t*H),E.push(Q+vt*w,K+_t*w));continue}const Bt=(-ht+G)*(-dt+K)-(-ht+Q)*(-dt+Z),ce=(-vt+gt)*(-_t+K)-(-vt+Q)*(-_t+ct),oe=(ft*ce-I*Bt)/Tt,ma=(st*Bt-j*ce)/Tt,Ga=(oe-Q)*(oe-Q)+(ma-K)*(ma-K),qn=Q+(oe-Q)*w,Wn=K+(ma-K)*w,mn=Q-(oe-Q)*H,Fn=K-(ma-K)*H,rs=Math.min(ft*ft+j*j,I*I+st*st),Fa=Ot?w:H,Ku=rs+Fa*Fa*B;Ga<=Ku?m.join==="bevel"||Ga/B>U?(Ot?(E.push(qn,Wn),E.push(Q+ht*H,K+dt*H),E.push(qn,Wn),E.push(Q+vt*H,K+_t*H)):(E.push(Q-ht*w,K-dt*w),E.push(mn,Fn),E.push(Q-vt*w,K-_t*w),E.push(mn,Fn)),R+=2):m.join==="round"?Ot?(E.push(qn,Wn),E.push(Q+ht*H,K+dt*H),R+=kr(Q,K,Q+ht*H,K+dt*H,Q+vt*H,K+_t*H,E,!0)+4,E.push(qn,Wn),E.push(Q+vt*H,K+_t*H)):(E.push(Q-ht*w,K-dt*w),E.push(mn,Fn),R+=kr(Q,K,Q-ht*w,K-dt*w,Q-vt*w,K-_t*w,E,!1)+4,E.push(Q-vt*w,K-_t*w),E.push(mn,Fn)):(E.push(qn,Wn),E.push(mn,Fn)):(E.push(Q-ht*w,K-dt*w),E.push(Q+ht*H,K+dt*H),m.join==="round"?Ot?R+=kr(Q,K,Q+ht*H,K+dt*H,Q+vt*H,K+_t*H,E,!0)+2:R+=kr(Q,K,Q-ht*w,K-dt*w,Q-vt*w,K-_t*w,E,!1)+2:m.join==="miter"&&Ga/B<=U&&(Ot?(E.push(mn,Fn),E.push(mn,Fn)):(E.push(qn,Wn),E.push(qn,Wn)),R+=2),E.push(Q-vt*w,K-_t*w),E.push(Q+vt*H,K+_t*H),R+=2)}G=i[(M-2)*2],Z=i[(M-2)*2+1],Q=i[(M-1)*2],K=i[(M-1)*2+1],ht=-(Z-K),dt=G-Q,xt=Math.sqrt(ht*ht+dt*dt),ht/=xt,dt/=xt,ht*=O,dt*=O,E.push(Q-ht*w,K-dt*w),E.push(Q+ht*H,K+dt*H),b||(m.cap==="round"?R+=kr(Q-ht*(w-H)*.5,K-dt*(w-H)*.5,Q-ht*w,K-dt*w,Q+ht*H,K+dt*H,E,!1)+2:m.cap==="square"&&(R+=h1(Q,K,ht,dt,w,H,!1,E)));const at=f1*f1;for(let et=z;et<R+z-2;++et)G=E[et*2],Z=E[et*2+1],Q=E[(et+1)*2],K=E[(et+1)*2+1],gt=E[(et+2)*2],ct=E[(et+2)*2+1],!(Math.abs(G*(K-ct)+Q*(ct-Z)+gt*(Z-K))<at)&&f.push(et,et+1,et+2)}function xA(i,t,n,l){const o=O_;if(i.length===0)return;const f=i[0],d=i[1],m=i[i.length-2],g=i[i.length-1],v=t||Math.abs(f-m)<o&&Math.abs(d-g)<o,_=n,b=i.length/2,C=_.length/2;for(let E=0;E<b;E++)_.push(i[E*2]),_.push(i[E*2+1]);for(let E=0;E<b-1;E++)l.push(C+E,C+E+1);v&&l.push(C+b-1,C)}function N_(i,t,n,l,o,f,d){const m=rC(i,t,2);if(!m)return;for(let v=0;v<m.length;v+=3)f[d++]=m[v]+o,f[d++]=m[v+1]+o,f[d++]=m[v+2]+o;let g=o*l;for(let v=0;v<i.length;v+=2)n[g]=i[v],n[g+1]=i[v+1],g+=l}const _A=[],SA={extension:{type:Pt.ShapeBuilder,name:"polygon"},build(i,t){for(let n=0;n<i.points.length;n++)t[n]=i.points[n];return!0},triangulate(i,t,n,l,o,f){N_(i,_A,t,n,l,o,f)}},bA={extension:{type:Pt.ShapeBuilder,name:"rectangle"},build(i,t){const n=i,l=n.x,o=n.y,f=n.width,d=n.height;return f>0&&d>0?(t[0]=l,t[1]=o,t[2]=l+f,t[3]=o,t[4]=l+f,t[5]=o+d,t[6]=l,t[7]=o+d,!0):!1},triangulate(i,t,n,l,o,f){let d=0;l*=n,t[l+d]=i[0],t[l+d+1]=i[1],d+=n,t[l+d]=i[2],t[l+d+1]=i[3],d+=n,t[l+d]=i[6],t[l+d+1]=i[7],d+=n,t[l+d]=i[4],t[l+d+1]=i[5],d+=n;const m=l/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2,o[f++]=m+1,o[f++]=m+3,o[f++]=m+2}},TA={extension:{type:Pt.ShapeBuilder,name:"triangle"},build(i,t){return t[0]=i.x,t[1]=i.y,t[2]=i.x2,t[3]=i.y2,t[4]=i.x3,t[5]=i.y3,!0},triangulate(i,t,n,l,o,f){let d=0;l*=n,t[l+d]=i[0],t[l+d+1]=i[1],d+=n,t[l+d]=i[2],t[l+d+1]=i[3],d+=n,t[l+d]=i[4],t[l+d+1]=i[5];const m=l/n;o[f++]=m,o[f++]=m+1,o[f++]=m+2}},d1=[{offset:0,color:"white"},{offset:1,color:"black"}],kg=class vg{constructor(...t){this.uid=rn("fillGradient"),this._tick=0,this.type="linear",this.colorStops=[];let n=EA(t);n={...n.type==="radial"?vg.defaultRadialOptions:vg.defaultLinearOptions,...Cx(n)},this._textureSize=n.textureSize,this._wrapMode=n.wrapMode,n.type==="radial"?(this.center=n.center,this.outerCenter=n.outerCenter??this.center,this.innerRadius=n.innerRadius,this.outerRadius=n.outerRadius,this.scale=n.scale,this.rotation=n.rotation):(this.start=n.start,this.end=n.end),this.textureSpace=n.textureSpace,this.type=n.type,n.colorStops.forEach(o=>{this.addColorStop(o.offset,o.color)})}addColorStop(t,n){return this.colorStops.push({offset:t,color:Mn.shared.setValue(n).toHexa()}),this}buildLinearGradient(){if(this.texture)return;let{x:t,y:n}=this.start,{x:l,y:o}=this.end,f=l-t,d=o-n;const m=f<0||d<0;if(this._wrapMode==="clamp-to-edge"){if(f<0){const z=t;t=l,l=z,f*=-1}if(d<0){const z=n;n=o,o=z,d*=-1}}const g=this.colorStops.length?this.colorStops:d1,v=this._textureSize,{canvas:_,context:b}=p1(v,1),C=m?b.createLinearGradient(this._textureSize,0,0,0):b.createLinearGradient(0,0,this._textureSize,0);m1(C,g),b.fillStyle=C,b.fillRect(0,0,v,1),this.texture=new Re({source:new up({resource:_,addressMode:this._wrapMode})});const E=Math.sqrt(f*f+d*d),M=Math.atan2(d,f),R=new ie;R.scale(E/v,1),R.rotate(M),R.translate(t,n),this.textureSpace==="local"&&R.scale(v,v),this.transform=R}buildGradient(){this.texture||this._tick++,this.type==="linear"?this.buildLinearGradient():this.buildRadialGradient()}buildRadialGradient(){if(this.texture)return;const t=this.colorStops.length?this.colorStops:d1,n=this._textureSize,{canvas:l,context:o}=p1(n,n),{x:f,y:d}=this.center,{x:m,y:g}=this.outerCenter,v=this.innerRadius,_=this.outerRadius,b=m-_,C=g-_,E=n/(_*2),M=(f-b)*E,R=(d-C)*E,z=o.createRadialGradient(M,R,v*E,(m-b)*E,(g-C)*E,_*E);m1(z,t),o.fillStyle=t[t.length-1].color,o.fillRect(0,0,n,n),o.fillStyle=z,o.translate(M,R),o.rotate(this.rotation),o.scale(1,this.scale),o.translate(-M,-R),o.fillRect(0,0,n,n),this.texture=new Re({source:new up({resource:l,addressMode:this._wrapMode})});const O=new ie;O.scale(1/E,1/E),O.translate(b,C),this.textureSpace==="local"&&O.scale(n,n),this.transform=O}destroy(){var t;(t=this.texture)==null||t.destroy(!0),this.texture=null,this.transform=null,this.colorStops=[],this.start=null,this.end=null,this.center=null,this.outerCenter=null}get styleKey(){return`fill-gradient-${this.uid}-${this._tick}`}};kg.defaultLinearOptions={start:{x:0,y:0},end:{x:0,y:1},colorStops:[],textureSpace:"local",type:"linear",textureSize:256,wrapMode:"clamp-to-edge"};kg.defaultRadialOptions={center:{x:.5,y:.5},innerRadius:0,outerRadius:.5,colorStops:[],scale:1,textureSpace:"local",type:"radial",textureSize:256,wrapMode:"clamp-to-edge"};let Ws=kg;function m1(i,t){for(let n=0;n<t.length;n++){const l=t[n];i.addColorStop(l.offset,l.color)}}function p1(i,t){const n=hi.get().createCanvas(i,t),l=n.getContext("2d");return{canvas:n,context:l}}function EA(i){let t=i[0]??{};return(typeof t=="number"||i[1])&&(he("8.5.2","use options object instead"),t={type:"linear",start:{x:i[0],y:i[1]},end:{x:i[2],y:i[3]},textureSpace:i[4],textureSize:i[5]??Ws.defaultLinearOptions.textureSize}),t}const CA=new ie,AA=new dn;function MA(i,t,n,l){const o=t.matrix?i.copyFrom(t.matrix).invert():i.identity();if(t.textureSpace==="local"){const d=n.getBounds(AA);t.width&&d.pad(t.width);const{x:m,y:g}=d,v=1/d.width,_=1/d.height,b=-m*v,C=-g*_,E=o.a,M=o.b,R=o.c,z=o.d;o.a*=v,o.b*=v,o.c*=_,o.d*=_,o.tx=b*E+C*R+o.tx,o.ty=b*M+C*z+o.ty}else o.translate(t.texture.frame.x,t.texture.frame.y),o.scale(1/t.texture.source.width,1/t.texture.source.height);const f=t.texture.source.style;return!(t.fill instanceof Ws)&&f.addressMode==="clamp-to-edge"&&(f.addressMode="repeat",f.update()),l&&o.append(CA.copyFrom(l).invert()),o}const Ep={};Fe.handleByMap(Pt.ShapeBuilder,Ep);Fe.add(bA,SA,TA,Wh,pA,yA);const RA=new dn,zA=new ie;function DA(i,t){const{geometryData:n,batches:l}=t;l.length=0,n.indices.length=0,n.vertices.length=0,n.uvs.length=0;for(let o=0;o<i.instructions.length;o++){const f=i.instructions[o];if(f.action==="texture")OA(f.data,l,n);else if(f.action==="fill"||f.action==="stroke"){const d=f.action==="stroke",m=f.data.path.shapePath,g=f.data.style,v=f.data.hole;d&&v&&y1(v.shapePath,g,!0,l,n),v&&(m.shapePrimitives[m.shapePrimitives.length-1].holes=v.shapePath.shapePrimitives),y1(m,g,d,l,n)}}}function OA(i,t,n){const l=[],o=Ep.rectangle,f=RA;f.x=i.dx,f.y=i.dy,f.width=i.dw,f.height=i.dh;const d=i.transform;if(!o.build(f,l))return;const{vertices:m,uvs:g,indices:v}=n,_=v.length,b=m.length/2;d&&D_(l,d),o.triangulate(l,m,2,b,v,_);const C=i.image,E=C.uvs;g.push(E.x0,E.y0,E.x1,E.y1,E.x3,E.y3,E.x2,E.y2);const M=Wa.get(Kg);M.indexOffset=_,M.indexSize=v.length-_,M.attributeOffset=b,M.attributeSize=m.length/2-b,M.baseColor=i.style,M.alpha=i.alpha,M.texture=C,M.geometryData=n,t.push(M)}function y1(i,t,n,l,o){const{vertices:f,uvs:d,indices:m}=o;i.shapePrimitives.forEach(({shape:g,transform:v,holes:_})=>{const b=[],C=Ep[g.type];if(!C.build(g,b))return;const E=m.length,M=f.length/2;let R="triangle-list";if(v&&D_(b,v),n){const U=g.closePath??!0,G=t;G.pixelLine?(xA(b,U,f,m),R="line-list"):vA(b,G,!1,U,f,m)}else if(_){const U=[],G=b.slice();NA(_).forEach(Q=>{U.push(G.length/2),G.push(...Q)}),N_(G,U,f,2,M,m,E)}else C.triangulate(b,f,2,M,m,E);const z=d.length/2,O=t.texture;if(O!==Re.WHITE){const U=MA(zA,t,g,v);hA(f,2,M,d,z,2,f.length/2-M,U)}else dA(d,z,2,f.length/2-M);const B=Wa.get(Kg);B.indexOffset=E,B.indexSize=m.length-E,B.attributeOffset=M,B.attributeSize=f.length/2-M,B.baseColor=t.color,B.alpha=t.alpha,B.texture=O,B.geometryData=o,B.topology=R,l.push(B)})}function NA(i){const t=[];for(let n=0;n<i.length;n++){const l=i[n].shape,o=[];Ep[l.type].build(l,o)&&t.push(o)}return t}class UA{constructor(){this.batches=[],this.geometryData={vertices:[],uvs:[],indices:[]}}reset(){this.batches&&this.batches.forEach(t=>{Wa.return(t)}),this.graphicsData&&Wa.return(this.graphicsData),this.isBatchable=!1,this.context=null,this.batches.length=0,this.geometryData.indices.length=0,this.geometryData.vertices.length=0,this.geometryData.uvs.length=0,this.graphicsData=null}destroy(){this.reset(),this.batches=null,this.geometryData=null}}class BA{constructor(){this.instructions=new Gg}init(t){const n=t.maxTextures;this.batcher?this.batcher._updateMaxTextures(n):this.batcher=new fA({maxTextures:n}),this.instructions.reset()}get geometry(){return he(DT,"GraphicsContextRenderData#geometry is deprecated, please use batcher.geometry instead."),this.batcher.geometry}destroy(){this.batcher.destroy(),this.instructions.destroy(),this.batcher=null,this.instructions=null}}const Jg=class xg{constructor(t){this._renderer=t,this._managedContexts=new ed({renderer:t,type:"resource",name:"graphicsContext"})}init(t){xg.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??xg.defaultOptions.bezierSmoothness}getContextRenderData(t){return t._gpuData[this._renderer.uid].graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=!!t._gpuData[this._renderer.uid],l=t._gpuData[this._renderer.uid]||this._initContext(t);if(t.dirty||!n){n&&l.reset(),DA(t,l);const o=t.batchMode;t.customShader||o==="no-batch"?l.isBatchable=!1:o==="auto"?l.isBatchable=l.geometryData.vertices.length<400:l.isBatchable=!0,t.dirty=!1}return l}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=Wa.get(BA,{maxTextures:this._renderer.limits.maxBatchableTextures}),l=t._gpuData[this._renderer.uid],{batches:o,geometryData:f}=l;l.graphicsData=n;const d=f.vertices.length,m=f.indices.length;for(let b=0;b<o.length;b++)o[b].applyTransform=!1;const g=n.batcher;g.ensureAttributeBuffer(d),g.ensureIndexBuffer(m),g.begin();for(let b=0;b<o.length;b++){const C=o[b];g.add(C)}g.finish(n.instructions);const v=g.geometry;v.indexBuffer.setDataWithSize(g.indexBuffer,g.indexSize,!0),v.buffers[0].setDataWithSize(g.attributeBuffer.float32View,g.attributeSize,!0);const _=g.batches;for(let b=0;b<_.length;b++){const C=_[b];C.bindGroup=bC(C.textures.textures,C.textures.count,this._renderer.limits.maxBatchableTextures)}return n}_initContext(t){const n=new UA;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Jg.extension={type:[Pt.WebGLSystem,Pt.WebGPUSystem],name:"graphicsContext"};Jg.defaultOptions={bezierSmoothness:.5};let Pg=Jg;const wA=8,Pm=11920929e-14,HA=1;function U_(i,t,n,l,o,f,d,m,g,v){const b=Math.min(.99,Math.max(0,v??Pg.defaultOptions.bezierSmoothness));let C=(HA-b)/1;return C*=C,GA(t,n,l,o,f,d,m,g,i,C),i}function GA(i,t,n,l,o,f,d,m,g,v){_g(i,t,n,l,o,f,d,m,g,v,0),g.push(d,m)}function _g(i,t,n,l,o,f,d,m,g,v,_){if(_>wA)return;const b=(i+n)/2,C=(t+l)/2,E=(n+o)/2,M=(l+f)/2,R=(o+d)/2,z=(f+m)/2,O=(b+E)/2,B=(C+M)/2,U=(E+R)/2,G=(M+z)/2,Z=(O+U)/2,Q=(B+G)/2;if(_>0){let K=d-i,gt=m-t;const ct=Math.abs((n-d)*gt-(l-m)*K),ht=Math.abs((o-d)*gt-(f-m)*K);if(ct>Pm&&ht>Pm){if((ct+ht)*(ct+ht)<=v*(K*K+gt*gt)){g.push(Z,Q);return}}else if(ct>Pm){if(ct*ct<=v*(K*K+gt*gt)){g.push(Z,Q);return}}else if(ht>Pm){if(ht*ht<=v*(K*K+gt*gt)){g.push(Z,Q);return}}else if(K=Z-(i+d)/2,gt=Q-(t+m)/2,K*K+gt*gt<=v){g.push(Z,Q);return}}_g(i,t,b,C,O,B,Z,Q,g,v,_+1),_g(Z,Q,U,G,R,z,d,m,g,v,_+1)}const jA=8,qA=11920929e-14,YA=1;function LA(i,t,n,l,o,f,d,m){const v=Math.min(.99,Math.max(0,m??Pg.defaultOptions.bezierSmoothness));let _=(YA-v)/1;return _*=_,XA(t,n,l,o,f,d,i,_),i}function XA(i,t,n,l,o,f,d,m){Sg(d,i,t,n,l,o,f,m,0),d.push(o,f)}function Sg(i,t,n,l,o,f,d,m,g){if(g>jA)return;const v=(t+l)/2,_=(n+o)/2,b=(l+f)/2,C=(o+d)/2,E=(v+b)/2,M=(_+C)/2;let R=f-t,z=d-n;const O=Math.abs((l-f)*z-(o-d)*R);if(O>qA){if(O*O<=m*(R*R+z*z)){i.push(E,M);return}}else if(R=E-(t+f)/2,z=M-(n+d)/2,R*R+z*z<=m){i.push(E,M);return}Sg(i,t,n,v,_,E,M,m,g+1),Sg(i,E,M,b,C,f,d,m,g+1)}function B_(i,t,n,l,o,f,d,m){let g=Math.abs(o-f);(!d&&o>f||d&&f>o)&&(g=2*Math.PI-g),m||(m=Math.max(6,Math.floor(6*Math.pow(l,1/3)*(g/Math.PI)))),m=Math.max(m,3);let v=g/m,_=o;v*=d?-1:1;for(let b=0;b<m+1;b++){const C=Math.cos(_),E=Math.sin(_),M=t+C*l,R=n+E*l;i.push(M,R),_+=v}}function VA(i,t,n,l,o,f){const d=i[i.length-2],g=i[i.length-1]-n,v=d-t,_=o-n,b=l-t,C=Math.abs(g*b-v*_);if(C<1e-8||f===0){(i[i.length-2]!==t||i[i.length-1]!==n)&&i.push(t,n);return}const E=g*g+v*v,M=_*_+b*b,R=g*_+v*b,z=f*Math.sqrt(E)/C,O=f*Math.sqrt(M)/C,B=z*R/E,U=O*R/M,G=z*b+O*v,Z=z*_+O*g,Q=v*(O+B),K=g*(O+B),gt=b*(z+U),ct=_*(z+U),ht=Math.atan2(K-Z,Q-G),dt=Math.atan2(ct-Z,gt-G);B_(i,G+t,Z+n,f,ht,dt,v*_>b*g)}const Vh=Math.PI*2,Qy={centerX:0,centerY:0,ang1:0,ang2:0},Zy=({x:i,y:t},n,l,o,f,d,m,g)=>{i*=n,t*=l;const v=o*i-f*t,_=f*i+o*t;return g.x=v+d,g.y=_+m,g};function QA(i,t){const n=t===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(t/4),l=t===1.5707963267948966?.551915024494:n,o=Math.cos(i),f=Math.sin(i),d=Math.cos(i+t),m=Math.sin(i+t);return[{x:o-f*l,y:f+o*l},{x:d+m*l,y:m-d*l},{x:d,y:m}]}const g1=(i,t,n,l)=>{const o=i*l-t*n<0?-1:1;let f=i*n+t*l;return f>1&&(f=1),f<-1&&(f=-1),o*Math.acos(f)},ZA=(i,t,n,l,o,f,d,m,g,v,_,b,C)=>{const E=Math.pow(o,2),M=Math.pow(f,2),R=Math.pow(_,2),z=Math.pow(b,2);let O=E*M-E*z-M*R;O<0&&(O=0),O/=E*z+M*R,O=Math.sqrt(O)*(d===m?-1:1);const B=O*o/f*b,U=O*-f/o*_,G=v*B-g*U+(i+n)/2,Z=g*B+v*U+(t+l)/2,Q=(_-B)/o,K=(b-U)/f,gt=(-_-B)/o,ct=(-b-U)/f,ht=g1(1,0,Q,K);let dt=g1(Q,K,gt,ct);m===0&&dt>0&&(dt-=Vh),m===1&&dt<0&&(dt+=Vh),C.centerX=G,C.centerY=Z,C.ang1=ht,C.ang2=dt};function KA(i,t,n,l,o,f,d,m=0,g=0,v=0){if(f===0||d===0)return;const _=Math.sin(m*Vh/360),b=Math.cos(m*Vh/360),C=b*(t-l)/2+_*(n-o)/2,E=-_*(t-l)/2+b*(n-o)/2;if(C===0&&E===0)return;f=Math.abs(f),d=Math.abs(d);const M=Math.pow(C,2)/Math.pow(f,2)+Math.pow(E,2)/Math.pow(d,2);M>1&&(f*=Math.sqrt(M),d*=Math.sqrt(M)),ZA(t,n,l,o,f,d,g,v,_,b,C,E,Qy);let{ang1:R,ang2:z}=Qy;const{centerX:O,centerY:B}=Qy;let U=Math.abs(z)/(Vh/4);Math.abs(1-U)<1e-7&&(U=1);const G=Math.max(Math.ceil(U),1);z/=G;let Z=i[i.length-2],Q=i[i.length-1];const K={x:0,y:0};for(let gt=0;gt<G;gt++){const ct=QA(R,z),{x:ht,y:dt}=Zy(ct[0],f,d,b,_,O,B,K),{x:vt,y:_t}=Zy(ct[1],f,d,b,_,O,B,K),{x:xt,y:Dt}=Zy(ct[2],f,d,b,_,O,B,K);U_(i,Z,Q,ht,dt,vt,_t,xt,Dt),Z=xt,Q=Dt,R+=z}}function kA(i,t,n){const l=(d,m)=>{const g=m.x-d.x,v=m.y-d.y,_=Math.sqrt(g*g+v*v),b=g/_,C=v/_;return{len:_,nx:b,ny:C}},o=(d,m)=>{d===0?i.moveTo(m.x,m.y):i.lineTo(m.x,m.y)};let f=t[t.length-1];for(let d=0;d<t.length;d++){const m=t[d%t.length],g=m.radius??n;if(g<=0){o(d,m),f=m;continue}const v=t[(d+1)%t.length],_=l(m,f),b=l(m,v);if(_.len<1e-4||b.len<1e-4){o(d,m),f=m;continue}let C=Math.asin(_.nx*b.ny-_.ny*b.nx),E=1,M=!1;_.nx*b.nx-_.ny*-b.ny<0?C<0?C=Math.PI+C:(C=Math.PI-C,E=-1,M=!0):C>0&&(E=-1,M=!0);const R=C/2;let z,O=Math.abs(Math.cos(R)*g/Math.sin(R));O>Math.min(_.len/2,b.len/2)?(O=Math.min(_.len/2,b.len/2),z=Math.abs(O*Math.sin(R)/Math.cos(R))):z=g;const B=m.x+b.nx*O+-b.ny*z*E,U=m.y+b.ny*O+b.nx*z*E,G=Math.atan2(_.ny,_.nx)+Math.PI/2*E,Z=Math.atan2(b.ny,b.nx)-Math.PI/2*E;d===0&&i.moveTo(B+Math.cos(G)*z,U+Math.sin(G)*z),i.arc(B,U,z,G,Z,M),f=m}}function JA(i,t,n,l){const o=(m,g)=>Math.sqrt((m.x-g.x)**2+(m.y-g.y)**2),f=(m,g,v)=>({x:m.x+(g.x-m.x)*v,y:m.y+(g.y-m.y)*v}),d=t.length;for(let m=0;m<d;m++){const g=t[(m+1)%d],v=g.radius??n;if(v<=0){m===0?i.moveTo(g.x,g.y):i.lineTo(g.x,g.y);continue}const _=t[m],b=t[(m+2)%d],C=o(_,g);let E;if(C<1e-4)E=g;else{const z=Math.min(C/2,v);E=f(g,_,z/C)}const M=o(b,g);let R;if(M<1e-4)R=g;else{const z=Math.min(M/2,v);R=f(g,b,z/M)}m===0?i.moveTo(E.x,E.y):i.lineTo(E.x,E.y),i.quadraticCurveTo(g.x,g.y,R.x,R.y,l)}}const PA=new dn;class WA{constructor(t){this.shapePrimitives=[],this._currentPoly=null,this._bounds=new Vi,this._graphicsPath2D=t,this.signed=t.checkForHoles}moveTo(t,n){return this.startPoly(t,n),this}lineTo(t,n){this._ensurePoly();const l=this._currentPoly.points,o=l[l.length-2],f=l[l.length-1];return(o!==t||f!==n)&&l.push(t,n),this}arc(t,n,l,o,f,d){this._ensurePoly(!1);const m=this._currentPoly.points;return B_(m,t,n,l,o,f,d),this}arcTo(t,n,l,o,f){this._ensurePoly();const d=this._currentPoly.points;return VA(d,t,n,l,o,f),this}arcToSvg(t,n,l,o,f,d,m){const g=this._currentPoly.points;return KA(g,this._currentPoly.lastX,this._currentPoly.lastY,d,m,t,n,l,o,f),this}bezierCurveTo(t,n,l,o,f,d,m){this._ensurePoly();const g=this._currentPoly;return U_(this._currentPoly.points,g.lastX,g.lastY,t,n,l,o,f,d,m),this}quadraticCurveTo(t,n,l,o,f){this._ensurePoly();const d=this._currentPoly;return LA(this._currentPoly.points,d.lastX,d.lastY,t,n,l,o,f),this}closePath(){return this.endPoly(!0),this}addPath(t,n){this.endPoly(),n&&!n.isIdentity()&&(t=t.clone(!0),t.transform(n));const l=this.shapePrimitives,o=l.length;for(let f=0;f<t.instructions.length;f++){const d=t.instructions[f];this[d.action](...d.data)}if(t.checkForHoles&&l.length-o>1){let f=null;for(let d=o;d<l.length;d++){const m=l[d];if(m.shape.type==="polygon"){const g=m.shape,v=f==null?void 0:f.shape;v&&v.containsPolygon(g)?(f.holes||(f.holes=[]),f.holes.push(m),l.copyWithin(d,d+1),l.length--,d--):f=m}}}return this}finish(t=!1){this.endPoly(t)}rect(t,n,l,o,f){return this.drawShape(new dn(t,n,l,o),f),this}circle(t,n,l,o){return this.drawShape(new Vg(t,n,l),o),this}poly(t,n,l){const o=new Lh(t);return o.closePath=n,this.drawShape(o,l),this}regularPoly(t,n,l,o,f=0,d){o=Math.max(o|0,3);const m=-1*Math.PI/2+f,g=Math.PI*2/o,v=[];for(let _=0;_<o;_++){const b=m-_*g;v.push(t+l*Math.cos(b),n+l*Math.sin(b))}return this.poly(v,!0,d),this}roundPoly(t,n,l,o,f,d=0,m){if(o=Math.max(o|0,3),f<=0)return this.regularPoly(t,n,l,o,d);const g=l*Math.sin(Math.PI/o)-.001;f=Math.min(f,g);const v=-1*Math.PI/2+d,_=Math.PI*2/o,b=(o-2)*Math.PI/o/2;for(let C=0;C<o;C++){const E=C*_+v,M=t+l*Math.cos(E),R=n+l*Math.sin(E),z=E+Math.PI+b,O=E-Math.PI-b,B=M+f*Math.cos(z),U=R+f*Math.sin(z),G=M+f*Math.cos(O),Z=R+f*Math.sin(O);C===0?this.moveTo(B,U):this.lineTo(B,U),this.quadraticCurveTo(M,R,G,Z,m)}return this.closePath()}roundShape(t,n,l=!1,o){return t.length<3?this:(l?JA(this,t,n,o):kA(this,t,n),this.closePath())}filletRect(t,n,l,o,f){if(f===0)return this.rect(t,n,l,o);const d=Math.min(l,o)/2,m=Math.min(d,Math.max(-d,f)),g=t+l,v=n+o,_=m<0?-m:0,b=Math.abs(m);return this.moveTo(t,n+b).arcTo(t+_,n+_,t+b,n,b).lineTo(g-b,n).arcTo(g-_,n+_,g,n+b,b).lineTo(g,v-b).arcTo(g-_,v-_,t+l-b,v,b).lineTo(t+b,v).arcTo(t+_,v-_,t,v-b,b).closePath()}chamferRect(t,n,l,o,f,d){if(f<=0)return this.rect(t,n,l,o);const m=Math.min(f,Math.min(l,o)/2),g=t+l,v=n+o,_=[t+m,n,g-m,n,g,n+m,g,v-m,g-m,v,t+m,v,t,v-m,t,n+m];for(let b=_.length-1;b>=2;b-=2)_[b]===_[b-2]&&_[b-1]===_[b-3]&&_.splice(b-1,2);return this.poly(_,!0,d)}ellipse(t,n,l,o,f){return this.drawShape(new Qg(t,n,l,o),f),this}roundRect(t,n,l,o,f,d){return this.drawShape(new Zg(t,n,l,o,f),d),this}drawShape(t,n){return this.endPoly(),this.shapePrimitives.push({shape:t,transform:n}),this}startPoly(t,n){let l=this._currentPoly;return l&&this.endPoly(),l=new Lh,l.points.push(t,n),this._currentPoly=l,this}endPoly(t=!1){const n=this._currentPoly;return n&&n.points.length>2&&(n.closePath=t,this.shapePrimitives.push({shape:n})),this._currentPoly=null,this}_ensurePoly(t=!0){if(!this._currentPoly&&(this._currentPoly=new Lh,t)){const n=this.shapePrimitives[this.shapePrimitives.length-1];if(n){let l=n.shape.x,o=n.shape.y;if(n.transform&&!n.transform.isIdentity()){const f=n.transform,d=l;l=f.a*l+f.c*o+f.tx,o=f.b*d+f.d*o+f.ty}this._currentPoly.points.push(l,o)}else this._currentPoly.points.push(0,0)}}buildPath(){const t=this._graphicsPath2D;this.shapePrimitives.length=0,this._currentPoly=null;for(let n=0;n<t.instructions.length;n++){const l=t.instructions[n];this[l.action](...l.data)}this.finish()}get bounds(){const t=this._bounds;t.clear();const n=this.shapePrimitives;for(let l=0;l<n.length;l++){const o=n[l],f=o.shape.getBounds(PA);o.transform?t.addRect(f,o.transform):t.addRect(f)}return t}}class Js{constructor(t,n=!1){this.instructions=[],this.uid=rn("graphicsPath"),this._dirty=!0,this.checkForHoles=n,typeof t=="string"?vC(t,this):this.instructions=(t==null?void 0:t.slice())??[]}get shapePath(){return this._shapePath||(this._shapePath=new WA(this)),this._dirty&&(this._dirty=!1,this._shapePath.buildPath()),this._shapePath}addPath(t,n){return t=t.clone(),this.instructions.push({action:"addPath",data:[t,n]}),this._dirty=!0,this}arc(...t){return this.instructions.push({action:"arc",data:t}),this._dirty=!0,this}arcTo(...t){return this.instructions.push({action:"arcTo",data:t}),this._dirty=!0,this}arcToSvg(...t){return this.instructions.push({action:"arcToSvg",data:t}),this._dirty=!0,this}bezierCurveTo(...t){return this.instructions.push({action:"bezierCurveTo",data:t}),this._dirty=!0,this}bezierCurveToShort(t,n,l,o,f){const d=this.instructions[this.instructions.length-1],m=this.getLastPoint(ha.shared);let g=0,v=0;if(!d||d.action!=="bezierCurveTo")g=m.x,v=m.y;else{g=d.data[2],v=d.data[3];const _=m.x,b=m.y;g=_+(_-g),v=b+(b-v)}return this.instructions.push({action:"bezierCurveTo",data:[g,v,t,n,l,o,f]}),this._dirty=!0,this}closePath(){return this.instructions.push({action:"closePath",data:[]}),this._dirty=!0,this}ellipse(...t){return this.instructions.push({action:"ellipse",data:t}),this._dirty=!0,this}lineTo(...t){return this.instructions.push({action:"lineTo",data:t}),this._dirty=!0,this}moveTo(...t){return this.instructions.push({action:"moveTo",data:t}),this}quadraticCurveTo(...t){return this.instructions.push({action:"quadraticCurveTo",data:t}),this._dirty=!0,this}quadraticCurveToShort(t,n,l){const o=this.instructions[this.instructions.length-1],f=this.getLastPoint(ha.shared);let d=0,m=0;if(!o||o.action!=="quadraticCurveTo")d=f.x,m=f.y;else{d=o.data[0],m=o.data[1];const g=f.x,v=f.y;d=g+(g-d),m=v+(v-m)}return this.instructions.push({action:"quadraticCurveTo",data:[d,m,t,n,l]}),this._dirty=!0,this}rect(t,n,l,o,f){return this.instructions.push({action:"rect",data:[t,n,l,o,f]}),this._dirty=!0,this}circle(t,n,l,o){return this.instructions.push({action:"circle",data:[t,n,l,o]}),this._dirty=!0,this}roundRect(...t){return this.instructions.push({action:"roundRect",data:t}),this._dirty=!0,this}poly(...t){return this.instructions.push({action:"poly",data:t}),this._dirty=!0,this}regularPoly(...t){return this.instructions.push({action:"regularPoly",data:t}),this._dirty=!0,this}roundPoly(...t){return this.instructions.push({action:"roundPoly",data:t}),this._dirty=!0,this}roundShape(...t){return this.instructions.push({action:"roundShape",data:t}),this._dirty=!0,this}filletRect(...t){return this.instructions.push({action:"filletRect",data:t}),this._dirty=!0,this}chamferRect(...t){return this.instructions.push({action:"chamferRect",data:t}),this._dirty=!0,this}star(t,n,l,o,f,d,m){f||(f=o/2);const g=-1*Math.PI/2+d,v=l*2,_=Math.PI*2/v,b=[];for(let C=0;C<v;C++){const E=C%2?f:o,M=C*_+g;b.push(t+E*Math.cos(M),n+E*Math.sin(M))}return this.poly(b,!0,m),this}clone(t=!1){const n=new Js;if(n.checkForHoles=this.checkForHoles,!t)n.instructions=this.instructions.slice();else for(let l=0;l<this.instructions.length;l++){const o=this.instructions[l];n.instructions.push({action:o.action,data:o.data.slice()})}return n}clear(){return this.instructions.length=0,this._dirty=!0,this}transform(t){if(t.isIdentity())return this;const n=t.a,l=t.b,o=t.c,f=t.d,d=t.tx,m=t.ty;let g=0,v=0,_=0,b=0,C=0,E=0,M=0,R=0;for(let z=0;z<this.instructions.length;z++){const O=this.instructions[z],B=O.data;switch(O.action){case"moveTo":case"lineTo":g=B[0],v=B[1],B[0]=n*g+o*v+d,B[1]=l*g+f*v+m;break;case"bezierCurveTo":_=B[0],b=B[1],C=B[2],E=B[3],g=B[4],v=B[5],B[0]=n*_+o*b+d,B[1]=l*_+f*b+m,B[2]=n*C+o*E+d,B[3]=l*C+f*E+m,B[4]=n*g+o*v+d,B[5]=l*g+f*v+m;break;case"quadraticCurveTo":_=B[0],b=B[1],g=B[2],v=B[3],B[0]=n*_+o*b+d,B[1]=l*_+f*b+m,B[2]=n*g+o*v+d,B[3]=l*g+f*v+m;break;case"arcToSvg":g=B[5],v=B[6],M=B[0],R=B[1],B[0]=n*M+o*R,B[1]=l*M+f*R,B[5]=n*g+o*v+d,B[6]=l*g+f*v+m;break;case"circle":B[4]=Uh(B[3],t);break;case"rect":B[4]=Uh(B[4],t);break;case"ellipse":B[8]=Uh(B[8],t);break;case"roundRect":B[5]=Uh(B[5],t);break;case"addPath":B[0].transform(t);break;case"poly":B[2]=Uh(B[2],t);break;default:Ha("unknown transform action",O.action);break}}return this._dirty=!0,this}get bounds(){return this.shapePath.bounds}getLastPoint(t){let n=this.instructions.length-1,l=this.instructions[n];if(!l)return t.x=0,t.y=0,t;for(;l.action==="closePath";){if(n--,n<0)return t.x=0,t.y=0,t;l=this.instructions[n]}switch(l.action){case"moveTo":case"lineTo":t.x=l.data[0],t.y=l.data[1];break;case"quadraticCurveTo":t.x=l.data[2],t.y=l.data[3];break;case"bezierCurveTo":t.x=l.data[4],t.y=l.data[5];break;case"arc":case"arcToSvg":t.x=l.data[5],t.y=l.data[6];break;case"addPath":l.data[0].getLastPoint(t);break}return t}}function Uh(i,t){return i?i.prepend(t):t.clone()}function sn(i,t,n){const l=i.getAttribute(t);return l?Number(l):n}function FA(i,t){const n=i.querySelectorAll("defs");for(let l=0;l<n.length;l++){const o=n[l];for(let f=0;f<o.children.length;f++){const d=o.children[f];switch(d.nodeName.toLowerCase()){case"lineargradient":t.defs[d.id]=IA(d);break;case"radialgradient":t.defs[d.id]=$A();break}}}}function IA(i){const t=sn(i,"x1",0),n=sn(i,"y1",0),l=sn(i,"x2",1),o=sn(i,"y2",0),f=i.getAttribute("gradientUnits")||"objectBoundingBox",d=new Ws(t,n,l,o,f==="objectBoundingBox"?"local":"global");for(let m=0;m<i.children.length;m++){const g=i.children[m],v=sn(g,"offset",0),_=Mn.shared.setValue(g.getAttribute("stop-color")).toNumber();d.addColorStop(v,_)}return d}function $A(i){return Ha("[SVG Parser] Radial gradients are not yet supported"),new Ws(0,0,1,0)}function v1(i){const t=i.match(/url\s*\(\s*['"]?\s*#([^'"\s)]+)\s*['"]?\s*\)/i);return t?t[1]:""}const x1={fill:{type:"paint",default:0},"fill-opacity":{type:"number",default:1},stroke:{type:"paint",default:0},"stroke-width":{type:"number",default:1},"stroke-opacity":{type:"number",default:1},"stroke-linecap":{type:"string",default:"butt"},"stroke-linejoin":{type:"string",default:"miter"},"stroke-miterlimit":{type:"number",default:10},"stroke-dasharray":{type:"string",default:"none"},"stroke-dashoffset":{type:"number",default:0},opacity:{type:"number",default:1}};function w_(i,t){const n=i.getAttribute("style"),l={},o={},f={strokeStyle:l,fillStyle:o,useFill:!1,useStroke:!1};for(const d in x1){const m=i.getAttribute(d);m&&_1(t,f,d,m.trim())}if(n){const d=n.split(";");for(let m=0;m<d.length;m++){const g=d[m].trim(),[v,_]=g.split(":");x1[v]&&_1(t,f,v,_.trim())}}return{strokeStyle:f.useStroke?l:null,fillStyle:f.useFill?o:null,useFill:f.useFill,useStroke:f.useStroke}}function _1(i,t,n,l){switch(n){case"stroke":if(l!=="none"){if(l.startsWith("url(")){const o=v1(l);t.strokeStyle.fill=i.defs[o]}else t.strokeStyle.color=Mn.shared.setValue(l).toNumber();t.useStroke=!0}break;case"stroke-width":t.strokeStyle.width=Number(l);break;case"fill":if(l!=="none"){if(l.startsWith("url(")){const o=v1(l);t.fillStyle.fill=i.defs[o]}else t.fillStyle.color=Mn.shared.setValue(l).toNumber();t.useFill=!0}break;case"fill-opacity":t.fillStyle.alpha=Number(l);break;case"stroke-opacity":t.strokeStyle.alpha=Number(l);break;case"opacity":t.fillStyle.alpha=Number(l),t.strokeStyle.alpha=Number(l);break}}function t3(i){if(i.length<=2)return!0;const t=i.map(m=>m.area).sort((m,g)=>g-m),[n,l]=t,o=t[t.length-1],f=n/l,d=l/o;return!(f>3&&d<2)}function e3(i){return i.split(/(?=[Mm])/).filter(l=>l.trim().length>0)}function n3(i){const t=i.match(/[-+]?[0-9]*\.?[0-9]+/g);if(!t||t.length<4)return 0;const n=t.map(Number),l=[],o=[];for(let _=0;_<n.length;_+=2)_+1<n.length&&(l.push(n[_]),o.push(n[_+1]));if(l.length===0||o.length===0)return 0;const f=Math.min(...l),d=Math.max(...l),m=Math.min(...o),g=Math.max(...o);return(d-f)*(g-m)}function S1(i,t){const n=new Js(i,!1);for(const l of n.instructions)t.instructions.push(l)}function a3(i,t){if(typeof i=="string"){const d=document.createElement("div");d.innerHTML=i.trim(),i=d.querySelector("svg")}const n={context:t,defs:{},path:new Js};FA(i,n);const l=i.children,{fillStyle:o,strokeStyle:f}=w_(i,n);for(let d=0;d<l.length;d++){const m=l[d];m.nodeName.toLowerCase()!=="defs"&&H_(m,n,o,f)}return t}function H_(i,t,n,l){const o=i.children,{fillStyle:f,strokeStyle:d}=w_(i,t);f&&n?n={...n,...f}:f&&(n=f),d&&l?l={...l,...d}:d&&(l=d);const m=!n&&!l;m&&(n={color:0});let g,v,_,b,C,E,M,R,z,O,B,U,G,Z,Q,K,gt;switch(i.nodeName.toLowerCase()){case"path":{Z=i.getAttribute("d");const ct=i.getAttribute("fill-rule"),ht=e3(Z),dt=ct==="evenodd",vt=ht.length>1;if(dt&&vt){const xt=ht.map(w=>({path:w,area:n3(w)}));if(xt.sort((w,H)=>H.area-w.area),ht.length>3||!t3(xt))for(let w=0;w<xt.length;w++){const H=xt[w],at=w===0;t.context.beginPath();const et=new Js(void 0,!0);S1(H.path,et),t.context.path(et),at?(n&&t.context.fill(n),l&&t.context.stroke(l)):t.context.cut()}else for(let w=0;w<xt.length;w++){const H=xt[w],at=w%2===1;t.context.beginPath();const et=new Js(void 0,!0);S1(H.path,et),t.context.path(et),at?t.context.cut():(n&&t.context.fill(n),l&&t.context.stroke(l))}}else{const xt=ct?ct==="evenodd":!0;Q=new Js(Z,xt),t.context.path(Q),n&&t.context.fill(n),l&&t.context.stroke(l)}break}case"circle":M=sn(i,"cx",0),R=sn(i,"cy",0),z=sn(i,"r",0),t.context.ellipse(M,R,z,z),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"rect":g=sn(i,"x",0),v=sn(i,"y",0),K=sn(i,"width",0),gt=sn(i,"height",0),O=sn(i,"rx",0),B=sn(i,"ry",0),O||B?t.context.roundRect(g,v,K,gt,O||B):t.context.rect(g,v,K,gt),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"ellipse":M=sn(i,"cx",0),R=sn(i,"cy",0),O=sn(i,"rx",0),B=sn(i,"ry",0),t.context.beginPath(),t.context.ellipse(M,R,O,B),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"line":_=sn(i,"x1",0),b=sn(i,"y1",0),C=sn(i,"x2",0),E=sn(i,"y2",0),t.context.beginPath(),t.context.moveTo(_,b),t.context.lineTo(C,E),l&&t.context.stroke(l);break;case"polygon":G=i.getAttribute("points"),U=G.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(U,!0),n&&t.context.fill(n),l&&t.context.stroke(l);break;case"polyline":G=i.getAttribute("points"),U=G.match(/-?\d+/g).map(ct=>parseInt(ct,10)),t.context.poly(U,!1),l&&t.context.stroke(l);break;case"g":case"svg":break;default:{Ha(`[SVG parser] <${i.nodeName}> elements unsupported`);break}}m&&(n=null);for(let ct=0;ct<o.length;ct++)H_(o[ct],t,n,l)}const b1={repeat:{addressModeU:"repeat",addressModeV:"repeat"},"repeat-x":{addressModeU:"repeat",addressModeV:"clamp-to-edge"},"repeat-y":{addressModeU:"clamp-to-edge",addressModeV:"repeat"},"no-repeat":{addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"}};class Cp{constructor(t,n){this.uid=rn("fillPattern"),this._tick=0,this.transform=new ie,this.texture=t,this.transform.scale(1/t.frame.width,1/t.frame.height),n&&(t.source.style.addressModeU=b1[n].addressModeU,t.source.style.addressModeV=b1[n].addressModeV)}setTransform(t){const n=this.texture;this.transform.copyFrom(t),this.transform.invert(),this.transform.scale(1/n.frame.width,1/n.frame.height),this._tick++}get texture(){return this._texture}set texture(t){this._texture!==t&&(this._texture=t,this._tick++)}get styleKey(){return`fill-pattern-${this.uid}-${this._tick}`}destroy(){this.texture.destroy(!0),this.texture=null}}function i3(i){return Mn.isColorLike(i)}function T1(i){return i instanceof Cp}function E1(i){return i instanceof Ws}function l3(i){return i instanceof Re}function s3(i,t,n){const l=Mn.shared.setValue(t??0);return i.color=l.toNumber(),i.alpha=l.alpha===1?n.alpha:l.alpha,i.texture=Re.WHITE,{...n,...i}}function u3(i,t,n){return i.texture=t,{...n,...i}}function C1(i,t,n){return i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,{...n,...i}}function A1(i,t,n){return t.buildGradient(),i.fill=t,i.color=16777215,i.texture=t.texture,i.matrix=t.transform,i.textureSpace=t.textureSpace,{...n,...i}}function r3(i,t){const n={...t,...i},l=Mn.shared.setValue(n.color);return n.alpha*=l.alpha,n.color=l.toNumber(),n}function eo(i,t){if(i==null)return null;const n={},l=i;return i3(i)?s3(n,i,t):l3(i)?u3(n,i,t):T1(i)?C1(n,i,t):E1(i)?A1(n,i,t):l.fill&&T1(l.fill)?C1(l,l.fill,t):l.fill&&E1(l.fill)?A1(l,l.fill,t):r3(l,t)}function cp(i,t){const{width:n,alignment:l,miterLimit:o,cap:f,join:d,pixelLine:m,...g}=t,v=eo(i,g);return v?{width:n,alignment:l,miterLimit:o,cap:f,join:d,pixelLine:m,...v}:null}function o3(i,t){let n=1;const l=i.shapePath.shapePrimitives;for(let o=0;o<l.length;o++){const f=l[o].shape;if(f.type!=="polygon")continue;const d=f.points,m=d.length;if(m<6)continue;const g=f.closePath;for(let v=0;v<m;v+=2){if(!g&&(v===0||v===m-2))continue;const _=(v-2+m)%m,b=(v+2)%m,C=d[_],E=d[_+1],M=d[v],R=d[v+1],z=d[b],O=d[b+1],B=C-M,U=E-R,G=z-M,Z=O-R,Q=B*B+U*U,K=G*G+Z*Z;if(Q<1e-12||K<1e-12)continue;let ht=(B*G+U*Z)/Math.sqrt(Q*K);ht<-1?ht=-1:ht>1&&(ht=1);const dt=Math.sqrt((1-ht)*.5);if(dt<1e-6)continue;const vt=Math.min(1/dt,t);vt>n&&(n=vt)}}return n}const c3=new ha,M1=new ie,Wg=class is extends us{constructor(){super(...arguments),this._gpuData=Object.create(null),this.autoGarbageCollect=!0,this._gcLastUsed=-1,this.uid=rn("graphicsContext"),this.dirty=!0,this.batchMode="auto",this.instructions=[],this.destroyed=!1,this._activePath=new Js,this._transform=new ie,this._fillStyle={...is.defaultFillStyle},this._strokeStyle={...is.defaultStrokeStyle},this._stateStack=[],this._tick=0,this._bounds=new Vi,this._boundsDirty=!0}clone(){const t=new is;return t.batchMode=this.batchMode,t.instructions=this.instructions.slice(),t._activePath=this._activePath.clone(),t._transform=this._transform.clone(),t._fillStyle={...this._fillStyle},t._strokeStyle={...this._strokeStyle},t._stateStack=this._stateStack.slice(),t._bounds=this._bounds.clone(),t._boundsDirty=!0,t}get fillStyle(){return this._fillStyle}set fillStyle(t){this._fillStyle=eo(t,is.defaultFillStyle)}get strokeStyle(){return this._strokeStyle}set strokeStyle(t){this._strokeStyle=cp(t,is.defaultStrokeStyle)}setFillStyle(t){return this._fillStyle=eo(t,is.defaultFillStyle),this}setStrokeStyle(t){return this._strokeStyle=eo(t,is.defaultStrokeStyle),this}texture(t,n,l,o,f,d){return this.instructions.push({action:"texture",data:{image:t,dx:l||0,dy:o||0,dw:f||t.frame.width,dh:d||t.frame.height,transform:this._transform.clone(),alpha:this._fillStyle.alpha,style:n||n===0?Mn.shared.setValue(n).toNumber():16777215}}),this.onUpdate(),this}beginPath(){return this._activePath=new Js,this}fill(t,n){let l;const o=this.instructions[this.instructions.length-1];return this._tick===0&&(o==null?void 0:o.action)==="stroke"?l=o.data.path:l=this._activePath.clone(),l?(t!=null&&(n!==void 0&&typeof t=="number"&&(he(un,"GraphicsContext.fill(color, alpha) is deprecated, use GraphicsContext.fill({ color, alpha }) instead"),t={color:t,alpha:n}),this._fillStyle=eo(t,is.defaultFillStyle)),this.instructions.push({action:"fill",data:{style:this.fillStyle,path:l}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}_initNextPathLocation(){const{x:t,y:n}=this._activePath.getLastPoint(ha.shared);this._activePath.clear(),this._activePath.moveTo(t,n)}stroke(t){let n;const l=this.instructions[this.instructions.length-1];return this._tick===0&&(l==null?void 0:l.action)==="fill"?n=l.data.path:n=this._activePath.clone(),n?(t!=null&&(this._strokeStyle=cp(t,is.defaultStrokeStyle)),this.instructions.push({action:"stroke",data:{style:this.strokeStyle,path:n}}),this.onUpdate(),this._initNextPathLocation(),this._tick=0,this):this}cut(){for(let t=0;t<2;t++){const n=this.instructions[this.instructions.length-1-t],l=this._activePath.clone();if(n&&(n.action==="stroke"||n.action==="fill"))if(n.data.hole)n.data.hole.addPath(l);else{n.data.hole=l;break}}return this._initNextPathLocation(),this}arc(t,n,l,o,f,d){this._tick++;const m=this._transform;return this._activePath.arc(m.a*t+m.c*n+m.tx,m.b*t+m.d*n+m.ty,l,o,f,d),this}arcTo(t,n,l,o,f){this._tick++;const d=this._transform;return this._activePath.arcTo(d.a*t+d.c*n+d.tx,d.b*t+d.d*n+d.ty,d.a*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,f),this}arcToSvg(t,n,l,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.arcToSvg(t,n,l,o,f,g.a*d+g.c*m+g.tx,g.b*d+g.d*m+g.ty),this}bezierCurveTo(t,n,l,o,f,d,m){this._tick++;const g=this._transform;return this._activePath.bezierCurveTo(g.a*t+g.c*n+g.tx,g.b*t+g.d*n+g.ty,g.a*l+g.c*o+g.tx,g.b*l+g.d*o+g.ty,g.a*f+g.c*d+g.tx,g.b*f+g.d*d+g.ty,m),this}closePath(){var t;return this._tick++,(t=this._activePath)==null||t.closePath(),this}ellipse(t,n,l,o){return this._tick++,this._activePath.ellipse(t,n,l,o,this._transform.clone()),this}circle(t,n,l){return this._tick++,this._activePath.circle(t,n,l,this._transform.clone()),this}path(t){return this._tick++,this._activePath.addPath(t,this._transform.clone()),this}lineTo(t,n){this._tick++;const l=this._transform;return this._activePath.lineTo(l.a*t+l.c*n+l.tx,l.b*t+l.d*n+l.ty),this}moveTo(t,n){this._tick++;const l=this._transform,o=this._activePath.instructions,f=l.a*t+l.c*n+l.tx,d=l.b*t+l.d*n+l.ty;return o.length===1&&o[0].action==="moveTo"?(o[0].data[0]=f,o[0].data[1]=d,this):(this._activePath.moveTo(f,d),this)}quadraticCurveTo(t,n,l,o,f){this._tick++;const d=this._transform;return this._activePath.quadraticCurveTo(d.a*t+d.c*n+d.tx,d.b*t+d.d*n+d.ty,d.a*l+d.c*o+d.tx,d.b*l+d.d*o+d.ty,f),this}rect(t,n,l,o){return this._tick++,this._activePath.rect(t,n,l,o,this._transform.clone()),this}roundRect(t,n,l,o,f){return this._tick++,this._activePath.roundRect(t,n,l,o,f,this._transform.clone()),this}poly(t,n){return this._tick++,this._activePath.poly(t,n,this._transform.clone()),this}regularPoly(t,n,l,o,f=0,d){return this._tick++,this._activePath.regularPoly(t,n,l,o,f,d),this}roundPoly(t,n,l,o,f,d){return this._tick++,this._activePath.roundPoly(t,n,l,o,f,d),this}roundShape(t,n,l,o){return this._tick++,this._activePath.roundShape(t,n,l,o),this}filletRect(t,n,l,o,f){return this._tick++,this._activePath.filletRect(t,n,l,o,f),this}chamferRect(t,n,l,o,f,d){return this._tick++,this._activePath.chamferRect(t,n,l,o,f,d),this}star(t,n,l,o,f=0,d=0){return this._tick++,this._activePath.star(t,n,l,o,f,d,this._transform.clone()),this}svg(t){return this._tick++,a3(t,this),this}restore(){const t=this._stateStack.pop();return t&&(this._transform=t.transform,this._fillStyle=t.fillStyle,this._strokeStyle=t.strokeStyle),this}save(){return this._stateStack.push({transform:this._transform.clone(),fillStyle:{...this._fillStyle},strokeStyle:{...this._strokeStyle}}),this}getTransform(){return this._transform}resetTransform(){return this._transform.identity(),this}rotate(t){return this._transform.rotate(t),this}scale(t,n=t){return this._transform.scale(t,n),this}setTransform(t,n,l,o,f,d){return t instanceof ie?(this._transform.set(t.a,t.b,t.c,t.d,t.tx,t.ty),this):(this._transform.set(t,n,l,o,f,d),this)}transform(t,n,l,o,f,d){return t instanceof ie?(this._transform.append(t),this):(M1.set(t,n,l,o,f,d),this._transform.append(M1),this)}translate(t,n=t){return this._transform.translate(t,n),this}clear(){return this._activePath.clear(),this.instructions.length=0,this.resetTransform(),this.onUpdate(),this}onUpdate(){this._boundsDirty=!0,this.dirty=!0,this.emit("update",this,16)}get bounds(){if(!this._boundsDirty)return this._bounds;this._boundsDirty=!1;const t=this._bounds;t.clear();for(let n=0;n<this.instructions.length;n++){const l=this.instructions[n],o=l.action;if(o==="fill"){const f=l.data;t.addBounds(f.path.bounds)}else if(o==="texture"){const f=l.data;t.addFrame(f.dx,f.dy,f.dx+f.dw,f.dy+f.dh,f.transform)}if(o==="stroke"){const f=l.data,d=f.style.alignment;let m=f.style.width*(1-d);f.style.join==="miter"&&(m*=o3(f.path,f.style.miterLimit));const g=f.path.bounds;t.addFrame(g.minX-m,g.minY-m,g.maxX+m,g.maxY+m)}}return t.isValid||t.set(0,0,0,0),t}containsPoint(t){var o;if(!this.bounds.containsPoint(t.x,t.y))return!1;const n=this.instructions;let l=!1;for(let f=0;f<n.length;f++){const d=n[f],m=d.data,g=m.path;if(!d.action||!g)continue;const v=m.style,_=g.shapePath.shapePrimitives;for(let b=0;b<_.length;b++){const C=_[b].shape;if(!v||!C)continue;const E=_[b].transform,M=E?E.applyInverse(t,c3):t;if(d.action==="fill")l=C.contains(M.x,M.y);else{const z=v;l=C.strokeContains(M.x,M.y,z.width,z.alignment)}const R=m.hole;if(R){const z=(o=R.shapePath)==null?void 0:o.shapePrimitives;if(z)for(let O=0;O<z.length;O++)z[O].shape.contains(M.x,M.y)&&(l=!1)}if(l)return!0}}return l}unload(){var t;this.emit("unload",this);for(const n in this._gpuData)(t=this._gpuData[n])==null||t.destroy();this._gpuData=Object.create(null)}destroy(t=!1){if(this.destroyed)return;if(this.destroyed=!0,this._stateStack.length=0,this._transform=null,this.unload(),this.emit("destroy",this),this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const l=typeof t=="boolean"?t:t==null?void 0:t.textureSource;this._fillStyle.texture&&(this._fillStyle.fill&&"uid"in this._fillStyle.fill?this._fillStyle.fill.destroy():this._fillStyle.texture.destroy(l)),this._strokeStyle.texture&&(this._strokeStyle.fill&&"uid"in this._strokeStyle.fill?this._strokeStyle.fill.destroy():this._strokeStyle.texture.destroy(l))}this._fillStyle=null,this._strokeStyle=null,this.instructions=null,this._activePath=null,this._bounds=null,this._stateStack=null,this.customShader=null,this._transform=null}};Wg.defaultFillStyle={color:16777215,alpha:1,texture:Re.WHITE,matrix:null,fill:null,textureSpace:"local"};Wg.defaultStrokeStyle={width:1,color:16777215,alpha:1,alignment:.5,miterLimit:10,cap:"butt",join:"miter",texture:Re.WHITE,matrix:null,fill:null,textureSpace:"local",pixelLine:!1};let vl=Wg;class f3{constructor(){this.isBatchable=!1}reset(){this.isBatchable=!1,this.context=null,this.graphicsData&&(this.graphicsData.destroy(),this.graphicsData=null)}destroy(){this.reset()}}class h3{constructor(){this.instructions=new Gg}init(){this.instructions.reset()}destroy(){this.instructions.destroy(),this.instructions=null}}const Fg=class bg{constructor(t){this._renderer=t,this._managedContexts=new ed({renderer:t,type:"resource",name:"graphicsContext"})}init(t){bg.defaultOptions.bezierSmoothness=(t==null?void 0:t.bezierSmoothness)??bg.defaultOptions.bezierSmoothness}getContextRenderData(t){return this.getGpuContext(t).graphicsData||this._initContextRenderData(t)}updateGpuContext(t){const n=t._gpuData,l=!!n[this._renderer.uid],o=n[this._renderer.uid]||this._initContext(t);return(t.dirty||!l)&&(l&&o.reset(),o.isBatchable=!1,t.dirty=!1),o}getGpuContext(t){return t._gpuData[this._renderer.uid]||this._initContext(t)}_initContextRenderData(t){const n=new h3,l=this.getGpuContext(t);return l.graphicsData=n,n.init(),n}_initContext(t){const n=new f3;return n.context=t,t._gpuData[this._renderer.uid]=n,this._managedContexts.add(t),n}destroy(){this._managedContexts.destroy(),this._renderer=null}};Fg.extension={type:[Pt.CanvasSystem],name:"graphicsContext"};Fg.defaultOptions={bezierSmoothness:.5};let d3=Fg;class G_{constructor(t,n){this.state=Lg.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new ed({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){return!1}addRenderable(t,n){this._managedGraphics.add(t),this.renderer.renderPipes.batch.break(n),n.add(t)}updateRenderable(t){}execute(t){t.isRenderable&&this._adaptor.execute(this,t)}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null}}G_.extension={type:[Pt.CanvasPipes],name:"graphics"};function m3(i,t,n){const l=(i>>24&255)/255;t[n++]=(i&255)/255*l,t[n++]=(i>>8&255)/255*l,t[n++]=(i>>16&255)/255*l,t[n++]=l}class p3{constructor(){this.batches=[],this.batched=!1}destroy(){this.batches.forEach(t=>{Wa.return(t)}),this.batches.length=0}}class j_{constructor(t,n){this.state=Lg.for2d(),this.renderer=t,this._adaptor=n,this.renderer.runners.contextChange.add(this),this._managedGraphics=new ed({renderer:t,type:"renderable",priority:-1,name:"graphics"})}contextChange(){this._adaptor.contextChange(this.renderer)}validateRenderable(t){const n=t.context,l=!!t._gpuData,f=this.renderer.graphicsContext.updateGpuContext(n);return!!(f.isBatchable||l!==f.isBatchable)}addRenderable(t,n){const o=this.renderer.graphicsContext.updateGpuContext(t.context);t.didViewUpdate&&this._rebuild(t),o.isBatchable?this._addToBatcher(t,n):(this.renderer.renderPipes.batch.break(n),n.add(t))}updateRenderable(t){const l=this._getGpuDataForRenderable(t).batches;for(let o=0;o<l.length;o++){const f=l[o];f._batcher.updateElement(f)}}execute(t){if(!t.isRenderable)return;const n=this.renderer,l=t.context;if(!n.graphicsContext.getGpuContext(l).batches.length)return;const f=l.customShader||this._adaptor.shader;this.state.blendMode=t.groupBlendMode;const d=f.resources.localUniforms.uniforms;d.uTransformMatrix=t.groupTransform,d.uRound=n._roundPixels|t._roundPixels,m3(t.groupColorAlpha,d.uColor,0),this._adaptor.execute(this,t)}_rebuild(t){const n=this._getGpuDataForRenderable(t),o=this.renderer.graphicsContext.updateGpuContext(t.context);n.destroy(),o.isBatchable&&this._updateBatchesForRenderable(t,n)}_addToBatcher(t,n){const l=this.renderer.renderPipes.batch,o=this._getGpuDataForRenderable(t).batches;for(let f=0;f<o.length;f++){const d=o[f];l.addToBatch(d,n)}}_getGpuDataForRenderable(t){return t._gpuData[this.renderer.uid]||this._initGpuDataForRenderable(t)}_initGpuDataForRenderable(t){const n=new p3;return t._gpuData[this.renderer.uid]=n,this._managedGraphics.add(t),n}_updateBatchesForRenderable(t,n){const l=t.context,f=this.renderer.graphicsContext.getGpuContext(l),d=this.renderer._roundPixels|t._roundPixels;n.batches=f.batches.map(m=>{const g=Wa.get(Kg);return m.copyTo(g),g.renderable=t,g.roundPixels=d,g})}destroy(){this._managedGraphics.destroy(),this.renderer=null,this._adaptor.destroy(),this._adaptor=null,this.state=null}}j_.extension={type:[Pt.WebGLPipes,Pt.WebGPUPipes],name:"graphics"};Fe.add(G_);Fe.add(j_);Fe.add(d3);Fe.add(Pg);class Yi extends jg{constructor(t){t instanceof vl&&(t={context:t});const{context:n,roundPixels:l,...o}=t||{};super({label:"Graphics",...o}),this.renderPipeId="graphics",n?this.context=n:(this.context=this._ownedContext=new vl,this.context.autoGarbageCollect=this.autoGarbageCollect),this.didViewUpdate=!0,this.allowChildren=!1,this.roundPixels=l??!1}set context(t){t!==this._context&&(this._context&&(this._context.off("update",this.onViewUpdate,this),this._context.off("unload",this.unload,this)),this._context=t,this._context.on("update",this.onViewUpdate,this),this._context.on("unload",this.unload,this),this.onViewUpdate())}get context(){return this._context}get bounds(){return this._context.bounds}updateBounds(){}containsPoint(t){return this._context.containsPoint(t)}destroy(t){this._ownedContext&&!t?this._ownedContext.destroy(t):(t===!0||(t==null?void 0:t.context)===!0)&&this._context.destroy(t),this._ownedContext=null,this._context=null,super.destroy(t)}_onTouch(t){this._gcLastUsed=t,this._context._gcLastUsed=t}_callContextMethod(t,n){return this.context[t](...n),this}setFillStyle(...t){return this._callContextMethod("setFillStyle",t)}setStrokeStyle(...t){return this._callContextMethod("setStrokeStyle",t)}fill(...t){return this._callContextMethod("fill",t)}stroke(...t){return this._callContextMethod("stroke",t)}texture(...t){return this._callContextMethod("texture",t)}beginPath(){return this._callContextMethod("beginPath",[])}cut(){return this._callContextMethod("cut",[])}arc(...t){return this._callContextMethod("arc",t)}arcTo(...t){return this._callContextMethod("arcTo",t)}arcToSvg(...t){return this._callContextMethod("arcToSvg",t)}bezierCurveTo(...t){return this._callContextMethod("bezierCurveTo",t)}closePath(){return this._callContextMethod("closePath",[])}ellipse(...t){return this._callContextMethod("ellipse",t)}circle(...t){return this._callContextMethod("circle",t)}path(...t){return this._callContextMethod("path",t)}lineTo(...t){return this._callContextMethod("lineTo",t)}moveTo(...t){return this._callContextMethod("moveTo",t)}quadraticCurveTo(...t){return this._callContextMethod("quadraticCurveTo",t)}rect(...t){return this._callContextMethod("rect",t)}roundRect(...t){return this._callContextMethod("roundRect",t)}poly(...t){return this._callContextMethod("poly",t)}regularPoly(...t){return this._callContextMethod("regularPoly",t)}roundPoly(...t){return this._callContextMethod("roundPoly",t)}roundShape(...t){return this._callContextMethod("roundShape",t)}filletRect(...t){return this._callContextMethod("filletRect",t)}chamferRect(...t){return this._callContextMethod("chamferRect",t)}star(...t){return this._callContextMethod("star",t)}svg(...t){return this._callContextMethod("svg",t)}restore(...t){return this._callContextMethod("restore",t)}save(){return this._callContextMethod("save",[])}getTransform(){return this.context.getTransform()}resetTransform(){return this._callContextMethod("resetTransform",[])}rotateTransform(...t){return this._callContextMethod("rotate",t)}scaleTransform(...t){return this._callContextMethod("scale",t)}setTransform(...t){return this._callContextMethod("setTransform",t)}transform(...t){return this._callContextMethod("transform",t)}translateTransform(...t){return this._callContextMethod("translate",t)}clear(){return this._callContextMethod("clear",[])}get fillStyle(){return this._context.fillStyle}set fillStyle(t){this._context.fillStyle=t}get strokeStyle(){return this._context.strokeStyle}set strokeStyle(t){this._context.strokeStyle=t}clone(t=!1){return t?new Yi(this._context.clone()):(this._ownedContext=null,new Yi(this._context))}lineStyle(t,n,l){he(un,"Graphics#lineStyle is no longer needed. Use Graphics#setStrokeStyle to set the stroke style.");const o={};return t&&(o.width=t),n&&(o.color=n),l&&(o.alpha=l),this.context.strokeStyle=o,this}beginFill(t,n){he(un,"Graphics#beginFill is no longer needed. Use Graphics#fill to fill the shape with the desired style.");const l={};return t!==void 0&&(l.color=t),n!==void 0&&(l.alpha=n),this.context.fillStyle=l,this}endFill(){he(un,"Graphics#endFill is no longer needed. Use Graphics#fill to fill the shape with the desired style."),this.context.fill();const t=this.context.strokeStyle;return(t.width!==vl.defaultStrokeStyle.width||t.color!==vl.defaultStrokeStyle.color||t.alpha!==vl.defaultStrokeStyle.alpha)&&this.context.stroke(),this}drawCircle(...t){return he(un,"Graphics#drawCircle has been renamed to Graphics#circle"),this._callContextMethod("circle",t)}drawEllipse(...t){return he(un,"Graphics#drawEllipse has been renamed to Graphics#ellipse"),this._callContextMethod("ellipse",t)}drawPolygon(...t){return he(un,"Graphics#drawPolygon has been renamed to Graphics#poly"),this._callContextMethod("poly",t)}drawRect(...t){return he(un,"Graphics#drawRect has been renamed to Graphics#rect"),this._callContextMethod("rect",t)}drawRoundedRect(...t){return he(un,"Graphics#drawRoundedRect has been renamed to Graphics#roundRect"),this._callContextMethod("roundRect",t)}drawStar(...t){return he(un,"Graphics#drawStar has been renamed to Graphics#star"),this._callContextMethod("star",t)}}class y3 extends jg{constructor(t,n){const{text:l,resolution:o,style:f,anchor:d,width:m,height:g,roundPixels:v,..._}=t;super({..._}),this.batched=!0,this._resolution=null,this._autoResolution=!0,this._didTextUpdate=!0,this._styleClass=n,this.text=l??"",this.style=f,this.resolution=o??null,this.allowChildren=!1,this._anchor=new Pn({_onUpdate:()=>{this.onViewUpdate()}}),d&&(this.anchor=d),this.roundPixels=v??!1,m!==void 0&&(this.width=m),g!==void 0&&(this.height=g)}get anchor(){return this._anchor}set anchor(t){typeof t=="number"?this._anchor.set(t):this._anchor.copyFrom(t)}set text(t){t=t.toString(),this._text!==t&&(this._text=t,this.onViewUpdate())}get text(){return this._text}set resolution(t){this._autoResolution=t===null,this._resolution=t,this.onViewUpdate()}get resolution(){return this._resolution}get style(){return this._style}set style(t){var n;t||(t={}),(n=this._style)==null||n.off("update",this.onViewUpdate,this),t instanceof this._styleClass?this._style=t:this._style=new this._styleClass(t),this._style.on("update",this.onViewUpdate,this),this.onViewUpdate()}get width(){return Math.abs(this.scale.x)*this.bounds.width}set width(t){this._setWidth(t,this.bounds.width)}get height(){return Math.abs(this.scale.y)*this.bounds.height}set height(t){this._setHeight(t,this.bounds.height)}getSize(t){return t||(t={}),t.width=Math.abs(this.scale.x)*this.bounds.width,t.height=Math.abs(this.scale.y)*this.bounds.height,t}setSize(t,n){typeof t=="object"?(n=t.height??t.width,t=t.width):n??(n=t),t!==void 0&&this._setWidth(t,this.bounds.width),n!==void 0&&this._setHeight(n,this.bounds.height)}containsPoint(t){const n=this.bounds.width,l=this.bounds.height,o=-n*this.anchor.x;let f=0;return t.x>=o&&t.x<=o+n&&(f=-l*this.anchor.y,t.y>=f&&t.y<=f+l)}onViewUpdate(){this.didViewUpdate||(this._didTextUpdate=!0),super.onViewUpdate()}destroy(t=!1){super.destroy(t),this.owner=null,this._bounds=null,this._anchor=null,(typeof t=="boolean"?t:t!=null&&t.style)&&this._style.destroy(t),this._style=null,this._text=null}get styleKey(){return`${this._text}:${this._style.styleKey}:${this._resolution}`}}function g3(i,t){let n=i[0]??{};return(typeof n=="string"||i[1])&&(he(un,`use new ${t}({ text: "hi!", style }) instead`),n={text:n,style:i[1]}),n}class v3{constructor(t){this._canvasPool=Object.create(null),this.canvasOptions=t||{},this.enableFullScreen=!1}_createCanvasAndContext(t,n){const l=hi.get().createCanvas();l.width=t,l.height=n;const o=l.getContext("2d");return{canvas:l,context:o}}getOptimalCanvasAndContext(t,n,l=1){t=Math.ceil(t*l-1e-6),n=Math.ceil(n*l-1e-6),t=Hc(t),n=Hc(n);const o=(t<<17)+(n<<1);this._canvasPool[o]||(this._canvasPool[o]=[]);let f=this._canvasPool[o].pop();return f||(f=this._createCanvasAndContext(t,n)),f}returnCanvasAndContext(t){const n=t.canvas,{width:l,height:o}=n,f=(l<<17)+(o<<1);t.context.resetTransform(),t.context.clearRect(0,0,l,o),this._canvasPool[f].push(t)}clear(){this._canvasPool={}}}const Tg=new v3;$h.register(Tg);let Jr=null,Zs=null;function x3(i,t){Jr||(Jr=hi.get().createCanvas(256,128),Zs=Jr.getContext("2d",{willReadFrequently:!0}),Zs.globalCompositeOperation="copy",Zs.globalAlpha=1),(Jr.width<i||Jr.height<t)&&(Jr.width=Hc(i),Jr.height=Hc(t))}function R1(i,t,n){for(let l=0,o=4*n*t;l<t;++l,o+=4)if(i[o+3]!==0)return!1;return!0}function z1(i,t,n,l,o){const f=4*t;for(let d=l,m=l*f+4*n;d<=o;++d,m+=f)if(i[m+3]!==0)return!1;return!0}function _3(...i){let t=i[0];t.canvas||(t={canvas:i[0],resolution:i[1]});const{canvas:n}=t,l=Math.min(t.resolution??1,1),o=t.width??n.width,f=t.height??n.height;let d=t.output;if(x3(o,f),!Zs)throw new TypeError("Failed to get canvas 2D context");Zs.drawImage(n,0,0,o,f,0,0,o*l,f*l);const g=Zs.getImageData(0,0,o,f).data;let v=0,_=0,b=o-1,C=f-1;for(;_<f&&R1(g,o,_);)++_;if(_===f)return dn.EMPTY;for(;R1(g,o,C);)--C;for(;z1(g,o,v,_,C);)++v;for(;z1(g,o,b,_,C);)--b;return++b,++C,Zs.globalCompositeOperation="source-over",Zs.strokeRect(v,_,b-v,C-_),Zs.globalCompositeOperation="copy",d??(d=new dn),d.set(v/l,_/l,(b-v)/l,(C-_)/l),d}/**
|
|
299
|
+
* tiny-lru
|
|
300
|
+
*
|
|
301
|
+
* @copyright 2026 Jason Mulligan <jason.mulligan@avoidwork.com>
|
|
302
|
+
* @license BSD-3-Clause
|
|
303
|
+
* @version 11.4.7
|
|
304
|
+
*/class S3{constructor(t=0,n=0,l=!1){this.first=null,this.items=Object.create(null),this.last=null,this.max=t,this.resetTtl=l,this.size=0,this.ttl=n}clear(){return this.first=null,this.items=Object.create(null),this.last=null,this.size=0,this}delete(t){if(this.has(t)){const n=this.items[t];delete this.items[t],this.size--,n.prev!==null&&(n.prev.next=n.next),n.next!==null&&(n.next.prev=n.prev),this.first===n&&(this.first=n.next),this.last===n&&(this.last=n.prev)}return this}entries(t=this.keys()){const n=new Array(t.length);for(let l=0;l<t.length;l++){const o=t[l];n[l]=[o,this.get(o)]}return n}evict(t=!1){if(t||this.size>0){const n=this.first;delete this.items[n.key],--this.size===0?(this.first=null,this.last=null):(this.first=n.next,this.first.prev=null)}return this}expiresAt(t){let n;return this.has(t)&&(n=this.items[t].expiry),n}get(t){const n=this.items[t];if(n!==void 0){if(this.ttl>0&&n.expiry<=Date.now()){this.delete(t);return}return this.moveToEnd(n),n.value}}has(t){return t in this.items}moveToEnd(t){this.last!==t&&(t.prev!==null&&(t.prev.next=t.next),t.next!==null&&(t.next.prev=t.prev),this.first===t&&(this.first=t.next),t.prev=this.last,t.next=null,this.last!==null&&(this.last.next=t),this.last=t,this.first===null&&(this.first=t))}keys(){const t=new Array(this.size);let n=this.first,l=0;for(;n!==null;)t[l++]=n.key,n=n.next;return t}setWithEvicted(t,n,l=this.resetTtl){let o=null;if(this.has(t))this.set(t,n,!0,l);else{this.max>0&&this.size===this.max&&(o={...this.first},this.evict(!0));let f=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:n};++this.size===1?this.first=f:this.last.next=f,this.last=f}return o}set(t,n,l=!1,o=this.resetTtl){let f=this.items[t];return l||f!==void 0?(f.value=n,l===!1&&o&&(f.expiry=this.ttl>0?Date.now()+this.ttl:this.ttl),this.moveToEnd(f)):(this.max>0&&this.size===this.max&&this.evict(!0),f=this.items[t]={expiry:this.ttl>0?Date.now()+this.ttl:this.ttl,key:t,prev:this.last,next:null,value:n},++this.size===1?this.first=f:this.last.next=f,this.last=f),this}values(t=this.keys()){const n=new Array(t.length);for(let l=0;l<t.length;l++)n[l]=this.get(t[l]);return n}}function b3(i=1e3,t=0,n=!1){if(isNaN(i)||i<0)throw new TypeError("Invalid max value");if(isNaN(t)||t<0)throw new TypeError("Invalid ttl value");if(typeof n!="boolean")throw new TypeError("Invalid resetTtl value");return new S3(i,t,n)}function q_(i){return!!i.tagStyles&&Object.keys(i.tagStyles).length>0}function Y_(i){return i.includes("<")}function T3(i,t){return i.clone().assign(t)}function E3(i,t){const n=[],l=t.tagStyles;if(!q_(t)||!Y_(i))return n.push({text:i,style:t}),n;const o=[t],f=[];let d="",m=0;for(;m<i.length;){const g=i[m];if(g==="<"){const v=i.indexOf(">",m);if(v===-1){d+=g,m++;continue}const _=i.slice(m+1,v);if(_.startsWith("/")){const b=_.slice(1).trim();if(f.length>0&&f[f.length-1]===b){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d=""),o.pop(),f.pop(),m=v+1;continue}else{d+=i.slice(m,v+1),m=v+1;continue}}else{const b=_.trim();if(l[b]){d.length>0&&(n.push({text:d,style:o[o.length-1]}),d="");const C=o[o.length-1],E=T3(C,l[b]);o.push(E),f.push(b),m=v+1;continue}else{d+=i.slice(m,v+1),m=v+1;continue}}}else d+=g,m++}return d.length>0&&n.push({text:d,style:o[o.length-1]}),n}const C3=[10,13],A3=new Set(C3),M3=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288],R3=new Set(M3),z3=[9,32];new Set(z3);const D3=[45,8208,8211,8212,173],O3=new Set(D3),N3=/(\r\n|\r|\n)/,U3=/(?:\r\n|\r|\n)/;function fp(i){return typeof i!="string"?!1:A3.has(i.charCodeAt(0))}function Xi(i,t){return typeof i!="string"?!1:R3.has(i.charCodeAt(0))}function B3(i){return typeof i!="string"?!1:O3.has(i.charCodeAt(0))}function L_(i){return i==="normal"||i==="pre-line"}function X_(i){return i==="normal"}function Qs(i){if(typeof i!="string")return"";let t=i.length-1;for(;t>=0&&Xi(i[t]);)t--;return t<i.length-1?i.slice(0,t+1):i}function V_(i){const t=[],n=[];if(typeof i!="string")return t;for(let l=0;l<i.length;l++){const o=i[l],f=i[l+1];if(Xi(o)||fp(o)){n.length>0&&(t.push(n.join("")),n.length=0),o==="\r"&&f===`
|
|
305
|
+
`?(t.push(`\r
|
|
306
|
+
`),l++):t.push(o);continue}n.push(o),B3(o)&&f&&!Xi(f)&&!fp(f)&&(t.push(n.join("")),n.length=0)}return n.length>0&&t.push(n.join("")),t}function Q_(i,t,n,l){const o=n(i),f=[];for(let d=0;d<o.length;d++){let m=o[d],g=m,v=1;for(;o[d+v];){const _=o[d+v];if(!l(g,_,i,d,t))m+=_,g=_,v++;else break}d+=v-1,f.push(m)}return f}const w3=/\r\n|\r|\n/g;function H3(i,t,n,l,o,f,d,m){var Dt,w;const g=E3(i,t);if(X_(t.whiteSpace))for(let H=0;H<g.length;H++){const at=g[H];g[H]={text:at.text.replace(w3," "),style:at.style}}const _=[];let b=[];for(const H of g){const at=H.text.split(N3);for(let et=0;et<at.length;et++){const ft=at[et];ft===`\r
|
|
307
|
+
`||ft==="\r"||ft===`
|
|
308
|
+
`?(_.push(b),b=[]):ft.length>0&&b.push({text:ft,style:H.style})}}(b.length>0||_.length===0)&&_.push(b);const C=n?G3(_,t,l,o,d,m):_,E=[],M=[],R=[],z=[],O=[];let B=0;const U=t._fontString,G=f(U);G.fontSize===0&&(G.fontSize=t.fontSize,G.ascent=t.fontSize);let Z="",Q=!!t.dropShadow,K=((Dt=t._stroke)==null?void 0:Dt.width)||0;for(const H of C){let at=0,et=G.ascent,ft=G.descent,j="";for(const st of H){const pt=st.style._fontString,Tt=f(pt);pt!==Z&&(l.font=pt,Z=pt);const Ot=o(st.text,st.style.letterSpacing,l);at+=Ot,et=Math.max(et,Tt.ascent),ft=Math.max(ft,Tt.descent),j+=st.text;const Bt=((w=st.style._stroke)==null?void 0:w.width)||0;Bt>K&&(K=Bt),!Q&&st.style.dropShadow&&(Q=!0)}H.length===0&&(et=G.ascent,ft=G.descent),E.push(at),M.push(et),R.push(ft),O.push(j);const I=t.lineHeight||et+ft;z.push(I+t.leading),B=Math.max(B,at)}const gt=K,dt=(n&&t.align!=="left"?Math.max(B,t.wordWrapWidth):B)+gt+(t.dropShadow?t.dropShadow.distance:0);let vt=0;for(let H=0;H<z.length;H++)vt+=z[H];vt=Math.max(vt,z[0]+gt);const _t=vt+(t.dropShadow?t.dropShadow.distance:0),xt=t.lineHeight||G.fontSize;return{width:dt,height:_t,lines:O,lineWidths:E,lineHeight:xt+t.leading,maxLineWidth:B,fontProperties:G,runsByLine:C,lineAscents:M,lineDescents:R,lineHeights:z,hasDropShadow:Q}}function G3(i,t,n,l,o,f){var z;const{letterSpacing:d,whiteSpace:m,wordWrapWidth:g,breakWords:v}=t,_=L_(m),b=g+d,C={};let E="";const M=(O,B)=>{const U=`${O}|${B.styleKey}`;let G=C[U];if(G===void 0){const Z=B._fontString;Z!==E&&(n.font=Z,E=Z),G=l(O,B.letterSpacing,n)+B.letterSpacing,C[U]=G}return G},R=[];for(const O of i){const B=j3(O),U=R.length,G=vt=>{let _t=0,xt=vt;do{const{token:Dt,style:w}=B[xt];_t+=M(Dt,w),xt++}while(xt<B.length&&B[xt].continuesFromPrevious);return _t},Z=vt=>{const _t=[];let xt=vt;do _t.push({token:B[xt].token,style:B[xt].style}),xt++;while(xt<B.length&&B[xt].continuesFromPrevious);return _t};let Q=[],K=0,gt=!_,ct=null;const ht=()=>{ct&&ct.text.length>0&&Q.push(ct),ct=null},dt=()=>{if(ht(),Q.length>0){const vt=Q[Q.length-1];vt.text=Qs(vt.text),vt.text.length===0&&Q.pop()}R.push(Q),Q=[],K=0,gt=!1};for(let vt=0;vt<B.length;vt++){const{token:_t,style:xt,continuesFromPrevious:Dt}=B[vt],w=M(_t,xt);if(_){const et=Xi(_t),ft=(ct==null?void 0:ct.text[ct.text.length-1])??((z=Q[Q.length-1])==null?void 0:z.text.slice(-1))??"",j=ft?Xi(ft):!1;if(et&&j)continue}const H=!Dt,at=H?G(vt):w;if(at>b&&H)if(K>0&&dt(),v){const et=Z(vt);for(let ft=0;ft<et.length;ft++){const j=et[ft].token,I=et[ft].style,st=Q_(j,v,f,o);for(const pt of st){const Tt=M(pt,I);Tt+K>b&&dt(),!ct||ct.style!==I?(ht(),ct={text:pt,style:I}):ct.text+=pt,K+=Tt}}vt+=et.length-1}else{const et=Z(vt);ht(),R.push(et.map(ft=>({text:ft.token,style:ft.style}))),gt=!1,vt+=et.length-1}else if(at+K>b&&H){if(Xi(_t)){gt=!1;continue}dt(),ct={text:_t,style:xt},K=w}else if(Dt&&!v)!ct||ct.style!==xt?(ht(),ct={text:_t,style:xt}):ct.text+=_t,K+=w;else{const et=Xi(_t);if(K===0&&et&&!gt)continue;!ct||ct.style!==xt?(ht(),ct={text:_t,style:xt}):ct.text+=_t,K+=w}}if(ht(),Q.length>0){const vt=Q[Q.length-1];vt.text=Qs(vt.text),vt.text.length===0&&Q.pop()}(Q.length>0||R.length===U)&&R.push(Q)}return R}function j3(i){const t=[];let n=!1;for(const l of i){const o=V_(l.text);let f=!0;for(const d of o){const m=Xi(d)||fp(d),g=f&&n&&!m;t.push({token:d,style:l.style,continuesFromPrevious:g}),n=!m,f=!1}}return t}const q3={willReadFrequently:!0};function D1(i,t,n,l,o){let f=n[i];return typeof f!="number"&&(f=o(i,t,l)+t,n[i]=f),f}function Y3(i,t,n,l,o,f,d){const m=n.getContext("2d",q3);m.font=t._fontString;let g=0,v="";const _=[],b=Object.create(null),{letterSpacing:C,whiteSpace:E}=t,M=L_(E),R=X_(E);let z=!M;const O=t.wordWrapWidth+C,B=V_(i);for(let G=0;G<B.length;G++){let Z=B[G];if(fp(Z)){if(!R){_.push(Qs(v)),z=!M,v="",g=0;continue}Z=" "}if(M){const K=Xi(Z),gt=Xi(v[v.length-1]);if(K&>)continue}const Q=D1(Z,C,b,m,l);if(Q>O)if(v!==""&&(_.push(Qs(v)),v="",g=0),o(Z,t.breakWords)){const K=Q_(Z,t.breakWords,d,f);for(const gt of K){const ct=D1(gt,C,b,m,l);ct+g>O&&(_.push(Qs(v)),z=!1,v="",g=0),v+=gt,g+=ct}}else v.length>0&&(_.push(Qs(v)),v="",g=0),_.push(Qs(Z)),z=!1,v="",g=0;else Q+g>O&&(z=!1,_.push(Qs(v)),v="",g=0),(v.length>0||!Xi(Z)||z)&&(v+=Z,g+=Q)}const U=Qs(v);return U.length>0&&_.push(U),_.join(`
|
|
309
|
+
`)}const O1={willReadFrequently:!0},Fs=class Yt{static get experimentalLetterSpacingSupported(){let t=Yt._experimentalLetterSpacingSupported;if(t===void 0){const n=hi.get().getCanvasRenderingContext2D().prototype;t=Yt._experimentalLetterSpacingSupported="letterSpacing"in n||"textLetterSpacing"in n}return t}constructor(t,n,l,o,f,d,m,g,v,_){this.text=t,this.style=n,this.width=l,this.height=o,this.lines=f,this.lineWidths=d,this.lineHeight=m,this.maxLineWidth=g,this.fontProperties=v,_&&(this.runsByLine=_.runsByLine,this.lineAscents=_.lineAscents,this.lineDescents=_.lineDescents,this.lineHeights=_.lineHeights,this.hasDropShadow=_.hasDropShadow)}static measureText(t=" ",n,l=Yt._canvas,o=n.wordWrap){var Z;const f=`${t}-${n.styleKey}-wordWrap-${o}`;if(Yt._measurementCache.has(f))return Yt._measurementCache.get(f);if(q_(n)&&Y_(t)){const Q=H3(t,n,o,Yt._context,Yt._measureText,Yt.measureFont,Yt.canBreakChars,Yt.wordWrapSplit),K=new Yt(t,n,Q.width,Q.height,Q.lines,Q.lineWidths,Q.lineHeight,Q.maxLineWidth,Q.fontProperties,{runsByLine:Q.runsByLine,lineAscents:Q.lineAscents,lineDescents:Q.lineDescents,lineHeights:Q.lineHeights,hasDropShadow:Q.hasDropShadow});return Yt._measurementCache.set(f,K),K}const m=n._fontString,g=Yt.measureFont(m);g.fontSize===0&&(g.fontSize=n.fontSize,g.ascent=n.fontSize,g.descent=0);const v=Yt._context;v.font=m;const b=(o?Yt._wordWrap(t,n,l):t).split(U3),C=new Array(b.length);let E=0;for(let Q=0;Q<b.length;Q++){const K=Yt._measureText(b[Q],n.letterSpacing,v);C[Q]=K,E=Math.max(E,K)}const M=((Z=n._stroke)==null?void 0:Z.width)??0,R=n.lineHeight||g.fontSize,z=Yt._getAlignWidth(E,n,o),O=Yt._adjustWidthForStyle(z,n),B=Math.max(R,g.fontSize+M)+(b.length-1)*(R+n.leading),U=Yt._adjustHeightForStyle(B,n),G=new Yt(t,n,O,U,b,C,R+n.leading,E,g);return Yt._measurementCache.set(f,G),G}static _adjustWidthForStyle(t,n){var f;const l=((f=n._stroke)==null?void 0:f.width)||0;let o=t+l;return n.dropShadow&&(o+=n.dropShadow.distance),o}static _adjustHeightForStyle(t,n){let l=t;return n.dropShadow&&(l+=n.dropShadow.distance),l}static _getAlignWidth(t,n,l){return l&&n.align!=="left"?Math.max(t,n.wordWrapWidth):t}static _measureText(t,n,l){let o=!1;Yt.experimentalLetterSpacingSupported&&(Yt.experimentalLetterSpacing?(l.letterSpacing=`${n}px`,l.textLetterSpacing=`${n}px`,o=!0):(l.letterSpacing="0px",l.textLetterSpacing="0px"));const f=l.measureText(t);let d=f.width;const m=-(f.actualBoundingBoxLeft??0);let v=(f.actualBoundingBoxRight??0)-m;if(d>0)if(o)d-=n,v-=n;else{const _=(Yt.graphemeSegmenter(t).length-1)*n;d+=_,v+=_}return Math.max(d,v)}static _wordWrap(t,n,l=Yt._canvas){return Y3(t,n,l,Yt._measureText,Yt.canBreakWords,Yt.canBreakChars,Yt.wordWrapSplit)}static isBreakingSpace(t,n){return Xi(t)}static canBreakWords(t,n){return n}static canBreakChars(t,n,l,o,f){return!0}static wordWrapSplit(t){return Yt.graphemeSegmenter(t)}static measureFont(t){if(Yt._fonts[t])return Yt._fonts[t];const n=Yt._context;n.font=t;const l=n.measureText(Yt.METRICS_STRING+Yt.BASELINE_SYMBOL),o=l.actualBoundingBoxAscent??0,f=l.actualBoundingBoxDescent??0,d={ascent:o,descent:f,fontSize:o+f};return Yt._fonts[t]=d,d}static clearMetrics(t=""){t?delete Yt._fonts[t]:Yt._fonts={}}static get _canvas(){if(!Yt.__canvas){let t;try{const n=new OffscreenCanvas(0,0),l=n.getContext("2d",O1);if(l!=null&&l.measureText)return Yt.__canvas=n,n;t=hi.get().createCanvas()}catch{t=hi.get().createCanvas()}t.width=t.height=10,Yt.__canvas=t}return Yt.__canvas}static get _context(){return Yt.__context||(Yt.__context=Yt._canvas.getContext("2d",O1)),Yt.__context}};Fs.METRICS_STRING="|ÉqÅ";Fs.BASELINE_SYMBOL="M";Fs.BASELINE_MULTIPLIER=1.4;Fs.HEIGHT_MULTIPLIER=2;Fs.graphemeSegmenter=(()=>{if(typeof(Intl==null?void 0:Intl.Segmenter)=="function"){const i=new Intl.Segmenter;return t=>{const n=i.segment(t),l=[];let o=0;for(const f of n)l[o++]=f.segment;return l}}return i=>[...i]})();Fs.experimentalLetterSpacing=!1;Fs._fonts={};Fs._measurementCache=b3(1e3);let Vu=Fs;const L3=["serif","sans-serif","monospace","cursive","fantasy","system-ui"];function Eg(i){const t=typeof i.fontSize=="number"?`${i.fontSize}px`:i.fontSize;let n=i.fontFamily;Array.isArray(i.fontFamily)||(n=i.fontFamily.split(","));for(let l=n.length-1;l>=0;l--){let o=n[l].trim();!/([\"\'])[^\'\"]+\1/.test(o)&&!L3.includes(o)&&(o=`"${o}"`),n[l]=o}return`${i.fontStyle} ${i.fontVariant} ${i.fontWeight} ${t} ${n.join(",")}`}const N1=1e5;function Wm(i,t,n,l=0,o=0,f=0){if(i.texture===Re.WHITE&&!i.fill)return Mn.shared.setValue(i.color).setAlpha(i.alpha??1).toHexa();if(i.fill){if(i.fill instanceof Cp){const d=i.fill,m=t.createPattern(d.texture.source.resource,"repeat"),g=d.transform.copyTo(ie.shared);return g.scale(d.texture.source.pixelWidth,d.texture.source.pixelHeight),m.setTransform(g),m}else if(i.fill instanceof Ws){const d=i.fill,m=d.type==="linear",g=d.textureSpace==="local";let v=1,_=1;g&&n&&(v=n.width+l,_=n.height+l);let b,C=!1;if(m){const{start:E,end:M}=d;b=t.createLinearGradient(E.x*v+o,E.y*_+f,M.x*v+o,M.y*_+f),C=Math.abs(M.x-E.x)<Math.abs((M.y-E.y)*.1)}else{const{center:E,innerRadius:M,outerCenter:R,outerRadius:z}=d;b=t.createRadialGradient(E.x*v+o,E.y*_+f,M*v,R.x*v+o,R.y*_+f,z*v)}if(C&&g&&n){const E=n.lineHeight/_;for(let M=0;M<n.lines.length;M++){const R=(M*n.lineHeight+l/2)/_;d.colorStops.forEach(z=>{let O=R+z.offset*E;O=Math.max(0,Math.min(1,O)),b.addColorStop(Math.floor(O*N1)/N1,Mn.shared.setValue(z.color).toHex())})}}else d.colorStops.forEach(E=>{b.addColorStop(E.offset,Mn.shared.setValue(E.color).toHex())});return b}}else{const d=t.createPattern(i.texture.source.resource,"repeat"),m=i.matrix.copyTo(ie.shared);return m.scale(i.texture.source.pixelWidth,i.texture.source.pixelHeight),d.setTransform(m),d}return Ha("FillStyle not recognised",i),"red"}const U1=new dn;function Cc(i){let t=0;for(let n=0;n<i.length;n++)i.charCodeAt(n)===32&&t++;return t}class X3{getCanvasAndContext(t){const{text:n,style:l,resolution:o=1}=t,f=l._getFinalPadding(),d=Vu.measureText(n||" ",l),m=Math.ceil(Math.ceil(Math.max(1,d.width)+f*2)*o),g=Math.ceil(Math.ceil(Math.max(1,d.height)+f*2)*o),v=Tg.getOptimalCanvasAndContext(m,g);this._renderTextToCanvas(l,f,o,v,d);const _=l.trim?_3({canvas:v.canvas,width:m,height:g,resolution:1,output:U1}):U1.set(0,0,m,g);return{canvasAndContext:v,frame:_}}returnCanvasAndContext(t){Tg.returnCanvasAndContext(t)}_renderTextToCanvas(t,n,l,o,f){var Q,K,gt;if(f.runsByLine&&f.runsByLine.length>0){this._renderTaggedTextToCanvas(f,t,n,l,o);return}const{canvas:d,context:m}=o,g=Eg(t),v=f.lines,_=f.lineHeight,b=f.lineWidths,C=f.maxLineWidth,E=f.fontProperties,M=d.height;if(m.resetTransform(),m.scale(l,l),m.textBaseline=t.textBaseline,(Q=t._stroke)!=null&&Q.width){const ct=t._stroke;m.lineWidth=ct.width,m.miterLimit=ct.miterLimit,m.lineJoin=ct.join,m.lineCap=ct.cap}m.font=g;let R,z;const O=t.dropShadow?2:1,B=t.wordWrap?t.wordWrapWidth:C,G=(((K=t._stroke)==null?void 0:K.width)??0)/2;let Z=(_-E.fontSize)/2;_-E.fontSize<0&&(Z=0);for(let ct=0;ct<O;++ct){const ht=t.dropShadow&&ct===0,dt=ht?Math.ceil(Math.max(1,M)+n*2):0,vt=dt*l;if(ht)this._setupDropShadow(m,t,l,vt);else{const _t=t._gradientBounds,xt=t._gradientOffset;if(_t){const Dt={width:_t.width,height:_t.height,lineHeight:_t.height,lines:f.lines};this._setFillAndStrokeStyles(m,t,Dt,n,G,(xt==null?void 0:xt.x)??0,(xt==null?void 0:xt.y)??0)}else xt?this._setFillAndStrokeStyles(m,t,f,n,G,xt.x,xt.y):this._setFillAndStrokeStyles(m,t,f,n,G);m.shadowColor="rgba(0,0,0,0)"}for(let _t=0;_t<v.length;_t++){R=G,z=G+_t*_+E.ascent+Z,R+=this._getAlignmentOffset(b[_t],B,t.align);let xt=0;if(t.align==="justify"&&t.wordWrap&&_t<v.length-1){const Dt=Cc(v[_t]);Dt>0&&(xt=(B-b[_t])/Dt)}(gt=t._stroke)!=null&>.width&&this._drawLetterSpacing(v[_t],t,o,R+n,z+n-dt,!0,xt),t._fill!==void 0&&this._drawLetterSpacing(v[_t],t,o,R+n,z+n-dt,!1,xt)}}}_renderTaggedTextToCanvas(t,n,l,o,f){var G,Z,Q;const{canvas:d,context:m}=f,{runsByLine:g,lineWidths:v,maxLineWidth:_,lineAscents:b,lineHeights:C,hasDropShadow:E}=t,M=d.height;m.resetTransform(),m.scale(o,o),m.textBaseline=n.textBaseline;const R=E?2:1,z=n.wordWrap?n.wordWrapWidth:_;let O=((G=n._stroke)==null?void 0:G.width)??0;for(const K of g)for(const gt of K){const ct=((Z=gt.style._stroke)==null?void 0:Z.width)??0;ct>O&&(O=ct)}const B=O/2,U=[];for(let K=0;K<g.length;K++){const gt=g[K],ct=[];for(const ht of gt){const dt=Eg(ht.style);m.font=dt,ct.push({width:Vu._measureText(ht.text,ht.style.letterSpacing,m),font:dt})}U.push(ct)}for(let K=0;K<R;++K){const gt=E&&K===0,ct=gt?Math.ceil(Math.max(1,M)+l*2):0,ht=ct*o;gt||(m.shadowColor="rgba(0,0,0,0)");let dt=B;for(let vt=0;vt<g.length;vt++){const _t=g[vt],xt=v[vt],Dt=b[vt],w=C[vt],H=U[vt];let at=B;at+=this._getAlignmentOffset(xt,z,n.align);let et=0;if(n.align==="justify"&&n.wordWrap&&vt<g.length-1){let I=0;for(const st of _t)I+=Cc(st.text);I>0&&(et=(z-xt)/I)}const ft=dt+Dt;let j=at+l;for(let I=0;I<_t.length;I++){const st=_t[I],{width:pt,font:Tt}=H[I];if(m.font=Tt,m.textBaseline=st.style.textBaseline,(Q=st.style._stroke)!=null&&Q.width){const Bt=st.style._stroke;if(m.lineWidth=Bt.width,m.miterLimit=Bt.miterLimit,m.lineJoin=Bt.join,m.lineCap=Bt.cap,gt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ht);else{const ce=Cc(st.text);j+=pt+ce*et;continue}else{const ce=Vu.measureFont(Tt),oe=st.style.lineHeight||ce.fontSize,ma={width:pt,height:oe,lineHeight:oe,lines:[st.text]};m.strokeStyle=Wm(Bt,m,ma,l*2,j-l,dt)}this._drawLetterSpacing(st.text,st.style,f,j,ft+l-ct,!0,et)}const Ot=Cc(st.text);j+=pt+Ot*et}j=at+l;for(let I=0;I<_t.length;I++){const st=_t[I],{width:pt,font:Tt}=H[I];if(m.font=Tt,m.textBaseline=st.style.textBaseline,st.style._fill!==void 0){if(gt)if(st.style.dropShadow)this._setupDropShadow(m,st.style,o,ht);else{const Bt=Cc(st.text);j+=pt+Bt*et;continue}else{const Bt=Vu.measureFont(Tt),ce=st.style.lineHeight||Bt.fontSize,oe={width:pt,height:ce,lineHeight:ce,lines:[st.text]};m.fillStyle=Wm(st.style._fill,m,oe,l*2,j-l,dt)}this._drawLetterSpacing(st.text,st.style,f,j,ft+l-ct,!1,et)}const Ot=Cc(st.text);j+=pt+Ot*et}dt+=w}}}_setFillAndStrokeStyles(t,n,l,o,f,d=0,m=0){var g;if(t.fillStyle=n._fill?Wm(n._fill,t,l,o*2,d,m):null,(g=n._stroke)!=null&&g.width){const v=f+o*2;t.strokeStyle=Wm(n._stroke,t,l,v,d,m)}}_setupDropShadow(t,n,l,o){t.fillStyle="black",t.strokeStyle="black";const f=n.dropShadow,d=f.color,m=f.alpha;t.shadowColor=Mn.shared.setValue(d).setAlpha(m).toRgbaString();const g=f.blur*l,v=f.distance*l;t.shadowBlur=g,t.shadowOffsetX=Math.cos(f.angle)*v,t.shadowOffsetY=Math.sin(f.angle)*v+o}_getAlignmentOffset(t,n,l){return l==="right"?n-t:l==="center"?(n-t)/2:0}_drawLetterSpacing(t,n,l,o,f,d=!1,m=0){const{context:g}=l,v=n.letterSpacing;let _=!1;if(Vu.experimentalLetterSpacingSupported&&(Vu.experimentalLetterSpacing?(g.letterSpacing=`${v}px`,g.textLetterSpacing=`${v}px`,_=!0):(g.letterSpacing="0px",g.textLetterSpacing="0px")),(v===0||_)&&m===0){d?g.strokeText(t,o,f):g.fillText(t,o,f);return}if(m!==0&&(v===0||_)){const R=t.split(" ");let z=o;const O=g.measureText(" ").width;for(let B=0;B<R.length;B++)d?g.strokeText(R[B],z,f):g.fillText(R[B],z,f),z+=g.measureText(R[B]).width+O+m;return}let b=o;const C=Vu.graphemeSegmenter(t);let E=g.measureText(t).width,M=0;for(let R=0;R<C.length;++R){const z=C[R];d?g.strokeText(z,b,f):g.fillText(z,b,f);let O="";for(let B=R+1;B<C.length;++B)O+=C[B];M=g.measureText(O).width,b+=E-M+v,z===" "&&(b+=m),E=M}}}const Uc=new X3,Ig=class to extends us{constructor(t={}){super(),this.uid=rn("textStyle"),this._tick=0,this._cachedFontString=null,V3(t),t instanceof to&&(t=t._toObject());const o={...to.defaultTextStyle,...t};for(const f in o){const d=f;this[d]=o[f]}this._tagStyles=t.tagStyles??void 0,this.update(),this._tick=0}get align(){return this._align}set align(t){this._align!==t&&(this._align=t,this.update())}get breakWords(){return this._breakWords}set breakWords(t){this._breakWords!==t&&(this._breakWords=t,this.update())}get dropShadow(){return this._dropShadow}set dropShadow(t){this._dropShadow!==t&&(t!==null&&typeof t=="object"?this._dropShadow=this._createProxy({...to.defaultDropShadow,...t}):this._dropShadow=t?this._createProxy({...to.defaultDropShadow}):null,this.update())}get fontFamily(){return this._fontFamily}set fontFamily(t){this._fontFamily!==t&&(this._fontFamily=t,this.update())}get fontSize(){return this._fontSize}set fontSize(t){this._fontSize!==t&&(typeof t=="string"?this._fontSize=parseInt(t,10):this._fontSize=t,this.update())}get fontStyle(){return this._fontStyle}set fontStyle(t){this._fontStyle!==t&&(this._fontStyle=t.toLowerCase(),this.update())}get fontVariant(){return this._fontVariant}set fontVariant(t){this._fontVariant!==t&&(this._fontVariant=t,this.update())}get fontWeight(){return this._fontWeight}set fontWeight(t){this._fontWeight!==t&&(this._fontWeight=t,this.update())}get leading(){return this._leading}set leading(t){this._leading!==t&&(this._leading=t,this.update())}get letterSpacing(){return this._letterSpacing}set letterSpacing(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.update())}get lineHeight(){return this._lineHeight}set lineHeight(t){this._lineHeight!==t&&(this._lineHeight=t,this.update())}get padding(){return this._padding}set padding(t){this._padding!==t&&(this._padding=t,this.update())}get filters(){return this._filters}set filters(t){this._filters!==t&&(this._filters=Object.freeze(t),this.update())}get trim(){return this._trim}set trim(t){this._trim!==t&&(this._trim=t,this.update())}get textBaseline(){return this._textBaseline}set textBaseline(t){this._textBaseline!==t&&(this._textBaseline=t,this.update())}get whiteSpace(){return this._whiteSpace}set whiteSpace(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.update())}get wordWrap(){return this._wordWrap}set wordWrap(t){this._wordWrap!==t&&(this._wordWrap=t,this.update())}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.update())}get fill(){return this._originalFill}set fill(t){t!==this._originalFill&&(this._originalFill=t,this._isFillStyle(t)&&(this._originalFill=this._createProxy({...vl.defaultFillStyle,...t},()=>{this._fill=eo({...this._originalFill},vl.defaultFillStyle)})),this._fill=eo(t===0?"black":t,vl.defaultFillStyle),this.update())}get stroke(){return this._originalStroke}set stroke(t){t!==this._originalStroke&&(this._originalStroke=t,this._isFillStyle(t)&&(this._originalStroke=this._createProxy({...vl.defaultStrokeStyle,...t},()=>{this._stroke=cp({...this._originalStroke},vl.defaultStrokeStyle)})),this._stroke=cp(t,vl.defaultStrokeStyle),this.update())}get tagStyles(){return this._tagStyles}set tagStyles(t){this._tagStyles!==t&&(this._tagStyles=t??void 0,this.update())}update(){this._tick++,this._cachedFontString=null,this.emit("update",this)}reset(){const t=to.defaultTextStyle;for(const n in t)this[n]=t[n]}assign(t){for(const n in t){const l=n;this[l]=t[n]}return this}get styleKey(){return`${this.uid}-${this._tick}`}get _fontString(){return this._cachedFontString===null&&(this._cachedFontString=Eg(this)),this._cachedFontString}_toObject(){return{align:this.align,breakWords:this.breakWords,dropShadow:this._dropShadow?{...this._dropShadow}:null,fill:this._fill?{...this._fill}:void 0,fontFamily:this.fontFamily,fontSize:this.fontSize,fontStyle:this.fontStyle,fontVariant:this.fontVariant,fontWeight:this.fontWeight,leading:this.leading,letterSpacing:this.letterSpacing,lineHeight:this.lineHeight,padding:this.padding,stroke:this._stroke?{...this._stroke}:void 0,textBaseline:this.textBaseline,trim:this.trim,whiteSpace:this.whiteSpace,wordWrap:this.wordWrap,wordWrapWidth:this.wordWrapWidth,filters:this._filters?[...this._filters]:void 0,tagStyles:this._tagStyles?{...this._tagStyles}:void 0}}clone(){return new to(this._toObject())}_getFinalPadding(){let t=0;if(this._filters)for(let n=0;n<this._filters.length;n++)t+=this._filters[n].padding;return Math.max(this._padding,t)}destroy(t=!1){var l,o,f,d;if(this.removeAllListeners(),typeof t=="boolean"?t:t==null?void 0:t.texture){const m=typeof t=="boolean"?t:t==null?void 0:t.textureSource;(l=this._fill)!=null&&l.texture&&this._fill.texture.destroy(m),(o=this._originalFill)!=null&&o.texture&&this._originalFill.texture.destroy(m),(f=this._stroke)!=null&&f.texture&&this._stroke.texture.destroy(m),(d=this._originalStroke)!=null&&d.texture&&this._originalStroke.texture.destroy(m)}this._fill=null,this._stroke=null,this.dropShadow=null,this._originalStroke=null,this._originalFill=null}_createProxy(t,n){return new Proxy(t,{set:(l,o,f)=>(l[o]===f||(l[o]=f,n==null||n(o,f),this.update()),!0)})}_isFillStyle(t){return(t??null)!==null&&!(Mn.isColorLike(t)||t instanceof Ws||t instanceof Cp)}};Ig.defaultDropShadow={alpha:1,angle:Math.PI/6,blur:0,color:"black",distance:5};Ig.defaultTextStyle={align:"left",breakWords:!1,dropShadow:null,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,padding:0,stroke:null,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};let ao=Ig;function V3(i){const t=i;if(typeof t.dropShadow=="boolean"&&t.dropShadow){const n=ao.defaultDropShadow;i.dropShadow={alpha:t.dropShadowAlpha??n.alpha,angle:t.dropShadowAngle??n.angle,blur:t.dropShadowBlur??n.blur,color:t.dropShadowColor??n.color,distance:t.dropShadowDistance??n.distance}}if(t.strokeThickness!==void 0){he(un,"strokeThickness is now a part of stroke");const n=t.stroke;let l={};if(Mn.isColorLike(n))l.color=n;else if(n instanceof Ws||n instanceof Cp)l.fill=n;else if(Object.hasOwnProperty.call(n,"color")||Object.hasOwnProperty.call(n,"fill"))l=n;else throw new Error("Invalid stroke value.");i.stroke={...l,width:t.strokeThickness}}if(Array.isArray(t.fillGradientStops)){if(he(un,"gradient fill is now a fill pattern: `new FillGradient(...)`"),!Array.isArray(t.fill)||t.fill.length===0)throw new Error("Invalid fill value. Expected an array of colors for gradient fill.");t.fill.length!==t.fillGradientStops.length&&Ha("The number of fill colors must match the number of fill gradient stops.");const n=new Ws({start:{x:0,y:0},end:{x:0,y:1},textureSpace:"local"}),l=t.fillGradientStops.slice(),o=t.fill.map(f=>Mn.shared.setValue(f).toNumber());l.forEach((f,d)=>{n.addColorStop(f,o[d])}),i.fill={fill:n}}}function Q3(i,t){const{texture:n,bounds:l}=i,o=t._style._getFinalPadding();Dx(l,t._anchor,n);const f=t._anchor._x*o*2,d=t._anchor._y*o*2;l.minX-=o-f,l.minY-=o-d,l.maxX-=o-f,l.maxY-=o-d}class Z3{constructor(){this.batcherName="default",this.topology="triangle-list",this.attributeSize=4,this.indexSize=6,this.packAsQuad=!0,this.roundPixels=0,this._attributeStart=0,this._batcher=null,this._batch=null}get blendMode(){return this.renderable.groupBlendMode}get color(){return this.renderable.groupColorAlpha}reset(){this.renderable=null,this.texture=null,this._batcher=null,this._batch=null,this.bounds=null}destroy(){this.reset()}}class K3 extends Z3{}class Z_{constructor(t){this._renderer=t,t.runners.resolutionChange.add(this),this._managedTexts=new ed({renderer:t,type:"renderable",onUnload:this.onTextUnload.bind(this),name:"canvasText"})}resolutionChange(){for(const t in this._managedTexts.items){const n=this._managedTexts.items[t];n!=null&&n._autoResolution&&n.onViewUpdate()}}validateRenderable(t){const n=this._getGpuText(t),l=t.styleKey;return n.currentKey!==l?!0:t._didTextUpdate}addRenderable(t,n){const l=this._getGpuText(t);if(t._didTextUpdate){const o=t._autoResolution?this._renderer.resolution:t.resolution;(l.currentKey!==t.styleKey||t._resolution!==o)&&this._updateGpuText(t),t._didTextUpdate=!1,Q3(l,t)}this._renderer.renderPipes.batch.addToBatch(l,n)}updateRenderable(t){const n=this._getGpuText(t);n._batcher.updateElement(n)}_updateGpuText(t){const n=this._getGpuText(t);n.texture&&this._renderer.canvasText.decreaseReferenceCount(n.currentKey),t._resolution=t._autoResolution?this._renderer.resolution:t.resolution,n.texture=this._renderer.canvasText.getManagedTexture(t),n.currentKey=t.styleKey}_getGpuText(t){return t._gpuData[this._renderer.uid]||this.initGpuText(t)}initGpuText(t){const n=new K3;return n.currentKey="--",n.renderable=t,n.transform=t.groupTransform,n.bounds={minX:0,maxX:1,minY:0,maxY:0},n.roundPixels=this._renderer._roundPixels|t._roundPixels,t._gpuData[this._renderer.uid]=n,this._managedTexts.add(t),n}onTextUnload(t){const n=t._gpuData[this._renderer.uid];if(!n)return;const{canvasText:l}=this._renderer;l.getReferenceCount(n.currentKey)>0?l.decreaseReferenceCount(n.currentKey):n.texture&&l.returnTexture(n.texture)}destroy(){this._managedTexts.destroy(),this._renderer=null}}Z_.extension={type:[Pt.WebGLPipes,Pt.WebGPUPipes,Pt.CanvasPipes],name:"text"};const k3=new Vi;function J3(i,t,n,l,o=!1){const f=k3;f.minX=0,f.minY=0,f.maxX=i.width/l|0,f.maxY=i.height/l|0;const d=Sp.getOptimalTexture(f.width,f.height,l,!1,o);return d.source.uploadMethodId="image",d.source.resource=i,d.source.alphaMode="premultiply-alpha-on-upload",d.frame.width=t/l,d.frame.height=n/l,d.source.emit("update",d.source),d.updateUvs(),d}class K_{constructor(t,n){this._activeTextures={},this._renderer=t,this._retainCanvasContext=n}getTexture(t,n,l,o){typeof t=="string"&&(he("8.0.0","CanvasTextSystem.getTexture: Use object TextOptions instead of separate arguments"),t={text:t,style:l,resolution:n}),t.style instanceof ao||(t.style=new ao(t.style)),t.textureStyle instanceof Gc||(t.textureStyle=new Gc(t.textureStyle)),typeof t.text!="string"&&(t.text=t.text.toString());const{text:f,style:d,textureStyle:m,autoGenerateMipmaps:g}=t,v=t.resolution??this._renderer.resolution,{frame:_,canvasAndContext:b}=Uc.getCanvasAndContext({text:f,style:d,resolution:v}),C=J3(b.canvas,_.width,_.height,v,g);if(m&&(C.source.style=m),d.trim&&(_.pad(d.padding),C.frame.copyFrom(_),C.frame.scale(1/v),C.updateUvs()),d.filters){const E=this._applyFilters(C,d.filters);return this.returnTexture(C),Uc.returnCanvasAndContext(b),E}return this._renderer.texture.initSource(C._source),this._retainCanvasContext||Uc.returnCanvasAndContext(b),C}returnTexture(t){const n=t.source,l=n.resource;if(this._retainCanvasContext&&(l!=null&&l.getContext)){const o=l.getContext("2d");o&&Uc.returnCanvasAndContext({canvas:l,context:o})}n.resource=null,n.uploadMethodId="unknown",n.alphaMode="no-premultiply-alpha",Sp.returnTexture(t,!0)}renderTextToCanvas(){he("8.10.0","CanvasTextSystem.renderTextToCanvas: no longer supported, use CanvasTextSystem.getTexture instead")}getManagedTexture(t){t._resolution=t._autoResolution?this._renderer.resolution:t.resolution;const n=t.styleKey;if(this._activeTextures[n])return this._increaseReferenceCount(n),this._activeTextures[n].texture;const l=this.getTexture({text:t.text,style:t.style,resolution:t._resolution,textureStyle:t.textureStyle,autoGenerateMipmaps:t.autoGenerateMipmaps});return this._activeTextures[n]={texture:l,usageCount:1},l}decreaseReferenceCount(t){const n=this._activeTextures[t];n&&(n.usageCount--,n.usageCount===0&&(this.returnTexture(n.texture),this._activeTextures[t]=null))}getReferenceCount(t){var n;return((n=this._activeTextures[t])==null?void 0:n.usageCount)??0}_increaseReferenceCount(t){this._activeTextures[t].usageCount++}_applyFilters(t,n){const l=this._renderer.renderTarget.renderTarget,o=this._renderer.filter.generateFilteredTexture({texture:t,filters:n});return this._renderer.renderTarget.bind(l,!1),o}destroy(){this._renderer=null;for(const t in this._activeTextures)this._activeTextures[t]&&this.returnTexture(this._activeTextures[t].texture);this._activeTextures=null}}class k_ extends K_{constructor(t){super(t,!0)}}k_.extension={type:[Pt.CanvasSystem],name:"canvasText"};class J_ extends K_{constructor(t){super(t,!1)}}J_.extension={type:[Pt.WebGLSystem,Pt.WebGPUSystem],name:"canvasText"};Fe.add(k_);Fe.add(J_);Fe.add(Z_);class P_ extends y3{constructor(...t){const n=g3(t,"Text");super(n,ao),this.renderPipeId="text",n.textureStyle&&(this.textureStyle=n.textureStyle instanceof Gc?n.textureStyle:new Gc(n.textureStyle)),this.autoGenerateMipmaps=n.autoGenerateMipmaps??Qi.defaultOptions.autoGenerateMipmaps}updateBounds(){const t=this._bounds,n=this._anchor;let l=0,o=0;if(this._style.trim){const{frame:f,canvasAndContext:d}=Uc.getCanvasAndContext({text:this.text,style:this._style,resolution:1});Uc.returnCanvasAndContext(d),l=f.width,o=f.height}else{const f=Vu.measureText(this._text,this._style);l=f.width,o=f.height}t.minX=-n._x*l,t.maxX=t.minX+l,t.minY=-n._y*o,t.maxY=t.minY+o}}Fe.add(_T,ST);var Ky={exports:{}},Vs={};/**
|
|
310
|
+
* @license React
|
|
311
|
+
* react-reconciler-constants.production.js
|
|
312
|
+
*
|
|
313
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
314
|
+
*
|
|
315
|
+
* This source code is licensed under the MIT license found in the
|
|
316
|
+
* LICENSE file in the root directory of this source tree.
|
|
317
|
+
*/var B1;function P3(){return B1||(B1=1,Vs.ConcurrentRoot=1,Vs.ContinuousEventPriority=8,Vs.DefaultEventPriority=32,Vs.DiscreteEventPriority=2,Vs.IdleEventPriority=268435456,Vs.LegacyRoot=0,Vs.NoEventPriority=0),Vs}var w1;function W3(){return w1||(w1=1,Ky.exports=P3()),Ky.exports}var Bc=W3();const $g=X.createContext({}),F3=$g.Provider;$g.Consumer;function W_(i,t){const n=Object.getPrototypeOf(i),l=Object.getOwnPropertyDescriptor(n,t);return!(typeof l>"u"||l.writable||l.set)}const Zu={currentUpdatePriority:Bc.DefaultEventPriority,unmountQueue:new Set};function H1(i,...t){}function F_(i,t={}){const n=i;return n.__pixireact=Object.assign({filters:[],parent:null,root:null,type:""},t),n}var I3="0.0.0-development",$3={version:I3};function tM(){}function I_(i,t,n){t instanceof io&&(t.__pixireact.parent=i,typeof n=="number"?i.__pixireact.filters.splice(n,0,t):i.__pixireact.filters.push(t),i.filters=i.__pixireact.filters)}function ky(i,t){t&&(t instanceof da?i.addChild(t):t instanceof io&&I_(i,t))}function eM(){}function nM(){return!1}const Cg=Object.freeze({onclick:"onClick",onglobalmousemove:"onGlobalMouseMove",onglobalpointermove:"onGlobalPointerMove",onglobaltouchmove:"onGlobalTouchMove",onmousedown:"onMouseDown",onmouseenter:"onMouseEnter",onmouseleave:"onMouseLeave",onmousemove:"onMouseMove",onmouseout:"onMouseOut",onmouseover:"onMouseOver",onmouseup:"onMouseUp",onmouseupoutside:"onMouseUpOutside",onpointercancel:"onPointerCancel",onpointerdown:"onPointerDown",onpointerenter:"onPointerEnter",onpointerleave:"onPointerLeave",onpointermove:"onPointerMove",onpointerout:"onPointerOut",onpointerover:"onPointerOver",onpointertap:"onPointerTap",onpointerup:"onPointerUp",onpointerupoutside:"onPointerUpOutside",onrightclick:"onRightClick",onrightdown:"onRightDown",onrightup:"onRightUp",onrightupoutside:"onRightUpOutside",ontap:"onTap",ontouchcancel:"onTouchCancel",ontouchend:"onTouchEnd",ontouchendoutside:"onTouchEndOutside",ontouchmove:"onTouchMove",ontouchstart:"onTouchStart",onwheel:"onWheel"}),hp=Object.freeze({onClick:"onclick",onGlobalMouseMove:"onglobalmousemove",onGlobalPointerMove:"onglobalpointermove",onGlobalTouchMove:"onglobaltouchmove",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseUpOutside:"onmouseupoutside",onPointerCancel:"onpointercancel",onPointerDown:"onpointerdown",onPointerEnter:"onpointerenter",onPointerLeave:"onpointerleave",onPointerMove:"onpointermove",onPointerOut:"onpointerout",onPointerOver:"onpointerover",onPointerTap:"onpointertap",onPointerUp:"onpointerup",onPointerUpOutside:"onpointerupoutside",onRightClick:"onrightclick",onRightDown:"onrightdown",onRightUp:"onrightup",onRightUpOutside:"onrightupoutside",onTap:"ontap",onTouchCancel:"ontouchcancel",onTouchEnd:"ontouchend",onTouchEndOutside:"ontouchendoutside",onTouchMove:"ontouchmove",onTouchStart:"ontouchstart",onWheel:"onwheel"});function $_(i){return Array.isArray(i)}function tS(i,t,n={arrays:"reference",objects:"reference",strict:!0}){const{arrays:l,objects:o,strict:f}=n;if(typeof i!=typeof t||!!i!=!!t)return!1;if(sM(i)||iM(i))return i===t;const d=lM(i);if(d&&o==="reference")return i===t;const m=$_(i);if(m&&l==="reference")return i===t;if((m||d)&&i===t)return!0;let g;for(g in i)if(!(g in t))return!1;let v=i;if(f&&(v=t),d&&l==="shallow"&&o==="shallow"){for(g in v)if(!tS(i[g],t[g],{strict:f,objects:"reference"}))return!1}else for(g in v)if(i[g]!==t[g])return!1;if(eS(g)){if(m&&i.length===0&&t.length===0||d&&Object.keys(i).length===0&&Object.keys(t).length===0)return!0;if(i!==t)return!1}return!0}function aM(i){return i===null}function iM(i){return typeof i=="number"}function lM(i){return!(i!==Object(i)||$_(i)||typeof i=="function")}function sM(i){return typeof i=="string"}function eS(i){return i===void 0}const uM=Object.freeze(["children","key","ref"]);function rM(i,t=[]){const n={};return Object.entries(i).reduce((l,[o,f])=>(t.includes(o)||(l[o]=f),l),n)}function Ag(i,t=[]){return rM(i,uM.concat(t))}const oM="__default";function nS(i,t={},n=!1){const l=Ag(i),o=Ag(t),f=Object.entries(l),d=[];if(n){const m=Object.keys(o);let g=0;for(;g<m.length;){const v=m[g];!(v in l)&&f.unshift([v,`${oM}remove`]),g+=1}}return f.forEach(([m,g])=>{if(tS(g,o[m]))return;if(m in hp){d.push([m,g,!0,[]]);return}let v=[];m.includes("-")&&(v=m.split("-")),d.push([m,g,!1,v]);for(const _ in l){const b=l[_];_.startsWith(`${m}-`)&&d.push([_,b,!1,_.split("-")])}}),{changes:d}}function cM(i){const t=i;return!(!t||!t.changes)}const fM="__default",G1=new Map,j1={};function q1(i,t){if(i){const n=i[t];if(!eS(n)&&!aM(n))return n}return i}function aS(i,t){const{__pixireact:n={},...l}=i;let o;cM(t)?o=t:o=nS(t,l);const{changes:f}=o;let d=0;for(;d<f.length;){const m=f[d];let g=!1,v=m[0],_=m[1];const b=m[2],C=m[3];let E=i,M=E[v];if(v==="draw"&&typeof _=="function"&&(i instanceof Yi?_(i):(g=!0,H1("warn",`The \`draw\` prop was used on a \`${n.type}\` component, but it's only valid on \`graphics\` components.`))),v in Cg){const R=v;g=!0,j1[v]||(j1[v]=!0,H1("warn",`Event names must be pascal case; instead of \`${v}\`, you probably want \`${Cg[R]}\`.`))}if(!g){if(C.length&&(M=C.reduce(q1,E),!(M&&M.set))){const[R,...z]=C.reverse();E=z.reverse().reduce(q1,E),v=R}if(_===`${fM}remove`)if(E instanceof da){let R=G1.get(E.constructor);R||(R=E.constructor,R=new R,G1.set(E.constructor,R)),_=R[v]}else _=0;if(b&&n){const z=hp[v];_?E[z]=_:delete E[z]}else W_(E,v)||(E[v]=_)}d+=1}return i}function hM(i,t,n,l){const{children:o,...f}=l,{children:d,...m}=n,g=nS(f,m,!0);return g.changes.length?g:null}function dM(i,t,n,l){const o=hM(i,t,n,l);o&&aS(i,o)}const mM=Object.freeze([...Object.keys(Cg),"draw"]),Mg={};function pM(i){const t=i.charAt(0),n=i.substring(1);return`${t.toUpperCase()}${n}`}function yM(i,t){return t.toLowerCase()}function gM(i){let t=i;return i.startsWith("pixi")&&(t=i.replace(/^pixi([A-Z])/,yM)),t}function vM(i,t,n){const l=gM(i),o=pM(l);if(!(o in Mg))throw new Error(`${o} is not part of the PIXI namespace! Did you forget to extend?`);const f=Mg[o],d=Ag(t,mM);Object.entries(t).forEach(([g,v])=>{if(g in hp){const _=hp[g];d[_]=v}});const m=F_(new f(d),{root:n,type:l});return aS(m,t),m}var Jy={exports:{}},Py={exports:{}},Wy={exports:{}},Fy={};/**
|
|
318
|
+
* @license React
|
|
319
|
+
* scheduler.production.js
|
|
320
|
+
*
|
|
321
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
322
|
+
*
|
|
323
|
+
* This source code is licensed under the MIT license found in the
|
|
324
|
+
* LICENSE file in the root directory of this source tree.
|
|
325
|
+
*/var Y1;function xM(){return Y1||(Y1=1,(function(i){function t(w,H){var at=w.length;w.push(H);t:for(;0<at;){var et=at-1>>>1,ft=w[et];if(0<o(ft,H))w[et]=H,w[at]=ft,at=et;else break t}}function n(w){return w.length===0?null:w[0]}function l(w){if(w.length===0)return null;var H=w[0],at=w.pop();if(at!==H){w[0]=at;t:for(var et=0,ft=w.length,j=ft>>>1;et<j;){var I=2*(et+1)-1,st=w[I],pt=I+1,Tt=w[pt];if(0>o(st,at))pt<ft&&0>o(Tt,st)?(w[et]=Tt,w[pt]=at,et=pt):(w[et]=st,w[I]=at,et=I);else if(pt<ft&&0>o(Tt,at))w[et]=Tt,w[pt]=at,et=pt;else break t}}return H}function o(w,H){var at=w.sortIndex-H.sortIndex;return at!==0?at:w.id-H.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;i.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();i.unstable_now=function(){return d.now()-m}}var g=[],v=[],_=1,b=null,C=3,E=!1,M=!1,R=!1,z=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function U(w){for(var H=n(v);H!==null;){if(H.callback===null)l(v);else if(H.startTime<=w)l(v),H.sortIndex=H.expirationTime,t(g,H);else break;H=n(v)}}function G(w){if(R=!1,U(w),!M)if(n(g)!==null)M=!0,xt();else{var H=n(v);H!==null&&Dt(G,H.startTime-w)}}var Z=!1,Q=-1,K=5,gt=-1;function ct(){return!(i.unstable_now()-gt<K)}function ht(){if(Z){var w=i.unstable_now();gt=w;var H=!0;try{t:{M=!1,R&&(R=!1,O(Q),Q=-1),E=!0;var at=C;try{e:{for(U(w),b=n(g);b!==null&&!(b.expirationTime>w&&ct());){var et=b.callback;if(typeof et=="function"){b.callback=null,C=b.priorityLevel;var ft=et(b.expirationTime<=w);if(w=i.unstable_now(),typeof ft=="function"){b.callback=ft,U(w),H=!0;break e}b===n(g)&&l(g),U(w)}else l(g);b=n(g)}if(b!==null)H=!0;else{var j=n(v);j!==null&&Dt(G,j.startTime-w),H=!1}}break t}finally{b=null,C=at,E=!1}H=void 0}}finally{H?dt():Z=!1}}}var dt;if(typeof B=="function")dt=function(){B(ht)};else if(typeof MessageChannel<"u"){var vt=new MessageChannel,_t=vt.port2;vt.port1.onmessage=ht,dt=function(){_t.postMessage(null)}}else dt=function(){z(ht,0)};function xt(){Z||(Z=!0,dt())}function Dt(w,H){Q=z(function(){w(i.unstable_now())},H)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(w){w.callback=null},i.unstable_continueExecution=function(){M||E||(M=!0,xt())},i.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<w?Math.floor(1e3/w):5},i.unstable_getCurrentPriorityLevel=function(){return C},i.unstable_getFirstCallbackNode=function(){return n(g)},i.unstable_next=function(w){switch(C){case 1:case 2:case 3:var H=3;break;default:H=C}var at=C;C=H;try{return w()}finally{C=at}},i.unstable_pauseExecution=function(){},i.unstable_requestPaint=function(){},i.unstable_runWithPriority=function(w,H){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var at=C;C=w;try{return H()}finally{C=at}},i.unstable_scheduleCallback=function(w,H,at){var et=i.unstable_now();switch(typeof at=="object"&&at!==null?(at=at.delay,at=typeof at=="number"&&0<at?et+at:et):at=et,w){case 1:var ft=-1;break;case 2:ft=250;break;case 5:ft=1073741823;break;case 4:ft=1e4;break;default:ft=5e3}return ft=at+ft,w={id:_++,callback:H,priorityLevel:w,startTime:at,expirationTime:ft,sortIndex:-1},at>et?(w.sortIndex=at,t(v,w),n(g)===null&&w===n(v)&&(R?(O(Q),Q=-1):R=!0,Dt(G,at-et))):(w.sortIndex=ft,t(g,w),M||E||(M=!0,xt())),w},i.unstable_shouldYield=ct,i.unstable_wrapCallback=function(w){var H=C;return function(){var at=C;C=H;try{return w.apply(this,arguments)}finally{C=at}}}})(Fy)),Fy}var L1;function _M(){return L1||(L1=1,Wy.exports=xM()),Wy.exports}/**
|
|
326
|
+
* @license React
|
|
327
|
+
* react-reconciler.production.js
|
|
328
|
+
*
|
|
329
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
330
|
+
*
|
|
331
|
+
* This source code is licensed under the MIT license found in the
|
|
332
|
+
* LICENSE file in the root directory of this source tree.
|
|
333
|
+
*/var X1;function SM(){return X1||(X1=1,(function(i){i.exports=function(t){function n(s,u,h,y){return new Cf(s,u,h,y)}function l(){}function o(s){var u="https://react.dev/errors/"+s;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)u+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(s){return s===null||typeof s!="object"?null:(s=Nf&&s[Nf]||s["@@iterator"],typeof s=="function"?s:null)}function d(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===Ms?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case xu:return"Fragment";case ai:return"Portal";case Of:return"Profiler";case Df:return"StrictMode";case Vo:return"Suspense";case Vl:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case Ci:return(s.displayName||"Context")+".Provider";case Xl:return(s._context.displayName||"Context")+".Consumer";case _u:var u=s.render;return s=s.displayName,s||(s=u.displayName||u.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case Tr:return u=s.displayName||null,u!==null?u:d(s.type)||"Memo";case ii:u=s._payload,s=s._init;try{return d(s(u))}catch{}}return null}function m(s){if(Qo===void 0)try{throw Error()}catch(h){var u=h.stack.trim().match(/\n( *(at )?)/);Qo=u&&u[1]||"",Uf=-1<h.stack.indexOf(`
|
|
334
|
+
at`)?" (<anonymous>)":-1<h.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
335
|
+
`+Qo+s+Uf}function g(s,u){if(!s||Ql)return"";Ql=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var y={DetermineComponentFrameRoot:function(){try{if(u){var St=function(){throw Error()};if(Object.defineProperty(St.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(St,[])}catch(qt){var bt=qt}Reflect.construct(s,[],St)}else{try{St.call()}catch(qt){bt=qt}s.call(St.prototype)}}else{try{throw Error()}catch(qt){bt=qt}(St=s())&&typeof St.catch=="function"&&St.catch(function(){})}}catch(qt){if(qt&&bt&&typeof qt.stack=="string")return[qt.stack,bt.stack]}return[null,null]}};y.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var S=Object.getOwnPropertyDescriptor(y.DetermineComponentFrameRoot,"name");S&&S.configurable&&Object.defineProperty(y.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var T=y.DetermineComponentFrameRoot(),N=T[0],q=T[1];if(N&&q){var P=N.split(`
|
|
336
|
+
`),ut=q.split(`
|
|
337
|
+
`);for(S=y=0;y<P.length&&!P[y].includes("DetermineComponentFrameRoot");)y++;for(;S<ut.length&&!ut[S].includes("DetermineComponentFrameRoot");)S++;if(y===P.length||S===ut.length)for(y=P.length-1,S=ut.length-1;1<=y&&0<=S&&P[y]!==ut[S];)S--;for(;1<=y&&0<=S;y--,S--)if(P[y]!==ut[S]){if(y!==1||S!==1)do if(y--,S--,0>S||P[y]!==ut[S]){var yt=`
|
|
338
|
+
`+P[y].replace(" at new "," at ");return s.displayName&&yt.includes("<anonymous>")&&(yt=yt.replace("<anonymous>",s.displayName)),yt}while(1<=y&&0<=S);break}}}finally{Ql=!1,Error.prepareStackTrace=h}return(h=s?s.displayName||s.name:"")?m(h):""}function v(s){switch(s.tag){case 26:case 27:case 5:return m(s.type);case 16:return m("Lazy");case 13:return m("Suspense");case 19:return m("SuspenseList");case 0:case 15:return s=g(s.type,!1),s;case 11:return s=g(s.type.render,!1),s;case 1:return s=g(s.type,!0),s;default:return""}}function _(s){try{var u="";do u+=v(s),s=s.return;while(s);return u}catch(h){return`
|
|
339
|
+
Error generating stack: `+h.message+`
|
|
340
|
+
`+h.stack}}function b(s){var u=s,h=s;if(s.alternate)for(;u.return;)u=u.return;else{s=u;do u=s,(u.flags&4098)!==0&&(h=u.return),s=u.return;while(s)}return u.tag===3?h:null}function C(s){if(b(s)!==s)throw Error(o(188))}function E(s){var u=s.alternate;if(!u){if(u=b(s),u===null)throw Error(o(188));return u!==s?null:s}for(var h=s,y=u;;){var S=h.return;if(S===null)break;var T=S.alternate;if(T===null){if(y=S.return,y!==null){h=y;continue}break}if(S.child===T.child){for(T=S.child;T;){if(T===h)return C(S),s;if(T===y)return C(S),u;T=T.sibling}throw Error(o(188))}if(h.return!==y.return)h=S,y=T;else{for(var N=!1,q=S.child;q;){if(q===h){N=!0,h=S,y=T;break}if(q===y){N=!0,y=S,h=T;break}q=q.sibling}if(!N){for(q=T.child;q;){if(q===h){N=!0,h=T,y=S;break}if(q===y){N=!0,y=T,h=S;break}q=q.sibling}if(!N)throw Error(o(189))}}if(h.alternate!==y)throw Error(o(190))}if(h.tag!==3)throw Error(o(188));return h.stateNode.current===h?s:u}function M(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(u=M(s),u!==null)return u;s=s.sibling}return null}function R(s){var u=s.tag;if(u===5||u===26||u===27||u===6)return s;for(s=s.child;s!==null;){if(s.tag!==4&&(u=R(s),u!==null))return u;s=s.sibling}return null}function z(s){return{current:s}}function O(s){0>rl||(s.current=Nr[rl],Nr[rl]=null,rl--)}function B(s,u){rl++,Nr[rl]=s.current,s.current=u}function U(s){return s>>>=0,s===0?32:31-(Ur(s)/rm|0)|0}function G(s){var u=s&42;if(u!==0)return u;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194176;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function Z(s,u){var h=s.pendingLanes;if(h===0)return 0;var y=0,S=s.suspendedLanes,T=s.pingedLanes,N=s.warmLanes;s=s.finishedLanes!==0;var q=h&134217727;return q!==0?(h=q&~S,h!==0?y=G(h):(T&=q,T!==0?y=G(T):s||(N=q&~N,N!==0&&(y=G(N))))):(q=h&~S,q!==0?y=G(q):T!==0?y=G(T):s||(N=h&~N,N!==0&&(y=G(N)))),y===0?0:u!==0&&u!==y&&(u&S)===0&&(S=y&-y,N=u&-u,S>=N||S===32&&(N&4194176)!==0)?u:y}function Q(s,u){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&u)===0}function K(s,u){switch(s){case 1:case 2:case 4:case 8:return u+250;case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function gt(){var s=Eu;return Eu<<=1,(Eu&4194176)===0&&(Eu=128),s}function ct(){var s=Br;return Br<<=1,(Br&62914560)===0&&(Br=4194304),s}function ht(s){for(var u=[],h=0;31>h;h++)u.push(s);return u}function dt(s,u){s.pendingLanes|=u,u!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function vt(s,u,h,y,S,T){var N=s.pendingLanes;s.pendingLanes=h,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=h,s.entangledLanes&=h,s.errorRecoveryDisabledLanes&=h,s.shellSuspendCounter=0;var q=s.entanglements,P=s.expirationTimes,ut=s.hiddenUpdates;for(h=N&~h;0<h;){var yt=31-aa(h),St=1<<yt;q[yt]=0,P[yt]=-1;var bt=ut[yt];if(bt!==null)for(ut[yt]=null,yt=0;yt<bt.length;yt++){var qt=bt[yt];qt!==null&&(qt.lane&=-536870913)}h&=~St}y!==0&&_t(s,y,0),T!==0&&S===0&&s.tag!==0&&(s.suspendedLanes|=T&~(N&~u))}function _t(s,u,h){s.pendingLanes|=u,s.suspendedLanes&=~u;var y=31-aa(u);s.entangledLanes|=u,s.entanglements[y]=s.entanglements[y]|1073741824|h&4194218}function xt(s,u){var h=s.entangledLanes|=u;for(s=s.entanglements;h;){var y=31-aa(h),S=1<<y;S&u|s[y]&u&&(s[y]|=u),h&=~S}}function Dt(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function w(s){if(ia&&typeof ia.onCommitFiberRoot=="function")try{ia.onCommitFiberRoot(Au,s,void 0,(s.current.flags&128)===128)}catch{}}function H(s){if(typeof hm=="function"&&ch(s),ia&&typeof ia.setStrictMode=="function")try{ia.setStrictMode(Au,s)}catch{}}function at(s,u){return s===u&&(s!==0||1/s===1/u)||s!==s&&u!==u}function et(s,u){if(typeof s=="object"&&s!==null){var h=uc.get(s);return h!==void 0?h:(u={value:s,source:u,stack:_(u)},uc.set(s,u),u)}return{value:s,source:u,stack:_(u)}}function ft(s,u){Ne[qe++]=Gr,Ne[qe++]=Hr,Hr=s,Gr=u}function j(s,u,h){Ea[Ca++]=Di,Ea[Ca++]=Va,Ea[Ca++]=li,li=s;var y=Di;s=Va;var S=32-aa(y)-1;y&=~(1<<S),h+=1;var T=32-aa(u)+S;if(30<T){var N=S-S%5;T=(y&(1<<N)-1).toString(32),y>>=N,S-=N,Di=1<<32-aa(u)+S|h<<S|y,Va=T+s}else Di=1<<T|h<<S|y,Va=s}function I(s){s.return!==null&&(ft(s,1),j(s,1,0))}function st(s){for(;s===Hr;)Hr=Ne[--qe],Ne[qe]=null,Gr=Ne[--qe],Ne[qe]=null;for(;s===li;)li=Ea[--Ca],Ea[Ca]=null,Va=Ea[--Ca],Ea[Ca]=null,Di=Ea[--Ca],Ea[Ca]=null}function pt(s,u){B(si,u),B(jr,s),B(xn,null),s=Rs(u),O(xn),B(xn,s)}function Tt(){O(xn),O(jr),O(si)}function Ot(s){s.memoizedState!==null&&B(Mu,s);var u=xn.current,h=Ld(u,s.type);u!==h&&(B(jr,s),B(xn,h))}function Bt(s){jr.current===s&&(O(xn),O(jr)),Mu.current===s&&(O(Mu),Mi?Ht._currentValue=na:Ht._currentValue2=na)}function ce(s){var u=Error(o(418,""));throw Wn(et(u,s)),qr}function oe(s,u){if(!Qn)throw Error(o(175));Np(s.stateNode,s.type,s.memoizedProps,u,s)||ce(s)}function ma(s){for(Bn=s.return;Bn;)switch(Bn.tag){case 3:case 27:Qa=!0;return;case 5:case 13:Qa=!1;return;default:Bn=Bn.return}}function Ga(s){if(!Qn||s!==Bn)return!1;if(!le)return ma(s),le=!0,!1;var u=!1;if(En?s.tag!==3&&s.tag!==27&&(s.tag!==5||am(s.type)&&!kl(s.type,s.memoizedProps))&&(u=!0):s.tag!==3&&(s.tag!==5||am(s.type)&&!kl(s.type,s.memoizedProps))&&(u=!0),u&&An&&ce(s),ma(s),s.tag===13){if(!Qn)throw Error(o(316));if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(o(317));An=em(s)}else An=Bn?Ff(s.stateNode):null;return!0}function qn(){Qn&&(An=Bn=null,le=!1)}function Wn(s){Aa===null?Aa=[s]:Aa.push(s)}function mn(){for(var s=Pl,u=Ru=Pl=0;u<s;){var h=Ma[u];Ma[u++]=null;var y=Ma[u];Ma[u++]=null;var S=Ma[u];Ma[u++]=null;var T=Ma[u];if(Ma[u++]=null,y!==null&&S!==null){var N=y.pending;N===null?S.next=S:(S.next=N.next,N.next=S),y.pending=S}T!==0&&Ku(h,S,T)}}function Fn(s,u,h,y){Ma[Pl++]=s,Ma[Pl++]=u,Ma[Pl++]=h,Ma[Pl++]=y,Ru|=y,s.lanes|=y,s=s.alternate,s!==null&&(s.lanes|=y)}function rs(s,u,h,y){return Fn(s,u,h,y),os(s)}function Fa(s,u){return Fn(s,null,null,u),os(s)}function Ku(s,u,h){s.lanes|=h;var y=s.alternate;y!==null&&(y.lanes|=h);for(var S=!1,T=s.return;T!==null;)T.childLanes|=h,y=T.alternate,y!==null&&(y.childLanes|=h),T.tag===22&&(s=T.stateNode,s===null||s._visibility&1||(S=!0)),s=T,T=T.return;S&&u!==null&&s.tag===3&&(T=s.stateNode,S=31-aa(h),T=T.hiddenUpdates,s=T[S],s===null?T[S]=[u]:s.push(u),u.lane=h|536870912)}function os(s){if(50<qs)throw qs=0,kn=null,Error(o(185));for(var u=s.return;u!==null;)s=u,u=s.return;return s.tag===3?s.stateNode:null}function ja(s){s!==Ns&&s.next===null&&(Ns===null?zu=Ns=s:Ns=Ns.next=s),Lr=!0,Yr||(Yr=!0,id(Ap))}function bl(s,u){if(!ui&&Lr){ui=!0;do for(var h=!1,y=zu;y!==null;){if(s!==0){var S=y.pendingLanes;if(S===0)var T=0;else{var N=y.suspendedLanes,q=y.pingedLanes;T=(1<<31-aa(42|s)+1)-1,T&=S&~(N&~q),T=T&201326677?T&201326677|1:T?T|2:0}T!==0&&(h=!0,ad(y,T))}else T=Zt,T=Z(y,y===Jt?T:0),(T&3)===0||Q(y,T)||(h=!0,ad(y,T));y=y.next}while(h);ui=!1}}function Ap(){Lr=Yr=!1;var s=0;Wl!==0&&(Jl()&&(s=Wl),Wl=0);for(var u=Cn(),h=null,y=zu;y!==null;){var S=y.next,T=nd(y,u);T===0?(y.next=null,h===null?zu=S:h.next=S,S===null&&(Ns=h)):(h=y,(s!==0||(T&3)!==0)&&(Lr=!0)),y=S}bl(s)}function nd(s,u){for(var h=s.suspendedLanes,y=s.pingedLanes,S=s.expirationTimes,T=s.pendingLanes&-62914561;0<T;){var N=31-aa(T),q=1<<N,P=S[N];P===-1?((q&h)===0||(q&y)!==0)&&(S[N]=K(q,u)):P<=u&&(s.expiredLanes|=q),T&=~q}if(u=Jt,h=Zt,h=Z(s,s===u?h:0),y=s.callbackNode,h===0||s===u&&Se===2||s.cancelPendingCommit!==null)return y!==null&&y!==null&&wr(y),s.callbackNode=null,s.callbackPriority=0;if((h&3)===0||Q(s,h)){if(u=h&-h,u===s.callbackPriority)return u;switch(y!==null&&wr(y),Dt(h)){case 2:case 8:h=fm;break;case 32:h=lc;break;case 268435456:h=sc;break;default:h=lc}return y=In.bind(null,s),h=Cu(h,y),s.callbackPriority=u,s.callbackNode=h,u}return y!==null&&y!==null&&wr(y),s.callbackPriority=2,s.callbackNode=null,2}function In(s,u){var h=s.callbackNode;if(gn()&&s.callbackNode!==h)return null;var y=Zt;return y=Z(s,s===Jt?y:0),y===0?null:(vr(s,y,u),nd(s,Cn()),s.callbackNode!=null&&s.callbackNode===h?In.bind(null,s):null)}function ad(s,u){if(gn())return null;vr(s,u,!0)}function id(s){tn?Jo(function(){(Rt&6)!==0?Cu(oh,s):s()}):Cu(oh,s)}function lo(){return Wl===0&&(Wl=gt()),Wl}function so(s,u){if(Xr===null){var h=Xr=[];rc=0,la=lo(),Fl={status:"pending",value:void 0,then:function(y){h.push(y)}}}return rc++,u.then(ld,ld),u}function ld(){if(--rc===0&&Xr!==null){Fl!==null&&(Fl.status="fulfilled");var s=Xr;Xr=null,la=0,Fl=null;for(var u=0;u<s.length;u++)(0,s[u])()}}function sd(s,u){var h=[],y={status:"pending",value:null,reason:null,then:function(S){h.push(S)}};return s.then(function(){y.status="fulfilled",y.value=u;for(var S=0;S<h.length;S++)(0,h[S])(u)},function(S){for(y.status="rejected",y.reason=S,S=0;S<h.length;S++)(0,h[S])(void 0)}),y}function Zc(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Kc(s,u){s=s.updateQueue,u.updateQueue===s&&(u.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function qa(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function Ie(s,u,h){var y=s.updateQueue;if(y===null)return null;if(y=y.shared,(Rt&2)!==0){var S=y.pending;return S===null?u.next=u:(u.next=S.next,S.next=u),y.pending=u,u=os(s),Ku(s,null,h),u}return Fn(s,y,u,h),os(s)}function Ya(s,u,h){if(u=u.updateQueue,u!==null&&(u=u.shared,(h&4194176)!==0)){var y=u.lanes;y&=s.pendingLanes,h|=y,u.lanes=h,xt(s,h)}}function Yn(s,u){var h=s.updateQueue,y=s.alternate;if(y!==null&&(y=y.updateQueue,h===y)){var S=null,T=null;if(h=h.firstBaseUpdate,h!==null){do{var N={lane:h.lane,tag:h.tag,payload:h.payload,callback:null,next:null};T===null?S=T=N:T=T.next=N,h=h.next}while(h!==null);T===null?S=T=u:T=T.next=u}else S=T=u;h={baseState:y.baseState,firstBaseUpdate:S,lastBaseUpdate:T,shared:y.shared,callbacks:y.callbacks},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=u:s.next=u,h.lastBaseUpdate=u}function ku(){if(Du){var s=Fl;if(s!==null)throw s}}function Ju(s,u,h,y){Du=!1;var S=s.updateQueue;ol=!1;var T=S.firstBaseUpdate,N=S.lastBaseUpdate,q=S.shared.pending;if(q!==null){S.shared.pending=null;var P=q,ut=P.next;P.next=null,N===null?T=ut:N.next=ut,N=P;var yt=s.alternate;yt!==null&&(yt=yt.updateQueue,q=yt.lastBaseUpdate,q!==N&&(q===null?yt.firstBaseUpdate=ut:q.next=ut,yt.lastBaseUpdate=P))}if(T!==null){var St=S.baseState;N=0,yt=ut=P=null,q=T;do{var bt=q.lane&-536870913,qt=bt!==q.lane;if(qt?(Zt&bt)===bt:(y&bt)===bt){bt!==0&&bt===la&&(Du=!0),yt!==null&&(yt=yt.next={lane:0,tag:q.tag,payload:q.payload,callback:null,next:null});t:{var oa=s,Kr=q;bt=u;var Ys=h;switch(Kr.tag){case 1:if(oa=Kr.payload,typeof oa=="function"){St=oa.call(Ys,St,bt);break t}St=oa;break t;case 3:oa.flags=oa.flags&-65537|128;case 0:if(oa=Kr.payload,bt=typeof oa=="function"?oa.call(Ys,St,bt):oa,bt==null)break t;St=As({},St,bt);break t;case 2:ol=!0}}bt=q.callback,bt!==null&&(s.flags|=64,qt&&(s.flags|=8192),qt=S.callbacks,qt===null?S.callbacks=[bt]:qt.push(bt))}else qt={lane:bt,tag:q.tag,payload:q.payload,callback:q.callback,next:null},yt===null?(ut=yt=qt,P=St):yt=yt.next=qt,N|=bt;if(q=q.next,q===null){if(q=S.shared.pending,q===null)break;qt=q,q=qt.next,qt.next=null,S.lastBaseUpdate=qt,S.shared.pending=null}}while(!0);yt===null&&(P=St),S.baseState=P,S.firstBaseUpdate=ut,S.lastBaseUpdate=yt,T===null&&(S.shared.lanes=0),Oa|=N,s.lanes=N,s.memoizedState=St}}function ud(s,u){if(typeof s!="function")throw Error(o(191,s));s.call(u)}function Pu(s,u){var h=s.callbacks;if(h!==null)for(s.callbacks=null,s=0;s<h.length;s++)ud(h[s],u)}function cs(s,u){if(Ta(s,u))return!0;if(typeof s!="object"||s===null||typeof u!="object"||u===null)return!1;var h=Object.keys(s),y=Object.keys(u);if(h.length!==y.length)return!1;for(y=0;y<h.length;y++){var S=h[y];if(!Vr.call(u,S)||!Ta(s[S],u[S]))return!1}return!0}function Wu(s){return s=s.status,s==="fulfilled"||s==="rejected"}function mi(){}function Fu(s,u,h){switch(h=s[h],h===void 0?s.push(u):h!==u&&(u.then(mi,mi),u=h),u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,s===ve?Error(o(483)):s;default:if(typeof u.status=="string")u.then(mi,mi);else{if(s=Jt,s!==null&&100<s.shellSuspendCounter)throw Error(o(482));s=u,s.status="pending",s.then(function(y){if(u.status==="pending"){var S=u;S.status="fulfilled",S.value=y}},function(y){if(u.status==="pending"){var S=u;S.status="rejected",S.reason=y}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw s=u.reason,s===ve?Error(o(483)):s}throw Us=u,ve}}function Is(){if(Us===null)throw Error(o(459));var s=Us;return Us=null,s}function uo(s){var u=Za;return Za+=1,Oi===null&&(Oi=[]),Fu(Oi,s,u)}function $s(s,u){u=u.props.ref,s.ref=u!==void 0?u:null}function tu(s,u){throw u.$$typeof===zf?Error(o(525)):(s=Object.prototype.toString.call(u),Error(o(31,s==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":s)))}function eu(s){var u=s._init;return u(s._payload)}function rd(s){function u($,k){if(s){var nt=$.deletions;nt===null?($.deletions=[k],$.flags|=16):nt.push(k)}}function h($,k){if(!s)return null;for(;k!==null;)u($,k),k=k.sibling;return null}function y($){for(var k=new Map;$!==null;)$.key!==null?k.set($.key,$):k.set($.index,$),$=$.sibling;return k}function S($,k){return $=Nn($,k),$.index=0,$.sibling=null,$}function T($,k,nt){return $.index=nt,s?(nt=$.alternate,nt!==null?(nt=nt.index,nt<k?($.flags|=33554434,k):nt):($.flags|=33554434,k)):($.flags|=1048576,k)}function N($){return s&&$.alternate===null&&($.flags|=33554434),$}function q($,k,nt,mt){return k===null||k.tag!==6?(k=Ll(nt,$.mode,mt),k.return=$,k):(k=S(k,nt),k.return=$,k)}function P($,k,nt,mt){var At=nt.type;return At===xu?yt($,k,nt.props.children,mt,nt.key):k!==null&&(k.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===ii&&eu(At)===k.type)?(k=S(k,nt.props),$s(k,nt),k.return=$,k):(k=La(nt.type,nt.key,nt.props,null,$.mode,mt),$s(k,nt),k.return=$,k)}function ut($,k,nt,mt){return k===null||k.tag!==4||k.stateNode.containerInfo!==nt.containerInfo||k.stateNode.implementation!==nt.implementation?(k=vu(nt,$.mode,mt),k.return=$,k):(k=S(k,nt.children||[]),k.return=$,k)}function yt($,k,nt,mt,At){return k===null||k.tag!==7?(k=al(nt,$.mode,mt,At),k.return=$,k):(k=S(k,nt),k.return=$,k)}function St($,k,nt){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Ll(""+k,$.mode,nt),k.return=$,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case il:return nt=La(k.type,k.key,k.props,null,$.mode,nt),$s(nt,k),nt.return=$,nt;case ai:return k=vu(k,$.mode,nt),k.return=$,k;case ii:var mt=k._init;return k=mt(k._payload),St($,k,nt)}if(Zl(k)||f(k))return k=al(k,$.mode,nt,null),k.return=$,k;if(typeof k.then=="function")return St($,uo(k),nt);if(k.$$typeof===Ci)return St($,dr($,k),nt);tu($,k)}return null}function bt($,k,nt,mt){var At=k!==null?k.key:null;if(typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint")return At!==null?null:q($,k,""+nt,mt);if(typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case il:return nt.key===At?P($,k,nt,mt):null;case ai:return nt.key===At?ut($,k,nt,mt):null;case ii:return At=nt._init,nt=At(nt._payload),bt($,k,nt,mt)}if(Zl(nt)||f(nt))return At!==null?null:yt($,k,nt,mt,null);if(typeof nt.then=="function")return bt($,k,uo(nt),mt);if(nt.$$typeof===Ci)return bt($,k,dr($,nt),mt);tu($,nt)}return null}function qt($,k,nt,mt,At){if(typeof mt=="string"&&mt!==""||typeof mt=="number"||typeof mt=="bigint")return $=$.get(nt)||null,q(k,$,""+mt,At);if(typeof mt=="object"&&mt!==null){switch(mt.$$typeof){case il:return $=$.get(mt.key===null?nt:mt.key)||null,P(k,$,mt,At);case ai:return $=$.get(mt.key===null?nt:mt.key)||null,ut(k,$,mt,At);case ii:var Ce=mt._init;return mt=Ce(mt._payload),qt($,k,nt,mt,At)}if(Zl(mt)||f(mt))return $=$.get(nt)||null,yt(k,$,mt,At,null);if(typeof mt.then=="function")return qt($,k,nt,uo(mt),At);if(mt.$$typeof===Ci)return qt($,k,nt,dr(k,mt),At);tu(k,mt)}return null}function oa($,k,nt,mt){for(var At=null,Ce=null,Gt=k,ue=k=0,hn=null;Gt!==null&&ue<nt.length;ue++){Gt.index>ue?(hn=Gt,Gt=null):hn=Gt.sibling;var re=bt($,Gt,nt[ue],mt);if(re===null){Gt===null&&(Gt=hn);break}s&&Gt&&re.alternate===null&&u($,Gt),k=T(re,k,ue),Ce===null?At=re:Ce.sibling=re,Ce=re,Gt=hn}if(ue===nt.length)return h($,Gt),le&&ft($,ue),At;if(Gt===null){for(;ue<nt.length;ue++)Gt=St($,nt[ue],mt),Gt!==null&&(k=T(Gt,k,ue),Ce===null?At=Gt:Ce.sibling=Gt,Ce=Gt);return le&&ft($,ue),At}for(Gt=y(Gt);ue<nt.length;ue++)hn=qt(Gt,$,ue,nt[ue],mt),hn!==null&&(s&&hn.alternate!==null&&Gt.delete(hn.key===null?ue:hn.key),k=T(hn,k,ue),Ce===null?At=hn:Ce.sibling=hn,Ce=hn);return s&&Gt.forEach(function(yl){return u($,yl)}),le&&ft($,ue),At}function Kr($,k,nt,mt){if(nt==null)throw Error(o(151));for(var At=null,Ce=null,Gt=k,ue=k=0,hn=null,re=nt.next();Gt!==null&&!re.done;ue++,re=nt.next()){Gt.index>ue?(hn=Gt,Gt=null):hn=Gt.sibling;var yl=bt($,Gt,re.value,mt);if(yl===null){Gt===null&&(Gt=hn);break}s&&Gt&&yl.alternate===null&&u($,Gt),k=T(yl,k,ue),Ce===null?At=yl:Ce.sibling=yl,Ce=yl,Gt=hn}if(re.done)return h($,Gt),le&&ft($,ue),At;if(Gt===null){for(;!re.done;ue++,re=nt.next())re=St($,re.value,mt),re!==null&&(k=T(re,k,ue),Ce===null?At=re:Ce.sibling=re,Ce=re);return le&&ft($,ue),At}for(Gt=y(Gt);!re.done;ue++,re=nt.next())re=qt(Gt,$,ue,re.value,mt),re!==null&&(s&&re.alternate!==null&&Gt.delete(re.key===null?ue:re.key),k=T(re,k,ue),Ce===null?At=re:Ce.sibling=re,Ce=re);return s&&Gt.forEach(function(gc){return u($,gc)}),le&&ft($,ue),At}function Ys($,k,nt,mt){if(typeof nt=="object"&&nt!==null&&nt.type===xu&&nt.key===null&&(nt=nt.props.children),typeof nt=="object"&&nt!==null){switch(nt.$$typeof){case il:t:{for(var At=nt.key;k!==null;){if(k.key===At){if(At=nt.type,At===xu){if(k.tag===7){h($,k.sibling),mt=S(k,nt.props.children),mt.return=$,$=mt;break t}}else if(k.elementType===At||typeof At=="object"&&At!==null&&At.$$typeof===ii&&eu(At)===k.type){h($,k.sibling),mt=S(k,nt.props),$s(mt,nt),mt.return=$,$=mt;break t}h($,k);break}else u($,k);k=k.sibling}nt.type===xu?(mt=al(nt.props.children,$.mode,mt,nt.key),mt.return=$,$=mt):(mt=La(nt.type,nt.key,nt.props,null,$.mode,mt),$s(mt,nt),mt.return=$,$=mt)}return N($);case ai:t:{for(At=nt.key;k!==null;){if(k.key===At)if(k.tag===4&&k.stateNode.containerInfo===nt.containerInfo&&k.stateNode.implementation===nt.implementation){h($,k.sibling),mt=S(k,nt.children||[]),mt.return=$,$=mt;break t}else{h($,k);break}else u($,k);k=k.sibling}mt=vu(nt,$.mode,mt),mt.return=$,$=mt}return N($);case ii:return At=nt._init,nt=At(nt._payload),Ys($,k,nt,mt)}if(Zl(nt))return oa($,k,nt,mt);if(f(nt)){if(At=f(nt),typeof At!="function")throw Error(o(150));return nt=At.call(nt),Kr($,k,nt,mt)}if(typeof nt.then=="function")return Ys($,k,uo(nt),mt);if(nt.$$typeof===Ci)return Ys($,k,dr($,nt),mt);tu($,nt)}return typeof nt=="string"&&nt!==""||typeof nt=="number"||typeof nt=="bigint"?(nt=""+nt,k!==null&&k.tag===6?(h($,k.sibling),mt=S(k,nt),mt.return=$,$=mt):(h($,k),mt=Ll(nt,$.mode,mt),mt.return=$,$=mt),N($)):h($,k)}return function($,k,nt,mt){try{Za=0;var At=Ys($,k,nt,mt);return Oi=null,At}catch(Gt){if(Gt===ve)throw Gt;var Ce=n(29,Gt,null,$.mode);return Ce.lanes=mt,Ce.return=$,Ce}finally{}}}function kc(s,u){s=ri,B(Ra,s),B(Ni,u),ri=s|u.baseLanes}function ro(){B(Ra,ri),B(Ni,Ni.current)}function oo(){ri=Ra.current,O(Ni),O(Ra)}function pi(s){var u=s.alternate;B(en,en.current&1),B(za,s),Ka===null&&(u===null||Ni.current!==null||u.memoizedState!==null)&&(Ka=s)}function co(s){if(s.tag===22){if(B(en,en.current),B(za,s),Ka===null){var u=s.alternate;u!==null&&u.memoizedState!==null&&(Ka=s)}}else Zi()}function Zi(){B(en,en.current),B(za,za.current)}function yi(s){O(za),Ka===s&&(Ka=null),O(en)}function Ia(s){for(var u=s;u!==null;){if(u.tag===13){var h=u.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||$o(h)||Or(h)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}function Wt(){throw Error(o(321))}function Rn(s,u){if(u===null)return!1;for(var h=0;h<u.length&&h<s.length;h++)if(!Ta(s[h],u[h]))return!1;return!0}function Tl(s,u,h,y,S,T){return Ui=T,Vt=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,Nt.H=s===null||s.memoizedState===null?nn:wn,cl=!1,T=h(y,S),cl=!1,Ue&&(T=od(u,h,y,S)),fo(s),T}function fo(s){Nt.H=se;var u=fe!==null&&fe.next!==null;if(Ui=0,Ze=fe=Vt=null,ka=!1,Ye=0,Ou=null,u)throw Error(o(300));s===null||Ke||(s=s.dependencies,s!==null&&Dl(s)&&(Ke=!0))}function od(s,u,h,y){Vt=s;var S=0;do{if(Ue&&(Ou=null),Ye=0,Ue=!1,25<=S)throw Error(o(301));if(S+=1,Ze=fe=null,s.updateQueue!=null){var T=s.updateQueue;T.lastEffect=null,T.events=null,T.stores=null,T.memoCache!=null&&(T.memoCache.index=0)}Nt.H=$l,T=u(h,y)}while(Ue);return T}function Mp(){var s=Nt.H,u=s.useState()[0];return u=typeof u.then=="function"?Ki(u):u,s=s.useState()[0],(fe!==null?fe.memoizedState:null)!==s&&(Vt.flags|=1024),u}function ho(){var s=Qr!==0;return Qr=0,s}function fs(s,u,h){u.updateQueue=s.updateQueue,u.flags&=-2053,s.lanes&=~h}function Iu(s){if(ka){for(s=s.memoizedState;s!==null;){var u=s.queue;u!==null&&(u.pending=null),s=s.next}ka=!1}Ui=0,Ze=fe=Vt=null,Ue=!1,Ye=Qr=0,Ou=null}function on(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?Vt.memoizedState=Ze=s:Ze=Ze.next=s,Ze}function ze(){if(fe===null){var s=Vt.alternate;s=s!==null?s.memoizedState:null}else s=fe.next;var u=Ze===null?Vt.memoizedState:Ze.next;if(u!==null)Ze=u,fe=s;else{if(s===null)throw Vt.alternate===null?Error(o(467)):Error(o(310));fe=s,s={memoizedState:fe.memoizedState,baseState:fe.baseState,baseQueue:fe.baseQueue,queue:fe.queue,next:null},Ze===null?Vt.memoizedState=Ze=s:Ze=Ze.next=s}return Ze}function Ki(s){var u=Ye;return Ye+=1,Ou===null&&(Ou=[]),s=Fu(Ou,s,u),u=Vt,(Ze===null?u.memoizedState:Ze.next)===null&&(u=u.alternate,Nt.H=u===null||u.memoizedState===null?nn:wn),s}function ki(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return Ki(s);if(s.$$typeof===Ci)return Sn(s)}throw Error(o(438,String(s)))}function $e(s){var u=null,h=Vt.updateQueue;if(h!==null&&(u=h.memoCache),u==null){var y=Vt.alternate;y!==null&&(y=y.updateQueue,y!==null&&(y=y.memoCache,y!=null&&(u={data:y.data.map(function(S){return S.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),h===null&&(h=cc(),Vt.updateQueue=h),h.memoCache=u,h=u.data[u.index],h===void 0)for(h=u.data[u.index]=Array(s),y=0;y<s;y++)h[y]=Yd;return u.index++,h}function gi(s,u){return typeof u=="function"?u(s):u}function $u(s){var u=ze();return Ji(u,fe,s)}function Ji(s,u,h){var y=s.queue;if(y===null)throw Error(o(311));y.lastRenderedReducer=h;var S=s.baseQueue,T=y.pending;if(T!==null){if(S!==null){var N=S.next;S.next=T.next,T.next=N}u.baseQueue=S=T,y.pending=null}if(T=s.baseState,S===null)s.memoizedState=T;else{u=S.next;var q=N=null,P=null,ut=u,yt=!1;do{var St=ut.lane&-536870913;if(St!==ut.lane?(Zt&St)===St:(Ui&St)===St){var bt=ut.revertLane;if(bt===0)P!==null&&(P=P.next={lane:0,revertLane:0,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null}),St===la&&(yt=!0);else if((Ui&bt)===bt){ut=ut.next,bt===la&&(yt=!0);continue}else St={lane:0,revertLane:ut.revertLane,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},P===null?(q=P=St,N=T):P=P.next=St,Vt.lanes|=bt,Oa|=bt;St=ut.action,cl&&h(T,St),T=ut.hasEagerState?ut.eagerState:h(T,St)}else bt={lane:St,revertLane:ut.revertLane,action:ut.action,hasEagerState:ut.hasEagerState,eagerState:ut.eagerState,next:null},P===null?(q=P=bt,N=T):P=P.next=bt,Vt.lanes|=St,Oa|=St;ut=ut.next}while(ut!==null&&ut!==u);if(P===null?N=T:P.next=q,!Ta(T,s.memoizedState)&&(Ke=!0,yt&&(h=Fl,h!==null)))throw h;s.memoizedState=T,s.baseState=N,s.baseQueue=P,y.lastRenderedState=T}return S===null&&(y.lanes=0),[s.memoizedState,y.dispatch]}function El(s){var u=ze(),h=u.queue;if(h===null)throw Error(o(311));h.lastRenderedReducer=s;var y=h.dispatch,S=h.pending,T=u.memoizedState;if(S!==null){h.pending=null;var N=S=S.next;do T=s(T,N.action),N=N.next;while(N!==S);Ta(T,u.memoizedState)||(Ke=!0),u.memoizedState=T,u.baseQueue===null&&(u.baseState=T),h.lastRenderedState=T}return[T,y]}function cd(s,u,h){var y=Vt,S=ze(),T=le;if(T){if(h===void 0)throw Error(o(407));h=h()}else h=u();var N=!Ta((fe||S).memoizedState,h);if(N&&(S.memoizedState=h,Ke=!0),S=S.queue,ar(fd.bind(null,y,S,s),[s]),S.getSnapshot!==u||N||Ze!==null&&Ze.memoizedState.tag&1){if(y.flags|=2048,hs(9,Pc.bind(null,y,S,h,u),{destroy:void 0},null),Jt===null)throw Error(o(349));T||(Ui&60)!==0||Jc(y,u,h)}return h}function Jc(s,u,h){s.flags|=16384,s={getSnapshot:u,value:h},u=Vt.updateQueue,u===null?(u=cc(),Vt.updateQueue=u,u.stores=[s]):(h=u.stores,h===null?u.stores=[s]:h.push(s))}function Pc(s,u,h,y){u.value=h,u.getSnapshot=y,tr(u)&&er(s)}function fd(s,u,h){return h(function(){tr(u)&&er(s)})}function tr(s){var u=s.getSnapshot;s=s.value;try{var h=u();return!Ta(s,h)}catch{return!0}}function er(s){var u=Fa(s,2);u!==null&&On(u,s,2)}function $a(s){var u=on();if(typeof s=="function"){var h=s;if(s=h(),cl){H(!0);try{h()}finally{H(!1)}}}return u.memoizedState=u.baseState=s,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:s},u}function pa(s,u,h,y){return s.baseState=h,Ji(s,fe,typeof y=="function"?y:gi)}function hd(s,u,h,y,S){if(ys(s))throw Error(o(485));if(s=u.action,s!==null){var T={payload:S,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){T.listeners.push(N)}};Nt.T!==null?h(!0):T.isTransition=!1,y(T),h=u.pending,h===null?(T.next=u.pending=T,dd(u,T)):(T.next=h.next,u.pending=h.next=T)}}function dd(s,u){var h=u.action,y=u.payload,S=s.state;if(u.isTransition){var T=Nt.T,N={};Nt.T=N;try{var q=h(S,y),P=Nt.S;P!==null&&P(N,q),mo(s,u,q)}catch(ut){nu(s,u,ut)}finally{Nt.T=T}}else try{T=h(S,y),mo(s,u,T)}catch(ut){nu(s,u,ut)}}function mo(s,u,h){h!==null&&typeof h=="object"&&typeof h.then=="function"?h.then(function(y){Wc(s,u,y)},function(y){return nu(s,u,y)}):Wc(s,u,h)}function Wc(s,u,h){u.status="fulfilled",u.value=h,md(u),s.state=h,u=s.pending,u!==null&&(h=u.next,h===u?s.pending=null:(h=h.next,u.next=h,dd(s,h)))}function nu(s,u,h){var y=s.pending;if(s.pending=null,y!==null){y=y.next;do u.status="rejected",u.reason=h,md(u),u=u.next;while(u!==y)}s.action=null}function md(s){s=s.listeners;for(var u=0;u<s.length;u++)(0,s[u])()}function ya(s,u){return u}function po(s,u){if(le){var h=Jt.formState;if(h!==null){t:{var y=Vt;if(le){if(An){var S=kd(An,Qa);if(S){An=Ff(S),y=Jd(S);break t}}ce(y)}y=!1}y&&(u=h[0])}}h=on(),h.memoizedState=h.baseState=u,y={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:u},h.queue=y,h=So.bind(null,Vt,y),y.dispatch=h,y=$a(!1);var T=bo.bind(null,Vt,!1,y.queue);return y=on(),S={state:u,dispatch:null,action:s,pending:null},y.queue=S,h=hd.bind(null,Vt,S,T,h),S.dispatch=h,y.memoizedState=s,[u,h,!1]}function Fc(s){var u=ze();return yo(u,fe,s)}function yo(s,u,h){u=Ji(s,u,ya)[0],s=$u(gi)[0],u=typeof u=="object"&&u!==null&&typeof u.then=="function"?Ki(u):u;var y=ze(),S=y.queue,T=S.dispatch;return h!==y.memoizedState&&(Vt.flags|=2048,hs(9,au.bind(null,S,h),{destroy:void 0},null)),[u,T,s]}function au(s,u){s.action=u}function Ic(s){var u=ze(),h=fe;if(h!==null)return yo(u,h,s);ze(),u=u.memoizedState,h=ze();var y=h.queue.dispatch;return h.memoizedState=s,[u,y,!1]}function hs(s,u,h,y){return s={tag:s,create:u,inst:h,deps:y,next:null},u=Vt.updateQueue,u===null&&(u=cc(),Vt.updateQueue=u),h=u.lastEffect,h===null?u.lastEffect=s.next=s:(y=h.next,h.next=s,s.next=y,u.lastEffect=s),s}function ds(){return ze().memoizedState}function go(s,u,h,y){var S=on();Vt.flags|=s,S.memoizedState=hs(1|u,h,{destroy:void 0},y===void 0?null:y)}function nr(s,u,h,y){var S=ze();y=y===void 0?null:y;var T=S.memoizedState.inst;fe!==null&&y!==null&&Rn(y,fe.memoizedState.deps)?S.memoizedState=hs(u,h,T,y):(Vt.flags|=s,S.memoizedState=hs(1|u,h,T,y))}function $c(s,u){go(8390656,8,s,u)}function ar(s,u){nr(2048,8,s,u)}function pd(s,u){return nr(4,2,s,u)}function yd(s,u){return nr(4,4,s,u)}function ir(s,u){if(typeof u=="function"){s=s();var h=u(s);return function(){typeof h=="function"?h():u(null)}}if(u!=null)return s=s(),u.current=s,function(){u.current=null}}function vi(s,u,h){h=h!=null?h.concat([s]):null,nr(4,4,ir.bind(null,u,s),h)}function lr(){}function vo(s,u){var h=ze();u=u===void 0?null:u;var y=h.memoizedState;return u!==null&&Rn(u,y[1])?y[0]:(h.memoizedState=[s,u],s)}function ms(s,u){var h=ze();u=u===void 0?null:u;var y=h.memoizedState;if(u!==null&&Rn(u,y[1]))return y[0];if(y=s(),cl){H(!0);try{s()}finally{H(!1)}}return h.memoizedState=[y,u],y}function Cl(s,u,h){return h===void 0||(Ui&1073741824)!==0?s.memoizedState=u:(s.memoizedState=h,s=Si(),Vt.lanes|=s,Oa|=s,h)}function tf(s,u,h,y){return Ta(h,u)?h:Ni.current!==null?(s=Cl(s,h,y),Ta(s,u)||(Ke=!0),s):(Ui&42)===0?(Ke=!0,s.memoizedState=h):(s=Si(),Vt.lanes|=s,Oa|=s,u)}function xo(s,u,h,y,S){var T=cn();Un(T!==0&&8>T?T:8);var N=Nt.T,q={};Nt.T=q,bo(s,!1,u,h);try{var P=S(),ut=Nt.S;if(ut!==null&&ut(q,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var yt=sd(P,y);Ml(s,u,yt,Vn(s))}else Ml(s,u,y,Vn(s))}catch(St){Ml(s,u,{then:function(){},status:"rejected",reason:St},Vn())}finally{Un(T),Nt.T=N}}function ef(s){var u=s.memoizedState;if(u!==null)return u;u={memoizedState:na,baseState:na,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:na},next:null};var h={};return u.next={memoizedState:h,baseState:h,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:gi,lastRenderedState:h},next:null},s.memoizedState=u,s=s.alternate,s!==null&&(s.memoizedState=u),u}function ps(){return Sn(Ht)}function xi(){return ze().memoizedState}function _o(){return ze().memoizedState}function sr(s){for(var u=s.return;u!==null;){switch(u.tag){case 24:case 3:var h=Vn();s=qa(h);var y=Ie(u,s,h);y!==null&&(On(y,u,h),Ya(y,u,h)),u={cache:Mo()},s.payload=u;return}u=u.return}}function Al(s,u,h){var y=Vn();h={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null},ys(s)?ur(u,h):(h=rs(s,u,h,y),h!==null&&(On(h,s,y),nf(h,u,y)))}function So(s,u,h){var y=Vn();Ml(s,u,h,y)}function Ml(s,u,h,y){var S={lane:y,revertLane:0,action:h,hasEagerState:!1,eagerState:null,next:null};if(ys(s))ur(u,S);else{var T=s.alternate;if(s.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var N=u.lastRenderedState,q=T(N,h);if(S.hasEagerState=!0,S.eagerState=q,Ta(q,N))return Fn(s,u,S,0),Jt===null&&mn(),!1}catch{}finally{}if(h=rs(s,u,S,y),h!==null)return On(h,s,y),nf(h,u,y),!0}return!1}function bo(s,u,h,y){if(y={lane:2,revertLane:lo(),action:y,hasEagerState:!1,eagerState:null,next:null},ys(s)){if(u)throw Error(o(479))}else u=rs(s,h,y,2),u!==null&&On(u,s,2)}function ys(s){var u=s.alternate;return s===Vt||u!==null&&u===Vt}function ur(s,u){Ue=ka=!0;var h=s.pending;h===null?u.next=u:(u.next=h.next,h.next=u),s.pending=u}function nf(s,u,h){if((h&4194176)!==0){var y=u.lanes;y&=s.pendingLanes,h|=y,u.lanes=h,xt(s,h)}}function zn(s,u,h,y){u=s.memoizedState,h=h(y,u),h=h==null?u:As({},u,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}function Rl(s,u,h,y,S,T,N){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(y,T,N):u.prototype&&u.prototype.isPureReactComponent?!cs(h,y)||!cs(S,T):!0}function rr(s,u,h,y){s=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(h,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(h,y),u.state!==s&&fc.enqueueReplaceState(u,u.state,null)}function ti(s,u){var h=u;if("ref"in u){h={};for(var y in u)y!=="ref"&&(h[y]=u[y])}if(s=s.defaultProps){h===u&&(h=As({},h));for(var S in s)h[S]===void 0&&(h[S]=s[S])}return h}function To(s,u){try{var h=s.onUncaughtError;h(u.value,{componentStack:u.stack})}catch(y){setTimeout(function(){throw y})}}function Eo(s,u,h){try{var y=s.onCaughtError;y(h.value,{componentStack:h.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(S){setTimeout(function(){throw S})}}function or(s,u,h){return h=qa(h),h.tag=3,h.payload={element:null},h.callback=function(){To(s,u)},h}function iu(s){return s=qa(s),s.tag=3,s}function cr(s,u,h,y){var S=h.type.getDerivedStateFromError;if(typeof S=="function"){var T=y.value;s.payload=function(){return S(T)},s.callback=function(){Eo(u,h,y)}}var N=h.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(s.callback=function(){Eo(u,h,y),typeof S!="function"&&(Ua===null?Ua=new Set([this]):Ua.add(this));var q=y.stack;this.componentDidCatch(y.value,{componentStack:q!==null?q:""})})}function gd(s,u,h,y,S){if(h.flags|=32768,y!==null&&typeof y=="object"&&typeof y.then=="function"){if(u=h.alternate,u!==null&&gs(u,h,S,!0),h=za.current,h!==null){switch(h.tag){case 13:return Ka===null?ea():h.alternate===null&&ne===0&&(ne=3),h.flags&=-257,h.flags|=65536,h.lanes=S,y===oc?h.flags|=16384:(u=h.updateQueue,u===null?h.updateQueue=new Set([y]):u.add(y),Lo(s,y,S)),!1;case 22:return h.flags|=65536,y===oc?h.flags|=16384:(u=h.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([y])},h.updateQueue=u):(h=u.retryQueue,h===null?u.retryQueue=new Set([y]):h.add(y)),Lo(s,y,S)),!1}throw Error(o(435,h.tag))}return Lo(s,y,S),ea(),!1}if(le)return u=za.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=S,y!==qr&&(s=Error(o(422),{cause:y}),Wn(et(s,h)))):(y!==qr&&(u=Error(o(423),{cause:y}),Wn(et(u,h))),s=s.current.alternate,s.flags|=65536,S&=-S,s.lanes|=S,y=et(y,h),S=or(s.stateNode,y,S),Yn(s,S),ne!==4&&(ne=2)),!1;var T=Error(o(520),{cause:y});if(T=et(T,h),Uu===null?Uu=[T]:Uu.push(T),ne!==4&&(ne=2),u===null)return!0;y=et(y,h),h=u;do{switch(h.tag){case 3:return h.flags|=65536,s=S&-S,h.lanes|=s,s=or(h.stateNode,y,s),Yn(h,s),!1;case 1:if(u=h.type,T=h.stateNode,(h.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||T!==null&&typeof T.componentDidCatch=="function"&&(Ua===null||!Ua.has(T))))return h.flags|=65536,S&=-S,h.lanes|=S,S=iu(S),cr(S,s,h,y),Yn(h,S),!1}h=h.return}while(h!==null);return!1}function _n(s,u,h,y){u.child=s===null?hh(u,null,h,y):Il(u,s.child,h,y)}function vd(s,u,h,y,S){h=h.render;var T=u.ref;if("ref"in y){var N={};for(var q in y)q!=="ref"&&(N[q]=y[q])}else N=y;return vs(u),y=Tl(s,u,h,N,T,S),q=ho(),s!==null&&!Ke?(fs(s,u,S),Pi(s,u,S)):(le&&q&&I(u),u.flags|=1,_n(s,u,y,S),u.child)}function xd(s,u,h,y,S){if(s===null){var T=h.type;return typeof T=="function"&&!el(T)&&T.defaultProps===void 0&&h.compare===null?(u.tag=15,u.type=T,Co(s,u,T,y,S)):(s=La(h.type,null,y,u,u.mode,S),s.ref=u.ref,s.return=u,u.child=s)}if(T=s.child,!cf(s,S)){var N=T.memoizedProps;if(h=h.compare,h=h!==null?h:cs,h(N,y)&&s.ref===u.ref)return Pi(s,u,S)}return u.flags|=1,s=Nn(T,y),s.ref=u.ref,s.return=u,u.child=s}function Co(s,u,h,y,S){if(s!==null){var T=s.memoizedProps;if(cs(T,y)&&s.ref===u.ref)if(Ke=!1,u.pendingProps=y=T,cf(s,S))(s.flags&131072)!==0&&(Ke=!0);else return u.lanes=s.lanes,Pi(s,u,S)}return af(s,u,h,y,S)}function _d(s,u,h){var y=u.pendingProps,S=y.children,T=(u.stateNode._pendingVisibility&2)!==0,N=s!==null?s.memoizedState:null;if(fr(s,u),y.mode==="hidden"||T){if((u.flags&128)!==0){if(y=N!==null?N.baseLanes|h:h,s!==null){for(S=u.child=s.child,T=0;S!==null;)T=T|S.lanes|S.childLanes,S=S.sibling;u.childLanes=T&~y}else u.childLanes=0,u.child=null;return Sd(s,u,y,h)}if((h&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},s!==null&&Ro(u,N!==null?N.cachePool:null),N!==null?kc(u,N):ro(),co(u);else return u.lanes=u.childLanes=536870912,Sd(s,u,N!==null?N.baseLanes|h:h,h)}else N!==null?(Ro(u,N.cachePool),kc(u,N),Zi(),u.memoizedState=null):(s!==null&&Ro(u,null),ro(),Zi());return _n(s,u,S,h),u.child}function Sd(s,u,h,y){var S=Ol();return S=S===null?null:{parent:Mi?de._currentValue:de._currentValue2,pool:S},u.memoizedState={baseLanes:h,cachePool:S},s!==null&&Ro(u,null),ro(),co(u),s!==null&&gs(s,u,y,!0),null}function fr(s,u){var h=u.ref;if(h===null)s!==null&&s.ref!==null&&(u.flags|=2097664);else{if(typeof h!="function"&&typeof h!="object")throw Error(o(284));(s===null||s.ref!==h)&&(u.flags|=2097664)}}function af(s,u,h,y,S){return vs(u),h=Tl(s,u,h,y,void 0,S),y=ho(),s!==null&&!Ke?(fs(s,u,S),Pi(s,u,S)):(le&&y&&I(u),u.flags|=1,_n(s,u,h,S),u.child)}function bd(s,u,h,y,S,T){return vs(u),u.updateQueue=null,h=od(u,y,h,S),fo(s),y=ho(),s!==null&&!Ke?(fs(s,u,T),Pi(s,u,T)):(le&&y&&I(u),u.flags|=1,_n(s,u,h,T),u.child)}function lf(s,u,h,y,S){if(vs(u),u.stateNode===null){var T=Os,N=h.contextType;typeof N=="object"&&N!==null&&(T=Sn(N)),T=new h(y,T),u.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,T.updater=fc,u.stateNode=T,T._reactInternals=u,T=u.stateNode,T.props=y,T.state=u.memoizedState,T.refs={},Zc(u),N=h.contextType,T.context=typeof N=="object"&&N!==null?Sn(N):Os,T.state=u.memoizedState,N=h.getDerivedStateFromProps,typeof N=="function"&&(zn(u,h,N,y),T.state=u.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof T.getSnapshotBeforeUpdate=="function"||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(N=T.state,typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount(),N!==T.state&&fc.enqueueReplaceState(T,T.state,null),Ju(u,y,T,S),ku(),T.state=u.memoizedState),typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!0}else if(s===null){T=u.stateNode;var q=u.memoizedProps,P=ti(h,q);T.props=P;var ut=T.context,yt=h.contextType;N=Os,typeof yt=="object"&&yt!==null&&(N=Sn(yt));var St=h.getDerivedStateFromProps;yt=typeof St=="function"||typeof T.getSnapshotBeforeUpdate=="function",q=u.pendingProps!==q,yt||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(q||ut!==N)&&rr(u,T,y,N),ol=!1;var bt=u.memoizedState;T.state=bt,Ju(u,y,T,S),ku(),ut=u.memoizedState,q||bt!==ut||ol?(typeof St=="function"&&(zn(u,h,St,y),ut=u.memoizedState),(P=ol||Rl(u,h,P,y,bt,ut,N))?(yt||typeof T.UNSAFE_componentWillMount!="function"&&typeof T.componentWillMount!="function"||(typeof T.componentWillMount=="function"&&T.componentWillMount(),typeof T.UNSAFE_componentWillMount=="function"&&T.UNSAFE_componentWillMount()),typeof T.componentDidMount=="function"&&(u.flags|=4194308)):(typeof T.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=ut),T.props=y,T.state=ut,T.context=N,y=P):(typeof T.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{T=u.stateNode,Kc(s,u),N=u.memoizedProps,yt=ti(h,N),T.props=yt,St=u.pendingProps,bt=T.context,ut=h.contextType,P=Os,typeof ut=="object"&&ut!==null&&(P=Sn(ut)),q=h.getDerivedStateFromProps,(ut=typeof q=="function"||typeof T.getSnapshotBeforeUpdate=="function")||typeof T.UNSAFE_componentWillReceiveProps!="function"&&typeof T.componentWillReceiveProps!="function"||(N!==St||bt!==P)&&rr(u,T,y,P),ol=!1,bt=u.memoizedState,T.state=bt,Ju(u,y,T,S),ku();var qt=u.memoizedState;N!==St||bt!==qt||ol||s!==null&&s.dependencies!==null&&Dl(s.dependencies)?(typeof q=="function"&&(zn(u,h,q,y),qt=u.memoizedState),(yt=ol||Rl(u,h,yt,y,bt,qt,P)||s!==null&&s.dependencies!==null&&Dl(s.dependencies))?(ut||typeof T.UNSAFE_componentWillUpdate!="function"&&typeof T.componentWillUpdate!="function"||(typeof T.componentWillUpdate=="function"&&T.componentWillUpdate(y,qt,P),typeof T.UNSAFE_componentWillUpdate=="function"&&T.UNSAFE_componentWillUpdate(y,qt,P)),typeof T.componentDidUpdate=="function"&&(u.flags|=4),typeof T.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=qt),T.props=y,T.state=qt,T.context=P,y=yt):(typeof T.componentDidUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=4),typeof T.getSnapshotBeforeUpdate!="function"||N===s.memoizedProps&&bt===s.memoizedState||(u.flags|=1024),y=!1)}return T=y,fr(s,u),y=(u.flags&128)!==0,T||y?(T=u.stateNode,h=y&&typeof h.getDerivedStateFromError!="function"?null:T.render(),u.flags|=1,s!==null&&y?(u.child=Il(u,s.child,null,S),u.child=Il(u,null,h,S)):_n(s,u,h,S),u.memoizedState=T.state,s=u.child):s=Pi(s,u,S),s}function Td(s,u,h,y){return qn(),u.flags|=256,_n(s,u,h,y),u.child}function sf(s){return{baseLanes:s,cachePool:Rd()}}function uf(s,u,h){return s=s!==null?s.childLanes&~h:0,u&&(s|=ra),s}function Ed(s,u,h){var y=u.pendingProps,S=!1,T=(u.flags&128)!==0,N;if((N=T)||(N=s!==null&&s.memoizedState===null?!1:(en.current&2)!==0),N&&(S=!0,u.flags&=-129),N=(u.flags&32)!==0,u.flags&=-33,s===null){if(le){if(S?pi(u):Zi(),le){var q=An,P;(P=q)&&(q=$d(q,Qa),q!==null?(u.memoizedState={dehydrated:q,treeContext:li!==null?{id:Di,overflow:Va}:null,retryLane:536870912},P=n(18,null,null,0),P.stateNode=q,P.return=u,u.child=P,Bn=u,An=null,P=!0):P=!1),P||ce(u)}if(q=u.memoizedState,q!==null&&(q=q.dehydrated,q!==null))return Or(q)?u.lanes=16:u.lanes=536870912,null;yi(u)}return q=y.children,y=y.fallback,S?(Zi(),S=u.mode,q=rf({mode:"hidden",children:q},S),y=al(y,S,h,null),q.return=u,y.return=u,q.sibling=y,u.child=q,S=u.child,S.memoizedState=sf(h),S.childLanes=uf(s,N,h),u.memoizedState=Hn,y):(pi(u),hr(u,q))}if(P=s.memoizedState,P!==null&&(q=P.dehydrated,q!==null)){if(T)u.flags&256?(pi(u),u.flags&=-257,u=of(s,u,h)):u.memoizedState!==null?(Zi(),u.child=s.child,u.flags|=128,u=null):(Zi(),S=y.fallback,q=u.mode,y=rf({mode:"visible",children:y.children},q),S=al(S,q,h,null),S.flags|=2,y.return=u,S.return=u,y.sibling=S,u.child=y,Il(u,s.child,null,h),y=u.child,y.memoizedState=sf(h),y.childLanes=uf(s,N,h),u.memoizedState=Hn,u=S);else if(pi(u),Or(q))N=Kd(q).digest,y=Error(o(419)),y.stack="",y.digest=N,Wn({value:y,source:null,stack:null}),u=of(s,u,h);else if(Ke||gs(s,u,h,!1),N=(h&s.childLanes)!==0,Ke||N){if(N=Jt,N!==null){if(y=h&-h,(y&42)!==0)y=1;else switch(y){case 2:y=1;break;case 8:y=4;break;case 32:y=16;break;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:y=64;break;case 268435456:y=134217728;break;default:y=0}if(y=(y&(N.suspendedLanes|h))!==0?0:y,y!==0&&y!==P.retryLane)throw P.retryLane=y,Fa(s,y),On(N,s,y),mm}$o(q)||ea(),u=of(s,u,h)}else $o(q)?(u.flags|=128,u.child=s.child,u=Es.bind(null,s),Op(q,u),u=null):(s=P.treeContext,Qn&&(An=Wd(q),Bn=u,le=!0,Aa=null,Qa=!1,s!==null&&(Ea[Ca++]=Di,Ea[Ca++]=Va,Ea[Ca++]=li,Di=s.id,Va=s.overflow,li=u)),u=hr(u,y.children),u.flags|=4096);return u}return S?(Zi(),S=y.fallback,q=u.mode,P=s.child,T=P.sibling,y=Nn(P,{mode:"hidden",children:y.children}),y.subtreeFlags=P.subtreeFlags&31457280,T!==null?S=Nn(T,S):(S=al(S,q,h,null),S.flags|=2),S.return=u,y.return=u,y.sibling=S,u.child=y,y=S,S=u.child,q=s.child.memoizedState,q===null?q=sf(h):(P=q.cachePool,P!==null?(T=Mi?de._currentValue:de._currentValue2,P=P.parent!==T?{parent:T,pool:T}:P):P=Rd(),q={baseLanes:q.baseLanes|h,cachePool:P}),S.memoizedState=q,S.childLanes=uf(s,N,h),u.memoizedState=Hn,y):(pi(u),h=s.child,s=h.sibling,h=Nn(h,{mode:"visible",children:y.children}),h.return=u,h.sibling=null,s!==null&&(N=u.deletions,N===null?(u.deletions=[s],u.flags|=16):N.push(s)),u.child=h,u.memoizedState=null,h)}function hr(s,u){return u=rf({mode:"visible",children:u},s.mode),u.return=s,s.child=u}function rf(s,u){return Xo(s,u,0,null)}function of(s,u,h){return Il(u,s.child,null,h),s=hr(u,u.pendingProps.children),s.flags|=2,u.memoizedState=null,s}function Cd(s,u,h){s.lanes|=u;var y=s.alternate;y!==null&&(y.lanes|=u),ff(s.return,u,h)}function Ao(s,u,h,y,S){var T=s.memoizedState;T===null?s.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:h,tailMode:S}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=y,T.tail=h,T.tailMode=S)}function Ad(s,u,h){var y=u.pendingProps,S=y.revealOrder,T=y.tail;if(_n(s,u,y.children,h),y=en.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(s!==null&&(s.flags&128)!==0)t:for(s=u.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&Cd(s,h,u);else if(s.tag===19)Cd(s,h,u);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===u)break t;for(;s.sibling===null;){if(s.return===null||s.return===u)break t;s=s.return}s.sibling.return=s.return,s=s.sibling}y&=1}switch(B(en,y),S){case"forwards":for(h=u.child,S=null;h!==null;)s=h.alternate,s!==null&&Ia(s)===null&&(S=h),h=h.sibling;h=S,h===null?(S=u.child,u.child=null):(S=h.sibling,h.sibling=null),Ao(u,!1,S,h,T);break;case"backwards":for(h=null,S=u.child,u.child=null;S!==null;){if(s=S.alternate,s!==null&&Ia(s)===null){u.child=S;break}s=S.sibling,S.sibling=h,h=S,S=s}Ao(u,!0,h,null,T);break;case"together":Ao(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function Pi(s,u,h){if(s!==null&&(u.dependencies=s.dependencies),Oa|=u.lanes,(h&u.childLanes)===0)if(s!==null){if(gs(s,u,h,!1),(h&u.childLanes)===0)return null}else return null;if(s!==null&&u.child!==s.child)throw Error(o(153));if(u.child!==null){for(s=u.child,h=Nn(s,s.pendingProps),u.child=h,h.return=u;s.sibling!==null;)s=s.sibling,h=h.sibling=Nn(s,s.pendingProps),h.return=u;h.sibling=null}return u.child}function cf(s,u){return(s.lanes&u)!==0?!0:(s=s.dependencies,!!(s!==null&&Dl(s)))}function Rp(s,u,h){switch(u.tag){case 3:pt(u,u.stateNode.containerInfo),zl(u,de,s.memoizedState.cache),qn();break;case 27:case 5:Ot(u);break;case 4:pt(u,u.stateNode.containerInfo);break;case 10:zl(u,u.type,u.memoizedProps.value);break;case 13:var y=u.memoizedState;if(y!==null)return y.dehydrated!==null?(pi(u),u.flags|=128,null):(h&u.child.childLanes)!==0?Ed(s,u,h):(pi(u),s=Pi(s,u,h),s!==null?s.sibling:null);pi(u);break;case 19:var S=(s.flags&128)!==0;if(y=(h&u.childLanes)!==0,y||(gs(s,u,h,!1),y=(h&u.childLanes)!==0),S){if(y)return Ad(s,u,h);u.flags|=128}if(S=u.memoizedState,S!==null&&(S.rendering=null,S.tail=null,S.lastEffect=null),B(en,en.current),y)break;return null;case 22:case 23:return u.lanes=0,_d(s,u,h);case 24:zl(u,de,s.memoizedState.cache)}return Pi(s,u,h)}function Md(s,u,h){if(s!==null)if(s.memoizedProps!==u.pendingProps)Ke=!0;else{if(!cf(s,h)&&(u.flags&128)===0)return Ke=!1,Rp(s,u,h);Ke=(s.flags&131072)!==0}else Ke=!1,le&&(u.flags&1048576)!==0&&j(u,Gr,u.index);switch(u.lanes=0,u.tag){case 16:t:{s=u.pendingProps;var y=u.elementType,S=y._init;if(y=S(y._payload),u.type=y,typeof y=="function")el(y)?(s=ti(y,s),u.tag=1,u=lf(null,u,y,s,h)):(u.tag=0,u=af(null,u,y,s,h));else{if(y!=null){if(S=y.$$typeof,S===_u){u.tag=11,u=vd(null,u,y,s,h);break t}else if(S===Tr){u.tag=14,u=xd(null,u,y,s,h);break t}}throw u=d(y)||y,Error(o(306,u,""))}}return u;case 0:return af(s,u,u.type,u.pendingProps,h);case 1:return y=u.type,S=ti(y,u.pendingProps),lf(s,u,y,S,h);case 3:t:{if(pt(u,u.stateNode.containerInfo),s===null)throw Error(o(387));var T=u.pendingProps;S=u.memoizedState,y=S.element,Kc(s,u),Ju(u,T,null,h);var N=u.memoizedState;if(T=N.cache,zl(u,de,T),T!==S.cache&&hf(u,[de],h,!0),ku(),T=N.element,Qn&&S.isDehydrated)if(S={element:T,isDehydrated:!1,cache:N.cache},u.updateQueue.baseState=S,u.memoizedState=S,u.flags&256){u=Td(s,u,T,h);break t}else if(T!==y){y=et(Error(o(424)),u),Wn(y),u=Td(s,u,T,h);break t}else for(Qn&&(An=Pd(u.stateNode.containerInfo),Bn=u,le=!0,Aa=null,Qa=!0),h=hh(u,null,T,h),u.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(qn(),T===y){u=Pi(s,u,h);break t}_n(s,u,T,h)}u=u.child}return u;case 26:if(ba)return fr(s,u),s===null?(h=ic(u.type,null,u.pendingProps,null))?u.memoizedState=h:le||(u.stateNode=Up(u.type,u.pendingProps,si.current,u)):u.memoizedState=ic(u.type,s.memoizedProps,u.pendingProps,s.memoizedState),null;case 27:if(En)return Ot(u),s===null&&En&&le&&(y=u.stateNode=rh(u.type,u.pendingProps,si.current,xn.current,!1),Bn=u,Qa=!0,An=tc(y)),y=u.pendingProps.children,s!==null||le?_n(s,u,y,h):u.child=Il(u,null,y,h),fr(s,u),u.child;case 5:return s===null&&le&&(im(u.type,u.pendingProps,xn.current),(S=y=An)&&(y=Fd(y,u.type,u.pendingProps,Qa),y!==null?(u.stateNode=y,Bn=u,An=tc(y),Qa=!1,S=!0):S=!1),S||ce(u)),Ot(u),S=u.type,T=u.pendingProps,N=s!==null?s.memoizedProps:null,y=T.children,kl(S,T)?y=null:N!==null&&kl(S,N)&&(u.flags|=32),u.memoizedState!==null&&(S=Tl(s,u,Mp,null,null,h),Mi?Ht._currentValue=S:Ht._currentValue2=S),fr(s,u),_n(s,u,y,h),u.child;case 6:return s===null&&le&&(lm(u.pendingProps,xn.current),(s=h=An)&&(h=Id(h,u.pendingProps,Qa),h!==null?(u.stateNode=h,Bn=u,An=null,s=!0):s=!1),s||ce(u)),null;case 13:return Ed(s,u,h);case 4:return pt(u,u.stateNode.containerInfo),y=u.pendingProps,s===null?u.child=Il(u,null,y,h):_n(s,u,y,h),u.child;case 11:return vd(s,u,u.type,u.pendingProps,h);case 7:return _n(s,u,u.pendingProps,h),u.child;case 8:return _n(s,u,u.pendingProps.children,h),u.child;case 12:return _n(s,u,u.pendingProps.children,h),u.child;case 10:return y=u.pendingProps,zl(u,u.type,y.value),_n(s,u,y.children,h),u.child;case 9:return S=u.type._context,y=u.pendingProps.children,vs(u),S=Sn(S),y=y(S),u.flags|=1,_n(s,u,y,h),u.child;case 14:return xd(s,u,u.type,u.pendingProps,h);case 15:return Co(s,u,u.type,u.pendingProps,h);case 19:return Ad(s,u,h);case 22:return _d(s,u,h);case 24:return vs(u),y=Sn(de),s===null?(S=Ol(),S===null&&(S=Jt,T=Mo(),S.pooledCache=T,T.refCount++,T!==null&&(S.pooledCacheLanes|=h),S=T),u.memoizedState={parent:y,cache:S},Zc(u),zl(u,de,S)):((s.lanes&h)!==0&&(Kc(s,u),Ju(u,null,null,h),ku()),S=s.memoizedState,T=u.memoizedState,S.parent!==y?(S={parent:y,cache:y},u.memoizedState=S,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=S),zl(u,de,y)):(y=T.cache,zl(u,de,y),y!==S.cache&&hf(u,[de],h,!0))),_n(s,u,u.pendingProps.children,h),u.child;case 29:throw u.pendingProps}throw Error(o(156,u.tag))}function zl(s,u,h){Mi?(B(sa,u._currentValue),u._currentValue=h):(B(sa,u._currentValue2),u._currentValue2=h)}function Wi(s){var u=sa.current;Mi?s._currentValue=u:s._currentValue2=u,O(sa)}function ff(s,u,h){for(;s!==null;){var y=s.alternate;if((s.childLanes&u)!==u?(s.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),s===h)break;s=s.return}}function hf(s,u,h,y){var S=s.child;for(S!==null&&(S.return=s);S!==null;){var T=S.dependencies;if(T!==null){var N=S.child;T=T.firstContext;t:for(;T!==null;){var q=T;T=S;for(var P=0;P<u.length;P++)if(q.context===u[P]){T.lanes|=h,q=T.alternate,q!==null&&(q.lanes|=h),ff(T.return,h,s),y||(N=null);break t}T=q.next}}else if(S.tag===18){if(N=S.return,N===null)throw Error(o(341));N.lanes|=h,T=N.alternate,T!==null&&(T.lanes|=h),ff(N,h,s),N=null}else N=S.child;if(N!==null)N.return=S;else for(N=S;N!==null;){if(N===s){N=null;break}if(S=N.sibling,S!==null){S.return=N.return,N=S;break}N=N.return}S=N}}function gs(s,u,h,y){s=null;for(var S=u,T=!1;S!==null;){if(!T){if((S.flags&524288)!==0)T=!0;else if((S.flags&262144)!==0)break}if(S.tag===10){var N=S.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var q=S.type;Ta(S.pendingProps.value,N.value)||(s!==null?s.push(q):s=[q])}}else if(S===Mu.current){if(N=S.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==S.memoizedState.memoizedState&&(s!==null?s.push(Ht):s=[Ht])}S=S.return}s!==null&&hf(u,s,h,y),u.flags|=262144}function Dl(s){for(s=s.firstContext;s!==null;){var u=s.context;if(!Ta(Mi?u._currentValue:u._currentValue2,s.memoizedValue))return!0;s=s.next}return!1}function vs(s){ts=s,Le=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function Sn(s){return df(ts,s)}function dr(s,u){return ts===null&&vs(s),df(s,u)}function df(s,u){var h=Mi?u._currentValue:u._currentValue2;if(u={context:u,memoizedValue:h,next:null},Le===null){if(s===null)throw Error(o(308));Le=u,s.dependencies={lanes:0,firstContext:u},s.flags|=524288}else Le=Le.next=u;return h}function Mo(){return{controller:new pm,data:new Map,refCount:0}}function lu(s){s.refCount--,s.refCount===0&&fl(Bs,function(){s.controller.abort()})}function Ol(){var s=hl.current;return s!==null?s:Jt.pooledCache}function Ro(s,u){u===null?B(hl,hl.current):B(hl,u.pool)}function Rd(){var s=Ol();return s===null?null:{parent:Mi?de._currentValue:de._currentValue2,pool:s}}function ga(s){s.flags|=4}function mf(s,u){if(s!==null&&s.child===u.child)return!1;if((u.flags&16)!==0)return!0;for(s=u.child;s!==null;){if((s.flags&13878)!==0||(s.subtreeFlags&13878)!==0)return!0;s=s.sibling}return!1}function zo(s,u,h,y){if(Tn)for(h=u.child;h!==null;){if(h.tag===5||h.tag===6)Ai(s,h.stateNode);else if(!(h.tag===4||En&&h.tag===27)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===u)break;for(;h.sibling===null;){if(h.return===null||h.return===u)return;h=h.return}h.sibling.return=h.return,h=h.sibling}else if(_a)for(var S=u.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&y&&(T=Pf(T,S.type,S.memoizedProps)),Ai(s,T)}else if(S.tag===6)T=S.stateNode,h&&y&&(T=Wf(T,S.memoizedProps)),Ai(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),zo(s,S,!0,!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===u)break;for(;S.sibling===null;){if(S.return===null||S.return===u)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function su(s,u,h,y){if(_a)for(var S=u.child;S!==null;){if(S.tag===5){var T=S.stateNode;h&&y&&(T=Pf(T,S.type,S.memoizedProps)),kf(s,T)}else if(S.tag===6)T=S.stateNode,h&&y&&(T=Wf(T,S.memoizedProps)),kf(s,T);else if(S.tag!==4){if(S.tag===22&&S.memoizedState!==null)T=S.child,T!==null&&(T.return=S),su(s,S,!(S.memoizedProps!==null&&S.memoizedProps.mode==="manual"),!0);else if(S.child!==null){S.child.return=S,S=S.child;continue}}if(S===u)break;for(;S.sibling===null;){if(S.return===null||S.return===u)return;S=S.return}S.sibling.return=S.return,S=S.sibling}}function uu(s,u){if(_a&&mf(s,u)){s=u.stateNode;var h=s.containerInfo,y=Io();su(y,u,!1,!1),s.pendingChildren=y,ga(u),Zd(h,y)}}function pf(s,u,h,y){if(Tn)s.memoizedProps!==y&&ga(u);else if(_a){var S=s.stateNode,T=s.memoizedProps;if((s=mf(s,u))||T!==y){var N=xn.current;T=Kf(S,h,T,y,!s,null),T===S?u.stateNode=S:(ll(T,h,y,N)&&ga(u),u.stateNode=T,s?zo(T,u,!1,!1):ga(u))}else u.stateNode=S}}function ru(s,u,h){if(Xd(u,h)){if(s.flags|=16777216,!sl(u,h))if(xr())s.flags|=8192;else throw Us=oc,fh}else s.flags&=-16777217}function yf(s,u){if(sm(u)){if(s.flags|=16777216,!sh(u))if(xr())s.flags|=8192;else throw Us=oc,fh}else s.flags&=-16777217}function mr(s,u){u!==null&&(s.flags|=4),s.flags&16384&&(u=s.tag!==22?ct():536870912,s.lanes|=u,ml|=u)}function xs(s,u){if(!le)switch(s.tailMode){case"hidden":u=s.tail;for(var h=null;u!==null;)u.alternate!==null&&(h=u),u=u.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var y=null;h!==null;)h.alternate!==null&&(y=h),h=h.sibling;y===null?u||s.tail===null?s.tail=null:s.tail.sibling=null:y.sibling=null}}function De(s){var u=s.alternate!==null&&s.alternate.child===s.child,h=0,y=0;if(u)for(var S=s.child;S!==null;)h|=S.lanes|S.childLanes,y|=S.subtreeFlags&31457280,y|=S.flags&31457280,S.return=s,S=S.sibling;else for(S=s.child;S!==null;)h|=S.lanes|S.childLanes,y|=S.subtreeFlags,y|=S.flags,S.return=s,S=S.sibling;return s.subtreeFlags|=y,s.childLanes=h,u}function zd(s,u,h){var y=u.pendingProps;switch(st(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return De(u),null;case 1:return De(u),null;case 3:return h=u.stateNode,y=null,s!==null&&(y=s.memoizedState.cache),u.memoizedState.cache!==y&&(u.flags|=2048),Wi(de),Tt(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(s===null||s.child===null)&&(Ga(u)?ga(u):s===null||s.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Aa!==null&&(Ii(Aa),Aa=null))),uu(s,u),De(u),null;case 26:if(ba){h=u.type;var S=u.memoizedState;return s===null?(ga(u),S!==null?(De(u),yf(u,S)):(De(u),ru(u,h,y))):S?S!==s.memoizedState?(ga(u),De(u),yf(u,S)):(De(u),u.flags&=-16777217):(Tn?s.memoizedProps!==y&&ga(u):pf(s,u,h,y),De(u),ru(u,h,y)),null}case 27:if(En){if(Bt(u),h=si.current,S=u.type,s!==null&&u.stateNode!=null)Tn?s.memoizedProps!==y&&ga(u):pf(s,u,S,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return De(u),null}s=xn.current,Ga(u)?oe(u,s):(s=rh(S,y,h,s,!0),u.stateNode=s,ga(u))}return De(u),null}case 5:if(Bt(u),h=u.type,s!==null&&u.stateNode!=null)pf(s,u,h,y);else{if(!y){if(u.stateNode===null)throw Error(o(166));return De(u),null}s=xn.current,Ga(u)?oe(u,s):(S=wf(h,y,si.current,s,u),zo(S,u,!1,!1),u.stateNode=S,ll(S,h,y,s)&&ga(u))}return De(u),ru(u,u.type,u.pendingProps),null;case 6:if(s&&u.stateNode!=null)h=s.memoizedProps,Tn?h!==y&&ga(u):_a&&(h!==y?(u.stateNode=Ko(y,si.current,xn.current,u),ga(u)):u.stateNode=s.stateNode);else{if(typeof y!="string"&&u.stateNode===null)throw Error(o(166));if(s=si.current,h=xn.current,Ga(u)){if(!Qn)throw Error(o(176));if(s=u.stateNode,h=u.memoizedProps,y=null,S=Bn,S!==null)switch(S.tag){case 27:case 5:y=S.memoizedProps}tm(s,h,u,y)||ce(u)}else u.stateNode=Ko(y,s,h,u)}return De(u),null;case 13:if(y=u.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(S=Ga(u),y!==null&&y.dehydrated!==null){if(s===null){if(!S)throw Error(o(318));if(!Qn)throw Error(o(344));if(S=u.memoizedState,S=S!==null?S.dehydrated:null,!S)throw Error(o(317));bu(S,u)}else qn(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;De(u),S=!1}else Aa!==null&&(Ii(Aa),Aa=null),S=!0;if(!S)return u.flags&256?(yi(u),u):(yi(u),null)}if(yi(u),(u.flags&128)!==0)return u.lanes=h,u;if(h=y!==null,s=s!==null&&s.memoizedState!==null,h){y=u.child,S=null,y.alternate!==null&&y.alternate.memoizedState!==null&&y.alternate.memoizedState.cachePool!==null&&(S=y.alternate.memoizedState.cachePool.pool);var T=null;y.memoizedState!==null&&y.memoizedState.cachePool!==null&&(T=y.memoizedState.cachePool.pool),T!==S&&(y.flags|=2048)}return h!==s&&h&&(u.child.flags|=8192),mr(u,u.updateQueue),De(u),null;case 4:return Tt(),uu(s,u),s===null&&jf(u.stateNode.containerInfo),De(u),null;case 10:return Wi(u.type),De(u),null;case 19:if(O(en),S=u.memoizedState,S===null)return De(u),null;if(y=(u.flags&128)!==0,T=S.rendering,T===null)if(y)xs(S,!1);else{if(ne!==0||s!==null&&(s.flags&128)!==0)for(s=u.child;s!==null;){if(T=Ia(s),T!==null){for(u.flags|=128,xs(S,!1),s=T.updateQueue,u.updateQueue=s,mr(u,s),u.subtreeFlags=0,s=h,h=u.child;h!==null;)nl(h,s),h=h.sibling;return B(en,en.current&1|2),u.child}s=s.sibling}S.tail!==null&&Cn()>He&&(u.flags|=128,y=!0,xs(S,!1),u.lanes=4194304)}else{if(!y)if(s=Ia(T),s!==null){if(u.flags|=128,y=!0,s=s.updateQueue,u.updateQueue=s,mr(u,s),xs(S,!0),S.tail===null&&S.tailMode==="hidden"&&!T.alternate&&!le)return De(u),null}else 2*Cn()-S.renderingStartTime>He&&h!==536870912&&(u.flags|=128,y=!0,xs(S,!1),u.lanes=4194304);S.isBackwards?(T.sibling=u.child,u.child=T):(s=S.last,s!==null?s.sibling=T:u.child=T,S.last=T)}return S.tail!==null?(u=S.tail,S.rendering=u,S.tail=u.sibling,S.renderingStartTime=Cn(),u.sibling=null,s=en.current,B(en,y?s&1|2:s&1),u):(De(u),null);case 22:case 23:return yi(u),oo(),y=u.memoizedState!==null,s!==null?s.memoizedState!==null!==y&&(u.flags|=8192):y&&(u.flags|=8192),y?(h&536870912)!==0&&(u.flags&128)===0&&(De(u),u.subtreeFlags&6&&(u.flags|=8192)):De(u),h=u.updateQueue,h!==null&&mr(u,h.retryQueue),h=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==h&&(u.flags|=2048),s!==null&&O(hl),null;case 24:return h=null,s!==null&&(h=s.memoizedState.cache),u.memoizedState.cache!==h&&(u.flags|=2048),Wi(de),De(u),null;case 25:return null}throw Error(o(156,u.tag))}function Dd(s,u){switch(st(u),u.tag){case 1:return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 3:return Wi(de),Tt(),s=u.flags,(s&65536)!==0&&(s&128)===0?(u.flags=s&-65537|128,u):null;case 26:case 27:case 5:return Bt(u),null;case 13:if(yi(u),s=u.memoizedState,s!==null&&s.dehydrated!==null){if(u.alternate===null)throw Error(o(340));qn()}return s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 19:return O(en),null;case 4:return Tt(),null;case 10:return Wi(u.type),null;case 22:case 23:return yi(u),oo(),s!==null&&O(hl),s=u.flags,s&65536?(u.flags=s&-65537|128,u):null;case 24:return Wi(de),null;case 25:return null;default:return null}}function gf(s,u){switch(st(u),u.tag){case 3:Wi(de),Tt();break;case 26:case 27:case 5:Bt(u);break;case 4:Tt();break;case 13:yi(u);break;case 19:O(en);break;case 10:Wi(u.type);break;case 22:case 23:yi(u),oo(),s!==null&&O(hl);break;case 24:Wi(de)}}function pr(s,u){try{var h=u.updateQueue,y=h!==null?h.lastEffect:null;if(y!==null){var S=y.next;h=S;do{if((h.tag&s)===s){y=void 0;var T=h.create,N=h.inst;y=T(),N.destroy=y}h=h.next}while(h!==S)}}catch(q){Ft(u,u.return,q)}}function Nl(s,u,h){try{var y=u.updateQueue,S=y!==null?y.lastEffect:null;if(S!==null){var T=S.next;y=T;do{if((y.tag&s)===s){var N=y.inst,q=N.destroy;if(q!==void 0){N.destroy=void 0,S=u;var P=h;try{q()}catch(ut){Ft(S,P,ut)}}}y=y.next}while(y!==T)}}catch(ut){Ft(u,u.return,ut)}}function Od(s){var u=s.updateQueue;if(u!==null){var h=s.stateNode;try{Pu(u,h)}catch(y){Ft(s,s.return,y)}}}function Nd(s,u,h){h.props=ti(s.type,s.memoizedProps),h.state=s.memoizedState;try{h.componentWillUnmount()}catch(y){Ft(s,u,y)}}function _s(s,u){try{var h=s.ref;if(h!==null){var y=s.stateNode;switch(s.tag){case 26:case 27:case 5:var S=Su(y);break;default:S=y}typeof h=="function"?s.refCleanup=h(S):h.current=S}}catch(T){Ft(s,u,T)}}function Oe(s,u){var h=s.ref,y=s.refCleanup;if(h!==null)if(typeof y=="function")try{y()}catch(S){Ft(s,u,S)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof h=="function")try{h(null)}catch(S){Ft(s,u,S)}else h.current=null}function ou(s){var u=s.type,h=s.memoizedProps,y=s.stateNode;try{Dp(y,u,h,s)}catch(S){Ft(s,s.return,S)}}function vf(s,u,h){try{Xf(s.stateNode,s.type,h,u,s)}catch(y){Ft(s,s.return,y)}}function xf(s){return s.tag===5||s.tag===3||(ba?s.tag===26:!1)||(En?s.tag===27:!1)||s.tag===4}function Do(s){t:for(;;){for(;s.sibling===null;){if(s.return===null||xf(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&(!En||s.tag!==27)&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue t;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Oo(s,u,h){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?Qf(h,s,u):Vd(h,s);else if(!(y===4||En&&y===27)&&(s=s.child,s!==null))for(Oo(s,u,h),s=s.sibling;s!==null;)Oo(s,u,h),s=s.sibling}function cu(s,u,h){var y=s.tag;if(y===5||y===6)s=s.stateNode,u?Vf(h,s,u):Lf(h,s);else if(!(y===4||En&&y===27)&&(s=s.child,s!==null))for(cu(s,u,h),s=s.sibling;s!==null;)cu(s,u,h),s=s.sibling}function Ud(s,u,h){s=s.containerInfo;try{Jf(s,h)}catch(y){Ft(u,u.return,y)}}function fu(s,u){for(Kl(s.containerInfo),Xe=u;Xe!==null;)if(s=Xe,u=s.child,(s.subtreeFlags&1028)!==0&&u!==null)u.return=s,Xe=u;else for(;Xe!==null;){s=Xe;var h=s.alternate;switch(u=s.flags,s.tag){case 0:break;case 11:case 15:break;case 1:if((u&1024)!==0&&h!==null){u=void 0;var y=s,S=h.memoizedProps;h=h.memoizedState;var T=y.stateNode;try{var N=ti(y.type,S,y.elementType===y.type);u=T.getSnapshotBeforeUpdate(N,h),T.__reactInternalSnapshotBeforeUpdate=u}catch(q){Ft(y,y.return,q)}}break;case 3:(u&1024)!==0&&Tn&&Fo(s.stateNode.containerInfo);break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((u&1024)!==0)throw Error(o(163))}if(u=s.sibling,u!==null){u.return=s.return,Xe=u;break}Xe=s.return}return N=ws,ws=!1,N}function No(s,u,h){var y=h.flags;switch(h.tag){case 0:case 11:case 15:_i(s,h),y&4&&pr(5,h);break;case 1:if(_i(s,h),y&4)if(s=h.stateNode,u===null)try{s.componentDidMount()}catch(q){Ft(h,h.return,q)}else{var S=ti(h.type,u.memoizedProps);u=u.memoizedState;try{s.componentDidUpdate(S,u,s.__reactInternalSnapshotBeforeUpdate)}catch(q){Ft(h,h.return,q)}}y&64&&Od(h),y&512&&_s(h,h.return);break;case 3:if(_i(s,h),y&64&&(y=h.updateQueue,y!==null)){if(s=null,h.child!==null)switch(h.child.tag){case 27:case 5:s=Su(h.child.stateNode);break;case 1:s=h.child.stateNode}try{Pu(y,s)}catch(q){Ft(h,h.return,q)}}break;case 26:if(ba){_i(s,h),y&512&&_s(h,h.return);break}case 27:case 5:_i(s,h),u===null&&y&4&&ou(h),y&512&&_s(h,h.return);break;case 12:_i(s,h);break;case 13:_i(s,h),y&4&&Ul(s,h);break;case 22:if(S=h.memoizedState!==null||fn,!S){u=u!==null&&u.memoizedState!==null||we;var T=fn,N=we;fn=S,(we=u)&&!N?wl(s,h,(h.subtreeFlags&8772)!==0):_i(s,h),fn=T,we=N}y&512&&(h.memoizedProps.mode==="manual"?_s(h,h.return):Oe(h,h.return));break;default:_i(s,h)}}function hu(s){var u=s.alternate;u!==null&&(s.alternate=null,hu(u)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(u=s.stateNode,u!==null&&qf(u)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function va(s,u,h){for(h=h.child;h!==null;)Uo(s,u,h),h=h.sibling}function Uo(s,u,h){if(ia&&typeof ia.onCommitFiberUnmount=="function")try{ia.onCommitFiberUnmount(Au,h)}catch{}switch(h.tag){case 26:if(ba){we||Oe(h,u),va(s,u,h),h.memoizedState?eh(h.memoizedState):h.stateNode&&ih(h.stateNode);break}case 27:if(En){we||Oe(h,u);var y=ke,S=ua;ke=h.stateNode,va(s,u,h),um(h.stateNode),ke=y,ua=S;break}case 5:we||Oe(h,u);case 6:if(Tn){if(y=ke,S=ua,ke=null,va(s,u,h),ke=y,ua=S,ke!==null)if(ua)try{Qe(ke,h.stateNode)}catch(T){Ft(h,u,T)}else try{Zn(ke,h.stateNode)}catch(T){Ft(h,u,T)}}else va(s,u,h);break;case 18:Tn&&ke!==null&&(ua?If(ke,h.stateNode):nm(ke,h.stateNode));break;case 4:Tn?(y=ke,S=ua,ke=h.stateNode.containerInfo,ua=!0,va(s,u,h),ke=y,ua=S):(_a&&Ud(h.stateNode,h,Io()),va(s,u,h));break;case 0:case 11:case 14:case 15:we||Nl(2,h,u),we||Nl(4,h,u),va(s,u,h);break;case 1:we||(Oe(h,u),y=h.stateNode,typeof y.componentWillUnmount=="function"&&Nd(h,u,y)),va(s,u,h);break;case 21:va(s,u,h);break;case 22:we||Oe(h,u),we=(y=we)||h.memoizedState!==null,va(s,u,h),we=y;break;default:va(s,u,h)}}function Ul(s,u){if(Qn&&u.memoizedState===null&&(s=u.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{nc(s)}catch(h){Ft(u,u.return,h)}}function du(s){switch(s.tag){case 13:case 19:var u=s.stateNode;return u===null&&(u=s.stateNode=new Nu),u;case 22:return s=s.stateNode,u=s._retryCache,u===null&&(u=s._retryCache=new Nu),u;default:throw Error(o(435,s.tag))}}function yr(s,u){var h=du(s);u.forEach(function(y){var S=Ef.bind(null,s,y);h.has(y)||(h.add(y),y.then(S,S))})}function Ln(s,u){var h=u.deletions;if(h!==null)for(var y=0;y<h.length;y++){var S=h[y],T=s,N=u;if(Tn){var q=N;t:for(;q!==null;){switch(q.tag){case 27:case 5:ke=q.stateNode,ua=!1;break t;case 3:ke=q.stateNode.containerInfo,ua=!0;break t;case 4:ke=q.stateNode.containerInfo,ua=!0;break t}q=q.return}if(ke===null)throw Error(o(160));Uo(T,N,S),ke=null,ua=!1}else Uo(T,N,S);T=S.alternate,T!==null&&(T.return=null),S.return=null}if(u.subtreeFlags&13878)for(u=u.child;u!==null;)Bl(u,s),u=u.sibling}function Bl(s,u){var h=s.alternate,y=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:Ln(u,s),$n(s),y&4&&(Nl(3,s,s.return),pr(3,s),Nl(5,s,s.return));break;case 1:Ln(u,s),$n(s),y&512&&(we||h===null||Oe(h,h.return)),y&64&&fn&&(s=s.updateQueue,s!==null&&(y=s.callbacks,y!==null&&(h=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=h===null?y:h.concat(y))));break;case 26:if(ba){var S=Kn;Ln(u,s),$n(s),y&512&&(we||h===null||Oe(h,h.return)),y&4&&(y=h!==null?h.memoizedState:null,u=s.memoizedState,h===null?u===null?s.stateNode===null?s.stateNode=nh(S,s.type,s.memoizedProps,s):ah(S,s.type,s.stateNode):s.stateNode=th(S,u,s.memoizedProps):y!==u?(y===null?h.stateNode!==null&&ih(h.stateNode):eh(y),u===null?ah(S,s.type,s.stateNode):th(S,u,s.memoizedProps)):u===null&&s.stateNode!==null&&vf(s,s.memoizedProps,h.memoizedProps));break}case 27:if(En&&y&4&&s.alternate===null){S=s.stateNode;var T=s.memoizedProps;try{Bp(S),wp(s.type,T,S,s)}catch(yt){Ft(s,s.return,yt)}}case 5:if(Ln(u,s),$n(s),y&512&&(we||h===null||Oe(h,h.return)),Tn){if(s.flags&32){u=s.stateNode;try{zr(u)}catch(yt){Ft(s,s.return,yt)}}y&4&&s.stateNode!=null&&(u=s.memoizedProps,vf(s,u,h!==null?h.memoizedProps:u)),y&1024&&(es=!0)}break;case 6:if(Ln(u,s),$n(s),y&4&&Tn){if(s.stateNode===null)throw Error(o(162));y=s.memoizedProps,h=h!==null?h.memoizedProps:y,u=s.stateNode;try{Qd(u,h,y)}catch(yt){Ft(s,s.return,yt)}}break;case 3:if(ba?(lh(),S=Kn,Kn=ac(u.containerInfo),Ln(u,s),Kn=S):Ln(u,s),$n(s),y&4){if(Tn&&Qn&&h!==null&&h.memoizedState.isDehydrated)try{ec(u.containerInfo)}catch(yt){Ft(s,s.return,yt)}if(_a){y=u.containerInfo,h=u.pendingChildren;try{Jf(y,h)}catch(yt){Ft(s,s.return,yt)}}}es&&(es=!1,_f(s));break;case 4:ba?(h=Kn,Kn=ac(s.stateNode.containerInfo),Ln(u,s),$n(s),Kn=h):(Ln(u,s),$n(s)),y&4&&_a&&Ud(s.stateNode,s,s.stateNode.pendingChildren);break;case 12:Ln(u,s),$n(s);break;case 13:Ln(u,s),$n(s),s.child.flags&8192&&s.memoizedState!==null!=(h!==null&&h.memoizedState!==null)&&(Bi=Cn()),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,yr(s,y)));break;case 22:y&512&&(we||h===null||Oe(h,h.return)),S=s.memoizedState!==null;var N=h!==null&&h.memoizedState!==null,q=fn,P=we;if(fn=q||S,we=P||N,Ln(u,s),we=P,fn=q,$n(s),u=s.stateNode,u._current=s,u._visibility&=-3,u._visibility|=u._pendingVisibility&2,y&8192&&(u._visibility=S?u._visibility&-2:u._visibility|1,S&&(u=fn||we,h===null||N||u||mu(s)),Tn&&(s.memoizedProps===null||s.memoizedProps.mode!=="manual"))){t:if(h=null,Tn)for(u=s;;){if(u.tag===5||ba&&u.tag===26||En&&u.tag===27){if(h===null){N=h=u;try{T=N.stateNode,S?Dr(T):Zf(N.stateNode,N.memoizedProps)}catch(yt){Ft(N,N.return,yt)}}}else if(u.tag===6){if(h===null){N=u;try{var ut=N.stateNode;S?Wo(ut):ul(ut,N.memoizedProps)}catch(yt){Ft(N,N.return,yt)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===s)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===s)break t;for(;u.sibling===null;){if(u.return===null||u.return===s)break t;h===u&&(h=null),u=u.return}h===u&&(h=null),u.sibling.return=u.return,u=u.sibling}}y&4&&(y=s.updateQueue,y!==null&&(h=y.retryQueue,h!==null&&(y.retryQueue=null,yr(s,h))));break;case 19:Ln(u,s),$n(s),y&4&&(y=s.updateQueue,y!==null&&(s.updateQueue=null,yr(s,y)));break;case 21:break;default:Ln(u,s),$n(s)}}function $n(s){var u=s.flags;if(u&2){try{if(Tn&&(!En||s.tag!==27)){t:{for(var h=s.return;h!==null;){if(xf(h)){var y=h;break t}h=h.return}throw Error(o(160))}switch(y.tag){case 27:if(En){var S=y.stateNode,T=Do(s);cu(s,T,S);break}case 5:var N=y.stateNode;y.flags&32&&(zr(N),y.flags&=-33);var q=Do(s);cu(s,q,N);break;case 3:case 4:var P=y.stateNode.containerInfo,ut=Do(s);Oo(s,ut,P);break;default:throw Error(o(161))}}}catch(yt){Ft(s,s.return,yt)}s.flags&=-3}u&4096&&(s.flags&=-4097)}function _f(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var u=s;_f(u),u.tag===5&&u.flags&1024&&_e(u.stateNode),s=s.sibling}}function _i(s,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)No(s,u.alternate,u),u=u.sibling}function mu(s){for(s=s.child;s!==null;){var u=s;switch(u.tag){case 0:case 11:case 14:case 15:Nl(4,u,u.return),mu(u);break;case 1:Oe(u,u.return);var h=u.stateNode;typeof h.componentWillUnmount=="function"&&Nd(u,u.return,h),mu(u);break;case 26:case 27:case 5:Oe(u,u.return),mu(u);break;case 22:Oe(u,u.return),u.memoizedState===null&&mu(u);break;default:mu(u)}s=s.sibling}}function wl(s,u,h){for(h=h&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var y=u.alternate,S=s,T=u,N=T.flags;switch(T.tag){case 0:case 11:case 15:wl(S,T,h),pr(4,T);break;case 1:if(wl(S,T,h),y=T,S=y.stateNode,typeof S.componentDidMount=="function")try{S.componentDidMount()}catch(ut){Ft(y,y.return,ut)}if(y=T,S=y.updateQueue,S!==null){var q=y.stateNode;try{var P=S.shared.hiddenCallbacks;if(P!==null)for(S.shared.hiddenCallbacks=null,S=0;S<P.length;S++)ud(P[S],q)}catch(ut){Ft(y,y.return,ut)}}h&&N&64&&Od(T),_s(T,T.return);break;case 26:case 27:case 5:wl(S,T,h),h&&y===null&&N&4&&ou(T),_s(T,T.return);break;case 12:wl(S,T,h);break;case 13:wl(S,T,h),h&&N&4&&Ul(S,T);break;case 22:T.memoizedState===null&&wl(S,T,h),_s(T,T.return);break;default:wl(S,T,h)}u=u.sibling}}function Sf(s,u){var h=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),s=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(s=u.memoizedState.cachePool.pool),s!==h&&(s!=null&&s.refCount++,h!=null&&lu(h))}function Bo(s,u){s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&lu(s))}function Fi(s,u,h,y){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)wo(s,u,h,y),u=u.sibling}function wo(s,u,h,y){var S=u.flags;switch(u.tag){case 0:case 11:case 15:Fi(s,u,h,y),S&2048&&pr(9,u);break;case 3:Fi(s,u,h,y),S&2048&&(s=null,u.alternate!==null&&(s=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==s&&(u.refCount++,s!=null&&lu(s)));break;case 12:if(S&2048){Fi(s,u,h,y),s=u.stateNode;try{var T=u.memoizedProps,N=T.id,q=T.onPostCommit;typeof q=="function"&&q(N,u.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(P){Ft(u,u.return,P)}}else Fi(s,u,h,y);break;case 23:break;case 22:T=u.stateNode,u.memoizedState!==null?T._visibility&4?Fi(s,u,h,y):Hl(s,u):T._visibility&4?Fi(s,u,h,y):(T._visibility|=4,Dn(s,u,h,y,(u.subtreeFlags&10256)!==0)),S&2048&&Sf(u.alternate,u);break;case 24:Fi(s,u,h,y),S&2048&&Bo(u.alternate,u);break;default:Fi(s,u,h,y)}}function Dn(s,u,h,y,S){for(S=S&&(u.subtreeFlags&10256)!==0,u=u.child;u!==null;){var T=s,N=u,q=h,P=y,ut=N.flags;switch(N.tag){case 0:case 11:case 15:Dn(T,N,q,P,S),pr(8,N);break;case 23:break;case 22:var yt=N.stateNode;N.memoizedState!==null?yt._visibility&4?Dn(T,N,q,P,S):Hl(T,N):(yt._visibility|=4,Dn(T,N,q,P,S)),S&&ut&2048&&Sf(N.alternate,N);break;case 24:Dn(T,N,q,P,S),S&&ut&2048&&Bo(N.alternate,N);break;default:Dn(T,N,q,P,S)}u=u.sibling}}function Hl(s,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var h=s,y=u,S=y.flags;switch(y.tag){case 22:Hl(h,y),S&2048&&Sf(y.alternate,y);break;case 24:Hl(h,y),S&2048&&Bo(y.alternate,y);break;default:Hl(h,y)}u=u.sibling}}function pn(s){if(s.subtreeFlags&Hs)for(s=s.child;s!==null;)Ss(s),s=s.sibling}function Ss(s){switch(s.tag){case 26:pn(s),s.flags&Hs&&(s.memoizedState!==null?uh(Kn,s.memoizedState,s.memoizedProps):Ge(s.type,s.memoizedProps));break;case 5:pn(s),s.flags&Hs&&Ge(s.type,s.memoizedProps);break;case 3:case 4:if(ba){var u=Kn;Kn=ac(s.stateNode.containerInfo),pn(s),Kn=u}else pn(s);break;case 22:s.memoizedState===null&&(u=s.alternate,u!==null&&u.memoizedState!==null?(u=Hs,Hs=16777216,pn(s),Hs=u):pn(s));break;default:pn(s)}}function Ho(s){var u=s.alternate;if(u!==null&&(s=u.child,s!==null)){u.child=null;do u=s.sibling,s.sibling=null,s=u;while(s!==null)}}function Gl(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];Xe=y,jl(y,s)}Ho(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)gr(s),s=s.sibling}function gr(s){switch(s.tag){case 0:case 11:case 15:Gl(s),s.flags&2048&&Nl(9,s,s.return);break;case 3:Gl(s);break;case 12:Gl(s);break;case 22:var u=s.stateNode;s.memoizedState!==null&&u._visibility&4&&(s.return===null||s.return.tag!==13)?(u._visibility&=-5,pu(s)):Gl(s);break;default:Gl(s)}}function pu(s){var u=s.deletions;if((s.flags&16)!==0){if(u!==null)for(var h=0;h<u.length;h++){var y=u[h];Xe=y,jl(y,s)}Ho(s)}for(s=s.child;s!==null;){switch(u=s,u.tag){case 0:case 11:case 15:Nl(8,u,u.return),pu(u);break;case 22:h=u.stateNode,h._visibility&4&&(h._visibility&=-5,pu(u));break;default:pu(u)}s=s.sibling}}function jl(s,u){for(;Xe!==null;){var h=Xe;switch(h.tag){case 0:case 11:case 15:Nl(8,h,u);break;case 23:case 22:if(h.memoizedState!==null&&h.memoizedState.cachePool!==null){var y=h.memoizedState.cachePool.pool;y!=null&&y.refCount++}break;case 24:lu(h.memoizedState.cache)}if(y=h.child,y!==null)y.return=h,Xe=y;else t:for(h=s;Xe!==null;){y=Xe;var S=y.sibling,T=y.return;if(hu(y),y===h){Xe=null;break t}if(S!==null){S.return=T,Xe=S;break t}Xe=T}}}function Go(s){var u=Gf(s);if(u!=null){if(typeof u.memoizedProps["data-testname"]!="string")throw Error(o(364));return u}if(s=Ds(s),s===null)throw Error(o(362));return s.stateNode.current}function yu(s,u){var h=s.tag;switch(u.$$typeof){case Zr:if(s.type===u.value)return!0;break;case mc:t:{for(u=u.value,s=[s,0],h=0;h<s.length;){var y=s[h++],S=y.tag,T=s[h++],N=u[T];if(S!==5&&S!==26&&S!==27||!zi(y)){for(;N!=null&&yu(y,N);)T++,N=u[T];if(T===u.length){u=!0;break t}else for(y=y.child;y!==null;)s.push(y,T),y=y.sibling}}u=!1}return u;case pc:if((h===5||h===26||h===27)&&zp(s.stateNode,u.value))return!0;break;case me:if((h===5||h===6||h===26||h===27)&&(s=Rr(s),s!==null&&0<=s.indexOf(u.value)))return!0;break;case ee:if((h===5||h===26||h===27)&&(s=s.memoizedProps["data-testname"],typeof s=="string"&&s.toLowerCase()===u.value.toLowerCase()))return!0;break;default:throw Error(o(365))}return!1}function ql(s){switch(s.$$typeof){case Zr:return"<"+(d(s.value)||"Unknown")+">";case mc:return":has("+(ql(s)||"")+")";case pc:return'[role="'+s.value+'"]';case me:return'"'+s.value+'"';case ee:return'[data-testname="'+s.value+'"]';default:throw Error(o(365))}}function Bd(s,u){var h=[];s=[s,0];for(var y=0;y<s.length;){var S=s[y++],T=S.tag,N=s[y++],q=u[N];if(T!==5&&T!==26&&T!==27||!zi(S)){for(;q!=null&&yu(S,q);)N++,q=u[N];if(N===u.length)h.push(S);else for(S=S.child;S!==null;)s.push(S,N),S=S.sibling}}return h}function Xn(s,u){if(!Ri)throw Error(o(363));s=Go(s),s=Bd(s,u),u=[],s=Array.from(s);for(var h=0;h<s.length;){var y=s[h++],S=y.tag;if(S===5||S===26||S===27)zi(y)||u.push(y.stateNode);else for(y=y.child;y!==null;)s.push(y),y=y.sibling}return u}function Vn(){if((Rt&2)!==0&&Zt!==0)return Zt&-Zt;if(Nt.T!==null){var s=la;return s!==0?s:lo()}return Xa()}function Si(){ra===0&&(ra=(Zt&536870912)===0||le?gt():536870912);var s=za.current;return s!==null&&(s.flags|=32),ra}function On(s,u,h){(s===Jt&&Se===2||s.cancelPendingCommit!==null)&&(ni(s,0),ei(s,Zt,ra,!1)),dt(s,h),((Rt&2)===0||s!==Jt)&&(s===Jt&&((Rt&2)===0&&(oi|=h),ne===4&&ei(s,Zt,ra,!1)),ja(s))}function vr(s,u,h){if((Rt&6)!==0)throw Error(o(327));var y=!h&&(u&60)===0&&(u&s.expiredLanes)===0||Q(s,u),S=y?Ei(s,u):bi(s,u,!0),T=y;do{if(S===0){Da&&!y&&ei(s,u,0,!1);break}else if(S===6)ei(s,u,0,!pe);else{if(h=s.current.alternate,T&&!wd(h)){S=bi(s,u,!1),T=!1;continue}if(S===2){if(T=u,s.errorRecoveryDisabledLanes&T)var N=0;else N=s.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){u=N;t:{var q=s;S=Uu;var P=Qn&&q.current.memoizedState.isDehydrated;if(P&&(ni(q,N).flags|=256),N=bi(q,N,!1),N!==2){if(dl&&!P){q.errorRecoveryDisabledLanes|=T,oi|=T,S=4;break t}T=Na,Na=S,T!==null&&Ii(T)}S=N}if(T=!1,S!==2)continue}}if(S===1){ni(s,0),ei(s,u,0,!0);break}t:{switch(y=s,S){case 0:case 1:throw Error(o(345));case 4:if((u&4194176)===u){ei(y,u,ra,!pe);break t}break;case 2:Na=null;break;case 3:case 5:break;default:throw Error(o(329))}if(y.finishedWork=h,y.finishedLanes=u,(u&62914560)===u&&(T=Bi+300-Cn(),10<T)){if(ei(y,u,ra,!pe),Z(y,0)!==0)break t;y.timeoutHandle=Hf(jo.bind(null,y,h,Na,ci,Bu,u,ra,oi,ml,pe,2,-0,0),T);break t}jo(y,h,Na,ci,Bu,u,ra,oi,ml,pe,0,-0,0)}}break}while(!0);ja(s)}function Ii(s){Na===null?Na=s:Na.push.apply(Na,s)}function jo(s,u,h,y,S,T,N,q,P,ut,yt,St,bt){var qt=u.subtreeFlags;if((qt&8192||(qt&16785408)===16785408)&&(Sa(),Ss(u),u=ko(),u!==null)){s.cancelPendingCommit=u(Ee.bind(null,s,h,y,S,N,q,P,1,St,bt)),ei(s,T,N,!ut);return}Ee(s,h,y,S,N,q,P,yt,St,bt)}function wd(s){for(var u=s;;){var h=u.tag;if((h===0||h===11||h===15)&&u.flags&16384&&(h=u.updateQueue,h!==null&&(h=h.stores,h!==null)))for(var y=0;y<h.length;y++){var S=h[y],T=S.getSnapshot;S=S.value;try{if(!Ta(T(),S))return!1}catch{return!1}}if(h=u.child,u.subtreeFlags&16384&&h!==null)h.return=u,u=h;else{if(u===s)break;for(;u.sibling===null;){if(u.return===null||u.return===s)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ei(s,u,h,y){u&=~Gn,u&=~oi,s.suspendedLanes|=u,s.pingedLanes&=~u,y&&(s.warmLanes|=u),y=s.expirationTimes;for(var S=u;0<S;){var T=31-aa(S),N=1<<T;y[T]=-1,S&=~N}h!==0&&_t(s,h,u)}function bf(){return(Rt&6)===0?(bl(0),!1):!0}function ta(){if(Lt!==null){if(Se===0)var s=Lt.return;else s=Lt,Le=ts=null,Iu(s),Oi=null,Za=0,s=Lt;for(;s!==null;)gf(s.alternate,s),s=s.return;Lt=null}}function ni(s,u){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;h!==zs&&(s.timeoutHandle=zs,Mr(h)),h=s.cancelPendingCommit,h!==null&&(s.cancelPendingCommit=null,h()),ta(),Jt=s,Lt=h=Nn(s.current,null),Zt=u,Se=0,Je=null,pe=!1,Da=Q(s,u),dl=!1,ml=ra=Gn=oi=Oa=ne=0,Na=Uu=null,Bu=!1,(u&8)!==0&&(u|=u&32);var y=s.entangledLanes;if(y!==0)for(s=s.entanglements,y&=u;0<y;){var S=31-aa(y),T=1<<S;u|=s[S],y&=~T}return ri=u,mn(),h}function bs(s,u){Vt=null,Nt.H=se,u===ve?(u=Is(),Se=3):u===fh?(u=Is(),Se=4):Se=u===mm?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,Je=u,Lt===null&&(ne=1,To(s,et(u,s.current)))}function xr(){var s=za.current;return s===null?!0:(Zt&4194176)===Zt?Ka===null:(Zt&62914560)===Zt||(Zt&536870912)!==0?s===Ka:!1}function gu(){var s=Nt.H;return Nt.H=se,s===null?se:s}function xa(){var s=Nt.A;return Nt.A=dc,s}function ea(){ne=4,pe||(Zt&4194176)!==Zt&&za.current!==null||(Da=!0),(Oa&134217727)===0&&(oi&134217727)===0||Jt===null||ei(Jt,Zt,ra,!1)}function bi(s,u,h){var y=Rt;Rt|=2;var S=gu(),T=xa();(Jt!==s||Zt!==u)&&(ci=null,ni(s,u)),u=!1;var N=ne;t:do try{if(Se!==0&&Lt!==null){var q=Lt,P=Je;switch(Se){case 8:ta(),N=6;break t;case 3:case 2:case 6:za.current===null&&(u=!0);var ut=Se;if(Se=0,Je=null,Yl(s,q,P,ut),h&&Da){N=0;break t}break;default:ut=Se,Se=0,Je=null,Yl(s,q,P,ut)}}Ti(),N=ne;break}catch(yt){bs(s,yt)}while(!0);return u&&s.shellSuspendCounter++,Le=ts=null,Rt=y,Nt.H=S,Nt.A=T,Lt===null&&(Jt=null,Zt=0,mn()),N}function Ti(){for(;Lt!==null;)Tf(Lt)}function Ei(s,u){var h=Rt;Rt|=2;var y=gu(),S=xa();Jt!==s||Zt!==u?(ci=null,He=Cn()+500,ni(s,u)):Da=Q(s,u);t:do try{if(Se!==0&&Lt!==null){u=Lt;var T=Je;e:switch(Se){case 1:Se=0,Je=null,Yl(s,u,T,1);break;case 2:if(Wu(T)){Se=0,Je=null,qo(u);break}u=function(){Se===2&&Jt===s&&(Se=7),ja(s)},T.then(u,u);break t;case 3:Se=7;break t;case 4:Se=5;break t;case 7:Wu(T)?(Se=0,Je=null,qo(u)):(Se=0,Je=null,Yl(s,u,T,7));break;case 5:var N=null;switch(Lt.tag){case 26:N=Lt.memoizedState;case 5:case 27:var q=Lt,P=q.type,ut=q.pendingProps;if(N?sh(N):sl(P,ut)){Se=0,Je=null;var yt=q.sibling;if(yt!==null)Lt=yt;else{var St=q.return;St!==null?(Lt=St,_r(St)):Lt=null}break e}}Se=0,Je=null,Yl(s,u,T,5);break;case 6:Se=0,Je=null,Yl(s,u,T,6);break;case 8:ta(),ne=6;break t;default:throw Error(o(462))}}$i();break}catch(bt){bs(s,bt)}while(!0);return Le=ts=null,Nt.H=y,Nt.A=S,Rt=h,Lt!==null?0:(Jt=null,Zt=0,mn(),ne)}function $i(){for(;Lt!==null&&!om();)Tf(Lt)}function Tf(s){var u=Md(s.alternate,s,ri);s.memoizedProps=s.pendingProps,u===null?_r(s):Lt=u}function qo(s){var u=s,h=u.alternate;switch(u.tag){case 15:case 0:u=bd(h,u,u.pendingProps,u.type,void 0,Zt);break;case 11:u=bd(h,u,u.pendingProps,u.type.render,u.ref,Zt);break;case 5:Iu(u);default:gf(h,u),u=Lt=nl(u,ri),u=Md(h,u,ri)}s.memoizedProps=s.pendingProps,u===null?_r(s):Lt=u}function Yl(s,u,h,y){Le=ts=null,Iu(u),Oi=null,Za=0;var S=u.return;try{if(gd(s,S,u,h,Zt)){ne=1,To(s,et(h,s.current)),Lt=null;return}}catch(T){if(S!==null)throw Lt=S,T;ne=1,To(s,et(h,s.current)),Lt=null;return}u.flags&32768?(le||y===1?s=!0:Da||(Zt&536870912)!==0?s=!1:(pe=s=!0,(y===2||y===3||y===6)&&(y=za.current,y!==null&&y.tag===13&&(y.flags|=16384))),yn(u,s)):_r(u)}function _r(s){var u=s;do{if((u.flags&32768)!==0){yn(u,pe);return}s=u.return;var h=zd(u.alternate,u,ri);if(h!==null){Lt=h;return}if(u=u.sibling,u!==null){Lt=u;return}Lt=u=s}while(u!==null);ne===0&&(ne=5)}function yn(s,u){do{var h=Dd(s.alternate,s);if(h!==null){h.flags&=32767,Lt=h;return}if(h=s.return,h!==null&&(h.flags|=32768,h.subtreeFlags=0,h.deletions=null),!u&&(s=s.sibling,s!==null)){Lt=s;return}Lt=s=h}while(s!==null);ne=6,Lt=null}function Ee(s,u,h,y,S,T,N,q,P,ut){var yt=Nt.T,St=cn();try{Un(2),Nt.T=null,$t(s,u,h,y,St,S,T,N,q,P,ut)}finally{Nt.T=yt,Un(St)}}function $t(s,u,h,y,S,T,N,q){do gn();while(pl!==null);if((Rt&6)!==0)throw Error(o(327));var P=s.finishedWork;if(y=s.finishedLanes,P===null)return null;if(s.finishedWork=null,s.finishedLanes=0,P===s.current)throw Error(o(177));s.callbackNode=null,s.callbackPriority=0,s.cancelPendingCommit=null;var ut=P.lanes|P.childLanes;if(ut|=Ru,vt(s,y,ut,T,N,q),s===Jt&&(Lt=Jt=null,Zt=0),(P.subtreeFlags&10256)===0&&(P.flags&10256)===0||Ja||(Ja=!0,yc=ut,js=h,Sr(lc,function(){return gn(),null})),h=(P.flags&15990)!==0,(P.subtreeFlags&15990)!==0||h?(h=Nt.T,Nt.T=null,T=cn(),Un(2),N=Rt,Rt|=4,fu(s,P),Bl(P,s),Bf(s.containerInfo),s.current=P,No(s,P.alternate,P),cm(),Rt=N,Un(T),Nt.T=h):s.current=P,Ja?(Ja=!1,pl=s,Gs=y):tl(s,ut),ut=s.pendingLanes,ut===0&&(Ua=null),w(P.stateNode),ja(s),u!==null)for(S=s.onRecoverableError,P=0;P<u.length;P++)ut=u[P],S(ut.value,{componentStack:ut.stack});return(Gs&3)!==0&&gn(),ut=s.pendingLanes,(y&4194218)!==0&&(ut&42)!==0?s===kn?qs++:(qs=0,kn=s):qs=0,bl(0),null}function tl(s,u){(s.pooledCacheLanes&=u)===0&&(u=s.pooledCache,u!=null&&(s.pooledCache=null,lu(u)))}function gn(){if(pl!==null){var s=pl,u=yc;yc=0;var h=Dt(Gs),y=32>h?32:h;h=Nt.T;var S=cn();try{if(Un(y),Nt.T=null,pl===null)var T=!1;else{y=js,js=null;var N=pl,q=Gs;if(pl=null,Gs=0,(Rt&6)!==0)throw Error(o(331));var P=Rt;if(Rt|=4,gr(N.current),wo(N,N.current,q,y),Rt=P,bl(0,!1),ia&&typeof ia.onPostCommitFiberRoot=="function")try{ia.onPostCommitFiberRoot(Au,N)}catch{}T=!0}return T}finally{Un(S),Nt.T=h,tl(s,u)}}return!1}function Yo(s,u,h){u=et(h,u),u=or(s.stateNode,u,2),s=Ie(s,u,2),s!==null&&(dt(s,2),ja(s))}function Ft(s,u,h){if(s.tag===3)Yo(s,s,h);else for(;u!==null;){if(u.tag===3){Yo(u,s,h);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(Ua===null||!Ua.has(y))){s=et(h,s),h=iu(2),y=Ie(u,h,2),y!==null&&(cr(h,y,u,s),dt(y,2),ja(y));break}}u=u.return}}function Lo(s,u,h){var y=s.pingCache;if(y===null){y=s.pingCache=new It;var S=new Set;y.set(u,S)}else S=y.get(u),S===void 0&&(S=new Set,y.set(u,S));S.has(h)||(dl=!0,S.add(h),s=Hd.bind(null,s,u,h),u.then(s,s))}function Hd(s,u,h){var y=s.pingCache;y!==null&&y.delete(u),s.pingedLanes|=s.suspendedLanes&h,s.warmLanes&=~h,Jt===s&&(Zt&h)===h&&(ne===4||ne===3&&(Zt&62914560)===Zt&&300>Cn()-Bi?(Rt&2)===0&&ni(s,0):Gn|=h,ml===Zt&&(ml=0)),ja(s)}function Ts(s,u){u===0&&(u=ct()),s=Fa(s,u),s!==null&&(dt(s,u),ja(s))}function Es(s){var u=s.memoizedState,h=0;u!==null&&(h=u.retryLane),Ts(s,h)}function Ef(s,u){var h=0;switch(s.tag){case 13:var y=s.stateNode,S=s.memoizedState;S!==null&&(h=S.retryLane);break;case 19:y=s.stateNode;break;case 22:y=s.stateNode._retryCache;break;default:throw Error(o(314))}y!==null&&y.delete(u),Ts(s,h)}function Sr(s,u){return Cu(s,u)}function Cf(s,u,h,y){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function el(s){return s=s.prototype,!(!s||!s.isReactComponent)}function Nn(s,u){var h=s.alternate;return h===null?(h=n(s.tag,u,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=u,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&31457280,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,u=s.dependencies,h.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h.refCleanup=s.refCleanup,h}function nl(s,u){s.flags&=31457282;var h=s.alternate;return h===null?(s.childLanes=0,s.lanes=u,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=h.childLanes,s.lanes=h.lanes,s.child=h.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=h.memoizedProps,s.memoizedState=h.memoizedState,s.updateQueue=h.updateQueue,s.type=h.type,u=h.dependencies,s.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),s}function La(s,u,h,y,S,T){var N=0;if(y=s,typeof s=="function")el(s)&&(N=1);else if(typeof s=="string")N=ba&&En?$f(s,h,xn.current)?26:Tu(s)?27:5:ba?$f(s,h,xn.current)?26:5:En&&Tu(s)?27:5;else t:switch(s){case xu:return al(h.children,S,T,u);case Df:N=8,S|=24;break;case Of:return s=n(12,h,u,S|2),s.elementType=Of,s.lanes=T,s;case Vo:return s=n(13,h,u,S),s.elementType=Vo,s.lanes=T,s;case Vl:return s=n(19,h,u,S),s.elementType=Vl,s.lanes=T,s;case Er:return Xo(h,S,T,u);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case qd:case Ci:N=10;break t;case Xl:N=9;break t;case _u:N=11;break t;case Tr:N=14;break t;case ii:N=16,y=null;break t}N=29,h=Error(o(130,s===null?"null":typeof s,"")),y=null}return u=n(N,h,u,S),u.elementType=s,u.type=y,u.lanes=T,u}function al(s,u,h,y){return s=n(7,s,y,u),s.lanes=h,s}function Xo(s,u,h,y){s=n(22,s,y,u),s.elementType=Er,s.lanes=h;var S={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)===0){var N=Fa(T,2);N!==null&&(S._pendingVisibility|=2,On(N,T,2))}},attach:function(){var T=S._current;if(T===null)throw Error(o(456));if((S._pendingVisibility&2)!==0){var N=Fa(T,2);N!==null&&(S._pendingVisibility&=-3,On(N,T,2))}}};return s.stateNode=S,s}function Ll(s,u,h){return s=n(6,s,null,u),s.lanes=h,s}function vu(s,u,h){return u=n(4,s.children!==null?s.children:[],s.key,u),u.lanes=h,u.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},u}function Cs(s,u,h,y,S,T,N,q){this.tag=1,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=zs,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ht(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.hiddenUpdates=ht(null),this.identifierPrefix=y,this.onUncaughtError=S,this.onCaughtError=T,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}function vn(s,u,h,y,S,T,N,q,P,ut,yt,St){return s=new Cs(s,u,h,N,q,P,ut,St),u=1,T===!0&&(u|=24),T=n(3,null,null,u),s.current=T,T.stateNode=s,u=Mo(),u.refCount++,s.pooledCache=u,u.refCount++,T.memoizedState={element:y,isDehydrated:h,cache:u},Zc(T),s}function br(s){return s?(s=Os,s):Os}function Af(s){var u=s._reactInternals;if(u===void 0)throw typeof s.render=="function"?Error(o(188)):(s=Object.keys(s).join(","),Error(o(268,s)));return s=E(u),s=s!==null?M(s):null,s===null?null:Su(s.stateNode)}function Gd(s,u,h,y,S,T){S=br(S),y.context===null?y.context=S:y.pendingContext=S,y=qa(u),y.payload={element:h},T=T===void 0?null:T,T!==null&&(y.callback=T),h=Ie(s,y,u),h!==null&&(On(h,s,u),Ya(h,s,u))}function jd(s,u){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<u?h:u}}function Mf(s,u){jd(s,u),(s=s.alternate)&&jd(s,u)}var Mt={},Rf=pp(),bn=_M(),As=Object.assign,zf=Symbol.for("react.element"),il=Symbol.for("react.transitional.element"),ai=Symbol.for("react.portal"),xu=Symbol.for("react.fragment"),Df=Symbol.for("react.strict_mode"),Of=Symbol.for("react.profiler"),qd=Symbol.for("react.provider"),Xl=Symbol.for("react.consumer"),Ci=Symbol.for("react.context"),_u=Symbol.for("react.forward_ref"),Vo=Symbol.for("react.suspense"),Vl=Symbol.for("react.suspense_list"),Tr=Symbol.for("react.memo"),ii=Symbol.for("react.lazy"),Er=Symbol.for("react.offscreen"),Yd=Symbol.for("react.memo_cache_sentinel"),Nf=Symbol.iterator,Ms=Symbol.for("react.client.reference"),Nt=Rf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Qo,Uf,Ql=!1,Zl=Array.isArray,Zo=t.rendererVersion,Cr=t.rendererPackageName,Ar=t.extraDevToolsConfig,Su=t.getPublicInstance,Rs=t.getRootHostContext,Ld=t.getChildHostContext,Kl=t.prepareForCommit,Bf=t.resetAfterCommit,wf=t.createInstance,Ai=t.appendInitialChild,ll=t.finalizeInitialChildren,kl=t.shouldSetTextContent,Ko=t.createTextInstance,Hf=t.scheduleTimeout,Mr=t.cancelTimeout,zs=t.noTimeout,Mi=t.isPrimaryRenderer;t.warnsIfNotActing;var Tn=t.supportsMutation,_a=t.supportsPersistence,Qn=t.supportsHydration,Gf=t.getInstanceFromNode;t.beforeActiveInstanceBlur,t.afterActiveInstanceBlur;var jf=t.preparePortalMount;t.prepareScopeUpdate,t.getInstanceFromScope;var Un=t.setCurrentUpdatePriority,cn=t.getCurrentUpdatePriority,Xa=t.resolveUpdatePriority;t.resolveEventType,t.resolveEventTimeStamp;var Jl=t.shouldAttemptEagerTransition,qf=t.detachDeletedInstance;t.requestPostPaintCallback;var Xd=t.maySuspendCommit,sl=t.preloadInstance,Sa=t.startSuspendingCommit,Ge=t.suspendInstance,ko=t.waitForCommitToBeReady,na=t.NotPendingTransition,Ht=t.HostTransitionContext,_e=t.resetFormInstance;t.bindToConsole;var tn=t.supportsMicrotasks,Jo=t.scheduleMicrotask,Ri=t.supportsTestSelectors,Ds=t.findFiberRoot,Po=t.getBoundingRect,Rr=t.getTextContent,zi=t.isHiddenSubtree,zp=t.matchAccessibilityRole,je=t.setFocusIfFocusable,Yf=t.setupIntersectionObserver,Lf=t.appendChild,Vd=t.appendChildToContainer,Qd=t.commitTextUpdate,Dp=t.commitMount,Xf=t.commitUpdate,Vf=t.insertBefore,Qf=t.insertInContainerBefore,Zn=t.removeChild,Qe=t.removeChildFromContainer,zr=t.resetTextContent,Dr=t.hideInstance,Wo=t.hideTextInstance,Zf=t.unhideInstance,ul=t.unhideTextInstance,Fo=t.clearContainer,Kf=t.cloneInstance,Io=t.createContainerChildSet,kf=t.appendChildToContainerChildSet,Zd=t.finalizeContainerChildren,Jf=t.replaceContainerChildren,Pf=t.cloneHiddenInstance,Wf=t.cloneHiddenTextInstance,$o=t.isSuspenseInstancePending,Or=t.isSuspenseInstanceFallback,Kd=t.getSuspenseInstanceFallbackErrorDetails,Op=t.registerSuspenseInstanceRetry,kd=t.canHydrateFormStateMarker,Jd=t.isFormStateMarkerMatching,Ff=t.getNextHydratableSibling,tc=t.getFirstHydratableChild,Pd=t.getFirstHydratableChildWithinContainer,Wd=t.getFirstHydratableChildWithinSuspenseInstance,Fd=t.canHydrateInstance,Id=t.canHydrateTextInstance,$d=t.canHydrateSuspenseInstance,Np=t.hydrateInstance,tm=t.hydrateTextInstance,bu=t.hydrateSuspenseInstance,em=t.getNextHydratableInstanceAfterSuspenseInstance,ec=t.commitHydratedContainer,nc=t.commitHydratedSuspenseInstance,nm=t.clearSuspenseBoundary,If=t.clearSuspenseBoundaryFromContainer,am=t.shouldDeleteUnhydratedTailInstances;t.diffHydratedPropsForDevWarnings,t.diffHydratedTextForDevWarnings,t.describeHydratableInstanceForDevWarnings;var im=t.validateHydratableInstance,lm=t.validateHydratableTextInstance,ba=t.supportsResources,$f=t.isHostHoistableType,ac=t.getHoistableRoot,ic=t.getResource,th=t.acquireResource,eh=t.releaseResource,nh=t.hydrateHoistable,ah=t.mountHoistable,ih=t.unmountHoistable,Up=t.createHoistableInstance,lh=t.prepareToCommitHoistables,sm=t.mayResourceSuspendCommit,sh=t.preloadResource,uh=t.suspendResource,En=t.supportsSingletons,rh=t.resolveSingletonInstance,Bp=t.clearSingleton,wp=t.acquireSingletonInstance,um=t.releaseSingletonInstance,Tu=t.isHostSingletonType,Nr=[],rl=-1,Os={},aa=Math.clz32?Math.clz32:U,Ur=Math.log,rm=Math.LN2,Eu=128,Br=4194304,Cu=bn.unstable_scheduleCallback,wr=bn.unstable_cancelCallback,om=bn.unstable_shouldYield,cm=bn.unstable_requestPaint,Cn=bn.unstable_now,oh=bn.unstable_ImmediatePriority,fm=bn.unstable_UserBlockingPriority,lc=bn.unstable_NormalPriority,sc=bn.unstable_IdlePriority,hm=bn.log,ch=bn.unstable_setDisableYieldValue,Au=null,ia=null,Ta=typeof Object.is=="function"?Object.is:at,uc=new WeakMap,Ne=[],qe=0,Hr=null,Gr=0,Ea=[],Ca=0,li=null,Di=1,Va="",xn=z(null),jr=z(null),si=z(null),Mu=z(null),Bn=null,An=null,le=!1,Aa=null,Qa=!1,qr=Error(o(519)),Ma=[],Pl=0,Ru=0,zu=null,Ns=null,Yr=!1,Lr=!1,ui=!1,Wl=0,Xr=null,rc=0,la=0,Fl=null,ol=!1,Du=!1,Vr=Object.prototype.hasOwnProperty,ve=Error(o(460)),fh=Error(o(474)),oc={then:function(){}},Us=null,Oi=null,Za=0,Il=rd(!0),hh=rd(!1),Ni=z(null),Ra=z(0),za=z(null),Ka=null,en=z(0),Ui=0,Vt=null,fe=null,Ze=null,ka=!1,Ue=!1,cl=!1,Qr=0,Ye=0,Ou=null,dm=0,cc=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},se={readContext:Sn,use:ki,useCallback:Wt,useContext:Wt,useEffect:Wt,useImperativeHandle:Wt,useLayoutEffect:Wt,useInsertionEffect:Wt,useMemo:Wt,useReducer:Wt,useRef:Wt,useState:Wt,useDebugValue:Wt,useDeferredValue:Wt,useTransition:Wt,useSyncExternalStore:Wt,useId:Wt};se.useCacheRefresh=Wt,se.useMemoCache=Wt,se.useHostTransitionStatus=Wt,se.useFormState=Wt,se.useActionState=Wt,se.useOptimistic=Wt;var nn={readContext:Sn,use:ki,useCallback:function(s,u){return on().memoizedState=[s,u===void 0?null:u],s},useContext:Sn,useEffect:$c,useImperativeHandle:function(s,u,h){h=h!=null?h.concat([s]):null,go(4194308,4,ir.bind(null,u,s),h)},useLayoutEffect:function(s,u){return go(4194308,4,s,u)},useInsertionEffect:function(s,u){go(4,2,s,u)},useMemo:function(s,u){var h=on();u=u===void 0?null:u;var y=s();if(cl){H(!0);try{s()}finally{H(!1)}}return h.memoizedState=[y,u],y},useReducer:function(s,u,h){var y=on();if(h!==void 0){var S=h(u);if(cl){H(!0);try{h(u)}finally{H(!1)}}}else S=u;return y.memoizedState=y.baseState=S,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:S},y.queue=s,s=s.dispatch=Al.bind(null,Vt,s),[y.memoizedState,s]},useRef:function(s){var u=on();return s={current:s},u.memoizedState=s},useState:function(s){s=$a(s);var u=s.queue,h=So.bind(null,Vt,u);return u.dispatch=h,[s.memoizedState,h]},useDebugValue:lr,useDeferredValue:function(s,u){var h=on();return Cl(h,s,u)},useTransition:function(){var s=$a(!1);return s=xo.bind(null,Vt,s.queue,!0,!1),on().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,u,h){var y=Vt,S=on();if(le){if(h===void 0)throw Error(o(407));h=h()}else{if(h=u(),Jt===null)throw Error(o(349));(Zt&60)!==0||Jc(y,u,h)}S.memoizedState=h;var T={value:h,getSnapshot:u};return S.queue=T,$c(fd.bind(null,y,T,s),[s]),y.flags|=2048,hs(9,Pc.bind(null,y,T,h,u),{destroy:void 0},null),h},useId:function(){var s=on(),u=Jt.identifierPrefix;if(le){var h=Va,y=Di;h=(y&~(1<<32-aa(y)-1)).toString(32)+h,u=":"+u+"R"+h,h=Qr++,0<h&&(u+="H"+h.toString(32)),u+=":"}else h=dm++,u=":"+u+"r"+h.toString(32)+":";return s.memoizedState=u},useCacheRefresh:function(){return on().memoizedState=sr.bind(null,Vt)}};nn.useMemoCache=$e,nn.useHostTransitionStatus=ps,nn.useFormState=po,nn.useActionState=po,nn.useOptimistic=function(s){var u=on();u.memoizedState=u.baseState=s;var h={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=h,u=bo.bind(null,Vt,!0,h),h.dispatch=u,[s,u]};var wn={readContext:Sn,use:ki,useCallback:vo,useContext:Sn,useEffect:ar,useImperativeHandle:vi,useInsertionEffect:pd,useLayoutEffect:yd,useMemo:ms,useReducer:$u,useRef:ds,useState:function(){return $u(gi)},useDebugValue:lr,useDeferredValue:function(s,u){var h=ze();return tf(h,fe.memoizedState,s,u)},useTransition:function(){var s=$u(gi)[0],u=ze().memoizedState;return[typeof s=="boolean"?s:Ki(s),u]},useSyncExternalStore:cd,useId:xi};wn.useCacheRefresh=_o,wn.useMemoCache=$e,wn.useHostTransitionStatus=ps,wn.useFormState=Fc,wn.useActionState=Fc,wn.useOptimistic=function(s,u){var h=ze();return pa(h,fe,s,u)};var $l={readContext:Sn,use:ki,useCallback:vo,useContext:Sn,useEffect:ar,useImperativeHandle:vi,useInsertionEffect:pd,useLayoutEffect:yd,useMemo:ms,useReducer:El,useRef:ds,useState:function(){return El(gi)},useDebugValue:lr,useDeferredValue:function(s,u){var h=ze();return fe===null?Cl(h,s,u):tf(h,fe.memoizedState,s,u)},useTransition:function(){var s=El(gi)[0],u=ze().memoizedState;return[typeof s=="boolean"?s:Ki(s),u]},useSyncExternalStore:cd,useId:xi};$l.useCacheRefresh=_o,$l.useMemoCache=$e,$l.useHostTransitionStatus=ps,$l.useFormState=Ic,$l.useActionState=Ic,$l.useOptimistic=function(s,u){var h=ze();return fe!==null?pa(h,fe,s,u):(h.baseState=s,[s,h.queue.dispatch])};var fc={isMounted:function(s){return(s=s._reactInternals)?b(s)===s:!1},enqueueSetState:function(s,u,h){s=s._reactInternals;var y=Vn(),S=qa(y);S.payload=u,h!=null&&(S.callback=h),u=Ie(s,S,y),u!==null&&(On(u,s,y),Ya(u,s,y))},enqueueReplaceState:function(s,u,h){s=s._reactInternals;var y=Vn(),S=qa(y);S.tag=1,S.payload=u,h!=null&&(S.callback=h),u=Ie(s,S,y),u!==null&&(On(u,s,y),Ya(u,s,y))},enqueueForceUpdate:function(s,u){s=s._reactInternals;var h=Vn(),y=qa(h);y.tag=2,u!=null&&(y.callback=u),u=Ie(s,y,h),u!==null&&(On(u,s,h),Ya(u,s,h))}},dh=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},mm=Error(o(461)),Ke=!1,Hn={dehydrated:null,treeContext:null,retryLane:0},sa=z(null),ts=null,Le=null,pm=typeof AbortController<"u"?AbortController:function(){var s=[],u=this.signal={aborted:!1,addEventListener:function(h,y){s.push(y)}};this.abort=function(){u.aborted=!0,s.forEach(function(h){return h()})}},fl=bn.unstable_scheduleCallback,Bs=bn.unstable_NormalPriority,de={$$typeof:Ci,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},hc=Nt.S;Nt.S=function(s,u){typeof u=="object"&&u!==null&&typeof u.then=="function"&&so(s,u),hc!==null&&hc(s,u)};var hl=z(null),fn=!1,we=!1,es=!1,Nu=typeof WeakSet=="function"?WeakSet:Set,Xe=null,ws=!1,ke=null,ua=!1,Kn=null,Hs=8192,dc={getCacheForType:function(s){var u=Sn(de),h=u.data.get(s);return h===void 0&&(h=s(),u.data.set(s,h)),h}},Zr=0,mc=1,pc=2,ee=3,me=4;if(typeof Symbol=="function"&&Symbol.for){var Qt=Symbol.for;Zr=Qt("selector.component"),mc=Qt("selector.has_pseudo_class"),pc=Qt("selector.role"),ee=Qt("selector.test_id"),me=Qt("selector.text")}var It=typeof WeakMap=="function"?WeakMap:Map,Rt=0,Jt=null,Lt=null,Zt=0,Se=0,Je=null,pe=!1,Da=!1,dl=!1,ri=0,ne=0,Oa=0,oi=0,Gn=0,ra=0,ml=0,Uu=null,Na=null,Bu=!1,Bi=0,He=1/0,ci=null,Ua=null,Ja=!1,pl=null,Gs=0,yc=0,js=null,qs=0,kn=null;return Mt.attemptContinuousHydration=function(s){if(s.tag===13){var u=Fa(s,67108864);u!==null&&On(u,s,67108864),Mf(s,67108864)}},Mt.attemptHydrationAtCurrentPriority=function(s){if(s.tag===13){var u=Vn(),h=Fa(s,u);h!==null&&On(h,s,u),Mf(s,u)}},Mt.attemptSynchronousHydration=function(s){switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var u=G(s.pendingLanes);if(u!==0){for(s.pendingLanes|=2,s.entangledLanes|=2;u;){var h=1<<31-aa(u);s.entanglements[1]|=h,u&=~h}ja(s),(Rt&6)===0&&(He=Cn()+500,bl(0))}}break;case 13:u=Fa(s,2),u!==null&&On(u,s,2),bf(),Mf(s,2)}},Mt.batchedUpdates=function(s,u){return s(u)},Mt.createComponentSelector=function(s){return{$$typeof:Zr,value:s}},Mt.createContainer=function(s,u,h,y,S,T,N,q,P,ut){return vn(s,u,!1,null,h,y,T,N,q,P,ut,null)},Mt.createHasPseudoClassSelector=function(s){return{$$typeof:mc,value:s}},Mt.createHydrationContainer=function(s,u,h,y,S,T,N,q,P,ut,yt,St,bt){return s=vn(h,y,!0,s,S,T,q,P,ut,yt,St,bt),s.context=br(null),h=s.current,y=Vn(),S=qa(y),S.callback=u??null,Ie(h,S,y),s.current.lanes=y,dt(s,y),ja(s),s},Mt.createPortal=function(s,u,h){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ai,key:y==null?null:""+y,children:s,containerInfo:u,implementation:h}},Mt.createRoleSelector=function(s){return{$$typeof:pc,value:s}},Mt.createTestNameSelector=function(s){return{$$typeof:ee,value:s}},Mt.createTextSelector=function(s){return{$$typeof:me,value:s}},Mt.defaultOnCaughtError=function(s){console.error(s)},Mt.defaultOnRecoverableError=function(s){dh(s)},Mt.defaultOnUncaughtError=function(s){dh(s)},Mt.deferredUpdates=function(s){var u=Nt.T,h=cn();try{return Un(32),Nt.T=null,s()}finally{Un(h),Nt.T=u}},Mt.discreteUpdates=function(s,u,h,y,S){var T=Nt.T,N=cn();try{return Un(2),Nt.T=null,s(u,h,y,S)}finally{Un(N),Nt.T=T,Rt===0&&(He=Cn()+500)}},Mt.findAllNodes=Xn,Mt.findBoundingRects=function(s,u){if(!Ri)throw Error(o(363));u=Xn(s,u),s=[];for(var h=0;h<u.length;h++)s.push(Po(u[h]));for(u=s.length-1;0<u;u--){h=s[u];for(var y=h.x,S=y+h.width,T=h.y,N=T+h.height,q=u-1;0<=q;q--)if(u!==q){var P=s[q],ut=P.x,yt=ut+P.width,St=P.y,bt=St+P.height;if(y>=ut&&T>=St&&S<=yt&&N<=bt){s.splice(u,1);break}else if(y!==ut||h.width!==P.width||bt<T||St>N){if(!(T!==St||h.height!==P.height||yt<y||ut>S)){ut>y&&(P.width+=ut-y,P.x=y),yt<S&&(P.width=S-ut),s.splice(u,1);break}}else{St>T&&(P.height+=St-T,P.y=T),bt<N&&(P.height=N-St),s.splice(u,1);break}}}return s},Mt.findHostInstance=Af,Mt.findHostInstanceWithNoPortals=function(s){return s=E(s),s=s!==null?R(s):null,s===null?null:Su(s.stateNode)},Mt.findHostInstanceWithWarning=function(s){return Af(s)},Mt.flushPassiveEffects=gn,Mt.flushSyncFromReconciler=function(s){var u=Rt;Rt|=1;var h=Nt.T,y=cn();try{if(Un(2),Nt.T=null,s)return s()}finally{Un(y),Nt.T=h,Rt=u,(Rt&6)===0&&bl(0)}},Mt.flushSyncWork=bf,Mt.focusWithin=function(s,u){if(!Ri)throw Error(o(363));for(s=Go(s),u=Bd(s,u),u=Array.from(u),s=0;s<u.length;){var h=u[s++],y=h.tag;if(!zi(h)){if((y===5||y===26||y===27)&&je(h.stateNode))return!0;for(h=h.child;h!==null;)u.push(h),h=h.sibling}}return!1},Mt.getFindAllNodesFailureDescription=function(s,u){if(!Ri)throw Error(o(363));var h=0,y=[];s=[Go(s),0];for(var S=0;S<s.length;){var T=s[S++],N=T.tag,q=s[S++],P=u[q];if((N!==5&&N!==26&&N!==27||!zi(T))&&(yu(T,P)&&(y.push(ql(P)),q++,q>h&&(h=q)),q<u.length))for(T=T.child;T!==null;)s.push(T,q),T=T.sibling}if(h<u.length){for(s=[];h<u.length;h++)s.push(ql(u[h]));return`findAllNodes was able to match part of the selector:
|
|
341
|
+
`+(y.join(" > ")+`
|
|
342
|
+
|
|
343
|
+
No matching component was found for:
|
|
344
|
+
`)+s.join(" > ")}return null},Mt.getPublicRootInstance=function(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 27:case 5:return Su(s.child.stateNode);default:return s.child.stateNode}},Mt.injectIntoDevTools=function(){var s={bundleType:0,version:Zo,rendererPackageName:Cr,currentDispatcherRef:Nt,findFiberByHostInstance:Gf,reconcilerVersion:"19.0.0"};if(Ar!==null&&(s.rendererConfig=Ar),typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")s=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)s=!0;else{try{Au=u.inject(s),ia=u}catch{}s=!!u.checkDCE}}return s},Mt.isAlreadyRendering=function(){return!1},Mt.observeVisibleRects=function(s,u,h,y){if(!Ri)throw Error(o(363));s=Xn(s,u);var S=Yf(s,h,y).disconnect;return{disconnect:function(){S()}}},Mt.shouldError=function(){return null},Mt.shouldSuspend=function(){return!1},Mt.startHostTransition=function(s,u,h,y){if(s.tag!==5)throw Error(o(476));var S=ef(s).queue;xo(s,S,u,na,h===null?l:function(){var T=ef(s).next.queue;return Ml(s,T,{},Vn()),h(y)})},Mt.updateContainer=function(s,u,h,y){var S=u.current,T=Vn();return Gd(S,T,s,u,h,y),T},Mt.updateContainerSync=function(s,u,h,y){return u.tag===0&&gn(),Gd(u.current,2,s,u,h,y),2},Mt},i.exports.default=i.exports,Object.defineProperty(i.exports,"__esModule",{value:!0})})(Py)),Py.exports}var V1;function bM(){return V1||(V1=1,Jy.exports=SM()),Jy.exports}var TM=bM();const EM=mp(TM),CM=EM;function AM(i,t,n,l){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function MM(){}function RM(){return!1}const iS={};function zM(i){return i??iS}function DM(){return Zu.currentUpdatePriority}function OM(){return null}function NM(i){throw new Error("Not yet implemented.")}function UM(i){return i}function BM(){return iS}function wM(i){i instanceof da?i.visible=!1:i instanceof io&&(i.enabled=!1)}function HM(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function lS(i){if(i instanceof io){const t=i.__pixireact.parent;if(t){const n=t.__pixireact.filters.indexOf(i);t.__pixireact.filters.splice(n,1),t.filters=t.__pixireact.filters}i.__pixireact.parent=null}}function sS(i,t,...n){}function Q1(i,t,n){if(sS(),t instanceof da){const l=t,o=t,f=n;l.parent===i&&i.removeChild(o);const d=i.getChildIndex(f);i.addChildAt(o,d)}else if(t instanceof io){const f=t.__pixireact.filters.indexOf(n);lS(t),I_(i,t,f)}}function GM(){return!1}function jM(){return!0}function qM(){return null}function YM(){}function LM(){}function Z1(i,t){t instanceof io&&lS(t),t.destroy()}function XM(i){}function VM(){}function QM(){}function ZM(){return-1.1}function KM(){return null}function kM(){var n;if(Zu.currentUpdatePriority)return Zu.currentUpdatePriority;const i=typeof self<"u"&&self||typeof window<"u"&&window;if(!i)return Bc.DefaultEventPriority;switch((n=i.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Bc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Bc.ContinuousEventPriority;default:return Bc.DefaultEventPriority}}function JM(i){Zu.currentUpdatePriority=i}function PM(){return!1}function WM(){return!1}function FM(){}function IM(){}function $M(){}function t4(i){i instanceof da?i.visible=!0:i instanceof io&&(i.enabled=!0)}function e4(i){throw new Error("Text instances are not yet supported. Please use a `<text>` component.")}function n4(){return null}const a4={isPrimaryRenderer:!1,noTimeout:-1,NotPendingTransition:null,supportsHydration:!1,supportsMutation:!0,supportsPersistence:!1,warnsIfNotActing:!1,afterActiveInstanceBlur:tM,appendChild:ky,appendChildToContainer:ky,appendInitialChild:ky,beforeActiveInstanceBlur:eM,cancelTimeout:clearTimeout,clearContainer:nM,commitUpdate:dM,createInstance:vM,createTextInstance:AM,hideTextInstance:HM,unhideTextInstance:e4,detachDeletedInstance:MM,finalizeInitialChildren:RM,getChildHostContext:zM,getCurrentUpdatePriority:DM,getInstanceFromNode:OM,getInstanceFromScope:NM,getPublicInstance:UM,getRootHostContext:BM,hideInstance:wM,insertBefore:Q1,insertInContainerBefore:Q1,maySuspendCommit:GM,preloadInstance:jM,prepareForCommit:qM,preparePortalMount:YM,prepareScopeUpdate:LM,removeChild:Z1,removeChildFromContainer:Z1,requestPostPaintCallback:XM,resetAfterCommit:VM,resetFormInstance:QM,resolveEventTimeStamp:ZM,resolveEventType:KM,resolveUpdatePriority:kM,scheduleTimeout:setTimeout,shouldAttemptEagerTransition:PM,setCurrentUpdatePriority:JM,shouldSetTextContent:WM,startSuspendingCommit:FM,suspendInstance:IM,trackSchedulerEvent:$M,unhideInstance:t4,waitForCommitToBeReady:n4,rendererPackageName:"@pixi/react",rendererVersion:$3.version},dp=CM(a4);dp.injectIntoDevTools();const Lc=new Map;function i4(i,t={}){let n=Lc.get(i),l=(n==null?void 0:n.applicationState)??{isInitialised:!1,isInitialising:!1};const o=(n==null?void 0:n.internalState)??{};n||(l.app=new Xg,o.rootContainer=F_(l.app.stage));const f=(n==null?void 0:n.fiber)??dp.createContainer(o.rootContainer,Bc.ConcurrentRoot,null,!1,null,"",console.error,console.error,console.error,null);if(!n){let d;i instanceof HTMLCanvasElement&&(d=i),d||(d=document.createElement("canvas"),i.innerHTML="",i.appendChild(d)),o.canvas=d,n={applicationState:l,fiber:f,internalState:o,render:async(g,v)=>{var _;return!l.app.renderer&&!l.isInitialised&&!l.isInitialising&&(l.isInitialising=!0,await l.app.init({...v,canvas:d}),l.isInitialising=!1,l.isInitialised=!0,l={...l},(_=t.onInit)==null||_.call(t,l.app)),Object.entries(v).forEach(([b,C])=>{const E=b;W_(v,E)||(l.app[E]=C)}),dp.updateContainer(L.jsx(F3,{value:l,children:g}),f,null,()=>{}),l.app}},Lc.set(d,n)}return n}function uS(i){Zu.unmountQueue.delete(i);const t=i.fiber;t&&dp.updateContainer(null,t,null,()=>{i.applicationState.app&&i.applicationState.app.destroy(),Lc.delete(i.internalState.canvas)})}function l4(){for(const i of Zu.unmountQueue)uS(i)}function s4(i){const t=Lc.get(i);t&&(t.applicationState.isInitialised?uS(t):Zu.unmountQueue.add(t))}function u4(i){const t=Lc.get(i);t&&Zu.unmountQueue.delete(t)}var I1,$1;const Fm=typeof window<"u"&&((I1=window.document)!=null&&I1.createElement||(($1=window.navigator)==null?void 0:$1.product)==="ReactNative")?X.useLayoutEffect:X.useEffect,r4={...ao.defaultTextStyle},o4=X.forwardRef(function(t,n){const{children:l,className:o,defaultTextStyle:f,extensions:d,onInit:m,resizeTo:g,...v}=t,_=gT(),b=X.useRef(null),C=X.useRef(null),E=X.useRef(new Set);X.useImperativeHandle(n,()=>({getApplication(){return b.current},getCanvas(){return C.current}}));const M=X.useCallback(()=>{const z=b.current;z&&(g?"current"in g?g.current instanceof HTMLElement&&(z.resizeTo=g.current):z.resizeTo=g:z.resizeTo=void 0)},[g]),R=X.useCallback(z=>{l4(),b.current=z,M(),m==null||m(z)},[m]);return Fm(()=>{if(d){const z=[...d],O=E.current;for(const B of O.values()){const U=z.indexOf(B);U===-1&&(Fe.remove(B),O.delete(B)),z.splice(U,1)}for(const B of z)Fe.add(B),O.add(B)}},[d]),Fm(()=>{const z=C.current;if(z){let O=Lc.get(z);O||(O=i4(z,{onInit:R})),O.render(L.jsx(_,{children:l}),v)}},[v,l,R,g]),Fm(()=>{M()},[g]),Fm(()=>{f?Object.assign(ao.defaultTextStyle,f):Object.assign(ao.defaultTextStyle,r4)},[f]),X.useEffect(()=>{const z=C.current;if(z)return u4(z),()=>{s4(z)}},[]),L.jsx("canvas",{ref:C,className:o})}),c4=X.forwardRef(function(t,n){return L.jsx(bx,{children:L.jsx(o4,{ref:n,...t})})});function t0(i){Object.assign(Mg,i)}function f4(){const i=X.useContext($g);return sS(i.app instanceof Xg,"No Context found with `%s`. Make sure to wrap component with `%s`","Application","AppProvider"),i}const h4={idle:"#888",running:"#4caf50",completed:"#4caf50",checkpoint:"#ff9800"};function d4({rooms:i,activeRoom:t,statuses:n,onSelectRoom:l}){return L.jsxs("div",{style:{padding:"8px"},children:[L.jsx("div",{style:{color:"#888",fontSize:"0.7rem",textTransform:"uppercase",marginBottom:"8px",padding:"0 12px"},children:"Rooms"}),i.length===0&&L.jsx("div",{style:{padding:"8px 12px",color:"#666",fontSize:"0.8rem"},children:"No active squads"}),i.map(o=>{const f=n[o]||"idle",d=h4[f],m=o===t;return L.jsxs("div",{"data-testid":"room-item",onClick:()=>l(o),style:{padding:"8px 12px",cursor:"pointer",borderRadius:"4px",background:m?"#1a3a5c":"transparent",borderLeft:m?"2px solid #4caf50":"2px solid transparent",marginBottom:"4px",display:"flex",alignItems:"center",gap:"8px"},children:[L.jsx("div",{"data-testid":"status-dot",style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:d,flexShrink:0}}),L.jsx("div",{style:{fontSize:"0.875rem",color:m?"#e0e0e0":"#aaa"},children:o})]},o)})]})}function m4({entries:i}){const t=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return i.length===0?L.jsx("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",display:"flex",alignItems:"center",justifyContent:"center",color:"#666",fontSize:"0.9rem"},children:"No activity yet"}):L.jsxs("div",{style:{width:"220px",height:"100%",background:"#0f0f0f",borderLeft:"1px solid #1a1a2e",padding:"16px",boxSizing:"border-box",overflowY:"auto"},children:[L.jsx("div",{style:{fontSize:"0.75rem",color:"#666",marginBottom:"12px"},children:"Activity Log"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:i.map(n=>L.jsxs("div",{"data-testid":"activity-entry",style:{fontSize:"0.75rem",color:"#aaa",padding:"8px",background:"#1a1a2e",borderRadius:"4px",borderLeft:"2px solid #4caf50"},children:[L.jsx("div",{style:{color:"#4caf50",marginBottom:"2px"},children:t(n.timestamp)}),L.jsx("div",{style:{fontWeight:"bold",marginBottom:"2px"},children:n.agentName}),L.jsx("div",{style:{color:"#999"},children:n.action})]},n.id))})]})}function p4({agentName:i,question:t,onRespond:n}){const[l,o]=X.useState(""),f=()=>{const m=l.trim();m&&(n(m),o(""))},d=m=>{m.key==="Enter"&&f()};return L.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:L.jsxs("div",{className:"bg-white rounded-lg shadow-lg p-6 max-w-md w-full mx-4",children:[L.jsxs("h2",{className:"text-lg font-bold text-orange-500 mb-4",children:["CHECKPOINT — ",i]}),L.jsx("p",{className:"text-gray-700 mb-6",children:t}),L.jsxs("div",{className:"flex gap-2",children:[L.jsx("input",{type:"text",placeholder:"Type your response...",value:l,onChange:m=>o(m.target.value),onKeyPress:d,className:"flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-orange-500",autoFocus:!0}),L.jsx("button",{onClick:f,className:"px-4 py-2 bg-orange-500 text-white rounded-md font-semibold hover:bg-orange-600 transition-colors",children:"Send"})]})]})})}const K1=[16109737,15251594,13935988,13012574,10515018,9133628],k1=[2890510,4861722,9136404,12886874,1710618,9118976],y4=ep,Ut=y4/2,jt=7,xe=14,an=12,ln=5,Gi=10,be=4,ji=9,kt=8;function Ac(i,t,n,l,o){i.circle(t,n-1,jt+1),i.fill(o),i.circle(t,n,jt),i.fill(l),i.circle(t-3,n-1,1.5),i.fill(1710618),i.circle(t+3,n-1,1.5),i.fill(1710618),i.circle(t-2.5,n-1.5,.6),i.fill(16777215),i.circle(t+3.5,n-1.5,.6),i.fill(16777215)}function Mc(i,t,n,l,o,f){i.roundRect(t-l/2,n,l,o,3),i.fill(f),i.moveTo(t-3,n),i.lineTo(t,n+4),i.lineTo(t+3,n),i.stroke({width:1,color:g4(f,.15)})}function J1(i,t,n,l,o){i.roundRect(t-l-1,n,l,o,2),i.fill(2899536),i.roundRect(t+1,n,l,o,2),i.fill(2899536)}function P1(i,t,n,l){i.roundRect(t-l-2,n,l+2,3,1),i.fill(1710618),i.roundRect(t,n,l+2,3,1),i.fill(1710618)}function g4(i,t){const n=Math.max(0,(i>>16&255)*(1-t)),l=Math.max(0,(i>>8&255)*(1-t)),o=Math.max(0,(i&255)*(1-t));return Math.floor(n)<<16|Math.floor(l)<<8|Math.floor(o)}function v4(i){const t=new Map;for(let n=0;n<ag.length;n++){const l=ag[n],o=K1[n%K1.length],f=k1[n%k1.length],d=new Yi;Ac(d,Ut,kt,o,f),Mc(d,Ut,kt+jt,xe,an,l),d.roundRect(Ut-xe/2-be,kt+jt+1,be,ji,2),d.fill(l),d.roundRect(Ut+xe/2,kt+jt+1,be,ji,2),d.fill(l),d.circle(Ut-xe/2-be/2,kt+jt+ji+1,2),d.fill(o),d.circle(Ut+xe/2+be/2,kt+jt+ji+1,2),d.fill(o),J1(d,Ut,kt+jt+an,ln,Gi),P1(d,Ut,kt+jt+an+Gi,ln),t.set(`agent-${n}-standing`,i.renderer.generateTexture(d));const m=new Yi,g=kt+4;Ac(m,Ut,g,o,f),Mc(m,Ut,g+jt,xe,an-2,l),m.roundRect(Ut-xe/2-be+1,g+jt+2,be,ji-3,2),m.fill(l),m.roundRect(Ut+xe/2-1,g+jt+2,be,ji-3,2),m.fill(l);const v=6;m.roundRect(Ut-ln-1,g+jt+an-2,ln+1,v,2),m.fill(2899536),m.roundRect(Ut,g+jt+an-2,ln+1,v,2),m.fill(2899536),t.set(`agent-${n}-seated`,i.renderer.generateTexture(m));const _=new Yi,b=kt+4;Ac(_,Ut+2,b,o,f),Mc(_,Ut+1,b+jt,xe,an-2,l),_.roundRect(Ut+xe/2,b+jt+2,be+4,4,2),_.fill(l),_.roundRect(Ut+xe/2-2,b+jt+2,be+4,4,2),_.fill(l),_.circle(Ut+xe/2+be+3,b+jt+4,2),_.fill(o),_.circle(Ut+xe/2+be+1,b+jt+4,2),_.fill(o),m.roundRect(Ut-ln-1,b+jt+an-2,ln+1,v,2),m.fill(2899536),_.roundRect(Ut,b+jt+an-2,ln+1,v,2),_.fill(2899536),t.set(`agent-${n}-typing`,i.renderer.generateTexture(_));const C=new Yi;Ac(C,Ut,kt,o,f),Mc(C,Ut,kt+jt,xe,an,l),C.roundRect(Ut-xe/2-be,kt+jt-1,be,ji+2,2),C.fill(l),C.roundRect(Ut+xe/2,kt+jt+3,be,ji-2,2),C.fill(l),C.roundRect(Ut+1,kt+jt+an,ln,Gi+2,2),C.fill(2899536),C.roundRect(Ut-ln-1,kt+jt+an-2,ln,Gi,2),C.fill(2899536),C.roundRect(Ut,kt+jt+an+Gi+1,ln+2,3,1),C.fill(1710618),C.roundRect(Ut-ln-2,kt+jt+an+Gi-3,ln+1,3,1),C.fill(1710618),t.set(`agent-${n}-walk-right`,i.renderer.generateTexture(C));const E=new Yi;Ac(E,Ut,kt,o,f),Mc(E,Ut,kt+jt,xe,an,l),E.roundRect(Ut+xe/2,kt+jt-1,be,ji+2,2),E.fill(l),E.roundRect(Ut-xe/2-be,kt+jt+3,be,ji-2,2),E.fill(l),E.roundRect(Ut-ln-1,kt+jt+an,ln,Gi+2,2),E.fill(2899536),E.roundRect(Ut+1,kt+jt+an-2,ln,Gi,2),E.fill(2899536),E.roundRect(Ut-ln-2,kt+jt+an+Gi+1,ln+2,3,1),E.fill(1710618),E.roundRect(Ut,kt+jt+an+Gi-3,ln+1,3,1),E.fill(1710618),t.set(`agent-${n}-walk-left`,i.renderer.generateTexture(E));const M=new Yi;Ac(M,Ut,kt,o,f),Mc(M,Ut,kt+jt,xe,an,l),M.roundRect(Ut-xe/2-be,kt+jt+1,be,ji,2),M.fill(l),M.circle(Ut-xe/2-be/2,kt+jt+ji+1,2),M.fill(o),M.roundRect(Ut+xe/2,kt+jt,be,6,2),M.fill(l),M.circle(Ut+xe/2+be/2+1,kt+jt,2),M.fill(o),M.roundRect(Ut+xe/2+be/2-1,kt+jt-6,6,7,1),M.fill(14142664),M.moveTo(Ut+xe/2+be/2,kt+jt-7),M.quadraticCurveTo(Ut+xe/2+be/2+2,kt+jt-11,Ut+xe/2+be/2,kt+jt-14),M.stroke({width:1,color:16777215,alpha:.4}),M.moveTo(Ut+xe/2+be/2+3,kt+jt-7),M.quadraticCurveTo(Ut+xe/2+be/2+5,kt+jt-10,Ut+xe/2+be/2+3,kt+jt-13),M.stroke({width:1,color:16777215,alpha:.3}),J1(M,Ut,kt+jt+an,ln,Gi),P1(M,Ut,kt+jt+an+Gi,ln),t.set(`agent-${n}-coffee`,i.renderer.generateTexture(M))}return t}function x4(i,t){const n=i%ag.length;let l;switch(t){case"working":l="typing";break;case"typing":l="typing";break;case"standing":l="standing";break;case"coffee":l="coffee";break;case"walk-right":l="walk-right";break;case"walk-left":l="walk-left";break;case"delivering":l="walk-right";break;case"idle":l="standing";break;case"seated":l="seated";break;case"checkpoint":case"done":default:l="seated";break}return`agent-${n}-${l}`}function _4(i,t,n){i.rect(0,0,t,n),i.fill(fa.floor);const l=24;for(let o=0;o<n;o+=l)i.moveTo(0,o),i.lineTo(t,o),i.stroke({width:1,color:fa.floorPlank,alpha:.3});i.rect(0,0,t,40),i.fill({color:fa.wall,alpha:.15})}function S4(i,t,n){i.roundRect(t,n,np,vx,4),i.fill(fa.desk),i.roundRect(t+2,n+2,np-4,8,2),i.fill(fa.deskTop);const l=28,o=20,f=t+(np-l)/2,d=n+12;i.roundRect(f,d,l,o,2),i.fill(fa.monitor),i.roundRect(f+2,d+2,l-4,o-6,1),i.fill(fa.monitorScreen),i.rect(f+l/2-2,d+o,4,6),i.fill(fa.monitor)}function b4(i,t,n){i.roundRect(t,n,40,60,2),i.fill(fa.bookshelf);for(let l=0;l<3;l++){const o=n+8+l*18;i.rect(t+4,o,32,2),i.fill(fa.deskShadow);for(let f=0;f<4;f++){const d=t+5+f*8,m=10+Math.random()*4;i.rect(d,o-m,6,m),i.fill(fa.bookColors[f%fa.bookColors.length])}}}function W1(i,t,n){i.roundRect(t,n+16,20,16,2),i.fill(fa.pot),i.circle(t+10,n+10,10),i.fill(fa.plant),i.circle(t+4,n+6,7),i.fill(fa.plant),i.circle(t+16,n+6,7),i.fill(fa.plant)}function T4(i,t,n){i.roundRect(t,n,64,32,3),i.fill(Hm.counter),i.roundRect(t+4,n-8,24,32,2),i.fill(Hm.machine),i.circle(t+16,n-2,2),i.fill({color:Hm.machineLight,alpha:.8}),i.circle(t+48,n+16,6),i.fill({color:Hm.cup,alpha:.5})}function E4(i,t,n){i.roundRect(t-8,n-12,112,72,4),i.stroke({width:1,color:vy.border,alpha:.3}),i.roundRect(t,n,96,48,4),i.fill(vy.table);const l=12,o=[{cx:t+16,cy:n-8},{cx:t+48,cy:n-8},{cx:t+80,cy:n-8},{cx:t+16,cy:n+52},{cx:t+48,cy:n+52},{cx:t+80,cy:n+52}];for(const f of o)i.roundRect(f.cx-l/2,f.cy-l/2,l,l,2),i.fill(vy.chair)}const C4={running:Dc.statusRunning,idle:Dc.statusIdle,completed:Dc.statusRunning,checkpoint:Dc.statusCheckpoint};function A4(i,t,n,l){const o=n*.8,f=t+(n-o)/2;i.roundRect(f,8,o,28,6),i.fill({color:Dc.background,alpha:.8});const d=C4[l]??Dc.statusIdle;i.circle(f+o-16,22,4),i.fill(d)}t0({Container:da,Graphics:Yi,Sprite:qc,Text:P_});function M4({agent:i,textures:t,bubbleText:n,animX:l,animY:o,animPose:f}){const d=x4(i.colorIndex,f),m=t.get(d),g=iT[i.status==="walking"?"idle":i.status]??8947848,v=i.status==="checkpoint",_=X.useCallback(C=>{C.clear(),C.circle(0,0,ep/2+6),C.fill({color:g,alpha:v?.4:.15})},[g,v]),b=X.useCallback(C=>{if(C.clear(),!n)return;const E=Math.min(n.length*5+16,160);C.roundRect(-E/2,-40,E,28,6),C.fill({color:1710638,alpha:.9})},[n]);return L.jsxs("container",{x:l,y:o,children:[L.jsx("graphics",{draw:_}),m&&L.jsx("sprite",{texture:m,anchor:.5}),L.jsx("text",{text:i.name,y:ep/2+4,anchor:{x:.5,y:0},style:{fontSize:9,fill:"#cccccc",fontFamily:"sans-serif"}}),v&&L.jsx("text",{text:"⚠",y:-ep/2-12,anchor:.5,style:{fontSize:14,fill:"#ff9800",fontFamily:"sans-serif"}}),n&&L.jsxs(L.Fragment,{children:[L.jsx("graphics",{draw:b}),L.jsx("text",{text:n.length>80?n.slice(-80)+"…":n,y:-48,anchor:{x:.5,y:.5},style:{fontSize:8,fill:"#ffffff",fontFamily:"sans-serif",wordWrap:!0,wordWrapWidth:140}})]})]})}t0({Container:da,Graphics:Yi,Text:P_});function R4({squadName:i,status:t,agents:n,textures:l,bubbles:o,animStates:f,originX:d,originY:m}){const g={x:0,y:0},v=jh(g),_=xx(g),b=X.useCallback(C=>{C.clear(),_4(C,Ks,wc),A4(C,0,Ks,t);for(let E=0;E<n.length;E++){const M=ap(E,g);S4(C,M.x-48,M.y-32)}T4(C,v.x,v.y),E4(C,_.x,_.y),b4(C,Ks-60,44),W1(C,10,wc-50),W1(C,Ks-40,50)},[n.length,t]);return L.jsxs("container",{x:d,y:m,children:[L.jsx("graphics",{draw:b}),L.jsx("text",{text:i,x:Ks/2,y:22,anchor:.5,style:{fontSize:14,fill:"#ffffff",fontFamily:"sans-serif",fontWeight:"bold"}}),n.map(C=>{const E=`${i}:${C.id}`,M=o[E],R=f[C.id];return L.jsx(M4,{agent:C,textures:l,bubbleText:(M==null?void 0:M.text)??null,animX:(R==null?void 0:R.x)??C.position.x,animY:(R==null?void 0:R.y)??C.position.y,animPose:(R==null?void 0:R.pose)??(C.status==="working"?"typing":"seated")},C.id)})]})}const F1=45,z4=48,D4=18,O4=4e3,Im=180,Iy=600;function N4(){const i={x:0,y:0},t=Math.random();if(t<.35){const n=jh(i);return{x:n.x+(Math.random()-.5)*30,y:n.y+(Math.random()-.5)*20,destination:"coffee"}}else if(t<.6){const n=xx(i);return{x:n.x+(Math.random()-.5)*40,y:n.y+(Math.random()-.5)*30,destination:"meeting"}}else return{x:60+Math.random()*(Ks-120),y:60+Math.random()*(wc-120),destination:"wander"}}function U4(i){const[t,n]=X.useState({}),l=X.useRef({}),o=X.useRef({}),f=X.useRef({}),d=X.useRef({}),m=X.useRef(0),g=X.useRef({});X.useEffect(()=>{const _=Pe.subscribe((b,C)=>{var R,z;const E=b.bubbles,M=C.bubbles;for(const O of Object.keys(E))if(((R=E[O])==null?void 0:R.updatedAt)!==((z=M[O])==null?void 0:z.updatedAt)){g.current[O]&&clearTimeout(g.current[O]);const[B,U]=O.split(":");g.current[O]=setTimeout(()=>{Pe.getState().clearBubble(B,U),delete g.current[O]},O4)}});return()=>{_();for(const b of Object.values(g.current))clearTimeout(b);g.current={}}},[]);const v=X.useCallback(()=>{m.current++;const _=m.current,b=Pe.getState(),C={};for(const[E,M]of Object.entries(b.agentVisuals)){l.current[E]||(l.current[E]={}),o.current[E]||(o.current[E]={}),C[E]={};for(const R of M){const z=l.current[E],O=o.current[E],B=`${E}:${R.id}`;O[R.id]||(O[R.id]={x:R.position.x,y:R.position.y,baseY:R.position.y},f.current[B]=Math.floor(Math.random()*Iy));const U=O[R.id];if(R.targetPosition&&(!z[R.id]||z[R.id].progress>=1)&&(z[R.id]={startX:U.x,startY:U.baseY,targetX:R.targetPosition.x,targetY:R.targetPosition.y,progress:0,duration:F1,baseY:R.targetPosition.y}),R.status==="idle"&&(!z[R.id]||z[R.id].progress>=1)&&(f.current[B]===void 0&&(f.current[B]=Im+Math.floor(Math.random()*(Iy-Im))),f.current[B]--,f.current[B]<=0)){const Z=N4();d.current[B]=Z.destination,z[R.id]={startX:U.x,startY:U.baseY,targetX:Z.x,targetY:Z.y,progress:0,duration:F1+Math.floor(Math.random()*30),baseY:Z.y},f.current[B]=Im+Math.floor(Math.random()*(Iy-Im))}const G=z[R.id];if(G&&G.progress<1){G.progress=Math.min(1,G.progress+1/G.duration);const Z=oT(G.progress);U.x=yv(G.startX,G.targetX,Z),U.y=yv(G.startY,G.targetY,Z),U.baseY=G.baseY;const Q=Math.floor(_/D4)%2===0?"walk-right":"walk-left";C[E][R.id]={x:U.x,y:U.y,pose:Q}}else if(R.status==="working"){const Z=Math.floor(_/z4)%2===0?"typing":"seated";C[E][R.id]={x:U.x,y:U.baseY,pose:Z}}else if(R.status==="idle"){const Z=d.current[B]??"coffee",Q=Math.sin(_*.07+R.deskIndex*1.5)*2;let K;Z==="coffee"?K="coffee":Z==="meeting"?K=Math.floor(_/90)%2===0?"standing":"coffee":K="standing",C[E][R.id]={x:U.x,y:U.baseY+Q,pose:K}}else R.status==="checkpoint"?C[E][R.id]={x:U.x,y:U.baseY,pose:"seated"}:C[E][R.id]={x:U.x,y:U.baseY,pose:"seated"}}}n(C)},[]);return X.useEffect(()=>{if(i)return i.add(v),()=>{i.remove(v)}},[i,v]),t}t0({Container:da});const B4=.3,w4=2;function H4(){const{app:i}=f4(),t=X.useRef(null),[n,l]=X.useState(new Map),o=X.useRef(null),f=Pe(E=>E.rooms),d=Pe(E=>E.agentVisuals),m=Pe(E=>E.bubbles),g=Ba(E=>E.activeStates),v=U4((i==null?void 0:i.ticker)??null);X.useEffect(()=>{i!=null&&i.renderer&&l(v4(i))},[i]);const _=X.useCallback(E=>{const M=t.current;M&&(o.current={startX:E.globalX,startY:E.globalY,pivotX:M.pivot.x,pivotY:M.pivot.y})},[]),b=X.useCallback(E=>{const M=t.current,R=o.current;if(!M||!R)return;const z=(E.globalX-R.startX)/M.scale.x,O=(E.globalY-R.startY)/M.scale.y;M.pivot.x=R.pivotX-z,M.pivot.y=R.pivotY-O},[]),C=X.useCallback(()=>{o.current=null},[]);return X.useEffect(()=>{const E=i==null?void 0:i.canvas;if(!E)return;const M=R=>{R.preventDefault();const z=t.current;if(!z)return;const O=R.deltaY>0?.9:1.1,B=Math.max(B4,Math.min(w4,z.scale.x*O));z.scale.set(B)};return E.addEventListener("wheel",M,{passive:!1}),()=>E.removeEventListener("wheel",M)},[i]),L.jsx("container",{ref:t,eventMode:"static",onpointerdown:_,onpointermove:b,onpointerup:C,onpointerupoutside:C,children:f.map((E,M)=>{var U;const R=cT(M,f.length),z=d[E]??[],O=((U=g[E])==null?void 0:U.status)??"idle",B=v[E]??{};return L.jsx(R4,{squadName:E,status:O,agents:z,textures:n,bubbles:m,animStates:B,originX:R.x,originY:R.y},E)})})}function G4(){var _,b;const i=Ba(C=>C.activeStates),t=Pe(C=>C.rooms),n=Pe(C=>C.activeRoom),l=Pe(C=>C.setActiveRoom),o=Pe(C=>C.activityLog),f=Pe(C=>C.checkpoints),d=n?f[n]:void 0,g=(n?((_=o[n])==null?void 0:_.entries)??[]:[]).map(C=>({...C,timestamp:new Date(C.timestamp).toISOString()})),v={};for(const C of t)v[C]=((b=i[C])==null?void 0:b.status)??"idle";return L.jsxs("div",{style:{display:"flex",height:"100%"},children:[L.jsx(d4,{rooms:t,activeRoom:n,statuses:v,onSelectRoom:l}),L.jsxs("div",{style:{flex:1,position:"relative",overflow:"hidden"},children:[L.jsx(c4,{background:2760462,antialias:!0,resizeTo:window,style:{width:"100%",height:"100%"},children:L.jsx(H4,{})}),d&&L.jsx(p4,{agentName:d.agentName,question:d.question,onRespond:C=>aT(n,C)})]}),L.jsx(m4,{entries:g})]})}function j4({message:i}){if(i.role==="agent_dm")return L.jsxs("div",{"data-role":"agent_dm",style:{alignSelf:"flex-start",background:"#2a2a3e",border:"1px solid #4a4a6a",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:[L.jsx("div",{style:{fontSize:11,color:"#a0a0d0",fontWeight:600,marginBottom:4},children:i.agentName}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5},children:i.content})]});const t=i.role==="user";return L.jsx("div",{"data-role":i.role,style:{alignSelf:t?"flex-end":"flex-start",background:t?"#3b5bdb":"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:i.content})})}function q4(){const[i,t]=X.useState(""),n=X.useRef(null),l=Ba(E=>E.selectedSquad),o=qi(E=>E.messages),f=qi(E=>E.streaming),d=qi(E=>E.streamingText),m=qi(E=>E.error),g=qi(E=>E.addUserMessage),v=qi(E=>E.startStreaming),_=qi(E=>E.loadHistory);if(X.useEffect(()=>{l&&_(l)},[l,_]),X.useEffect(()=>{var E,M;(M=(E=n.current)==null?void 0:E.scrollIntoView)==null||M.call(E,{behavior:"smooth"})},[o,d]),!l)return L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#888",fontSize:16},children:"Select a squad to start chatting"});const b=()=>{const E=i.trim();!E||f||(g(E),v(),eT(l,E),t(""))},C=E=>{E.key==="Enter"&&!E.shiftKey&&(E.preventDefault(),b())};return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#0f0f1a"},children:[L.jsxs("div",{style:{flex:1,overflowY:"auto",padding:16,display:"flex",flexDirection:"column"},children:[o.map(E=>L.jsx(j4,{message:E},E.id)),f&&d&&L.jsx("div",{"data-role":"assistant",style:{alignSelf:"flex-start",background:"#1e1e2e",borderRadius:12,padding:"8px 14px",maxWidth:"75%",marginBottom:8},children:L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,lineHeight:1.5,whiteSpace:"pre-wrap"},children:d})}),m&&L.jsx("div",{style:{alignSelf:"center",background:"#3a1a1a",border:"1px solid #c53030",borderRadius:8,padding:"8px 14px",color:"#fc8181",fontSize:13,marginBottom:8},children:m}),L.jsx("div",{ref:n})]}),L.jsxs("div",{style:{display:"flex",padding:12,borderTop:"1px solid #2a2a3e",gap:8},children:[L.jsx("input",{type:"text",value:i,onChange:E=>t(E.target.value),onKeyDown:C,placeholder:"Type a message...",disabled:f,style:{flex:1,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:"10px 14px",color:"#e0e0e0",fontSize:14,outline:"none"}}),L.jsx("button",{onClick:b,disabled:!i.trim()||f,"aria-label":"Send",style:{background:!i.trim()||f?"#2a2a3e":"#3b5bdb",color:"#fff",border:"none",borderRadius:8,padding:"10px 20px",fontSize:14,cursor:!i.trim()||f?"not-allowed":"pointer",fontWeight:600},children:"Send"})]})]})}const Y4={idle:"rgb(107, 114, 128)",working:"rgb(59, 130, 246)",delivering:"rgb(168, 85, 247)",done:"rgb(34, 197, 94)",checkpoint:"rgb(234, 179, 8)"};function L4({agent:i}){return L.jsxs("div",{style:{background:"#1e1e2e",borderRadius:8,padding:"12px 16px",marginBottom:8,border:"1px solid #2a2a3e"},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:6},children:[L.jsx("span",{style:{fontWeight:600,fontSize:14,color:"#e0e0e0"},children:i.name}),L.jsx("span",{style:{backgroundColor:Y4[i.status],color:"#fff",fontSize:11,fontWeight:600,padding:"2px 8px",borderRadius:10,textTransform:"lowercase"},children:i.status})]}),L.jsx("div",{style:{fontSize:12,color:"#9ca3af"},children:i.stepLabel})]})}const X4=[{key:"pending",label:"Pending",color:"rgb(107, 114, 128)",filter:i=>i.status==="idle"},{key:"running",label:"Running",color:"rgb(59, 130, 246)",filter:i=>i.status==="working"||i.status==="checkpoint"||i.status==="delivering"},{key:"done",label:"Done",color:"rgb(34, 197, 94)",filter:i=>i.status==="done"}];function V4(){const i=Ba(o=>o.selectedSquad),t=Ba(o=>o.activeStates),n=i?t[i]:null,l=X.useMemo(()=>n?X4.map(o=>({...o,agents:n.agents.filter(o.filter)})):null,[n]);return i?n?L.jsx("div",{style:{display:"flex",gap:16,padding:20,height:"100%",overflow:"auto"},children:l.map(o=>L.jsxs("div",{"data-testid":`column-${o.key}`,style:{flex:1,background:"#16161e",borderRadius:10,padding:16,display:"flex",flexDirection:"column",minWidth:220},children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16,paddingBottom:12,borderBottom:`2px solid ${o.color}`},children:[L.jsx("span",{style:{fontWeight:700,fontSize:14,color:"#e0e0e0"},children:o.label}),L.jsx("span",{"data-testid":`count-${o.key}`,style:{background:o.color,color:"#fff",fontSize:11,fontWeight:700,width:22,height:22,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center"},children:o.agents.length})]}),L.jsx("div",{style:{flex:1,overflowY:"auto"},children:o.agents.map(f=>L.jsx(L4,{agent:f},f.id))})]},o.key))}):L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"No active state for this squad"}):L.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",color:"#9ca3af"},children:"Select a squad to view the kanban board"})}function Q4(){const i=xl(Z=>Z.user),[t,n]=X.useState([]),[l,o]=X.useState(!0),[f,d]=X.useState(""),[m,g]=X.useState(""),[v,_]=X.useState("viewer"),[b,C]=X.useState(null),[E,M]=X.useState(null),R=X.useCallback(async()=>{try{const Z=await fetch("/api/users",{credentials:"include"});if(Z.ok){const Q=await Z.json();n(Q.users)}}catch{C("Failed to load users")}finally{o(!1)}},[]);X.useEffect(()=>{R()},[R]);const z=async()=>{if(!(!f.trim()||!m.trim())){C(null);try{const Z=await fetch("/api/auth/register",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:f,password:m,role:v}),credentials:"include"});if(!Z.ok){const Q=await Z.json();C(Q.error||"Failed to create user");return}d(""),g(""),_("viewer"),await R()}catch{C("Network error")}}},O=async(Z,Q)=>{try{(await fetch(`/api/users/${Z}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({role:Q}),credentials:"include"})).ok&&await R()}catch{C("Failed to update role")}},B=async Z=>{try{(await fetch(`/api/users/${Z}`,{method:"DELETE",credentials:"include"})).ok&&(M(null),await R())}catch{C("Failed to delete user")}},U={background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",color:"#e0e0e0",fontSize:13,outline:"none"},G={padding:"8px 16px",borderRadius:6,border:"none",fontWeight:600,fontSize:13,cursor:"pointer"};return l?L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading users..."}):L.jsxs("div",{children:[L.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"User Management"}),b&&L.jsx("div",{style:{background:"#3b1818",color:"#f87171",padding:"8px 12px",borderRadius:6,marginBottom:12,fontSize:13},children:b}),L.jsxs("div",{style:{display:"flex",gap:8,marginBottom:20,flexWrap:"wrap",alignItems:"center"},children:[L.jsx("input",{placeholder:"Username",value:f,onChange:Z=>d(Z.target.value),style:{...U,flex:1,minWidth:120}}),L.jsx("input",{placeholder:"Password",type:"password",value:m,onChange:Z=>g(Z.target.value),style:{...U,flex:1,minWidth:120}}),L.jsxs("select",{value:v,onChange:Z=>_(Z.target.value),style:{...U,minWidth:100},children:[L.jsx("option",{value:"viewer",children:"viewer"}),L.jsx("option",{value:"operator",children:"operator"}),L.jsx("option",{value:"admin",children:"admin"})]}),L.jsx("button",{onClick:z,style:{...G,background:"#3b82f6",color:"#fff"},children:"Create User"})]}),L.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:13},children:[L.jsx("thead",{children:L.jsxs("tr",{style:{borderBottom:"1px solid #2a2a3e"},children:[L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Username"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Email"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Role"}),L.jsx("th",{style:{textAlign:"left",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Last Login"}),L.jsx("th",{style:{textAlign:"right",padding:"8px 12px",color:"#9ca3af",fontWeight:600},children:"Actions"})]})}),L.jsx("tbody",{children:t.map(Z=>L.jsxs("tr",{style:{borderBottom:"1px solid #1e1e2e"},children:[L.jsx("td",{style:{padding:"10px 12px",color:"#e0e0e0"},children:Z.username}),L.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af"},children:Z.email||"—"}),L.jsx("td",{style:{padding:"10px 12px"},children:Z.id===(i==null?void 0:i.id)?L.jsx("span",{style:{color:"#9ca3af"},children:Z.role}):L.jsxs("select",{value:Z.role,onChange:Q=>O(Z.id,Q.target.value),style:{...U,padding:"4px 8px",fontSize:12},children:[L.jsx("option",{value:"viewer",children:"viewer"}),L.jsx("option",{value:"operator",children:"operator"}),L.jsx("option",{value:"admin",children:"admin"})]})}),L.jsx("td",{style:{padding:"10px 12px",color:"#9ca3af",fontSize:12},children:Z.last_login?new Date(Z.last_login).toLocaleDateString():"—"}),L.jsx("td",{style:{padding:"10px 12px",textAlign:"right"},children:Z.id!==(i==null?void 0:i.id)&&(E===Z.id?L.jsxs("span",{style:{display:"inline-flex",gap:6,alignItems:"center"},children:[L.jsx("span",{style:{color:"#f87171",fontSize:12},children:"Confirm Delete"}),L.jsx("button",{onClick:()=>B(Z.id),style:{...G,background:"#dc2626",color:"#fff",padding:"4px 10px",fontSize:12},children:"Yes"}),L.jsx("button",{onClick:()=>M(null),style:{...G,background:"#2a2a3e",color:"#9ca3af",padding:"4px 10px",fontSize:12},children:"No"})]}):L.jsx("button",{onClick:()=>M(Z.id),style:{...G,background:"#2a2a3e",color:"#f87171",padding:"4px 10px",fontSize:12},children:"Delete"}))})]},Z.id))})]})]})}function Z4(){const i=Ba(v=>v.selectedSquad),t=Ba(v=>v.activeStates),[n,l]=X.useState(null),[o,f]=X.useState(!1),d=i?t[i]:null;if(X.useEffect(()=>{if(!i){l(null);return}f(!0),fetch(`/api/squads/${i}`,{credentials:"include"}).then(v=>v.ok?v.json():null).then(v=>{v&&l(v.data)}).finally(()=>f(!1))},[i]),!i)return L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Select a squad to view details"});if(o)return L.jsx("div",{style:{color:"#9ca3af",padding:20},children:"Loading squad details..."});const m={marginBottom:24},g={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"};return L.jsxs("div",{children:[L.jsx("h3",{style:{color:"#e0e0e0",marginBottom:16,fontSize:16,fontWeight:700},children:"Squad Info"}),n&&L.jsxs(L.Fragment,{children:[L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Name"}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14,fontWeight:600},children:n.name})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Description"}),L.jsx("div",{style:{color:"#e0e0e0",fontSize:14},children:n.description})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Agents"}),L.jsx("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:n.agents.map(v=>L.jsx("span",{style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"4px 10px",fontSize:12,color:"#e0e0e0"},children:v.name},v.id))})]}),L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Pipeline Steps"}),L.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:n.pipeline.steps.map((v,_)=>L.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,padding:"8px 12px",fontSize:13},children:[L.jsx("span",{style:{background:"#3b82f6",color:"#fff",width:22,height:22,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,flexShrink:0},children:_+1}),L.jsx("span",{style:{color:"#e0e0e0"},children:v.label}),L.jsx("span",{style:{color:"#6b7280",fontSize:11,marginLeft:"auto"},children:v.agent})]},v.id))})]})]}),d&&L.jsxs("div",{style:m,children:[L.jsx("div",{style:g,children:"Current State"}),L.jsx("pre",{"data-testid":"state-json",style:{background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:8,padding:16,fontSize:12,color:"#a5b4fc",overflow:"auto",maxHeight:400,lineHeight:1.5},children:JSON.stringify(d,null,2)})]})]})}function K4(){const[i,t]=X.useState(null),[n,l]=X.useState(null),[o,f]=X.useState(!0),[d,m]=X.useState(null),g=X.useCallback(async()=>{f(!0);try{const b=await fetch("/api/health",{credentials:"include"});if(b.ok){const C=await b.json();t(C),l(C.status==="ok")}else l(!1)}catch{l(!1)}finally{f(!1),m(new Date().toLocaleTimeString())}},[]);X.useEffect(()=>{g()},[g]);const v={fontSize:12,color:"#9ca3af",fontWeight:600,marginBottom:6,textTransform:"uppercase",letterSpacing:"0.05em"},_={display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px",background:"#1e1e2e",border:"1px solid #2a2a3e",borderRadius:6,marginBottom:8,fontSize:13};return L.jsxs("div",{children:[L.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:16},children:[L.jsx("h3",{style:{color:"#e0e0e0",fontSize:16,fontWeight:700},children:"Server Info"}),L.jsx("button",{onClick:g,style:{padding:"6px 14px",borderRadius:6,border:"none",background:"#2a2a3e",color:"#e0e0e0",fontWeight:600,fontSize:12,cursor:"pointer"},children:"Refresh"})]}),L.jsxs("div",{style:{marginBottom:24},children:[L.jsx("div",{style:v,children:"Health Status"}),L.jsxs("div",{style:_,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"API Server"}),o?L.jsx("span",{style:{color:"#9ca3af"},children:"Checking..."}):L.jsx("span",{style:{color:n?"#22c55e":"#ef4444",fontWeight:600},children:n?"Healthy":"Unhealthy"})]})]}),L.jsxs("div",{style:{marginBottom:24},children:[L.jsx("div",{style:v,children:"Environment"}),L.jsxs("div",{style:_,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"API Port"}),L.jsx("span",{style:{color:"#9ca3af"},children:"3001"})]}),L.jsxs("div",{style:_,children:[L.jsx("span",{style:{color:"#e0e0e0"},children:"Dashboard Port (dev)"}),L.jsx("span",{style:{color:"#9ca3af"},children:"5173"})]})]}),d&&L.jsxs("div",{style:{fontSize:11,color:"#6b7280",textAlign:"right"},children:["Last checked: ",d]})]})}function k4(){const i=xl(d=>d.user),t=(i==null?void 0:i.role)==="admin",[n,l]=X.useState(t?"users":"squad"),f=[{key:"users",label:"Users",adminOnly:!0},{key:"squad",label:"Squad"},{key:"server",label:"Server"}].filter(d=>!d.adminOnly||t);return L.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",padding:20},children:[L.jsx("div",{style:{display:"flex",gap:4,marginBottom:20,borderBottom:"1px solid #2a2a3e",paddingBottom:0},children:f.map(d=>L.jsx("button",{onClick:()=>l(d.key),style:{padding:"10px 20px",border:"none",borderBottom:n===d.key?"2px solid #3b82f6":"2px solid transparent",background:"transparent",color:n===d.key?"#e0e0e0":"#6b7280",fontWeight:n===d.key?700:500,fontSize:14,cursor:"pointer",transition:"color 0.15s, border-color 0.15s"},children:d.label},d.key))}),L.jsxs("div",{style:{flex:1,overflow:"auto"},children:[n==="users"&&t&&L.jsx(Q4,{}),n==="squad"&&L.jsx(Z4,{}),n==="server"&&L.jsx(K4,{})]})]})}ub.createRoot(document.getElementById("root")).render(L.jsx(X.StrictMode,{children:L.jsx(N2,{children:L.jsxs(r2,{children:[L.jsx(Xu,{path:"/login",element:L.jsx(hT,{})}),L.jsxs(Xu,{path:"/",element:L.jsx(fT,{}),children:[L.jsx(Xu,{index:!0,element:L.jsx(l2,{to:"/office",replace:!0})}),L.jsx(Xu,{path:"office",element:L.jsx(G4,{})}),L.jsx(Xu,{path:"chat",element:L.jsx(q4,{})}),L.jsx(Xu,{path:"kanban",element:L.jsx(V4,{})}),L.jsx(Xu,{path:"settings",element:L.jsx(k4,{})})]})]})})}));export{Vi as $,y_ as A,Ph as B,Mn as C,hi as D,us as E,Ws as F,Yi as G,s_ as H,Tg as I,$C as J,eA as K,rA as L,ie as M,lA as N,Tp as O,ha as P,io as Q,fg as R,CC as S,Re as T,rp as U,NT as V,td as W,Yg as X,fA as Y,Wa as Z,Bx as _,Pa as a,Sp as a0,Hv as a1,qc as a2,Z3 as a3,oE as a4,jv as a5,Ry as a6,qv as a7,fE as a8,Gc as a9,dn as aa,Gx as ab,m3 as ac,g_ as ad,he as ae,$h as af,un as ag,mC as ah,oC as ai,wC as aj,RC as ak,tA as al,nA as am,oA as an,uA as ao,cA as ap,rn as b,Be as c,ip as d,Pt as e,MA as f,BE as g,vA as h,Cp as i,Kx as j,Fe as k,Nc as l,Hx as m,da as n,bC as o,Lg as p,ed as q,KT as r,Ep as s,$v as t,ZE as u,lp as v,Ha as w,qg as x,d_ as y,Qi as z};
|