chatroom-cli 1.103.2 → 1.104.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- var WE=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var $E=(n,i,r)=>i in n?WE(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r;var tt=(n,i,r)=>$E(n,typeof i!="symbol"?i+"":i,r),gd=(n,i,r)=>i.has(n)||Xy("Cannot "+r);var z=(n,i,r)=>(gd(n,i,"read from private field"),r?r.call(n):i.get(n)),we=(n,i,r)=>i.has(n)?Xy("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),de=(n,i,r,o)=>(gd(n,i,"write to private field"),o?o.call(n,r):i.set(n,r),r),Ye=(n,i,r)=>(gd(n,i,"access private method"),r);var mc=(n,i,r,o)=>({set _(c){de(n,i,c,r)},get _(){return z(n,i,o)}});function e1(n,i){for(var r=0;r<i.length;r++){const o=i[r];if(typeof o!="string"&&!Array.isArray(o)){for(const c in o)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(o,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>o[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function t1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yd={exports:{}},Eo={};/**
1
+ var $E=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var e1=(n,i,r)=>i in n?$E(n,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[i]=r;var tt=(n,i,r)=>e1(n,typeof i!="symbol"?i+"":i,r),gd=(n,i,r)=>i.has(n)||Xy("Cannot "+r);var z=(n,i,r)=>(gd(n,i,"read from private field"),r?r.call(n):i.get(n)),we=(n,i,r)=>i.has(n)?Xy("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(n):i.set(n,r),de=(n,i,r,o)=>(gd(n,i,"write to private field"),o?o.call(n,r):i.set(n,r),r),Ye=(n,i,r)=>(gd(n,i,"access private method"),r);var mc=(n,i,r,o)=>({set _(c){de(n,i,c,r)},get _(){return z(n,i,o)}});function t1(n,i){for(var r=0;r<i.length;r++){const o=i[r];if(typeof o!="string"&&!Array.isArray(o)){for(const c in o)if(c!=="default"&&!(c in n)){const f=Object.getOwnPropertyDescriptor(o,c);f&&Object.defineProperty(n,c,f.get?f:{enumerable:!0,get:()=>o[c]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function o(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function n1(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var yd={exports:{}},Eo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var WE=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var $E=(n,i,r)=>i in
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Fy;function n1(){if(Fy)return Eo;Fy=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(o,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:o,key:d,ref:c!==void 0?c:null,props:f}}return Eo.Fragment=i,Eo.jsx=r,Eo.jsxs=r,Eo}var Ky;function i1(){return Ky||(Ky=1,yd.exports=n1()),yd.exports}var A=i1(),bd={exports:{}},Ce={};/**
9
+ */var Fy;function i1(){if(Fy)return Eo;Fy=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(o,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var m in c)m!=="key"&&(f[m]=c[m])}else f=c;return c=f.ref,{$$typeof:n,type:o,key:d,ref:c!==void 0?c:null,props:f}}return Eo.Fragment=i,Eo.jsx=r,Eo.jsxs=r,Eo}var Ky;function s1(){return Ky||(Ky=1,yd.exports=i1()),yd.exports}var A=s1(),bd={exports:{}},Ce={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var WE=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var $E=(n,i,r)=>i in
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Zy;function s1(){if(Zy)return Ce;Zy=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=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"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function E(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function D(T,H,te){this.props=T,this.context=H,this.refs=_,this.updater=te||x}D.prototype.isReactComponent={},D.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},D.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function C(){}C.prototype=D.prototype;function j(T,H,te){this.props=T,this.context=H,this.refs=_,this.updater=te||x}var k=j.prototype=new C;k.constructor=j,w(k,D.prototype),k.isPureReactComponent=!0;var q=Array.isArray;function F(){}var B={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function K(T,H,te){var ne=te.ref;return{$$typeof:n,type:T,key:H,ref:ne!==void 0?ne:null,props:te}}function se(T,H){return K(T.type,H,T.props)}function pe(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function ae(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(te){return H[te]})}var W=/\/+/g;function le(T,H){return typeof T=="object"&&T!==null&&T.key!=null?ae(""+T.key):H.toString(36)}function ie(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(F,F):(T.status="pending",T.then(function(H){T.status==="pending"&&(T.status="fulfilled",T.value=H)},function(H){T.status==="pending"&&(T.status="rejected",T.reason=H)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function N(T,H,te,ne,re){var ee=typeof T;(ee==="undefined"||ee==="boolean")&&(T=null);var ge=!1;if(T===null)ge=!0;else switch(ee){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(T.$$typeof){case n:case i:ge=!0;break;case y:return ge=T._init,N(ge(T._payload),H,te,ne,re)}}if(ge)return re=re(T),ge=ne===""?"."+le(T,0):ne,q(re)?(te="",ge!=null&&(te=ge.replace(W,"$&/")+"/"),N(re,H,te,"",function(Ze){return Ze})):re!=null&&(pe(re)&&(re=se(re,te+(re.key==null||T&&T.key===re.key?"":(""+re.key).replace(W,"$&/")+"/")+ge)),H.push(re)),1;ge=0;var ce=ne===""?".":ne+":";if(q(T))for(var fe=0;fe<T.length;fe++)ne=T[fe],ee=ce+le(ne,fe),ge+=N(ne,H,te,ee,re);else if(fe=E(T),typeof fe=="function")for(T=fe.call(T),fe=0;!(ne=T.next()).done;)ne=ne.value,ee=ce+le(ne,fe++),ge+=N(ne,H,te,ee,re);else if(ee==="object"){if(typeof T.then=="function")return N(ie(T),H,te,ne,re);throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ge}function Q(T,H,te){if(T==null)return T;var ne=[],re=0;return N(T,ne,"","",function(ee){return H.call(te,ee,re++)}),ne}function I(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(te){(T._status===0||T._status===-1)&&(T._status=1,T._result=te)},function(te){(T._status===0||T._status===-1)&&(T._status=2,T._result=te)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var oe=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},Y={map:Q,forEach:function(T,H,te){Q(T,function(){H.apply(this,arguments)},te)},count:function(T){var H=0;return Q(T,function(){H++}),H},toArray:function(T){return Q(T,function(H){return H})||[]},only:function(T){if(!pe(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ce.Activity=v,Ce.Children=Y,Ce.Component=D,Ce.Fragment=r,Ce.Profiler=c,Ce.PureComponent=j,Ce.StrictMode=o,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(T){return B.H.useMemoCache(T)}},Ce.cache=function(T){return function(){return T.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(T,H,te){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var ne=w({},T.props),re=T.key;if(H!=null)for(ee in H.key!==void 0&&(re=""+H.key),H)!U.call(H,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&H.ref===void 0||(ne[ee]=H[ee]);var ee=arguments.length-2;if(ee===1)ne.children=te;else if(1<ee){for(var ge=Array(ee),ce=0;ce<ee;ce++)ge[ce]=arguments[ce+2];ne.children=ge}return K(T.type,re,ne)},Ce.createContext=function(T){return T={$$typeof:d,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},Ce.createElement=function(T,H,te){var ne,re={},ee=null;if(H!=null)for(ne in H.key!==void 0&&(ee=""+H.key),H)U.call(H,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(re[ne]=H[ne]);var ge=arguments.length-2;if(ge===1)re.children=te;else if(1<ge){for(var ce=Array(ge),fe=0;fe<ge;fe++)ce[fe]=arguments[fe+2];re.children=ce}if(T&&T.defaultProps)for(ne in ge=T.defaultProps,ge)re[ne]===void 0&&(re[ne]=ge[ne]);return K(T,ee,re)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(T){return{$$typeof:m,render:T}},Ce.isValidElement=pe,Ce.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:I}},Ce.memo=function(T,H){return{$$typeof:p,type:T,compare:H===void 0?null:H}},Ce.startTransition=function(T){var H=B.T,te={};B.T=te;try{var ne=T(),re=B.S;re!==null&&re(te,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(F,oe)}catch(ee){oe(ee)}finally{H!==null&&te.types!==null&&(H.types=te.types),B.T=H}},Ce.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Ce.use=function(T){return B.H.use(T)},Ce.useActionState=function(T,H,te){return B.H.useActionState(T,H,te)},Ce.useCallback=function(T,H){return B.H.useCallback(T,H)},Ce.useContext=function(T){return B.H.useContext(T)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(T,H){return B.H.useDeferredValue(T,H)},Ce.useEffect=function(T,H){return B.H.useEffect(T,H)},Ce.useEffectEvent=function(T){return B.H.useEffectEvent(T)},Ce.useId=function(){return B.H.useId()},Ce.useImperativeHandle=function(T,H,te){return B.H.useImperativeHandle(T,H,te)},Ce.useInsertionEffect=function(T,H){return B.H.useInsertionEffect(T,H)},Ce.useLayoutEffect=function(T,H){return B.H.useLayoutEffect(T,H)},Ce.useMemo=function(T,H){return B.H.useMemo(T,H)},Ce.useOptimistic=function(T,H){return B.H.useOptimistic(T,H)},Ce.useReducer=function(T,H,te){return B.H.useReducer(T,H,te)},Ce.useRef=function(T){return B.H.useRef(T)},Ce.useState=function(T){return B.H.useState(T)},Ce.useSyncExternalStore=function(T,H,te){return B.H.useSyncExternalStore(T,H,te)},Ce.useTransition=function(){return B.H.useTransition()},Ce.version="19.2.7",Ce}var Py;function Qo(){return Py||(Py=1,bd.exports=s1()),bd.exports}var O=Qo();const r1=t1(O),a1=e1({__proto__:null,default:r1},[O]),Av=O.createContext(void 0),o1=n=>{const i=O.useContext(Av);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},l1=({client:n,children:i})=>(O.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),A.jsx(Av.Provider,{value:n,children:i})),c1={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)};var bs,gh,yv,u1=(yv=class{constructor(){we(this,bs,c1);we(this,gh,!1)}setTimeoutProvider(n){de(this,bs,n)}setTimeout(n,i){return z(this,bs).setTimeout(n,i)}clearTimeout(n){z(this,bs).clearTimeout(n)}setInterval(n,i){return z(this,bs).setInterval(n,i)}clearInterval(n){z(this,bs).clearInterval(n)}},bs=new WeakMap,gh=new WeakMap,yv);const $s=new u1;function f1(n){setTimeout(n,0)}const d1=typeof window>"u"||"Deno"in globalThis;function Sn(){}function h1(n,i){return typeof n=="function"?n(i):n}function _v(n){return typeof n=="number"&&n>=0&&n!==1/0}function Mv(n,i){return Math.max(n+(i||0)-Date.now(),0)}function wt(n,i){return typeof n=="function"?n(i):n}function Iy(n,i){const{type:r="all",exact:o,fetchStatus:c,predicate:f,queryKey:d,stale:m}=n;if(d){if(o){if(i.queryHash!==yh(d,i.options))return!1}else if(!Sa(i.queryKey,d))return!1}if(r!=="all"){const g=i.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof m=="boolean"&&i.isStale()!==m||c&&c!==i.state.fetchStatus||f&&!f(i))}function Jy(n,i){const{exact:r,status:o,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(r){if(Do(i.options.mutationKey)!==Do(f))return!1}else if(!Sa(i.options.mutationKey,f))return!1}return!(o&&i.state.status!==o||c&&!c(i))}function yh(n,i){return((i==null?void 0:i.queryKeyHashFn)||Do)(n)}function Do(n){return JSON.stringify(n,(i,r)=>Gd(r)?Object.keys(r).sort().reduce((o,c)=>(o[c]=r[c],o),{}):r)}function Sa(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(Array.isArray(n)&&Array.isArray(i)){for(let o=0;o<i.length;o++)if(!Sa(n[o],i[o]))return!1;return!0}const r=Object.keys(i);for(const o of r)if(!Sa(n[o],i[o]))return!1;return!0}return!1}const m1=Object.prototype.hasOwnProperty;function Nv(n,i,r=0){if(n===i)return n;if(r>500)return i;const o=Wy(n)&&Wy(i);if(!o&&!(Gd(n)&&Gd(i)))return i;const c=(o?n:Object.keys(n)).length,f=o?i:Object.keys(i),d=f.length,m=o?new Array(d):{};let g=0;for(let p=0;p<d;p++){const y=o?p:f[p],v=n[y],S=i[y];if(v===S){m[y]=v,(o?p<c:m1.call(n,y))&&g++;continue}if(v===null||S===null||typeof v!="object"||typeof S!="object"){m[y]=S;continue}const E=Nv(v,S,r+1);m[y]=E,E===v&&g++}return c===d&&g===c?n:m}function vd(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const r in n)if(n[r]!==i[r])return!1;return!0}function Wy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Gd(n){if(!$y(n))return!1;const i=n.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!$y(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function $y(n){return Object.prototype.toString.call(n)==="[object Object]"}function p1(n){return new Promise(i=>{$s.setTimeout(i,n)})}function Qd(n,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,i):r.structuralSharing!==!1?Nv(n,i):i}function g1(n,i,r=0){const o=[...n,i];return r&&o.length>r?o.slice(1):o}function y1(n,i,r=0){const o=[i,...n];return r&&o.length>r?o.slice(0,-1):o}const bh=Symbol();function Dv(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===bh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function zv(n,i){return typeof n=="function"?n(...i):!!n}function b1(n,i,r){let o=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=i()),o||(o=!0,c.aborted?r():c.addEventListener("abort",r,{once:!0})),c)}),n}let v1=()=>d1;const vh=()=>v1();var Xo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},er,vs,oa,bv,S1=(bv=class extends Xo{constructor(){super();we(this,er);we(this,vs);we(this,oa);de(this,oa,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,vs)||this.setEventListener(z(this,oa))}onUnsubscribe(){var i;this.hasListeners()||((i=z(this,vs))==null||i.call(this),de(this,vs,void 0))}setEventListener(i){var r;de(this,oa,i),(r=z(this,vs))==null||r.call(this),de(this,vs,i(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(i){z(this,er)!==i&&(de(this,er,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(r=>{r(i)})}isFocused(){var i;return typeof z(this,er)=="boolean"?z(this,er):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},er=new WeakMap,vs=new WeakMap,oa=new WeakMap,bv);const Sh=new S1,x1=f1;function E1(){let n=[],i=0,r=m=>{m()},o=m=>{m()},c=x1;const f=m=>{i?n.push(m):c(()=>{r(m)})},d=()=>{const m=n;n=[],m.length&&c(()=>{o(()=>{m.forEach(g=>{r(g)})})})};return{batch:m=>{let g;i++;try{g=m()}finally{i--,i||d()}return g},batchCalls:m=>(...g)=>{f(()=>{m(...g)})},schedule:f,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{o=m},setScheduler:m=>{c=m}}}const Jt=E1();var la,Ss,ca,vv,T1=(vv=class extends Xo{constructor(){super();we(this,la,!0);we(this,Ss);we(this,ca);de(this,ca,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i(!0),o=()=>i(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){z(this,Ss)||this.setEventListener(z(this,ca))}onUnsubscribe(){var i;this.hasListeners()||((i=z(this,Ss))==null||i.call(this),de(this,Ss,void 0))}setEventListener(i){var r;de(this,ca,i),(r=z(this,Ss))==null||r.call(this),de(this,Ss,i(this.setOnline.bind(this)))}setOnline(i){z(this,la)!==i&&(de(this,la,i),this.listeners.forEach(r=>{r(i)}))}isOnline(){return z(this,la)}},la=new WeakMap,Ss=new WeakMap,ca=new WeakMap,vv);const Uc=new T1;function w1(n){return Math.min(1e3*2**n,3e4)}function kv(n){return(n??"online")==="online"?Uc.isOnline():!0}var Xd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function jv(n){let i=!1,r=0,o,c="pending",f,d;const m=new Promise((C,j)=>{f=C,d=j});m.catch(Sn);const g=()=>c!=="pending",p=C=>{var j;if(!g()){const k=new Xd(C);w(k),(j=n.onCancel)==null||j.call(n,k)}},y=()=>{i=!0},v=()=>{i=!1},S=()=>Sh.isFocused()&&(n.networkMode==="always"||Uc.isOnline())&&n.canRun(),E=()=>kv(n.networkMode)&&n.canRun(),x=C=>{g()||(o==null||o(),c="resolved",f(C))},w=C=>{g()||(o==null||o(),c="rejected",d(C))},_=()=>new Promise(C=>{var j;o=k=>{(g()||S())&&C(k)},(j=n.onPause)==null||j.call(n)}).then(()=>{var C;o=void 0,g()||(C=n.onContinue)==null||C.call(n)}),D=()=>{if(g())return;let C;const j=r===0?n.initialPromise:void 0;try{C=j??n.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(x).catch(k=>{var K;if(g())return;const q=n.retry??(vh()?0:3),F=n.retryDelay??w1,B=typeof F=="function"?F(r,k):F,U=q===!0||typeof q=="number"&&r<q||typeof q=="function"&&q(r,k);if(i||!U){w(k);return}r++,(K=n.onFail)==null||K.call(n,r,k),p1(B).then(()=>S()?void 0:_()).then(()=>{i?w(k):D()})})};return{promise:m,status:()=>c,cancel:p,continue:()=>(o==null||o(),m),cancelRetry:y,continueRetry:v,canStart:E,start:()=>(E()?D():_().then(D),m)}}var tr,Sv,Uv=(Sv=class{constructor(){we(this,tr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_v(this.gcTime)&&de(this,tr,$s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(vh()?1/0:3e5))}clearGcTimeout(){z(this,tr)!==void 0&&($s.clearTimeout(z(this,tr)),de(this,tr,void 0))}},tr=new WeakMap,Sv);function R1(n){return{onFetch:(i,r)=>{var y,v,S,E,x;const o=i.options,c=(S=(v=(y=i.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,f=((E=i.state.data)==null?void 0:E.pages)||[],d=((x=i.state.data)==null?void 0:x.pageParams)||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let w=!1;const _=j=>{b1(j,()=>i.signal,()=>w=!0)},D=Dv(i.options,i.fetchOptions),C=async(j,k,q)=>{if(w)return Promise.reject(i.signal.reason);if(k==null&&j.pages.length)return Promise.resolve(j);const B=(()=>{const pe={client:i.client,queryKey:i.queryKey,pageParam:k,direction:q?"backward":"forward",meta:i.options.meta};return _(pe),pe})(),U=await D(B),{maxPages:K}=i.options,se=q?y1:g1;return{pages:se(j.pages,U,K),pageParams:se(j.pageParams,k,K)}};if(c&&f.length){const j=c==="backward",k=j?O1:eb,q={pages:f,pageParams:d};m=await C(q,k(o,q),j)}else{const j=n??f.length;do{const k=g===0?d[0]??o.initialPageParam:eb(o,m);if(g>0&&k==null)break;m=await C(m,k),g++}while(g<j)}return m};i.options.persister?i.fetchFn=()=>{var w,_;return(_=(w=i.options).persister)==null?void 0:_.call(w,p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r)}:i.fetchFn=p}}}function eb(n,{pages:i,pageParams:r}){const o=i.length-1;return i.length>0?n.getNextPageParam(i[o],i,r[o],r):void 0}function O1(n,{pages:i,pageParams:r}){var o;return i.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,i[0],i,r[0],r):void 0}var ua,nr,fa,Qn,ir,Ht,Ho,sr,In,ji,xv,C1=(xv=class extends Uv{constructor(i){super();we(this,In);we(this,ua);we(this,nr);we(this,fa);we(this,Qn);we(this,ir);we(this,Ht);we(this,Ho);we(this,sr);de(this,sr,!1),de(this,Ho,i.defaultOptions),this.setOptions(i.options),this.observers=[],de(this,ir,i.client),de(this,Qn,z(this,ir).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,de(this,nr,nb(this.options)),this.state=i.state??z(this,nr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,ua)}get promise(){var i;return(i=z(this,Ht))==null?void 0:i.promise}setOptions(i){if(this.options={...z(this,Ho),...i},i!=null&&i._type&&de(this,ua,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=nb(this.options);r.data!==void 0&&(this.setState(tb(r.data,r.dataUpdatedAt)),de(this,nr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Qn).remove(this)}setData(i,r){const o=Qd(this.state.data,i,this.options);return Ye(this,In,ji).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(i){Ye(this,In,ji).call(this,{type:"setState",state:i})}cancel(i){var o,c;const r=(o=z(this,Ht))==null?void 0:o.promise;return(c=z(this,Ht))==null||c.cancel(i),r?r.then(Sn).catch(Sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,nr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>wt(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>wt(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!Mv(this.state.dataUpdatedAt,i)}onFocus(){var i,r;(i=this.observers.find(o=>o.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}onOnline(){var i,r;(i=this.observers.find(o=>o.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),z(this,Qn).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const r=this.observers.indexOf(i);r!==-1&&(this.observers.splice(r,1),this.observers.length||(z(this,Ht)&&(z(this,sr)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?z(this,Ht).cancel({revert:!0}):z(this,Ht).cancelRetry()),this.scheduleGc()),z(this,Qn).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ye(this,In,ji).call(this,{type:"invalidate"})}async fetch(i,r){var p,y,v,S,E,x,w,_,D,C,j,k;if(this.state.fetchStatus!=="idle"&&((p=z(this,Ht))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Ht))return z(this,Ht).continueRetry(),z(this,Ht).promise}if(i&&this.setOptions(i),!this.options.queryFn){const q=this.observers.find(F=>F.options.queryFn);q&&this.setOptions(q.options)}const o=new AbortController,c=q=>{Object.defineProperty(q,"signal",{enumerable:!0,get:()=>(de(this,sr,!0),o.signal)})},f=()=>{const q=Dv(this.options,r),B=(()=>{const U={client:z(this,ir),queryKey:this.queryKey,meta:this.meta};return c(U),U})();return de(this,sr,!1),this.options.persister?this.options.persister(q,B,this):q(B)},m=(()=>{const q={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,ir),state:this.state,fetchFn:f};return c(q),q})();(y=z(this,ua)==="infinite"?R1(this.options.pages):this.options.behavior)==null||y.onFetch(m,this),de(this,fa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&Ye(this,In,ji).call(this,{type:"fetch",meta:(S=m.fetchOptions)==null?void 0:S.meta});const g=de(this,Ht,jv({initialPromise:r==null?void 0:r.initialPromise,fn:m.fetchFn,onCancel:q=>{q instanceof Xd&&q.revert&&this.setState({...z(this,fa),fetchStatus:"idle"}),o.abort()},onFail:(q,F)=>{Ye(this,In,ji).call(this,{type:"failed",failureCount:q,error:F})},onPause:()=>{Ye(this,In,ji).call(this,{type:"pause"})},onContinue:()=>{Ye(this,In,ji).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const q=await g.start();if(q===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(q),(x=(E=z(this,Qn).config).onSuccess)==null||x.call(E,q,this),(_=(w=z(this,Qn).config).onSettled)==null||_.call(w,q,this.state.error,this),q}catch(q){if(q instanceof Xd){if(q.silent)return z(this,Ht).promise;if(q.revert){if(this.state.data===void 0)throw q;return this.state.data}}throw Ye(this,In,ji).call(this,{type:"error",error:q}),(C=(D=z(this,Qn).config).onError)==null||C.call(D,q,this),(k=(j=z(this,Qn).config).onSettled)==null||k.call(j,this.state.data,q,this),q}finally{z(this,Ht)===g&&de(this,Ht,void 0),this.scheduleGc()}}},ua=new WeakMap,nr=new WeakMap,fa=new WeakMap,Qn=new WeakMap,ir=new WeakMap,Ht=new WeakMap,Ho=new WeakMap,sr=new WeakMap,In=new WeakSet,ji=function(i){const r=o=>{switch(i.type){case"failed":return{...o,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Lv(o.data,this.options),fetchMeta:i.meta??null};case"success":const c={...o,...tb(i.data,i.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,fa,i.manual?c:void 0),c;case"error":const f=i.error;return{...o,error:f,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...i.state}}};this.state=r(this.state),Jt.batch(()=>{this.observers.slice().forEach(o=>{o.onQueryUpdate()}),z(this,Qn).notify({query:this,type:"updated",action:i})})},xv);function Lv(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kv(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function tb(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nb(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,r=i!==void 0,o=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ln,Qe,qo,cn,rr,da,Bi,Yo,ha,ma,ar,or,xs,pa,et,Ao,Fd,Kd,Zd,Pd,Id,Jd,Wd,$d,Ev,A1=(Ev=class extends Xo{constructor(i,r){super();we(this,et);we(this,ln);we(this,Qe);we(this,qo);we(this,cn);we(this,rr);we(this,da);we(this,Bi);we(this,Yo);we(this,ha);we(this,ma);we(this,ar);we(this,or);we(this,xs);we(this,pa,new Set);this.options=r,de(this,ln,i),de(this,Bi,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,Qe).addObserver(this),ib(z(this,Qe),this.options)?Ye(this,et,Ao).call(this):this.updateResult(),Ye(this,et,Id).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return eh(z(this,Qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return eh(z(this,Qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ye(this,et,Jd).call(this),Ye(this,et,Wd).call(this),z(this,Qe).removeObserver(this)}setOptions(i){const r=this.options,o=z(this,Qe);if(this.options=z(this,ln).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wt(this.options.enabled,z(this,Qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ye(this,et,$d).call(this),z(this,Qe).setOptions(this.options),r._defaulted&&!vd(this.options,r)&&z(this,ln).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,Qe),observer:this});const c=this.hasListeners();c&&sb(z(this,Qe),o,this.options,r)&&Ye(this,et,Ao).call(this),this.updateResult(),c&&(z(this,Qe)!==o||wt(this.options.enabled,z(this,Qe))!==wt(r.enabled,z(this,Qe))||wt(this.options.staleTime,z(this,Qe))!==wt(r.staleTime,z(this,Qe)))&&Ye(this,et,Kd).call(this);const f=Ye(this,et,Zd).call(this);c&&(z(this,Qe)!==o||wt(this.options.enabled,z(this,Qe))!==wt(r.enabled,z(this,Qe))||f!==z(this,xs))&&Ye(this,et,Pd).call(this,f)}getOptimisticResult(i){const r=z(this,ln).getQueryCache().build(z(this,ln),i),o=this.createResult(r,i);return vd(this.getCurrentResult(),o)||(de(this,cn,o),de(this,da,this.options),de(this,rr,z(this,Qe).state)),o}getCurrentResult(){return z(this,cn)}trackResult(i,r){return new Proxy(i,{get:(o,c)=>(this.trackProp(c),r==null||r(c),Reflect.get(o,c))})}trackProp(i){z(this,pa).add(i)}getCurrentQuery(){return z(this,Qe)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const r=z(this,ln).defaultQueryOptions(i),o=z(this,ln).getQueryCache().build(z(this,ln),r);let c=()=>{},f;const d=new Promise(m=>{f=m,c=z(this,ln).getQueryCache().subscribe(g=>{g.type==="updated"&&g.query.queryHash===o.queryHash&&o.state.data!==void 0&&(c(),m(this.createResult(o,r)))})});return Promise.race([o.fetch().then(()=>{const m=this.createResult(o,r);return f==null||f(m),m}).finally(()=>{c()}),d])}fetch(i){return Ye(this,et,Ao).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,cn)))}createResult(i,r){var F;const o=z(this,Qe),c=this.options,f=z(this,cn),d=z(this,rr),m=z(this,da),g=i!==o?i.state:z(this,qo),{state:p}=i;let y={...p},v=!1,S;if(r._optimisticResults){const B=this.hasListeners(),U=!B&&ib(i,r),K=B&&sb(i,o,r,c);(U||K)&&(y={...y,...Lv(p.data,i.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:E,errorUpdatedAt:x,status:w}=y;S=y.data;let _=!1;if(r.placeholderData!==void 0&&S===void 0&&w==="pending"){let B;f!=null&&f.isPlaceholderData&&r.placeholderData===(m==null?void 0:m.placeholderData)?(B=f.data,_=!0):B=typeof r.placeholderData=="function"?r.placeholderData((F=z(this,ma))==null?void 0:F.state.data,z(this,ma)):r.placeholderData,B!==void 0&&(w="success",S=Qd(f==null?void 0:f.data,B,r),v=!0)}if(r.select&&S!==void 0&&!_)if(f&&S===(d==null?void 0:d.data)&&r.select===z(this,Yo))S=z(this,ha);else try{de(this,Yo,r.select),S=r.select(S),S=Qd(f==null?void 0:f.data,S,r),de(this,ha,S),de(this,Bi,null)}catch(B){de(this,Bi,B)}else S===void 0&&de(this,Bi,null);z(this,Bi)&&(E=z(this,Bi),S=z(this,ha),x=Date.now(),w="error",v=!1);const D=y.fetchStatus==="fetching",C=w==="pending",j=w==="error",k=C&&D,q=S!==void 0;return{status:w,fetchStatus:y.fetchStatus,isPending:C,isSuccess:w==="success",isError:j,isInitialLoading:k,isLoading:k,data:S,dataUpdatedAt:y.dataUpdatedAt,error:E,errorUpdatedAt:x,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:D,isRefetching:D&&!C,isLoadingError:j&&!q,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:j&&q,isStale:xh(i,r),refetch:this.refetch,isEnabled:wt(r.enabled,i)!==!1}}updateResult(){const i=z(this,cn),r=this.createResult(z(this,Qe),this.options);if(de(this,rr,z(this,Qe).state),de(this,da,this.options),z(this,rr).data!==void 0&&de(this,ma,z(this,Qe)),vd(r,i))return;de(this,cn,r);const c=(()=>{if(!i)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!z(this,pa).size)return!0;const m=new Set(d??z(this,pa));return this.options.throwOnError&&m.add("error"),Object.keys(z(this,cn)).some(g=>{const p=g;return z(this,cn)[p]!==i[p]&&m.has(p)})})();Jt.batch(()=>{c&&this.listeners.forEach(f=>{f(z(this,cn))}),z(this,ln).getQueryCache().notify({query:z(this,Qe),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ye(this,et,Id).call(this)}},ln=new WeakMap,Qe=new WeakMap,qo=new WeakMap,cn=new WeakMap,rr=new WeakMap,da=new WeakMap,Bi=new WeakMap,Yo=new WeakMap,ha=new WeakMap,ma=new WeakMap,ar=new WeakMap,or=new WeakMap,xs=new WeakMap,pa=new WeakMap,et=new WeakSet,Ao=function(i){Ye(this,et,$d).call(this);let r=z(this,Qe).fetch(this.options,i);return i!=null&&i.throwOnError||(r=r.catch(Sn)),r},Fd=function(i){return!vh()&&wt(this.options.enabled,z(this,Qe))!==!1&&_v(i)},Kd=function(){Ye(this,et,Jd).call(this);const i=wt(this.options.staleTime,z(this,Qe));if(z(this,cn).isStale||!Ye(this,et,Fd).call(this,i))return;const r=Mv(z(this,cn).dataUpdatedAt,i)+1;de(this,ar,$s.setTimeout(()=>{z(this,cn).isStale||this.updateResult()},r))},Zd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,Qe)):this.options.refetchInterval)??!1},Pd=function(i){Ye(this,et,Wd).call(this),de(this,xs,i),!(z(this,xs)===0||!Ye(this,et,Fd).call(this,z(this,xs)))&&de(this,or,$s.setInterval(()=>{(this.options.refetchIntervalInBackground||Sh.isFocused())&&Ye(this,et,Ao).call(this)},z(this,xs)))},Id=function(){Ye(this,et,Kd).call(this),Ye(this,et,Pd).call(this,Ye(this,et,Zd).call(this))},Jd=function(){z(this,ar)!==void 0&&($s.clearTimeout(z(this,ar)),de(this,ar,void 0))},Wd=function(){z(this,or)!==void 0&&($s.clearInterval(z(this,or)),de(this,or,void 0))},$d=function(){const i=z(this,ln).getQueryCache().build(z(this,ln),this.options);if(i===z(this,Qe))return;const r=z(this,Qe);de(this,Qe,i),de(this,qo,i.state),this.hasListeners()&&(r==null||r.removeObserver(this),i.addObserver(this))},Ev);function _1(n,i){return wt(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&wt(i.retryOnMount,n)===!1)}function ib(n,i){return _1(n,i)||n.state.data!==void 0&&eh(n,i,i.refetchOnMount)}function eh(n,i,r){if(wt(i.enabled,n)!==!1&&wt(i.staleTime,n)!=="static"){const o=typeof r=="function"?r(n):r;return o==="always"||o!==!1&&xh(n,i)}return!1}function sb(n,i,r,o){return(n!==i||wt(o.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&xh(n,r)}function xh(n,i){return wt(i.enabled,n)!==!1&&n.isStaleByTime(wt(i.staleTime,n))}var Vo,ci,nn,lr,ui,ys,Tv,M1=(Tv=class extends Uv{constructor(i){super();we(this,ui);we(this,Vo);we(this,ci);we(this,nn);we(this,lr);de(this,Vo,i.client),this.mutationId=i.mutationId,de(this,nn,i.mutationCache),de(this,ci,[]),this.state=i.state||N1(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){z(this,ci).includes(i)||(z(this,ci).push(i),this.clearGcTimeout(),z(this,nn).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){de(this,ci,z(this,ci).filter(r=>r!==i)),this.scheduleGc(),z(this,nn).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){z(this,ci).length||(this.state.status==="pending"?this.scheduleGc():z(this,nn).remove(this))}continue(){var i;return((i=z(this,lr))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var m,g,p,y,v,S,E,x,w,_,D,C,j,k,q,F,B,U;const r=()=>{Ye(this,ui,ys).call(this,{type:"continue"})},o={client:z(this,Vo),meta:this.options.meta,mutationKey:this.options.mutationKey},c=de(this,lr,jv({fn:()=>this.options.mutationFn?this.options.mutationFn(i,o):Promise.reject(new Error("No mutationFn found")),onFail:(K,se)=>{Ye(this,ui,ys).call(this,{type:"failed",failureCount:K,error:se})},onPause:()=>{Ye(this,ui,ys).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,nn).canRun(this)})),f=this.state.status==="pending",d=!c.canStart();try{if(f)r();else{Ye(this,ui,ys).call(this,{type:"pending",variables:i,isPaused:d}),z(this,nn).config.onMutate&&await z(this,nn).config.onMutate(i,this,o);const se=await((g=(m=this.options).onMutate)==null?void 0:g.call(m,i,o));se!==this.state.context&&Ye(this,ui,ys).call(this,{type:"pending",context:se,variables:i,isPaused:d})}const K=await c.start();return await((y=(p=z(this,nn).config).onSuccess)==null?void 0:y.call(p,K,i,this.state.context,this,o)),await((S=(v=this.options).onSuccess)==null?void 0:S.call(v,K,i,this.state.context,o)),await((x=(E=z(this,nn).config).onSettled)==null?void 0:x.call(E,K,null,this.state.variables,this.state.context,this,o)),await((_=(w=this.options).onSettled)==null?void 0:_.call(w,K,null,i,this.state.context,o)),Ye(this,ui,ys).call(this,{type:"success",data:K}),K}catch(K){try{await((C=(D=z(this,nn).config).onError)==null?void 0:C.call(D,K,i,this.state.context,this,o))}catch(se){Promise.reject(se)}try{await((k=(j=this.options).onError)==null?void 0:k.call(j,K,i,this.state.context,o))}catch(se){Promise.reject(se)}try{await((F=(q=z(this,nn).config).onSettled)==null?void 0:F.call(q,void 0,K,this.state.variables,this.state.context,this,o))}catch(se){Promise.reject(se)}try{await((U=(B=this.options).onSettled)==null?void 0:U.call(B,void 0,K,i,this.state.context,o))}catch(se){Promise.reject(se)}throw Ye(this,ui,ys).call(this,{type:"error",error:K}),K}finally{z(this,lr)===c&&de(this,lr,void 0),z(this,nn).runNext(this)}}},Vo=new WeakMap,ci=new WeakMap,nn=new WeakMap,lr=new WeakMap,ui=new WeakSet,ys=function(i){const r=o=>{switch(i.type){case"failed":return{...o,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...o,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:i.error,failureCount:o.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Jt.batch(()=>{z(this,ci).forEach(o=>{o.onMutationUpdate(i)}),z(this,nn).notify({mutation:this,type:"updated",action:i})})},Tv);function N1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hi,Jn,Go,wv,D1=(wv=class extends Xo{constructor(i={}){super();we(this,Hi);we(this,Jn);we(this,Go);this.config=i,de(this,Hi,new Set),de(this,Jn,new Map),de(this,Go,0)}build(i,r,o){const c=new M1({client:i,mutationCache:this,mutationId:++mc(this,Go)._,options:i.defaultMutationOptions(r),state:o});return this.add(c),c}add(i){z(this,Hi).add(i);const r=pc(i);if(typeof r=="string"){const o=z(this,Jn).get(r);o?o.push(i):z(this,Jn).set(r,[i])}this.notify({type:"added",mutation:i})}remove(i){if(z(this,Hi).delete(i)){const r=pc(i);if(typeof r=="string"){const o=z(this,Jn).get(r);if(o)if(o.length>1){const c=o.indexOf(i);c!==-1&&o.splice(c,1)}else o[0]===i&&z(this,Jn).delete(r)}}this.notify({type:"removed",mutation:i})}canRun(i){var o;const r=pc(i);if(typeof r=="string"){const c=(o=z(this,Jn).get(r))==null?void 0:o.find(f=>f.state.status==="pending");return!c||c===i}else return!0}runNext(i){var o,c;const r=pc(i);return typeof r=="string"?((c=(o=z(this,Jn).get(r))==null?void 0:o.find(f=>f!==i&&f.state.isPaused))==null?void 0:c.continue())??Promise.resolve():Promise.resolve()}clear(){Jt.batch(()=>{z(this,Hi).forEach(i=>{this.notify({type:"removed",mutation:i})}),z(this,Hi).clear(),z(this,Jn).clear()})}getAll(){return Array.from(z(this,Hi))}find(i){const r={exact:!0,...i};return this.getAll().find(o=>Jy(r,o))}findAll(i={}){return this.getAll().filter(r=>Jy(i,r))}notify(i){Jt.batch(()=>{this.listeners.forEach(r=>{r(i)})})}resumePausedMutations(){const i=this.getAll().filter(r=>r.state.isPaused);return Jt.batch(()=>Promise.all(i.map(r=>r.continue().catch(Sn))))}},Hi=new WeakMap,Jn=new WeakMap,Go=new WeakMap,wv);function pc(n){var i;return(i=n.options.scope)==null?void 0:i.id}var fi,Rv,z1=(Rv=class extends Xo{constructor(i={}){super();we(this,fi);this.config=i,de(this,fi,new Map)}build(i,r,o){const c=r.queryKey,f=r.queryHash??yh(c,r);let d=this.get(f);return d||(d=new C1({client:i,queryKey:c,queryHash:f,options:i.defaultQueryOptions(r),state:o,defaultOptions:i.getQueryDefaults(c)}),this.add(d)),d}add(i){z(this,fi).has(i.queryHash)||(z(this,fi).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const r=z(this,fi).get(i.queryHash);r&&(i.destroy(),r===i&&z(this,fi).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){Jt.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return z(this,fi).get(i)}getAll(){return[...z(this,fi).values()]}find(i){const r={exact:!0,...i};return this.getAll().find(o=>Iy(r,o))}findAll(i={}){const r=this.getAll();return Object.keys(i).length>0?r.filter(o=>Iy(i,o)):r}notify(i){Jt.batch(()=>{this.listeners.forEach(r=>{r(i)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},fi=new WeakMap,Rv),St,Es,Ts,ga,ya,ws,ba,va,Ov,k1=(Ov=class{constructor(n={}){we(this,St);we(this,Es);we(this,Ts);we(this,ga);we(this,ya);we(this,ws);we(this,ba);we(this,va);de(this,St,n.queryCache||new z1),de(this,Es,n.mutationCache||new D1),de(this,Ts,n.defaultOptions||{}),de(this,ga,new Map),de(this,ya,new Map),de(this,ws,0)}mount(){mc(this,ws)._++,z(this,ws)===1&&(de(this,ba,Sh.subscribe(async n=>{n&&(await this.resumePausedMutations(),z(this,St).onFocus())})),de(this,va,Uc.subscribe(async n=>{n&&(await this.resumePausedMutations(),z(this,St).onOnline())})))}unmount(){var n,i;mc(this,ws)._--,z(this,ws)===0&&((n=z(this,ba))==null||n.call(this),de(this,ba,void 0),(i=z(this,va))==null||i.call(this),de(this,va,void 0))}isFetching(n){return z(this,St).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return z(this,Es).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=z(this,St).get(i.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),r=z(this,St).build(this,i),o=r.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(wt(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(o))}getQueriesData(n){return z(this,St).findAll(n).map(({queryKey:i,state:r})=>[i,r.data])}setQueryData(n,i,r){var d;const o=this.defaultQueryOptions({queryKey:n}),c=(d=z(this,St).get(o.queryHash))==null?void 0:d.state.data,f=h1(i,c);if(f!==void 0)return z(this,St).build(this,o).setData(f,{...r,manual:!0})}setQueriesData(n,i,r){return Jt.batch(()=>z(this,St).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,i,r)]))}getQueryState(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=z(this,St).get(i.queryHash))==null?void 0:r.state}removeQueries(n){const i=z(this,St);Jt.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(n,i){const r=z(this,St);return Jt.batch(()=>{const o=r.findAll(n),c=new Set(o);return o.forEach(f=>{f.reset()}),this.refetchQueries({type:"active",predicate:f=>c.has(f)},i)})}cancelQueries(n,i={}){const r={revert:!0,...i},o=Jt.batch(()=>z(this,St).findAll(n).map(c=>c.cancel(r)));return Promise.all(o).then(Sn).catch(Sn)}invalidateQueries(n,i={}){return Jt.batch(()=>(z(this,St).findAll(n).forEach(r=>{r.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},o=Jt.batch(()=>z(this,St).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);return r.throwOnError||(f=f.catch(Sn)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(o).then(Sn)}async query(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=z(this,St).build(this,i),o=r.isStaleByTime(wt(i.staleTime,r))?await r.fetch(i):r.state.data,c=i.select;return c?c(o):o}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=z(this,St).build(this,i);return r.isStaleByTime(wt(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Sn).catch(Sn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Sn).catch(Sn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Uc.isOnline()?z(this,Es).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,St)}getMutationCache(){return z(this,Es)}getDefaultOptions(){return z(this,Ts)}setDefaultOptions(n){de(this,Ts,n)}setQueryDefaults(n,i){z(this,ga).set(Do(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...z(this,ga).values()],r={};return i.forEach(o=>{Sa(n,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(n,i){z(this,ya).set(Do(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...z(this,ya).values()],r={};return i.forEach(o=>{Sa(n,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const i={...z(this,Ts).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=yh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===bh&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...z(this,Ts).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){z(this,St).clear(),z(this,Es).clear()}},St=new WeakMap,Es=new WeakMap,Ts=new WeakMap,ga=new WeakMap,ya=new WeakMap,ws=new WeakMap,ba=new WeakMap,va=new WeakMap,Ov);const Bv=O.createContext(!1),j1=()=>O.useContext(Bv);Bv.Provider;function U1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const L1=O.createContext(U1()),B1=()=>O.useContext(L1),H1=(n,i,r)=>{const o=r!=null&&r.state.error&&typeof n.throwOnError=="function"?zv(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||o)&&(i.isReset()||(n.retryOnMount=!1))},q1=n=>{O.useEffect(()=>{n.clearReset()},[n])},Y1=({result:n,errorResetBoundary:i,throwOnError:r,query:o,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&o&&(c&&n.data===void 0||zv(r,[n.error,o])),V1=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...c)=>r(o(...c)):r(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},G1=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,Q1=(n,i,r)=>i.fetchOptimistic(n).catch(()=>{r.clearReset()});function X1(n,i,r){const o=j1(),c=B1(),f=o1(),d=f.defaultQueryOptions(n),m=f.getQueryCache().get(d.queryHash),g=n.subscribed!==!1;d._optimisticResults=o?"isRestoring":g?"optimistic":void 0,V1(d),H1(d,c,m),q1(c);const[p]=O.useState(()=>new i(f,d)),y=p.getOptimisticResult(d),v=!o&&g;if(O.useSyncExternalStore(O.useCallback(S=>{const E=v?p.subscribe(Jt.batchCalls(S)):Sn;return p.updateResult(),E},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),O.useEffect(()=>{p.setOptions(d)},[d,p]),G1(d,y))throw Q1(d,p,c);if(Y1({result:y,errorResetBoundary:c,throwOnError:d.throwOnError,query:m,suspense:d.suspense}))throw y.error;return d.notifyOnChangeProps?y:p.trackResult(y)}function Hv(n,i){return X1(n,A1)}var Sd={exports:{}},To={},xd={exports:{}},Ed={};/**
17
+ */var Zy;function r1(){if(Zy)return Ce;Zy=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=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"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function E(T){return T===null||typeof T!="object"?null:(T=S&&T[S]||T["@@iterator"],typeof T=="function"?T:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function D(T,H,te){this.props=T,this.context=H,this.refs=_,this.updater=te||x}D.prototype.isReactComponent={},D.prototype.setState=function(T,H){if(typeof T!="object"&&typeof T!="function"&&T!=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,T,H,"setState")},D.prototype.forceUpdate=function(T){this.updater.enqueueForceUpdate(this,T,"forceUpdate")};function C(){}C.prototype=D.prototype;function j(T,H,te){this.props=T,this.context=H,this.refs=_,this.updater=te||x}var k=j.prototype=new C;k.constructor=j,w(k,D.prototype),k.isPureReactComponent=!0;var q=Array.isArray;function F(){}var B={H:null,A:null,T:null,S:null},U=Object.prototype.hasOwnProperty;function K(T,H,te){var ne=te.ref;return{$$typeof:n,type:T,key:H,ref:ne!==void 0?ne:null,props:te}}function se(T,H){return K(T.type,H,T.props)}function pe(T){return typeof T=="object"&&T!==null&&T.$$typeof===n}function ae(T){var H={"=":"=0",":":"=2"};return"$"+T.replace(/[=:]/g,function(te){return H[te]})}var W=/\/+/g;function le(T,H){return typeof T=="object"&&T!==null&&T.key!=null?ae(""+T.key):H.toString(36)}function ie(T){switch(T.status){case"fulfilled":return T.value;case"rejected":throw T.reason;default:switch(typeof T.status=="string"?T.then(F,F):(T.status="pending",T.then(function(H){T.status==="pending"&&(T.status="fulfilled",T.value=H)},function(H){T.status==="pending"&&(T.status="rejected",T.reason=H)})),T.status){case"fulfilled":return T.value;case"rejected":throw T.reason}}throw T}function N(T,H,te,ne,re){var ee=typeof T;(ee==="undefined"||ee==="boolean")&&(T=null);var ge=!1;if(T===null)ge=!0;else switch(ee){case"bigint":case"string":case"number":ge=!0;break;case"object":switch(T.$$typeof){case n:case i:ge=!0;break;case y:return ge=T._init,N(ge(T._payload),H,te,ne,re)}}if(ge)return re=re(T),ge=ne===""?"."+le(T,0):ne,q(re)?(te="",ge!=null&&(te=ge.replace(W,"$&/")+"/"),N(re,H,te,"",function(Ze){return Ze})):re!=null&&(pe(re)&&(re=se(re,te+(re.key==null||T&&T.key===re.key?"":(""+re.key).replace(W,"$&/")+"/")+ge)),H.push(re)),1;ge=0;var ce=ne===""?".":ne+":";if(q(T))for(var fe=0;fe<T.length;fe++)ne=T[fe],ee=ce+le(ne,fe),ge+=N(ne,H,te,ee,re);else if(fe=E(T),typeof fe=="function")for(T=fe.call(T),fe=0;!(ne=T.next()).done;)ne=ne.value,ee=ce+le(ne,fe++),ge+=N(ne,H,te,ee,re);else if(ee==="object"){if(typeof T.then=="function")return N(ie(T),H,te,ne,re);throw H=String(T),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(T).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return ge}function Q(T,H,te){if(T==null)return T;var ne=[],re=0;return N(T,ne,"","",function(ee){return H.call(te,ee,re++)}),ne}function I(T){if(T._status===-1){var H=T._result;H=H(),H.then(function(te){(T._status===0||T._status===-1)&&(T._status=1,T._result=te)},function(te){(T._status===0||T._status===-1)&&(T._status=2,T._result=te)}),T._status===-1&&(T._status=0,T._result=H)}if(T._status===1)return T._result.default;throw T._result}var oe=typeof reportError=="function"?reportError:function(T){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof T=="object"&&T!==null&&typeof T.message=="string"?String(T.message):String(T),error:T});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",T);return}console.error(T)},Y={map:Q,forEach:function(T,H,te){Q(T,function(){H.apply(this,arguments)},te)},count:function(T){var H=0;return Q(T,function(){H++}),H},toArray:function(T){return Q(T,function(H){return H})||[]},only:function(T){if(!pe(T))throw Error("React.Children.only expected to receive a single React element child.");return T}};return Ce.Activity=v,Ce.Children=Y,Ce.Component=D,Ce.Fragment=r,Ce.Profiler=c,Ce.PureComponent=j,Ce.StrictMode=o,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(T){return B.H.useMemoCache(T)}},Ce.cache=function(T){return function(){return T.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(T,H,te){if(T==null)throw Error("The argument must be a React element, but you passed "+T+".");var ne=w({},T.props),re=T.key;if(H!=null)for(ee in H.key!==void 0&&(re=""+H.key),H)!U.call(H,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&H.ref===void 0||(ne[ee]=H[ee]);var ee=arguments.length-2;if(ee===1)ne.children=te;else if(1<ee){for(var ge=Array(ee),ce=0;ce<ee;ce++)ge[ce]=arguments[ce+2];ne.children=ge}return K(T.type,re,ne)},Ce.createContext=function(T){return T={$$typeof:d,_currentValue:T,_currentValue2:T,_threadCount:0,Provider:null,Consumer:null},T.Provider=T,T.Consumer={$$typeof:f,_context:T},T},Ce.createElement=function(T,H,te){var ne,re={},ee=null;if(H!=null)for(ne in H.key!==void 0&&(ee=""+H.key),H)U.call(H,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(re[ne]=H[ne]);var ge=arguments.length-2;if(ge===1)re.children=te;else if(1<ge){for(var ce=Array(ge),fe=0;fe<ge;fe++)ce[fe]=arguments[fe+2];re.children=ce}if(T&&T.defaultProps)for(ne in ge=T.defaultProps,ge)re[ne]===void 0&&(re[ne]=ge[ne]);return K(T,ee,re)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(T){return{$$typeof:m,render:T}},Ce.isValidElement=pe,Ce.lazy=function(T){return{$$typeof:y,_payload:{_status:-1,_result:T},_init:I}},Ce.memo=function(T,H){return{$$typeof:p,type:T,compare:H===void 0?null:H}},Ce.startTransition=function(T){var H=B.T,te={};B.T=te;try{var ne=T(),re=B.S;re!==null&&re(te,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(F,oe)}catch(ee){oe(ee)}finally{H!==null&&te.types!==null&&(H.types=te.types),B.T=H}},Ce.unstable_useCacheRefresh=function(){return B.H.useCacheRefresh()},Ce.use=function(T){return B.H.use(T)},Ce.useActionState=function(T,H,te){return B.H.useActionState(T,H,te)},Ce.useCallback=function(T,H){return B.H.useCallback(T,H)},Ce.useContext=function(T){return B.H.useContext(T)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(T,H){return B.H.useDeferredValue(T,H)},Ce.useEffect=function(T,H){return B.H.useEffect(T,H)},Ce.useEffectEvent=function(T){return B.H.useEffectEvent(T)},Ce.useId=function(){return B.H.useId()},Ce.useImperativeHandle=function(T,H,te){return B.H.useImperativeHandle(T,H,te)},Ce.useInsertionEffect=function(T,H){return B.H.useInsertionEffect(T,H)},Ce.useLayoutEffect=function(T,H){return B.H.useLayoutEffect(T,H)},Ce.useMemo=function(T,H){return B.H.useMemo(T,H)},Ce.useOptimistic=function(T,H){return B.H.useOptimistic(T,H)},Ce.useReducer=function(T,H,te){return B.H.useReducer(T,H,te)},Ce.useRef=function(T){return B.H.useRef(T)},Ce.useState=function(T){return B.H.useState(T)},Ce.useSyncExternalStore=function(T,H,te){return B.H.useSyncExternalStore(T,H,te)},Ce.useTransition=function(){return B.H.useTransition()},Ce.version="19.2.7",Ce}var Py;function Qo(){return Py||(Py=1,bd.exports=r1()),bd.exports}var O=Qo();const a1=n1(O),o1=t1({__proto__:null,default:a1},[O]),Av=O.createContext(void 0),l1=n=>{const i=O.useContext(Av);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},c1=({client:n,children:i})=>(O.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),A.jsx(Av.Provider,{value:n,children:i})),u1={setTimeout:(n,i)=>setTimeout(n,i),clearTimeout:n=>clearTimeout(n),setInterval:(n,i)=>setInterval(n,i),clearInterval:n=>clearInterval(n)};var bs,gh,yv,f1=(yv=class{constructor(){we(this,bs,u1);we(this,gh,!1)}setTimeoutProvider(n){de(this,bs,n)}setTimeout(n,i){return z(this,bs).setTimeout(n,i)}clearTimeout(n){z(this,bs).clearTimeout(n)}setInterval(n,i){return z(this,bs).setInterval(n,i)}clearInterval(n){z(this,bs).clearInterval(n)}},bs=new WeakMap,gh=new WeakMap,yv);const $s=new f1;function d1(n){setTimeout(n,0)}const h1=typeof window>"u"||"Deno"in globalThis;function Sn(){}function m1(n,i){return typeof n=="function"?n(i):n}function _v(n){return typeof n=="number"&&n>=0&&n!==1/0}function Mv(n,i){return Math.max(n+(i||0)-Date.now(),0)}function wt(n,i){return typeof n=="function"?n(i):n}function Iy(n,i){const{type:r="all",exact:o,fetchStatus:c,predicate:f,queryKey:d,stale:m}=n;if(d){if(o){if(i.queryHash!==yh(d,i.options))return!1}else if(!Sa(i.queryKey,d))return!1}if(r!=="all"){const g=i.isActive();if(r==="active"&&!g||r==="inactive"&&g)return!1}return!(typeof m=="boolean"&&i.isStale()!==m||c&&c!==i.state.fetchStatus||f&&!f(i))}function Jy(n,i){const{exact:r,status:o,predicate:c,mutationKey:f}=n;if(f){if(!i.options.mutationKey)return!1;if(r){if(Do(i.options.mutationKey)!==Do(f))return!1}else if(!Sa(i.options.mutationKey,f))return!1}return!(o&&i.state.status!==o||c&&!c(i))}function yh(n,i){return((i==null?void 0:i.queryKeyHashFn)||Do)(n)}function Do(n){return JSON.stringify(n,(i,r)=>Gd(r)?Object.keys(r).sort().reduce((o,c)=>(o[c]=r[c],o),{}):r)}function Sa(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(Array.isArray(n)&&Array.isArray(i)){for(let o=0;o<i.length;o++)if(!Sa(n[o],i[o]))return!1;return!0}const r=Object.keys(i);for(const o of r)if(!Sa(n[o],i[o]))return!1;return!0}return!1}const p1=Object.prototype.hasOwnProperty;function Nv(n,i,r=0){if(n===i)return n;if(r>500)return i;const o=Wy(n)&&Wy(i);if(!o&&!(Gd(n)&&Gd(i)))return i;const c=(o?n:Object.keys(n)).length,f=o?i:Object.keys(i),d=f.length,m=o?new Array(d):{};let g=0;for(let p=0;p<d;p++){const y=o?p:f[p],v=n[y],S=i[y];if(v===S){m[y]=v,(o?p<c:p1.call(n,y))&&g++;continue}if(v===null||S===null||typeof v!="object"||typeof S!="object"){m[y]=S;continue}const E=Nv(v,S,r+1);m[y]=E,E===v&&g++}return c===d&&g===c?n:m}function vd(n,i){if(!i||Object.keys(n).length!==Object.keys(i).length)return!1;for(const r in n)if(n[r]!==i[r])return!1;return!0}function Wy(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function Gd(n){if(!$y(n))return!1;const i=n.constructor;if(i===void 0)return!0;const r=i.prototype;return!(!$y(r)||!r.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function $y(n){return Object.prototype.toString.call(n)==="[object Object]"}function g1(n){return new Promise(i=>{$s.setTimeout(i,n)})}function Qd(n,i,r){return typeof r.structuralSharing=="function"?r.structuralSharing(n,i):r.structuralSharing!==!1?Nv(n,i):i}function y1(n,i,r=0){const o=[...n,i];return r&&o.length>r?o.slice(1):o}function b1(n,i,r=0){const o=[i,...n];return r&&o.length>r?o.slice(0,-1):o}const bh=Symbol();function Dv(n,i){return!n.queryFn&&(i!=null&&i.initialPromise)?()=>i.initialPromise:!n.queryFn||n.queryFn===bh?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function zv(n,i){return typeof n=="function"?n(...i):!!n}function v1(n,i,r){let o=!1,c;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(c??(c=i()),o||(o=!0,c.aborted?r():c.addEventListener("abort",r,{once:!0})),c)}),n}let S1=()=>h1;const vh=()=>S1();var Xo=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},er,vs,oa,bv,x1=(bv=class extends Xo{constructor(){super();we(this,er);we(this,vs);we(this,oa);de(this,oa,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){z(this,vs)||this.setEventListener(z(this,oa))}onUnsubscribe(){var i;this.hasListeners()||((i=z(this,vs))==null||i.call(this),de(this,vs,void 0))}setEventListener(i){var r;de(this,oa,i),(r=z(this,vs))==null||r.call(this),de(this,vs,i(o=>{typeof o=="boolean"?this.setFocused(o):this.onFocus()}))}setFocused(i){z(this,er)!==i&&(de(this,er,i),this.onFocus())}onFocus(){const i=this.isFocused();this.listeners.forEach(r=>{r(i)})}isFocused(){var i;return typeof z(this,er)=="boolean"?z(this,er):((i=globalThis.document)==null?void 0:i.visibilityState)!=="hidden"}},er=new WeakMap,vs=new WeakMap,oa=new WeakMap,bv);const Sh=new x1,E1=d1;function T1(){let n=[],i=0,r=m=>{m()},o=m=>{m()},c=E1;const f=m=>{i?n.push(m):c(()=>{r(m)})},d=()=>{const m=n;n=[],m.length&&c(()=>{o(()=>{m.forEach(g=>{r(g)})})})};return{batch:m=>{let g;i++;try{g=m()}finally{i--,i||d()}return g},batchCalls:m=>(...g)=>{f(()=>{m(...g)})},schedule:f,setNotifyFunction:m=>{r=m},setBatchNotifyFunction:m=>{o=m},setScheduler:m=>{c=m}}}const Jt=T1();var la,Ss,ca,vv,w1=(vv=class extends Xo{constructor(){super();we(this,la,!0);we(this,Ss);we(this,ca);de(this,ca,i=>{if(typeof window<"u"&&window.addEventListener){const r=()=>i(!0),o=()=>i(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",o,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",o)}}})}onSubscribe(){z(this,Ss)||this.setEventListener(z(this,ca))}onUnsubscribe(){var i;this.hasListeners()||((i=z(this,Ss))==null||i.call(this),de(this,Ss,void 0))}setEventListener(i){var r;de(this,ca,i),(r=z(this,Ss))==null||r.call(this),de(this,Ss,i(this.setOnline.bind(this)))}setOnline(i){z(this,la)!==i&&(de(this,la,i),this.listeners.forEach(r=>{r(i)}))}isOnline(){return z(this,la)}},la=new WeakMap,Ss=new WeakMap,ca=new WeakMap,vv);const Uc=new w1;function R1(n){return Math.min(1e3*2**n,3e4)}function kv(n){return(n??"online")==="online"?Uc.isOnline():!0}var Xd=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function jv(n){let i=!1,r=0,o,c="pending",f,d;const m=new Promise((C,j)=>{f=C,d=j});m.catch(Sn);const g=()=>c!=="pending",p=C=>{var j;if(!g()){const k=new Xd(C);w(k),(j=n.onCancel)==null||j.call(n,k)}},y=()=>{i=!0},v=()=>{i=!1},S=()=>Sh.isFocused()&&(n.networkMode==="always"||Uc.isOnline())&&n.canRun(),E=()=>kv(n.networkMode)&&n.canRun(),x=C=>{g()||(o==null||o(),c="resolved",f(C))},w=C=>{g()||(o==null||o(),c="rejected",d(C))},_=()=>new Promise(C=>{var j;o=k=>{(g()||S())&&C(k)},(j=n.onPause)==null||j.call(n)}).then(()=>{var C;o=void 0,g()||(C=n.onContinue)==null||C.call(n)}),D=()=>{if(g())return;let C;const j=r===0?n.initialPromise:void 0;try{C=j??n.fn()}catch(k){C=Promise.reject(k)}Promise.resolve(C).then(x).catch(k=>{var K;if(g())return;const q=n.retry??(vh()?0:3),F=n.retryDelay??R1,B=typeof F=="function"?F(r,k):F,U=q===!0||typeof q=="number"&&r<q||typeof q=="function"&&q(r,k);if(i||!U){w(k);return}r++,(K=n.onFail)==null||K.call(n,r,k),g1(B).then(()=>S()?void 0:_()).then(()=>{i?w(k):D()})})};return{promise:m,status:()=>c,cancel:p,continue:()=>(o==null||o(),m),cancelRetry:y,continueRetry:v,canStart:E,start:()=>(E()?D():_().then(D),m)}}var tr,Sv,Uv=(Sv=class{constructor(){we(this,tr)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_v(this.gcTime)&&de(this,tr,$s.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(vh()?1/0:3e5))}clearGcTimeout(){z(this,tr)!==void 0&&($s.clearTimeout(z(this,tr)),de(this,tr,void 0))}},tr=new WeakMap,Sv);function O1(n){return{onFetch:(i,r)=>{var y,v,S,E,x;const o=i.options,c=(S=(v=(y=i.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:S.direction,f=((E=i.state.data)==null?void 0:E.pages)||[],d=((x=i.state.data)==null?void 0:x.pageParams)||[];let m={pages:[],pageParams:[]},g=0;const p=async()=>{let w=!1;const _=j=>{v1(j,()=>i.signal,()=>w=!0)},D=Dv(i.options,i.fetchOptions),C=async(j,k,q)=>{if(w)return Promise.reject(i.signal.reason);if(k==null&&j.pages.length)return Promise.resolve(j);const B=(()=>{const pe={client:i.client,queryKey:i.queryKey,pageParam:k,direction:q?"backward":"forward",meta:i.options.meta};return _(pe),pe})(),U=await D(B),{maxPages:K}=i.options,se=q?b1:y1;return{pages:se(j.pages,U,K),pageParams:se(j.pageParams,k,K)}};if(c&&f.length){const j=c==="backward",k=j?C1:eb,q={pages:f,pageParams:d};m=await C(q,k(o,q),j)}else{const j=n??f.length;do{const k=g===0?d[0]??o.initialPageParam:eb(o,m);if(g>0&&k==null)break;m=await C(m,k),g++}while(g<j)}return m};i.options.persister?i.fetchFn=()=>{var w,_;return(_=(w=i.options).persister)==null?void 0:_.call(w,p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},r)}:i.fetchFn=p}}}function eb(n,{pages:i,pageParams:r}){const o=i.length-1;return i.length>0?n.getNextPageParam(i[o],i,r[o],r):void 0}function C1(n,{pages:i,pageParams:r}){var o;return i.length>0?(o=n.getPreviousPageParam)==null?void 0:o.call(n,i[0],i,r[0],r):void 0}var ua,nr,fa,Qn,ir,Ht,Ho,sr,In,ji,xv,A1=(xv=class extends Uv{constructor(i){super();we(this,In);we(this,ua);we(this,nr);we(this,fa);we(this,Qn);we(this,ir);we(this,Ht);we(this,Ho);we(this,sr);de(this,sr,!1),de(this,Ho,i.defaultOptions),this.setOptions(i.options),this.observers=[],de(this,ir,i.client),de(this,Qn,z(this,ir).getQueryCache()),this.queryKey=i.queryKey,this.queryHash=i.queryHash,de(this,nr,nb(this.options)),this.state=i.state??z(this,nr),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,ua)}get promise(){var i;return(i=z(this,Ht))==null?void 0:i.promise}setOptions(i){if(this.options={...z(this,Ho),...i},i!=null&&i._type&&de(this,ua,i._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=nb(this.options);r.data!==void 0&&(this.setState(tb(r.data,r.dataUpdatedAt)),de(this,nr,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,Qn).remove(this)}setData(i,r){const o=Qd(this.state.data,i,this.options);return Ye(this,In,ji).call(this,{data:o,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),o}setState(i){Ye(this,In,ji).call(this,{type:"setState",state:i})}cancel(i){var o,c;const r=(o=z(this,Ht))==null?void 0:o.promise;return(c=z(this,Ht))==null||c.cancel(i),r?r.then(Sn).catch(Sn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,nr)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(i=>wt(i.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===bh||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(i=>wt(i.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(i=>i.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(i=0){return this.state.data===void 0?!0:i==="static"?!1:this.state.isInvalidated?!0:!Mv(this.state.dataUpdatedAt,i)}onFocus(){var i,r;(i=this.observers.find(o=>o.shouldFetchOnWindowFocus()))==null||i.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}onOnline(){var i,r;(i=this.observers.find(o=>o.shouldFetchOnReconnect()))==null||i.refetch({cancelRefetch:!1}),(r=z(this,Ht))==null||r.continue()}addObserver(i){this.observers.includes(i)||(this.observers.push(i),this.clearGcTimeout(),z(this,Qn).notify({type:"observerAdded",query:this,observer:i}))}removeObserver(i){const r=this.observers.indexOf(i);r!==-1&&(this.observers.splice(r,1),this.observers.length||(z(this,Ht)&&(z(this,sr)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?z(this,Ht).cancel({revert:!0}):z(this,Ht).cancelRetry()),this.scheduleGc()),z(this,Qn).notify({type:"observerRemoved",query:this,observer:i}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ye(this,In,ji).call(this,{type:"invalidate"})}async fetch(i,r){var p,y,v,S,E,x,w,_,D,C,j,k;if(this.state.fetchStatus!=="idle"&&((p=z(this,Ht))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(z(this,Ht))return z(this,Ht).continueRetry(),z(this,Ht).promise}if(i&&this.setOptions(i),!this.options.queryFn){const q=this.observers.find(F=>F.options.queryFn);q&&this.setOptions(q.options)}const o=new AbortController,c=q=>{Object.defineProperty(q,"signal",{enumerable:!0,get:()=>(de(this,sr,!0),o.signal)})},f=()=>{const q=Dv(this.options,r),B=(()=>{const U={client:z(this,ir),queryKey:this.queryKey,meta:this.meta};return c(U),U})();return de(this,sr,!1),this.options.persister?this.options.persister(q,B,this):q(B)},m=(()=>{const q={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:z(this,ir),state:this.state,fetchFn:f};return c(q),q})();(y=z(this,ua)==="infinite"?O1(this.options.pages):this.options.behavior)==null||y.onFetch(m,this),de(this,fa,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((v=m.fetchOptions)==null?void 0:v.meta))&&Ye(this,In,ji).call(this,{type:"fetch",meta:(S=m.fetchOptions)==null?void 0:S.meta});const g=de(this,Ht,jv({initialPromise:r==null?void 0:r.initialPromise,fn:m.fetchFn,onCancel:q=>{q instanceof Xd&&q.revert&&this.setState({...z(this,fa),fetchStatus:"idle"}),o.abort()},onFail:(q,F)=>{Ye(this,In,ji).call(this,{type:"failed",failureCount:q,error:F})},onPause:()=>{Ye(this,In,ji).call(this,{type:"pause"})},onContinue:()=>{Ye(this,In,ji).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode,canRun:()=>!0}));try{const q=await g.start();if(q===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(q),(x=(E=z(this,Qn).config).onSuccess)==null||x.call(E,q,this),(_=(w=z(this,Qn).config).onSettled)==null||_.call(w,q,this.state.error,this),q}catch(q){if(q instanceof Xd){if(q.silent)return z(this,Ht).promise;if(q.revert){if(this.state.data===void 0)throw q;return this.state.data}}throw Ye(this,In,ji).call(this,{type:"error",error:q}),(C=(D=z(this,Qn).config).onError)==null||C.call(D,q,this),(k=(j=z(this,Qn).config).onSettled)==null||k.call(j,this.state.data,q,this),q}finally{z(this,Ht)===g&&de(this,Ht,void 0),this.scheduleGc()}}},ua=new WeakMap,nr=new WeakMap,fa=new WeakMap,Qn=new WeakMap,ir=new WeakMap,Ht=new WeakMap,Ho=new WeakMap,sr=new WeakMap,In=new WeakSet,ji=function(i){const r=o=>{switch(i.type){case"failed":return{...o,fetchFailureCount:i.failureCount,fetchFailureReason:i.error};case"pause":return{...o,fetchStatus:"paused"};case"continue":return{...o,fetchStatus:"fetching"};case"fetch":return{...o,...Lv(o.data,this.options),fetchMeta:i.meta??null};case"success":const c={...o,...tb(i.data,i.dataUpdatedAt),dataUpdateCount:o.dataUpdateCount+1,...!i.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return de(this,fa,i.manual?c:void 0),c;case"error":const f=i.error;return{...o,error:f,errorUpdateCount:o.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:o.fetchFailureCount+1,fetchFailureReason:f,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...o,isInvalidated:!0};case"setState":return{...o,...i.state}}};this.state=r(this.state),Jt.batch(()=>{this.observers.slice().forEach(o=>{o.onQueryUpdate()}),z(this,Qn).notify({query:this,type:"updated",action:i})})},xv);function Lv(n,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:kv(i.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function tb(n,i){return{data:n,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function nb(n){const i=typeof n.initialData=="function"?n.initialData():n.initialData,r=i!==void 0,o=r?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var ln,Qe,qo,cn,rr,da,Bi,Yo,ha,ma,ar,or,xs,pa,et,Ao,Fd,Kd,Zd,Pd,Id,Jd,Wd,$d,Ev,_1=(Ev=class extends Xo{constructor(i,r){super();we(this,et);we(this,ln);we(this,Qe);we(this,qo);we(this,cn);we(this,rr);we(this,da);we(this,Bi);we(this,Yo);we(this,ha);we(this,ma);we(this,ar);we(this,or);we(this,xs);we(this,pa,new Set);this.options=r,de(this,ln,i),de(this,Bi,null),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,Qe).addObserver(this),ib(z(this,Qe),this.options)?Ye(this,et,Ao).call(this):this.updateResult(),Ye(this,et,Id).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return eh(z(this,Qe),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return eh(z(this,Qe),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ye(this,et,Jd).call(this),Ye(this,et,Wd).call(this),z(this,Qe).removeObserver(this)}setOptions(i){const r=this.options,o=z(this,Qe);if(this.options=z(this,ln).defaultQueryOptions(i),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wt(this.options.enabled,z(this,Qe))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ye(this,et,$d).call(this),z(this,Qe).setOptions(this.options),r._defaulted&&!vd(this.options,r)&&z(this,ln).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,Qe),observer:this});const c=this.hasListeners();c&&sb(z(this,Qe),o,this.options,r)&&Ye(this,et,Ao).call(this),this.updateResult(),c&&(z(this,Qe)!==o||wt(this.options.enabled,z(this,Qe))!==wt(r.enabled,z(this,Qe))||wt(this.options.staleTime,z(this,Qe))!==wt(r.staleTime,z(this,Qe)))&&Ye(this,et,Kd).call(this);const f=Ye(this,et,Zd).call(this);c&&(z(this,Qe)!==o||wt(this.options.enabled,z(this,Qe))!==wt(r.enabled,z(this,Qe))||f!==z(this,xs))&&Ye(this,et,Pd).call(this,f)}getOptimisticResult(i){const r=z(this,ln).getQueryCache().build(z(this,ln),i),o=this.createResult(r,i);return vd(this.getCurrentResult(),o)||(de(this,cn,o),de(this,da,this.options),de(this,rr,z(this,Qe).state)),o}getCurrentResult(){return z(this,cn)}trackResult(i,r){return new Proxy(i,{get:(o,c)=>(this.trackProp(c),r==null||r(c),Reflect.get(o,c))})}trackProp(i){z(this,pa).add(i)}getCurrentQuery(){return z(this,Qe)}refetch({...i}={}){return this.fetch({...i})}fetchOptimistic(i){const r=z(this,ln).defaultQueryOptions(i),o=z(this,ln).getQueryCache().build(z(this,ln),r);let c=()=>{},f;const d=new Promise(m=>{f=m,c=z(this,ln).getQueryCache().subscribe(g=>{g.type==="updated"&&g.query.queryHash===o.queryHash&&o.state.data!==void 0&&(c(),m(this.createResult(o,r)))})});return Promise.race([o.fetch().then(()=>{const m=this.createResult(o,r);return f==null||f(m),m}).finally(()=>{c()}),d])}fetch(i){return Ye(this,et,Ao).call(this,{...i,cancelRefetch:i.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,cn)))}createResult(i,r){var F;const o=z(this,Qe),c=this.options,f=z(this,cn),d=z(this,rr),m=z(this,da),g=i!==o?i.state:z(this,qo),{state:p}=i;let y={...p},v=!1,S;if(r._optimisticResults){const B=this.hasListeners(),U=!B&&ib(i,r),K=B&&sb(i,o,r,c);(U||K)&&(y={...y,...Lv(p.data,i.options)}),r._optimisticResults==="isRestoring"&&(y.fetchStatus="idle")}let{error:E,errorUpdatedAt:x,status:w}=y;S=y.data;let _=!1;if(r.placeholderData!==void 0&&S===void 0&&w==="pending"){let B;f!=null&&f.isPlaceholderData&&r.placeholderData===(m==null?void 0:m.placeholderData)?(B=f.data,_=!0):B=typeof r.placeholderData=="function"?r.placeholderData((F=z(this,ma))==null?void 0:F.state.data,z(this,ma)):r.placeholderData,B!==void 0&&(w="success",S=Qd(f==null?void 0:f.data,B,r),v=!0)}if(r.select&&S!==void 0&&!_)if(f&&S===(d==null?void 0:d.data)&&r.select===z(this,Yo))S=z(this,ha);else try{de(this,Yo,r.select),S=r.select(S),S=Qd(f==null?void 0:f.data,S,r),de(this,ha,S),de(this,Bi,null)}catch(B){de(this,Bi,B)}else S===void 0&&de(this,Bi,null);z(this,Bi)&&(E=z(this,Bi),S=z(this,ha),x=Date.now(),w="error",v=!1);const D=y.fetchStatus==="fetching",C=w==="pending",j=w==="error",k=C&&D,q=S!==void 0;return{status:w,fetchStatus:y.fetchStatus,isPending:C,isSuccess:w==="success",isError:j,isInitialLoading:k,isLoading:k,data:S,dataUpdatedAt:y.dataUpdatedAt,error:E,errorUpdatedAt:x,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:i.isFetched(),isFetchedAfterMount:y.dataUpdateCount>g.dataUpdateCount||y.errorUpdateCount>g.errorUpdateCount,isFetching:D,isRefetching:D&&!C,isLoadingError:j&&!q,isPaused:y.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:j&&q,isStale:xh(i,r),refetch:this.refetch,isEnabled:wt(r.enabled,i)!==!1}}updateResult(){const i=z(this,cn),r=this.createResult(z(this,Qe),this.options);if(de(this,rr,z(this,Qe).state),de(this,da,this.options),z(this,rr).data!==void 0&&de(this,ma,z(this,Qe)),vd(r,i))return;de(this,cn,r);const c=(()=>{if(!i)return!0;const{notifyOnChangeProps:f}=this.options,d=typeof f=="function"?f():f;if(d==="all"||!d&&!z(this,pa).size)return!0;const m=new Set(d??z(this,pa));return this.options.throwOnError&&m.add("error"),Object.keys(z(this,cn)).some(g=>{const p=g;return z(this,cn)[p]!==i[p]&&m.has(p)})})();Jt.batch(()=>{c&&this.listeners.forEach(f=>{f(z(this,cn))}),z(this,ln).getQueryCache().notify({query:z(this,Qe),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ye(this,et,Id).call(this)}},ln=new WeakMap,Qe=new WeakMap,qo=new WeakMap,cn=new WeakMap,rr=new WeakMap,da=new WeakMap,Bi=new WeakMap,Yo=new WeakMap,ha=new WeakMap,ma=new WeakMap,ar=new WeakMap,or=new WeakMap,xs=new WeakMap,pa=new WeakMap,et=new WeakSet,Ao=function(i){Ye(this,et,$d).call(this);let r=z(this,Qe).fetch(this.options,i);return i!=null&&i.throwOnError||(r=r.catch(Sn)),r},Fd=function(i){return!vh()&&wt(this.options.enabled,z(this,Qe))!==!1&&_v(i)},Kd=function(){Ye(this,et,Jd).call(this);const i=wt(this.options.staleTime,z(this,Qe));if(z(this,cn).isStale||!Ye(this,et,Fd).call(this,i))return;const r=Mv(z(this,cn).dataUpdatedAt,i)+1;de(this,ar,$s.setTimeout(()=>{z(this,cn).isStale||this.updateResult()},r))},Zd=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,Qe)):this.options.refetchInterval)??!1},Pd=function(i){Ye(this,et,Wd).call(this),de(this,xs,i),!(z(this,xs)===0||!Ye(this,et,Fd).call(this,z(this,xs)))&&de(this,or,$s.setInterval(()=>{(this.options.refetchIntervalInBackground||Sh.isFocused())&&Ye(this,et,Ao).call(this)},z(this,xs)))},Id=function(){Ye(this,et,Kd).call(this),Ye(this,et,Pd).call(this,Ye(this,et,Zd).call(this))},Jd=function(){z(this,ar)!==void 0&&($s.clearTimeout(z(this,ar)),de(this,ar,void 0))},Wd=function(){z(this,or)!==void 0&&($s.clearInterval(z(this,or)),de(this,or,void 0))},$d=function(){const i=z(this,ln).getQueryCache().build(z(this,ln),this.options);if(i===z(this,Qe))return;const r=z(this,Qe);de(this,Qe,i),de(this,qo,i.state),this.hasListeners()&&(r==null||r.removeObserver(this),i.addObserver(this))},Ev);function M1(n,i){return wt(i.enabled,n)!==!1&&n.state.data===void 0&&!(n.state.status==="error"&&wt(i.retryOnMount,n)===!1)}function ib(n,i){return M1(n,i)||n.state.data!==void 0&&eh(n,i,i.refetchOnMount)}function eh(n,i,r){if(wt(i.enabled,n)!==!1&&wt(i.staleTime,n)!=="static"){const o=typeof r=="function"?r(n):r;return o==="always"||o!==!1&&xh(n,i)}return!1}function sb(n,i,r,o){return(n!==i||wt(o.enabled,n)===!1)&&(!r.suspense||n.state.status!=="error")&&xh(n,r)}function xh(n,i){return wt(i.enabled,n)!==!1&&n.isStaleByTime(wt(i.staleTime,n))}var Vo,ci,nn,lr,ui,ys,Tv,N1=(Tv=class extends Uv{constructor(i){super();we(this,ui);we(this,Vo);we(this,ci);we(this,nn);we(this,lr);de(this,Vo,i.client),this.mutationId=i.mutationId,de(this,nn,i.mutationCache),de(this,ci,[]),this.state=i.state||D1(),this.setOptions(i.options),this.scheduleGc()}setOptions(i){this.options=i,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(i){z(this,ci).includes(i)||(z(this,ci).push(i),this.clearGcTimeout(),z(this,nn).notify({type:"observerAdded",mutation:this,observer:i}))}removeObserver(i){de(this,ci,z(this,ci).filter(r=>r!==i)),this.scheduleGc(),z(this,nn).notify({type:"observerRemoved",mutation:this,observer:i})}optionalRemove(){z(this,ci).length||(this.state.status==="pending"?this.scheduleGc():z(this,nn).remove(this))}continue(){var i;return((i=z(this,lr))==null?void 0:i.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(i){var m,g,p,y,v,S,E,x,w,_,D,C,j,k,q,F,B,U;const r=()=>{Ye(this,ui,ys).call(this,{type:"continue"})},o={client:z(this,Vo),meta:this.options.meta,mutationKey:this.options.mutationKey},c=de(this,lr,jv({fn:()=>this.options.mutationFn?this.options.mutationFn(i,o):Promise.reject(new Error("No mutationFn found")),onFail:(K,se)=>{Ye(this,ui,ys).call(this,{type:"failed",failureCount:K,error:se})},onPause:()=>{Ye(this,ui,ys).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,nn).canRun(this)})),f=this.state.status==="pending",d=!c.canStart();try{if(f)r();else{Ye(this,ui,ys).call(this,{type:"pending",variables:i,isPaused:d}),z(this,nn).config.onMutate&&await z(this,nn).config.onMutate(i,this,o);const se=await((g=(m=this.options).onMutate)==null?void 0:g.call(m,i,o));se!==this.state.context&&Ye(this,ui,ys).call(this,{type:"pending",context:se,variables:i,isPaused:d})}const K=await c.start();return await((y=(p=z(this,nn).config).onSuccess)==null?void 0:y.call(p,K,i,this.state.context,this,o)),await((S=(v=this.options).onSuccess)==null?void 0:S.call(v,K,i,this.state.context,o)),await((x=(E=z(this,nn).config).onSettled)==null?void 0:x.call(E,K,null,this.state.variables,this.state.context,this,o)),await((_=(w=this.options).onSettled)==null?void 0:_.call(w,K,null,i,this.state.context,o)),Ye(this,ui,ys).call(this,{type:"success",data:K}),K}catch(K){try{await((C=(D=z(this,nn).config).onError)==null?void 0:C.call(D,K,i,this.state.context,this,o))}catch(se){Promise.reject(se)}try{await((k=(j=this.options).onError)==null?void 0:k.call(j,K,i,this.state.context,o))}catch(se){Promise.reject(se)}try{await((F=(q=z(this,nn).config).onSettled)==null?void 0:F.call(q,void 0,K,this.state.variables,this.state.context,this,o))}catch(se){Promise.reject(se)}try{await((U=(B=this.options).onSettled)==null?void 0:U.call(B,void 0,K,i,this.state.context,o))}catch(se){Promise.reject(se)}throw Ye(this,ui,ys).call(this,{type:"error",error:K}),K}finally{z(this,lr)===c&&de(this,lr,void 0),z(this,nn).runNext(this)}}},Vo=new WeakMap,ci=new WeakMap,nn=new WeakMap,lr=new WeakMap,ui=new WeakSet,ys=function(i){const r=o=>{switch(i.type){case"failed":return{...o,failureCount:i.failureCount,failureReason:i.error};case"pause":return{...o,isPaused:!0};case"continue":return{...o,isPaused:!1};case"pending":return{...o,context:i.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:i.isPaused,status:"pending",variables:i.variables,submittedAt:Date.now()};case"success":return{...o,data:i.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...o,data:void 0,error:i.error,failureCount:o.failureCount+1,failureReason:i.error,isPaused:!1,status:"error"}}};this.state=r(this.state),Jt.batch(()=>{z(this,ci).forEach(o=>{o.onMutationUpdate(i)}),z(this,nn).notify({mutation:this,type:"updated",action:i})})},Tv);function D1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hi,Jn,Go,wv,z1=(wv=class extends Xo{constructor(i={}){super();we(this,Hi);we(this,Jn);we(this,Go);this.config=i,de(this,Hi,new Set),de(this,Jn,new Map),de(this,Go,0)}build(i,r,o){const c=new N1({client:i,mutationCache:this,mutationId:++mc(this,Go)._,options:i.defaultMutationOptions(r),state:o});return this.add(c),c}add(i){z(this,Hi).add(i);const r=pc(i);if(typeof r=="string"){const o=z(this,Jn).get(r);o?o.push(i):z(this,Jn).set(r,[i])}this.notify({type:"added",mutation:i})}remove(i){if(z(this,Hi).delete(i)){const r=pc(i);if(typeof r=="string"){const o=z(this,Jn).get(r);if(o)if(o.length>1){const c=o.indexOf(i);c!==-1&&o.splice(c,1)}else o[0]===i&&z(this,Jn).delete(r)}}this.notify({type:"removed",mutation:i})}canRun(i){var o;const r=pc(i);if(typeof r=="string"){const c=(o=z(this,Jn).get(r))==null?void 0:o.find(f=>f.state.status==="pending");return!c||c===i}else return!0}runNext(i){var o,c;const r=pc(i);return typeof r=="string"?((c=(o=z(this,Jn).get(r))==null?void 0:o.find(f=>f!==i&&f.state.isPaused))==null?void 0:c.continue())??Promise.resolve():Promise.resolve()}clear(){Jt.batch(()=>{z(this,Hi).forEach(i=>{this.notify({type:"removed",mutation:i})}),z(this,Hi).clear(),z(this,Jn).clear()})}getAll(){return Array.from(z(this,Hi))}find(i){const r={exact:!0,...i};return this.getAll().find(o=>Jy(r,o))}findAll(i={}){return this.getAll().filter(r=>Jy(i,r))}notify(i){Jt.batch(()=>{this.listeners.forEach(r=>{r(i)})})}resumePausedMutations(){const i=this.getAll().filter(r=>r.state.isPaused);return Jt.batch(()=>Promise.all(i.map(r=>r.continue().catch(Sn))))}},Hi=new WeakMap,Jn=new WeakMap,Go=new WeakMap,wv);function pc(n){var i;return(i=n.options.scope)==null?void 0:i.id}var fi,Rv,k1=(Rv=class extends Xo{constructor(i={}){super();we(this,fi);this.config=i,de(this,fi,new Map)}build(i,r,o){const c=r.queryKey,f=r.queryHash??yh(c,r);let d=this.get(f);return d||(d=new A1({client:i,queryKey:c,queryHash:f,options:i.defaultQueryOptions(r),state:o,defaultOptions:i.getQueryDefaults(c)}),this.add(d)),d}add(i){z(this,fi).has(i.queryHash)||(z(this,fi).set(i.queryHash,i),this.notify({type:"added",query:i}))}remove(i){const r=z(this,fi).get(i.queryHash);r&&(i.destroy(),r===i&&z(this,fi).delete(i.queryHash),this.notify({type:"removed",query:i}))}clear(){Jt.batch(()=>{this.getAll().forEach(i=>{this.remove(i)})})}get(i){return z(this,fi).get(i)}getAll(){return[...z(this,fi).values()]}find(i){const r={exact:!0,...i};return this.getAll().find(o=>Iy(r,o))}findAll(i={}){const r=this.getAll();return Object.keys(i).length>0?r.filter(o=>Iy(i,o)):r}notify(i){Jt.batch(()=>{this.listeners.forEach(r=>{r(i)})})}onFocus(){Jt.batch(()=>{this.getAll().forEach(i=>{i.onFocus()})})}onOnline(){Jt.batch(()=>{this.getAll().forEach(i=>{i.onOnline()})})}},fi=new WeakMap,Rv),St,Es,Ts,ga,ya,ws,ba,va,Ov,j1=(Ov=class{constructor(n={}){we(this,St);we(this,Es);we(this,Ts);we(this,ga);we(this,ya);we(this,ws);we(this,ba);we(this,va);de(this,St,n.queryCache||new k1),de(this,Es,n.mutationCache||new z1),de(this,Ts,n.defaultOptions||{}),de(this,ga,new Map),de(this,ya,new Map),de(this,ws,0)}mount(){mc(this,ws)._++,z(this,ws)===1&&(de(this,ba,Sh.subscribe(async n=>{n&&(await this.resumePausedMutations(),z(this,St).onFocus())})),de(this,va,Uc.subscribe(async n=>{n&&(await this.resumePausedMutations(),z(this,St).onOnline())})))}unmount(){var n,i;mc(this,ws)._--,z(this,ws)===0&&((n=z(this,ba))==null||n.call(this),de(this,ba,void 0),(i=z(this,va))==null||i.call(this),de(this,va,void 0))}isFetching(n){return z(this,St).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return z(this,Es).findAll({...n,status:"pending"}).length}getQueryData(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=z(this,St).get(i.queryHash))==null?void 0:r.state.data}ensureQueryData(n){const i=this.defaultQueryOptions(n),r=z(this,St).build(this,i),o=r.state.data;return o===void 0?this.fetchQuery(n):(n.revalidateIfStale&&r.isStaleByTime(wt(i.staleTime,r))&&this.prefetchQuery(i),Promise.resolve(o))}getQueriesData(n){return z(this,St).findAll(n).map(({queryKey:i,state:r})=>[i,r.data])}setQueryData(n,i,r){var d;const o=this.defaultQueryOptions({queryKey:n}),c=(d=z(this,St).get(o.queryHash))==null?void 0:d.state.data,f=m1(i,c);if(f!==void 0)return z(this,St).build(this,o).setData(f,{...r,manual:!0})}setQueriesData(n,i,r){return Jt.batch(()=>z(this,St).findAll(n).map(({queryKey:o})=>[o,this.setQueryData(o,i,r)]))}getQueryState(n){var r;const i=this.defaultQueryOptions({queryKey:n});return(r=z(this,St).get(i.queryHash))==null?void 0:r.state}removeQueries(n){const i=z(this,St);Jt.batch(()=>{i.findAll(n).forEach(r=>{i.remove(r)})})}resetQueries(n,i){const r=z(this,St);return Jt.batch(()=>{const o=r.findAll(n),c=new Set(o);return o.forEach(f=>{f.reset()}),this.refetchQueries({type:"active",predicate:f=>c.has(f)},i)})}cancelQueries(n,i={}){const r={revert:!0,...i},o=Jt.batch(()=>z(this,St).findAll(n).map(c=>c.cancel(r)));return Promise.all(o).then(Sn).catch(Sn)}invalidateQueries(n,i={}){return Jt.batch(()=>(z(this,St).findAll(n).forEach(r=>{r.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},i)))}refetchQueries(n,i={}){const r={...i,cancelRefetch:i.cancelRefetch??!0},o=Jt.batch(()=>z(this,St).findAll(n).filter(c=>!c.isDisabled()&&!c.isStatic()).map(c=>{let f=c.fetch(void 0,r);return r.throwOnError||(f=f.catch(Sn)),c.state.fetchStatus==="paused"?Promise.resolve():f}));return Promise.all(o).then(Sn)}async query(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=z(this,St).build(this,i),o=r.isStaleByTime(wt(i.staleTime,r))?await r.fetch(i):r.state.data,c=i.select;return c?c(o):o}fetchQuery(n){const i=this.defaultQueryOptions(n);i.retry===void 0&&(i.retry=!1);const r=z(this,St).build(this,i);return r.isStaleByTime(wt(i.staleTime,r))?r.fetch(i):Promise.resolve(r.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Sn).catch(Sn)}infiniteQuery(n){return n._type="infinite",this.query(n)}fetchInfiniteQuery(n){return n._type="infinite",this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Sn).catch(Sn)}ensureInfiniteQueryData(n){return n._type="infinite",this.ensureQueryData(n)}resumePausedMutations(){return Uc.isOnline()?z(this,Es).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,St)}getMutationCache(){return z(this,Es)}getDefaultOptions(){return z(this,Ts)}setDefaultOptions(n){de(this,Ts,n)}setQueryDefaults(n,i){z(this,ga).set(Do(n),{queryKey:n,defaultOptions:i})}getQueryDefaults(n){const i=[...z(this,ga).values()],r={};return i.forEach(o=>{Sa(n,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(n,i){z(this,ya).set(Do(n),{mutationKey:n,defaultOptions:i})}getMutationDefaults(n){const i=[...z(this,ya).values()],r={};return i.forEach(o=>{Sa(n,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(n){if(n._defaulted)return n;const i={...z(this,Ts).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return i.queryHash||(i.queryHash=yh(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===bh&&(i.enabled=!1),i}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...z(this,Ts).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){z(this,St).clear(),z(this,Es).clear()}},St=new WeakMap,Es=new WeakMap,Ts=new WeakMap,ga=new WeakMap,ya=new WeakMap,ws=new WeakMap,ba=new WeakMap,va=new WeakMap,Ov);const Bv=O.createContext(!1),U1=()=>O.useContext(Bv);Bv.Provider;function L1(){let n=!1;return{clearReset:()=>{n=!1},reset:()=>{n=!0},isReset:()=>n}}const B1=O.createContext(L1()),H1=()=>O.useContext(B1),q1=(n,i,r)=>{const o=r!=null&&r.state.error&&typeof n.throwOnError=="function"?zv(n.throwOnError,[r.state.error,r]):n.throwOnError;(n.suspense||o)&&(i.isReset()||(n.retryOnMount=!1))},Y1=n=>{O.useEffect(()=>{n.clearReset()},[n])},V1=({result:n,errorResetBoundary:i,throwOnError:r,query:o,suspense:c})=>n.isError&&!i.isReset()&&!n.isFetching&&o&&(c&&n.data===void 0||zv(r,[n.error,o])),G1=n=>{if(n.suspense){const r=c=>c==="static"?c:Math.max(c??1e3,1e3),o=n.staleTime;n.staleTime=typeof o=="function"?(...c)=>r(o(...c)):r(o),typeof n.gcTime=="number"&&(n.gcTime=Math.max(n.gcTime,1e3))}},Q1=(n,i)=>(n==null?void 0:n.suspense)&&i.isPending,X1=(n,i,r)=>i.fetchOptimistic(n).catch(()=>{r.clearReset()});function F1(n,i,r){const o=U1(),c=H1(),f=l1(),d=f.defaultQueryOptions(n),m=f.getQueryCache().get(d.queryHash),g=n.subscribed!==!1;d._optimisticResults=o?"isRestoring":g?"optimistic":void 0,G1(d),q1(d,c,m),Y1(c);const[p]=O.useState(()=>new i(f,d)),y=p.getOptimisticResult(d),v=!o&&g;if(O.useSyncExternalStore(O.useCallback(S=>{const E=v?p.subscribe(Jt.batchCalls(S)):Sn;return p.updateResult(),E},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),O.useEffect(()=>{p.setOptions(d)},[d,p]),Q1(d,y))throw X1(d,p,c);if(V1({result:y,errorResetBoundary:c,throwOnError:d.throwOnError,query:m,suspense:d.suspense}))throw y.error;return d.notifyOnChangeProps?y:p.trackResult(y)}function Hv(n,i){return F1(n,_1)}var Sd={exports:{}},To={},xd={exports:{}},Ed={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var WE=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var $E=(n,i,r)=>i in
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var rb;function F1(){return rb||(rb=1,function(n){function i(N,Q){var I=N.length;N.push(Q);e:for(;0<I;){var oe=I-1>>>1,Y=N[oe];if(0<c(Y,Q))N[oe]=Q,N[I]=Y,I=oe;else break e}}function r(N){return N.length===0?null:N[0]}function o(N){if(N.length===0)return null;var Q=N[0],I=N.pop();if(I!==Q){N[0]=I;e:for(var oe=0,Y=N.length,T=Y>>>1;oe<T;){var H=2*(oe+1)-1,te=N[H],ne=H+1,re=N[ne];if(0>c(te,I))ne<Y&&0>c(re,te)?(N[oe]=re,N[ne]=I,oe=ne):(N[oe]=te,N[H]=I,oe=H);else if(ne<Y&&0>c(re,I))N[oe]=re,N[ne]=I,oe=ne;else break e}}return Q}function c(N,Q){var I=N.sortIndex-Q.sortIndex;return I!==0?I:N.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],p=[],y=1,v=null,S=3,E=!1,x=!1,w=!1,_=!1,D=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function k(N){for(var Q=r(p);Q!==null;){if(Q.callback===null)o(p);else if(Q.startTime<=N)o(p),Q.sortIndex=Q.expirationTime,i(g,Q);else break;Q=r(p)}}function q(N){if(w=!1,k(N),!x)if(r(g)!==null)x=!0,F||(F=!0,ae());else{var Q=r(p);Q!==null&&ie(q,Q.startTime-N)}}var F=!1,B=-1,U=5,K=-1;function se(){return _?!0:!(n.unstable_now()-K<U)}function pe(){if(_=!1,F){var N=n.unstable_now();K=N;var Q=!0;try{e:{x=!1,w&&(w=!1,C(B),B=-1),E=!0;var I=S;try{t:{for(k(N),v=r(g);v!==null&&!(v.expirationTime>N&&se());){var oe=v.callback;if(typeof oe=="function"){v.callback=null,S=v.priorityLevel;var Y=oe(v.expirationTime<=N);if(N=n.unstable_now(),typeof Y=="function"){v.callback=Y,k(N),Q=!0;break t}v===r(g)&&o(g),k(N)}else o(g);v=r(g)}if(v!==null)Q=!0;else{var T=r(p);T!==null&&ie(q,T.startTime-N),Q=!1}}break e}finally{v=null,S=I,E=!1}Q=void 0}}finally{Q?ae():F=!1}}}var ae;if(typeof j=="function")ae=function(){j(pe)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,le=W.port2;W.port1.onmessage=pe,ae=function(){le.postMessage(null)}}else ae=function(){D(pe,0)};function ie(N,Q){B=D(function(){N(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(N){N.callback=null},n.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<N?Math.floor(1e3/N):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(N){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var I=S;S=Q;try{return N()}finally{S=I}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(N,Q){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var I=S;S=N;try{return Q()}finally{S=I}},n.unstable_scheduleCallback=function(N,Q,I){var oe=n.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?oe+I:oe):I=oe,N){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=I+Y,N={id:y++,callback:Q,priorityLevel:N,startTime:I,expirationTime:Y,sortIndex:-1},I>oe?(N.sortIndex=I,i(p,N),r(g)===null&&N===r(p)&&(w?(C(B),B=-1):w=!0,ie(q,I-oe))):(N.sortIndex=Y,i(g,N),x||E||(x=!0,F||(F=!0,ae()))),N},n.unstable_shouldYield=se,n.unstable_wrapCallback=function(N){var Q=S;return function(){var I=S;S=Q;try{return N.apply(this,arguments)}finally{S=I}}}}(Ed)),Ed}var ab;function K1(){return ab||(ab=1,xd.exports=F1()),xd.exports}var Td={exports:{}},tn={};/**
25
+ */var rb;function K1(){return rb||(rb=1,function(n){function i(N,Q){var I=N.length;N.push(Q);e:for(;0<I;){var oe=I-1>>>1,Y=N[oe];if(0<c(Y,Q))N[oe]=Q,N[I]=Y,I=oe;else break e}}function r(N){return N.length===0?null:N[0]}function o(N){if(N.length===0)return null;var Q=N[0],I=N.pop();if(I!==Q){N[0]=I;e:for(var oe=0,Y=N.length,T=Y>>>1;oe<T;){var H=2*(oe+1)-1,te=N[H],ne=H+1,re=N[ne];if(0>c(te,I))ne<Y&&0>c(re,te)?(N[oe]=re,N[ne]=I,oe=ne):(N[oe]=te,N[H]=I,oe=H);else if(ne<Y&&0>c(re,I))N[oe]=re,N[ne]=I,oe=ne;else break e}}return Q}function c(N,Q){var I=N.sortIndex-Q.sortIndex;return I!==0?I:N.id-Q.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;n.unstable_now=function(){return f.now()}}else{var d=Date,m=d.now();n.unstable_now=function(){return d.now()-m}}var g=[],p=[],y=1,v=null,S=3,E=!1,x=!1,w=!1,_=!1,D=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function k(N){for(var Q=r(p);Q!==null;){if(Q.callback===null)o(p);else if(Q.startTime<=N)o(p),Q.sortIndex=Q.expirationTime,i(g,Q);else break;Q=r(p)}}function q(N){if(w=!1,k(N),!x)if(r(g)!==null)x=!0,F||(F=!0,ae());else{var Q=r(p);Q!==null&&ie(q,Q.startTime-N)}}var F=!1,B=-1,U=5,K=-1;function se(){return _?!0:!(n.unstable_now()-K<U)}function pe(){if(_=!1,F){var N=n.unstable_now();K=N;var Q=!0;try{e:{x=!1,w&&(w=!1,C(B),B=-1),E=!0;var I=S;try{t:{for(k(N),v=r(g);v!==null&&!(v.expirationTime>N&&se());){var oe=v.callback;if(typeof oe=="function"){v.callback=null,S=v.priorityLevel;var Y=oe(v.expirationTime<=N);if(N=n.unstable_now(),typeof Y=="function"){v.callback=Y,k(N),Q=!0;break t}v===r(g)&&o(g),k(N)}else o(g);v=r(g)}if(v!==null)Q=!0;else{var T=r(p);T!==null&&ie(q,T.startTime-N),Q=!1}}break e}finally{v=null,S=I,E=!1}Q=void 0}}finally{Q?ae():F=!1}}}var ae;if(typeof j=="function")ae=function(){j(pe)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,le=W.port2;W.port1.onmessage=pe,ae=function(){le.postMessage(null)}}else ae=function(){D(pe,0)};function ie(N,Q){B=D(function(){N(n.unstable_now())},Q)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(N){N.callback=null},n.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<N?Math.floor(1e3/N):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(N){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var I=S;S=Q;try{return N()}finally{S=I}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(N,Q){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var I=S;S=N;try{return Q()}finally{S=I}},n.unstable_scheduleCallback=function(N,Q,I){var oe=n.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?oe+I:oe):I=oe,N){case 1:var Y=-1;break;case 2:Y=250;break;case 5:Y=1073741823;break;case 4:Y=1e4;break;default:Y=5e3}return Y=I+Y,N={id:y++,callback:Q,priorityLevel:N,startTime:I,expirationTime:Y,sortIndex:-1},I>oe?(N.sortIndex=I,i(p,N),r(g)===null&&N===r(p)&&(w?(C(B),B=-1):w=!0,ie(q,I-oe))):(N.sortIndex=Y,i(g,N),x||E||(x=!0,F||(F=!0,ae()))),N},n.unstable_shouldYield=se,n.unstable_wrapCallback=function(N){var Q=S;return function(){var I=S;S=Q;try{return N.apply(this,arguments)}finally{S=I}}}}(Ed)),Ed}var ab;function Z1(){return ab||(ab=1,xd.exports=K1()),xd.exports}var Td={exports:{}},tn={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var WE=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var $E=(n,i,r)=>i in
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var ob;function Z1(){if(ob)return tn;ob=1;var n=Qo();function i(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:g,containerInfo:p,implementation:y}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,tn.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return f(g,p,null,y)},tn.flushSync=function(g){var p=d.T,y=o.p;try{if(d.T=null,o.p=2,g)return g()}finally{d.T=p,o.p=y,o.d.f()}},tn.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(g,p))},tn.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},tn.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:E}):y==="script"&&o.d.X(g,{crossOrigin:v,integrity:S,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},tn.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=m(p.as,p.crossOrigin);o.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(g)},tn.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin);o.d.L(g,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},tn.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=m(p.as,p.crossOrigin);o.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(g)},tn.requestFormReset=function(g){o.d.r(g)},tn.unstable_batchedUpdates=function(g,p){return g(p)},tn.useFormState=function(g,p,y){return d.H.useFormState(g,p,y)},tn.useFormStatus=function(){return d.H.useHostTransitionStatus()},tn.version="19.2.7",tn}var lb;function qv(){if(lb)return Td.exports;lb=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Td.exports=Z1(),Td.exports}/**
33
+ */var ob;function P1(){if(ob)return tn;ob=1;var n=Qo();function i(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)p+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var o={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(g,p,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:g,containerInfo:p,implementation:y}}var d=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return tn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,tn.createPortal=function(g,p){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return f(g,p,null,y)},tn.flushSync=function(g){var p=d.T,y=o.p;try{if(d.T=null,o.p=2,g)return g()}finally{d.T=p,o.p=y,o.d.f()}},tn.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(g,p))},tn.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},tn.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,E=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;y==="style"?o.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:E}):y==="script"&&o.d.X(g,{crossOrigin:v,integrity:S,fetchPriority:E,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},tn.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var y=m(p.as,p.crossOrigin);o.d.M(g,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(g)},tn.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var y=p.as,v=m(y,p.crossOrigin);o.d.L(g,y,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},tn.preloadModule=function(g,p){if(typeof g=="string")if(p){var y=m(p.as,p.crossOrigin);o.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(g)},tn.requestFormReset=function(g){o.d.r(g)},tn.unstable_batchedUpdates=function(g,p){return g(p)},tn.useFormState=function(g,p,y){return d.H.useFormState(g,p,y)},tn.useFormStatus=function(){return d.H.useHostTransitionStatus()},tn.version="19.2.7",tn}var lb;function qv(){if(lb)return Td.exports;lb=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Td.exports=P1(),Td.exports}/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,65 +38,65 @@ var WE=Object.defineProperty;var Xy=n=>{throw TypeError(n)};var $E=(n,i,r)=>i in
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var cb;function P1(){if(cb)return To;cb=1;var n=K1(),i=Qo(),r=qv();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,a=t;;){var l=s.return;if(l===null)break;var u=l.alternate;if(u===null){if(a=l.return,a!==null){s=a;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===s)return g(l),e;if(u===a)return g(l),t;u=u.sibling}throw Error(o(188))}if(s.return!==a.return)s=l,a=u;else{for(var h=!1,b=l.child;b;){if(b===s){h=!0,s=l,a=u;break}if(b===a){h=!0,a=l,s=u;break}b=b.sibling}if(!h){for(b=u.child;b;){if(b===s){h=!0,s=u,a=l;break}if(b===a){h=!0,a=u,s=l;break}b=b.sibling}if(!h)throw Error(o(189))}}if(s.alternate!==a)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case D:return"Profiler";case _:return"StrictMode";case q:return"Suspense";case F:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case j:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ie=Array.isArray,N=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},oe=[],Y=-1;function T(e){return{current:e}}function H(e){0>Y||(e.current=oe[Y],oe[Y]=null,Y--)}function te(e,t){Y++,oe[Y]=e.current,e.current=t}var ne=T(null),re=T(null),ee=T(null),ge=T(null);function ce(e,t){switch(te(ee,t),te(re,e),te(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?my(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=my(t),e=py(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ne),te(ne,e)}function fe(){H(ne),H(re),H(ee)}function Ze(e){e.memoizedState!==null&&te(ge,e);var t=ne.current,s=py(t,e.type);t!==s&&(te(re,e),te(ne,s))}function nt(e){re.current===e&&(H(ne),H(re)),ge.current===e&&(H(ge),bo._currentValue=I)}var ve,ze;function Oe(e){if(ve===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||"",ze=-1<s.stack.indexOf(`
41
+ */var cb;function I1(){if(cb)return To;cb=1;var n=Z1(),i=Qo(),r=qv();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)t+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,s=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(s=t.return),e=t.return;while(e)}return t.tag===3?s:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(f(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(o(188));return t!==e?null:e}for(var s=e,a=t;;){var l=s.return;if(l===null)break;var u=l.alternate;if(u===null){if(a=l.return,a!==null){s=a;continue}break}if(l.child===u.child){for(u=l.child;u;){if(u===s)return g(l),e;if(u===a)return g(l),t;u=u.sibling}throw Error(o(188))}if(s.return!==a.return)s=l,a=u;else{for(var h=!1,b=l.child;b;){if(b===s){h=!0,s=l,a=u;break}if(b===a){h=!0,a=l,s=u;break}b=b.sibling}if(!h){for(b=u.child;b;){if(b===s){h=!0,s=u,a=l;break}if(b===a){h=!0,a=u,s=l;break}b=b.sibling}if(!h)throw Error(o(189))}}if(s.alternate!==a)throw Error(o(190))}if(s.tag!==3)throw Error(o(188));return s.stateNode.current===s?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),U=Symbol.for("react.lazy"),K=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),pe=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=pe&&e[pe]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case D:return"Profiler";case _:return"StrictMode";case q:return"Suspense";case F:return"SuspenseList";case K:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case x:return"Portal";case j:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return t=e.displayName||null,t!==null?t:le(e.type)||"Memo";case U:t=e._payload,e=e._init;try{return le(e(t))}catch{}}return null}var ie=Array.isArray,N=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I={pending:!1,data:null,method:null,action:null},oe=[],Y=-1;function T(e){return{current:e}}function H(e){0>Y||(e.current=oe[Y],oe[Y]=null,Y--)}function te(e,t){Y++,oe[Y]=e.current,e.current=t}var ne=T(null),re=T(null),ee=T(null),ge=T(null);function ce(e,t){switch(te(ee,t),te(re,e),te(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?my(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=my(t),e=py(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ne),te(ne,e)}function fe(){H(ne),H(re),H(ee)}function Ze(e){e.memoizedState!==null&&te(ge,e);var t=ne.current,s=py(t,e.type);t!==s&&(te(re,e),te(ne,s))}function nt(e){re.current===e&&(H(ne),H(re)),ge.current===e&&(H(ge),bo._currentValue=I)}var ve,ze;function Oe(e){if(ve===void 0)try{throw Error()}catch(s){var t=s.stack.trim().match(/\n( *(at )?)/);ve=t&&t[1]||"",ze=-1<s.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
43
43
  `+ve+e+ze}var ft=!1;function vt(e,t){if(!e||ft)return"";ft=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(Z){var X=Z}Reflect.construct(e,[],$)}else{try{$.call()}catch(Z){X=Z}e.call($.prototype)}}else{try{throw Error()}catch(Z){X=Z}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(Z){if(Z&&X&&typeof Z.stack=="string")return[Z.stack,X.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),h=u[0],b=u[1];if(h&&b){var R=h.split(`
44
44
  `),G=b.split(`
45
45
  `);for(l=a=0;a<R.length&&!R[a].includes("DetermineComponentFrameRoot");)a++;for(;l<G.length&&!G[l].includes("DetermineComponentFrameRoot");)l++;if(a===R.length||l===G.length)for(a=R.length-1,l=G.length-1;1<=a&&0<=l&&R[a]!==G[l];)l--;for(;1<=a&&0<=l;a--,l--)if(R[a]!==G[l]){if(a!==1||l!==1)do if(a--,l--,0>l||R[a]!==G[l]){var P=`
46
46
  `+R[a].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),P}while(1<=a&&0<=l);break}}}finally{ft=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Oe(s):""}function Re(e,t){switch(e.tag){case 26:case 27:case 5:return Oe(e.type);case 16:return Oe("Lazy");case 13:return e.child!==t&&t!==null?Oe("Suspense Fallback"):Oe("Suspense");case 19:return Oe("SuspenseList");case 0:case 15:return vt(e.type,!1);case 11:return vt(e.type.render,!1);case 1:return vt(e.type,!0);case 31:return Oe("Activity");default:return""}}function ke(e){try{var t="",s=null;do t+=Re(e,s),s=e,e=e.return;while(e);return t}catch(a){return`
47
47
  Error generating stack: `+a.message+`
48
- `+a.stack}}var Ee=Object.prototype.hasOwnProperty,mt=n.unstable_scheduleCallback,dt=n.unstable_cancelCallback,je=n.unstable_shouldYield,xt=n.unstable_requestPaint,ue=n.unstable_now,xe=n.unstable_getCurrentPriorityLevel,ht=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,pt=n.unstable_NormalPriority,jt=n.unstable_LowPriority,sn=n.unstable_IdlePriority,rn=n.log,ti=n.unstable_setDisableYieldValue,fn=null,qt=null;function Tn(e){if(typeof rn=="function"&&ti(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(fn,e)}catch{}}var Yt=Math.clz32?Math.clz32:gr,mr=Math.log,pr=Math.LN2;function gr(e){return e>>>=0,e===0?32:31-(mr(e)/pr|0)|0}var pi=256,Fe=262144,Ot=4194304;function Vt(e){var t=e&42;if(t!==0)return t;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 Ft(e,t,s){var a=e.pendingLanes;if(a===0)return 0;var l=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=a&134217727;return b!==0?(a=b&~u,a!==0?l=Vt(a):(h&=b,h!==0?l=Vt(h):s||(s=b&~e,s!==0&&(l=Vt(s))))):(b=a&~u,b!==0?l=Vt(b):h!==0?l=Vt(h):s||(s=a&~e,s!==0&&(l=Vt(s)))),l===0?0:t!==0&&t!==l&&(t&u)===0&&(u=l&-l,s=t&-t,u>=s||u===32&&(s&4194048)!==0)?t:l}function an(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 ni(){var e=Ot;return Ot<<=1,(Ot&62914560)===0&&(Ot=4194304),e}function ii(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function dn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Na(e,t,s,a,l,u){var h=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,G=e.hiddenUpdates;for(s=h&~s;0<s;){var P=31-Yt(s),$=1<<P;b[P]=0,R[P]=-1;var X=G[P];if(X!==null)for(G[P]=null,P=0;P<X.length;P++){var Z=X[P];Z!==null&&(Z.lane&=-536870913)}s&=~$}a!==0&&yr(e,a,0),u!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function yr(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Yt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|s&261930}function br(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var a=31-Yt(s),l=1<<a;l&t|e[a]&t&&(e[a]|=t),s&=~l}}function Jo(e,t){var s=t&-t;return s=(s&42)!==0?1:zs(s),(s&(e.suspendedLanes|t))!==0?0:s}function zs(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 vr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wo(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:By(e.type))}function $o(e,t){var s=Q.p;try{return Q.p=e,t()}finally{Q.p=s}}var hn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+hn,en="__reactProps$"+hn,Fi="__reactContainer$"+hn,Sr="__reactEvents$"+hn,el="__reactListeners$"+hn,tl="__reactHandles$"+hn,tm="__reactResources$"+hn,Da="__reactMarker$"+hn;function ou(e){delete e[Ut],delete e[en],delete e[Sr],delete e[el],delete e[tl]}function xr(e){var t=e[Ut];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Fi]||s[Ut]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Ey(e);e!==null;){if(s=e[Ut])return s;e=Ey(e)}return t}e=s,s=e.parentNode}return null}function Er(e){if(e=e[Ut]||e[Fi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function za(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Tr(e){var t=e[tm];return t||(t=e[tm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Gt(e){e[Da]=!0}var nm=new Set,im={};function ks(e,t){wr(e,t),wr(e+"Capture",t)}function wr(e,t){for(im[e]=t,e=0;e<t.length;e++)nm.add(t[e])}var GS=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]*$"),sm={},rm={};function QS(e){return Ee.call(rm,e)?!0:Ee.call(sm,e)?!1:GS.test(e)?rm[e]=!0:(sm[e]=!0,!1)}function nl(e,t,s){if(QS(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function il(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function gi(e,t,s,a){if(a===null)e.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+a)}}function kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function am(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function XS(e,t,s){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(h){s=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(h){s=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lu(e){if(!e._valueTracker){var t=am(e)?"checked":"value";e._valueTracker=XS(e,t,""+e[t])}}function om(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),a="";return e&&(a=am(e)?e.checked?"true":"false":e.value),e=a,e!==s?(t.setValue(e),!0):!1}function sl(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 FS=/[\n"\\]/g;function jn(e){return e.replace(FS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function cu(e,t,s,a,l,u,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kn(t)):e.value!==""+kn(t)&&(e.value=""+kn(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?uu(e,h,kn(t)):s!=null?uu(e,h,kn(s)):a!=null&&e.removeAttribute("value"),l==null&&u!=null&&(e.defaultChecked=!!u),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+kn(b):e.removeAttribute("name")}function lm(e,t,s,a,l,u,h,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||s!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){lu(e);return}s=s!=null?""+kn(s):"",t=t!=null?""+kn(t):s,b||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=b?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),lu(e)}function uu(e,t,s){t==="number"&&sl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Rr(e,t,s,a){if(e=e.options,t){t={};for(var l=0;l<s.length;l++)t["$"+s[l]]=!0;for(s=0;s<e.length;s++)l=t.hasOwnProperty("$"+e[s].value),e[s].selected!==l&&(e[s].selected=l),l&&a&&(e[s].defaultSelected=!0)}else{for(s=""+kn(s),t=null,l=0;l<e.length;l++){if(e[l].value===s){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function cm(e,t,s){if(t!=null&&(t=""+kn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+kn(s):""}function um(e,t,s,a){if(t==null){if(a!=null){if(s!=null)throw Error(o(92));if(ie(a)){if(1<a.length)throw Error(o(93));a=a[0]}s=a}s==null&&(s=""),t=s}s=kn(t),e.defaultValue=s,a=e.textContent,a===s&&a!==""&&a!==null&&(e.value=a),lu(e)}function Or(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var KS=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 fm(e,t,s){var a=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,s):typeof s!="number"||s===0||KS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function dm(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var a in s)!s.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&s[l]!==a&&fm(e,l,a)}else for(var u in t)t.hasOwnProperty(u)&&fm(e,u,t[u])}function fu(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 ZS=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"]]),PS=/^[\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 rl(e){return PS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yi(){}var du=null;function hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cr=null,Ar=null;function hm(e){var t=Er(e);if(t&&(e=t.stateNode)){var s=e[en]||null;e:switch(e=t.stateNode,t.type){case"input":if(cu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+jn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var a=s[t];if(a!==e&&a.form===e.form){var l=a[en]||null;if(!l)throw Error(o(90));cu(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<s.length;t++)a=s[t],a.form===e.form&&om(a)}break e;case"textarea":cm(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Rr(e,!!s.multiple,t,!1)}}}var mu=!1;function mm(e,t,s){if(mu)return e(t,s);mu=!0;try{var a=e(t);return a}finally{if(mu=!1,(Cr!==null||Ar!==null)&&(Fl(),Cr&&(t=Cr,e=Ar,Ar=Cr=null,hm(t),e)))for(t=0;t<e.length;t++)hm(e[t])}}function ka(e,t){var s=e.stateNode;if(s===null)return null;var a=s[en]||null;if(a===null)return null;s=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pu=!1;if(bi)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){pu=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{pu=!1}var Ki=null,gu=null,al=null;function pm(){if(al)return al;var e,t=gu,s=t.length,a,l="value"in Ki?Ki.value:Ki.textContent,u=l.length;for(e=0;e<s&&t[e]===l[e];e++);var h=s-e;for(a=1;a<=h&&t[s-a]===l[u-a];a++);return al=l.slice(e,1<a?1-a:void 0)}function ol(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ll(){return!0}function gm(){return!1}function mn(e){function t(s,a,l,u,h){this._reactName=s,this._targetInst=l,this.type=a,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(s=e[b],this[b]=s?s(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ll:gm,this.isPropagationStopped=gm,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),t}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=mn(js),Ua=v({},js,{view:0,detail:0}),IS=mn(Ua),yu,bu,La,ul=v({},Ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,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!==La&&(La&&e.type==="mousemove"?(yu=e.screenX-La.screenX,bu=e.screenY-La.screenY):bu=yu=0,La=e),yu)},movementY:function(e){return"movementY"in e?e.movementY:bu}}),ym=mn(ul),JS=v({},ul,{dataTransfer:0}),WS=mn(JS),$S=v({},Ua,{relatedTarget:0}),vu=mn($S),ex=v({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),tx=mn(ex),nx=v({},js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ix=mn(nx),sx=v({},js,{data:0}),bm=mn(sx),rx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ax={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"},ox={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ox[e])?!!t[e]:!1}function Su(){return lx}var cx=v({},Ua,{key:function(e){if(e.key){var t=rx[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ax[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(e){return e.type==="keypress"?ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ux=mn(cx),fx=v({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vm=mn(fx),dx=v({},Ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),hx=mn(dx),mx=v({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),px=mn(mx),gx=v({},ul,{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}),yx=mn(gx),bx=v({},js,{newState:0,oldState:0}),vx=mn(bx),Sx=[9,13,27,32],xu=bi&&"CompositionEvent"in window,Ba=null;bi&&"documentMode"in document&&(Ba=document.documentMode);var xx=bi&&"TextEvent"in window&&!Ba,Sm=bi&&(!xu||Ba&&8<Ba&&11>=Ba),xm=" ",Em=!1;function Tm(e,t){switch(e){case"keyup":return Sx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _r=!1;function Ex(e,t){switch(e){case"compositionend":return wm(t);case"keypress":return t.which!==32?null:(Em=!0,xm);case"textInput":return e=t.data,e===xm&&Em?null:e;default:return null}}function Tx(e,t){if(_r)return e==="compositionend"||!xu&&Tm(e,t)?(e=pm(),al=gu=Ki=null,_r=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sm&&t.locale!=="ko"?null:t.data;default:return null}}var wx={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 Rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wx[e.type]:t==="textarea"}function Om(e,t,s,a){Cr?Ar?Ar.push(a):Ar=[a]:Cr=a,t=$l(t,"onChange"),0<t.length&&(s=new cl("onChange","change",null,s,a),e.push({event:s,listeners:t}))}var Ha=null,qa=null;function Rx(e){ly(e,0)}function fl(e){var t=za(e);if(om(t))return e}function Cm(e,t){if(e==="change")return t}var Am=!1;if(bi){var Eu;if(bi){var Tu="oninput"in document;if(!Tu){var _m=document.createElement("div");_m.setAttribute("oninput","return;"),Tu=typeof _m.oninput=="function"}Eu=Tu}else Eu=!1;Am=Eu&&(!document.documentMode||9<document.documentMode)}function Mm(){Ha&&(Ha.detachEvent("onpropertychange",Nm),qa=Ha=null)}function Nm(e){if(e.propertyName==="value"&&fl(qa)){var t=[];Om(t,qa,e,hu(e)),mm(Rx,t)}}function Ox(e,t,s){e==="focusin"?(Mm(),Ha=t,qa=s,Ha.attachEvent("onpropertychange",Nm)):e==="focusout"&&Mm()}function Cx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(qa)}function Ax(e,t){if(e==="click")return fl(t)}function _x(e,t){if(e==="input"||e==="change")return fl(t)}function Mx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:Mx;function Ya(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var l=s[a];if(!Ee.call(t,l)||!Rn(e[l],t[l]))return!1}return!0}function Dm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zm(e,t){var s=Dm(e);e=0;for(var a;s;){if(s.nodeType===3){if(a=e+s.textContent.length,e<=t&&a>=t)return{node:s,offset:t-e};e=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Dm(s)}}function km(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?km(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sl(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=sl(e.document)}return t}function wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Nx=bi&&"documentMode"in document&&11>=document.documentMode,Mr=null,Ru=null,Va=null,Ou=!1;function Um(e,t,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ou||Mr==null||Mr!==sl(a)||(a=Mr,"selectionStart"in a&&wu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Va&&Ya(Va,a)||(Va=a,a=$l(Ru,"onSelect"),0<a.length&&(t=new cl("onSelect","select",null,t,s),e.push({event:t,listeners:a}),t.target=Mr)))}function Us(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Nr={animationend:Us("Animation","AnimationEnd"),animationiteration:Us("Animation","AnimationIteration"),animationstart:Us("Animation","AnimationStart"),transitionrun:Us("Transition","TransitionRun"),transitionstart:Us("Transition","TransitionStart"),transitioncancel:Us("Transition","TransitionCancel"),transitionend:Us("Transition","TransitionEnd")},Cu={},Lm={};bi&&(Lm=document.createElement("div").style,"AnimationEvent"in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),"TransitionEvent"in window||delete Nr.transitionend.transition);function Ls(e){if(Cu[e])return Cu[e];if(!Nr[e])return e;var t=Nr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Lm)return Cu[e]=t[s];return e}var Bm=Ls("animationend"),Hm=Ls("animationiteration"),qm=Ls("animationstart"),Dx=Ls("transitionrun"),zx=Ls("transitionstart"),kx=Ls("transitioncancel"),Ym=Ls("transitionend"),Vm=new Map,Au="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(" ");Au.push("scrollEnd");function Kn(e,t){Vm.set(e,t),ks(t,[e])}var dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Un=[],Dr=0,_u=0;function hl(){for(var e=Dr,t=_u=Dr=0;t<e;){var s=Un[t];Un[t++]=null;var a=Un[t];Un[t++]=null;var l=Un[t];Un[t++]=null;var u=Un[t];if(Un[t++]=null,a!==null&&l!==null){var h=a.pending;h===null?l.next=l:(l.next=h.next,h.next=l),a.pending=l}u!==0&&Gm(s,l,u)}}function ml(e,t,s,a){Un[Dr++]=e,Un[Dr++]=t,Un[Dr++]=s,Un[Dr++]=a,_u|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Mu(e,t,s,a){return ml(e,t,s,a),pl(e)}function Bs(e,t){return ml(e,null,null,t),pl(e)}function Gm(e,t,s){e.lanes|=s;var a=e.alternate;a!==null&&(a.lanes|=s);for(var l=!1,u=e.return;u!==null;)u.childLanes|=s,a=u.alternate,a!==null&&(a.childLanes|=s),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(l=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,l&&t!==null&&(l=31-Yt(s),e=u.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=s|536870912),u):null}function pl(e){if(50<uo)throw uo=0,qf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zr={};function jx(e,t,s,a){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,s,a){return new jx(e,t,s,a)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vi(e,t){var s=e.alternate;return s===null?(s=On(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Qm(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gl(e,t,s,a,l,u){var h=0;if(a=e,typeof e=="function")Nu(e)&&(h=1);else if(typeof e=="string")h=qE(e,s,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=On(31,s,t,l),e.elementType=K,e.lanes=u,e;case w:return Hs(s.children,l,u,t);case _:h=8,l|=24;break;case D:return e=On(12,s,t,l|2),e.elementType=D,e.lanes=u,e;case q:return e=On(13,s,t,l),e.elementType=q,e.lanes=u,e;case F:return e=On(19,s,t,l),e.elementType=F,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:h=10;break e;case C:h=9;break e;case k:h=11;break e;case B:h=14;break e;case U:h=16,a=null;break e}h=29,s=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=On(h,s,t,l),t.elementType=e,t.type=a,t.lanes=u,t}function Hs(e,t,s,a){return e=On(7,e,a,t),e.lanes=s,e}function Du(e,t,s){return e=On(6,e,null,t),e.lanes=s,e}function Xm(e){var t=On(18,null,null,0);return t.stateNode=e,t}function zu(e,t,s){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fm=new WeakMap;function Ln(e,t){if(typeof e=="object"&&e!==null){var s=Fm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ke(t)},Fm.set(e,t),t)}return{value:e,source:t,stack:ke(t)}}var kr=[],jr=0,yl=null,Ga=0,Bn=[],Hn=0,Zi=null,si=1,ri="";function Si(e,t){kr[jr++]=Ga,kr[jr++]=yl,yl=e,Ga=t}function Km(e,t,s){Bn[Hn++]=si,Bn[Hn++]=ri,Bn[Hn++]=Zi,Zi=e;var a=si;e=ri;var l=32-Yt(a)-1;a&=~(1<<l),s+=1;var u=32-Yt(t)+l;if(30<u){var h=l-l%5;u=(a&(1<<h)-1).toString(32),a>>=h,l-=h,si=1<<32-Yt(t)+l|s<<l|a,ri=u+e}else si=1<<u|s<<l|a,ri=e}function ku(e){e.return!==null&&(Si(e,1),Km(e,1,0))}function ju(e){for(;e===yl;)yl=kr[--jr],kr[jr]=null,Ga=kr[--jr],kr[jr]=null;for(;e===Zi;)Zi=Bn[--Hn],Bn[Hn]=null,ri=Bn[--Hn],Bn[Hn]=null,si=Bn[--Hn],Bn[Hn]=null}function Zm(e,t){Bn[Hn++]=si,Bn[Hn++]=ri,Bn[Hn++]=Zi,si=t.id,ri=t.overflow,Zi=e}var Kt=null,gt=null,Ge=!1,Pi=null,qn=!1,Uu=Error(o(519));function Ii(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qa(Ln(t,e)),Uu}function Pm(e){var t=e.stateNode,s=e.type,a=e.memoizedProps;switch(t[Ut]=e,t[en]=a,s){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(s=0;s<ho.length;s++)Le(ho[s],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),lm(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),um(t,a.value,a.defaultValue,a.children)}s=a.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||a.suppressHydrationWarning===!0||dy(t.textContent,s)?(a.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),a.onScroll!=null&&Le("scroll",t),a.onScrollEnd!=null&&Le("scrollend",t),a.onClick!=null&&(t.onclick=yi),t=!0):t=!1,t||Ii(e,!0)}function Im(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:qn=!1;return;case 27:case 3:qn=!0;return;default:Kt=Kt.return}}function Ur(e){if(e!==Kt)return!1;if(!Ge)return Im(e),Ge=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||td(e.type,e.memoizedProps)),s=!s),s&&gt&&Ii(e),Im(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));gt=xy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));gt=xy(e)}else t===27?(t=gt,us(e.type)?(e=ad,ad=null,gt=e):gt=t):gt=Kt?Vn(e.stateNode.nextSibling):null;return!0}function qs(){gt=Kt=null,Ge=!1}function Lu(){var e=Pi;return e!==null&&(bn===null?bn=e:bn.push.apply(bn,e),Pi=null),e}function Qa(e){Pi===null?Pi=[e]:Pi.push(e)}var Bu=T(null),Ys=null,xi=null;function Ji(e,t,s){te(Bu,t._currentValue),t._currentValue=s}function Ei(e){e._currentValue=Bu.current,H(Bu)}function Hu(e,t,s){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===s)break;e=e.return}}function qu(e,t,s,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var u=l.dependencies;if(u!==null){var h=l.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=l;for(var R=0;R<t.length;R++)if(b.context===t[R]){u.lanes|=s,b=u.alternate,b!==null&&(b.lanes|=s),Hu(u.return,s,e),a||(h=null);break e}u=b.next}}else if(l.tag===18){if(h=l.return,h===null)throw Error(o(341));h.lanes|=s,u=h.alternate,u!==null&&(u.lanes|=s),Hu(h,s,e),h=null}else h=l.child;if(h!==null)h.return=l;else for(h=l;h!==null;){if(h===e){h=null;break}if(l=h.sibling,l!==null){l.return=h.return,h=l;break}h=h.return}l=h}}function Lr(e,t,s,a){e=null;for(var l=t,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var h=l.alternate;if(h===null)throw Error(o(387));if(h=h.memoizedProps,h!==null){var b=l.type;Rn(l.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(l===ge.current){if(h=l.alternate,h===null)throw Error(o(387));h.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(bo):e=[bo])}l=l.return}e!==null&&qu(t,e,s,a),t.flags|=262144}function bl(e){for(e=e.firstContext;e!==null;){if(!Rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vs(e){Ys=e,xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zt(e){return Jm(Ys,e)}function vl(e,t){return Ys===null&&Vs(e),Jm(e,t)}function Jm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},xi===null){if(e===null)throw Error(o(308));xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xi=xi.next=t;return s}var Ux=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},Lx=n.unstable_scheduleCallback,Bx=n.unstable_NormalPriority,_t={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yu(){return{controller:new Ux,data:new Map,refCount:0}}function Xa(e){e.refCount--,e.refCount===0&&Lx(Bx,function(){e.controller.abort()})}var Fa=null,Vu=0,Br=0,Hr=null;function Hx(e,t){if(Fa===null){var s=Fa=[];Vu=0,Br=Ff(),Hr={status:"pending",value:void 0,then:function(a){s.push(a)}}}return Vu++,t.then(Wm,Wm),t}function Wm(){if(--Vu===0&&Fa!==null){Hr!==null&&(Hr.status="fulfilled");var e=Fa;Fa=null,Br=0,Hr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qx(e,t){var s=[],a={status:"pending",value:null,reason:null,then:function(l){s.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<s.length;l++)(0,s[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<s.length;l++)(0,s[l])(void 0)}),a}var $m=N.S;N.S=function(e,t){Ug=ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Hx(e,t),$m!==null&&$m(e,t)};var Gs=T(null);function Gu(){var e=Gs.current;return e!==null?e:ct.pooledCache}function Sl(e,t){t===null?te(Gs,Gs.current):te(Gs,t.pool)}function ep(){var e=Gu();return e===null?null:{parent:_t._currentValue,pool:e}}var qr=Error(o(460)),Qu=Error(o(474)),xl=Error(o(542)),El={then:function(){}};function tp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function np(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(yi,yi),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sp(e),e;default:if(typeof t.status=="string")t.then(yi,yi);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sp(e),e}throw Xs=t,qr}}function Qs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Xs=s,qr):s}}var Xs=null;function ip(){if(Xs===null)throw Error(o(459));var e=Xs;return Xs=null,e}function sp(e){if(e===qr||e===xl)throw Error(o(483))}var Yr=null,Ka=0;function Tl(e){var t=Ka;return Ka+=1,Yr===null&&(Yr=[]),np(Yr,e,t)}function Za(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wl(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rp(e){function t(L,M){if(e){var V=L.deletions;V===null?(L.deletions=[M],L.flags|=16):V.push(M)}}function s(L,M){if(!e)return null;for(;M!==null;)t(L,M),M=M.sibling;return null}function a(L){for(var M=new Map;L!==null;)L.key!==null?M.set(L.key,L):M.set(L.index,L),L=L.sibling;return M}function l(L,M){return L=vi(L,M),L.index=0,L.sibling=null,L}function u(L,M,V){return L.index=V,e?(V=L.alternate,V!==null?(V=V.index,V<M?(L.flags|=67108866,M):V):(L.flags|=67108866,M)):(L.flags|=1048576,M)}function h(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function b(L,M,V,J){return M===null||M.tag!==6?(M=Du(V,L.mode,J),M.return=L,M):(M=l(M,V),M.return=L,M)}function R(L,M,V,J){var Se=V.type;return Se===w?P(L,M,V.props.children,J,V.key):M!==null&&(M.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===U&&Qs(Se)===M.type)?(M=l(M,V.props),Za(M,V),M.return=L,M):(M=gl(V.type,V.key,V.props,null,L.mode,J),Za(M,V),M.return=L,M)}function G(L,M,V,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=zu(V,L.mode,J),M.return=L,M):(M=l(M,V.children||[]),M.return=L,M)}function P(L,M,V,J,Se){return M===null||M.tag!==7?(M=Hs(V,L.mode,J,Se),M.return=L,M):(M=l(M,V),M.return=L,M)}function $(L,M,V){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Du(""+M,L.mode,V),M.return=L,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case E:return V=gl(M.type,M.key,M.props,null,L.mode,V),Za(V,M),V.return=L,V;case x:return M=zu(M,L.mode,V),M.return=L,M;case U:return M=Qs(M),$(L,M,V)}if(ie(M)||ae(M))return M=Hs(M,L.mode,V,null),M.return=L,M;if(typeof M.then=="function")return $(L,Tl(M),V);if(M.$$typeof===j)return $(L,vl(L,M),V);wl(L,M)}return null}function X(L,M,V,J){var Se=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Se!==null?null:b(L,M,""+V,J);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case E:return V.key===Se?R(L,M,V,J):null;case x:return V.key===Se?G(L,M,V,J):null;case U:return V=Qs(V),X(L,M,V,J)}if(ie(V)||ae(V))return Se!==null?null:P(L,M,V,J,null);if(typeof V.then=="function")return X(L,M,Tl(V),J);if(V.$$typeof===j)return X(L,M,vl(L,V),J);wl(L,V)}return null}function Z(L,M,V,J,Se){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return L=L.get(V)||null,b(M,L,""+J,Se);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case E:return L=L.get(J.key===null?V:J.key)||null,R(M,L,J,Se);case x:return L=L.get(J.key===null?V:J.key)||null,G(M,L,J,Se);case U:return J=Qs(J),Z(L,M,V,J,Se)}if(ie(J)||ae(J))return L=L.get(V)||null,P(M,L,J,Se,null);if(typeof J.then=="function")return Z(L,M,V,Tl(J),Se);if(J.$$typeof===j)return Z(L,M,V,vl(M,J),Se);wl(M,J)}return null}function ye(L,M,V,J){for(var Se=null,Pe=null,be=M,_e=M=0,qe=null;be!==null&&_e<V.length;_e++){be.index>_e?(qe=be,be=null):qe=be.sibling;var Ie=X(L,be,V[_e],J);if(Ie===null){be===null&&(be=qe);break}e&&be&&Ie.alternate===null&&t(L,be),M=u(Ie,M,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie,be=qe}if(_e===V.length)return s(L,be),Ge&&Si(L,_e),Se;if(be===null){for(;_e<V.length;_e++)be=$(L,V[_e],J),be!==null&&(M=u(be,M,_e),Pe===null?Se=be:Pe.sibling=be,Pe=be);return Ge&&Si(L,_e),Se}for(be=a(be);_e<V.length;_e++)qe=Z(be,L,_e,V[_e],J),qe!==null&&(e&&qe.alternate!==null&&be.delete(qe.key===null?_e:qe.key),M=u(qe,M,_e),Pe===null?Se=qe:Pe.sibling=qe,Pe=qe);return e&&be.forEach(function(ps){return t(L,ps)}),Ge&&Si(L,_e),Se}function Te(L,M,V,J){if(V==null)throw Error(o(151));for(var Se=null,Pe=null,be=M,_e=M=0,qe=null,Ie=V.next();be!==null&&!Ie.done;_e++,Ie=V.next()){be.index>_e?(qe=be,be=null):qe=be.sibling;var ps=X(L,be,Ie.value,J);if(ps===null){be===null&&(be=qe);break}e&&be&&ps.alternate===null&&t(L,be),M=u(ps,M,_e),Pe===null?Se=ps:Pe.sibling=ps,Pe=ps,be=qe}if(Ie.done)return s(L,be),Ge&&Si(L,_e),Se;if(be===null){for(;!Ie.done;_e++,Ie=V.next())Ie=$(L,Ie.value,J),Ie!==null&&(M=u(Ie,M,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie);return Ge&&Si(L,_e),Se}for(be=a(be);!Ie.done;_e++,Ie=V.next())Ie=Z(be,L,_e,Ie.value,J),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?_e:Ie.key),M=u(Ie,M,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie);return e&&be.forEach(function(JE){return t(L,JE)}),Ge&&Si(L,_e),Se}function ot(L,M,V,J){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case E:e:{for(var Se=V.key;M!==null;){if(M.key===Se){if(Se=V.type,Se===w){if(M.tag===7){s(L,M.sibling),J=l(M,V.props.children),J.return=L,L=J;break e}}else if(M.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===U&&Qs(Se)===M.type){s(L,M.sibling),J=l(M,V.props),Za(J,V),J.return=L,L=J;break e}s(L,M);break}else t(L,M);M=M.sibling}V.type===w?(J=Hs(V.props.children,L.mode,J,V.key),J.return=L,L=J):(J=gl(V.type,V.key,V.props,null,L.mode,J),Za(J,V),J.return=L,L=J)}return h(L);case x:e:{for(Se=V.key;M!==null;){if(M.key===Se)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){s(L,M.sibling),J=l(M,V.children||[]),J.return=L,L=J;break e}else{s(L,M);break}else t(L,M);M=M.sibling}J=zu(V,L.mode,J),J.return=L,L=J}return h(L);case U:return V=Qs(V),ot(L,M,V,J)}if(ie(V))return ye(L,M,V,J);if(ae(V)){if(Se=ae(V),typeof Se!="function")throw Error(o(150));return V=Se.call(V),Te(L,M,V,J)}if(typeof V.then=="function")return ot(L,M,Tl(V),J);if(V.$$typeof===j)return ot(L,M,vl(L,V),J);wl(L,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,M!==null&&M.tag===6?(s(L,M.sibling),J=l(M,V),J.return=L,L=J):(s(L,M),J=Du(V,L.mode,J),J.return=L,L=J),h(L)):s(L,M)}return function(L,M,V,J){try{Ka=0;var Se=ot(L,M,V,J);return Yr=null,Se}catch(be){if(be===qr||be===xl)throw be;var Pe=On(29,be,null,L.mode);return Pe.lanes=J,Pe.return=L,Pe}finally{}}}var Fs=rp(!0),ap=rp(!1),Wi=!1;function Xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function $i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function es(e,t,s){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(We&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=pl(e),Gm(e,null,s),t}return ml(e,a,t,s),pl(e)}function Pa(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,s|=a,t.lanes=s,br(e,s)}}function Ku(e,t){var s=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var l=null,u=null;if(s=s.firstBaseUpdate,s!==null){do{var h={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};u===null?l=u=h:u=u.next=h,s=s.next}while(s!==null);u===null?l=u=t:u=u.next=t}else l=u=t;s={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Zu=!1;function Ia(){if(Zu){var e=Hr;if(e!==null)throw e}}function Ja(e,t,s,a){Zu=!1;var l=e.updateQueue;Wi=!1;var u=l.firstBaseUpdate,h=l.lastBaseUpdate,b=l.shared.pending;if(b!==null){l.shared.pending=null;var R=b,G=R.next;R.next=null,h===null?u=G:h.next=G,h=R;var P=e.alternate;P!==null&&(P=P.updateQueue,b=P.lastBaseUpdate,b!==h&&(b===null?P.firstBaseUpdate=G:b.next=G,P.lastBaseUpdate=R))}if(u!==null){var $=l.baseState;h=0,P=G=R=null,b=u;do{var X=b.lane&-536870913,Z=X!==b.lane;if(Z?(He&X)===X:(a&X)===X){X!==0&&X===Br&&(Zu=!0),P!==null&&(P=P.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ye=e,Te=b;X=t;var ot=s;switch(Te.tag){case 1:if(ye=Te.payload,typeof ye=="function"){$=ye.call(ot,$,X);break e}$=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Te.payload,X=typeof ye=="function"?ye.call(ot,$,X):ye,X==null)break e;$=v({},$,X);break e;case 2:Wi=!0}}X=b.callback,X!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=l.callbacks,Z===null?l.callbacks=[X]:Z.push(X))}else Z={lane:X,tag:b.tag,payload:b.payload,callback:b.callback,next:null},P===null?(G=P=Z,R=$):P=P.next=Z,h|=X;if(b=b.next,b===null){if(b=l.shared.pending,b===null)break;Z=b,b=Z.next,Z.next=null,l.lastBaseUpdate=Z,l.shared.pending=null}}while(!0);P===null&&(R=$),l.baseState=R,l.firstBaseUpdate=G,l.lastBaseUpdate=P,u===null&&(l.shared.lanes=0),rs|=h,e.lanes=h,e.memoizedState=$}}function op(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function lp(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)op(s[e],t)}var Vr=T(null),Rl=T(0);function cp(e,t){e=Ni,te(Rl,e),te(Vr,t),Ni=e|t.baseLanes}function Pu(){te(Rl,Ni),te(Vr,Vr.current)}function Iu(){Ni=Rl.current,H(Vr),H(Rl)}var Cn=T(null),Yn=null;function ts(e){var t=e.alternate;te(Ct,Ct.current&1),te(Cn,e),Yn===null&&(t===null||Vr.current!==null||t.memoizedState!==null)&&(Yn=e)}function Ju(e){te(Ct,Ct.current),te(Cn,e),Yn===null&&(Yn=e)}function up(e){e.tag===22?(te(Ct,Ct.current),te(Cn,e),Yn===null&&(Yn=e)):ns()}function ns(){te(Ct,Ct.current),te(Cn,Cn.current)}function An(e){H(Cn),Yn===e&&(Yn=null),H(Ct)}var Ct=T(0);function Ol(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||sd(s)||rd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ti=0,Ae=null,rt=null,Mt=null,Cl=!1,Gr=!1,Ks=!1,Al=0,Wa=0,Qr=null,Yx=0;function Et(){throw Error(o(321))}function Wu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Rn(e[s],t[s]))return!1;return!0}function $u(e,t,s,a,l,u){return Ti=u,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Kp:pf,Ks=!1,u=s(a,l),Ks=!1,Gr&&(u=dp(t,s,a,l)),fp(e),u}function fp(e){N.H=to;var t=rt!==null&&rt.next!==null;if(Ti=0,Mt=rt=Ae=null,Cl=!1,Wa=0,Qr=null,t)throw Error(o(300));e===null||Nt||(e=e.dependencies,e!==null&&bl(e)&&(Nt=!0))}function dp(e,t,s,a){Ae=e;var l=0;do{if(Gr&&(Qr=null),Wa=0,Gr=!1,25<=l)throw Error(o(301));if(l+=1,Mt=rt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}N.H=Zp,u=t(s,a)}while(Gr);return u}function Vx(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?$a(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ae.flags|=1024),t}function ef(){var e=Al!==0;return Al=0,e}function tf(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function nf(e){if(Cl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cl=!1}Ti=0,Mt=rt=Ae=null,Gr=!1,Wa=Al=0,Qr=null}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ae.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function At(){if(rt===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Mt===null?Ae.memoizedState:Mt.next;if(t!==null)Mt=t,rt=e;else{if(e===null)throw Ae.alternate===null?Error(o(467)):Error(o(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Mt===null?Ae.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function _l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $a(e){var t=Wa;return Wa+=1,Qr===null&&(Qr=[]),e=np(Qr,e,t),t=Ae,(Mt===null?t.memoizedState:Mt.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Kp:pf),e}function Ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $a(e);if(e.$$typeof===j)return Zt(e)}throw Error(o(438,String(e)))}function sf(e){var t=null,s=Ae.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var a=Ae.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=_l(),Ae.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),a=0;a<e;a++)s[a]=se;return t.index++,s}function wi(e,t){return typeof t=="function"?t(e):t}function Nl(e){var t=At();return rf(t,rt,e)}function rf(e,t,s){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=s;var l=e.baseQueue,u=a.pending;if(u!==null){if(l!==null){var h=l.next;l.next=u.next,u.next=h}t.baseQueue=l=u,a.pending=null}if(u=e.baseState,l===null)e.memoizedState=u;else{t=l.next;var b=h=null,R=null,G=t,P=!1;do{var $=G.lane&-536870913;if($!==G.lane?(He&$)===$:(Ti&$)===$){var X=G.revertLane;if(X===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),$===Br&&(P=!0);else if((Ti&X)===X){G=G.next,X===Br&&(P=!0);continue}else $={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(b=R=$,h=u):R=R.next=$,Ae.lanes|=X,rs|=X;$=G.action,Ks&&s(u,$),u=G.hasEagerState?G.eagerState:s(u,$)}else X={lane:$,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(b=R=X,h=u):R=R.next=X,Ae.lanes|=$,rs|=$;G=G.next}while(G!==null&&G!==t);if(R===null?h=u:R.next=b,!Rn(u,e.memoizedState)&&(Nt=!0,P&&(s=Hr,s!==null)))throw s;e.memoizedState=u,e.baseState=h,e.baseQueue=R,a.lastRenderedState=u}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function af(e){var t=At(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=s.dispatch,l=s.pending,u=t.memoizedState;if(l!==null){s.pending=null;var h=l=l.next;do u=e(u,h.action),h=h.next;while(h!==l);Rn(u,t.memoizedState)||(Nt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),s.lastRenderedState=u}return[u,a]}function hp(e,t,s){var a=Ae,l=At(),u=Ge;if(u){if(s===void 0)throw Error(o(407));s=s()}else s=t();var h=!Rn((rt||l).memoizedState,s);if(h&&(l.memoizedState=s,Nt=!0),l=l.queue,cf(gp.bind(null,a,l,e),[e]),l.getSnapshot!==t||h||Mt!==null&&Mt.memoizedState.tag&1){if(a.flags|=2048,Xr(9,{destroy:void 0},pp.bind(null,a,l,s,t),null),ct===null)throw Error(o(349));u||(Ti&127)!==0||mp(a,t,s)}return s}function mp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ae.updateQueue,t===null?(t=_l(),Ae.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function pp(e,t,s,a){t.value=s,t.getSnapshot=a,yp(t)&&bp(e)}function gp(e,t,s){return s(function(){yp(t)&&bp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Rn(e,s)}catch{return!0}}function bp(e){var t=Bs(e,2);t!==null&&vn(t,e,2)}function of(e){var t=on();if(typeof e=="function"){var s=e;if(e=s(),Ks){Tn(!0);try{s()}finally{Tn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:e},t}function vp(e,t,s,a){return e.baseState=s,rf(e,rt,typeof a=="function"?a:wi)}function Gx(e,t,s,a,l){if(kl(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};N.T!==null?s(!0):u.isTransition=!1,a(u),s=t.pending,s===null?(u.next=t.pending=u,Sp(t,u)):(u.next=s.next,t.pending=s.next=u)}}function Sp(e,t){var s=t.action,a=t.payload,l=e.state;if(t.isTransition){var u=N.T,h={};N.T=h;try{var b=s(l,a),R=N.S;R!==null&&R(h,b),xp(e,t,b)}catch(G){lf(e,t,G)}finally{u!==null&&h.types!==null&&(u.types=h.types),N.T=u}}else try{u=s(l,a),xp(e,t,u)}catch(G){lf(e,t,G)}}function xp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(a){Ep(e,t,a)},function(a){return lf(e,t,a)}):Ep(e,t,s)}function Ep(e,t,s){t.status="fulfilled",t.value=s,Tp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Sp(e,s)))}function lf(e,t,s){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=s,Tp(t),t=t.next;while(t!==a)}e.action=null}function Tp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function wp(e,t){return t}function Rp(e,t){if(Ge){var s=ct.formState;if(s!==null){e:{var a=Ae;if(Ge){if(gt){t:{for(var l=gt,u=qn;l.nodeType!==8;){if(!u){l=null;break t}if(l=Vn(l.nextSibling),l===null){l=null;break t}}u=l.data,l=u==="F!"||u==="F"?l:null}if(l){gt=Vn(l.nextSibling),a=l.data==="F!";break e}}Ii(a)}a=!1}a&&(t=s[0])}}return s=on(),s.memoizedState=s.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wp,lastRenderedState:t},s.queue=a,s=Qp.bind(null,Ae,a),a.dispatch=s,a=of(!1),u=mf.bind(null,Ae,!1,a.queue),a=on(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,s=Gx.bind(null,Ae,l,u,s),l.dispatch=s,a.memoizedState=e,[t,s,!1]}function Op(e){var t=At();return Cp(t,rt,e)}function Cp(e,t,s){if(t=rf(e,t,wp)[0],e=Nl(wi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=$a(t)}catch(h){throw h===qr?xl:h}else a=t;t=At();var l=t.queue,u=l.dispatch;return s!==t.memoizedState&&(Ae.flags|=2048,Xr(9,{destroy:void 0},Qx.bind(null,l,s),null)),[a,u,e]}function Qx(e,t){e.action=t}function Ap(e){var t=At(),s=rt;if(s!==null)return Cp(t,s,e);At(),t=t.memoizedState,s=At();var a=s.queue.dispatch;return s.memoizedState=e,[t,a,!1]}function Xr(e,t,s,a){return e={tag:e,create:s,deps:a,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=_l(),Ae.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(a=s.next,s.next=e,e.next=a,t.lastEffect=e),e}function _p(){return At().memoizedState}function Dl(e,t,s,a){var l=on();Ae.flags|=e,l.memoizedState=Xr(1|t,{destroy:void 0},s,a===void 0?null:a)}function zl(e,t,s,a){var l=At();a=a===void 0?null:a;var u=l.memoizedState.inst;rt!==null&&a!==null&&Wu(a,rt.memoizedState.deps)?l.memoizedState=Xr(t,u,s,a):(Ae.flags|=e,l.memoizedState=Xr(1|t,u,s,a))}function Mp(e,t){Dl(8390656,8,e,t)}function cf(e,t){zl(2048,8,e,t)}function Xx(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=_l(),Ae.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Np(e){var t=At().memoizedState;return Xx({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Dp(e,t){return zl(4,2,e,t)}function zp(e,t){return zl(4,4,e,t)}function kp(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jp(e,t,s){s=s!=null?s.concat([e]):null,zl(4,4,kp.bind(null,t,e),s)}function uf(){}function Up(e,t){var s=At();t=t===void 0?null:t;var a=s.memoizedState;return t!==null&&Wu(t,a[1])?a[0]:(s.memoizedState=[e,t],e)}function Lp(e,t){var s=At();t=t===void 0?null:t;var a=s.memoizedState;if(t!==null&&Wu(t,a[1]))return a[0];if(a=e(),Ks){Tn(!0);try{e()}finally{Tn(!1)}}return s.memoizedState=[a,t],a}function ff(e,t,s){return s===void 0||(Ti&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=Bg(),Ae.lanes|=e,rs|=e,s)}function Bp(e,t,s,a){return Rn(s,t)?s:Vr.current!==null?(e=ff(e,s,a),Rn(e,t)||(Nt=!0),e):(Ti&42)===0||(Ti&1073741824)!==0&&(He&261930)===0?(Nt=!0,e.memoizedState=s):(e=Bg(),Ae.lanes|=e,rs|=e,t)}function Hp(e,t,s,a,l){var u=Q.p;Q.p=u!==0&&8>u?u:8;var h=N.T,b={};N.T=b,mf(e,!1,t,s);try{var R=l(),G=N.S;if(G!==null&&G(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var P=qx(R,a);eo(e,t,P,Nn(e))}else eo(e,t,a,Nn(e))}catch($){eo(e,t,{then:function(){},status:"rejected",reason:$},Nn())}finally{Q.p=u,h!==null&&b.types!==null&&(h.types=b.types),N.T=h}}function Fx(){}function df(e,t,s,a){if(e.tag!==5)throw Error(o(476));var l=qp(e).queue;Hp(e,l,t,I,s===null?Fx:function(){return Yp(e),s(a)})}function qp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:I},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yp(e){var t=qp(e);t.next===null&&(t=e.alternate.memoizedState),eo(e,t.next.queue,{},Nn())}function hf(){return Zt(bo)}function Vp(){return At().memoizedState}function Gp(){return At().memoizedState}function Kx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Nn();e=$i(s);var a=es(t,e,s);a!==null&&(vn(a,t,s),Pa(a,t,s)),t={cache:Yu()},e.payload=t;return}t=t.return}}function Zx(e,t,s){var a=Nn();s={lane:a,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},kl(e)?Xp(t,s):(s=Mu(e,t,s,a),s!==null&&(vn(s,e,a),Fp(s,t,a)))}function Qp(e,t,s){var a=Nn();eo(e,t,s,a)}function eo(e,t,s,a){var l={lane:a,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(kl(e))Xp(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,b=u(h,s);if(l.hasEagerState=!0,l.eagerState=b,Rn(b,h))return ml(e,t,l,0),ct===null&&hl(),!1}catch{}finally{}if(s=Mu(e,t,l,a),s!==null)return vn(s,e,a),Fp(s,t,a),!0}return!1}function mf(e,t,s,a){if(a={lane:2,revertLane:Ff(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},kl(e)){if(t)throw Error(o(479))}else t=Mu(e,s,a,2),t!==null&&vn(t,e,2)}function kl(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Xp(e,t){Gr=Cl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Fp(e,t,s){if((s&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,s|=a,t.lanes=s,br(e,s)}}var to={readContext:Zt,use:Ml,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};to.useEffectEvent=Et;var Kp={readContext:Zt,use:Ml,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Mp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Dl(4194308,4,kp.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){Dl(4,2,e,t)},useMemo:function(e,t){var s=on();t=t===void 0?null:t;var a=e();if(Ks){Tn(!0);try{e()}finally{Tn(!1)}}return s.memoizedState=[a,t],a},useReducer:function(e,t,s){var a=on();if(s!==void 0){var l=s(t);if(Ks){Tn(!0);try{s(t)}finally{Tn(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=Zx.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:function(e){e=of(e);var t=e.queue,s=Qp.bind(null,Ae,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:uf,useDeferredValue:function(e,t){var s=on();return ff(s,e,t)},useTransition:function(){var e=of(!1);return e=Hp.bind(null,Ae,e.queue,!0,!1),on().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var a=Ae,l=on();if(Ge){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),ct===null)throw Error(o(349));(He&127)!==0||mp(a,t,s)}l.memoizedState=s;var u={value:s,getSnapshot:t};return l.queue=u,Mp(gp.bind(null,a,u,e),[e]),a.flags|=2048,Xr(9,{destroy:void 0},pp.bind(null,a,u,s,t),null),s},useId:function(){var e=on(),t=ct.identifierPrefix;if(Ge){var s=ri,a=si;s=(a&~(1<<32-Yt(a)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Al++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=Yx++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hf,useFormState:Rp,useActionState:Rp,useOptimistic:function(e){var t=on();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=mf.bind(null,Ae,!0,s),s.dispatch=t,[e,t]},useMemoCache:sf,useCacheRefresh:function(){return on().memoizedState=Kx.bind(null,Ae)},useEffectEvent:function(e){var t=on(),s={impl:e};return t.memoizedState=s,function(){if((We&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},pf={readContext:Zt,use:Ml,useCallback:Up,useContext:Zt,useEffect:cf,useImperativeHandle:jp,useInsertionEffect:Dp,useLayoutEffect:zp,useMemo:Lp,useReducer:Nl,useRef:_p,useState:function(){return Nl(wi)},useDebugValue:uf,useDeferredValue:function(e,t){var s=At();return Bp(s,rt.memoizedState,e,t)},useTransition:function(){var e=Nl(wi)[0],t=At().memoizedState;return[typeof e=="boolean"?e:$a(e),t]},useSyncExternalStore:hp,useId:Vp,useHostTransitionStatus:hf,useFormState:Op,useActionState:Op,useOptimistic:function(e,t){var s=At();return vp(s,rt,e,t)},useMemoCache:sf,useCacheRefresh:Gp};pf.useEffectEvent=Np;var Zp={readContext:Zt,use:Ml,useCallback:Up,useContext:Zt,useEffect:cf,useImperativeHandle:jp,useInsertionEffect:Dp,useLayoutEffect:zp,useMemo:Lp,useReducer:af,useRef:_p,useState:function(){return af(wi)},useDebugValue:uf,useDeferredValue:function(e,t){var s=At();return rt===null?ff(s,e,t):Bp(s,rt.memoizedState,e,t)},useTransition:function(){var e=af(wi)[0],t=At().memoizedState;return[typeof e=="boolean"?e:$a(e),t]},useSyncExternalStore:hp,useId:Vp,useHostTransitionStatus:hf,useFormState:Ap,useActionState:Ap,useOptimistic:function(e,t){var s=At();return rt!==null?vp(s,rt,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:sf,useCacheRefresh:Gp};Zp.useEffectEvent=Np;function gf(e,t,s,a){t=e.memoizedState,s=s(a,t),s=s==null?t:v({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var yf={enqueueSetState:function(e,t,s){e=e._reactInternals;var a=Nn(),l=$i(a);l.payload=t,s!=null&&(l.callback=s),t=es(e,l,a),t!==null&&(vn(t,e,a),Pa(t,e,a))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var a=Nn(),l=$i(a);l.tag=1,l.payload=t,s!=null&&(l.callback=s),t=es(e,l,a),t!==null&&(vn(t,e,a),Pa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Nn(),a=$i(s);a.tag=2,t!=null&&(a.callback=t),t=es(e,a,s),t!==null&&(vn(t,e,s),Pa(t,e,s))}};function Pp(e,t,s,a,l,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,h):t.prototype&&t.prototype.isPureReactComponent?!Ya(s,a)||!Ya(l,u):!0}function Ip(e,t,s,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,a),t.state!==e&&yf.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var s=t;if("ref"in t){s={};for(var a in t)a!=="ref"&&(s[a]=t[a])}if(e=e.defaultProps){s===t&&(s=v({},s));for(var l in e)s[l]===void 0&&(s[l]=e[l])}return s}function Jp(e){dl(e)}function Wp(e){console.error(e)}function $p(e){dl(e)}function jl(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function eg(e,t,s){try{var a=e.onCaughtError;a(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function bf(e,t,s){return s=$i(s),s.tag=3,s.payload={element:null},s.callback=function(){jl(e,t)},s}function tg(e){return e=$i(e),e.tag=3,e}function ng(e,t,s,a){var l=s.type.getDerivedStateFromError;if(typeof l=="function"){var u=a.value;e.payload=function(){return l(u)},e.callback=function(){eg(t,s,a)}}var h=s.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){eg(t,s,a),typeof l!="function"&&(as===null?as=new Set([this]):as.add(this));var b=a.stack;this.componentDidCatch(a.value,{componentStack:b!==null?b:""})})}function Px(e,t,s,a,l){if(s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=s.alternate,t!==null&&Lr(t,s,l,!0),s=Cn.current,s!==null){switch(s.tag){case 31:case 13:return Yn===null?Kl():s.alternate===null&&Tt===0&&(Tt=3),s.flags&=-257,s.flags|=65536,s.lanes=l,a===El?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([a]):t.add(a),Gf(e,a,l)),!1;case 22:return s.flags|=65536,a===El?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([a]):s.add(a)),Gf(e,a,l)),!1}throw Error(o(435,s.tag))}return Gf(e,a,l),Kl(),!1}if(Ge)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==Uu&&(e=Error(o(422),{cause:a}),Qa(Ln(e,s)))):(a!==Uu&&(t=Error(o(423),{cause:a}),Qa(Ln(t,s))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Ln(a,s),l=bf(e.stateNode,a,l),Ku(e,l),Tt!==4&&(Tt=2)),!1;var u=Error(o(520),{cause:a});if(u=Ln(u,s),co===null?co=[u]:co.push(u),Tt!==4&&(Tt=2),t===null)return!0;a=Ln(a,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=l&-l,s.lanes|=e,e=bf(s.stateNode,a,e),Ku(s,e),!1;case 1:if(t=s.type,u=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(as===null||!as.has(u))))return s.flags|=65536,l&=-l,s.lanes|=l,l=tg(l),ng(l,e,s,a),Ku(s,l),!1}s=s.return}while(s!==null);return!1}var vf=Error(o(461)),Nt=!1;function Pt(e,t,s,a){t.child=e===null?ap(t,null,s,a):Fs(t,e.child,s,a)}function ig(e,t,s,a,l){s=s.render;var u=t.ref;if("ref"in a){var h={};for(var b in a)b!=="ref"&&(h[b]=a[b])}else h=a;return Vs(t),a=$u(e,t,s,h,u,l),b=ef(),e!==null&&!Nt?(tf(e,t,l),Ri(e,t,l)):(Ge&&b&&ku(t),t.flags|=1,Pt(e,t,a,l),t.child)}function sg(e,t,s,a,l){if(e===null){var u=s.type;return typeof u=="function"&&!Nu(u)&&u.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=u,rg(e,t,u,a,l)):(e=gl(s.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Cf(e,l)){var h=u.memoizedProps;if(s=s.compare,s=s!==null?s:Ya,s(h,a)&&e.ref===t.ref)return Ri(e,t,l)}return t.flags|=1,e=vi(u,a),e.ref=t.ref,e.return=t,t.child=e}function rg(e,t,s,a,l){if(e!==null){var u=e.memoizedProps;if(Ya(u,a)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=a=u,Cf(e,l))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,Ri(e,t,l)}return Sf(e,t,s,a,l)}function ag(e,t,s,a){var l=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|s:s,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~u}else a=0,t.child=null;return og(e,t,u,s,a)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sl(t,u!==null?u.cachePool:null),u!==null?cp(t,u):Pu(),up(t);else return a=t.lanes=536870912,og(e,t,u!==null?u.baseLanes|s:s,s,a)}else u!==null?(Sl(t,u.cachePool),cp(t,u),ns(),t.memoizedState=null):(e!==null&&Sl(t,null),Pu(),ns());return Pt(e,t,l,s),t.child}function no(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function og(e,t,s,a,l){var u=Gu();return u=u===null?null:{parent:_t._currentValue,pool:u},t.memoizedState={baseLanes:s,cachePool:u},e!==null&&Sl(t,null),Pu(),up(t),e!==null&&Lr(e,t,a,!0),t.childLanes=l,null}function Ul(e,t){return t=Bl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lg(e,t,s){return Fs(t,e.child,null,s),e=Ul(t,t.pendingProps),e.flags|=2,An(t),t.memoizedState=null,e}function Ix(e,t,s){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(a.mode==="hidden")return e=Ul(t,a),t.lanes=536870912,no(null,e);if(Ju(t),(e=gt)?(e=Sy(e,qn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},s=Xm(e),s.return=t,t.child=s,Kt=t,gt=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return Ul(t,a)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Ju(t),l)if(t.flags&256)t.flags&=-257,t=lg(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Nt||Lr(e,t,s,!1),l=(s&e.childLanes)!==0,Nt||l){if(a=ct,a!==null&&(h=Jo(a,s),h!==0&&h!==u.retryLane))throw u.retryLane=h,Bs(e,h),vn(a,e,h),vf;Kl(),t=lg(e,t,s)}else e=u.treeContext,gt=Vn(h.nextSibling),Kt=t,Ge=!0,Pi=null,qn=!1,e!==null&&Zm(t,e),t=Ul(t,a),t.flags|=4096;return t}return e=vi(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ll(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Sf(e,t,s,a,l){return Vs(t),s=$u(e,t,s,a,void 0,l),a=ef(),e!==null&&!Nt?(tf(e,t,l),Ri(e,t,l)):(Ge&&a&&ku(t),t.flags|=1,Pt(e,t,s,l),t.child)}function cg(e,t,s,a,l,u){return Vs(t),t.updateQueue=null,s=dp(t,a,s,l),fp(e),a=ef(),e!==null&&!Nt?(tf(e,t,u),Ri(e,t,u)):(Ge&&a&&ku(t),t.flags|=1,Pt(e,t,s,u),t.child)}function ug(e,t,s,a,l){if(Vs(t),t.stateNode===null){var u=zr,h=s.contextType;typeof h=="object"&&h!==null&&(u=Zt(h)),u=new s(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=yf,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Xu(t),h=s.contextType,u.context=typeof h=="object"&&h!==null?Zt(h):zr,u.state=t.memoizedState,h=s.getDerivedStateFromProps,typeof h=="function"&&(gf(t,s,h,a),u.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&yf.enqueueReplaceState(u,u.state,null),Ja(t,a,u,l),Ia(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,R=Zs(s,b);u.props=R;var G=u.context,P=s.contextType;h=zr,typeof P=="object"&&P!==null&&(h=Zt(P));var $=s.getDerivedStateFromProps;P=typeof $=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,P||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||G!==h)&&Ip(t,u,a,h),Wi=!1;var X=t.memoizedState;u.state=X,Ja(t,a,u,l),Ia(),G=t.memoizedState,b||X!==G||Wi?(typeof $=="function"&&(gf(t,s,$,a),G=t.memoizedState),(R=Wi||Pp(t,s,R,a,X,G,h))?(P||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=G),u.props=a,u.state=G,u.context=h,a=R):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Fu(e,t),h=t.memoizedProps,P=Zs(s,h),u.props=P,$=t.pendingProps,X=u.context,G=s.contextType,R=zr,typeof G=="object"&&G!==null&&(R=Zt(G)),b=s.getDerivedStateFromProps,(G=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==$||X!==R)&&Ip(t,u,a,R),Wi=!1,X=t.memoizedState,u.state=X,Ja(t,a,u,l),Ia();var Z=t.memoizedState;h!==$||X!==Z||Wi||e!==null&&e.dependencies!==null&&bl(e.dependencies)?(typeof b=="function"&&(gf(t,s,b,a),Z=t.memoizedState),(P=Wi||Pp(t,s,P,a,X,Z,R)||e!==null&&e.dependencies!==null&&bl(e.dependencies))?(G||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,Z,R),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,Z,R)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Z),u.props=a,u.state=Z,u.context=R,a=P):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Ll(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,s=a&&typeof s.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Fs(t,e.child,null,l),t.child=Fs(t,null,s,l)):Pt(e,t,s,l),t.memoizedState=u.state,e=t.child):e=Ri(e,t,l),e}function fg(e,t,s,a){return qs(),t.flags|=256,Pt(e,t,s,a),t.child}var xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ef(e){return{baseLanes:e,cachePool:ep()}}function Tf(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=Mn),e}function dg(e,t,s){var a=t.pendingProps,l=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),h&&(l=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(l?ts(t):ns(),(e=gt)?(e=Sy(e,qn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},s=Xm(e),s.return=t,t.child=s,Kt=t,gt=null)):e=null,e===null)throw Ii(t);return rd(e)?t.lanes=32:t.lanes=536870912,null}var b=a.children;return a=a.fallback,l?(ns(),l=t.mode,b=Bl({mode:"hidden",children:b},l),a=Hs(a,l,s,null),b.return=t,a.return=t,b.sibling=a,t.child=b,a=t.child,a.memoizedState=Ef(s),a.childLanes=Tf(e,h,s),t.memoizedState=xf,no(null,a)):(ts(t),wf(t,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(u)t.flags&256?(ts(t),t.flags&=-257,t=Rf(e,t,s)):t.memoizedState!==null?(ns(),t.child=e.child,t.flags|=128,t=null):(ns(),b=a.fallback,l=t.mode,a=Bl({mode:"visible",children:a.children},l),b=Hs(b,l,s,null),b.flags|=2,a.return=t,b.return=t,a.sibling=b,t.child=a,Fs(t,e.child,null,s),a=t.child,a.memoizedState=Ef(s),a.childLanes=Tf(e,h,s),t.memoizedState=xf,t=no(null,a));else if(ts(t),rd(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var G=h.dgst;h=G,a=Error(o(419)),a.stack="",a.digest=h,Qa({value:a,source:null,stack:null}),t=Rf(e,t,s)}else if(Nt||Lr(e,t,s,!1),h=(s&e.childLanes)!==0,Nt||h){if(h=ct,h!==null&&(a=Jo(h,s),a!==0&&a!==R.retryLane))throw R.retryLane=a,Bs(e,a),vn(h,e,a),vf;sd(b)||Kl(),t=Rf(e,t,s)}else sd(b)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,gt=Vn(b.nextSibling),Kt=t,Ge=!0,Pi=null,qn=!1,e!==null&&Zm(t,e),t=wf(t,a.children),t.flags|=4096);return t}return l?(ns(),b=a.fallback,l=t.mode,R=e.child,G=R.sibling,a=vi(R,{mode:"hidden",children:a.children}),a.subtreeFlags=R.subtreeFlags&65011712,G!==null?b=vi(G,b):(b=Hs(b,l,s,null),b.flags|=2),b.return=t,a.return=t,a.sibling=b,t.child=a,no(null,a),a=t.child,b=e.child.memoizedState,b===null?b=Ef(s):(l=b.cachePool,l!==null?(R=_t._currentValue,l=l.parent!==R?{parent:R,pool:R}:l):l=ep(),b={baseLanes:b.baseLanes|s,cachePool:l}),a.memoizedState=b,a.childLanes=Tf(e,h,s),t.memoizedState=xf,no(e.child,a)):(ts(t),s=e.child,e=s.sibling,s=vi(s,{mode:"visible",children:a.children}),s.return=t,s.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=s,t.memoizedState=null,s)}function wf(e,t){return t=Bl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bl(e,t){return e=On(22,e,null,t),e.lanes=0,e}function Rf(e,t,s){return Fs(t,e.child,null,s),e=wf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hg(e,t,s){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Hu(e.return,t,s)}function Of(e,t,s,a,l,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:l,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=s,h.tailMode=l,h.treeForkCount=u)}function mg(e,t,s){var a=t.pendingProps,l=a.revealOrder,u=a.tail;a=a.children;var h=Ct.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,te(Ct,h),Pt(e,t,a,s),a=Ge?Ga:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hg(e,s,t);else if(e.tag===19)hg(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(s=t.child,l=null;s!==null;)e=s.alternate,e!==null&&Ol(e)===null&&(l=s),s=s.sibling;s=l,s===null?(l=t.child,t.child=null):(l=s.sibling,s.sibling=null),Of(t,!1,l,s,u,a);break;case"backwards":case"unstable_legacy-backwards":for(s=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ol(e)===null){t.child=l;break}e=l.sibling,l.sibling=s,s=l,l=e}Of(t,!0,s,null,u,a);break;case"together":Of(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ri(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),rs|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(Lr(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=vi(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=vi(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Cf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bl(e)))}function Jx(e,t,s){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ji(t,_t,e.memoizedState.cache),qs();break;case 27:case 5:Ze(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ju(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ts(t),t.flags|=128,null):(s&t.child.childLanes)!==0?dg(e,t,s):(ts(t),e=Ri(e,t,s),e!==null?e.sibling:null);ts(t);break;case 19:var l=(e.flags&128)!==0;if(a=(s&t.childLanes)!==0,a||(Lr(e,t,s,!1),a=(s&t.childLanes)!==0),l){if(a)return mg(e,t,s);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),te(Ct,Ct.current),a)break;return null;case 22:return t.lanes=0,ag(e,t,s,t.pendingProps);case 24:Ji(t,_t,e.memoizedState.cache)}return Ri(e,t,s)}function pg(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!Cf(e,s)&&(t.flags&128)===0)return Nt=!1,Jx(e,t,s);Nt=(e.flags&131072)!==0}else Nt=!1,Ge&&(t.flags&1048576)!==0&&Km(t,Ga,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Qs(t.elementType),t.type=e,typeof e=="function")Nu(e)?(a=Zs(e,a),t.tag=1,t=ug(null,t,e,a,s)):(t.tag=0,t=Sf(null,t,e,a,s));else{if(e!=null){var l=e.$$typeof;if(l===k){t.tag=11,t=ig(null,t,e,a,s);break e}else if(l===B){t.tag=14,t=sg(null,t,e,a,s);break e}}throw t=le(e)||e,Error(o(306,t,""))}}return t;case 0:return Sf(e,t,t.type,t.pendingProps,s);case 1:return a=t.type,l=Zs(a,t.pendingProps),ug(e,t,a,l,s);case 3:e:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var u=t.memoizedState;l=u.element,Fu(e,t),Ja(t,a,null,s);var h=t.memoizedState;if(a=h.cache,Ji(t,_t,a),a!==u.cache&&qu(t,[_t],s,!0),Ia(),a=h.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=fg(e,t,a,s);break e}else if(a!==l){l=Ln(Error(o(424)),t),Qa(l),t=fg(e,t,a,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(gt=Vn(e.firstChild),Kt=t,Ge=!0,Pi=null,qn=!0,s=ap(t,null,a,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(qs(),a===l){t=Ri(e,t,s);break e}Pt(e,t,a,s)}t=t.child}return t;case 26:return Ll(e,t),e===null?(s=Oy(t.type,null,t.pendingProps,null))?t.memoizedState=s:Ge||(s=t.type,e=t.pendingProps,a=ec(ee.current).createElement(s),a[Ut]=t,a[en]=e,It(a,s,e),Gt(a),t.stateNode=a):t.memoizedState=Oy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ze(t),e===null&&Ge&&(a=t.stateNode=Ty(t.type,t.pendingProps,ee.current),Kt=t,qn=!0,l=gt,us(t.type)?(ad=l,gt=Vn(a.firstChild)):gt=l),Pt(e,t,t.pendingProps.children,s),Ll(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((l=a=gt)&&(a=CE(a,t.type,t.pendingProps,qn),a!==null?(t.stateNode=a,Kt=t,gt=Vn(a.firstChild),qn=!1,l=!0):l=!1),l||Ii(t)),Ze(t),l=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,a=u.children,td(l,u)?a=null:h!==null&&td(l,h)&&(t.flags|=32),t.memoizedState!==null&&(l=$u(e,t,Vx,null,null,s),bo._currentValue=l),Ll(e,t),Pt(e,t,a,s),t.child;case 6:return e===null&&Ge&&((e=s=gt)&&(s=AE(s,t.pendingProps,qn),s!==null?(t.stateNode=s,Kt=t,gt=null,e=!0):e=!1),e||Ii(t)),null;case 13:return dg(e,t,s);case 4:return ce(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Fs(t,null,a,s):Pt(e,t,a,s),t.child;case 11:return ig(e,t,t.type,t.pendingProps,s);case 7:return Pt(e,t,t.pendingProps,s),t.child;case 8:return Pt(e,t,t.pendingProps.children,s),t.child;case 12:return Pt(e,t,t.pendingProps.children,s),t.child;case 10:return a=t.pendingProps,Ji(t,t.type,a.value),Pt(e,t,a.children,s),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,Vs(t),l=Zt(l),a=a(l),t.flags|=1,Pt(e,t,a,s),t.child;case 14:return sg(e,t,t.type,t.pendingProps,s);case 15:return rg(e,t,t.type,t.pendingProps,s);case 19:return mg(e,t,s);case 31:return Ix(e,t,s);case 22:return ag(e,t,s,t.pendingProps);case 24:return Vs(t),a=Zt(_t),e===null?(l=Gu(),l===null&&(l=ct,u=Yu(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=s),l=u),t.memoizedState={parent:a,cache:l},Xu(t),Ji(t,_t,l)):((e.lanes&s)!==0&&(Fu(e,t),Ja(t,null,null,s),Ia()),l=e.memoizedState,u=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ji(t,_t,a)):(a=u.cache,Ji(t,_t,a),a!==l.cache&&qu(t,[_t],s,!0))),Pt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Oi(e){e.flags|=4}function Af(e,t,s,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Vg())e.flags|=8192;else throw Xs=El,Qu}else e.flags&=-16777217}function gg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ny(t))if(Vg())e.flags|=8192;else throw Xs=El,Qu}function Hl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ni():536870912,e.lanes|=t,Pr|=t)}function io(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,a=0;if(t)for(var l=e.child;l!==null;)s|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)s|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=s,t}function Wx(e,t,s){var a=t.pendingProps;switch(ju(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return s=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ei(_t),fe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ur(t)?Oi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Lu())),yt(t),null;case 26:var l=t.type,u=t.memoizedState;return e===null?(Oi(t),u!==null?(yt(t),gg(t,u)):(yt(t),Af(t,l,null,a,s))):u?u!==e.memoizedState?(Oi(t),yt(t),gg(t,u)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Oi(t),yt(t),Af(t,l,e,a,s)),null;case 27:if(nt(t),s=ee.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Oi(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return yt(t),null}e=ne.current,Ur(t)?Pm(t):(e=Ty(l,a,s),t.stateNode=e,Oi(t))}return yt(t),null;case 5:if(nt(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Oi(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return yt(t),null}if(u=ne.current,Ur(t))Pm(t);else{var h=ec(ee.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?h.createElement(l,{is:a.is}):h.createElement(l)}}u[Ut]=t,u[en]=a;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(It(u,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Oi(t)}}return yt(t),Af(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Oi(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,Ur(t)){if(e=t.stateNode,s=t.memoizedProps,a=null,l=Kt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Ut]=t,e=!!(e.nodeValue===s||a!==null&&a.suppressHydrationWarning===!0||dy(e.nodeValue,s)),e||Ii(t,!0)}else e=ec(e).createTextNode(a),e[Ut]=t,t.stateNode=e}return yt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ur(t),s!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ut]=t}else qs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),e=!1}else s=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(An(t),t):(An(t),null);if((t.flags&128)!==0)throw Error(o(558))}return yt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Ur(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(o(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));l[Ut]=t}else qs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),l=!1}else l=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(An(t),t):(An(t),null)}return An(t),(t.flags&128)!==0?(t.lanes=s,t):(s=a!==null,e=e!==null&&e.memoizedState!==null,s&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==l&&(a.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),Hl(t,t.updateQueue),yt(t),null);case 4:return fe(),e===null&&If(t.stateNode.containerInfo),yt(t),null;case 10:return Ei(t.type),yt(t),null;case 19:if(H(Ct),a=t.memoizedState,a===null)return yt(t),null;if(l=(t.flags&128)!==0,u=a.rendering,u===null)if(l)io(a,!1);else{if(Tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ol(e),u!==null){for(t.flags|=128,io(a,!1),e=u.updateQueue,t.updateQueue=e,Hl(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)Qm(s,e),s=s.sibling;return te(Ct,Ct.current&1|2),Ge&&Si(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ue()>Ql&&(t.flags|=128,l=!0,io(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ol(u),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Hl(t,e),io(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Ge)return yt(t),null}else 2*ue()-a.renderingStartTime>Ql&&s!==536870912&&(t.flags|=128,l=!0,io(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ue(),e.sibling=null,s=Ct.current,te(Ct,l?s&1|2:s&1),Ge&&Si(t,a.treeForkCount),e):(yt(t),null);case 22:case 23:return An(t),Iu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(s&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),s=t.updateQueue,s!==null&&Hl(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==s&&(t.flags|=2048),e!==null&&H(Gs),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ei(_t),yt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function $x(e,t){switch(ju(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(_t),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return nt(t),null;case 31:if(t.memoizedState!==null){if(An(t),t.alternate===null)throw Error(o(340));qs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(An(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));qs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Ct),null;case 4:return fe(),null;case 10:return Ei(t.type),null;case 22:case 23:return An(t),Iu(),e!==null&&H(Gs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ei(_t),null;case 25:return null;default:return null}}function yg(e,t){switch(ju(t),t.tag){case 3:Ei(_t),fe();break;case 26:case 27:case 5:nt(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&An(t);break;case 13:An(t);break;case 19:H(Ct);break;case 10:Ei(t.type);break;case 22:case 23:An(t),Iu(),e!==null&&H(Gs);break;case 24:Ei(_t)}}function so(e,t){try{var s=t.updateQueue,a=s!==null?s.lastEffect:null;if(a!==null){var l=a.next;s=l;do{if((s.tag&e)===e){a=void 0;var u=s.create,h=s.inst;a=u(),h.destroy=a}s=s.next}while(s!==l)}}catch(b){st(t,t.return,b)}}function is(e,t,s){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){var h=a.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,l=t;var R=s,G=b;try{G()}catch(P){st(l,R,P)}}}a=a.next}while(a!==u)}}catch(P){st(t,t.return,P)}}function bg(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{lp(t,s)}catch(a){st(e,e.return,a)}}}function vg(e,t,s){s.props=Zs(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(a){st(e,t,a)}}function ro(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof s=="function"?e.refCleanup=s(a):s.current=a}}catch(l){st(e,t,l)}}function ai(e,t){var s=e.ref,a=e.refCleanup;if(s!==null)if(typeof a=="function")try{a()}catch(l){st(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(l){st(e,t,l)}else s.current=null}function Sg(e){var t=e.type,s=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&a.focus();break e;case"img":s.src?a.src=s.src:s.srcSet&&(a.srcset=s.srcSet)}}catch(l){st(e,e.return,l)}}function _f(e,t,s){try{var a=e.stateNode;xE(a,e.type,s,t),a[en]=t}catch(l){st(e,e.return,l)}}function xg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&us(e.type)||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xg(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&&us(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nf(e,t,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=yi));else if(a!==4&&(a===27&&us(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Nf(e,t,s),e=e.sibling;e!==null;)Nf(e,t,s),e=e.sibling}function ql(e,t,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(a!==4&&(a===27&&us(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(ql(e,t,s),e=e.sibling;e!==null;)ql(e,t,s),e=e.sibling}function Eg(e){var t=e.stateNode,s=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);It(t,a,s),t[Ut]=e,t[en]=s}catch(u){st(e,e.return,u)}}var Ci=!1,Dt=!1,Df=!1,Tg=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function eE(e,t){if(e=e.containerInfo,$f=oc,e=jm(e),wu(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var l=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{s.nodeType,u.nodeType}catch{s=null;break e}var h=0,b=-1,R=-1,G=0,P=0,$=e,X=null;t:for(;;){for(var Z;$!==s||l!==0&&$.nodeType!==3||(b=h+l),$!==u||a!==0&&$.nodeType!==3||(R=h+a),$.nodeType===3&&(h+=$.nodeValue.length),(Z=$.firstChild)!==null;)X=$,$=Z;for(;;){if($===e)break t;if(X===s&&++G===l&&(b=h),X===u&&++P===a&&(R=h),(Z=$.nextSibling)!==null)break;$=X,X=$.parentNode}$=Z}s=b===-1||R===-1?null:{start:b,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(ed={focusedElem:e,selectionRange:s},oc=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)l=e[s],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,s=t,l=u.memoizedProps,u=u.memoizedState,a=s.stateNode;try{var ye=Zs(s.type,l);e=a.getSnapshotBeforeUpdate(ye,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(Te){st(s,s.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)id(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":id(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function wg(e,t,s){var a=s.flags;switch(s.tag){case 0:case 11:case 15:_i(e,s),a&4&&so(5,s);break;case 1:if(_i(e,s),a&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(h){st(s,s.return,h)}else{var l=Zs(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){st(s,s.return,h)}}a&64&&bg(s),a&512&&ro(s,s.return);break;case 3:if(_i(e,s),a&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{lp(e,t)}catch(h){st(s,s.return,h)}}break;case 27:t===null&&a&4&&Eg(s);case 26:case 5:_i(e,s),t===null&&a&4&&Sg(s),a&512&&ro(s,s.return);break;case 12:_i(e,s);break;case 31:_i(e,s),a&4&&Cg(e,s);break;case 13:_i(e,s),a&4&&Ag(e,s),a&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=cE.bind(null,s),_E(e,s))));break;case 22:if(a=s.memoizedState!==null||Ci,!a){t=t!==null&&t.memoizedState!==null||Dt,l=Ci;var u=Dt;Ci=a,(Dt=t)&&!u?Mi(e,s,(s.subtreeFlags&8772)!==0):_i(e,s),Ci=l,Dt=u}break;case 30:break;default:_i(e,s)}}function Rg(e){var t=e.alternate;t!==null&&(e.alternate=null,Rg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ou(t)),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 bt=null,pn=!1;function Ai(e,t,s){for(s=s.child;s!==null;)Og(e,t,s),s=s.sibling}function Og(e,t,s){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(fn,s)}catch{}switch(s.tag){case 26:Dt||ai(s,t),Ai(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Dt||ai(s,t);var a=bt,l=pn;us(s.type)&&(bt=s.stateNode,pn=!1),Ai(e,t,s),po(s.stateNode),bt=a,pn=l;break;case 5:Dt||ai(s,t);case 6:if(a=bt,l=pn,bt=null,Ai(e,t,s),bt=a,pn=l,bt!==null)if(pn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(s.stateNode)}catch(u){st(s,t,u)}else try{bt.removeChild(s.stateNode)}catch(u){st(s,t,u)}break;case 18:bt!==null&&(pn?(e=bt,by(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ia(e)):by(bt,s.stateNode));break;case 4:a=bt,l=pn,bt=s.stateNode.containerInfo,pn=!0,Ai(e,t,s),bt=a,pn=l;break;case 0:case 11:case 14:case 15:is(2,s,t),Dt||is(4,s,t),Ai(e,t,s);break;case 1:Dt||(ai(s,t),a=s.stateNode,typeof a.componentWillUnmount=="function"&&vg(s,t,a)),Ai(e,t,s);break;case 21:Ai(e,t,s);break;case 22:Dt=(a=Dt)||s.memoizedState!==null,Ai(e,t,s),Dt=a;break;default:Ai(e,t,s)}}function Cg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ia(e)}catch(s){st(t,t.return,s)}}}function Ag(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ia(e)}catch(s){st(t,t.return,s)}}function tE(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tg),t;default:throw Error(o(435,e.tag))}}function Yl(e,t){var s=tE(e);t.forEach(function(a){if(!s.has(a)){s.add(a);var l=uE.bind(null,e,a);a.then(l,l)}})}function gn(e,t){var s=t.deletions;if(s!==null)for(var a=0;a<s.length;a++){var l=s[a],u=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(us(b.type)){bt=b.stateNode,pn=!1;break e}break;case 5:bt=b.stateNode,pn=!1;break e;case 3:case 4:bt=b.stateNode.containerInfo,pn=!0;break e}b=b.return}if(bt===null)throw Error(o(160));Og(u,h,l),bt=null,pn=!1,u=l.alternate,u!==null&&(u.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_g(t,e),t=t.sibling}var Zn=null;function _g(e,t){var s=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(t,e),yn(e),a&4&&(is(3,e,e.return),so(3,e),is(5,e,e.return));break;case 1:gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),a&64&&Ci&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?a:s.concat(a))));break;case 26:var l=Zn;if(gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),a&4){var u=s!==null?s.memoizedState:null;if(a=e.memoizedState,s===null)if(a===null)if(e.stateNode===null){e:{a=e.type,s=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":u=l.getElementsByTagName("title")[0],(!u||u[Da]||u[Ut]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(a),l.head.insertBefore(u,l.querySelector("head > title"))),It(u,a,s),u[Ut]=e,Gt(u),a=u;break e;case"link":var h=_y("link","href",l).get(a+(s.href||""));if(h){for(var b=0;b<h.length;b++)if(u=h[b],u.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&u.getAttribute("rel")===(s.rel==null?null:s.rel)&&u.getAttribute("title")===(s.title==null?null:s.title)&&u.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){h.splice(b,1);break t}}u=l.createElement(a),It(u,a,s),l.head.appendChild(u);break;case"meta":if(h=_y("meta","content",l).get(a+(s.content||""))){for(b=0;b<h.length;b++)if(u=h[b],u.getAttribute("content")===(s.content==null?null:""+s.content)&&u.getAttribute("name")===(s.name==null?null:s.name)&&u.getAttribute("property")===(s.property==null?null:s.property)&&u.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&u.getAttribute("charset")===(s.charSet==null?null:s.charSet)){h.splice(b,1);break t}}u=l.createElement(a),It(u,a,s),l.head.appendChild(u);break;default:throw Error(o(468,a))}u[Ut]=e,Gt(u),a=u}e.stateNode=a}else My(l,e.type,e.stateNode);else e.stateNode=Ay(l,a,e.memoizedProps);else u!==a?(u===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):u.count--,a===null?My(l,e.type,e.stateNode):Ay(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&_f(e,e.memoizedProps,s.memoizedProps)}break;case 27:gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),s!==null&&a&4&&_f(e,e.memoizedProps,s.memoizedProps);break;case 5:if(gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),e.flags&32){l=e.stateNode;try{Or(l,"")}catch(ye){st(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,_f(e,l,s!==null?s.memoizedProps:l)),a&1024&&(Df=!0);break;case 6:if(gn(t,e),yn(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,s=e.stateNode;try{s.nodeValue=a}catch(ye){st(e,e.return,ye)}}break;case 3:if(ic=null,l=Zn,Zn=tc(t.containerInfo),gn(t,e),Zn=l,yn(e),a&4&&s!==null&&s.memoizedState.isDehydrated)try{ia(t.containerInfo)}catch(ye){st(e,e.return,ye)}Df&&(Df=!1,Mg(e));break;case 4:a=Zn,Zn=tc(e.stateNode.containerInfo),gn(t,e),yn(e),Zn=a;break;case 12:gn(t,e),yn(e);break;case 31:gn(t,e),yn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Yl(e,a)));break;case 13:gn(t,e),yn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Gl=ue()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Yl(e,a)));break;case 22:l=e.memoizedState!==null;var R=s!==null&&s.memoizedState!==null,G=Ci,P=Dt;if(Ci=G||l,Dt=P||R,gn(t,e),Dt=P,Ci=G,yn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(s===null||R||Ci||Dt||Ps(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){R=s=t;try{if(u=R.stateNode,l)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=R.stateNode;var $=R.memoizedProps.style,X=$!=null&&$.hasOwnProperty("display")?$.display:null;b.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ye){st(R,R.return,ye)}}}else if(t.tag===6){if(s===null){R=t;try{R.stateNode.nodeValue=l?"":R.memoizedProps}catch(ye){st(R,R.return,ye)}}}else if(t.tag===18){if(s===null){R=t;try{var Z=R.stateNode;l?vy(Z,!0):vy(R.stateNode,!1)}catch(ye){st(R,R.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(s=a.retryQueue,s!==null&&(a.retryQueue=null,Yl(e,s))));break;case 19:gn(t,e),yn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Yl(e,a)));break;case 30:break;case 21:break;default:gn(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{for(var s,a=e.return;a!==null;){if(xg(a)){s=a;break}a=a.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var l=s.stateNode,u=Mf(e);ql(e,u,l);break;case 5:var h=s.stateNode;s.flags&32&&(Or(h,""),s.flags&=-33);var b=Mf(e);ql(e,b,h);break;case 3:case 4:var R=s.stateNode.containerInfo,G=Mf(e);Nf(e,G,R);break;default:throw Error(o(161))}}catch(P){st(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _i(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wg(e,t.alternate,t),t=t.sibling}function Ps(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:is(4,t,t.return),Ps(t);break;case 1:ai(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&vg(t,t.return,s),Ps(t);break;case 27:po(t.stateNode);case 26:case 5:ai(t,t.return),Ps(t);break;case 22:t.memoizedState===null&&Ps(t);break;case 30:Ps(t);break;default:Ps(t)}e=e.sibling}}function Mi(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Mi(l,u,s),so(4,u);break;case 1:if(Mi(l,u,s),a=u,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(G){st(a,a.return,G)}if(a=u,l=a.updateQueue,l!==null){var b=a.stateNode;try{var R=l.shared.hiddenCallbacks;if(R!==null)for(l.shared.hiddenCallbacks=null,l=0;l<R.length;l++)op(R[l],b)}catch(G){st(a,a.return,G)}}s&&h&64&&bg(u),ro(u,u.return);break;case 27:Eg(u);case 26:case 5:Mi(l,u,s),s&&a===null&&h&4&&Sg(u),ro(u,u.return);break;case 12:Mi(l,u,s);break;case 31:Mi(l,u,s),s&&h&4&&Cg(l,u);break;case 13:Mi(l,u,s),s&&h&4&&Ag(l,u);break;case 22:u.memoizedState===null&&Mi(l,u,s),ro(u,u.return);break;case 30:break;default:Mi(l,u,s)}t=t.sibling}}function zf(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Xa(s))}function kf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xa(e))}function Pn(e,t,s,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ng(e,t,s,a),t=t.sibling}function Ng(e,t,s,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Pn(e,t,s,a),l&2048&&so(9,t);break;case 1:Pn(e,t,s,a);break;case 3:Pn(e,t,s,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xa(e)));break;case 12:if(l&2048){Pn(e,t,s,a),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,b=u.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){st(t,t.return,R)}}else Pn(e,t,s,a);break;case 31:Pn(e,t,s,a);break;case 13:Pn(e,t,s,a);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?Pn(e,t,s,a):ao(e,t):u._visibility&2?Pn(e,t,s,a):(u._visibility|=2,Fr(e,t,s,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&zf(h,t);break;case 24:Pn(e,t,s,a),l&2048&&kf(t.alternate,t);break;default:Pn(e,t,s,a)}}function Fr(e,t,s,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,b=s,R=a,G=h.flags;switch(h.tag){case 0:case 11:case 15:Fr(u,h,b,R,l),so(8,h);break;case 23:break;case 22:var P=h.stateNode;h.memoizedState!==null?P._visibility&2?Fr(u,h,b,R,l):ao(u,h):(P._visibility|=2,Fr(u,h,b,R,l)),l&&G&2048&&zf(h.alternate,h);break;case 24:Fr(u,h,b,R,l),l&&G&2048&&kf(h.alternate,h);break;default:Fr(u,h,b,R,l)}t=t.sibling}}function ao(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,a=t,l=a.flags;switch(a.tag){case 22:ao(s,a),l&2048&&zf(a.alternate,a);break;case 24:ao(s,a),l&2048&&kf(a.alternate,a);break;default:ao(s,a)}t=t.sibling}}var oo=8192;function Kr(e,t,s){if(e.subtreeFlags&oo)for(e=e.child;e!==null;)Dg(e,t,s),e=e.sibling}function Dg(e,t,s){switch(e.tag){case 26:Kr(e,t,s),e.flags&oo&&e.memoizedState!==null&&YE(s,Zn,e.memoizedState,e.memoizedProps);break;case 5:Kr(e,t,s);break;case 3:case 4:var a=Zn;Zn=tc(e.stateNode.containerInfo),Kr(e,t,s),Zn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=oo,oo=16777216,Kr(e,t,s),oo=a):Kr(e,t,s));break;default:Kr(e,t,s)}}function zg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function lo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var a=t[s];Qt=a,jg(a,e)}zg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kg(e),e=e.sibling}function kg(e){switch(e.tag){case 0:case 11:case 15:lo(e),e.flags&2048&&is(9,e,e.return);break;case 3:lo(e);break;case 12:lo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):lo(e);break;default:lo(e)}}function Vl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var a=t[s];Qt=a,jg(a,e)}zg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:is(8,t,t.return),Vl(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function jg(e,t){for(;Qt!==null;){var s=Qt;switch(s.tag){case 0:case 11:case 15:is(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var a=s.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Xa(s.memoizedState.cache)}if(a=s.child,a!==null)a.return=s,Qt=a;else e:for(s=e;Qt!==null;){a=Qt;var l=a.sibling,u=a.return;if(Rg(a),a===s){Qt=null;break e}if(l!==null){l.return=u,Qt=l;break e}Qt=u}}}var nE={getCacheForType:function(e){var t=Zt(_t),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Zt(_t).controller.signal}},iE=typeof WeakMap=="function"?WeakMap:Map,We=0,ct=null,Ue=null,He=0,it=0,_n=null,ss=!1,Zr=!1,jf=!1,Ni=0,Tt=0,rs=0,Is=0,Uf=0,Mn=0,Pr=0,co=null,bn=null,Lf=!1,Gl=0,Ug=0,Ql=1/0,Xl=null,as=null,Lt=0,os=null,Ir=null,Di=0,Bf=0,Hf=null,Lg=null,uo=0,qf=null;function Nn(){return(We&2)!==0&&He!==0?He&-He:N.T!==null?Ff():Wo()}function Bg(){if(Mn===0)if((He&536870912)===0||Ge){var e=Fe;Fe<<=1,(Fe&3932160)===0&&(Fe=262144),Mn=e}else Mn=536870912;return e=Cn.current,e!==null&&(e.flags|=32),Mn}function vn(e,t,s){(e===ct&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Jr(e,0),ls(e,He,Mn,!1)),dn(e,s),((We&2)===0||e!==ct)&&(e===ct&&((We&2)===0&&(Is|=s),Tt===4&&ls(e,He,Mn,!1)),oi(e))}function Hg(e,t,s){if((We&6)!==0)throw Error(o(327));var a=!s&&(t&127)===0&&(t&e.expiredLanes)===0||an(e,t),l=a?aE(e,t):Vf(e,t,!0),u=a;do{if(l===0){Zr&&!a&&ls(e,t,0,!1);break}else{if(s=e.current.alternate,u&&!sE(s)){l=Vf(e,t,!1),u=!1;continue}if(l===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var b=e;l=co;var R=b.current.memoizedState.isDehydrated;if(R&&(Jr(b,h).flags|=256),h=Vf(b,h,!1),h!==2){if(jf&&!R){b.errorRecoveryDisabledLanes|=u,Is|=u,l=4;break e}u=bn,bn=l,u!==null&&(bn===null?bn=u:bn.push.apply(bn,u))}l=h}if(u=!1,l!==2)continue}}if(l===1){Jr(e,0),ls(e,t,0,!0);break}e:{switch(a=e,u=l,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ls(a,t,Mn,!ss);break e;case 2:bn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(l=Gl+300-ue(),10<l)){if(ls(a,t,Mn,!ss),Ft(a,0,!0)!==0)break e;Di=t,a.timeoutHandle=gy(qg.bind(null,a,s,bn,Xl,Lf,t,Mn,Is,Pr,ss,u,"Throttled",-0,0),l);break e}qg(a,s,bn,Xl,Lf,t,Mn,Is,Pr,ss,u,null,-0,0)}}break}while(!0);oi(e)}function qg(e,t,s,a,l,u,h,b,R,G,P,$,X,Z){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yi},Dg(t,u,$);var ye=(u&62914560)===u?Gl-ue():(u&4194048)===u?Ug-ue():0;if(ye=VE($,ye),ye!==null){Di=u,e.cancelPendingCommit=ye(Zg.bind(null,e,t,u,s,a,l,h,b,R,P,$,null,X,Z)),ls(e,u,h,!G);return}}Zg(e,t,u,s,a,l,h,b,R)}function sE(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var a=0;a<s.length;a++){var l=s[a],u=l.getSnapshot;l=l.value;try{if(!Rn(u(),l))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ls(e,t,s,a){t&=~Uf,t&=~Is,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var u=31-Yt(l),h=1<<u;a[u]=-1,l&=~h}s!==0&&yr(e,s,t)}function Fl(){return(We&6)===0?(fo(0),!1):!0}function Yf(){if(Ue!==null){if(it===0)var e=Ue.return;else e=Ue,xi=Ys=null,nf(e),Yr=null,Ka=0,e=Ue;for(;e!==null;)yg(e.alternate,e),e=e.return;Ue=null}}function Jr(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,wE(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Di=0,Yf(),ct=e,Ue=s=vi(e.current,null),He=t,it=0,_n=null,ss=!1,Zr=an(e,t),jf=!1,Pr=Mn=Uf=Is=rs=Tt=0,bn=co=null,Lf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Yt(a),u=1<<l;t|=e[l],a&=~u}return Ni=t,hl(),s}function Yg(e,t){Ae=null,N.H=to,t===qr||t===xl?(t=ip(),it=3):t===Qu?(t=ip(),it=4):it=t===vf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_n=t,Ue===null&&(Tt=1,jl(e,Ln(t,e.current)))}function Vg(){var e=Cn.current;return e===null?!0:(He&4194048)===He?Yn===null:(He&62914560)===He||(He&536870912)!==0?e===Yn:!1}function Gg(){var e=N.H;return N.H=to,e===null?to:e}function Qg(){var e=N.A;return N.A=nE,e}function Kl(){Tt=4,ss||(He&4194048)!==He&&Cn.current!==null||(Zr=!0),(rs&134217727)===0&&(Is&134217727)===0||ct===null||ls(ct,He,Mn,!1)}function Vf(e,t,s){var a=We;We|=2;var l=Gg(),u=Qg();(ct!==e||He!==t)&&(Xl=null,Jr(e,t)),t=!1;var h=Tt;e:do try{if(it!==0&&Ue!==null){var b=Ue,R=_n;switch(it){case 8:Yf(),h=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var G=it;if(it=0,_n=null,Wr(e,b,R,G),s&&Zr){h=0;break e}break;default:G=it,it=0,_n=null,Wr(e,b,R,G)}}rE(),h=Tt;break}catch(P){Yg(e,P)}while(!0);return t&&e.shellSuspendCounter++,xi=Ys=null,We=a,N.H=l,N.A=u,Ue===null&&(ct=null,He=0,hl()),h}function rE(){for(;Ue!==null;)Xg(Ue)}function aE(e,t){var s=We;We|=2;var a=Gg(),l=Qg();ct!==e||He!==t?(Xl=null,Ql=ue()+500,Jr(e,t)):Zr=an(e,t);e:do try{if(it!==0&&Ue!==null){t=Ue;var u=_n;t:switch(it){case 1:it=0,_n=null,Wr(e,t,u,1);break;case 2:case 9:if(tp(u)){it=0,_n=null,Fg(t);break}t=function(){it!==2&&it!==9||ct!==e||(it=7),oi(e)},u.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:tp(u)?(it=0,_n=null,Fg(t)):(it=0,_n=null,Wr(e,t,u,7));break;case 5:var h=null;switch(Ue.tag){case 26:h=Ue.memoizedState;case 5:case 27:var b=Ue;if(h?Ny(h):b.stateNode.complete){it=0,_n=null;var R=b.sibling;if(R!==null)Ue=R;else{var G=b.return;G!==null?(Ue=G,Zl(G)):Ue=null}break t}}it=0,_n=null,Wr(e,t,u,5);break;case 6:it=0,_n=null,Wr(e,t,u,6);break;case 8:Yf(),Tt=6;break e;default:throw Error(o(462))}}oE();break}catch(P){Yg(e,P)}while(!0);return xi=Ys=null,N.H=a,N.A=l,We=s,Ue!==null?0:(ct=null,He=0,hl(),Tt)}function oE(){for(;Ue!==null&&!je();)Xg(Ue)}function Xg(e){var t=pg(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,t===null?Zl(e):Ue=t}function Fg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=cg(s,t,t.pendingProps,t.type,void 0,He);break;case 11:t=cg(s,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:nf(t);default:yg(s,t),t=Ue=Qm(t,Ni),t=pg(s,t,Ni)}e.memoizedProps=e.pendingProps,t===null?Zl(e):Ue=t}function Wr(e,t,s,a){xi=Ys=null,nf(t),Yr=null,Ka=0;var l=t.return;try{if(Px(e,l,t,s,He)){Tt=1,jl(e,Ln(s,e.current)),Ue=null;return}}catch(u){if(l!==null)throw Ue=l,u;Tt=1,jl(e,Ln(s,e.current)),Ue=null;return}t.flags&32768?(Ge||a===1?e=!0:Zr||(He&536870912)!==0?e=!1:(ss=e=!0,(a===2||a===9||a===3||a===6)&&(a=Cn.current,a!==null&&a.tag===13&&(a.flags|=16384))),Kg(t,e)):Zl(t)}function Zl(e){var t=e;do{if((t.flags&32768)!==0){Kg(t,ss);return}e=t.return;var s=Wx(t.alternate,t,Ni);if(s!==null){Ue=s;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);Tt===0&&(Tt=5)}function Kg(e,t){do{var s=$x(e.alternate,e);if(s!==null){s.flags&=32767,Ue=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=s}while(e!==null);Tt=6,Ue=null}function Zg(e,t,s,a,l,u,h,b,R){e.cancelPendingCommit=null;do Pl();while(Lt!==0);if((We&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=_u,Na(e,s,u,h,b,R),e===ct&&(Ue=ct=null,He=0),Ir=t,os=e,Di=s,Bf=u,Hf=l,Lg=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fE(pt,function(){return $g(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=N.T,N.T=null,l=Q.p,Q.p=2,h=We,We|=4;try{eE(e,t,s)}finally{We=h,Q.p=l,N.T=a}}Lt=1,Pg(),Ig(),Jg()}}function Pg(){if(Lt===1){Lt=0;var e=os,t=Ir,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null;var a=Q.p;Q.p=2;var l=We;We|=4;try{_g(t,e);var u=ed,h=jm(e.containerInfo),b=u.focusedElem,R=u.selectionRange;if(h!==b&&b&&b.ownerDocument&&km(b.ownerDocument.documentElement,b)){if(R!==null&&wu(b)){var G=R.start,P=R.end;if(P===void 0&&(P=G),"selectionStart"in b)b.selectionStart=G,b.selectionEnd=Math.min(P,b.value.length);else{var $=b.ownerDocument||document,X=$&&$.defaultView||window;if(X.getSelection){var Z=X.getSelection(),ye=b.textContent.length,Te=Math.min(R.start,ye),ot=R.end===void 0?Te:Math.min(R.end,ye);!Z.extend&&Te>ot&&(h=ot,ot=Te,Te=h);var L=zm(b,Te),M=zm(b,ot);if(L&&M&&(Z.rangeCount!==1||Z.anchorNode!==L.node||Z.anchorOffset!==L.offset||Z.focusNode!==M.node||Z.focusOffset!==M.offset)){var V=$.createRange();V.setStart(L.node,L.offset),Z.removeAllRanges(),Te>ot?(Z.addRange(V),Z.extend(M.node,M.offset)):(V.setEnd(M.node,M.offset),Z.addRange(V))}}}}for($=[],Z=b;Z=Z.parentNode;)Z.nodeType===1&&$.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<$.length;b++){var J=$[b];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}oc=!!$f,ed=$f=null}finally{We=l,Q.p=a,N.T=s}}e.current=t,Lt=2}}function Ig(){if(Lt===2){Lt=0;var e=os,t=Ir,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=N.T,N.T=null;var a=Q.p;Q.p=2;var l=We;We|=4;try{wg(e,t.alternate,t)}finally{We=l,Q.p=a,N.T=s}}Lt=3}}function Jg(){if(Lt===4||Lt===3){Lt=0,xt();var e=os,t=Ir,s=Di,a=Lg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,Ir=os=null,Wg(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(as=null),vr(s),t=t.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(fn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=N.T,l=Q.p,Q.p=2,N.T=null;try{for(var u=e.onRecoverableError,h=0;h<a.length;h++){var b=a[h];u(b.value,{componentStack:b.stack})}}finally{N.T=t,Q.p=l}}(Di&3)!==0&&Pl(),oi(e),l=e.pendingLanes,(s&261930)!==0&&(l&42)!==0?e===qf?uo++:(uo=0,qf=e):uo=0,fo(0)}}function Wg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xa(t)))}function Pl(){return Pg(),Ig(),Jg(),$g()}function $g(){if(Lt!==5)return!1;var e=os,t=Bf;Bf=0;var s=vr(Di),a=N.T,l=Q.p;try{Q.p=32>s?32:s,N.T=null,s=Hf,Hf=null;var u=os,h=Di;if(Lt=0,Ir=os=null,Di=0,(We&6)!==0)throw Error(o(331));var b=We;if(We|=4,kg(u.current),Ng(u,u.current,h,s),We=b,fo(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(fn,u)}catch{}return!0}finally{Q.p=l,N.T=a,Wg(e,t)}}function ey(e,t,s){t=Ln(s,t),t=bf(e.stateNode,t,2),e=es(e,t,2),e!==null&&(dn(e,2),oi(e))}function st(e,t,s){if(e.tag===3)ey(e,e,s);else for(;t!==null;){if(t.tag===3){ey(t,e,s);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(as===null||!as.has(a))){e=Ln(s,e),s=tg(2),a=es(t,s,2),a!==null&&(ng(s,a,t,e),dn(a,2),oi(a));break}}t=t.return}}function Gf(e,t,s){var a=e.pingCache;if(a===null){a=e.pingCache=new iE;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(s)||(jf=!0,l.add(s),e=lE.bind(null,e,t,s),t.then(e,e))}function lE(e,t,s){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,ct===e&&(He&s)===s&&(Tt===4||Tt===3&&(He&62914560)===He&&300>ue()-Gl?(We&2)===0&&Jr(e,0):Uf|=s,Pr===He&&(Pr=0)),oi(e)}function ty(e,t){t===0&&(t=ni()),e=Bs(e,t),e!==null&&(dn(e,t),oi(e))}function cE(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),ty(e,s)}function uE(e,t){var s=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(s=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),ty(e,s)}function fE(e,t){return mt(e,t)}var Il=null,$r=null,Qf=!1,Jl=!1,Xf=!1,cs=0;function oi(e){e!==$r&&e.next===null&&($r===null?Il=$r=e:$r=$r.next=e),Jl=!0,Qf||(Qf=!0,hE())}function fo(e,t){if(!Xf&&Jl){Xf=!0;do for(var s=!1,a=Il;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var u=0;else{var h=a.suspendedLanes,b=a.pingedLanes;u=(1<<31-Yt(42|e)+1)-1,u&=l&~(h&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(s=!0,ry(a,u))}else u=He,u=Ft(a,a===ct?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||an(a,u)||(s=!0,ry(a,u));a=a.next}while(s);Xf=!1}}function dE(){ny()}function ny(){Jl=Qf=!1;var e=0;cs!==0&&TE()&&(e=cs);for(var t=ue(),s=null,a=Il;a!==null;){var l=a.next,u=iy(a,t);u===0?(a.next=null,s===null?Il=l:s.next=l,l===null&&($r=s)):(s=a,(e!==0||(u&3)!==0)&&(Jl=!0)),a=l}Lt!==0&&Lt!==5||fo(e),cs!==0&&(cs=0)}function iy(e,t){for(var s=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Yt(u),b=1<<h,R=l[h];R===-1?((b&s)===0||(b&a)!==0)&&(l[h]=wn(b,t)):R<=t&&(e.expiredLanes|=b),u&=~b}if(t=ct,s=He,s=Ft(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,s===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&dt(a),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||an(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(a!==null&&dt(a),vr(s)){case 2:case 8:s=Be;break;case 32:s=pt;break;case 268435456:s=sn;break;default:s=pt}return a=sy.bind(null,e),s=mt(s,a),e.callbackPriority=t,e.callbackNode=s,t}return a!==null&&a!==null&&dt(a),e.callbackPriority=2,e.callbackNode=null,2}function sy(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Pl()&&e.callbackNode!==s)return null;var a=He;return a=Ft(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Hg(e,a,t),iy(e,ue()),e.callbackNode!=null&&e.callbackNode===s?sy.bind(null,e):null)}function ry(e,t){if(Pl())return null;Hg(e,t,!0)}function hE(){RE(function(){(We&6)!==0?mt(ht,dE):ny()})}function Ff(){if(cs===0){var e=Br;e===0&&(e=pi,pi<<=1,(pi&261888)===0&&(pi=256)),cs=e}return cs}function ay(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rl(""+e)}function oy(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function mE(e,t,s,a,l){if(t==="submit"&&s&&s.stateNode===l){var u=ay((l[en]||null).action),h=a.submitter;h&&(t=(t=h[en]||null)?ay(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var b=new cl("action","action",null,a,l);e.push({event:b,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(cs!==0){var R=h?oy(l,h):new FormData(l);df(s,{pending:!0,data:R,method:l.method,action:u},null,R)}}else typeof u=="function"&&(b.preventDefault(),R=h?oy(l,h):new FormData(l),df(s,{pending:!0,data:R,method:l.method,action:u},u,R))},currentTarget:l}]})}}for(var Kf=0;Kf<Au.length;Kf++){var Zf=Au[Kf],pE=Zf.toLowerCase(),gE=Zf[0].toUpperCase()+Zf.slice(1);Kn(pE,"on"+gE)}Kn(Bm,"onAnimationEnd"),Kn(Hm,"onAnimationIteration"),Kn(qm,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(Dx,"onTransitionRun"),Kn(zx,"onTransitionStart"),Kn(kx,"onTransitionCancel"),Kn(Ym,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),ks("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ks("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ks("onBeforeInput",["compositionend","keypress","textInput","paste"]),ks("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ks("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ks("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ho="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(" "),yE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ho));function ly(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var a=e[s],l=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var h=a.length-1;0<=h;h--){var b=a[h],R=b.instance,G=b.currentTarget;if(b=b.listener,R!==u&&l.isPropagationStopped())break e;u=b,l.currentTarget=G;try{u(l)}catch(P){dl(P)}l.currentTarget=null,u=R}else for(h=0;h<a.length;h++){if(b=a[h],R=b.instance,G=b.currentTarget,b=b.listener,R!==u&&l.isPropagationStopped())break e;u=b,l.currentTarget=G;try{u(l)}catch(P){dl(P)}l.currentTarget=null,u=R}}}}function Le(e,t){var s=t[Sr];s===void 0&&(s=t[Sr]=new Set);var a=e+"__bubble";s.has(a)||(cy(t,e,2,!1),s.add(a))}function Pf(e,t,s){var a=0;t&&(a|=4),cy(s,e,a,t)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function If(e){if(!e[Wl]){e[Wl]=!0,nm.forEach(function(s){s!=="selectionchange"&&(yE.has(s)||Pf(s,!1,e),Pf(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wl]||(t[Wl]=!0,Pf("selectionchange",!1,t))}}function cy(e,t,s,a){switch(By(t)){case 2:var l=XE;break;case 8:l=FE;break;default:l=fd}s=l.bind(null,t,s,e),l=void 0,!pu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,s,{capture:!0,passive:l}):e.addEventListener(t,s,!0):l!==void 0?e.addEventListener(t,s,{passive:l}):e.addEventListener(t,s,!1)}function Jf(e,t,s,a,l){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var h=a.tag;if(h===3||h===4){var b=a.stateNode.containerInfo;if(b===l)break;if(h===4)for(h=a.return;h!==null;){var R=h.tag;if((R===3||R===4)&&h.stateNode.containerInfo===l)return;h=h.return}for(;b!==null;){if(h=xr(b),h===null)return;if(R=h.tag,R===5||R===6||R===26||R===27){a=u=h;continue e}b=b.parentNode}}a=a.return}mm(function(){var G=u,P=hu(s),$=[];e:{var X=Vm.get(e);if(X!==void 0){var Z=cl,ye=e;switch(e){case"keypress":if(ol(s)===0)break e;case"keydown":case"keyup":Z=ux;break;case"focusin":ye="focus",Z=vu;break;case"focusout":ye="blur",Z=vu;break;case"beforeblur":case"afterblur":Z=vu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=ym;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=WS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=hx;break;case Bm:case Hm:case qm:Z=tx;break;case Ym:Z=px;break;case"scroll":case"scrollend":Z=IS;break;case"wheel":Z=yx;break;case"copy":case"cut":case"paste":Z=ix;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=vm;break;case"toggle":case"beforetoggle":Z=vx}var Te=(t&4)!==0,ot=!Te&&(e==="scroll"||e==="scrollend"),L=Te?X!==null?X+"Capture":null:X;Te=[];for(var M=G,V;M!==null;){var J=M;if(V=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||V===null||L===null||(J=ka(M,L),J!=null&&Te.push(mo(M,J,V))),ot)break;M=M.return}0<Te.length&&(X=new Z(X,ye,null,s,P),$.push({event:X,listeners:Te}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",X&&s!==du&&(ye=s.relatedTarget||s.fromElement)&&(xr(ye)||ye[Fi]))break e;if((Z||X)&&(X=P.window===P?P:(X=P.ownerDocument)?X.defaultView||X.parentWindow:window,Z?(ye=s.relatedTarget||s.toElement,Z=G,ye=ye?xr(ye):null,ye!==null&&(ot=f(ye),Te=ye.tag,ye!==ot||Te!==5&&Te!==27&&Te!==6)&&(ye=null)):(Z=null,ye=G),Z!==ye)){if(Te=ym,J="onMouseLeave",L="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(Te=vm,J="onPointerLeave",L="onPointerEnter",M="pointer"),ot=Z==null?X:za(Z),V=ye==null?X:za(ye),X=new Te(J,M+"leave",Z,s,P),X.target=ot,X.relatedTarget=V,J=null,xr(P)===G&&(Te=new Te(L,M+"enter",ye,s,P),Te.target=V,Te.relatedTarget=ot,J=Te),ot=J,Z&&ye)t:{for(Te=bE,L=Z,M=ye,V=0,J=L;J;J=Te(J))V++;J=0;for(var Se=M;Se;Se=Te(Se))J++;for(;0<V-J;)L=Te(L),V--;for(;0<J-V;)M=Te(M),J--;for(;V--;){if(L===M||M!==null&&L===M.alternate){Te=L;break t}L=Te(L),M=Te(M)}Te=null}else Te=null;Z!==null&&uy($,X,Z,Te,!1),ye!==null&&ot!==null&&uy($,ot,ye,Te,!0)}}e:{if(X=G?za(G):window,Z=X.nodeName&&X.nodeName.toLowerCase(),Z==="select"||Z==="input"&&X.type==="file")var Pe=Cm;else if(Rm(X))if(Am)Pe=_x;else{Pe=Cx;var be=Ox}else Z=X.nodeName,!Z||Z.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?G&&fu(G.elementType)&&(Pe=Cm):Pe=Ax;if(Pe&&(Pe=Pe(e,G))){Om($,Pe,s,P);break e}be&&be(e,X,G),e==="focusout"&&G&&X.type==="number"&&G.memoizedProps.value!=null&&uu(X,"number",X.value)}switch(be=G?za(G):window,e){case"focusin":(Rm(be)||be.contentEditable==="true")&&(Mr=be,Ru=G,Va=null);break;case"focusout":Va=Ru=Mr=null;break;case"mousedown":Ou=!0;break;case"contextmenu":case"mouseup":case"dragend":Ou=!1,Um($,s,P);break;case"selectionchange":if(Nx)break;case"keydown":case"keyup":Um($,s,P)}var _e;if(xu)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else _r?Tm(e,s)&&(qe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(qe="onCompositionStart");qe&&(Sm&&s.locale!=="ko"&&(_r||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&_r&&(_e=pm()):(Ki=P,gu="value"in Ki?Ki.value:Ki.textContent,_r=!0)),be=$l(G,qe),0<be.length&&(qe=new bm(qe,e,null,s,P),$.push({event:qe,listeners:be}),_e?qe.data=_e:(_e=wm(s),_e!==null&&(qe.data=_e)))),(_e=xx?Ex(e,s):Tx(e,s))&&(qe=$l(G,"onBeforeInput"),0<qe.length&&(be=new bm("onBeforeInput","beforeinput",null,s,P),$.push({event:be,listeners:qe}),be.data=_e)),mE($,e,G,s,P)}ly($,t)})}function mo(e,t,s){return{instance:e,listener:t,currentTarget:s}}function $l(e,t){for(var s=t+"Capture",a=[];e!==null;){var l=e,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=ka(e,s),l!=null&&a.unshift(mo(e,l,u)),l=ka(e,t),l!=null&&a.push(mo(e,l,u))),e.tag===3)return a;e=e.return}return[]}function bE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uy(e,t,s,a,l){for(var u=t._reactName,h=[];s!==null&&s!==a;){var b=s,R=b.alternate,G=b.stateNode;if(b=b.tag,R!==null&&R===a)break;b!==5&&b!==26&&b!==27||G===null||(R=G,l?(G=ka(s,u),G!=null&&h.unshift(mo(s,G,R))):l||(G=ka(s,u),G!=null&&h.push(mo(s,G,R)))),s=s.return}h.length!==0&&e.push({event:t,listeners:h})}var vE=/\r\n?/g,SE=/\u0000|\uFFFD/g;function fy(e){return(typeof e=="string"?e:""+e).replace(vE,`
49
- `).replace(SE,"")}function dy(e,t){return t=fy(t),fy(e)===t}function at(e,t,s,a,l,u){switch(s){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Or(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Or(e,""+a);break;case"className":il(e,"class",a);break;case"tabIndex":il(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":il(e,s,a);break;case"style":dm(e,a,u);break;case"data":if(t!=="object"){il(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(s);break}a=rl(""+a),e.setAttribute(s,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(s,"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 u=="function"&&(s==="formAction"?(t!=="input"&&at(e,t,"name",l.name,l,null),at(e,t,"formEncType",l.formEncType,l,null),at(e,t,"formMethod",l.formMethod,l,null),at(e,t,"formTarget",l.formTarget,l,null)):(at(e,t,"encType",l.encType,l,null),at(e,t,"method",l.method,l,null),at(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(s);break}a=rl(""+a),e.setAttribute(s,a);break;case"onClick":a!=null&&(e.onclick=yi);break;case"onScroll":a!=null&&Le("scroll",e);break;case"onScrollEnd":a!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(s=a.__html,s!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}s=rl(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(s,""+a):e.removeAttribute(s);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":a===!0?e.setAttribute(s,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(s,a):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(s,a):e.removeAttribute(s);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(s):e.setAttribute(s,a);break;case"popover":Le("beforetoggle",e),Le("toggle",e),nl(e,"popover",a);break;case"xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":nl(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ZS.get(s)||s,nl(e,s,a))}}function Wf(e,t,s,a,l,u){switch(s){case"style":dm(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(s=a.__html,s!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof a=="string"?Or(e,a):(typeof a=="number"||typeof a=="bigint")&&Or(e,""+a);break;case"onScroll":a!=null&&Le("scroll",e);break;case"onScrollEnd":a!=null&&Le("scrollend",e);break;case"onClick":a!=null&&(e.onclick=yi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!im.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(l=s.endsWith("Capture"),t=s.slice(2,l?s.length-7:void 0),u=e[en]||null,u=u!=null?u[s]:null,typeof u=="function"&&e.removeEventListener(t,u,l),typeof a=="function")){typeof u!="function"&&u!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,a,l);break e}s in e?e[s]=a:a===!0?e.setAttribute(s,""):nl(e,s,a)}}}function It(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var a=!1,l=!1,u;for(u in s)if(s.hasOwnProperty(u)){var h=s[u];if(h!=null)switch(u){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:at(e,t,u,h,s,null)}}l&&at(e,t,"srcSet",s.srcSet,s,null),a&&at(e,t,"src",s.src,s,null);return;case"input":Le("invalid",e);var b=u=h=l=null,R=null,G=null;for(a in s)if(s.hasOwnProperty(a)){var P=s[a];if(P!=null)switch(a){case"name":l=P;break;case"type":h=P;break;case"checked":R=P;break;case"defaultChecked":G=P;break;case"value":u=P;break;case"defaultValue":b=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:at(e,t,a,P,s,null)}}lm(e,u,b,R,G,h,l,!1);return;case"select":Le("invalid",e),a=h=u=null;for(l in s)if(s.hasOwnProperty(l)&&(b=s[l],b!=null))switch(l){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":a=b;default:at(e,t,l,b,s,null)}t=u,s=h,e.multiple=!!a,t!=null?Rr(e,!!a,t,!1):s!=null&&Rr(e,!!a,s,!0);return;case"textarea":Le("invalid",e),u=l=a=null;for(h in s)if(s.hasOwnProperty(h)&&(b=s[h],b!=null))switch(h){case"value":a=b;break;case"defaultValue":l=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:at(e,t,h,b,s,null)}um(e,a,l,u);return;case"option":for(R in s)if(s.hasOwnProperty(R)&&(a=s[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:at(e,t,R,a,s,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(a=0;a<ho.length;a++)Le(ho[a],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(G in s)if(s.hasOwnProperty(G)&&(a=s[G],a!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:at(e,t,G,a,s,null)}return;default:if(fu(t)){for(P in s)s.hasOwnProperty(P)&&(a=s[P],a!==void 0&&Wf(e,t,P,a,s,void 0));return}}for(b in s)s.hasOwnProperty(b)&&(a=s[b],a!=null&&at(e,t,b,a,s,null))}function xE(e,t,s,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,h=null,b=null,R=null,G=null,P=null;for(Z in s){var $=s[Z];if(s.hasOwnProperty(Z)&&$!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":R=$;default:a.hasOwnProperty(Z)||at(e,t,Z,null,a,$)}}for(var X in a){var Z=a[X];if($=s[X],a.hasOwnProperty(X)&&(Z!=null||$!=null))switch(X){case"type":u=Z;break;case"name":l=Z;break;case"checked":G=Z;break;case"defaultChecked":P=Z;break;case"value":h=Z;break;case"defaultValue":b=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(o(137,t));break;default:Z!==$&&at(e,t,X,Z,a,$)}}cu(e,h,b,R,G,P,u,l);return;case"select":Z=h=b=X=null;for(u in s)if(R=s[u],s.hasOwnProperty(u)&&R!=null)switch(u){case"value":break;case"multiple":Z=R;default:a.hasOwnProperty(u)||at(e,t,u,null,a,R)}for(l in a)if(u=a[l],R=s[l],a.hasOwnProperty(l)&&(u!=null||R!=null))switch(l){case"value":X=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==R&&at(e,t,l,u,a,R)}t=b,s=h,a=Z,X!=null?Rr(e,!!s,X,!1):!!a!=!!s&&(t!=null?Rr(e,!!s,t,!0):Rr(e,!!s,s?[]:"",!1));return;case"textarea":Z=X=null;for(b in s)if(l=s[b],s.hasOwnProperty(b)&&l!=null&&!a.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:at(e,t,b,null,a,l)}for(h in a)if(l=a[h],u=s[h],a.hasOwnProperty(h)&&(l!=null||u!=null))switch(h){case"value":X=l;break;case"defaultValue":Z=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(o(91));break;default:l!==u&&at(e,t,h,l,a,u)}cm(e,X,Z);return;case"option":for(var ye in s)if(X=s[ye],s.hasOwnProperty(ye)&&X!=null&&!a.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:at(e,t,ye,null,a,X)}for(R in a)if(X=a[R],Z=s[R],a.hasOwnProperty(R)&&X!==Z&&(X!=null||Z!=null))switch(R){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:at(e,t,R,X,a,Z)}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 Te in s)X=s[Te],s.hasOwnProperty(Te)&&X!=null&&!a.hasOwnProperty(Te)&&at(e,t,Te,null,a,X);for(G in a)if(X=a[G],Z=s[G],a.hasOwnProperty(G)&&X!==Z&&(X!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:at(e,t,G,X,a,Z)}return;default:if(fu(t)){for(var ot in s)X=s[ot],s.hasOwnProperty(ot)&&X!==void 0&&!a.hasOwnProperty(ot)&&Wf(e,t,ot,void 0,a,X);for(P in a)X=a[P],Z=s[P],!a.hasOwnProperty(P)||X===Z||X===void 0&&Z===void 0||Wf(e,t,P,X,a,Z);return}}for(var L in s)X=s[L],s.hasOwnProperty(L)&&X!=null&&!a.hasOwnProperty(L)&&at(e,t,L,null,a,X);for($ in a)X=a[$],Z=s[$],!a.hasOwnProperty($)||X===Z||X==null&&Z==null||at(e,t,$,X,a,Z)}function hy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function EE(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),a=0;a<s.length;a++){var l=s[a],u=l.transferSize,h=l.initiatorType,b=l.duration;if(u&&b&&hy(h)){for(h=0,b=l.responseEnd,a+=1;a<s.length;a++){var R=s[a],G=R.startTime;if(G>b)break;var P=R.transferSize,$=R.initiatorType;P&&hy($)&&(R=R.responseEnd,h+=P*(R<b?1:(b-G)/(R-G)))}if(--a,t+=8*(u+h)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var $f=null,ed=null;function ec(e){return e.nodeType===9?e:e.ownerDocument}function my(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 py(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function td(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nd=null;function TE(){var e=window.event;return e&&e.type==="popstate"?e===nd?!1:(nd=e,!0):(nd=null,!1)}var gy=typeof setTimeout=="function"?setTimeout:void 0,wE=typeof clearTimeout=="function"?clearTimeout:void 0,yy=typeof Promise=="function"?Promise:void 0,RE=typeof queueMicrotask=="function"?queueMicrotask:typeof yy<"u"?function(e){return yy.resolve(null).then(e).catch(OE)}:gy;function OE(e){setTimeout(function(){throw e})}function us(e){return e==="head"}function by(e,t){var s=t,a=0;do{var l=s.nextSibling;if(e.removeChild(s),l&&l.nodeType===8)if(s=l.data,s==="/$"||s==="/&"){if(a===0){e.removeChild(l),ia(t);return}a--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")a++;else if(s==="html")po(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,po(s);for(var u=s.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[Da]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||s.removeChild(u),u=h}}else s==="body"&&po(e.ownerDocument.body);s=l}while(s);ia(t)}function vy(e,t){var s=e;e=0;do{var a=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),a&&a.nodeType===8)if(s=a.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=a}while(s)}function id(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":id(s),ou(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function CE(e,t,s,a){for(;e.nodeType===1;){var l=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Da])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Vn(e.nextSibling),e===null)break}return null}function AE(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Vn(e.nextSibling),e===null))return null;return e}function Sy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function sd(e){return e.data==="$?"||e.data==="$~"}function rd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _E(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var a=function(){t(),s.removeEventListener("DOMContentLoaded",a)};s.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ad=null;function xy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Vn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Ey(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Ty(e,t,s){switch(t=ec(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function po(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ou(e)}var Gn=new Map,wy=new Set;function tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var zi=Q.d;Q.d={f:ME,r:NE,D:DE,C:zE,L:kE,m:jE,X:LE,S:UE,M:BE};function ME(){var e=zi.f(),t=Fl();return e||t}function NE(e){var t=Er(e);t!==null&&t.tag===5&&t.type==="form"?Yp(t):zi.r(e)}var ea=typeof document>"u"?null:document;function Ry(e,t,s){var a=ea;if(a&&typeof t=="string"&&t){var l=jn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof s=="string"&&(l+='[crossorigin="'+s+'"]'),wy.has(l)||(wy.add(l),e={rel:e,crossOrigin:s,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),It(t,"link",e),Gt(t),a.head.appendChild(t)))}}function DE(e){zi.D(e),Ry("dns-prefetch",e,null)}function zE(e,t){zi.C(e,t),Ry("preconnect",e,t)}function kE(e,t,s){zi.L(e,t,s);var a=ea;if(a&&e&&t){var l='link[rel="preload"][as="'+jn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(l+='[imagesrcset="'+jn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(l+='[imagesizes="'+jn(s.imageSizes)+'"]')):l+='[href="'+jn(e)+'"]';var u=l;switch(t){case"style":u=ta(e);break;case"script":u=na(e)}Gn.has(u)||(e=v({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Gn.set(u,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(go(u))||t==="script"&&a.querySelector(yo(u))||(t=a.createElement("link"),It(t,"link",e),Gt(t),a.head.appendChild(t)))}}function jE(e,t){zi.m(e,t);var s=ea;if(s&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+jn(a)+'"][href="'+jn(e)+'"]',u=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=na(e)}if(!Gn.has(u)&&(e=v({rel:"modulepreload",href:e},t),Gn.set(u,e),s.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(yo(u)))return}a=s.createElement("link"),It(a,"link",e),Gt(a),s.head.appendChild(a)}}}function UE(e,t,s){zi.S(e,t,s);var a=ea;if(a&&e){var l=Tr(a).hoistableStyles,u=ta(e);t=t||"default";var h=l.get(u);if(!h){var b={loading:0,preload:null};if(h=a.querySelector(go(u)))b.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Gn.get(u))&&od(e,s);var R=h=a.createElement("link");Gt(R),It(R,"link",e),R._p=new Promise(function(G,P){R.onload=G,R.onerror=P}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,nc(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:b},l.set(u,h)}}}function LE(e,t){zi.X(e,t);var s=ea;if(s&&e){var a=Tr(s).hoistableScripts,l=na(e),u=a.get(l);u||(u=s.querySelector(yo(l)),u||(e=v({src:e,async:!0},t),(t=Gn.get(l))&&ld(e,t),u=s.createElement("script"),Gt(u),It(u,"link",e),s.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(l,u))}}function BE(e,t){zi.M(e,t);var s=ea;if(s&&e){var a=Tr(s).hoistableScripts,l=na(e),u=a.get(l);u||(u=s.querySelector(yo(l)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Gn.get(l))&&ld(e,t),u=s.createElement("script"),Gt(u),It(u,"link",e),s.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(l,u))}}function Oy(e,t,s,a){var l=(l=ee.current)?tc(l):null;if(!l)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=ta(s.href),s=Tr(l).hoistableStyles,a=s.get(t),a||(a={type:"style",instance:null,count:0,state:null},s.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=ta(s.href);var u=Tr(l).hoistableStyles,h=u.get(e);if(h||(l=l.ownerDocument||l,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=l.querySelector(go(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Gn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Gn.set(e,s),u||HE(l,e,s,h.state))),t&&a===null)throw Error(o(528,""));return h}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=na(s),s=Tr(l).hoistableScripts,a=s.get(t),a||(a={type:"script",instance:null,count:0,state:null},s.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ta(e){return'href="'+jn(e)+'"'}function go(e){return'link[rel="stylesheet"]['+e+"]"}function Cy(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function HE(e,t,s,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),It(t,"link",s),Gt(t),e.head.appendChild(t))}function na(e){return'[src="'+jn(e)+'"]'}function yo(e){return"script[async]"+e}function Ay(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+jn(s.href)+'"]');if(a)return t.instance=a,Gt(a),a;var l=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Gt(a),It(a,"style",l),nc(a,s.precedence,e),t.instance=a;case"stylesheet":l=ta(s.href);var u=e.querySelector(go(l));if(u)return t.state.loading|=4,t.instance=u,Gt(u),u;a=Cy(s),(l=Gn.get(l))&&od(a,l),u=(e.ownerDocument||e).createElement("link"),Gt(u);var h=u;return h._p=new Promise(function(b,R){h.onload=b,h.onerror=R}),It(u,"link",a),t.state.loading|=4,nc(u,s.precedence,e),t.instance=u;case"script":return u=na(s.src),(l=e.querySelector(yo(u)))?(t.instance=l,Gt(l),l):(a=s,(l=Gn.get(u))&&(a=v({},s),ld(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),Gt(l),It(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,nc(a,s.precedence,e));return t.instance}function nc(e,t,s){for(var a=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,u=l,h=0;h<a.length;h++){var b=a[h];if(b.dataset.precedence===t)u=b;else if(u!==l)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function od(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ld(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ic=null;function _y(e,t,s){if(ic===null){var a=new Map,l=ic=new Map;l.set(s,a)}else l=ic,a=l.get(s),a||(a=new Map,l.set(s,a));if(a.has(e))return a;for(a.set(e,null),s=s.getElementsByTagName(e),l=0;l<s.length;l++){var u=s[l];if(!(u[Da]||u[Ut]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var b=a.get(h);b?b.push(u):a.set(h,[u])}}return a}function My(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function qE(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ny(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function YE(e,t,s,a){if(s.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var l=ta(a.href),u=t.querySelector(go(l));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=sc.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=u,Gt(u);return}u=t.ownerDocument||t,a=Cy(a),(l=Gn.get(l))&&od(a,l),u=u.createElement("link"),Gt(u);var h=u;h._p=new Promise(function(b,R){h.onload=b,h.onerror=R}),It(u,"link",a),s.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=sc.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var cd=0;function VE(e,t){return e.stylesheets&&e.count===0&&ac(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var a=setTimeout(function(){if(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&cd===0&&(cd=62500*EE());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>cd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ac(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var rc=null;function ac(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,rc=new Map,t.forEach(GE,e),rc=null,sc.call(e))}function GE(e,t){if(!(t.state.loading&4)){var s=rc.get(e);if(s)var a=s.get(null);else{s=new Map,rc.set(e,s);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var h=l[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(s.set(h.dataset.precedence,h),a=h)}a&&s.set(null,a)}l=t.instance,h=l.getAttribute("data-precedence"),u=s.get(h)||a,u===a&&s.set(null,l),s.set(h,l),this.count++,a=sc.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),u?u.parentNode.insertBefore(l,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var bo={$$typeof:j,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function QE(e,t,s,a,l,u,h,b,R){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=ii(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ii(0),this.hiddenUpdates=ii(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Dy(e,t,s,a,l,u,h,b,R,G,P,$){return e=new QE(e,t,s,h,R,G,P,$,b),t=1,u===!0&&(t|=24),u=On(3,null,null,t),e.current=u,u.stateNode=e,t=Yu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:s,cache:t},Xu(u),e}function zy(e){return e?(e=zr,e):zr}function ky(e,t,s,a,l,u){l=zy(l),a.context===null?a.context=l:a.pendingContext=l,a=$i(t),a.payload={element:s},u=u===void 0?null:u,u!==null&&(a.callback=u),s=es(e,a,t),s!==null&&(vn(s,e,t),Pa(s,e,t))}function jy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function ud(e,t){jy(e,t),(e=e.alternate)&&jy(e,t)}function Uy(e){if(e.tag===13||e.tag===31){var t=Bs(e,67108864);t!==null&&vn(t,e,67108864),ud(e,67108864)}}function Ly(e){if(e.tag===13||e.tag===31){var t=Nn();t=zs(t);var s=Bs(e,t);s!==null&&vn(s,e,t),ud(e,t)}}var oc=!0;function XE(e,t,s,a){var l=N.T;N.T=null;var u=Q.p;try{Q.p=2,fd(e,t,s,a)}finally{Q.p=u,N.T=l}}function FE(e,t,s,a){var l=N.T;N.T=null;var u=Q.p;try{Q.p=8,fd(e,t,s,a)}finally{Q.p=u,N.T=l}}function fd(e,t,s,a){if(oc){var l=dd(a);if(l===null)Jf(e,t,a,lc,s),Hy(e,a);else if(ZE(l,e,t,s,a))a.stopPropagation();else if(Hy(e,a),t&4&&-1<KE.indexOf(e)){for(;l!==null;){var u=Er(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=Vt(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var R=1<<31-Yt(h);b.entanglements[1]|=R,h&=~R}oi(u),(We&6)===0&&(Ql=ue()+500,fo(0))}}break;case 31:case 13:b=Bs(u,2),b!==null&&vn(b,u,2),Fl(),ud(u,2)}if(u=dd(a),u===null&&Jf(e,t,a,lc,s),u===l)break;l=u}l!==null&&a.stopPropagation()}else Jf(e,t,a,null,s)}}function dd(e){return e=hu(e),hd(e)}var lc=null;function hd(e){if(lc=null,e=xr(e),e!==null){var t=f(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=m(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return lc=e,null}function By(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(xe()){case ht:return 2;case Be:return 8;case pt:case jt:return 32;case sn:return 268435456;default:return 32}default:return 32}}var md=!1,fs=null,ds=null,hs=null,vo=new Map,So=new Map,ms=[],KE="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 Hy(e,t){switch(e){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":So.delete(t.pointerId)}}function xo(e,t,s,a,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:s,eventSystemFlags:a,nativeEvent:u,targetContainers:[l]},t!==null&&(t=Er(t),t!==null&&Uy(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function ZE(e,t,s,a,l){switch(t){case"focusin":return fs=xo(fs,e,t,s,a,l),!0;case"dragenter":return ds=xo(ds,e,t,s,a,l),!0;case"mouseover":return hs=xo(hs,e,t,s,a,l),!0;case"pointerover":var u=l.pointerId;return vo.set(u,xo(vo.get(u)||null,e,t,s,a,l)),!0;case"gotpointercapture":return u=l.pointerId,So.set(u,xo(So.get(u)||null,e,t,s,a,l)),!0}return!1}function qy(e){var t=xr(e.target);if(t!==null){var s=f(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,$o(e.priority,function(){Ly(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,$o(e.priority,function(){Ly(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=dd(e.nativeEvent);if(s===null){s=e.nativeEvent;var a=new s.constructor(s.type,s);du=a,s.target.dispatchEvent(a),du=null}else return t=Er(s),t!==null&&Uy(t),e.blockedOn=s,!1;t.shift()}return!0}function Yy(e,t,s){cc(e)&&s.delete(t)}function PE(){md=!1,fs!==null&&cc(fs)&&(fs=null),ds!==null&&cc(ds)&&(ds=null),hs!==null&&cc(hs)&&(hs=null),vo.forEach(Yy),So.forEach(Yy)}function uc(e,t){e.blockedOn===t&&(e.blockedOn=null,md||(md=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,PE)))}var fc=null;function Vy(e){fc!==e&&(fc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){fc===e&&(fc=null);for(var t=0;t<e.length;t+=3){var s=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(hd(a||s)===null)continue;break}var u=Er(s);u!==null&&(e.splice(t,3),t-=3,df(u,{pending:!0,data:l,method:s.method,action:a},a,l))}}))}function ia(e){function t(R){return uc(R,e)}fs!==null&&uc(fs,e),ds!==null&&uc(ds,e),hs!==null&&uc(hs,e),vo.forEach(t),So.forEach(t);for(var s=0;s<ms.length;s++){var a=ms[s];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ms.length&&(s=ms[0],s.blockedOn===null);)qy(s),s.blockedOn===null&&ms.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(a=0;a<s.length;a+=3){var l=s[a],u=s[a+1],h=l[en]||null;if(typeof u=="function")h||Vy(s);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(l=u,h=u[en]||null)b=h.formAction;else if(hd(l)!==null)continue}else b=h.action;typeof b=="function"?s[a+1]=b:(s.splice(a,3),a-=3),Vy(s)}}}function Gy(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return l=h})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(s,20)}function s(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function pd(e){this._internalRoot=e}dc.prototype.render=pd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,a=Nn();ky(s,a,e,t,null,null)},dc.prototype.unmount=pd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ky(e.current,2,null,e,null,null),Fl(),t[Fi]=null}};function dc(e){this._internalRoot=e}dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wo();e={blockedOn:null,target:e,priority:t};for(var s=0;s<ms.length&&t!==0&&t<ms[s].priority;s++);ms.splice(s,0,e),s===0&&qy(e)}};var Qy=i.version;if(Qy!=="19.2.7")throw Error(o(527,Qy,"19.2.7"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var IE={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hc.isDisabled&&hc.supportsFiber)try{fn=hc.inject(IE),qt=hc}catch{}}return To.createRoot=function(e,t){if(!c(e))throw Error(o(299));var s=!1,a="",l=Jp,u=Wp,h=$p;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Dy(e,1,!1,null,null,s,a,null,l,u,h,Gy),e[Fi]=t.current,If(e),new pd(t)},To.hydrateRoot=function(e,t,s){if(!c(e))throw Error(o(299));var a=!1,l="",u=Jp,h=Wp,b=$p,R=null;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(u=s.onUncaughtError),s.onCaughtError!==void 0&&(h=s.onCaughtError),s.onRecoverableError!==void 0&&(b=s.onRecoverableError),s.formState!==void 0&&(R=s.formState)),t=Dy(e,1,!0,t,s??null,a,l,R,u,h,b,Gy),t.context=zy(null),s=t.current,a=Nn(),a=zs(a),l=$i(a),l.callback=null,es(s,l,a),s=a,t.current.lanes=s,dn(t,s),oi(t),e[Fi]=t.current,If(e),new dc(t)},To.version="19.2.7",To}var ub;function I1(){if(ub)return Sd.exports;ub=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Sd.exports=P1(),Sd.exports}var J1=I1();function th(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}const Eh={};function Fo(n,i,r,o,c){if(!r&&!o&&!n)return Lc(i);let f=Lc(n);return i&&(f=Ac(f,i)),r&&(f=Ac(f,r)),o&&(f=Ac(f,o)),f}function W1(n){if(n.length===0)return Eh;if(n.length===1)return Lc(n[0]);let i=Lc(n[0]);for(let r=1;r<n.length;r+=1)i=Ac(i,n[r]);return i}function Lc(n){return Th(n)?{...Vv(n,Eh)}:$1(n)}function Ac(n,i){return Th(i)?Vv(i,n):eT(n,i)}function $1(n){const i={...n};for(const r in i){const o=i[r];Yv(r,o)&&(i[r]=Gv(o))}return i}function eT(n,i){if(!i)return n;for(const r in i){const o=i[r];switch(r){case"style":{n[r]=th(n.style,o);break}case"className":{n[r]=Qv(n.className,o);break}default:Yv(r,o)?n[r]=tT(n[r],o):n[r]=o}}return n}function Yv(n,i){const r=n.charCodeAt(0),o=n.charCodeAt(1),c=n.charCodeAt(2);return r===111&&o===110&&c>=65&&c<=90&&(typeof i=="function"||typeof i>"u")}function Th(n){return typeof n=="function"}function Vv(n,i){return Th(n)?n(i):n??Eh}function tT(n,i){return i?n?(...r)=>{const o=r[0];if(Xv(o)){const f=o;Bc(f);const d=i(...r);return f.baseUIHandlerPrevented||n==null||n(...r),d}const c=i(...r);return n==null||n(...r),c}:Gv(i):n}function Gv(n){return n&&((...i)=>{const r=i[0];return Xv(r)&&Bc(r),n(...i)})}function Bc(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function Qv(n,i){return i?n?i+" "+n:i:n}function Xv(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function nT(n,i){return function(o,...c){const f=new URL(n);return f.searchParams.set("code",o.toString()),c.forEach(d=>f.searchParams.append("args[]",d)),`${i} error #${o}; visit ${f} for the full message.`}}const ur=nT("https://base-ui.com/production-error","Base UI"),fb={};function Qi(n,i){const r=O.useRef(fb);return r.current===fb&&(r.current=n(i)),r}function Hc(n,i,r,o){const c=Qi(Fv).current;return sT(c,n,i,r,o)&&Kv(c,[n,i,r,o]),c.callback}function iT(n){const i=Qi(Fv).current;return rT(i,n)&&Kv(i,n),i.callback}function Fv(){return{callback:null,cleanup:null,refs:[]}}function sT(n,i,r,o,c){return n.refs[0]!==i||n.refs[1]!==r||n.refs[2]!==o||n.refs[3]!==c}function rT(n,i){return n.refs.length!==i.length||n.refs.some((r,o)=>r!==i[o])}function Kv(n,i){if(n.refs=i,i.every(r=>r==null)){n.callback=null;return}n.callback=r=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),r!=null){const o=Array(i.length).fill(null);for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=f(r);typeof d=="function"&&(o[c]=d);break}case"object":{f.current=r;break}}}n.cleanup=()=>{for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=o[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}const aT=parseInt(O.version,10);function wh(n){return aT>=n}function db(n){if(!O.isValidElement(n))return null;const i=n,r=i.props;return(wh(19)?r==null?void 0:r.ref:i.ref)??null}function Rh(){}const Wt=Object.freeze({});function oT(n,i){const r={};for(const o in n){const c=n[o];if(i!=null&&i.hasOwnProperty(o)){const f=i[o](c);f!=null&&Object.assign(r,f);continue}c===!0?r[`data-${o.toLowerCase()}`]="":c&&(r[`data-${o.toLowerCase()}`]=c.toString())}return r}function lT(n,i){return typeof n=="function"?n(i):n}function cT(n,i){return typeof n=="function"?n(i):n}function Ra(n,i,r={}){const o=i.render,c=uT(i,r);if(r.enabled===!1)return null;const f=r.state??Wt;return hT(n,o,c,f)}function uT(n,i={}){const{className:r,style:o,render:c}=n,{state:f=Wt,ref:d,props:m,stateAttributesMapping:g,enabled:p=!0}=i,y=p?lT(r,f):void 0,v=p?cT(o,f):void 0,S=p?oT(f,g):Wt,E=p&&m?fT(m):void 0,x=p?th(S,E)??{}:Wt;return typeof document<"u"&&(p?Array.isArray(d)?x.ref=iT([x.ref,db(c),...d]):x.ref=Hc(x.ref,db(c),d):Hc(null,null)),p?(y!==void 0&&(x.className=Qv(x.className,y)),v!==void 0&&(x.style=th(x.style,v)),x):Wt}function fT(n){return Array.isArray(n)?W1(n):Fo(void 0,n)}const dT=Symbol.for("react.lazy");function hT(n,i,r,o){if(i){if(typeof i=="function")return i(r,o);const c=Fo(r,i.props);c.ref=r.ref;let f=i;return(f==null?void 0:f.$$typeof)===dT&&(f=O.Children.toArray(i)[0]),O.cloneElement(f,c)}if(n&&typeof n=="string")return mT(n,r);throw new Error(ur(8))}function mT(n,i){return n==="button"?O.createElement("button",{type:"button",...i,key:i.key}):n==="img"?O.createElement("img",{alt:"",...i,key:i.key}):O.createElement(n,i)}function pT(n){return Ra(n.defaultTagName??"div",n,n)}function Zv(n){var i,r,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(r=Zv(n[i]))&&(o&&(o+=" "),o+=r)}else for(r in n)n[r]&&(o&&(o+=" "),o+=r);return o}function Pv(){for(var n,i,r=0,o="",c=arguments.length;r<c;r++)(n=arguments[r])&&(i=Zv(n))&&(o&&(o+=" "),o+=i);return o}const hb=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,mb=Pv,Iv=(n,i)=>r=>{var o;if((i==null?void 0:i.variants)==null)return mb(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:c,defaultVariants:f}=i,d=Object.keys(c).map(p=>{const y=r==null?void 0:r[p],v=f==null?void 0:f[p];if(y===null)return null;const S=hb(y)||hb(v);return c[p][S]}),m=r&&Object.entries(r).reduce((p,y)=>{let[v,S]=y;return S===void 0||(p[v]=S),p},{}),g=i==null||(o=i.compoundVariants)===null||o===void 0?void 0:o.reduce((p,y)=>{let{class:v,className:S,...E}=y;return Object.entries(E).every(x=>{let[w,_]=x;return Array.isArray(_)?_.includes({...f,...m}[w]):{...f,...m}[w]===_})?[...p,v,S]:p},[]);return mb(n,d,g,r==null?void 0:r.class,r==null?void 0:r.className)},gT=(n,i)=>{const r=new Array(n.length+i.length);for(let o=0;o<n.length;o++)r[o]=n[o];for(let o=0;o<i.length;o++)r[n.length+o]=i[o];return r},yT=(n,i)=>({classGroupId:n,validator:i}),Jv=(n=new Map,i=null,r)=>({nextPart:n,validators:i,classGroupId:r}),qc="-",pb=[],bT="arbitrary..",vT=n=>{const i=xT(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return ST(d);const m=d.split(qc),g=m[0]===""&&m.length>1?1:0;return Wv(m,g,i)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=o[d],p=r[d];return g?p?gT(p,g):g:p||pb}return r[d]||pb}}},Wv=(n,i,r)=>{if(n.length-i===0)return r.classGroupId;const c=n[i],f=r.nextPart.get(c);if(f){const p=Wv(n,i+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=i===0?n.join(qc):n.slice(i).join(qc),g=d.length;for(let p=0;p<g;p++){const y=d[p];if(y.validator(m))return y.classGroupId}},ST=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),r=i.indexOf(":"),o=i.slice(0,r);return o?bT+o:void 0})(),xT=n=>{const{theme:i,classGroups:r}=n;return ET(r,i)},ET=(n,i)=>{const r=Jv();for(const o in n){const c=n[o];Oh(c,r,o,i)}return r},Oh=(n,i,r,o)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];TT(d,i,r,o)}},TT=(n,i,r,o)=>{if(typeof n=="string"){wT(n,i,r);return}if(typeof n=="function"){RT(n,i,r,o);return}OT(n,i,r,o)},wT=(n,i,r)=>{const o=n===""?i:$v(i,n);o.classGroupId=r},RT=(n,i,r,o)=>{if(CT(n)){Oh(n(o),i,r,o);return}i.validators===null&&(i.validators=[]),i.validators.push(yT(r,n))},OT=(n,i,r,o)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];Oh(g,$v(i,m),r,o)}},$v=(n,i)=>{let r=n;const o=i.split(qc),c=o.length;for(let f=0;f<c;f++){const d=o[f];let m=r.nextPart.get(d);m||(m=Jv(),r.nextPart.set(d,m)),r=m}return r},CT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,AT=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,r=Object.create(null),o=Object.create(null);const c=(f,d)=>{r[f]=d,i++,i>n&&(i=0,o=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=o[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},nh="!",gb=":",_T=[],yb=(n,i,r,o,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:r,maybePostfixModifierPosition:o,isExternal:c}),MT=n=>{const{prefix:i,experimentalParseClassName:r}=n;let o=c=>{const f=[];let d=0,m=0,g=0,p;const y=c.length;for(let w=0;w<y;w++){const _=c[w];if(d===0&&m===0){if(_===gb){f.push(c.slice(g,w)),g=w+1;continue}if(_==="/"){p=w;continue}}_==="["?d++:_==="]"?d--:_==="("?m++:_===")"&&m--}const v=f.length===0?c:c.slice(g);let S=v,E=!1;v.endsWith(nh)?(S=v.slice(0,-1),E=!0):v.startsWith(nh)&&(S=v.slice(1),E=!0);const x=p&&p>g?p-g:void 0;return yb(f,E,S,x)};if(i){const c=i+gb,f=o;o=d=>d.startsWith(c)?f(d.slice(c.length)):yb(_T,!1,d,void 0,!0)}if(r){const c=o;o=f=>r({className:f,parseClassName:c})}return o},NT=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((r,o)=>{i.set(r,1e6+o)}),r=>{const o=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=i.has(d);m||g?(c.length>0&&(c.sort(),o.push(...c),c=[]),o.push(d)):c.push(d)}return c.length>0&&(c.sort(),o.push(...c)),o}},DT=n=>({cache:AT(n.cacheSize),parseClassName:MT(n),sortModifiers:NT(n),postfixLookupClassGroupIds:zT(n),...vT(n)}),zT=n=>{const i=Object.create(null),r=n.postfixLookupClassGroups;if(r)for(let o=0;o<r.length;o++)i[r[o]]=!0;return i},kT=/\s+/,jT=(n,i)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:c,sortModifiers:f,postfixLookupClassGroupIds:d}=i,m=[],g=n.trim().split(kT);let p="";for(let y=g.length-1;y>=0;y-=1){const v=g[y],{isExternal:S,modifiers:E,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:_}=r(v);if(S){p=v+(p.length>0?" "+p:p);continue}let D=!!_,C;if(D){const B=w.substring(0,_);C=o(B);const U=C&&d[C]?o(w):void 0;U&&U!==C&&(C=U,D=!1)}else C=o(w);if(!C){if(!D){p=v+(p.length>0?" "+p:p);continue}if(C=o(w),!C){p=v+(p.length>0?" "+p:p);continue}D=!1}const j=E.length===0?"":E.length===1?E[0]:f(E).join(":"),k=x?j+nh:j,q=k+C;if(m.indexOf(q)>-1)continue;m.push(q);const F=c(C,D);for(let B=0;B<F.length;++B){const U=F[B];m.push(k+U)}p=v+(p.length>0?" "+p:p)}return p},UT=(...n)=>{let i=0,r,o,c="";for(;i<n.length;)(r=n[i++])&&(o=e0(r))&&(c&&(c+=" "),c+=o);return c},e0=n=>{if(typeof n=="string")return n;let i,r="";for(let o=0;o<n.length;o++)n[o]&&(i=e0(n[o]))&&(r&&(r+=" "),r+=i);return r},LT=(n,...i)=>{let r,o,c,f;const d=g=>{const p=i.reduce((y,v)=>v(y),n());return r=DT(p),o=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=o(g);if(p)return p;const y=jT(g,r);return c(g,y),y};return f=d,(...g)=>f(UT(...g))},BT=[],Bt=n=>{const i=r=>r[n]||BT;return i.isThemeGetter=!0,i},t0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,n0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,HT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,VT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,GT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gs=n=>HT.test(n),De=n=>!!n&&!Number.isNaN(Number(n)),li=n=>!!n&&Number.isInteger(Number(n)),wd=n=>n.endsWith("%")&&De(n.slice(0,-1)),ki=n=>qT.test(n),i0=()=>!0,XT=n=>YT.test(n)&&!VT.test(n),Ch=()=>!1,FT=n=>GT.test(n),KT=n=>QT.test(n),ZT=n=>!he(n)&&!me(n),PT=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),IT=n=>Ns(n,a0,Ch),he=n=>t0.test(n),Js=n=>Ns(n,o0,XT),bb=n=>Ns(n,sw,De),JT=n=>Ns(n,c0,i0),WT=n=>Ns(n,l0,Ch),vb=n=>Ns(n,s0,Ch),$T=n=>Ns(n,r0,KT),gc=n=>Ns(n,u0,FT),me=n=>n0.test(n),wo=n=>fr(n,o0),ew=n=>fr(n,l0),Sb=n=>fr(n,s0),tw=n=>fr(n,a0),nw=n=>fr(n,r0),yc=n=>fr(n,u0,!0),iw=n=>fr(n,c0,!0),Ns=(n,i,r)=>{const o=t0.exec(n);return o?o[1]?i(o[1]):r(o[2]):!1},fr=(n,i,r=!1)=>{const o=n0.exec(n);return o?o[1]?i(o[1]):r:!1},s0=n=>n==="position"||n==="percentage",r0=n=>n==="image"||n==="url",a0=n=>n==="length"||n==="size"||n==="bg-size",o0=n=>n==="length",sw=n=>n==="number",l0=n=>n==="family-name",c0=n=>n==="number"||n==="weight",u0=n=>n==="shadow",rw=()=>{const n=Bt("color"),i=Bt("font"),r=Bt("text"),o=Bt("font-weight"),c=Bt("tracking"),f=Bt("leading"),d=Bt("breakpoint"),m=Bt("container"),g=Bt("spacing"),p=Bt("radius"),y=Bt("shadow"),v=Bt("inset-shadow"),S=Bt("text-shadow"),E=Bt("drop-shadow"),x=Bt("blur"),w=Bt("perspective"),_=Bt("aspect"),D=Bt("ease"),C=Bt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...k(),me,he],F=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],U=()=>[me,he,g],K=()=>[gs,"full","auto",...U()],se=()=>[li,"none","subgrid",me,he],pe=()=>["auto",{span:["full",li,me,he]},li,me,he],ae=()=>[li,"auto",me,he],W=()=>["auto","min","max","fr",me,he],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...U()],Q=()=>[gs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],I=()=>[gs,"screen","full","dvw","lvw","svw","min","max","fit",...U()],oe=()=>[gs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],Y=()=>[n,me,he],T=()=>[...k(),Sb,vb,{position:[me,he]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",tw,IT,{size:[me,he]}],ne=()=>[wd,wo,Js],re=()=>["","none","full",p,me,he],ee=()=>["",De,wo,Js],ge=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[De,wd,Sb,vb],Ze=()=>["","none",x,me,he],nt=()=>["none",De,me,he],ve=()=>["none",De,me,he],ze=()=>[De,me,he],Oe=()=>[gs,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ki],breakpoint:[ki],color:[i0],container:[ki],"drop-shadow":[ki],ease:["in","out","in-out"],font:[ZT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ki],shadow:[ki],spacing:["px",De],text:[ki],"text-shadow":[ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gs,he,me,_]}],container:["container"],"container-type":[{"@container":["","normal","size",me,he]}],"container-named":[PT],columns:[{columns:[De,he,me,m]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",me,he]}],basis:[{basis:[gs,"full","auto",m,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,gs,"auto","initial","none",he]}],grow:[{grow:["",De,me,he]}],shrink:[{shrink:["",De,me,he]}],order:[{order:[li,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:pe()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:pe()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[m,"screen",...Q()]}],"min-w":[{"min-w":[m,"screen","none",...Q()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,wo,Js]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,iw,JT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wd,he]}],"font-family":[{font:[ew,WT,i]}],"font-features":[{"font-features":[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,me,he]}],"line-clamp":[{"line-clamp":[De,"none",me,bb]}],leading:[{leading:[f,...U()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",me,Js]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[De,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[li,me,he]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,me,he],radial:["",me,he],conic:[li,me,he]},nw,$T]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,me,he]}],"outline-w":[{outline:["",De,wo,Js]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",y,yc,gc]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",v,yc,gc]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[De,Js]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",S,yc,gc]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[De,me,he]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[me,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:Ze()}],brightness:[{brightness:[De,me,he]}],contrast:[{contrast:[De,me,he]}],"drop-shadow":[{"drop-shadow":["","none",E,yc,gc]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",De,me,he]}],"hue-rotate":[{"hue-rotate":[De,me,he]}],invert:[{invert:["",De,me,he]}],saturate:[{saturate:[De,me,he]}],sepia:[{sepia:["",De,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Ze()}],"backdrop-brightness":[{"backdrop-brightness":[De,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[De,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,me,he]}],"backdrop-invert":[{"backdrop-invert":["",De,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[De,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[De,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",De,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",me,he]}],ease:[{ease:["linear","initial",D,me,he]}],delay:[{delay:[De,me,he]}],animate:[{animate:["none",C,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,me,he]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:nt()}],"rotate-x":[{"rotate-x":nt()}],"rotate-y":[{"rotate-y":nt()}],"rotate-z":[{"rotate-z":nt()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],zoom:[{zoom:[li,me,he]}],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Y()}],"scrollbar-track-color":[{"scrollbar-track":Y()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,he]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[De,wo,Js,bb]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},aw=LT(rw);function un(...n){return aw(Pv(n))}const ow=Iv("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive/10 text-destructive",outline:"border-border text-foreground",ghost:"hover:bg-muted hover:text-muted-foreground",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function sa({className:n,variant:i="default",render:r,...o}){return pT({defaultTagName:"span",props:Fo({className:un(ow({variant:i}),n)},o),render:r,state:{slot:"badge",variant:i}})}function _o({className:n,...i}){return A.jsx("div",{"data-slot":"skeleton",className:un("animate-pulse rounded-md bg-muted",n),...i})}function lw({isLoading:n,isError:i,port:r,service:o}){return n?A.jsxs("div",{className:"flex min-w-[10rem] items-center gap-2","aria-live":"polite",children:[A.jsx(_o,{className:"h-5 w-20"}),A.jsx("span",{className:"text-xs text-chatroom-text-muted",children:"Connecting…"})]}):i?A.jsx(sa,{variant:"destructive","aria-live":"polite",children:"Disconnected"}):A.jsxs("div",{className:"flex items-center gap-2 text-xs text-chatroom-text-muted","aria-live":"polite",children:[A.jsx(sa,{variant:"outline",className:"border-chatroom-status-success text-chatroom-status-success",children:"Connected"}),r!=null&&o!=null&&A.jsxs("span",{children:["Port ",r," · ",o]})]})}function cw({header:n,nav:i,children:r}){return A.jsxs("div",{className:"chatroom-root flex h-full min-h-screen flex-col bg-chatroom-bg-primary text-chatroom-text-primary",children:[n,i,A.jsx("main",{className:"flex min-h-0 flex-1 flex-col",children:r})]})}/**
48
+ `+a.stack}}var Ee=Object.prototype.hasOwnProperty,mt=n.unstable_scheduleCallback,dt=n.unstable_cancelCallback,je=n.unstable_shouldYield,xt=n.unstable_requestPaint,ue=n.unstable_now,xe=n.unstable_getCurrentPriorityLevel,ht=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,pt=n.unstable_NormalPriority,jt=n.unstable_LowPriority,sn=n.unstable_IdlePriority,rn=n.log,ti=n.unstable_setDisableYieldValue,fn=null,qt=null;function Tn(e){if(typeof rn=="function"&&ti(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(fn,e)}catch{}}var Yt=Math.clz32?Math.clz32:gr,mr=Math.log,pr=Math.LN2;function gr(e){return e>>>=0,e===0?32:31-(mr(e)/pr|0)|0}var pi=256,Fe=262144,Ot=4194304;function Vt(e){var t=e&42;if(t!==0)return t;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 Ft(e,t,s){var a=e.pendingLanes;if(a===0)return 0;var l=0,u=e.suspendedLanes,h=e.pingedLanes;e=e.warmLanes;var b=a&134217727;return b!==0?(a=b&~u,a!==0?l=Vt(a):(h&=b,h!==0?l=Vt(h):s||(s=b&~e,s!==0&&(l=Vt(s))))):(b=a&~u,b!==0?l=Vt(b):h!==0?l=Vt(h):s||(s=a&~e,s!==0&&(l=Vt(s)))),l===0?0:t!==0&&t!==l&&(t&u)===0&&(u=l&-l,s=t&-t,u>=s||u===32&&(s&4194048)!==0)?t:l}function an(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 ni(){var e=Ot;return Ot<<=1,(Ot&62914560)===0&&(Ot=4194304),e}function ii(e){for(var t=[],s=0;31>s;s++)t.push(e);return t}function dn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Na(e,t,s,a,l,u){var h=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,G=e.hiddenUpdates;for(s=h&~s;0<s;){var P=31-Yt(s),$=1<<P;b[P]=0,R[P]=-1;var X=G[P];if(X!==null)for(G[P]=null,P=0;P<X.length;P++){var Z=X[P];Z!==null&&(Z.lane&=-536870913)}s&=~$}a!==0&&yr(e,a,0),u!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=u&~(h&~t))}function yr(e,t,s){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Yt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|s&261930}function br(e,t){var s=e.entangledLanes|=t;for(e=e.entanglements;s;){var a=31-Yt(s),l=1<<a;l&t|e[a]&t&&(e[a]|=t),s&=~l}}function Jo(e,t){var s=t&-t;return s=(s&42)!==0?1:zs(s),(s&(e.suspendedLanes|t))!==0?0:s}function zs(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 vr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Wo(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:By(e.type))}function $o(e,t){var s=Q.p;try{return Q.p=e,t()}finally{Q.p=s}}var hn=Math.random().toString(36).slice(2),Ut="__reactFiber$"+hn,en="__reactProps$"+hn,Fi="__reactContainer$"+hn,Sr="__reactEvents$"+hn,el="__reactListeners$"+hn,tl="__reactHandles$"+hn,tm="__reactResources$"+hn,Da="__reactMarker$"+hn;function ou(e){delete e[Ut],delete e[en],delete e[Sr],delete e[el],delete e[tl]}function xr(e){var t=e[Ut];if(t)return t;for(var s=e.parentNode;s;){if(t=s[Fi]||s[Ut]){if(s=t.alternate,t.child!==null||s!==null&&s.child!==null)for(e=Ey(e);e!==null;){if(s=e[Ut])return s;e=Ey(e)}return t}e=s,s=e.parentNode}return null}function Er(e){if(e=e[Ut]||e[Fi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function za(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function Tr(e){var t=e[tm];return t||(t=e[tm]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Gt(e){e[Da]=!0}var nm=new Set,im={};function ks(e,t){wr(e,t),wr(e+"Capture",t)}function wr(e,t){for(im[e]=t,e=0;e<t.length;e++)nm.add(t[e])}var QS=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]*$"),sm={},rm={};function XS(e){return Ee.call(rm,e)?!0:Ee.call(sm,e)?!1:QS.test(e)?rm[e]=!0:(sm[e]=!0,!1)}function nl(e,t,s){if(XS(t))if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+s)}}function il(e,t,s){if(s===null)e.removeAttribute(t);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+s)}}function gi(e,t,s,a){if(a===null)e.removeAttribute(s);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(t,s,""+a)}}function kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function am(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function FS(e,t,s){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(h){s=""+h,u.call(this,h)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return s},setValue:function(h){s=""+h},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function lu(e){if(!e._valueTracker){var t=am(e)?"checked":"value";e._valueTracker=FS(e,t,""+e[t])}}function om(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var s=t.getValue(),a="";return e&&(a=am(e)?e.checked?"true":"false":e.value),e=a,e!==s?(t.setValue(e),!0):!1}function sl(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 KS=/[\n"\\]/g;function jn(e){return e.replace(KS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function cu(e,t,s,a,l,u,h,b){e.name="",h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.type=h:e.removeAttribute("type"),t!=null?h==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kn(t)):e.value!==""+kn(t)&&(e.value=""+kn(t)):h!=="submit"&&h!=="reset"||e.removeAttribute("value"),t!=null?uu(e,h,kn(t)):s!=null?uu(e,h,kn(s)):a!=null&&e.removeAttribute("value"),l==null&&u!=null&&(e.defaultChecked=!!u),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+kn(b):e.removeAttribute("name")}function lm(e,t,s,a,l,u,h,b){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||s!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){lu(e);return}s=s!=null?""+kn(s):"",t=t!=null?""+kn(t):s,b||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=b?e.checked:!!a,e.defaultChecked=!!a,h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.name=h),lu(e)}function uu(e,t,s){t==="number"&&sl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Rr(e,t,s,a){if(e=e.options,t){t={};for(var l=0;l<s.length;l++)t["$"+s[l]]=!0;for(s=0;s<e.length;s++)l=t.hasOwnProperty("$"+e[s].value),e[s].selected!==l&&(e[s].selected=l),l&&a&&(e[s].defaultSelected=!0)}else{for(s=""+kn(s),t=null,l=0;l<e.length;l++){if(e[l].value===s){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function cm(e,t,s){if(t!=null&&(t=""+kn(t),t!==e.value&&(e.value=t),s==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=s!=null?""+kn(s):""}function um(e,t,s,a){if(t==null){if(a!=null){if(s!=null)throw Error(o(92));if(ie(a)){if(1<a.length)throw Error(o(93));a=a[0]}s=a}s==null&&(s=""),t=s}s=kn(t),e.defaultValue=s,a=e.textContent,a===s&&a!==""&&a!==null&&(e.value=a),lu(e)}function Or(e,t){if(t){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=t;return}}e.textContent=t}var ZS=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 fm(e,t,s){var a=t.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,s):typeof s!="number"||s===0||ZS.has(t)?t==="float"?e.cssFloat=s:e[t]=(""+s).trim():e[t]=s+"px"}function dm(e,t,s){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,s!=null){for(var a in s)!s.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&s[l]!==a&&fm(e,l,a)}else for(var u in t)t.hasOwnProperty(u)&&fm(e,u,t[u])}function fu(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 PS=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"]]),IS=/^[\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 rl(e){return IS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yi(){}var du=null;function hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Cr=null,Ar=null;function hm(e){var t=Er(e);if(t&&(e=t.stateNode)){var s=e[en]||null;e:switch(e=t.stateNode,t.type){case"input":if(cu(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),t=s.name,s.type==="radio"&&t!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+jn(""+t)+'"][type="radio"]'),t=0;t<s.length;t++){var a=s[t];if(a!==e&&a.form===e.form){var l=a[en]||null;if(!l)throw Error(o(90));cu(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<s.length;t++)a=s[t],a.form===e.form&&om(a)}break e;case"textarea":cm(e,s.value,s.defaultValue);break e;case"select":t=s.value,t!=null&&Rr(e,!!s.multiple,t,!1)}}}var mu=!1;function mm(e,t,s){if(mu)return e(t,s);mu=!0;try{var a=e(t);return a}finally{if(mu=!1,(Cr!==null||Ar!==null)&&(Fl(),Cr&&(t=Cr,e=Ar,Ar=Cr=null,hm(t),e)))for(t=0;t<e.length;t++)hm(e[t])}}function ka(e,t){var s=e.stateNode;if(s===null)return null;var a=s[en]||null;if(a===null)return null;s=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(o(231,t,typeof s));return s}var bi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pu=!1;if(bi)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){pu=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{pu=!1}var Ki=null,gu=null,al=null;function pm(){if(al)return al;var e,t=gu,s=t.length,a,l="value"in Ki?Ki.value:Ki.textContent,u=l.length;for(e=0;e<s&&t[e]===l[e];e++);var h=s-e;for(a=1;a<=h&&t[s-a]===l[u-a];a++);return al=l.slice(e,1<a?1-a:void 0)}function ol(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ll(){return!0}function gm(){return!1}function mn(e){function t(s,a,l,u,h){this._reactName=s,this._targetInst=l,this.type=a,this.nativeEvent=u,this.target=h,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(s=e[b],this[b]=s?s(u):u[b]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?ll:gm,this.isPropagationStopped=gm,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=ll)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=ll)},persist:function(){},isPersistent:ll}),t}var js={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cl=mn(js),Ua=v({},js,{view:0,detail:0}),JS=mn(Ua),yu,bu,La,ul=v({},Ua,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Su,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!==La&&(La&&e.type==="mousemove"?(yu=e.screenX-La.screenX,bu=e.screenY-La.screenY):bu=yu=0,La=e),yu)},movementY:function(e){return"movementY"in e?e.movementY:bu}}),ym=mn(ul),WS=v({},ul,{dataTransfer:0}),$S=mn(WS),ex=v({},Ua,{relatedTarget:0}),vu=mn(ex),tx=v({},js,{animationName:0,elapsedTime:0,pseudoElement:0}),nx=mn(tx),ix=v({},js,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),sx=mn(ix),rx=v({},js,{data:0}),bm=mn(rx),ax={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ox={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"},lx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cx(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lx[e])?!!t[e]:!1}function Su(){return cx}var ux=v({},Ua,{key:function(e){if(e.key){var t=ax[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ol(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ox[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Su,charCode:function(e){return e.type==="keypress"?ol(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ol(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fx=mn(ux),dx=v({},ul,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vm=mn(dx),hx=v({},Ua,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Su}),mx=mn(hx),px=v({},js,{propertyName:0,elapsedTime:0,pseudoElement:0}),gx=mn(px),yx=v({},ul,{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}),bx=mn(yx),vx=v({},js,{newState:0,oldState:0}),Sx=mn(vx),xx=[9,13,27,32],xu=bi&&"CompositionEvent"in window,Ba=null;bi&&"documentMode"in document&&(Ba=document.documentMode);var Ex=bi&&"TextEvent"in window&&!Ba,Sm=bi&&(!xu||Ba&&8<Ba&&11>=Ba),xm=" ",Em=!1;function Tm(e,t){switch(e){case"keyup":return xx.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wm(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _r=!1;function Tx(e,t){switch(e){case"compositionend":return wm(t);case"keypress":return t.which!==32?null:(Em=!0,xm);case"textInput":return e=t.data,e===xm&&Em?null:e;default:return null}}function wx(e,t){if(_r)return e==="compositionend"||!xu&&Tm(e,t)?(e=pm(),al=gu=Ki=null,_r=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Sm&&t.locale!=="ko"?null:t.data;default:return null}}var Rx={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 Rm(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Rx[e.type]:t==="textarea"}function Om(e,t,s,a){Cr?Ar?Ar.push(a):Ar=[a]:Cr=a,t=$l(t,"onChange"),0<t.length&&(s=new cl("onChange","change",null,s,a),e.push({event:s,listeners:t}))}var Ha=null,qa=null;function Ox(e){ly(e,0)}function fl(e){var t=za(e);if(om(t))return e}function Cm(e,t){if(e==="change")return t}var Am=!1;if(bi){var Eu;if(bi){var Tu="oninput"in document;if(!Tu){var _m=document.createElement("div");_m.setAttribute("oninput","return;"),Tu=typeof _m.oninput=="function"}Eu=Tu}else Eu=!1;Am=Eu&&(!document.documentMode||9<document.documentMode)}function Mm(){Ha&&(Ha.detachEvent("onpropertychange",Nm),qa=Ha=null)}function Nm(e){if(e.propertyName==="value"&&fl(qa)){var t=[];Om(t,qa,e,hu(e)),mm(Ox,t)}}function Cx(e,t,s){e==="focusin"?(Mm(),Ha=t,qa=s,Ha.attachEvent("onpropertychange",Nm)):e==="focusout"&&Mm()}function Ax(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(qa)}function _x(e,t){if(e==="click")return fl(t)}function Mx(e,t){if(e==="input"||e==="change")return fl(t)}function Nx(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Rn=typeof Object.is=="function"?Object.is:Nx;function Ya(e,t){if(Rn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var s=Object.keys(e),a=Object.keys(t);if(s.length!==a.length)return!1;for(a=0;a<s.length;a++){var l=s[a];if(!Ee.call(t,l)||!Rn(e[l],t[l]))return!1}return!0}function Dm(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zm(e,t){var s=Dm(e);e=0;for(var a;s;){if(s.nodeType===3){if(a=e+s.textContent.length,e<=t&&a>=t)return{node:s,offset:t-e};e=a}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Dm(s)}}function km(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?km(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jm(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=sl(e.document);t instanceof e.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)e=t.contentWindow;else break;t=sl(e.document)}return t}function wu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Dx=bi&&"documentMode"in document&&11>=document.documentMode,Mr=null,Ru=null,Va=null,Ou=!1;function Um(e,t,s){var a=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ou||Mr==null||Mr!==sl(a)||(a=Mr,"selectionStart"in a&&wu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Va&&Ya(Va,a)||(Va=a,a=$l(Ru,"onSelect"),0<a.length&&(t=new cl("onSelect","select",null,t,s),e.push({event:t,listeners:a}),t.target=Mr)))}function Us(e,t){var s={};return s[e.toLowerCase()]=t.toLowerCase(),s["Webkit"+e]="webkit"+t,s["Moz"+e]="moz"+t,s}var Nr={animationend:Us("Animation","AnimationEnd"),animationiteration:Us("Animation","AnimationIteration"),animationstart:Us("Animation","AnimationStart"),transitionrun:Us("Transition","TransitionRun"),transitionstart:Us("Transition","TransitionStart"),transitioncancel:Us("Transition","TransitionCancel"),transitionend:Us("Transition","TransitionEnd")},Cu={},Lm={};bi&&(Lm=document.createElement("div").style,"AnimationEvent"in window||(delete Nr.animationend.animation,delete Nr.animationiteration.animation,delete Nr.animationstart.animation),"TransitionEvent"in window||delete Nr.transitionend.transition);function Ls(e){if(Cu[e])return Cu[e];if(!Nr[e])return e;var t=Nr[e],s;for(s in t)if(t.hasOwnProperty(s)&&s in Lm)return Cu[e]=t[s];return e}var Bm=Ls("animationend"),Hm=Ls("animationiteration"),qm=Ls("animationstart"),zx=Ls("transitionrun"),kx=Ls("transitionstart"),jx=Ls("transitioncancel"),Ym=Ls("transitionend"),Vm=new Map,Au="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(" ");Au.push("scrollEnd");function Kn(e,t){Vm.set(e,t),ks(t,[e])}var dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=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(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Un=[],Dr=0,_u=0;function hl(){for(var e=Dr,t=_u=Dr=0;t<e;){var s=Un[t];Un[t++]=null;var a=Un[t];Un[t++]=null;var l=Un[t];Un[t++]=null;var u=Un[t];if(Un[t++]=null,a!==null&&l!==null){var h=a.pending;h===null?l.next=l:(l.next=h.next,h.next=l),a.pending=l}u!==0&&Gm(s,l,u)}}function ml(e,t,s,a){Un[Dr++]=e,Un[Dr++]=t,Un[Dr++]=s,Un[Dr++]=a,_u|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Mu(e,t,s,a){return ml(e,t,s,a),pl(e)}function Bs(e,t){return ml(e,null,null,t),pl(e)}function Gm(e,t,s){e.lanes|=s;var a=e.alternate;a!==null&&(a.lanes|=s);for(var l=!1,u=e.return;u!==null;)u.childLanes|=s,a=u.alternate,a!==null&&(a.childLanes|=s),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(l=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,l&&t!==null&&(l=31-Yt(s),e=u.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=s|536870912),u):null}function pl(e){if(50<uo)throw uo=0,qf=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zr={};function Ux(e,t,s,a){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,s,a){return new Ux(e,t,s,a)}function Nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function vi(e,t){var s=e.alternate;return s===null?(s=On(e.tag,t,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=t,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,t=e.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Qm(e,t){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,t=s.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function gl(e,t,s,a,l,u){var h=0;if(a=e,typeof e=="function")Nu(e)&&(h=1);else if(typeof e=="string")h=YE(e,s,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case K:return e=On(31,s,t,l),e.elementType=K,e.lanes=u,e;case w:return Hs(s.children,l,u,t);case _:h=8,l|=24;break;case D:return e=On(12,s,t,l|2),e.elementType=D,e.lanes=u,e;case q:return e=On(13,s,t,l),e.elementType=q,e.lanes=u,e;case F:return e=On(19,s,t,l),e.elementType=F,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:h=10;break e;case C:h=9;break e;case k:h=11;break e;case B:h=14;break e;case U:h=16,a=null;break e}h=29,s=Error(o(130,e===null?"null":typeof e,"")),a=null}return t=On(h,s,t,l),t.elementType=e,t.type=a,t.lanes=u,t}function Hs(e,t,s,a){return e=On(7,e,a,t),e.lanes=s,e}function Du(e,t,s){return e=On(6,e,null,t),e.lanes=s,e}function Xm(e){var t=On(18,null,null,0);return t.stateNode=e,t}function zu(e,t,s){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=s,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fm=new WeakMap;function Ln(e,t){if(typeof e=="object"&&e!==null){var s=Fm.get(e);return s!==void 0?s:(t={value:e,source:t,stack:ke(t)},Fm.set(e,t),t)}return{value:e,source:t,stack:ke(t)}}var kr=[],jr=0,yl=null,Ga=0,Bn=[],Hn=0,Zi=null,si=1,ri="";function Si(e,t){kr[jr++]=Ga,kr[jr++]=yl,yl=e,Ga=t}function Km(e,t,s){Bn[Hn++]=si,Bn[Hn++]=ri,Bn[Hn++]=Zi,Zi=e;var a=si;e=ri;var l=32-Yt(a)-1;a&=~(1<<l),s+=1;var u=32-Yt(t)+l;if(30<u){var h=l-l%5;u=(a&(1<<h)-1).toString(32),a>>=h,l-=h,si=1<<32-Yt(t)+l|s<<l|a,ri=u+e}else si=1<<u|s<<l|a,ri=e}function ku(e){e.return!==null&&(Si(e,1),Km(e,1,0))}function ju(e){for(;e===yl;)yl=kr[--jr],kr[jr]=null,Ga=kr[--jr],kr[jr]=null;for(;e===Zi;)Zi=Bn[--Hn],Bn[Hn]=null,ri=Bn[--Hn],Bn[Hn]=null,si=Bn[--Hn],Bn[Hn]=null}function Zm(e,t){Bn[Hn++]=si,Bn[Hn++]=ri,Bn[Hn++]=Zi,si=t.id,ri=t.overflow,Zi=e}var Kt=null,gt=null,Ge=!1,Pi=null,qn=!1,Uu=Error(o(519));function Ii(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qa(Ln(t,e)),Uu}function Pm(e){var t=e.stateNode,s=e.type,a=e.memoizedProps;switch(t[Ut]=e,t[en]=a,s){case"dialog":Le("cancel",t),Le("close",t);break;case"iframe":case"object":case"embed":Le("load",t);break;case"video":case"audio":for(s=0;s<ho.length;s++)Le(ho[s],t);break;case"source":Le("error",t);break;case"img":case"image":case"link":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"input":Le("invalid",t),lm(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Le("invalid",t);break;case"textarea":Le("invalid",t),um(t,a.value,a.defaultValue,a.children)}s=a.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||t.textContent===""+s||a.suppressHydrationWarning===!0||dy(t.textContent,s)?(a.popover!=null&&(Le("beforetoggle",t),Le("toggle",t)),a.onScroll!=null&&Le("scroll",t),a.onScrollEnd!=null&&Le("scrollend",t),a.onClick!=null&&(t.onclick=yi),t=!0):t=!1,t||Ii(e,!0)}function Im(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:qn=!1;return;case 27:case 3:qn=!0;return;default:Kt=Kt.return}}function Ur(e){if(e!==Kt)return!1;if(!Ge)return Im(e),Ge=!0,!1;var t=e.tag,s;if((s=t!==3&&t!==27)&&((s=t===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||td(e.type,e.memoizedProps)),s=!s),s&&gt&&Ii(e),Im(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));gt=xy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));gt=xy(e)}else t===27?(t=gt,us(e.type)?(e=ad,ad=null,gt=e):gt=t):gt=Kt?Vn(e.stateNode.nextSibling):null;return!0}function qs(){gt=Kt=null,Ge=!1}function Lu(){var e=Pi;return e!==null&&(bn===null?bn=e:bn.push.apply(bn,e),Pi=null),e}function Qa(e){Pi===null?Pi=[e]:Pi.push(e)}var Bu=T(null),Ys=null,xi=null;function Ji(e,t,s){te(Bu,t._currentValue),t._currentValue=s}function Ei(e){e._currentValue=Bu.current,H(Bu)}function Hu(e,t,s){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===s)break;e=e.return}}function qu(e,t,s,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var u=l.dependencies;if(u!==null){var h=l.child;u=u.firstContext;e:for(;u!==null;){var b=u;u=l;for(var R=0;R<t.length;R++)if(b.context===t[R]){u.lanes|=s,b=u.alternate,b!==null&&(b.lanes|=s),Hu(u.return,s,e),a||(h=null);break e}u=b.next}}else if(l.tag===18){if(h=l.return,h===null)throw Error(o(341));h.lanes|=s,u=h.alternate,u!==null&&(u.lanes|=s),Hu(h,s,e),h=null}else h=l.child;if(h!==null)h.return=l;else for(h=l;h!==null;){if(h===e){h=null;break}if(l=h.sibling,l!==null){l.return=h.return,h=l;break}h=h.return}l=h}}function Lr(e,t,s,a){e=null;for(var l=t,u=!1;l!==null;){if(!u){if((l.flags&524288)!==0)u=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var h=l.alternate;if(h===null)throw Error(o(387));if(h=h.memoizedProps,h!==null){var b=l.type;Rn(l.pendingProps.value,h.value)||(e!==null?e.push(b):e=[b])}}else if(l===ge.current){if(h=l.alternate,h===null)throw Error(o(387));h.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(bo):e=[bo])}l=l.return}e!==null&&qu(t,e,s,a),t.flags|=262144}function bl(e){for(e=e.firstContext;e!==null;){if(!Rn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vs(e){Ys=e,xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zt(e){return Jm(Ys,e)}function vl(e,t){return Ys===null&&Vs(e),Jm(e,t)}function Jm(e,t){var s=t._currentValue;if(t={context:t,memoizedValue:s,next:null},xi===null){if(e===null)throw Error(o(308));xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xi=xi.next=t;return s}var Lx=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(s,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(s){return s()})}},Bx=n.unstable_scheduleCallback,Hx=n.unstable_NormalPriority,_t={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Yu(){return{controller:new Lx,data:new Map,refCount:0}}function Xa(e){e.refCount--,e.refCount===0&&Bx(Hx,function(){e.controller.abort()})}var Fa=null,Vu=0,Br=0,Hr=null;function qx(e,t){if(Fa===null){var s=Fa=[];Vu=0,Br=Ff(),Hr={status:"pending",value:void 0,then:function(a){s.push(a)}}}return Vu++,t.then(Wm,Wm),t}function Wm(){if(--Vu===0&&Fa!==null){Hr!==null&&(Hr.status="fulfilled");var e=Fa;Fa=null,Br=0,Hr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Yx(e,t){var s=[],a={status:"pending",value:null,reason:null,then:function(l){s.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<s.length;l++)(0,s[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<s.length;l++)(0,s[l])(void 0)}),a}var $m=N.S;N.S=function(e,t){Ug=ue(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&qx(e,t),$m!==null&&$m(e,t)};var Gs=T(null);function Gu(){var e=Gs.current;return e!==null?e:ct.pooledCache}function Sl(e,t){t===null?te(Gs,Gs.current):te(Gs,t.pool)}function ep(){var e=Gu();return e===null?null:{parent:_t._currentValue,pool:e}}var qr=Error(o(460)),Qu=Error(o(474)),xl=Error(o(542)),El={then:function(){}};function tp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function np(e,t,s){switch(s=e[s],s===void 0?e.push(t):s!==t&&(t.then(yi,yi),t=s),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sp(e),e;default:if(typeof t.status=="string")t.then(yi,yi);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sp(e),e}throw Xs=t,qr}}function Qs(e){try{var t=e._init;return t(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Xs=s,qr):s}}var Xs=null;function ip(){if(Xs===null)throw Error(o(459));var e=Xs;return Xs=null,e}function sp(e){if(e===qr||e===xl)throw Error(o(483))}var Yr=null,Ka=0;function Tl(e){var t=Ka;return Ka+=1,Yr===null&&(Yr=[]),np(Yr,e,t)}function Za(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wl(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function rp(e){function t(L,M){if(e){var V=L.deletions;V===null?(L.deletions=[M],L.flags|=16):V.push(M)}}function s(L,M){if(!e)return null;for(;M!==null;)t(L,M),M=M.sibling;return null}function a(L){for(var M=new Map;L!==null;)L.key!==null?M.set(L.key,L):M.set(L.index,L),L=L.sibling;return M}function l(L,M){return L=vi(L,M),L.index=0,L.sibling=null,L}function u(L,M,V){return L.index=V,e?(V=L.alternate,V!==null?(V=V.index,V<M?(L.flags|=67108866,M):V):(L.flags|=67108866,M)):(L.flags|=1048576,M)}function h(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function b(L,M,V,J){return M===null||M.tag!==6?(M=Du(V,L.mode,J),M.return=L,M):(M=l(M,V),M.return=L,M)}function R(L,M,V,J){var Se=V.type;return Se===w?P(L,M,V.props.children,J,V.key):M!==null&&(M.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===U&&Qs(Se)===M.type)?(M=l(M,V.props),Za(M,V),M.return=L,M):(M=gl(V.type,V.key,V.props,null,L.mode,J),Za(M,V),M.return=L,M)}function G(L,M,V,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=zu(V,L.mode,J),M.return=L,M):(M=l(M,V.children||[]),M.return=L,M)}function P(L,M,V,J,Se){return M===null||M.tag!==7?(M=Hs(V,L.mode,J,Se),M.return=L,M):(M=l(M,V),M.return=L,M)}function $(L,M,V){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=Du(""+M,L.mode,V),M.return=L,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case E:return V=gl(M.type,M.key,M.props,null,L.mode,V),Za(V,M),V.return=L,V;case x:return M=zu(M,L.mode,V),M.return=L,M;case U:return M=Qs(M),$(L,M,V)}if(ie(M)||ae(M))return M=Hs(M,L.mode,V,null),M.return=L,M;if(typeof M.then=="function")return $(L,Tl(M),V);if(M.$$typeof===j)return $(L,vl(L,M),V);wl(L,M)}return null}function X(L,M,V,J){var Se=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Se!==null?null:b(L,M,""+V,J);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case E:return V.key===Se?R(L,M,V,J):null;case x:return V.key===Se?G(L,M,V,J):null;case U:return V=Qs(V),X(L,M,V,J)}if(ie(V)||ae(V))return Se!==null?null:P(L,M,V,J,null);if(typeof V.then=="function")return X(L,M,Tl(V),J);if(V.$$typeof===j)return X(L,M,vl(L,V),J);wl(L,V)}return null}function Z(L,M,V,J,Se){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return L=L.get(V)||null,b(M,L,""+J,Se);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case E:return L=L.get(J.key===null?V:J.key)||null,R(M,L,J,Se);case x:return L=L.get(J.key===null?V:J.key)||null,G(M,L,J,Se);case U:return J=Qs(J),Z(L,M,V,J,Se)}if(ie(J)||ae(J))return L=L.get(V)||null,P(M,L,J,Se,null);if(typeof J.then=="function")return Z(L,M,V,Tl(J),Se);if(J.$$typeof===j)return Z(L,M,V,vl(M,J),Se);wl(M,J)}return null}function ye(L,M,V,J){for(var Se=null,Pe=null,be=M,_e=M=0,qe=null;be!==null&&_e<V.length;_e++){be.index>_e?(qe=be,be=null):qe=be.sibling;var Ie=X(L,be,V[_e],J);if(Ie===null){be===null&&(be=qe);break}e&&be&&Ie.alternate===null&&t(L,be),M=u(Ie,M,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie,be=qe}if(_e===V.length)return s(L,be),Ge&&Si(L,_e),Se;if(be===null){for(;_e<V.length;_e++)be=$(L,V[_e],J),be!==null&&(M=u(be,M,_e),Pe===null?Se=be:Pe.sibling=be,Pe=be);return Ge&&Si(L,_e),Se}for(be=a(be);_e<V.length;_e++)qe=Z(be,L,_e,V[_e],J),qe!==null&&(e&&qe.alternate!==null&&be.delete(qe.key===null?_e:qe.key),M=u(qe,M,_e),Pe===null?Se=qe:Pe.sibling=qe,Pe=qe);return e&&be.forEach(function(ps){return t(L,ps)}),Ge&&Si(L,_e),Se}function Te(L,M,V,J){if(V==null)throw Error(o(151));for(var Se=null,Pe=null,be=M,_e=M=0,qe=null,Ie=V.next();be!==null&&!Ie.done;_e++,Ie=V.next()){be.index>_e?(qe=be,be=null):qe=be.sibling;var ps=X(L,be,Ie.value,J);if(ps===null){be===null&&(be=qe);break}e&&be&&ps.alternate===null&&t(L,be),M=u(ps,M,_e),Pe===null?Se=ps:Pe.sibling=ps,Pe=ps,be=qe}if(Ie.done)return s(L,be),Ge&&Si(L,_e),Se;if(be===null){for(;!Ie.done;_e++,Ie=V.next())Ie=$(L,Ie.value,J),Ie!==null&&(M=u(Ie,M,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie);return Ge&&Si(L,_e),Se}for(be=a(be);!Ie.done;_e++,Ie=V.next())Ie=Z(be,L,_e,Ie.value,J),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?_e:Ie.key),M=u(Ie,M,_e),Pe===null?Se=Ie:Pe.sibling=Ie,Pe=Ie);return e&&be.forEach(function(WE){return t(L,WE)}),Ge&&Si(L,_e),Se}function ot(L,M,V,J){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case E:e:{for(var Se=V.key;M!==null;){if(M.key===Se){if(Se=V.type,Se===w){if(M.tag===7){s(L,M.sibling),J=l(M,V.props.children),J.return=L,L=J;break e}}else if(M.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===U&&Qs(Se)===M.type){s(L,M.sibling),J=l(M,V.props),Za(J,V),J.return=L,L=J;break e}s(L,M);break}else t(L,M);M=M.sibling}V.type===w?(J=Hs(V.props.children,L.mode,J,V.key),J.return=L,L=J):(J=gl(V.type,V.key,V.props,null,L.mode,J),Za(J,V),J.return=L,L=J)}return h(L);case x:e:{for(Se=V.key;M!==null;){if(M.key===Se)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){s(L,M.sibling),J=l(M,V.children||[]),J.return=L,L=J;break e}else{s(L,M);break}else t(L,M);M=M.sibling}J=zu(V,L.mode,J),J.return=L,L=J}return h(L);case U:return V=Qs(V),ot(L,M,V,J)}if(ie(V))return ye(L,M,V,J);if(ae(V)){if(Se=ae(V),typeof Se!="function")throw Error(o(150));return V=Se.call(V),Te(L,M,V,J)}if(typeof V.then=="function")return ot(L,M,Tl(V),J);if(V.$$typeof===j)return ot(L,M,vl(L,V),J);wl(L,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,M!==null&&M.tag===6?(s(L,M.sibling),J=l(M,V),J.return=L,L=J):(s(L,M),J=Du(V,L.mode,J),J.return=L,L=J),h(L)):s(L,M)}return function(L,M,V,J){try{Ka=0;var Se=ot(L,M,V,J);return Yr=null,Se}catch(be){if(be===qr||be===xl)throw be;var Pe=On(29,be,null,L.mode);return Pe.lanes=J,Pe.return=L,Pe}finally{}}}var Fs=rp(!0),ap=rp(!1),Wi=!1;function Xu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Fu(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function $i(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function es(e,t,s){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(We&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=pl(e),Gm(e,null,s),t}return ml(e,a,t,s),pl(e)}function Pa(e,t,s){if(t=t.updateQueue,t!==null&&(t=t.shared,(s&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,s|=a,t.lanes=s,br(e,s)}}function Ku(e,t){var s=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,s===a)){var l=null,u=null;if(s=s.firstBaseUpdate,s!==null){do{var h={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};u===null?l=u=h:u=u.next=h,s=s.next}while(s!==null);u===null?l=u=t:u=u.next=t}else l=u=t;s={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=t:e.next=t,s.lastBaseUpdate=t}var Zu=!1;function Ia(){if(Zu){var e=Hr;if(e!==null)throw e}}function Ja(e,t,s,a){Zu=!1;var l=e.updateQueue;Wi=!1;var u=l.firstBaseUpdate,h=l.lastBaseUpdate,b=l.shared.pending;if(b!==null){l.shared.pending=null;var R=b,G=R.next;R.next=null,h===null?u=G:h.next=G,h=R;var P=e.alternate;P!==null&&(P=P.updateQueue,b=P.lastBaseUpdate,b!==h&&(b===null?P.firstBaseUpdate=G:b.next=G,P.lastBaseUpdate=R))}if(u!==null){var $=l.baseState;h=0,P=G=R=null,b=u;do{var X=b.lane&-536870913,Z=X!==b.lane;if(Z?(He&X)===X:(a&X)===X){X!==0&&X===Br&&(Zu=!0),P!==null&&(P=P.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var ye=e,Te=b;X=t;var ot=s;switch(Te.tag){case 1:if(ye=Te.payload,typeof ye=="function"){$=ye.call(ot,$,X);break e}$=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Te.payload,X=typeof ye=="function"?ye.call(ot,$,X):ye,X==null)break e;$=v({},$,X);break e;case 2:Wi=!0}}X=b.callback,X!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=l.callbacks,Z===null?l.callbacks=[X]:Z.push(X))}else Z={lane:X,tag:b.tag,payload:b.payload,callback:b.callback,next:null},P===null?(G=P=Z,R=$):P=P.next=Z,h|=X;if(b=b.next,b===null){if(b=l.shared.pending,b===null)break;Z=b,b=Z.next,Z.next=null,l.lastBaseUpdate=Z,l.shared.pending=null}}while(!0);P===null&&(R=$),l.baseState=R,l.firstBaseUpdate=G,l.lastBaseUpdate=P,u===null&&(l.shared.lanes=0),rs|=h,e.lanes=h,e.memoizedState=$}}function op(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function lp(e,t){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)op(s[e],t)}var Vr=T(null),Rl=T(0);function cp(e,t){e=Ni,te(Rl,e),te(Vr,t),Ni=e|t.baseLanes}function Pu(){te(Rl,Ni),te(Vr,Vr.current)}function Iu(){Ni=Rl.current,H(Vr),H(Rl)}var Cn=T(null),Yn=null;function ts(e){var t=e.alternate;te(Ct,Ct.current&1),te(Cn,e),Yn===null&&(t===null||Vr.current!==null||t.memoizedState!==null)&&(Yn=e)}function Ju(e){te(Ct,Ct.current),te(Cn,e),Yn===null&&(Yn=e)}function up(e){e.tag===22?(te(Ct,Ct.current),te(Cn,e),Yn===null&&(Yn=e)):ns()}function ns(){te(Ct,Ct.current),te(Cn,Cn.current)}function An(e){H(Cn),Yn===e&&(Yn=null),H(Ct)}var Ct=T(0);function Ol(e){for(var t=e;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||sd(s)||rd(s)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ti=0,Ae=null,rt=null,Mt=null,Cl=!1,Gr=!1,Ks=!1,Al=0,Wa=0,Qr=null,Vx=0;function Et(){throw Error(o(321))}function Wu(e,t){if(t===null)return!1;for(var s=0;s<t.length&&s<e.length;s++)if(!Rn(e[s],t[s]))return!1;return!0}function $u(e,t,s,a,l,u){return Ti=u,Ae=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Kp:pf,Ks=!1,u=s(a,l),Ks=!1,Gr&&(u=dp(t,s,a,l)),fp(e),u}function fp(e){N.H=to;var t=rt!==null&&rt.next!==null;if(Ti=0,Mt=rt=Ae=null,Cl=!1,Wa=0,Qr=null,t)throw Error(o(300));e===null||Nt||(e=e.dependencies,e!==null&&bl(e)&&(Nt=!0))}function dp(e,t,s,a){Ae=e;var l=0;do{if(Gr&&(Qr=null),Wa=0,Gr=!1,25<=l)throw Error(o(301));if(l+=1,Mt=rt=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}N.H=Zp,u=t(s,a)}while(Gr);return u}function Gx(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?$a(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ae.flags|=1024),t}function ef(){var e=Al!==0;return Al=0,e}function tf(e,t,s){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s}function nf(e){if(Cl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Cl=!1}Ti=0,Mt=rt=Ae=null,Gr=!1,Wa=Al=0,Qr=null}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ae.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function At(){if(rt===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Mt===null?Ae.memoizedState:Mt.next;if(t!==null)Mt=t,rt=e;else{if(e===null)throw Ae.alternate===null?Error(o(467)):Error(o(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Mt===null?Ae.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function _l(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function $a(e){var t=Wa;return Wa+=1,Qr===null&&(Qr=[]),e=np(Qr,e,t),t=Ae,(Mt===null?t.memoizedState:Mt.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Kp:pf),e}function Ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return $a(e);if(e.$$typeof===j)return Zt(e)}throw Error(o(438,String(e)))}function sf(e){var t=null,s=Ae.updateQueue;if(s!==null&&(t=s.memoCache),t==null){var a=Ae.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),s===null&&(s=_l(),Ae.updateQueue=s),s.memoCache=t,s=t.data[t.index],s===void 0)for(s=t.data[t.index]=Array(e),a=0;a<e;a++)s[a]=se;return t.index++,s}function wi(e,t){return typeof t=="function"?t(e):t}function Nl(e){var t=At();return rf(t,rt,e)}function rf(e,t,s){var a=e.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=s;var l=e.baseQueue,u=a.pending;if(u!==null){if(l!==null){var h=l.next;l.next=u.next,u.next=h}t.baseQueue=l=u,a.pending=null}if(u=e.baseState,l===null)e.memoizedState=u;else{t=l.next;var b=h=null,R=null,G=t,P=!1;do{var $=G.lane&-536870913;if($!==G.lane?(He&$)===$:(Ti&$)===$){var X=G.revertLane;if(X===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),$===Br&&(P=!0);else if((Ti&X)===X){G=G.next,X===Br&&(P=!0);continue}else $={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(b=R=$,h=u):R=R.next=$,Ae.lanes|=X,rs|=X;$=G.action,Ks&&s(u,$),u=G.hasEagerState?G.eagerState:s(u,$)}else X={lane:$,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},R===null?(b=R=X,h=u):R=R.next=X,Ae.lanes|=$,rs|=$;G=G.next}while(G!==null&&G!==t);if(R===null?h=u:R.next=b,!Rn(u,e.memoizedState)&&(Nt=!0,P&&(s=Hr,s!==null)))throw s;e.memoizedState=u,e.baseState=h,e.baseQueue=R,a.lastRenderedState=u}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function af(e){var t=At(),s=t.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=e;var a=s.dispatch,l=s.pending,u=t.memoizedState;if(l!==null){s.pending=null;var h=l=l.next;do u=e(u,h.action),h=h.next;while(h!==l);Rn(u,t.memoizedState)||(Nt=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),s.lastRenderedState=u}return[u,a]}function hp(e,t,s){var a=Ae,l=At(),u=Ge;if(u){if(s===void 0)throw Error(o(407));s=s()}else s=t();var h=!Rn((rt||l).memoizedState,s);if(h&&(l.memoizedState=s,Nt=!0),l=l.queue,cf(gp.bind(null,a,l,e),[e]),l.getSnapshot!==t||h||Mt!==null&&Mt.memoizedState.tag&1){if(a.flags|=2048,Xr(9,{destroy:void 0},pp.bind(null,a,l,s,t),null),ct===null)throw Error(o(349));u||(Ti&127)!==0||mp(a,t,s)}return s}function mp(e,t,s){e.flags|=16384,e={getSnapshot:t,value:s},t=Ae.updateQueue,t===null?(t=_l(),Ae.updateQueue=t,t.stores=[e]):(s=t.stores,s===null?t.stores=[e]:s.push(e))}function pp(e,t,s,a){t.value=s,t.getSnapshot=a,yp(t)&&bp(e)}function gp(e,t,s){return s(function(){yp(t)&&bp(e)})}function yp(e){var t=e.getSnapshot;e=e.value;try{var s=t();return!Rn(e,s)}catch{return!0}}function bp(e){var t=Bs(e,2);t!==null&&vn(t,e,2)}function of(e){var t=on();if(typeof e=="function"){var s=e;if(e=s(),Ks){Tn(!0);try{s()}finally{Tn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:e},t}function vp(e,t,s,a){return e.baseState=s,rf(e,rt,typeof a=="function"?a:wi)}function Qx(e,t,s,a,l){if(kl(e))throw Error(o(485));if(e=t.action,e!==null){var u={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(h){u.listeners.push(h)}};N.T!==null?s(!0):u.isTransition=!1,a(u),s=t.pending,s===null?(u.next=t.pending=u,Sp(t,u)):(u.next=s.next,t.pending=s.next=u)}}function Sp(e,t){var s=t.action,a=t.payload,l=e.state;if(t.isTransition){var u=N.T,h={};N.T=h;try{var b=s(l,a),R=N.S;R!==null&&R(h,b),xp(e,t,b)}catch(G){lf(e,t,G)}finally{u!==null&&h.types!==null&&(u.types=h.types),N.T=u}}else try{u=s(l,a),xp(e,t,u)}catch(G){lf(e,t,G)}}function xp(e,t,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(a){Ep(e,t,a)},function(a){return lf(e,t,a)}):Ep(e,t,s)}function Ep(e,t,s){t.status="fulfilled",t.value=s,Tp(t),e.state=s,t=e.pending,t!==null&&(s=t.next,s===t?e.pending=null:(s=s.next,t.next=s,Sp(e,s)))}function lf(e,t,s){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=s,Tp(t),t=t.next;while(t!==a)}e.action=null}function Tp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function wp(e,t){return t}function Rp(e,t){if(Ge){var s=ct.formState;if(s!==null){e:{var a=Ae;if(Ge){if(gt){t:{for(var l=gt,u=qn;l.nodeType!==8;){if(!u){l=null;break t}if(l=Vn(l.nextSibling),l===null){l=null;break t}}u=l.data,l=u==="F!"||u==="F"?l:null}if(l){gt=Vn(l.nextSibling),a=l.data==="F!";break e}}Ii(a)}a=!1}a&&(t=s[0])}}return s=on(),s.memoizedState=s.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wp,lastRenderedState:t},s.queue=a,s=Qp.bind(null,Ae,a),a.dispatch=s,a=of(!1),u=mf.bind(null,Ae,!1,a.queue),a=on(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,s=Qx.bind(null,Ae,l,u,s),l.dispatch=s,a.memoizedState=e,[t,s,!1]}function Op(e){var t=At();return Cp(t,rt,e)}function Cp(e,t,s){if(t=rf(e,t,wp)[0],e=Nl(wi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=$a(t)}catch(h){throw h===qr?xl:h}else a=t;t=At();var l=t.queue,u=l.dispatch;return s!==t.memoizedState&&(Ae.flags|=2048,Xr(9,{destroy:void 0},Xx.bind(null,l,s),null)),[a,u,e]}function Xx(e,t){e.action=t}function Ap(e){var t=At(),s=rt;if(s!==null)return Cp(t,s,e);At(),t=t.memoizedState,s=At();var a=s.queue.dispatch;return s.memoizedState=e,[t,a,!1]}function Xr(e,t,s,a){return e={tag:e,create:s,deps:a,inst:t,next:null},t=Ae.updateQueue,t===null&&(t=_l(),Ae.updateQueue=t),s=t.lastEffect,s===null?t.lastEffect=e.next=e:(a=s.next,s.next=e,e.next=a,t.lastEffect=e),e}function _p(){return At().memoizedState}function Dl(e,t,s,a){var l=on();Ae.flags|=e,l.memoizedState=Xr(1|t,{destroy:void 0},s,a===void 0?null:a)}function zl(e,t,s,a){var l=At();a=a===void 0?null:a;var u=l.memoizedState.inst;rt!==null&&a!==null&&Wu(a,rt.memoizedState.deps)?l.memoizedState=Xr(t,u,s,a):(Ae.flags|=e,l.memoizedState=Xr(1|t,u,s,a))}function Mp(e,t){Dl(8390656,8,e,t)}function cf(e,t){zl(2048,8,e,t)}function Fx(e){Ae.flags|=4;var t=Ae.updateQueue;if(t===null)t=_l(),Ae.updateQueue=t,t.events=[e];else{var s=t.events;s===null?t.events=[e]:s.push(e)}}function Np(e){var t=At().memoizedState;return Fx({ref:t,nextImpl:e}),function(){if((We&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Dp(e,t){return zl(4,2,e,t)}function zp(e,t){return zl(4,4,e,t)}function kp(e,t){if(typeof t=="function"){e=e();var s=t(e);return function(){typeof s=="function"?s():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jp(e,t,s){s=s!=null?s.concat([e]):null,zl(4,4,kp.bind(null,t,e),s)}function uf(){}function Up(e,t){var s=At();t=t===void 0?null:t;var a=s.memoizedState;return t!==null&&Wu(t,a[1])?a[0]:(s.memoizedState=[e,t],e)}function Lp(e,t){var s=At();t=t===void 0?null:t;var a=s.memoizedState;if(t!==null&&Wu(t,a[1]))return a[0];if(a=e(),Ks){Tn(!0);try{e()}finally{Tn(!1)}}return s.memoizedState=[a,t],a}function ff(e,t,s){return s===void 0||(Ti&1073741824)!==0&&(He&261930)===0?e.memoizedState=t:(e.memoizedState=s,e=Bg(),Ae.lanes|=e,rs|=e,s)}function Bp(e,t,s,a){return Rn(s,t)?s:Vr.current!==null?(e=ff(e,s,a),Rn(e,t)||(Nt=!0),e):(Ti&42)===0||(Ti&1073741824)!==0&&(He&261930)===0?(Nt=!0,e.memoizedState=s):(e=Bg(),Ae.lanes|=e,rs|=e,t)}function Hp(e,t,s,a,l){var u=Q.p;Q.p=u!==0&&8>u?u:8;var h=N.T,b={};N.T=b,mf(e,!1,t,s);try{var R=l(),G=N.S;if(G!==null&&G(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var P=Yx(R,a);eo(e,t,P,Nn(e))}else eo(e,t,a,Nn(e))}catch($){eo(e,t,{then:function(){},status:"rejected",reason:$},Nn())}finally{Q.p=u,h!==null&&b.types!==null&&(h.types=b.types),N.T=h}}function Kx(){}function df(e,t,s,a){if(e.tag!==5)throw Error(o(476));var l=qp(e).queue;Hp(e,l,t,I,s===null?Kx:function(){return Yp(e),s(a)})}function qp(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:I,baseState:I,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:I},next:null};var s={};return t.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wi,lastRenderedState:s},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Yp(e){var t=qp(e);t.next===null&&(t=e.alternate.memoizedState),eo(e,t.next.queue,{},Nn())}function hf(){return Zt(bo)}function Vp(){return At().memoizedState}function Gp(){return At().memoizedState}function Zx(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var s=Nn();e=$i(s);var a=es(t,e,s);a!==null&&(vn(a,t,s),Pa(a,t,s)),t={cache:Yu()},e.payload=t;return}t=t.return}}function Px(e,t,s){var a=Nn();s={lane:a,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},kl(e)?Xp(t,s):(s=Mu(e,t,s,a),s!==null&&(vn(s,e,a),Fp(s,t,a)))}function Qp(e,t,s){var a=Nn();eo(e,t,s,a)}function eo(e,t,s,a){var l={lane:a,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(kl(e))Xp(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var h=t.lastRenderedState,b=u(h,s);if(l.hasEagerState=!0,l.eagerState=b,Rn(b,h))return ml(e,t,l,0),ct===null&&hl(),!1}catch{}finally{}if(s=Mu(e,t,l,a),s!==null)return vn(s,e,a),Fp(s,t,a),!0}return!1}function mf(e,t,s,a){if(a={lane:2,revertLane:Ff(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},kl(e)){if(t)throw Error(o(479))}else t=Mu(e,s,a,2),t!==null&&vn(t,e,2)}function kl(e){var t=e.alternate;return e===Ae||t!==null&&t===Ae}function Xp(e,t){Gr=Cl=!0;var s=e.pending;s===null?t.next=t:(t.next=s.next,s.next=t),e.pending=t}function Fp(e,t,s){if((s&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,s|=a,t.lanes=s,br(e,s)}}var to={readContext:Zt,use:Ml,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};to.useEffectEvent=Et;var Kp={readContext:Zt,use:Ml,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Zt,useEffect:Mp,useImperativeHandle:function(e,t,s){s=s!=null?s.concat([e]):null,Dl(4194308,4,kp.bind(null,t,e),s)},useLayoutEffect:function(e,t){return Dl(4194308,4,e,t)},useInsertionEffect:function(e,t){Dl(4,2,e,t)},useMemo:function(e,t){var s=on();t=t===void 0?null:t;var a=e();if(Ks){Tn(!0);try{e()}finally{Tn(!1)}}return s.memoizedState=[a,t],a},useReducer:function(e,t,s){var a=on();if(s!==void 0){var l=s(t);if(Ks){Tn(!0);try{s(t)}finally{Tn(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=Px.bind(null,Ae,e),[a.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:function(e){e=of(e);var t=e.queue,s=Qp.bind(null,Ae,t);return t.dispatch=s,[e.memoizedState,s]},useDebugValue:uf,useDeferredValue:function(e,t){var s=on();return ff(s,e,t)},useTransition:function(){var e=of(!1);return e=Hp.bind(null,Ae,e.queue,!0,!1),on().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,s){var a=Ae,l=on();if(Ge){if(s===void 0)throw Error(o(407));s=s()}else{if(s=t(),ct===null)throw Error(o(349));(He&127)!==0||mp(a,t,s)}l.memoizedState=s;var u={value:s,getSnapshot:t};return l.queue=u,Mp(gp.bind(null,a,u,e),[e]),a.flags|=2048,Xr(9,{destroy:void 0},pp.bind(null,a,u,s,t),null),s},useId:function(){var e=on(),t=ct.identifierPrefix;if(Ge){var s=ri,a=si;s=(a&~(1<<32-Yt(a)-1)).toString(32)+s,t="_"+t+"R_"+s,s=Al++,0<s&&(t+="H"+s.toString(32)),t+="_"}else s=Vx++,t="_"+t+"r_"+s.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:hf,useFormState:Rp,useActionState:Rp,useOptimistic:function(e){var t=on();t.memoizedState=t.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=s,t=mf.bind(null,Ae,!0,s),s.dispatch=t,[e,t]},useMemoCache:sf,useCacheRefresh:function(){return on().memoizedState=Zx.bind(null,Ae)},useEffectEvent:function(e){var t=on(),s={impl:e};return t.memoizedState=s,function(){if((We&2)!==0)throw Error(o(440));return s.impl.apply(void 0,arguments)}}},pf={readContext:Zt,use:Ml,useCallback:Up,useContext:Zt,useEffect:cf,useImperativeHandle:jp,useInsertionEffect:Dp,useLayoutEffect:zp,useMemo:Lp,useReducer:Nl,useRef:_p,useState:function(){return Nl(wi)},useDebugValue:uf,useDeferredValue:function(e,t){var s=At();return Bp(s,rt.memoizedState,e,t)},useTransition:function(){var e=Nl(wi)[0],t=At().memoizedState;return[typeof e=="boolean"?e:$a(e),t]},useSyncExternalStore:hp,useId:Vp,useHostTransitionStatus:hf,useFormState:Op,useActionState:Op,useOptimistic:function(e,t){var s=At();return vp(s,rt,e,t)},useMemoCache:sf,useCacheRefresh:Gp};pf.useEffectEvent=Np;var Zp={readContext:Zt,use:Ml,useCallback:Up,useContext:Zt,useEffect:cf,useImperativeHandle:jp,useInsertionEffect:Dp,useLayoutEffect:zp,useMemo:Lp,useReducer:af,useRef:_p,useState:function(){return af(wi)},useDebugValue:uf,useDeferredValue:function(e,t){var s=At();return rt===null?ff(s,e,t):Bp(s,rt.memoizedState,e,t)},useTransition:function(){var e=af(wi)[0],t=At().memoizedState;return[typeof e=="boolean"?e:$a(e),t]},useSyncExternalStore:hp,useId:Vp,useHostTransitionStatus:hf,useFormState:Ap,useActionState:Ap,useOptimistic:function(e,t){var s=At();return rt!==null?vp(s,rt,e,t):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:sf,useCacheRefresh:Gp};Zp.useEffectEvent=Np;function gf(e,t,s,a){t=e.memoizedState,s=s(a,t),s=s==null?t:v({},t,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var yf={enqueueSetState:function(e,t,s){e=e._reactInternals;var a=Nn(),l=$i(a);l.payload=t,s!=null&&(l.callback=s),t=es(e,l,a),t!==null&&(vn(t,e,a),Pa(t,e,a))},enqueueReplaceState:function(e,t,s){e=e._reactInternals;var a=Nn(),l=$i(a);l.tag=1,l.payload=t,s!=null&&(l.callback=s),t=es(e,l,a),t!==null&&(vn(t,e,a),Pa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var s=Nn(),a=$i(s);a.tag=2,t!=null&&(a.callback=t),t=es(e,a,s),t!==null&&(vn(t,e,s),Pa(t,e,s))}};function Pp(e,t,s,a,l,u,h){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,h):t.prototype&&t.prototype.isPureReactComponent?!Ya(s,a)||!Ya(l,u):!0}function Ip(e,t,s,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(s,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(s,a),t.state!==e&&yf.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var s=t;if("ref"in t){s={};for(var a in t)a!=="ref"&&(s[a]=t[a])}if(e=e.defaultProps){s===t&&(s=v({},s));for(var l in e)s[l]===void 0&&(s[l]=e[l])}return s}function Jp(e){dl(e)}function Wp(e){console.error(e)}function $p(e){dl(e)}function jl(e,t){try{var s=e.onUncaughtError;s(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function eg(e,t,s){try{var a=e.onCaughtError;a(s.value,{componentStack:s.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function bf(e,t,s){return s=$i(s),s.tag=3,s.payload={element:null},s.callback=function(){jl(e,t)},s}function tg(e){return e=$i(e),e.tag=3,e}function ng(e,t,s,a){var l=s.type.getDerivedStateFromError;if(typeof l=="function"){var u=a.value;e.payload=function(){return l(u)},e.callback=function(){eg(t,s,a)}}var h=s.stateNode;h!==null&&typeof h.componentDidCatch=="function"&&(e.callback=function(){eg(t,s,a),typeof l!="function"&&(as===null?as=new Set([this]):as.add(this));var b=a.stack;this.componentDidCatch(a.value,{componentStack:b!==null?b:""})})}function Ix(e,t,s,a,l){if(s.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=s.alternate,t!==null&&Lr(t,s,l,!0),s=Cn.current,s!==null){switch(s.tag){case 31:case 13:return Yn===null?Kl():s.alternate===null&&Tt===0&&(Tt=3),s.flags&=-257,s.flags|=65536,s.lanes=l,a===El?s.flags|=16384:(t=s.updateQueue,t===null?s.updateQueue=new Set([a]):t.add(a),Gf(e,a,l)),!1;case 22:return s.flags|=65536,a===El?s.flags|=16384:(t=s.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},s.updateQueue=t):(s=t.retryQueue,s===null?t.retryQueue=new Set([a]):s.add(a)),Gf(e,a,l)),!1}throw Error(o(435,s.tag))}return Gf(e,a,l),Kl(),!1}if(Ge)return t=Cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==Uu&&(e=Error(o(422),{cause:a}),Qa(Ln(e,s)))):(a!==Uu&&(t=Error(o(423),{cause:a}),Qa(Ln(t,s))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Ln(a,s),l=bf(e.stateNode,a,l),Ku(e,l),Tt!==4&&(Tt=2)),!1;var u=Error(o(520),{cause:a});if(u=Ln(u,s),co===null?co=[u]:co.push(u),Tt!==4&&(Tt=2),t===null)return!0;a=Ln(a,s),s=t;do{switch(s.tag){case 3:return s.flags|=65536,e=l&-l,s.lanes|=e,e=bf(s.stateNode,a,e),Ku(s,e),!1;case 1:if(t=s.type,u=s.stateNode,(s.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(as===null||!as.has(u))))return s.flags|=65536,l&=-l,s.lanes|=l,l=tg(l),ng(l,e,s,a),Ku(s,l),!1}s=s.return}while(s!==null);return!1}var vf=Error(o(461)),Nt=!1;function Pt(e,t,s,a){t.child=e===null?ap(t,null,s,a):Fs(t,e.child,s,a)}function ig(e,t,s,a,l){s=s.render;var u=t.ref;if("ref"in a){var h={};for(var b in a)b!=="ref"&&(h[b]=a[b])}else h=a;return Vs(t),a=$u(e,t,s,h,u,l),b=ef(),e!==null&&!Nt?(tf(e,t,l),Ri(e,t,l)):(Ge&&b&&ku(t),t.flags|=1,Pt(e,t,a,l),t.child)}function sg(e,t,s,a,l){if(e===null){var u=s.type;return typeof u=="function"&&!Nu(u)&&u.defaultProps===void 0&&s.compare===null?(t.tag=15,t.type=u,rg(e,t,u,a,l)):(e=gl(s.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Cf(e,l)){var h=u.memoizedProps;if(s=s.compare,s=s!==null?s:Ya,s(h,a)&&e.ref===t.ref)return Ri(e,t,l)}return t.flags|=1,e=vi(u,a),e.ref=t.ref,e.return=t,t.child=e}function rg(e,t,s,a,l){if(e!==null){var u=e.memoizedProps;if(Ya(u,a)&&e.ref===t.ref)if(Nt=!1,t.pendingProps=a=u,Cf(e,l))(e.flags&131072)!==0&&(Nt=!0);else return t.lanes=e.lanes,Ri(e,t,l)}return Sf(e,t,s,a,l)}function ag(e,t,s,a){var l=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|s:s,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~u}else a=0,t.child=null;return og(e,t,u,s,a)}if((s&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Sl(t,u!==null?u.cachePool:null),u!==null?cp(t,u):Pu(),up(t);else return a=t.lanes=536870912,og(e,t,u!==null?u.baseLanes|s:s,s,a)}else u!==null?(Sl(t,u.cachePool),cp(t,u),ns(),t.memoizedState=null):(e!==null&&Sl(t,null),Pu(),ns());return Pt(e,t,l,s),t.child}function no(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function og(e,t,s,a,l){var u=Gu();return u=u===null?null:{parent:_t._currentValue,pool:u},t.memoizedState={baseLanes:s,cachePool:u},e!==null&&Sl(t,null),Pu(),up(t),e!==null&&Lr(e,t,a,!0),t.childLanes=l,null}function Ul(e,t){return t=Bl({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function lg(e,t,s){return Fs(t,e.child,null,s),e=Ul(t,t.pendingProps),e.flags|=2,An(t),t.memoizedState=null,e}function Jx(e,t,s){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(a.mode==="hidden")return e=Ul(t,a),t.lanes=536870912,no(null,e);if(Ju(t),(e=gt)?(e=Sy(e,qn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},s=Xm(e),s.return=t,t.child=s,Kt=t,gt=null)):e=null,e===null)throw Ii(t);return t.lanes=536870912,null}return Ul(t,a)}var u=e.memoizedState;if(u!==null){var h=u.dehydrated;if(Ju(t),l)if(t.flags&256)t.flags&=-257,t=lg(e,t,s);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Nt||Lr(e,t,s,!1),l=(s&e.childLanes)!==0,Nt||l){if(a=ct,a!==null&&(h=Jo(a,s),h!==0&&h!==u.retryLane))throw u.retryLane=h,Bs(e,h),vn(a,e,h),vf;Kl(),t=lg(e,t,s)}else e=u.treeContext,gt=Vn(h.nextSibling),Kt=t,Ge=!0,Pi=null,qn=!1,e!==null&&Zm(t,e),t=Ul(t,a),t.flags|=4096;return t}return e=vi(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ll(e,t){var s=t.ref;if(s===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(o(284));(e===null||e.ref!==s)&&(t.flags|=4194816)}}function Sf(e,t,s,a,l){return Vs(t),s=$u(e,t,s,a,void 0,l),a=ef(),e!==null&&!Nt?(tf(e,t,l),Ri(e,t,l)):(Ge&&a&&ku(t),t.flags|=1,Pt(e,t,s,l),t.child)}function cg(e,t,s,a,l,u){return Vs(t),t.updateQueue=null,s=dp(t,a,s,l),fp(e),a=ef(),e!==null&&!Nt?(tf(e,t,u),Ri(e,t,u)):(Ge&&a&&ku(t),t.flags|=1,Pt(e,t,s,u),t.child)}function ug(e,t,s,a,l){if(Vs(t),t.stateNode===null){var u=zr,h=s.contextType;typeof h=="object"&&h!==null&&(u=Zt(h)),u=new s(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=yf,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},Xu(t),h=s.contextType,u.context=typeof h=="object"&&h!==null?Zt(h):zr,u.state=t.memoizedState,h=s.getDerivedStateFromProps,typeof h=="function"&&(gf(t,s,h,a),u.state=t.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(h=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),h!==u.state&&yf.enqueueReplaceState(u,u.state,null),Ja(t,a,u,l),Ia(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var b=t.memoizedProps,R=Zs(s,b);u.props=R;var G=u.context,P=s.contextType;h=zr,typeof P=="object"&&P!==null&&(h=Zt(P));var $=s.getDerivedStateFromProps;P=typeof $=="function"||typeof u.getSnapshotBeforeUpdate=="function",b=t.pendingProps!==b,P||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(b||G!==h)&&Ip(t,u,a,h),Wi=!1;var X=t.memoizedState;u.state=X,Ja(t,a,u,l),Ia(),G=t.memoizedState,b||X!==G||Wi?(typeof $=="function"&&(gf(t,s,$,a),G=t.memoizedState),(R=Wi||Pp(t,s,R,a,X,G,h))?(P||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=G),u.props=a,u.state=G,u.context=h,a=R):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,Fu(e,t),h=t.memoizedProps,P=Zs(s,h),u.props=P,$=t.pendingProps,X=u.context,G=s.contextType,R=zr,typeof G=="object"&&G!==null&&(R=Zt(G)),b=s.getDerivedStateFromProps,(G=typeof b=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(h!==$||X!==R)&&Ip(t,u,a,R),Wi=!1,X=t.memoizedState,u.state=X,Ja(t,a,u,l),Ia();var Z=t.memoizedState;h!==$||X!==Z||Wi||e!==null&&e.dependencies!==null&&bl(e.dependencies)?(typeof b=="function"&&(gf(t,s,b,a),Z=t.memoizedState),(P=Wi||Pp(t,s,P,a,X,Z,R)||e!==null&&e.dependencies!==null&&bl(e.dependencies))?(G||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,Z,R),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,Z,R)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=Z),u.props=a,u.state=Z,u.context=R,a=P):(typeof u.componentDidUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||h===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Ll(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,s=a&&typeof s.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Fs(t,e.child,null,l),t.child=Fs(t,null,s,l)):Pt(e,t,s,l),t.memoizedState=u.state,e=t.child):e=Ri(e,t,l),e}function fg(e,t,s,a){return qs(),t.flags|=256,Pt(e,t,s,a),t.child}var xf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ef(e){return{baseLanes:e,cachePool:ep()}}function Tf(e,t,s){return e=e!==null?e.childLanes&~s:0,t&&(e|=Mn),e}function dg(e,t,s){var a=t.pendingProps,l=!1,u=(t.flags&128)!==0,h;if((h=u)||(h=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),h&&(l=!0,t.flags&=-129),h=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(l?ts(t):ns(),(e=gt)?(e=Sy(e,qn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Zi!==null?{id:si,overflow:ri}:null,retryLane:536870912,hydrationErrors:null},s=Xm(e),s.return=t,t.child=s,Kt=t,gt=null)):e=null,e===null)throw Ii(t);return rd(e)?t.lanes=32:t.lanes=536870912,null}var b=a.children;return a=a.fallback,l?(ns(),l=t.mode,b=Bl({mode:"hidden",children:b},l),a=Hs(a,l,s,null),b.return=t,a.return=t,b.sibling=a,t.child=b,a=t.child,a.memoizedState=Ef(s),a.childLanes=Tf(e,h,s),t.memoizedState=xf,no(null,a)):(ts(t),wf(t,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(u)t.flags&256?(ts(t),t.flags&=-257,t=Rf(e,t,s)):t.memoizedState!==null?(ns(),t.child=e.child,t.flags|=128,t=null):(ns(),b=a.fallback,l=t.mode,a=Bl({mode:"visible",children:a.children},l),b=Hs(b,l,s,null),b.flags|=2,a.return=t,b.return=t,a.sibling=b,t.child=a,Fs(t,e.child,null,s),a=t.child,a.memoizedState=Ef(s),a.childLanes=Tf(e,h,s),t.memoizedState=xf,t=no(null,a));else if(ts(t),rd(b)){if(h=b.nextSibling&&b.nextSibling.dataset,h)var G=h.dgst;h=G,a=Error(o(419)),a.stack="",a.digest=h,Qa({value:a,source:null,stack:null}),t=Rf(e,t,s)}else if(Nt||Lr(e,t,s,!1),h=(s&e.childLanes)!==0,Nt||h){if(h=ct,h!==null&&(a=Jo(h,s),a!==0&&a!==R.retryLane))throw R.retryLane=a,Bs(e,a),vn(h,e,a),vf;sd(b)||Kl(),t=Rf(e,t,s)}else sd(b)?(t.flags|=192,t.child=e.child,t=null):(e=R.treeContext,gt=Vn(b.nextSibling),Kt=t,Ge=!0,Pi=null,qn=!1,e!==null&&Zm(t,e),t=wf(t,a.children),t.flags|=4096);return t}return l?(ns(),b=a.fallback,l=t.mode,R=e.child,G=R.sibling,a=vi(R,{mode:"hidden",children:a.children}),a.subtreeFlags=R.subtreeFlags&65011712,G!==null?b=vi(G,b):(b=Hs(b,l,s,null),b.flags|=2),b.return=t,a.return=t,a.sibling=b,t.child=a,no(null,a),a=t.child,b=e.child.memoizedState,b===null?b=Ef(s):(l=b.cachePool,l!==null?(R=_t._currentValue,l=l.parent!==R?{parent:R,pool:R}:l):l=ep(),b={baseLanes:b.baseLanes|s,cachePool:l}),a.memoizedState=b,a.childLanes=Tf(e,h,s),t.memoizedState=xf,no(e.child,a)):(ts(t),s=e.child,e=s.sibling,s=vi(s,{mode:"visible",children:a.children}),s.return=t,s.sibling=null,e!==null&&(h=t.deletions,h===null?(t.deletions=[e],t.flags|=16):h.push(e)),t.child=s,t.memoizedState=null,s)}function wf(e,t){return t=Bl({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Bl(e,t){return e=On(22,e,null,t),e.lanes=0,e}function Rf(e,t,s){return Fs(t,e.child,null,s),e=wf(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function hg(e,t,s){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Hu(e.return,t,s)}function Of(e,t,s,a,l,u){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:s,tailMode:l,treeForkCount:u}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=a,h.tail=s,h.tailMode=l,h.treeForkCount=u)}function mg(e,t,s){var a=t.pendingProps,l=a.revealOrder,u=a.tail;a=a.children;var h=Ct.current,b=(h&2)!==0;if(b?(h=h&1|2,t.flags|=128):h&=1,te(Ct,h),Pt(e,t,a,s),a=Ge?Ga:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hg(e,s,t);else if(e.tag===19)hg(e,s,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(s=t.child,l=null;s!==null;)e=s.alternate,e!==null&&Ol(e)===null&&(l=s),s=s.sibling;s=l,s===null?(l=t.child,t.child=null):(l=s.sibling,s.sibling=null),Of(t,!1,l,s,u,a);break;case"backwards":case"unstable_legacy-backwards":for(s=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ol(e)===null){t.child=l;break}e=l.sibling,l.sibling=s,s=l,l=e}Of(t,!0,s,null,u,a);break;case"together":Of(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ri(e,t,s){if(e!==null&&(t.dependencies=e.dependencies),rs|=t.lanes,(s&t.childLanes)===0)if(e!==null){if(Lr(e,t,s,!1),(s&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,s=vi(e,e.pendingProps),t.child=s,s.return=t;e.sibling!==null;)e=e.sibling,s=s.sibling=vi(e,e.pendingProps),s.return=t;s.sibling=null}return t.child}function Cf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&bl(e)))}function Wx(e,t,s){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Ji(t,_t,e.memoizedState.cache),qs();break;case 27:case 5:Ze(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ju(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ts(t),t.flags|=128,null):(s&t.child.childLanes)!==0?dg(e,t,s):(ts(t),e=Ri(e,t,s),e!==null?e.sibling:null);ts(t);break;case 19:var l=(e.flags&128)!==0;if(a=(s&t.childLanes)!==0,a||(Lr(e,t,s,!1),a=(s&t.childLanes)!==0),l){if(a)return mg(e,t,s);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),te(Ct,Ct.current),a)break;return null;case 22:return t.lanes=0,ag(e,t,s,t.pendingProps);case 24:Ji(t,_t,e.memoizedState.cache)}return Ri(e,t,s)}function pg(e,t,s){if(e!==null)if(e.memoizedProps!==t.pendingProps)Nt=!0;else{if(!Cf(e,s)&&(t.flags&128)===0)return Nt=!1,Wx(e,t,s);Nt=(e.flags&131072)!==0}else Nt=!1,Ge&&(t.flags&1048576)!==0&&Km(t,Ga,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Qs(t.elementType),t.type=e,typeof e=="function")Nu(e)?(a=Zs(e,a),t.tag=1,t=ug(null,t,e,a,s)):(t.tag=0,t=Sf(null,t,e,a,s));else{if(e!=null){var l=e.$$typeof;if(l===k){t.tag=11,t=ig(null,t,e,a,s);break e}else if(l===B){t.tag=14,t=sg(null,t,e,a,s);break e}}throw t=le(e)||e,Error(o(306,t,""))}}return t;case 0:return Sf(e,t,t.type,t.pendingProps,s);case 1:return a=t.type,l=Zs(a,t.pendingProps),ug(e,t,a,l,s);case 3:e:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(o(387));a=t.pendingProps;var u=t.memoizedState;l=u.element,Fu(e,t),Ja(t,a,null,s);var h=t.memoizedState;if(a=h.cache,Ji(t,_t,a),a!==u.cache&&qu(t,[_t],s,!0),Ia(),a=h.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:h.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=fg(e,t,a,s);break e}else if(a!==l){l=Ln(Error(o(424)),t),Qa(l),t=fg(e,t,a,s);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(gt=Vn(e.firstChild),Kt=t,Ge=!0,Pi=null,qn=!0,s=ap(t,null,a,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling}else{if(qs(),a===l){t=Ri(e,t,s);break e}Pt(e,t,a,s)}t=t.child}return t;case 26:return Ll(e,t),e===null?(s=Oy(t.type,null,t.pendingProps,null))?t.memoizedState=s:Ge||(s=t.type,e=t.pendingProps,a=ec(ee.current).createElement(s),a[Ut]=t,a[en]=e,It(a,s,e),Gt(a),t.stateNode=a):t.memoizedState=Oy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ze(t),e===null&&Ge&&(a=t.stateNode=Ty(t.type,t.pendingProps,ee.current),Kt=t,qn=!0,l=gt,us(t.type)?(ad=l,gt=Vn(a.firstChild)):gt=l),Pt(e,t,t.pendingProps.children,s),Ll(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((l=a=gt)&&(a=AE(a,t.type,t.pendingProps,qn),a!==null?(t.stateNode=a,Kt=t,gt=Vn(a.firstChild),qn=!1,l=!0):l=!1),l||Ii(t)),Ze(t),l=t.type,u=t.pendingProps,h=e!==null?e.memoizedProps:null,a=u.children,td(l,u)?a=null:h!==null&&td(l,h)&&(t.flags|=32),t.memoizedState!==null&&(l=$u(e,t,Gx,null,null,s),bo._currentValue=l),Ll(e,t),Pt(e,t,a,s),t.child;case 6:return e===null&&Ge&&((e=s=gt)&&(s=_E(s,t.pendingProps,qn),s!==null?(t.stateNode=s,Kt=t,gt=null,e=!0):e=!1),e||Ii(t)),null;case 13:return dg(e,t,s);case 4:return ce(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Fs(t,null,a,s):Pt(e,t,a,s),t.child;case 11:return ig(e,t,t.type,t.pendingProps,s);case 7:return Pt(e,t,t.pendingProps,s),t.child;case 8:return Pt(e,t,t.pendingProps.children,s),t.child;case 12:return Pt(e,t,t.pendingProps.children,s),t.child;case 10:return a=t.pendingProps,Ji(t,t.type,a.value),Pt(e,t,a.children,s),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,Vs(t),l=Zt(l),a=a(l),t.flags|=1,Pt(e,t,a,s),t.child;case 14:return sg(e,t,t.type,t.pendingProps,s);case 15:return rg(e,t,t.type,t.pendingProps,s);case 19:return mg(e,t,s);case 31:return Jx(e,t,s);case 22:return ag(e,t,s,t.pendingProps);case 24:return Vs(t),a=Zt(_t),e===null?(l=Gu(),l===null&&(l=ct,u=Yu(),l.pooledCache=u,u.refCount++,u!==null&&(l.pooledCacheLanes|=s),l=u),t.memoizedState={parent:a,cache:l},Xu(t),Ji(t,_t,l)):((e.lanes&s)!==0&&(Fu(e,t),Ja(t,null,null,s),Ia()),l=e.memoizedState,u=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),Ji(t,_t,a)):(a=u.cache,Ji(t,_t,a),a!==l.cache&&qu(t,[_t],s,!0))),Pt(e,t,t.pendingProps.children,s),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Oi(e){e.flags|=4}function Af(e,t,s,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Vg())e.flags|=8192;else throw Xs=El,Qu}else e.flags&=-16777217}function gg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ny(t))if(Vg())e.flags|=8192;else throw Xs=El,Qu}function Hl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ni():536870912,e.lanes|=t,Pr|=t)}function io(e,t){if(!Ge)switch(e.tailMode){case"hidden":t=e.tail;for(var s=null;t!==null;)t.alternate!==null&&(s=t),t=t.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var a=null;s!==null;)s.alternate!==null&&(a=s),s=s.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,s=0,a=0;if(t)for(var l=e.child;l!==null;)s|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)s|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=s,t}function $x(e,t,s){var a=t.pendingProps;switch(ju(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return s=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ei(_t),fe(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ur(t)?Oi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Lu())),yt(t),null;case 26:var l=t.type,u=t.memoizedState;return e===null?(Oi(t),u!==null?(yt(t),gg(t,u)):(yt(t),Af(t,l,null,a,s))):u?u!==e.memoizedState?(Oi(t),yt(t),gg(t,u)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Oi(t),yt(t),Af(t,l,e,a,s)),null;case 27:if(nt(t),s=ee.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Oi(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return yt(t),null}e=ne.current,Ur(t)?Pm(t):(e=Ty(l,a,s),t.stateNode=e,Oi(t))}return yt(t),null;case 5:if(nt(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Oi(t);else{if(!a){if(t.stateNode===null)throw Error(o(166));return yt(t),null}if(u=ne.current,Ur(t))Pm(t);else{var h=ec(ee.current);switch(u){case 1:u=h.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:u=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":u=h.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":u=h.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":u=h.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?h.createElement("select",{is:a.is}):h.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?h.createElement(l,{is:a.is}):h.createElement(l)}}u[Ut]=t,u[en]=a;e:for(h=t.child;h!==null;){if(h.tag===5||h.tag===6)u.appendChild(h.stateNode);else if(h.tag!==4&&h.tag!==27&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===t)break e;for(;h.sibling===null;){if(h.return===null||h.return===t)break e;h=h.return}h.sibling.return=h.return,h=h.sibling}t.stateNode=u;e:switch(It(u,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Oi(t)}}return yt(t),Af(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,s),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Oi(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(o(166));if(e=ee.current,Ur(t)){if(e=t.stateNode,s=t.memoizedProps,a=null,l=Kt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Ut]=t,e=!!(e.nodeValue===s||a!==null&&a.suppressHydrationWarning===!0||dy(e.nodeValue,s)),e||Ii(t,!0)}else e=ec(e).createTextNode(a),e[Ut]=t,t.stateNode=e}return yt(t),null;case 31:if(s=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ur(t),s!==null){if(e===null){if(!a)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Ut]=t}else qs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),e=!1}else s=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return t.flags&256?(An(t),t):(An(t),null);if((t.flags&128)!==0)throw Error(o(558))}return yt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Ur(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(o(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));l[Ut]=t}else qs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;yt(t),l=!1}else l=Lu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(An(t),t):(An(t),null)}return An(t),(t.flags&128)!==0?(t.lanes=s,t):(s=a!==null,e=e!==null&&e.memoizedState!==null,s&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==l&&(a.flags|=2048)),s!==e&&s&&(t.child.flags|=8192),Hl(t,t.updateQueue),yt(t),null);case 4:return fe(),e===null&&If(t.stateNode.containerInfo),yt(t),null;case 10:return Ei(t.type),yt(t),null;case 19:if(H(Ct),a=t.memoizedState,a===null)return yt(t),null;if(l=(t.flags&128)!==0,u=a.rendering,u===null)if(l)io(a,!1);else{if(Tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=Ol(e),u!==null){for(t.flags|=128,io(a,!1),e=u.updateQueue,t.updateQueue=e,Hl(t,e),t.subtreeFlags=0,e=s,s=t.child;s!==null;)Qm(s,e),s=s.sibling;return te(Ct,Ct.current&1|2),Ge&&Si(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ue()>Ql&&(t.flags|=128,l=!0,io(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ol(u),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Hl(t,e),io(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!Ge)return yt(t),null}else 2*ue()-a.renderingStartTime>Ql&&s!==536870912&&(t.flags|=128,l=!0,io(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ue(),e.sibling=null,s=Ct.current,te(Ct,l?s&1|2:s&1),Ge&&Si(t,a.treeForkCount),e):(yt(t),null);case 22:case 23:return An(t),Iu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(s&536870912)!==0&&(t.flags&128)===0&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),s=t.updateQueue,s!==null&&Hl(t,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==s&&(t.flags|=2048),e!==null&&H(Gs),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Ei(_t),yt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function eE(e,t){switch(ju(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ei(_t),fe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return nt(t),null;case 31:if(t.memoizedState!==null){if(An(t),t.alternate===null)throw Error(o(340));qs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(An(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));qs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Ct),null;case 4:return fe(),null;case 10:return Ei(t.type),null;case 22:case 23:return An(t),Iu(),e!==null&&H(Gs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ei(_t),null;case 25:return null;default:return null}}function yg(e,t){switch(ju(t),t.tag){case 3:Ei(_t),fe();break;case 26:case 27:case 5:nt(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&An(t);break;case 13:An(t);break;case 19:H(Ct);break;case 10:Ei(t.type);break;case 22:case 23:An(t),Iu(),e!==null&&H(Gs);break;case 24:Ei(_t)}}function so(e,t){try{var s=t.updateQueue,a=s!==null?s.lastEffect:null;if(a!==null){var l=a.next;s=l;do{if((s.tag&e)===e){a=void 0;var u=s.create,h=s.inst;a=u(),h.destroy=a}s=s.next}while(s!==l)}}catch(b){st(t,t.return,b)}}function is(e,t,s){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){var h=a.inst,b=h.destroy;if(b!==void 0){h.destroy=void 0,l=t;var R=s,G=b;try{G()}catch(P){st(l,R,P)}}}a=a.next}while(a!==u)}}catch(P){st(t,t.return,P)}}function bg(e){var t=e.updateQueue;if(t!==null){var s=e.stateNode;try{lp(t,s)}catch(a){st(e,e.return,a)}}}function vg(e,t,s){s.props=Zs(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(a){st(e,t,a)}}function ro(e,t){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof s=="function"?e.refCleanup=s(a):s.current=a}}catch(l){st(e,t,l)}}function ai(e,t){var s=e.ref,a=e.refCleanup;if(s!==null)if(typeof a=="function")try{a()}catch(l){st(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(l){st(e,t,l)}else s.current=null}function Sg(e){var t=e.type,s=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":s.autoFocus&&a.focus();break e;case"img":s.src?a.src=s.src:s.srcSet&&(a.srcset=s.srcSet)}}catch(l){st(e,e.return,l)}}function _f(e,t,s){try{var a=e.stateNode;EE(a,e.type,s,t),a[en]=t}catch(l){st(e,e.return,l)}}function xg(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&us(e.type)||e.tag===4}function Mf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xg(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&&us(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nf(e,t,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,t):(t=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,t.appendChild(e),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=yi));else if(a!==4&&(a===27&&us(e.type)&&(s=e.stateNode,t=null),e=e.child,e!==null))for(Nf(e,t,s),e=e.sibling;e!==null;)Nf(e,t,s),e=e.sibling}function ql(e,t,s){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?s.insertBefore(e,t):s.appendChild(e);else if(a!==4&&(a===27&&us(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(ql(e,t,s),e=e.sibling;e!==null;)ql(e,t,s),e=e.sibling}function Eg(e){var t=e.stateNode,s=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);It(t,a,s),t[Ut]=e,t[en]=s}catch(u){st(e,e.return,u)}}var Ci=!1,Dt=!1,Df=!1,Tg=typeof WeakSet=="function"?WeakSet:Set,Qt=null;function tE(e,t){if(e=e.containerInfo,$f=oc,e=jm(e),wu(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var a=s.getSelection&&s.getSelection();if(a&&a.rangeCount!==0){s=a.anchorNode;var l=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{s.nodeType,u.nodeType}catch{s=null;break e}var h=0,b=-1,R=-1,G=0,P=0,$=e,X=null;t:for(;;){for(var Z;$!==s||l!==0&&$.nodeType!==3||(b=h+l),$!==u||a!==0&&$.nodeType!==3||(R=h+a),$.nodeType===3&&(h+=$.nodeValue.length),(Z=$.firstChild)!==null;)X=$,$=Z;for(;;){if($===e)break t;if(X===s&&++G===l&&(b=h),X===u&&++P===a&&(R=h),(Z=$.nextSibling)!==null)break;$=X,X=$.parentNode}$=Z}s=b===-1||R===-1?null:{start:b,end:R}}else s=null}s=s||{start:0,end:0}}else s=null;for(ed={focusedElem:e,selectionRange:s},oc=!1,Qt=t;Qt!==null;)if(t=Qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qt=e;else for(;Qt!==null;){switch(t=Qt,u=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)l=e[s],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,s=t,l=u.memoizedProps,u=u.memoizedState,a=s.stateNode;try{var ye=Zs(s.type,l);e=a.getSnapshotBeforeUpdate(ye,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(Te){st(s,s.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,s=e.nodeType,s===9)id(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":id(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(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Qt=e;break}Qt=t.return}}function wg(e,t,s){var a=s.flags;switch(s.tag){case 0:case 11:case 15:_i(e,s),a&4&&so(5,s);break;case 1:if(_i(e,s),a&4)if(e=s.stateNode,t===null)try{e.componentDidMount()}catch(h){st(s,s.return,h)}else{var l=Zs(s.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(h){st(s,s.return,h)}}a&64&&bg(s),a&512&&ro(s,s.return);break;case 3:if(_i(e,s),a&64&&(e=s.updateQueue,e!==null)){if(t=null,s.child!==null)switch(s.child.tag){case 27:case 5:t=s.child.stateNode;break;case 1:t=s.child.stateNode}try{lp(e,t)}catch(h){st(s,s.return,h)}}break;case 27:t===null&&a&4&&Eg(s);case 26:case 5:_i(e,s),t===null&&a&4&&Sg(s),a&512&&ro(s,s.return);break;case 12:_i(e,s);break;case 31:_i(e,s),a&4&&Cg(e,s);break;case 13:_i(e,s),a&4&&Ag(e,s),a&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=uE.bind(null,s),ME(e,s))));break;case 22:if(a=s.memoizedState!==null||Ci,!a){t=t!==null&&t.memoizedState!==null||Dt,l=Ci;var u=Dt;Ci=a,(Dt=t)&&!u?Mi(e,s,(s.subtreeFlags&8772)!==0):_i(e,s),Ci=l,Dt=u}break;case 30:break;default:_i(e,s)}}function Rg(e){var t=e.alternate;t!==null&&(e.alternate=null,Rg(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ou(t)),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 bt=null,pn=!1;function Ai(e,t,s){for(s=s.child;s!==null;)Og(e,t,s),s=s.sibling}function Og(e,t,s){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(fn,s)}catch{}switch(s.tag){case 26:Dt||ai(s,t),Ai(e,t,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:Dt||ai(s,t);var a=bt,l=pn;us(s.type)&&(bt=s.stateNode,pn=!1),Ai(e,t,s),po(s.stateNode),bt=a,pn=l;break;case 5:Dt||ai(s,t);case 6:if(a=bt,l=pn,bt=null,Ai(e,t,s),bt=a,pn=l,bt!==null)if(pn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(s.stateNode)}catch(u){st(s,t,u)}else try{bt.removeChild(s.stateNode)}catch(u){st(s,t,u)}break;case 18:bt!==null&&(pn?(e=bt,by(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),ia(e)):by(bt,s.stateNode));break;case 4:a=bt,l=pn,bt=s.stateNode.containerInfo,pn=!0,Ai(e,t,s),bt=a,pn=l;break;case 0:case 11:case 14:case 15:is(2,s,t),Dt||is(4,s,t),Ai(e,t,s);break;case 1:Dt||(ai(s,t),a=s.stateNode,typeof a.componentWillUnmount=="function"&&vg(s,t,a)),Ai(e,t,s);break;case 21:Ai(e,t,s);break;case 22:Dt=(a=Dt)||s.memoizedState!==null,Ai(e,t,s),Dt=a;break;default:Ai(e,t,s)}}function Cg(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ia(e)}catch(s){st(t,t.return,s)}}}function Ag(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ia(e)}catch(s){st(t,t.return,s)}}function nE(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Tg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Tg),t;default:throw Error(o(435,e.tag))}}function Yl(e,t){var s=nE(e);t.forEach(function(a){if(!s.has(a)){s.add(a);var l=fE.bind(null,e,a);a.then(l,l)}})}function gn(e,t){var s=t.deletions;if(s!==null)for(var a=0;a<s.length;a++){var l=s[a],u=e,h=t,b=h;e:for(;b!==null;){switch(b.tag){case 27:if(us(b.type)){bt=b.stateNode,pn=!1;break e}break;case 5:bt=b.stateNode,pn=!1;break e;case 3:case 4:bt=b.stateNode.containerInfo,pn=!0;break e}b=b.return}if(bt===null)throw Error(o(160));Og(u,h,l),bt=null,pn=!1,u=l.alternate,u!==null&&(u.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_g(t,e),t=t.sibling}var Zn=null;function _g(e,t){var s=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(t,e),yn(e),a&4&&(is(3,e,e.return),so(3,e),is(5,e,e.return));break;case 1:gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),a&64&&Ci&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?a:s.concat(a))));break;case 26:var l=Zn;if(gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),a&4){var u=s!==null?s.memoizedState:null;if(a=e.memoizedState,s===null)if(a===null)if(e.stateNode===null){e:{a=e.type,s=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":u=l.getElementsByTagName("title")[0],(!u||u[Da]||u[Ut]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=l.createElement(a),l.head.insertBefore(u,l.querySelector("head > title"))),It(u,a,s),u[Ut]=e,Gt(u),a=u;break e;case"link":var h=_y("link","href",l).get(a+(s.href||""));if(h){for(var b=0;b<h.length;b++)if(u=h[b],u.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&u.getAttribute("rel")===(s.rel==null?null:s.rel)&&u.getAttribute("title")===(s.title==null?null:s.title)&&u.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){h.splice(b,1);break t}}u=l.createElement(a),It(u,a,s),l.head.appendChild(u);break;case"meta":if(h=_y("meta","content",l).get(a+(s.content||""))){for(b=0;b<h.length;b++)if(u=h[b],u.getAttribute("content")===(s.content==null?null:""+s.content)&&u.getAttribute("name")===(s.name==null?null:s.name)&&u.getAttribute("property")===(s.property==null?null:s.property)&&u.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&u.getAttribute("charset")===(s.charSet==null?null:s.charSet)){h.splice(b,1);break t}}u=l.createElement(a),It(u,a,s),l.head.appendChild(u);break;default:throw Error(o(468,a))}u[Ut]=e,Gt(u),a=u}e.stateNode=a}else My(l,e.type,e.stateNode);else e.stateNode=Ay(l,a,e.memoizedProps);else u!==a?(u===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):u.count--,a===null?My(l,e.type,e.stateNode):Ay(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&_f(e,e.memoizedProps,s.memoizedProps)}break;case 27:gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),s!==null&&a&4&&_f(e,e.memoizedProps,s.memoizedProps);break;case 5:if(gn(t,e),yn(e),a&512&&(Dt||s===null||ai(s,s.return)),e.flags&32){l=e.stateNode;try{Or(l,"")}catch(ye){st(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,_f(e,l,s!==null?s.memoizedProps:l)),a&1024&&(Df=!0);break;case 6:if(gn(t,e),yn(e),a&4){if(e.stateNode===null)throw Error(o(162));a=e.memoizedProps,s=e.stateNode;try{s.nodeValue=a}catch(ye){st(e,e.return,ye)}}break;case 3:if(ic=null,l=Zn,Zn=tc(t.containerInfo),gn(t,e),Zn=l,yn(e),a&4&&s!==null&&s.memoizedState.isDehydrated)try{ia(t.containerInfo)}catch(ye){st(e,e.return,ye)}Df&&(Df=!1,Mg(e));break;case 4:a=Zn,Zn=tc(e.stateNode.containerInfo),gn(t,e),yn(e),Zn=a;break;case 12:gn(t,e),yn(e);break;case 31:gn(t,e),yn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Yl(e,a)));break;case 13:gn(t,e),yn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Gl=ue()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Yl(e,a)));break;case 22:l=e.memoizedState!==null;var R=s!==null&&s.memoizedState!==null,G=Ci,P=Dt;if(Ci=G||l,Dt=P||R,gn(t,e),Dt=P,Ci=G,yn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(s===null||R||Ci||Dt||Ps(e)),s=null,t=e;;){if(t.tag===5||t.tag===26){if(s===null){R=s=t;try{if(u=R.stateNode,l)h=u.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none";else{b=R.stateNode;var $=R.memoizedProps.style,X=$!=null&&$.hasOwnProperty("display")?$.display:null;b.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ye){st(R,R.return,ye)}}}else if(t.tag===6){if(s===null){R=t;try{R.stateNode.nodeValue=l?"":R.memoizedProps}catch(ye){st(R,R.return,ye)}}}else if(t.tag===18){if(s===null){R=t;try{var Z=R.stateNode;l?vy(Z,!0):vy(R.stateNode,!1)}catch(ye){st(R,R.return,ye)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;s===t&&(s=null),t=t.return}s===t&&(s=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(s=a.retryQueue,s!==null&&(a.retryQueue=null,Yl(e,s))));break;case 19:gn(t,e),yn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Yl(e,a)));break;case 30:break;case 21:break;default:gn(t,e),yn(e)}}function yn(e){var t=e.flags;if(t&2){try{for(var s,a=e.return;a!==null;){if(xg(a)){s=a;break}a=a.return}if(s==null)throw Error(o(160));switch(s.tag){case 27:var l=s.stateNode,u=Mf(e);ql(e,u,l);break;case 5:var h=s.stateNode;s.flags&32&&(Or(h,""),s.flags&=-33);var b=Mf(e);ql(e,b,h);break;case 3:case 4:var R=s.stateNode.containerInfo,G=Mf(e);Nf(e,G,R);break;default:throw Error(o(161))}}catch(P){st(e,e.return,P)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mg(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mg(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function _i(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wg(e,t.alternate,t),t=t.sibling}function Ps(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:is(4,t,t.return),Ps(t);break;case 1:ai(t,t.return);var s=t.stateNode;typeof s.componentWillUnmount=="function"&&vg(t,t.return,s),Ps(t);break;case 27:po(t.stateNode);case 26:case 5:ai(t,t.return),Ps(t);break;case 22:t.memoizedState===null&&Ps(t);break;case 30:Ps(t);break;default:Ps(t)}e=e.sibling}}function Mi(e,t,s){for(s=s&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,u=t,h=u.flags;switch(u.tag){case 0:case 11:case 15:Mi(l,u,s),so(4,u);break;case 1:if(Mi(l,u,s),a=u,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(G){st(a,a.return,G)}if(a=u,l=a.updateQueue,l!==null){var b=a.stateNode;try{var R=l.shared.hiddenCallbacks;if(R!==null)for(l.shared.hiddenCallbacks=null,l=0;l<R.length;l++)op(R[l],b)}catch(G){st(a,a.return,G)}}s&&h&64&&bg(u),ro(u,u.return);break;case 27:Eg(u);case 26:case 5:Mi(l,u,s),s&&a===null&&h&4&&Sg(u),ro(u,u.return);break;case 12:Mi(l,u,s);break;case 31:Mi(l,u,s),s&&h&4&&Cg(l,u);break;case 13:Mi(l,u,s),s&&h&4&&Ag(l,u);break;case 22:u.memoizedState===null&&Mi(l,u,s),ro(u,u.return);break;case 30:break;default:Mi(l,u,s)}t=t.sibling}}function zf(e,t){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&Xa(s))}function kf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xa(e))}function Pn(e,t,s,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ng(e,t,s,a),t=t.sibling}function Ng(e,t,s,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Pn(e,t,s,a),l&2048&&so(9,t);break;case 1:Pn(e,t,s,a);break;case 3:Pn(e,t,s,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xa(e)));break;case 12:if(l&2048){Pn(e,t,s,a),e=t.stateNode;try{var u=t.memoizedProps,h=u.id,b=u.onPostCommit;typeof b=="function"&&b(h,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){st(t,t.return,R)}}else Pn(e,t,s,a);break;case 31:Pn(e,t,s,a);break;case 13:Pn(e,t,s,a);break;case 23:break;case 22:u=t.stateNode,h=t.alternate,t.memoizedState!==null?u._visibility&2?Pn(e,t,s,a):ao(e,t):u._visibility&2?Pn(e,t,s,a):(u._visibility|=2,Fr(e,t,s,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&zf(h,t);break;case 24:Pn(e,t,s,a),l&2048&&kf(t.alternate,t);break;default:Pn(e,t,s,a)}}function Fr(e,t,s,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,h=t,b=s,R=a,G=h.flags;switch(h.tag){case 0:case 11:case 15:Fr(u,h,b,R,l),so(8,h);break;case 23:break;case 22:var P=h.stateNode;h.memoizedState!==null?P._visibility&2?Fr(u,h,b,R,l):ao(u,h):(P._visibility|=2,Fr(u,h,b,R,l)),l&&G&2048&&zf(h.alternate,h);break;case 24:Fr(u,h,b,R,l),l&&G&2048&&kf(h.alternate,h);break;default:Fr(u,h,b,R,l)}t=t.sibling}}function ao(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var s=e,a=t,l=a.flags;switch(a.tag){case 22:ao(s,a),l&2048&&zf(a.alternate,a);break;case 24:ao(s,a),l&2048&&kf(a.alternate,a);break;default:ao(s,a)}t=t.sibling}}var oo=8192;function Kr(e,t,s){if(e.subtreeFlags&oo)for(e=e.child;e!==null;)Dg(e,t,s),e=e.sibling}function Dg(e,t,s){switch(e.tag){case 26:Kr(e,t,s),e.flags&oo&&e.memoizedState!==null&&VE(s,Zn,e.memoizedState,e.memoizedProps);break;case 5:Kr(e,t,s);break;case 3:case 4:var a=Zn;Zn=tc(e.stateNode.containerInfo),Kr(e,t,s),Zn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=oo,oo=16777216,Kr(e,t,s),oo=a):Kr(e,t,s));break;default:Kr(e,t,s)}}function zg(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function lo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var a=t[s];Qt=a,jg(a,e)}zg(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kg(e),e=e.sibling}function kg(e){switch(e.tag){case 0:case 11:case 15:lo(e),e.flags&2048&&is(9,e,e.return);break;case 3:lo(e);break;case 12:lo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Vl(e)):lo(e);break;default:lo(e)}}function Vl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var s=0;s<t.length;s++){var a=t[s];Qt=a,jg(a,e)}zg(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:is(8,t,t.return),Vl(t);break;case 22:s=t.stateNode,s._visibility&2&&(s._visibility&=-3,Vl(t));break;default:Vl(t)}e=e.sibling}}function jg(e,t){for(;Qt!==null;){var s=Qt;switch(s.tag){case 0:case 11:case 15:is(8,s,t);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var a=s.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Xa(s.memoizedState.cache)}if(a=s.child,a!==null)a.return=s,Qt=a;else e:for(s=e;Qt!==null;){a=Qt;var l=a.sibling,u=a.return;if(Rg(a),a===s){Qt=null;break e}if(l!==null){l.return=u,Qt=l;break e}Qt=u}}}var iE={getCacheForType:function(e){var t=Zt(_t),s=t.data.get(e);return s===void 0&&(s=e(),t.data.set(e,s)),s},cacheSignal:function(){return Zt(_t).controller.signal}},sE=typeof WeakMap=="function"?WeakMap:Map,We=0,ct=null,Ue=null,He=0,it=0,_n=null,ss=!1,Zr=!1,jf=!1,Ni=0,Tt=0,rs=0,Is=0,Uf=0,Mn=0,Pr=0,co=null,bn=null,Lf=!1,Gl=0,Ug=0,Ql=1/0,Xl=null,as=null,Lt=0,os=null,Ir=null,Di=0,Bf=0,Hf=null,Lg=null,uo=0,qf=null;function Nn(){return(We&2)!==0&&He!==0?He&-He:N.T!==null?Ff():Wo()}function Bg(){if(Mn===0)if((He&536870912)===0||Ge){var e=Fe;Fe<<=1,(Fe&3932160)===0&&(Fe=262144),Mn=e}else Mn=536870912;return e=Cn.current,e!==null&&(e.flags|=32),Mn}function vn(e,t,s){(e===ct&&(it===2||it===9)||e.cancelPendingCommit!==null)&&(Jr(e,0),ls(e,He,Mn,!1)),dn(e,s),((We&2)===0||e!==ct)&&(e===ct&&((We&2)===0&&(Is|=s),Tt===4&&ls(e,He,Mn,!1)),oi(e))}function Hg(e,t,s){if((We&6)!==0)throw Error(o(327));var a=!s&&(t&127)===0&&(t&e.expiredLanes)===0||an(e,t),l=a?oE(e,t):Vf(e,t,!0),u=a;do{if(l===0){Zr&&!a&&ls(e,t,0,!1);break}else{if(s=e.current.alternate,u&&!rE(s)){l=Vf(e,t,!1),u=!1;continue}if(l===2){if(u=t,e.errorRecoveryDisabledLanes&u)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){t=h;e:{var b=e;l=co;var R=b.current.memoizedState.isDehydrated;if(R&&(Jr(b,h).flags|=256),h=Vf(b,h,!1),h!==2){if(jf&&!R){b.errorRecoveryDisabledLanes|=u,Is|=u,l=4;break e}u=bn,bn=l,u!==null&&(bn===null?bn=u:bn.push.apply(bn,u))}l=h}if(u=!1,l!==2)continue}}if(l===1){Jr(e,0),ls(e,t,0,!0);break}e:{switch(a=e,u=l,u){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:ls(a,t,Mn,!ss);break e;case 2:bn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(l=Gl+300-ue(),10<l)){if(ls(a,t,Mn,!ss),Ft(a,0,!0)!==0)break e;Di=t,a.timeoutHandle=gy(qg.bind(null,a,s,bn,Xl,Lf,t,Mn,Is,Pr,ss,u,"Throttled",-0,0),l);break e}qg(a,s,bn,Xl,Lf,t,Mn,Is,Pr,ss,u,null,-0,0)}}break}while(!0);oi(e)}function qg(e,t,s,a,l,u,h,b,R,G,P,$,X,Z){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yi},Dg(t,u,$);var ye=(u&62914560)===u?Gl-ue():(u&4194048)===u?Ug-ue():0;if(ye=GE($,ye),ye!==null){Di=u,e.cancelPendingCommit=ye(Zg.bind(null,e,t,u,s,a,l,h,b,R,P,$,null,X,Z)),ls(e,u,h,!G);return}}Zg(e,t,u,s,a,l,h,b,R)}function rE(e){for(var t=e;;){var s=t.tag;if((s===0||s===11||s===15)&&t.flags&16384&&(s=t.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var a=0;a<s.length;a++){var l=s[a],u=l.getSnapshot;l=l.value;try{if(!Rn(u(),l))return!1}catch{return!1}}if(s=t.child,t.subtreeFlags&16384&&s!==null)s.return=t,t=s;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ls(e,t,s,a){t&=~Uf,t&=~Is,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var u=31-Yt(l),h=1<<u;a[u]=-1,l&=~h}s!==0&&yr(e,s,t)}function Fl(){return(We&6)===0?(fo(0),!1):!0}function Yf(){if(Ue!==null){if(it===0)var e=Ue.return;else e=Ue,xi=Ys=null,nf(e),Yr=null,Ka=0,e=Ue;for(;e!==null;)yg(e.alternate,e),e=e.return;Ue=null}}function Jr(e,t){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,RE(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Di=0,Yf(),ct=e,Ue=s=vi(e.current,null),He=t,it=0,_n=null,ss=!1,Zr=an(e,t),jf=!1,Pr=Mn=Uf=Is=rs=Tt=0,bn=co=null,Lf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Yt(a),u=1<<l;t|=e[l],a&=~u}return Ni=t,hl(),s}function Yg(e,t){Ae=null,N.H=to,t===qr||t===xl?(t=ip(),it=3):t===Qu?(t=ip(),it=4):it=t===vf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_n=t,Ue===null&&(Tt=1,jl(e,Ln(t,e.current)))}function Vg(){var e=Cn.current;return e===null?!0:(He&4194048)===He?Yn===null:(He&62914560)===He||(He&536870912)!==0?e===Yn:!1}function Gg(){var e=N.H;return N.H=to,e===null?to:e}function Qg(){var e=N.A;return N.A=iE,e}function Kl(){Tt=4,ss||(He&4194048)!==He&&Cn.current!==null||(Zr=!0),(rs&134217727)===0&&(Is&134217727)===0||ct===null||ls(ct,He,Mn,!1)}function Vf(e,t,s){var a=We;We|=2;var l=Gg(),u=Qg();(ct!==e||He!==t)&&(Xl=null,Jr(e,t)),t=!1;var h=Tt;e:do try{if(it!==0&&Ue!==null){var b=Ue,R=_n;switch(it){case 8:Yf(),h=6;break e;case 3:case 2:case 9:case 6:Cn.current===null&&(t=!0);var G=it;if(it=0,_n=null,Wr(e,b,R,G),s&&Zr){h=0;break e}break;default:G=it,it=0,_n=null,Wr(e,b,R,G)}}aE(),h=Tt;break}catch(P){Yg(e,P)}while(!0);return t&&e.shellSuspendCounter++,xi=Ys=null,We=a,N.H=l,N.A=u,Ue===null&&(ct=null,He=0,hl()),h}function aE(){for(;Ue!==null;)Xg(Ue)}function oE(e,t){var s=We;We|=2;var a=Gg(),l=Qg();ct!==e||He!==t?(Xl=null,Ql=ue()+500,Jr(e,t)):Zr=an(e,t);e:do try{if(it!==0&&Ue!==null){t=Ue;var u=_n;t:switch(it){case 1:it=0,_n=null,Wr(e,t,u,1);break;case 2:case 9:if(tp(u)){it=0,_n=null,Fg(t);break}t=function(){it!==2&&it!==9||ct!==e||(it=7),oi(e)},u.then(t,t);break e;case 3:it=7;break e;case 4:it=5;break e;case 7:tp(u)?(it=0,_n=null,Fg(t)):(it=0,_n=null,Wr(e,t,u,7));break;case 5:var h=null;switch(Ue.tag){case 26:h=Ue.memoizedState;case 5:case 27:var b=Ue;if(h?Ny(h):b.stateNode.complete){it=0,_n=null;var R=b.sibling;if(R!==null)Ue=R;else{var G=b.return;G!==null?(Ue=G,Zl(G)):Ue=null}break t}}it=0,_n=null,Wr(e,t,u,5);break;case 6:it=0,_n=null,Wr(e,t,u,6);break;case 8:Yf(),Tt=6;break e;default:throw Error(o(462))}}lE();break}catch(P){Yg(e,P)}while(!0);return xi=Ys=null,N.H=a,N.A=l,We=s,Ue!==null?0:(ct=null,He=0,hl(),Tt)}function lE(){for(;Ue!==null&&!je();)Xg(Ue)}function Xg(e){var t=pg(e.alternate,e,Ni);e.memoizedProps=e.pendingProps,t===null?Zl(e):Ue=t}function Fg(e){var t=e,s=t.alternate;switch(t.tag){case 15:case 0:t=cg(s,t,t.pendingProps,t.type,void 0,He);break;case 11:t=cg(s,t,t.pendingProps,t.type.render,t.ref,He);break;case 5:nf(t);default:yg(s,t),t=Ue=Qm(t,Ni),t=pg(s,t,Ni)}e.memoizedProps=e.pendingProps,t===null?Zl(e):Ue=t}function Wr(e,t,s,a){xi=Ys=null,nf(t),Yr=null,Ka=0;var l=t.return;try{if(Ix(e,l,t,s,He)){Tt=1,jl(e,Ln(s,e.current)),Ue=null;return}}catch(u){if(l!==null)throw Ue=l,u;Tt=1,jl(e,Ln(s,e.current)),Ue=null;return}t.flags&32768?(Ge||a===1?e=!0:Zr||(He&536870912)!==0?e=!1:(ss=e=!0,(a===2||a===9||a===3||a===6)&&(a=Cn.current,a!==null&&a.tag===13&&(a.flags|=16384))),Kg(t,e)):Zl(t)}function Zl(e){var t=e;do{if((t.flags&32768)!==0){Kg(t,ss);return}e=t.return;var s=$x(t.alternate,t,Ni);if(s!==null){Ue=s;return}if(t=t.sibling,t!==null){Ue=t;return}Ue=t=e}while(t!==null);Tt===0&&(Tt=5)}function Kg(e,t){do{var s=eE(e.alternate,e);if(s!==null){s.flags&=32767,Ue=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!t&&(e=e.sibling,e!==null)){Ue=e;return}Ue=e=s}while(e!==null);Tt=6,Ue=null}function Zg(e,t,s,a,l,u,h,b,R){e.cancelPendingCommit=null;do Pl();while(Lt!==0);if((We&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(u=t.lanes|t.childLanes,u|=_u,Na(e,s,u,h,b,R),e===ct&&(Ue=ct=null,He=0),Ir=t,os=e,Di=s,Bf=u,Hf=l,Lg=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,dE(pt,function(){return $g(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=N.T,N.T=null,l=Q.p,Q.p=2,h=We,We|=4;try{tE(e,t,s)}finally{We=h,Q.p=l,N.T=a}}Lt=1,Pg(),Ig(),Jg()}}function Pg(){if(Lt===1){Lt=0;var e=os,t=Ir,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null;var a=Q.p;Q.p=2;var l=We;We|=4;try{_g(t,e);var u=ed,h=jm(e.containerInfo),b=u.focusedElem,R=u.selectionRange;if(h!==b&&b&&b.ownerDocument&&km(b.ownerDocument.documentElement,b)){if(R!==null&&wu(b)){var G=R.start,P=R.end;if(P===void 0&&(P=G),"selectionStart"in b)b.selectionStart=G,b.selectionEnd=Math.min(P,b.value.length);else{var $=b.ownerDocument||document,X=$&&$.defaultView||window;if(X.getSelection){var Z=X.getSelection(),ye=b.textContent.length,Te=Math.min(R.start,ye),ot=R.end===void 0?Te:Math.min(R.end,ye);!Z.extend&&Te>ot&&(h=ot,ot=Te,Te=h);var L=zm(b,Te),M=zm(b,ot);if(L&&M&&(Z.rangeCount!==1||Z.anchorNode!==L.node||Z.anchorOffset!==L.offset||Z.focusNode!==M.node||Z.focusOffset!==M.offset)){var V=$.createRange();V.setStart(L.node,L.offset),Z.removeAllRanges(),Te>ot?(Z.addRange(V),Z.extend(M.node,M.offset)):(V.setEnd(M.node,M.offset),Z.addRange(V))}}}}for($=[],Z=b;Z=Z.parentNode;)Z.nodeType===1&&$.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<$.length;b++){var J=$[b];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}oc=!!$f,ed=$f=null}finally{We=l,Q.p=a,N.T=s}}e.current=t,Lt=2}}function Ig(){if(Lt===2){Lt=0;var e=os,t=Ir,s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=N.T,N.T=null;var a=Q.p;Q.p=2;var l=We;We|=4;try{wg(e,t.alternate,t)}finally{We=l,Q.p=a,N.T=s}}Lt=3}}function Jg(){if(Lt===4||Lt===3){Lt=0,xt();var e=os,t=Ir,s=Di,a=Lg;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Lt=5:(Lt=0,Ir=os=null,Wg(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(as=null),vr(s),t=t.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(fn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=N.T,l=Q.p,Q.p=2,N.T=null;try{for(var u=e.onRecoverableError,h=0;h<a.length;h++){var b=a[h];u(b.value,{componentStack:b.stack})}}finally{N.T=t,Q.p=l}}(Di&3)!==0&&Pl(),oi(e),l=e.pendingLanes,(s&261930)!==0&&(l&42)!==0?e===qf?uo++:(uo=0,qf=e):uo=0,fo(0)}}function Wg(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xa(t)))}function Pl(){return Pg(),Ig(),Jg(),$g()}function $g(){if(Lt!==5)return!1;var e=os,t=Bf;Bf=0;var s=vr(Di),a=N.T,l=Q.p;try{Q.p=32>s?32:s,N.T=null,s=Hf,Hf=null;var u=os,h=Di;if(Lt=0,Ir=os=null,Di=0,(We&6)!==0)throw Error(o(331));var b=We;if(We|=4,kg(u.current),Ng(u,u.current,h,s),We=b,fo(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(fn,u)}catch{}return!0}finally{Q.p=l,N.T=a,Wg(e,t)}}function ey(e,t,s){t=Ln(s,t),t=bf(e.stateNode,t,2),e=es(e,t,2),e!==null&&(dn(e,2),oi(e))}function st(e,t,s){if(e.tag===3)ey(e,e,s);else for(;t!==null;){if(t.tag===3){ey(t,e,s);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(as===null||!as.has(a))){e=Ln(s,e),s=tg(2),a=es(t,s,2),a!==null&&(ng(s,a,t,e),dn(a,2),oi(a));break}}t=t.return}}function Gf(e,t,s){var a=e.pingCache;if(a===null){a=e.pingCache=new sE;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(s)||(jf=!0,l.add(s),e=cE.bind(null,e,t,s),t.then(e,e))}function cE(e,t,s){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,ct===e&&(He&s)===s&&(Tt===4||Tt===3&&(He&62914560)===He&&300>ue()-Gl?(We&2)===0&&Jr(e,0):Uf|=s,Pr===He&&(Pr=0)),oi(e)}function ty(e,t){t===0&&(t=ni()),e=Bs(e,t),e!==null&&(dn(e,t),oi(e))}function uE(e){var t=e.memoizedState,s=0;t!==null&&(s=t.retryLane),ty(e,s)}function fE(e,t){var s=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(s=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(o(314))}a!==null&&a.delete(t),ty(e,s)}function dE(e,t){return mt(e,t)}var Il=null,$r=null,Qf=!1,Jl=!1,Xf=!1,cs=0;function oi(e){e!==$r&&e.next===null&&($r===null?Il=$r=e:$r=$r.next=e),Jl=!0,Qf||(Qf=!0,mE())}function fo(e,t){if(!Xf&&Jl){Xf=!0;do for(var s=!1,a=Il;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var u=0;else{var h=a.suspendedLanes,b=a.pingedLanes;u=(1<<31-Yt(42|e)+1)-1,u&=l&~(h&~b),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(s=!0,ry(a,u))}else u=He,u=Ft(a,a===ct?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||an(a,u)||(s=!0,ry(a,u));a=a.next}while(s);Xf=!1}}function hE(){ny()}function ny(){Jl=Qf=!1;var e=0;cs!==0&&wE()&&(e=cs);for(var t=ue(),s=null,a=Il;a!==null;){var l=a.next,u=iy(a,t);u===0?(a.next=null,s===null?Il=l:s.next=l,l===null&&($r=s)):(s=a,(e!==0||(u&3)!==0)&&(Jl=!0)),a=l}Lt!==0&&Lt!==5||fo(e),cs!==0&&(cs=0)}function iy(e,t){for(var s=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var h=31-Yt(u),b=1<<h,R=l[h];R===-1?((b&s)===0||(b&a)!==0)&&(l[h]=wn(b,t)):R<=t&&(e.expiredLanes|=b),u&=~b}if(t=ct,s=He,s=Ft(e,e===t?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,s===0||e===t&&(it===2||it===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&dt(a),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||an(e,s)){if(t=s&-s,t===e.callbackPriority)return t;switch(a!==null&&dt(a),vr(s)){case 2:case 8:s=Be;break;case 32:s=pt;break;case 268435456:s=sn;break;default:s=pt}return a=sy.bind(null,e),s=mt(s,a),e.callbackPriority=t,e.callbackNode=s,t}return a!==null&&a!==null&&dt(a),e.callbackPriority=2,e.callbackNode=null,2}function sy(e,t){if(Lt!==0&&Lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Pl()&&e.callbackNode!==s)return null;var a=He;return a=Ft(e,e===ct?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Hg(e,a,t),iy(e,ue()),e.callbackNode!=null&&e.callbackNode===s?sy.bind(null,e):null)}function ry(e,t){if(Pl())return null;Hg(e,t,!0)}function mE(){OE(function(){(We&6)!==0?mt(ht,hE):ny()})}function Ff(){if(cs===0){var e=Br;e===0&&(e=pi,pi<<=1,(pi&261888)===0&&(pi=256)),cs=e}return cs}function ay(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rl(""+e)}function oy(e,t){var s=t.ownerDocument.createElement("input");return s.name=t.name,s.value=t.value,e.id&&s.setAttribute("form",e.id),t.parentNode.insertBefore(s,t),e=new FormData(e),s.parentNode.removeChild(s),e}function pE(e,t,s,a,l){if(t==="submit"&&s&&s.stateNode===l){var u=ay((l[en]||null).action),h=a.submitter;h&&(t=(t=h[en]||null)?ay(t.formAction):h.getAttribute("formAction"),t!==null&&(u=t,h=null));var b=new cl("action","action",null,a,l);e.push({event:b,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(cs!==0){var R=h?oy(l,h):new FormData(l);df(s,{pending:!0,data:R,method:l.method,action:u},null,R)}}else typeof u=="function"&&(b.preventDefault(),R=h?oy(l,h):new FormData(l),df(s,{pending:!0,data:R,method:l.method,action:u},u,R))},currentTarget:l}]})}}for(var Kf=0;Kf<Au.length;Kf++){var Zf=Au[Kf],gE=Zf.toLowerCase(),yE=Zf[0].toUpperCase()+Zf.slice(1);Kn(gE,"on"+yE)}Kn(Bm,"onAnimationEnd"),Kn(Hm,"onAnimationIteration"),Kn(qm,"onAnimationStart"),Kn("dblclick","onDoubleClick"),Kn("focusin","onFocus"),Kn("focusout","onBlur"),Kn(zx,"onTransitionRun"),Kn(kx,"onTransitionStart"),Kn(jx,"onTransitionCancel"),Kn(Ym,"onTransitionEnd"),wr("onMouseEnter",["mouseout","mouseover"]),wr("onMouseLeave",["mouseout","mouseover"]),wr("onPointerEnter",["pointerout","pointerover"]),wr("onPointerLeave",["pointerout","pointerover"]),ks("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ks("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ks("onBeforeInput",["compositionend","keypress","textInput","paste"]),ks("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ks("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ks("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ho="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(" "),bE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ho));function ly(e,t){t=(t&4)!==0;for(var s=0;s<e.length;s++){var a=e[s],l=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var h=a.length-1;0<=h;h--){var b=a[h],R=b.instance,G=b.currentTarget;if(b=b.listener,R!==u&&l.isPropagationStopped())break e;u=b,l.currentTarget=G;try{u(l)}catch(P){dl(P)}l.currentTarget=null,u=R}else for(h=0;h<a.length;h++){if(b=a[h],R=b.instance,G=b.currentTarget,b=b.listener,R!==u&&l.isPropagationStopped())break e;u=b,l.currentTarget=G;try{u(l)}catch(P){dl(P)}l.currentTarget=null,u=R}}}}function Le(e,t){var s=t[Sr];s===void 0&&(s=t[Sr]=new Set);var a=e+"__bubble";s.has(a)||(cy(t,e,2,!1),s.add(a))}function Pf(e,t,s){var a=0;t&&(a|=4),cy(s,e,a,t)}var Wl="_reactListening"+Math.random().toString(36).slice(2);function If(e){if(!e[Wl]){e[Wl]=!0,nm.forEach(function(s){s!=="selectionchange"&&(bE.has(s)||Pf(s,!1,e),Pf(s,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Wl]||(t[Wl]=!0,Pf("selectionchange",!1,t))}}function cy(e,t,s,a){switch(By(t)){case 2:var l=FE;break;case 8:l=KE;break;default:l=fd}s=l.bind(null,t,s,e),l=void 0,!pu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,s,{capture:!0,passive:l}):e.addEventListener(t,s,!0):l!==void 0?e.addEventListener(t,s,{passive:l}):e.addEventListener(t,s,!1)}function Jf(e,t,s,a,l){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var h=a.tag;if(h===3||h===4){var b=a.stateNode.containerInfo;if(b===l)break;if(h===4)for(h=a.return;h!==null;){var R=h.tag;if((R===3||R===4)&&h.stateNode.containerInfo===l)return;h=h.return}for(;b!==null;){if(h=xr(b),h===null)return;if(R=h.tag,R===5||R===6||R===26||R===27){a=u=h;continue e}b=b.parentNode}}a=a.return}mm(function(){var G=u,P=hu(s),$=[];e:{var X=Vm.get(e);if(X!==void 0){var Z=cl,ye=e;switch(e){case"keypress":if(ol(s)===0)break e;case"keydown":case"keyup":Z=fx;break;case"focusin":ye="focus",Z=vu;break;case"focusout":ye="blur",Z=vu;break;case"beforeblur":case"afterblur":Z=vu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=ym;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=$S;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=mx;break;case Bm:case Hm:case qm:Z=nx;break;case Ym:Z=gx;break;case"scroll":case"scrollend":Z=JS;break;case"wheel":Z=bx;break;case"copy":case"cut":case"paste":Z=sx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=vm;break;case"toggle":case"beforetoggle":Z=Sx}var Te=(t&4)!==0,ot=!Te&&(e==="scroll"||e==="scrollend"),L=Te?X!==null?X+"Capture":null:X;Te=[];for(var M=G,V;M!==null;){var J=M;if(V=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||V===null||L===null||(J=ka(M,L),J!=null&&Te.push(mo(M,J,V))),ot)break;M=M.return}0<Te.length&&(X=new Z(X,ye,null,s,P),$.push({event:X,listeners:Te}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",X&&s!==du&&(ye=s.relatedTarget||s.fromElement)&&(xr(ye)||ye[Fi]))break e;if((Z||X)&&(X=P.window===P?P:(X=P.ownerDocument)?X.defaultView||X.parentWindow:window,Z?(ye=s.relatedTarget||s.toElement,Z=G,ye=ye?xr(ye):null,ye!==null&&(ot=f(ye),Te=ye.tag,ye!==ot||Te!==5&&Te!==27&&Te!==6)&&(ye=null)):(Z=null,ye=G),Z!==ye)){if(Te=ym,J="onMouseLeave",L="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(Te=vm,J="onPointerLeave",L="onPointerEnter",M="pointer"),ot=Z==null?X:za(Z),V=ye==null?X:za(ye),X=new Te(J,M+"leave",Z,s,P),X.target=ot,X.relatedTarget=V,J=null,xr(P)===G&&(Te=new Te(L,M+"enter",ye,s,P),Te.target=V,Te.relatedTarget=ot,J=Te),ot=J,Z&&ye)t:{for(Te=vE,L=Z,M=ye,V=0,J=L;J;J=Te(J))V++;J=0;for(var Se=M;Se;Se=Te(Se))J++;for(;0<V-J;)L=Te(L),V--;for(;0<J-V;)M=Te(M),J--;for(;V--;){if(L===M||M!==null&&L===M.alternate){Te=L;break t}L=Te(L),M=Te(M)}Te=null}else Te=null;Z!==null&&uy($,X,Z,Te,!1),ye!==null&&ot!==null&&uy($,ot,ye,Te,!0)}}e:{if(X=G?za(G):window,Z=X.nodeName&&X.nodeName.toLowerCase(),Z==="select"||Z==="input"&&X.type==="file")var Pe=Cm;else if(Rm(X))if(Am)Pe=Mx;else{Pe=Ax;var be=Cx}else Z=X.nodeName,!Z||Z.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?G&&fu(G.elementType)&&(Pe=Cm):Pe=_x;if(Pe&&(Pe=Pe(e,G))){Om($,Pe,s,P);break e}be&&be(e,X,G),e==="focusout"&&G&&X.type==="number"&&G.memoizedProps.value!=null&&uu(X,"number",X.value)}switch(be=G?za(G):window,e){case"focusin":(Rm(be)||be.contentEditable==="true")&&(Mr=be,Ru=G,Va=null);break;case"focusout":Va=Ru=Mr=null;break;case"mousedown":Ou=!0;break;case"contextmenu":case"mouseup":case"dragend":Ou=!1,Um($,s,P);break;case"selectionchange":if(Dx)break;case"keydown":case"keyup":Um($,s,P)}var _e;if(xu)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else _r?Tm(e,s)&&(qe="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(qe="onCompositionStart");qe&&(Sm&&s.locale!=="ko"&&(_r||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&_r&&(_e=pm()):(Ki=P,gu="value"in Ki?Ki.value:Ki.textContent,_r=!0)),be=$l(G,qe),0<be.length&&(qe=new bm(qe,e,null,s,P),$.push({event:qe,listeners:be}),_e?qe.data=_e:(_e=wm(s),_e!==null&&(qe.data=_e)))),(_e=Ex?Tx(e,s):wx(e,s))&&(qe=$l(G,"onBeforeInput"),0<qe.length&&(be=new bm("onBeforeInput","beforeinput",null,s,P),$.push({event:be,listeners:qe}),be.data=_e)),pE($,e,G,s,P)}ly($,t)})}function mo(e,t,s){return{instance:e,listener:t,currentTarget:s}}function $l(e,t){for(var s=t+"Capture",a=[];e!==null;){var l=e,u=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||u===null||(l=ka(e,s),l!=null&&a.unshift(mo(e,l,u)),l=ka(e,t),l!=null&&a.push(mo(e,l,u))),e.tag===3)return a;e=e.return}return[]}function vE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uy(e,t,s,a,l){for(var u=t._reactName,h=[];s!==null&&s!==a;){var b=s,R=b.alternate,G=b.stateNode;if(b=b.tag,R!==null&&R===a)break;b!==5&&b!==26&&b!==27||G===null||(R=G,l?(G=ka(s,u),G!=null&&h.unshift(mo(s,G,R))):l||(G=ka(s,u),G!=null&&h.push(mo(s,G,R)))),s=s.return}h.length!==0&&e.push({event:t,listeners:h})}var SE=/\r\n?/g,xE=/\u0000|\uFFFD/g;function fy(e){return(typeof e=="string"?e:""+e).replace(SE,`
49
+ `).replace(xE,"")}function dy(e,t){return t=fy(t),fy(e)===t}function at(e,t,s,a,l,u){switch(s){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Or(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Or(e,""+a);break;case"className":il(e,"class",a);break;case"tabIndex":il(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":il(e,s,a);break;case"style":dm(e,a,u);break;case"data":if(t!=="object"){il(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||s!=="href")){e.removeAttribute(s);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(s);break}a=rl(""+a),e.setAttribute(s,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(s,"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 u=="function"&&(s==="formAction"?(t!=="input"&&at(e,t,"name",l.name,l,null),at(e,t,"formEncType",l.formEncType,l,null),at(e,t,"formMethod",l.formMethod,l,null),at(e,t,"formTarget",l.formTarget,l,null)):(at(e,t,"encType",l.encType,l,null),at(e,t,"method",l.method,l,null),at(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(s);break}a=rl(""+a),e.setAttribute(s,a);break;case"onClick":a!=null&&(e.onclick=yi);break;case"onScroll":a!=null&&Le("scroll",e);break;case"onScrollEnd":a!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(s=a.__html,s!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}s=rl(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(s,""+a):e.removeAttribute(s);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":a===!0?e.setAttribute(s,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(s,a):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(s,a):e.removeAttribute(s);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(s):e.setAttribute(s,a);break;case"popover":Le("beforetoggle",e),Le("toggle",e),nl(e,"popover",a);break;case"xlinkActuate":gi(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":gi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":gi(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":gi(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":gi(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":gi(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":gi(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":gi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":gi(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":nl(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=PS.get(s)||s,nl(e,s,a))}}function Wf(e,t,s,a,l,u){switch(s){case"style":dm(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(o(61));if(s=a.__html,s!=null){if(l.children!=null)throw Error(o(60));e.innerHTML=s}}break;case"children":typeof a=="string"?Or(e,a):(typeof a=="number"||typeof a=="bigint")&&Or(e,""+a);break;case"onScroll":a!=null&&Le("scroll",e);break;case"onScrollEnd":a!=null&&Le("scrollend",e);break;case"onClick":a!=null&&(e.onclick=yi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!im.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(l=s.endsWith("Capture"),t=s.slice(2,l?s.length-7:void 0),u=e[en]||null,u=u!=null?u[s]:null,typeof u=="function"&&e.removeEventListener(t,u,l),typeof a=="function")){typeof u!="function"&&u!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(t,a,l);break e}s in e?e[s]=a:a===!0?e.setAttribute(s,""):nl(e,s,a)}}}function It(e,t,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var a=!1,l=!1,u;for(u in s)if(s.hasOwnProperty(u)){var h=s[u];if(h!=null)switch(u){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:at(e,t,u,h,s,null)}}l&&at(e,t,"srcSet",s.srcSet,s,null),a&&at(e,t,"src",s.src,s,null);return;case"input":Le("invalid",e);var b=u=h=l=null,R=null,G=null;for(a in s)if(s.hasOwnProperty(a)){var P=s[a];if(P!=null)switch(a){case"name":l=P;break;case"type":h=P;break;case"checked":R=P;break;case"defaultChecked":G=P;break;case"value":u=P;break;case"defaultValue":b=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,t));break;default:at(e,t,a,P,s,null)}}lm(e,u,b,R,G,h,l,!1);return;case"select":Le("invalid",e),a=h=u=null;for(l in s)if(s.hasOwnProperty(l)&&(b=s[l],b!=null))switch(l){case"value":u=b;break;case"defaultValue":h=b;break;case"multiple":a=b;default:at(e,t,l,b,s,null)}t=u,s=h,e.multiple=!!a,t!=null?Rr(e,!!a,t,!1):s!=null&&Rr(e,!!a,s,!0);return;case"textarea":Le("invalid",e),u=l=a=null;for(h in s)if(s.hasOwnProperty(h)&&(b=s[h],b!=null))switch(h){case"value":a=b;break;case"defaultValue":l=b;break;case"children":u=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(o(91));break;default:at(e,t,h,b,s,null)}um(e,a,l,u);return;case"option":for(R in s)if(s.hasOwnProperty(R)&&(a=s[R],a!=null))switch(R){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:at(e,t,R,a,s,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(a=0;a<ho.length;a++)Le(ho[a],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(G in s)if(s.hasOwnProperty(G)&&(a=s[G],a!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:at(e,t,G,a,s,null)}return;default:if(fu(t)){for(P in s)s.hasOwnProperty(P)&&(a=s[P],a!==void 0&&Wf(e,t,P,a,s,void 0));return}}for(b in s)s.hasOwnProperty(b)&&(a=s[b],a!=null&&at(e,t,b,a,s,null))}function EE(e,t,s,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,u=null,h=null,b=null,R=null,G=null,P=null;for(Z in s){var $=s[Z];if(s.hasOwnProperty(Z)&&$!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":R=$;default:a.hasOwnProperty(Z)||at(e,t,Z,null,a,$)}}for(var X in a){var Z=a[X];if($=s[X],a.hasOwnProperty(X)&&(Z!=null||$!=null))switch(X){case"type":u=Z;break;case"name":l=Z;break;case"checked":G=Z;break;case"defaultChecked":P=Z;break;case"value":h=Z;break;case"defaultValue":b=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(o(137,t));break;default:Z!==$&&at(e,t,X,Z,a,$)}}cu(e,h,b,R,G,P,u,l);return;case"select":Z=h=b=X=null;for(u in s)if(R=s[u],s.hasOwnProperty(u)&&R!=null)switch(u){case"value":break;case"multiple":Z=R;default:a.hasOwnProperty(u)||at(e,t,u,null,a,R)}for(l in a)if(u=a[l],R=s[l],a.hasOwnProperty(l)&&(u!=null||R!=null))switch(l){case"value":X=u;break;case"defaultValue":b=u;break;case"multiple":h=u;default:u!==R&&at(e,t,l,u,a,R)}t=b,s=h,a=Z,X!=null?Rr(e,!!s,X,!1):!!a!=!!s&&(t!=null?Rr(e,!!s,t,!0):Rr(e,!!s,s?[]:"",!1));return;case"textarea":Z=X=null;for(b in s)if(l=s[b],s.hasOwnProperty(b)&&l!=null&&!a.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:at(e,t,b,null,a,l)}for(h in a)if(l=a[h],u=s[h],a.hasOwnProperty(h)&&(l!=null||u!=null))switch(h){case"value":X=l;break;case"defaultValue":Z=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(o(91));break;default:l!==u&&at(e,t,h,l,a,u)}cm(e,X,Z);return;case"option":for(var ye in s)if(X=s[ye],s.hasOwnProperty(ye)&&X!=null&&!a.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:at(e,t,ye,null,a,X)}for(R in a)if(X=a[R],Z=s[R],a.hasOwnProperty(R)&&X!==Z&&(X!=null||Z!=null))switch(R){case"selected":e.selected=X&&typeof X!="function"&&typeof X!="symbol";break;default:at(e,t,R,X,a,Z)}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 Te in s)X=s[Te],s.hasOwnProperty(Te)&&X!=null&&!a.hasOwnProperty(Te)&&at(e,t,Te,null,a,X);for(G in a)if(X=a[G],Z=s[G],a.hasOwnProperty(G)&&X!==Z&&(X!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(o(137,t));break;default:at(e,t,G,X,a,Z)}return;default:if(fu(t)){for(var ot in s)X=s[ot],s.hasOwnProperty(ot)&&X!==void 0&&!a.hasOwnProperty(ot)&&Wf(e,t,ot,void 0,a,X);for(P in a)X=a[P],Z=s[P],!a.hasOwnProperty(P)||X===Z||X===void 0&&Z===void 0||Wf(e,t,P,X,a,Z);return}}for(var L in s)X=s[L],s.hasOwnProperty(L)&&X!=null&&!a.hasOwnProperty(L)&&at(e,t,L,null,a,X);for($ in a)X=a[$],Z=s[$],!a.hasOwnProperty($)||X===Z||X==null&&Z==null||at(e,t,$,X,a,Z)}function hy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function TE(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,s=performance.getEntriesByType("resource"),a=0;a<s.length;a++){var l=s[a],u=l.transferSize,h=l.initiatorType,b=l.duration;if(u&&b&&hy(h)){for(h=0,b=l.responseEnd,a+=1;a<s.length;a++){var R=s[a],G=R.startTime;if(G>b)break;var P=R.transferSize,$=R.initiatorType;P&&hy($)&&(R=R.responseEnd,h+=P*(R<b?1:(b-G)/(R-G)))}if(--a,t+=8*(u+h)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var $f=null,ed=null;function ec(e){return e.nodeType===9?e:e.ownerDocument}function my(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 py(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function td(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var nd=null;function wE(){var e=window.event;return e&&e.type==="popstate"?e===nd?!1:(nd=e,!0):(nd=null,!1)}var gy=typeof setTimeout=="function"?setTimeout:void 0,RE=typeof clearTimeout=="function"?clearTimeout:void 0,yy=typeof Promise=="function"?Promise:void 0,OE=typeof queueMicrotask=="function"?queueMicrotask:typeof yy<"u"?function(e){return yy.resolve(null).then(e).catch(CE)}:gy;function CE(e){setTimeout(function(){throw e})}function us(e){return e==="head"}function by(e,t){var s=t,a=0;do{var l=s.nextSibling;if(e.removeChild(s),l&&l.nodeType===8)if(s=l.data,s==="/$"||s==="/&"){if(a===0){e.removeChild(l),ia(t);return}a--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")a++;else if(s==="html")po(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,po(s);for(var u=s.firstChild;u;){var h=u.nextSibling,b=u.nodeName;u[Da]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&u.rel.toLowerCase()==="stylesheet"||s.removeChild(u),u=h}}else s==="body"&&po(e.ownerDocument.body);s=l}while(s);ia(t)}function vy(e,t){var s=e;e=0;do{var a=s.nextSibling;if(s.nodeType===1?t?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(t?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),a&&a.nodeType===8)if(s=a.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=a}while(s)}function id(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var s=t;switch(t=t.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":id(s),ou(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function AE(e,t,s,a){for(;e.nodeType===1;){var l=s;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Da])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Vn(e.nextSibling),e===null)break}return null}function _E(e,t,s){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=Vn(e.nextSibling),e===null))return null;return e}function Sy(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Vn(e.nextSibling),e===null))return null;return e}function sd(e){return e.data==="$?"||e.data==="$~"}function rd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function ME(e,t){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||s.readyState!=="loading")t();else{var a=function(){t(),s.removeEventListener("DOMContentLoaded",a)};s.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var ad=null;function xy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(t===0)return Vn(e.nextSibling);t--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||t++}e=e.nextSibling}return null}function Ey(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(t===0)return e;t--}else s!=="/$"&&s!=="/&"||t++}e=e.previousSibling}return null}function Ty(e,t,s){switch(t=ec(s),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function po(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ou(e)}var Gn=new Map,wy=new Set;function tc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var zi=Q.d;Q.d={f:NE,r:DE,D:zE,C:kE,L:jE,m:UE,X:BE,S:LE,M:HE};function NE(){var e=zi.f(),t=Fl();return e||t}function DE(e){var t=Er(e);t!==null&&t.tag===5&&t.type==="form"?Yp(t):zi.r(e)}var ea=typeof document>"u"?null:document;function Ry(e,t,s){var a=ea;if(a&&typeof t=="string"&&t){var l=jn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof s=="string"&&(l+='[crossorigin="'+s+'"]'),wy.has(l)||(wy.add(l),e={rel:e,crossOrigin:s,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),It(t,"link",e),Gt(t),a.head.appendChild(t)))}}function zE(e){zi.D(e),Ry("dns-prefetch",e,null)}function kE(e,t){zi.C(e,t),Ry("preconnect",e,t)}function jE(e,t,s){zi.L(e,t,s);var a=ea;if(a&&e&&t){var l='link[rel="preload"][as="'+jn(t)+'"]';t==="image"&&s&&s.imageSrcSet?(l+='[imagesrcset="'+jn(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(l+='[imagesizes="'+jn(s.imageSizes)+'"]')):l+='[href="'+jn(e)+'"]';var u=l;switch(t){case"style":u=ta(e);break;case"script":u=na(e)}Gn.has(u)||(e=v({rel:"preload",href:t==="image"&&s&&s.imageSrcSet?void 0:e,as:t},s),Gn.set(u,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(go(u))||t==="script"&&a.querySelector(yo(u))||(t=a.createElement("link"),It(t,"link",e),Gt(t),a.head.appendChild(t)))}}function UE(e,t){zi.m(e,t);var s=ea;if(s&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+jn(a)+'"][href="'+jn(e)+'"]',u=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=na(e)}if(!Gn.has(u)&&(e=v({rel:"modulepreload",href:e},t),Gn.set(u,e),s.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(yo(u)))return}a=s.createElement("link"),It(a,"link",e),Gt(a),s.head.appendChild(a)}}}function LE(e,t,s){zi.S(e,t,s);var a=ea;if(a&&e){var l=Tr(a).hoistableStyles,u=ta(e);t=t||"default";var h=l.get(u);if(!h){var b={loading:0,preload:null};if(h=a.querySelector(go(u)))b.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},s),(s=Gn.get(u))&&od(e,s);var R=h=a.createElement("link");Gt(R),It(R,"link",e),R._p=new Promise(function(G,P){R.onload=G,R.onerror=P}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,nc(h,t,a)}h={type:"stylesheet",instance:h,count:1,state:b},l.set(u,h)}}}function BE(e,t){zi.X(e,t);var s=ea;if(s&&e){var a=Tr(s).hoistableScripts,l=na(e),u=a.get(l);u||(u=s.querySelector(yo(l)),u||(e=v({src:e,async:!0},t),(t=Gn.get(l))&&ld(e,t),u=s.createElement("script"),Gt(u),It(u,"link",e),s.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(l,u))}}function HE(e,t){zi.M(e,t);var s=ea;if(s&&e){var a=Tr(s).hoistableScripts,l=na(e),u=a.get(l);u||(u=s.querySelector(yo(l)),u||(e=v({src:e,async:!0,type:"module"},t),(t=Gn.get(l))&&ld(e,t),u=s.createElement("script"),Gt(u),It(u,"link",e),s.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(l,u))}}function Oy(e,t,s,a){var l=(l=ee.current)?tc(l):null;if(!l)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(t=ta(s.href),s=Tr(l).hoistableStyles,a=s.get(t),a||(a={type:"style",instance:null,count:0,state:null},s.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=ta(s.href);var u=Tr(l).hoistableStyles,h=u.get(e);if(h||(l=l.ownerDocument||l,h={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,h),(u=l.querySelector(go(e)))&&!u._p&&(h.instance=u,h.state.loading=5),Gn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},Gn.set(e,s),u||qE(l,e,s,h.state))),t&&a===null)throw Error(o(528,""));return h}if(t&&a!==null)throw Error(o(529,""));return null;case"script":return t=s.async,s=s.src,typeof s=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=na(s),s=Tr(l).hoistableScripts,a=s.get(t),a||(a={type:"script",instance:null,count:0,state:null},s.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function ta(e){return'href="'+jn(e)+'"'}function go(e){return'link[rel="stylesheet"]['+e+"]"}function Cy(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function qE(e,t,s,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),It(t,"link",s),Gt(t),e.head.appendChild(t))}function na(e){return'[src="'+jn(e)+'"]'}function yo(e){return"script[async]"+e}function Ay(e,t,s){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+jn(s.href)+'"]');if(a)return t.instance=a,Gt(a),a;var l=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Gt(a),It(a,"style",l),nc(a,s.precedence,e),t.instance=a;case"stylesheet":l=ta(s.href);var u=e.querySelector(go(l));if(u)return t.state.loading|=4,t.instance=u,Gt(u),u;a=Cy(s),(l=Gn.get(l))&&od(a,l),u=(e.ownerDocument||e).createElement("link"),Gt(u);var h=u;return h._p=new Promise(function(b,R){h.onload=b,h.onerror=R}),It(u,"link",a),t.state.loading|=4,nc(u,s.precedence,e),t.instance=u;case"script":return u=na(s.src),(l=e.querySelector(yo(u)))?(t.instance=l,Gt(l),l):(a=s,(l=Gn.get(u))&&(a=v({},s),ld(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),Gt(l),It(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,nc(a,s.precedence,e));return t.instance}function nc(e,t,s){for(var a=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,u=l,h=0;h<a.length;h++){var b=a[h];if(b.dataset.precedence===t)u=b;else if(u!==l)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=s.nodeType===9?s.head:s,t.insertBefore(e,t.firstChild))}function od(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ld(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ic=null;function _y(e,t,s){if(ic===null){var a=new Map,l=ic=new Map;l.set(s,a)}else l=ic,a=l.get(s),a||(a=new Map,l.set(s,a));if(a.has(e))return a;for(a.set(e,null),s=s.getElementsByTagName(e),l=0;l<s.length;l++){var u=s[l];if(!(u[Da]||u[Ut]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var h=u.getAttribute(t)||"";h=e+h;var b=a.get(h);b?b.push(u):a.set(h,[u])}}return a}function My(e,t,s){e=e.ownerDocument||e,e.head.insertBefore(s,t==="title"?e.querySelector("head > title"):null)}function YE(e,t,s){if(s===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ny(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function VE(e,t,s,a){if(s.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var l=ta(a.href),u=t.querySelector(go(l));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=sc.bind(e),t.then(e,e)),s.state.loading|=4,s.instance=u,Gt(u);return}u=t.ownerDocument||t,a=Cy(a),(l=Gn.get(l))&&od(a,l),u=u.createElement("link"),Gt(u);var h=u;h._p=new Promise(function(b,R){h.onload=b,h.onerror=R}),It(u,"link",a),s.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,t),(t=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=sc.bind(e),t.addEventListener("load",s),t.addEventListener("error",s))}}var cd=0;function GE(e,t){return e.stylesheets&&e.count===0&&ac(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var a=setTimeout(function(){if(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&cd===0&&(cd=62500*TE());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ac(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>cd?50:800)+t);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ac(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var rc=null;function ac(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,rc=new Map,t.forEach(QE,e),rc=null,sc.call(e))}function QE(e,t){if(!(t.state.loading&4)){var s=rc.get(e);if(s)var a=s.get(null);else{s=new Map,rc.set(e,s);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<l.length;u++){var h=l[u];(h.nodeName==="LINK"||h.getAttribute("media")!=="not all")&&(s.set(h.dataset.precedence,h),a=h)}a&&s.set(null,a)}l=t.instance,h=l.getAttribute("data-precedence"),u=s.get(h)||a,u===a&&s.set(null,l),s.set(h,l),this.count++,a=sc.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),u?u.parentNode.insertBefore(l,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var bo={$$typeof:j,Provider:null,Consumer:null,_currentValue:I,_currentValue2:I,_threadCount:0};function XE(e,t,s,a,l,u,h,b,R){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=ii(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ii(0),this.hiddenUpdates=ii(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=u,this.onRecoverableError=h,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Dy(e,t,s,a,l,u,h,b,R,G,P,$){return e=new XE(e,t,s,h,R,G,P,$,b),t=1,u===!0&&(t|=24),u=On(3,null,null,t),e.current=u,u.stateNode=e,t=Yu(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:s,cache:t},Xu(u),e}function zy(e){return e?(e=zr,e):zr}function ky(e,t,s,a,l,u){l=zy(l),a.context===null?a.context=l:a.pendingContext=l,a=$i(t),a.payload={element:s},u=u===void 0?null:u,u!==null&&(a.callback=u),s=es(e,a,t),s!==null&&(vn(s,e,t),Pa(s,e,t))}function jy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<t?s:t}}function ud(e,t){jy(e,t),(e=e.alternate)&&jy(e,t)}function Uy(e){if(e.tag===13||e.tag===31){var t=Bs(e,67108864);t!==null&&vn(t,e,67108864),ud(e,67108864)}}function Ly(e){if(e.tag===13||e.tag===31){var t=Nn();t=zs(t);var s=Bs(e,t);s!==null&&vn(s,e,t),ud(e,t)}}var oc=!0;function FE(e,t,s,a){var l=N.T;N.T=null;var u=Q.p;try{Q.p=2,fd(e,t,s,a)}finally{Q.p=u,N.T=l}}function KE(e,t,s,a){var l=N.T;N.T=null;var u=Q.p;try{Q.p=8,fd(e,t,s,a)}finally{Q.p=u,N.T=l}}function fd(e,t,s,a){if(oc){var l=dd(a);if(l===null)Jf(e,t,a,lc,s),Hy(e,a);else if(PE(l,e,t,s,a))a.stopPropagation();else if(Hy(e,a),t&4&&-1<ZE.indexOf(e)){for(;l!==null;){var u=Er(l);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var h=Vt(u.pendingLanes);if(h!==0){var b=u;for(b.pendingLanes|=2,b.entangledLanes|=2;h;){var R=1<<31-Yt(h);b.entanglements[1]|=R,h&=~R}oi(u),(We&6)===0&&(Ql=ue()+500,fo(0))}}break;case 31:case 13:b=Bs(u,2),b!==null&&vn(b,u,2),Fl(),ud(u,2)}if(u=dd(a),u===null&&Jf(e,t,a,lc,s),u===l)break;l=u}l!==null&&a.stopPropagation()}else Jf(e,t,a,null,s)}}function dd(e){return e=hu(e),hd(e)}var lc=null;function hd(e){if(lc=null,e=xr(e),e!==null){var t=f(e);if(t===null)e=null;else{var s=t.tag;if(s===13){if(e=d(t),e!==null)return e;e=null}else if(s===31){if(e=m(t),e!==null)return e;e=null}else if(s===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return lc=e,null}function By(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(xe()){case ht:return 2;case Be:return 8;case pt:case jt:return 32;case sn:return 268435456;default:return 32}default:return 32}}var md=!1,fs=null,ds=null,hs=null,vo=new Map,So=new Map,ms=[],ZE="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 Hy(e,t){switch(e){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":vo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":So.delete(t.pointerId)}}function xo(e,t,s,a,l,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:s,eventSystemFlags:a,nativeEvent:u,targetContainers:[l]},t!==null&&(t=Er(t),t!==null&&Uy(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function PE(e,t,s,a,l){switch(t){case"focusin":return fs=xo(fs,e,t,s,a,l),!0;case"dragenter":return ds=xo(ds,e,t,s,a,l),!0;case"mouseover":return hs=xo(hs,e,t,s,a,l),!0;case"pointerover":var u=l.pointerId;return vo.set(u,xo(vo.get(u)||null,e,t,s,a,l)),!0;case"gotpointercapture":return u=l.pointerId,So.set(u,xo(So.get(u)||null,e,t,s,a,l)),!0}return!1}function qy(e){var t=xr(e.target);if(t!==null){var s=f(t);if(s!==null){if(t=s.tag,t===13){if(t=d(s),t!==null){e.blockedOn=t,$o(e.priority,function(){Ly(s)});return}}else if(t===31){if(t=m(s),t!==null){e.blockedOn=t,$o(e.priority,function(){Ly(s)});return}}else if(t===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function cc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var s=dd(e.nativeEvent);if(s===null){s=e.nativeEvent;var a=new s.constructor(s.type,s);du=a,s.target.dispatchEvent(a),du=null}else return t=Er(s),t!==null&&Uy(t),e.blockedOn=s,!1;t.shift()}return!0}function Yy(e,t,s){cc(e)&&s.delete(t)}function IE(){md=!1,fs!==null&&cc(fs)&&(fs=null),ds!==null&&cc(ds)&&(ds=null),hs!==null&&cc(hs)&&(hs=null),vo.forEach(Yy),So.forEach(Yy)}function uc(e,t){e.blockedOn===t&&(e.blockedOn=null,md||(md=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,IE)))}var fc=null;function Vy(e){fc!==e&&(fc=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){fc===e&&(fc=null);for(var t=0;t<e.length;t+=3){var s=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(hd(a||s)===null)continue;break}var u=Er(s);u!==null&&(e.splice(t,3),t-=3,df(u,{pending:!0,data:l,method:s.method,action:a},a,l))}}))}function ia(e){function t(R){return uc(R,e)}fs!==null&&uc(fs,e),ds!==null&&uc(ds,e),hs!==null&&uc(hs,e),vo.forEach(t),So.forEach(t);for(var s=0;s<ms.length;s++){var a=ms[s];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ms.length&&(s=ms[0],s.blockedOn===null);)qy(s),s.blockedOn===null&&ms.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(a=0;a<s.length;a+=3){var l=s[a],u=s[a+1],h=l[en]||null;if(typeof u=="function")h||Vy(s);else if(h){var b=null;if(u&&u.hasAttribute("formAction")){if(l=u,h=u[en]||null)b=h.formAction;else if(hd(l)!==null)continue}else b=h.action;typeof b=="function"?s[a+1]=b:(s.splice(a,3),a-=3),Vy(s)}}}function Gy(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(h){return l=h})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(s,20)}function s(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(s,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function pd(e){this._internalRoot=e}dc.prototype.render=pd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var s=t.current,a=Nn();ky(s,a,e,t,null,null)},dc.prototype.unmount=pd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ky(e.current,2,null,e,null,null),Fl(),t[Fi]=null}};function dc(e){this._internalRoot=e}dc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Wo();e={blockedOn:null,target:e,priority:t};for(var s=0;s<ms.length&&t!==0&&t<ms[s].priority;s++);ms.splice(s,0,e),s===0&&qy(e)}};var Qy=i.version;if(Qy!=="19.2.7")throw Error(o(527,Qy,"19.2.7"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var JE={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var hc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!hc.isDisabled&&hc.supportsFiber)try{fn=hc.inject(JE),qt=hc}catch{}}return To.createRoot=function(e,t){if(!c(e))throw Error(o(299));var s=!1,a="",l=Jp,u=Wp,h=$p;return t!=null&&(t.unstable_strictMode===!0&&(s=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(h=t.onRecoverableError)),t=Dy(e,1,!1,null,null,s,a,null,l,u,h,Gy),e[Fi]=t.current,If(e),new pd(t)},To.hydrateRoot=function(e,t,s){if(!c(e))throw Error(o(299));var a=!1,l="",u=Jp,h=Wp,b=$p,R=null;return s!=null&&(s.unstable_strictMode===!0&&(a=!0),s.identifierPrefix!==void 0&&(l=s.identifierPrefix),s.onUncaughtError!==void 0&&(u=s.onUncaughtError),s.onCaughtError!==void 0&&(h=s.onCaughtError),s.onRecoverableError!==void 0&&(b=s.onRecoverableError),s.formState!==void 0&&(R=s.formState)),t=Dy(e,1,!0,t,s??null,a,l,R,u,h,b,Gy),t.context=zy(null),s=t.current,a=Nn(),a=zs(a),l=$i(a),l.callback=null,es(s,l,a),s=a,t.current.lanes=s,dn(t,s),oi(t),e[Fi]=t.current,If(e),new dc(t)},To.version="19.2.7",To}var ub;function J1(){if(ub)return Sd.exports;ub=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(i){console.error(i)}}return n(),Sd.exports=I1(),Sd.exports}var W1=J1();function th(n,i){if(n&&!i)return n;if(!n&&i)return i;if(n||i)return{...n,...i}}const Eh={};function Fo(n,i,r,o,c){if(!r&&!o&&!n)return Lc(i);let f=Lc(n);return i&&(f=Ac(f,i)),r&&(f=Ac(f,r)),o&&(f=Ac(f,o)),f}function $1(n){if(n.length===0)return Eh;if(n.length===1)return Lc(n[0]);let i=Lc(n[0]);for(let r=1;r<n.length;r+=1)i=Ac(i,n[r]);return i}function Lc(n){return Th(n)?{...Vv(n,Eh)}:eT(n)}function Ac(n,i){return Th(i)?Vv(i,n):tT(n,i)}function eT(n){const i={...n};for(const r in i){const o=i[r];Yv(r,o)&&(i[r]=Gv(o))}return i}function tT(n,i){if(!i)return n;for(const r in i){const o=i[r];switch(r){case"style":{n[r]=th(n.style,o);break}case"className":{n[r]=Qv(n.className,o);break}default:Yv(r,o)?n[r]=nT(n[r],o):n[r]=o}}return n}function Yv(n,i){const r=n.charCodeAt(0),o=n.charCodeAt(1),c=n.charCodeAt(2);return r===111&&o===110&&c>=65&&c<=90&&(typeof i=="function"||typeof i>"u")}function Th(n){return typeof n=="function"}function Vv(n,i){return Th(n)?n(i):n??Eh}function nT(n,i){return i?n?(...r)=>{const o=r[0];if(Xv(o)){const f=o;Bc(f);const d=i(...r);return f.baseUIHandlerPrevented||n==null||n(...r),d}const c=i(...r);return n==null||n(...r),c}:Gv(i):n}function Gv(n){return n&&((...i)=>{const r=i[0];return Xv(r)&&Bc(r),n(...i)})}function Bc(n){return n.preventBaseUIHandler=()=>{n.baseUIHandlerPrevented=!0},n}function Qv(n,i){return i?n?i+" "+n:i:n}function Xv(n){return n!=null&&typeof n=="object"&&"nativeEvent"in n}function iT(n,i){return function(o,...c){const f=new URL(n);return f.searchParams.set("code",o.toString()),c.forEach(d=>f.searchParams.append("args[]",d)),`${i} error #${o}; visit ${f} for the full message.`}}const ur=iT("https://base-ui.com/production-error","Base UI"),fb={};function Qi(n,i){const r=O.useRef(fb);return r.current===fb&&(r.current=n(i)),r}function Hc(n,i,r,o){const c=Qi(Fv).current;return rT(c,n,i,r,o)&&Kv(c,[n,i,r,o]),c.callback}function sT(n){const i=Qi(Fv).current;return aT(i,n)&&Kv(i,n),i.callback}function Fv(){return{callback:null,cleanup:null,refs:[]}}function rT(n,i,r,o,c){return n.refs[0]!==i||n.refs[1]!==r||n.refs[2]!==o||n.refs[3]!==c}function aT(n,i){return n.refs.length!==i.length||n.refs.some((r,o)=>r!==i[o])}function Kv(n,i){if(n.refs=i,i.every(r=>r==null)){n.callback=null;return}n.callback=r=>{if(n.cleanup&&(n.cleanup(),n.cleanup=null),r!=null){const o=Array(i.length).fill(null);for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=f(r);typeof d=="function"&&(o[c]=d);break}case"object":{f.current=r;break}}}n.cleanup=()=>{for(let c=0;c<i.length;c+=1){const f=i[c];if(f!=null)switch(typeof f){case"function":{const d=o[c];typeof d=="function"?d():f(null);break}case"object":{f.current=null;break}}}}}}}const oT=parseInt(O.version,10);function wh(n){return oT>=n}function db(n){if(!O.isValidElement(n))return null;const i=n,r=i.props;return(wh(19)?r==null?void 0:r.ref:i.ref)??null}function Rh(){}const Wt=Object.freeze({});function lT(n,i){const r={};for(const o in n){const c=n[o];if(i!=null&&i.hasOwnProperty(o)){const f=i[o](c);f!=null&&Object.assign(r,f);continue}c===!0?r[`data-${o.toLowerCase()}`]="":c&&(r[`data-${o.toLowerCase()}`]=c.toString())}return r}function cT(n,i){return typeof n=="function"?n(i):n}function uT(n,i){return typeof n=="function"?n(i):n}function Ra(n,i,r={}){const o=i.render,c=fT(i,r);if(r.enabled===!1)return null;const f=r.state??Wt;return mT(n,o,c,f)}function fT(n,i={}){const{className:r,style:o,render:c}=n,{state:f=Wt,ref:d,props:m,stateAttributesMapping:g,enabled:p=!0}=i,y=p?cT(r,f):void 0,v=p?uT(o,f):void 0,S=p?lT(f,g):Wt,E=p&&m?dT(m):void 0,x=p?th(S,E)??{}:Wt;return typeof document<"u"&&(p?Array.isArray(d)?x.ref=sT([x.ref,db(c),...d]):x.ref=Hc(x.ref,db(c),d):Hc(null,null)),p?(y!==void 0&&(x.className=Qv(x.className,y)),v!==void 0&&(x.style=th(x.style,v)),x):Wt}function dT(n){return Array.isArray(n)?$1(n):Fo(void 0,n)}const hT=Symbol.for("react.lazy");function mT(n,i,r,o){if(i){if(typeof i=="function")return i(r,o);const c=Fo(r,i.props);c.ref=r.ref;let f=i;return(f==null?void 0:f.$$typeof)===hT&&(f=O.Children.toArray(i)[0]),O.cloneElement(f,c)}if(n&&typeof n=="string")return pT(n,r);throw new Error(ur(8))}function pT(n,i){return n==="button"?O.createElement("button",{type:"button",...i,key:i.key}):n==="img"?O.createElement("img",{alt:"",...i,key:i.key}):O.createElement(n,i)}function gT(n){return Ra(n.defaultTagName??"div",n,n)}function Zv(n){var i,r,o="";if(typeof n=="string"||typeof n=="number")o+=n;else if(typeof n=="object")if(Array.isArray(n)){var c=n.length;for(i=0;i<c;i++)n[i]&&(r=Zv(n[i]))&&(o&&(o+=" "),o+=r)}else for(r in n)n[r]&&(o&&(o+=" "),o+=r);return o}function Pv(){for(var n,i,r=0,o="",c=arguments.length;r<c;r++)(n=arguments[r])&&(i=Zv(n))&&(o&&(o+=" "),o+=i);return o}const hb=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,mb=Pv,Iv=(n,i)=>r=>{var o;if((i==null?void 0:i.variants)==null)return mb(n,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:c,defaultVariants:f}=i,d=Object.keys(c).map(p=>{const y=r==null?void 0:r[p],v=f==null?void 0:f[p];if(y===null)return null;const S=hb(y)||hb(v);return c[p][S]}),m=r&&Object.entries(r).reduce((p,y)=>{let[v,S]=y;return S===void 0||(p[v]=S),p},{}),g=i==null||(o=i.compoundVariants)===null||o===void 0?void 0:o.reduce((p,y)=>{let{class:v,className:S,...E}=y;return Object.entries(E).every(x=>{let[w,_]=x;return Array.isArray(_)?_.includes({...f,...m}[w]):{...f,...m}[w]===_})?[...p,v,S]:p},[]);return mb(n,d,g,r==null?void 0:r.class,r==null?void 0:r.className)},yT=(n,i)=>{const r=new Array(n.length+i.length);for(let o=0;o<n.length;o++)r[o]=n[o];for(let o=0;o<i.length;o++)r[n.length+o]=i[o];return r},bT=(n,i)=>({classGroupId:n,validator:i}),Jv=(n=new Map,i=null,r)=>({nextPart:n,validators:i,classGroupId:r}),qc="-",pb=[],vT="arbitrary..",ST=n=>{const i=ET(n),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=n;return{getClassGroupId:d=>{if(d.startsWith("[")&&d.endsWith("]"))return xT(d);const m=d.split(qc),g=m[0]===""&&m.length>1?1:0;return Wv(m,g,i)},getConflictingClassGroupIds:(d,m)=>{if(m){const g=o[d],p=r[d];return g?p?yT(p,g):g:p||pb}return r[d]||pb}}},Wv=(n,i,r)=>{if(n.length-i===0)return r.classGroupId;const c=n[i],f=r.nextPart.get(c);if(f){const p=Wv(n,i+1,f);if(p)return p}const d=r.validators;if(d===null)return;const m=i===0?n.join(qc):n.slice(i).join(qc),g=d.length;for(let p=0;p<g;p++){const y=d[p];if(y.validator(m))return y.classGroupId}},xT=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=n.slice(1,-1),r=i.indexOf(":"),o=i.slice(0,r);return o?vT+o:void 0})(),ET=n=>{const{theme:i,classGroups:r}=n;return TT(r,i)},TT=(n,i)=>{const r=Jv();for(const o in n){const c=n[o];Oh(c,r,o,i)}return r},Oh=(n,i,r,o)=>{const c=n.length;for(let f=0;f<c;f++){const d=n[f];wT(d,i,r,o)}},wT=(n,i,r,o)=>{if(typeof n=="string"){RT(n,i,r);return}if(typeof n=="function"){OT(n,i,r,o);return}CT(n,i,r,o)},RT=(n,i,r)=>{const o=n===""?i:$v(i,n);o.classGroupId=r},OT=(n,i,r,o)=>{if(AT(n)){Oh(n(o),i,r,o);return}i.validators===null&&(i.validators=[]),i.validators.push(bT(r,n))},CT=(n,i,r,o)=>{const c=Object.entries(n),f=c.length;for(let d=0;d<f;d++){const[m,g]=c[d];Oh(g,$v(i,m),r,o)}},$v=(n,i)=>{let r=n;const o=i.split(qc),c=o.length;for(let f=0;f<c;f++){const d=o[f];let m=r.nextPart.get(d);m||(m=Jv(),r.nextPart.set(d,m)),r=m}return r},AT=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,_T=n=>{if(n<1)return{get:()=>{},set:()=>{}};let i=0,r=Object.create(null),o=Object.create(null);const c=(f,d)=>{r[f]=d,i++,i>n&&(i=0,o=r,r=Object.create(null))};return{get(f){let d=r[f];if(d!==void 0)return d;if((d=o[f])!==void 0)return c(f,d),d},set(f,d){f in r?r[f]=d:c(f,d)}}},nh="!",gb=":",MT=[],yb=(n,i,r,o,c)=>({modifiers:n,hasImportantModifier:i,baseClassName:r,maybePostfixModifierPosition:o,isExternal:c}),NT=n=>{const{prefix:i,experimentalParseClassName:r}=n;let o=c=>{const f=[];let d=0,m=0,g=0,p;const y=c.length;for(let w=0;w<y;w++){const _=c[w];if(d===0&&m===0){if(_===gb){f.push(c.slice(g,w)),g=w+1;continue}if(_==="/"){p=w;continue}}_==="["?d++:_==="]"?d--:_==="("?m++:_===")"&&m--}const v=f.length===0?c:c.slice(g);let S=v,E=!1;v.endsWith(nh)?(S=v.slice(0,-1),E=!0):v.startsWith(nh)&&(S=v.slice(1),E=!0);const x=p&&p>g?p-g:void 0;return yb(f,E,S,x)};if(i){const c=i+gb,f=o;o=d=>d.startsWith(c)?f(d.slice(c.length)):yb(MT,!1,d,void 0,!0)}if(r){const c=o;o=f=>r({className:f,parseClassName:c})}return o},DT=n=>{const i=new Map;return n.orderSensitiveModifiers.forEach((r,o)=>{i.set(r,1e6+o)}),r=>{const o=[];let c=[];for(let f=0;f<r.length;f++){const d=r[f],m=d[0]==="[",g=i.has(d);m||g?(c.length>0&&(c.sort(),o.push(...c),c=[]),o.push(d)):c.push(d)}return c.length>0&&(c.sort(),o.push(...c)),o}},zT=n=>({cache:_T(n.cacheSize),parseClassName:NT(n),sortModifiers:DT(n),postfixLookupClassGroupIds:kT(n),...ST(n)}),kT=n=>{const i=Object.create(null),r=n.postfixLookupClassGroups;if(r)for(let o=0;o<r.length;o++)i[r[o]]=!0;return i},jT=/\s+/,UT=(n,i)=>{const{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:c,sortModifiers:f,postfixLookupClassGroupIds:d}=i,m=[],g=n.trim().split(jT);let p="";for(let y=g.length-1;y>=0;y-=1){const v=g[y],{isExternal:S,modifiers:E,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:_}=r(v);if(S){p=v+(p.length>0?" "+p:p);continue}let D=!!_,C;if(D){const B=w.substring(0,_);C=o(B);const U=C&&d[C]?o(w):void 0;U&&U!==C&&(C=U,D=!1)}else C=o(w);if(!C){if(!D){p=v+(p.length>0?" "+p:p);continue}if(C=o(w),!C){p=v+(p.length>0?" "+p:p);continue}D=!1}const j=E.length===0?"":E.length===1?E[0]:f(E).join(":"),k=x?j+nh:j,q=k+C;if(m.indexOf(q)>-1)continue;m.push(q);const F=c(C,D);for(let B=0;B<F.length;++B){const U=F[B];m.push(k+U)}p=v+(p.length>0?" "+p:p)}return p},LT=(...n)=>{let i=0,r,o,c="";for(;i<n.length;)(r=n[i++])&&(o=e0(r))&&(c&&(c+=" "),c+=o);return c},e0=n=>{if(typeof n=="string")return n;let i,r="";for(let o=0;o<n.length;o++)n[o]&&(i=e0(n[o]))&&(r&&(r+=" "),r+=i);return r},BT=(n,...i)=>{let r,o,c,f;const d=g=>{const p=i.reduce((y,v)=>v(y),n());return r=zT(p),o=r.cache.get,c=r.cache.set,f=m,m(g)},m=g=>{const p=o(g);if(p)return p;const y=UT(g,r);return c(g,y),y};return f=d,(...g)=>f(LT(...g))},HT=[],Bt=n=>{const i=r=>r[n]||HT;return i.isThemeGetter=!0,i},t0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,n0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,YT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,VT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,GT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,QT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,XT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gs=n=>qT.test(n),De=n=>!!n&&!Number.isNaN(Number(n)),li=n=>!!n&&Number.isInteger(Number(n)),wd=n=>n.endsWith("%")&&De(n.slice(0,-1)),ki=n=>YT.test(n),i0=()=>!0,FT=n=>VT.test(n)&&!GT.test(n),Ch=()=>!1,KT=n=>QT.test(n),ZT=n=>XT.test(n),PT=n=>!he(n)&&!me(n),IT=n=>n.startsWith("@container")&&(n[10]==="/"&&n[11]!==void 0||n[11]==="s"&&n[16]!==void 0&&n.startsWith("-size/",10)||n[11]==="n"&&n[18]!==void 0&&n.startsWith("-normal/",10)),JT=n=>Ns(n,a0,Ch),he=n=>t0.test(n),Js=n=>Ns(n,o0,FT),bb=n=>Ns(n,rw,De),WT=n=>Ns(n,c0,i0),$T=n=>Ns(n,l0,Ch),vb=n=>Ns(n,s0,Ch),ew=n=>Ns(n,r0,ZT),gc=n=>Ns(n,u0,KT),me=n=>n0.test(n),wo=n=>fr(n,o0),tw=n=>fr(n,l0),Sb=n=>fr(n,s0),nw=n=>fr(n,a0),iw=n=>fr(n,r0),yc=n=>fr(n,u0,!0),sw=n=>fr(n,c0,!0),Ns=(n,i,r)=>{const o=t0.exec(n);return o?o[1]?i(o[1]):r(o[2]):!1},fr=(n,i,r=!1)=>{const o=n0.exec(n);return o?o[1]?i(o[1]):r:!1},s0=n=>n==="position"||n==="percentage",r0=n=>n==="image"||n==="url",a0=n=>n==="length"||n==="size"||n==="bg-size",o0=n=>n==="length",rw=n=>n==="number",l0=n=>n==="family-name",c0=n=>n==="number"||n==="weight",u0=n=>n==="shadow",aw=()=>{const n=Bt("color"),i=Bt("font"),r=Bt("text"),o=Bt("font-weight"),c=Bt("tracking"),f=Bt("leading"),d=Bt("breakpoint"),m=Bt("container"),g=Bt("spacing"),p=Bt("radius"),y=Bt("shadow"),v=Bt("inset-shadow"),S=Bt("text-shadow"),E=Bt("drop-shadow"),x=Bt("blur"),w=Bt("perspective"),_=Bt("aspect"),D=Bt("ease"),C=Bt("animate"),j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...k(),me,he],F=()=>["auto","hidden","clip","visible","scroll"],B=()=>["auto","contain","none"],U=()=>[me,he,g],K=()=>[gs,"full","auto",...U()],se=()=>[li,"none","subgrid",me,he],pe=()=>["auto",{span:["full",li,me,he]},li,me,he],ae=()=>[li,"auto",me,he],W=()=>["auto","min","max","fr",me,he],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ie=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...U()],Q=()=>[gs,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...U()],I=()=>[gs,"screen","full","dvw","lvw","svw","min","max","fit",...U()],oe=()=>[gs,"screen","full","lh","dvh","lvh","svh","min","max","fit",...U()],Y=()=>[n,me,he],T=()=>[...k(),Sb,vb,{position:[me,he]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",nw,JT,{size:[me,he]}],ne=()=>[wd,wo,Js],re=()=>["","none","full",p,me,he],ee=()=>["",De,wo,Js],ge=()=>["solid","dashed","dotted","double"],ce=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],fe=()=>[De,wd,Sb,vb],Ze=()=>["","none",x,me,he],nt=()=>["none",De,me,he],ve=()=>["none",De,me,he],ze=()=>[De,me,he],Oe=()=>[gs,"full",...U()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[ki],breakpoint:[ki],color:[i0],container:[ki],"drop-shadow":[ki],ease:["in","out","in-out"],font:[PT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[ki],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[ki],shadow:[ki],spacing:["px",De],text:[ki],"text-shadow":[ki],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gs,he,me,_]}],container:["container"],"container-type":[{"@container":["","normal","size",me,he]}],"container-named":[IT],columns:[{columns:[De,he,me,m]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:F()}],"overflow-x":[{"overflow-x":F()}],"overflow-y":[{"overflow-y":F()}],overscroll:[{overscroll:B()}],"overscroll-x":[{"overscroll-x":B()}],"overscroll-y":[{"overscroll-y":B()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:K()}],"inset-x":[{"inset-x":K()}],"inset-y":[{"inset-y":K()}],start:[{"inset-s":K(),start:K()}],end:[{"inset-e":K(),end:K()}],"inset-bs":[{"inset-bs":K()}],"inset-be":[{"inset-be":K()}],top:[{top:K()}],right:[{right:K()}],bottom:[{bottom:K()}],left:[{left:K()}],visibility:["visible","invisible","collapse"],z:[{z:[li,"auto",me,he]}],basis:[{basis:[gs,"full","auto",m,...U()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,gs,"auto","initial","none",he]}],grow:[{grow:["",De,me,he]}],shrink:[{shrink:["",De,me,he]}],order:[{order:[li,"first","last","none",me,he]}],"grid-cols":[{"grid-cols":se()}],"col-start-end":[{col:pe()}],"col-start":[{"col-start":ae()}],"col-end":[{"col-end":ae()}],"grid-rows":[{"grid-rows":se()}],"row-start-end":[{row:pe()}],"row-start":[{"row-start":ae()}],"row-end":[{"row-end":ae()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:U()}],"gap-x":[{"gap-x":U()}],"gap-y":[{"gap-y":U()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ie(),"normal"]}],"justify-self":[{"justify-self":["auto",...ie()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ie(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ie(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ie(),"baseline"]}],"place-self":[{"place-self":["auto",...ie()]}],p:[{p:U()}],px:[{px:U()}],py:[{py:U()}],ps:[{ps:U()}],pe:[{pe:U()}],pbs:[{pbs:U()}],pbe:[{pbe:U()}],pt:[{pt:U()}],pr:[{pr:U()}],pb:[{pb:U()}],pl:[{pl:U()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":U()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":U()}],"space-y-reverse":["space-y-reverse"],size:[{size:Q()}],"inline-size":[{inline:["auto",...I()]}],"min-inline-size":[{"min-inline":["auto",...I()]}],"max-inline-size":[{"max-inline":["none",...I()]}],"block-size":[{block:["auto",...oe()]}],"min-block-size":[{"min-block":["auto",...oe()]}],"max-block-size":[{"max-block":["none",...oe()]}],w:[{w:[m,"screen",...Q()]}],"min-w":[{"min-w":[m,"screen","none",...Q()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[d]},...Q()]}],h:[{h:["screen","lh",...Q()]}],"min-h":[{"min-h":["screen","lh","none",...Q()]}],"max-h":[{"max-h":["screen","lh",...Q()]}],"font-size":[{text:["base",r,wo,Js]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,sw,WT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",wd,he]}],"font-family":[{font:[tw,$T,i]}],"font-features":[{"font-features":[he]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[c,me,he]}],"line-clamp":[{"line-clamp":[De,"none",me,bb]}],leading:[{leading:[f,...U()]}],"list-image":[{"list-image":["none",me,he]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,he]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:Y()}],"text-color":[{text:Y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ge(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",me,Js]}],"text-decoration-color":[{decoration:Y()}],"underline-offset":[{"underline-offset":[De,"auto",me,he]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:U()}],"tab-size":[{tab:[li,me,he]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,he]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",me,he]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:T()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},li,me,he],radial:["",me,he],conic:[li,me,he]},iw,ew]}],"bg-color":[{bg:Y()}],"gradient-from-pos":[{from:ne()}],"gradient-via-pos":[{via:ne()}],"gradient-to-pos":[{to:ne()}],"gradient-from":[{from:Y()}],"gradient-via":[{via:Y()}],"gradient-to":[{to:Y()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:ee()}],"border-w-x":[{"border-x":ee()}],"border-w-y":[{"border-y":ee()}],"border-w-s":[{"border-s":ee()}],"border-w-e":[{"border-e":ee()}],"border-w-bs":[{"border-bs":ee()}],"border-w-be":[{"border-be":ee()}],"border-w-t":[{"border-t":ee()}],"border-w-r":[{"border-r":ee()}],"border-w-b":[{"border-b":ee()}],"border-w-l":[{"border-l":ee()}],"divide-x":[{"divide-x":ee()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ee()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ge(),"hidden","none"]}],"divide-style":[{divide:[...ge(),"hidden","none"]}],"border-color":[{border:Y()}],"border-color-x":[{"border-x":Y()}],"border-color-y":[{"border-y":Y()}],"border-color-s":[{"border-s":Y()}],"border-color-e":[{"border-e":Y()}],"border-color-bs":[{"border-bs":Y()}],"border-color-be":[{"border-be":Y()}],"border-color-t":[{"border-t":Y()}],"border-color-r":[{"border-r":Y()}],"border-color-b":[{"border-b":Y()}],"border-color-l":[{"border-l":Y()}],"divide-color":[{divide:Y()}],"outline-style":[{outline:[...ge(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,me,he]}],"outline-w":[{outline:["",De,wo,Js]}],"outline-color":[{outline:Y()}],shadow:[{shadow:["","none",y,yc,gc]}],"shadow-color":[{shadow:Y()}],"inset-shadow":[{"inset-shadow":["none",v,yc,gc]}],"inset-shadow-color":[{"inset-shadow":Y()}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:Y()}],"ring-offset-w":[{"ring-offset":[De,Js]}],"ring-offset-color":[{"ring-offset":Y()}],"inset-ring-w":[{"inset-ring":ee()}],"inset-ring-color":[{"inset-ring":Y()}],"text-shadow":[{"text-shadow":["none",S,yc,gc]}],"text-shadow-color":[{"text-shadow":Y()}],opacity:[{opacity:[De,me,he]}],"mix-blend":[{"mix-blend":[...ce(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":fe()}],"mask-image-linear-to-pos":[{"mask-linear-to":fe()}],"mask-image-linear-from-color":[{"mask-linear-from":Y()}],"mask-image-linear-to-color":[{"mask-linear-to":Y()}],"mask-image-t-from-pos":[{"mask-t-from":fe()}],"mask-image-t-to-pos":[{"mask-t-to":fe()}],"mask-image-t-from-color":[{"mask-t-from":Y()}],"mask-image-t-to-color":[{"mask-t-to":Y()}],"mask-image-r-from-pos":[{"mask-r-from":fe()}],"mask-image-r-to-pos":[{"mask-r-to":fe()}],"mask-image-r-from-color":[{"mask-r-from":Y()}],"mask-image-r-to-color":[{"mask-r-to":Y()}],"mask-image-b-from-pos":[{"mask-b-from":fe()}],"mask-image-b-to-pos":[{"mask-b-to":fe()}],"mask-image-b-from-color":[{"mask-b-from":Y()}],"mask-image-b-to-color":[{"mask-b-to":Y()}],"mask-image-l-from-pos":[{"mask-l-from":fe()}],"mask-image-l-to-pos":[{"mask-l-to":fe()}],"mask-image-l-from-color":[{"mask-l-from":Y()}],"mask-image-l-to-color":[{"mask-l-to":Y()}],"mask-image-x-from-pos":[{"mask-x-from":fe()}],"mask-image-x-to-pos":[{"mask-x-to":fe()}],"mask-image-x-from-color":[{"mask-x-from":Y()}],"mask-image-x-to-color":[{"mask-x-to":Y()}],"mask-image-y-from-pos":[{"mask-y-from":fe()}],"mask-image-y-to-pos":[{"mask-y-to":fe()}],"mask-image-y-from-color":[{"mask-y-from":Y()}],"mask-image-y-to-color":[{"mask-y-to":Y()}],"mask-image-radial":[{"mask-radial":[me,he]}],"mask-image-radial-from-pos":[{"mask-radial-from":fe()}],"mask-image-radial-to-pos":[{"mask-radial-to":fe()}],"mask-image-radial-from-color":[{"mask-radial-from":Y()}],"mask-image-radial-to-color":[{"mask-radial-to":Y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":k()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":fe()}],"mask-image-conic-to-pos":[{"mask-conic-to":fe()}],"mask-image-conic-from-color":[{"mask-conic-from":Y()}],"mask-image-conic-to-color":[{"mask-conic-to":Y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:T()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,he]}],filter:[{filter:["","none",me,he]}],blur:[{blur:Ze()}],brightness:[{brightness:[De,me,he]}],contrast:[{contrast:[De,me,he]}],"drop-shadow":[{"drop-shadow":["","none",E,yc,gc]}],"drop-shadow-color":[{"drop-shadow":Y()}],grayscale:[{grayscale:["",De,me,he]}],"hue-rotate":[{"hue-rotate":[De,me,he]}],invert:[{invert:["",De,me,he]}],saturate:[{saturate:[De,me,he]}],sepia:[{sepia:["",De,me,he]}],"backdrop-filter":[{"backdrop-filter":["","none",me,he]}],"backdrop-blur":[{"backdrop-blur":Ze()}],"backdrop-brightness":[{"backdrop-brightness":[De,me,he]}],"backdrop-contrast":[{"backdrop-contrast":[De,me,he]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,me,he]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,me,he]}],"backdrop-invert":[{"backdrop-invert":["",De,me,he]}],"backdrop-opacity":[{"backdrop-opacity":[De,me,he]}],"backdrop-saturate":[{"backdrop-saturate":[De,me,he]}],"backdrop-sepia":[{"backdrop-sepia":["",De,me,he]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":U()}],"border-spacing-x":[{"border-spacing-x":U()}],"border-spacing-y":[{"border-spacing-y":U()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,he]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",me,he]}],ease:[{ease:["linear","initial",D,me,he]}],delay:[{delay:[De,me,he]}],animate:[{animate:["none",C,me,he]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,me,he]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:nt()}],"rotate-x":[{"rotate-x":nt()}],"rotate-y":[{"rotate-y":nt()}],"rotate-z":[{"rotate-z":nt()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:ze()}],"skew-x":[{"skew-x":ze()}],"skew-y":[{"skew-y":ze()}],transform:[{transform:[me,he,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Oe()}],"translate-x":[{"translate-x":Oe()}],"translate-y":[{"translate-y":Oe()}],"translate-z":[{"translate-z":Oe()}],"translate-none":["translate-none"],zoom:[{zoom:[li,me,he]}],accent:[{accent:Y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:Y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",me,he]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":Y()}],"scrollbar-track-color":[{"scrollbar-track":Y()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mbs":[{"scroll-mbs":U()}],"scroll-mbe":[{"scroll-mbe":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-pe":[{"scroll-pe":U()}],"scroll-pbs":[{"scroll-pbs":U()}],"scroll-pbe":[{"scroll-pbe":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",me,he]}],fill:[{fill:["none",...Y()]}],"stroke-w":[{stroke:[De,wo,Js,bb]}],stroke:[{stroke:["none",...Y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},ow=BT(aw);function un(...n){return ow(Pv(n))}const lw=Iv("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",{variants:{variant:{default:"bg-primary text-primary-foreground",secondary:"bg-secondary text-secondary-foreground",destructive:"bg-destructive/10 text-destructive",outline:"border-border text-foreground",ghost:"hover:bg-muted hover:text-muted-foreground",link:"text-primary underline-offset-4 hover:underline"}},defaultVariants:{variant:"default"}});function sa({className:n,variant:i="default",render:r,...o}){return gT({defaultTagName:"span",props:Fo({className:un(lw({variant:i}),n)},o),render:r,state:{slot:"badge",variant:i}})}function _o({className:n,...i}){return A.jsx("div",{"data-slot":"skeleton",className:un("animate-pulse rounded-md bg-muted",n),...i})}function cw({isLoading:n,isError:i,port:r,service:o}){return n?A.jsxs("div",{className:"flex min-w-[10rem] items-center gap-2","aria-live":"polite",children:[A.jsx(_o,{className:"h-5 w-20"}),A.jsx("span",{className:"text-xs text-chatroom-text-muted",children:"Connecting…"})]}):i?A.jsx(sa,{variant:"destructive","aria-live":"polite",children:"Disconnected"}):A.jsxs("div",{className:"flex items-center gap-2 text-xs text-chatroom-text-muted","aria-live":"polite",children:[A.jsx(sa,{variant:"outline",className:"border-chatroom-status-success text-chatroom-status-success",children:"Connected"}),r!=null&&o!=null&&A.jsxs("span",{children:["Port ",r," · ",o]})]})}function uw({header:n,nav:i,children:r}){return A.jsxs("div",{className:"chatroom-root flex h-full min-h-screen flex-col bg-chatroom-bg-primary text-chatroom-text-primary",children:[n,i,A.jsx("main",{className:"flex min-h-0 flex-1 flex-col",children:r})]})}/**
50
50
  * @license lucide-react v0.511.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
- */const uw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fw=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,o)=>o?o.toUpperCase():r.toLowerCase()),xb=n=>{const i=fw(n);return i.charAt(0).toUpperCase()+i.slice(1)},f0=(...n)=>n.filter((i,r,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===r).join(" ").trim(),dw=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};/**
54
+ */const fw=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),dw=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,o)=>o?o.toUpperCase():r.toLowerCase()),xb=n=>{const i=dw(n);return i.charAt(0).toUpperCase()+i.slice(1)},f0=(...n)=>n.filter((i,r,o)=>!!i&&i.trim()!==""&&o.indexOf(i)===r).join(" ").trim(),hw=n=>{for(const i in n)if(i.startsWith("aria-")||i==="role"||i==="title")return!0};/**
55
55
  * @license lucide-react v0.511.0 - ISC
56
56
  *
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
- */var hw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
59
+ */var mw={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
60
60
  * @license lucide-react v0.511.0 - ISC
61
61
  *
62
62
  * This source code is licensed under the ISC license.
63
63
  * See the LICENSE file in the root directory of this source tree.
64
- */const mw=O.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:c="",children:f,iconNode:d,...m},g)=>O.createElement("svg",{ref:g,...hw,width:i,height:i,stroke:n,strokeWidth:o?Number(r)*24/Number(i):r,className:f0("lucide",c),...!f&&!dw(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,y])=>O.createElement(p,y)),...Array.isArray(f)?f:[f]]));/**
64
+ */const pw=O.forwardRef(({color:n="currentColor",size:i=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:c="",children:f,iconNode:d,...m},g)=>O.createElement("svg",{ref:g,...mw,width:i,height:i,stroke:n,strokeWidth:o?Number(r)*24/Number(i):r,className:f0("lucide",c),...!f&&!hw(m)&&{"aria-hidden":"true"},...m},[...d.map(([p,y])=>O.createElement(p,y)),...Array.isArray(f)?f:[f]]));/**
65
65
  * @license lucide-react v0.511.0 - ISC
66
66
  *
67
67
  * This source code is licensed under the ISC license.
68
68
  * See the LICENSE file in the root directory of this source tree.
69
- */const Oa=(n,i)=>{const r=O.forwardRef(({className:o,...c},f)=>O.createElement(mw,{ref:f,iconNode:i,className:f0(`lucide-${uw(xb(n))}`,`lucide-${n}`,o),...c}));return r.displayName=xb(n),r};/**
69
+ */const Oa=(n,i)=>{const r=O.forwardRef(({className:o,...c},f)=>O.createElement(pw,{ref:f,iconNode:i,className:f0(`lucide-${fw(xb(n))}`,`lucide-${n}`,o),...c}));return r.displayName=xb(n),r};/**
70
70
  * @license lucide-react v0.511.0 - ISC
71
71
  *
72
72
  * This source code is licensed under the ISC license.
73
73
  * See the LICENSE file in the root directory of this source tree.
74
- */const pw=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],d0=Oa("activity",pw);/**
74
+ */const gw=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],d0=Oa("activity",gw);/**
75
75
  * @license lucide-react v0.511.0 - ISC
76
76
  *
77
77
  * This source code is licensed under the ISC license.
78
78
  * See the LICENSE file in the root directory of this source tree.
79
- */const gw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yw=Oa("check",gw);/**
79
+ */const yw=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],bw=Oa("check",yw);/**
80
80
  * @license lucide-react v0.511.0 - ISC
81
81
  *
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
- */const bw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jc=Oa("chevron-down",bw);/**
84
+ */const vw=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Jc=Oa("chevron-down",vw);/**
85
85
  * @license lucide-react v0.511.0 - ISC
86
86
  *
87
87
  * This source code is licensed under the ISC license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
- */const vw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Sw=Oa("circle-alert",vw);/**
89
+ */const Sw=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],xw=Oa("circle-alert",Sw);/**
90
90
  * @license lucide-react v0.511.0 - ISC
91
91
  *
92
92
  * This source code is licensed under the ISC license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
- */const xw=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Ew=Oa("scroll-text",xw);/**
94
+ */const Ew=[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]],Tw=Oa("scroll-text",Ew);/**
95
95
  * @license lucide-react v0.511.0 - ISC
96
96
  *
97
97
  * This source code is licensed under the ISC license.
98
98
  * See the LICENSE file in the root directory of this source tree.
99
- */const Tw=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],h0=Oa("x",Tw);function ww({status:n}){return A.jsxs("header",{className:"flex items-center justify-between border-b border-chatroom-border px-6 py-4",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx(d0,{className:"size-5 text-chatroom-text-muted","aria-hidden":!0}),A.jsx("h1",{className:"text-sm font-semibold uppercase tracking-widest",children:"Chatroom Daemon"})]}),n]})}function Rw({children:n}){return A.jsx("nav",{className:"flex gap-1 border-b border-chatroom-border px-6 py-2",children:n})}function Eb({active:n=!1,children:i,onClick:r}){return A.jsx("span",{className:n?"bg-chatroom-bg-secondary px-3 py-1.5 text-xs font-medium uppercase tracking-wide":"px-3 py-1.5 text-xs font-medium uppercase tracking-wide text-chatroom-text-muted",onClick:r,role:r?"button":void 0,children:i})}function Tb(n){return new URLSearchParams(n.startsWith("?")?n.slice(1):n).get("tab")==="event-stream"?"event-stream":"logs"}function Ow(n){const i=new URLSearchParams(window.location.search);n.tab!==void 0&&(n.tab==="event-stream"?i.set("tab","event-stream"):i.delete("tab")),n.chatroomId!==void 0&&(n.chatroomId?i.set("chatroomId",n.chatroomId):i.delete("chatroomId"));const r=i.toString();window.history.replaceState(null,"",`${window.location.pathname}${r?`?${r}`:""}`)}function Cw(){const[n,i]=O.useState(()=>Tb(window.location.search)),r=O.useCallback(o=>{i(o),Ow({tab:o})},[]);return O.useEffect(()=>{const o=()=>i(Tb(window.location.search));return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[]),{activeTab:n,setActiveTab:r}}const mi=Object.create(null);mi.open="0";mi.close="1";mi.ping="2";mi.pong="3";mi.message="4";mi.upgrade="5";mi.noop="6";const _c=Object.create(null);Object.keys(mi).forEach(n=>{_c[mi[n]]=n});const ih={type:"error",data:"parser error"},m0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",p0=typeof ArrayBuffer=="function",g0=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Ah=({type:n,data:i},r,o)=>m0&&i instanceof Blob?r?o(i):wb(i,o):p0&&(i instanceof ArrayBuffer||g0(i))?r?o(i):wb(new Blob([i]),o):o(mi[n]+(i||"")),wb=(n,i)=>{const r=new FileReader;return r.onload=function(){const o=r.result.split(",")[1];i("b"+(o||""))},r.readAsDataURL(n)};function Rb(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Rd;function Aw(n,i){if(m0&&n.data instanceof Blob)return n.data.arrayBuffer().then(Rb).then(i);if(p0&&(n.data instanceof ArrayBuffer||g0(n.data)))return i(Rb(n.data));Ah(n,!1,r=>{Rd||(Rd=new TextEncoder),i(Rd.encode(r))})}const Ob="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Ob.length;n++)Mo[Ob.charCodeAt(n)]=n;const _w=n=>{let i=n.length*.75,r=n.length,o,c=0,f,d,m,g;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const p=new ArrayBuffer(i),y=new Uint8Array(p);for(o=0;o<r;o+=4)f=Mo[n.charCodeAt(o)],d=Mo[n.charCodeAt(o+1)],m=Mo[n.charCodeAt(o+2)],g=Mo[n.charCodeAt(o+3)],y[c++]=f<<2|d>>4,y[c++]=(d&15)<<4|m>>2,y[c++]=(m&3)<<6|g&63;return p},Mw=typeof ArrayBuffer=="function",_h=(n,i)=>{if(typeof n!="string")return{type:"message",data:y0(n,i)};const r=n.charAt(0);return r==="b"?{type:"message",data:Nw(n.substring(1),i)}:_c[r]?n.length>1?{type:_c[r],data:n.substring(1)}:{type:_c[r]}:ih},Nw=(n,i)=>{if(Mw){const r=_w(n);return y0(r,i)}else return{base64:!0,data:n}},y0=(n,i)=>{switch(i){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},b0="",Dw=(n,i)=>{const r=n.length,o=new Array(r);let c=0;n.forEach((f,d)=>{Ah(f,!1,m=>{o[d]=m,++c===r&&i(o.join(b0))})})},zw=(n,i)=>{const r=n.split(b0),o=[];for(let c=0;c<r.length;c++){const f=_h(r[c],i);if(o.push(f),f.type==="error")break}return o};function kw(){return new TransformStream({transform(n,i){Aw(n,r=>{const o=r.length;let c;if(o<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,o);else if(o<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,o)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(o))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(r)})}})}let Od;function bc(n){return n.reduce((i,r)=>i+r.length,0)}function vc(n,i){if(n[0].length===i)return n.shift();const r=new Uint8Array(i);let o=0;for(let c=0;c<i;c++)r[c]=n[0][o++],o===n[0].length&&(n.shift(),o=0);return n.length&&o<n[0].length&&(n[0]=n[0].slice(o)),r}function jw(n,i){Od||(Od=new TextDecoder);const r=[];let o=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(o===0){if(bc(r)<1)break;const g=vc(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?o=3:c===126?o=1:o=2}else if(o===1){if(bc(r)<2)break;const g=vc(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(bc(r)<8)break;const g=vc(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),y=p.getUint32(0);if(y>Math.pow(2,21)-1){m.enqueue(ih);break}c=y*Math.pow(2,32)+p.getUint32(4),o=3}else{if(bc(r)<c)break;const g=vc(r,c);m.enqueue(_h(f?g:Od.decode(g),i)),o=0}if(c===0||c>n){m.enqueue(ih);break}}}})}const v0=4;function zt(n){if(n)return Uw(n)}function Uw(n){for(var i in zt.prototype)n[i]=zt.prototype[i];return n}zt.prototype.on=zt.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};zt.prototype.once=function(n,i){function r(){this.off(n,r),i.apply(this,arguments)}return r.fn=i,this.on(n,r),this};zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,c=0;c<r.length;c++)if(o=r[c],o===i||o.fn===i){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};zt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+n],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,c=r.length;o<c;++o)r[o].apply(this,i)}return this};zt.prototype.emitReserved=zt.prototype.emit;zt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};zt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Wc=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,r)=>r(i,0),Xn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Lw="arraybuffer";function S0(n,...i){return i.reduce((r,o)=>(n.hasOwnProperty(o)&&(r[o]=n[o]),r),{})}const Bw=Xn.setTimeout,Hw=Xn.clearTimeout;function $c(n,i){i.useNativeTimers?(n.setTimeoutFn=Bw.bind(Xn),n.clearTimeoutFn=Hw.bind(Xn)):(n.setTimeoutFn=Xn.setTimeout.bind(Xn),n.clearTimeoutFn=Xn.clearTimeout.bind(Xn))}const qw=1.33;function Yw(n){return typeof n=="string"?Vw(n):Math.ceil((n.byteLength||n.size)*qw)}function Vw(n){let i=0,r=0;for(let o=0,c=n.length;o<c;o++)i=n.charCodeAt(o),i<128?r+=1:i<2048?r+=2:i<55296||i>=57344?r+=3:(o++,r+=4);return r}function x0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Gw(n){let i="";for(let r in n)n.hasOwnProperty(r)&&(i.length&&(i+="&"),i+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return i}function Qw(n){let i={},r=n.split("&");for(let o=0,c=r.length;o<c;o++){let f=r[o].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class Xw extends Error{constructor(i,r,o){super(i),this.description=r,this.context=o,this.type="TransportError"}}class Mh extends zt{constructor(i){super(),this.writable=!1,$c(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,o){return super.emitReserved("error",new Xw(i,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const r=_h(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const r=Gw(i);return r.length?"?"+r:""}}class Fw extends Mh{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const r=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};zw(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,Dw(i,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=x0()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(i,r)}}let E0=!1;try{E0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Kw=E0;function Zw(){}class Pw extends Fw{constructor(i){if(super(i),typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||o!==i.port}}doWrite(i,r){const o=this.request({method:"POST",data:i});o.on("success",r),o.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=i}}class hi extends zt{constructor(i,r,o){super(),this.createRequest=i,$c(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var i;const r=S0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&o.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var c;o.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=hi.requestsCount++,hi.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Zw,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete hi.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}hi.requestsCount=0;hi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cb);else if(typeof addEventListener=="function"){const n="onpagehide"in Xn?"pagehide":"unload";addEventListener(n,Cb,!1)}}function Cb(){for(let n in hi.requests)hi.requests.hasOwnProperty(n)&&hi.requests[n].abort()}const Iw=function(){const n=T0({xdomain:!1});return n&&n.responseType!==null}();class Jw extends Pw{constructor(i){super(i);const r=i&&i.forceBase64;this.supportsBinary=Iw&&!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new hi(T0,this.uri(),i)}}function T0(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Kw))return new XMLHttpRequest}catch{}if(!i)try{return new Xn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Ww extends Mh{get name(){return"websocket"}doOpen(){const i=this.uri(),r=this.opts.protocols,o=w0?{}:S0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,r,o)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const o=i[r],c=r===i.length-1;Ah(o,this.supportsBinary,f=>{try{this.doWrite(o,f)}catch{}c&&Wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=x0()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}}const Cd=Xn.WebSocket||Xn.MozWebSocket;class $w extends Ww{createSocket(i,r,o){return w0?new Cd(i,r,o):r?new Cd(i,r):new Cd(i)}doWrite(i,r){this.ws.send(r)}}class eR extends Mh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const r=jw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=i.readable.pipeThrough(r).getReader(),c=kw();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{o.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const o=i[r],c=r===i.length-1;this._writer.write(o).then(()=>{c&&Wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const tR={websocket:$w,webtransport:eR,polling:Jw},nR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,iR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function sh(n){if(n.length>8e3)throw"URI too long";const i=n,r=n.indexOf("["),o=n.indexOf("]");r!=-1&&o!=-1&&(n=n.substring(0,r)+n.substring(r,o).replace(/:/g,";")+n.substring(o,n.length));let c=nR.exec(n||""),f={},d=14;for(;d--;)f[iR[d]]=c[d]||"";return r!=-1&&o!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=sR(f,f.path),f.queryKey=rR(f,f.query),f}function sR(n,i){const r=/\/{2,9}/g,o=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&o.splice(0,1),i.slice(-1)=="/"&&o.splice(o.length-1,1),o}function rR(n,i){const r={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,c,f){c&&(r[c]=f)}),r}const rh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mc=[];rh&&addEventListener("offline",()=>{Mc.forEach(n=>n())},!1);class Os extends zt{constructor(i,r){if(super(),this.binaryType=Lw,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(r=i,i=null),i){const o=sh(i);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=sh(r.host).host);$c(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{const c=o.prototype.name;this.transports.push(c),this._transportsByName[c]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Qw(this.opts.query)),rh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const r=Object.assign({},this.opts.query);r.EIO=v0,r.transport=i,this.id&&(r.sid=this.id);const o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Os.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(i);r.open(),this.setTransport(r)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Os.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=i.data,this._onError(r);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){const c=this.writeBuffer[o].data;if(c&&(r+=Yw(c)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Wc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,r,o){return this._sendPacket("message",i,r,o),this}send(i,r,o){return this._sendPacket("message",i,r,o),this}_sendPacket(i,r,o,c){if(typeof r=="function"&&(c=r,r=void 0),typeof o=="function"&&(c=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const f={type:i,data:r,options:o};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),i()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():i()}):this.upgrading?o():i()),this}_onError(i){if(Os.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),rh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Mc.indexOf(this._offlineEventListener);o!==-1&&Mc.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,r),this.writeBuffer=[],this._prevBufferLen=0}}}Os.protocol=v0;class aR extends Os{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),o=!1;Os.priorWebsocketSuccess=!1;const c=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Os.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(y(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=r.name,this.emitReserved("upgradeError",S)}}))};function f(){o||(o=!0,y(),r.close(),r=null)}const d=v=>{const S=new Error("probe error: "+v);S.transport=r.name,f(),this.emitReserved("upgradeError",S)};function m(){d("transport closed")}function g(){d("socket closed")}function p(v){r&&v.name!==r.name&&f()}const y=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const r=[];for(let o=0;o<i.length;o++)~this.transports.indexOf(i[o])&&r.push(i[o]);return r}}let oR=class extends aR{constructor(i,r={}){const o=typeof i=="object",c=o?{...i}:{...r};(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>tR[f]).filter(f=>!!f)),super(o?c:i,c)}};function lR(n,i="",r){let o=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),o=sh(n)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const f=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+f+":"+o.port+i,o.href=o.protocol+"://"+f+(r&&r.port===o.port?"":":"+o.port),o}const cR=typeof ArrayBuffer=="function",uR=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,fR=typeof Blob=="function"||typeof Blob<"u"&&R0.call(Blob)==="[object BlobConstructor]",dR=typeof File=="function"||typeof File<"u"&&R0.call(File)==="[object FileConstructor]";function Nh(n){return cR&&(n instanceof ArrayBuffer||uR(n))||fR&&n instanceof Blob||dR&&n instanceof File}function Nc(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,o=n.length;r<o;r++)if(Nc(n[r]))return!0;return!1}if(Nh(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Nc(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&Nc(n[r]))return!0;return!1}function hR(n){const i=[],r=n.data,o=n;return o.data=Dc(r,i),o.attachments=i.length,{packet:o,buffers:i}}function Dc(n,i,r){if(!n)return n;if(Nh(n)){const o={_placeholder:!0,num:i.length};return i.push(n),o}else if(Array.isArray(n)){const o=new Array(n.length);for(let c=0;c<n.length;c++)o[c]=Dc(n[c],i);return o}else if(typeof n=="object"&&!(n instanceof Date)){if(n.toJSON&&typeof n.toJSON=="function"&&!r)return Dc(n.toJSON(),i,!0);const o={};for(const c in n)Object.prototype.hasOwnProperty.call(n,c)&&(o[c]=Dc(n[c],i));return o}return n}function mR(n,i){return n.data=ah(n.data,i),delete n.attachments,n}function ah(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=ah(n[r],i);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=ah(n[r],i));return n}const O0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],pR=5;var Ne;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ne||(Ne={}));class gR{constructor(i){this.replacer=i}encode(i){return(i.type===Ne.EVENT||i.type===Ne.ACK)&&Nc(i)?this.encodeAsBinary({type:i.type===Ne.EVENT?Ne.BINARY_EVENT:Ne.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===Ne.BINARY_EVENT||i.type===Ne.BINARY_ACK)&&(r+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(r+=i.nsp+","),i.id!=null&&(r+=i.id),i.data!=null&&(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){const r=hR(i),o=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(o),c}}class Dh extends zt{constructor(i){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof i=="function"?{reviver:i}:i)}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);const o=r.type===Ne.BINARY_EVENT;o||r.type===Ne.BINARY_ACK?(r.type=o?Ne.EVENT:Ne.ACK,this.reconstructor=new yR(r)):super.emitReserved("decoded",r)}else if(Nh(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0;const o={type:Number(i.charAt(0))};if(Ne[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Ne.BINARY_EVENT||o.type===Ne.BINARY_ACK){const f=r+1;for(;i.charAt(++r)!=="-"&&r!=i.length;);const d=i.substring(f,r);if(d!=Number(d)||i.charAt(r)!=="-")throw new Error("Illegal attachments");const m=Number(d);if(!C0(m)||m<1)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=m}if(i.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(i.charAt(r)===","||r===i.length););o.nsp=i.substring(f,r)}else o.nsp="/";const c=i.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=i.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===i.length)break}o.id=Number(i.substring(f,r+1))}if(i.charAt(++r)){const f=this.tryParse(i.substr(r));if(Dh.isPayloadValid(o.type,f))o.data=f;else throw new Error("invalid payload")}return o}tryParse(i){try{return JSON.parse(i,this.opts.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case Ne.CONNECT:return Yc(r);case Ne.DISCONNECT:return r===void 0;case Ne.CONNECT_ERROR:return typeof r=="string"||Yc(r);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&O0.indexOf(r[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class yR{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const r=mR(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function bR(n){return typeof n=="string"}const C0=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function vR(n){return n===void 0||C0(n)}function Yc(n){return Object.prototype.toString.call(n)==="[object Object]"}function SR(n,i){switch(n){case Ne.CONNECT:return i===void 0||Yc(i);case Ne.DISCONNECT:return i===void 0;case Ne.EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&O0.indexOf(i[0])===-1);case Ne.ACK:return Array.isArray(i);case Ne.CONNECT_ERROR:return typeof i=="string"||Yc(i);default:return!1}}function xR(n){return bR(n.nsp)&&vR(n.id)&&SR(n.type,n.data)}const ER=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dh,Encoder:gR,get PacketType(){return Ne},isPacketValid:xR,protocol:pR},Symbol.toStringTag,{value:"Module"}));function Wn(n,i,r){return n.on(i,r),function(){n.off(i,r)}}const TR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class A0 extends zt{constructor(i,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Wn(i,"open",this.onopen.bind(this)),Wn(i,"packet",this.onpacket.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var o,c,f;if(TR.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Ne.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const y=this.ids++,v=r.pop();this._registerAckCallback(y,v),d.id=y}const m=(c=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,r){var o;const c=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(c===void 0){this.acks[i]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...r){return new Promise((o,c)=>{const f=(d,m)=>d?c(d):o(m);f.withError=!0,r.push(f),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&&(r=i.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(o=>String(o.id)===i)){const o=this.acks[i];delete this.acks[i],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Ne.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(i);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(i);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const o=new Error(i.data.message);o.data=i.data.data,this.emitReserved("connect_error",o);break}}onevent(i){const r=i.data||[];i.id!=null&&r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const o of r)o.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const r=this;let o=!1;return function(...c){o||(o=!0,r.packet({type:Ne.ACK,id:i,data:c}))}}onack(i){const r=this.acks[i.id];typeof r=="function"&&(delete this.acks[i.id],r.withError&&i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const r=this._anyListeners;for(let o=0;o<r.length;o++)if(i===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(i===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const o of r)o.apply(this,i.data)}}}function Ca(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Ca.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Ca.prototype.reset=function(){this.attempts=0};Ca.prototype.setMin=function(n){this.ms=n};Ca.prototype.setMax=function(n){this.max=n};Ca.prototype.setJitter=function(n){this.jitter=n};class oh extends zt{constructor(i,r){var o;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,$c(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Ca({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;const c=r.parser||ER;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new oR(this.uri,this.opts);const r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const c=Wn(r,"open",function(){o.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},d=Wn(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Wn(i,"ping",this.onping.bind(this)),Wn(i,"data",this.ondata.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this)),Wn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){Wc(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let o=this.nsps[i];return o?this._autoConnect&&!o.active&&o.connect():(o=new A0(this,i,r),this.nsps[i]=o),o}_destroy(i){const r=Object.keys(this.nsps);for(const o of r)if(this.nsps[o].active)return;this._close()}_packet(i){const r=this.encoder.encode(i);for(let o=0;o<r.length;o++)this.engine.write(r[o],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Ro={};function zc(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const r=lR(n,i.path||"/socket.io"),o=r.source,c=r.id,f=r.path,d=Ro[c]&&f in Ro[c].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let g;return m?g=new oh(o,i):(Ro[c]||(Ro[c]=new oh(o,i)),g=Ro[c]),r.query&&!i.query&&(i.query=r.queryKey),g.socket(r.path,i)}Object.assign(zc,{Manager:oh,Socket:A0,io:zc,connect:zc});let Ad=null;function dr(){return Ad||(Ad=zc({transports:["websocket"],autoConnect:!0})),Ad}async function wR(){const n=dr();return await Ko(n),n.emitWithAck("health.get")}async function Ko(n){n.connected||await new Promise((i,r)=>{const o=()=>{f(),i()},c=d=>{f(),r(d)},f=()=>{n.off("connect",o),n.off("connect_error",c)};n.on("connect",o),n.on("connect_error",c),n.connect()})}async function RR(n){const i=dr();return await Ko(i),i.emitWithAck("logs.history",n)}async function OR(n,i){const r=dr();return await Ko(r),r.emitWithAck("logs.dimensions",{chatroomId:n,limit:i})}async function CR(){const n=dr();return await Ko(n),n.emitWithAck("chatrooms.list")}async function AR(n){const i=dr();return await Ko(i),i.emitWithAck("eventStream.history",n??{})}function _R(n){const i=dr();return i.connect(),i.emit("eventStream.stream.subscribe"),i.on("eventStream.stream",n),()=>i.off("eventStream.stream",n)}function MR(n){const i=dr();return i.connect(),i.emit("logs.stream.subscribe"),i.on("logs.stream",n),()=>i.off("logs.stream",n)}function NR(){return Hv({queryKey:["daemon","health"],queryFn:async()=>{const n=await wR();if(!n.ok)throw new Error(n.error.message);return n.data},retry:2})}const DR={info:{badge:"bg-chatroom-status-info/15 text-chatroom-status-info"},success:{badge:"bg-chatroom-status-success/15 text-chatroom-status-success"},warning:{badge:"bg-chatroom-status-warning/15 text-chatroom-status-warning"},error:{badge:"bg-chatroom-status-error/15 text-chatroom-status-error"},muted:{badge:"bg-chatroom-text-muted/15 text-chatroom-text-muted"},purple:{badge:"bg-chatroom-status-purple/15 text-chatroom-status-purple"}};function zR(n){return DR[n]}const kR={"agent.started":["Agent Started","success"],"agent.exited":["Agent Exited","error"],"agent.circuitOpen":["Circuit Open","warning"],"agent.requestStart":["Agent Request Start","warning"],"agent.requestStop":["Agent Request Stop","error"],"agent.registered":["Agent Registered","success"],"agent.waiting":["Agent Waiting","success"],"agent.startFailed":["Agent Start Failed","error"],"agent.providerUnavailable":["Provider Unavailable","warning"],"agent.sessionResumeRequested":["Session Reconnect Requested","info"],"agent.sessionResumed":["Session Reconnected","success"],"agent.sessionResumeFailed":["Session Reconnect Failed","warning"],"agent.sessionReopenRetry":["Session Reopen Retry","info"],"agent.sessionCompacted":["Session Compacted","info"],"agent.sessionAugmented":["Session Augmented","info"],"agent.resumeStormAborted":["Resume Storm Aborted","error"],"agent.restart":["Agent Restarting","info"],"agent.restartCompleted":["Agent Restarted","success"],"agent.restartPhase":["Agent Restart Progress","info"],"agent.restartLimitReached":["Agent Restart Limit","error"],"agent.stopTimeout":["Agent Stop Timeout","warning"],"agent.harnessSessionIdUpdated":["Harness Session ID Updated","info"],"agent.awaitingHandoff":["Awaiting Handoff","warning"],"agent.enhancing":["Planning Review","info"],"agent.taskDelivered":["Task Delivered","success"],"agent.taskDeliveryFailed":["Task Delivery Failed","error"],"machine.switched":["Machine Switched","info"],"connection.terminated":["Connection Terminated","muted"],"workflow.started":["Workflow Started","info"],"workflow.stepCompleted":["Workflow Step Completed","success"],"workflow.stepCancelled":["Workflow Step Cancelled","warning"],"workflow.completed":["Workflow Completed","success"],"workflow.created":["Workflow Created","info"],"workflow.specified":["Workflow Specified","info"],"workflow.stepStarted":["Workflow Step Started","info"],"task.activated":["Task Activated","success"],"task.acknowledged":["Task Acknowledged","success"],"task.inProgress":["Task In Progress","info"],"task.completed":["Task Completed","success"],"skill.activated":["Skill Activated","purple"],"daemon.ping":["Daemon Ping","muted"],"daemon.pong":["Daemon Pong","muted"],"daemon.gitRefresh":["Git Refresh","muted"],"daemon.workspaceListChanged":["Workspace List Changed","muted"],"daemon.refreshCapabilities":["Capabilities Refresh","muted"],"daemon.pickFolder":["Pick Folder","muted"],"daemon.localAction":["Local Action","muted"],"config.requestRemoval":["Config Request Removal","warning"],"command.run":["Command Run","warning"],"command.stop":["Command Stop","error"],"enhancer.job.created":["Planning Review Started","info"],"enhancer.attempt.failed":["Planning Review Attempt Failed","warning"],"enhancer.job.failed":["Planning Review Failed","error"],"enhancer.job.complete":["Planning Review Complete","success"],"enhancer.job.cancelled":["Planning Review Cancelled","warning"]},jR=Object.fromEntries(Object.entries(kR).map(([n,[i,r]])=>[n,{label:i,classification:r}]));function UR(n){const i=n.toLowerCase();return i.includes("failed")||i.includes("error")||i.includes("timeout")?"error":n.startsWith("task.")?"success":n.startsWith("agent.")||n.startsWith("workflow.")||n.startsWith("enhancer.")?"info":n.startsWith("daemon.")?"muted":n.startsWith("command.")?"warning":n.startsWith("skill.")?"purple":"muted"}function LR(n){return jR[n]??{label:n,classification:UR(n)}}function _0({type:n,className:i}){const r=LR(n);return A.jsx("span",{className:un("shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider",zR(r.classification).badge,i),children:r.label})}function eu(){return typeof window<"u"}function $t(n){return zh(n)?(n.nodeName||"").toLowerCase():"#document"}function kt(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function Xi(n){var i;return(i=(zh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function zh(n){return eu()?n instanceof Node||n instanceof kt(n).Node:!1}function Je(n){return eu()?n instanceof Element||n instanceof kt(n).Element:!1}function Rt(n){return eu()?n instanceof HTMLElement||n instanceof kt(n).HTMLElement:!1}function xa(n){return!eu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof kt(n).ShadowRoot}function hr(n){const{overflow:i,overflowX:r,overflowY:o,display:c}=zn(n);return/auto|scroll|overlay|hidden|clip/.test(i+o+r)&&c!=="inline"&&c!=="contents"}function BR(n){return/^(table|td|th)$/.test($t(n))}function tu(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const HR=/transform|translate|scale|rotate|perspective|filter/,qR=/paint|layout|strict|content/,Ws=n=>!!n&&n!=="none";let _d;function kh(n){const i=Je(n)?zn(n):n;return Ws(i.transform)||Ws(i.translate)||Ws(i.scale)||Ws(i.rotate)||Ws(i.perspective)||!jh()&&(Ws(i.backdropFilter)||Ws(i.filter))||HR.test(i.willChange||"")||qR.test(i.contain||"")}function YR(n){let i=As(n);for(;Rt(i)&&!Cs(i);){if(kh(i))return i;if(tu(i))return null;i=As(i)}return null}function jh(){return _d==null&&(_d=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_d}function Cs(n){return/^(html|body|#document)$/.test($t(n))}function zn(n){return kt(n).getComputedStyle(n)}function nu(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function As(n){if($t(n)==="html")return n;const i=n.assignedSlot||n.parentNode||xa(n)&&n.host||Xi(n);return xa(i)?i.host:i}function M0(n){const i=As(n);return Cs(i)?(n.ownerDocument||n).body:Rt(i)&&hr(i)?i:M0(i)}function zo(n,i,r){var o;i===void 0&&(i=[]),r===void 0&&(r=!0);const c=M0(n),f=c===((o=n.ownerDocument)==null?void 0:o.body),d=kt(c);if(f){const m=lh(d);return i.concat(d,d.visualViewport||[],hr(c)?c:[],m&&r?zo(m):[])}else return i.concat(c,zo(c,[],r))}function lh(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}const Uh={...a1},Md=Uh.useInsertionEffect,VR=Md&&Md!==Uh.useLayoutEffect?Md:n=>n();function $e(n){const i=Qi(GR).current;return i.next=n,VR(i.effect),i.trampoline}function GR(){const n={next:void 0,callback:QR,trampoline:(...i)=>{var r;return(r=n.callback)==null?void 0:r.call(n,...i)},effect:()=>{n.callback=n.next}};return n}function QR(){}const XR=()=>{},Xe=typeof document<"u"?O.useLayoutEffect:XR,FR=O.createContext(void 0);function KR(n=!1){const i=O.useContext(FR);if(i===void 0&&!n)throw new Error(ur(16));return i}function ZR(n){const{focusableWhenDisabled:i,disabled:r,composite:o=!1,tabIndex:c=0,isNativeButton:f}=n,d=o&&i!==!1,m=o&&i===!1;return{props:O.useMemo(()=>{const p={onKeyDown(y){r&&i&&y.key!=="Tab"&&y.preventDefault()}};return o||(p.tabIndex=c,!f&&r&&(p.tabIndex=i?c:-1)),(f&&(i||d)||!f&&r)&&(p["aria-disabled"]=r),f&&(!i||m)&&(p.disabled=r),p},[o,r,i,d,m,f,c])}}function N0(n={}){const{disabled:i=!1,focusableWhenDisabled:r,tabIndex:o=0,native:c=!0,composite:f}=n,d=O.useRef(null),m=KR(!0),g=f??m!==void 0,{props:p}=ZR({focusableWhenDisabled:r,disabled:i,composite:g,tabIndex:o,isNativeButton:c}),y=O.useCallback(()=>{const E=d.current;Nd(E)&&g&&i&&p.disabled===void 0&&E.disabled&&(E.disabled=!1)},[i,p.disabled,g]);Xe(y,[y]);const v=O.useCallback((E={})=>{const{onClick:x,onMouseDown:w,onKeyUp:_,onKeyDown:D,onPointerDown:C,...j}=E;return Fo({onClick(k){if(i){k.preventDefault();return}x==null||x(k)},onMouseDown(k){i||w==null||w(k)},onKeyDown(k){if(i||(Bc(k),D==null||D(k),k.baseUIHandlerPrevented))return;const q=k.target===k.currentTarget,F=k.currentTarget,B=Nd(F),U=!c&&PR(F),K=q&&(c?B:!U),se=k.key==="Enter",pe=k.key===" ",ae=F.getAttribute("role"),W=(ae==null?void 0:ae.startsWith("menuitem"))||ae==="option"||ae==="gridcell";if(q&&g&&pe){if(k.defaultPrevented&&W)return;k.preventDefault(),U||c&&B?(F.click(),k.preventBaseUIHandler()):K&&(x==null||x(k),k.preventBaseUIHandler());return}K&&(!c&&(pe||se)&&k.preventDefault(),!c&&se&&(x==null||x(k)))},onKeyUp(k){if(!i){if(Bc(k),_==null||_(k),k.target===k.currentTarget&&c&&g&&Nd(k.currentTarget)&&k.key===" "){k.preventDefault();return}k.baseUIHandlerPrevented||k.target===k.currentTarget&&!c&&!g&&k.key===" "&&(x==null||x(k))}},onPointerDown(k){if(i){k.preventDefault();return}C==null||C(k)}},c?{type:"button"}:{role:"button"},p,j)},[i,p,g,c]),S=$e(E=>{d.current=E,y()});return{getButtonProps:v,buttonRef:S}}function Nd(n){return Rt(n)&&n.tagName==="BUTTON"}function PR(n){return!!((n==null?void 0:n.tagName)==="A"&&(n!=null&&n.href))}const IR=O.forwardRef(function(i,r){const{render:o,className:c,disabled:f=!1,focusableWhenDisabled:d=!1,nativeButton:m=!0,style:g,...p}=i,{getButtonProps:y,buttonRef:v}=N0({disabled:f,focusableWhenDisabled:d,native:m});return Ra("button",i,{state:{disabled:f},ref:[r,v],props:[p,y]})}),JR=Iv("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-none text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3"}},defaultVariants:{variant:"default",size:"default"}});function D0({className:n,variant:i="default",size:r="default",...o}){return A.jsx(IR,{"data-slot":"button",className:un(JR({variant:i,size:r,className:n})),...o})}function WR({entry:n,onClose:i}){const r=n.payload;return A.jsxs("aside",{className:"flex w-96 max-w-[40%] shrink-0 flex-col border-l border-chatroom-border bg-chatroom-bg-primary",role:"dialog","aria-modal":"true","aria-label":"Event detail",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-chatroom-border px-4 py-3",children:[A.jsx("h3",{className:"text-sm font-medium",children:"Event detail"}),A.jsx(D0,{variant:"ghost",size:"sm",onClick:i,"aria-label":"Close detail panel",children:A.jsx(h0,{className:"size-4"})})]}),A.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4 text-xs",children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A.jsx(_0,{type:n.type}),A.jsx("span",{className:"text-chatroom-text-muted",children:new Date(n.timestamp).toISOString()})]}),A.jsxs("div",{className:"space-y-1 text-chatroom-text-muted",children:[A.jsxs("div",{children:["Type: ",A.jsx("span",{className:"text-chatroom-text-primary",children:n.type})]}),A.jsxs("div",{children:["ID: ",A.jsx("span",{className:"text-chatroom-text-primary",children:n.id})]}),typeof r.chatroomId=="string"&&A.jsxs("div",{children:["Chatroom: ",A.jsx("span",{className:"text-chatroom-text-primary",children:r.chatroomId})]})]}),A.jsxs("div",{children:[A.jsx("p",{className:"mb-1 text-chatroom-text-muted",children:"Payload"}),A.jsx("pre",{className:"whitespace-pre-wrap border border-chatroom-border bg-chatroom-bg-secondary p-2 font-mono text-[11px]",children:JSON.stringify(r,null,2)})]})]})]})}function $R(n,i,r){const o=i.trim().toLowerCase();return o?n.filter(c=>r(c).toLowerCase().includes(o)):[...n]}function Vc({children:n,selected:i,onSelect:r,disabled:o,className:c,endAdornment:f,trailingActions:d,multiline:m=!1}){const g=un("min-w-0 px-3 py-2 text-xs text-left flex justify-between gap-2",m?"items-start":"items-center","cursor-pointer hover:bg-chatroom-bg-hover transition-colors","outline-none focus-visible:outline-none focus-visible:bg-chatroom-bg-hover","disabled:opacity-50 disabled:cursor-not-allowed",i&&"bg-chatroom-bg-hover",d?"flex-1 rounded-none":"w-full",!d&&c),p=A.jsxs("button",{type:"button",role:"option","aria-selected":i??!1,disabled:o,onClick:r,className:g,children:[A.jsx("span",{className:un("min-w-0 flex-1",m?"overflow-hidden":"truncate"),children:n}),f,i&&!d?A.jsx(yw,{size:12,className:"shrink-0 text-chatroom-accent"}):null]});return d?A.jsxs("div",{className:un("flex items-center w-full min-w-0",c),children:[p,d]}):p}function eO({children:n,className:i,maxHeightClassName:r="max-h-[60vh]"}){return A.jsx("div",{"data-picker-scroll-body":!0,className:un("min-h-0 overflow-y-auto overscroll-contain",r,i),children:n})}function tO({value:n,onChange:i,placeholder:r="Search…",autoFocus:o,className:c}){const f=o??!0;return A.jsx("div",{className:un("px-3 py-1.5 border-b border-chatroom-border shrink-0",c),"data-vaul-no-drag":"",onPointerDown:d=>d.stopPropagation(),onClick:d=>{const m=d.currentTarget.querySelector("input");m==null||m.focus()},children:A.jsx("input",{type:"search",enterKeyHint:"search",value:n,onChange:d=>i(d.target.value),placeholder:r,autoFocus:f,"data-vaul-no-drag":"",onPointerDown:d=>d.stopPropagation(),className:"w-full bg-chatroom-bg-tertiary border border-chatroom-border px-2 py-1 text-[11px] text-chatroom-text-primary placeholder:text-chatroom-text-muted focus:outline-none focus:border-chatroom-accent rounded-none"})})}const z0="min-w-[8rem] max-w-[14rem] border border-chatroom-border bg-chatroom-bg-secondary text-xs text-chatroom-text-primary px-2 py-1.5 h-[28px] cursor-pointer hover:border-chatroom-border-strong focus:outline-none focus:border-chatroom-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-between gap-1",k0="shrink-0 text-chatroom-text-muted";function nO(n){const[i,r]=O.useState(""),o=O.useCallback(c=>{c||r(""),n(c)},[n]);return{searchTerm:i,setSearchTerm:r,handleOpenChange:o}}const iO=[];function Lh(n){O.useEffect(n,iO)}const Oo=0;class ei{constructor(){tt(this,"currentId",Oo);tt(this,"clear",()=>{this.currentId!==Oo&&(clearTimeout(this.currentId),this.currentId=Oo)});tt(this,"disposeEffect",()=>this.clear)}static create(){return new ei}start(i,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Oo,r()},i)}isStarted(){return this.currentId!==Oo}}function Ea(){const n=Qi(ei.create).current;return Lh(n.disposeEffect),n}function sO(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:rO,platform:aO,maxTouchPoints:oO}=sO(),iu=rO.toLowerCase(),ko=aO.toLowerCase(),su=/^i(os$|p)/.test(ko)||ko==="macintel"&&oO>1,Ab="android",ch=ko===Ab||iu.includes(Ab),lO=!su&&ko.startsWith("mac");ko.startsWith("win");const cO=lO||su;var Cv;const Aa=typeof CSS<"u"&&!!((Cv=CSS.supports)!=null&&Cv.call(CSS,"-webkit-backdrop-filter:none"));!Aa&&iu.includes("firefox");!Aa&&iu.includes("chrom");const uO=cO,fO=/jsdom|happydom/.test(iu);function dO(n){n.preventDefault(),n.stopPropagation()}function hO(n){return"nativeEvent"in n}function mO(n){return n.pointerType===""&&n.isTrusted?!0:ch&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function pO(n){return fO?!1:!ch&&n.width===0&&n.height===0||ch&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function jo(n,i){const r=["mouse","pen"];return i||r.push("",void 0),r.includes(n)}function gO(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}const uh="data-base-ui-focusable",j0="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ui(n){var r;let i=n.activeElement;for(;((r=i==null?void 0:i.shadowRoot)==null?void 0:r.activeElement)!=null;)i=i.shadowRoot.activeElement;return i}function Me(n,i){var o;if(!n||!i)return!1;const r=(o=i.getRootNode)==null?void 0:o.call(i);if(n.contains(i))return!0;if(r&&xa(r)){let c=i;for(;c;){if(n===c)return!0;c=c.parentNode||c.host}}return!1}function $n(n){return"composedPath"in n?n.composedPath()[0]:n.target}function U0(n,i){if(!Je(n))return!1;const r=n;if(i.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,o]of i.entries())if(Me(o,r))return!o.hasAttribute("data-trigger-disabled");return!1}function Dd(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const r=n;return r.target!=null&&i.contains(r.target)}function yO(n){return n.matches("html,body")}function Bh(n){return Rt(n)&&n.matches(j0)}function bO(n){return(n==null?void 0:n.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${j0}`))!=null}function _b(n){return n?n.getAttribute("role")==="combobox"&&Bh(n):!1}function Mb(n){return n?n.hasAttribute(uh)?n:n.querySelector(`[${uh}]`)||n:null}function vO(n,i){return i!=null&&!jo(i)?0:typeof n=="function"?n():n}function fh(n,i,r){const o=vO(n,r);return typeof o=="number"?o:o==null?void 0:o[i]}function Nb(n){return typeof n=="function"?n():n}function L0(n,i){return i||n==="click"||n==="mousedown"}function SO(n){return(n==null?void 0:n.includes("mouse"))&&n!=="mousedown"}const xO="none",Uo="trigger-press",xn="trigger-hover",B0="outside-press",EO="close-press",Lo="focus-out",H0="escape-key",TO="imperative-action";function Xt(n,i,r,o){let c=!1,f=!1;const d=Wt;return{reason:n,event:i??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:r,...d}}function Ke(n,i,r,o){return n.addEventListener(i,r,o),()=>{n.removeEventListener(i,r,o)}}function qi(...n){return()=>{for(let i=0;i<n.length;i+=1){const r=n[i];r&&r()}}}function En(n){const i=Qi(wO,n).current;return i.next=n,Xe(i.effect),i}function wO(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}const Sc=null;class RO{constructor(){tt(this,"callbacks",[]);tt(this,"callbacksCount",0);tt(this,"nextId",1);tt(this,"startId",1);tt(this,"isScheduled",!1);tt(this,"tick",i=>{var c;this.isScheduled=!1;const r=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let f=0;f<r.length;f+=1)(c=r[f])==null||c.call(r,i)})}request(i){const r=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(i){const r=i-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const xc=new RO;class di{constructor(){tt(this,"currentId",Sc);tt(this,"cancel",()=>{this.currentId!==Sc&&(xc.cancel(this.currentId),this.currentId=Sc)});tt(this,"disposeEffect",()=>this.cancel)}static create(){return new di}static request(i){return xc.request(i)}static cancel(i){return xc.cancel(i)}request(i){this.cancel(),this.currentId=xc.request(()=>{this.currentId=Sc,i()})}}function Hh(){const n=Qi(di.create).current;return Lh(n.disposeEffect),n}function ut(n){return(n==null?void 0:n.ownerDocument)||document}const OO={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},CO={...OO,position:"fixed",top:0,left:0},Ta=O.forwardRef(function(i,r){const[o,c]=O.useState();Xe(()=>{uO&&Aa&&c("button")},[]);const f={tabIndex:0,role:o};return A.jsx("span",{...i,ref:r,style:CO,"aria-hidden":o?void 0:!0,...f,"data-base-ui-focus-guard":""})}),AO=["top","right","bottom","left"],wa=Math.min,Yi=Math.max,Gc=Math.round,Ec=Math.floor,Vi=n=>({x:n,y:n}),_O={left:"right",right:"left",bottom:"top",top:"bottom"};function q0(n,i,r){return Yi(n,wa(i,r))}function Gi(n,i){return typeof n=="function"?n(i):n}function Dn(n){return n.split("-")[0]}function Ds(n){return n.split("-")[1]}function qh(n){return n==="x"?"y":"x"}function Yh(n){return n==="y"?"height":"width"}function Fn(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function Vh(n){return qh(Fn(n))}function MO(n,i,r){r===void 0&&(r=!1);const o=Ds(n),c=Vh(n),f=Yh(c);let d=c==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Qc(d)),[d,Qc(d)]}function NO(n){const i=Qc(n);return[dh(n),i,dh(i)]}function dh(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Db=["left","right"],zb=["right","left"],DO=["top","bottom"],zO=["bottom","top"];function kO(n,i,r){switch(n){case"top":case"bottom":return r?i?zb:Db:i?Db:zb;case"left":case"right":return i?DO:zO;default:return[]}}function jO(n,i,r,o){const c=Ds(n);let f=kO(Dn(n),r==="start",o);return c&&(f=f.map(d=>d+"-"+c),i&&(f=f.concat(f.map(dh)))),f}function Qc(n){const i=Dn(n);return _O[i]+n.slice(i.length)}function UO(n){var i,r,o,c;return{top:(i=n.top)!=null?i:0,right:(r=n.right)!=null?r:0,bottom:(o=n.bottom)!=null?o:0,left:(c=n.left)!=null?c:0}}function Y0(n){return typeof n!="number"?UO(n):{top:n,right:n,bottom:n,left:n}}function Xc(n){const{x:i,y:r,width:o,height:c}=n;return{width:o,height:c,top:r,left:i,right:i+o,bottom:r+c,x:i,y:r}}function LO(n){return n.visibility==="hidden"||n.visibility==="collapse"}function V0(n,i=n?zn(n):null){return!n||!n.isConnected||!i||LO(i)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():i.display!=="none"&&i.display!=="contents"}const BO='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function HO(n){const i=n.assignedSlot;if(i)return i;if(n.parentElement)return n.parentElement;const r=n.getRootNode();return xa(r)?r.host:null}function hh(n){for(const i of Array.from(n.children))if($t(i)==="summary")return i;return null}function qO(n,i){const r=hh(i);return!!r&&(n===r||Me(r,n))}function G0(n){const i=n?$t(n):"";return n!=null&&n.matches(BO)&&(i!=="summary"||n.parentElement!=null&&$t(n.parentElement)==="details"&&hh(n.parentElement)===n)&&(i!=="details"||hh(n)==null)&&(i!=="input"||n.type!=="hidden")}function Q0(n){if(!G0(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let i=n;i;i=HO(i)){const r=i!==n,o=$t(i)==="slot";if(i.hasAttribute("inert")||r&&$t(i)==="details"&&!i.open&&!qO(n,i)||i.hasAttribute("hidden")||!o&&!YO(i,r))return!1}return!0}function YO(n,i){const r=zn(n);return i?r.display!=="none":V0(n,r)}function X0(n){const i=n.tabIndex;if(i<0){const r=$t(n);if(r==="details"||r==="audio"||r==="video"||Rt(n)&&n.isContentEditable)return 0}return i}function zd(n){if($t(n)!=="input")return null;const i=n;return i.type==="radio"&&i.name!==""?i:null}function VO(n,i){const r=zd(n);if(!r)return!0;const o=i.find(c=>{const f=zd(c);return(f==null?void 0:f.name)===r.name&&f.form===r.form&&f.checked});return o?o===r:i.find(c=>{const f=zd(c);return(f==null?void 0:f.name)===r.name&&f.form===r.form})===r}function F0(n){if(Rt(n)&&$t(n)==="slot"){const i=n.assignedElements({flatten:!0});if(i.length>0)return i}return Rt(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function K0(n,i){F0(n).forEach(r=>{G0(r)&&i.push(r),K0(r,i)})}function Z0(n,i,r){F0(n).forEach(o=>{Rt(o)&&o.matches(i)&&r.push(o),Z0(o,i,r)})}function Gh(n){return Q0(n)&&X0(n)>=0}function P0(n){const i=[];return K0(n,i),i.filter(Q0)}function Zo(n){const i=P0(n);return i.filter(r=>X0(r)>=0&&VO(r,i))}function I0(n,i){const r=Zo(n),o=r.length;if(o===0)return;const c=Ui(ut(n)),f=r.indexOf(c),d=f===-1?i===1?0:o-1:f+i;return r[d]}function Qh(n){return I0(ut(n).body,1)||n}function J0(n){return I0(ut(n).body,-1)||n}function W0(n,i){if(!n)return null;const r=Zo(ut(n).body),o=r.length;if(o===0)return null;const c=r.indexOf(n);if(c===-1)return null;const f=(c+i+o)%o;return r[f]}function GO(n){return W0(n,1)}function QO(n){return W0(n,-1)}function ra(n,i){const r=i||n.currentTarget,o=n.relatedTarget;return!o||!Me(r,o)}function XO(n){Zo(n).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function kb(n){const i=[];Z0(n,"[data-tabindex]",i),i.forEach(r=>{const o=r.dataset.tabindex;delete r.dataset.tabindex,o?r.setAttribute("tabindex",o):r.removeAttribute("tabindex")})}function _s(n,i,r=!0){return n.filter(c=>c.parentId===i).flatMap(c=>{var f;return[...!r||(f=c.context)!=null&&f.open?[c]:[],..._s(n,c.id,r)]})}function jb(n,i){var c;let r=[],o=(c=n.find(f=>f.id===i))==null?void 0:c.parentId;for(;o;){const f=n.find(d=>d.id===o);o=f==null?void 0:f.parentId,f&&(r=r.concat(f))}return r}function Fc(n){return`data-base-ui-${n}`}let Tc=0;function kd(n,i={}){const{preventScroll:r=!1,sync:o=!1,shouldFocus:c}=i;cancelAnimationFrame(Tc);function f(){c&&!c()||n==null||n.focus({preventScroll:r})}if(o)return f(),Rh;const d=requestAnimationFrame(f);return Tc=d,()=>{Tc===d&&(cancelAnimationFrame(d),Tc=0)}}const jd={inert:new WeakMap,"aria-hidden":new WeakMap},Ub="data-base-ui-inert",mh={inert:new WeakSet,"aria-hidden":new WeakSet};let Co=new WeakMap,Ud=0;function FO(n){return mh[n]}function $0(n){return n?xa(n)?n.host:$0(n.parentNode):null}const Lb=(n,i)=>i.map(r=>{if(n.contains(r))return r;const o=$0(r);return n.contains(o)?o:null}).filter(r=>r!=null),Bb=n=>{const i=new Set;return n.forEach(r=>{let o=r;for(;o&&!i.has(o);)i.add(o),o=o.parentNode}),i},Hb=(n,i,r)=>{const o=[],c=f=>{!f||r.has(f)||Array.from(f.children).forEach(d=>{$t(d)!=="script"&&(i.has(d)?c(d):o.push(d))})};return c(n),o};function KO(n,i,r,o,{mark:c=!0}){let f=null;o?f="inert":r&&(f="aria-hidden");let d=null,m=null;const g=Lb(i,n),p=c?Hb(i,Bb(g),new Set(g)):[],y=[],v=[];if(f){const S=jd[f],E=FO(f);m=E,d=S;const x=Lb(i,Array.from(i.querySelectorAll("[aria-live]"))),w=g.concat(x);Hb(i,Bb(w),new Set(w)).forEach(D=>{const C=D.getAttribute(f),j=C!==null&&C!=="false",k=(S.get(D)||0)+1;S.set(D,k),y.push(D),k===1&&j&&E.add(D),j||D.setAttribute(f,f==="inert"?"":"true")})}return c&&p.forEach(S=>{const E=(Co.get(S)||0)+1;Co.set(S,E),v.push(S),E===1&&S.setAttribute(Ub,"")}),Ud+=1,()=>{d&&y.forEach(S=>{const x=(d.get(S)||0)-1;d.set(S,x),x||(!(m!=null&&m.has(S))&&f&&S.removeAttribute(f),m==null||m.delete(S))}),c&&v.forEach(S=>{const E=(Co.get(S)||0)-1;Co.set(S,E),E||S.removeAttribute(Ub)}),Ud-=1,Ud||(jd.inert=new WeakMap,jd["aria-hidden"]=new WeakMap,mh.inert=new WeakSet,mh["aria-hidden"]=new WeakSet,Co=new WeakMap)}}function qb(n,i={}){const{ariaHidden:r=!1,inert:o=!1,mark:c=!0}=i,f=ut(n[0]).body;return KO(n,f,r,o,{mark:c})}var Ms=qv();let Yb=0;function ZO(n,i="mui"){const[r,o]=O.useState(n),c=n||r;return O.useEffect(()=>{r==null&&(Yb+=1,o(`${i}-${Yb}`))},[r,i]),c}const Vb=Uh.useId;function Po(n,i){if(Vb!==void 0){const r=Vb();return n??(i?`${i}-${r}`:r)}return ZO(n,i)}const PO=500,IO={style:{transition:"none"}},eS="data-base-ui-click-trigger",JO={fallbackAxisSide:"end"},WO={clipPath:"inset(50%)",position:"fixed",top:0,left:0},tS=O.createContext(null),nS=()=>O.useContext(tS),$O=Fc("portal");function eC(n={}){const{ref:i,container:r,componentProps:o=Wt,elementProps:c}=n,f=Po(),d=nS(),m=d==null?void 0:d.portalNode,[g,p]=O.useState(null),[y,v]=O.useState(null),S=$e(_=>{_!==null&&v(_)}),E=O.useRef(null);Xe(()=>{if(r===null){E.current&&(E.current=null,v(null),p(null));return}if(f==null)return;const _=(r&&(zh(r)?r:r.current))??m??document.body;if(_==null){E.current&&(E.current=null,v(null),p(null));return}E.current!==_&&(E.current=_,v(null),p(_))},[r,m,f]);const x=Ra("div",o,{ref:[i,S],props:[{id:f,[$O]:""},c]});return{portalNode:y,portalSubtree:g&&x?Ms.createPortal(x,g):null}}const tC=O.forwardRef(function(i,r){const{render:o,className:c,style:f,children:d,container:m,renderGuards:g,...p}=i,{portalNode:y,portalSubtree:v}=eC({container:m,ref:r,componentProps:i,elementProps:p}),S=O.useRef(null),E=O.useRef(null),x=O.useRef(null),w=O.useRef(null),[_,D]=O.useState(null),C=O.useRef(!1),j=_==null?void 0:_.modal,k=_==null?void 0:_.open,q=typeof g=="boolean"?g:!!_&&!_.modal&&_.open&&!!y;O.useEffect(()=>{if(!y||j)return;function B(U){y&&U.relatedTarget&&ra(U)&&(U.type==="focusin"?C.current&&(kb(y),C.current=!1):(XO(y),C.current=!0))}return qi(Ke(y,"focusin",B,!0),Ke(y,"focusout",B,!0))},[y,j]),Xe(()=>{!y||k!==!0||!C.current||(kb(y),C.current=!1)},[k,y]);const F=O.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:E,beforeInsideRef:x,afterInsideRef:w,portalNode:y,setFocusManagerState:D}),[y]);return A.jsxs(O.Fragment,{children:[v,A.jsxs(tS.Provider,{value:F,children:[q&&y&&A.jsx(Ta,{"data-type":"outside",ref:S,onFocus:B=>{var U;if(ra(B,y))(U=x.current)==null||U.focus();else{const K=_?_.domReference:null,se=J0(K);se==null||se.focus()}}}),q&&y&&A.jsx("span",{"aria-owns":y.id,style:WO}),y&&Ms.createPortal(d,y),q&&y&&A.jsx(Ta,{"data-type":"outside",ref:E,onFocus:B=>{var U;if(ra(B,y))(U=w.current)==null||U.focus();else{const K=_?_.domReference:null,se=Qh(K);se==null||se.focus(),_!=null&&_.closeOnFocusOut&&(_==null||_.onOpenChange(!1,Xt(Lo,B.nativeEvent)))}}})]})]})});function iS(){const n=new Map;return{emit(i,r){var o;(o=n.get(i))==null||o.forEach(c=>c(r))},on(i,r){n.has(i)||n.set(i,new Set),n.get(i).add(r)},off(i,r){var o;(o=n.get(i))==null||o.delete(r)}}}class nC{constructor(){tt(this,"nodesRef",{current:[]});tt(this,"events",iS())}addNode(i){this.nodesRef.current.push(i)}removeNode(i){const r=this.nodesRef.current.findIndex(o=>o===i);r!==-1&&this.nodesRef.current.splice(r,1)}}const sS=O.createContext(null),rS=O.createContext(null),_a=()=>{var n;return((n=O.useContext(sS))==null?void 0:n.id)||null},Ma=n=>{const i=O.useContext(rS);return n??i};function iC(n){const i=Po(),r=Ma(n),o=_a();return Xe(()=>{if(!i)return;const c={id:i,parentId:o};return r==null||r.addNode(c),()=>{r==null||r.removeNode(c)}},[r,i,o]),i}function sC(n){const{children:i,id:r}=n,o=_a();return A.jsx(sS.Provider,{value:O.useMemo(()=>({id:r,parentId:o}),[r,o]),children:i})}function rC(n){const{children:i,externalTree:r}=n,o=Qi(()=>r??new nC).current;return A.jsx(rS.Provider,{value:o,children:i})}function Li(n){return n==null?n:"current"in n?n.current:n}function aC(n,i){const r=kt($n(n));return n instanceof r.KeyboardEvent?"keyboard":n instanceof r.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof r.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const oC=20;let Rs=[];function Xh(){Rs=Rs.filter(n=>{var i;return(i=n.deref())==null?void 0:i.isConnected})}function Gb(n){Xh(),n&&$t(n)!=="body"&&(Rs.push(new WeakRef(n)),Rs.length>oC&&(Rs=Rs.slice(-20)))}function Qb(){var n;return Xh(),(n=Rs[Rs.length-1])==null?void 0:n.deref()}function lC(n){return n?Gh(n)?n:Zo(n)[0]||n:null}function Xb(n){var c;if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!((c=n.getAttribute("role"))!=null&&c.includes("dialog")))return;const r=P0(n).filter(f=>{const d=f.getAttribute("data-tabindex")||"";return Gh(f)||f.hasAttribute("data-tabindex")&&!d.startsWith("-")}),o=n.getAttribute("tabindex");r.length===0?o!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(o!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function cC(n){const{context:i,children:r,disabled:o=!1,initialFocus:c=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:g=!0,openInteractionType:p="",nextFocusableElement:y,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:E,getInsideElements:x}=n,w="rootStore"in i?i.rootStore:i,_=w.useState("open"),D=w.useState("domReferenceElement"),C=w.useState("floatingElement"),{events:j,dataRef:k}=w.context,q=$e(()=>{var ve;return(ve=k.current.floatingContext)==null?void 0:ve.nodeId}),F=c===!1,B=_b(D)&&F,U=En(c),K=En(f),se=En(p),pe=En(_),ae=Ma(E),W=nS(),le=O.useRef(!1),ie=O.useRef(!1),N=O.useRef(!1),Q=O.useRef(null),I=O.useRef(""),oe=O.useRef(""),Y=O.useRef(null),T=O.useRef(null),H=Hc(Y,S,W==null?void 0:W.beforeInsideRef),te=Hc(T,W==null?void 0:W.afterInsideRef),ne=Ea(),re=Ea(),ee=Hh(),ge=W!=null,ce=Mb(C),fe=$e((ve=ce)=>ve?Zo(ve):[]),Ze=$e(()=>(x==null?void 0:x().filter(ve=>ve!=null))??[]);O.useEffect(()=>{if(o||!m)return;function ve(Oe){Oe.key==="Tab"&&Me(ce,Ui(ut(ce)))&&fe().length===0&&!B&&dO(Oe)}const ze=ut(ce);return Ke(ze,"keydown",ve)},[o,ce,m,B,fe]),O.useEffect(()=>{if(o||!_)return;const ve=ut(ce);function ze(){N.current=!1}function Oe(vt){const Re=$n(vt),ke=Ze(),Ee=Me(C,Re)||Me(D,Re)||Me(W==null?void 0:W.portalNode,Re)||ke.some(mt=>mt===Re||Me(mt,Re));N.current=!Ee,oe.current=vt.pointerType||"keyboard",Re!=null&&Re.closest(`[${eS}]`)&&(ie.current=!0,re.start(0,()=>{ie.current=!1}))}function ft(){oe.current="keyboard"}return qi(Ke(ve,"pointerdown",Oe,!0),Ke(ve,"pointerup",ze,!0),Ke(ve,"pointercancel",ze,!0),Ke(ve,"keydown",ft,!0),ze)},[o,C,D,ce,_,W,re,Ze]),O.useEffect(()=>{if(o||!g)return;const ve=ut(ce);function ze(){ie.current=!0,re.start(0,()=>{ie.current=!1})}function Oe(ke){const Ee=$n(ke);Gh(Ee)&&(Q.current=Ee)}function ft(ke){const Ee=ke.relatedTarget,mt=ke.currentTarget,dt=$n(ke);m&&Ee==null&&dt!=null&&Me(C,dt)&&Gb(dt),queueMicrotask(()=>{const je=q(),xt=w.context.triggerElements,ue=Ze(),xe=(Ee==null?void 0:Ee.hasAttribute(Fc("focus-guard")))&&[Y.current,T.current,W==null?void 0:W.beforeInsideRef.current,W==null?void 0:W.afterInsideRef.current,W==null?void 0:W.beforeOutsideRef.current,W==null?void 0:W.afterOutsideRef.current,Li(v),Li(y)].includes(Ee),ht=!(Me(D,Ee)||Me(C,Ee)||Me(Ee,C)||Me(W==null?void 0:W.portalNode,Ee)||ue.some(Be=>Be===Ee||Me(Be,Ee))||Ee!=null&&xt.hasElement(Ee)||xt.hasMatchingElement(Be=>Me(Be,Ee))||xe||ae&&(_s(ae.nodesRef.current,je).find(Be=>{var pt,jt;return Me((pt=Be.context)==null?void 0:pt.elements.floating,Ee)||Me((jt=Be.context)==null?void 0:jt.elements.domReference,Ee)})||jb(ae.nodesRef.current,je).find(Be=>{var pt,jt,sn;return[(pt=Be.context)==null?void 0:pt.elements.floating,Mb((jt=Be.context)==null?void 0:jt.elements.floating)].includes(Ee)||((sn=Be.context)==null?void 0:sn.elements.domReference)===Ee})));if(mt===D&&ce&&Xb(ce),d&&mt!==D&&!V0(dt)&&Ui(ve)===ve.body){if(Rt(ce)&&(ce.focus(),d==="popup")){ee.request(()=>{ce.focus()});return}const Be=fe(),pt=Q.current,jt=(pt&&Be.includes(pt)?pt:null)||Be[Be.length-1]||ce;Rt(jt)&&jt.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(B||!m)&&Ee&&ht&&!ie.current&&(B||Ee!==Qb())&&(le.current=!0,w.setOpen(!1,Xt(Lo,ke)))})}function vt(){N.current||(k.current.insideReactTree=!0,ne.start(0,()=>{k.current.insideReactTree=!1}))}const Re=Rt(D)?D:null;if(!(!C&&!Re))return qi(Re&&Ke(Re,"focusout",ft),Re&&Ke(Re,"pointerdown",ze),C&&Ke(C,"focusin",Oe),C&&Ke(C,"focusout",ft),C&&W&&Ke(C,"focusout",vt,!0))},[o,D,C,ce,m,ae,W,w,g,d,fe,B,q,k,ne,re,ee,y,v,Ze]),O.useEffect(()=>{var mt,dt,je;if(o||!C||!_)return;const ve=Array.from(((mt=W==null?void 0:W.portalNode)==null?void 0:mt.querySelectorAll(`[${Fc("portal")}]`))||[]),Oe=(je=(dt=(ae?jb(ae.nodesRef.current,q()):[]).find(xt=>{var ue;return _b(((ue=xt.context)==null?void 0:ue.elements.domReference)||null)}))==null?void 0:dt.context)==null?void 0:je.elements.domReference,vt=[...[C,...ve,Y.current,T.current,W==null?void 0:W.beforeOutsideRef.current,W==null?void 0:W.afterOutsideRef.current,...Ze()],Oe,Li(v),Li(y),B?D:null].filter(xt=>xt!=null),Re=qb(vt,{ariaHidden:m||B,mark:!1}),ke=[C,...ve].filter(xt=>xt!=null),Ee=qb(ke);return()=>{Ee(),Re()}},[_,o,D,C,m,W,B,ae,q,y,v,Ze]),Xe(()=>{if(!_||o||!Rt(ce))return;const ve=ut(ce),ze=Ui(ve);queueMicrotask(()=>{const Oe=U.current,ft=typeof Oe=="function"?Oe(se.current||""):Oe;if(ft===void 0||ft===!1||Me(ce,ze))return;let Re=null;const ke=()=>(Re==null&&(Re=fe(ce)),Re[0]||ce);let Ee;ft===!0||ft===null?Ee=ke():Ee=Li(ft),Ee=Ee||ke();const mt=Me(ce,Ui(ve));kd(Ee,{preventScroll:Ee===ce,shouldFocus(){if(!pe.current)return!1;if(mt)return!0;const dt=Ui(ve);return!(dt!==Ee&&Me(ce,dt))}})})},[o,_,ce,fe,U,se,pe]),Xe(()=>{if(o||!ce)return;const ve=ut(ce),ze=Ui(ve),Oe=se.current==null;Gb(ze);function ft(Re){if(Re.open||(I.current=aC(Re.nativeEvent,oe.current)),Re.reason===xn&&Re.nativeEvent.type==="mouseleave"&&(le.current=!0),Re.reason===B0)if(Re.nested)le.current=!1;else if(mO(Re.nativeEvent)||pO(Re.nativeEvent))le.current=!1;else{let ke=!1;ut(ce).createElement("div").focus({get preventScroll(){return ke=!0,!1}}),ke?le.current=!1:le.current=!0}}j.on("openchange",ft);function vt(){const Re=K.current;let ke=typeof Re=="function"?Re(I.current):Re;if(ke===void 0||ke===!1)return null;ke===null&&(ke=!0);const Ee=D!=null&&D.isConnected?D:null,mt=ze!=null&&ze.isConnected&&$t(ze)!=="body"?ze:null;let dt=Oe?mt||Ee:Ee||mt;return dt||(dt=Qb()||null),typeof ke=="boolean"?dt:Li(ke)||dt||null}return()=>{j.off("openchange",ft);const Re=Ui(ve),ke=Ze(),Ee=Me(C,Re)||ke.some(je=>je===Re||Me(je,Re))||ae&&_s(ae.nodesRef.current,q(),!1).some(je=>{var xt;return Me((xt=je.context)==null?void 0:xt.elements.floating,Re)}),mt=K.current,dt=vt();queueMicrotask(()=>{const je=lC(dt),xt=typeof mt!="boolean";mt&&!le.current&&Rt(je)&&(!(!xt&&je!==Re&&Re!==ve.body)||Ee)&&je.focus({preventScroll:!0}),le.current=!1})}},[o,C,ce,K,se,j,ae,D,q,Ze]),Xe(()=>{if(!Aa||_||!C)return;const ve=Ui(ut(C));!Rt(ve)||!Bh(ve)||Me(C,ve)&&ve.blur()},[_,C]),Xe(()=>{if(!(o||!W))return W.setFocusManagerState({modal:m,closeOnFocusOut:g,open:_,onOpenChange:w.setOpen,domReference:D}),()=>{W.setFocusManagerState(null)}},[o,W,m,_,w,g,D]),Xe(()=>{if(!(o||!ce))return Xb(ce),()=>{queueMicrotask(Xh)}},[o,ce]);const nt=!o&&(m?!B:!0)&&(ge||m);return A.jsxs(O.Fragment,{children:[nt&&A.jsx(Ta,{"data-type":"inside",ref:H,onFocus:ve=>{var ze;if(m){const Oe=fe();kd(Oe[Oe.length-1])}else if(W!=null&&W.portalNode)if(le.current=!1,ra(ve,W.portalNode)){const Oe=Qh(D);Oe==null||Oe.focus()}else(ze=Li(v??W.beforeOutsideRef))==null||ze.focus()}}),r,nt&&A.jsx(Ta,{"data-type":"inside",ref:te,onFocus:ve=>{var ze;if(m)kd(fe()[0]);else if(W!=null&&W.portalNode)if(g&&(le.current=!0),ra(ve,W.portalNode)){const Oe=J0(D);Oe==null||Oe.focus()}else(ze=Li(y??W.afterOutsideRef))==null||ze.focus()}})]})}function uC(n,i={}){const{enabled:r=!0,event:o="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:g=Uo}=i,p="rootStore"in n?n.rootStore:n,y=p.context.dataRef,v=O.useRef(void 0),S=Hh(),E=Ea(),x=O.useMemo(()=>{function w(D,C,j,k){const q=Xt(g,C,j);D&&k==="touch"&&m>0?E.start(m,()=>{p.setOpen(!0,q)}):p.setOpen(D,q)}function _(D,C,j){const k=y.current.openEvent,q=p.select("domReferenceElement")!==C;return D&&q||!D||!c?!0:k&&d?!j(k.type):!1}return{onPointerDown(D){v.current=D.pointerType},onMouseDown(D){const C=v.current,j=D.nativeEvent,k=p.select("open");if(D.button!==0||o==="click"||jo(C,!0)&&f)return;const q=_(k,D.currentTarget,U=>U==="click"||U==="mousedown"),F=$n(j);if(Bh(F)){w(q,j,F,C);return}const B=D.currentTarget;S.request(()=>{w(q,j,B,C)})},onClick(D){if(o==="mousedown-only")return;const C=v.current;if(o==="mousedown"&&C){v.current=void 0;return}if(jo(C,!0)&&f)return;const j=p.select("open"),k=_(j,D.currentTarget,q=>q==="click"||q==="mousedown"||q==="keydown"||q==="keyup");w(k,D.nativeEvent,D.currentTarget,C)},onKeyDown(){v.current=void 0}}},[y,o,f,g,p,d,c,S,E,m]);return O.useMemo(()=>r?{reference:x}:Wt,[r,x])}function fC(){return!1}function dC(n){return{escapeKey:typeof n=="boolean"?n:(n==null?void 0:n.escapeKey)??!1,outsidePress:typeof n=="boolean"?n:(n==null?void 0:n.outsidePress)??!0}}function hC(n,i={}){const{enabled:r=!0,escapeKey:o=!0,outsidePress:c=!0,outsidePressEvent:f="sloppy",referencePress:d=fC,bubbles:m,externalTree:g}=i,p="rootStore"in n?n.rootStore:n,y=p.useState("open"),v=p.useState("floatingElement"),{dataRef:S}=p.context,E=Ma(g),x=$e(typeof c=="function"?c:()=>!1),w=typeof c=="function"?x:c,_=w!==!1,D=$e(()=>f),{escapeKey:C,outsidePress:j}=dC(m),k=O.useRef(!1),q=O.useRef(!1),F=O.useRef(!1),B=O.useRef(!1),U=O.useRef(""),K=O.useRef(null),se=Ea(),pe=Ea(),ae=$e(()=>{pe.clear(),S.current.insideReactTree=!1}),W=$e(H=>{var re;const te=(re=S.current.floatingContext)==null?void 0:re.nodeId;return(E?_s(E.nodesRef.current,te):[]).some(ee=>{var ge;return((ge=ee.context)==null?void 0:ge.open)&&!ee.context.dataRef.current[H]})}),le=$e(H=>Dd(H,p.select("floatingElement"))||Dd(H,p.select("domReferenceElement"))),ie=$e(H=>{d()&&p.setOpen(!1,Xt(Uo,H.nativeEvent))}),N=$e(H=>{if(!y||!r||!o||H.key!=="Escape"||B.current||!C&&W("__escapeKeyBubbles"))return;const te=hO(H)?H.nativeEvent:H,ne=Xt(H0,te);p.setOpen(!1,ne),ne.isCanceled||H.preventDefault(),!C&&!ne.isPropagationAllowed&&H.stopPropagation()}),Q=$e(()=>{S.current.insideReactTree=!0,pe.start(0,ae)}),I=$e(H=>{if(!y||!r||H.button!==0)return;const te=$n(H.nativeEvent);Me(p.select("floatingElement"),te)&&(k.current||(k.current=!0,q.current=!1))}),oe=$e(H=>{!y||!r||(H.defaultPrevented||H.nativeEvent.defaultPrevented)&&k.current&&(q.current=!0)});O.useEffect(()=>{if(!y||!r)return;S.current.__escapeKeyBubbles=C,S.current.__outsidePressBubbles=j;const H=new ei,te=new ei;function ne(){H.clear(),B.current=!0}function re(){H.start(Aa?5:0,()=>{B.current=!1})}function ee(){F.current=!0,te.start(0,()=>{F.current=!1})}function ge(){k.current=!1,q.current=!1}function ce(){const ue=U.current,xe=ue==="pen"||!ue?"mouse":ue,ht=D(),Be=typeof ht=="function"?ht():ht;return typeof Be=="string"?Be:Be[xe]}function fe(ue){const xe=ce();return xe==="intentional"&&ue.type!=="click"||xe==="sloppy"&&ue.type==="click"}function Ze(ue){var Be;const xe=(Be=S.current.floatingContext)==null?void 0:Be.nodeId,ht=E&&_s(E.nodesRef.current,xe).some(pt=>{var jt;return Dd(ue,(jt=pt.context)==null?void 0:jt.elements.floating)});return le(ue)||ht}function nt(ue){if(fe(ue)){ue.type!=="click"&&!le(ue)&&(te.clear(),F.current=!1),ae();return}if(S.current.insideReactTree){ae();return}const xe=$n(ue),ht=`[${Fc("inert")}]`,Be=Je(xe)?xe.getRootNode():null,pt=Array.from((xa(Be)?Be:ut(p.select("floatingElement"))).querySelectorAll(ht)),jt=p.context.triggerElements;if(xe&&(jt.hasElement(xe)||jt.hasMatchingElement(rn=>Me(rn,xe))))return;let sn=Je(xe)?xe:null;for(;sn&&!Cs(sn);){const rn=As(sn);if(Cs(rn)||!Je(rn))break;sn=rn}if(!(pt.length&&Je(xe)&&!yO(xe)&&!Me(xe,p.select("floatingElement"))&&pt.every(rn=>!Me(sn,rn)))){if(Rt(xe)&&!("touches"in ue)){const rn=Cs(xe),ti=zn(xe),fn=/auto|scroll/,qt=rn||fn.test(ti.overflowX),Tn=rn||fn.test(ti.overflowY),Yt=qt&&xe.clientWidth>0&&xe.scrollWidth>xe.clientWidth,mr=Tn&&xe.clientHeight>0&&xe.scrollHeight>xe.clientHeight,pr=ti.direction==="rtl",gr=mr&&(pr?ue.offsetX<=xe.offsetWidth-xe.clientWidth:ue.offsetX>xe.clientWidth),pi=Yt&&ue.offsetY>xe.clientHeight;if(gr||pi)return}if(!Ze(ue)){if(ce()==="intentional"&&F.current){te.clear(),F.current=!1;return}typeof w=="function"&&!w(ue)||W("__outsidePressBubbles")||(p.setOpen(!1,Xt(B0,ue)),ae())}}}function ve(ue){ce()!=="sloppy"||ue.pointerType==="touch"||!p.select("open")||!r||le(ue)||nt(ue)}function ze(ue){if(ce()!=="sloppy"||!p.select("open")||!r||le(ue))return;const xe=ue.touches[0];xe&&(K.current={startTime:Date.now(),startX:xe.clientX,startY:xe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},se.start(1e3,()=>{K.current&&(K.current.dismissOnTouchEnd=!1,K.current.dismissOnMouseDown=!1)}))}function Oe(ue,xe){const ht=$n(ue);if(!ht)return;const Be=Ke(ht,ue.type,()=>{xe(ue),Be()})}function ft(ue){U.current="touch",Oe(ue,ze)}function vt(ue){se.clear(),ue.type==="pointerdown"&&(U.current=ue.pointerType),!(ue.type==="mousedown"&&K.current&&!K.current.dismissOnMouseDown)&&Oe(ue,xe=>{xe.type==="pointerdown"?ve(xe):nt(xe)})}function Re(ue){if(!k.current)return;const xe=q.current;if(ge(),ce()==="intentional"){if(ue.type==="pointercancel"){xe&&ee();return}if(!Ze(ue)){if(xe){ee();return}typeof w=="function"&&!w(ue)||(te.clear(),F.current=!0,ae())}}}function ke(ue){if(ce()!=="sloppy"||!K.current||le(ue))return;const xe=ue.touches[0];if(!xe)return;const ht=Math.abs(xe.clientX-K.current.startX),Be=Math.abs(xe.clientY-K.current.startY),pt=Math.sqrt(ht*ht+Be*Be);pt>5&&(K.current.dismissOnTouchEnd=!0),pt>10&&(nt(ue),se.clear(),K.current=null)}function Ee(ue){Oe(ue,ke)}function mt(ue){ce()!=="sloppy"||!K.current||le(ue)||(K.current.dismissOnTouchEnd&&nt(ue),se.clear(),K.current=null)}function dt(ue){Oe(ue,mt)}const je=ut(v),xt=qi(o&&qi(Ke(je,"keydown",N),Ke(je,"compositionstart",ne),Ke(je,"compositionend",re)),_&&qi(Ke(je,"click",vt,!0),Ke(je,"pointerdown",vt,!0),Ke(je,"pointerup",Re,!0),Ke(je,"pointercancel",Re,!0),Ke(je,"mousedown",vt,!0),Ke(je,"mouseup",Re,!0),Ke(je,"touchstart",ft,!0),Ke(je,"touchmove",Ee,!0),Ke(je,"touchend",dt,!0)));return()=>{xt(),H.clear(),te.clear(),ge(),F.current=!1}},[S,v,o,_,w,y,r,C,j,N,ae,D,W,le,E,p,se]),O.useEffect(ae,[w,ae]);const Y=O.useMemo(()=>({onKeyDown:N,onPointerDown:ie,onClick:ie}),[N,ie]),T=O.useMemo(()=>({onKeyDown:N,onPointerDown:oe,onMouseDown:oe,onClickCapture:Q,onMouseDownCapture(H){Q(),I(H)},onPointerDownCapture(H){Q(),I(H)},onMouseUpCapture:Q,onTouchEndCapture:Q,onTouchMoveCapture:Q}),[N,Q,I,oe]);return O.useMemo(()=>r?{reference:Y,floating:T,trigger:Y}:{},[r,Y,T])}function Fb(n,i,r){let{reference:o,floating:c}=n;const f=Fn(i),d=Vh(i),m=Yh(d),g=Dn(i),p=f==="y",y=o.x+o.width/2-c.width/2,v=o.y+o.height/2-c.height/2,S=o[m]/2-c[m]/2;let E;switch(g){case"top":E={x:y,y:o.y-c.height};break;case"bottom":E={x:y,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:v};break;case"left":E={x:o.x-c.width,y:v};break;default:E={x:o.x,y:o.y}}const x=Ds(i);return x&&(E[d]+=S*(x==="end"?1:-1)*(r&&p?-1:1)),E}async function mC(n,i){var r;i===void 0&&(i={});const{x:o,y:c,platform:f,rects:d,elements:m,strategy:g}=n,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:S=!1,padding:E=0}=Gi(i,n),x=Y0(E),_=m[S?v==="floating"?"reference":"floating":v],D=Xc(await f.getClippingRect({element:(r=await(f.isElement==null?void 0:f.isElement(_)))==null||r?_:_.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:p,rootBoundary:y,strategy:g})),C=v==="floating"?{x:o,y:c,width:d.floating.width,height:d.floating.height}:d.reference,j=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),k=await(f.isElement==null?void 0:f.isElement(j))&&await(f.getScale==null?void 0:f.getScale(j))||{x:1,y:1},q=Xc(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:C,offsetParent:j,strategy:g}):C);return{top:(D.top-q.top+x.top)/k.y,bottom:(q.bottom-D.bottom+x.bottom)/k.y,left:(D.left-q.left+x.left)/k.x,right:(q.right-D.right+x.right)/k.x}}const pC=50,gC=async(n,i,r)=>{const{placement:o="bottom",strategy:c="absolute",middleware:f=[],platform:d}=r,m=d.detectOverflow?d:{...d,detectOverflow:mC},g=await(d.isRTL==null?void 0:d.isRTL(i));let p=await d.getElementRects({reference:n,floating:i,strategy:c}),{x:y,y:v}=Fb(p,o,g),S=o,E=0;const x={};for(let w=0;w<f.length;w++){const _=f[w];if(!_)continue;const{name:D,fn:C}=_,{x:j,y:k,data:q,reset:F}=await C({x:y,y:v,initialPlacement:o,placement:S,strategy:c,middlewareData:x,rects:p,platform:m,elements:{reference:n,floating:i}});y=j??y,v=k??v,x[D]={...x[D],...q},F&&E<pC&&(E++,typeof F=="object"&&(F.placement&&(S=F.placement),F.rects&&(p=F.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:c}):F.rects),{x:y,y:v}=Fb(p,S,g)),w=-1)}return{x:y,y:v,placement:S,strategy:c,middlewareData:x}},yC=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var r,o;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:g,elements:p}=i,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,..._}=Gi(n,i);if((r=f.arrow)!=null&&r.alignmentOffset)return{};const D=Dn(c),C=Fn(m),j=Dn(m)===m,k=await(g.isRTL==null?void 0:g.isRTL(p.floating)),q=S||(j||!w?[Qc(m)]:NO(m)),F=x!=="none";!S&&F&&q.push(...jO(m,w,x,k));const B=[m,...q],U=await g.detectOverflow(i,_),K=[];let se=((o=f.flip)==null?void 0:o.overflows)||[];if(y&&K.push(U[D]),v){const le=MO(c,d,k);K.push(U[le[0]],U[le[1]])}if(se=[...se,{placement:c,overflows:K}],!K.every(le=>le<=0)){var pe,ae;const le=(((pe=f.flip)==null?void 0:pe.index)||0)+1,ie=B[le];if(ie&&(!(v==="alignment"?C!==Fn(ie):!1)||se.every(I=>Fn(I.placement)===C?I.overflows[0]>0:!0)))return{data:{index:le,overflows:se},reset:{placement:ie}};let N=(ae=se.filter(Q=>Q.overflows[0]<=0).sort((Q,I)=>Q.overflows[1]-I.overflows[1])[0])==null?void 0:ae.placement;if(!N)switch(E){case"bestFit":{var W;const Q=(W=se.filter(I=>{if(F){const oe=Fn(I.placement);return oe===C||oe==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(oe=>oe>0).reduce((oe,Y)=>oe+Y,0)]).sort((I,oe)=>I[1]-oe[1])[0])==null?void 0:W[0];Q&&(N=Q);break}case"initialPlacement":N=m;break}if(c!==N)return{reset:{placement:N}}}return{}}}};function Kb(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function Zb(n){return AO.some(i=>n[i]>=0)}const bC=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){const{rects:r,platform:o}=i,{strategy:c="referenceHidden",...f}=Gi(n,i);switch(c){case"referenceHidden":{const d=await o.detectOverflow(i,{...f,elementContext:"reference"}),m=Kb(d,r.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Zb(m)}}}case"escaped":{const d=await o.detectOverflow(i,{...f,altBoundary:!0}),m=Kb(d,r.floating);return{data:{escapedOffsets:m,escaped:Zb(m)}}}default:return{}}}}},aS=new Set(["left","top"]);async function vC(n,i){const{placement:r,platform:o,elements:c}=n,f=await(o.isRTL==null?void 0:o.isRTL(c.floating)),d=Dn(r),m=Ds(r),g=Fn(r)==="y",p=aS.has(d)?-1:1,y=f&&g?-1:1,v=Gi(i,n);let{mainAxis:S,crossAxis:E,alignmentAxis:x}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return m&&typeof x=="number"&&(E=m==="end"?x*-1:x),g?{x:E*y,y:S*p}:{x:S*p,y:E*y}}const SC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var r,o;const{x:c,y:f,placement:d,middlewareData:m}=i,g=await vC(i,n);return d===((r=m.offset)==null?void 0:r.placement)&&(o=m.arrow)!=null&&o.alignmentOffset?{}:{x:c+g.x,y:f+g.y,data:{...g,placement:d}}}}},xC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:r,y:o,placement:c,platform:f}=i,{mainAxis:d=!0,crossAxis:m=!1,limiter:g={fn:C=>{let{x:j,y:k}=C;return{x:j,y:k}}},...p}=Gi(n,i),y={x:r,y:o},v=await f.detectOverflow(i,p),S=Fn(c),E=qh(S);let x=y[E],w=y[S];const _=(C,j)=>q0(j+v[C==="y"?"top":"left"],j,j-v[C==="y"?"bottom":"right"]);d&&(x=_(E,x)),m&&(w=_(S,w));const D=g.fn({...i,[E]:x,[S]:w});return{...D,data:{x:D.x-r,y:D.y-o,enabled:{[E]:d,[S]:m}}}}}},EC=function(n){return n===void 0&&(n={}),{options:n,fn(i){var r,o;const{x:c,y:f,placement:d,rects:m,middlewareData:g}=i,{offset:p=0,mainAxis:y=!0,crossAxis:v=!0}=Gi(n,i),S={x:c,y:f},E=Fn(d),x=qh(E);let w=S[x],_=S[E];const D=Gi(p,i),C=typeof D=="number"?{mainAxis:D,crossAxis:0}:{mainAxis:(r=D.mainAxis)!=null?r:0,crossAxis:(o=D.crossAxis)!=null?o:0};if(y){const q=x==="y"?"height":"width",F=m.reference[x]-m.floating[q]+C.mainAxis,B=m.reference[x]+m.reference[q]-C.mainAxis;w<F?w=F:w>B&&(w=B)}if(v){var j,k;const q=x==="y"?"width":"height",F=aS.has(Dn(d)),B=m.reference[E]-m.floating[q]+(F&&((j=g.offset)==null?void 0:j[E])||0)+(F?0:C.crossAxis),U=m.reference[E]+m.reference[q]+(F?0:((k=g.offset)==null?void 0:k[E])||0)-(F?C.crossAxis:0);_<B?_=B:_>U&&(_=U)}return{[x]:w,[E]:_}}}},TC=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:r,rects:o,platform:c,elements:f}=i,{apply:d=()=>{},...m}=Gi(n,i),g=await c.detectOverflow(i,m),p=Dn(r),y=Ds(r),v=Fn(r)==="y",{width:S,height:E}=o.floating;let x,w;p==="top"||p==="bottom"?(x=p,w=y===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(w=p,x=y==="end"?"top":"bottom");const _=E-g.top-g.bottom,D=S-g.left-g.right,C=wa(E-g[x],_),j=wa(S-g[w],D),k=i.middlewareData.shift,q=!k;let F=C,B=j;k!=null&&k.enabled.x&&(B=D),k!=null&&k.enabled.y&&(F=_),q&&!y&&(v?B=S-2*Yi(g.left,g.right):F=E-2*Yi(g.top,g.bottom)),await d({...i,availableWidth:B,availableHeight:F});const U=await c.getDimensions(f.floating);return S!==U.width||E!==U.height?{reset:{rects:!0}}:{}}}};function oS(n){const i=zn(n);let r=parseFloat(i.width)||0,o=parseFloat(i.height)||0;const c=Rt(n),f=c?n.offsetWidth:r,d=c?n.offsetHeight:o,m=Gc(r)!==f||Gc(o)!==d;return m&&(r=f,o=d),{width:r,height:o,$:m}}function Fh(n){return Je(n)?n:n.contextElement}function aa(n){const i=Fh(n);if(!Rt(i))return Vi(1);const r=i.getBoundingClientRect(),{width:o,height:c,$:f}=oS(i);let d=(f?Gc(r.width):r.width)/o,m=(f?Gc(r.height):r.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const wC=Vi(0);function lS(n){const i=kt(n);return!jh()||!i.visualViewport?wC:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function RC(n,i,r){return i===void 0&&(i=!1),!!r&&i&&r===kt(n)}function cr(n,i,r,o){i===void 0&&(i=!1),r===void 0&&(r=!1);const c=n.getBoundingClientRect(),f=Fh(n);let d=Vi(1);i&&(o?Je(o)&&(d=aa(o)):d=aa(n));const m=RC(f,r,o)?lS(f):Vi(0);let g=(c.left+m.x)/d.x,p=(c.top+m.y)/d.y,y=c.width/d.x,v=c.height/d.y;if(f&&o){const S=kt(f),E=Je(o)?kt(o):o;let x=S,w=lh(x);for(;w&&E!==x;){const _=aa(w),D=w.getBoundingClientRect(),C=zn(w),j=D.left+(w.clientLeft+parseFloat(C.paddingLeft))*_.x,k=D.top+(w.clientTop+parseFloat(C.paddingTop))*_.y;g*=_.x,p*=_.y,y*=_.x,v*=_.y,g+=j,p+=k,x=kt(w),w=lh(x)}}return Xc({width:y,height:v,x:g,y:p})}function ru(n,i){const r=nu(n).scrollLeft;return i?i.left+r:cr(Xi(n)).left+r}function cS(n,i){const r=n.getBoundingClientRect(),o=r.left+i.scrollLeft-ru(n,r),c=r.top+i.scrollTop;return{x:o,y:c}}function OC(n){let{elements:i,rect:r,offsetParent:o,strategy:c}=n;const f=c==="fixed",d=Xi(o),m=i?tu(i.floating):!1;if(o===d||m&&f)return r;let g={scrollLeft:0,scrollTop:0},p=Vi(1);const y=Vi(0),v=Rt(o);if((v||!f)&&(($t(o)!=="body"||hr(d))&&(g=nu(o)),v)){const E=cr(o);p=aa(o),y.x=E.x+o.clientLeft,y.y=E.y+o.clientTop}const S=d&&!v&&!f?cS(d,g):Vi(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-g.scrollLeft*p.x+y.x+S.x,y:r.y*p.y-g.scrollTop*p.y+y.y+S.y}}function CC(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function AC(n){const i=nu(n),r=n.ownerDocument.body,o=Yi(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),c=Yi(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let f=-i.scrollLeft+ru(n);const d=-i.scrollTop;return zn(r).direction==="rtl"&&(f+=Yi(n.clientWidth,r.clientWidth)-o),{width:o,height:c,x:f,y:d}}const _C=25;function MC(n,i,r){r===void 0&&(r="viewport");const o=r==="layoutViewport",c=kt(n),f=Xi(n),d=c.visualViewport;let m=f.clientWidth,g=f.clientHeight,p=0,y=0;if(d){const S=!jh()||i==="fixed";o?S||(p=-d.offsetLeft,y=-d.offsetTop):(m=d.width,g=d.height,S&&(p=d.offsetLeft,y=d.offsetTop))}if(ru(f)<=0){const S=f.ownerDocument,E=S.body,x=getComputedStyle(E),w=S.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,_=Math.abs(f.clientWidth-E.clientWidth-w),D=getComputedStyle(f).scrollbarGutter==="stable both-edges"?_/2:_;D<=_C&&(m-=D)}return{width:m,height:g,x:p,y}}function NC(n,i){const r=cr(n,!0,i==="fixed"),o=r.top+n.clientTop,c=r.left+n.clientLeft,f=aa(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,g=c*f.x,p=o*f.y;return{width:d,height:m,x:g,y:p}}function Pb(n,i,r){let o;if(i==="viewport"||i==="layoutViewport")o=MC(n,r,i);else if(i==="document")o=AC(Xi(n));else if(Je(i))o=NC(i,r);else{const c=lS(n);o={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return Xc(o)}function DC(n,i){const r=i.get(n);if(r)return r;let o=zo(n,[],!1).filter(m=>Je(m)&&$t(m)!=="body"),c=null;const f=zn(n).position==="fixed";let d=f?As(n):n;for(;Je(d)&&!Cs(d);){const m=zn(d),g=kh(d),p=c?c.position:f?"fixed":"";!g&&(p==="fixed"||p==="absolute"&&m.position==="static")?o=o.filter(v=>v!==d):c=m,d=As(d)}return i.set(n,o),o}function zC(n){let{element:i,boundary:r,rootBoundary:o,strategy:c}=n;const d=[...r==="clippingAncestors"?tu(i)?[]:DC(i,this._c):[].concat(r),o],m=Pb(i,d[0],c);let g=m.top,p=m.right,y=m.bottom,v=m.left;for(let S=1;S<d.length;S++){const E=Pb(i,d[S],c);g=Yi(E.top,g),p=wa(E.right,p),y=wa(E.bottom,y),v=Yi(E.left,v)}return{width:p-v,height:y-g,x:v,y:g}}function kC(n){const{width:i,height:r}=oS(n);return{width:i,height:r}}function jC(n,i,r){const o=Rt(i),c=Xi(i),f=r==="fixed",d=cr(n,!0,f,i);let m={scrollLeft:0,scrollTop:0};const g=Vi(0);if((o||!f)&&(($t(i)!=="body"||hr(c))&&(m=nu(i)),o)){const S=cr(i,!0,f,i);g.x=S.x+i.clientLeft,g.y=S.y+i.clientTop}!o&&c&&(g.x=ru(c));const p=c&&!o&&!f?cS(c,m):Vi(0),y=d.left+m.scrollLeft-g.x-p.x,v=d.top+m.scrollTop-g.y-p.y;return{x:y,y:v,width:d.width,height:d.height}}function Ld(n){return zn(n).position==="static"}function Ib(n,i){if(!Rt(n)||zn(n).position==="fixed")return null;if(i)return i(n);let r=n.offsetParent;return Xi(n)===r&&(r=r.ownerDocument.body),r}function uS(n,i){const r=kt(n);if(tu(n))return r;if(!Rt(n)){let c=As(n);for(;c&&!Cs(c);){if(Je(c)&&!Ld(c))return c;c=As(c)}return r}let o=Ib(n,i);for(;o&&BR(o)&&Ld(o);)o=Ib(o,i);return o&&Cs(o)&&Ld(o)&&!kh(o)?r:o||YR(n)||r}const UC=async function(n){const i=this.getOffsetParent||uS,r=this.getDimensions,o=await r(n.floating);return{reference:jC(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function LC(n){return zn(n).direction==="rtl"}const BC={convertOffsetParentRelativeRectToViewportRelativeRect:OC,getDocumentElement:Xi,getClippingRect:zC,getOffsetParent:uS,getElementRects:UC,getClientRects:CC,getDimensions:kC,getScale:aa,isElement:Je,isRTL:LC};function fS(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function HC(n,i,r){let o=null,c;const f=Xi(n);function d(){var y;clearTimeout(c),(y=o)==null||y.disconnect(),o=null}function m(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),d();const S=n.getBoundingClientRect(),{left:E,top:x,width:w,height:_}=S;if(y||i(),!w||!_)return;const D=Ec(x),C=Ec(f.clientWidth-(E+w)),j=Ec(f.clientHeight-(x+_)),k=Ec(E),F={rootMargin:-D+"px "+-C+"px "+-j+"px "+-k+"px",threshold:Yi(0,wa(1,v))||1};let B=!0;function U(K){const se=K[0].intersectionRatio;if(!fS(S,n.getBoundingClientRect()))return m();if(se!==v){if(!B)return m();se?m(!1,se):c=setTimeout(()=>{m(!1,1e-7)},1e3)}B=!1}try{o=new IntersectionObserver(U,{...F,root:f.ownerDocument})}catch{o=new IntersectionObserver(U,F)}o.observe(n)}const g=kt(n),p=()=>m(r);return g.addEventListener("resize",p),m(!0),()=>{g.removeEventListener("resize",p),d()}}function Jb(n,i,r,o){o===void 0&&(o={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=o,p=Fh(n),y=c||f?[...p?zo(p):[],...i?zo(i):[]]:[];y.forEach(D=>{c&&D.addEventListener("scroll",r),f&&D.addEventListener("resize",r)});const v=p&&m?HC(p,r,f):null;let S=-1,E=null;d&&(E=new ResizeObserver(D=>{let[C]=D;C&&C.target===p&&E&&i&&(E.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var j;(j=E)==null||j.observe(i)})),r()}),p&&!g&&E.observe(p),i&&E.observe(i));let x,w=g?cr(n):null;g&&_();function _(){const D=cr(n);w&&!fS(w,D)&&r(),w=D,x=requestAnimationFrame(_)}return r(),()=>{var D;y.forEach(C=>{c&&C.removeEventListener("scroll",r),f&&C.removeEventListener("resize",r)}),v==null||v(),(D=E)==null||D.disconnect(),E=null,g&&cancelAnimationFrame(x)}}const qC=SC,YC=xC,VC=yC,GC=TC,QC=bC,XC=EC,FC=(n,i,r)=>{const o=new Map,c=r??{},f={...BC,...c.platform,_c:o};return gC(n,i,{...c,platform:f})};var KC=typeof document<"u",ZC=function(){},kc=KC?O.useLayoutEffect:ZC;function Kc(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let r,o,c;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==i.length)return!1;for(o=r;o--!==0;)if(!Kc(n[o],i[o]))return!1;return!0}if(c=Object.keys(n),r=c.length,r!==Object.keys(i).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(i,c[o]))return!1;for(o=r;o--!==0;){const f=c[o];if(!(f==="_owner"&&n.$$typeof)&&!Kc(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function dS(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Wb(n,i){const r=dS(n);return Math.round(i*r)/r}function Bd(n){const i=O.useRef(n);return kc(()=>{i.current=n}),i}function PC(n){n===void 0&&(n={});const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:g,open:p}=n,[y,v]=O.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[S,E]=O.useState(o);Kc(S,o)||E(o);const[x,w]=O.useState(null),[_,D]=O.useState(null),C=O.useCallback(I=>{I!==F.current&&(F.current=I,w(I))},[]),j=O.useCallback(I=>{I!==B.current&&(B.current=I,D(I))},[]),k=f||x,q=d||_,F=O.useRef(null),B=O.useRef(null),U=O.useRef(y),K=g!=null,se=Bd(g),pe=Bd(c),ae=Bd(p),W=O.useCallback(()=>{if(!F.current||!B.current)return;const I={placement:i,strategy:r,middleware:S};pe.current&&(I.platform=pe.current),FC(F.current,B.current,I).then(oe=>{const Y={...oe,isPositioned:ae.current!==!1};le.current&&!Kc(U.current,Y)&&(U.current=Y,Ms.flushSync(()=>{v(Y)}))})},[S,i,r,pe,ae]);kc(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,v(I=>({...I,isPositioned:!1})))},[p]);const le=O.useRef(!1);kc(()=>(le.current=!0,()=>{le.current=!1}),[]),kc(()=>{if(k&&(F.current=k),q&&(B.current=q),k&&q){if(se.current)return se.current(k,q,W);W()}},[k,q,W,se,K]);const ie=O.useMemo(()=>({reference:F,floating:B,setReference:C,setFloating:j}),[C,j]),N=O.useMemo(()=>({reference:k,floating:q}),[k,q]),Q=O.useMemo(()=>{const I={position:r,left:0,top:0};if(!N.floating)return I;const oe=Wb(N.floating,y.x),Y=Wb(N.floating,y.y);return m?{...I,transform:"translate("+oe+"px, "+Y+"px)",...dS(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:Y}},[r,m,N.floating,y.x,y.y]);return O.useMemo(()=>({...y,update:W,refs:ie,elements:N,floatingStyles:Q}),[y,W,ie,N,Q])}const IC=(n,i)=>{const r=qC(n);return{name:r.name,fn:r.fn,options:[n,i]}},JC=(n,i)=>{const r=YC(n);return{name:r.name,fn:r.fn,options:[n,i]}},WC=(n,i)=>({fn:XC(n).fn,options:[n,i]}),$C=(n,i)=>{const r=VC(n);return{name:r.name,fn:r.fn,options:[n,i]}},eA=(n,i)=>{const r=GC(n);return{name:r.name,fn:r.fn,options:[n,i]}},tA=(n,i)=>{const r=QC(n);return{name:r.name,fn:r.fn,options:[n,i]}};function nA(n){const i=O.useRef(!0);i.current&&(i.current=!1,n())}const Ve=(n,i,r,o,c,f,...d)=>{if(d.length>0)throw new Error(ur(1));let m;if(n)m=n;else throw new Error("Missing arguments");return m};var Hd={exports:{}},qd={};/**
99
+ */const ww=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],h0=Oa("x",ww);function Rw({status:n}){return A.jsxs("header",{className:"flex items-center justify-between border-b border-chatroom-border px-6 py-4",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx(d0,{className:"size-5 text-chatroom-text-muted","aria-hidden":!0}),A.jsx("h1",{className:"text-sm font-semibold uppercase tracking-widest",children:"Chatroom Daemon"})]}),n]})}function Ow({children:n}){return A.jsx("nav",{className:"flex gap-1 border-b border-chatroom-border px-6 py-2",children:n})}function Eb({active:n=!1,children:i,onClick:r}){return A.jsx("span",{className:n?"bg-chatroom-bg-secondary px-3 py-1.5 text-xs font-medium uppercase tracking-wide":"px-3 py-1.5 text-xs font-medium uppercase tracking-wide text-chatroom-text-muted",onClick:r,role:r?"button":void 0,children:i})}function Tb(n){return new URLSearchParams(n.startsWith("?")?n.slice(1):n).get("tab")==="event-stream"?"event-stream":"logs"}function Cw(n){const i=new URLSearchParams(window.location.search);n.tab!==void 0&&(n.tab==="event-stream"?i.set("tab","event-stream"):i.delete("tab")),n.chatroomId!==void 0&&(n.chatroomId?i.set("chatroomId",n.chatroomId):i.delete("chatroomId"));const r=i.toString();window.history.replaceState(null,"",`${window.location.pathname}${r?`?${r}`:""}`)}function Aw(){const[n,i]=O.useState(()=>Tb(window.location.search)),r=O.useCallback(o=>{i(o),Cw({tab:o})},[]);return O.useEffect(()=>{const o=()=>i(Tb(window.location.search));return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[]),{activeTab:n,setActiveTab:r}}const mi=Object.create(null);mi.open="0";mi.close="1";mi.ping="2";mi.pong="3";mi.message="4";mi.upgrade="5";mi.noop="6";const _c=Object.create(null);Object.keys(mi).forEach(n=>{_c[mi[n]]=n});const ih={type:"error",data:"parser error"},m0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",p0=typeof ArrayBuffer=="function",g0=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,Ah=({type:n,data:i},r,o)=>m0&&i instanceof Blob?r?o(i):wb(i,o):p0&&(i instanceof ArrayBuffer||g0(i))?r?o(i):wb(new Blob([i]),o):o(mi[n]+(i||"")),wb=(n,i)=>{const r=new FileReader;return r.onload=function(){const o=r.result.split(",")[1];i("b"+(o||""))},r.readAsDataURL(n)};function Rb(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Rd;function _w(n,i){if(m0&&n.data instanceof Blob)return n.data.arrayBuffer().then(Rb).then(i);if(p0&&(n.data instanceof ArrayBuffer||g0(n.data)))return i(Rb(n.data));Ah(n,!1,r=>{Rd||(Rd=new TextEncoder),i(Rd.encode(r))})}const Ob="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<Ob.length;n++)Mo[Ob.charCodeAt(n)]=n;const Mw=n=>{let i=n.length*.75,r=n.length,o,c=0,f,d,m,g;n[n.length-1]==="="&&(i--,n[n.length-2]==="="&&i--);const p=new ArrayBuffer(i),y=new Uint8Array(p);for(o=0;o<r;o+=4)f=Mo[n.charCodeAt(o)],d=Mo[n.charCodeAt(o+1)],m=Mo[n.charCodeAt(o+2)],g=Mo[n.charCodeAt(o+3)],y[c++]=f<<2|d>>4,y[c++]=(d&15)<<4|m>>2,y[c++]=(m&3)<<6|g&63;return p},Nw=typeof ArrayBuffer=="function",_h=(n,i)=>{if(typeof n!="string")return{type:"message",data:y0(n,i)};const r=n.charAt(0);return r==="b"?{type:"message",data:Dw(n.substring(1),i)}:_c[r]?n.length>1?{type:_c[r],data:n.substring(1)}:{type:_c[r]}:ih},Dw=(n,i)=>{if(Nw){const r=Mw(n);return y0(r,i)}else return{base64:!0,data:n}},y0=(n,i)=>{switch(i){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},b0="",zw=(n,i)=>{const r=n.length,o=new Array(r);let c=0;n.forEach((f,d)=>{Ah(f,!1,m=>{o[d]=m,++c===r&&i(o.join(b0))})})},kw=(n,i)=>{const r=n.split(b0),o=[];for(let c=0;c<r.length;c++){const f=_h(r[c],i);if(o.push(f),f.type==="error")break}return o};function jw(){return new TransformStream({transform(n,i){_w(n,r=>{const o=r.length;let c;if(o<126)c=new Uint8Array(1),new DataView(c.buffer).setUint8(0,o);else if(o<65536){c=new Uint8Array(3);const f=new DataView(c.buffer);f.setUint8(0,126),f.setUint16(1,o)}else{c=new Uint8Array(9);const f=new DataView(c.buffer);f.setUint8(0,127),f.setBigUint64(1,BigInt(o))}n.data&&typeof n.data!="string"&&(c[0]|=128),i.enqueue(c),i.enqueue(r)})}})}let Od;function bc(n){return n.reduce((i,r)=>i+r.length,0)}function vc(n,i){if(n[0].length===i)return n.shift();const r=new Uint8Array(i);let o=0;for(let c=0;c<i;c++)r[c]=n[0][o++],o===n[0].length&&(n.shift(),o=0);return n.length&&o<n[0].length&&(n[0]=n[0].slice(o)),r}function Uw(n,i){Od||(Od=new TextDecoder);const r=[];let o=0,c=-1,f=!1;return new TransformStream({transform(d,m){for(r.push(d);;){if(o===0){if(bc(r)<1)break;const g=vc(r,1);f=(g[0]&128)===128,c=g[0]&127,c<126?o=3:c===126?o=1:o=2}else if(o===1){if(bc(r)<2)break;const g=vc(r,2);c=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(bc(r)<8)break;const g=vc(r,8),p=new DataView(g.buffer,g.byteOffset,g.length),y=p.getUint32(0);if(y>Math.pow(2,21)-1){m.enqueue(ih);break}c=y*Math.pow(2,32)+p.getUint32(4),o=3}else{if(bc(r)<c)break;const g=vc(r,c);m.enqueue(_h(f?g:Od.decode(g),i)),o=0}if(c===0||c>n){m.enqueue(ih);break}}}})}const v0=4;function zt(n){if(n)return Lw(n)}function Lw(n){for(var i in zt.prototype)n[i]=zt.prototype[i];return n}zt.prototype.on=zt.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this};zt.prototype.once=function(n,i){function r(){this.off(n,r),i.apply(this,arguments)}return r.fn=i,this.on(n,r),this};zt.prototype.off=zt.prototype.removeListener=zt.prototype.removeAllListeners=zt.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+n];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,c=0;c<r.length;c++)if(o=r[c],o===i||o.fn===i){r.splice(c,1);break}return r.length===0&&delete this._callbacks["$"+n],this};zt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),r=this._callbacks["$"+n],o=1;o<arguments.length;o++)i[o-1]=arguments[o];if(r){r=r.slice(0);for(var o=0,c=r.length;o<c;++o)r[o].apply(this,i)}return this};zt.prototype.emitReserved=zt.prototype.emit;zt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};zt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Wc=typeof Promise=="function"&&typeof Promise.resolve=="function"?i=>Promise.resolve().then(i):(i,r)=>r(i,0),Xn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Bw="arraybuffer";function S0(n,...i){return i.reduce((r,o)=>(n.hasOwnProperty(o)&&(r[o]=n[o]),r),{})}const Hw=Xn.setTimeout,qw=Xn.clearTimeout;function $c(n,i){i.useNativeTimers?(n.setTimeoutFn=Hw.bind(Xn),n.clearTimeoutFn=qw.bind(Xn)):(n.setTimeoutFn=Xn.setTimeout.bind(Xn),n.clearTimeoutFn=Xn.clearTimeout.bind(Xn))}const Yw=1.33;function Vw(n){return typeof n=="string"?Gw(n):Math.ceil((n.byteLength||n.size)*Yw)}function Gw(n){let i=0,r=0;for(let o=0,c=n.length;o<c;o++)i=n.charCodeAt(o),i<128?r+=1:i<2048?r+=2:i<55296||i>=57344?r+=3:(o++,r+=4);return r}function x0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Qw(n){let i="";for(let r in n)n.hasOwnProperty(r)&&(i.length&&(i+="&"),i+=encodeURIComponent(r)+"="+encodeURIComponent(n[r]));return i}function Xw(n){let i={},r=n.split("&");for(let o=0,c=r.length;o<c;o++){let f=r[o].split("=");i[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return i}class Fw extends Error{constructor(i,r,o){super(i),this.description=r,this.context=o,this.type="TransportError"}}class Mh extends zt{constructor(i){super(),this.writable=!1,$c(this,i),this.opts=i,this.query=i.query,this.socket=i.socket,this.supportsBinary=!i.forceBase64}onError(i,r,o){return super.emitReserved("error",new Fw(i,r,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(i){this.readyState==="open"&&this.write(i)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(i){const r=_h(i,this.socket.binaryType);this.onPacket(r)}onPacket(i){super.emitReserved("packet",i)}onClose(i){this.readyState="closed",super.emitReserved("close",i)}pause(i){}createUri(i,r={}){return i+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const i=this.opts.hostname;return i.indexOf(":")===-1?i:"["+i+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(i){const r=Qw(i);return r.length?"?"+r:""}}class Kw extends Mh{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(i){this.readyState="pausing";const r=()=>{this.readyState="paused",i()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(i){const r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};kw(i,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const i=()=>{this.write([{type:"close"}])};this.readyState==="open"?i():this.once("open",i)}write(i){this.writable=!1,zw(i,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const i=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=x0()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(i,r)}}let E0=!1;try{E0=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Zw=E0;function Pw(){}class Iw extends Kw{constructor(i){if(super(i),typeof location<"u"){const r=location.protocol==="https:";let o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&i.hostname!==location.hostname||o!==i.port}}doWrite(i,r){const o=this.request({method:"POST",data:i});o.on("success",r),o.on("error",(c,f)=>{this.onError("xhr post error",c,f)})}doPoll(){const i=this.request();i.on("data",this.onData.bind(this)),i.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=i}}class hi extends zt{constructor(i,r,o){super(),this.createRequest=i,$c(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var i;const r=S0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let c in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(c)&&o.setRequestHeader(c,this._opts.extraHeaders[c])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(i=this._opts.cookieJar)===null||i===void 0||i.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var c;o.readyState===3&&((c=this._opts.cookieJar)===null||c===void 0||c.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(c){this.setTimeoutFn(()=>{this._onError(c)},0);return}typeof document<"u"&&(this._index=hi.requestsCount++,hi.requests[this._index]=this)}_onError(i){this.emitReserved("error",i,this._xhr),this._cleanup(!0)}_cleanup(i){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Pw,i)try{this._xhr.abort()}catch{}typeof document<"u"&&delete hi.requests[this._index],this._xhr=null}}_onLoad(){const i=this._xhr.responseText;i!==null&&(this.emitReserved("data",i),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}hi.requestsCount=0;hi.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Cb);else if(typeof addEventListener=="function"){const n="onpagehide"in Xn?"pagehide":"unload";addEventListener(n,Cb,!1)}}function Cb(){for(let n in hi.requests)hi.requests.hasOwnProperty(n)&&hi.requests[n].abort()}const Jw=function(){const n=T0({xdomain:!1});return n&&n.responseType!==null}();class Ww extends Iw{constructor(i){super(i);const r=i&&i.forceBase64;this.supportsBinary=Jw&&!r}request(i={}){return Object.assign(i,{xd:this.xd},this.opts),new hi(T0,this.uri(),i)}}function T0(n){const i=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!i||Zw))return new XMLHttpRequest}catch{}if(!i)try{return new Xn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const w0=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class $w extends Mh{get name(){return"websocket"}doOpen(){const i=this.uri(),r=this.opts.protocols,o=w0?{}:S0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(i,r,o)}catch(c){return this.emitReserved("error",c)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=i=>this.onClose({description:"websocket connection closed",context:i}),this.ws.onmessage=i=>this.onData(i.data),this.ws.onerror=i=>this.onError("websocket error",i)}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const o=i[r],c=r===i.length-1;Ah(o,this.supportsBinary,f=>{try{this.doWrite(o,f)}catch{}c&&Wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const i=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=x0()),this.supportsBinary||(r.b64=1),this.createUri(i,r)}}const Cd=Xn.WebSocket||Xn.MozWebSocket;class eR extends $w{createSocket(i,r,o){return w0?new Cd(i,r,o):r?new Cd(i,r):new Cd(i)}doWrite(i,r){this.ws.send(r)}}class tR extends Mh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(i){return this.emitReserved("error",i)}this._transport.closed.then(()=>{this.onClose()}).catch(i=>{this.onError("webtransport error",i)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(i=>{const r=Uw(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=i.readable.pipeThrough(r).getReader(),c=jw();c.readable.pipeTo(i.writable),this._writer=c.writable.getWriter();const f=()=>{o.read().then(({done:m,value:g})=>{m||(this.onPacket(g),f())}).catch(m=>{})};f();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(i){this.writable=!1;for(let r=0;r<i.length;r++){const o=i[r],c=r===i.length-1;this._writer.write(o).then(()=>{c&&Wc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var i;(i=this._transport)===null||i===void 0||i.close()}}const nR={websocket:eR,webtransport:tR,polling:Ww},iR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function sh(n){if(n.length>8e3)throw"URI too long";const i=n,r=n.indexOf("["),o=n.indexOf("]");r!=-1&&o!=-1&&(n=n.substring(0,r)+n.substring(r,o).replace(/:/g,";")+n.substring(o,n.length));let c=iR.exec(n||""),f={},d=14;for(;d--;)f[sR[d]]=c[d]||"";return r!=-1&&o!=-1&&(f.source=i,f.host=f.host.substring(1,f.host.length-1).replace(/;/g,":"),f.authority=f.authority.replace("[","").replace("]","").replace(/;/g,":"),f.ipv6uri=!0),f.pathNames=rR(f,f.path),f.queryKey=aR(f,f.query),f}function rR(n,i){const r=/\/{2,9}/g,o=i.replace(r,"/").split("/");return(i.slice(0,1)=="/"||i.length===0)&&o.splice(0,1),i.slice(-1)=="/"&&o.splice(o.length-1,1),o}function aR(n,i){const r={};return i.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,c,f){c&&(r[c]=f)}),r}const rh=typeof addEventListener=="function"&&typeof removeEventListener=="function",Mc=[];rh&&addEventListener("offline",()=>{Mc.forEach(n=>n())},!1);class Os extends zt{constructor(i,r){if(super(),this.binaryType=Bw,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,i&&typeof i=="object"&&(r=i,i=null),i){const o=sh(i);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=sh(r.host).host);$c(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{const c=o.prototype.name;this.transports.push(c),this._transportsByName[c]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Xw(this.opts.query)),rh&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Mc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(i){const r=Object.assign({},this.opts.query);r.EIO=v0,r.transport=i,this.id&&(r.sid=this.id);const o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[i]);return new this._transportsByName[i](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const i=this.opts.rememberUpgrade&&Os.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(i);r.open(),this.setTransport(r)}setTransport(i){this.transport&&this.transport.removeAllListeners(),this.transport=i,i.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Os.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(i){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",i),this.emitReserved("heartbeat"),i.type){case"open":this.onHandshake(JSON.parse(i.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=i.data,this._onError(r);break;case"message":this.emitReserved("data",i.data),this.emitReserved("message",i.data);break}}onHandshake(i){this.emitReserved("handshake",i),this.id=i.sid,this.transport.query.sid=i.sid,this._pingInterval=i.pingInterval,this._pingTimeout=i.pingTimeout,this._maxPayload=i.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const i=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+i,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},i),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const i=this._getWritablePackets();this.transport.send(i),this._prevBufferLen=i.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o<this.writeBuffer.length;o++){const c=this.writeBuffer[o].data;if(c&&(r+=Vw(c)),o>0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const i=Date.now()>this._pingTimeoutTime;return i&&(this._pingTimeoutTime=0,Wc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),i}write(i,r,o){return this._sendPacket("message",i,r,o),this}send(i,r,o){return this._sendPacket("message",i,r,o),this}_sendPacket(i,r,o,c){if(typeof r=="function"&&(c=r,r=void 0),typeof o=="function"&&(c=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const f={type:i,data:r,options:o};this.emitReserved("packetCreate",f),this.writeBuffer.push(f),c&&this.once("flush",c),this.flush()}close(){const i=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),i()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():i()}):this.upgrading?o():i()),this}_onError(i){if(Os.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",i),this._onClose("transport error",i)}_onClose(i,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),rh&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=Mc.indexOf(this._offlineEventListener);o!==-1&&Mc.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",i,r),this.writeBuffer=[],this._prevBufferLen=0}}}Os.protocol=v0;class oR extends Os{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let i=0;i<this._upgrades.length;i++)this._probe(this._upgrades[i])}_probe(i){let r=this.createTransport(i),o=!1;Os.priorWebsocketSuccess=!1;const c=()=>{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",v=>{if(!o)if(v.type==="pong"&&v.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Os.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(y(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const S=new Error("probe error");S.transport=r.name,this.emitReserved("upgradeError",S)}}))};function f(){o||(o=!0,y(),r.close(),r=null)}const d=v=>{const S=new Error("probe error: "+v);S.transport=r.name,f(),this.emitReserved("upgradeError",S)};function m(){d("transport closed")}function g(){d("socket closed")}function p(v){r&&v.name!==r.name&&f()}const y=()=>{r.removeListener("open",c),r.removeListener("error",d),r.removeListener("close",m),this.off("close",g),this.off("upgrading",p)};r.once("open",c),r.once("error",d),r.once("close",m),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&i!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(i){this._upgrades=this._filterUpgrades(i.upgrades),super.onHandshake(i)}_filterUpgrades(i){const r=[];for(let o=0;o<i.length;o++)~this.transports.indexOf(i[o])&&r.push(i[o]);return r}}let lR=class extends oR{constructor(i,r={}){const o=typeof i=="object",c=o?{...i}:{...r};(!c.transports||c.transports&&typeof c.transports[0]=="string")&&(c.transports=(c.transports||["polling","websocket","webtransport"]).map(f=>nR[f]).filter(f=>!!f)),super(o?c:i,c)}};function cR(n,i="",r){let o=n;r=r||typeof location<"u"&&location,n==null&&(n=r.protocol+"//"+r.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=r.protocol+n:n=r.host+n),/^(https?|wss?):\/\//.test(n)||(typeof r<"u"?n=r.protocol+"//"+n:n="https://"+n),o=sh(n)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const f=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+f+":"+o.port+i,o.href=o.protocol+"://"+f+(r&&r.port===o.port?"":":"+o.port),o}const uR=typeof ArrayBuffer=="function",fR=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,R0=Object.prototype.toString,dR=typeof Blob=="function"||typeof Blob<"u"&&R0.call(Blob)==="[object BlobConstructor]",hR=typeof File=="function"||typeof File<"u"&&R0.call(File)==="[object FileConstructor]";function Nh(n){return uR&&(n instanceof ArrayBuffer||fR(n))||dR&&n instanceof Blob||hR&&n instanceof File}function Nc(n,i){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let r=0,o=n.length;r<o;r++)if(Nc(n[r]))return!0;return!1}if(Nh(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return Nc(n.toJSON(),!0);for(const r in n)if(Object.prototype.hasOwnProperty.call(n,r)&&Nc(n[r]))return!0;return!1}function mR(n){const i=[],r=n.data,o=n;return o.data=Dc(r,i),o.attachments=i.length,{packet:o,buffers:i}}function Dc(n,i,r){if(!n)return n;if(Nh(n)){const o={_placeholder:!0,num:i.length};return i.push(n),o}else if(Array.isArray(n)){const o=new Array(n.length);for(let c=0;c<n.length;c++)o[c]=Dc(n[c],i);return o}else if(typeof n=="object"&&!(n instanceof Date)){if(n.toJSON&&typeof n.toJSON=="function"&&!r)return Dc(n.toJSON(),i,!0);const o={};for(const c in n)Object.prototype.hasOwnProperty.call(n,c)&&(o[c]=Dc(n[c],i));return o}return n}function pR(n,i){return n.data=ah(n.data,i),delete n.attachments,n}function ah(n,i){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<i.length)return i[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let r=0;r<n.length;r++)n[r]=ah(n[r],i);else if(typeof n=="object")for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=ah(n[r],i));return n}const O0=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],gR=5;var Ne;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(Ne||(Ne={}));class yR{constructor(i){this.replacer=i}encode(i){return(i.type===Ne.EVENT||i.type===Ne.ACK)&&Nc(i)?this.encodeAsBinary({type:i.type===Ne.EVENT?Ne.BINARY_EVENT:Ne.BINARY_ACK,nsp:i.nsp,data:i.data,id:i.id}):[this.encodeAsString(i)]}encodeAsString(i){let r=""+i.type;return(i.type===Ne.BINARY_EVENT||i.type===Ne.BINARY_ACK)&&(r+=i.attachments+"-"),i.nsp&&i.nsp!=="/"&&(r+=i.nsp+","),i.id!=null&&(r+=i.id),i.data!=null&&(r+=JSON.stringify(i.data,this.replacer)),r}encodeAsBinary(i){const r=mR(i),o=this.encodeAsString(r.packet),c=r.buffers;return c.unshift(o),c}}class Dh extends zt{constructor(i){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof i=="function"?{reviver:i}:i)}add(i){let r;if(typeof i=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(i);const o=r.type===Ne.BINARY_EVENT;o||r.type===Ne.BINARY_ACK?(r.type=o?Ne.EVENT:Ne.ACK,this.reconstructor=new bR(r)):super.emitReserved("decoded",r)}else if(Nh(i)||i.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(i),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+i)}decodeString(i){let r=0;const o={type:Number(i.charAt(0))};if(Ne[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Ne.BINARY_EVENT||o.type===Ne.BINARY_ACK){const f=r+1;for(;i.charAt(++r)!=="-"&&r!=i.length;);const d=i.substring(f,r);if(d!=Number(d)||i.charAt(r)!=="-")throw new Error("Illegal attachments");const m=Number(d);if(!C0(m)||m<1)throw new Error("Illegal attachments");if(m>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=m}if(i.charAt(r+1)==="/"){const f=r+1;for(;++r&&!(i.charAt(r)===","||r===i.length););o.nsp=i.substring(f,r)}else o.nsp="/";const c=i.charAt(r+1);if(c!==""&&Number(c)==c){const f=r+1;for(;++r;){const d=i.charAt(r);if(d==null||Number(d)!=d){--r;break}if(r===i.length)break}o.id=Number(i.substring(f,r+1))}if(i.charAt(++r)){const f=this.tryParse(i.substr(r));if(Dh.isPayloadValid(o.type,f))o.data=f;else throw new Error("invalid payload")}return o}tryParse(i){try{return JSON.parse(i,this.opts.reviver)}catch{return!1}}static isPayloadValid(i,r){switch(i){case Ne.CONNECT:return Yc(r);case Ne.DISCONNECT:return r===void 0;case Ne.CONNECT_ERROR:return typeof r=="string"||Yc(r);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&O0.indexOf(r[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class bR{constructor(i){this.packet=i,this.buffers=[],this.reconPack=i}takeBinaryData(i){if(this.buffers.push(i),this.buffers.length===this.reconPack.attachments){const r=pR(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function vR(n){return typeof n=="string"}const C0=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function SR(n){return n===void 0||C0(n)}function Yc(n){return Object.prototype.toString.call(n)==="[object Object]"}function xR(n,i){switch(n){case Ne.CONNECT:return i===void 0||Yc(i);case Ne.DISCONNECT:return i===void 0;case Ne.EVENT:return Array.isArray(i)&&(typeof i[0]=="number"||typeof i[0]=="string"&&O0.indexOf(i[0])===-1);case Ne.ACK:return Array.isArray(i);case Ne.CONNECT_ERROR:return typeof i=="string"||Yc(i);default:return!1}}function ER(n){return vR(n.nsp)&&SR(n.id)&&xR(n.type,n.data)}const TR=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dh,Encoder:yR,get PacketType(){return Ne},isPacketValid:ER,protocol:gR},Symbol.toStringTag,{value:"Module"}));function Wn(n,i,r){return n.on(i,r),function(){n.off(i,r)}}const wR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class A0 extends zt{constructor(i,r,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=i,this.nsp=r,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const i=this.io;this.subs=[Wn(i,"open",this.onopen.bind(this)),Wn(i,"packet",this.onpacket.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...i){return i.unshift("message"),this.emit.apply(this,i),this}emit(i,...r){var o,c,f;if(wR.hasOwnProperty(i))throw new Error('"'+i.toString()+'" is a reserved event name');if(r.unshift(i),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const d={type:Ne.EVENT,data:r};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const y=this.ids++,v=r.pop();this._registerAckCallback(y,v),d.id=y}const m=(c=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||c===void 0?void 0:c.writable,g=this.connected&&!(!((f=this.io.engine)===null||f===void 0)&&f._hasPingExpired());return this.flags.volatile&&!m||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(i,r){var o;const c=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(c===void 0){this.acks[i]=r;return}const f=this.io.setTimeoutFn(()=>{delete this.acks[i];for(let m=0;m<this.sendBuffer.length;m++)this.sendBuffer[m].id===i&&this.sendBuffer.splice(m,1);r.call(this,new Error("operation has timed out"))},c),d=(...m)=>{this.io.clearTimeoutFn(f),r.apply(this,m)};d.withError=!0,this.acks[i]=d}emitWithAck(i,...r){return new Promise((o,c)=>{const f=(d,m)=>d?c(d):o(m);f.withError=!0,r.push(f),this.emit(i,...r)})}_addToQueue(i){let r;typeof i[i.length-1]=="function"&&(r=i.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:i,flags:Object.assign({fromQueue:!0},this.flags)};i.push((c,...f)=>(this._queue[0],c!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(c)):(this._queue.shift(),r&&r(null,...f)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(i=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!i||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(i){i.nsp=this.nsp,this.io._packet(i)}onopen(){typeof this.auth=="function"?this.auth(i=>{this._sendConnectPacket(i)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(i){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},i):i})}onerror(i){this.connected||this.emitReserved("connect_error",i)}onclose(i,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",i,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(i=>{if(!this.sendBuffer.some(o=>String(o.id)===i)){const o=this.acks[i];delete this.acks[i],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(i){if(i.nsp===this.nsp)switch(i.type){case Ne.CONNECT:i.data&&i.data.sid?this.onconnect(i.data.sid,i.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(i);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(i);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const o=new Error(i.data.message);o.data=i.data.data,this.emitReserved("connect_error",o);break}}onevent(i){const r=i.data||[];i.id!=null&&r.push(this.ack(i.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(i){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const o of r)o.apply(this,i)}super.emit.apply(this,i),this._pid&&i.length&&typeof i[i.length-1]=="string"&&(this._lastOffset=i[i.length-1])}ack(i){const r=this;let o=!1;return function(...c){o||(o=!0,r.packet({type:Ne.ACK,id:i,data:c}))}}onack(i){const r=this.acks[i.id];typeof r=="function"&&(delete this.acks[i.id],r.withError&&i.data.unshift(null),r.apply(this,i.data))}onconnect(i,r){this.id=i,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(i=>this.emitEvent(i)),this.receiveBuffer=[],this.sendBuffer.forEach(i=>{this.notifyOutgoingListeners(i),this.packet(i)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(i=>i()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(i){return this.flags.compress=i,this}get volatile(){return this.flags.volatile=!0,this}timeout(i){return this.flags.timeout=i,this}onAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(i),this}prependAny(i){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(i),this}offAny(i){if(!this._anyListeners)return this;if(i){const r=this._anyListeners;for(let o=0;o<r.length;o++)if(i===r[o])return r.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(i),this}prependAnyOutgoing(i){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(i),this}offAnyOutgoing(i){if(!this._anyOutgoingListeners)return this;if(i){const r=this._anyOutgoingListeners;for(let o=0;o<r.length;o++)if(i===r[o])return r.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(i){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const o of r)o.apply(this,i.data)}}}function Ca(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}Ca.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var i=Math.random(),r=Math.floor(i*this.jitter*n);n=(Math.floor(i*10)&1)==0?n-r:n+r}return Math.min(n,this.max)|0};Ca.prototype.reset=function(){this.attempts=0};Ca.prototype.setMin=function(n){this.ms=n};Ca.prototype.setMax=function(n){this.max=n};Ca.prototype.setJitter=function(n){this.jitter=n};class oh extends zt{constructor(i,r){var o;super(),this.nsps={},this.subs=[],i&&typeof i=="object"&&(r=i,i=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,$c(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new Ca({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=i;const c=r.parser||TR;this.encoder=new c.Encoder,this.decoder=new c.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(i){return arguments.length?(this._reconnection=!!i,i||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(i){return i===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=i,this)}reconnectionDelay(i){var r;return i===void 0?this._reconnectionDelay:(this._reconnectionDelay=i,(r=this.backoff)===null||r===void 0||r.setMin(i),this)}randomizationFactor(i){var r;return i===void 0?this._randomizationFactor:(this._randomizationFactor=i,(r=this.backoff)===null||r===void 0||r.setJitter(i),this)}reconnectionDelayMax(i){var r;return i===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=i,(r=this.backoff)===null||r===void 0||r.setMax(i),this)}timeout(i){return arguments.length?(this._timeout=i,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(i){if(~this._readyState.indexOf("open"))return this;this.engine=new lR(this.uri,this.opts);const r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const c=Wn(r,"open",function(){o.onopen(),i&&i()}),f=m=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",m),i?i(m):this.maybeReconnectOnOpen()},d=Wn(r,"error",f);if(this._timeout!==!1){const m=this._timeout,g=this.setTimeoutFn(()=>{c(),f(new Error("timeout")),r.close()},m);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(c),this.subs.push(d),this}connect(i){return this.open(i)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const i=this.engine;this.subs.push(Wn(i,"ping",this.onping.bind(this)),Wn(i,"data",this.ondata.bind(this)),Wn(i,"error",this.onerror.bind(this)),Wn(i,"close",this.onclose.bind(this)),Wn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(i){try{this.decoder.add(i)}catch(r){this.onclose("parse error",r)}}ondecoded(i){Wc(()=>{this.emitReserved("packet",i)},this.setTimeoutFn)}onerror(i){this.emitReserved("error",i)}socket(i,r){let o=this.nsps[i];return o?this._autoConnect&&!o.active&&o.connect():(o=new A0(this,i,r),this.nsps[i]=o),o}_destroy(i){const r=Object.keys(this.nsps);for(const o of r)if(this.nsps[o].active)return;this._close()}_packet(i){const r=this.encoder.encode(i);for(let o=0;o<r.length;o++)this.engine.write(r[o],i.options)}cleanup(){this.subs.forEach(i=>i()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(i,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",i,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const i=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{i.skipReconnect||(this.emitReserved("reconnect_attempt",i.backoff.attempts),!i.skipReconnect&&i.open(c=>{c?(i._reconnecting=!1,i.reconnect(),this.emitReserved("reconnect_error",c)):i.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const i=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",i)}}const Ro={};function zc(n,i){typeof n=="object"&&(i=n,n=void 0),i=i||{};const r=cR(n,i.path||"/socket.io"),o=r.source,c=r.id,f=r.path,d=Ro[c]&&f in Ro[c].nsps,m=i.forceNew||i["force new connection"]||i.multiplex===!1||d;let g;return m?g=new oh(o,i):(Ro[c]||(Ro[c]=new oh(o,i)),g=Ro[c]),r.query&&!i.query&&(i.query=r.queryKey),g.socket(r.path,i)}Object.assign(zc,{Manager:oh,Socket:A0,io:zc,connect:zc});let Ad=null;function dr(){return Ad||(Ad=zc({transports:["websocket"],autoConnect:!0})),Ad}async function RR(){const n=dr();return await Ko(n),n.emitWithAck("health.get")}async function Ko(n){n.connected||await new Promise((i,r)=>{const o=()=>{f(),i()},c=d=>{f(),r(d)},f=()=>{n.off("connect",o),n.off("connect_error",c)};n.on("connect",o),n.on("connect_error",c),n.connect()})}async function OR(n){const i=dr();return await Ko(i),i.emitWithAck("logs.history",n)}async function CR(n,i){const r=dr();return await Ko(r),r.emitWithAck("logs.dimensions",{chatroomId:n,limit:i})}async function AR(){const n=dr();return await Ko(n),n.emitWithAck("chatrooms.list")}async function _R(n){const i=dr();return await Ko(i),i.emitWithAck("eventStream.history",n??{})}function MR(n){const i=dr();return i.connect(),i.emit("eventStream.stream.subscribe"),i.on("eventStream.stream",n),()=>i.off("eventStream.stream",n)}function NR(n){const i=dr();return i.connect(),i.emit("logs.stream.subscribe"),i.on("logs.stream",n),()=>i.off("logs.stream",n)}function DR(){return Hv({queryKey:["daemon","health"],queryFn:async()=>{const n=await RR();if(!n.ok)throw new Error(n.error.message);return n.data},retry:2})}const zR={info:{badge:"bg-chatroom-status-info/15 text-chatroom-status-info"},success:{badge:"bg-chatroom-status-success/15 text-chatroom-status-success"},warning:{badge:"bg-chatroom-status-warning/15 text-chatroom-status-warning"},error:{badge:"bg-chatroom-status-error/15 text-chatroom-status-error"},muted:{badge:"bg-chatroom-text-muted/15 text-chatroom-text-muted"},purple:{badge:"bg-chatroom-status-purple/15 text-chatroom-status-purple"}};function kR(n){return zR[n]}const jR={"agent.started":["Agent Started","success"],"agent.exited":["Agent Exited","error"],"agent.circuitOpen":["Circuit Open","warning"],"agent.requestStart":["Agent Request Start","warning"],"agent.requestStop":["Agent Request Stop","error"],"agent.registered":["Agent Registered","success"],"agent.waiting":["Agent Waiting","success"],"agent.startFailed":["Agent Start Failed","error"],"agent.providerUnavailable":["Provider Unavailable","warning"],"agent.sessionResumeRequested":["Session Reconnect Requested","info"],"agent.sessionResumed":["Session Reconnected","success"],"agent.sessionResumeFailed":["Session Reconnect Failed","warning"],"agent.sessionReopenRetry":["Session Reopen Retry","info"],"agent.sessionCompacted":["Session Compacted","info"],"agent.sessionAugmented":["Session Augmented","info"],"agent.resumeStormAborted":["Resume Storm Aborted","error"],"agent.restart":["Agent Restarting","info"],"agent.restartCompleted":["Agent Restarted","success"],"agent.restartPhase":["Agent Restart Progress","info"],"agent.restartLimitReached":["Agent Restart Limit","error"],"agent.stopTimeout":["Agent Stop Timeout","warning"],"agent.harnessSessionIdUpdated":["Harness Session ID Updated","info"],"agent.awaitingHandoff":["Awaiting Handoff","warning"],"agent.enhancing":["Planning Review","info"],"agent.taskDelivered":["Task Delivered","success"],"agent.taskDeliveryFailed":["Task Delivery Failed","error"],"machine.switched":["Machine Switched","info"],"connection.terminated":["Connection Terminated","muted"],"workflow.started":["Workflow Started","info"],"workflow.stepCompleted":["Workflow Step Completed","success"],"workflow.stepCancelled":["Workflow Step Cancelled","warning"],"workflow.completed":["Workflow Completed","success"],"workflow.created":["Workflow Created","info"],"workflow.specified":["Workflow Specified","info"],"workflow.stepStarted":["Workflow Step Started","info"],"task.activated":["Task Activated","success"],"task.acknowledged":["Task Acknowledged","success"],"task.inProgress":["Task In Progress","info"],"task.completed":["Task Completed","success"],"skill.activated":["Skill Activated","purple"],"daemon.ping":["Daemon Ping","muted"],"daemon.pong":["Daemon Pong","muted"],"daemon.gitRefresh":["Git Refresh","muted"],"daemon.workspaceListChanged":["Workspace List Changed","muted"],"daemon.refreshCapabilities":["Capabilities Refresh","muted"],"daemon.pickFolder":["Pick Folder","muted"],"daemon.localAction":["Local Action","muted"],"config.requestRemoval":["Config Request Removal","warning"],"command.run":["Command Run","warning"],"command.stop":["Command Stop","error"],"enhancer.job.created":["Planning Review Started","info"],"enhancer.attempt.failed":["Planning Review Attempt Failed","warning"],"enhancer.job.failed":["Planning Review Failed","error"],"enhancer.job.complete":["Planning Review Complete","success"],"enhancer.job.cancelled":["Planning Review Cancelled","warning"]},UR=Object.fromEntries(Object.entries(jR).map(([n,[i,r]])=>[n,{label:i,classification:r}]));function LR(n){const i=n.toLowerCase();return i.includes("failed")||i.includes("error")||i.includes("timeout")?"error":n.startsWith("task.")?"success":n.startsWith("agent.")||n.startsWith("workflow.")||n.startsWith("enhancer.")?"info":n.startsWith("daemon.")?"muted":n.startsWith("command.")?"warning":n.startsWith("skill.")?"purple":"muted"}function BR(n){return UR[n]??{label:n,classification:LR(n)}}function _0({type:n,className:i}){const r=BR(n);return A.jsx("span",{className:un("shrink-0 rounded px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider",kR(r.classification).badge,i),children:r.label})}function eu(){return typeof window<"u"}function $t(n){return zh(n)?(n.nodeName||"").toLowerCase():"#document"}function kt(n){var i;return(n==null||(i=n.ownerDocument)==null?void 0:i.defaultView)||window}function Xi(n){var i;return(i=(zh(n)?n.ownerDocument:n.document)||window.document)==null?void 0:i.documentElement}function zh(n){return eu()?n instanceof Node||n instanceof kt(n).Node:!1}function Je(n){return eu()?n instanceof Element||n instanceof kt(n).Element:!1}function Rt(n){return eu()?n instanceof HTMLElement||n instanceof kt(n).HTMLElement:!1}function xa(n){return!eu()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof kt(n).ShadowRoot}function hr(n){const{overflow:i,overflowX:r,overflowY:o,display:c}=zn(n);return/auto|scroll|overlay|hidden|clip/.test(i+o+r)&&c!=="inline"&&c!=="contents"}function HR(n){return/^(table|td|th)$/.test($t(n))}function tu(n){try{if(n.matches(":popover-open"))return!0}catch{}try{return n.matches(":modal")}catch{return!1}}const qR=/transform|translate|scale|rotate|perspective|filter/,YR=/paint|layout|strict|content/,Ws=n=>!!n&&n!=="none";let _d;function kh(n){const i=Je(n)?zn(n):n;return Ws(i.transform)||Ws(i.translate)||Ws(i.scale)||Ws(i.rotate)||Ws(i.perspective)||!jh()&&(Ws(i.backdropFilter)||Ws(i.filter))||qR.test(i.willChange||"")||YR.test(i.contain||"")}function VR(n){let i=As(n);for(;Rt(i)&&!Cs(i);){if(kh(i))return i;if(tu(i))return null;i=As(i)}return null}function jh(){return _d==null&&(_d=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),_d}function Cs(n){return/^(html|body|#document)$/.test($t(n))}function zn(n){return kt(n).getComputedStyle(n)}function nu(n){return Je(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function As(n){if($t(n)==="html")return n;const i=n.assignedSlot||n.parentNode||xa(n)&&n.host||Xi(n);return xa(i)?i.host:i}function M0(n){const i=As(n);return Cs(i)?(n.ownerDocument||n).body:Rt(i)&&hr(i)?i:M0(i)}function zo(n,i,r){var o;i===void 0&&(i=[]),r===void 0&&(r=!0);const c=M0(n),f=c===((o=n.ownerDocument)==null?void 0:o.body),d=kt(c);if(f){const m=lh(d);return i.concat(d,d.visualViewport||[],hr(c)?c:[],m&&r?zo(m):[])}else return i.concat(c,zo(c,[],r))}function lh(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}const Uh={...o1},Md=Uh.useInsertionEffect,GR=Md&&Md!==Uh.useLayoutEffect?Md:n=>n();function $e(n){const i=Qi(QR).current;return i.next=n,GR(i.effect),i.trampoline}function QR(){const n={next:void 0,callback:XR,trampoline:(...i)=>{var r;return(r=n.callback)==null?void 0:r.call(n,...i)},effect:()=>{n.callback=n.next}};return n}function XR(){}const FR=()=>{},Xe=typeof document<"u"?O.useLayoutEffect:FR,KR=O.createContext(void 0);function ZR(n=!1){const i=O.useContext(KR);if(i===void 0&&!n)throw new Error(ur(16));return i}function PR(n){const{focusableWhenDisabled:i,disabled:r,composite:o=!1,tabIndex:c=0,isNativeButton:f}=n,d=o&&i!==!1,m=o&&i===!1;return{props:O.useMemo(()=>{const p={onKeyDown(y){r&&i&&y.key!=="Tab"&&y.preventDefault()}};return o||(p.tabIndex=c,!f&&r&&(p.tabIndex=i?c:-1)),(f&&(i||d)||!f&&r)&&(p["aria-disabled"]=r),f&&(!i||m)&&(p.disabled=r),p},[o,r,i,d,m,f,c])}}function N0(n={}){const{disabled:i=!1,focusableWhenDisabled:r,tabIndex:o=0,native:c=!0,composite:f}=n,d=O.useRef(null),m=ZR(!0),g=f??m!==void 0,{props:p}=PR({focusableWhenDisabled:r,disabled:i,composite:g,tabIndex:o,isNativeButton:c}),y=O.useCallback(()=>{const E=d.current;Nd(E)&&g&&i&&p.disabled===void 0&&E.disabled&&(E.disabled=!1)},[i,p.disabled,g]);Xe(y,[y]);const v=O.useCallback((E={})=>{const{onClick:x,onMouseDown:w,onKeyUp:_,onKeyDown:D,onPointerDown:C,...j}=E;return Fo({onClick(k){if(i){k.preventDefault();return}x==null||x(k)},onMouseDown(k){i||w==null||w(k)},onKeyDown(k){if(i||(Bc(k),D==null||D(k),k.baseUIHandlerPrevented))return;const q=k.target===k.currentTarget,F=k.currentTarget,B=Nd(F),U=!c&&IR(F),K=q&&(c?B:!U),se=k.key==="Enter",pe=k.key===" ",ae=F.getAttribute("role"),W=(ae==null?void 0:ae.startsWith("menuitem"))||ae==="option"||ae==="gridcell";if(q&&g&&pe){if(k.defaultPrevented&&W)return;k.preventDefault(),U||c&&B?(F.click(),k.preventBaseUIHandler()):K&&(x==null||x(k),k.preventBaseUIHandler());return}K&&(!c&&(pe||se)&&k.preventDefault(),!c&&se&&(x==null||x(k)))},onKeyUp(k){if(!i){if(Bc(k),_==null||_(k),k.target===k.currentTarget&&c&&g&&Nd(k.currentTarget)&&k.key===" "){k.preventDefault();return}k.baseUIHandlerPrevented||k.target===k.currentTarget&&!c&&!g&&k.key===" "&&(x==null||x(k))}},onPointerDown(k){if(i){k.preventDefault();return}C==null||C(k)}},c?{type:"button"}:{role:"button"},p,j)},[i,p,g,c]),S=$e(E=>{d.current=E,y()});return{getButtonProps:v,buttonRef:S}}function Nd(n){return Rt(n)&&n.tagName==="BUTTON"}function IR(n){return!!((n==null?void 0:n.tagName)==="A"&&(n!=null&&n.href))}const JR=O.forwardRef(function(i,r){const{render:o,className:c,disabled:f=!1,focusableWhenDisabled:d=!1,nativeButton:m=!0,style:g,...p}=i,{getButtonProps:y,buttonRef:v}=N0({disabled:f,focusableWhenDisabled:d,native:m});return Ra("button",i,{state:{disabled:f},ref:[r,v],props:[p,y]})}),WR=Iv("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-none text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input",ghost:"hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-4 py-2",sm:"h-8 px-3"}},defaultVariants:{variant:"default",size:"default"}});function D0({className:n,variant:i="default",size:r="default",...o}){return A.jsx(JR,{"data-slot":"button",className:un(WR({variant:i,size:r,className:n})),...o})}function $R(n,i){return new Date(n).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1,timeZone:i==null?void 0:i.timeZone})}function z0(n,i){return new Date(n).toLocaleString(void 0,{timeZone:i==null?void 0:i.timeZone})}function eO({entry:n,onClose:i}){const r=n.payload;return A.jsxs("aside",{className:"flex w-96 max-w-[40%] shrink-0 flex-col border-l border-chatroom-border bg-chatroom-bg-primary",role:"dialog","aria-modal":"true","aria-label":"Event detail",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-chatroom-border px-4 py-3",children:[A.jsx("h3",{className:"text-sm font-medium",children:"Event detail"}),A.jsx(D0,{variant:"ghost",size:"sm",onClick:i,"aria-label":"Close detail panel",children:A.jsx(h0,{className:"size-4"})})]}),A.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4 text-xs",children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A.jsx(_0,{type:n.type}),A.jsx("span",{className:"text-chatroom-text-muted",children:z0(n.timestamp)})]}),A.jsxs("div",{className:"space-y-1 text-chatroom-text-muted",children:[A.jsxs("div",{children:["Type: ",A.jsx("span",{className:"text-chatroom-text-primary",children:n.type})]}),A.jsxs("div",{children:["ID: ",A.jsx("span",{className:"text-chatroom-text-primary",children:n.id})]}),typeof r.chatroomId=="string"&&A.jsxs("div",{children:["Chatroom: ",A.jsx("span",{className:"text-chatroom-text-primary",children:r.chatroomId})]})]}),A.jsxs("div",{children:[A.jsx("p",{className:"mb-1 text-chatroom-text-muted",children:"Payload"}),A.jsx("pre",{className:"whitespace-pre-wrap border border-chatroom-border bg-chatroom-bg-secondary p-2 font-mono text-[11px]",children:JSON.stringify(r,null,2)})]})]})]})}function tO(n,i,r){const o=i.trim().toLowerCase();return o?n.filter(c=>r(c).toLowerCase().includes(o)):[...n]}function Vc({children:n,selected:i,onSelect:r,disabled:o,className:c,endAdornment:f,trailingActions:d,multiline:m=!1}){const g=un("min-w-0 px-3 py-2 text-xs text-left flex justify-between gap-2",m?"items-start":"items-center","cursor-pointer hover:bg-chatroom-bg-hover transition-colors","outline-none focus-visible:outline-none focus-visible:bg-chatroom-bg-hover","disabled:opacity-50 disabled:cursor-not-allowed",i&&"bg-chatroom-bg-hover",d?"flex-1 rounded-none":"w-full",!d&&c),p=A.jsxs("button",{type:"button",role:"option","aria-selected":i??!1,disabled:o,onClick:r,className:g,children:[A.jsx("span",{className:un("min-w-0 flex-1",m?"overflow-hidden":"truncate"),children:n}),f,i&&!d?A.jsx(bw,{size:12,className:"shrink-0 text-chatroom-accent"}):null]});return d?A.jsxs("div",{className:un("flex items-center w-full min-w-0",c),children:[p,d]}):p}function nO({children:n,className:i,maxHeightClassName:r="max-h-[60vh]"}){return A.jsx("div",{"data-picker-scroll-body":!0,className:un("min-h-0 overflow-y-auto overscroll-contain",r,i),children:n})}function iO({value:n,onChange:i,placeholder:r="Search…",autoFocus:o,className:c}){const f=o??!0;return A.jsx("div",{className:un("px-3 py-1.5 border-b border-chatroom-border shrink-0",c),"data-vaul-no-drag":"",onPointerDown:d=>d.stopPropagation(),onClick:d=>{const m=d.currentTarget.querySelector("input");m==null||m.focus()},children:A.jsx("input",{type:"search",enterKeyHint:"search",value:n,onChange:d=>i(d.target.value),placeholder:r,autoFocus:f,"data-vaul-no-drag":"",onPointerDown:d=>d.stopPropagation(),className:"w-full bg-chatroom-bg-tertiary border border-chatroom-border px-2 py-1 text-[11px] text-chatroom-text-primary placeholder:text-chatroom-text-muted focus:outline-none focus:border-chatroom-accent rounded-none"})})}const k0="min-w-[8rem] max-w-[14rem] border border-chatroom-border bg-chatroom-bg-secondary text-xs text-chatroom-text-primary px-2 py-1.5 h-[28px] cursor-pointer hover:border-chatroom-border-strong focus:outline-none focus:border-chatroom-accent disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-between gap-1",j0="shrink-0 text-chatroom-text-muted";function sO(n){const[i,r]=O.useState(""),o=O.useCallback(c=>{c||r(""),n(c)},[n]);return{searchTerm:i,setSearchTerm:r,handleOpenChange:o}}const rO=[];function Lh(n){O.useEffect(n,rO)}const Oo=0;class ei{constructor(){tt(this,"currentId",Oo);tt(this,"clear",()=>{this.currentId!==Oo&&(clearTimeout(this.currentId),this.currentId=Oo)});tt(this,"disposeEffect",()=>this.clear)}static create(){return new ei}start(i,r){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Oo,r()},i)}isStarted(){return this.currentId!==Oo}}function Ea(){const n=Qi(ei.create).current;return Lh(n.disposeEffect),n}function aO(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:oO,platform:lO,maxTouchPoints:cO}=aO(),iu=oO.toLowerCase(),ko=lO.toLowerCase(),su=/^i(os$|p)/.test(ko)||ko==="macintel"&&cO>1,Ab="android",ch=ko===Ab||iu.includes(Ab),uO=!su&&ko.startsWith("mac");ko.startsWith("win");const fO=uO||su;var Cv;const Aa=typeof CSS<"u"&&!!((Cv=CSS.supports)!=null&&Cv.call(CSS,"-webkit-backdrop-filter:none"));!Aa&&iu.includes("firefox");!Aa&&iu.includes("chrom");const dO=fO,hO=/jsdom|happydom/.test(iu);function mO(n){n.preventDefault(),n.stopPropagation()}function pO(n){return"nativeEvent"in n}function gO(n){return n.pointerType===""&&n.isTrusted?!0:ch&&n.pointerType?n.type==="click"&&n.buttons===1:n.detail===0&&!n.pointerType}function yO(n){return hO?!1:!ch&&n.width===0&&n.height===0||ch&&n.width===1&&n.height===1&&n.pressure===0&&n.detail===0&&n.pointerType==="mouse"||n.width<1&&n.height<1&&n.pressure===0&&n.detail===0&&n.pointerType==="touch"}function jo(n,i){const r=["mouse","pen"];return i||r.push("",void 0),r.includes(n)}function bO(n){const i=n.type;return i==="click"||i==="mousedown"||i==="keydown"||i==="keyup"}const uh="data-base-ui-focusable",U0="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ui(n){var r;let i=n.activeElement;for(;((r=i==null?void 0:i.shadowRoot)==null?void 0:r.activeElement)!=null;)i=i.shadowRoot.activeElement;return i}function Me(n,i){var o;if(!n||!i)return!1;const r=(o=i.getRootNode)==null?void 0:o.call(i);if(n.contains(i))return!0;if(r&&xa(r)){let c=i;for(;c;){if(n===c)return!0;c=c.parentNode||c.host}}return!1}function $n(n){return"composedPath"in n?n.composedPath()[0]:n.target}function L0(n,i){if(!Je(n))return!1;const r=n;if(i.hasElement(r))return!r.hasAttribute("data-trigger-disabled");for(const[,o]of i.entries())if(Me(o,r))return!o.hasAttribute("data-trigger-disabled");return!1}function Dd(n,i){if(i==null)return!1;if("composedPath"in n)return n.composedPath().includes(i);const r=n;return r.target!=null&&i.contains(r.target)}function vO(n){return n.matches("html,body")}function Bh(n){return Rt(n)&&n.matches(U0)}function SO(n){return(n==null?void 0:n.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${U0}`))!=null}function _b(n){return n?n.getAttribute("role")==="combobox"&&Bh(n):!1}function Mb(n){return n?n.hasAttribute(uh)?n:n.querySelector(`[${uh}]`)||n:null}function xO(n,i){return i!=null&&!jo(i)?0:typeof n=="function"?n():n}function fh(n,i,r){const o=xO(n,r);return typeof o=="number"?o:o==null?void 0:o[i]}function Nb(n){return typeof n=="function"?n():n}function B0(n,i){return i||n==="click"||n==="mousedown"}function EO(n){return(n==null?void 0:n.includes("mouse"))&&n!=="mousedown"}const TO="none",Uo="trigger-press",xn="trigger-hover",H0="outside-press",wO="close-press",Lo="focus-out",q0="escape-key",RO="imperative-action";function Xt(n,i,r,o){let c=!1,f=!1;const d=Wt;return{reason:n,event:i??new Event("base-ui"),cancel(){c=!0},allowPropagation(){f=!0},get isCanceled(){return c},get isPropagationAllowed(){return f},trigger:r,...d}}function Ke(n,i,r,o){return n.addEventListener(i,r,o),()=>{n.removeEventListener(i,r,o)}}function qi(...n){return()=>{for(let i=0;i<n.length;i+=1){const r=n[i];r&&r()}}}function En(n){const i=Qi(OO,n).current;return i.next=n,Xe(i.effect),i}function OO(n){const i={current:n,next:n,effect:()=>{i.current=i.next}};return i}const Sc=null;class CO{constructor(){tt(this,"callbacks",[]);tt(this,"callbacksCount",0);tt(this,"nextId",1);tt(this,"startId",1);tt(this,"isScheduled",!1);tt(this,"tick",i=>{var c;this.isScheduled=!1;const r=this.callbacks,o=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,o>0)for(let f=0;f<r.length;f+=1)(c=r[f])==null||c.call(r,i)})}request(i){const r=this.nextId;return this.nextId+=1,this.callbacks.push(i),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),r}cancel(i){const r=i-this.startId;r<0||r>=this.callbacks.length||(this.callbacks[r]=null,this.callbacksCount-=1)}}const xc=new CO;class di{constructor(){tt(this,"currentId",Sc);tt(this,"cancel",()=>{this.currentId!==Sc&&(xc.cancel(this.currentId),this.currentId=Sc)});tt(this,"disposeEffect",()=>this.cancel)}static create(){return new di}static request(i){return xc.request(i)}static cancel(i){return xc.cancel(i)}request(i){this.cancel(),this.currentId=xc.request(()=>{this.currentId=Sc,i()})}}function Hh(){const n=Qi(di.create).current;return Lh(n.disposeEffect),n}function ut(n){return(n==null?void 0:n.ownerDocument)||document}const AO={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},_O={...AO,position:"fixed",top:0,left:0},Ta=O.forwardRef(function(i,r){const[o,c]=O.useState();Xe(()=>{dO&&Aa&&c("button")},[]);const f={tabIndex:0,role:o};return A.jsx("span",{...i,ref:r,style:_O,"aria-hidden":o?void 0:!0,...f,"data-base-ui-focus-guard":""})}),MO=["top","right","bottom","left"],wa=Math.min,Yi=Math.max,Gc=Math.round,Ec=Math.floor,Vi=n=>({x:n,y:n}),NO={left:"right",right:"left",bottom:"top",top:"bottom"};function Y0(n,i,r){return Yi(n,wa(i,r))}function Gi(n,i){return typeof n=="function"?n(i):n}function Dn(n){return n.split("-")[0]}function Ds(n){return n.split("-")[1]}function qh(n){return n==="x"?"y":"x"}function Yh(n){return n==="y"?"height":"width"}function Fn(n){const i=n[0];return i==="t"||i==="b"?"y":"x"}function Vh(n){return qh(Fn(n))}function DO(n,i,r){r===void 0&&(r=!1);const o=Ds(n),c=Vh(n),f=Yh(c);let d=c==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return i.reference[f]>i.floating[f]&&(d=Qc(d)),[d,Qc(d)]}function zO(n){const i=Qc(n);return[dh(n),i,dh(i)]}function dh(n){return n.includes("start")?n.replace("start","end"):n.replace("end","start")}const Db=["left","right"],zb=["right","left"],kO=["top","bottom"],jO=["bottom","top"];function UO(n,i,r){switch(n){case"top":case"bottom":return r?i?zb:Db:i?Db:zb;case"left":case"right":return i?kO:jO;default:return[]}}function LO(n,i,r,o){const c=Ds(n);let f=UO(Dn(n),r==="start",o);return c&&(f=f.map(d=>d+"-"+c),i&&(f=f.concat(f.map(dh)))),f}function Qc(n){const i=Dn(n);return NO[i]+n.slice(i.length)}function BO(n){var i,r,o,c;return{top:(i=n.top)!=null?i:0,right:(r=n.right)!=null?r:0,bottom:(o=n.bottom)!=null?o:0,left:(c=n.left)!=null?c:0}}function V0(n){return typeof n!="number"?BO(n):{top:n,right:n,bottom:n,left:n}}function Xc(n){const{x:i,y:r,width:o,height:c}=n;return{width:o,height:c,top:r,left:i,right:i+o,bottom:r+c,x:i,y:r}}function HO(n){return n.visibility==="hidden"||n.visibility==="collapse"}function G0(n,i=n?zn(n):null){return!n||!n.isConnected||!i||HO(i)?!1:typeof n.checkVisibility=="function"?n.checkVisibility():i.display!=="none"&&i.display!=="contents"}const qO='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function YO(n){const i=n.assignedSlot;if(i)return i;if(n.parentElement)return n.parentElement;const r=n.getRootNode();return xa(r)?r.host:null}function hh(n){for(const i of Array.from(n.children))if($t(i)==="summary")return i;return null}function VO(n,i){const r=hh(i);return!!r&&(n===r||Me(r,n))}function Q0(n){const i=n?$t(n):"";return n!=null&&n.matches(qO)&&(i!=="summary"||n.parentElement!=null&&$t(n.parentElement)==="details"&&hh(n.parentElement)===n)&&(i!=="details"||hh(n)==null)&&(i!=="input"||n.type!=="hidden")}function X0(n){if(!Q0(n)||!n.isConnected||n.matches(":disabled"))return!1;for(let i=n;i;i=YO(i)){const r=i!==n,o=$t(i)==="slot";if(i.hasAttribute("inert")||r&&$t(i)==="details"&&!i.open&&!VO(n,i)||i.hasAttribute("hidden")||!o&&!GO(i,r))return!1}return!0}function GO(n,i){const r=zn(n);return i?r.display!=="none":G0(n,r)}function F0(n){const i=n.tabIndex;if(i<0){const r=$t(n);if(r==="details"||r==="audio"||r==="video"||Rt(n)&&n.isContentEditable)return 0}return i}function zd(n){if($t(n)!=="input")return null;const i=n;return i.type==="radio"&&i.name!==""?i:null}function QO(n,i){const r=zd(n);if(!r)return!0;const o=i.find(c=>{const f=zd(c);return(f==null?void 0:f.name)===r.name&&f.form===r.form&&f.checked});return o?o===r:i.find(c=>{const f=zd(c);return(f==null?void 0:f.name)===r.name&&f.form===r.form})===r}function K0(n){if(Rt(n)&&$t(n)==="slot"){const i=n.assignedElements({flatten:!0});if(i.length>0)return i}return Rt(n)&&n.shadowRoot?Array.from(n.shadowRoot.children):Array.from(n.children)}function Z0(n,i){K0(n).forEach(r=>{Q0(r)&&i.push(r),Z0(r,i)})}function P0(n,i,r){K0(n).forEach(o=>{Rt(o)&&o.matches(i)&&r.push(o),P0(o,i,r)})}function Gh(n){return X0(n)&&F0(n)>=0}function I0(n){const i=[];return Z0(n,i),i.filter(X0)}function Zo(n){const i=I0(n);return i.filter(r=>F0(r)>=0&&QO(r,i))}function J0(n,i){const r=Zo(n),o=r.length;if(o===0)return;const c=Ui(ut(n)),f=r.indexOf(c),d=f===-1?i===1?0:o-1:f+i;return r[d]}function Qh(n){return J0(ut(n).body,1)||n}function W0(n){return J0(ut(n).body,-1)||n}function $0(n,i){if(!n)return null;const r=Zo(ut(n).body),o=r.length;if(o===0)return null;const c=r.indexOf(n);if(c===-1)return null;const f=(c+i+o)%o;return r[f]}function XO(n){return $0(n,1)}function FO(n){return $0(n,-1)}function ra(n,i){const r=i||n.currentTarget,o=n.relatedTarget;return!o||!Me(r,o)}function KO(n){Zo(n).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function kb(n){const i=[];P0(n,"[data-tabindex]",i),i.forEach(r=>{const o=r.dataset.tabindex;delete r.dataset.tabindex,o?r.setAttribute("tabindex",o):r.removeAttribute("tabindex")})}function _s(n,i,r=!0){return n.filter(c=>c.parentId===i).flatMap(c=>{var f;return[...!r||(f=c.context)!=null&&f.open?[c]:[],..._s(n,c.id,r)]})}function jb(n,i){var c;let r=[],o=(c=n.find(f=>f.id===i))==null?void 0:c.parentId;for(;o;){const f=n.find(d=>d.id===o);o=f==null?void 0:f.parentId,f&&(r=r.concat(f))}return r}function Fc(n){return`data-base-ui-${n}`}let Tc=0;function kd(n,i={}){const{preventScroll:r=!1,sync:o=!1,shouldFocus:c}=i;cancelAnimationFrame(Tc);function f(){c&&!c()||n==null||n.focus({preventScroll:r})}if(o)return f(),Rh;const d=requestAnimationFrame(f);return Tc=d,()=>{Tc===d&&(cancelAnimationFrame(d),Tc=0)}}const jd={inert:new WeakMap,"aria-hidden":new WeakMap},Ub="data-base-ui-inert",mh={inert:new WeakSet,"aria-hidden":new WeakSet};let Co=new WeakMap,Ud=0;function ZO(n){return mh[n]}function eS(n){return n?xa(n)?n.host:eS(n.parentNode):null}const Lb=(n,i)=>i.map(r=>{if(n.contains(r))return r;const o=eS(r);return n.contains(o)?o:null}).filter(r=>r!=null),Bb=n=>{const i=new Set;return n.forEach(r=>{let o=r;for(;o&&!i.has(o);)i.add(o),o=o.parentNode}),i},Hb=(n,i,r)=>{const o=[],c=f=>{!f||r.has(f)||Array.from(f.children).forEach(d=>{$t(d)!=="script"&&(i.has(d)?c(d):o.push(d))})};return c(n),o};function PO(n,i,r,o,{mark:c=!0}){let f=null;o?f="inert":r&&(f="aria-hidden");let d=null,m=null;const g=Lb(i,n),p=c?Hb(i,Bb(g),new Set(g)):[],y=[],v=[];if(f){const S=jd[f],E=ZO(f);m=E,d=S;const x=Lb(i,Array.from(i.querySelectorAll("[aria-live]"))),w=g.concat(x);Hb(i,Bb(w),new Set(w)).forEach(D=>{const C=D.getAttribute(f),j=C!==null&&C!=="false",k=(S.get(D)||0)+1;S.set(D,k),y.push(D),k===1&&j&&E.add(D),j||D.setAttribute(f,f==="inert"?"":"true")})}return c&&p.forEach(S=>{const E=(Co.get(S)||0)+1;Co.set(S,E),v.push(S),E===1&&S.setAttribute(Ub,"")}),Ud+=1,()=>{d&&y.forEach(S=>{const x=(d.get(S)||0)-1;d.set(S,x),x||(!(m!=null&&m.has(S))&&f&&S.removeAttribute(f),m==null||m.delete(S))}),c&&v.forEach(S=>{const E=(Co.get(S)||0)-1;Co.set(S,E),E||S.removeAttribute(Ub)}),Ud-=1,Ud||(jd.inert=new WeakMap,jd["aria-hidden"]=new WeakMap,mh.inert=new WeakSet,mh["aria-hidden"]=new WeakSet,Co=new WeakMap)}}function qb(n,i={}){const{ariaHidden:r=!1,inert:o=!1,mark:c=!0}=i,f=ut(n[0]).body;return PO(n,f,r,o,{mark:c})}var Ms=qv();let Yb=0;function IO(n,i="mui"){const[r,o]=O.useState(n),c=n||r;return O.useEffect(()=>{r==null&&(Yb+=1,o(`${i}-${Yb}`))},[r,i]),c}const Vb=Uh.useId;function Po(n,i){if(Vb!==void 0){const r=Vb();return n??(i?`${i}-${r}`:r)}return IO(n,i)}const JO=500,WO={style:{transition:"none"}},tS="data-base-ui-click-trigger",$O={fallbackAxisSide:"end"},eC={clipPath:"inset(50%)",position:"fixed",top:0,left:0},nS=O.createContext(null),iS=()=>O.useContext(nS),tC=Fc("portal");function nC(n={}){const{ref:i,container:r,componentProps:o=Wt,elementProps:c}=n,f=Po(),d=iS(),m=d==null?void 0:d.portalNode,[g,p]=O.useState(null),[y,v]=O.useState(null),S=$e(_=>{_!==null&&v(_)}),E=O.useRef(null);Xe(()=>{if(r===null){E.current&&(E.current=null,v(null),p(null));return}if(f==null)return;const _=(r&&(zh(r)?r:r.current))??m??document.body;if(_==null){E.current&&(E.current=null,v(null),p(null));return}E.current!==_&&(E.current=_,v(null),p(_))},[r,m,f]);const x=Ra("div",o,{ref:[i,S],props:[{id:f,[tC]:""},c]});return{portalNode:y,portalSubtree:g&&x?Ms.createPortal(x,g):null}}const iC=O.forwardRef(function(i,r){const{render:o,className:c,style:f,children:d,container:m,renderGuards:g,...p}=i,{portalNode:y,portalSubtree:v}=nC({container:m,ref:r,componentProps:i,elementProps:p}),S=O.useRef(null),E=O.useRef(null),x=O.useRef(null),w=O.useRef(null),[_,D]=O.useState(null),C=O.useRef(!1),j=_==null?void 0:_.modal,k=_==null?void 0:_.open,q=typeof g=="boolean"?g:!!_&&!_.modal&&_.open&&!!y;O.useEffect(()=>{if(!y||j)return;function B(U){y&&U.relatedTarget&&ra(U)&&(U.type==="focusin"?C.current&&(kb(y),C.current=!1):(KO(y),C.current=!0))}return qi(Ke(y,"focusin",B,!0),Ke(y,"focusout",B,!0))},[y,j]),Xe(()=>{!y||k!==!0||!C.current||(kb(y),C.current=!1)},[k,y]);const F=O.useMemo(()=>({beforeOutsideRef:S,afterOutsideRef:E,beforeInsideRef:x,afterInsideRef:w,portalNode:y,setFocusManagerState:D}),[y]);return A.jsxs(O.Fragment,{children:[v,A.jsxs(nS.Provider,{value:F,children:[q&&y&&A.jsx(Ta,{"data-type":"outside",ref:S,onFocus:B=>{var U;if(ra(B,y))(U=x.current)==null||U.focus();else{const K=_?_.domReference:null,se=W0(K);se==null||se.focus()}}}),q&&y&&A.jsx("span",{"aria-owns":y.id,style:eC}),y&&Ms.createPortal(d,y),q&&y&&A.jsx(Ta,{"data-type":"outside",ref:E,onFocus:B=>{var U;if(ra(B,y))(U=w.current)==null||U.focus();else{const K=_?_.domReference:null,se=Qh(K);se==null||se.focus(),_!=null&&_.closeOnFocusOut&&(_==null||_.onOpenChange(!1,Xt(Lo,B.nativeEvent)))}}})]})]})});function sS(){const n=new Map;return{emit(i,r){var o;(o=n.get(i))==null||o.forEach(c=>c(r))},on(i,r){n.has(i)||n.set(i,new Set),n.get(i).add(r)},off(i,r){var o;(o=n.get(i))==null||o.delete(r)}}}class sC{constructor(){tt(this,"nodesRef",{current:[]});tt(this,"events",sS())}addNode(i){this.nodesRef.current.push(i)}removeNode(i){const r=this.nodesRef.current.findIndex(o=>o===i);r!==-1&&this.nodesRef.current.splice(r,1)}}const rS=O.createContext(null),aS=O.createContext(null),_a=()=>{var n;return((n=O.useContext(rS))==null?void 0:n.id)||null},Ma=n=>{const i=O.useContext(aS);return n??i};function rC(n){const i=Po(),r=Ma(n),o=_a();return Xe(()=>{if(!i)return;const c={id:i,parentId:o};return r==null||r.addNode(c),()=>{r==null||r.removeNode(c)}},[r,i,o]),i}function aC(n){const{children:i,id:r}=n,o=_a();return A.jsx(rS.Provider,{value:O.useMemo(()=>({id:r,parentId:o}),[r,o]),children:i})}function oC(n){const{children:i,externalTree:r}=n,o=Qi(()=>r??new sC).current;return A.jsx(aS.Provider,{value:o,children:i})}function Li(n){return n==null?n:"current"in n?n.current:n}function lC(n,i){const r=kt($n(n));return n instanceof r.KeyboardEvent?"keyboard":n instanceof r.FocusEvent?i||"keyboard":"pointerType"in n?n.pointerType||"keyboard":"touches"in n?"touch":n instanceof r.MouseEvent?i||(n.detail===0?"keyboard":"mouse"):""}const cC=20;let Rs=[];function Xh(){Rs=Rs.filter(n=>{var i;return(i=n.deref())==null?void 0:i.isConnected})}function Gb(n){Xh(),n&&$t(n)!=="body"&&(Rs.push(new WeakRef(n)),Rs.length>cC&&(Rs=Rs.slice(-20)))}function Qb(){var n;return Xh(),(n=Rs[Rs.length-1])==null?void 0:n.deref()}function uC(n){return n?Gh(n)?n:Zo(n)[0]||n:null}function Xb(n){var c;if(n.hasAttribute("tabindex")&&!n.hasAttribute("data-tabindex")||!((c=n.getAttribute("role"))!=null&&c.includes("dialog")))return;const r=I0(n).filter(f=>{const d=f.getAttribute("data-tabindex")||"";return Gh(f)||f.hasAttribute("data-tabindex")&&!d.startsWith("-")}),o=n.getAttribute("tabindex");r.length===0?o!=="0"&&(n.setAttribute("tabindex","0"),n.setAttribute("data-tabindex","0")):(o!=="-1"||n.hasAttribute("data-tabindex")&&n.getAttribute("data-tabindex")!=="-1")&&(n.setAttribute("tabindex","-1"),n.setAttribute("data-tabindex","-1"))}function fC(n){const{context:i,children:r,disabled:o=!1,initialFocus:c=!0,returnFocus:f=!0,restoreFocus:d=!1,modal:m=!0,closeOnFocusOut:g=!0,openInteractionType:p="",nextFocusableElement:y,previousFocusableElement:v,beforeContentFocusGuardRef:S,externalTree:E,getInsideElements:x}=n,w="rootStore"in i?i.rootStore:i,_=w.useState("open"),D=w.useState("domReferenceElement"),C=w.useState("floatingElement"),{events:j,dataRef:k}=w.context,q=$e(()=>{var ve;return(ve=k.current.floatingContext)==null?void 0:ve.nodeId}),F=c===!1,B=_b(D)&&F,U=En(c),K=En(f),se=En(p),pe=En(_),ae=Ma(E),W=iS(),le=O.useRef(!1),ie=O.useRef(!1),N=O.useRef(!1),Q=O.useRef(null),I=O.useRef(""),oe=O.useRef(""),Y=O.useRef(null),T=O.useRef(null),H=Hc(Y,S,W==null?void 0:W.beforeInsideRef),te=Hc(T,W==null?void 0:W.afterInsideRef),ne=Ea(),re=Ea(),ee=Hh(),ge=W!=null,ce=Mb(C),fe=$e((ve=ce)=>ve?Zo(ve):[]),Ze=$e(()=>(x==null?void 0:x().filter(ve=>ve!=null))??[]);O.useEffect(()=>{if(o||!m)return;function ve(Oe){Oe.key==="Tab"&&Me(ce,Ui(ut(ce)))&&fe().length===0&&!B&&mO(Oe)}const ze=ut(ce);return Ke(ze,"keydown",ve)},[o,ce,m,B,fe]),O.useEffect(()=>{if(o||!_)return;const ve=ut(ce);function ze(){N.current=!1}function Oe(vt){const Re=$n(vt),ke=Ze(),Ee=Me(C,Re)||Me(D,Re)||Me(W==null?void 0:W.portalNode,Re)||ke.some(mt=>mt===Re||Me(mt,Re));N.current=!Ee,oe.current=vt.pointerType||"keyboard",Re!=null&&Re.closest(`[${tS}]`)&&(ie.current=!0,re.start(0,()=>{ie.current=!1}))}function ft(){oe.current="keyboard"}return qi(Ke(ve,"pointerdown",Oe,!0),Ke(ve,"pointerup",ze,!0),Ke(ve,"pointercancel",ze,!0),Ke(ve,"keydown",ft,!0),ze)},[o,C,D,ce,_,W,re,Ze]),O.useEffect(()=>{if(o||!g)return;const ve=ut(ce);function ze(){ie.current=!0,re.start(0,()=>{ie.current=!1})}function Oe(ke){const Ee=$n(ke);Gh(Ee)&&(Q.current=Ee)}function ft(ke){const Ee=ke.relatedTarget,mt=ke.currentTarget,dt=$n(ke);m&&Ee==null&&dt!=null&&Me(C,dt)&&Gb(dt),queueMicrotask(()=>{const je=q(),xt=w.context.triggerElements,ue=Ze(),xe=(Ee==null?void 0:Ee.hasAttribute(Fc("focus-guard")))&&[Y.current,T.current,W==null?void 0:W.beforeInsideRef.current,W==null?void 0:W.afterInsideRef.current,W==null?void 0:W.beforeOutsideRef.current,W==null?void 0:W.afterOutsideRef.current,Li(v),Li(y)].includes(Ee),ht=!(Me(D,Ee)||Me(C,Ee)||Me(Ee,C)||Me(W==null?void 0:W.portalNode,Ee)||ue.some(Be=>Be===Ee||Me(Be,Ee))||Ee!=null&&xt.hasElement(Ee)||xt.hasMatchingElement(Be=>Me(Be,Ee))||xe||ae&&(_s(ae.nodesRef.current,je).find(Be=>{var pt,jt;return Me((pt=Be.context)==null?void 0:pt.elements.floating,Ee)||Me((jt=Be.context)==null?void 0:jt.elements.domReference,Ee)})||jb(ae.nodesRef.current,je).find(Be=>{var pt,jt,sn;return[(pt=Be.context)==null?void 0:pt.elements.floating,Mb((jt=Be.context)==null?void 0:jt.elements.floating)].includes(Ee)||((sn=Be.context)==null?void 0:sn.elements.domReference)===Ee})));if(mt===D&&ce&&Xb(ce),d&&mt!==D&&!G0(dt)&&Ui(ve)===ve.body){if(Rt(ce)&&(ce.focus(),d==="popup")){ee.request(()=>{ce.focus()});return}const Be=fe(),pt=Q.current,jt=(pt&&Be.includes(pt)?pt:null)||Be[Be.length-1]||ce;Rt(jt)&&jt.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(B||!m)&&Ee&&ht&&!ie.current&&(B||Ee!==Qb())&&(le.current=!0,w.setOpen(!1,Xt(Lo,ke)))})}function vt(){N.current||(k.current.insideReactTree=!0,ne.start(0,()=>{k.current.insideReactTree=!1}))}const Re=Rt(D)?D:null;if(!(!C&&!Re))return qi(Re&&Ke(Re,"focusout",ft),Re&&Ke(Re,"pointerdown",ze),C&&Ke(C,"focusin",Oe),C&&Ke(C,"focusout",ft),C&&W&&Ke(C,"focusout",vt,!0))},[o,D,C,ce,m,ae,W,w,g,d,fe,B,q,k,ne,re,ee,y,v,Ze]),O.useEffect(()=>{var mt,dt,je;if(o||!C||!_)return;const ve=Array.from(((mt=W==null?void 0:W.portalNode)==null?void 0:mt.querySelectorAll(`[${Fc("portal")}]`))||[]),Oe=(je=(dt=(ae?jb(ae.nodesRef.current,q()):[]).find(xt=>{var ue;return _b(((ue=xt.context)==null?void 0:ue.elements.domReference)||null)}))==null?void 0:dt.context)==null?void 0:je.elements.domReference,vt=[...[C,...ve,Y.current,T.current,W==null?void 0:W.beforeOutsideRef.current,W==null?void 0:W.afterOutsideRef.current,...Ze()],Oe,Li(v),Li(y),B?D:null].filter(xt=>xt!=null),Re=qb(vt,{ariaHidden:m||B,mark:!1}),ke=[C,...ve].filter(xt=>xt!=null),Ee=qb(ke);return()=>{Ee(),Re()}},[_,o,D,C,m,W,B,ae,q,y,v,Ze]),Xe(()=>{if(!_||o||!Rt(ce))return;const ve=ut(ce),ze=Ui(ve);queueMicrotask(()=>{const Oe=U.current,ft=typeof Oe=="function"?Oe(se.current||""):Oe;if(ft===void 0||ft===!1||Me(ce,ze))return;let Re=null;const ke=()=>(Re==null&&(Re=fe(ce)),Re[0]||ce);let Ee;ft===!0||ft===null?Ee=ke():Ee=Li(ft),Ee=Ee||ke();const mt=Me(ce,Ui(ve));kd(Ee,{preventScroll:Ee===ce,shouldFocus(){if(!pe.current)return!1;if(mt)return!0;const dt=Ui(ve);return!(dt!==Ee&&Me(ce,dt))}})})},[o,_,ce,fe,U,se,pe]),Xe(()=>{if(o||!ce)return;const ve=ut(ce),ze=Ui(ve),Oe=se.current==null;Gb(ze);function ft(Re){if(Re.open||(I.current=lC(Re.nativeEvent,oe.current)),Re.reason===xn&&Re.nativeEvent.type==="mouseleave"&&(le.current=!0),Re.reason===H0)if(Re.nested)le.current=!1;else if(gO(Re.nativeEvent)||yO(Re.nativeEvent))le.current=!1;else{let ke=!1;ut(ce).createElement("div").focus({get preventScroll(){return ke=!0,!1}}),ke?le.current=!1:le.current=!0}}j.on("openchange",ft);function vt(){const Re=K.current;let ke=typeof Re=="function"?Re(I.current):Re;if(ke===void 0||ke===!1)return null;ke===null&&(ke=!0);const Ee=D!=null&&D.isConnected?D:null,mt=ze!=null&&ze.isConnected&&$t(ze)!=="body"?ze:null;let dt=Oe?mt||Ee:Ee||mt;return dt||(dt=Qb()||null),typeof ke=="boolean"?dt:Li(ke)||dt||null}return()=>{j.off("openchange",ft);const Re=Ui(ve),ke=Ze(),Ee=Me(C,Re)||ke.some(je=>je===Re||Me(je,Re))||ae&&_s(ae.nodesRef.current,q(),!1).some(je=>{var xt;return Me((xt=je.context)==null?void 0:xt.elements.floating,Re)}),mt=K.current,dt=vt();queueMicrotask(()=>{const je=uC(dt),xt=typeof mt!="boolean";mt&&!le.current&&Rt(je)&&(!(!xt&&je!==Re&&Re!==ve.body)||Ee)&&je.focus({preventScroll:!0}),le.current=!1})}},[o,C,ce,K,se,j,ae,D,q,Ze]),Xe(()=>{if(!Aa||_||!C)return;const ve=Ui(ut(C));!Rt(ve)||!Bh(ve)||Me(C,ve)&&ve.blur()},[_,C]),Xe(()=>{if(!(o||!W))return W.setFocusManagerState({modal:m,closeOnFocusOut:g,open:_,onOpenChange:w.setOpen,domReference:D}),()=>{W.setFocusManagerState(null)}},[o,W,m,_,w,g,D]),Xe(()=>{if(!(o||!ce))return Xb(ce),()=>{queueMicrotask(Xh)}},[o,ce]);const nt=!o&&(m?!B:!0)&&(ge||m);return A.jsxs(O.Fragment,{children:[nt&&A.jsx(Ta,{"data-type":"inside",ref:H,onFocus:ve=>{var ze;if(m){const Oe=fe();kd(Oe[Oe.length-1])}else if(W!=null&&W.portalNode)if(le.current=!1,ra(ve,W.portalNode)){const Oe=Qh(D);Oe==null||Oe.focus()}else(ze=Li(v??W.beforeOutsideRef))==null||ze.focus()}}),r,nt&&A.jsx(Ta,{"data-type":"inside",ref:te,onFocus:ve=>{var ze;if(m)kd(fe()[0]);else if(W!=null&&W.portalNode)if(g&&(le.current=!0),ra(ve,W.portalNode)){const Oe=W0(D);Oe==null||Oe.focus()}else(ze=Li(y??W.afterOutsideRef))==null||ze.focus()}})]})}function dC(n,i={}){const{enabled:r=!0,event:o="click",toggle:c=!0,ignoreMouse:f=!1,stickIfOpen:d=!0,touchOpenDelay:m=0,reason:g=Uo}=i,p="rootStore"in n?n.rootStore:n,y=p.context.dataRef,v=O.useRef(void 0),S=Hh(),E=Ea(),x=O.useMemo(()=>{function w(D,C,j,k){const q=Xt(g,C,j);D&&k==="touch"&&m>0?E.start(m,()=>{p.setOpen(!0,q)}):p.setOpen(D,q)}function _(D,C,j){const k=y.current.openEvent,q=p.select("domReferenceElement")!==C;return D&&q||!D||!c?!0:k&&d?!j(k.type):!1}return{onPointerDown(D){v.current=D.pointerType},onMouseDown(D){const C=v.current,j=D.nativeEvent,k=p.select("open");if(D.button!==0||o==="click"||jo(C,!0)&&f)return;const q=_(k,D.currentTarget,U=>U==="click"||U==="mousedown"),F=$n(j);if(Bh(F)){w(q,j,F,C);return}const B=D.currentTarget;S.request(()=>{w(q,j,B,C)})},onClick(D){if(o==="mousedown-only")return;const C=v.current;if(o==="mousedown"&&C){v.current=void 0;return}if(jo(C,!0)&&f)return;const j=p.select("open"),k=_(j,D.currentTarget,q=>q==="click"||q==="mousedown"||q==="keydown"||q==="keyup");w(k,D.nativeEvent,D.currentTarget,C)},onKeyDown(){v.current=void 0}}},[y,o,f,g,p,d,c,S,E,m]);return O.useMemo(()=>r?{reference:x}:Wt,[r,x])}function hC(){return!1}function mC(n){return{escapeKey:typeof n=="boolean"?n:(n==null?void 0:n.escapeKey)??!1,outsidePress:typeof n=="boolean"?n:(n==null?void 0:n.outsidePress)??!0}}function pC(n,i={}){const{enabled:r=!0,escapeKey:o=!0,outsidePress:c=!0,outsidePressEvent:f="sloppy",referencePress:d=hC,bubbles:m,externalTree:g}=i,p="rootStore"in n?n.rootStore:n,y=p.useState("open"),v=p.useState("floatingElement"),{dataRef:S}=p.context,E=Ma(g),x=$e(typeof c=="function"?c:()=>!1),w=typeof c=="function"?x:c,_=w!==!1,D=$e(()=>f),{escapeKey:C,outsidePress:j}=mC(m),k=O.useRef(!1),q=O.useRef(!1),F=O.useRef(!1),B=O.useRef(!1),U=O.useRef(""),K=O.useRef(null),se=Ea(),pe=Ea(),ae=$e(()=>{pe.clear(),S.current.insideReactTree=!1}),W=$e(H=>{var re;const te=(re=S.current.floatingContext)==null?void 0:re.nodeId;return(E?_s(E.nodesRef.current,te):[]).some(ee=>{var ge;return((ge=ee.context)==null?void 0:ge.open)&&!ee.context.dataRef.current[H]})}),le=$e(H=>Dd(H,p.select("floatingElement"))||Dd(H,p.select("domReferenceElement"))),ie=$e(H=>{d()&&p.setOpen(!1,Xt(Uo,H.nativeEvent))}),N=$e(H=>{if(!y||!r||!o||H.key!=="Escape"||B.current||!C&&W("__escapeKeyBubbles"))return;const te=pO(H)?H.nativeEvent:H,ne=Xt(q0,te);p.setOpen(!1,ne),ne.isCanceled||H.preventDefault(),!C&&!ne.isPropagationAllowed&&H.stopPropagation()}),Q=$e(()=>{S.current.insideReactTree=!0,pe.start(0,ae)}),I=$e(H=>{if(!y||!r||H.button!==0)return;const te=$n(H.nativeEvent);Me(p.select("floatingElement"),te)&&(k.current||(k.current=!0,q.current=!1))}),oe=$e(H=>{!y||!r||(H.defaultPrevented||H.nativeEvent.defaultPrevented)&&k.current&&(q.current=!0)});O.useEffect(()=>{if(!y||!r)return;S.current.__escapeKeyBubbles=C,S.current.__outsidePressBubbles=j;const H=new ei,te=new ei;function ne(){H.clear(),B.current=!0}function re(){H.start(Aa?5:0,()=>{B.current=!1})}function ee(){F.current=!0,te.start(0,()=>{F.current=!1})}function ge(){k.current=!1,q.current=!1}function ce(){const ue=U.current,xe=ue==="pen"||!ue?"mouse":ue,ht=D(),Be=typeof ht=="function"?ht():ht;return typeof Be=="string"?Be:Be[xe]}function fe(ue){const xe=ce();return xe==="intentional"&&ue.type!=="click"||xe==="sloppy"&&ue.type==="click"}function Ze(ue){var Be;const xe=(Be=S.current.floatingContext)==null?void 0:Be.nodeId,ht=E&&_s(E.nodesRef.current,xe).some(pt=>{var jt;return Dd(ue,(jt=pt.context)==null?void 0:jt.elements.floating)});return le(ue)||ht}function nt(ue){if(fe(ue)){ue.type!=="click"&&!le(ue)&&(te.clear(),F.current=!1),ae();return}if(S.current.insideReactTree){ae();return}const xe=$n(ue),ht=`[${Fc("inert")}]`,Be=Je(xe)?xe.getRootNode():null,pt=Array.from((xa(Be)?Be:ut(p.select("floatingElement"))).querySelectorAll(ht)),jt=p.context.triggerElements;if(xe&&(jt.hasElement(xe)||jt.hasMatchingElement(rn=>Me(rn,xe))))return;let sn=Je(xe)?xe:null;for(;sn&&!Cs(sn);){const rn=As(sn);if(Cs(rn)||!Je(rn))break;sn=rn}if(!(pt.length&&Je(xe)&&!vO(xe)&&!Me(xe,p.select("floatingElement"))&&pt.every(rn=>!Me(sn,rn)))){if(Rt(xe)&&!("touches"in ue)){const rn=Cs(xe),ti=zn(xe),fn=/auto|scroll/,qt=rn||fn.test(ti.overflowX),Tn=rn||fn.test(ti.overflowY),Yt=qt&&xe.clientWidth>0&&xe.scrollWidth>xe.clientWidth,mr=Tn&&xe.clientHeight>0&&xe.scrollHeight>xe.clientHeight,pr=ti.direction==="rtl",gr=mr&&(pr?ue.offsetX<=xe.offsetWidth-xe.clientWidth:ue.offsetX>xe.clientWidth),pi=Yt&&ue.offsetY>xe.clientHeight;if(gr||pi)return}if(!Ze(ue)){if(ce()==="intentional"&&F.current){te.clear(),F.current=!1;return}typeof w=="function"&&!w(ue)||W("__outsidePressBubbles")||(p.setOpen(!1,Xt(H0,ue)),ae())}}}function ve(ue){ce()!=="sloppy"||ue.pointerType==="touch"||!p.select("open")||!r||le(ue)||nt(ue)}function ze(ue){if(ce()!=="sloppy"||!p.select("open")||!r||le(ue))return;const xe=ue.touches[0];xe&&(K.current={startTime:Date.now(),startX:xe.clientX,startY:xe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},se.start(1e3,()=>{K.current&&(K.current.dismissOnTouchEnd=!1,K.current.dismissOnMouseDown=!1)}))}function Oe(ue,xe){const ht=$n(ue);if(!ht)return;const Be=Ke(ht,ue.type,()=>{xe(ue),Be()})}function ft(ue){U.current="touch",Oe(ue,ze)}function vt(ue){se.clear(),ue.type==="pointerdown"&&(U.current=ue.pointerType),!(ue.type==="mousedown"&&K.current&&!K.current.dismissOnMouseDown)&&Oe(ue,xe=>{xe.type==="pointerdown"?ve(xe):nt(xe)})}function Re(ue){if(!k.current)return;const xe=q.current;if(ge(),ce()==="intentional"){if(ue.type==="pointercancel"){xe&&ee();return}if(!Ze(ue)){if(xe){ee();return}typeof w=="function"&&!w(ue)||(te.clear(),F.current=!0,ae())}}}function ke(ue){if(ce()!=="sloppy"||!K.current||le(ue))return;const xe=ue.touches[0];if(!xe)return;const ht=Math.abs(xe.clientX-K.current.startX),Be=Math.abs(xe.clientY-K.current.startY),pt=Math.sqrt(ht*ht+Be*Be);pt>5&&(K.current.dismissOnTouchEnd=!0),pt>10&&(nt(ue),se.clear(),K.current=null)}function Ee(ue){Oe(ue,ke)}function mt(ue){ce()!=="sloppy"||!K.current||le(ue)||(K.current.dismissOnTouchEnd&&nt(ue),se.clear(),K.current=null)}function dt(ue){Oe(ue,mt)}const je=ut(v),xt=qi(o&&qi(Ke(je,"keydown",N),Ke(je,"compositionstart",ne),Ke(je,"compositionend",re)),_&&qi(Ke(je,"click",vt,!0),Ke(je,"pointerdown",vt,!0),Ke(je,"pointerup",Re,!0),Ke(je,"pointercancel",Re,!0),Ke(je,"mousedown",vt,!0),Ke(je,"mouseup",Re,!0),Ke(je,"touchstart",ft,!0),Ke(je,"touchmove",Ee,!0),Ke(je,"touchend",dt,!0)));return()=>{xt(),H.clear(),te.clear(),ge(),F.current=!1}},[S,v,o,_,w,y,r,C,j,N,ae,D,W,le,E,p,se]),O.useEffect(ae,[w,ae]);const Y=O.useMemo(()=>({onKeyDown:N,onPointerDown:ie,onClick:ie}),[N,ie]),T=O.useMemo(()=>({onKeyDown:N,onPointerDown:oe,onMouseDown:oe,onClickCapture:Q,onMouseDownCapture(H){Q(),I(H)},onPointerDownCapture(H){Q(),I(H)},onMouseUpCapture:Q,onTouchEndCapture:Q,onTouchMoveCapture:Q}),[N,Q,I,oe]);return O.useMemo(()=>r?{reference:Y,floating:T,trigger:Y}:{},[r,Y,T])}function Fb(n,i,r){let{reference:o,floating:c}=n;const f=Fn(i),d=Vh(i),m=Yh(d),g=Dn(i),p=f==="y",y=o.x+o.width/2-c.width/2,v=o.y+o.height/2-c.height/2,S=o[m]/2-c[m]/2;let E;switch(g){case"top":E={x:y,y:o.y-c.height};break;case"bottom":E={x:y,y:o.y+o.height};break;case"right":E={x:o.x+o.width,y:v};break;case"left":E={x:o.x-c.width,y:v};break;default:E={x:o.x,y:o.y}}const x=Ds(i);return x&&(E[d]+=S*(x==="end"?1:-1)*(r&&p?-1:1)),E}async function gC(n,i){var r;i===void 0&&(i={});const{x:o,y:c,platform:f,rects:d,elements:m,strategy:g}=n,{boundary:p="clippingAncestors",rootBoundary:y="viewport",elementContext:v="floating",altBoundary:S=!1,padding:E=0}=Gi(i,n),x=V0(E),_=m[S?v==="floating"?"reference":"floating":v],D=Xc(await f.getClippingRect({element:(r=await(f.isElement==null?void 0:f.isElement(_)))==null||r?_:_.contextElement||await(f.getDocumentElement==null?void 0:f.getDocumentElement(m.floating)),boundary:p,rootBoundary:y,strategy:g})),C=v==="floating"?{x:o,y:c,width:d.floating.width,height:d.floating.height}:d.reference,j=await(f.getOffsetParent==null?void 0:f.getOffsetParent(m.floating)),k=await(f.isElement==null?void 0:f.isElement(j))&&await(f.getScale==null?void 0:f.getScale(j))||{x:1,y:1},q=Xc(f.convertOffsetParentRelativeRectToViewportRelativeRect?await f.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:C,offsetParent:j,strategy:g}):C);return{top:(D.top-q.top+x.top)/k.y,bottom:(q.bottom-D.bottom+x.bottom)/k.y,left:(D.left-q.left+x.left)/k.x,right:(q.right-D.right+x.right)/k.x}}const yC=50,bC=async(n,i,r)=>{const{placement:o="bottom",strategy:c="absolute",middleware:f=[],platform:d}=r,m=d.detectOverflow?d:{...d,detectOverflow:gC},g=await(d.isRTL==null?void 0:d.isRTL(i));let p=await d.getElementRects({reference:n,floating:i,strategy:c}),{x:y,y:v}=Fb(p,o,g),S=o,E=0;const x={};for(let w=0;w<f.length;w++){const _=f[w];if(!_)continue;const{name:D,fn:C}=_,{x:j,y:k,data:q,reset:F}=await C({x:y,y:v,initialPlacement:o,placement:S,strategy:c,middlewareData:x,rects:p,platform:m,elements:{reference:n,floating:i}});y=j??y,v=k??v,x[D]={...x[D],...q},F&&E<yC&&(E++,typeof F=="object"&&(F.placement&&(S=F.placement),F.rects&&(p=F.rects===!0?await d.getElementRects({reference:n,floating:i,strategy:c}):F.rects),{x:y,y:v}=Fb(p,S,g)),w=-1)}return{x:y,y:v,placement:S,strategy:c,middlewareData:x}},vC=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(i){var r,o;const{placement:c,middlewareData:f,rects:d,initialPlacement:m,platform:g,elements:p}=i,{mainAxis:y=!0,crossAxis:v=!0,fallbackPlacements:S,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:w=!0,..._}=Gi(n,i);if((r=f.arrow)!=null&&r.alignmentOffset)return{};const D=Dn(c),C=Fn(m),j=Dn(m)===m,k=await(g.isRTL==null?void 0:g.isRTL(p.floating)),q=S||(j||!w?[Qc(m)]:zO(m)),F=x!=="none";!S&&F&&q.push(...LO(m,w,x,k));const B=[m,...q],U=await g.detectOverflow(i,_),K=[];let se=((o=f.flip)==null?void 0:o.overflows)||[];if(y&&K.push(U[D]),v){const le=DO(c,d,k);K.push(U[le[0]],U[le[1]])}if(se=[...se,{placement:c,overflows:K}],!K.every(le=>le<=0)){var pe,ae;const le=(((pe=f.flip)==null?void 0:pe.index)||0)+1,ie=B[le];if(ie&&(!(v==="alignment"?C!==Fn(ie):!1)||se.every(I=>Fn(I.placement)===C?I.overflows[0]>0:!0)))return{data:{index:le,overflows:se},reset:{placement:ie}};let N=(ae=se.filter(Q=>Q.overflows[0]<=0).sort((Q,I)=>Q.overflows[1]-I.overflows[1])[0])==null?void 0:ae.placement;if(!N)switch(E){case"bestFit":{var W;const Q=(W=se.filter(I=>{if(F){const oe=Fn(I.placement);return oe===C||oe==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(oe=>oe>0).reduce((oe,Y)=>oe+Y,0)]).sort((I,oe)=>I[1]-oe[1])[0])==null?void 0:W[0];Q&&(N=Q);break}case"initialPlacement":N=m;break}if(c!==N)return{reset:{placement:N}}}return{}}}};function Kb(n,i){return{top:n.top-i.height,right:n.right-i.width,bottom:n.bottom-i.height,left:n.left-i.width}}function Zb(n){return MO.some(i=>n[i]>=0)}const SC=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(i){const{rects:r,platform:o}=i,{strategy:c="referenceHidden",...f}=Gi(n,i);switch(c){case"referenceHidden":{const d=await o.detectOverflow(i,{...f,elementContext:"reference"}),m=Kb(d,r.reference);return{data:{referenceHiddenOffsets:m,referenceHidden:Zb(m)}}}case"escaped":{const d=await o.detectOverflow(i,{...f,altBoundary:!0}),m=Kb(d,r.floating);return{data:{escapedOffsets:m,escaped:Zb(m)}}}default:return{}}}}},oS=new Set(["left","top"]);async function xC(n,i){const{placement:r,platform:o,elements:c}=n,f=await(o.isRTL==null?void 0:o.isRTL(c.floating)),d=Dn(r),m=Ds(r),g=Fn(r)==="y",p=oS.has(d)?-1:1,y=f&&g?-1:1,v=Gi(i,n);let{mainAxis:S,crossAxis:E,alignmentAxis:x}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return m&&typeof x=="number"&&(E=m==="end"?x*-1:x),g?{x:E*y,y:S*p}:{x:S*p,y:E*y}}const EC=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(i){var r,o;const{x:c,y:f,placement:d,middlewareData:m}=i,g=await xC(i,n);return d===((r=m.offset)==null?void 0:r.placement)&&(o=m.arrow)!=null&&o.alignmentOffset?{}:{x:c+g.x,y:f+g.y,data:{...g,placement:d}}}}},TC=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(i){const{x:r,y:o,placement:c,platform:f}=i,{mainAxis:d=!0,crossAxis:m=!1,limiter:g={fn:C=>{let{x:j,y:k}=C;return{x:j,y:k}}},...p}=Gi(n,i),y={x:r,y:o},v=await f.detectOverflow(i,p),S=Fn(c),E=qh(S);let x=y[E],w=y[S];const _=(C,j)=>Y0(j+v[C==="y"?"top":"left"],j,j-v[C==="y"?"bottom":"right"]);d&&(x=_(E,x)),m&&(w=_(S,w));const D=g.fn({...i,[E]:x,[S]:w});return{...D,data:{x:D.x-r,y:D.y-o,enabled:{[E]:d,[S]:m}}}}}},wC=function(n){return n===void 0&&(n={}),{options:n,fn(i){var r,o;const{x:c,y:f,placement:d,rects:m,middlewareData:g}=i,{offset:p=0,mainAxis:y=!0,crossAxis:v=!0}=Gi(n,i),S={x:c,y:f},E=Fn(d),x=qh(E);let w=S[x],_=S[E];const D=Gi(p,i),C=typeof D=="number"?{mainAxis:D,crossAxis:0}:{mainAxis:(r=D.mainAxis)!=null?r:0,crossAxis:(o=D.crossAxis)!=null?o:0};if(y){const q=x==="y"?"height":"width",F=m.reference[x]-m.floating[q]+C.mainAxis,B=m.reference[x]+m.reference[q]-C.mainAxis;w<F?w=F:w>B&&(w=B)}if(v){var j,k;const q=x==="y"?"width":"height",F=oS.has(Dn(d)),B=m.reference[E]-m.floating[q]+(F&&((j=g.offset)==null?void 0:j[E])||0)+(F?0:C.crossAxis),U=m.reference[E]+m.reference[q]+(F?0:((k=g.offset)==null?void 0:k[E])||0)-(F?C.crossAxis:0);_<B?_=B:_>U&&(_=U)}return{[x]:w,[E]:_}}}},RC=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(i){const{placement:r,rects:o,platform:c,elements:f}=i,{apply:d=()=>{},...m}=Gi(n,i),g=await c.detectOverflow(i,m),p=Dn(r),y=Ds(r),v=Fn(r)==="y",{width:S,height:E}=o.floating;let x,w;p==="top"||p==="bottom"?(x=p,w=y===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(w=p,x=y==="end"?"top":"bottom");const _=E-g.top-g.bottom,D=S-g.left-g.right,C=wa(E-g[x],_),j=wa(S-g[w],D),k=i.middlewareData.shift,q=!k;let F=C,B=j;k!=null&&k.enabled.x&&(B=D),k!=null&&k.enabled.y&&(F=_),q&&!y&&(v?B=S-2*Yi(g.left,g.right):F=E-2*Yi(g.top,g.bottom)),await d({...i,availableWidth:B,availableHeight:F});const U=await c.getDimensions(f.floating);return S!==U.width||E!==U.height?{reset:{rects:!0}}:{}}}};function lS(n){const i=zn(n);let r=parseFloat(i.width)||0,o=parseFloat(i.height)||0;const c=Rt(n),f=c?n.offsetWidth:r,d=c?n.offsetHeight:o,m=Gc(r)!==f||Gc(o)!==d;return m&&(r=f,o=d),{width:r,height:o,$:m}}function Fh(n){return Je(n)?n:n.contextElement}function aa(n){const i=Fh(n);if(!Rt(i))return Vi(1);const r=i.getBoundingClientRect(),{width:o,height:c,$:f}=lS(i);let d=(f?Gc(r.width):r.width)/o,m=(f?Gc(r.height):r.height)/c;return(!d||!Number.isFinite(d))&&(d=1),(!m||!Number.isFinite(m))&&(m=1),{x:d,y:m}}const OC=Vi(0);function cS(n){const i=kt(n);return!jh()||!i.visualViewport?OC:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function CC(n,i,r){return i===void 0&&(i=!1),!!r&&i&&r===kt(n)}function cr(n,i,r,o){i===void 0&&(i=!1),r===void 0&&(r=!1);const c=n.getBoundingClientRect(),f=Fh(n);let d=Vi(1);i&&(o?Je(o)&&(d=aa(o)):d=aa(n));const m=CC(f,r,o)?cS(f):Vi(0);let g=(c.left+m.x)/d.x,p=(c.top+m.y)/d.y,y=c.width/d.x,v=c.height/d.y;if(f&&o){const S=kt(f),E=Je(o)?kt(o):o;let x=S,w=lh(x);for(;w&&E!==x;){const _=aa(w),D=w.getBoundingClientRect(),C=zn(w),j=D.left+(w.clientLeft+parseFloat(C.paddingLeft))*_.x,k=D.top+(w.clientTop+parseFloat(C.paddingTop))*_.y;g*=_.x,p*=_.y,y*=_.x,v*=_.y,g+=j,p+=k,x=kt(w),w=lh(x)}}return Xc({width:y,height:v,x:g,y:p})}function ru(n,i){const r=nu(n).scrollLeft;return i?i.left+r:cr(Xi(n)).left+r}function uS(n,i){const r=n.getBoundingClientRect(),o=r.left+i.scrollLeft-ru(n,r),c=r.top+i.scrollTop;return{x:o,y:c}}function AC(n){let{elements:i,rect:r,offsetParent:o,strategy:c}=n;const f=c==="fixed",d=Xi(o),m=i?tu(i.floating):!1;if(o===d||m&&f)return r;let g={scrollLeft:0,scrollTop:0},p=Vi(1);const y=Vi(0),v=Rt(o);if((v||!f)&&(($t(o)!=="body"||hr(d))&&(g=nu(o)),v)){const E=cr(o);p=aa(o),y.x=E.x+o.clientLeft,y.y=E.y+o.clientTop}const S=d&&!v&&!f?uS(d,g):Vi(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-g.scrollLeft*p.x+y.x+S.x,y:r.y*p.y-g.scrollTop*p.y+y.y+S.y}}function _C(n){return n.getClientRects?Array.from(n.getClientRects()):[]}function MC(n){const i=nu(n),r=n.ownerDocument.body,o=Yi(n.scrollWidth,n.clientWidth,r.scrollWidth,r.clientWidth),c=Yi(n.scrollHeight,n.clientHeight,r.scrollHeight,r.clientHeight);let f=-i.scrollLeft+ru(n);const d=-i.scrollTop;return zn(r).direction==="rtl"&&(f+=Yi(n.clientWidth,r.clientWidth)-o),{width:o,height:c,x:f,y:d}}const NC=25;function DC(n,i,r){r===void 0&&(r="viewport");const o=r==="layoutViewport",c=kt(n),f=Xi(n),d=c.visualViewport;let m=f.clientWidth,g=f.clientHeight,p=0,y=0;if(d){const S=!jh()||i==="fixed";o?S||(p=-d.offsetLeft,y=-d.offsetTop):(m=d.width,g=d.height,S&&(p=d.offsetLeft,y=d.offsetTop))}if(ru(f)<=0){const S=f.ownerDocument,E=S.body,x=getComputedStyle(E),w=S.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,_=Math.abs(f.clientWidth-E.clientWidth-w),D=getComputedStyle(f).scrollbarGutter==="stable both-edges"?_/2:_;D<=NC&&(m-=D)}return{width:m,height:g,x:p,y}}function zC(n,i){const r=cr(n,!0,i==="fixed"),o=r.top+n.clientTop,c=r.left+n.clientLeft,f=aa(n),d=n.clientWidth*f.x,m=n.clientHeight*f.y,g=c*f.x,p=o*f.y;return{width:d,height:m,x:g,y:p}}function Pb(n,i,r){let o;if(i==="viewport"||i==="layoutViewport")o=DC(n,r,i);else if(i==="document")o=MC(Xi(n));else if(Je(i))o=zC(i,r);else{const c=cS(n);o={x:i.x-c.x,y:i.y-c.y,width:i.width,height:i.height}}return Xc(o)}function kC(n,i){const r=i.get(n);if(r)return r;let o=zo(n,[],!1).filter(m=>Je(m)&&$t(m)!=="body"),c=null;const f=zn(n).position==="fixed";let d=f?As(n):n;for(;Je(d)&&!Cs(d);){const m=zn(d),g=kh(d),p=c?c.position:f?"fixed":"";!g&&(p==="fixed"||p==="absolute"&&m.position==="static")?o=o.filter(v=>v!==d):c=m,d=As(d)}return i.set(n,o),o}function jC(n){let{element:i,boundary:r,rootBoundary:o,strategy:c}=n;const d=[...r==="clippingAncestors"?tu(i)?[]:kC(i,this._c):[].concat(r),o],m=Pb(i,d[0],c);let g=m.top,p=m.right,y=m.bottom,v=m.left;for(let S=1;S<d.length;S++){const E=Pb(i,d[S],c);g=Yi(E.top,g),p=wa(E.right,p),y=wa(E.bottom,y),v=Yi(E.left,v)}return{width:p-v,height:y-g,x:v,y:g}}function UC(n){const{width:i,height:r}=lS(n);return{width:i,height:r}}function LC(n,i,r){const o=Rt(i),c=Xi(i),f=r==="fixed",d=cr(n,!0,f,i);let m={scrollLeft:0,scrollTop:0};const g=Vi(0);if((o||!f)&&(($t(i)!=="body"||hr(c))&&(m=nu(i)),o)){const S=cr(i,!0,f,i);g.x=S.x+i.clientLeft,g.y=S.y+i.clientTop}!o&&c&&(g.x=ru(c));const p=c&&!o&&!f?uS(c,m):Vi(0),y=d.left+m.scrollLeft-g.x-p.x,v=d.top+m.scrollTop-g.y-p.y;return{x:y,y:v,width:d.width,height:d.height}}function Ld(n){return zn(n).position==="static"}function Ib(n,i){if(!Rt(n)||zn(n).position==="fixed")return null;if(i)return i(n);let r=n.offsetParent;return Xi(n)===r&&(r=r.ownerDocument.body),r}function fS(n,i){const r=kt(n);if(tu(n))return r;if(!Rt(n)){let c=As(n);for(;c&&!Cs(c);){if(Je(c)&&!Ld(c))return c;c=As(c)}return r}let o=Ib(n,i);for(;o&&HR(o)&&Ld(o);)o=Ib(o,i);return o&&Cs(o)&&Ld(o)&&!kh(o)?r:o||VR(n)||r}const BC=async function(n){const i=this.getOffsetParent||fS,r=this.getDimensions,o=await r(n.floating);return{reference:LC(n.reference,await i(n.floating),n.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function HC(n){return zn(n).direction==="rtl"}const qC={convertOffsetParentRelativeRectToViewportRelativeRect:AC,getDocumentElement:Xi,getClippingRect:jC,getOffsetParent:fS,getElementRects:BC,getClientRects:_C,getDimensions:UC,getScale:aa,isElement:Je,isRTL:HC};function dS(n,i){return n.x===i.x&&n.y===i.y&&n.width===i.width&&n.height===i.height}function YC(n,i,r){let o=null,c;const f=Xi(n);function d(){var y;clearTimeout(c),(y=o)==null||y.disconnect(),o=null}function m(y,v){y===void 0&&(y=!1),v===void 0&&(v=1),d();const S=n.getBoundingClientRect(),{left:E,top:x,width:w,height:_}=S;if(y||i(),!w||!_)return;const D=Ec(x),C=Ec(f.clientWidth-(E+w)),j=Ec(f.clientHeight-(x+_)),k=Ec(E),F={rootMargin:-D+"px "+-C+"px "+-j+"px "+-k+"px",threshold:Yi(0,wa(1,v))||1};let B=!0;function U(K){const se=K[0].intersectionRatio;if(!dS(S,n.getBoundingClientRect()))return m();if(se!==v){if(!B)return m();se?m(!1,se):c=setTimeout(()=>{m(!1,1e-7)},1e3)}B=!1}try{o=new IntersectionObserver(U,{...F,root:f.ownerDocument})}catch{o=new IntersectionObserver(U,F)}o.observe(n)}const g=kt(n),p=()=>m(r);return g.addEventListener("resize",p),m(!0),()=>{g.removeEventListener("resize",p),d()}}function Jb(n,i,r,o){o===void 0&&(o={});const{ancestorScroll:c=!0,ancestorResize:f=!0,elementResize:d=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:g=!1}=o,p=Fh(n),y=c||f?[...p?zo(p):[],...i?zo(i):[]]:[];y.forEach(D=>{c&&D.addEventListener("scroll",r),f&&D.addEventListener("resize",r)});const v=p&&m?YC(p,r,f):null;let S=-1,E=null;d&&(E=new ResizeObserver(D=>{let[C]=D;C&&C.target===p&&E&&i&&(E.unobserve(i),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var j;(j=E)==null||j.observe(i)})),r()}),p&&!g&&E.observe(p),i&&E.observe(i));let x,w=g?cr(n):null;g&&_();function _(){const D=cr(n);w&&!dS(w,D)&&r(),w=D,x=requestAnimationFrame(_)}return r(),()=>{var D;y.forEach(C=>{c&&C.removeEventListener("scroll",r),f&&C.removeEventListener("resize",r)}),v==null||v(),(D=E)==null||D.disconnect(),E=null,g&&cancelAnimationFrame(x)}}const VC=EC,GC=TC,QC=vC,XC=RC,FC=SC,KC=wC,ZC=(n,i,r)=>{const o=new Map,c=r??{},f={...qC,...c.platform,_c:o};return bC(n,i,{...c,platform:f})};var PC=typeof document<"u",IC=function(){},kc=PC?O.useLayoutEffect:IC;function Kc(n,i){if(n===i)return!0;if(typeof n!=typeof i)return!1;if(typeof n=="function"&&n.toString()===i.toString())return!0;let r,o,c;if(n&&i&&typeof n=="object"){if(Array.isArray(n)){if(r=n.length,r!==i.length)return!1;for(o=r;o--!==0;)if(!Kc(n[o],i[o]))return!1;return!0}if(c=Object.keys(n),r=c.length,r!==Object.keys(i).length)return!1;for(o=r;o--!==0;)if(!{}.hasOwnProperty.call(i,c[o]))return!1;for(o=r;o--!==0;){const f=c[o];if(!(f==="_owner"&&n.$$typeof)&&!Kc(n[f],i[f]))return!1}return!0}return n!==n&&i!==i}function hS(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function Wb(n,i){const r=hS(n);return Math.round(i*r)/r}function Bd(n){const i=O.useRef(n);return kc(()=>{i.current=n}),i}function JC(n){n===void 0&&(n={});const{placement:i="bottom",strategy:r="absolute",middleware:o=[],platform:c,elements:{reference:f,floating:d}={},transform:m=!0,whileElementsMounted:g,open:p}=n,[y,v]=O.useState({x:0,y:0,strategy:r,placement:i,middlewareData:{},isPositioned:!1}),[S,E]=O.useState(o);Kc(S,o)||E(o);const[x,w]=O.useState(null),[_,D]=O.useState(null),C=O.useCallback(I=>{I!==F.current&&(F.current=I,w(I))},[]),j=O.useCallback(I=>{I!==B.current&&(B.current=I,D(I))},[]),k=f||x,q=d||_,F=O.useRef(null),B=O.useRef(null),U=O.useRef(y),K=g!=null,se=Bd(g),pe=Bd(c),ae=Bd(p),W=O.useCallback(()=>{if(!F.current||!B.current)return;const I={placement:i,strategy:r,middleware:S};pe.current&&(I.platform=pe.current),ZC(F.current,B.current,I).then(oe=>{const Y={...oe,isPositioned:ae.current!==!1};le.current&&!Kc(U.current,Y)&&(U.current=Y,Ms.flushSync(()=>{v(Y)}))})},[S,i,r,pe,ae]);kc(()=>{p===!1&&U.current.isPositioned&&(U.current.isPositioned=!1,v(I=>({...I,isPositioned:!1})))},[p]);const le=O.useRef(!1);kc(()=>(le.current=!0,()=>{le.current=!1}),[]),kc(()=>{if(k&&(F.current=k),q&&(B.current=q),k&&q){if(se.current)return se.current(k,q,W);W()}},[k,q,W,se,K]);const ie=O.useMemo(()=>({reference:F,floating:B,setReference:C,setFloating:j}),[C,j]),N=O.useMemo(()=>({reference:k,floating:q}),[k,q]),Q=O.useMemo(()=>{const I={position:r,left:0,top:0};if(!N.floating)return I;const oe=Wb(N.floating,y.x),Y=Wb(N.floating,y.y);return m?{...I,transform:"translate("+oe+"px, "+Y+"px)",...hS(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:oe,top:Y}},[r,m,N.floating,y.x,y.y]);return O.useMemo(()=>({...y,update:W,refs:ie,elements:N,floatingStyles:Q}),[y,W,ie,N,Q])}const WC=(n,i)=>{const r=VC(n);return{name:r.name,fn:r.fn,options:[n,i]}},$C=(n,i)=>{const r=GC(n);return{name:r.name,fn:r.fn,options:[n,i]}},eA=(n,i)=>({fn:KC(n).fn,options:[n,i]}),tA=(n,i)=>{const r=QC(n);return{name:r.name,fn:r.fn,options:[n,i]}},nA=(n,i)=>{const r=XC(n);return{name:r.name,fn:r.fn,options:[n,i]}},iA=(n,i)=>{const r=FC(n);return{name:r.name,fn:r.fn,options:[n,i]}};function sA(n){const i=O.useRef(!0);i.current&&(i.current=!1,n())}const Ve=(n,i,r,o,c,f,...d)=>{if(d.length>0)throw new Error(ur(1));let m;if(n)m=n;else throw new Error("Missing arguments");return m};var Hd={exports:{}},qd={};/**
100
100
  * @license React
101
101
  * use-sync-external-store-shim.production.js
102
102
  *
@@ -104,7 +104,7 @@ Error generating stack: `+a.message+`
104
104
  *
105
105
  * This source code is licensed under the MIT license found in the
106
106
  * LICENSE file in the root directory of this source tree.
107
- */var $b;function iA(){if($b)return qd;$b=1;var n=Qo();function i(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var r=typeof Object.is=="function"?Object.is:i,o=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(v,S){var E=S(),x=o({inst:{value:E,getSnapshot:S}}),w=x[0].inst,_=x[1];return f(function(){w.value=E,w.getSnapshot=S,g(w)&&_({inst:w})},[v,E,S]),c(function(){return g(w)&&_({inst:w}),v(function(){g(w)&&_({inst:w})})},[v]),d(E),E}function g(v){var S=v.getSnapshot;v=v.value;try{var E=S();return!r(v,E)}catch{return!0}}function p(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return qd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,qd}var ev;function hS(){return ev||(ev=1,Hd.exports=iA()),Hd.exports}var sA=hS(),Yd={exports:{}},Vd={};/**
107
+ */var $b;function rA(){if($b)return qd;$b=1;var n=Qo();function i(v,S){return v===S&&(v!==0||1/v===1/S)||v!==v&&S!==S}var r=typeof Object.is=="function"?Object.is:i,o=n.useState,c=n.useEffect,f=n.useLayoutEffect,d=n.useDebugValue;function m(v,S){var E=S(),x=o({inst:{value:E,getSnapshot:S}}),w=x[0].inst,_=x[1];return f(function(){w.value=E,w.getSnapshot=S,g(w)&&_({inst:w})},[v,E,S]),c(function(){return g(w)&&_({inst:w}),v(function(){g(w)&&_({inst:w})})},[v]),d(E),E}function g(v){var S=v.getSnapshot;v=v.value;try{var E=S();return!r(v,E)}catch{return!0}}function p(v,S){return S()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:m;return qd.useSyncExternalStore=n.useSyncExternalStore!==void 0?n.useSyncExternalStore:y,qd}var ev;function mS(){return ev||(ev=1,Hd.exports=rA()),Hd.exports}var aA=mS(),Yd={exports:{}},Vd={};/**
108
108
  * @license React
109
109
  * use-sync-external-store-shim/with-selector.production.js
110
110
  *
@@ -112,4 +112,4 @@ Error generating stack: `+a.message+`
112
112
  *
113
113
  * This source code is licensed under the MIT license found in the
114
114
  * LICENSE file in the root directory of this source tree.
115
- */var tv;function rA(){if(tv)return Vd;tv=1;var n=Qo(),i=hS();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var o=typeof Object.is=="function"?Object.is:r,c=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,g=n.useDebugValue;return Vd.useSyncExternalStoreWithSelector=function(p,y,v,S,E){var x=f(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=m(function(){function D(F){if(!C){if(C=!0,j=F,F=S(F),E!==void 0&&w.hasValue){var B=w.value;if(E(B,F))return k=B}return k=F}if(B=k,o(j,F))return B;var U=S(F);return E!==void 0&&E(B,U)?(j=F,B):(j=F,k=U)}var C=!1,j,k,q=v===void 0?null:v;return[function(){return D(y())},q===null?void 0:function(){return D(q())}]},[y,v,S,E]);var _=c(p,x[0],x[1]);return d(function(){w.hasValue=!0,w.value=_},[_]),g(_),_},Vd}var nv;function aA(){return nv||(nv=1,Yd.exports=rA()),Yd.exports}var oA=aA();const lA=wh(19),cA=lA?fA:dA;function mS(n,i,r,o,c){return cA(n,i,r,o,c)}function uA(n,i,r,o,c){const f=O.useCallback(()=>i(n.getSnapshot(),r,o,c),[n,i,r,o,c]);return sA.useSyncExternalStore(n.subscribe,f,f)}function fA(n,i,r,o,c){return uA(n,i,r,o,c)}function dA(n,i,r,o,c){return oA.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,r,o,c))}class hA{constructor(i){tt(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));tt(this,"getSnapshot",()=>this.state);this.state=i,this.listeners=new Set,this.updateTick=0}setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const r=this.updateTick;for(const o of this.listeners){if(r!==this.updateTick)return;o(i)}}update(i){for(const r in i)if(!Object.is(this.state[r],i[r])){this.setState({...this.state,...i});return}}set(i,r){Object.is(this.state[i],r)||this.setState({...this.state,[i]:r})}notifyAll(){const i={...this.state};this.setState(i)}use(i,r,o,c){return mS(this,i,r,o,c)}}class pS extends hA{constructor(i,r={},o){super(i),this.context=r,this.selectors=o}useSyncedValue(i,r){O.useDebugValue(i);const o=this;Xe(()=>{o.state[i]!==r&&o.set(i,r)},[o,i,r])}useSyncedValueWithCleanup(i,r){const o=this;Xe(()=>(o.state[i]!==r&&o.set(i,r),()=>{o.set(i,void 0)}),[o,i,r])}useSyncedValues(i){const r=this,o=Object.values(i);Xe(()=>{r.update(i)},[r,...o])}useControlledProp(i,r){O.useDebugValue(i);const o=this,c=r!==void 0;Xe(()=>{c&&!Object.is(o.state[i],r)&&o.setState({...o.state,[i]:r})},[o,i,r,c])}select(i,r,o,c){const f=this.selectors[i];return f(this.state,r,o,c)}useState(i,r,o,c){return O.useDebugValue(i),mS(this,this.selectors[i],r,o,c)}useContextCallback(i,r){O.useDebugValue(i);const o=$e(r??Rh);this.context[i]=o}useStateSetter(i){const r=O.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(i,o)}),r.current}observe(i,r){let o;typeof i=="function"?o=i:o=this.selectors[i];let c=o(this.state);return r(c,c,this),this.subscribe(f=>{const d=o(f);if(!Object.is(c,d)){const m=c;c=d,r(d,m,this)}})}}const mA={open:Ve(n=>n.open),transitionStatus:Ve(n=>n.transitionStatus),domReferenceElement:Ve(n=>n.domReferenceElement),referenceElement:Ve(n=>n.positionReference??n.referenceElement),floatingElement:Ve(n=>n.floatingElement),floatingId:Ve(n=>n.floatingId)};class au extends pS{constructor(r){const{syncOnly:o,nested:c,onOpenChange:f,triggerElements:d,...m}=r;super({...m,positionReference:m.referenceElement,domReferenceElement:m.referenceElement},{onOpenChange:f,dataRef:{current:{}},events:iS(),nested:c,triggerElements:d},mA);tt(this,"syncOpenEvent",(r,o)=>{(!r||!this.state.open||o!=null&&gO(o))&&(this.context.dataRef.current.openEvent=r?o:void 0)});tt(this,"dispatchOpenChange",(r,o)=>{this.syncOpenEvent(r,o.event);const c={open:r,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",c)});tt(this,"setOpen",(r,o)=>{var c,f,d,m;if(this.syncOnly){(f=(c=this.context).onOpenChange)==null||f.call(c,r,o);return}this.dispatchOpenChange(r,o),(m=(d=this.context).onOpenChange)==null||m.call(d,r,o)});this.syncOnly=o}}function pA(n){const{popupStore:i,treatPopupAsFloatingElement:r=!1,floatingRootContext:o,floatingId:c,nested:f,onOpenChange:d}=n,m=i.useState("open"),g=i.useState("activeTriggerElement"),p=i.useState(r?"popupElement":"positionerElement"),y=i.context.triggerElements,v=d,S=O.useRef(null);o===void 0&&S.current===null&&(S.current=new au({open:m,transitionStatus:void 0,referenceElement:g,floatingElement:p,triggerElements:y,onOpenChange:v,floatingId:c,syncOnly:!0,nested:f}));const E=o??S.current;return i.useSyncedValue("floatingId",c),Xe(()=>{const x={open:m,floatingId:c,referenceElement:g,floatingElement:p};Je(g)&&(x.domReferenceElement=g),E.state.positionReference===E.state.referenceElement&&(x.positionReference=g),E.update(x)},[m,c,g,p,E]),E.context.onOpenChange=v,E.context.nested=f,E}function gA(n,i=!1,r=!1){const[o,c]=O.useState(n&&i?"idle":void 0),[f,d]=O.useState(n);return n&&!f&&(d(!0),c("starting")),!n&&f&&o!=="ending"&&!r&&c("ending"),!n&&!f&&o==="ending"&&c(void 0),Xe(()=>{if(!n&&f&&o!=="ending"&&r){const m=di.request(()=>{c("ending")});return()=>{di.cancel(m)}}},[n,f,o,r]),Xe(()=>{if(!n||i)return;const m=di.request(()=>{c(void 0)});return()=>{di.cancel(m)}},[i,n]),Xe(()=>{if(!n||!i)return;n&&f&&o!=="idle"&&c("starting");const m=di.request(()=>{c("idle")});return()=>{di.cancel(m)}},[i,n,f,o]),{mounted:f,setMounted:d,transitionStatus:o}}let Bo=function(n){return n.startingStyle="data-starting-style",n.endingStyle="data-ending-style",n}({});const yA={[Bo.startingStyle]:""},bA={[Bo.endingStyle]:""},vA={transitionStatus(n){return n==="starting"?yA:n==="ending"?bA:null}};function gS(n,i=!1,r=!0){const o=Hh();return $e((c,f=null)=>{o.cancel();const d=Li(n);if(d==null)return;const m=d,g=()=>{Ms.flushSync(c)};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){c();return}function p(){Promise.all(m.getAnimations().map(y=>y.finished)).then(()=>{f!=null&&f.aborted||g()}).catch(()=>{if(r){f!=null&&f.aborted||g();return}const y=m.getAnimations();!(f!=null&&f.aborted)&&y.length>0&&y.some(v=>v.pending||v.playState!=="finished")&&p()})}if(i){const y=Bo.startingStyle;if(!m.hasAttribute(y)){o.request(p);return}const v=new MutationObserver(()=>{m.hasAttribute(y)||(v.disconnect(),p())});v.observe(m,{attributes:!0,attributeFilter:[y]}),f==null||f.addEventListener("abort",()=>v.disconnect(),{once:!0});return}o.request(p)})}function yS(n){const{enabled:i=!0,open:r,ref:o,onComplete:c}=n,f=$e(c),d=gS(o,r,!1);O.useEffect(()=>{if(!i)return;const m=new AbortController;return d(f,m.signal),()=>{m.abort()}},[i,r,f,d])}const bS={tabIndex:-1,[uh]:""};function SA(n){return i=>i==="touch"?n.current:!0}function xA(n,i,r=!1){const o=Po(),c=_a()!=null,f=O.useRef(null);n===void 0&&f.current===null&&(f.current=i(o,c));const d=n??f.current;return pA({popupStore:d,treatPopupAsFloatingElement:r,floatingRootContext:d.state.floatingRootContext,floatingId:o,nested:c,onOpenChange:d.setOpen}),{store:d,internalStore:f.current}}function EA(n,i){const r=O.useRef(null),o=O.useRef(null);return O.useCallback(c=>{if(n===void 0)return;let f=!1;if(r.current!==null){const d=r.current,m=o.current,g=i.context.triggerElements.getById(d);m&&g===m&&(i.context.triggerElements.delete(d),f=!0),r.current=null,o.current=null}if(c!==null&&(r.current=n,o.current=c,i.context.triggerElements.add(n,c),f=!0),f){const d=i.context.triggerElements.size;i.select("open")&&i.state.triggerCount!==d&&i.set("triggerCount",d)}},[i,n])}function TA(n,i,r,o=!1){i?n.preventUnmountingOnClose=!1:o&&(n.preventUnmountingOnClose=!0);const c=(r==null?void 0:r.id)??null;(c||i)&&(n.activeTriggerId=c,n.activeTriggerElement=r??null)}function wA(n){let i=!1;return n.preventUnmountOnClose=()=>{i=!0},()=>i}function RA(n,i,r,o){nA(()=>{i===void 0&&n.state.open===!1&&r&&(n.state={...n.state,open:!0,activeTriggerId:o,preventUnmountingOnClose:!1})})}function OA(n,i,r,o){const c=r.useState("isMountedByTrigger",n),f=EA(n,r),d=$e(m=>{if(f(m),!m)return;const g=r.select("open"),p=r.select("activeTriggerId");if(p===n){r.update({activeTriggerElement:m,...g?o:null});return}p==null&&g&&r.update({activeTriggerId:n,activeTriggerElement:m,...o})});return Xe(()=>{c&&r.update({activeTriggerElement:i.current,...o})},[c,r,i,...Object.values(o)]),{registerTrigger:d,isMountedByThisTrigger:c}}function CA(n,i={}){const{closeOnActiveTriggerUnmount:r=!1}=i,o=n.useState("open"),c=n.useState("triggerCount");Xe(()=>{if(!o){n.state.triggerCount!==0&&n.set("triggerCount",0);return}const f=n.context.triggerElements.size,d={};n.state.triggerCount!==f&&(d.triggerCount=f);const m=n.select("activeTriggerId");let g=null;if(m){const p=n.context.triggerElements.getById(m);p?p!==n.state.activeTriggerElement&&(d.activeTriggerElement=p):g=m}if(!g&&!m&&f===1){const p=n.context.triggerElements.entries().next();if(!p.done){const[y,v]=p.value;d.activeTriggerId=y,d.activeTriggerElement=v}}(d.triggerCount!==void 0||d.activeTriggerId!==void 0||d.activeTriggerElement!==void 0)&&n.update(d),g&&r&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===g&&!n.context.triggerElements.getById(g)){const p=Xt(xO);n.setOpen(!1,p),p.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,n,c,r])}function AA(n,i,r){const{mounted:o,setMounted:c,transitionStatus:f}=gA(n),d=i.useState("preventUnmountingOnClose"),m=n?!1:d;i.useSyncedValues({mounted:o,transitionStatus:f,preventUnmountingOnClose:m});const g=$e(()=>{var p,y;c(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),r==null||r(),(y=(p=i.context).onOpenChangeComplete)==null||y.call(p,!1)});return yS({enabled:o&&!n&&!m,open:n,ref:i.context.popupRef,onComplete(){n||g()}}),{forceUnmount:g,transitionStatus:f}}function _A(n,i){n.useSyncedValues(i),Xe(()=>()=>{n.update({activeTriggerProps:Wt,inactiveTriggerProps:Wt,popupProps:Wt})},[n])}function MA(n,i){Xe(()=>{!i&&n.state.openMethod!==null&&n.set("openMethod",null)},[i,n]),Xe(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class Kh{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(i,r){const o=this.idMap.get(i);o!==r&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(r),this.idMap.set(i,r))}delete(i){const r=this.idMap.get(i);r&&(this.elementsSet.delete(r),this.idMap.delete(i))}hasElement(i){return this.elementsSet.has(i)}hasMatchingElement(i){for(const r of this.elementsSet)if(i(r))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function NA(){return new au({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Kh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function DA(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:NA(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Wt,inactiveTriggerProps:Wt,popupProps:Wt}}function zA(n,i,r=!1){return new au({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:i,syncOnly:!0,nested:r,onOpenChange:void 0})}const No=Ve(n=>n.triggerIdProp??n.activeTriggerId),Zh=Ve(n=>n.openProp??n.open),iv=Ve(n=>{var r;return(((r=n.popupElement)==null?void 0:r.id)??n.floatingId)||void 0});function vS(n,i){return i!==void 0&&Zh(n)&&No(n)===i}function kA(n,i){return vS(n,i)?!0:i!==void 0&&Zh(n)&&No(n)==null&&n.triggerCount===1}const jA={open:Zh,mounted:Ve(n=>n.mounted),transitionStatus:Ve(n=>n.transitionStatus),floatingRootContext:Ve(n=>n.floatingRootContext),triggerCount:Ve(n=>n.triggerCount),preventUnmountingOnClose:Ve(n=>n.preventUnmountingOnClose),payload:Ve(n=>n.payload),activeTriggerId:No,activeTriggerElement:Ve(n=>n.mounted?n.activeTriggerElement:null),popupId:iv,isTriggerActive:Ve((n,i)=>i!==void 0&&No(n)===i),isOpenedByTrigger:Ve((n,i)=>vS(n,i)),isMountedByTrigger:Ve((n,i)=>i!==void 0&&No(n)===i&&n.mounted),triggerProps:Ve((n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps),triggerPopupId:Ve((n,i)=>kA(n,i)?iv(n):void 0),popupProps:Ve(n=>n.popupProps),popupElement:Ve(n=>n.popupElement),positionerElement:Ve(n=>n.positionerElement)};function UA(n){const{open:i=!1,onOpenChange:r,elements:o={}}=n,c=Po(),f=_a()!=null,d=Qi(()=>new au({open:i,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Kh,floatingId:c,syncOnly:!1,nested:f})).current;return Xe(()=>{const m={open:i,floatingId:c};o.reference!==void 0&&(m.referenceElement=o.reference,m.domReferenceElement=Je(o.reference)?o.reference:null),o.floating!==void 0&&(m.floatingElement=o.floating),d.update(m)},[i,c,o.reference,o.floating,d]),d.context.onOpenChange=r,d.context.nested=f,d}function LA(n={}){const{nodeId:i,externalTree:r}=n,o=UA(n),c=n.rootContext||o,f=c.useState("referenceElement"),d=c.useState("floatingElement"),m=c.useState("domReferenceElement"),g=c.useState("open"),p=c.useState("floatingId"),[y,v]=O.useState(null),[S,E]=O.useState(void 0),[x,w]=O.useState(void 0),_=O.useRef(null),D=Ma(r),C=O.useMemo(()=>({reference:f,floating:d,domReference:m}),[f,d,m]),j=PC({...n,elements:{...C,...y&&{reference:y}}}),k=Je(S)?S:null,q=x===void 0?c.state.floatingElement:x;c.useSyncedValue("referenceElement",S??null),c.useSyncedValue("domReferenceElement",S===void 0?m:k),c.useSyncedValue("floatingElement",q);const F=O.useCallback(ae=>{const W=Je(ae)?{getBoundingClientRect:()=>ae.getBoundingClientRect(),getClientRects:()=>ae.getClientRects(),contextElement:ae}:ae;v(W),j.refs.setReference(W)},[j.refs]),B=O.useCallback(ae=>{(Je(ae)||ae===null)&&(_.current=ae,E(ae)),(Je(j.refs.reference.current)||j.refs.reference.current===null||ae!==null&&!Je(ae))&&j.refs.setReference(ae)},[j.refs,E]),U=O.useCallback(ae=>{w(ae),j.refs.setFloating(ae)},[j.refs]),K=O.useMemo(()=>({...j.refs,setReference:B,setFloating:U,setPositionReference:F,domReference:_}),[j.refs,B,U,F]),se=O.useMemo(()=>({...j.elements,domReference:m}),[j.elements,m]),pe=O.useMemo(()=>({...j,dataRef:c.context.dataRef,open:g,onOpenChange:c.setOpen,events:c.context.events,floatingId:p,refs:K,elements:se,nodeId:i,rootStore:c}),[j,K,se,i,c,g,p]);return Xe(()=>{m&&(_.current=m)},[m]),Xe(()=>{c.context.dataRef.current.floatingContext=pe;const ae=D==null?void 0:D.nodesRef.current.find(W=>W.id===i);ae&&(ae.context=pe)}),O.useMemo(()=>({...j,context:pe,refs:K,elements:se,rootStore:c}),[j,K,se,pe,c])}class Ph{constructor(){tt(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});tt(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ei,this.restTimeout=new ei,this.handleCloseOptions=void 0}static create(){return new Ph}}const Zc=new WeakMap;function Pc(n){var r,o,c;if(!n.performedPointerEventsMutation)return;const i=n.pointerEventsScopeElement;i&&Zc.get(i)===n&&((r=n.pointerEventsScopeElement)==null||r.style.removeProperty("pointer-events"),(o=n.pointerEventsReferenceElement)==null||o.style.removeProperty("pointer-events"),(c=n.pointerEventsFloatingElement)==null||c.style.removeProperty("pointer-events"),Zc.delete(i)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function SS(n,i){const{scopeElement:r,referenceElement:o,floatingElement:c}=i,f=Zc.get(r);f&&f!==n&&Pc(f),Pc(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=r,n.pointerEventsReferenceElement=o,n.pointerEventsFloatingElement=c,Zc.set(r,n),r.style.pointerEvents="none",o.style.pointerEvents="auto",c.style.pointerEvents="auto"}function xS(n){const i=n.context.dataRef.current,r=Qi(()=>i.hoverInteractionState??Ph.create()).current;return i.hoverInteractionState||(i.hoverInteractionState=r),Lh(i.hoverInteractionState.disposeEffect),i.hoverInteractionState}function BA(n,i={}){const{enabled:r=!0,closeDelay:o=0,nodeId:c}=i,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),g=f.useState("domReferenceElement"),{dataRef:p}=f.context,y=Ma(),v=_a(),S=xS(f),E=Ea(),x=$e(()=>{var D;return L0((D=p.current.openEvent)==null?void 0:D.type,S.interactedInside)}),w=$e(()=>{var D;return SO((D=p.current.openEvent)==null?void 0:D.type)}),_=$e(()=>{Pc(S)});Xe(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,_())},[d,S,_]),O.useEffect(()=>_,[_]),Xe(()=>{var D,C,j,k,q;if(r&&d&&(D=S.handleCloseOptions)!=null&&D.blockPointerEvents&&w()&&Je(g)&&m){const F=g,B=m,U=ut(m),K=(j=(C=y==null?void 0:y.nodesRef.current.find(W=>W.id===v))==null?void 0:C.context)==null?void 0:j.elements.floating;K&&(K.style.pointerEvents="");const se=S.pointerEventsScopeElement!==B?S.pointerEventsScopeElement:null,pe=K!==B?K:null,ae=((q=(k=S.handleCloseOptions)==null?void 0:k.getScope)==null?void 0:q.call(k))??se??pe??F.closest("[data-rootownerid]")??U.body;return SS(S,{scopeElement:ae,referenceElement:F,floatingElement:B}),()=>{_()}}},[r,d,g,m,S,w,y,v,_]),O.useEffect(()=>{if(!r)return;function D(){return!!(y&&v&&_s(y.nodesRef.current,v).length>0)}function C(U){const K=fh(o,"close",S.pointerType),se=()=>{f.setOpen(!1,Xt(xn,U)),y==null||y.events.emit("floating.closed",U)};K?S.openChangeTimeout.start(K,se):(S.openChangeTimeout.clear(),se())}function j(U){const K=$n(U);if(!bO(K)){S.interactedInside=!1;return}S.interactedInside=(K==null?void 0:K.closest("[aria-haspopup]"))!=null}function k(){S.openChangeTimeout.clear(),E.clear(),y==null||y.events.off("floating.closed",F),_()}function q(U){var ae;if(D()&&y){y.events.on("floating.closed",F);return}if(U0(U.relatedTarget,f.context.triggerElements))return;const K=((ae=p.current.floatingContext)==null?void 0:ae.nodeId)??c,se=U.relatedTarget;if(!(y&&K&&Je(se)&&_s(y.nodesRef.current,K,!1).some(W=>{var le;return Me((le=W.context)==null?void 0:le.elements.floating,se)}))){if(S.handler){S.handler(U);return}_(),w()&&!x()&&C(U)}}function F(U){!y||!v||D()||E.start(0,()=>{y.events.off("floating.closed",F),f.setOpen(!1,Xt(xn,U)),y.events.emit("floating.closed",U)})}const B=m;return qi(B&&Ke(B,"mouseenter",k),B&&Ke(B,"mouseleave",q),B&&Ke(B,"pointerdown",j,!0),()=>{y==null||y.events.off("floating.closed",F)})},[r,m,f,p,o,c,w,x,_,S,y,v,E])}const HA={current:null};function qA(n,i={}){var ie;const{enabled:r=!0,delay:o=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:g=HA,externalTree:p,isActiveTrigger:y=!0,getHandleCloseContext:v,isClosing:S,shouldOpen:E}=i,x="rootStore"in n?n.rootStore:n,{dataRef:w,events:_}=x.context,D=Ma(p),C=xS(x),j=O.useRef(!1),k=En(c),q=En(o),F=En(d),B=En(r),U=En(E),K=En(S),se=$e(()=>{var N;return L0((N=w.current.openEvent)==null?void 0:N.type,C.interactedInside)}),pe=$e(()=>{var N;return((N=U.current)==null?void 0:N.call(U))!==!1}),ae=$e((N,Q,I)=>{const oe=x.context.triggerElements;if(oe.hasElement(Q))return!N||!Me(N,Q);if(!Je(I))return!1;const Y=I;return oe.hasMatchingElement(T=>Me(T,Y))&&(!N||!Me(N,Y))}),W=$e(()=>{if(!C.handler)return;ut(x.select("domReferenceElement")).removeEventListener("mousemove",C.handler),C.handler=void 0}),le=$e(()=>{Pc(C)});return y&&(C.handleCloseOptions=(ie=k.current)==null?void 0:ie.__options),O.useEffect(()=>W,[W]),O.useEffect(()=>{if(!r)return;function N(Q){Q.open?j.current=!1:(j.current=Q.reason===xn,W(),C.openChangeTimeout.clear(),C.restTimeout.clear(),C.blockMouseMove=!0,C.restTimeoutPending=!1)}return _.on("openchange",N),()=>{_.off("openchange",N)}},[r,_,C,W]),O.useEffect(()=>{if(!r)return;function N(Y,T=!0){const H=fh(q.current,"close",C.pointerType);H?C.openChangeTimeout.start(H,()=>{x.setOpen(!1,Xt(xn,Y)),D==null||D.events.emit("floating.closed",Y)}):T&&(C.openChangeTimeout.clear(),x.setOpen(!1,Xt(xn,Y)),D==null||D.events.emit("floating.closed",Y))}const Q=g.current??(y?x.select("domReferenceElement"):null);if(!Je(Q))return;function I(Y){var ft;if(C.openChangeTimeout.clear(),C.blockMouseMove=!1,f&&!jo(C.pointerType))return;const T=Nb(F.current),H=fh(q.current,"open",C.pointerType),te=$n(Y),ne=Y.currentTarget??null,re=x.select("domReferenceElement");let ee=ne;if(Je(te)&&!x.context.triggerElements.hasElement(te)){for(const vt of x.context.triggerElements.elements())if(Me(vt,te)){ee=vt;break}}Je(ne)&&Je(re)&&!x.context.triggerElements.hasElement(ne)&&Me(ne,re)&&(ee=re);const ge=ee==null?!1:ae(re,ee,te),ce=x.select("open"),fe=((ft=K.current)==null?void 0:ft.call(K))??x.select("transitionStatus")==="ending",Ze=!ce&&fe&&j.current,nt=!ge&&Je(ee)&&Je(re)&&Me(re,ee)&&Ze,ve=T>0&&!H,ze=ge&&(ce||Ze)||nt,Oe=!ce||ge;if(ze){pe()&&x.setOpen(!0,Xt(xn,Y,ee));return}ve||(H?C.openChangeTimeout.start(H,()=>{Oe&&pe()&&x.setOpen(!0,Xt(xn,Y,ee))}):Oe&&pe()&&x.setOpen(!0,Xt(xn,Y,ee)))}function oe(Y){if(se()){le();return}W();const T=x.select("domReferenceElement"),H=ut(T);C.restTimeout.clear(),C.restTimeoutPending=!1;const te=w.current.floatingContext??(v==null?void 0:v());if(U0(Y.relatedTarget,x.context.triggerElements))return;if(k.current&&te){x.select("open")||C.openChangeTimeout.clear();const re=g.current;C.handler=k.current({...te,tree:D,x:Y.clientX,y:Y.clientY,onClose(){le(),W(),B.current&&!se()&&re===x.select("domReferenceElement")&&N(Y,!0)}}),H.addEventListener("mousemove",C.handler),C.handler(Y);return}(C.pointerType==="touch"?!Me(x.select("floatingElement"),Y.relatedTarget):!0)&&N(Y)}return m?qi(Ke(Q,"mousemove",I,{once:!0}),Ke(Q,"mouseenter",I),Ke(Q,"mouseleave",oe)):qi(Ke(Q,"mouseenter",I),Ke(Q,"mouseleave",oe))},[W,le,w,q,x,r,k,C,y,ae,se,f,m,F,g,D,B,v,K,pe]),O.useMemo(()=>{if(!r)return;function N(Q){C.pointerType=Q.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(Q){var re,ee,ge;const{nativeEvent:I}=Q,oe=Q.currentTarget,Y=x.select("domReferenceElement"),T=x.select("open"),H=ae(Y,oe,Q.target);if(f&&!jo(C.pointerType))return;if(T&&H&&((re=C.handleCloseOptions)!=null&&re.blockPointerEvents)){const ce=x.select("floatingElement");if(ce){const fe=((ge=(ee=C.handleCloseOptions)==null?void 0:ee.getScope)==null?void 0:ge.call(ee))??oe.ownerDocument.body;SS(C,{scopeElement:fe,referenceElement:oe,floatingElement:ce})}}const te=Nb(F.current);if(T&&!H||te===0||!H&&C.restTimeoutPending&&Q.movementX**2+Q.movementY**2<2)return;C.restTimeout.clear();function ne(){if(C.restTimeoutPending=!1,se())return;const ce=x.select("open");!C.blockMouseMove&&(!ce||H)&&pe()&&x.setOpen(!0,Xt(xn,I,oe))}C.pointerType==="touch"?Ms.flushSync(()=>{ne()}):H&&T?ne():(C.restTimeoutPending=!0,C.restTimeout.start(te,ne))}}},[r,C,se,ae,f,x,F,pe])}const sv=.1,YA=sv*sv,lt=.5;function wc(n,i,r,o,c,f){return o>=i!=f>=i&&n<=(c-r)*(i-o)/(f-o)+r}function Rc(n,i,r,o,c,f,d,m,g,p){let y=!1;return wc(n,i,r,o,c,f)&&(y=!y),wc(n,i,c,f,d,m)&&(y=!y),wc(n,i,d,m,g,p)&&(y=!y),wc(n,i,g,p,r,o)&&(y=!y),y}function VA(n,i,r){return n>=r.x&&n<=r.x+r.width&&i>=r.y&&i<=r.y+r.height}function Oc(n,i,r,o,c,f){const d=Math.min(r,c),m=Math.max(r,c),g=Math.min(o,f),p=Math.max(o,f);return n>=d&&n<=m&&i>=g&&i<=p}function GA(n={}){const{blockPointerEvents:i=!1}=n,r=new ei,o=({x:c,y:f,placement:d,elements:m,onClose:g,nodeId:p,tree:y})=>{const v=d==null?void 0:d.split("-")[0];let S=!1,E=null,x=null,w=typeof performance<"u"?performance.now():0;function _(C,j){const k=performance.now(),q=k-w;if(E===null||x===null||q===0)return E=C,x=j,w=k,!1;const F=C-E,B=j-x,U=F*F+B*B,K=q*q*YA;return E=C,x=j,w=k,U<K}function D(){r.clear(),g()}return function(j){r.clear();const k=m.domReference,q=m.floating;if(!k||!q||v==null||c==null||f==null)return;const{clientX:F,clientY:B}=j,U=$n(j),K=j.type==="mouseleave",se=Me(q,U),pe=Me(k,U);if(se&&(S=!0,!K))return;if(pe&&(S=!1,!K)){S=!0;return}if(K&&Je(j.relatedTarget)&&Me(q,j.relatedTarget))return;function ae(){return!!(y&&_s(y.nodesRef.current,p).length>0)}function W(){ae()||D()}if(ae())return;const le=k.getBoundingClientRect(),ie=q.getBoundingClientRect(),N=c>ie.right-ie.width/2,Q=f>ie.bottom-ie.height/2,I=ie.width>le.width,oe=ie.height>le.height,Y=(I?le:ie).left,T=(I?le:ie).right,H=(oe?le:ie).top,te=(oe?le:ie).bottom;if(v==="top"&&f>=le.bottom-1||v==="bottom"&&f<=le.top+1||v==="left"&&c>=le.right-1||v==="right"&&c<=le.left+1){W();return}let ne=!1;switch(v){case"top":ne=Oc(F,B,Y,le.top+1,T,ie.bottom-1);break;case"bottom":ne=Oc(F,B,Y,ie.top+1,T,le.bottom-1);break;case"left":ne=Oc(F,B,ie.right-1,te,le.left+1,H);break;case"right":ne=Oc(F,B,le.right-1,te,ie.left+1,H);break}if(ne)return;if(S&&!VA(F,B,le)){W();return}if(!K&&_(F,B)){W();return}let re=!1;switch(v){case"top":{const ee=I?lt/2:lt*4,ge=I||N?c+ee:c-ee,ce=I?c-ee:N?c+ee:c-ee,fe=f+lt+1,Ze=N||I?ie.bottom-lt:ie.top,nt=N?I?ie.bottom-lt:ie.top:ie.bottom-lt;re=Rc(F,B,ge,fe,ce,fe,ie.left,Ze,ie.right,nt);break}case"bottom":{const ee=I?lt/2:lt*4,ge=I||N?c+ee:c-ee,ce=I?c-ee:N?c+ee:c-ee,fe=f-lt,Ze=N||I?ie.top+lt:ie.bottom,nt=N?I?ie.top+lt:ie.bottom:ie.top+lt;re=Rc(F,B,ge,fe,ce,fe,ie.left,Ze,ie.right,nt);break}case"left":{const ee=oe?lt/2:lt*4,ge=oe||Q?f+ee:f-ee,ce=oe?f-ee:Q?f+ee:f-ee,fe=c+lt+1,Ze=Q||oe?ie.right-lt:ie.left,nt=Q?oe?ie.right-lt:ie.left:ie.right-lt;re=Rc(F,B,Ze,ie.top,nt,ie.bottom,fe,ge,fe,ce);break}case"right":{const ee=oe?lt/2:lt*4,ge=oe||Q?f+ee:f-ee,ce=oe?f-ee:Q?f+ee:f-ee,fe=c-lt,Ze=Q||oe?ie.left+lt:ie.right,nt=Q?oe?ie.left+lt:ie.right:ie.left+lt;re=Rc(F,B,fe,ge,fe,ce,Ze,ie.top,nt,ie.bottom);break}}re?S||r.start(40,W):W()}};return o.__options={...n,blockPointerEvents:i},o}const ES=O.createContext(void 0);function Io(n){const i=O.useContext(ES);if(i===void 0&&!n)throw new Error(ur(47));return i}function QA(){return{...DA(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const XA={...jA,disabled:Ve(n=>n.disabled),instantType:Ve(n=>n.instantType),openMethod:Ve(n=>n.openMethod),openChangeReason:Ve(n=>n.openChangeReason),modal:Ve(n=>n.modal),focusManagerModal:Ve(n=>n.focusManagerModal),stickIfOpen:Ve(n=>n.stickIfOpen),titleElementId:Ve(n=>n.titleElementId),descriptionElementId:Ve(n=>n.descriptionElementId),openOnHover:Ve(n=>n.openOnHover),closeDelay:Ve(n=>n.closeDelay),hasViewport:Ve(n=>n.hasViewport)};class Ih extends pS{constructor(r,o,c=!1){const f={...QA(),...r},d=new Kh;f.open&&(r==null?void 0:r.mounted)===void 0&&(f.mounted=!0),f.floatingRootContext=zA(d,o,c);super(f,{popupRef:O.createRef(),backdropRef:O.createRef(),internalBackdropRef:O.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:O.createRef(),beforeContentFocusGuardRef:O.createRef(),stickIfOpenTimeout:new ei,triggerElements:d},XA);tt(this,"setOpen",(r,o)=>{var y,v;const c=o.reason===xn,f=o.reason===Uo&&o.event.detail===0,d=!r&&(o.reason===H0||o.reason==null),m=wA(o),g=this.select("activeTriggerId");if(!r&&o.reason===EO&&o.trigger==null&&g!=null&&(o.trigger=this.context.triggerElements.getById(g)??this.select("activeTriggerElement")??void 0),(v=(y=this.context).onOpenChange)==null||v.call(y,r,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(r,o);const p=()=>{const S={open:r,openChangeReason:o.reason};TA(S,r,o.trigger,m()),this.update(S)};c?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(PO,()=>{this.set("stickIfOpen",!1)}),Ms.flushSync(p)):p(),f||d?this.set("instantType",f?"click":"dismiss"):o.reason===Lo?this.set("instantType","focus"):this.set("instantType",void 0)});tt(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(r,o){const{store:c,internalStore:f}=xA(r,(d,m)=>new Ih(o,d,m));return O.useEffect(()=>f==null?void 0:f.disposeEffect(),[f]),c}}function rv({props:n}){const{children:i,open:r,defaultOpen:o=!1,onOpenChange:c,onOpenChangeComplete:f,modal:d=!1,handle:m,triggerId:g,defaultTriggerId:p=null}=n,y=Ih.useStore(m==null?void 0:m.store,{modal:d,open:o,openProp:r,activeTriggerId:p,triggerIdProp:g});RA(y,r,o,p),y.useControlledProp("openProp",r),y.useControlledProp("triggerIdProp",g);const v=y.useState("open"),S=y.useState("mounted"),E=y.useState("payload"),x=_a()!=null;y.useContextCallback("onOpenChange",c),y.useContextCallback("onOpenChangeComplete",f),MA(y,v),CA(y);const{forceUnmount:w}=AA(v,y,()=>{y.update({stickIfOpen:!0,openChangeReason:null})});y.useSyncedValues({modal:d,nested:x}),O.useEffect(()=>{v||y.context.stickIfOpenTimeout.clear()},[y,v]);const _=O.useCallback(()=>{y.setOpen(!1,Xt(TO))},[y]);O.useImperativeHandle(n.actionsRef,()=>({unmount:w,close:_}),[w,_]);const D=v||S,C=O.useMemo(()=>({store:y}),[y]);return A.jsxs(ES.Provider,{value:C,children:[D&&A.jsx(KA,{store:y,modal:d}),typeof i=="function"?i({payload:E}):i]})}function FA(n){return Io(!0)?A.jsx(rv,{props:n}):A.jsx(rC,{children:A.jsx(rv,{props:n})})}function KA({store:n,modal:i}){const r=n.useState("floatingRootContext"),o=hC(r,{outsidePressEvent:{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),c=o.reference??Wt,f=o.trigger??Wt,d=O.useMemo(()=>Fo(bS,o.floating),[o.floating]);return _A(n,{activeTriggerProps:c,inactiveTriggerProps:f,popupProps:d}),null}let Jh=function(n){return n.open="data-open",n.closed="data-closed",n[n.startingStyle=Bo.startingStyle]="startingStyle",n[n.endingStyle=Bo.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n.side="data-side",n.align="data-align",n}({}),ph=function(n){return n.popupOpen="data-popup-open",n.pressed="data-pressed",n}({});const ZA={[ph.popupOpen]:""},PA={[ph.popupOpen]:"",[ph.pressed]:""},IA={[Jh.open]:""},JA={[Jh.closed]:""},WA={[Jh.anchorHidden]:""},$A={open(n){return n?ZA:null}},e2={open(n){return n?PA:null}},TS={open(n){return n?IA:JA},anchorHidden(n){return n?WA:null}},t2=300;function n2(n){return Po(n,"base-ui")}function i2(n,i){const r=O.useRef(null);function o(f){Ms.flushSync(()=>{n.setOpen(!1,Xt(Lo,f.nativeEvent,f.currentTarget))});const d=QO(r.current);d==null||d.focus()}function c(f){var m;const d=n.select("positionerElement");if(d&&ra(f,d))(m=n.context.beforeContentFocusGuardRef.current)==null||m.focus();else{Ms.flushSync(()=>{n.setOpen(!1,Xt(Lo,f.nativeEvent,f.currentTarget))});let g=GO(n.context.triggerFocusTargetRef.current||i.current);for(;g!==null&&Me(d,g);){const p=g;if(g=Qh(g),g===p)break}g==null||g.focus()}}return{preFocusGuardRef:r,handlePreFocusGuardFocus:o,handleFocusTargetFocus:c}}function s2(n){const i=O.useRef(""),r=O.useCallback(c=>{c.defaultPrevented||(i.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:O.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c?n(c,c.pointerType):n(c,i.current),i.current=""},[n]),onPointerDown:r}}function r2(n,i){const r=$e((f,d)=>{(typeof n=="function"?n():n)||i(d||(su?"touch":""))}),{onClick:o,onPointerDown:c}=s2(r);return O.useMemo(()=>({onClick:o,onPointerDown:c}),[o,c])}const a2=O.forwardRef(function(i,r){const{render:o,className:c,style:f,disabled:d=!1,nativeButton:m=!0,handle:g,payload:p,openOnHover:y=!1,delay:v=t2,closeDelay:S=0,id:E,...x}=i,w=Io(!0),_=(g==null?void 0:g.store)??(w==null?void 0:w.store);if(!_)throw new Error(ur(74));const D=n2(E),C=_.useState("isTriggerActive",D),j=_.useState("floatingRootContext"),k=_.useState("isOpenedByTrigger",D),q=_.useState("triggerPopupId",D),F=O.useRef(null),{registerTrigger:B,isMountedByThisTrigger:U}=OA(D,F,_,{payload:p,disabled:d,openOnHover:y,closeDelay:S}),K=_.useState("openChangeReason"),se=_.useState("stickIfOpen"),pe=_.useState("openMethod"),ae=_.useState("focusManagerModal"),W=qA(j,{enabled:!d&&j!=null&&y&&(pe!=="touch"||K!==Uo),mouseOnly:!0,move:!1,handleClose:GA(),restMs:v,delay:{close:S},triggerElementRef:F,isActiveTrigger:C,isClosing:()=>_.select("transitionStatus")==="ending"}),le=uC(j,{enabled:j!=null,stickIfOpen:se}),ie=r2(()=>_.select("open"),re=>{_.set("openMethod",re)}),N=_.useState("triggerProps",U),{getButtonProps:Q,buttonRef:I}=N0({disabled:d,native:m}),oe={open(re){return re&&K===Uo?e2.open(re):$A.open(re)}},{preFocusGuardRef:Y,handlePreFocusGuardFocus:T,handleFocusTargetFocus:H}=i2(_,F),ne=Ra("button",i,{state:{disabled:d,open:k},ref:[I,r,B,F],props:[le.reference,W,N,ie,{[eS]:"",id:D,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":q},x,Q],stateAttributesMapping:oe});return U&&!ae?A.jsxs(O.Fragment,{children:[A.jsx(Ta,{ref:Y,onFocus:T}),A.jsx(O.Fragment,{children:ne},D),A.jsx(Ta,{ref:_.context.triggerFocusTargetRef,onFocus:H})]}):A.jsx(O.Fragment,{children:ne},D)}),wS=O.createContext(void 0);function o2(){const n=O.useContext(wS);if(n===void 0)throw new Error(ur(45));return n}const l2=O.forwardRef(function(i,r){const{keepMounted:o=!1,...c}=i,{store:f}=Io();return f.useState("mounted")||o?A.jsx(wS.Provider,{value:o,children:A.jsx(tC,{ref:r,...c})}):null});function c2(n){return wh(19)?n:n?"true":void 0}const RS=O.createContext(void 0);function u2(){const n=O.useContext(RS);if(!n)throw new Error(ur(46));return n}const f2=O.createContext(void 0);function d2(){const n=O.useContext(f2);return(n==null?void 0:n.direction)??"ltr"}const h2=n=>({name:"arrow",options:n,async fn(i){var oe,Y;const{x:r,y:o,placement:c,rects:f,platform:d,elements:m,middlewareData:g}=i,{element:p,padding:y=0,offsetParent:v="real"}=Gi(n,i)||{};if(p==null)return{};const S=Y0(y),E={x:r,y:o},x=Vh(c),w=Yh(x),_=await d.getDimensions(p),D=x==="y",C=D?"top":"left",j=D?"bottom":"right",k=D?"clientHeight":"clientWidth",q=f.reference[w]+f.reference[x]-E[x]-f.floating[w],F=E[x]-f.reference[x],B=v==="real"?await((oe=d.getOffsetParent)==null?void 0:oe.call(d,p)):m.floating;let U=m.floating[k]||f.floating[w];(!U||!await((Y=d.isElement)==null?void 0:Y.call(d,B)))&&(U=m.floating[k]||f.floating[w]);const K=q/2-F/2,se=U/2-_[w]/2-1,pe=Math.min(S[C],se),ae=Math.min(S[j],se),W=pe,le=U-_[w]-ae,ie=U/2-_[w]/2+K,N=q0(W,ie,le),Q=!g.arrow&&Ds(c)!=null&&ie!==N&&f.reference[w]/2-(ie<W?pe:ae)-_[w]/2<0,I=Q?ie<W?ie-W:ie-le:0;return{[x]:E[x]+I,data:{[x]:N,centerOffset:ie-N-I,...Q&&{alignmentOffset:I}},reset:Q}}}),m2=(n,i)=>({...h2(n),options:[n,i]}),p2=tA().fn,g2={name:"hide",async fn(n){var m;const{width:i,height:r,x:o,y:c}=n.rects.reference,f=i===0&&r===0&&o===0&&c===0;return{data:{referenceHidden:((m=(await p2(n)).data)==null?void 0:m.referenceHidden)||f}}}},jc={sideX:"left",sideY:"top"},y2={name:"adaptiveOrigin",async fn(n){var C,j;const{x:i,y:r,rects:{floating:o},elements:{floating:c},platform:f,strategy:d,placement:m}=n,g=kt(c),p=g.getComputedStyle(c);if(!(p.transitionDuration!=="0s"&&p.transitionDuration!==""))return{x:i,y:r,data:jc};const v=await((C=f.getOffsetParent)==null?void 0:C.call(f,c));let S={width:0,height:0};if(d==="fixed"&&(g!=null&&g.visualViewport))S={width:g.visualViewport.width,height:g.visualViewport.height};else if(v===g){const k=ut(c);S={width:k.documentElement.clientWidth,height:k.documentElement.clientHeight}}else await((j=f.isElement)==null?void 0:j.call(f,v))&&(S=await f.getDimensions(v));const E=Dn(m);let x=i,w=r;E==="left"&&(x=S.width-(i+o.width)),E==="top"&&(w=S.height-(r+o.height));const _=E==="left"?"right":jc.sideX,D=E==="top"?"bottom":jc.sideY;return{x,y:w,data:{sideX:_,sideY:D}}}};function OS(n,i,r){const o=n==="inline-start"||n==="inline-end";return{top:"top",right:o?r?"inline-start":"inline-end":"right",bottom:"bottom",left:o?r?"inline-end":"inline-start":"left"}[i]}function av(n,i,r){const{rects:o,placement:c}=n;return{side:OS(i,Dn(c),r),align:Ds(c)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function b2(n){var gr,pi;const{anchor:i,positionMethod:r="absolute",side:o="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,collisionBoundary:m,collisionPadding:g=5,sticky:p=!1,arrowPadding:y=5,disableAnchorTracking:v=!1,inline:S,keepMounted:E=!1,floatingRootContext:x,mounted:w,collisionAvoidance:_,shiftCrossAxis:D=!1,nodeId:C,adaptiveOrigin:j,lazyFlip:k=!1,externalTree:q}=n,[F,B]=O.useState(null);!w&&F!==null&&B(null);const U=_.side||"flip",K=_.align||"flip",se=_.fallbackAxisSide||"end",pe=typeof i=="function"?i:void 0,ae=$e(pe),W=pe?ae:i,le=En(i),ie=En(w),Q=d2()==="rtl",I=F||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Q?"left":"right","inline-start":Q?"right":"left"}[o],oe=f==="center"?I:`${I}-${f}`;let Y=g;const T=1,H=o==="bottom"?T:0,te=o==="top"?T:0,ne=o==="right"?T:0,re=o==="left"?T:0;typeof Y=="number"?Y={top:Y+H,right:Y+re,bottom:Y+te,left:Y+ne}:Y&&(Y={top:(Y.top||0)+H,right:(Y.right||0)+re,bottom:(Y.bottom||0)+te,left:(Y.left||0)+ne});const ee={boundary:m==="clipping-ancestors"?"clippingAncestors":m,padding:Y},ge=O.useRef(null),ce=En(c),fe=En(d),Ze=typeof c!="function"?c:0,nt=typeof d!="function"?d:0,ve=[];S&&ve.push(S),ve.push(IC(Fe=>{const Ot=av(Fe,o,Q),Vt=typeof ce.current=="function"?ce.current(Ot):ce.current,Ft=typeof fe.current=="function"?fe.current(Ot):fe.current;return{mainAxis:Vt,crossAxis:Ft,alignmentAxis:Ft}},[Ze,nt,Q,o]));const ze=K==="none"&&U!=="shift",Oe=!ze&&(p||D||U==="shift"),ft=U==="none"?null:$C({...ee,padding:{top:Y.top+T,right:Y.right+T,bottom:Y.bottom+T,left:Y.left+T},mainAxis:!D&&U==="flip",crossAxis:K==="flip"?"alignment":!1,fallbackAxisSideDirection:se}),vt=ze?null:JC(Fe=>{const Ot=ut(Fe.elements.floating).documentElement;return{...ee,rootBoundary:D?{x:0,y:0,width:Ot.clientWidth,height:Ot.clientHeight}:void 0,mainAxis:K!=="none",crossAxis:Oe,limiter:p||D?void 0:WC(Vt=>{if(!ge.current)return{};const{width:Ft,height:an}=ge.current.getBoundingClientRect(),wn=Fn(Dn(Vt.placement)),ni=wn==="y"?Ft:an,ii=wn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:ni/2+ii/2}})}},[ee,p,D,Y,K]);U==="shift"||K==="shift"||f==="center"?ve.push(vt,ft):ve.push(ft,vt),ve.push(eA({...ee,apply({elements:{floating:Fe},availableWidth:Ot,availableHeight:Vt,rects:Ft}){if(!ie.current)return;const an=Fe.style;an.setProperty("--available-width",`${Ot}px`),an.setProperty("--available-height",`${Vt}px`);const wn=kt(Fe).devicePixelRatio||1,{x:ni,y:ii,width:dn,height:Na}=Ft.reference,yr=(Math.round((ni+dn)*wn)-Math.round(ni*wn))/wn,br=(Math.round((ii+Na)*wn)-Math.round(ii*wn))/wn;an.setProperty("--anchor-width",`${yr}px`),an.setProperty("--anchor-height",`${br}px`)}}),m2(Fe=>({element:ge.current||ut(Fe.elements.floating).createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Fe){var Sr,el,tl;const{elements:Ot,middlewareData:Vt,placement:Ft,rects:an,y:wn}=Fe,ni=Dn(Ft),ii=Fn(ni),dn=ge.current,Na=((Sr=Vt.arrow)==null?void 0:Sr.x)||0,yr=((el=Vt.arrow)==null?void 0:el.y)||0,br=(dn==null?void 0:dn.clientWidth)||0,Jo=(dn==null?void 0:dn.clientHeight)||0,zs=Na+br/2,vr=yr+Jo/2,Wo=Math.abs(((tl=Vt.shift)==null?void 0:tl.y)||0),$o=an.reference.height/2,hn=typeof c=="function"?c(av(Fe,o,Q)):c,Ut=Wo>hn,en={top:`${zs}px calc(100% + ${hn}px)`,bottom:`${zs}px ${-hn}px`,left:`calc(100% + ${hn}px) ${vr}px`,right:`${-hn}px ${vr}px`}[ni],Fi=`${zs}px ${an.reference.y+$o-wn}px`;return Ot.floating.style.setProperty("--transform-origin",Oe&&ii==="y"&&Ut?Fi:en),{}}},g2,j),Xe(()=>{!w&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[w,x]);const Re=O.useMemo(()=>({elementResize:!v&&typeof ResizeObserver<"u",layoutShift:!v&&typeof IntersectionObserver<"u"}),[v]),{refs:ke,elements:Ee,x:mt,y:dt,middlewareData:je,update:xt,placement:ue,context:xe,isPositioned:ht,floatingStyles:Be}=LA({rootContext:x,open:E?w:void 0,placement:oe,middleware:ve,strategy:r,whileElementsMounted:E?void 0:(...Fe)=>Jb(...Fe,Re),nodeId:C,externalTree:q}),{sideX:pt,sideY:jt}=je.adaptiveOrigin||jc,sn=ht?r:"fixed",rn=O.useMemo(()=>{const Fe=j?{position:sn,[pt]:mt,[jt]:dt}:{position:sn,...Be};return ht||(Fe.opacity=0),Fe},[j,sn,pt,mt,jt,dt,Be,ht]),ti=O.useRef(null);Xe(()=>{if(!w)return;const Fe=le.current,Ot=typeof Fe=="function"?Fe():Fe,Ft=(ov(Ot)?Ot.current:Ot)||null||null;Ft!==ti.current&&(ke.setPositionReference(Ft),ti.current=Ft)},[w,ke,W,le]),O.useEffect(()=>{if(!w)return;const Fe=le.current;typeof Fe!="function"&&ov(Fe)&&Fe.current!==ti.current&&(ke.setPositionReference(Fe.current),ti.current=Fe.current)},[w,ke,W,le]),O.useEffect(()=>{if(E&&w&&Ee.reference&&Ee.floating)return Jb(Ee.reference,Ee.floating,xt,Re)},[E,w,Ee,xt,Re]);const fn=Dn(ue),qt=OS(o,fn,Q),Tn=Ds(ue)||"center",Yt=!!((gr=je.hide)!=null&&gr.referenceHidden);Xe(()=>{k&&w&&ht&&B(fn)},[k,w,ht,fn]);const mr=O.useMemo(()=>{var Fe,Ot;return{position:"absolute",top:(Fe=je.arrow)==null?void 0:Fe.y,left:(Ot=je.arrow)==null?void 0:Ot.x}},[je.arrow]),pr=((pi=je.arrow)==null?void 0:pi.centerOffset)!==0;return O.useMemo(()=>({positionerStyles:rn,arrowStyles:mr,arrowRef:ge,arrowUncentered:pr,side:qt,align:Tn,physicalSide:fn,anchorHidden:Yt,refs:ke,context:xe,isPositioned:ht,update:xt}),[rn,mr,ge,pr,qt,Tn,fn,Yt,ke,xe,ht,xt])}function ov(n){return n!=null&&"current"in n}const v2=O.forwardRef(function(i,r){const{cutout:o,...c}=i;let f;if(o){const d=o.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return A.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});function CS(n){return n==="starting"?IO:Wt}function S2(n,i,{styles:r,transitionStatus:o,props:c,refs:f,hidden:d,inert:m=!1}){const g={...r};return m&&(g.pointerEvents="none"),Ra("div",n,{state:i,ref:f,props:[{role:"presentation",hidden:d,style:g},CS(o),c],stateAttributesMapping:TS})}let lv={},cv={},uv="";function x2(n){if(typeof document>"u")return!1;const i=ut(n);return kt(i).innerWidth-i.documentElement.clientWidth>0}function E2(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=ut(n),o=r.documentElement,c=r.body,f=hr(o)?o:c,d=f.style.overflowY,m=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",f.style.overflowY="scroll";const g=f.offsetWidth;f.style.overflowY="hidden";const p=f.offsetWidth;return f.style.overflowY=d,o.style.scrollbarGutter=m,g===p}function T2(n){const i=ut(n),r=i.documentElement,o=i.body,c=hr(r)?r:o,f={overflowY:c.style.overflowY,overflowX:c.style.overflowX};return Object.assign(c.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(c.style,f)}}function w2(n){var E;const i=ut(n),r=i.documentElement,o=i.body,c=kt(r);let f=0,d=0,m=!1;const g=di.create();if(Aa&&(((E=c.visualViewport)==null?void 0:E.scale)??1)!==1)return()=>{};function p(){const x=c.getComputedStyle(r),w=c.getComputedStyle(o),C=(x.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=r.scrollTop,d=r.scrollLeft,lv={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},uv=r.style.scrollBehavior,cv={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const j=r.scrollHeight>r.clientHeight,k=r.scrollWidth>r.clientWidth,q=x.overflowY==="scroll"||w.overflowY==="scroll",F=x.overflowX==="scroll"||w.overflowX==="scroll",B=Math.max(0,c.innerWidth-o.clientWidth),U=Math.max(0,c.innerHeight-o.clientHeight),K=parseFloat(w.marginTop)+parseFloat(w.marginBottom),se=parseFloat(w.marginLeft)+parseFloat(w.marginRight),pe=hr(r)?r:o;if(m=E2(n),m){r.style.scrollbarGutter=C,pe.style.overflowY="hidden",pe.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(j||q)&&(r.style.overflowY="scroll"),(k||F)&&(r.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:K||U?`calc(100dvh - ${K+U}px)`:"100dvh",width:se||B?`calc(100vw - ${se+B}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),o.scrollTop=f,o.scrollLeft=d,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function y(){Object.assign(r.style,lv),Object.assign(o.style,cv),m||(r.scrollTop=f,r.scrollLeft=d,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=uv)}function v(){y(),g.request(p)}p();const S=Ke(c,"resize",v);return()=>{g.cancel(),y(),typeof c.removeEventListener=="function"&&S()}}class R2{constructor(){tt(this,"lockCount",0);tt(this,"restore",null);tt(this,"timeoutLock",ei.create());tt(this,"timeoutUnlock",ei.create());tt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});tt(this,"unlock",()=>{var i;this.lockCount===0&&this.restore&&((i=this.restore)==null||i.call(this),this.restore=null)})}acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}lock(i){if(this.lockCount===0||this.restore!==null)return;const o=ut(i).documentElement,c=kt(o).getComputedStyle(o).overflowY;if(c==="hidden"||c==="clip"){this.restore=Rh;return}const f=su||!x2(i);this.restore=f?T2(i):w2(i)}}const O2=new R2;function C2(n=!0,i=null){Xe(()=>{if(n)return O2.acquire(i)},[n,i])}const A2=20;function _2(n,i,r,o){const[c,f]=O.useState(!1);Xe(()=>{if(!n||!i||r==null){f(!1);return}const d=ut(r).documentElement.clientWidth,m=r.offsetWidth;f(d>0&&m>0&&m>=d-A2)},[n,i,r]),C2(n&&(!i||c),o)}const M2=O.forwardRef(function(i,r){const{render:o,className:c,style:f,anchor:d,positionMethod:m="absolute",side:g="bottom",align:p="center",sideOffset:y=0,alignOffset:v=0,collisionBoundary:S="clipping-ancestors",collisionPadding:E=5,arrowPadding:x=5,sticky:w=!1,disableAnchorTracking:_=!1,collisionAvoidance:D=JO,...C}=i,{store:j}=Io(),k=o2(),q=iC(),F=j.useState("floatingRootContext"),B=j.useState("mounted"),U=j.useState("open"),K=j.useState("openChangeReason"),se=j.useState("activeTriggerElement"),pe=j.useState("modal"),ae=j.useState("openMethod"),W=j.useState("positionerElement"),le=j.useState("instantType"),ie=j.useState("transitionStatus"),N=j.useState("hasViewport"),Q=O.useRef(null),I=gS(W,!1,!1),oe=b2({anchor:d,floatingRootContext:F,positionMethod:m,mounted:B,side:g,sideOffset:y,align:p,alignOffset:v,arrowPadding:x,collisionBoundary:S,collisionPadding:E,sticky:w,disableAnchorTracking:_,keepMounted:k,nodeId:q,collisionAvoidance:D,adaptiveOrigin:N?y2:void 0}),Y=F.useState("domReferenceElement");Xe(()=>{const ne=Y,re=Q.current;if(ne&&(Q.current=ne),re&&ne&&ne!==re){j.set("instantType",void 0);const ee=new AbortController;return I(()=>{j.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[Y,I,j]),_2(U&&pe===!0&&K!==xn,ae==="touch",W,se);const T=O.useCallback(ne=>{j.set("positionerElement",ne)},[j]),H={open:U,side:oe.side,align:oe.align,anchorHidden:oe.anchorHidden,instant:le},te=S2(i,H,{styles:oe.positionerStyles,transitionStatus:ie,props:C,refs:[r,T],hidden:!B,inert:!U});return A.jsxs(RS.Provider,{value:oe,children:[B&&pe===!0&&K!==xn&&A.jsx(v2,{ref:j.context.internalBackdropRef,inert:c2(!U),cutout:se}),A.jsx(sC,{id:q,children:te})]})}),N2="ArrowUp",D2="ArrowDown",z2="ArrowLeft",k2="ArrowRight",j2="Home",U2="End",L2=new Set([z2,k2]),B2=new Set([N2,D2]),H2=new Set([...L2,...B2]),q2=new Set([...H2,j2,U2]),Y2=O.createContext(void 0);function V2(n){return O.useContext(Y2)}const G2=O.createContext(void 0);function Q2(){const[n,i]=O.useState(0),r=$e(()=>(i(c=>c+1),()=>{i(c=>Math.max(0,c-1))}));return{context:O.useMemo(()=>({register:r}),[r]),hasClosePart:n>0}}function X2(n){const{value:i,children:r}=n;return A.jsx(G2.Provider,{value:i,children:r})}const F2={...TS,...vA},K2=O.forwardRef(function(i,r){const{render:o,className:c,style:f,initialFocus:d,finalFocus:m,...g}=i,{store:p}=Io(),y=u2(),v=V2()!=null,{context:S,hasClosePart:E}=Q2(),x=p.useState("open"),w=p.useState("openMethod"),_=p.useState("instantType"),D=p.useState("transitionStatus"),C=p.useState("popupProps"),j=p.useState("titleElementId"),k=p.useState("descriptionElementId"),q=p.useState("modal"),F=p.useState("mounted"),B=p.useState("openChangeReason"),U=p.useState("activeTriggerElement"),K=p.useState("floatingRootContext"),se=K.useState("floatingId"),pe=p.useState("disabled"),ae=p.useState("openOnHover"),W=p.useState("closeDelay"),le=g.id??se;yS({open:x,ref:p.context.popupRef,onComplete(){var Y,T;x&&((T=(Y=p.context).onOpenChangeComplete)==null||T.call(Y,!0))}}),BA(K,{enabled:ae&&!pe,closeDelay:W});const ie=d===void 0?SA(p.context.popupRef):d,N=q!==!1&&E;p.useSyncedValue("focusManagerModal",N);const Q=O.useCallback(Y=>{p.set("popupElement",Y)},[p]),I={open:x,side:y.side,align:y.align,instant:_,transitionStatus:D},oe=Ra("div",i,{state:I,ref:[r,p.context.popupRef,Q],props:[C,{id:le,role:"dialog",...bS,"aria-labelledby":j,"aria-describedby":k,onKeyDown(Y){v&&q2.has(Y.key)&&Y.stopPropagation()}},CS(D),g],stateAttributesMapping:F2});return A.jsx(cC,{context:K,openInteractionType:w,modal:N,disabled:!F||B===xn,initialFocus:ie,returnFocus:m,restoreFocus:"popup",previousFocusableElement:Rt(U)?U:void 0,nextFocusableElement:p.context.triggerFocusTargetRef,beforeContentFocusGuardRef:p.context.beforeContentFocusGuardRef,children:A.jsx(X2,{value:S,children:oe})})}),Z2="bg-chatroom-bg-primary text-chatroom-text-primary border border-chatroom-border rounded-none shadow-md",P2=`z-50 pointer-events-auto outline-none ${Z2}`;function AS({modal:n=!1,...i}){return A.jsx(FA,{"data-slot":"popover",modal:n,...i})}function _S(n){return A.jsx(a2,{"data-slot":"popover-trigger",...n})}function MS({className:n,align:i="start",side:r="bottom",sideOffset:o=4,...c}){return A.jsx(l2,{children:A.jsx(M2,{align:i,side:r,sideOffset:o,className:"isolate z-50",children:A.jsx(K2,{className:un("w-72 origin-(--transform-origin) overflow-hidden p-0 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95",P2,n),...c})})})}function NS({options:n,value:i,onChange:r,disabled:o,isLoading:c,isError:f,placeholder:d="Select…",allLabel:m="All",searchPlaceholder:g="Search…",emptyLabel:p="No results",ariaLabel:y,triggerClassName:v,contentClassName:S,allowClear:E=!0}){var U;const[x,w]=O.useState(!1),{searchTerm:_,setSearchTerm:D,handleOpenChange:C}=nO(w),j=(U=n.find(K=>K.value===i))==null?void 0:U.label,k=c?"Loading…":f?"Failed to load":j??d,q=O.useMemo(()=>$R(n,_,K=>`${K.label} ${K.value}`),[n,_]),F=o||c||f,B=A.jsxs("button",{type:"button",disabled:F,className:un(z0,v),"aria-label":y,"aria-busy":c,children:[A.jsx("span",{className:"truncate",children:k}),A.jsx(Jc,{size:12,className:k0})]});return A.jsxs(AS,{open:x,onOpenChange:C,children:[A.jsx(_S,{render:B}),A.jsxs(MS,{className:un("w-64",S),children:[A.jsx(tO,{value:_,onChange:D,placeholder:g}),A.jsxs(eO,{maxHeightClassName:"max-h-60",children:[E&&A.jsx(Vc,{selected:!i,onSelect:()=>{r(void 0),C(!1)},children:m}),q.map(K=>A.jsx(Vc,{selected:i===K.value,onSelect:()=>{r(K.value),C(!1)},children:K.label},K.value)),!q.length&&A.jsx("div",{className:"px-3 py-2 text-xs text-chatroom-text-muted",children:p})]})]})]})}function DS({chatrooms:n,value:i,onChange:r,disabled:o,isLoading:c,isError:f}){return A.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[A.jsx("span",{className:"text-chatroom-text-muted",children:"Chatroom"}),A.jsx(NS,{options:n.map(d=>({value:d.id,label:d.displayName})),value:i,onChange:d=>{d&&r(d)},disabled:o,isLoading:c,isError:f,placeholder:"Select chatroom",allowClear:!1,searchPlaceholder:"Search chatrooms…",ariaLabel:"Filter by chatroom",triggerClassName:"min-w-[10rem]"})]})}const Wh="1h",zS={"1h":"Last 1 hour","3h":"Last 3 hours","1d":"Last 1 day"},kS={"1h":36e5,"3h":108e5,"1d":864e5};function Ic(n,i=Date.now()){return n.timeRange==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0?{fromMs:n.fromMs,toMs:n.toMs}:{fromMs:i-(kS[n.timeRange]??36e5),toMs:i}}function I2(n){const i=n.timeRange??"1h";return i!=="custom"?zS[i]:n.fromMs!==void 0&&n.toMs!==void 0?`${new Date(n.fromMs).toLocaleString()} – ${new Date(n.toMs).toLocaleString()}`:"Custom range"}const Cc=n=>{const i=new Date(n),r=o=>String(o).padStart(2,"0");return`${i.getFullYear()}-${r(i.getMonth()+1)}-${r(i.getDate())}T${r(i.getHours())}:${r(i.getMinutes())}`},fv=n=>{const i=new Date(n).getTime();return Number.isFinite(i)?i:void 0},J2=["1h","3h","1d"];function jS({value:n,onChange:i,disabled:r}){const[o,c]=O.useState(!1),[f,d]=O.useState(null),[m,g]=O.useState(null),p=n.timeRange??Wh,y=f??(p==="custom"&&n.fromMs!==void 0?Cc(n.fromMs):""),v=m??(p==="custom"&&n.toMs!==void 0?Cc(n.toMs):""),S=()=>{const x=Date.now(),w=n.fromMs??x-kS["1h"],_=n.toMs??x;d(Cc(w)),g(Cc(_)),i({timeRange:"custom",fromMs:w,toMs:_})},E=()=>{const x=fv(y),w=fv(v);x===void 0||w===void 0||x>w||(i({timeRange:"custom",fromMs:x,toMs:w}),c(!1))};return A.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[A.jsx("span",{className:"text-chatroom-text-muted",children:"Time"}),A.jsxs(AS,{open:o,onOpenChange:c,children:[A.jsx(_S,{render:A.jsxs("button",{type:"button",disabled:r,className:un(z0,"min-w-[10rem]"),"aria-label":"Filter by time range",children:[A.jsx("span",{className:"truncate",children:I2(n)}),A.jsx(Jc,{size:12,className:k0})]})}),A.jsxs(MS,{className:"w-72 p-0",align:"start",children:[J2.map(x=>A.jsx(Vc,{selected:p===x,onSelect:()=>{d(null),g(null),i({timeRange:x,fromMs:void 0,toMs:void 0}),c(!1)},children:zS[x]},x)),A.jsx(Vc,{selected:p==="custom",onSelect:S,children:"Custom range…"}),p==="custom"&&A.jsxs("div",{className:"space-y-2 border-t border-chatroom-border px-3 py-2",children:[A.jsxs("label",{className:"flex flex-col gap-1 text-[11px] text-chatroom-text-muted",children:["Start",A.jsx("input",{type:"datetime-local",value:y,onChange:x=>d(x.target.value),className:"rounded-none border border-chatroom-border bg-chatroom-bg-secondary px-2 py-1 text-xs text-chatroom-text-primary"})]}),A.jsxs("label",{className:"flex flex-col gap-1 text-[11px] text-chatroom-text-muted",children:["End",A.jsx("input",{type:"datetime-local",value:v,onChange:x=>g(x.target.value),className:"rounded-none border border-chatroom-border bg-chatroom-bg-secondary px-2 py-1 text-xs text-chatroom-text-primary"})]}),A.jsx("button",{type:"button",onClick:E,className:"w-full border border-chatroom-border bg-chatroom-bg-tertiary px-2 py-1.5 text-xs hover:bg-chatroom-bg-hover",children:"Apply"})]})]})]})]})}function W2({chatrooms:n,chatroomsLoading:i,chatroomsError:r,values:o,onChange:c,disabled:f}){return A.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[A.jsx(jS,{value:{timeRange:o.timeRange,fromMs:o.fromMs,toMs:o.toMs},onChange:d=>c({...o,...d}),disabled:f}),A.jsx(DS,{chatrooms:n,value:o.chatroomId,onChange:d=>c({...o,chatroomId:d}),disabled:f,isLoading:i,isError:r})]})}function $2({hasChatroom:n}){return A.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-border bg-chatroom-bg-secondary p-6 text-center",role:"status",children:[A.jsx(d0,{className:"size-8 text-chatroom-text-muted","aria-hidden":!0}),A.jsx("p",{className:"text-sm text-chatroom-text-secondary",children:n?"No events in this time range":"Select a chatroom to view events"})]})}const e_=["role","message","reason","taskId","agentId","phase","status","harness"];function t_(n){for(const r of e_){const o=n[r];if(typeof o=="string"&&o.trim())return o.length>80?`${o.slice(0,77)}…`:o;if(typeof o=="number")return String(o)}const i=new Set(["type","timestamp","chatroomId","_id"]);for(const[r,o]of Object.entries(n)){if(i.has(r)||o==null)continue;const c=`${r}: ${typeof o=="string"?o:JSON.stringify(o)}`;return c.length>80?`${c.slice(0,77)}…`:c}return""}function n_({entry:n,selected:i,onSelect:r}){return A.jsxs("div",{role:"button",tabIndex:0,onClick:()=>r==null?void 0:r(n),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r==null||r(n))},className:`flex items-center gap-3 border-b border-chatroom-border px-3 py-2 text-xs ${i?"bg-chatroom-bg-hover":"hover:bg-chatroom-bg-hover"}`,children:[A.jsx("span",{className:"w-20 shrink-0 font-mono text-chatroom-text-muted",children:new Date(n.timestamp).toLocaleTimeString()}),A.jsx(_0,{type:n.type}),A.jsx("span",{className:"min-w-0 truncate text-chatroom-text-secondary",children:t_(n.payload)})]})}function i_(n,i=48){return n.scrollHeight-n.scrollTop-n.clientHeight<=i}function US(n){const i=O.useRef(null),[r,o]=O.useState(!0),c=O.useRef(n),f=O.useCallback((g="auto")=>{const p=i.current;p&&(p.scrollTo({top:p.scrollHeight,behavior:g}),o(!0),c.current=n)},[n]),d=O.useCallback(()=>{const g=i.current;if(!g)return;const p=i_(g);o(p),p&&(c.current=n)},[n]),m=!r&&n>c.current;return{scrollRef:i,isPinned:r,hasUnseenBelow:m,scrollToEnd:f,handleScroll:d}}function LS({rows:n=8}){return A.jsx("div",{className:"flex flex-col gap-1 p-3","aria-busy":"true","aria-label":"Loading logs",children:Array.from({length:n},(i,r)=>A.jsxs("div",{className:"flex gap-3 py-1",children:[A.jsx(_o,{className:"h-4 w-16 shrink-0"}),A.jsx(_o,{className:"h-4 w-12 shrink-0"}),A.jsx(_o,{className:"h-4 w-24 shrink-0"}),A.jsx(_o,{className:"h-4 min-w-0 flex-1"})]},r))})}function s_({entries:n,isLoading:i,error:r,hasChatroom:o,selectedEntry:c,onSelectEntry:f}){const{scrollRef:d,isPinned:m,hasUnseenBelow:g,scrollToEnd:p,handleScroll:y}=US(n.length);return O.useEffect(()=>{m&&!i&&!r&&n.length>0&&p()},[n.length,m,i,r,p]),i?A.jsx("div",{className:"min-h-[400px] flex-1 border border-chatroom-border bg-chatroom-bg-secondary",children:A.jsx(LS,{})}):r?A.jsx("div",{className:"flex min-h-[400px] flex-1 items-center border border-chatroom-border bg-chatroom-bg-secondary p-4 text-chatroom-status-error",children:r}):!o||n.length===0?A.jsx($2,{hasChatroom:o}):A.jsxs("div",{className:"relative min-h-[400px] flex-1",children:[A.jsx("div",{ref:d,onScroll:y,className:"h-full overflow-auto border border-chatroom-border bg-chatroom-bg-secondary",children:n.map(v=>A.jsx(n_,{entry:v,selected:(c==null?void 0:c.id)===v.id,onSelect:f},v.id))}),!m&&g&&A.jsxs("button",{type:"button",onClick:()=>p(),className:"absolute bottom-3 right-3 inline-flex items-center gap-1 rounded-md bg-chatroom-accent px-2 py-1 text-xs text-chatroom-text-on-accent shadow",children:[A.jsx(Jc,{className:"size-3"}),"Jump to new"]})]})}function BS({title:n="Session logs",actions:i}){return A.jsxs("div",{className:"flex items-center justify-between gap-4",children:[A.jsx("h2",{className:"text-lg font-medium tracking-tight",children:n}),i]})}function HS(){return Hv({queryKey:["daemon","chatrooms"],queryFn:async()=>{const n=await CR();if(!n.ok)throw new Error(n.error.message);return n.data.chatrooms},staleTime:6e4})}function r_(n){const i=n.chatroomId,[r,o]=O.useState([]),[c,f]=O.useState(!1),[d,m]=O.useState(null);return O.useEffect(()=>{if(!i)return;let g=!0,p;return(async()=>{try{const y=Ic(n),v=await AR({chatroomId:i,fromTimestamp:y.fromMs,toTimestamp:y.toMs,limit:500});if(!v.ok)throw new Error(v.error.message);g&&(o(v.data.entries),p=_R(S=>{var w;const E=(w=S.payload)==null?void 0:w.chatroomId,x=Ic(n);S.timestamp<x.fromMs||S.timestamp>x.toMs||typeof E!="string"||E!==i||o(_=>_.some(D=>D.id===S.id)?_:[..._,S])}))}catch(y){g&&m(y instanceof Error?y.message:"Failed to load event stream")}finally{g&&f(!1)}})(),()=>{g=!1,p==null||p()}},[i,n]),{entries:i?r:[],isLoading:i?c:!1,error:i?d:null}}const a_=n=>n&&["1h","3h","1d","custom"].includes(n)?n:void 0;function dv(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),r=a_(i.get("timeRange")),o=i.get("from"),c=i.get("to"),f=Number(o),d=Number(c),m=i.get("chatroomId");return{...m?{chatroomId:m}:{},...r?{timeRange:r}:{},...Number.isFinite(f)&&o?{fromMs:f}:{},...Number.isFinite(d)&&c?{toMs:d}:{}}}function o_(n){const i=new URLSearchParams(window.location.search);n.chatroomId?i.set("chatroomId",n.chatroomId):i.delete("chatroomId");const r=n.timeRange??Wh;i.set("timeRange",r),r==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0?(i.set("from",String(n.fromMs)),i.set("to",String(n.toMs))):(i.delete("from"),i.delete("to"));const o=i.toString();window.history.replaceState(null,"",`${window.location.pathname}${o?`?${o}`:""}`)}function l_(){const[n,i]=O.useState(()=>dv(window.location.search)),r=O.useCallback(o=>{i(o),o_(o)},[]);return O.useEffect(()=>{const o=()=>i(dv(window.location.search));return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[]),{filters:n,setFilters:r}}function c_(){const{filters:n,setFilters:i}=l_(),r=HS(),{entries:o,isLoading:c,error:f}=r_(n),[d,m]=O.useState(null);return O.useEffect(()=>{m(null)},[n.chatroomId,n.timeRange,n.fromMs,n.toMs]),A.jsxs("section",{className:"flex min-h-0 flex-1 flex-col gap-3 p-6",children:[A.jsx(BS,{title:"Event stream",actions:A.jsx(W2,{chatrooms:r.data??[],chatroomsLoading:r.isLoading,chatroomsError:r.isError,values:n,onChange:i,disabled:c})}),A.jsxs("div",{className:"flex min-h-0 flex-1 gap-0",children:[A.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:A.jsx(s_,{entries:o,isLoading:c,error:f,hasChatroom:!!n.chatroomId,selectedEntry:d,onSelectEntry:m},[n.chatroomId,n.timeRange,n.fromMs,n.toMs].join(":"))}),d&&A.jsx(WR,{entry:d,onClose:()=>m(null)})]})]})}function $h(n){var r;const i=(r=n.metadata)==null?void 0:r.harness;return typeof i=="string"?i:n.source.startsWith("harness:")?n.source.slice(8):void 0}function em(n){var r;const i=(r=n.metadata)==null?void 0:r.chatroomId;return typeof i=="string"?i:void 0}function qS(n){var r;const i=(r=n.metadata)==null?void 0:r.role;return typeof i=="string"?i:void 0}function YS({line:n,chatroomName:i}){const r=em(n),o=qS(n),c=$h(n);return!r&&!o&&!c?null:A.jsxs("div",{className:"flex shrink-0 flex-wrap gap-1",children:[r&&A.jsx(sa,{variant:"outline",className:"text-chatroom-text-secondary",children:i??r}),o&&A.jsx(sa,{variant:"outline",className:"text-chatroom-status-info",children:o}),c&&A.jsx(sa,{variant:"outline",className:"text-chatroom-text-secondary",children:c})]})}const u_={debug:"text-chatroom-text-muted border-chatroom-border",info:"text-chatroom-status-info border-chatroom-status-info/40",warn:"text-chatroom-status-warning border-chatroom-status-warning/40",error:"text-chatroom-status-error border-chatroom-status-error/40"};function VS({level:n}){return A.jsx(sa,{variant:"outline",className:un("font-mono uppercase",u_[n]),children:n})}function f_({line:n,chatroomName:i,onClose:r}){return A.jsxs("aside",{className:"flex w-96 max-w-[40%] shrink-0 flex-col border-l border-chatroom-border bg-chatroom-bg-primary",role:"dialog","aria-modal":"true","aria-label":"Log detail",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-chatroom-border px-4 py-3",children:[A.jsx("h3",{className:"text-sm font-medium",children:"Log detail"}),A.jsx(D0,{variant:"ghost",size:"sm",onClick:r,"aria-label":"Close detail panel",children:A.jsx(h0,{className:"size-4"})})]}),A.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4 text-xs",children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A.jsx(VS,{level:n.level}),A.jsx("span",{className:"text-chatroom-text-muted",children:new Date(n.timestamp).toISOString()})]}),A.jsx(YS,{line:n,chatroomName:i}),A.jsxs("div",{className:"text-chatroom-text-muted",children:["Source: ",A.jsx("span",{className:"text-chatroom-text-primary",children:n.source}),n.stream&&A.jsxs(A.Fragment,{children:[" · Stream: ",n.stream]}),n.id!=null&&A.jsxs(A.Fragment,{children:[" · ID: ",n.id]})]}),A.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:n.message}),n.metadata&&Object.keys(n.metadata).length>0&&A.jsxs("div",{children:[A.jsx("p",{className:"mb-1 text-chatroom-text-muted",children:"Metadata"}),A.jsx("pre",{className:"whitespace-pre-wrap border border-chatroom-border bg-chatroom-bg-secondary p-2 font-mono text-[11px]",children:JSON.stringify(n.metadata,null,2)})]})]})]})}function hv({label:n,options:i,value:r,onChange:o,disabled:c,allLabel:f="All"}){return A.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[A.jsx("span",{className:"text-chatroom-text-muted",children:n}),A.jsx(NS,{options:i.map(d=>({value:d,label:d})),value:r,onChange:o,disabled:c,placeholder:f,allLabel:f,searchPlaceholder:`Search ${n.toLowerCase()}…`,ariaLabel:n})]})}function d_({chatrooms:n,chatroomsLoading:i,chatroomsError:r,roles:o,harnesses:c,values:f,onChange:d,disabled:m}){return A.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[A.jsx(jS,{value:{timeRange:f.timeRange,fromMs:f.fromMs,toMs:f.toMs},onChange:g=>d({...f,...g}),disabled:m}),A.jsx(DS,{chatrooms:n,value:f.chatroomId,onChange:g=>d({...f,chatroomId:g}),disabled:m,isLoading:i,isError:r}),A.jsx(hv,{label:"Role",options:o,value:f.role,onChange:g=>d({...f,role:g}),disabled:m,allLabel:"All roles"}),A.jsx(hv,{label:"Harness",options:c,value:f.harness,onChange:g=>d({...f,harness:g}),disabled:m,allLabel:"All harnesses"})]})}function h_({hasChatroom:n}){return A.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-border bg-chatroom-bg-secondary p-6 text-center",role:"status",children:[A.jsx(Ew,{className:"size-8 text-chatroom-text-muted","aria-hidden":!0}),A.jsx("p",{className:"text-sm text-chatroom-text-secondary",children:n?"No logs in this time range":"Select a chatroom to view logs"}),n&&A.jsx("p",{className:"text-xs text-chatroom-text-muted",children:"Start an agent session to see output here"})]})}function m_({message:n}){return A.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-status-error/30 bg-chatroom-bg-secondary p-6 text-center",role:"alert",children:[A.jsx(Sw,{className:"size-8 text-chatroom-status-error","aria-hidden":!0}),A.jsx("p",{className:"text-sm text-chatroom-status-error",children:"Failed to load logs"}),A.jsx("p",{className:"text-xs text-chatroom-text-muted",children:n})]})}function p_({line:n,chatroomName:i,selected:r,onSelect:o}){const c=new Date(n.timestamp).toISOString().slice(11,19),d=!$h(n)||!n.source.startsWith("harness:"),m=()=>o==null?void 0:o(n);return A.jsxs("div",{className:un("flex gap-3 rounded-none px-1 py-1.5 -mx-1",o&&"cursor-pointer hover:bg-chatroom-bg-hover",r&&"bg-chatroom-bg-hover"),role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o?m:void 0,onKeyDown:o?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())}:void 0,children:[A.jsx("span",{className:"shrink-0 text-chatroom-text-muted",children:c}),A.jsx(VS,{level:n.level}),A.jsx(YS,{line:n,chatroomName:i}),d&&A.jsx("span",{className:"shrink-0 text-chatroom-text-muted",children:n.source}),A.jsx("span",{className:"min-w-0 flex-1 line-clamp-2",children:n.message})]})}function g_({lines:n,isLoading:i,error:r,hasChatroom:o,selectedLine:c,onSelectLine:f,getChatroomName:d}){const{scrollRef:m,isPinned:g,hasUnseenBelow:p,scrollToEnd:y,handleScroll:v}=US(n.length);if(O.useEffect(()=>{g&&!i&&!r&&n.length>0&&y()},[n.length,g,i,r,y]),i)return A.jsx("div",{className:"min-h-[400px] flex-1 border border-chatroom-border bg-chatroom-bg-secondary",children:A.jsx(LS,{})});if(r)return A.jsx(m_,{message:r});if(n.length===0)return A.jsx(h_,{hasChatroom:o});const S=c?c.id??`${c.timestamp}-${c.message.slice(0,32)}`:null;return A.jsxs("div",{className:"relative min-h-[400px] flex-1",children:[A.jsx("div",{ref:m,onScroll:v,className:"h-full overflow-auto border border-chatroom-border bg-chatroom-bg-secondary p-3 font-mono text-xs",children:n.map((E,x)=>{var C;const w=E.id??`${E.timestamp}-${x}`,_=E.id??`${E.timestamp}-${E.message.slice(0,32)}`,D=(C=E.metadata)==null?void 0:C.chatroomId;return A.jsx(p_,{line:E,chatroomName:typeof D=="string"?d==null?void 0:d(D):void 0,selected:S===_,onSelect:f},w)})}),!g&&p&&A.jsxs("button",{type:"button",onClick:()=>y(),className:"absolute bottom-3 right-3 inline-flex items-center gap-1 rounded-md bg-chatroom-accent px-2 py-1 text-xs text-chatroom-text-on-accent shadow",children:[A.jsx(Jc,{className:"size-3"}),"Jump to new"]})]})}function mv(n,i){const r=Ic(i);return n.timestamp>=r.fromMs&&n.timestamp<=r.toMs&&em(n)===i.chatroomId&&(!i.role||qS(n)===i.role)&&(!i.harness||$h(n)===i.harness)}function y_(n){const i=n.chatroomId,[r,o]=O.useState([]),[c,f]=O.useState({roles:[],harnesses:[]}),[d,m]=O.useState(!1),[g,p]=O.useState(null);return O.useEffect(()=>{if(!i)return;let y=!0,v;return(async()=>{try{const S=await OR(i);if(!y)return;S.ok&&f(S.data);const E=Ic(n),x=await RR({chatroomId:i,role:n.role,harness:n.harness,fromTimestamp:E.fromMs,toTimestamp:E.toMs,limit:500});if(!x.ok)throw new Error(x.error.message);if(!y)return;o(x.data.entries.filter(w=>mv(w,n))),v=MR(w=>{mv(w,n)&&o(_=>[..._,w])})}catch(S){y&&p(S instanceof Error?S.message:"Failed to load logs")}finally{y&&m(!1)}})(),()=>{y=!1,v==null||v()}},[i,n]),{lines:i?r:[],dimensions:i?c:{roles:[],harnesses:[]},isLoading:i?d:!1,error:i?g:null}}function b_(n={}){return y_(n)}const v_=n=>n&&["1h","3h","1d","custom"].includes(n)?n:void 0;function pv(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),r=v_(i.get("timeRange")),o=Number(i.get("from")),c=Number(i.get("to")),f=i.get("chatroomId"),d=i.get("role"),m=i.get("harness");return{...f?{chatroomId:f}:{},...d?{role:d}:{},...m?{harness:m}:{},...r?{timeRange:r}:{},...Number.isFinite(o)&&i.get("from")?{fromMs:o}:{},...Number.isFinite(c)&&i.get("to")?{toMs:c}:{}}}function S_(n){const i=new URLSearchParams;n.chatroomId&&i.set("chatroomId",n.chatroomId),n.role&&i.set("role",n.role),n.harness&&i.set("harness",n.harness);const r=n.timeRange??Wh;return i.set("timeRange",r),r==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0&&(i.set("from",String(n.fromMs)),i.set("to",String(n.toMs))),i.toString()}function x_(n){const i=S_(n);window.history.replaceState(null,"",`${window.location.pathname}${i?`?${i}`:""}`)}function E_(){const[n,i]=O.useState(()=>pv(window.location.search)),r=O.useCallback(o=>{i(o),x_(o)},[]);return O.useEffect(()=>{const o=()=>i(pv(window.location.search));return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[]),{filters:n,setFilters:r}}function T_(){const{filters:n,setFilters:i}=E_(),[r,o]=O.useState(null),c=HS(),f=O.useMemo(()=>c.data??[],[c.data]),d=O.useMemo(()=>new Map(f.map(E=>[E.id,E.displayName])),[f]),{lines:m,dimensions:g,isLoading:p,error:y}=b_(n),v=E=>d.get(E),S=r?v(em(r)??""):void 0;return A.jsxs("section",{className:"flex min-h-0 flex-1 flex-col gap-3 p-6",children:[A.jsx(BS,{actions:A.jsx(d_,{chatrooms:f,chatroomsLoading:c.isLoading,chatroomsError:c.isError,roles:g.roles,harnesses:g.harnesses,values:n,onChange:i,disabled:p})}),A.jsxs("div",{className:"flex min-h-0 flex-1 gap-0",children:[A.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:A.jsx(g_,{lines:m,isLoading:p,error:y,hasChatroom:!!n.chatroomId,selectedLine:r,onSelectLine:o,getChatroomName:v},n.chatroomId??n.timeRange)}),r&&A.jsx(f_,{line:r,chatroomName:S,onClose:()=>o(null)})]})]})}function w_(){var o,c;const{activeTab:n,setActiveTab:i}=Cw(),r=NR();return A.jsx(cw,{header:A.jsx(ww,{status:A.jsx(lw,{isLoading:r.isLoading,isError:r.isError,port:(o=r.data)==null?void 0:o.port,service:(c=r.data)==null?void 0:c.service})}),nav:A.jsxs(Rw,{children:[A.jsx(Eb,{active:n==="logs",onClick:()=>i("logs"),children:"Logs"}),A.jsx(Eb,{active:n==="event-stream",onClick:()=>i("event-stream"),children:"Event Stream"})]}),children:n==="logs"?A.jsx(T_,{}):A.jsx(c_,{})})}const R_=new k1({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),gv=document.getElementById("root");gv&&J1.createRoot(gv).render(A.jsx(O.StrictMode,{children:A.jsx(l1,{client:R_,children:A.jsx(w_,{})})}));
115
+ */var tv;function oA(){if(tv)return Vd;tv=1;var n=Qo(),i=mS();function r(p,y){return p===y&&(p!==0||1/p===1/y)||p!==p&&y!==y}var o=typeof Object.is=="function"?Object.is:r,c=i.useSyncExternalStore,f=n.useRef,d=n.useEffect,m=n.useMemo,g=n.useDebugValue;return Vd.useSyncExternalStoreWithSelector=function(p,y,v,S,E){var x=f(null);if(x.current===null){var w={hasValue:!1,value:null};x.current=w}else w=x.current;x=m(function(){function D(F){if(!C){if(C=!0,j=F,F=S(F),E!==void 0&&w.hasValue){var B=w.value;if(E(B,F))return k=B}return k=F}if(B=k,o(j,F))return B;var U=S(F);return E!==void 0&&E(B,U)?(j=F,B):(j=F,k=U)}var C=!1,j,k,q=v===void 0?null:v;return[function(){return D(y())},q===null?void 0:function(){return D(q())}]},[y,v,S,E]);var _=c(p,x[0],x[1]);return d(function(){w.hasValue=!0,w.value=_},[_]),g(_),_},Vd}var nv;function lA(){return nv||(nv=1,Yd.exports=oA()),Yd.exports}var cA=lA();const uA=wh(19),fA=uA?hA:mA;function pS(n,i,r,o,c){return fA(n,i,r,o,c)}function dA(n,i,r,o,c){const f=O.useCallback(()=>i(n.getSnapshot(),r,o,c),[n,i,r,o,c]);return aA.useSyncExternalStore(n.subscribe,f,f)}function hA(n,i,r,o,c){return dA(n,i,r,o,c)}function mA(n,i,r,o,c){return cA.useSyncExternalStoreWithSelector(n.subscribe,n.getSnapshot,n.getSnapshot,f=>i(f,r,o,c))}class pA{constructor(i){tt(this,"subscribe",i=>(this.listeners.add(i),()=>{this.listeners.delete(i)}));tt(this,"getSnapshot",()=>this.state);this.state=i,this.listeners=new Set,this.updateTick=0}setState(i){if(this.state===i)return;this.state=i,this.updateTick+=1;const r=this.updateTick;for(const o of this.listeners){if(r!==this.updateTick)return;o(i)}}update(i){for(const r in i)if(!Object.is(this.state[r],i[r])){this.setState({...this.state,...i});return}}set(i,r){Object.is(this.state[i],r)||this.setState({...this.state,[i]:r})}notifyAll(){const i={...this.state};this.setState(i)}use(i,r,o,c){return pS(this,i,r,o,c)}}class gS extends pA{constructor(i,r={},o){super(i),this.context=r,this.selectors=o}useSyncedValue(i,r){O.useDebugValue(i);const o=this;Xe(()=>{o.state[i]!==r&&o.set(i,r)},[o,i,r])}useSyncedValueWithCleanup(i,r){const o=this;Xe(()=>(o.state[i]!==r&&o.set(i,r),()=>{o.set(i,void 0)}),[o,i,r])}useSyncedValues(i){const r=this,o=Object.values(i);Xe(()=>{r.update(i)},[r,...o])}useControlledProp(i,r){O.useDebugValue(i);const o=this,c=r!==void 0;Xe(()=>{c&&!Object.is(o.state[i],r)&&o.setState({...o.state,[i]:r})},[o,i,r,c])}select(i,r,o,c){const f=this.selectors[i];return f(this.state,r,o,c)}useState(i,r,o,c){return O.useDebugValue(i),pS(this,this.selectors[i],r,o,c)}useContextCallback(i,r){O.useDebugValue(i);const o=$e(r??Rh);this.context[i]=o}useStateSetter(i){const r=O.useRef(void 0);return r.current===void 0&&(r.current=o=>{this.set(i,o)}),r.current}observe(i,r){let o;typeof i=="function"?o=i:o=this.selectors[i];let c=o(this.state);return r(c,c,this),this.subscribe(f=>{const d=o(f);if(!Object.is(c,d)){const m=c;c=d,r(d,m,this)}})}}const gA={open:Ve(n=>n.open),transitionStatus:Ve(n=>n.transitionStatus),domReferenceElement:Ve(n=>n.domReferenceElement),referenceElement:Ve(n=>n.positionReference??n.referenceElement),floatingElement:Ve(n=>n.floatingElement),floatingId:Ve(n=>n.floatingId)};class au extends gS{constructor(r){const{syncOnly:o,nested:c,onOpenChange:f,triggerElements:d,...m}=r;super({...m,positionReference:m.referenceElement,domReferenceElement:m.referenceElement},{onOpenChange:f,dataRef:{current:{}},events:sS(),nested:c,triggerElements:d},gA);tt(this,"syncOpenEvent",(r,o)=>{(!r||!this.state.open||o!=null&&bO(o))&&(this.context.dataRef.current.openEvent=r?o:void 0)});tt(this,"dispatchOpenChange",(r,o)=>{this.syncOpenEvent(r,o.event);const c={open:r,reason:o.reason,nativeEvent:o.event,nested:this.context.nested,triggerElement:o.trigger};this.context.events.emit("openchange",c)});tt(this,"setOpen",(r,o)=>{var c,f,d,m;if(this.syncOnly){(f=(c=this.context).onOpenChange)==null||f.call(c,r,o);return}this.dispatchOpenChange(r,o),(m=(d=this.context).onOpenChange)==null||m.call(d,r,o)});this.syncOnly=o}}function yA(n){const{popupStore:i,treatPopupAsFloatingElement:r=!1,floatingRootContext:o,floatingId:c,nested:f,onOpenChange:d}=n,m=i.useState("open"),g=i.useState("activeTriggerElement"),p=i.useState(r?"popupElement":"positionerElement"),y=i.context.triggerElements,v=d,S=O.useRef(null);o===void 0&&S.current===null&&(S.current=new au({open:m,transitionStatus:void 0,referenceElement:g,floatingElement:p,triggerElements:y,onOpenChange:v,floatingId:c,syncOnly:!0,nested:f}));const E=o??S.current;return i.useSyncedValue("floatingId",c),Xe(()=>{const x={open:m,floatingId:c,referenceElement:g,floatingElement:p};Je(g)&&(x.domReferenceElement=g),E.state.positionReference===E.state.referenceElement&&(x.positionReference=g),E.update(x)},[m,c,g,p,E]),E.context.onOpenChange=v,E.context.nested=f,E}function bA(n,i=!1,r=!1){const[o,c]=O.useState(n&&i?"idle":void 0),[f,d]=O.useState(n);return n&&!f&&(d(!0),c("starting")),!n&&f&&o!=="ending"&&!r&&c("ending"),!n&&!f&&o==="ending"&&c(void 0),Xe(()=>{if(!n&&f&&o!=="ending"&&r){const m=di.request(()=>{c("ending")});return()=>{di.cancel(m)}}},[n,f,o,r]),Xe(()=>{if(!n||i)return;const m=di.request(()=>{c(void 0)});return()=>{di.cancel(m)}},[i,n]),Xe(()=>{if(!n||!i)return;n&&f&&o!=="idle"&&c("starting");const m=di.request(()=>{c("idle")});return()=>{di.cancel(m)}},[i,n,f,o]),{mounted:f,setMounted:d,transitionStatus:o}}let Bo=function(n){return n.startingStyle="data-starting-style",n.endingStyle="data-ending-style",n}({});const vA={[Bo.startingStyle]:""},SA={[Bo.endingStyle]:""},xA={transitionStatus(n){return n==="starting"?vA:n==="ending"?SA:null}};function yS(n,i=!1,r=!0){const o=Hh();return $e((c,f=null)=>{o.cancel();const d=Li(n);if(d==null)return;const m=d,g=()=>{Ms.flushSync(c)};if(typeof m.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){c();return}function p(){Promise.all(m.getAnimations().map(y=>y.finished)).then(()=>{f!=null&&f.aborted||g()}).catch(()=>{if(r){f!=null&&f.aborted||g();return}const y=m.getAnimations();!(f!=null&&f.aborted)&&y.length>0&&y.some(v=>v.pending||v.playState!=="finished")&&p()})}if(i){const y=Bo.startingStyle;if(!m.hasAttribute(y)){o.request(p);return}const v=new MutationObserver(()=>{m.hasAttribute(y)||(v.disconnect(),p())});v.observe(m,{attributes:!0,attributeFilter:[y]}),f==null||f.addEventListener("abort",()=>v.disconnect(),{once:!0});return}o.request(p)})}function bS(n){const{enabled:i=!0,open:r,ref:o,onComplete:c}=n,f=$e(c),d=yS(o,r,!1);O.useEffect(()=>{if(!i)return;const m=new AbortController;return d(f,m.signal),()=>{m.abort()}},[i,r,f,d])}const vS={tabIndex:-1,[uh]:""};function EA(n){return i=>i==="touch"?n.current:!0}function TA(n,i,r=!1){const o=Po(),c=_a()!=null,f=O.useRef(null);n===void 0&&f.current===null&&(f.current=i(o,c));const d=n??f.current;return yA({popupStore:d,treatPopupAsFloatingElement:r,floatingRootContext:d.state.floatingRootContext,floatingId:o,nested:c,onOpenChange:d.setOpen}),{store:d,internalStore:f.current}}function wA(n,i){const r=O.useRef(null),o=O.useRef(null);return O.useCallback(c=>{if(n===void 0)return;let f=!1;if(r.current!==null){const d=r.current,m=o.current,g=i.context.triggerElements.getById(d);m&&g===m&&(i.context.triggerElements.delete(d),f=!0),r.current=null,o.current=null}if(c!==null&&(r.current=n,o.current=c,i.context.triggerElements.add(n,c),f=!0),f){const d=i.context.triggerElements.size;i.select("open")&&i.state.triggerCount!==d&&i.set("triggerCount",d)}},[i,n])}function RA(n,i,r,o=!1){i?n.preventUnmountingOnClose=!1:o&&(n.preventUnmountingOnClose=!0);const c=(r==null?void 0:r.id)??null;(c||i)&&(n.activeTriggerId=c,n.activeTriggerElement=r??null)}function OA(n){let i=!1;return n.preventUnmountOnClose=()=>{i=!0},()=>i}function CA(n,i,r,o){sA(()=>{i===void 0&&n.state.open===!1&&r&&(n.state={...n.state,open:!0,activeTriggerId:o,preventUnmountingOnClose:!1})})}function AA(n,i,r,o){const c=r.useState("isMountedByTrigger",n),f=wA(n,r),d=$e(m=>{if(f(m),!m)return;const g=r.select("open"),p=r.select("activeTriggerId");if(p===n){r.update({activeTriggerElement:m,...g?o:null});return}p==null&&g&&r.update({activeTriggerId:n,activeTriggerElement:m,...o})});return Xe(()=>{c&&r.update({activeTriggerElement:i.current,...o})},[c,r,i,...Object.values(o)]),{registerTrigger:d,isMountedByThisTrigger:c}}function _A(n,i={}){const{closeOnActiveTriggerUnmount:r=!1}=i,o=n.useState("open"),c=n.useState("triggerCount");Xe(()=>{if(!o){n.state.triggerCount!==0&&n.set("triggerCount",0);return}const f=n.context.triggerElements.size,d={};n.state.triggerCount!==f&&(d.triggerCount=f);const m=n.select("activeTriggerId");let g=null;if(m){const p=n.context.triggerElements.getById(m);p?p!==n.state.activeTriggerElement&&(d.activeTriggerElement=p):g=m}if(!g&&!m&&f===1){const p=n.context.triggerElements.entries().next();if(!p.done){const[y,v]=p.value;d.activeTriggerId=y,d.activeTriggerElement=v}}(d.triggerCount!==void 0||d.activeTriggerId!==void 0||d.activeTriggerElement!==void 0)&&n.update(d),g&&r&&queueMicrotask(()=>{if(n.select("open")&&n.select("activeTriggerId")===g&&!n.context.triggerElements.getById(g)){const p=Xt(TO);n.setOpen(!1,p),p.isCanceled||n.update({activeTriggerId:null,activeTriggerElement:null})}})},[o,n,c,r])}function MA(n,i,r){const{mounted:o,setMounted:c,transitionStatus:f}=bA(n),d=i.useState("preventUnmountingOnClose"),m=n?!1:d;i.useSyncedValues({mounted:o,transitionStatus:f,preventUnmountingOnClose:m});const g=$e(()=>{var p,y;c(!1),i.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),r==null||r(),(y=(p=i.context).onOpenChangeComplete)==null||y.call(p,!1)});return bS({enabled:o&&!n&&!m,open:n,ref:i.context.popupRef,onComplete(){n||g()}}),{forceUnmount:g,transitionStatus:f}}function NA(n,i){n.useSyncedValues(i),Xe(()=>()=>{n.update({activeTriggerProps:Wt,inactiveTriggerProps:Wt,popupProps:Wt})},[n])}function DA(n,i){Xe(()=>{!i&&n.state.openMethod!==null&&n.set("openMethod",null)},[i,n]),Xe(()=>()=>{n.state.openMethod!==null&&n.set("openMethod",null)},[n])}class Kh{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(i,r){const o=this.idMap.get(i);o!==r&&(o!==void 0&&this.elementsSet.delete(o),this.elementsSet.add(r),this.idMap.set(i,r))}delete(i){const r=this.idMap.get(i);r&&(this.elementsSet.delete(r),this.idMap.delete(i))}hasElement(i){return this.elementsSet.has(i)}hasMatchingElement(i){for(const r of this.elementsSet)if(i(r))return!0;return!1}getById(i){return this.idMap.get(i)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function zA(){return new au({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new Kh,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function kA(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:zA(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Wt,inactiveTriggerProps:Wt,popupProps:Wt}}function jA(n,i,r=!1){return new au({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:n,floatingId:i,syncOnly:!0,nested:r,onOpenChange:void 0})}const No=Ve(n=>n.triggerIdProp??n.activeTriggerId),Zh=Ve(n=>n.openProp??n.open),iv=Ve(n=>{var r;return(((r=n.popupElement)==null?void 0:r.id)??n.floatingId)||void 0});function SS(n,i){return i!==void 0&&Zh(n)&&No(n)===i}function UA(n,i){return SS(n,i)?!0:i!==void 0&&Zh(n)&&No(n)==null&&n.triggerCount===1}const LA={open:Zh,mounted:Ve(n=>n.mounted),transitionStatus:Ve(n=>n.transitionStatus),floatingRootContext:Ve(n=>n.floatingRootContext),triggerCount:Ve(n=>n.triggerCount),preventUnmountingOnClose:Ve(n=>n.preventUnmountingOnClose),payload:Ve(n=>n.payload),activeTriggerId:No,activeTriggerElement:Ve(n=>n.mounted?n.activeTriggerElement:null),popupId:iv,isTriggerActive:Ve((n,i)=>i!==void 0&&No(n)===i),isOpenedByTrigger:Ve((n,i)=>SS(n,i)),isMountedByTrigger:Ve((n,i)=>i!==void 0&&No(n)===i&&n.mounted),triggerProps:Ve((n,i)=>i?n.activeTriggerProps:n.inactiveTriggerProps),triggerPopupId:Ve((n,i)=>UA(n,i)?iv(n):void 0),popupProps:Ve(n=>n.popupProps),popupElement:Ve(n=>n.popupElement),positionerElement:Ve(n=>n.positionerElement)};function BA(n){const{open:i=!1,onOpenChange:r,elements:o={}}=n,c=Po(),f=_a()!=null,d=Qi(()=>new au({open:i,transitionStatus:void 0,onOpenChange:r,referenceElement:o.reference??null,floatingElement:o.floating??null,triggerElements:new Kh,floatingId:c,syncOnly:!1,nested:f})).current;return Xe(()=>{const m={open:i,floatingId:c};o.reference!==void 0&&(m.referenceElement=o.reference,m.domReferenceElement=Je(o.reference)?o.reference:null),o.floating!==void 0&&(m.floatingElement=o.floating),d.update(m)},[i,c,o.reference,o.floating,d]),d.context.onOpenChange=r,d.context.nested=f,d}function HA(n={}){const{nodeId:i,externalTree:r}=n,o=BA(n),c=n.rootContext||o,f=c.useState("referenceElement"),d=c.useState("floatingElement"),m=c.useState("domReferenceElement"),g=c.useState("open"),p=c.useState("floatingId"),[y,v]=O.useState(null),[S,E]=O.useState(void 0),[x,w]=O.useState(void 0),_=O.useRef(null),D=Ma(r),C=O.useMemo(()=>({reference:f,floating:d,domReference:m}),[f,d,m]),j=JC({...n,elements:{...C,...y&&{reference:y}}}),k=Je(S)?S:null,q=x===void 0?c.state.floatingElement:x;c.useSyncedValue("referenceElement",S??null),c.useSyncedValue("domReferenceElement",S===void 0?m:k),c.useSyncedValue("floatingElement",q);const F=O.useCallback(ae=>{const W=Je(ae)?{getBoundingClientRect:()=>ae.getBoundingClientRect(),getClientRects:()=>ae.getClientRects(),contextElement:ae}:ae;v(W),j.refs.setReference(W)},[j.refs]),B=O.useCallback(ae=>{(Je(ae)||ae===null)&&(_.current=ae,E(ae)),(Je(j.refs.reference.current)||j.refs.reference.current===null||ae!==null&&!Je(ae))&&j.refs.setReference(ae)},[j.refs,E]),U=O.useCallback(ae=>{w(ae),j.refs.setFloating(ae)},[j.refs]),K=O.useMemo(()=>({...j.refs,setReference:B,setFloating:U,setPositionReference:F,domReference:_}),[j.refs,B,U,F]),se=O.useMemo(()=>({...j.elements,domReference:m}),[j.elements,m]),pe=O.useMemo(()=>({...j,dataRef:c.context.dataRef,open:g,onOpenChange:c.setOpen,events:c.context.events,floatingId:p,refs:K,elements:se,nodeId:i,rootStore:c}),[j,K,se,i,c,g,p]);return Xe(()=>{m&&(_.current=m)},[m]),Xe(()=>{c.context.dataRef.current.floatingContext=pe;const ae=D==null?void 0:D.nodesRef.current.find(W=>W.id===i);ae&&(ae.context=pe)}),O.useMemo(()=>({...j,context:pe,refs:K,elements:se,rootStore:c}),[j,K,se,pe,c])}class Ph{constructor(){tt(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});tt(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new ei,this.restTimeout=new ei,this.handleCloseOptions=void 0}static create(){return new Ph}}const Zc=new WeakMap;function Pc(n){var r,o,c;if(!n.performedPointerEventsMutation)return;const i=n.pointerEventsScopeElement;i&&Zc.get(i)===n&&((r=n.pointerEventsScopeElement)==null||r.style.removeProperty("pointer-events"),(o=n.pointerEventsReferenceElement)==null||o.style.removeProperty("pointer-events"),(c=n.pointerEventsFloatingElement)==null||c.style.removeProperty("pointer-events"),Zc.delete(i)),n.performedPointerEventsMutation=!1,n.pointerEventsScopeElement=null,n.pointerEventsReferenceElement=null,n.pointerEventsFloatingElement=null}function xS(n,i){const{scopeElement:r,referenceElement:o,floatingElement:c}=i,f=Zc.get(r);f&&f!==n&&Pc(f),Pc(n),n.performedPointerEventsMutation=!0,n.pointerEventsScopeElement=r,n.pointerEventsReferenceElement=o,n.pointerEventsFloatingElement=c,Zc.set(r,n),r.style.pointerEvents="none",o.style.pointerEvents="auto",c.style.pointerEvents="auto"}function ES(n){const i=n.context.dataRef.current,r=Qi(()=>i.hoverInteractionState??Ph.create()).current;return i.hoverInteractionState||(i.hoverInteractionState=r),Lh(i.hoverInteractionState.disposeEffect),i.hoverInteractionState}function qA(n,i={}){const{enabled:r=!0,closeDelay:o=0,nodeId:c}=i,f="rootStore"in n?n.rootStore:n,d=f.useState("open"),m=f.useState("floatingElement"),g=f.useState("domReferenceElement"),{dataRef:p}=f.context,y=Ma(),v=_a(),S=ES(f),E=Ea(),x=$e(()=>{var D;return B0((D=p.current.openEvent)==null?void 0:D.type,S.interactedInside)}),w=$e(()=>{var D;return EO((D=p.current.openEvent)==null?void 0:D.type)}),_=$e(()=>{Pc(S)});Xe(()=>{d||(S.pointerType=void 0,S.restTimeoutPending=!1,S.interactedInside=!1,_())},[d,S,_]),O.useEffect(()=>_,[_]),Xe(()=>{var D,C,j,k,q;if(r&&d&&(D=S.handleCloseOptions)!=null&&D.blockPointerEvents&&w()&&Je(g)&&m){const F=g,B=m,U=ut(m),K=(j=(C=y==null?void 0:y.nodesRef.current.find(W=>W.id===v))==null?void 0:C.context)==null?void 0:j.elements.floating;K&&(K.style.pointerEvents="");const se=S.pointerEventsScopeElement!==B?S.pointerEventsScopeElement:null,pe=K!==B?K:null,ae=((q=(k=S.handleCloseOptions)==null?void 0:k.getScope)==null?void 0:q.call(k))??se??pe??F.closest("[data-rootownerid]")??U.body;return xS(S,{scopeElement:ae,referenceElement:F,floatingElement:B}),()=>{_()}}},[r,d,g,m,S,w,y,v,_]),O.useEffect(()=>{if(!r)return;function D(){return!!(y&&v&&_s(y.nodesRef.current,v).length>0)}function C(U){const K=fh(o,"close",S.pointerType),se=()=>{f.setOpen(!1,Xt(xn,U)),y==null||y.events.emit("floating.closed",U)};K?S.openChangeTimeout.start(K,se):(S.openChangeTimeout.clear(),se())}function j(U){const K=$n(U);if(!SO(K)){S.interactedInside=!1;return}S.interactedInside=(K==null?void 0:K.closest("[aria-haspopup]"))!=null}function k(){S.openChangeTimeout.clear(),E.clear(),y==null||y.events.off("floating.closed",F),_()}function q(U){var ae;if(D()&&y){y.events.on("floating.closed",F);return}if(L0(U.relatedTarget,f.context.triggerElements))return;const K=((ae=p.current.floatingContext)==null?void 0:ae.nodeId)??c,se=U.relatedTarget;if(!(y&&K&&Je(se)&&_s(y.nodesRef.current,K,!1).some(W=>{var le;return Me((le=W.context)==null?void 0:le.elements.floating,se)}))){if(S.handler){S.handler(U);return}_(),w()&&!x()&&C(U)}}function F(U){!y||!v||D()||E.start(0,()=>{y.events.off("floating.closed",F),f.setOpen(!1,Xt(xn,U)),y.events.emit("floating.closed",U)})}const B=m;return qi(B&&Ke(B,"mouseenter",k),B&&Ke(B,"mouseleave",q),B&&Ke(B,"pointerdown",j,!0),()=>{y==null||y.events.off("floating.closed",F)})},[r,m,f,p,o,c,w,x,_,S,y,v,E])}const YA={current:null};function VA(n,i={}){var ie;const{enabled:r=!0,delay:o=0,handleClose:c=null,mouseOnly:f=!1,restMs:d=0,move:m=!0,triggerElementRef:g=YA,externalTree:p,isActiveTrigger:y=!0,getHandleCloseContext:v,isClosing:S,shouldOpen:E}=i,x="rootStore"in n?n.rootStore:n,{dataRef:w,events:_}=x.context,D=Ma(p),C=ES(x),j=O.useRef(!1),k=En(c),q=En(o),F=En(d),B=En(r),U=En(E),K=En(S),se=$e(()=>{var N;return B0((N=w.current.openEvent)==null?void 0:N.type,C.interactedInside)}),pe=$e(()=>{var N;return((N=U.current)==null?void 0:N.call(U))!==!1}),ae=$e((N,Q,I)=>{const oe=x.context.triggerElements;if(oe.hasElement(Q))return!N||!Me(N,Q);if(!Je(I))return!1;const Y=I;return oe.hasMatchingElement(T=>Me(T,Y))&&(!N||!Me(N,Y))}),W=$e(()=>{if(!C.handler)return;ut(x.select("domReferenceElement")).removeEventListener("mousemove",C.handler),C.handler=void 0}),le=$e(()=>{Pc(C)});return y&&(C.handleCloseOptions=(ie=k.current)==null?void 0:ie.__options),O.useEffect(()=>W,[W]),O.useEffect(()=>{if(!r)return;function N(Q){Q.open?j.current=!1:(j.current=Q.reason===xn,W(),C.openChangeTimeout.clear(),C.restTimeout.clear(),C.blockMouseMove=!0,C.restTimeoutPending=!1)}return _.on("openchange",N),()=>{_.off("openchange",N)}},[r,_,C,W]),O.useEffect(()=>{if(!r)return;function N(Y,T=!0){const H=fh(q.current,"close",C.pointerType);H?C.openChangeTimeout.start(H,()=>{x.setOpen(!1,Xt(xn,Y)),D==null||D.events.emit("floating.closed",Y)}):T&&(C.openChangeTimeout.clear(),x.setOpen(!1,Xt(xn,Y)),D==null||D.events.emit("floating.closed",Y))}const Q=g.current??(y?x.select("domReferenceElement"):null);if(!Je(Q))return;function I(Y){var ft;if(C.openChangeTimeout.clear(),C.blockMouseMove=!1,f&&!jo(C.pointerType))return;const T=Nb(F.current),H=fh(q.current,"open",C.pointerType),te=$n(Y),ne=Y.currentTarget??null,re=x.select("domReferenceElement");let ee=ne;if(Je(te)&&!x.context.triggerElements.hasElement(te)){for(const vt of x.context.triggerElements.elements())if(Me(vt,te)){ee=vt;break}}Je(ne)&&Je(re)&&!x.context.triggerElements.hasElement(ne)&&Me(ne,re)&&(ee=re);const ge=ee==null?!1:ae(re,ee,te),ce=x.select("open"),fe=((ft=K.current)==null?void 0:ft.call(K))??x.select("transitionStatus")==="ending",Ze=!ce&&fe&&j.current,nt=!ge&&Je(ee)&&Je(re)&&Me(re,ee)&&Ze,ve=T>0&&!H,ze=ge&&(ce||Ze)||nt,Oe=!ce||ge;if(ze){pe()&&x.setOpen(!0,Xt(xn,Y,ee));return}ve||(H?C.openChangeTimeout.start(H,()=>{Oe&&pe()&&x.setOpen(!0,Xt(xn,Y,ee))}):Oe&&pe()&&x.setOpen(!0,Xt(xn,Y,ee)))}function oe(Y){if(se()){le();return}W();const T=x.select("domReferenceElement"),H=ut(T);C.restTimeout.clear(),C.restTimeoutPending=!1;const te=w.current.floatingContext??(v==null?void 0:v());if(L0(Y.relatedTarget,x.context.triggerElements))return;if(k.current&&te){x.select("open")||C.openChangeTimeout.clear();const re=g.current;C.handler=k.current({...te,tree:D,x:Y.clientX,y:Y.clientY,onClose(){le(),W(),B.current&&!se()&&re===x.select("domReferenceElement")&&N(Y,!0)}}),H.addEventListener("mousemove",C.handler),C.handler(Y);return}(C.pointerType==="touch"?!Me(x.select("floatingElement"),Y.relatedTarget):!0)&&N(Y)}return m?qi(Ke(Q,"mousemove",I,{once:!0}),Ke(Q,"mouseenter",I),Ke(Q,"mouseleave",oe)):qi(Ke(Q,"mouseenter",I),Ke(Q,"mouseleave",oe))},[W,le,w,q,x,r,k,C,y,ae,se,f,m,F,g,D,B,v,K,pe]),O.useMemo(()=>{if(!r)return;function N(Q){C.pointerType=Q.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(Q){var re,ee,ge;const{nativeEvent:I}=Q,oe=Q.currentTarget,Y=x.select("domReferenceElement"),T=x.select("open"),H=ae(Y,oe,Q.target);if(f&&!jo(C.pointerType))return;if(T&&H&&((re=C.handleCloseOptions)!=null&&re.blockPointerEvents)){const ce=x.select("floatingElement");if(ce){const fe=((ge=(ee=C.handleCloseOptions)==null?void 0:ee.getScope)==null?void 0:ge.call(ee))??oe.ownerDocument.body;xS(C,{scopeElement:fe,referenceElement:oe,floatingElement:ce})}}const te=Nb(F.current);if(T&&!H||te===0||!H&&C.restTimeoutPending&&Q.movementX**2+Q.movementY**2<2)return;C.restTimeout.clear();function ne(){if(C.restTimeoutPending=!1,se())return;const ce=x.select("open");!C.blockMouseMove&&(!ce||H)&&pe()&&x.setOpen(!0,Xt(xn,I,oe))}C.pointerType==="touch"?Ms.flushSync(()=>{ne()}):H&&T?ne():(C.restTimeoutPending=!0,C.restTimeout.start(te,ne))}}},[r,C,se,ae,f,x,F,pe])}const sv=.1,GA=sv*sv,lt=.5;function wc(n,i,r,o,c,f){return o>=i!=f>=i&&n<=(c-r)*(i-o)/(f-o)+r}function Rc(n,i,r,o,c,f,d,m,g,p){let y=!1;return wc(n,i,r,o,c,f)&&(y=!y),wc(n,i,c,f,d,m)&&(y=!y),wc(n,i,d,m,g,p)&&(y=!y),wc(n,i,g,p,r,o)&&(y=!y),y}function QA(n,i,r){return n>=r.x&&n<=r.x+r.width&&i>=r.y&&i<=r.y+r.height}function Oc(n,i,r,o,c,f){const d=Math.min(r,c),m=Math.max(r,c),g=Math.min(o,f),p=Math.max(o,f);return n>=d&&n<=m&&i>=g&&i<=p}function XA(n={}){const{blockPointerEvents:i=!1}=n,r=new ei,o=({x:c,y:f,placement:d,elements:m,onClose:g,nodeId:p,tree:y})=>{const v=d==null?void 0:d.split("-")[0];let S=!1,E=null,x=null,w=typeof performance<"u"?performance.now():0;function _(C,j){const k=performance.now(),q=k-w;if(E===null||x===null||q===0)return E=C,x=j,w=k,!1;const F=C-E,B=j-x,U=F*F+B*B,K=q*q*GA;return E=C,x=j,w=k,U<K}function D(){r.clear(),g()}return function(j){r.clear();const k=m.domReference,q=m.floating;if(!k||!q||v==null||c==null||f==null)return;const{clientX:F,clientY:B}=j,U=$n(j),K=j.type==="mouseleave",se=Me(q,U),pe=Me(k,U);if(se&&(S=!0,!K))return;if(pe&&(S=!1,!K)){S=!0;return}if(K&&Je(j.relatedTarget)&&Me(q,j.relatedTarget))return;function ae(){return!!(y&&_s(y.nodesRef.current,p).length>0)}function W(){ae()||D()}if(ae())return;const le=k.getBoundingClientRect(),ie=q.getBoundingClientRect(),N=c>ie.right-ie.width/2,Q=f>ie.bottom-ie.height/2,I=ie.width>le.width,oe=ie.height>le.height,Y=(I?le:ie).left,T=(I?le:ie).right,H=(oe?le:ie).top,te=(oe?le:ie).bottom;if(v==="top"&&f>=le.bottom-1||v==="bottom"&&f<=le.top+1||v==="left"&&c>=le.right-1||v==="right"&&c<=le.left+1){W();return}let ne=!1;switch(v){case"top":ne=Oc(F,B,Y,le.top+1,T,ie.bottom-1);break;case"bottom":ne=Oc(F,B,Y,ie.top+1,T,le.bottom-1);break;case"left":ne=Oc(F,B,ie.right-1,te,le.left+1,H);break;case"right":ne=Oc(F,B,le.right-1,te,ie.left+1,H);break}if(ne)return;if(S&&!QA(F,B,le)){W();return}if(!K&&_(F,B)){W();return}let re=!1;switch(v){case"top":{const ee=I?lt/2:lt*4,ge=I||N?c+ee:c-ee,ce=I?c-ee:N?c+ee:c-ee,fe=f+lt+1,Ze=N||I?ie.bottom-lt:ie.top,nt=N?I?ie.bottom-lt:ie.top:ie.bottom-lt;re=Rc(F,B,ge,fe,ce,fe,ie.left,Ze,ie.right,nt);break}case"bottom":{const ee=I?lt/2:lt*4,ge=I||N?c+ee:c-ee,ce=I?c-ee:N?c+ee:c-ee,fe=f-lt,Ze=N||I?ie.top+lt:ie.bottom,nt=N?I?ie.top+lt:ie.bottom:ie.top+lt;re=Rc(F,B,ge,fe,ce,fe,ie.left,Ze,ie.right,nt);break}case"left":{const ee=oe?lt/2:lt*4,ge=oe||Q?f+ee:f-ee,ce=oe?f-ee:Q?f+ee:f-ee,fe=c+lt+1,Ze=Q||oe?ie.right-lt:ie.left,nt=Q?oe?ie.right-lt:ie.left:ie.right-lt;re=Rc(F,B,Ze,ie.top,nt,ie.bottom,fe,ge,fe,ce);break}case"right":{const ee=oe?lt/2:lt*4,ge=oe||Q?f+ee:f-ee,ce=oe?f-ee:Q?f+ee:f-ee,fe=c-lt,Ze=Q||oe?ie.left+lt:ie.right,nt=Q?oe?ie.left+lt:ie.right:ie.left+lt;re=Rc(F,B,fe,ge,fe,ce,Ze,ie.top,nt,ie.bottom);break}}re?S||r.start(40,W):W()}};return o.__options={...n,blockPointerEvents:i},o}const TS=O.createContext(void 0);function Io(n){const i=O.useContext(TS);if(i===void 0&&!n)throw new Error(ur(47));return i}function FA(){return{...kA(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const KA={...LA,disabled:Ve(n=>n.disabled),instantType:Ve(n=>n.instantType),openMethod:Ve(n=>n.openMethod),openChangeReason:Ve(n=>n.openChangeReason),modal:Ve(n=>n.modal),focusManagerModal:Ve(n=>n.focusManagerModal),stickIfOpen:Ve(n=>n.stickIfOpen),titleElementId:Ve(n=>n.titleElementId),descriptionElementId:Ve(n=>n.descriptionElementId),openOnHover:Ve(n=>n.openOnHover),closeDelay:Ve(n=>n.closeDelay),hasViewport:Ve(n=>n.hasViewport)};class Ih extends gS{constructor(r,o,c=!1){const f={...FA(),...r},d=new Kh;f.open&&(r==null?void 0:r.mounted)===void 0&&(f.mounted=!0),f.floatingRootContext=jA(d,o,c);super(f,{popupRef:O.createRef(),backdropRef:O.createRef(),internalBackdropRef:O.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:O.createRef(),beforeContentFocusGuardRef:O.createRef(),stickIfOpenTimeout:new ei,triggerElements:d},KA);tt(this,"setOpen",(r,o)=>{var y,v;const c=o.reason===xn,f=o.reason===Uo&&o.event.detail===0,d=!r&&(o.reason===q0||o.reason==null),m=OA(o),g=this.select("activeTriggerId");if(!r&&o.reason===wO&&o.trigger==null&&g!=null&&(o.trigger=this.context.triggerElements.getById(g)??this.select("activeTriggerElement")??void 0),(v=(y=this.context).onOpenChange)==null||v.call(y,r,o),o.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(r,o);const p=()=>{const S={open:r,openChangeReason:o.reason};RA(S,r,o.trigger,m()),this.update(S)};c?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(JO,()=>{this.set("stickIfOpen",!1)}),Ms.flushSync(p)):p(),f||d?this.set("instantType",f?"click":"dismiss"):o.reason===Lo?this.set("instantType","focus"):this.set("instantType",void 0)});tt(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(r,o){const{store:c,internalStore:f}=TA(r,(d,m)=>new Ih(o,d,m));return O.useEffect(()=>f==null?void 0:f.disposeEffect(),[f]),c}}function rv({props:n}){const{children:i,open:r,defaultOpen:o=!1,onOpenChange:c,onOpenChangeComplete:f,modal:d=!1,handle:m,triggerId:g,defaultTriggerId:p=null}=n,y=Ih.useStore(m==null?void 0:m.store,{modal:d,open:o,openProp:r,activeTriggerId:p,triggerIdProp:g});CA(y,r,o,p),y.useControlledProp("openProp",r),y.useControlledProp("triggerIdProp",g);const v=y.useState("open"),S=y.useState("mounted"),E=y.useState("payload"),x=_a()!=null;y.useContextCallback("onOpenChange",c),y.useContextCallback("onOpenChangeComplete",f),DA(y,v),_A(y);const{forceUnmount:w}=MA(v,y,()=>{y.update({stickIfOpen:!0,openChangeReason:null})});y.useSyncedValues({modal:d,nested:x}),O.useEffect(()=>{v||y.context.stickIfOpenTimeout.clear()},[y,v]);const _=O.useCallback(()=>{y.setOpen(!1,Xt(RO))},[y]);O.useImperativeHandle(n.actionsRef,()=>({unmount:w,close:_}),[w,_]);const D=v||S,C=O.useMemo(()=>({store:y}),[y]);return A.jsxs(TS.Provider,{value:C,children:[D&&A.jsx(PA,{store:y,modal:d}),typeof i=="function"?i({payload:E}):i]})}function ZA(n){return Io(!0)?A.jsx(rv,{props:n}):A.jsx(oC,{children:A.jsx(rv,{props:n})})}function PA({store:n,modal:i}){const r=n.useState("floatingRootContext"),o=pC(r,{outsidePressEvent:{mouse:i==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),c=o.reference??Wt,f=o.trigger??Wt,d=O.useMemo(()=>Fo(vS,o.floating),[o.floating]);return NA(n,{activeTriggerProps:c,inactiveTriggerProps:f,popupProps:d}),null}let Jh=function(n){return n.open="data-open",n.closed="data-closed",n[n.startingStyle=Bo.startingStyle]="startingStyle",n[n.endingStyle=Bo.endingStyle]="endingStyle",n.anchorHidden="data-anchor-hidden",n.side="data-side",n.align="data-align",n}({}),ph=function(n){return n.popupOpen="data-popup-open",n.pressed="data-pressed",n}({});const IA={[ph.popupOpen]:""},JA={[ph.popupOpen]:"",[ph.pressed]:""},WA={[Jh.open]:""},$A={[Jh.closed]:""},e2={[Jh.anchorHidden]:""},t2={open(n){return n?IA:null}},n2={open(n){return n?JA:null}},wS={open(n){return n?WA:$A},anchorHidden(n){return n?e2:null}},i2=300;function s2(n){return Po(n,"base-ui")}function r2(n,i){const r=O.useRef(null);function o(f){Ms.flushSync(()=>{n.setOpen(!1,Xt(Lo,f.nativeEvent,f.currentTarget))});const d=FO(r.current);d==null||d.focus()}function c(f){var m;const d=n.select("positionerElement");if(d&&ra(f,d))(m=n.context.beforeContentFocusGuardRef.current)==null||m.focus();else{Ms.flushSync(()=>{n.setOpen(!1,Xt(Lo,f.nativeEvent,f.currentTarget))});let g=XO(n.context.triggerFocusTargetRef.current||i.current);for(;g!==null&&Me(d,g);){const p=g;if(g=Qh(g),g===p)break}g==null||g.focus()}}return{preFocusGuardRef:r,handlePreFocusGuardFocus:o,handleFocusTargetFocus:c}}function a2(n){const i=O.useRef(""),r=O.useCallback(c=>{c.defaultPrevented||(i.current=c.pointerType,n(c,c.pointerType))},[n]);return{onClick:O.useCallback(c=>{if(c.detail===0){n(c,"keyboard");return}"pointerType"in c?n(c,c.pointerType):n(c,i.current),i.current=""},[n]),onPointerDown:r}}function o2(n,i){const r=$e((f,d)=>{(typeof n=="function"?n():n)||i(d||(su?"touch":""))}),{onClick:o,onPointerDown:c}=a2(r);return O.useMemo(()=>({onClick:o,onPointerDown:c}),[o,c])}const l2=O.forwardRef(function(i,r){const{render:o,className:c,style:f,disabled:d=!1,nativeButton:m=!0,handle:g,payload:p,openOnHover:y=!1,delay:v=i2,closeDelay:S=0,id:E,...x}=i,w=Io(!0),_=(g==null?void 0:g.store)??(w==null?void 0:w.store);if(!_)throw new Error(ur(74));const D=s2(E),C=_.useState("isTriggerActive",D),j=_.useState("floatingRootContext"),k=_.useState("isOpenedByTrigger",D),q=_.useState("triggerPopupId",D),F=O.useRef(null),{registerTrigger:B,isMountedByThisTrigger:U}=AA(D,F,_,{payload:p,disabled:d,openOnHover:y,closeDelay:S}),K=_.useState("openChangeReason"),se=_.useState("stickIfOpen"),pe=_.useState("openMethod"),ae=_.useState("focusManagerModal"),W=VA(j,{enabled:!d&&j!=null&&y&&(pe!=="touch"||K!==Uo),mouseOnly:!0,move:!1,handleClose:XA(),restMs:v,delay:{close:S},triggerElementRef:F,isActiveTrigger:C,isClosing:()=>_.select("transitionStatus")==="ending"}),le=dC(j,{enabled:j!=null,stickIfOpen:se}),ie=o2(()=>_.select("open"),re=>{_.set("openMethod",re)}),N=_.useState("triggerProps",U),{getButtonProps:Q,buttonRef:I}=N0({disabled:d,native:m}),oe={open(re){return re&&K===Uo?n2.open(re):t2.open(re)}},{preFocusGuardRef:Y,handlePreFocusGuardFocus:T,handleFocusTargetFocus:H}=r2(_,F),ne=Ra("button",i,{state:{disabled:d,open:k},ref:[I,r,B,F],props:[le.reference,W,N,ie,{[tS]:"",id:D,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":q},x,Q],stateAttributesMapping:oe});return U&&!ae?A.jsxs(O.Fragment,{children:[A.jsx(Ta,{ref:Y,onFocus:T}),A.jsx(O.Fragment,{children:ne},D),A.jsx(Ta,{ref:_.context.triggerFocusTargetRef,onFocus:H})]}):A.jsx(O.Fragment,{children:ne},D)}),RS=O.createContext(void 0);function c2(){const n=O.useContext(RS);if(n===void 0)throw new Error(ur(45));return n}const u2=O.forwardRef(function(i,r){const{keepMounted:o=!1,...c}=i,{store:f}=Io();return f.useState("mounted")||o?A.jsx(RS.Provider,{value:o,children:A.jsx(iC,{ref:r,...c})}):null});function f2(n){return wh(19)?n:n?"true":void 0}const OS=O.createContext(void 0);function d2(){const n=O.useContext(OS);if(!n)throw new Error(ur(46));return n}const h2=O.createContext(void 0);function m2(){const n=O.useContext(h2);return(n==null?void 0:n.direction)??"ltr"}const p2=n=>({name:"arrow",options:n,async fn(i){var oe,Y;const{x:r,y:o,placement:c,rects:f,platform:d,elements:m,middlewareData:g}=i,{element:p,padding:y=0,offsetParent:v="real"}=Gi(n,i)||{};if(p==null)return{};const S=V0(y),E={x:r,y:o},x=Vh(c),w=Yh(x),_=await d.getDimensions(p),D=x==="y",C=D?"top":"left",j=D?"bottom":"right",k=D?"clientHeight":"clientWidth",q=f.reference[w]+f.reference[x]-E[x]-f.floating[w],F=E[x]-f.reference[x],B=v==="real"?await((oe=d.getOffsetParent)==null?void 0:oe.call(d,p)):m.floating;let U=m.floating[k]||f.floating[w];(!U||!await((Y=d.isElement)==null?void 0:Y.call(d,B)))&&(U=m.floating[k]||f.floating[w]);const K=q/2-F/2,se=U/2-_[w]/2-1,pe=Math.min(S[C],se),ae=Math.min(S[j],se),W=pe,le=U-_[w]-ae,ie=U/2-_[w]/2+K,N=Y0(W,ie,le),Q=!g.arrow&&Ds(c)!=null&&ie!==N&&f.reference[w]/2-(ie<W?pe:ae)-_[w]/2<0,I=Q?ie<W?ie-W:ie-le:0;return{[x]:E[x]+I,data:{[x]:N,centerOffset:ie-N-I,...Q&&{alignmentOffset:I}},reset:Q}}}),g2=(n,i)=>({...p2(n),options:[n,i]}),y2=iA().fn,b2={name:"hide",async fn(n){var m;const{width:i,height:r,x:o,y:c}=n.rects.reference,f=i===0&&r===0&&o===0&&c===0;return{data:{referenceHidden:((m=(await y2(n)).data)==null?void 0:m.referenceHidden)||f}}}},jc={sideX:"left",sideY:"top"},v2={name:"adaptiveOrigin",async fn(n){var C,j;const{x:i,y:r,rects:{floating:o},elements:{floating:c},platform:f,strategy:d,placement:m}=n,g=kt(c),p=g.getComputedStyle(c);if(!(p.transitionDuration!=="0s"&&p.transitionDuration!==""))return{x:i,y:r,data:jc};const v=await((C=f.getOffsetParent)==null?void 0:C.call(f,c));let S={width:0,height:0};if(d==="fixed"&&(g!=null&&g.visualViewport))S={width:g.visualViewport.width,height:g.visualViewport.height};else if(v===g){const k=ut(c);S={width:k.documentElement.clientWidth,height:k.documentElement.clientHeight}}else await((j=f.isElement)==null?void 0:j.call(f,v))&&(S=await f.getDimensions(v));const E=Dn(m);let x=i,w=r;E==="left"&&(x=S.width-(i+o.width)),E==="top"&&(w=S.height-(r+o.height));const _=E==="left"?"right":jc.sideX,D=E==="top"?"bottom":jc.sideY;return{x,y:w,data:{sideX:_,sideY:D}}}};function CS(n,i,r){const o=n==="inline-start"||n==="inline-end";return{top:"top",right:o?r?"inline-start":"inline-end":"right",bottom:"bottom",left:o?r?"inline-end":"inline-start":"left"}[i]}function av(n,i,r){const{rects:o,placement:c}=n;return{side:CS(i,Dn(c),r),align:Ds(c)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function S2(n){var gr,pi;const{anchor:i,positionMethod:r="absolute",side:o="bottom",sideOffset:c=0,align:f="center",alignOffset:d=0,collisionBoundary:m,collisionPadding:g=5,sticky:p=!1,arrowPadding:y=5,disableAnchorTracking:v=!1,inline:S,keepMounted:E=!1,floatingRootContext:x,mounted:w,collisionAvoidance:_,shiftCrossAxis:D=!1,nodeId:C,adaptiveOrigin:j,lazyFlip:k=!1,externalTree:q}=n,[F,B]=O.useState(null);!w&&F!==null&&B(null);const U=_.side||"flip",K=_.align||"flip",se=_.fallbackAxisSide||"end",pe=typeof i=="function"?i:void 0,ae=$e(pe),W=pe?ae:i,le=En(i),ie=En(w),Q=m2()==="rtl",I=F||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":Q?"left":"right","inline-start":Q?"right":"left"}[o],oe=f==="center"?I:`${I}-${f}`;let Y=g;const T=1,H=o==="bottom"?T:0,te=o==="top"?T:0,ne=o==="right"?T:0,re=o==="left"?T:0;typeof Y=="number"?Y={top:Y+H,right:Y+re,bottom:Y+te,left:Y+ne}:Y&&(Y={top:(Y.top||0)+H,right:(Y.right||0)+re,bottom:(Y.bottom||0)+te,left:(Y.left||0)+ne});const ee={boundary:m==="clipping-ancestors"?"clippingAncestors":m,padding:Y},ge=O.useRef(null),ce=En(c),fe=En(d),Ze=typeof c!="function"?c:0,nt=typeof d!="function"?d:0,ve=[];S&&ve.push(S),ve.push(WC(Fe=>{const Ot=av(Fe,o,Q),Vt=typeof ce.current=="function"?ce.current(Ot):ce.current,Ft=typeof fe.current=="function"?fe.current(Ot):fe.current;return{mainAxis:Vt,crossAxis:Ft,alignmentAxis:Ft}},[Ze,nt,Q,o]));const ze=K==="none"&&U!=="shift",Oe=!ze&&(p||D||U==="shift"),ft=U==="none"?null:tA({...ee,padding:{top:Y.top+T,right:Y.right+T,bottom:Y.bottom+T,left:Y.left+T},mainAxis:!D&&U==="flip",crossAxis:K==="flip"?"alignment":!1,fallbackAxisSideDirection:se}),vt=ze?null:$C(Fe=>{const Ot=ut(Fe.elements.floating).documentElement;return{...ee,rootBoundary:D?{x:0,y:0,width:Ot.clientWidth,height:Ot.clientHeight}:void 0,mainAxis:K!=="none",crossAxis:Oe,limiter:p||D?void 0:eA(Vt=>{if(!ge.current)return{};const{width:Ft,height:an}=ge.current.getBoundingClientRect(),wn=Fn(Dn(Vt.placement)),ni=wn==="y"?Ft:an,ii=wn==="y"?Y.left+Y.right:Y.top+Y.bottom;return{offset:ni/2+ii/2}})}},[ee,p,D,Y,K]);U==="shift"||K==="shift"||f==="center"?ve.push(vt,ft):ve.push(ft,vt),ve.push(nA({...ee,apply({elements:{floating:Fe},availableWidth:Ot,availableHeight:Vt,rects:Ft}){if(!ie.current)return;const an=Fe.style;an.setProperty("--available-width",`${Ot}px`),an.setProperty("--available-height",`${Vt}px`);const wn=kt(Fe).devicePixelRatio||1,{x:ni,y:ii,width:dn,height:Na}=Ft.reference,yr=(Math.round((ni+dn)*wn)-Math.round(ni*wn))/wn,br=(Math.round((ii+Na)*wn)-Math.round(ii*wn))/wn;an.setProperty("--anchor-width",`${yr}px`),an.setProperty("--anchor-height",`${br}px`)}}),g2(Fe=>({element:ge.current||ut(Fe.elements.floating).createElement("div"),padding:y,offsetParent:"floating"}),[y]),{name:"transformOrigin",fn(Fe){var Sr,el,tl;const{elements:Ot,middlewareData:Vt,placement:Ft,rects:an,y:wn}=Fe,ni=Dn(Ft),ii=Fn(ni),dn=ge.current,Na=((Sr=Vt.arrow)==null?void 0:Sr.x)||0,yr=((el=Vt.arrow)==null?void 0:el.y)||0,br=(dn==null?void 0:dn.clientWidth)||0,Jo=(dn==null?void 0:dn.clientHeight)||0,zs=Na+br/2,vr=yr+Jo/2,Wo=Math.abs(((tl=Vt.shift)==null?void 0:tl.y)||0),$o=an.reference.height/2,hn=typeof c=="function"?c(av(Fe,o,Q)):c,Ut=Wo>hn,en={top:`${zs}px calc(100% + ${hn}px)`,bottom:`${zs}px ${-hn}px`,left:`calc(100% + ${hn}px) ${vr}px`,right:`${-hn}px ${vr}px`}[ni],Fi=`${zs}px ${an.reference.y+$o-wn}px`;return Ot.floating.style.setProperty("--transform-origin",Oe&&ii==="y"&&Ut?Fi:en),{}}},b2,j),Xe(()=>{!w&&x&&x.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[w,x]);const Re=O.useMemo(()=>({elementResize:!v&&typeof ResizeObserver<"u",layoutShift:!v&&typeof IntersectionObserver<"u"}),[v]),{refs:ke,elements:Ee,x:mt,y:dt,middlewareData:je,update:xt,placement:ue,context:xe,isPositioned:ht,floatingStyles:Be}=HA({rootContext:x,open:E?w:void 0,placement:oe,middleware:ve,strategy:r,whileElementsMounted:E?void 0:(...Fe)=>Jb(...Fe,Re),nodeId:C,externalTree:q}),{sideX:pt,sideY:jt}=je.adaptiveOrigin||jc,sn=ht?r:"fixed",rn=O.useMemo(()=>{const Fe=j?{position:sn,[pt]:mt,[jt]:dt}:{position:sn,...Be};return ht||(Fe.opacity=0),Fe},[j,sn,pt,mt,jt,dt,Be,ht]),ti=O.useRef(null);Xe(()=>{if(!w)return;const Fe=le.current,Ot=typeof Fe=="function"?Fe():Fe,Ft=(ov(Ot)?Ot.current:Ot)||null||null;Ft!==ti.current&&(ke.setPositionReference(Ft),ti.current=Ft)},[w,ke,W,le]),O.useEffect(()=>{if(!w)return;const Fe=le.current;typeof Fe!="function"&&ov(Fe)&&Fe.current!==ti.current&&(ke.setPositionReference(Fe.current),ti.current=Fe.current)},[w,ke,W,le]),O.useEffect(()=>{if(E&&w&&Ee.reference&&Ee.floating)return Jb(Ee.reference,Ee.floating,xt,Re)},[E,w,Ee,xt,Re]);const fn=Dn(ue),qt=CS(o,fn,Q),Tn=Ds(ue)||"center",Yt=!!((gr=je.hide)!=null&&gr.referenceHidden);Xe(()=>{k&&w&&ht&&B(fn)},[k,w,ht,fn]);const mr=O.useMemo(()=>{var Fe,Ot;return{position:"absolute",top:(Fe=je.arrow)==null?void 0:Fe.y,left:(Ot=je.arrow)==null?void 0:Ot.x}},[je.arrow]),pr=((pi=je.arrow)==null?void 0:pi.centerOffset)!==0;return O.useMemo(()=>({positionerStyles:rn,arrowStyles:mr,arrowRef:ge,arrowUncentered:pr,side:qt,align:Tn,physicalSide:fn,anchorHidden:Yt,refs:ke,context:xe,isPositioned:ht,update:xt}),[rn,mr,ge,pr,qt,Tn,fn,Yt,ke,xe,ht,xt])}function ov(n){return n!=null&&"current"in n}const x2=O.forwardRef(function(i,r){const{cutout:o,...c}=i;let f;if(o){const d=o.getBoundingClientRect();f=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${d.left}px ${d.top}px,${d.left}px ${d.bottom}px,${d.right}px ${d.bottom}px,${d.right}px ${d.top}px,${d.left}px ${d.top}px)`}return A.jsx("div",{ref:r,role:"presentation","data-base-ui-inert":"",...c,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:f}})});function AS(n){return n==="starting"?WO:Wt}function E2(n,i,{styles:r,transitionStatus:o,props:c,refs:f,hidden:d,inert:m=!1}){const g={...r};return m&&(g.pointerEvents="none"),Ra("div",n,{state:i,ref:f,props:[{role:"presentation",hidden:d,style:g},AS(o),c],stateAttributesMapping:wS})}let lv={},cv={},uv="";function T2(n){if(typeof document>"u")return!1;const i=ut(n);return kt(i).innerWidth-i.documentElement.clientWidth>0}function w2(n){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const r=ut(n),o=r.documentElement,c=r.body,f=hr(o)?o:c,d=f.style.overflowY,m=o.style.scrollbarGutter;o.style.scrollbarGutter="stable",f.style.overflowY="scroll";const g=f.offsetWidth;f.style.overflowY="hidden";const p=f.offsetWidth;return f.style.overflowY=d,o.style.scrollbarGutter=m,g===p}function R2(n){const i=ut(n),r=i.documentElement,o=i.body,c=hr(r)?r:o,f={overflowY:c.style.overflowY,overflowX:c.style.overflowX};return Object.assign(c.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(c.style,f)}}function O2(n){var E;const i=ut(n),r=i.documentElement,o=i.body,c=kt(r);let f=0,d=0,m=!1;const g=di.create();if(Aa&&(((E=c.visualViewport)==null?void 0:E.scale)??1)!==1)return()=>{};function p(){const x=c.getComputedStyle(r),w=c.getComputedStyle(o),C=(x.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";f=r.scrollTop,d=r.scrollLeft,lv={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},uv=r.style.scrollBehavior,cv={position:o.style.position,height:o.style.height,width:o.style.width,boxSizing:o.style.boxSizing,overflowY:o.style.overflowY,overflowX:o.style.overflowX,scrollBehavior:o.style.scrollBehavior};const j=r.scrollHeight>r.clientHeight,k=r.scrollWidth>r.clientWidth,q=x.overflowY==="scroll"||w.overflowY==="scroll",F=x.overflowX==="scroll"||w.overflowX==="scroll",B=Math.max(0,c.innerWidth-o.clientWidth),U=Math.max(0,c.innerHeight-o.clientHeight),K=parseFloat(w.marginTop)+parseFloat(w.marginBottom),se=parseFloat(w.marginLeft)+parseFloat(w.marginRight),pe=hr(r)?r:o;if(m=w2(n),m){r.style.scrollbarGutter=C,pe.style.overflowY="hidden",pe.style.overflowX="hidden";return}Object.assign(r.style,{scrollbarGutter:C,overflowY:"hidden",overflowX:"hidden"}),(j||q)&&(r.style.overflowY="scroll"),(k||F)&&(r.style.overflowX="scroll"),Object.assign(o.style,{position:"relative",height:K||U?`calc(100dvh - ${K+U}px)`:"100dvh",width:se||B?`calc(100vw - ${se+B}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),o.scrollTop=f,o.scrollLeft=d,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function y(){Object.assign(r.style,lv),Object.assign(o.style,cv),m||(r.scrollTop=f,r.scrollLeft=d,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=uv)}function v(){y(),g.request(p)}p();const S=Ke(c,"resize",v);return()=>{g.cancel(),y(),typeof c.removeEventListener=="function"&&S()}}class C2{constructor(){tt(this,"lockCount",0);tt(this,"restore",null);tt(this,"timeoutLock",ei.create());tt(this,"timeoutUnlock",ei.create());tt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});tt(this,"unlock",()=>{var i;this.lockCount===0&&this.restore&&((i=this.restore)==null||i.call(this),this.restore=null)})}acquire(i){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(i)),this.release}lock(i){if(this.lockCount===0||this.restore!==null)return;const o=ut(i).documentElement,c=kt(o).getComputedStyle(o).overflowY;if(c==="hidden"||c==="clip"){this.restore=Rh;return}const f=su||!T2(i);this.restore=f?R2(i):O2(i)}}const A2=new C2;function _2(n=!0,i=null){Xe(()=>{if(n)return A2.acquire(i)},[n,i])}const M2=20;function N2(n,i,r,o){const[c,f]=O.useState(!1);Xe(()=>{if(!n||!i||r==null){f(!1);return}const d=ut(r).documentElement.clientWidth,m=r.offsetWidth;f(d>0&&m>0&&m>=d-M2)},[n,i,r]),_2(n&&(!i||c),o)}const D2=O.forwardRef(function(i,r){const{render:o,className:c,style:f,anchor:d,positionMethod:m="absolute",side:g="bottom",align:p="center",sideOffset:y=0,alignOffset:v=0,collisionBoundary:S="clipping-ancestors",collisionPadding:E=5,arrowPadding:x=5,sticky:w=!1,disableAnchorTracking:_=!1,collisionAvoidance:D=$O,...C}=i,{store:j}=Io(),k=c2(),q=rC(),F=j.useState("floatingRootContext"),B=j.useState("mounted"),U=j.useState("open"),K=j.useState("openChangeReason"),se=j.useState("activeTriggerElement"),pe=j.useState("modal"),ae=j.useState("openMethod"),W=j.useState("positionerElement"),le=j.useState("instantType"),ie=j.useState("transitionStatus"),N=j.useState("hasViewport"),Q=O.useRef(null),I=yS(W,!1,!1),oe=S2({anchor:d,floatingRootContext:F,positionMethod:m,mounted:B,side:g,sideOffset:y,align:p,alignOffset:v,arrowPadding:x,collisionBoundary:S,collisionPadding:E,sticky:w,disableAnchorTracking:_,keepMounted:k,nodeId:q,collisionAvoidance:D,adaptiveOrigin:N?v2:void 0}),Y=F.useState("domReferenceElement");Xe(()=>{const ne=Y,re=Q.current;if(ne&&(Q.current=ne),re&&ne&&ne!==re){j.set("instantType",void 0);const ee=new AbortController;return I(()=>{j.set("instantType","trigger-change")},ee.signal),()=>{ee.abort()}}},[Y,I,j]),N2(U&&pe===!0&&K!==xn,ae==="touch",W,se);const T=O.useCallback(ne=>{j.set("positionerElement",ne)},[j]),H={open:U,side:oe.side,align:oe.align,anchorHidden:oe.anchorHidden,instant:le},te=E2(i,H,{styles:oe.positionerStyles,transitionStatus:ie,props:C,refs:[r,T],hidden:!B,inert:!U});return A.jsxs(OS.Provider,{value:oe,children:[B&&pe===!0&&K!==xn&&A.jsx(x2,{ref:j.context.internalBackdropRef,inert:f2(!U),cutout:se}),A.jsx(aC,{id:q,children:te})]})}),z2="ArrowUp",k2="ArrowDown",j2="ArrowLeft",U2="ArrowRight",L2="Home",B2="End",H2=new Set([j2,U2]),q2=new Set([z2,k2]),Y2=new Set([...H2,...q2]),V2=new Set([...Y2,L2,B2]),G2=O.createContext(void 0);function Q2(n){return O.useContext(G2)}const X2=O.createContext(void 0);function F2(){const[n,i]=O.useState(0),r=$e(()=>(i(c=>c+1),()=>{i(c=>Math.max(0,c-1))}));return{context:O.useMemo(()=>({register:r}),[r]),hasClosePart:n>0}}function K2(n){const{value:i,children:r}=n;return A.jsx(X2.Provider,{value:i,children:r})}const Z2={...wS,...xA},P2=O.forwardRef(function(i,r){const{render:o,className:c,style:f,initialFocus:d,finalFocus:m,...g}=i,{store:p}=Io(),y=d2(),v=Q2()!=null,{context:S,hasClosePart:E}=F2(),x=p.useState("open"),w=p.useState("openMethod"),_=p.useState("instantType"),D=p.useState("transitionStatus"),C=p.useState("popupProps"),j=p.useState("titleElementId"),k=p.useState("descriptionElementId"),q=p.useState("modal"),F=p.useState("mounted"),B=p.useState("openChangeReason"),U=p.useState("activeTriggerElement"),K=p.useState("floatingRootContext"),se=K.useState("floatingId"),pe=p.useState("disabled"),ae=p.useState("openOnHover"),W=p.useState("closeDelay"),le=g.id??se;bS({open:x,ref:p.context.popupRef,onComplete(){var Y,T;x&&((T=(Y=p.context).onOpenChangeComplete)==null||T.call(Y,!0))}}),qA(K,{enabled:ae&&!pe,closeDelay:W});const ie=d===void 0?EA(p.context.popupRef):d,N=q!==!1&&E;p.useSyncedValue("focusManagerModal",N);const Q=O.useCallback(Y=>{p.set("popupElement",Y)},[p]),I={open:x,side:y.side,align:y.align,instant:_,transitionStatus:D},oe=Ra("div",i,{state:I,ref:[r,p.context.popupRef,Q],props:[C,{id:le,role:"dialog",...vS,"aria-labelledby":j,"aria-describedby":k,onKeyDown(Y){v&&V2.has(Y.key)&&Y.stopPropagation()}},AS(D),g],stateAttributesMapping:Z2});return A.jsx(fC,{context:K,openInteractionType:w,modal:N,disabled:!F||B===xn,initialFocus:ie,returnFocus:m,restoreFocus:"popup",previousFocusableElement:Rt(U)?U:void 0,nextFocusableElement:p.context.triggerFocusTargetRef,beforeContentFocusGuardRef:p.context.beforeContentFocusGuardRef,children:A.jsx(K2,{value:S,children:oe})})}),I2="bg-chatroom-bg-primary text-chatroom-text-primary border border-chatroom-border rounded-none shadow-md",J2=`z-50 pointer-events-auto outline-none ${I2}`;function _S({modal:n=!1,...i}){return A.jsx(ZA,{"data-slot":"popover",modal:n,...i})}function MS(n){return A.jsx(l2,{"data-slot":"popover-trigger",...n})}function NS({className:n,align:i="start",side:r="bottom",sideOffset:o=4,...c}){return A.jsx(u2,{children:A.jsx(D2,{align:i,side:r,sideOffset:o,className:"isolate z-50",children:A.jsx(P2,{className:un("w-72 origin-(--transform-origin) overflow-hidden p-0 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95",J2,n),...c})})})}function DS({options:n,value:i,onChange:r,disabled:o,isLoading:c,isError:f,placeholder:d="Select…",allLabel:m="All",searchPlaceholder:g="Search…",emptyLabel:p="No results",ariaLabel:y,triggerClassName:v,contentClassName:S,allowClear:E=!0}){var U;const[x,w]=O.useState(!1),{searchTerm:_,setSearchTerm:D,handleOpenChange:C}=sO(w),j=(U=n.find(K=>K.value===i))==null?void 0:U.label,k=c?"Loading…":f?"Failed to load":j??d,q=O.useMemo(()=>tO(n,_,K=>`${K.label} ${K.value}`),[n,_]),F=o||c||f,B=A.jsxs("button",{type:"button",disabled:F,className:un(k0,v),"aria-label":y,"aria-busy":c,children:[A.jsx("span",{className:"truncate",children:k}),A.jsx(Jc,{size:12,className:j0})]});return A.jsxs(_S,{open:x,onOpenChange:C,children:[A.jsx(MS,{render:B}),A.jsxs(NS,{className:un("w-64",S),children:[A.jsx(iO,{value:_,onChange:D,placeholder:g}),A.jsxs(nO,{maxHeightClassName:"max-h-60",children:[E&&A.jsx(Vc,{selected:!i,onSelect:()=>{r(void 0),C(!1)},children:m}),q.map(K=>A.jsx(Vc,{selected:i===K.value,onSelect:()=>{r(K.value),C(!1)},children:K.label},K.value)),!q.length&&A.jsx("div",{className:"px-3 py-2 text-xs text-chatroom-text-muted",children:p})]})]})]})}function zS({chatrooms:n,value:i,onChange:r,disabled:o,isLoading:c,isError:f}){return A.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[A.jsx("span",{className:"text-chatroom-text-muted",children:"Chatroom"}),A.jsx(DS,{options:n.map(d=>({value:d.id,label:d.displayName})),value:i,onChange:d=>{d&&r(d)},disabled:o,isLoading:c,isError:f,placeholder:"Select chatroom",allowClear:!1,searchPlaceholder:"Search chatrooms…",ariaLabel:"Filter by chatroom",triggerClassName:"min-w-[10rem]"})]})}const Wh="1h",kS={"1h":"Last 1 hour","3h":"Last 3 hours","1d":"Last 1 day"},jS={"1h":36e5,"3h":108e5,"1d":864e5};function Ic(n,i=Date.now()){return n.timeRange==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0?{fromMs:n.fromMs,toMs:n.toMs}:{fromMs:i-(jS[n.timeRange]??36e5),toMs:i}}function W2(n){const i=n.timeRange??"1h";return i!=="custom"?kS[i]:n.fromMs!==void 0&&n.toMs!==void 0?`${new Date(n.fromMs).toLocaleString()} – ${new Date(n.toMs).toLocaleString()}`:"Custom range"}const Cc=n=>{const i=new Date(n),r=o=>String(o).padStart(2,"0");return`${i.getFullYear()}-${r(i.getMonth()+1)}-${r(i.getDate())}T${r(i.getHours())}:${r(i.getMinutes())}`},fv=n=>{const i=new Date(n).getTime();return Number.isFinite(i)?i:void 0},$2=["1h","3h","1d"];function US({value:n,onChange:i,disabled:r}){const[o,c]=O.useState(!1),[f,d]=O.useState(null),[m,g]=O.useState(null),p=n.timeRange??Wh,y=f??(p==="custom"&&n.fromMs!==void 0?Cc(n.fromMs):""),v=m??(p==="custom"&&n.toMs!==void 0?Cc(n.toMs):""),S=()=>{const x=Date.now(),w=n.fromMs??x-jS["1h"],_=n.toMs??x;d(Cc(w)),g(Cc(_)),i({timeRange:"custom",fromMs:w,toMs:_})},E=()=>{const x=fv(y),w=fv(v);x===void 0||w===void 0||x>w||(i({timeRange:"custom",fromMs:x,toMs:w}),c(!1))};return A.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[A.jsx("span",{className:"text-chatroom-text-muted",children:"Time"}),A.jsxs(_S,{open:o,onOpenChange:c,children:[A.jsx(MS,{render:A.jsxs("button",{type:"button",disabled:r,className:un(k0,"min-w-[10rem]"),"aria-label":"Filter by time range",children:[A.jsx("span",{className:"truncate",children:W2(n)}),A.jsx(Jc,{size:12,className:j0})]})}),A.jsxs(NS,{className:"w-72 p-0",align:"start",children:[$2.map(x=>A.jsx(Vc,{selected:p===x,onSelect:()=>{d(null),g(null),i({timeRange:x,fromMs:void 0,toMs:void 0}),c(!1)},children:kS[x]},x)),A.jsx(Vc,{selected:p==="custom",onSelect:S,children:"Custom range…"}),p==="custom"&&A.jsxs("div",{className:"space-y-2 border-t border-chatroom-border px-3 py-2",children:[A.jsxs("label",{className:"flex flex-col gap-1 text-[11px] text-chatroom-text-muted",children:["Start",A.jsx("input",{type:"datetime-local",value:y,onChange:x=>d(x.target.value),className:"rounded-none border border-chatroom-border bg-chatroom-bg-secondary px-2 py-1 text-xs text-chatroom-text-primary"})]}),A.jsxs("label",{className:"flex flex-col gap-1 text-[11px] text-chatroom-text-muted",children:["End",A.jsx("input",{type:"datetime-local",value:v,onChange:x=>g(x.target.value),className:"rounded-none border border-chatroom-border bg-chatroom-bg-secondary px-2 py-1 text-xs text-chatroom-text-primary"})]}),A.jsx("button",{type:"button",onClick:E,className:"w-full border border-chatroom-border bg-chatroom-bg-tertiary px-2 py-1.5 text-xs hover:bg-chatroom-bg-hover",children:"Apply"})]})]})]})]})}function e_({chatrooms:n,chatroomsLoading:i,chatroomsError:r,values:o,onChange:c,disabled:f}){return A.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[A.jsx(US,{value:{timeRange:o.timeRange,fromMs:o.fromMs,toMs:o.toMs},onChange:d=>c({...o,...d}),disabled:f}),A.jsx(zS,{chatrooms:n,value:o.chatroomId,onChange:d=>c({...o,chatroomId:d}),disabled:f,isLoading:i,isError:r})]})}function t_({hasChatroom:n}){return A.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-border bg-chatroom-bg-secondary p-6 text-center",role:"status",children:[A.jsx(d0,{className:"size-8 text-chatroom-text-muted","aria-hidden":!0}),A.jsx("p",{className:"text-sm text-chatroom-text-secondary",children:n?"No events in this time range":"Select a chatroom to view events"})]})}const n_=["role","message","reason","taskId","agentId","phase","status","harness"];function i_(n){for(const r of n_){const o=n[r];if(typeof o=="string"&&o.trim())return o.length>80?`${o.slice(0,77)}…`:o;if(typeof o=="number")return String(o)}const i=new Set(["type","timestamp","chatroomId","_id"]);for(const[r,o]of Object.entries(n)){if(i.has(r)||o==null)continue;const c=`${r}: ${typeof o=="string"?o:JSON.stringify(o)}`;return c.length>80?`${c.slice(0,77)}…`:c}return""}function s_({entry:n,selected:i,onSelect:r}){return A.jsxs("div",{role:"button",tabIndex:0,onClick:()=>r==null?void 0:r(n),onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),r==null||r(n))},className:`flex items-center gap-3 border-b border-chatroom-border px-3 py-2 text-xs ${i?"bg-chatroom-bg-hover":"hover:bg-chatroom-bg-hover"}`,children:[A.jsx("span",{className:"w-20 shrink-0 font-mono text-chatroom-text-muted",children:new Date(n.timestamp).toLocaleTimeString()}),A.jsx(_0,{type:n.type}),A.jsx("span",{className:"min-w-0 truncate text-chatroom-text-secondary",children:i_(n.payload)})]})}function r_(n,i=48){return n.scrollHeight-n.scrollTop-n.clientHeight<=i}function LS(n){const i=O.useRef(null),[r,o]=O.useState(!0),c=O.useRef(n),f=O.useCallback((g="auto")=>{const p=i.current;p&&(p.scrollTo({top:p.scrollHeight,behavior:g}),o(!0),c.current=n)},[n]),d=O.useCallback(()=>{const g=i.current;if(!g)return;const p=r_(g);o(p),p&&(c.current=n)},[n]),m=!r&&n>c.current;return{scrollRef:i,isPinned:r,hasUnseenBelow:m,scrollToEnd:f,handleScroll:d}}function BS({rows:n=8}){return A.jsx("div",{className:"flex flex-col gap-1 p-3","aria-busy":"true","aria-label":"Loading logs",children:Array.from({length:n},(i,r)=>A.jsxs("div",{className:"flex gap-3 py-1",children:[A.jsx(_o,{className:"h-4 w-16 shrink-0"}),A.jsx(_o,{className:"h-4 w-12 shrink-0"}),A.jsx(_o,{className:"h-4 w-24 shrink-0"}),A.jsx(_o,{className:"h-4 min-w-0 flex-1"})]},r))})}function a_({entries:n,isLoading:i,error:r,hasChatroom:o,selectedEntry:c,onSelectEntry:f}){const{scrollRef:d,isPinned:m,hasUnseenBelow:g,scrollToEnd:p,handleScroll:y}=LS(n.length);return O.useEffect(()=>{m&&!i&&!r&&n.length>0&&p()},[n.length,m,i,r,p]),i?A.jsx("div",{className:"min-h-[400px] flex-1 border border-chatroom-border bg-chatroom-bg-secondary",children:A.jsx(BS,{})}):r?A.jsx("div",{className:"flex min-h-[400px] flex-1 items-center border border-chatroom-border bg-chatroom-bg-secondary p-4 text-chatroom-status-error",children:r}):!o||n.length===0?A.jsx(t_,{hasChatroom:o}):A.jsxs("div",{className:"relative min-h-[400px] flex-1",children:[A.jsx("div",{ref:d,onScroll:y,className:"h-full overflow-auto border border-chatroom-border bg-chatroom-bg-secondary",children:n.map(v=>A.jsx(s_,{entry:v,selected:(c==null?void 0:c.id)===v.id,onSelect:f},v.id))}),!m&&g&&A.jsxs("button",{type:"button",onClick:()=>p(),className:"absolute bottom-3 right-3 inline-flex items-center gap-1 rounded-md bg-chatroom-accent px-2 py-1 text-xs text-chatroom-text-on-accent shadow",children:[A.jsx(Jc,{className:"size-3"}),"Jump to new"]})]})}function HS({title:n="Session logs",actions:i}){return A.jsxs("div",{className:"flex items-center justify-between gap-4",children:[A.jsx("h2",{className:"text-lg font-medium tracking-tight",children:n}),i]})}function qS(){return Hv({queryKey:["daemon","chatrooms"],queryFn:async()=>{const n=await AR();if(!n.ok)throw new Error(n.error.message);return n.data.chatrooms},staleTime:6e4})}function o_(n){const i=n.chatroomId,[r,o]=O.useState([]),[c,f]=O.useState(!1),[d,m]=O.useState(null);return O.useEffect(()=>{if(!i)return;let g=!0,p;return(async()=>{try{const y=Ic(n),v=await _R({chatroomId:i,fromTimestamp:y.fromMs,toTimestamp:y.toMs,limit:500});if(!v.ok)throw new Error(v.error.message);g&&(o(v.data.entries),p=MR(S=>{var w;const E=(w=S.payload)==null?void 0:w.chatroomId,x=Ic(n);S.timestamp<x.fromMs||S.timestamp>x.toMs||typeof E!="string"||E!==i||o(_=>_.some(D=>D.id===S.id)?_:[..._,S])}))}catch(y){g&&m(y instanceof Error?y.message:"Failed to load event stream")}finally{g&&f(!1)}})(),()=>{g=!1,p==null||p()}},[i,n]),{entries:i?r:[],isLoading:i?c:!1,error:i?d:null}}const l_=n=>n&&["1h","3h","1d","custom"].includes(n)?n:void 0;function dv(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),r=l_(i.get("timeRange")),o=i.get("from"),c=i.get("to"),f=Number(o),d=Number(c),m=i.get("chatroomId");return{...m?{chatroomId:m}:{},...r?{timeRange:r}:{},...Number.isFinite(f)&&o?{fromMs:f}:{},...Number.isFinite(d)&&c?{toMs:d}:{}}}function c_(n){const i=new URLSearchParams(window.location.search);n.chatroomId?i.set("chatroomId",n.chatroomId):i.delete("chatroomId");const r=n.timeRange??Wh;i.set("timeRange",r),r==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0?(i.set("from",String(n.fromMs)),i.set("to",String(n.toMs))):(i.delete("from"),i.delete("to"));const o=i.toString();window.history.replaceState(null,"",`${window.location.pathname}${o?`?${o}`:""}`)}function u_(){const[n,i]=O.useState(()=>dv(window.location.search)),r=O.useCallback(o=>{i(o),c_(o)},[]);return O.useEffect(()=>{const o=()=>i(dv(window.location.search));return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[]),{filters:n,setFilters:r}}function f_(){const{filters:n,setFilters:i}=u_(),r=qS(),{entries:o,isLoading:c,error:f}=o_(n),[d,m]=O.useState(null);return O.useEffect(()=>{m(null)},[n.chatroomId,n.timeRange,n.fromMs,n.toMs]),A.jsxs("section",{className:"flex min-h-0 flex-1 flex-col gap-3 p-6",children:[A.jsx(HS,{title:"Event stream",actions:A.jsx(e_,{chatrooms:r.data??[],chatroomsLoading:r.isLoading,chatroomsError:r.isError,values:n,onChange:i,disabled:c})}),A.jsxs("div",{className:"flex min-h-0 flex-1 gap-0",children:[A.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:A.jsx(a_,{entries:o,isLoading:c,error:f,hasChatroom:!!n.chatroomId,selectedEntry:d,onSelectEntry:m},[n.chatroomId,n.timeRange,n.fromMs,n.toMs].join(":"))}),d&&A.jsx(eO,{entry:d,onClose:()=>m(null)})]})]})}function $h(n){var r;const i=(r=n.metadata)==null?void 0:r.harness;return typeof i=="string"?i:n.source.startsWith("harness:")?n.source.slice(8):void 0}function em(n){var r;const i=(r=n.metadata)==null?void 0:r.chatroomId;return typeof i=="string"?i:void 0}function YS(n){var r;const i=(r=n.metadata)==null?void 0:r.role;return typeof i=="string"?i:void 0}function VS({line:n,chatroomName:i}){const r=em(n),o=YS(n),c=$h(n);return!r&&!o&&!c?null:A.jsxs("div",{className:"flex shrink-0 flex-wrap gap-1",children:[r&&A.jsx(sa,{variant:"outline",className:"text-chatroom-text-secondary",children:i??r}),o&&A.jsx(sa,{variant:"outline",className:"text-chatroom-status-info",children:o}),c&&A.jsx(sa,{variant:"outline",className:"text-chatroom-text-secondary",children:c})]})}const d_={debug:"text-chatroom-text-muted border-chatroom-border",info:"text-chatroom-status-info border-chatroom-status-info/40",warn:"text-chatroom-status-warning border-chatroom-status-warning/40",error:"text-chatroom-status-error border-chatroom-status-error/40"};function GS({level:n}){return A.jsx(sa,{variant:"outline",className:un("font-mono uppercase",d_[n]),children:n})}function h_({line:n,chatroomName:i,onClose:r}){return A.jsxs("aside",{className:"flex w-96 max-w-[40%] shrink-0 flex-col border-l border-chatroom-border bg-chatroom-bg-primary",role:"dialog","aria-modal":"true","aria-label":"Log detail",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-chatroom-border px-4 py-3",children:[A.jsx("h3",{className:"text-sm font-medium",children:"Log detail"}),A.jsx(D0,{variant:"ghost",size:"sm",onClick:r,"aria-label":"Close detail panel",children:A.jsx(h0,{className:"size-4"})})]}),A.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4 text-xs",children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[A.jsx(GS,{level:n.level}),A.jsx("span",{className:"text-chatroom-text-muted",children:z0(n.timestamp)})]}),A.jsx(VS,{line:n,chatroomName:i}),A.jsxs("div",{className:"text-chatroom-text-muted",children:["Source: ",A.jsx("span",{className:"text-chatroom-text-primary",children:n.source}),n.stream&&A.jsxs(A.Fragment,{children:[" · Stream: ",n.stream]}),n.id!=null&&A.jsxs(A.Fragment,{children:[" · ID: ",n.id]})]}),A.jsx("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:n.message}),n.metadata&&Object.keys(n.metadata).length>0&&A.jsxs("div",{children:[A.jsx("p",{className:"mb-1 text-chatroom-text-muted",children:"Metadata"}),A.jsx("pre",{className:"whitespace-pre-wrap border border-chatroom-border bg-chatroom-bg-secondary p-2 font-mono text-[11px]",children:JSON.stringify(n.metadata,null,2)})]})]})]})}function hv({label:n,options:i,value:r,onChange:o,disabled:c,allLabel:f="All"}){return A.jsxs("label",{className:"flex items-center gap-2 text-xs",children:[A.jsx("span",{className:"text-chatroom-text-muted",children:n}),A.jsx(DS,{options:i.map(d=>({value:d,label:d})),value:r,onChange:o,disabled:c,placeholder:f,allLabel:f,searchPlaceholder:`Search ${n.toLowerCase()}…`,ariaLabel:n})]})}function m_({chatrooms:n,chatroomsLoading:i,chatroomsError:r,roles:o,harnesses:c,values:f,onChange:d,disabled:m}){return A.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[A.jsx(US,{value:{timeRange:f.timeRange,fromMs:f.fromMs,toMs:f.toMs},onChange:g=>d({...f,...g}),disabled:m}),A.jsx(zS,{chatrooms:n,value:f.chatroomId,onChange:g=>d({...f,chatroomId:g}),disabled:m,isLoading:i,isError:r}),A.jsx(hv,{label:"Role",options:o,value:f.role,onChange:g=>d({...f,role:g}),disabled:m,allLabel:"All roles"}),A.jsx(hv,{label:"Harness",options:c,value:f.harness,onChange:g=>d({...f,harness:g}),disabled:m,allLabel:"All harnesses"})]})}function p_({hasChatroom:n}){return A.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-border bg-chatroom-bg-secondary p-6 text-center",role:"status",children:[A.jsx(Tw,{className:"size-8 text-chatroom-text-muted","aria-hidden":!0}),A.jsx("p",{className:"text-sm text-chatroom-text-secondary",children:n?"No logs in this time range":"Select a chatroom to view logs"}),n&&A.jsx("p",{className:"text-xs text-chatroom-text-muted",children:"Start an agent session to see output here"})]})}function g_({message:n}){return A.jsxs("div",{className:"flex min-h-[400px] flex-1 flex-col items-center justify-center gap-2 border border-chatroom-status-error/30 bg-chatroom-bg-secondary p-6 text-center",role:"alert",children:[A.jsx(xw,{className:"size-8 text-chatroom-status-error","aria-hidden":!0}),A.jsx("p",{className:"text-sm text-chatroom-status-error",children:"Failed to load logs"}),A.jsx("p",{className:"text-xs text-chatroom-text-muted",children:n})]})}function y_({line:n,chatroomName:i,selected:r,onSelect:o}){const c=$R(n.timestamp),d=!$h(n)||!n.source.startsWith("harness:"),m=()=>o==null?void 0:o(n);return A.jsxs("div",{className:un("flex gap-3 rounded-none px-1 py-1.5 -mx-1",o&&"cursor-pointer hover:bg-chatroom-bg-hover",r&&"bg-chatroom-bg-hover"),role:o?"button":void 0,tabIndex:o?0:void 0,onClick:o?m:void 0,onKeyDown:o?g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),m())}:void 0,children:[A.jsx("span",{className:"shrink-0 text-chatroom-text-muted",children:c}),A.jsx(GS,{level:n.level}),A.jsx(VS,{line:n,chatroomName:i}),d&&A.jsx("span",{className:"shrink-0 text-chatroom-text-muted",children:n.source}),A.jsx("span",{className:"min-w-0 flex-1 line-clamp-2",children:n.message})]})}function b_({lines:n,isLoading:i,error:r,hasChatroom:o,selectedLine:c,onSelectLine:f,getChatroomName:d}){const{scrollRef:m,isPinned:g,hasUnseenBelow:p,scrollToEnd:y,handleScroll:v}=LS(n.length);if(O.useEffect(()=>{g&&!i&&!r&&n.length>0&&y()},[n.length,g,i,r,y]),i)return A.jsx("div",{className:"min-h-[400px] flex-1 border border-chatroom-border bg-chatroom-bg-secondary",children:A.jsx(BS,{})});if(r)return A.jsx(g_,{message:r});if(n.length===0)return A.jsx(p_,{hasChatroom:o});const S=c?c.id??`${c.timestamp}-${c.message.slice(0,32)}`:null;return A.jsxs("div",{className:"relative min-h-[400px] flex-1",children:[A.jsx("div",{ref:m,onScroll:v,className:"h-full overflow-auto border border-chatroom-border bg-chatroom-bg-secondary p-3 font-mono text-xs",children:n.map((E,x)=>{var C;const w=E.id??`${E.timestamp}-${x}`,_=E.id??`${E.timestamp}-${E.message.slice(0,32)}`,D=(C=E.metadata)==null?void 0:C.chatroomId;return A.jsx(y_,{line:E,chatroomName:typeof D=="string"?d==null?void 0:d(D):void 0,selected:S===_,onSelect:f},w)})}),!g&&p&&A.jsxs("button",{type:"button",onClick:()=>y(),className:"absolute bottom-3 right-3 inline-flex items-center gap-1 rounded-md bg-chatroom-accent px-2 py-1 text-xs text-chatroom-text-on-accent shadow",children:[A.jsx(Jc,{className:"size-3"}),"Jump to new"]})]})}function mv(n,i){const r=Ic(i);return n.timestamp>=r.fromMs&&n.timestamp<=r.toMs&&em(n)===i.chatroomId&&(!i.role||YS(n)===i.role)&&(!i.harness||$h(n)===i.harness)}function v_(n){const i=n.chatroomId,[r,o]=O.useState([]),[c,f]=O.useState({roles:[],harnesses:[]}),[d,m]=O.useState(!1),[g,p]=O.useState(null);return O.useEffect(()=>{if(!i)return;let y=!0,v;return(async()=>{try{const S=await CR(i);if(!y)return;S.ok&&f(S.data);const E=Ic(n),x=await OR({chatroomId:i,role:n.role,harness:n.harness,fromTimestamp:E.fromMs,toTimestamp:E.toMs,limit:500});if(!x.ok)throw new Error(x.error.message);if(!y)return;o(x.data.entries.filter(w=>mv(w,n))),v=NR(w=>{mv(w,n)&&o(_=>[..._,w])})}catch(S){y&&p(S instanceof Error?S.message:"Failed to load logs")}finally{y&&m(!1)}})(),()=>{y=!1,v==null||v()}},[i,n]),{lines:i?r:[],dimensions:i?c:{roles:[],harnesses:[]},isLoading:i?d:!1,error:i?g:null}}function S_(n={}){return v_(n)}const x_=n=>n&&["1h","3h","1d","custom"].includes(n)?n:void 0;function pv(n){const i=new URLSearchParams(n.startsWith("?")?n.slice(1):n),r=x_(i.get("timeRange")),o=Number(i.get("from")),c=Number(i.get("to")),f=i.get("chatroomId"),d=i.get("role"),m=i.get("harness");return{...f?{chatroomId:f}:{},...d?{role:d}:{},...m?{harness:m}:{},...r?{timeRange:r}:{},...Number.isFinite(o)&&i.get("from")?{fromMs:o}:{},...Number.isFinite(c)&&i.get("to")?{toMs:c}:{}}}function E_(n){const i=new URLSearchParams;n.chatroomId&&i.set("chatroomId",n.chatroomId),n.role&&i.set("role",n.role),n.harness&&i.set("harness",n.harness);const r=n.timeRange??Wh;return i.set("timeRange",r),r==="custom"&&n.fromMs!==void 0&&n.toMs!==void 0&&(i.set("from",String(n.fromMs)),i.set("to",String(n.toMs))),i.toString()}function T_(n){const i=E_(n);window.history.replaceState(null,"",`${window.location.pathname}${i?`?${i}`:""}`)}function w_(){const[n,i]=O.useState(()=>pv(window.location.search)),r=O.useCallback(o=>{i(o),T_(o)},[]);return O.useEffect(()=>{const o=()=>i(pv(window.location.search));return window.addEventListener("popstate",o),()=>window.removeEventListener("popstate",o)},[]),{filters:n,setFilters:r}}function R_(){const{filters:n,setFilters:i}=w_(),[r,o]=O.useState(null),c=qS(),f=O.useMemo(()=>c.data??[],[c.data]),d=O.useMemo(()=>new Map(f.map(E=>[E.id,E.displayName])),[f]),{lines:m,dimensions:g,isLoading:p,error:y}=S_(n),v=E=>d.get(E),S=r?v(em(r)??""):void 0;return A.jsxs("section",{className:"flex min-h-0 flex-1 flex-col gap-3 p-6",children:[A.jsx(HS,{actions:A.jsx(m_,{chatrooms:f,chatroomsLoading:c.isLoading,chatroomsError:c.isError,roles:g.roles,harnesses:g.harnesses,values:n,onChange:i,disabled:p})}),A.jsxs("div",{className:"flex min-h-0 flex-1 gap-0",children:[A.jsx("div",{className:"flex min-w-0 flex-1 flex-col",children:A.jsx(b_,{lines:m,isLoading:p,error:y,hasChatroom:!!n.chatroomId,selectedLine:r,onSelectLine:o,getChatroomName:v},n.chatroomId??n.timeRange)}),r&&A.jsx(h_,{line:r,chatroomName:S,onClose:()=>o(null)})]})]})}function O_(){var o,c;const{activeTab:n,setActiveTab:i}=Aw(),r=DR();return A.jsx(uw,{header:A.jsx(Rw,{status:A.jsx(cw,{isLoading:r.isLoading,isError:r.isError,port:(o=r.data)==null?void 0:o.port,service:(c=r.data)==null?void 0:c.service})}),nav:A.jsxs(Ow,{children:[A.jsx(Eb,{active:n==="logs",onClick:()=>i("logs"),children:"Logs"}),A.jsx(Eb,{active:n==="event-stream",onClick:()=>i("event-stream"),children:"Event Stream"})]}),children:n==="logs"?A.jsx(R_,{}):A.jsx(f_,{})})}const C_=new j1({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),gv=document.getElementById("root");gv&&W1.createRoot(gv).render(A.jsx(O.StrictMode,{children:A.jsx(c1,{client:C_,children:A.jsx(O_,{})})}));