monoverse 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +34171 -439
- package/package.json +39 -91
- package/LICENCE +0 -1
- package/README.md +0 -18
- package/dist/assets/index-DIUWvkwu.css +0 -1
- package/dist/assets/index-UQPMV9jG.js +0 -161
- package/dist/assets/index.lazy-B2wDxrXt.js +0 -21
- package/dist/index.html +0 -14
- package/dist/vite.svg +0 -1
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
var Zc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var C=(e,t,n)=>(Zc(e,t,"read from private field"),n?n.call(e):t.get(e)),D=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},A=(e,t,n,r)=>(Zc(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var dl=(e,t,n,r)=>({set _(i){A(e,t,i,n)},get _(){return C(e,t,r)}}),Q=(e,t,n)=>(Zc(e,t,"access private method"),n);function Rb(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function fp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var dw={exports:{}},ac={},fw={exports:{}},te={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Xa=Symbol.for("react.element"),Tb=Symbol.for("react.portal"),kb=Symbol.for("react.fragment"),$b=Symbol.for("react.strict_mode"),Mb=Symbol.for("react.profiler"),Ob=Symbol.for("react.provider"),Ab=Symbol.for("react.context"),Ib=Symbol.for("react.forward_ref"),Db=Symbol.for("react.suspense"),Lb=Symbol.for("react.memo"),Fb=Symbol.for("react.lazy"),hg=Symbol.iterator;function Nb(e){return e===null||typeof e!="object"?null:(e=hg&&e[hg]||e["@@iterator"],typeof e=="function"?e:null)}var hw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pw=Object.assign,mw={};function ns(e,t,n){this.props=e,this.context=t,this.refs=mw,this.updater=n||hw}ns.prototype.isReactComponent={};ns.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ns.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function gw(){}gw.prototype=ns.prototype;function hp(e,t,n){this.props=e,this.context=t,this.refs=mw,this.updater=n||hw}var pp=hp.prototype=new gw;pp.constructor=hp;pw(pp,ns.prototype);pp.isPureReactComponent=!0;var pg=Array.isArray,vw=Object.prototype.hasOwnProperty,mp={current:null},yw={key:!0,ref:!0,__self:!0,__source:!0};function ww(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)vw.call(t,r)&&!yw.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),u=0;u<a;u++)l[u]=arguments[u+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return{$$typeof:Xa,type:e,key:o,ref:s,props:i,_owner:mp.current}}function jb(e,t){return{$$typeof:Xa,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function gp(e){return typeof e=="object"&&e!==null&&e.$$typeof===Xa}function Vb(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var mg=/\/+/g;function Yc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Vb(""+e.key):t.toString(36)}function Ul(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case Xa:case Tb:s=!0}}if(s)return s=e,i=i(s),e=r===""?"."+Yc(s,0):r,pg(i)?(n="",e!=null&&(n=e.replace(mg,"$&/")+"/"),Ul(i,t,n,"",function(u){return u})):i!=null&&(gp(i)&&(i=jb(i,n+(!i.key||s&&s.key===i.key?"":(""+i.key).replace(mg,"$&/")+"/")+e)),t.push(i)),1;if(s=0,r=r===""?".":r+":",pg(e))for(var a=0;a<e.length;a++){o=e[a];var l=r+Yc(o,a);s+=Ul(o,t,n,l,i)}else if(l=Nb(e),typeof l=="function")for(e=l.call(e),a=0;!(o=e.next()).done;)o=o.value,l=r+Yc(o,a++),s+=Ul(o,t,n,l,i);else if(o==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return s}function fl(e,t,n){if(e==null)return e;var r=[],i=0;return Ul(e,r,"","",function(o){return t.call(n,o,i++)}),r}function zb(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ot={current:null},Hl={transition:null},Bb={ReactCurrentDispatcher:ot,ReactCurrentBatchConfig:Hl,ReactCurrentOwner:mp};te.Children={map:fl,forEach:function(e,t,n){fl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return fl(e,function(){t++}),t},toArray:function(e){return fl(e,function(t){return t})||[]},only:function(e){if(!gp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};te.Component=ns;te.Fragment=kb;te.Profiler=Mb;te.PureComponent=hp;te.StrictMode=$b;te.Suspense=Db;te.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bb;te.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=pw({},e.props),i=e.key,o=e.ref,s=e._owner;if(t!=null){if(t.ref!==void 0&&(o=t.ref,s=mp.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)vw.call(t,l)&&!yw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var u=0;u<l;u++)a[u]=arguments[u+2];r.children=a}return{$$typeof:Xa,type:e.type,key:i,ref:o,props:r,_owner:s}};te.createContext=function(e){return e={$$typeof:Ab,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Ob,_context:e},e.Consumer=e};te.createElement=ww;te.createFactory=function(e){var t=ww.bind(null,e);return t.type=e,t};te.createRef=function(){return{current:null}};te.forwardRef=function(e){return{$$typeof:Ib,render:e}};te.isValidElement=gp;te.lazy=function(e){return{$$typeof:Fb,_payload:{_status:-1,_result:e},_init:zb}};te.memo=function(e,t){return{$$typeof:Lb,type:e,compare:t===void 0?null:t}};te.startTransition=function(e){var t=Hl.transition;Hl.transition={};try{e()}finally{Hl.transition=t}};te.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};te.useCallback=function(e,t){return ot.current.useCallback(e,t)};te.useContext=function(e){return ot.current.useContext(e)};te.useDebugValue=function(){};te.useDeferredValue=function(e){return ot.current.useDeferredValue(e)};te.useEffect=function(e,t){return ot.current.useEffect(e,t)};te.useId=function(){return ot.current.useId()};te.useImperativeHandle=function(e,t,n){return ot.current.useImperativeHandle(e,t,n)};te.useInsertionEffect=function(e,t){return ot.current.useInsertionEffect(e,t)};te.useLayoutEffect=function(e,t){return ot.current.useLayoutEffect(e,t)};te.useMemo=function(e,t){return ot.current.useMemo(e,t)};te.useReducer=function(e,t,n){return ot.current.useReducer(e,t,n)};te.useRef=function(e){return ot.current.useRef(e)};te.useState=function(e){return ot.current.useState(e)};te.useSyncExternalStore=function(e,t,n){return ot.current.useSyncExternalStore(e,t,n)};te.useTransition=function(){return ot.current.useTransition()};te.version="18.2.0";fw.exports=te;var w=fw.exports;const lc=fp(w),Ub=Rb({__proto__:null,default:lc},[w]);/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.production.min.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Hb=w,Gb=Symbol.for("react.element"),Wb=Symbol.for("react.fragment"),Qb=Object.prototype.hasOwnProperty,Kb=Hb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,qb={key:!0,ref:!0,__self:!0,__source:!0};function Sw(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)Qb.call(t,r)&&!qb.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:Gb,type:e,key:o,ref:s,props:i,_owner:Kb.current}}ac.Fragment=Wb;ac.jsx=Sw;ac.jsxs=Sw;dw.exports=ac;var P=dw.exports;const gg="pushstate",vg="popstate",xw="beforeunload",Cw=e=>(e.preventDefault(),e.returnValue=""),Zb=()=>{removeEventListener(xw,Cw,{capture:!0})};function _w(e){let t=e.getLocation();const n=new Set;let r=[];const i=()=>{t=e.getLocation(),n.forEach(s=>s())},o=async s=>{var a;if(typeof document<"u"&&r.length){for(const l of r)if(!await l()){(a=e.onBlocked)==null||a.call(e,i);return}}s()};return{get location(){return t},subscribe:s=>(n.add(s),()=>{n.delete(s)}),push:(s,a)=>{a=yg(a),o(()=>{e.pushState(s,a),i()})},replace:(s,a)=>{a=yg(a),o(()=>{e.replaceState(s,a),i()})},go:s=>{o(()=>{e.go(s),i()})},back:()=>{o(()=>{e.back(),i()})},forward:()=>{o(()=>{e.forward(),i()})},createHref:s=>e.createHref(s),block:s=>(r.push(s),r.length===1&&addEventListener(xw,Cw,{capture:!0}),()=>{r=r.filter(a=>a!==s),r.length||Zb()}),flush:()=>{var s;return(s=e.flush)==null?void 0:s.call(e)},destroy:()=>{var s;return(s=e.destroy)==null?void 0:s.call(e)},notify:i}}function yg(e){return e||(e={}),{...e,key:bw()}}function Yb(e){const t=(e==null?void 0:e.window)??(typeof document<"u"?window:void 0),n=(e==null?void 0:e.createHref)??(p=>p),r=(e==null?void 0:e.parseLocation)??(()=>gf(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));let i=r(),o;const s=()=>i;let a,l=!0,u;const c=p=>{l=!1,p(),l=!0},d=()=>{c(()=>{a&&(t.history[a.isPush?"pushState":"replaceState"](a.state,"",a.href),a=void 0,u=void 0,o=void 0)})},f=(p,v,y)=>{const x=n(v);u||(o=i),i=gf(v,y),a={href:x,state:y,isPush:(a==null?void 0:a.isPush)||p==="push"},u||(u=Promise.resolve().then(()=>d()))},h=()=>{i=r(),S.notify()},g=t.history.pushState,m=t.history.replaceState,S=_w({getLocation:s,pushState:(p,v)=>f("push",p,v),replaceState:(p,v)=>f("replace",p,v),back:()=>t.history.back(),forward:()=>t.history.forward(),go:p=>t.history.go(p),createHref:p=>n(p),flush:d,destroy:()=>{t.history.pushState=g,t.history.replaceState=m,t.removeEventListener(gg,h),t.removeEventListener(vg,h)},onBlocked:p=>{o&&i!==o&&(i=o,p())}});return t.addEventListener(gg,h),t.addEventListener(vg,h),t.history.pushState=function(...p){const v=g.apply(t.history,p);return l&&S.notify(),v},t.history.replaceState=function(...p){const v=m.apply(t.history,p);return l&&S.notify(),v},S}function Xb(e={initialEntries:["/"]}){const t=e.initialEntries;let n=e.initialIndex??t.length-1,r={key:bw()};return _w({getLocation:()=>gf(t[n],r),pushState:(o,s)=>{r=s,t.push(o),n++},replaceState:(o,s)=>{r=s,t[n]=o},back:()=>{n--},forward:()=>{n=Math.min(n+1,t.length-1)},go:o=>{n=Math.min(Math.max(n+o,0),t.length-1)},createHref:o=>o})}function gf(e,t){const n=e.indexOf("#"),r=e.indexOf("?");return{href:e,pathname:e.substring(0,n>0?r>0?Math.min(n,r):n:r>0?r:e.length),hash:n>-1?e.substring(n):"",search:r>-1?e.slice(r,n===-1?void 0:n):"",state:t||{}}}function bw(){return(Math.random()+1).toString(36).substring(7)}var Jb="Invariant failed";function je(e,t){if(!e)throw new Error(Jb)}var eP=!0;function Ei(e,t){if(!eP){if(e)return;var n="Warning: "+t;typeof console<"u"&&console.warn(n);try{throw Error(n)}catch{}}}const Xc=w.createContext(null);function Pw(){return typeof document>"u"?Xc:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Xc,Xc)}function Wr(e){const t=w.useContext(Pw());return Ei(!(((e==null?void 0:e.warn)??!0)&&!t),"useRouter must be used inside a <RouterProvider> component!"),t}var Ew={exports:{}},Rw={},Tw={exports:{}},kw={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* use-sync-external-store-shim.production.min.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var No=w;function tP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nP=typeof Object.is=="function"?Object.is:tP,rP=No.useState,iP=No.useEffect,oP=No.useLayoutEffect,sP=No.useDebugValue;function aP(e,t){var n=t(),r=rP({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return oP(function(){i.value=n,i.getSnapshot=t,Jc(i)&&o({inst:i})},[e,n,t]),iP(function(){return Jc(i)&&o({inst:i}),e(function(){Jc(i)&&o({inst:i})})},[e]),sP(n),n}function Jc(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nP(e,n)}catch{return!0}}function lP(e,t){return t()}var uP=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?lP:aP;kw.useSyncExternalStore=No.useSyncExternalStore!==void 0?No.useSyncExternalStore:uP;Tw.exports=kw;var cP=Tw.exports;/**
|
|
26
|
-
* @license React
|
|
27
|
-
* use-sync-external-store-shim/with-selector.production.min.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var uc=w,dP=cP;function fP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hP=typeof Object.is=="function"?Object.is:fP,pP=dP.useSyncExternalStore,mP=uc.useRef,gP=uc.useEffect,vP=uc.useMemo,yP=uc.useDebugValue;Rw.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=mP(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=vP(function(){function l(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&&s.hasValue){var g=s.value;if(i(g,h))return d=g}return d=h}if(g=d,hP(c,h))return g;var m=r(h);return i!==void 0&&i(g,m)?g:(c=h,d=m)}var u=!1,c,d,f=n===void 0?null:n;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,n,r,i]);var a=pP(e,o[0],o[1]);return gP(function(){s.hasValue=!0,s.value=a},[a]),yP(a),a};Ew.exports=Rw;var $w=Ew.exports;const wP=fp($w);var SP=class{constructor(e,t){this.listeners=new Set,this._batching=!1,this._flushing=0,this._nextPriority=null,this.subscribe=n=>{var i,o;this.listeners.add(n);const r=(o=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:o.call(i,n,this);return()=>{this.listeners.delete(n),r==null||r()}},this.setState=(n,r)=>{var s,a,l,u,c;const i=this.state;this.state=(s=this.options)!=null&&s.updateFn?this.options.updateFn(i)(n):n(i);const o=(r==null?void 0:r.priority)??((a=this.options)==null?void 0:a.defaultPriority)??"high";this._nextPriority===null?this._nextPriority=o:this._nextPriority==="high"?this._nextPriority=o:this._nextPriority=((l=this.options)==null?void 0:l.defaultPriority)??"high",(c=(u=this.options)==null?void 0:u.onUpdate)==null||c.call(u,{priority:this._nextPriority}),this._flush()},this._flush=()=>{if(this._batching)return;const n=++this._flushing;this.listeners.forEach(r=>{this._flushing===n&&r({priority:this._nextPriority??"high"})})},this.batch=n=>{if(this._batching)return n();this._batching=!0,n(),this._batching=!1,this._flush()},this.state=e,this.options=t}};function xP(e,t=n=>n){return $w.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,CP)}function CP(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}function vp(e){const t=e.errorComponent??cc;return P.jsx(_P,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?w.createElement(t,{error:n,reset:r}):e.children})}class _P extends w.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t){this.props.onCatch?this.props.onCatch(t):console.error(t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}}function cc({error:e}){const[t,n]=w.useState(!1);return P.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[P.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[P.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),P.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),P.jsx("div",{style:{height:".25rem"}}),t?P.jsx("div",{children:P.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?P.jsx("code",{children:e.message}):null})}):null]})}function xt(e){const t=Wr({warn:(e==null?void 0:e.router)===void 0});return xP(((e==null?void 0:e.router)||t).__store,e==null?void 0:e.select)}const Mw=typeof document>"u";function vf(e){return e[e.length-1]}function bP(e){return typeof e=="function"}function Qi(e,t){return bP(e)?e(t):e}function Ms(e,t){return t.reduce((n,r)=>(n[r]=e[r],n),{})}function tr(e,t){if(e===t)return e;const n=t,r=Sg(e)&&Sg(n);if(r||du(e)&&du(n)){const i=r?e:Object.keys(e),o=i.length,s=r?n:Object.keys(n),a=s.length,l=r?[]:{};let u=0;for(let c=0;c<a;c++){const d=r?c:s[c];!r&&e[d]===void 0&&n[d]===void 0&&i.includes(d)?(l[d]=void 0,u++):(l[d]=tr(e[d],n[d]),l[d]===e[d]&&e[d]!==void 0&&u++)}return o===a&&u===o?e:l}return n}function du(e){if(!wg(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!wg(n)||!n.hasOwnProperty("isPrototypeOf"))}function wg(e){return Object.prototype.toString.call(e)==="[object Object]"}function Sg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ks(e,t,n=!1){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(du(e)&&du(t)){const r=Object.keys(e),i=Object.keys(t);return!n&&r.length!==i.length?!1:!i.some(o=>!(o in e)||!Ks(e[o],t[o],n))}return Array.isArray(e)&&Array.isArray(t)?!e.some((r,i)=>!Ks(r,t[i],n)):!1}const ed=typeof window<"u"?w.useLayoutEffect:w.useEffect;function PP(e){return e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/"/g,'\\"')}function xg(e){return e.endsWith("/")&&e!=="/"?e.slice(0,-1):e}function EP(e,t){return xg(e)===xg(t)}function Rn(e){return!!(e!=null&&e.isNotFound)}function RP(e){const t=xt({select:n=>`not-found-${n.location.pathname}-${n.status}`});return P.jsx(vp,{getResetKey:()=>t,onCatch:n=>{var r;if(Rn(n))(r=e.onCatch)==null||r.call(e,n);else throw n},errorComponent:({error:n})=>{var r;return(r=e.fallback)==null?void 0:r.call(e,n)},children:e.children})}function TP(){return P.jsx("p",{children:"Not Found"})}function Ow(e){if(e.isRedirect=!0,e.statusCode=e.statusCode||e.code||301,e.headers=e.headers||{},e.throw)throw e;return e}function _n(e){return!!(e!=null&&e.isRedirect)}const dc=w.createContext(void 0);function Cg(){Wr();const e=xt({select:n=>{var r;return(r=_r(n)[0])==null?void 0:r.id}}),t=xt({select:n=>n.resolvedLocation.state.key});return P.jsx(dc.Provider,{value:e,children:P.jsx(vp,{getResetKey:()=>t,errorComponent:cc,onCatch:n=>{Ei(!1,"The following error wasn't caught by any route! 👇 At the very least, consider setting an 'errorComponent' in your RootRoute!"),console.error(n)},children:e?P.jsx(Aw,{matchId:e}):null})})}function td(e){return P.jsx(P.Fragment,{children:e.children})}function Aw({matchId:e}){var t,n,r,i;const o=Wr(),s=xt({select:S=>{var p;return(p=_r(S).find(v=>v.id===e))==null?void 0:p.routeId}});je(s);const a=o.routesById[s],l=a.options.pendingComponent??o.options.defaultPendingComponent,u=l?P.jsx(l,{}):null,c=a.options.errorComponent??o.options.defaultErrorComponent,d=a.isRoot?a.options.notFoundComponent??((t=o.options.notFoundRoute)==null?void 0:t.options.component):a.options.notFoundComponent,f=a.options.wrapInSuspense??l??((n=a.options.component)==null?void 0:n.preload)??((r=a.options.pendingComponent)==null?void 0:r.preload)??((i=a.options.errorComponent)==null?void 0:i.preload)?w.Suspense:td,h=c?vp:td,g=d?RP:td,m=xt({select:S=>S.resolvedLocation.state.key});return P.jsx(dc.Provider,{value:e,children:P.jsx(f,{fallback:u,children:P.jsx(h,{getResetKey:()=>m,errorComponent:c??cc,onCatch:S=>{if(Rn(S))throw S;Ei(!1,`Error in route match: ${e}`),console.error(S)},children:P.jsx(g,{fallback:S=>{if(!d||S.routeId&&S.routeId!==s||!S.routeId&&!a.isRoot)throw S;return w.createElement(d,S)},children:P.jsx(kP,{matchId:e,pendingElement:u})})})})})}function kP({matchId:e,pendingElement:t}){var n,r;const i=Wr(),o=xt({select:u=>{var c;return(c=_r(u).find(d=>d.id===e))==null?void 0:c.routeId}}),s=i.routesById[o],a=xt({select:u=>Ms(_r(u).find(c=>c.id===e),["status","error","showPending","loadPromise"])}),l=(s.options.errorComponent??i.options.defaultErrorComponent)||cc;if(a.status==="notFound"){let u;return _g(a.error)?u=(((n=i.options.errorSerializer)==null?void 0:n.deserialize)??bg)(a.error.data):u=a.error,je(Rn(u)),Iw(i,s,u)}if(a.status==="redirected")return je(_n(a.error)),Ei(!1,"Tried to render a redirected route match! This is a weird circumstance, please file an issue!"),null;if(a.status==="error"){if(Mw)return P.jsx(l,{error:a.error,info:{componentStack:""}});throw _g(a.error)?(((r=i.options.errorSerializer)==null?void 0:r.deserialize)??bg)(a.error.data):a.error}if(a.status==="pending"){if(a.showPending)return t;throw a.loadPromise}if(a.status==="success"){const u=s.options.component??i.options.defaultComponent;return u?P.jsx(u,{}):P.jsx(fc,{})}je(!1)}const fc=w.memo(function(){const t=Wr(),n=w.useContext(dc),r=xt({select:a=>{var l;return(l=_r(a).find(u=>u.id===n))==null?void 0:l.routeId}}),i=t.routesById[r],{parentGlobalNotFound:o}=xt({select:a=>{const u=_r(a).find(c=>c.id===n);return je(u),{parentGlobalNotFound:u.globalNotFound}}}),s=xt({select:a=>{var l;const u=_r(a),c=u.findIndex(d=>d.id===n);return(l=u[c+1])==null?void 0:l.id}});return o?Iw(t,i,void 0):s?P.jsx(Aw,{matchId:s}):null});function Iw(e,t,n){return t.options.notFoundComponent?P.jsx(t.options.notFoundComponent,{data:n}):e.options.defaultNotFoundComponent?P.jsx(e.options.defaultNotFoundComponent,{data:n}):P.jsx(TP,{})}function _r(e){var t;return(t=e.pendingMatches)!=null&&t.some(n=>n.showPending)?e.pendingMatches:e.matches}function zn(e){const t=w.useContext(dc);return xt({select:r=>{const i=_r(r).find(o=>e.from?e.from===o.routeId:o.id===t);return je(i,`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),e.select?e.select(i):i}})}function Dw(e){return zn({...e,select:t=>typeof e.select=="function"?e.select(t.loaderDeps):t.loaderDeps})}function Lw(e){return zn({...e,select:t=>typeof e.select=="function"?e.select(t.loaderData):t.loaderData})}function _g(e){return!(typeof e=="object"&&e&&"data"in e)||!("__isServerError"in e&&e.__isServerError)||!(typeof e.data=="object"&&e.data)?!1:e.__isServerError===!0}function bg(e){if("name"in e&&"message"in e){const t=new Error(e.message);return t.name=e.name,t}return e.data}function br(e){return hc(e.filter(Boolean).join("/"))}function hc(e){return e.replace(/\/{2,}/g,"/")}function yp(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Gl(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function $P(e){return Gl(yp(e))}function MP(e,t,n){t=t.replace(new RegExp(`^${e}`),"/"),n=n.replace(new RegExp(`^${e}`),"/");let r=jo(t);const i=jo(n);i.forEach((s,a)=>{var l;if(s.value==="/")a?a===i.length-1&&r.push(s):r=[s];else if(s.value==="..")r.length>1&&((l=vf(r))==null?void 0:l.value)==="/"&&r.pop(),r.pop();else{if(s.value===".")return;r.push(s)}});const o=br([e,...r.map(s=>s.value)]);return hc(o)}function jo(e){if(!e)return[];e=hc(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>r==="$"||r==="*"?{type:"wildcard",value:r}:r.charAt(0)==="$"?{type:"param",value:r}:{type:"pathname",value:r})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function nd({path:e,params:t,leaveWildcards:n,leaveParams:r}){const i=jo(e);return br(i.map(o=>{if(o.type==="wildcard"){const s=t._splat;return n?`${o.value}${s??""}`:s}if(o.type==="param"){if(r){const s=t[o.value];return`${o.value}${s??""}`}return t[o.value.substring(1)]??"undefined"}return o.value}))}function rd(e,t,n){const r=OP(e,t,n);if(!(n.to&&!r))return r??{}}function Pg(e,t){return e!="/"?t.replace(e,""):t}function OP(e,t,n){t=Pg(e,t);const r=Pg(e,`${n.to??"$"}`),i=jo(t),o=jo(r);t.startsWith("/")||i.unshift({type:"pathname",value:"/"}),r.startsWith("/")||o.unshift({type:"pathname",value:"/"});const s={};return(()=>{for(let l=0;l<Math.max(i.length,o.length);l++){const u=i[l],c=o[l],d=l>=i.length-1,f=l>=o.length-1;if(c){if(c.type==="wildcard"){if(u!=null&&u.value){const h=decodeURI(br(i.slice(l).map(g=>g.value)));return s["*"]=h,s._splat=h,!0}return!1}if(c.type==="pathname"){if(c.value==="/"&&!(u!=null&&u.value))return!0;if(u){if(n.caseSensitive){if(c.value!==u.value)return!1}else if(c.value.toLowerCase()!==u.value.toLowerCase())return!1}}if(!u)return!1;if(c.type==="param"){if(u.value==="/")return!1;u.value.charAt(0)!=="$"&&(s[c.value.substring(1)]=decodeURI(u.value))}}if(!d&&f)return s["**"]=br(i.slice(l+1).map(h=>h.value)),!!n.fuzzy&&(c==null?void 0:c.value)!=="/"}return!0})()?s:void 0}function Fw(e){return zn({...e,select:t=>e.select?e.select(t.params):t.params})}function Nw(e){return zn({...e,select:t=>e.select?e.select(t.search):t.search})}function jw(e){const t=Wr();return w.useCallback(n=>t.navigate({...n,from:n.to?t.state.resolvedLocation.pathname:void 0}),[t])}const At="__root__";let Vw=class{constructor(t){this.init=n=>{var r,i;this.originalIndex=n.originalIndex;const o=this.options,s=!(o!=null&&o.path)&&!(o!=null&&o.id);this.parentRoute=(i=(r=this.options)==null?void 0:r.getParentRoute)==null?void 0:i.call(r),s?this.path=At:je(this.parentRoute);let a=s?At:o.path;a&&a!=="/"&&(a=yp(a));const l=(o==null?void 0:o.id)||a;let u=s?At:br([this.parentRoute.id===At?"":this.parentRoute.id,l]);a===At&&(a="/"),u!==At&&(u=br(["/",u]));const c=u===At?"/":br([this.parentRoute.fullPath,a]);this.path=a,this.id=u,this.fullPath=c,this.to=c},this.addChildren=n=>(this.children=n,this),this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.useMatch=n=>zn({...n,from:this.id}),this.useRouteContext=n=>zn({...n,from:this.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Nw({...n,from:this.id}),this.useParams=n=>Fw({...n,from:this.id}),this.useLoaderDeps=n=>Dw({...n,from:this.id}),this.useLoaderData=n=>Lw({...n,from:this.id}),this.useNavigate=()=>jw({from:this.id}),this.options=t||{},this.isRoot=!(t!=null&&t.getParentRoute),je(!(t!=null&&t.id&&(t!=null&&t.path))),this.$$typeof=Symbol.for("react.memo")}};function AP(e){return new Vw(e)}class IP extends Vw{constructor(t){super(t)}}function DP(e){return new IP(e)}function LP(e,t){let n,r,i,o="";for(n in e)if((i=e[n])!==void 0)if(Array.isArray(i))for(r=0;r<i.length;r++)o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(i[r]);else o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(i);return(t||"")+o}function Eg(e){if(!e)return"";const t=decodeURIComponent(e);return t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t}function FP(e,t){let n,r;const i={},o=(t?e.substr(t.length):e).split("&");for(;n=o.shift();){const s=n.indexOf("=");if(s!==-1){r=n.slice(0,s);const a=n.slice(s+1);i[r]!==void 0?i[r]=[].concat(i[r],Eg(a)):i[r]=Eg(a)}else r=n,i[r]=""}return i}const NP=VP(JSON.parse),jP=zP(JSON.stringify,JSON.parse);function VP(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));const n=FP(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function zP(e,t){function n(r){if(typeof r=="object"&&r!==null)try{return e(r)}catch{}else if(typeof r=="string"&&typeof t=="function")try{return t(r),e(r)}catch{}return r}return r=>{r={...r},Object.keys(r).forEach(o=>{const s=r[o];typeof s>"u"||s===void 0?delete r[o]:r[o]=n(s)});const i=LP(r).toString();return i?`?${i}`:""}}const BP=w.useTransition||(()=>[!1,e=>{e()}]);function UP({router:e,...t}){e.update({...e.options,...t,context:{...e.options.context,...t.context}});const n=e.options.InnerWrap?P.jsx(e.options.InnerWrap,{children:P.jsx(Cg,{})}):P.jsx(Cg,{}),r=Pw(),i=P.jsxs(r.Provider,{value:e,children:[n,P.jsx(HP,{})]});return e.options.Wrap?P.jsx(e.options.Wrap,{children:i}):i}function HP(){const e=Wr(),t=w.useRef({router:e,mounted:!1}),n=xt({select:s=>Ms(s,["isLoading","location","resolvedLocation","isTransitioning"])}),[r,i]=BP();e.startReactTransition=i,w.useEffect(()=>{r&&e.__store.setState(s=>({...s,isTransitioning:r}))},[r,e]);const o=()=>{(a=>{n.isTransitioning?a():i(()=>a())})(()=>{try{e.load()}catch(a){console.error(a)}})};return ed(()=>{const s=e.history.subscribe(()=>{e.latestLocation=e.parseLocation(e.latestLocation),e.state.location!==e.latestLocation&&o()}),a=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0});return n.location.href!==a.href&&e.commitLocation({...a,replace:!0}),()=>{s()}},[e,e.history]),ed(()=>{if(w.useTransition?n.isTransitioning&&!r:!n.isLoading&&n.resolvedLocation!==n.location){if(e.emit({type:"onResolved",fromLocation:n.resolvedLocation,toLocation:n.location,pathChanged:n.location.href!==n.resolvedLocation.href}),document.querySelector&&n.location.hash!==""){const s=document.getElementById(n.location.hash);s&&s.scrollIntoView()}e.__store.setState(s=>({...s,isTransitioning:!1,resolvedLocation:s.location}))}},[n.isTransitioning,r,n.isLoading,n.resolvedLocation,n.location,e]),ed(()=>{window.__TSR_DEHYDRATED__||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},o())},[e]),null}function id(e,t){return[...e.cachedMatches,...e.pendingMatches??[],...e.matches].find(n=>n.id===t)}const GP=["component","errorComponent","pendingComponent","notFoundComponent"];function WP(e){return new QP(e)}class QP{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.navigateTimeout=null,this.latestLoadPromise=Promise.resolve(),this.subscribers=new Set,this.injectedHtml=[],this.startReactTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/guide/not-found-errors#migrating-from-notfoundroute for more info.");const r=this.options;this.options={...this.options,...n},(!this.basepath||n.basepath&&n.basepath!==r.basepath)&&(n.basepath===void 0||n.basepath===""||n.basepath==="/"?this.basepath="/":this.basepath=`/${$P(n.basepath)}`),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history??(typeof document<"u"?Yb():Xb({initialEntries:[this.options.basepath||"/"]})),this.latestLocation=this.parseLocation()),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),this.__store||(this.__store=new SP(ZP(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,status:this.state.isTransitioning||this.state.isLoading?"pending":"idle",cachedMatches:this.state.cachedMatches.filter(i=>!["redirected"].includes(i.status))}}}))},this.buildRouteTree=()=>{this.routesById={},this.routesByPath={};const n=this.options.notFoundRoute;n&&(n.init({originalIndex:99999999999}),this.routesById[n.id]=n);const r=s=>{s.forEach((a,l)=>{a.init({originalIndex:l});const u=this.routesById[a.id];if(je(!u,`Duplicate routes found with id: ${String(a.id)}`),this.routesById[a.id]=a,!a.isRoot&&a.path){const d=Gl(a.fullPath);(!this.routesByPath[d]||a.fullPath.endsWith("/"))&&(this.routesByPath[d]=a)}const c=a.children;c!=null&&c.length&&r(c)})};r([this.routeTree]);const i=[];Object.values(this.routesById).forEach((s,a)=>{var l;if(s.isRoot||!s.path)return;const u=yp(s.fullPath),c=jo(u);for(;c.length>1&&((l=c[0])==null?void 0:l.value)==="/";)c.shift();const d=c.map(f=>f.value==="/"?.75:f.type==="param"?.5:f.type==="wildcard"?.25:1);i.push({child:s,trimmed:u,parsed:c,index:a,scores:d})}),this.flatRoutes=i.sort((s,a)=>{const l=Math.min(s.scores.length,a.scores.length);for(let u=0;u<l;u++)if(s.scores[u]!==a.scores[u])return a.scores[u]-s.scores[u];if(s.scores.length!==a.scores.length)return a.scores.length-s.scores.length;for(let u=0;u<l;u++)if(s.parsed[u].value!==a.parsed[u].value)return s.parsed[u].value>a.parsed[u].value?1:-1;return s.index-a.index}).map((s,a)=>(s.child.rank=a,s.child))},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.checkLatest=n=>this.latestLoadPromise!==n?this.latestLoadPromise:void 0,this.parseLocation=n=>{const r=({pathname:a,search:l,hash:u,state:c})=>{const d=this.options.parseSearch(l),f=this.options.stringifySearch(d);return{pathname:a,searchStr:f,search:tr(n==null?void 0:n.search,d),hash:u.split("#").reverse()[0]??"",href:`${a}${f}${u}`,state:tr(n==null?void 0:n.state,c)}},i=r(this.history.location),{__tempLocation:o,__tempKey:s}=i.state;if(o&&(!s||s===this.tempLocationKey)){const a=r(o);return a.state.key=i.state.key,delete a.state.__tempLocation,{...a,maskedLocation:i}}return i},this.resolvePathWithBase=(n,r)=>MP(this.basepath,n,hc(r)),this.matchRoutes=(n,r,i)=>{let o={};const s=this.flatRoutes.find(h=>{const g=rd(this.basepath,Gl(n),{to:h.fullPath,caseSensitive:h.options.caseSensitive??this.options.caseSensitive,fuzzy:!0});return g?(o=g,!0):!1});let a=s||this.routesById[At];const l=[a];let u=!1;for((s?s.path!=="/"&&o["**"]:Gl(n))&&(this.options.notFoundRoute?l.push(this.options.notFoundRoute):u=!0);a.parentRoute;)a=a.parentRoute,l.unshift(a);const c=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let h=l.length-1;h>=0;h--){const g=l[h];if(g.children)return g.id}return At}})(),d=l.map(h=>{let g;if(h.options.parseParams)try{const m=h.options.parseParams(o);Object.assign(o,m)}catch(m){if(g=new qP(m.message,{cause:m}),i!=null&&i.throwOnError)throw g;return g}}),f=[];return l.forEach((h,g)=>{var m,S,p,v,y,x;const _=f[g-1],[E,R]=(()=>{const J=(_==null?void 0:_.search)??r;try{const re=typeof h.options.validateSearch=="object"?h.options.validateSearch.parse:h.options.validateSearch,q=(re==null?void 0:re(J))??{};return[{...J,...q},void 0]}catch(re){const q=new KP(re.message,{cause:re});if(i!=null&&i.throwOnError)throw q;return[J,q]}})(),b=((S=(m=h.options).loaderDeps)==null?void 0:S.call(m,{search:E}))??"",T=b?JSON.stringify(b):"",k=nd({path:h.fullPath,params:o}),I=nd({path:h.id,params:o,leaveWildcards:!0})+T,L=id(this.state,I),ie=this.state.matches.find(J=>J.id===I)?"stay":"enter",ne=L?{...L,cause:ie,params:o}:{id:I,routeId:h.id,params:o,pathname:br([this.basepath,k]),updatedAt:Date.now(),search:{},searchError:void 0,status:"pending",showPending:!1,isFetching:!1,error:void 0,paramsError:d[g],loadPromise:Promise.resolve(),routeContext:void 0,context:void 0,abortController:new AbortController,fetchCount:0,cause:ie,loaderDeps:b,invalid:!1,preload:!1,links:(v=(p=h.options).links)==null?void 0:v.call(p),scripts:(x=(y=h.options).scripts)==null?void 0:x.call(y),staticData:h.options.staticData||{}};i!=null&&i.preload||(ne.globalNotFound=c===h.id),ne.search=tr(ne.search,E),ne.searchError=R,f.push(ne)}),f},this.cancelMatch=n=>{var r;(r=id(this.state,n))==null||r.abortController.abort()},this.cancelMatches=()=>{var n;(n=this.state.pendingMatches)==null||n.forEach(r=>{this.cancelMatch(r.id)})},this.buildLocation=n=>{const r=(o={},s)=>{var a,l,u;const c=this.state.pendingMatches||this.state.matches,d=((a=c[c.length-1])==null?void 0:a.search)||this.latestLocation.search,f=this.matchRoutes(this.latestLocation.pathname,d),h=s==null?void 0:s.filter(L=>f.find(ie=>ie.routeId===L.routeId)),g=this.looseRoutesById[(l=vf(f))==null?void 0:l.routeId];let m=o.to?this.resolvePathWithBase(o.from??this.latestLocation.pathname,`${o.to}`):this.resolvePathWithBase(g==null?void 0:g.fullPath,g==null?void 0:g.fullPath);const S={...(u=vf(f))==null?void 0:u.params};let p=(o.params??!0)===!0?S:{...S,...Qi(o.params,S)};Object.keys(p).length>0&&(s==null||s.map(L=>this.looseRoutesById[L.routeId].options.stringifyParams).filter(Boolean).forEach(L=>{p={...p,...L(p)}})),m=nd({path:m,params:p??{},leaveWildcards:!1,leaveParams:n.leaveParams});const v=(h==null?void 0:h.map(L=>this.looseRoutesById[L.routeId].options.preSearchFilters??[]).flat().filter(Boolean))??[],y=(h==null?void 0:h.map(L=>this.looseRoutesById[L.routeId].options.postSearchFilters??[]).flat().filter(Boolean))??[],x=v.length?v.reduce((L,ie)=>ie(L),d):d,_=o.search===!0?x:o.search?Qi(o.search,x):v.length?x:{},E=y.length?y.reduce((L,ie)=>ie(L),_):_,R=tr(d,E),b=this.options.stringifySearch(R),T=o.hash===!0?this.latestLocation.hash:o.hash?Qi(o.hash,this.latestLocation.hash):void 0,k=T?`#${T}`:"";let I=o.state===!0?this.latestLocation.state:o.state?Qi(o.state,this.latestLocation.state):{};return I=tr(this.latestLocation.state,I),{pathname:m,search:R,searchStr:b,state:I,hash:T??"",href:`${m}${b}${k}`,unmaskOnReload:o.unmaskOnReload}},i=(o={},s)=>{var a;const l=r(o);let u=s?r(s):void 0;if(!u){let g={};const m=(a=this.options.routeMasks)==null?void 0:a.find(S=>{const p=rd(this.basepath,l.pathname,{to:S.from,caseSensitive:!1,fuzzy:!1});return p?(g=p,!0):!1});m&&(s={...Ms(n,["from"]),...m,params:g},u=r(s))}const c=this.matchRoutes(l.pathname,l.search),d=u?this.matchRoutes(u.pathname,u.search):void 0,f=u?r(s,d):void 0,h=r(o,c);return f&&(h.maskedLocation=f),h};return n.mask?i(n,{...Ms(n,["from"]),...n.mask}):i(n)},this.commitLocation=async({startTransition:n,...r})=>{if(this.navigateTimeout&&clearTimeout(this.navigateTimeout),!(this.latestLocation.href===r.href)){let{maskedLocation:o,...s}=r;o&&(s={...o,state:{...o.state,__tempKey:void 0,__tempLocation:{...s,search:s.searchStr,state:{...s.state,__tempKey:void 0,__tempLocation:void 0,key:void 0}}}},(s.unmaskOnReload??this.options.unmaskOnReload??!1)&&(s.state.__tempKey=this.tempLocationKey));const a=()=>{this.history[r.replace?"replace":"push"](s.href,s.state)};n??!0?this.startReactTransition(a):a()}return this.resetNextScroll=r.resetScroll??!0,this.latestLoadPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,startTransition:i,...o}={})=>{const s=this.buildLocation(o);return this.commitLocation({...s,startTransition:i,replace:n,resetScroll:r})},this.navigate=({from:n,to:r,...i})=>{const o=String(r);let s;try{new URL(`${o}`),s=!0}catch{}return je(!s),this.buildAndCommitLocation({...i,from:n,to:r})},this.loadMatches=async({checkLatest:n,location:r,matches:i,preload:o})=>{var s,a;let l,u;const c=(g,m)=>{var S;const p=(S=this.state.pendingMatches)==null?void 0:S.find(x=>x.id===g.id),v=this.state.matches.find(x=>x.id===g.id),y=p?"pendingMatches":v?"matches":"cachedMatches";this.__store.setState(x=>{var _,E;return{...x,[y]:m!=null&&m.remove?(_=x[y])==null?void 0:_.filter(R=>R.id!==g.id):(E=x[y])==null?void 0:E.map(R=>R.id===g.id?g:R)}})},d=(g,m)=>{throw g={...g,status:_n(m)?"redirected":Rn(m)?"notFound":"error",isFetching:!1,error:m},c(g),m.routeId||(m.routeId=g.routeId),m};for(let[g,m]of i.entries()){const S=i[g-1],p=this.looseRoutesById[m.routeId],v=new AbortController,y=(x,_)=>{var E,R;x.routerCode=_,u=u??g,(_n(x)||Rn(x))&&d(m,x);try{(R=(E=p.options).onError)==null||R.call(E,x)}catch(b){x=b,(_n(x)||Rn(x))&&d(m,b)}i[g]=m={...m,error:x,status:"error",updatedAt:Date.now(),abortController:new AbortController}};m.paramsError&&y(m.paramsError,"PARSE_PARAMS"),m.searchError&&y(m.searchError,"VALIDATE_SEARCH");try{const x=(S==null?void 0:S.context)??this.options.context??{},_=p.options.pendingMs??this.options.defaultPendingMs,E=typeof _=="number"&&_<=0?Promise.resolve():new Promise(T=>setTimeout(T,_)),R=await((a=(s=p.options).beforeLoad)==null?void 0:a.call(s,{search:m.search,abortController:v,params:m.params,preload:!!o,context:x,location:r,navigate:T=>this.navigate({...T,from:m.pathname}),buildLocation:this.buildLocation,cause:o?"preload":m.cause}))??{};(_n(R)||Rn(R))&&y(R,"BEFORE_LOAD");const b={...x,...R};i[g]=m={...m,routeContext:tr(m.routeContext,R),context:tr(m.context,b),abortController:v,pendingPromise:E}}catch(x){y(x,"BEFORE_LOAD");break}}const f=i.slice(0,u),h=[];return f.forEach((g,m)=>{h.push(new Promise(async(S,p)=>{var v;const y=h[m-1],x=this.looseRoutesById[g.routeId],_=q=>{(_n(q)||Rn(q))&&d(g,q)};let E;i[m]=g={...g,showPending:!1};let R=!1;const b=x.options.pendingMs??this.options.defaultPendingMs,T=x.options.pendingMinMs??this.options.defaultPendingMinMs,k={params:g.params,deps:g.loaderDeps,preload:!!o,parentMatchPromise:y,abortController:g.abortController,context:g.context,location:r,navigate:q=>this.navigate({...q,from:g.pathname}),cause:o?"preload":g.cause,route:x},I=async()=>{var q,O,V,W,se,ce,xn,Ue,nn,at;try{if(g.isFetching)E=(q=id(this.state,g.id))==null?void 0:q.loadPromise;else{i[m]=g={...g,isFetching:!0,fetchCount:g.fetchCount+1};const Ae=((O=x.lazyFn)==null?void 0:O.call(x).then(Jr=>{Object.assign(x.options,Jr.options)}))||Promise.resolve(),cl=Ae.then(()=>Promise.all(GP.map(async Jr=>{const us=x.options[Jr];us!=null&&us.preload&&await us.preload()}))),qc=(W=(V=x.options).loader)==null?void 0:W.call(V,k);E=Promise.all([cl,qc,Ae]).then(Jr=>Jr[1])}i[m]=g={...g,loadPromise:E},c(g);const He=await E;if(l=n())return await l;if(_(He),R&&T&&await new Promise(Ae=>setTimeout(Ae,T)),l=n())return await l;const[Xr,he]=await Promise.all([(ce=(se=x.options).meta)==null?void 0:ce.call(se,{params:g.params,loaderData:He}),(Ue=(xn=x.options).headers)==null?void 0:Ue.call(xn,{loaderData:He})]);i[m]=g={...g,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),loaderData:He,loadPromise:void 0,meta:Xr,headers:he}}catch(He){let Xr=He;if(l=n())return await l;_(He);try{(at=(nn=x.options).onError)==null||at.call(nn,He)}catch(he){Xr=he,_(he)}i[m]=g={...g,error:Xr,status:"error",isFetching:!1}}c(g)},L=Date.now()-g.updatedAt,ie=o?x.options.preloadStaleTime??this.options.defaultPreloadStaleTime??3e4:x.options.staleTime??this.options.defaultStaleTime??0,ne=x.options.shouldReload,J=typeof ne=="function"?ne(k):ne;if(i[m]=g={...g,preload:!!o&&!this.state.matches.find(q=>q.id===g.id)},g.status==="success"&&(g.invalid||(J??L>ie)))return(async()=>{try{await I()}catch(q){console.info("Background Fetching Error",q),_n(q)&&((this.state.pendingMatches||this.state.matches).find(O=>O.id===g.id),_(q),je(!1))}})(),S();const re=!o&&x.options.loader&&typeof b=="number"&&(x.options.pendingComponent??this.options.defaultPendingComponent);if(g.status!=="success")try{re&&((v=g.pendingPromise)==null||v.then(async()=>{if(l=n())return l;R=!0,i[m]=g={...g,showPending:!0},c(g),S()})),await I()}catch(q){p(q)}S()}))}),await Promise.all(h),i},this.invalidate=()=>{const n=r=>({...r,invalid:!0,...r.status==="error"?{status:"pending"}:{}});return this.__store.setState(r=>{var i;return{...r,matches:r.matches.map(n),cachedMatches:r.cachedMatches.map(n),pendingMatches:(i=r.pendingMatches)==null?void 0:i.map(n)}}),this.load()},this.load=async()=>{const n=new Promise(async(r,i)=>{const o=this.latestLocation,s=this.state.resolvedLocation,a=s.href!==o.href;let l;this.cancelMatches(),this.emit({type:"onBeforeLoad",fromLocation:s,toLocation:o,pathChanged:a});let u;const c=this.state.matches;this.__store.batch(()=>{this.cleanCache(),u=this.matchRoutes(o.pathname,o.search,{debug:!0}),this.__store.setState(d=>({...d,isLoading:!0,location:o,pendingMatches:u,cachedMatches:d.cachedMatches.filter(f=>!u.find(h=>h.id===f.id))}))});try{let d,f;try{await this.loadMatches({matches:u,location:o,checkLatest:()=>this.checkLatest(n)})}catch(S){_n(S)?(d=this.resolveRedirect(S),Mw||this.navigate({...d,replace:!0})):Rn(S)&&(f=S,this.handleNotFound(u,S))}if(l=this.checkLatest(n))return l;const h=c.filter(S=>!u.find(p=>p.id===S.id)),g=u.filter(S=>!c.find(p=>p.id===S.id)),m=c.filter(S=>u.find(p=>p.id===S.id));this.__store.batch(()=>{this.__store.setState(S=>({...S,isLoading:!1,matches:S.pendingMatches,pendingMatches:void 0,cachedMatches:[...S.cachedMatches,...h.filter(p=>p.status!=="error")],statusCode:d!=null&&d.statusCode||f?404:S.matches.some(p=>p.status==="error")?500:200,redirect:d})),this.cleanCache()}),[[h,"onLeave"],[g,"onEnter"],[m,"onStay"]].forEach(([S,p])=>{S.forEach(v=>{var y,x;(x=(y=this.looseRoutesById[v.routeId].options)[p])==null||x.call(y,v)})}),this.emit({type:"onLoad",fromLocation:s,toLocation:o,pathChanged:a}),r()}catch(d){if(l=this.checkLatest(n))return l;console.log("Load Error",d),i(d)}});return this.latestLoadPromise=n,this.latestLoadPromise},this.resolveRedirect=n=>{const r=n;return r.href||(r.href=this.buildLocation(r).href),r},this.cleanCache=()=>{this.__store.setState(n=>({...n,cachedMatches:n.cachedMatches.filter(r=>{const i=this.looseRoutesById[r.routeId];if(!i.options.loader)return!1;const o=(r.preload?i.options.preloadGcTime??this.options.defaultPreloadGcTime:i.options.gcTime??this.options.defaultGcTime)??5*60*1e3;return r.status!=="error"&&Date.now()-r.updatedAt<o})}))},this.preloadRoute=async n=>{const r=this.buildLocation(n);let i=this.matchRoutes(r.pathname,r.search,{throwOnError:!0,preload:!0});const o=Object.fromEntries([...this.state.matches,...this.state.pendingMatches??[],...this.state.cachedMatches].map(s=>[s.id,!0]));this.__store.batch(()=>{i.forEach(s=>{o[s.id]||this.__store.setState(a=>({...a,cachedMatches:[...a.cachedMatches,s]}))})});try{return i=await this.loadMatches({matches:i,location:r,preload:!0,checkLatest:()=>{}}),i}catch(s){if(_n(s))return await this.preloadRoute(s);console.error(s);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r!=null&&r.pending&&this.state.status!=="pending")return!1;const s=r!=null&&r.pending?this.latestLocation:this.state.resolvedLocation,a=rd(this.basepath,s.pathname,{...r,to:o.pathname});return!a||n.params&&!Ks(a,n.params,!0)?!1:a&&((r==null?void 0:r.includeSearch)??!0)?Ks(s.search,o.search,!0)?a:!1:a},this.injectHtml=async n=>{this.injectedHtml.push(n)},this.registeredDeferredsIds=new Map,this.registeredDeferreds=new WeakMap,this.getDeferred=n=>{const r=this.registeredDeferredsIds.get(n);if(r)return this.registeredDeferreds.get(r)},this.dehydrateData=(n,r)=>{if(Ei(!1,"The dehydrateData method is deprecated. Please use the injectHtml method to inject your own data."),typeof document>"u"){const i=typeof n=="string"?n:JSON.stringify(n);return this.injectHtml(async()=>{const o=`__TSR_DEHYDRATED__${i}`,s=typeof r=="function"?await r():r;return`<script id='${o}' suppressHydrationWarning>
|
|
34
|
-
window["__TSR_DEHYDRATED__${PP(i)}"] = ${JSON.stringify(this.options.transformer.stringify(s))}
|
|
35
|
-
<\/script>`}),()=>this.hydrateData(n)}return()=>{}},this.hydrateData=n=>{if(Ei(!1,"The hydrateData method is deprecated. Please use the extractHtml method to extract your own data."),typeof document<"u"){const r=typeof n=="string"?n:JSON.stringify(n);return this.options.transformer.parse(window[`__TSR_DEHYDRATED__${r}`])}},this.dehydrate=()=>{var n;const r=((n=this.options.errorSerializer)==null?void 0:n.serialize)??YP;return{state:{dehydratedMatches:this.state.matches.map(i=>({...Ms(i,["id","status","updatedAt","loaderData"]),error:i.error?{data:r(i.error),__isServerError:!0}:void 0}))}}},this.hydrate=async n=>{var r,i,o;let s=n;typeof document<"u"&&(s=(r=window.__TSR_DEHYDRATED__)==null?void 0:r.data),je(s);const a=this.options.transformer.parse(s);this.dehydratedData=a.payload,(o=(i=this.options).hydrate)==null||o.call(i,a.payload);const l=a.router.state,u=this.matchRoutes(this.state.location.pathname,this.state.location.search).map(c=>{var d,f,h,g,m,S;const p=l.dehydratedMatches.find(x=>x.id===c.id);je(p,`Could not find a client-side match for dehydrated match with id: ${c.id}!`);const v=this.looseRoutesById[c.routeId],y=p.status==="notFound"||p.status==="redirected"?{}:{meta:(f=(d=v.options).meta)==null?void 0:f.call(d,{params:c.params,loaderData:p.loaderData}),links:(g=(h=v.options).links)==null?void 0:g.call(h),scripts:(S=(m=v.options).scripts)==null?void 0:S.call(m)};return{...c,...p,...y}});this.__store.setState(c=>({...c,matches:u,lastUpdated:Date.now()}))},this.handleNotFound=(n,r)=>{const i=Object.fromEntries(n.map(a=>[a.routeId,a]));let o=(r.global?this.looseRoutesById[At]:this.looseRoutesById[r.routeId])||this.looseRoutesById[At];for(;!o.options.notFoundComponent&&!this.options.defaultNotFoundComponent&&o.id!==At;)o=o.parentRoute,je(o);const s=i[o.id];je(s,"Could not find match for route: "+o.id),Object.assign(s,{status:"notFound",error:r,isFetching:!1})},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,stringifySearch:t.stringifySearch??jP,parseSearch:t.parseSearch??NP,transformer:t.transformer??JSON}),typeof document<"u"&&(window.__TSR__ROUTER__=this)}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}}class KP extends Error{}class qP extends Error{}function ZP(e){return{isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:{...e},location:e,matches:[],pendingMatches:[],cachedMatches:[],lastUpdated:0,statusCode:200}}function YP(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Ja(e){return new XP(e,{silent:!0}).createRoute}class XP{constructor(t,n){this.path=t,this.createRoute=r=>{Ei(this.silent,"FileRoute is deprecated and will be removed in the next major version. Use the createFileRoute(path)(options) function instead.");const i=AP(r);return i.isRoot=!1,i},this.silent=n==null?void 0:n.silent}}class JP{constructor(t){this.useMatch=n=>zn({select:n==null?void 0:n.select,from:this.options.id}),this.useRouteContext=n=>zn({from:this.options.id,select:r=>n!=null&&n.select?n.select(r.context):r.context}),this.useSearch=n=>Nw({...n,from:this.options.id}),this.useParams=n=>Fw({...n,from:this.options.id}),this.useLoaderDeps=n=>Dw({...n,from:this.options.id}),this.useLoaderData=n=>Lw({...n,from:this.options.id}),this.useNavigate=()=>jw({from:this.options.id}),this.options=t,this.$$typeof=Symbol.for("react.memo")}}function $j(e){const t=tE(e);return n=>new JP({id:t,...n})}const eE=/\(.+\)/g;function tE(e){return e.replaceAll(eE,"").replaceAll("//","/")}const nE="Error preloading route! ☝️";function rE(e){const t=Wr(),n=zn({strict:!1,select:he=>he.pathname}),{activeProps:r=()=>({className:"active"}),inactiveProps:i=()=>({}),activeOptions:o,hash:s,search:a,params:l,to:u,state:c,mask:d,preload:f,preloadDelay:h,replace:g,startTransition:m,resetScroll:S,children:p,target:v,disabled:y,style:x,className:_,onClick:E,onFocus:R,onMouseEnter:b,onMouseLeave:T,onTouchStart:k,...I}=e,L={...e.to&&{from:n},...e};let ie="internal";try{new URL(`${u}`),ie="external"}catch{}const ne=t.buildLocation(L),J=f??t.options.defaultPreload,re=h??t.options.defaultPreloadDelay??0,q=xt({select:he=>{const Ae=he.location.pathname.split("/"),qc=ne.pathname.split("/").every((Pb,Eb)=>Pb===Ae[Eb]),Jr=o!=null&&o.exact?EP(he.location.pathname,ne.pathname):qc,us=o!=null&&o.includeHash?he.location.hash===ne.hash:!0,bb=(o==null?void 0:o.includeSearch)??!0?Ks(he.location.search,ne.search,!(o!=null&&o.exact)):!0;return Jr&&us&&bb}});if(ie==="external")return{...I,type:ie,href:u,...p&&{children:p},...v&&{target:v},...y&&{disabled:y},...x&&{style:x},..._&&{className:_},...E&&{onClick:E},...R&&{onFocus:R},...b&&{onMouseEnter:b},...T&&{onMouseLeave:T},...k&&{onTouchStart:k}};const O=he=>{!y&&!iE(he)&&!he.defaultPrevented&&(!v||v==="_self")&&he.button===0&&(he.preventDefault(),t.commitLocation({...ne,replace:g,resetScroll:S,startTransition:m}))},V=()=>{w.startTransition(()=>{t.preloadRoute(L).catch(he=>{console.warn(he),console.warn(nE)})})},W=he=>{y||J&&V()},se=W,ce=he=>{if(y)return;const Ae=he.target||{};if(J){if(Ae.preloadTimeout)return;Ae.preloadTimeout=setTimeout(()=>{Ae.preloadTimeout=null,V()},re)}},xn=he=>{if(y)return;const Ae=he.target||{};Ae.preloadTimeout&&(clearTimeout(Ae.preloadTimeout),Ae.preloadTimeout=null)},Ue=he=>Ae=>{Ae.persist(),he.filter(Boolean).forEach(cl=>{Ae.defaultPrevented||cl(Ae)})},nn=q?Qi(r,{})??{}:{},at=q?{}:Qi(i,{}),He=[_,nn.className,at.className].filter(Boolean).join(" "),Xr={...x,...nn.style,...at.style};return{...nn,...at,...I,href:y?void 0:ne.maskedLocation?t.history.createHref(ne.maskedLocation.href):t.history.createHref(ne.href),onClick:Ue([E,O]),onFocus:Ue([R,W]),onMouseEnter:Ue([b,ce]),onMouseLeave:Ue([T,xn]),onTouchStart:Ue([k,se]),target:v,...Object.keys(Xr).length&&{style:Xr},...He&&{className:He},...y&&{role:"link","aria-disabled":!0},...q&&{"data-status":"active"}}}const od=w.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=rE(r),s=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;return w.createElement(n||"a",{...o,ref:t},s)});function iE(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var Li=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Vo=typeof window>"u"||"Deno"in globalThis;function Ot(){}function oE(e,t){return typeof e=="function"?e(t):e}function yf(e){return typeof e=="number"&&e>=0&&e!==1/0}function zw(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rg(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==wp(s,t.options))return!1}else if(!qs(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function Tg(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Dr(t.options.mutationKey)!==Dr(o))return!1}else if(!qs(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function wp(e,t){return((t==null?void 0:t.queryKeyHashFn)||Dr)(e)}function Dr(e){return JSON.stringify(e,(t,n)=>wf(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function qs(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!qs(e[n],t[n])):!1}function Sp(e,t){if(e===t)return e;const n=kg(e)&&kg(t);if(n||wf(e)&&wf(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let u=0;u<s;u++){const c=n?u:o[u];!n&&e[c]===void 0&&t[c]===void 0&&r.includes(c)?(a[c]=void 0,l++):(a[c]=Sp(e[c],t[c]),a[c]===e[c]&&e[c]!==void 0&&l++)}return i===s&&l===i?e:a}return t}function fu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function kg(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function wf(e){if(!$g(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!$g(n)||!n.hasOwnProperty("isPrototypeOf"))}function $g(e){return Object.prototype.toString.call(e)==="[object Object]"}function sE(e){return new Promise(t=>{setTimeout(t,e)})}function Sf(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Sp(e,t):t}function aE(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function lE(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var zo=Symbol(),hi,fr,Co,Q0,uE=(Q0=class extends Li{constructor(){super();D(this,hi,void 0);D(this,fr,void 0);D(this,Co,void 0);A(this,Co,t=>{if(!Vo&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,fr)||this.setEventListener(C(this,Co))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,fr))==null||t.call(this),A(this,fr,void 0))}setEventListener(t){var n;A(this,Co,t),(n=C(this,fr))==null||n.call(this),A(this,fr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,hi)!==t&&(A(this,hi,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,hi)=="boolean"?C(this,hi):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},hi=new WeakMap,fr=new WeakMap,Co=new WeakMap,Q0),xp=new uE,_o,hr,bo,K0,cE=(K0=class extends Li{constructor(){super();D(this,_o,!0);D(this,hr,void 0);D(this,bo,void 0);A(this,bo,t=>{if(!Vo&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,hr)||this.setEventListener(C(this,bo))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,hr))==null||t.call(this),A(this,hr,void 0))}setEventListener(t){var n;A(this,bo,t),(n=C(this,hr))==null||n.call(this),A(this,hr,t(this.setOnline.bind(this)))}setOnline(t){C(this,_o)!==t&&(A(this,_o,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,_o)}},_o=new WeakMap,hr=new WeakMap,bo=new WeakMap,K0),hu=new cE;function dE(e){return Math.min(1e3*2**e,3e4)}function Cp(e){return(e??"online")==="online"?hu.isOnline():!0}var Bw=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function sd(e){return e instanceof Bw}function Uw(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((S,p)=>{o=S,s=p}),l=S=>{var p;r||(h(new Bw(S)),(p=e.abort)==null||p.call(e))},u=()=>{t=!0},c=()=>{t=!1},d=()=>!xp.isFocused()||e.networkMode!=="always"&&!hu.isOnline(),f=S=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,S),i==null||i(),o(S))},h=S=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,S),i==null||i(),s(S))},g=()=>new Promise(S=>{var p;i=v=>{const y=r||!d();return y&&S(v),y},(p=e.onPause)==null||p.call(e)}).then(()=>{var S;i=void 0,r||(S=e.onContinue)==null||S.call(e)}),m=()=>{if(r)return;let S;try{S=e.fn()}catch(p){S=Promise.reject(p)}Promise.resolve(S).then(f).catch(p=>{var E;if(r)return;const v=e.retry??(Vo?0:3),y=e.retryDelay??dE,x=typeof y=="function"?y(n,p):y,_=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,p);if(t||!_){h(p);return}n++,(E=e.onFail)==null||E.call(e,n,p),sE(x).then(()=>{if(d())return g()}).then(()=>{t?h(p):m()})})};return Cp(e.networkMode)?m():g().then(m),{promise:a,cancel:l,continue:()=>(i==null?void 0:i())?a:Promise.resolve(),cancelRetry:u,continueRetry:c}}function fE(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=f=>setTimeout(f,0);const o=f=>{i=f},s=f=>{let h;t++;try{h=f()}finally{t--,t||u()}return h},a=f=>{t?e.push(f):i(()=>{n(f)})},l=f=>(...h)=>{a(()=>{f(...h)})},u=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(h=>{n(h)})})})};return{batch:s,batchCalls:l,schedule:a,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:o}}var Re=fE(),pi,q0,Hw=(q0=class{constructor(){D(this,pi,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),yf(this.gcTime)&&A(this,pi,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Vo?1/0:5*60*1e3))}clearGcTimeout(){C(this,pi)&&(clearTimeout(C(this,pi)),A(this,pi,void 0))}},pi=new WeakMap,q0),Po,Eo,$t,et,Ie,La,mi,Ht,bn,Z0,hE=(Z0=class extends Hw{constructor(t){super();D(this,Ht);D(this,Po,void 0);D(this,Eo,void 0);D(this,$t,void 0);D(this,et,void 0);D(this,Ie,void 0);D(this,La,void 0);D(this,mi,void 0);A(this,mi,!1),A(this,La,t.defaultOptions),this.setOptions(t.options),A(this,Ie,[]),A(this,$t,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,A(this,Po,t.state||pE(this.options)),this.state=C(this,Po),this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...C(this,La),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!C(this,Ie).length&&this.state.fetchStatus==="idle"&&C(this,$t).remove(this)}setData(t,n){const r=Sf(this.state.data,t,this.options);return Q(this,Ht,bn).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Q(this,Ht,bn).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,et))==null?void 0:r.promise;return(i=C(this,et))==null||i.cancel(t),n?n.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,Po))}isActive(){return C(this,Ie).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?C(this,Ie).some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!zw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=C(this,Ie).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,et))==null||n.continue()}onOnline(){var n;const t=C(this,Ie).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,et))==null||n.continue()}addObserver(t){C(this,Ie).includes(t)||(C(this,Ie).push(t),this.clearGcTimeout(),C(this,$t).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){C(this,Ie).includes(t)&&(A(this,Ie,C(this,Ie).filter(n=>n!==t)),C(this,Ie).length||(C(this,et)&&(C(this,mi)?C(this,et).cancel({revert:!0}):C(this,et).cancelRetry()),this.scheduleGc()),C(this,$t).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return C(this,Ie).length}invalidate(){this.state.isInvalidated||Q(this,Ht,bn).call(this,{type:"invalidate"})}fetch(t,n){var u,c,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,et))return C(this,et).continueRetry(),C(this,et).promise}if(t&&this.setOptions(t),!this.options.queryFn){const f=C(this,Ie).find(h=>h.options.queryFn);f&&this.setOptions(f.options)}const r=new AbortController,i={queryKey:this.queryKey,meta:this.meta},o=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(A(this,mi,!0),r.signal)})};o(i);const s=()=>!this.options.queryFn||this.options.queryFn===zo?Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)):(A(this,mi,!1),this.options.persister?this.options.persister(this.options.queryFn,i,this):this.options.queryFn(i)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};o(a),(u=this.options.behavior)==null||u.onFetch(a,this),A(this,Eo,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Q(this,Ht,bn).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const l=f=>{var h,g,m,S;sd(f)&&f.silent||Q(this,Ht,bn).call(this,{type:"error",error:f}),sd(f)||((g=(h=C(this,$t).config).onError)==null||g.call(h,f,this),(S=(m=C(this,$t).config).onSettled)==null||S.call(m,this.state.data,f,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return A(this,et,Uw({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:f=>{var h,g,m,S;if(f===void 0){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(f),(g=(h=C(this,$t).config).onSuccess)==null||g.call(h,f,this),(S=(m=C(this,$t).config).onSettled)==null||S.call(m,f,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(f,h)=>{Q(this,Ht,bn).call(this,{type:"failed",failureCount:f,error:h})},onPause:()=>{Q(this,Ht,bn).call(this,{type:"pause"})},onContinue:()=>{Q(this,Ht,bn).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),C(this,et).promise}},Po=new WeakMap,Eo=new WeakMap,$t=new WeakMap,et=new WeakMap,Ie=new WeakMap,La=new WeakMap,mi=new WeakMap,Ht=new WeakSet,bn=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Gw(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return sd(i)&&i.revert&&C(this,Eo)?{...C(this,Eo),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Re.batch(()=>{C(this,Ie).forEach(r=>{r.onQueryUpdate()}),C(this,$t).notify({query:this,type:"updated",action:t})})},Z0);function Gw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Cp(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function pE(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var sn,Y0,mE=(Y0=class extends Li{constructor(t={}){super();D(this,sn,void 0);this.config=t,A(this,sn,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??wp(i,n);let s=this.get(o);return s||(s=new hE({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){C(this,sn).has(t.queryHash)||(C(this,sn).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,sn).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,sn).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Re.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,sn).get(t)}getAll(){return[...C(this,sn).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Rg(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Rg(t,r)):n}notify(t){Re.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Re.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Re.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},sn=new WeakMap,Y0),an,Fa,vt,Ro,ln,nr,X0,gE=(X0=class extends Hw{constructor(t){super();D(this,ln);D(this,an,void 0);D(this,Fa,void 0);D(this,vt,void 0);D(this,Ro,void 0);this.mutationId=t.mutationId,A(this,Fa,t.defaultOptions),A(this,vt,t.mutationCache),A(this,an,[]),this.state=t.state||Ww(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...C(this,Fa),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,an).includes(t)||(C(this,an).push(t),this.clearGcTimeout(),C(this,vt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){A(this,an,C(this,an).filter(n=>n!==t)),this.scheduleGc(),C(this,vt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,an).length||(this.state.status==="pending"?this.scheduleGc():C(this,vt).remove(this))}continue(){var t;return((t=C(this,Ro))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,a,l,u,c,d,f,h,g,m,S,p,v,y,x,_,E,R;const n=()=>(A(this,Ro,Uw({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(b,T)=>{Q(this,ln,nr).call(this,{type:"failed",failureCount:b,error:T})},onPause:()=>{Q(this,ln,nr).call(this,{type:"pause"})},onContinue:()=>{Q(this,ln,nr).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),C(this,Ro).promise),r=this.state.status==="pending";try{if(!r){Q(this,ln,nr).call(this,{type:"pending",variables:t}),await((o=(i=C(this,vt).config).onMutate)==null?void 0:o.call(i,t,this));const T=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));T!==this.state.context&&Q(this,ln,nr).call(this,{type:"pending",context:T,variables:t})}const b=await n();return await((u=(l=C(this,vt).config).onSuccess)==null?void 0:u.call(l,b,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,b,t,this.state.context)),await((h=(f=C(this,vt).config).onSettled)==null?void 0:h.call(f,b,null,this.state.variables,this.state.context,this)),await((m=(g=this.options).onSettled)==null?void 0:m.call(g,b,null,t,this.state.context)),Q(this,ln,nr).call(this,{type:"success",data:b}),b}catch(b){try{throw await((p=(S=C(this,vt).config).onError)==null?void 0:p.call(S,b,t,this.state.context,this)),await((y=(v=this.options).onError)==null?void 0:y.call(v,b,t,this.state.context)),await((_=(x=C(this,vt).config).onSettled)==null?void 0:_.call(x,void 0,b,this.state.variables,this.state.context,this)),await((R=(E=this.options).onSettled)==null?void 0:R.call(E,void 0,b,t,this.state.context)),b}finally{Q(this,ln,nr).call(this,{type:"error",error:b})}}}},an=new WeakMap,Fa=new WeakMap,vt=new WeakMap,Ro=new WeakMap,ln=new WeakSet,nr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Cp(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Re.batch(()=>{C(this,an).forEach(r=>{r.onMutationUpdate(t)}),C(this,vt).notify({mutation:this,type:"updated",action:t})})},X0);function Ww(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt,Na,gi,J0,vE=(J0=class extends Li{constructor(t={}){super();D(this,Mt,void 0);D(this,Na,void 0);D(this,gi,void 0);this.config=t,A(this,Mt,[]),A(this,Na,0)}build(t,n,r){const i=new gE({mutationCache:this,mutationId:++dl(this,Na)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){C(this,Mt).push(t),this.notify({type:"added",mutation:t})}remove(t){A(this,Mt,C(this,Mt).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){Re.batch(()=>{C(this,Mt).forEach(t=>{this.remove(t)})})}getAll(){return C(this,Mt)}find(t){const n={exact:!0,...t};return C(this,Mt).find(r=>Tg(n,r))}findAll(t={}){return C(this,Mt).filter(n=>Tg(t,n))}notify(t){Re.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return A(this,gi,(C(this,gi)??Promise.resolve()).then(()=>{const t=C(this,Mt).filter(n=>n.state.isPaused);return Re.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(Ot)),Promise.resolve()))}).then(()=>{A(this,gi,void 0)})),C(this,gi)}},Mt=new WeakMap,Na=new WeakMap,gi=new WeakMap,J0);function xf(e){return{onFetch:(t,n)=>{const r=async()=>{var g,m,S,p,v;const i=t.options,o=(S=(m=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:m.fetchMore)==null?void 0:S.direction,s=((p=t.state.data)==null?void 0:p.pages)||[],a=((v=t.state.data)==null?void 0:v.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},d=t.options.queryFn&&t.options.queryFn!==zo?t.options.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`)),f=async(y,x,_)=>{if(u)return Promise.reject();if(x==null&&y.pages.length)return Promise.resolve(y);const E={queryKey:t.queryKey,pageParam:x,direction:_?"backward":"forward",meta:t.options.meta};c(E);const R=await d(E),{maxPages:b}=t.options,T=_?lE:aE;return{pages:T(y.pages,R,b),pageParams:T(y.pageParams,x,b)}};let h;if(o&&s.length){const y=o==="backward",x=y?Qw:Cf,_={pages:s,pageParams:a},E=x(i,_);h=await f(_,E,y)}else{h=await f(l,a[0]??i.initialPageParam);const y=e??s.length;for(let x=1;x<y;x++){const _=Cf(i,h);h=await f(h,_)}}return h};t.options.persister?t.fetchFn=()=>{var i,o;return(o=(i=t.options).persister)==null?void 0:o.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function Cf(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function Qw(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}function yE(e,t){return t?Cf(e,t)!=null:!1}function wE(e,t){return!t||!e.getPreviousPageParam?!1:Qw(e,t)!=null}var Pe,pr,mr,To,ko,gr,$o,Mo,ew,SE=(ew=class{constructor(e={}){D(this,Pe,void 0);D(this,pr,void 0);D(this,mr,void 0);D(this,To,void 0);D(this,ko,void 0);D(this,gr,void 0);D(this,$o,void 0);D(this,Mo,void 0);A(this,Pe,e.queryCache||new mE),A(this,pr,e.mutationCache||new vE),A(this,mr,e.defaultOptions||{}),A(this,To,new Map),A(this,ko,new Map),A(this,gr,0)}mount(){dl(this,gr)._++,C(this,gr)===1&&(A(this,$o,xp.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Pe).onFocus())})),A(this,Mo,hu.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Pe).onOnline())})))}unmount(){var e,t;dl(this,gr)._--,C(this,gr)===0&&((e=C(this,$o))==null||e.call(this),A(this,$o,void 0),(t=C(this,Mo))==null||t.call(this),A(this,Mo,void 0))}isFetching(e){return C(this,Pe).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,pr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Pe).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=C(this,Pe).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(n.staleTime)&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return C(this,Pe).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,Pe).get(r.queryHash),o=i==null?void 0:i.state.data,s=oE(t,o);if(s!==void 0)return C(this,Pe).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Re.batch(()=>C(this,Pe).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Pe).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,Pe);Re.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,Pe),r={type:"active",...e};return Re.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Re.batch(()=>C(this,Pe).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Ot).catch(Ot)}invalidateQueries(e={},t={}){return Re.batch(()=>{if(C(this,Pe).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Re.batch(()=>C(this,Pe).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Ot)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Ot)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,Pe).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Ot).catch(Ot)}fetchInfiniteQuery(e){return e.behavior=xf(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Ot).catch(Ot)}resumePausedMutations(){return hu.isOnline()?C(this,pr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Pe)}getMutationCache(){return C(this,pr)}getDefaultOptions(){return C(this,mr)}setDefaultOptions(e){A(this,mr,e)}setQueryDefaults(e,t){C(this,To).set(Dr(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,To).values()];let n={};return t.forEach(r=>{qs(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){C(this,ko).set(Dr(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,ko).values()];let n={};return t.forEach(r=>{qs(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,mr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=wp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===zo&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,mr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Pe).clear(),C(this,pr).clear()}},Pe=new WeakMap,pr=new WeakMap,mr=new WeakMap,To=new WeakMap,ko=new WeakMap,gr=new WeakMap,$o=new WeakMap,Mo=new WeakMap,ew),lt,de,ja,tt,vi,Oo,un,Va,Ao,Io,yi,wi,vr,Do,Si,bs,za,_f,Ba,bf,Ua,Pf,Ha,Ef,Ga,Rf,Wa,Tf,Qa,kf,ic,Kw,tw,el=(tw=class extends Li{constructor(t,n){super();D(this,Si);D(this,za);D(this,Ba);D(this,Ua);D(this,Ha);D(this,Ga);D(this,Wa);D(this,Qa);D(this,ic);D(this,lt,void 0);D(this,de,void 0);D(this,ja,void 0);D(this,tt,void 0);D(this,vi,void 0);D(this,Oo,void 0);D(this,un,void 0);D(this,Va,void 0);D(this,Ao,void 0);D(this,Io,void 0);D(this,yi,void 0);D(this,wi,void 0);D(this,vr,void 0);D(this,Do,new Set);this.options=n,A(this,lt,t),A(this,un,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,de).addObserver(this),Mg(C(this,de),this.options)?Q(this,Si,bs).call(this):this.updateResult(),Q(this,Ha,Ef).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return $f(C(this,de),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return $f(C(this,de),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Q(this,Ga,Rf).call(this),Q(this,Wa,Tf).call(this),C(this,de).removeObserver(this)}setOptions(t,n){const r=this.options,i=C(this,de);if(this.options=C(this,lt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");Q(this,Qa,kf).call(this),C(this,de).setOptions(this.options),r._defaulted&&!fu(this.options,r)&&C(this,lt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,de),observer:this});const o=this.hasListeners();o&&Og(C(this,de),i,this.options,r)&&Q(this,Si,bs).call(this),this.updateResult(n),o&&(C(this,de)!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&Q(this,za,_f).call(this);const s=Q(this,Ba,bf).call(this);o&&(C(this,de)!==i||this.options.enabled!==r.enabled||s!==C(this,vr))&&Q(this,Ua,Pf).call(this,s)}getOptimisticResult(t){const n=C(this,lt).getQueryCache().build(C(this,lt),t),r=this.createResult(n,t);return CE(this,r)&&(A(this,tt,r),A(this,Oo,this.options),A(this,vi,C(this,de).state)),r}getCurrentResult(){return C(this,tt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){C(this,Do).add(t)}getCurrentQuery(){return C(this,de)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,lt).defaultQueryOptions(t),r=C(this,lt).getQueryCache().build(C(this,lt),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Q(this,Si,bs).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,tt)))}createResult(t,n){var R;const r=C(this,de),i=this.options,o=C(this,tt),s=C(this,vi),a=C(this,Oo),u=t!==r?t.state:C(this,ja),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const b=this.hasListeners(),T=!b&&Mg(t,n),k=b&&Og(t,r,n,i);(T||k)&&(d={...d,...Gw(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:m,status:S}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===C(this,Va))h=C(this,Ao);else try{A(this,Va,n.select),h=n.select(d.data),h=Sf(o==null?void 0:o.data,h,n),A(this,Ao,h),A(this,un,null)}catch(b){A(this,un,b)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&S==="pending"){let b;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))b=o.data;else if(b=typeof n.placeholderData=="function"?n.placeholderData((R=C(this,Io))==null?void 0:R.state.data,C(this,Io)):n.placeholderData,n.select&&b!==void 0)try{b=n.select(b),A(this,un,null)}catch(T){A(this,un,T)}b!==void 0&&(S="success",h=Sf(o==null?void 0:o.data,b,n),f=!0)}C(this,un)&&(g=C(this,un),h=C(this,Ao),m=Date.now(),S="error");const p=d.fetchStatus==="fetching",v=S==="pending",y=S==="error",x=v&&p,_=h!==void 0;return{status:S,fetchStatus:d.fetchStatus,isPending:v,isSuccess:S==="success",isError:y,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:m,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:p,isRefetching:p&&!v,isLoadingError:y&&!_,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:y&&_,isStale:_p(t,n),refetch:this.refetch}}updateResult(t){const n=C(this,tt),r=this.createResult(C(this,de),this.options);if(A(this,vi,C(this,de).state),A(this,Oo,this.options),C(this,vi).data!==void 0&&A(this,Io,C(this,de)),fu(r,n))return;A(this,tt,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!C(this,Do).size)return!0;const l=new Set(a??C(this,Do));return this.options.throwOnError&&l.add("error"),Object.keys(C(this,tt)).some(u=>{const c=u;return C(this,tt)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Q(this,ic,Kw).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Q(this,Ha,Ef).call(this)}},lt=new WeakMap,de=new WeakMap,ja=new WeakMap,tt=new WeakMap,vi=new WeakMap,Oo=new WeakMap,un=new WeakMap,Va=new WeakMap,Ao=new WeakMap,Io=new WeakMap,yi=new WeakMap,wi=new WeakMap,vr=new WeakMap,Do=new WeakMap,Si=new WeakSet,bs=function(t){Q(this,Qa,kf).call(this);let n=C(this,de).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ot)),n},za=new WeakSet,_f=function(){if(Q(this,Ga,Rf).call(this),Vo||C(this,tt).isStale||!yf(this.options.staleTime))return;const n=zw(C(this,tt).dataUpdatedAt,this.options.staleTime)+1;A(this,yi,setTimeout(()=>{C(this,tt).isStale||this.updateResult()},n))},Ba=new WeakSet,bf=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,de)):this.options.refetchInterval)??!1},Ua=new WeakSet,Pf=function(t){Q(this,Wa,Tf).call(this),A(this,vr,t),!(Vo||this.options.enabled===!1||!yf(C(this,vr))||C(this,vr)===0)&&A(this,wi,setInterval(()=>{(this.options.refetchIntervalInBackground||xp.isFocused())&&Q(this,Si,bs).call(this)},C(this,vr)))},Ha=new WeakSet,Ef=function(){Q(this,za,_f).call(this),Q(this,Ua,Pf).call(this,Q(this,Ba,bf).call(this))},Ga=new WeakSet,Rf=function(){C(this,yi)&&(clearTimeout(C(this,yi)),A(this,yi,void 0))},Wa=new WeakSet,Tf=function(){C(this,wi)&&(clearInterval(C(this,wi)),A(this,wi,void 0))},Qa=new WeakSet,kf=function(){const t=C(this,lt).getQueryCache().build(C(this,lt),this.options);if(t===C(this,de))return;const n=C(this,de);A(this,de,t),A(this,ja,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},ic=new WeakSet,Kw=function(t){Re.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,tt))}),C(this,lt).getQueryCache().notify({query:C(this,de),type:"observerResultsUpdated"})})},tw);function xE(e,t){return t.enabled!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mg(e,t){return xE(e,t)||e.state.data!==void 0&&$f(e,t,t.refetchOnMount)}function $f(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&_p(e,t)}return!1}function Og(e,t,n,r){return(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&_p(e,n)}function _p(e,t){return t.enabled!==!1&&e.isStaleByTime(t.staleTime)}function CE(e,t){return!fu(e.getCurrentResult(),t)}function Ag(e,t){return e.filter(n=>!t.includes(n))}function _E(e,t,n){const r=e.slice(0);return r[t]=n,r}var xi,kn,Lo,yt,oc,sc,qw,Ka,Mf,qa,Of,Za,Af,nw,bE=(nw=class extends Li{constructor(t,n,r){super();D(this,sc);D(this,Ka);D(this,qa);D(this,Za);D(this,xi,void 0);D(this,kn,void 0);D(this,Lo,void 0);D(this,yt,void 0);D(this,oc,void 0);A(this,xi,t),A(this,Lo,[]),A(this,yt,[]),A(this,kn,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&C(this,yt).forEach(t=>{t.subscribe(n=>{Q(this,qa,Of).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,C(this,yt).forEach(t=>{t.destroy()})}setQueries(t,n,r){A(this,Lo,t),Re.batch(()=>{const i=C(this,yt),o=Q(this,Ka,Mf).call(this,C(this,Lo));o.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions,r));const s=o.map(u=>u.observer),a=s.map(u=>u.getCurrentResult()),l=s.some((u,c)=>u!==i[c]);i.length===s.length&&!l||(A(this,yt,s),A(this,kn,a),this.hasListeners()&&(Ag(i,s).forEach(u=>{u.destroy()}),Ag(s,i).forEach(u=>{u.subscribe(c=>{Q(this,qa,Of).call(this,u,c)})}),Q(this,Za,Af).call(this)))})}getCurrentResult(){return C(this,kn)}getQueries(){return C(this,yt).map(t=>t.getCurrentQuery())}getObservers(){return C(this,yt)}getOptimisticResult(t,n){const r=Q(this,Ka,Mf).call(this,t),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions));return[i,o=>Q(this,sc,qw).call(this,o??i,n),()=>r.map((o,s)=>{const a=i[s];return o.defaultedQueryOptions.notifyOnChangeProps?a:o.observer.trackResult(a,l=>{r.forEach(u=>{u.observer.trackProp(l)})})})]}},xi=new WeakMap,kn=new WeakMap,Lo=new WeakMap,yt=new WeakMap,oc=new WeakMap,sc=new WeakSet,qw=function(t,n){return n?Sp(C(this,oc),n(t)):t},Ka=new WeakSet,Mf=function(t){const n=C(this,yt),r=new Map(n.map(d=>[d.options.queryHash,d])),i=t.map(d=>C(this,xi).defaultQueryOptions(d)),o=i.flatMap(d=>{const f=r.get(d.queryHash);return f!=null?[{defaultedQueryOptions:d,observer:f}]:[]}),s=new Set(o.map(d=>d.defaultedQueryOptions.queryHash)),a=i.filter(d=>!s.has(d.queryHash)),l=d=>{const f=C(this,xi).defaultQueryOptions(d);return C(this,yt).find(g=>g.options.queryHash===f.queryHash)??new el(C(this,xi),f)},u=a.map(d=>({defaultedQueryOptions:d,observer:l(d)})),c=(d,f)=>i.indexOf(d.defaultedQueryOptions)-i.indexOf(f.defaultedQueryOptions);return o.concat(u).sort(c)},qa=new WeakSet,Of=function(t,n){const r=C(this,yt).indexOf(t);r!==-1&&(A(this,kn,_E(C(this,kn),r,n)),Q(this,Za,Af).call(this))},Za=new WeakSet,Af=function(){Re.batch(()=>{this.listeners.forEach(t=>{t(C(this,kn))})})},nw),Zw=class extends el{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:xf()},t)}getOptimisticResult(e){return e.behavior=xf(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var l,u,c,d;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:o}=r,s=i&&((u=(l=n.fetchMeta)==null?void 0:l.fetchMore)==null?void 0:u.direction)==="forward",a=i&&((d=(c=n.fetchMeta)==null?void 0:c.fetchMore)==null?void 0:d.direction)==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:yE(t,n.data),hasPreviousPage:wE(t,n.data),isFetchingNextPage:s,isFetchingPreviousPage:a,isRefetching:o&&!s&&!a}}},yr,wr,ut,$n,Fo,Wl,Ya,If,rw,PE=(rw=class extends Li{constructor(n,r){super();D(this,Fo);D(this,Ya);D(this,yr,void 0);D(this,wr,void 0);D(this,ut,void 0);D(this,$n,void 0);A(this,yr,n),this.setOptions(r),this.bindMethods(),Q(this,Fo,Wl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=C(this,yr).defaultMutationOptions(n),fu(this.options,r)||C(this,yr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,ut),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Dr(r.mutationKey)!==Dr(this.options.mutationKey)?this.reset():((i=C(this,ut))==null?void 0:i.state.status)==="pending"&&C(this,ut).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,ut))==null||n.removeObserver(this)}onMutationUpdate(n){Q(this,Fo,Wl).call(this),Q(this,Ya,If).call(this,n)}getCurrentResult(){return C(this,wr)}reset(){var n;(n=C(this,ut))==null||n.removeObserver(this),A(this,ut,void 0),Q(this,Fo,Wl).call(this),Q(this,Ya,If).call(this)}mutate(n,r){var i;return A(this,$n,r),(i=C(this,ut))==null||i.removeObserver(this),A(this,ut,C(this,yr).getMutationCache().build(C(this,yr),this.options)),C(this,ut).addObserver(this),C(this,ut).execute(n)}},yr=new WeakMap,wr=new WeakMap,ut=new WeakMap,$n=new WeakMap,Fo=new WeakSet,Wl=function(){var r;const n=((r=C(this,ut))==null?void 0:r.state)??Ww();A(this,wr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ya=new WeakSet,If=function(n){Re.batch(()=>{var r,i,o,s,a,l,u,c;if(C(this,$n)&&this.hasListeners()){const d=C(this,wr).variables,f=C(this,wr).context;(n==null?void 0:n.type)==="success"?((i=(r=C(this,$n)).onSuccess)==null||i.call(r,n.data,d,f),(s=(o=C(this,$n)).onSettled)==null||s.call(o,n.data,null,d,f)):(n==null?void 0:n.type)==="error"&&((l=(a=C(this,$n)).onError)==null||l.call(a,n.error,d,f),(c=(u=C(this,$n)).onSettled)==null||c.call(u,void 0,n.error,d,f))}this.listeners.forEach(d=>{d(C(this,wr))})})},rw),Yw=w.createContext(void 0),pc=e=>{const t=w.useContext(Yw);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},EE=({client:e,children:t})=>(w.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),P.jsx(Yw.Provider,{value:e,children:t})),Xw=w.createContext(!1),Jw=()=>w.useContext(Xw);Xw.Provider;function RE(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var TE=w.createContext(RE()),eS=()=>w.useContext(TE);function tS(e,t){return typeof e=="function"?e(...t):!!e}function kE(){}var nS=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},rS=e=>{w.useEffect(()=>{e.clearReset()},[e])},iS=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&tS(n,[e.error,r]),bp=(e,t)=>t.state.data===void 0,oS=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},$E=(e,t)=>e.isLoading&&e.isFetching&&!t,Df=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Lf=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sS({queries:e,...t},n){const r=pc(n),i=Jw(),o=eS(),s=w.useMemo(()=>e.map(g=>{const m=r.defaultQueryOptions(g);return m._optimisticResults=i?"isRestoring":"optimistic",m}),[e,r,i]);s.forEach(g=>{oS(g),nS(g,o)}),rS(o);const[a]=w.useState(()=>new bE(r,s,t)),[l,u,c]=a.getOptimisticResult(s,t.combine);w.useSyncExternalStore(w.useCallback(g=>i?()=>{}:a.subscribe(Re.batchCalls(g)),[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setQueries(s,t,{listeners:!1})},[s,t,a]);const f=l.some((g,m)=>Df(s[m],g))?l.flatMap((g,m)=>{const S=s[m];if(S){const p=new el(r,S);if(Df(S,g))return Lf(S,p,o);$E(g,i)&&Lf(S,p,o)}return[]}):[];if(f.length>0)throw Promise.all(f);const h=l.find((g,m)=>{const S=s[m];return S&&iS({result:g,errorResetBoundary:o,throwOnError:S.throwOnError,query:r.getQueryCache().get(S.queryHash)})});if(h!=null&&h.error)throw h.error;return u(c())}function mc(e,t,n){const r=pc(n),i=Jw(),o=eS(),s=r.defaultQueryOptions(e);s._optimisticResults=i?"isRestoring":"optimistic",oS(s),nS(s,o),rS(o);const[a]=w.useState(()=>new t(r,s)),l=a.getOptimisticResult(s);if(w.useSyncExternalStore(w.useCallback(u=>{const c=i?()=>{}:a.subscribe(Re.batchCalls(u));return a.updateResult(),c},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),w.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),Df(s,l))throw Lf(s,a,o);if(iS({result:l,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw l.error;return s.notifyOnChangeProps?l:a.trackResult(l)}function ME(e,t){return mc(e,el,t)}function OE(e,t){return mc({...e,enabled:!0,suspense:!0,throwOnError:bp,placeholderData:void 0},el,t)}function AE(e,t){return mc({...e,enabled:!0,suspense:!0,throwOnError:bp},Zw,t)}function IE(e,t){return sS({...e,queries:e.queries.map(n=>({...n,suspense:!0,throwOnError:bp,enabled:!0,placeholderData:void 0}))},t)}function DE(e,t){const n=pc(t),[r]=w.useState(()=>new PE(n,e));w.useEffect(()=>{r.setOptions(e)},[r,e]);const i=w.useSyncExternalStore(w.useCallback(s=>r.subscribe(Re.batchCalls(s)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=w.useCallback((s,a)=>{r.mutate(s,a).catch(kE)},[r]);if(i.error&&tS(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function LE(e,t){return mc(e,Zw,t)}function Pp(e){const t={subscribe(n){let r=null,i=!1,o=!1,s=!1;function a(){if(r===null){s=!0;return}o||(o=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=e({next(l){var u;i||(u=n.next)==null||u.call(n,l)},error(l){var u;i||(i=!0,(u=n.error)==null||u.call(n,l),a())},complete(){var l;i||(i=!0,(l=n.complete)==null||l.call(n),a())}}),s&&a(),{unsubscribe:a}},pipe(...n){return n.reduce(FE,t)}};return t}function FE(e,t){return t(e)}class Ep extends Error{constructor(t){super(t),this.name="ObservableAbortError",Object.setPrototypeOf(this,Ep.prototype)}}function NE(e){let t;return{promise:new Promise((r,i)=>{let o=!1;function s(){o||(o=!0,i(new Ep("This operation was aborted.")),a.unsubscribe())}const a=e.subscribe({next(l){o=!0,r(l),s()},error(l){o=!0,i(l),s()},complete(){o=!0,s()}});t=s}),abort:t}}function jE(e){return t=>{let n=0,r=null;const i=[];function o(){r||(r=t.subscribe({next(a){var l;for(const u of i)(l=u.next)==null||l.call(u,a)},error(a){var l;for(const u of i)(l=u.error)==null||l.call(u,a)},complete(){var a;for(const l of i)(a=l.complete)==null||a.call(l)}}))}function s(){if(n===0&&r){const a=r;r=null,a.unsubscribe()}}return Pp(a=>(n++,i.push(a),o(),{unsubscribe(){n--,s();const l=i.findIndex(u=>u===a);l>-1&&i.splice(l,1)}}))}}function VE(e){return Pp(t=>{function n(i=0,o=e.op){const s=e.links[i];if(!s)throw new Error("No more links to execute - did you forget to add an ending link?");return s({op:o,next(l){return n(i+1,l)}})}return n().subscribe(t)})}const aS=()=>{};function lS(e,t){return new Proxy(aS,{get(r,i){if(!(typeof i!="string"||i==="then"))return lS(e,[...t,i])},apply(r,i,o){const s=t[t.length-1]==="apply";return e({args:s?o.length>=2?o[1]:[]:o,path:s?t.slice(0,-1):t})}})}const gc=e=>lS(e,[]),vc=e=>new Proxy(aS,{get(t,n){if(!(typeof n!="string"||n==="then"))return e(n)}});function Bo(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}vc(e=>{throw new Error(`Tried to access "$types.${e}" which is not available at runtime`)});class zE extends Error{}function BE(e){if(e instanceof Error)return e;const t=typeof e;if(!(t==="undefined"||t==="function"||e===null)){if(t!=="object")return new Error(String(e));if(Bo(e)){const n=new zE;for(const r in e)n[r]=e[r];return n}}}function UE(e,t){if("error"in e){const r=t.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)}}}}class ad extends Error{constructor(){super("Unable to transform response from server")}}function HE(e,t){let n;try{n=UE(e,t)}catch{throw new ad}if(!n.ok&&(!Bo(n.error.error)||typeof n.error.error.code!="number"))throw new ad;if(n.ok&&!Bo(n.result))throw new ad;return n}var iw,ow,sw,aw,lw,uw;typeof window>"u"||"Deno"in window||((ow=(iw=globalThis.process)==null?void 0:iw.env)==null?void 0:ow.NODE_ENV)==="test"||(aw=(sw=globalThis.process)==null?void 0:sw.env)!=null&&aw.JEST_WORKER_ID||(uw=(lw=globalThis.process)==null?void 0:lw.env)!=null&&uw.VITEST_WORKER_ID;function GE(e){return e instanceof hn||e instanceof Error&&e.name==="TRPCClientError"}function WE(e){return Bo(e)&&Bo(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}class hn extends Error{static from(t,n={}){const r=t;return GE(r)?(n.meta&&(r.meta={...r.meta,...n.meta}),r):WE(r)?new hn(r.error.message,{...n,result:r}):r instanceof Error?new hn(r.message,{...n,cause:BE(r)}):new hn("Unknown error",{...n,cause:r})}constructor(t,n){var i,o;const r=n==null?void 0:n.cause;super(t,{cause:r}),this.meta=n==null?void 0:n.meta,this.cause=r,this.shape=(i=n==null?void 0:n.result)==null?void 0:i.error,this.data=(o=n==null?void 0:n.result)==null?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,hn.prototype)}}class uS{$request({type:t,input:n,path:r,context:i={}}){return VE({links:this.links,op:{id:++this.requestId,type:t,path:r,input:n,context:i}}).pipe(jE())}requestAsPromise(t){const n=this.$request(t),{promise:r,abort:i}=NE(n);return new Promise((s,a)=>{var l;(l=t.signal)==null||l.addEventListener("abort",i),r.then(u=>{s(u.result.data)}).catch(u=>{a(hn.from(u))})})}query(t,n,r){return this.requestAsPromise({type:"query",path:t,input:n,context:r==null?void 0:r.context,signal:r==null?void 0:r.signal})}mutation(t,n,r){return this.requestAsPromise({type:"mutation",path:t,input:n,context:r==null?void 0:r.context,signal:r==null?void 0:r.signal})}subscription(t,n,r){return this.$request({type:"subscription",path:t,input:n,context:r==null?void 0:r.context}).subscribe({next(o){var s,a,l;o.result.type==="started"?(s=r.onStarted)==null||s.call(r):o.result.type==="stopped"?(a=r.onStopped)==null||a.call(r):(l=r.onData)==null||l.call(r,o.result.data)},error(o){var s;(s=r.onError)==null||s.call(r,o)},complete(){var o;(o=r.onComplete)==null||o.call(r)}})}constructor(t){this.requestId=0,this.runtime={},this.links=t.links.map(n=>n(this.runtime))}}function QE(e){return new uS(e)}const KE={query:"query",mutate:"mutation",subscribe:"subscription"},qE=e=>KE[e];function ZE(e){return vc(t=>e.hasOwnProperty(t)?e[t]:t==="__untypedClient"?e:gc(({path:n,args:r})=>{const i=[t,...n],o=qE(i.pop()),s=i.join(".");return e[o](s,...r)}))}function YE(e){return e.__untypedClient}const Ig=e=>typeof e=="function";function XE(e){if(e)return e;if(typeof window<"u"&&Ig(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Ig(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}const ld=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function ud(e){let t=null,n=null;const r=()=>{clearTimeout(n),n=null,t=null};function i(a){var c,d;const l=[[]];let u=0;for(;;){const f=a[u];if(!f)break;const h=l[l.length-1];if(f.aborted){(c=f.reject)==null||c.call(f,new Error("Aborted")),u++;continue}if(e.validate(h.concat(f).map(m=>m.key))){h.push(f),u++;continue}if(h.length===0){(d=f.reject)==null||d.call(f,new Error("Input is too big for a single dispatch")),u++;continue}l.push([])}return l}function o(){const a=i(t);r();for(const l of a){if(!l.length)continue;const u={items:l,cancel:ld};for(const h of l)h.batch=u;const c=(h,g)=>{var S;const m=u.items[h];(S=m.resolve)==null||S.call(m,g),m.batch=null,m.reject=null,m.resolve=null},{promise:d,cancel:f}=e.fetch(u.items.map(h=>h.key),c);u.cancel=f,d.then(h=>{var g;for(let m=0;m<h.length;m++){const S=h[m];c(m,S)}for(const m of u.items)(g=m.reject)==null||g.call(m,new Error("Missing result")),m.batch=null}).catch(h=>{var g;for(const m of u.items)(g=m.reject)==null||g.call(m,h),m.batch=null})}}function s(a){const l={aborted:!1,key:a,batch:null,resolve:ld,reject:ld},u=new Promise((d,f)=>{l.reject=f,l.resolve=d,t||(t=[]),t.push(l)});return n||(n=setTimeout(o)),{promise:u,cancel:()=>{var d;l.aborted=!0,(d=l.batch)!=null&&d.items.every(f=>f.aborted)&&(l.batch.cancel(),l.batch=null)}}}return{load:s}}function JE(e){return e||(typeof window<"u"&&window.AbortController?window.AbortController:typeof globalThis<"u"&&globalThis.AbortController?globalThis.AbortController:null)}function eR(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:n=>n,deserialize:n=>n},output:{serialize:n=>n,deserialize:n=>n}}}function tR(e){return{url:e.url.toString().replace(/\/$/,""),fetch:e.fetch,AbortController:JE(e.AbortController),transformer:eR(e.transformer),methodOverride:e.methodOverride}}function nR(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[n]=r}return t}const rR={query:"GET",mutation:"POST"};function cS(e){return"input"in e?e.transformer.input.serialize(e.input):nR(e.inputs.map(t=>e.transformer.input.serialize(t)))}const dS=e=>{let t=e.url+"/"+e.path;const n=[];if("inputs"in e&&n.push("batch=1"),e.type==="query"){const r=cS(e);r!==void 0&&e.methodOverride!=="POST"&&n.push(`input=${encodeURIComponent(JSON.stringify(r))}`)}return n.length&&(t+="?"+n.join("&")),t},iR=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=cS(e);return t!==void 0?JSON.stringify(t):void 0},oR=e=>aR({...e,contentTypeHeader:"application/json",getUrl:dS,getBody:iR});async function sR(e,t){const n=e.getUrl(e),r=e.getBody(e),{type:i}=e,o=await(async()=>{const a=await e.headers();return Symbol.iterator in a?Object.fromEntries(a):a})();/* istanbul ignore if -- @preserve */if(i==="subscription")throw new Error("Subscriptions should use wsLink");const s={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.batchModeHeader?{"trpc-batch-mode":e.batchModeHeader}:{},...o};return XE(e.fetch)(n,{method:e.methodOverride??rR[i],signal:t==null?void 0:t.signal,body:r,headers:s})}function aR(e){const t=e.AbortController?new e.AbortController:null,n={};let r=!1;return{promise:new Promise((s,a)=>{sR(e,t).then(l=>(n.response=l,r=!0,l.json())).then(l=>{n.responseJSON=l,s({json:l,meta:n})}).catch(l=>{r=!0,a(hn.from(l,{meta:n}))})}),cancel:()=>{r||t==null||t.abort()}}}function lR(e){return function(n){const r=tR(n),i=n.maxURLLength??1/0;return o=>{const s=d=>{const f=g=>{if(i===1/0)return!0;const m=g.map(v=>v.path).join(","),S=g.map(v=>v.input);return dS({...r,type:d,path:m,inputs:S}).length<=i},h=e({...r,runtime:o,type:d,opts:n});return{validate:f,fetch:h}},a=ud(s("query")),l=ud(s("mutation")),u=ud(s("subscription")),c={query:a,subscription:u,mutation:l};return({op:d})=>Pp(f=>{const h=c[d.type],{promise:g,cancel:m}=h.load(d);let S;return g.then(p=>{S=p;const v=HE(p.json,r.transformer.output);if(!v.ok){f.error(hn.from(v.error,{meta:p.meta}));return}f.next({context:p.meta,result:v.result}),f.complete()}).catch(p=>{f.error(hn.from(p,{meta:S==null?void 0:S.meta}))}),()=>{m()}})}}}const uR=e=>t=>{const n=t.map(s=>s.path).join(","),r=t.map(s=>s.input),{promise:i,cancel:o}=oR({...e,path:n,inputs:r,headers(){return e.opts.headers?typeof e.opts.headers=="function"?e.opts.headers({opList:t}):e.opts.headers:{}}});return{promise:i.then(s=>(Array.isArray(s.json)?s.json:t.map(()=>s.json)).map(u=>({meta:s.meta,json:u}))),cancel:o}},cR=lR(uR);var fS={exports:{}},Et={},hS={exports:{}},pS={};/**
|
|
36
|
-
* @license React
|
|
37
|
-
* scheduler.production.min.js
|
|
38
|
-
*
|
|
39
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
40
|
-
*
|
|
41
|
-
* This source code is licensed under the MIT license found in the
|
|
42
|
-
* LICENSE file in the root directory of this source tree.
|
|
43
|
-
*/(function(e){function t(O,V){var W=O.length;O.push(V);e:for(;0<W;){var se=W-1>>>1,ce=O[se];if(0<i(ce,V))O[se]=V,O[W]=ce,W=se;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var V=O[0],W=O.pop();if(W!==V){O[0]=W;e:for(var se=0,ce=O.length,xn=ce>>>1;se<xn;){var Ue=2*(se+1)-1,nn=O[Ue],at=Ue+1,He=O[at];if(0>i(nn,W))at<ce&&0>i(He,nn)?(O[se]=He,O[at]=W,se=at):(O[se]=nn,O[Ue]=W,se=Ue);else if(at<ce&&0>i(He,W))O[se]=He,O[at]=W,se=at;else break e}}return V}function i(O,V){var W=O.sortIndex-V.sortIndex;return W!==0?W:O.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,m=!1,S=typeof setTimeout=="function"?setTimeout:null,p=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(O){for(var V=n(u);V!==null;){if(V.callback===null)r(u);else if(V.startTime<=O)r(u),V.sortIndex=V.expirationTime,t(l,V);else break;V=n(u)}}function x(O){if(m=!1,y(O),!g)if(n(l)!==null)g=!0,re(_);else{var V=n(u);V!==null&&q(x,V.startTime-O)}}function _(O,V){g=!1,m&&(m=!1,p(b),b=-1),h=!0;var W=f;try{for(y(V),d=n(l);d!==null&&(!(d.expirationTime>V)||O&&!I());){var se=d.callback;if(typeof se=="function"){d.callback=null,f=d.priorityLevel;var ce=se(d.expirationTime<=V);V=e.unstable_now(),typeof ce=="function"?d.callback=ce:d===n(l)&&r(l),y(V)}else r(l);d=n(l)}if(d!==null)var xn=!0;else{var Ue=n(u);Ue!==null&&q(x,Ue.startTime-V),xn=!1}return xn}finally{d=null,f=W,h=!1}}var E=!1,R=null,b=-1,T=5,k=-1;function I(){return!(e.unstable_now()-k<T)}function L(){if(R!==null){var O=e.unstable_now();k=O;var V=!0;try{V=R(!0,O)}finally{V?ie():(E=!1,R=null)}}else E=!1}var ie;if(typeof v=="function")ie=function(){v(L)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,J=ne.port2;ne.port1.onmessage=L,ie=function(){J.postMessage(null)}}else ie=function(){S(L,0)};function re(O){R=O,E||(E=!0,ie())}function q(O,V){b=S(function(){O(e.unstable_now())},V)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(O){O.callback=null},e.unstable_continueExecution=function(){g||h||(g=!0,re(_))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):T=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(O){switch(f){case 1:case 2:case 3:var V=3;break;default:V=f}var W=f;f=V;try{return O()}finally{f=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,V){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var W=f;f=O;try{return V()}finally{f=W}},e.unstable_scheduleCallback=function(O,V,W){var se=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?se+W:se):W=se,O){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=W+ce,O={id:c++,callback:V,priorityLevel:O,startTime:W,expirationTime:ce,sortIndex:-1},W>se?(O.sortIndex=W,t(u,O),n(l)===null&&O===n(u)&&(m?(p(b),b=-1):m=!0,q(x,W-se))):(O.sortIndex=ce,t(l,O),g||h||(g=!0,re(_))),O},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(O){var V=f;return function(){var W=f;f=V;try{return O.apply(this,arguments)}finally{f=W}}}})(pS);hS.exports=pS;var dR=hS.exports;/**
|
|
44
|
-
* @license React
|
|
45
|
-
* react-dom.production.min.js
|
|
46
|
-
*
|
|
47
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the MIT license found in the
|
|
50
|
-
* LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/var mS=w,_t=dR;function $(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);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."}var gS=new Set,Zs={};function Fi(e,t){Uo(e,t),Uo(e+"Capture",t)}function Uo(e,t){for(Zs[e]=t,e=0;e<t.length;e++)gS.add(t[e])}var Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ff=Object.prototype.hasOwnProperty,fR=/^[: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]*$/,Dg={},Lg={};function hR(e){return Ff.call(Lg,e)?!0:Ff.call(Dg,e)?!1:fR.test(e)?Lg[e]=!0:(Dg[e]=!0,!1)}function pR(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function mR(e,t,n,r){if(t===null||typeof t>"u"||pR(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function st(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Be={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Be[e]=new st(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Be[t]=new st(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Be[e]=new st(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Be[e]=new st(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Be[e]=new st(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Be[e]=new st(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Be[e]=new st(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Be[e]=new st(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Be[e]=new st(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rp=/[\-:]([a-z])/g;function Tp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rp,Tp);Be[t]=new st(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rp,Tp);Be[t]=new st(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rp,Tp);Be[t]=new st(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Be[e]=new st(e,1,!1,e.toLowerCase(),null,!1,!1)});Be.xlinkHref=new st("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Be[e]=new st(e,1,!1,e.toLowerCase(),null,!0,!0)});function kp(e,t,n,r){var i=Be.hasOwnProperty(t)?Be[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(mR(t,n,i,r)&&(n=null),r||i===null?hR(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var Qn=mS.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,hl=Symbol.for("react.element"),Ki=Symbol.for("react.portal"),qi=Symbol.for("react.fragment"),$p=Symbol.for("react.strict_mode"),Nf=Symbol.for("react.profiler"),vS=Symbol.for("react.provider"),yS=Symbol.for("react.context"),Mp=Symbol.for("react.forward_ref"),jf=Symbol.for("react.suspense"),Vf=Symbol.for("react.suspense_list"),Op=Symbol.for("react.memo"),or=Symbol.for("react.lazy"),wS=Symbol.for("react.offscreen"),Fg=Symbol.iterator;function cs(e){return e===null||typeof e!="object"?null:(e=Fg&&e[Fg]||e["@@iterator"],typeof e=="function"?e:null)}var be=Object.assign,cd;function Ps(e){if(cd===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);cd=t&&t[1]||""}return`
|
|
52
|
-
`+cd+e}var dd=!1;function fd(e,t){if(!e||dd)return"";dd=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var i=u.stack.split(`
|
|
53
|
-
`),o=r.stack.split(`
|
|
54
|
-
`),s=i.length-1,a=o.length-1;1<=s&&0<=a&&i[s]!==o[a];)a--;for(;1<=s&&0<=a;s--,a--)if(i[s]!==o[a]){if(s!==1||a!==1)do if(s--,a--,0>a||i[s]!==o[a]){var l=`
|
|
55
|
-
`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{dd=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ps(e):""}function gR(e){switch(e.tag){case 5:return Ps(e.type);case 16:return Ps("Lazy");case 13:return Ps("Suspense");case 19:return Ps("SuspenseList");case 0:case 2:case 15:return e=fd(e.type,!1),e;case 11:return e=fd(e.type.render,!1),e;case 1:return e=fd(e.type,!0),e;default:return""}}function zf(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case qi:return"Fragment";case Ki:return"Portal";case Nf:return"Profiler";case $p:return"StrictMode";case jf:return"Suspense";case Vf:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case yS:return(e.displayName||"Context")+".Consumer";case vS:return(e._context.displayName||"Context")+".Provider";case Mp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Op:return t=e.displayName||null,t!==null?t:zf(e.type)||"Memo";case or:t=e._payload,e=e._init;try{return zf(e(t))}catch{}}return null}function vR(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return zf(t);case 8:return t===$p?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Lr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function SS(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function yR(e){var t=SS(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function pl(e){e._valueTracker||(e._valueTracker=yR(e))}function xS(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=SS(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function pu(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}}function Bf(e,t){var n=t.checked;return be({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ng(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Lr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function CS(e,t){t=t.checked,t!=null&&kp(e,"checked",t,!1)}function Uf(e,t){CS(e,t);var n=Lr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Hf(e,t.type,n):t.hasOwnProperty("defaultValue")&&Hf(e,t.type,Lr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function jg(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Hf(e,t,n){(t!=="number"||pu(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Es=Array.isArray;function co(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Lr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Gf(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return be({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Vg(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error($(92));if(Es(n)){if(1<n.length)throw Error($(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Lr(n)}}function _S(e,t){var n=Lr(t.value),r=Lr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function zg(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function bS(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Wf(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?bS(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ml,PS=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ml=ml||document.createElement("div"),ml.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ml.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ys(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Os={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wR=["Webkit","ms","Moz","O"];Object.keys(Os).forEach(function(e){wR.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Os[t]=Os[e]})});function ES(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Os.hasOwnProperty(e)&&Os[e]?(""+t).trim():t+"px"}function RS(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=ES(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var SR=be({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Qf(e,t){if(t){if(SR[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function Kf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 qf=null;function Ap(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Zf=null,fo=null,ho=null;function Bg(e){if(e=rl(e)){if(typeof Zf!="function")throw Error($(280));var t=e.stateNode;t&&(t=Cc(t),Zf(e.stateNode,e.type,t))}}function TS(e){fo?ho?ho.push(e):ho=[e]:fo=e}function kS(){if(fo){var e=fo,t=ho;if(ho=fo=null,Bg(e),t)for(e=0;e<t.length;e++)Bg(t[e])}}function $S(e,t){return e(t)}function MS(){}var hd=!1;function OS(e,t,n){if(hd)return e(t,n);hd=!0;try{return $S(e,t,n)}finally{hd=!1,(fo!==null||ho!==null)&&(MS(),kS())}}function Xs(e,t){var n=e.stateNode;if(n===null)return null;var r=Cc(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error($(231,t,typeof n));return n}var Yf=!1;if(Bn)try{var ds={};Object.defineProperty(ds,"passive",{get:function(){Yf=!0}}),window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch{Yf=!1}function xR(e,t,n,r,i,o,s,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var As=!1,mu=null,gu=!1,Xf=null,CR={onError:function(e){As=!0,mu=e}};function _R(e,t,n,r,i,o,s,a,l){As=!1,mu=null,xR.apply(CR,arguments)}function bR(e,t,n,r,i,o,s,a,l){if(_R.apply(this,arguments),As){if(As){var u=mu;As=!1,mu=null}else throw Error($(198));gu||(gu=!0,Xf=u)}}function Ni(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function AS(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 Ug(e){if(Ni(e)!==e)throw Error($(188))}function PR(e){var t=e.alternate;if(!t){if(t=Ni(e),t===null)throw Error($(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return Ug(i),e;if(o===r)return Ug(i),t;o=o.sibling}throw Error($(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,a=i.child;a;){if(a===n){s=!0,n=i,r=o;break}if(a===r){s=!0,r=i,n=o;break}a=a.sibling}if(!s){for(a=o.child;a;){if(a===n){s=!0,n=o,r=i;break}if(a===r){s=!0,r=o,n=i;break}a=a.sibling}if(!s)throw Error($(189))}}if(n.alternate!==r)throw Error($(190))}if(n.tag!==3)throw Error($(188));return n.stateNode.current===n?e:t}function IS(e){return e=PR(e),e!==null?DS(e):null}function DS(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=DS(e);if(t!==null)return t;e=e.sibling}return null}var LS=_t.unstable_scheduleCallback,Hg=_t.unstable_cancelCallback,ER=_t.unstable_shouldYield,RR=_t.unstable_requestPaint,ke=_t.unstable_now,TR=_t.unstable_getCurrentPriorityLevel,Ip=_t.unstable_ImmediatePriority,FS=_t.unstable_UserBlockingPriority,vu=_t.unstable_NormalPriority,kR=_t.unstable_LowPriority,NS=_t.unstable_IdlePriority,yc=null,pn=null;function $R(e){if(pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(yc,e,void 0,(e.current.flags&128)===128)}catch{}}var Kt=Math.clz32?Math.clz32:AR,MR=Math.log,OR=Math.LN2;function AR(e){return e>>>=0,e===0?32:31-(MR(e)/OR|0)|0}var gl=64,vl=4194304;function Rs(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function yu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Rs(a):(o&=s,o!==0&&(r=Rs(o)))}else s=n&~i,s!==0?r=Rs(s):o!==0&&(r=Rs(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Kt(t),i=1<<n,r|=e[n],t&=~i;return r}function IR(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function DR(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var s=31-Kt(o),a=1<<s,l=i[s];l===-1?(!(a&n)||a&r)&&(i[s]=IR(a,t)):l<=t&&(e.expiredLanes|=a),o&=~a}}function Jf(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function jS(){var e=gl;return gl<<=1,!(gl&4194240)&&(gl=64),e}function pd(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Kt(t),e[t]=n}function LR(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Kt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}function Dp(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Kt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var ue=0;function VS(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var zS,Lp,BS,US,HS,eh=!1,yl=[],Pr=null,Er=null,Rr=null,Js=new Map,ea=new Map,ur=[],FR="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 submit".split(" ");function Gg(e,t){switch(e){case"focusin":case"focusout":Pr=null;break;case"dragenter":case"dragleave":Er=null;break;case"mouseover":case"mouseout":Rr=null;break;case"pointerover":case"pointerout":Js.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ea.delete(t.pointerId)}}function fs(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=rl(t),t!==null&&Lp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function NR(e,t,n,r,i){switch(t){case"focusin":return Pr=fs(Pr,e,t,n,r,i),!0;case"dragenter":return Er=fs(Er,e,t,n,r,i),!0;case"mouseover":return Rr=fs(Rr,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Js.set(o,fs(Js.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,ea.set(o,fs(ea.get(o)||null,e,t,n,r,i)),!0}return!1}function GS(e){var t=li(e.target);if(t!==null){var n=Ni(t);if(n!==null){if(t=n.tag,t===13){if(t=AS(n),t!==null){e.blockedOn=t,HS(e.priority,function(){BS(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ql(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=th(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qf=r,n.target.dispatchEvent(r),qf=null}else return t=rl(n),t!==null&&Lp(t),e.blockedOn=n,!1;t.shift()}return!0}function Wg(e,t,n){Ql(e)&&n.delete(t)}function jR(){eh=!1,Pr!==null&&Ql(Pr)&&(Pr=null),Er!==null&&Ql(Er)&&(Er=null),Rr!==null&&Ql(Rr)&&(Rr=null),Js.forEach(Wg),ea.forEach(Wg)}function hs(e,t){e.blockedOn===t&&(e.blockedOn=null,eh||(eh=!0,_t.unstable_scheduleCallback(_t.unstable_NormalPriority,jR)))}function ta(e){function t(i){return hs(i,e)}if(0<yl.length){hs(yl[0],e);for(var n=1;n<yl.length;n++){var r=yl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Pr!==null&&hs(Pr,e),Er!==null&&hs(Er,e),Rr!==null&&hs(Rr,e),Js.forEach(t),ea.forEach(t),n=0;n<ur.length;n++)r=ur[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<ur.length&&(n=ur[0],n.blockedOn===null);)GS(n),n.blockedOn===null&&ur.shift()}var po=Qn.ReactCurrentBatchConfig,wu=!0;function VR(e,t,n,r){var i=ue,o=po.transition;po.transition=null;try{ue=1,Fp(e,t,n,r)}finally{ue=i,po.transition=o}}function zR(e,t,n,r){var i=ue,o=po.transition;po.transition=null;try{ue=4,Fp(e,t,n,r)}finally{ue=i,po.transition=o}}function Fp(e,t,n,r){if(wu){var i=th(e,t,n,r);if(i===null)bd(e,t,r,Su,n),Gg(e,r);else if(NR(i,e,t,n,r))r.stopPropagation();else if(Gg(e,r),t&4&&-1<FR.indexOf(e)){for(;i!==null;){var o=rl(i);if(o!==null&&zS(o),o=th(e,t,n,r),o===null&&bd(e,t,r,Su,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else bd(e,t,r,null,n)}}var Su=null;function th(e,t,n,r){if(Su=null,e=Ap(r),e=li(e),e!==null)if(t=Ni(e),t===null)e=null;else if(n=t.tag,n===13){if(e=AS(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Su=e,null}function WS(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(TR()){case Ip:return 1;case FS:return 4;case vu:case kR:return 16;case NS:return 536870912;default:return 16}default:return 16}}var Sr=null,Np=null,Kl=null;function QS(){if(Kl)return Kl;var e,t=Np,n=t.length,r,i="value"in Sr?Sr.value:Sr.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var s=n-e;for(r=1;r<=s&&t[n-r]===i[o-r];r++);return Kl=i.slice(e,1<r?1-r:void 0)}function ql(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 wl(){return!0}function Qg(){return!1}function Rt(e){function t(n,r,i,o,s){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=s,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(o):o[a]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?wl:Qg,this.isPropagationStopped=Qg,this}return be(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=wl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=wl)},persist:function(){},isPersistent:wl}),t}var rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jp=Rt(rs),nl=be({},rs,{view:0,detail:0}),BR=Rt(nl),md,gd,ps,wc=be({},nl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Vp,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!==ps&&(ps&&e.type==="mousemove"?(md=e.screenX-ps.screenX,gd=e.screenY-ps.screenY):gd=md=0,ps=e),md)},movementY:function(e){return"movementY"in e?e.movementY:gd}}),Kg=Rt(wc),UR=be({},wc,{dataTransfer:0}),HR=Rt(UR),GR=be({},nl,{relatedTarget:0}),vd=Rt(GR),WR=be({},rs,{animationName:0,elapsedTime:0,pseudoElement:0}),QR=Rt(WR),KR=be({},rs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),qR=Rt(KR),ZR=be({},rs,{data:0}),qg=Rt(ZR),YR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},XR={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"},JR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eT(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=JR[e])?!!t[e]:!1}function Vp(){return eT}var tT=be({},nl,{key:function(e){if(e.key){var t=YR[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ql(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?XR[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Vp,charCode:function(e){return e.type==="keypress"?ql(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ql(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nT=Rt(tT),rT=be({},wc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zg=Rt(rT),iT=be({},nl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Vp}),oT=Rt(iT),sT=be({},rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),aT=Rt(sT),lT=be({},wc,{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}),uT=Rt(lT),cT=[9,13,27,32],zp=Bn&&"CompositionEvent"in window,Is=null;Bn&&"documentMode"in document&&(Is=document.documentMode);var dT=Bn&&"TextEvent"in window&&!Is,KS=Bn&&(!zp||Is&&8<Is&&11>=Is),Yg=" ",Xg=!1;function qS(e,t){switch(e){case"keyup":return cT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function fT(e,t){switch(e){case"compositionend":return ZS(t);case"keypress":return t.which!==32?null:(Xg=!0,Yg);case"textInput":return e=t.data,e===Yg&&Xg?null:e;default:return null}}function hT(e,t){if(Zi)return e==="compositionend"||!zp&&qS(e,t)?(e=QS(),Kl=Np=Sr=null,Zi=!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 KS&&t.locale!=="ko"?null:t.data;default:return null}}var pT={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 Jg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!pT[e.type]:t==="textarea"}function YS(e,t,n,r){TS(r),t=xu(t,"onChange"),0<t.length&&(n=new jp("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ds=null,na=null;function mT(e){l1(e,0)}function Sc(e){var t=Ji(e);if(xS(t))return e}function gT(e,t){if(e==="change")return t}var XS=!1;if(Bn){var yd;if(Bn){var wd="oninput"in document;if(!wd){var ev=document.createElement("div");ev.setAttribute("oninput","return;"),wd=typeof ev.oninput=="function"}yd=wd}else yd=!1;XS=yd&&(!document.documentMode||9<document.documentMode)}function tv(){Ds&&(Ds.detachEvent("onpropertychange",JS),na=Ds=null)}function JS(e){if(e.propertyName==="value"&&Sc(na)){var t=[];YS(t,na,e,Ap(e)),OS(mT,t)}}function vT(e,t,n){e==="focusin"?(tv(),Ds=t,na=n,Ds.attachEvent("onpropertychange",JS)):e==="focusout"&&tv()}function yT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sc(na)}function wT(e,t){if(e==="click")return Sc(t)}function ST(e,t){if(e==="input"||e==="change")return Sc(t)}function xT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Jt=typeof Object.is=="function"?Object.is:xT;function ra(e,t){if(Jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ff.call(t,i)||!Jt(e[i],t[i]))return!1}return!0}function nv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function rv(e,t){var n=nv(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=nv(n)}}function e1(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?e1(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function t1(){for(var e=window,t=pu();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=pu(e.document)}return t}function Bp(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")}function CT(e){var t=t1(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&e1(n.ownerDocument.documentElement,n)){if(r!==null&&Bp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=rv(n,o);var s=rv(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var _T=Bn&&"documentMode"in document&&11>=document.documentMode,Yi=null,nh=null,Ls=null,rh=!1;function iv(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;rh||Yi==null||Yi!==pu(r)||(r=Yi,"selectionStart"in r&&Bp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ls&&ra(Ls,r)||(Ls=r,r=xu(nh,"onSelect"),0<r.length&&(t=new jp("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Yi)))}function Sl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Xi={animationend:Sl("Animation","AnimationEnd"),animationiteration:Sl("Animation","AnimationIteration"),animationstart:Sl("Animation","AnimationStart"),transitionend:Sl("Transition","TransitionEnd")},Sd={},n1={};Bn&&(n1=document.createElement("div").style,"AnimationEvent"in window||(delete Xi.animationend.animation,delete Xi.animationiteration.animation,delete Xi.animationstart.animation),"TransitionEvent"in window||delete Xi.transitionend.transition);function xc(e){if(Sd[e])return Sd[e];if(!Xi[e])return e;var t=Xi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in n1)return Sd[e]=t[n];return e}var r1=xc("animationend"),i1=xc("animationiteration"),o1=xc("animationstart"),s1=xc("transitionend"),a1=new Map,ov="abort auxClick 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(" ");function Qr(e,t){a1.set(e,t),Fi(t,[e])}for(var xd=0;xd<ov.length;xd++){var Cd=ov[xd],bT=Cd.toLowerCase(),PT=Cd[0].toUpperCase()+Cd.slice(1);Qr(bT,"on"+PT)}Qr(r1,"onAnimationEnd");Qr(i1,"onAnimationIteration");Qr(o1,"onAnimationStart");Qr("dblclick","onDoubleClick");Qr("focusin","onFocus");Qr("focusout","onBlur");Qr(s1,"onTransitionEnd");Uo("onMouseEnter",["mouseout","mouseover"]);Uo("onMouseLeave",["mouseout","mouseover"]);Uo("onPointerEnter",["pointerout","pointerover"]);Uo("onPointerLeave",["pointerout","pointerover"]);Fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ts="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(" "),ET=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ts));function sv(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,bR(r,t,void 0,e),e.currentTarget=null}function l1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var s=r.length-1;0<=s;s--){var a=r[s],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==o&&i.isPropagationStopped())break e;sv(i,a,u),o=l}else for(s=0;s<r.length;s++){if(a=r[s],l=a.instance,u=a.currentTarget,a=a.listener,l!==o&&i.isPropagationStopped())break e;sv(i,a,u),o=l}}}if(gu)throw e=Xf,gu=!1,Xf=null,e}function me(e,t){var n=t[lh];n===void 0&&(n=t[lh]=new Set);var r=e+"__bubble";n.has(r)||(u1(t,e,2,!1),n.add(r))}function _d(e,t,n){var r=0;t&&(r|=4),u1(n,e,r,t)}var xl="_reactListening"+Math.random().toString(36).slice(2);function ia(e){if(!e[xl]){e[xl]=!0,gS.forEach(function(n){n!=="selectionchange"&&(ET.has(n)||_d(n,!1,e),_d(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xl]||(t[xl]=!0,_d("selectionchange",!1,t))}}function u1(e,t,n,r){switch(WS(t)){case 1:var i=VR;break;case 4:i=zR;break;default:i=Fp}n=i.bind(null,t,n,e),i=void 0,!Yf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function bd(e,t,n,r,i){var o=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var a=r.stateNode.containerInfo;if(a===i||a.nodeType===8&&a.parentNode===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&(l=s.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;s=s.return}for(;a!==null;){if(s=li(a),s===null)return;if(l=s.tag,l===5||l===6){r=o=s;continue e}a=a.parentNode}}r=r.return}OS(function(){var u=o,c=Ap(n),d=[];e:{var f=a1.get(e);if(f!==void 0){var h=jp,g=e;switch(e){case"keypress":if(ql(n)===0)break e;case"keydown":case"keyup":h=nT;break;case"focusin":g="focus",h=vd;break;case"focusout":g="blur",h=vd;break;case"beforeblur":case"afterblur":h=vd;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Kg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=HR;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=oT;break;case r1:case i1:case o1:h=QR;break;case s1:h=aT;break;case"scroll":h=BR;break;case"wheel":h=uT;break;case"copy":case"cut":case"paste":h=qR;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Zg}var m=(t&4)!==0,S=!m&&e==="scroll",p=m?f!==null?f+"Capture":null:f;m=[];for(var v=u,y;v!==null;){y=v;var x=y.stateNode;if(y.tag===5&&x!==null&&(y=x,p!==null&&(x=Xs(v,p),x!=null&&m.push(oa(v,x,y)))),S)break;v=v.return}0<m.length&&(f=new h(f,g,null,n,c),d.push({event:f,listeners:m}))}}if(!(t&7)){e:{if(f=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",f&&n!==qf&&(g=n.relatedTarget||n.fromElement)&&(li(g)||g[Un]))break e;if((h||f)&&(f=c.window===c?c:(f=c.ownerDocument)?f.defaultView||f.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=u,g=g?li(g):null,g!==null&&(S=Ni(g),g!==S||g.tag!==5&&g.tag!==6)&&(g=null)):(h=null,g=u),h!==g)){if(m=Kg,x="onMouseLeave",p="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(m=Zg,x="onPointerLeave",p="onPointerEnter",v="pointer"),S=h==null?f:Ji(h),y=g==null?f:Ji(g),f=new m(x,v+"leave",h,n,c),f.target=S,f.relatedTarget=y,x=null,li(c)===u&&(m=new m(p,v+"enter",g,n,c),m.target=y,m.relatedTarget=S,x=m),S=x,h&&g)t:{for(m=h,p=g,v=0,y=m;y;y=Bi(y))v++;for(y=0,x=p;x;x=Bi(x))y++;for(;0<v-y;)m=Bi(m),v--;for(;0<y-v;)p=Bi(p),y--;for(;v--;){if(m===p||p!==null&&m===p.alternate)break t;m=Bi(m),p=Bi(p)}m=null}else m=null;h!==null&&av(d,f,h,m,!1),g!==null&&S!==null&&av(d,S,g,m,!0)}}e:{if(f=u?Ji(u):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var _=gT;else if(Jg(f))if(XS)_=ST;else{_=yT;var E=vT}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(_=wT);if(_&&(_=_(e,u))){YS(d,_,n,c);break e}E&&E(e,f,u),e==="focusout"&&(E=f._wrapperState)&&E.controlled&&f.type==="number"&&Hf(f,"number",f.value)}switch(E=u?Ji(u):window,e){case"focusin":(Jg(E)||E.contentEditable==="true")&&(Yi=E,nh=u,Ls=null);break;case"focusout":Ls=nh=Yi=null;break;case"mousedown":rh=!0;break;case"contextmenu":case"mouseup":case"dragend":rh=!1,iv(d,n,c);break;case"selectionchange":if(_T)break;case"keydown":case"keyup":iv(d,n,c)}var R;if(zp)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Zi?qS(e,n)&&(b="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(b="onCompositionStart");b&&(KS&&n.locale!=="ko"&&(Zi||b!=="onCompositionStart"?b==="onCompositionEnd"&&Zi&&(R=QS()):(Sr=c,Np="value"in Sr?Sr.value:Sr.textContent,Zi=!0)),E=xu(u,b),0<E.length&&(b=new qg(b,e,null,n,c),d.push({event:b,listeners:E}),R?b.data=R:(R=ZS(n),R!==null&&(b.data=R)))),(R=dT?fT(e,n):hT(e,n))&&(u=xu(u,"onBeforeInput"),0<u.length&&(c=new qg("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=R))}l1(d,t)})}function oa(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;i.tag===5&&o!==null&&(i=o,o=Xs(e,n),o!=null&&r.unshift(oa(e,o,i)),o=Xs(e,t),o!=null&&r.push(oa(e,o,i))),e=e.return}return r}function Bi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function av(e,t,n,r,i){for(var o=t._reactName,s=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,i?(l=Xs(n,o),l!=null&&s.unshift(oa(n,l,a))):i||(l=Xs(n,o),l!=null&&s.push(oa(n,l,a)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var RT=/\r\n?/g,TT=/\u0000|\uFFFD/g;function lv(e){return(typeof e=="string"?e:""+e).replace(RT,`
|
|
56
|
-
`).replace(TT,"")}function Cl(e,t,n){if(t=lv(t),lv(e)!==t&&n)throw Error($(425))}function Cu(){}var ih=null,oh=null;function sh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ah=typeof setTimeout=="function"?setTimeout:void 0,kT=typeof clearTimeout=="function"?clearTimeout:void 0,uv=typeof Promise=="function"?Promise:void 0,$T=typeof queueMicrotask=="function"?queueMicrotask:typeof uv<"u"?function(e){return uv.resolve(null).then(e).catch(MT)}:ah;function MT(e){setTimeout(function(){throw e})}function Pd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),ta(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);ta(t)}function Tr(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==="$?")break;if(t==="/$")return null}}return e}function cv(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var is=Math.random().toString(36).slice(2),cn="__reactFiber$"+is,sa="__reactProps$"+is,Un="__reactContainer$"+is,lh="__reactEvents$"+is,OT="__reactListeners$"+is,AT="__reactHandles$"+is;function li(e){var t=e[cn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Un]||n[cn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=cv(e);e!==null;){if(n=e[cn])return n;e=cv(e)}return t}e=n,n=e.parentNode}return null}function rl(e){return e=e[cn]||e[Un],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Ji(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Cc(e){return e[sa]||null}var uh=[],eo=-1;function Kr(e){return{current:e}}function ye(e){0>eo||(e.current=uh[eo],uh[eo]=null,eo--)}function fe(e,t){eo++,uh[eo]=e.current,e.current=t}var Fr={},Xe=Kr(Fr),ht=Kr(!1),Ri=Fr;function Ho(e,t){var n=e.type.contextTypes;if(!n)return Fr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function pt(e){return e=e.childContextTypes,e!=null}function _u(){ye(ht),ye(Xe)}function dv(e,t,n){if(Xe.current!==Fr)throw Error($(168));fe(Xe,t),fe(ht,n)}function c1(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error($(108,vR(e)||"Unknown",i));return be({},n,r)}function bu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Fr,Ri=Xe.current,fe(Xe,e),fe(ht,ht.current),!0}function fv(e,t,n){var r=e.stateNode;if(!r)throw Error($(169));n?(e=c1(e,t,Ri),r.__reactInternalMemoizedMergedChildContext=e,ye(ht),ye(Xe),fe(Xe,e)):ye(ht),fe(ht,n)}var Tn=null,_c=!1,Ed=!1;function d1(e){Tn===null?Tn=[e]:Tn.push(e)}function IT(e){_c=!0,d1(e)}function qr(){if(!Ed&&Tn!==null){Ed=!0;var e=0,t=ue;try{var n=Tn;for(ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Tn=null,_c=!1}catch(i){throw Tn!==null&&(Tn=Tn.slice(e+1)),LS(Ip,qr),i}finally{ue=t,Ed=!1}}return null}var to=[],no=0,Pu=null,Eu=0,It=[],Dt=0,Ti=null,Mn=1,On="";function ti(e,t){to[no++]=Eu,to[no++]=Pu,Pu=e,Eu=t}function f1(e,t,n){It[Dt++]=Mn,It[Dt++]=On,It[Dt++]=Ti,Ti=e;var r=Mn;e=On;var i=32-Kt(r)-1;r&=~(1<<i),n+=1;var o=32-Kt(t)+i;if(30<o){var s=i-i%5;o=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Mn=1<<32-Kt(t)+i|n<<i|r,On=o+e}else Mn=1<<o|n<<i|r,On=e}function Up(e){e.return!==null&&(ti(e,1),f1(e,1,0))}function Hp(e){for(;e===Pu;)Pu=to[--no],to[no]=null,Eu=to[--no],to[no]=null;for(;e===Ti;)Ti=It[--Dt],It[Dt]=null,On=It[--Dt],It[Dt]=null,Mn=It[--Dt],It[Dt]=null}var Ct=null,St=null,we=!1,Wt=null;function h1(e,t){var n=Lt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function hv(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ct=e,St=Tr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ct=e,St=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ti!==null?{id:Mn,overflow:On}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Lt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ct=e,St=null,!0):!1;default:return!1}}function ch(e){return(e.mode&1)!==0&&(e.flags&128)===0}function dh(e){if(we){var t=St;if(t){var n=t;if(!hv(e,t)){if(ch(e))throw Error($(418));t=Tr(n.nextSibling);var r=Ct;t&&hv(e,t)?h1(r,n):(e.flags=e.flags&-4097|2,we=!1,Ct=e)}}else{if(ch(e))throw Error($(418));e.flags=e.flags&-4097|2,we=!1,Ct=e}}}function pv(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ct=e}function _l(e){if(e!==Ct)return!1;if(!we)return pv(e),we=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!sh(e.type,e.memoizedProps)),t&&(t=St)){if(ch(e))throw p1(),Error($(418));for(;t;)h1(e,t),t=Tr(t.nextSibling)}if(pv(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){St=Tr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}St=null}}else St=Ct?Tr(e.stateNode.nextSibling):null;return!0}function p1(){for(var e=St;e;)e=Tr(e.nextSibling)}function Go(){St=Ct=null,we=!1}function Gp(e){Wt===null?Wt=[e]:Wt.push(e)}var DT=Qn.ReactCurrentBatchConfig;function Ut(e,t){if(e&&e.defaultProps){t=be({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var Ru=Kr(null),Tu=null,ro=null,Wp=null;function Qp(){Wp=ro=Tu=null}function Kp(e){var t=Ru.current;ye(Ru),e._currentValue=t}function fh(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function mo(e,t){Tu=e,Wp=ro=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ft=!0),e.firstContext=null)}function Nt(e){var t=e._currentValue;if(Wp!==e)if(e={context:e,memoizedValue:t,next:null},ro===null){if(Tu===null)throw Error($(308));ro=e,Tu.dependencies={lanes:0,firstContext:e}}else ro=ro.next=e;return t}var ui=null;function qp(e){ui===null?ui=[e]:ui.push(e)}function m1(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,qp(t)):(n.next=i.next,i.next=n),t.interleaved=n,Hn(e,r)}function Hn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var sr=!1;function Zp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function g1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function In(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function kr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,oe&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Hn(e,n)}return i=r.interleaved,i===null?(t.next=t,qp(r)):(t.next=i.next,i.next=t),r.interleaved=t,Hn(e,n)}function Zl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dp(e,n)}}function mv(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=s:o=o.next=s,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ku(e,t,n,r){var i=e.updateQueue;sr=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,a=i.shared.pending;if(a!==null){i.shared.pending=null;var l=a,u=l.next;l.next=null,s===null?o=u:s.next=u,s=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==s&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(o!==null){var d=i.baseState;s=0,c=u=l=null,a=o;do{var f=a.lane,h=a.eventTime;if((r&f)===f){c!==null&&(c=c.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,m=a;switch(f=t,h=n,m.tag){case 1:if(g=m.payload,typeof g=="function"){d=g.call(h,d,f);break e}d=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(h,d,f):g,f==null)break e;d=be({},d,f);break e;case 2:sr=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[a]:f.push(a))}else h={eventTime:h,lane:f,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=h,l=d):c=c.next=h,s|=f;if(a=a.next,a===null){if(a=i.shared.pending,a===null)break;f=a,a=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(c===null&&(l=d),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do s|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);$i|=s,e.lanes=s,e.memoizedState=d}}function gv(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error($(191,i));i.call(r)}}}var v1=new mS.Component().refs;function hh(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:be({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var bc={isMounted:function(e){return(e=e._reactInternals)?Ni(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=rt(),i=Mr(e),o=In(r,i);o.payload=t,n!=null&&(o.callback=n),t=kr(e,o,i),t!==null&&(qt(t,e,i,r),Zl(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=rt(),i=Mr(e),o=In(r,i);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=kr(e,o,i),t!==null&&(qt(t,e,i,r),Zl(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=rt(),r=Mr(e),i=In(n,r);i.tag=2,t!=null&&(i.callback=t),t=kr(e,i,r),t!==null&&(qt(t,e,r,n),Zl(t,e,r))}};function vv(e,t,n,r,i,o,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,s):t.prototype&&t.prototype.isPureReactComponent?!ra(n,r)||!ra(i,o):!0}function y1(e,t,n){var r=!1,i=Fr,o=t.contextType;return typeof o=="object"&&o!==null?o=Nt(o):(i=pt(t)?Ri:Xe.current,r=t.contextTypes,o=(r=r!=null)?Ho(e,i):Fr),t=new t(n,o),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=bc,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function yv(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&bc.enqueueReplaceState(t,t.state,null)}function ph(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=v1,Zp(e);var o=t.contextType;typeof o=="object"&&o!==null?i.context=Nt(o):(o=pt(t)?Ri:Xe.current,i.context=Ho(e,o)),i.state=e.memoizedState,o=t.getDerivedStateFromProps,typeof o=="function"&&(hh(e,t,o,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&bc.enqueueReplaceState(i,i.state,null),ku(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function ms(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error($(309));var r=n.stateNode}if(!r)throw Error($(147,e));var i=r,o=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===o?t.ref:(t=function(s){var a=i.refs;a===v1&&(a=i.refs={}),s===null?delete a[o]:a[o]=s},t._stringRef=o,t)}if(typeof e!="string")throw Error($(284));if(!n._owner)throw Error($(290,e))}return e}function bl(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function wv(e){var t=e._init;return t(e._payload)}function w1(e){function t(p,v){if(e){var y=p.deletions;y===null?(p.deletions=[v],p.flags|=16):y.push(v)}}function n(p,v){if(!e)return null;for(;v!==null;)t(p,v),v=v.sibling;return null}function r(p,v){for(p=new Map;v!==null;)v.key!==null?p.set(v.key,v):p.set(v.index,v),v=v.sibling;return p}function i(p,v){return p=Or(p,v),p.index=0,p.sibling=null,p}function o(p,v,y){return p.index=y,e?(y=p.alternate,y!==null?(y=y.index,y<v?(p.flags|=2,v):y):(p.flags|=2,v)):(p.flags|=1048576,v)}function s(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,v,y,x){return v===null||v.tag!==6?(v=Ad(y,p.mode,x),v.return=p,v):(v=i(v,y),v.return=p,v)}function l(p,v,y,x){var _=y.type;return _===qi?c(p,v,y.props.children,x,y.key):v!==null&&(v.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===or&&wv(_)===v.type)?(x=i(v,y.props),x.ref=ms(p,v,y),x.return=p,x):(x=nu(y.type,y.key,y.props,null,p.mode,x),x.ref=ms(p,v,y),x.return=p,x)}function u(p,v,y,x){return v===null||v.tag!==4||v.stateNode.containerInfo!==y.containerInfo||v.stateNode.implementation!==y.implementation?(v=Id(y,p.mode,x),v.return=p,v):(v=i(v,y.children||[]),v.return=p,v)}function c(p,v,y,x,_){return v===null||v.tag!==7?(v=_i(y,p.mode,x,_),v.return=p,v):(v=i(v,y),v.return=p,v)}function d(p,v,y){if(typeof v=="string"&&v!==""||typeof v=="number")return v=Ad(""+v,p.mode,y),v.return=p,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case hl:return y=nu(v.type,v.key,v.props,null,p.mode,y),y.ref=ms(p,null,v),y.return=p,y;case Ki:return v=Id(v,p.mode,y),v.return=p,v;case or:var x=v._init;return d(p,x(v._payload),y)}if(Es(v)||cs(v))return v=_i(v,p.mode,y,null),v.return=p,v;bl(p,v)}return null}function f(p,v,y,x){var _=v!==null?v.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return _!==null?null:a(p,v,""+y,x);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case hl:return y.key===_?l(p,v,y,x):null;case Ki:return y.key===_?u(p,v,y,x):null;case or:return _=y._init,f(p,v,_(y._payload),x)}if(Es(y)||cs(y))return _!==null?null:c(p,v,y,x,null);bl(p,y)}return null}function h(p,v,y,x,_){if(typeof x=="string"&&x!==""||typeof x=="number")return p=p.get(y)||null,a(v,p,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case hl:return p=p.get(x.key===null?y:x.key)||null,l(v,p,x,_);case Ki:return p=p.get(x.key===null?y:x.key)||null,u(v,p,x,_);case or:var E=x._init;return h(p,v,y,E(x._payload),_)}if(Es(x)||cs(x))return p=p.get(y)||null,c(v,p,x,_,null);bl(v,x)}return null}function g(p,v,y,x){for(var _=null,E=null,R=v,b=v=0,T=null;R!==null&&b<y.length;b++){R.index>b?(T=R,R=null):T=R.sibling;var k=f(p,R,y[b],x);if(k===null){R===null&&(R=T);break}e&&R&&k.alternate===null&&t(p,R),v=o(k,v,b),E===null?_=k:E.sibling=k,E=k,R=T}if(b===y.length)return n(p,R),we&&ti(p,b),_;if(R===null){for(;b<y.length;b++)R=d(p,y[b],x),R!==null&&(v=o(R,v,b),E===null?_=R:E.sibling=R,E=R);return we&&ti(p,b),_}for(R=r(p,R);b<y.length;b++)T=h(R,p,b,y[b],x),T!==null&&(e&&T.alternate!==null&&R.delete(T.key===null?b:T.key),v=o(T,v,b),E===null?_=T:E.sibling=T,E=T);return e&&R.forEach(function(I){return t(p,I)}),we&&ti(p,b),_}function m(p,v,y,x){var _=cs(y);if(typeof _!="function")throw Error($(150));if(y=_.call(y),y==null)throw Error($(151));for(var E=_=null,R=v,b=v=0,T=null,k=y.next();R!==null&&!k.done;b++,k=y.next()){R.index>b?(T=R,R=null):T=R.sibling;var I=f(p,R,k.value,x);if(I===null){R===null&&(R=T);break}e&&R&&I.alternate===null&&t(p,R),v=o(I,v,b),E===null?_=I:E.sibling=I,E=I,R=T}if(k.done)return n(p,R),we&&ti(p,b),_;if(R===null){for(;!k.done;b++,k=y.next())k=d(p,k.value,x),k!==null&&(v=o(k,v,b),E===null?_=k:E.sibling=k,E=k);return we&&ti(p,b),_}for(R=r(p,R);!k.done;b++,k=y.next())k=h(R,p,b,k.value,x),k!==null&&(e&&k.alternate!==null&&R.delete(k.key===null?b:k.key),v=o(k,v,b),E===null?_=k:E.sibling=k,E=k);return e&&R.forEach(function(L){return t(p,L)}),we&&ti(p,b),_}function S(p,v,y,x){if(typeof y=="object"&&y!==null&&y.type===qi&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case hl:e:{for(var _=y.key,E=v;E!==null;){if(E.key===_){if(_=y.type,_===qi){if(E.tag===7){n(p,E.sibling),v=i(E,y.props.children),v.return=p,p=v;break e}}else if(E.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===or&&wv(_)===E.type){n(p,E.sibling),v=i(E,y.props),v.ref=ms(p,E,y),v.return=p,p=v;break e}n(p,E);break}else t(p,E);E=E.sibling}y.type===qi?(v=_i(y.props.children,p.mode,x,y.key),v.return=p,p=v):(x=nu(y.type,y.key,y.props,null,p.mode,x),x.ref=ms(p,v,y),x.return=p,p=x)}return s(p);case Ki:e:{for(E=y.key;v!==null;){if(v.key===E)if(v.tag===4&&v.stateNode.containerInfo===y.containerInfo&&v.stateNode.implementation===y.implementation){n(p,v.sibling),v=i(v,y.children||[]),v.return=p,p=v;break e}else{n(p,v);break}else t(p,v);v=v.sibling}v=Id(y,p.mode,x),v.return=p,p=v}return s(p);case or:return E=y._init,S(p,v,E(y._payload),x)}if(Es(y))return g(p,v,y,x);if(cs(y))return m(p,v,y,x);bl(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,v!==null&&v.tag===6?(n(p,v.sibling),v=i(v,y),v.return=p,p=v):(n(p,v),v=Ad(y,p.mode,x),v.return=p,p=v),s(p)):n(p,v)}return S}var Wo=w1(!0),S1=w1(!1),il={},mn=Kr(il),aa=Kr(il),la=Kr(il);function ci(e){if(e===il)throw Error($(174));return e}function Yp(e,t){switch(fe(la,t),fe(aa,e),fe(mn,il),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Wf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Wf(t,e)}ye(mn),fe(mn,t)}function Qo(){ye(mn),ye(aa),ye(la)}function x1(e){ci(la.current);var t=ci(mn.current),n=Wf(t,e.type);t!==n&&(fe(aa,e),fe(mn,n))}function Xp(e){aa.current===e&&(ye(mn),ye(aa))}var xe=Kr(0);function $u(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 Rd=[];function Jp(){for(var e=0;e<Rd.length;e++)Rd[e]._workInProgressVersionPrimary=null;Rd.length=0}var Yl=Qn.ReactCurrentDispatcher,Td=Qn.ReactCurrentBatchConfig,ki=0,_e=null,Me=null,De=null,Mu=!1,Fs=!1,ua=0,LT=0;function Ge(){throw Error($(321))}function em(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Jt(e[n],t[n]))return!1;return!0}function tm(e,t,n,r,i,o){if(ki=o,_e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Yl.current=e===null||e.memoizedState===null?VT:zT,e=n(r,i),Fs){o=0;do{if(Fs=!1,ua=0,25<=o)throw Error($(301));o+=1,De=Me=null,t.updateQueue=null,Yl.current=BT,e=n(r,i)}while(Fs)}if(Yl.current=Ou,t=Me!==null&&Me.next!==null,ki=0,De=Me=_e=null,Mu=!1,t)throw Error($(300));return e}function nm(){var e=ua!==0;return ua=0,e}function on(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return De===null?_e.memoizedState=De=e:De=De.next=e,De}function jt(){if(Me===null){var e=_e.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=De===null?_e.memoizedState:De.next;if(t!==null)De=t,Me=e;else{if(e===null)throw Error($(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},De===null?_e.memoizedState=De=e:De=De.next=e}return De}function ca(e,t){return typeof t=="function"?t(e):t}function kd(e){var t=jt(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=Me,i=r.baseQueue,o=n.pending;if(o!==null){if(i!==null){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(i!==null){o=i.next,r=r.baseState;var a=s=null,l=null,u=o;do{var c=u.lane;if((ki&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,s=r):l=l.next=d,_e.lanes|=c,$i|=c}u=u.next}while(u!==null&&u!==o);l===null?s=r:l.next=a,Jt(r,t.memoizedState)||(ft=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do o=i.lane,_e.lanes|=o,$i|=o,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $d(e){var t=jt(),n=t.queue;if(n===null)throw Error($(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var s=i=i.next;do o=e(o,s.action),s=s.next;while(s!==i);Jt(o,t.memoizedState)||(ft=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function C1(){}function _1(e,t){var n=_e,r=jt(),i=t(),o=!Jt(r.memoizedState,i);if(o&&(r.memoizedState=i,ft=!0),r=r.queue,rm(E1.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||De!==null&&De.memoizedState.tag&1){if(n.flags|=2048,da(9,P1.bind(null,n,r,i,t),void 0,null),Le===null)throw Error($(349));ki&30||b1(n,t,i)}return i}function b1(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function P1(e,t,n,r){t.value=n,t.getSnapshot=r,R1(t)&&T1(e)}function E1(e,t,n){return n(function(){R1(t)&&T1(e)})}function R1(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Jt(e,n)}catch{return!0}}function T1(e){var t=Hn(e,1);t!==null&&qt(t,e,1,-1)}function Sv(e){var t=on();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:e},t.queue=e,e=e.dispatch=jT.bind(null,_e,e),[t.memoizedState,e]}function da(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=_e.updateQueue,t===null?(t={lastEffect:null,stores:null},_e.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function k1(){return jt().memoizedState}function Xl(e,t,n,r){var i=on();_e.flags|=e,i.memoizedState=da(1|t,n,void 0,r===void 0?null:r)}function Pc(e,t,n,r){var i=jt();r=r===void 0?null:r;var o=void 0;if(Me!==null){var s=Me.memoizedState;if(o=s.destroy,r!==null&&em(r,s.deps)){i.memoizedState=da(t,n,o,r);return}}_e.flags|=e,i.memoizedState=da(1|t,n,o,r)}function xv(e,t){return Xl(8390656,8,e,t)}function rm(e,t){return Pc(2048,8,e,t)}function $1(e,t){return Pc(4,2,e,t)}function M1(e,t){return Pc(4,4,e,t)}function O1(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function A1(e,t,n){return n=n!=null?n.concat([e]):null,Pc(4,4,O1.bind(null,t,e),n)}function im(){}function I1(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&em(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function D1(e,t){var n=jt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&em(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function L1(e,t,n){return ki&21?(Jt(n,t)||(n=jS(),_e.lanes|=n,$i|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,ft=!0),e.memoizedState=n)}function FT(e,t){var n=ue;ue=n!==0&&4>n?n:4,e(!0);var r=Td.transition;Td.transition={};try{e(!1),t()}finally{ue=n,Td.transition=r}}function F1(){return jt().memoizedState}function NT(e,t,n){var r=Mr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},N1(e))j1(t,n);else if(n=m1(e,t,n,r),n!==null){var i=rt();qt(n,e,r,i),V1(n,t,r)}}function jT(e,t,n){var r=Mr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(N1(e))j1(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Jt(a,s)){var l=t.interleaved;l===null?(i.next=i,qp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=m1(e,t,i,r),n!==null&&(i=rt(),qt(n,e,r,i),V1(n,t,r))}}function N1(e){var t=e.alternate;return e===_e||t!==null&&t===_e}function j1(e,t){Fs=Mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function V1(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Dp(e,n)}}var Ou={readContext:Nt,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useInsertionEffect:Ge,useLayoutEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useMutableSource:Ge,useSyncExternalStore:Ge,useId:Ge,unstable_isNewReconciler:!1},VT={readContext:Nt,useCallback:function(e,t){return on().memoizedState=[e,t===void 0?null:t],e},useContext:Nt,useEffect:xv,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Xl(4194308,4,O1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Xl(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xl(4,2,e,t)},useMemo:function(e,t){var n=on();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=on();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=NT.bind(null,_e,e),[r.memoizedState,e]},useRef:function(e){var t=on();return e={current:e},t.memoizedState=e},useState:Sv,useDebugValue:im,useDeferredValue:function(e){return on().memoizedState=e},useTransition:function(){var e=Sv(!1),t=e[0];return e=FT.bind(null,e[1]),on().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=_e,i=on();if(we){if(n===void 0)throw Error($(407));n=n()}else{if(n=t(),Le===null)throw Error($(349));ki&30||b1(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,xv(E1.bind(null,r,o,e),[e]),r.flags|=2048,da(9,P1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=on(),t=Le.identifierPrefix;if(we){var n=On,r=Mn;n=(r&~(1<<32-Kt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ua++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=LT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},zT={readContext:Nt,useCallback:I1,useContext:Nt,useEffect:rm,useImperativeHandle:A1,useInsertionEffect:$1,useLayoutEffect:M1,useMemo:D1,useReducer:kd,useRef:k1,useState:function(){return kd(ca)},useDebugValue:im,useDeferredValue:function(e){var t=jt();return L1(t,Me.memoizedState,e)},useTransition:function(){var e=kd(ca)[0],t=jt().memoizedState;return[e,t]},useMutableSource:C1,useSyncExternalStore:_1,useId:F1,unstable_isNewReconciler:!1},BT={readContext:Nt,useCallback:I1,useContext:Nt,useEffect:rm,useImperativeHandle:A1,useInsertionEffect:$1,useLayoutEffect:M1,useMemo:D1,useReducer:$d,useRef:k1,useState:function(){return $d(ca)},useDebugValue:im,useDeferredValue:function(e){var t=jt();return Me===null?t.memoizedState=e:L1(t,Me.memoizedState,e)},useTransition:function(){var e=$d(ca)[0],t=jt().memoizedState;return[e,t]},useMutableSource:C1,useSyncExternalStore:_1,useId:F1,unstable_isNewReconciler:!1};function Ko(e,t){try{var n="",r=t;do n+=gR(r),r=r.return;while(r);var i=n}catch(o){i=`
|
|
57
|
-
Error generating stack: `+o.message+`
|
|
58
|
-
`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Md(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function mh(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var UT=typeof WeakMap=="function"?WeakMap:Map;function z1(e,t,n){n=In(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Iu||(Iu=!0,Ph=r),mh(e,t)},n}function B1(e,t,n){n=In(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){mh(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){mh(e,t),typeof r!="function"&&($r===null?$r=new Set([this]):$r.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})}),n}function Cv(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new UT;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=rk.bind(null,e,t,n),t.then(e,e))}function _v(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function bv(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=In(-1,1),t.tag=2,kr(n,t,1))),n.lanes|=1),e)}var HT=Qn.ReactCurrentOwner,ft=!1;function nt(e,t,n,r){t.child=e===null?S1(t,null,n,r):Wo(t,e.child,n,r)}function Pv(e,t,n,r,i){n=n.render;var o=t.ref;return mo(t,i),r=tm(e,t,n,r,o,i),n=nm(),e!==null&&!ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gn(e,t,i)):(we&&n&&Up(t),t.flags|=1,nt(e,t,r,i),t.child)}function Ev(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!fm(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,U1(e,t,o,r,i)):(e=nu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var s=o.memoizedProps;if(n=n.compare,n=n!==null?n:ra,n(s,r)&&e.ref===t.ref)return Gn(e,t,i)}return t.flags|=1,e=Or(o,r),e.ref=t.ref,e.return=t,t.child=e}function U1(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(ra(o,r)&&e.ref===t.ref)if(ft=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(ft=!0);else return t.lanes=e.lanes,Gn(e,t,i)}return gh(e,t,n,r,i)}function H1(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},fe(oo,wt),wt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,fe(oo,wt),wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,fe(oo,wt),wt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,fe(oo,wt),wt|=r;return nt(e,t,i,n),t.child}function G1(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gh(e,t,n,r,i){var o=pt(n)?Ri:Xe.current;return o=Ho(t,o),mo(t,i),n=tm(e,t,n,r,o,i),r=nm(),e!==null&&!ft?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Gn(e,t,i)):(we&&r&&Up(t),t.flags|=1,nt(e,t,n,i),t.child)}function Rv(e,t,n,r,i){if(pt(n)){var o=!0;bu(t)}else o=!1;if(mo(t,i),t.stateNode===null)Jl(e,t),y1(t,n,r),ph(t,n,r,i),r=!0;else if(e===null){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,u=n.contextType;typeof u=="object"&&u!==null?u=Nt(u):(u=pt(n)?Ri:Xe.current,u=Ho(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof s.getSnapshotBeforeUpdate=="function";d||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==r||l!==u)&&yv(t,s,r,u),sr=!1;var f=t.memoizedState;s.state=f,ku(t,r,s,i),l=t.memoizedState,a!==r||f!==l||ht.current||sr?(typeof c=="function"&&(hh(t,n,c,r),l=t.memoizedState),(a=sr||vv(t,n,a,r,f,l,u))?(d||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=a):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,g1(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:Ut(t.type,a),s.props=u,d=t.pendingProps,f=s.context,l=n.contextType,typeof l=="object"&&l!==null?l=Nt(l):(l=pt(n)?Ri:Xe.current,l=Ho(t,l));var h=n.getDerivedStateFromProps;(c=typeof h=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==d||f!==l)&&yv(t,s,r,l),sr=!1,f=t.memoizedState,s.state=f,ku(t,r,s,i);var g=t.memoizedState;a!==d||f!==g||ht.current||sr?(typeof h=="function"&&(hh(t,n,h,r),g=t.memoizedState),(u=sr||vv(t,n,u,r,f,g,l)||!1)?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,g,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,g,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),s.props=r,s.state=g,s.context=l,r=u):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return vh(e,t,n,r,o,i)}function vh(e,t,n,r,i,o){G1(e,t);var s=(t.flags&128)!==0;if(!r&&!s)return i&&fv(t,n,!1),Gn(e,t,o);r=t.stateNode,HT.current=t;var a=s&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&s?(t.child=Wo(t,e.child,null,o),t.child=Wo(t,null,a,o)):nt(e,t,a,o),t.memoizedState=r.state,i&&fv(t,n,!0),t.child}function W1(e){var t=e.stateNode;t.pendingContext?dv(e,t.pendingContext,t.pendingContext!==t.context):t.context&&dv(e,t.context,!1),Yp(e,t.containerInfo)}function Tv(e,t,n,r,i){return Go(),Gp(i),t.flags|=256,nt(e,t,n,r),t.child}var yh={dehydrated:null,treeContext:null,retryLane:0};function wh(e){return{baseLanes:e,cachePool:null,transitions:null}}function Q1(e,t,n){var r=t.pendingProps,i=xe.current,o=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(i&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),fe(xe,i&1),e===null)return dh(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(s=r.children,e=r.fallback,o?(r=t.mode,o=t.child,s={mode:"hidden",children:s},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=s):o=Tc(s,r,0,null),e=_i(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=wh(n),t.memoizedState=yh,e):om(t,s));if(i=e.memoizedState,i!==null&&(a=i.dehydrated,a!==null))return GT(e,t,s,r,a,i,n);if(o){o=r.fallback,s=t.mode,i=e.child,a=i.sibling;var l={mode:"hidden",children:r.children};return!(s&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Or(i,l),r.subtreeFlags=i.subtreeFlags&14680064),a!==null?o=Or(a,o):(o=_i(o,s,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,s=e.child.memoizedState,s=s===null?wh(n):{baseLanes:s.baseLanes|n,cachePool:null,transitions:s.transitions},o.memoizedState=s,o.childLanes=e.childLanes&~n,t.memoizedState=yh,r}return o=e.child,e=o.sibling,r=Or(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function om(e,t){return t=Tc({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Pl(e,t,n,r){return r!==null&&Gp(r),Wo(t,e.child,null,n),e=om(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function GT(e,t,n,r,i,o,s){if(n)return t.flags&256?(t.flags&=-257,r=Md(Error($(422))),Pl(e,t,s,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Tc({mode:"visible",children:r.children},i,0,null),o=_i(o,i,s,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Wo(t,e.child,null,s),t.child.memoizedState=wh(s),t.memoizedState=yh,o);if(!(t.mode&1))return Pl(e,t,s,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error($(419)),r=Md(o,r,void 0),Pl(e,t,s,r)}if(a=(s&e.childLanes)!==0,ft||a){if(r=Le,r!==null){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|s)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,Hn(e,i),qt(r,e,i,-1))}return dm(),r=Md(Error($(421))),Pl(e,t,s,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=ik.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,St=Tr(i.nextSibling),Ct=t,we=!0,Wt=null,e!==null&&(It[Dt++]=Mn,It[Dt++]=On,It[Dt++]=Ti,Mn=e.id,On=e.overflow,Ti=t),t=om(t,r.children),t.flags|=4096,t)}function kv(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fh(e.return,t,n)}function Od(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function K1(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(nt(e,t,r.children,n),r=xe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&kv(e,n,t);else if(e.tag===19)kv(e,n,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}r&=1}if(fe(xe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&$u(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Od(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&$u(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Od(t,!0,n,null,o);break;case"together":Od(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Jl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Gn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$i|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,n=Or(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Or(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function WT(e,t,n){switch(t.tag){case 3:W1(t),Go();break;case 5:x1(t);break;case 1:pt(t.type)&&bu(t);break;case 4:Yp(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;fe(Ru,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(fe(xe,xe.current&1),t.flags|=128,null):n&t.child.childLanes?Q1(e,t,n):(fe(xe,xe.current&1),e=Gn(e,t,n),e!==null?e.sibling:null);fe(xe,xe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return K1(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),fe(xe,xe.current),r)break;return null;case 22:case 23:return t.lanes=0,H1(e,t,n)}return Gn(e,t,n)}var q1,Sh,Z1,Y1;q1=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Sh=function(){};Z1=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ci(mn.current);var o=null;switch(n){case"input":i=Bf(e,i),r=Bf(e,r),o=[];break;case"select":i=be({},i,{value:void 0}),r=be({},r,{value:void 0}),o=[];break;case"textarea":i=Gf(e,i),r=Gf(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Cu)}Qf(n,r);var s;n=null;for(u in i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u==="style"){var a=i[u];for(s in a)a.hasOwnProperty(s)&&(n||(n={}),n[s]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Zs.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var l=r[u];if(a=i!=null?i[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(s in a)!a.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||(n={}),n[s]="");for(s in l)l.hasOwnProperty(s)&&a[s]!==l[s]&&(n||(n={}),n[s]=l[s])}else n||(o||(o=[]),o.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(o=o||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(o=o||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Zs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&me("scroll",e),o||a===l||(o=[])):(o=o||[]).push(u,l))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}};Y1=function(e,t,n,r){n!==r&&(t.flags|=4)};function gs(e,t){if(!we)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function We(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function QT(e,t,n){var r=t.pendingProps;switch(Hp(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return pt(t.type)&&_u(),We(t),null;case 3:return r=t.stateNode,Qo(),ye(ht),ye(Xe),Jp(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(_l(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wt!==null&&(Th(Wt),Wt=null))),Sh(e,t),We(t),null;case 5:Xp(t);var i=ci(la.current);if(n=t.type,e!==null&&t.stateNode!=null)Z1(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error($(166));return We(t),null}if(e=ci(mn.current),_l(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[cn]=t,r[sa]=o,e=(t.mode&1)!==0,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(i=0;i<Ts.length;i++)me(Ts[i],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":Ng(r,o),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},me("invalid",r);break;case"textarea":Vg(r,o),me("invalid",r)}Qf(n,o),i=null;for(var s in o)if(o.hasOwnProperty(s)){var a=o[s];s==="children"?typeof a=="string"?r.textContent!==a&&(o.suppressHydrationWarning!==!0&&Cl(r.textContent,a,e),i=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(o.suppressHydrationWarning!==!0&&Cl(r.textContent,a,e),i=["children",""+a]):Zs.hasOwnProperty(s)&&a!=null&&s==="onScroll"&&me("scroll",r)}switch(n){case"input":pl(r),jg(r,o,!0);break;case"textarea":pl(r),zg(r);break;case"select":case"option":break;default:typeof o.onClick=="function"&&(r.onclick=Cu)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{s=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=bS(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=s.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[cn]=t,e[sa]=r,q1(e,t,!1,!1),t.stateNode=e;e:{switch(s=Kf(n,r),n){case"dialog":me("cancel",e),me("close",e),i=r;break;case"iframe":case"object":case"embed":me("load",e),i=r;break;case"video":case"audio":for(i=0;i<Ts.length;i++)me(Ts[i],e);i=r;break;case"source":me("error",e),i=r;break;case"img":case"image":case"link":me("error",e),me("load",e),i=r;break;case"details":me("toggle",e),i=r;break;case"input":Ng(e,r),i=Bf(e,r),me("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=be({},r,{value:void 0}),me("invalid",e);break;case"textarea":Vg(e,r),i=Gf(e,r),me("invalid",e);break;default:i=r}Qf(n,i),a=i;for(o in a)if(a.hasOwnProperty(o)){var l=a[o];o==="style"?RS(e,l):o==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&PS(e,l)):o==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&Ys(e,l):typeof l=="number"&&Ys(e,""+l):o!=="suppressContentEditableWarning"&&o!=="suppressHydrationWarning"&&o!=="autoFocus"&&(Zs.hasOwnProperty(o)?l!=null&&o==="onScroll"&&me("scroll",e):l!=null&&kp(e,o,l,s))}switch(n){case"input":pl(e),jg(e,r,!1);break;case"textarea":pl(e),zg(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Lr(r.value));break;case"select":e.multiple=!!r.multiple,o=r.value,o!=null?co(e,!!r.multiple,o,!1):r.defaultValue!=null&&co(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=Cu)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return We(t),null;case 6:if(e&&t.stateNode!=null)Y1(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error($(166));if(n=ci(la.current),ci(mn.current),_l(t)){if(r=t.stateNode,n=t.memoizedProps,r[cn]=t,(o=r.nodeValue!==n)&&(e=Ct,e!==null))switch(e.tag){case 3:Cl(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cl(r.nodeValue,n,(e.mode&1)!==0)}o&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[cn]=t,t.stateNode=r}return We(t),null;case 13:if(ye(xe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(we&&St!==null&&t.mode&1&&!(t.flags&128))p1(),Go(),t.flags|=98560,o=!1;else if(o=_l(t),r!==null&&r.dehydrated!==null){if(e===null){if(!o)throw Error($(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error($(317));o[cn]=t}else Go(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;We(t),o=!1}else Wt!==null&&(Th(Wt),Wt=null),o=!0;if(!o)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||xe.current&1?Oe===0&&(Oe=3):dm())),t.updateQueue!==null&&(t.flags|=4),We(t),null);case 4:return Qo(),Sh(e,t),e===null&&ia(t.stateNode.containerInfo),We(t),null;case 10:return Kp(t.type._context),We(t),null;case 17:return pt(t.type)&&_u(),We(t),null;case 19:if(ye(xe),o=t.memoizedState,o===null)return We(t),null;if(r=(t.flags&128)!==0,s=o.rendering,s===null)if(r)gs(o,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=$u(e),s!==null){for(t.flags|=128,gs(o,!1),r=s.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)o=n,e=r,o.flags&=14680066,s=o.alternate,s===null?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=s.childLanes,o.lanes=s.lanes,o.child=s.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=s.memoizedProps,o.memoizedState=s.memoizedState,o.updateQueue=s.updateQueue,o.type=s.type,e=s.dependencies,o.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return fe(xe,xe.current&1|2),t.child}e=e.sibling}o.tail!==null&&ke()>qo&&(t.flags|=128,r=!0,gs(o,!1),t.lanes=4194304)}else{if(!r)if(e=$u(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gs(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!we)return We(t),null}else 2*ke()-o.renderingStartTime>qo&&n!==1073741824&&(t.flags|=128,r=!0,gs(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ke(),t.sibling=null,n=xe.current,fe(xe,r?n&1|2:n&1),t):(We(t),null);case 22:case 23:return cm(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?wt&1073741824&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function KT(e,t){switch(Hp(t),t.tag){case 1:return pt(t.type)&&_u(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qo(),ye(ht),ye(Xe),Jp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Xp(t),null;case 13:if(ye(xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Go()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(xe),null;case 4:return Qo(),null;case 10:return Kp(t.type._context),null;case 22:case 23:return cm(),null;case 24:return null;default:return null}}var El=!1,qe=!1,qT=typeof WeakSet=="function"?WeakSet:Set,j=null;function io(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Ee(e,t,r)}else n.current=null}function xh(e,t,n){try{n()}catch(r){Ee(e,t,r)}}var $v=!1;function ZT(e,t){if(ih=wu,e=t1(),Bp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(oh={focusedElem:e,selectionRange:n},wu=!1,j=t;j!==null;)if(t=j,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,j=e;else for(;j!==null;){t=j;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,S=g.memoizedState,p=t.stateNode,v=p.getSnapshotBeforeUpdate(t.elementType===t.type?m:Ut(t.type,m),S);p.__reactInternalSnapshotBeforeUpdate=v}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(x){Ee(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,j=e;break}j=t.return}return g=$v,$v=!1,g}function Ns(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&xh(t,n,o)}i=i.next}while(i!==r)}}function Ec(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ch(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function X1(e){var t=e.alternate;t!==null&&(e.alternate=null,X1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[cn],delete t[sa],delete t[lh],delete t[OT],delete t[AT])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function J1(e){return e.tag===5||e.tag===3||e.tag===4}function Mv(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||J1(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.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 _h(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cu));else if(r!==4&&(e=e.child,e!==null))for(_h(e,t,n),e=e.sibling;e!==null;)_h(e,t,n),e=e.sibling}function bh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(bh(e,t,n),e=e.sibling;e!==null;)bh(e,t,n),e=e.sibling}var Fe=null,Gt=!1;function Xn(e,t,n){for(n=n.child;n!==null;)ex(e,t,n),n=n.sibling}function ex(e,t,n){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(yc,n)}catch{}switch(n.tag){case 5:qe||io(n,t);case 6:var r=Fe,i=Gt;Fe=null,Xn(e,t,n),Fe=r,Gt=i,Fe!==null&&(Gt?(e=Fe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Fe.removeChild(n.stateNode));break;case 18:Fe!==null&&(Gt?(e=Fe,n=n.stateNode,e.nodeType===8?Pd(e.parentNode,n):e.nodeType===1&&Pd(e,n),ta(e)):Pd(Fe,n.stateNode));break;case 4:r=Fe,i=Gt,Fe=n.stateNode.containerInfo,Gt=!0,Xn(e,t,n),Fe=r,Gt=i;break;case 0:case 11:case 14:case 15:if(!qe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&xh(n,t,s),i=i.next}while(i!==r)}Xn(e,t,n);break;case 1:if(!qe&&(io(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Ee(n,t,a)}Xn(e,t,n);break;case 21:Xn(e,t,n);break;case 22:n.mode&1?(qe=(r=qe)||n.memoizedState!==null,Xn(e,t,n),qe=r):Xn(e,t,n);break;default:Xn(e,t,n)}}function Ov(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qT),t.forEach(function(r){var i=ok.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Bt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,a=s;e:for(;a!==null;){switch(a.tag){case 5:Fe=a.stateNode,Gt=!1;break e;case 3:Fe=a.stateNode.containerInfo,Gt=!0;break e;case 4:Fe=a.stateNode.containerInfo,Gt=!0;break e}a=a.return}if(Fe===null)throw Error($(160));ex(o,s,i),Fe=null,Gt=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(u){Ee(i,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)tx(t,e),t=t.sibling}function tx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),rn(e),r&4){try{Ns(3,e,e.return),Ec(3,e)}catch(m){Ee(e,e.return,m)}try{Ns(5,e,e.return)}catch(m){Ee(e,e.return,m)}}break;case 1:Bt(t,e),rn(e),r&512&&n!==null&&io(n,n.return);break;case 5:if(Bt(t,e),rn(e),r&512&&n!==null&&io(n,n.return),e.flags&32){var i=e.stateNode;try{Ys(i,"")}catch(m){Ee(e,e.return,m)}}if(r&4&&(i=e.stateNode,i!=null)){var o=e.memoizedProps,s=n!==null?n.memoizedProps:o,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&o.type==="radio"&&o.name!=null&&CS(i,o),Kf(a,s);var u=Kf(a,o);for(s=0;s<l.length;s+=2){var c=l[s],d=l[s+1];c==="style"?RS(i,d):c==="dangerouslySetInnerHTML"?PS(i,d):c==="children"?Ys(i,d):kp(i,c,d,u)}switch(a){case"input":Uf(i,o);break;case"textarea":_S(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var h=o.value;h!=null?co(i,!!o.multiple,h,!1):f!==!!o.multiple&&(o.defaultValue!=null?co(i,!!o.multiple,o.defaultValue,!0):co(i,!!o.multiple,o.multiple?[]:"",!1))}i[sa]=o}catch(m){Ee(e,e.return,m)}}break;case 6:if(Bt(t,e),rn(e),r&4){if(e.stateNode===null)throw Error($(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(m){Ee(e,e.return,m)}}break;case 3:if(Bt(t,e),rn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ta(t.containerInfo)}catch(m){Ee(e,e.return,m)}break;case 4:Bt(t,e),rn(e);break;case 13:Bt(t,e),rn(e),i=e.child,i.flags&8192&&(o=i.memoizedState!==null,i.stateNode.isHidden=o,!o||i.alternate!==null&&i.alternate.memoizedState!==null||(lm=ke())),r&4&&Ov(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(qe=(u=qe)||c,Bt(t,e),qe=u):Bt(t,e),rn(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(j=e,c=e.child;c!==null;){for(d=j=c;j!==null;){switch(f=j,h=f.child,f.tag){case 0:case 11:case 14:case 15:Ns(4,f,f.return);break;case 1:io(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){r=f,n=f.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){Ee(r,n,m)}}break;case 5:io(f,f.return);break;case 22:if(f.memoizedState!==null){Iv(d);continue}}h!==null?(h.return=f,j=h):Iv(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{i=d.stateNode,u?(o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none"):(a=d.stateNode,l=d.memoizedProps.style,s=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=ES("display",s))}catch(m){Ee(e,e.return,m)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(m){Ee(e,e.return,m)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:Bt(t,e),rn(e),r&4&&Ov(e);break;case 21:break;default:Bt(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(J1(n)){var r=n;break e}n=n.return}throw Error($(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(Ys(i,""),r.flags&=-33);var o=Mv(e);bh(e,o,i);break;case 3:case 4:var s=r.stateNode.containerInfo,a=Mv(e);_h(e,a,s);break;default:throw Error($(161))}}catch(l){Ee(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function YT(e,t,n){j=e,nx(e)}function nx(e,t,n){for(var r=(e.mode&1)!==0;j!==null;){var i=j,o=i.child;if(i.tag===22&&r){var s=i.memoizedState!==null||El;if(!s){var a=i.alternate,l=a!==null&&a.memoizedState!==null||qe;a=El;var u=qe;if(El=s,(qe=l)&&!u)for(j=i;j!==null;)s=j,l=s.child,s.tag===22&&s.memoizedState!==null?Dv(i):l!==null?(l.return=s,j=l):Dv(i);for(;o!==null;)j=o,nx(o),o=o.sibling;j=i,El=a,qe=u}Av(e)}else i.subtreeFlags&8772&&o!==null?(o.return=i,j=o):Av(e)}}function Av(e){for(;j!==null;){var t=j;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:qe||Ec(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!qe)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Ut(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&gv(t,o,r);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}gv(t,s,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ta(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}qe||t.flags&512&&Ch(t)}catch(f){Ee(t,t.return,f)}}if(t===e){j=null;break}if(n=t.sibling,n!==null){n.return=t.return,j=n;break}j=t.return}}function Iv(e){for(;j!==null;){var t=j;if(t===e){j=null;break}var n=t.sibling;if(n!==null){n.return=t.return,j=n;break}j=t.return}}function Dv(e){for(;j!==null;){var t=j;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ec(4,t)}catch(l){Ee(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Ee(t,i,l)}}var o=t.return;try{Ch(t)}catch(l){Ee(t,o,l)}break;case 5:var s=t.return;try{Ch(t)}catch(l){Ee(t,s,l)}}}catch(l){Ee(t,t.return,l)}if(t===e){j=null;break}var a=t.sibling;if(a!==null){a.return=t.return,j=a;break}j=t.return}}var XT=Math.ceil,Au=Qn.ReactCurrentDispatcher,sm=Qn.ReactCurrentOwner,Ft=Qn.ReactCurrentBatchConfig,oe=0,Le=null,$e=null,Ve=0,wt=0,oo=Kr(0),Oe=0,fa=null,$i=0,Rc=0,am=0,js=null,ct=null,lm=0,qo=1/0,Pn=null,Iu=!1,Ph=null,$r=null,Rl=!1,xr=null,Du=0,Vs=0,Eh=null,eu=-1,tu=0;function rt(){return oe&6?ke():eu!==-1?eu:eu=ke()}function Mr(e){return e.mode&1?oe&2&&Ve!==0?Ve&-Ve:DT.transition!==null?(tu===0&&(tu=jS()),tu):(e=ue,e!==0||(e=window.event,e=e===void 0?16:WS(e.type)),e):1}function qt(e,t,n,r){if(50<Vs)throw Vs=0,Eh=null,Error($(185));tl(e,n,r),(!(oe&2)||e!==Le)&&(e===Le&&(!(oe&2)&&(Rc|=n),Oe===4&&cr(e,Ve)),mt(e,r),n===1&&oe===0&&!(t.mode&1)&&(qo=ke()+500,_c&&qr()))}function mt(e,t){var n=e.callbackNode;DR(e,t);var r=yu(e,e===Le?Ve:0);if(r===0)n!==null&&Hg(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Hg(n),t===1)e.tag===0?IT(Lv.bind(null,e)):d1(Lv.bind(null,e)),$T(function(){!(oe&6)&&qr()}),n=null;else{switch(VS(r)){case 1:n=Ip;break;case 4:n=FS;break;case 16:n=vu;break;case 536870912:n=NS;break;default:n=vu}n=cx(n,rx.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function rx(e,t){if(eu=-1,tu=0,oe&6)throw Error($(327));var n=e.callbackNode;if(go()&&e.callbackNode!==n)return null;var r=yu(e,e===Le?Ve:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Lu(e,r);else{t=r;var i=oe;oe|=2;var o=ox();(Le!==e||Ve!==t)&&(Pn=null,qo=ke()+500,Ci(e,t));do try{tk();break}catch(a){ix(e,a)}while(!0);Qp(),Au.current=o,oe=i,$e!==null?t=0:(Le=null,Ve=0,t=Oe)}if(t!==0){if(t===2&&(i=Jf(e),i!==0&&(r=i,t=Rh(e,i))),t===1)throw n=fa,Ci(e,0),cr(e,r),mt(e,ke()),n;if(t===6)cr(e,r);else{if(i=e.current.alternate,!(r&30)&&!JT(i)&&(t=Lu(e,r),t===2&&(o=Jf(e),o!==0&&(r=o,t=Rh(e,o))),t===1))throw n=fa,Ci(e,0),cr(e,r),mt(e,ke()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error($(345));case 2:ni(e,ct,Pn);break;case 3:if(cr(e,r),(r&130023424)===r&&(t=lm+500-ke(),10<t)){if(yu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){rt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ah(ni.bind(null,e,ct,Pn),t);break}ni(e,ct,Pn);break;case 4:if(cr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-Kt(r);o=1<<s,s=t[s],s>i&&(i=s),r&=~o}if(r=i,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*XT(r/1960))-r,10<r){e.timeoutHandle=ah(ni.bind(null,e,ct,Pn),r);break}ni(e,ct,Pn);break;case 5:ni(e,ct,Pn);break;default:throw Error($(329))}}}return mt(e,ke()),e.callbackNode===n?rx.bind(null,e):null}function Rh(e,t){var n=js;return e.current.memoizedState.isDehydrated&&(Ci(e,t).flags|=256),e=Lu(e,t),e!==2&&(t=ct,ct=n,t!==null&&Th(t)),e}function Th(e){ct===null?ct=e:ct.push.apply(ct,e)}function JT(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Jt(o(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;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 cr(e,t){for(t&=~am,t&=~Rc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Kt(t),r=1<<n;e[n]=-1,t&=~r}}function Lv(e){if(oe&6)throw Error($(327));go();var t=yu(e,0);if(!(t&1))return mt(e,ke()),null;var n=Lu(e,t);if(e.tag!==0&&n===2){var r=Jf(e);r!==0&&(t=r,n=Rh(e,r))}if(n===1)throw n=fa,Ci(e,0),cr(e,t),mt(e,ke()),n;if(n===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,ni(e,ct,Pn),mt(e,ke()),null}function um(e,t){var n=oe;oe|=1;try{return e(t)}finally{oe=n,oe===0&&(qo=ke()+500,_c&&qr())}}function Mi(e){xr!==null&&xr.tag===0&&!(oe&6)&&go();var t=oe;oe|=1;var n=Ft.transition,r=ue;try{if(Ft.transition=null,ue=1,e)return e()}finally{ue=r,Ft.transition=n,oe=t,!(oe&6)&&qr()}}function cm(){wt=oo.current,ye(oo)}function Ci(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,kT(n)),$e!==null)for(n=$e.return;n!==null;){var r=n;switch(Hp(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&_u();break;case 3:Qo(),ye(ht),ye(Xe),Jp();break;case 5:Xp(r);break;case 4:Qo();break;case 13:ye(xe);break;case 19:ye(xe);break;case 10:Kp(r.type._context);break;case 22:case 23:cm()}n=n.return}if(Le=e,$e=e=Or(e.current,null),Ve=wt=t,Oe=0,fa=null,am=Rc=$i=0,ct=js=null,ui!==null){for(t=0;t<ui.length;t++)if(n=ui[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,o=n.pending;if(o!==null){var s=o.next;o.next=i,r.next=s}n.pending=r}ui=null}return e}function ix(e,t){do{var n=$e;try{if(Qp(),Yl.current=Ou,Mu){for(var r=_e.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Mu=!1}if(ki=0,De=Me=_e=null,Fs=!1,ua=0,sm.current=null,n===null||n.return===null){Oe=1,fa=t,$e=null;break}e:{var o=e,s=n.return,a=n,l=t;if(t=Ve,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var f=c.alternate;f?(c.updateQueue=f.updateQueue,c.memoizedState=f.memoizedState,c.lanes=f.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=_v(s);if(h!==null){h.flags&=-257,bv(h,s,a,o,t),h.mode&1&&Cv(o,u,t),t=h,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if(!(t&1)){Cv(o,u,t),dm();break e}l=Error($(426))}}else if(we&&a.mode&1){var S=_v(s);if(S!==null){!(S.flags&65536)&&(S.flags|=256),bv(S,s,a,o,t),Gp(Ko(l,a));break e}}o=l=Ko(l,a),Oe!==4&&(Oe=2),js===null?js=[o]:js.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var p=z1(o,l,t);mv(o,p);break e;case 1:a=l;var v=o.type,y=o.stateNode;if(!(o.flags&128)&&(typeof v.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&($r===null||!$r.has(y)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=B1(o,a,t);mv(o,x);break e}}o=o.return}while(o!==null)}ax(n)}catch(_){t=_,$e===n&&n!==null&&($e=n=n.return);continue}break}while(!0)}function ox(){var e=Au.current;return Au.current=Ou,e===null?Ou:e}function dm(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Le===null||!($i&268435455)&&!(Rc&268435455)||cr(Le,Ve)}function Lu(e,t){var n=oe;oe|=2;var r=ox();(Le!==e||Ve!==t)&&(Pn=null,Ci(e,t));do try{ek();break}catch(i){ix(e,i)}while(!0);if(Qp(),oe=n,Au.current=r,$e!==null)throw Error($(261));return Le=null,Ve=0,Oe}function ek(){for(;$e!==null;)sx($e)}function tk(){for(;$e!==null&&!ER();)sx($e)}function sx(e){var t=ux(e.alternate,e,wt);e.memoizedProps=e.pendingProps,t===null?ax(e):$e=t,sm.current=null}function ax(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KT(n,t),n!==null){n.flags&=32767,$e=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,$e=null;return}}else if(n=QT(n,t,wt),n!==null){$e=n;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Oe===0&&(Oe=5)}function ni(e,t,n){var r=ue,i=Ft.transition;try{Ft.transition=null,ue=1,nk(e,t,n,r)}finally{Ft.transition=i,ue=r}return null}function nk(e,t,n,r){do go();while(xr!==null);if(oe&6)throw Error($(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(LR(e,o),e===Le&&($e=Le=null,Ve=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Rl||(Rl=!0,cx(vu,function(){return go(),null})),o=(n.flags&15990)!==0,n.subtreeFlags&15990||o){o=Ft.transition,Ft.transition=null;var s=ue;ue=1;var a=oe;oe|=4,sm.current=null,ZT(e,n),tx(n,e),CT(oh),wu=!!ih,oh=ih=null,e.current=n,YT(n),RR(),oe=a,ue=s,Ft.transition=o}else e.current=n;if(Rl&&(Rl=!1,xr=e,Du=i),o=e.pendingLanes,o===0&&($r=null),$R(n.stateNode),mt(e,ke()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Iu)throw Iu=!1,e=Ph,Ph=null,e;return Du&1&&e.tag!==0&&go(),o=e.pendingLanes,o&1?e===Eh?Vs++:(Vs=0,Eh=e):Vs=0,qr(),null}function go(){if(xr!==null){var e=VS(Du),t=Ft.transition,n=ue;try{if(Ft.transition=null,ue=16>e?16:e,xr===null)var r=!1;else{if(e=xr,xr=null,Du=0,oe&6)throw Error($(331));var i=oe;for(oe|=4,j=e.current;j!==null;){var o=j,s=o.child;if(j.flags&16){var a=o.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(j=u;j!==null;){var c=j;switch(c.tag){case 0:case 11:case 15:Ns(8,c,o)}var d=c.child;if(d!==null)d.return=c,j=d;else for(;j!==null;){c=j;var f=c.sibling,h=c.return;if(X1(c),c===u){j=null;break}if(f!==null){f.return=h,j=f;break}j=h}}}var g=o.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var S=m.sibling;m.sibling=null,m=S}while(m!==null)}}j=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,j=s;else e:for(;j!==null;){if(o=j,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Ns(9,o,o.return)}var p=o.sibling;if(p!==null){p.return=o.return,j=p;break e}j=o.return}}var v=e.current;for(j=v;j!==null;){s=j;var y=s.child;if(s.subtreeFlags&2064&&y!==null)y.return=s,j=y;else e:for(s=v;j!==null;){if(a=j,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ec(9,a)}}catch(_){Ee(a,a.return,_)}if(a===s){j=null;break e}var x=a.sibling;if(x!==null){x.return=a.return,j=x;break e}j=a.return}}if(oe=i,qr(),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(yc,e)}catch{}r=!0}return r}finally{ue=n,Ft.transition=t}}return!1}function Fv(e,t,n){t=Ko(n,t),t=z1(e,t,1),e=kr(e,t,1),t=rt(),e!==null&&(tl(e,1,t),mt(e,t))}function Ee(e,t,n){if(e.tag===3)Fv(e,e,n);else for(;t!==null;){if(t.tag===3){Fv(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&($r===null||!$r.has(r))){e=Ko(n,e),e=B1(t,e,1),t=kr(t,e,1),e=rt(),t!==null&&(tl(t,1,e),mt(t,e));break}}t=t.return}}function rk(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=rt(),e.pingedLanes|=e.suspendedLanes&n,Le===e&&(Ve&n)===n&&(Oe===4||Oe===3&&(Ve&130023424)===Ve&&500>ke()-lm?Ci(e,0):am|=n),mt(e,t)}function lx(e,t){t===0&&(e.mode&1?(t=vl,vl<<=1,!(vl&130023424)&&(vl=4194304)):t=1);var n=rt();e=Hn(e,t),e!==null&&(tl(e,t,n),mt(e,n))}function ik(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),lx(e,n)}function ok(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error($(314))}r!==null&&r.delete(t),lx(e,n)}var ux;ux=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||ht.current)ft=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ft=!1,WT(e,t,n);ft=!!(e.flags&131072)}else ft=!1,we&&t.flags&1048576&&f1(t,Eu,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Jl(e,t),e=t.pendingProps;var i=Ho(t,Xe.current);mo(t,n),i=tm(null,t,r,e,i,n);var o=nm();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(o=!0,bu(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Zp(t),i.updater=bc,t.stateNode=i,i._reactInternals=t,ph(t,r,e,n),t=vh(null,t,r,!0,o,n)):(t.tag=0,we&&o&&Up(t),nt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Jl(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=ak(r),e=Ut(r,e),i){case 0:t=gh(null,t,r,e,n);break e;case 1:t=Rv(null,t,r,e,n);break e;case 11:t=Pv(null,t,r,e,n);break e;case 14:t=Ev(null,t,r,Ut(r.type,e),n);break e}throw Error($(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ut(r,i),gh(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ut(r,i),Rv(e,t,r,i,n);case 3:e:{if(W1(t),e===null)throw Error($(387));r=t.pendingProps,o=t.memoizedState,i=o.element,g1(e,t),ku(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ko(Error($(423)),t),t=Tv(e,t,r,n,i);break e}else if(r!==i){i=Ko(Error($(424)),t),t=Tv(e,t,r,n,i);break e}else for(St=Tr(t.stateNode.containerInfo.firstChild),Ct=t,we=!0,Wt=null,n=S1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Go(),r===i){t=Gn(e,t,n);break e}nt(e,t,r,n)}t=t.child}return t;case 5:return x1(t),e===null&&dh(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,sh(r,i)?s=null:o!==null&&sh(r,o)&&(t.flags|=32),G1(e,t),nt(e,t,s,n),t.child;case 6:return e===null&&dh(t),null;case 13:return Q1(e,t,n);case 4:return Yp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Wo(t,null,r,n):nt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ut(r,i),Pv(e,t,r,i,n);case 7:return nt(e,t,t.pendingProps,n),t.child;case 8:return nt(e,t,t.pendingProps.children,n),t.child;case 12:return nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,fe(Ru,r._currentValue),r._currentValue=s,o!==null)if(Jt(o.value,s)){if(o.children===i.children&&!ht.current){t=Gn(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=In(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),fh(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error($(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),fh(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}nt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,mo(t,n),i=Nt(i),r=r(i),t.flags|=1,nt(e,t,r,n),t.child;case 14:return r=t.type,i=Ut(r,t.pendingProps),i=Ut(r.type,i),Ev(e,t,r,i,n);case 15:return U1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ut(r,i),Jl(e,t),t.tag=1,pt(r)?(e=!0,bu(t)):e=!1,mo(t,n),y1(t,r,i),ph(t,r,i,n),vh(null,t,r,!0,e,n);case 19:return K1(e,t,n);case 22:return H1(e,t,n)}throw Error($(156,t.tag))};function cx(e,t){return LS(e,t)}function sk(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lt(e,t,n,r){return new sk(e,t,n,r)}function fm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ak(e){if(typeof e=="function")return fm(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Mp)return 11;if(e===Op)return 14}return 2}function Or(e,t){var n=e.alternate;return n===null?(n=Lt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function nu(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")fm(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case qi:return _i(n.children,i,o,t);case $p:s=8,i|=8;break;case Nf:return e=Lt(12,n,t,i|2),e.elementType=Nf,e.lanes=o,e;case jf:return e=Lt(13,n,t,i),e.elementType=jf,e.lanes=o,e;case Vf:return e=Lt(19,n,t,i),e.elementType=Vf,e.lanes=o,e;case wS:return Tc(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case vS:s=10;break e;case yS:s=9;break e;case Mp:s=11;break e;case Op:s=14;break e;case or:s=16,r=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=Lt(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function _i(e,t,n,r){return e=Lt(7,e,r,t),e.lanes=n,e}function Tc(e,t,n,r){return e=Lt(22,e,r,t),e.elementType=wS,e.lanes=n,e.stateNode={isHidden:!1},e}function Ad(e,t,n){return e=Lt(6,e,null,t),e.lanes=n,e}function Id(e,t,n){return t=Lt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lk(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pd(0),this.expirationTimes=pd(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pd(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function hm(e,t,n,r,i,o,s,a,l){return e=new lk(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Lt(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Zp(o),e}function uk(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Ki,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function dx(e){if(!e)return Fr;e=e._reactInternals;e:{if(Ni(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var n=e.type;if(pt(n))return c1(e,n,t)}return t}function fx(e,t,n,r,i,o,s,a,l){return e=hm(n,r,!0,e,i,o,s,a,l),e.context=dx(null),n=e.current,r=rt(),i=Mr(n),o=In(r,i),o.callback=t??null,kr(n,o,i),e.current.lanes=i,tl(e,i,r),mt(e,r),e}function kc(e,t,n,r){var i=t.current,o=rt(),s=Mr(i);return n=dx(n),t.context===null?t.context=n:t.pendingContext=n,t=In(o,s),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=kr(i,t,s),e!==null&&(qt(e,i,s,o),Zl(e,i,s)),s}function Fu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Nv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function pm(e,t){Nv(e,t),(e=e.alternate)&&Nv(e,t)}function ck(){return null}var hx=typeof reportError=="function"?reportError:function(e){console.error(e)};function mm(e){this._internalRoot=e}$c.prototype.render=mm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));kc(e,t,null,null)};$c.prototype.unmount=mm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mi(function(){kc(null,e,null,null)}),t[Un]=null}};function $c(e){this._internalRoot=e}$c.prototype.unstable_scheduleHydration=function(e){if(e){var t=US();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ur.length&&t!==0&&t<ur[n].priority;n++);ur.splice(n,0,e),n===0&&GS(e)}};function gm(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Mc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function jv(){}function dk(e,t,n,r,i){if(i){if(typeof r=="function"){var o=r;r=function(){var u=Fu(s);o.call(u)}}var s=fx(t,r,e,0,null,!1,!1,"",jv);return e._reactRootContainer=s,e[Un]=s.current,ia(e.nodeType===8?e.parentNode:e),Mi(),s}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var a=r;r=function(){var u=Fu(l);a.call(u)}}var l=hm(e,0,!1,null,null,!1,!1,"",jv);return e._reactRootContainer=l,e[Un]=l.current,ia(e.nodeType===8?e.parentNode:e),Mi(function(){kc(t,l,n,r)}),l}function Oc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var s=o;if(typeof i=="function"){var a=i;i=function(){var l=Fu(s);a.call(l)}}kc(t,s,e,i)}else s=dk(n,t,e,i,r);return Fu(s)}zS=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Rs(t.pendingLanes);n!==0&&(Dp(t,n|1),mt(t,ke()),!(oe&6)&&(qo=ke()+500,qr()))}break;case 13:Mi(function(){var r=Hn(e,1);if(r!==null){var i=rt();qt(r,e,1,i)}}),pm(e,1)}};Lp=function(e){if(e.tag===13){var t=Hn(e,134217728);if(t!==null){var n=rt();qt(t,e,134217728,n)}pm(e,134217728)}};BS=function(e){if(e.tag===13){var t=Mr(e),n=Hn(e,t);if(n!==null){var r=rt();qt(n,e,t,r)}pm(e,t)}};US=function(){return ue};HS=function(e,t){var n=ue;try{return ue=e,t()}finally{ue=n}};Zf=function(e,t,n){switch(t){case"input":if(Uf(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Cc(r);if(!i)throw Error($(90));xS(r),Uf(r,i)}}}break;case"textarea":_S(e,n);break;case"select":t=n.value,t!=null&&co(e,!!n.multiple,t,!1)}};$S=um;MS=Mi;var fk={usingClientEntryPoint:!1,Events:[rl,Ji,Cc,TS,kS,um]},vs={findFiberByHostInstance:li,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},hk={bundleType:vs.bundleType,version:vs.version,rendererPackageName:vs.rendererPackageName,rendererConfig:vs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=IS(e),e===null?null:e.stateNode},findFiberByHostInstance:vs.findFiberByHostInstance||ck,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Tl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Tl.isDisabled&&Tl.supportsFiber)try{yc=Tl.inject(hk),pn=Tl}catch{}}Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fk;Et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!gm(t))throw Error($(200));return uk(e,t,null,n)};Et.createRoot=function(e,t){if(!gm(e))throw Error($(299));var n=!1,r="",i=hx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=hm(e,1,!1,null,null,n,!1,r,i),e[Un]=t.current,ia(e.nodeType===8?e.parentNode:e),new mm(t)};Et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=IS(t),e=e===null?null:e.stateNode,e};Et.flushSync=function(e){return Mi(e)};Et.hydrate=function(e,t,n){if(!Mc(t))throw Error($(200));return Oc(null,e,t,!0,n)};Et.hydrateRoot=function(e,t,n){if(!gm(e))throw Error($(405));var r=n!=null&&n.hydratedSources||null,i=!1,o="",s=hx;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=fx(t,null,e,1,n??null,i,!1,o,s),e[Un]=t.current,ia(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new $c(t)};Et.render=function(e,t,n){if(!Mc(t))throw Error($(200));return Oc(null,e,t,!1,n)};Et.unmountComponentAtNode=function(e){if(!Mc(e))throw Error($(40));return e._reactRootContainer?(Mi(function(){Oc(null,null,e,!1,function(){e._reactRootContainer=null,e[Un]=null})}),!0):!1};Et.unstable_batchedUpdates=um;Et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Mc(n))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return Oc(e,t,n,!1,r)};Et.version="18.2.0-next-9e3b772b8-20220608";function px(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(px)}catch(e){console.error(e)}}px(),fS.exports=Et;var Ac=fS.exports;const pk=fp(Ac);var mx,Vv=Ac;mx=Vv.createRoot,Vv.hydrateRoot;function ai(e,t,n){const r=e.flatMap(i=>i.split("."));if(!t&&(!n||n==="any"))return r.length?[r]:[];if(n==="infinite"&&Bo(t)&&("direction"in t||"cursor"in t)){const{cursor:i,direction:o,...s}=t;return[r,{input:s,type:"infinite"}]}return[r,{...typeof t<"u"&&t!==zo&&{input:t},...n&&n!=="any"&&{type:n}}]}function mk(e,t){return gc(({path:n,args:r})=>{const i=[e,...n],o=i.pop();if(o==="useMutation")return t[o](i,...r);if(o==="_def")return{path:i};const[s,...a]=r,l=a[0]||{};return t[o](i,s,l)})}const gk=["client","ssrContext","ssrState","abortOnUnmount"];var cw;const vk=(cw=w.createContext)==null?void 0:cw.call(w,null),yk=e=>{switch(e){case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":return"query";case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function wk(e,t){return gc(n=>{const r=[t,...n.path],i=r.pop(),o=[...n.args],s=o.shift(),a=yk(i),l=ai(r,s,a);return{fetch:()=>e.fetchQuery(l,...o),fetchInfinite:()=>e.fetchInfiniteQuery(l,o[0]),prefetch:()=>e.prefetchQuery(l,...o),prefetchInfinite:()=>e.prefetchInfiniteQuery(l,o[0]),ensureData:()=>e.ensureQueryData(l,...o),invalidate:()=>e.invalidateQueries(l,...o),reset:()=>e.resetQueries(l,...o),refetch:()=>e.refetchQueries(l,...o),cancel:()=>e.cancelQuery(l,...o),setData:()=>{e.setQueryData(l,o[0],o[1])},setInfiniteData:()=>{e.setInfiniteQueryData(l,o[0],o[1])},getData:()=>e.getQueryData(l),getInfiniteData:()=>e.getInfiniteQueryData(l)}[i]()})}function Sk(e){return vc(t=>{const n=t;return n==="client"?ZE(e.client):gk.includes(n)?e[n]:wk(e,t)})}function dn(e,t,n){var o;const r=e[0];let i=(o=e[1])==null?void 0:o.input;return n&&(i={...i??{},...n.pageParam?{cursor:n.pageParam}:{},direction:n.direction}),[r.join("."),i,t==null?void 0:t.trpc]}function ys(e){const t=e.path.join(".");return w.useMemo(()=>({path:t}),[t])}function xk(e){const{client:t,queryClient:n}=e,r=t instanceof uS?t:YE(t);return{fetchQuery:(i,o)=>n.fetchQuery({...o,queryKey:i,queryFn:()=>r.query(...dn(i,o))}),fetchInfiniteQuery:(i,o)=>n.fetchInfiniteQuery({...o,queryKey:i,queryFn:({pageParam:s,direction:a})=>r.query(...dn(i,o,{pageParam:s,direction:a})),initialPageParam:(o==null?void 0:o.initialCursor)??null}),prefetchQuery:(i,o)=>n.prefetchQuery({...o,queryKey:i,queryFn:()=>r.query(...dn(i,o))}),prefetchInfiniteQuery:(i,o)=>n.prefetchInfiniteQuery({...o,queryKey:i,queryFn:({pageParam:s,direction:a})=>r.query(...dn(i,o,{pageParam:s,direction:a})),initialPageParam:(o==null?void 0:o.initialCursor)??null}),ensureQueryData:(i,o)=>n.ensureQueryData({...o,queryKey:i,queryFn:()=>r.query(...dn(i,o))}),invalidateQueries:(i,o,s)=>n.invalidateQueries({...o,queryKey:i},s),resetQueries:(i,o,s)=>n.resetQueries({...o,queryKey:i},s),refetchQueries:(i,o,s)=>n.refetchQueries({...o,queryKey:i},s),cancelQuery:(i,o)=>n.cancelQueries({queryKey:i},o),setQueryData:(i,o,s)=>n.setQueryData(i,o,s),getQueryData:i=>n.getQueryData(i),setInfiniteQueryData:(i,o,s)=>n.setQueryData(i,o,s),getInfiniteQueryData:i=>n.getQueryData(i)}}function zv(e){return gc(t=>{const n=t.path,r=n.join("."),[i,o]=t.args;return{queryKey:ai(n,i,"query"),queryFn:()=>e.query(r,i,o==null?void 0:o.trpc),...o}})}function Ck(e){var m,S;const t=((S=(m=e==null?void 0:e.overrides)==null?void 0:m.useMutation)==null?void 0:S.onSuccess)??(p=>p.originalFn()),n=(e==null?void 0:e.context)??vk,r=p=>QE(p),i=p=>{const{abortOnUnmount:v=!1,client:y,queryClient:x,ssrContext:_}=p,[E,R]=w.useState(p.ssrState??!1),b=w.useMemo(()=>xk({client:y,queryClient:x}),[y,x]),T=w.useMemo(()=>({abortOnUnmount:v,queryClient:x,client:y,ssrContext:_??null,ssrState:E,...b}),[v,y,b,x,_,E]);return w.useEffect(()=>{R(k=>k?"mounted":!1)},[]),w.createElement(n.Provider,{value:T},p.children)};function o(){const p=w.useContext(n);if(!p)throw new Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return p}function s(p,v){var _;const{queryClient:y,ssrState:x}=o();return x&&x!=="mounted"&&((_=y.getQueryCache().find({queryKey:p}))==null?void 0:_.state.status)==="error"?{retryOnMount:!1,...v}:v}function a(p,v,y){var re,q;const x=o(),{abortOnUnmount:_,client:E,ssrState:R,queryClient:b,prefetchQuery:T}=x,k=ai(p,v,"query"),I=b.getQueryDefaults(k),L=v===zo;typeof window>"u"&&R==="prepass"&&((re=y==null?void 0:y.trpc)==null?void 0:re.ssr)!==!1&&((y==null?void 0:y.enabled)??(I==null?void 0:I.enabled))!==!1&&!L&&!b.getQueryCache().find({queryKey:k})&&T(k,y);const ie=s(k,{...I,...y}),ne=((q=y==null?void 0:y.trpc)==null?void 0:q.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??_,J=ME({...ie,queryKey:k,queryFn:L?v:O=>{const V={...ie,trpc:{...ie==null?void 0:ie.trpc,...ne?{signal:O.signal}:{}}};return E.query(...dn(k,V))}},b);return J.trpc=ys({path:p}),J}function l(p,v,y){var b;const x=o(),_=ai(p,v,"query"),E=((b=y==null?void 0:y.trpc)==null?void 0:b.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??x.abortOnUnmount,R=OE({...y,queryKey:_,queryFn:T=>{const k={trpc:{...E?{signal:T.signal}:{}}};return x.client.query(...dn(_,k))}},x.queryClient);return R.trpc=ys({path:p}),[R.data,R]}function u(p,v){const{client:y}=o(),x=pc(),_=[p],E=x.getMutationDefaults(_),R=DE({...v,mutationKey:_,mutationFn:b=>y.mutation(...dn([p,{input:b}],v)),onSuccess(...b){return t({originalFn:()=>{var k,I;return((k=v==null?void 0:v.onSuccess)==null?void 0:k.call(v,...b))??((I=E==null?void 0:E.onSuccess)==null?void 0:I.call(E,...b))},queryClient:x,meta:(v==null?void 0:v.meta)??(E==null?void 0:E.meta)??{}})}},x);return R.trpc=ys({path:p}),R}/* istanbul ignore next -- @preserve */function c(p,v,y){const x=(y==null?void 0:y.enabled)??!0,_=Dr(ai(p,v,"any")),{client:E}=o(),R=w.useRef(y);R.current=y,w.useEffect(()=>{if(!x)return;let b=!1;const T=E.subscription(p.join("."),v??void 0,{onStarted:()=>{var k,I;b||(I=(k=R.current).onStarted)==null||I.call(k)},onData:k=>{b||y.onData(k)},onError:k=>{var I,L;b||(L=(I=R.current).onError)==null||L.call(I,k)}});return()=>{b=!0,T.unsubscribe()}},[_,x])}function d(p,v,y){var J,re;const{client:x,ssrState:_,prefetchInfiniteQuery:E,queryClient:R,abortOnUnmount:b}=o(),T=ai(p,v,"infinite"),k=R.getQueryDefaults(T),I=v===zo;typeof window>"u"&&_==="prepass"&&((J=y==null?void 0:y.trpc)==null?void 0:J.ssr)!==!1&&((y==null?void 0:y.enabled)??(k==null?void 0:k.enabled))!==!1&&!I&&!R.getQueryCache().find({queryKey:T})&&E(T,{...k,...y});const L=s(T,{...k,...y}),ie=((re=y==null?void 0:y.trpc)==null?void 0:re.abortOnUnmount)??b,ne=LE({...L,initialPageParam:y.initialCursor??null,persister:y.persister,queryKey:T,queryFn:I?v:q=>{const O={...L,trpc:{...L==null?void 0:L.trpc,...ie?{signal:q.signal}:{}}};return x.query(...dn(T,O,{pageParam:q.pageParam??y.initialCursor,direction:q.direction}))}},R);return ne.trpc=ys({path:p}),ne}function f(p,v,y){var k;const x=o(),_=ai(p,v,"infinite"),E=x.queryClient.getQueryDefaults(_),R=s(_,{...E,...y}),b=((k=y==null?void 0:y.trpc)==null?void 0:k.abortOnUnmount)??x.abortOnUnmount,T=AE({...y,initialPageParam:y.initialCursor??null,queryKey:_,queryFn:I=>{const L={...R,trpc:{...R==null?void 0:R.trpc,...b?{signal:I.signal}:{}}};return x.client.query(...dn(_,L,{pageParam:I.pageParam??y.initialCursor,direction:I.direction}))}},x.queryClient);return T.trpc=ys({path:p}),[T.data,T]}return{Provider:i,createClient:r,useContext:o,useUtils:o,useQuery:a,useSuspenseQuery:l,useQueries:p=>{var b;const{ssrState:v,queryClient:y,prefetchQuery:x,client:_}=o(),E=zv(_),R=p(E);if(typeof window>"u"&&v==="prepass")for(const T of R){const k=T;((b=k.trpc)==null?void 0:b.ssr)!==!1&&!y.getQueryCache().find({queryKey:k.queryKey})&&x(k.queryKey,k)}return sS({queries:R.map(T=>({...T,queryKey:T.queryKey}))},y)},useSuspenseQueries:p=>{const{queryClient:v,client:y}=o(),x=zv(y),_=p(x),E=IE({queries:_.map(R=>({...R,queryKey:R.queryKey}))},v);return[E.map(R=>R.data),E]},useMutation:u,useSubscription:c,useInfiniteQuery:d,useSuspenseInfiniteQuery:f}}function _k(e){return vc(t=>t==="useContext"||t==="useUtils"?()=>{const n=e.useUtils();return w.useMemo(()=>Sk(n),[n])}:e.hasOwnProperty(t)?e[t]:mk(t,e))}function bk(e){const t=Ck(e);return _k(t)}const Zo=bk({}),Nu={API_BASE_URL:"/api",PROJECT_MODE:"offline",IS_DEV:!1},Pk="modulepreload",Ek=function(e){return"/"+e},Bv={},Rk=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const o=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));i=Promise.all(n.map(l=>{if(l=Ek(l),l in Bv)return;Bv[l]=!0;const u=l.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(!!r)for(let h=o.length-1;h>=0;h--){const g=o[h];if(g.href===l&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${l}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":Pk,u||(f.as="script",f.crossOrigin=""),f.href=l,a&&f.setAttribute("nonce",a),document.head.appendChild(f),u)return new Promise((h,g)=>{f.addEventListener("load",h),f.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${l}`)))})}))}return i.then(()=>t()).catch(o=>{const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=o,window.dispatchEvent(s),!s.defaultPrevented)throw o})};function gx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=gx(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Tk(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=gx(e))&&(r&&(r+=" "),r+=t);return r}var ae;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},e.find=(i,o)=>{for(const s of i)if(o(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(ae||(ae={}));var kh;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(kh||(kh={}));const F=ae.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),dr=e=>{switch(typeof e){case"undefined":return F.undefined;case"string":return F.string;case"number":return isNaN(e)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":return Array.isArray(e)?F.array:e===null?F.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?F.promise:typeof Map<"u"&&e instanceof Map?F.map:typeof Set<"u"&&e instanceof Set?F.set:typeof Date<"u"&&e instanceof Date?F.date:F.object;default:return F.unknown}},M=ae.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),kk=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Zt extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const u=s.path[l];l===s.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(s))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return i(this),r}toString(){return this.message}get message(){return JSON.stringify(this.issues,ae.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Zt.create=e=>new Zt(e);const ha=(e,t)=>{let n;switch(e.code){case M.invalid_type:e.received===F.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case M.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ae.jsonStringifyReplacer)}`;break;case M.unrecognized_keys:n=`Unrecognized key(s) in object: ${ae.joinValues(e.keys,", ")}`;break;case M.invalid_union:n="Invalid input";break;case M.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ae.joinValues(e.options)}`;break;case M.invalid_enum_value:n=`Invalid enum value. Expected ${ae.joinValues(e.options)}, received '${e.received}'`;break;case M.invalid_arguments:n="Invalid function arguments";break;case M.invalid_return_type:n="Invalid function return type";break;case M.invalid_date:n="Invalid date";break;case M.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ae.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case M.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case M.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case M.custom:n="Invalid input";break;case M.invalid_intersection_types:n="Intersection results could not be merged";break;case M.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case M.not_finite:n="Number must be finite";break;default:n=t.defaultError,ae.assertNever(e)}return{message:n}};let vx=ha;function $k(e){vx=e}function ju(){return vx}const Vu=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],s={...i,path:o};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(s,{data:t,defaultError:a}).message;return{...i,path:o,message:i.message||a}},Mk=[];function N(e,t){const n=Vu({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,ju(),ha].filter(r=>!!r)});e.common.issues.push(n)}class Je{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return K;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n)r.push({key:await i.key,value:await i.value});return Je.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return K;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:t.value,value:r}}}const K=Object.freeze({status:"aborted"}),yx=e=>({status:"dirty",value:e}),it=e=>({status:"valid",value:e}),$h=e=>e.status==="aborted",Mh=e=>e.status==="dirty",pa=e=>e.status==="valid",zu=e=>typeof Promise<"u"&&e instanceof Promise;var z;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(z||(z={}));class vn{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Uv=(e,t)=>{if(pa(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Zt(e.common.issues);return this._error=n,this._error}}};function Z(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,a)=>s.code!=="invalid_type"?{message:a.defaultError}:typeof a.data>"u"?{message:r??a.defaultError}:{message:n??a.defaultError},description:i}}class X{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return dr(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:dr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Je,ctx:{common:t.parent.common,data:t.data,parsedType:dr(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(zu(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dr(t)},o=this._parseSync({data:t,path:i.path,parent:i});return Uv(i,o)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:dr(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(zu(i)?i:Promise.resolve(i));return Uv(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const s=t(i),a=()=>o.addIssue({code:M.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new en({schema:this,typeName:U.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Dn.create(this,this._def)}nullable(){return Ii.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yt.create(this,this._def)}promise(){return Xo.create(this,this._def)}or(t){return ya.create([this,t],this._def)}and(t){return wa.create(this,t,this._def)}transform(t){return new en({...Z(this._def),schema:this,typeName:U.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new ba({...Z(this._def),innerType:this,defaultValue:n,typeName:U.ZodDefault})}brand(){return new Sx({typeName:U.ZodBranded,type:this,...Z(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Gu({...Z(this._def),innerType:this,catchValue:n,typeName:U.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return ol.create(this,t)}readonly(){return Qu.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Ok=/^c[^\s-]{8,}$/i,Ak=/^[a-z][a-z0-9]*$/,Ik=/^[0-9A-HJKMNP-TV-Z]{26}$/,Dk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Lk=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Dd;const Nk=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,jk=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Vk=e=>e.precision?e.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${e.precision}}Z$`):e.precision===0?e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):e.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function zk(e,t){return!!((t==="v4"||!t)&&Nk.test(e)||(t==="v6"||!t)&&jk.test(e))}class Qt extends X{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==F.string){const o=this._getOrReturnCtx(t);return N(o,{code:M.invalid_type,expected:F.string,received:o.parsedType}),K}const r=new Je;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),N(i,{code:M.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),N(i,{code:M.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=t.data.length>o.value,a=t.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(t,i),s?N(i,{code:M.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&N(i,{code:M.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")Lk.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"email",code:M.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")Dd||(Dd=new RegExp(Fk,"u")),Dd.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"emoji",code:M.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")Dk.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"uuid",code:M.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")Ok.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"cuid",code:M.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Ak.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"cuid2",code:M.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")Ik.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"ulid",code:M.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),N(i,{validation:"url",code:M.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"regex",code:M.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),N(i,{code:M.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),N(i,{code:M.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),N(i,{code:M.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?Vk(o).test(t.data)||(i=this._getOrReturnCtx(t,i),N(i,{code:M.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="ip"?zk(t.data,o.version)||(i=this._getOrReturnCtx(t,i),N(i,{validation:"ip",code:M.invalid_string,message:o.message}),r.dirty()):ae.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:M.invalid_string,...z.errToObj(r)})}_addCheck(t){return new Qt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...z.errToObj(t)})}url(t){return this._addCheck({kind:"url",...z.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...z.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...z.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...z.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...z.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...z.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...z.errToObj(t)})}datetime(t){var n;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,...z.errToObj(t==null?void 0:t.message)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...z.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...z.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...z.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...z.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...z.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...z.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...z.errToObj(n)})}nonempty(t){return this.min(1,z.errToObj(t))}trim(){return new Qt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Qt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Qt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Qt.create=e=>{var t;return new Qt({checks:[],typeName:U.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Z(e)})};function Bk(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}class Nr extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==F.number){const o=this._getOrReturnCtx(t);return N(o,{code:M.invalid_type,expected:F.number,received:o.parsedType}),K}let r;const i=new Je;for(const o of this._def.checks)o.kind==="int"?ae.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),N(r,{code:M.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),N(r,{code:M.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),N(r,{code:M.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?Bk(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),N(r,{code:M.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),N(r,{code:M.not_finite,message:o.message}),i.dirty()):ae.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,z.toString(n))}gt(t,n){return this.setLimit("min",t,!1,z.toString(n))}lte(t,n){return this.setLimit("max",t,!0,z.toString(n))}lt(t,n){return this.setLimit("max",t,!1,z.toString(n))}setLimit(t,n,r,i){return new Nr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:z.toString(i)}]})}_addCheck(t){return new Nr({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:z.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:z.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:z.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:z.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:z.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:z.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:z.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:z.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:z.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ae.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Nr.create=e=>new Nr({checks:[],typeName:U.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Z(e)});class jr extends X{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==F.bigint){const o=this._getOrReturnCtx(t);return N(o,{code:M.invalid_type,expected:F.bigint,received:o.parsedType}),K}let r;const i=new Je;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),N(r,{code:M.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),N(r,{code:M.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),N(r,{code:M.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):ae.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,z.toString(n))}gt(t,n){return this.setLimit("min",t,!1,z.toString(n))}lte(t,n){return this.setLimit("max",t,!0,z.toString(n))}lt(t,n){return this.setLimit("max",t,!1,z.toString(n))}setLimit(t,n,r,i){return new jr({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:z.toString(i)}]})}_addCheck(t){return new jr({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:z.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:z.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:z.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:z.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:z.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}jr.create=e=>{var t;return new jr({checks:[],typeName:U.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Z(e)})};class ma extends X{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==F.boolean){const r=this._getOrReturnCtx(t);return N(r,{code:M.invalid_type,expected:F.boolean,received:r.parsedType}),K}return it(t.data)}}ma.create=e=>new ma({typeName:U.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Z(e)});class Oi extends X{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==F.date){const o=this._getOrReturnCtx(t);return N(o,{code:M.invalid_type,expected:F.date,received:o.parsedType}),K}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return N(o,{code:M.invalid_date}),K}const r=new Je;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),N(i,{code:M.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),N(i,{code:M.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):ae.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Oi({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:z.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:z.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Oi.create=e=>new Oi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:U.ZodDate,...Z(e)});class Bu extends X{_parse(t){if(this._getType(t)!==F.symbol){const r=this._getOrReturnCtx(t);return N(r,{code:M.invalid_type,expected:F.symbol,received:r.parsedType}),K}return it(t.data)}}Bu.create=e=>new Bu({typeName:U.ZodSymbol,...Z(e)});class ga extends X{_parse(t){if(this._getType(t)!==F.undefined){const r=this._getOrReturnCtx(t);return N(r,{code:M.invalid_type,expected:F.undefined,received:r.parsedType}),K}return it(t.data)}}ga.create=e=>new ga({typeName:U.ZodUndefined,...Z(e)});class va extends X{_parse(t){if(this._getType(t)!==F.null){const r=this._getOrReturnCtx(t);return N(r,{code:M.invalid_type,expected:F.null,received:r.parsedType}),K}return it(t.data)}}va.create=e=>new va({typeName:U.ZodNull,...Z(e)});class Yo extends X{constructor(){super(...arguments),this._any=!0}_parse(t){return it(t.data)}}Yo.create=e=>new Yo({typeName:U.ZodAny,...Z(e)});class bi extends X{constructor(){super(...arguments),this._unknown=!0}_parse(t){return it(t.data)}}bi.create=e=>new bi({typeName:U.ZodUnknown,...Z(e)});class Wn extends X{_parse(t){const n=this._getOrReturnCtx(t);return N(n,{code:M.invalid_type,expected:F.never,received:n.parsedType}),K}}Wn.create=e=>new Wn({typeName:U.ZodNever,...Z(e)});class Uu extends X{_parse(t){if(this._getType(t)!==F.undefined){const r=this._getOrReturnCtx(t);return N(r,{code:M.invalid_type,expected:F.void,received:r.parsedType}),K}return it(t.data)}}Uu.create=e=>new Uu({typeName:U.ZodVoid,...Z(e)});class Yt extends X{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==F.array)return N(n,{code:M.invalid_type,expected:F.array,received:n.parsedType}),K;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(N(n,{code:s?M.too_big:M.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(N(n,{code:M.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(N(n,{code:M.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new vn(n,s,n.path,a)))).then(s=>Je.mergeArray(r,s));const o=[...n.data].map((s,a)=>i.type._parseSync(new vn(n,s,n.path,a)));return Je.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Yt({...this._def,minLength:{value:t,message:z.toString(n)}})}max(t,n){return new Yt({...this._def,maxLength:{value:t,message:z.toString(n)}})}length(t,n){return new Yt({...this._def,exactLength:{value:t,message:z.toString(n)}})}nonempty(t){return this.min(1,t)}}Yt.create=(e,t)=>new Yt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:U.ZodArray,...Z(t)});function Wi(e){if(e instanceof Se){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Dn.create(Wi(r))}return new Se({...e._def,shape:()=>t})}else return e instanceof Yt?new Yt({...e._def,type:Wi(e.element)}):e instanceof Dn?Dn.create(Wi(e.unwrap())):e instanceof Ii?Ii.create(Wi(e.unwrap())):e instanceof yn?yn.create(e.items.map(t=>Wi(t))):e}class Se extends X{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ae.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==F.object){const u=this._getOrReturnCtx(t);return N(u,{code:M.invalid_type,expected:F.object,received:u.parsedType}),K}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const u in i.data)s.includes(u)||a.push(u);const l=[];for(const u of s){const c=o[u],d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new vn(i,d,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof Wn){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(u==="strict")a.length>0&&(N(i,{code:M.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new vn(i,d,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key;u.push({key:d,value:await c.value,alwaysSet:c.alwaysSet})}return u}).then(u=>Je.mergeObjectSync(r,u)):Je.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return z.errToObj,new Se({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,s,a;const l=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=z.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Se({...this._def,unknownKeys:"strip"})}passthrough(){return new Se({...this._def,unknownKeys:"passthrough"})}extend(t){return new Se({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Se({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:U.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Se({...this._def,catchall:t})}pick(t){const n={};return ae.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Se({...this._def,shape:()=>n})}omit(t){const n={};return ae.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Se({...this._def,shape:()=>n})}deepPartial(){return Wi(this)}partial(t){const n={};return ae.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Se({...this._def,shape:()=>n})}required(t){const n={};return ae.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Dn;)o=o._def.innerType;n[r]=o}}),new Se({...this._def,shape:()=>n})}keyof(){return wx(ae.objectKeys(this.shape))}}Se.create=(e,t)=>new Se({shape:()=>e,unknownKeys:"strip",catchall:Wn.create(),typeName:U.ZodObject,...Z(t)});Se.strictCreate=(e,t)=>new Se({shape:()=>e,unknownKeys:"strict",catchall:Wn.create(),typeName:U.ZodObject,...Z(t)});Se.lazycreate=(e,t)=>new Se({shape:e,unknownKeys:"strip",catchall:Wn.create(),typeName:U.ZodObject,...Z(t)});class ya extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new Zt(a.ctx.common.issues));return N(n,{code:M.invalid_union,unionErrors:s}),K}if(n.common.async)return Promise.all(r.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:u}),u.common.issues.length&&s.push(u.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(l=>new Zt(l));return N(n,{code:M.invalid_union,unionErrors:a}),K}}get options(){return this._def.options}}ya.create=(e,t)=>new ya({options:e,typeName:U.ZodUnion,...Z(t)});const ru=e=>e instanceof xa?ru(e.schema):e instanceof en?ru(e.innerType()):e instanceof Ca?[e.value]:e instanceof Vr?e.options:e instanceof _a?Object.keys(e.enum):e instanceof ba?ru(e._def.innerType):e instanceof ga?[void 0]:e instanceof va?[null]:null;class Ic extends X{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==F.object)return N(n,{code:M.invalid_type,expected:F.object,received:n.parsedType}),K;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(N(n,{code:M.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),K)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const s=ru(o.shape[t]);if(!s)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,o)}}return new Ic({typeName:U.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Z(r)})}}function Oh(e,t){const n=dr(e),r=dr(t);if(e===t)return{valid:!0,data:e};if(n===F.object&&r===F.object){const i=ae.objectKeys(t),o=ae.objectKeys(e).filter(a=>i.indexOf(a)!==-1),s={...e,...t};for(const a of o){const l=Oh(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===F.array&&r===F.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const s=e[o],a=t[o],l=Oh(s,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===F.date&&r===F.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class wa extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,s)=>{if($h(o)||$h(s))return K;const a=Oh(o.value,s.value);return a.valid?((Mh(o)||Mh(s))&&n.dirty(),{status:n.value,value:a.data}):(N(r,{code:M.invalid_intersection_types}),K)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}wa.create=(e,t,n)=>new wa({left:e,right:t,typeName:U.ZodIntersection,...Z(n)});class yn extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==F.array)return N(r,{code:M.invalid_type,expected:F.array,received:r.parsedType}),K;if(r.data.length<this._def.items.length)return N(r,{code:M.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),K;!this._def.rest&&r.data.length>this._def.items.length&&(N(r,{code:M.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new vn(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Je.mergeArray(n,s)):Je.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new yn({...this._def,rest:t})}}yn.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new yn({items:e,typeName:U.ZodTuple,rest:null,...Z(t)})};class Sa extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==F.object)return N(r,{code:M.invalid_type,expected:F.object,received:r.parsedType}),K;const i=[],o=this._def.keyType,s=this._def.valueType;for(const a in r.data)i.push({key:o._parse(new vn(r,a,r.path,a)),value:s._parse(new vn(r,r.data[a],r.path,a))});return r.common.async?Je.mergeObjectAsync(n,i):Je.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof X?new Sa({keyType:t,valueType:n,typeName:U.ZodRecord,...Z(r)}):new Sa({keyType:Qt.create(),valueType:t,typeName:U.ZodRecord,...Z(n)})}}class Hu extends X{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==F.map)return N(r,{code:M.invalid_type,expected:F.map,received:r.parsedType}),K;const i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,l],u)=>({key:i._parse(new vn(r,a,r.path,[u,"key"])),value:o._parse(new vn(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return K;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return K;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}Hu.create=(e,t,n)=>new Hu({valueType:t,keyType:e,typeName:U.ZodMap,...Z(n)});class Ai extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==F.set)return N(r,{code:M.invalid_type,expected:F.set,received:r.parsedType}),K;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(N(r,{code:M.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(N(r,{code:M.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function s(l){const u=new Set;for(const c of l){if(c.status==="aborted")return K;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>o._parse(new vn(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Ai({...this._def,minSize:{value:t,message:z.toString(n)}})}max(t,n){return new Ai({...this._def,maxSize:{value:t,message:z.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Ai.create=(e,t)=>new Ai({valueType:e,minSize:null,maxSize:null,typeName:U.ZodSet,...Z(t)});class vo extends X{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==F.function)return N(n,{code:M.invalid_type,expected:F.function,received:n.parsedType}),K;function r(a,l){return Vu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ju(),ha].filter(u=>!!u),issueData:{code:M.invalid_arguments,argumentsError:l}})}function i(a,l){return Vu({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ju(),ha].filter(u=>!!u),issueData:{code:M.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Xo){const a=this;return it(async function(...l){const u=new Zt([]),c=await a._def.args.parseAsync(l,o).catch(h=>{throw u.addIssue(r(l,h)),u}),d=await Reflect.apply(s,this,c);return await a._def.returns._def.type.parseAsync(d,o).catch(h=>{throw u.addIssue(i(d,h)),u})})}else{const a=this;return it(function(...l){const u=a._def.args.safeParse(l,o);if(!u.success)throw new Zt([r(l,u.error)]);const c=Reflect.apply(s,this,u.data),d=a._def.returns.safeParse(c,o);if(!d.success)throw new Zt([i(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new vo({...this._def,args:yn.create(t).rest(bi.create())})}returns(t){return new vo({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new vo({args:t||yn.create([]).rest(bi.create()),returns:n||bi.create(),typeName:U.ZodFunction,...Z(r)})}}class xa extends X{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}xa.create=(e,t)=>new xa({getter:e,typeName:U.ZodLazy,...Z(t)});class Ca extends X{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return N(n,{received:n.data,code:M.invalid_literal,expected:this._def.value}),K}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ca.create=(e,t)=>new Ca({value:e,typeName:U.ZodLiteral,...Z(t)});function wx(e,t){return new Vr({values:e,typeName:U.ZodEnum,...Z(t)})}class Vr extends X{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return N(n,{expected:ae.joinValues(r),received:n.parsedType,code:M.invalid_type}),K}if(this._def.values.indexOf(t.data)===-1){const n=this._getOrReturnCtx(t),r=this._def.values;return N(n,{received:n.data,code:M.invalid_enum_value,options:r}),K}return it(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t){return Vr.create(t)}exclude(t){return Vr.create(this.options.filter(n=>!t.includes(n)))}}Vr.create=wx;class _a extends X{_parse(t){const n=ae.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==F.string&&r.parsedType!==F.number){const i=ae.objectValues(n);return N(r,{expected:ae.joinValues(i),received:r.parsedType,code:M.invalid_type}),K}if(n.indexOf(t.data)===-1){const i=ae.objectValues(n);return N(r,{received:r.data,code:M.invalid_enum_value,options:i}),K}return it(t.data)}get enum(){return this._def.values}}_a.create=(e,t)=>new _a({values:e,typeName:U.ZodNativeEnum,...Z(t)});class Xo extends X{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==F.promise&&n.common.async===!1)return N(n,{code:M.invalid_type,expected:F.promise,received:n.parsedType}),K;const r=n.parsedType===F.promise?n.data:Promise.resolve(n.data);return it(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Xo.create=(e,t)=>new Xo({type:e,typeName:U.ZodPromise,...Z(t)});class en extends X{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===U.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s=>{N(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(r.data,o);return r.common.issues.length?{status:"dirty",value:r.data}:r.common.async?Promise.resolve(s).then(a=>this._def.schema._parseAsync({data:a,path:r.path,parent:r})):this._def.schema._parseSync({data:s,path:r.path,parent:r})}if(i.type==="refinement"){const s=a=>{const l=i.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?K:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?K:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!pa(s))return s;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>pa(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):s);ae.assertNever(i)}}en.create=(e,t,n)=>new en({schema:e,typeName:U.ZodEffects,effect:t,...Z(n)});en.createWithPreprocess=(e,t,n)=>new en({schema:t,effect:{type:"preprocess",transform:e},typeName:U.ZodEffects,...Z(n)});class Dn extends X{_parse(t){return this._getType(t)===F.undefined?it(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Dn.create=(e,t)=>new Dn({innerType:e,typeName:U.ZodOptional,...Z(t)});class Ii extends X{_parse(t){return this._getType(t)===F.null?it(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ii.create=(e,t)=>new Ii({innerType:e,typeName:U.ZodNullable,...Z(t)});class ba extends X{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===F.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}ba.create=(e,t)=>new ba({innerType:e,typeName:U.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Z(t)});class Gu extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return zu(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Zt(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Zt(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Gu.create=(e,t)=>new Gu({innerType:e,typeName:U.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Z(t)});class Wu extends X{_parse(t){if(this._getType(t)!==F.nan){const r=this._getOrReturnCtx(t);return N(r,{code:M.invalid_type,expected:F.nan,received:r.parsedType}),K}return{status:"valid",value:t.data}}}Wu.create=e=>new Wu({typeName:U.ZodNaN,...Z(e)});const Uk=Symbol("zod_brand");class Sx extends X{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class ol extends X{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?K:o.status==="dirty"?(n.dirty(),yx(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?K:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new ol({in:t,out:n,typeName:U.ZodPipeline})}}class Qu extends X{_parse(t){const n=this._def.innerType._parse(t);return pa(n)&&(n.value=Object.freeze(n.value)),n}}Qu.create=(e,t)=>new Qu({innerType:e,typeName:U.ZodReadonly,...Z(t)});const xx=(e,t={},n)=>e?Yo.create().superRefine((r,i)=>{var o,s;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:!0,u=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...u,fatal:l})}}):Yo.create(),Hk={object:Se.lazycreate};var U;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(U||(U={}));const Gk=(e,t={message:`Input not instance of ${e.name}`})=>xx(n=>n instanceof e,t),Cx=Qt.create,_x=Nr.create,Wk=Wu.create,Qk=jr.create,bx=ma.create,Kk=Oi.create,qk=Bu.create,Zk=ga.create,Yk=va.create,Xk=Yo.create,Jk=bi.create,e2=Wn.create,t2=Uu.create,n2=Yt.create,r2=Se.create,i2=Se.strictCreate,o2=ya.create,s2=Ic.create,a2=wa.create,l2=yn.create,u2=Sa.create,c2=Hu.create,d2=Ai.create,f2=vo.create,h2=xa.create,p2=Ca.create,m2=Vr.create,g2=_a.create,v2=Xo.create,Hv=en.create,y2=Dn.create,w2=Ii.create,S2=en.createWithPreprocess,x2=ol.create,C2=()=>Cx().optional(),_2=()=>_x().optional(),b2=()=>bx().optional(),P2={string:e=>Qt.create({...e,coerce:!0}),number:e=>Nr.create({...e,coerce:!0}),boolean:e=>ma.create({...e,coerce:!0}),bigint:e=>jr.create({...e,coerce:!0}),date:e=>Oi.create({...e,coerce:!0})},E2=K;var ve=Object.freeze({__proto__:null,defaultErrorMap:ha,setErrorMap:$k,getErrorMap:ju,makeIssue:Vu,EMPTY_PATH:Mk,addIssueToContext:N,ParseStatus:Je,INVALID:K,DIRTY:yx,OK:it,isAborted:$h,isDirty:Mh,isValid:pa,isAsync:zu,get util(){return ae},get objectUtil(){return kh},ZodParsedType:F,getParsedType:dr,ZodType:X,ZodString:Qt,ZodNumber:Nr,ZodBigInt:jr,ZodBoolean:ma,ZodDate:Oi,ZodSymbol:Bu,ZodUndefined:ga,ZodNull:va,ZodAny:Yo,ZodUnknown:bi,ZodNever:Wn,ZodVoid:Uu,ZodArray:Yt,ZodObject:Se,ZodUnion:ya,ZodDiscriminatedUnion:Ic,ZodIntersection:wa,ZodTuple:yn,ZodRecord:Sa,ZodMap:Hu,ZodSet:Ai,ZodFunction:vo,ZodLazy:xa,ZodLiteral:Ca,ZodEnum:Vr,ZodNativeEnum:_a,ZodPromise:Xo,ZodEffects:en,ZodTransformer:en,ZodOptional:Dn,ZodNullable:Ii,ZodDefault:ba,ZodCatch:Gu,ZodNaN:Wu,BRAND:Uk,ZodBranded:Sx,ZodPipeline:ol,ZodReadonly:Qu,custom:xx,Schema:X,ZodSchema:X,late:Hk,get ZodFirstPartyTypeKind(){return U},coerce:P2,any:Xk,array:n2,bigint:Qk,boolean:bx,date:Kk,discriminatedUnion:s2,effect:Hv,enum:m2,function:f2,instanceof:Gk,intersection:a2,lazy:h2,literal:p2,map:c2,nan:Wk,nativeEnum:g2,never:e2,null:Yk,nullable:w2,number:_x,object:r2,oboolean:b2,onumber:_2,optional:y2,ostring:C2,pipeline:x2,preprocess:S2,promise:v2,record:u2,set:d2,strictObject:i2,string:Cx,symbol:qk,transformer:Hv,tuple:l2,undefined:Zk,union:o2,unknown:Jk,void:t2,NEVER:E2,ZodIssueCode:M,quotelessJson:kk,ZodError:Zt}),R2={VITE_TRPC_API_ROUTE:"/api",VITE_PROJECT_MODE:"offline",VITE_DEPLOYMENT_ENV:"cli",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Gv=e=>{let t;const n=new Set,r=(c,d)=>{const f=typeof c=="function"?c(t):c;if(!Object.is(f,t)){const h=t;t=d??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(g=>g(t,h))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>u,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(R2?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},u=t=e(r,i,l);return l},T2=e=>e?Gv(e):Gv;var Px={VITE_TRPC_API_ROUTE:"/api",VITE_PROJECT_MODE:"offline",VITE_DEPLOYMENT_ENV:"cli",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:k2}=lc,{useSyncExternalStoreWithSelector:$2}=wP;let Wv=!1;const M2=e=>e;function O2(e,t=M2,n){(Px?"production":void 0)!=="production"&&n&&!Wv&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Wv=!0);const r=$2(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return k2(r),r}const Qv=e=>{(Px?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?T2(e):e,n=(r,i)=>O2(t,r,i);return Object.assign(n,t),n},A2=e=>e?Qv(e):Qv;var iu={VITE_TRPC_API_ROUTE:"/api",VITE_PROJECT_MODE:"offline",VITE_DEPLOYMENT_ENV:"cli",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ah=new Map,kl=e=>{const t=Ah.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},I2=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Ah.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Ah.set(n.name,i),{type:"tracked",store:e,...i}},D2=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,store:a,...l}=t;let u;try{u=(o??(iu?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!u)return(iu?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:c,...d}=I2(a,u,l);let f=!0;i.setState=(m,S,p)=>{const v=n(m,S);if(!f)return v;const y=p===void 0?{type:s||"anonymous"}:typeof p=="string"?{type:p}:p;return a===void 0?(c==null||c.send(y,r()),v):(c==null||c.send({...y,type:`${a}/${y.type}`},{...kl(l.name),[a]:i.getState()}),v)};const h=(...m)=>{const S=f;f=!1,n(...m),f=S},g=e(i.setState,r,i);if(d.type==="untracked"?c==null||c.init(g):(d.stores[d.store]=i,c==null||c.init(Object.fromEntries(Object.entries(d.stores).map(([m,S])=>[m,m===d.store?g:S.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let m=!1;const S=i.dispatch;i.dispatch=(...p)=>{(iu?"production":void 0)!=="production"&&p[0].type==="__setState"&&!m&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),m=!0),S(...p)}}return c.subscribe(m=>{var S;switch(m.type){case"ACTION":if(typeof m.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Ld(m.payload,p=>{if(p.type==="__setState"){if(a===void 0){h(p.state);return}Object.keys(p.state).length!==1&&console.error(`
|
|
59
|
-
[zustand devtools middleware] Unsupported __setState action format.
|
|
60
|
-
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
61
|
-
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
62
|
-
`);const v=p.state[a];if(v==null)return;JSON.stringify(i.getState())!==JSON.stringify(v)&&h(v);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(p)});case"DISPATCH":switch(m.payload.type){case"RESET":return h(g),a===void 0?c==null?void 0:c.init(i.getState()):c==null?void 0:c.init(kl(l.name));case"COMMIT":if(a===void 0){c==null||c.init(i.getState());return}return c==null?void 0:c.init(kl(l.name));case"ROLLBACK":return Ld(m.state,p=>{if(a===void 0){h(p),c==null||c.init(i.getState());return}h(p[a]),c==null||c.init(kl(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ld(m.state,p=>{if(a===void 0){h(p);return}JSON.stringify(i.getState())!==JSON.stringify(p[a])&&h(p[a])});case"IMPORT_STATE":{const{nextLiftedState:p}=m.payload,v=(S=p.computedStates.slice(-1)[0])==null?void 0:S.state;if(!v)return;h(a===void 0?v:v[a]),c==null||c.send(null,p);return}case"PAUSE_RECORDING":return f=!f}return}}),g},L2=D2,Ld=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function F2(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const s=l=>l===null?null:JSON.parse(l,t==null?void 0:t.reviver),a=(o=n.getItem(i))!=null?o:null;return a instanceof Promise?a.then(s):s(a)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,t==null?void 0:t.replacer)),removeItem:i=>n.removeItem(i)}}const Pa=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Pa(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Pa(r)(n)}}}},N2=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:S=>S,version:0,merge:(S,p)=>({...p,...S}),...t},s=!1;const a=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...S)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...S)},r,i);const c=Pa(o.serialize),d=()=>{const S=o.partialize({...r()});let p;const v=c({state:S,version:o.version}).then(y=>u.setItem(o.name,y)).catch(y=>{p=y});if(p)throw p;return v},f=i.setState;i.setState=(S,p)=>{f(S,p),d()};const h=e((...S)=>{n(...S),d()},r,i);let g;const m=()=>{var S;if(!u)return;s=!1,a.forEach(v=>v(r()));const p=((S=o.onRehydrateStorage)==null?void 0:S.call(o,r()))||void 0;return Pa(u.getItem.bind(u))(o.name).then(v=>{if(v)return o.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var y;return g=o.merge(v,(y=r())!=null?y:h),n(g,!0),d()}).then(()=>{p==null||p(g,void 0),s=!0,l.forEach(v=>v(g))}).catch(v=>{p==null||p(void 0,v)})};return i.persist={setOptions:S=>{o={...o,...S},S.getStorage&&(u=S.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>s,onHydrate:S=>(a.add(S),()=>{a.delete(S)}),onFinishHydration:S=>(l.add(S),()=>{l.delete(S)})},m(),g||h},j2=(e,t)=>(n,r,i)=>{let o={storage:F2(()=>localStorage),partialize:m=>m,version:0,merge:(m,S)=>({...S,...m}),...t},s=!1;const a=new Set,l=new Set;let u=o.storage;if(!u)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...m)},r,i);const c=()=>{const m=o.partialize({...r()});return u.setItem(o.name,{state:m,version:o.version})},d=i.setState;i.setState=(m,S)=>{d(m,S),c()};const f=e((...m)=>{n(...m),c()},r,i);i.getInitialState=()=>f;let h;const g=()=>{var m,S;if(!u)return;s=!1,a.forEach(v=>{var y;return v((y=r())!=null?y:f)});const p=((S=o.onRehydrateStorage)==null?void 0:S.call(o,(m=r())!=null?m:f))||void 0;return Pa(u.getItem.bind(u))(o.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==o.version){if(o.migrate)return o.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var y;return h=o.merge(v,(y=r())!=null?y:f),n(h,!0),c()}).then(()=>{p==null||p(h,void 0),h=r(),s=!0,l.forEach(v=>v(h))}).catch(v=>{p==null||p(void 0,v)})};return i.persist={setOptions:m=>{o={...o,...m},m.storage&&(u=m.storage)},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>g(),hasHydrated:()=>s,onHydrate:m=>(a.add(m),()=>{a.delete(m)}),onFinishHydration:m=>(l.add(m),()=>{l.delete(m)})},o.skipHydration||g(),h||f},V2=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((iu?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),N2(e,t)):j2(e,t),z2=V2,zs=ve.union([ve.object({type:ve.literal("filepath"),value:ve.string()}),ve.object({type:ve.literal("url"),value:ve.string()})]),Ex=ve.object({version:ve.string(),theme:ve.enum(["light","dark"]),projects:ve.object({selected:zs.optional(),list:ve.array(zs)})});Ex.and(ve.object({toggleTheme:ve.function().args().returns(ve.void()),addProject:ve.function().args(zs).returns(ve.void()),selectProject:ve.function().args(zs).returns(ve.void()),removeProject:ve.function().args(zs).returns(ve.void()),resetProject:ve.function().returns(ve.void())}));const Kv={version:"0.0.1",theme:"dark",projects:{list:[{type:"url",value:"https://github.com/vercel/turbo/archive/refs/heads/main.zip"}]}},os=A2()(L2(z2((e,t)=>({...Kv,toggleTheme:()=>{e({theme:t().theme==="dark"?"light":"dark"})},removeProject:n=>{e({...t(),projects:{...t().projects,list:t().projects.list.filter(r=>r.value!==n.value)}})},addProject:n=>{t().projects.list.some(r=>r.value===n.value)||e({...t(),projects:{...t().projects,list:[...t().projects.list,n]}})},selectProject:n=>{e({...t(),projects:{...t().projects,selected:n}})},resetProject(){e({...t(),projects:{...t().projects,selected:void 0}})}}),{name:"monoverse-local-state",storage:{getItem:e=>{const t=localStorage.getItem(e);if(!t)return null;try{const r=ve.object({state:Ex,version:ve.number()}).parse(JSON.parse(t));return r.state.version!==Kv.version?null:r}catch(n){return console.log("Error parsing local storage",n),null}},setItem:(e,t)=>{localStorage.setItem(e,JSON.stringify(t))},removeItem:e=>localStorage.removeItem(e)}}))),vm=os,Rx=DP({component:B2});function B2(){const{theme:e}=os();return w.useEffect(()=>{document.body.className=e},[e]),P.jsxs(P.Fragment,{children:[P.jsx(fc,{}),Nu.IS_DEV]})}const U2=Ja("/_layout")({component:H2});function H2(){return P.jsx("div",{className:"mx-auto flex min-h-screen max-w-7xl items-center px-6",children:P.jsx("div",{className:"flex h-screen max-h-[1024px] w-full max-w-7xl flex-col p-3",children:P.jsx(fc,{})})})}/**
|
|
63
|
-
* @license lucide-react v0.363.0 - ISC
|
|
64
|
-
*
|
|
65
|
-
* This source code is licensed under the ISC license.
|
|
66
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/var G2={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"};/**
|
|
68
|
-
* @license lucide-react v0.363.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const W2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
73
|
-
* @license lucide-react v0.363.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const ym=(e,t)=>{const n=w.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:l,...u},c)=>w.createElement("svg",{ref:c,...G2,width:i,height:i,stroke:r,strokeWidth:s?Number(o)*24/Number(i):o,className:["lucide",`lucide-${W2(e)}`,a].join(" "),...u},[...t.map(([d,f])=>w.createElement(d,f)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/**
|
|
78
|
-
* @license lucide-react v0.363.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const Q2=ym("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
83
|
-
* @license lucide-react v0.363.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const K2=ym("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
|
|
88
|
-
* @license lucide-react v0.363.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const q2=ym("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ee.apply(this,arguments)}function Z2(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Tx(...e){return t=>e.forEach(n=>Z2(n,t))}function tn(...e){return w.useCallback(Tx(...e),e)}const Dc=w.forwardRef((e,t)=>{const{children:n,...r}=e,i=w.Children.toArray(n),o=i.find(X2);if(o){const s=o.props.children,a=i.map(l=>l===o?w.Children.count(s)>1?w.Children.only(null):w.isValidElement(s)?s.props.children:null:l);return w.createElement(Ih,ee({},r,{ref:t}),w.isValidElement(s)?w.cloneElement(s,void 0,a):null)}return w.createElement(Ih,ee({},r,{ref:t}),n)});Dc.displayName="Slot";const Ih=w.forwardRef((e,t)=>{const{children:n,...r}=e;return w.isValidElement(n)?w.cloneElement(n,{...J2(r,n.props),ref:t?Tx(t,n.ref):n.ref}):w.Children.count(n)>1?w.Children.only(null):null});Ih.displayName="SlotClone";const Y2=({children:e})=>w.createElement(w.Fragment,null,e);function X2(e){return w.isValidElement(e)&&e.type===Y2}function J2(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...a)=>{o(...a),i(...a)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function kx(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=kx(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function e$(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=kx(e))&&(r&&(r+=" "),r+=t);return r}const qv=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,Zv=e$,$x=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Zv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:o}=t,s=Object.keys(i).map(u=>{const c=n==null?void 0:n[u],d=o==null?void 0:o[u];if(c===null)return null;const f=qv(c)||qv(d);return i[u][f]}),a=n&&Object.entries(n).reduce((u,c)=>{let[d,f]=c;return f===void 0||(u[d]=f),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:d,className:f,...h}=c;return Object.entries(h).every(g=>{let[m,S]=g;return Array.isArray(S)?S.includes({...o,...a}[m]):{...o,...a}[m]===S})?[...u,d,f]:u},[]);return Zv(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},wm="-";function t$(e){const t=r$(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;function i(s){const a=s.split(wm);return a[0]===""&&a.length!==1&&a.shift(),Mx(a,t)||n$(s)}function o(s,a){const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function Mx(e,t){var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?Mx(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(wm);return(s=t.validators.find(({validator:a})=>a(o)))==null?void 0:s.classGroupId}const Yv=/^\[(.+)\]$/;function n$(e){if(Yv.test(e)){const t=Yv.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function r$(e){const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return o$(Object.entries(e.classGroups),n).forEach(([o,s])=>{Dh(s,r,o,t)}),r}function Dh(e,t,n,r){e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:Xv(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(i$(i)){Dh(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,s])=>{Dh(s,Xv(t,o),n,r)})})}function Xv(e,t){let n=e;return t.split(wm).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function i$(e){return e.isThemeGetter}function o$(e,t){return t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([s,a])=>[t+s,a])):o);return[n,i]}):e}function s$(e){if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;function i(o,s){n.set(o,s),t++,t>e&&(t=0,r=n,n=new Map)}return{get(o){let s=n.get(o);if(s!==void 0)return s;if((s=r.get(o))!==void 0)return i(o,s),s},set(o,s){n.has(o)?n.set(o,s):i(o,s)}}}const Ox="!";function a$(e){const t=e.separator,n=t.length===1,r=t[0],i=t.length;return function(s){const a=[];let l=0,u=0,c;for(let m=0;m<s.length;m++){let S=s[m];if(l===0){if(S===r&&(n||s.slice(m,m+i)===t)){a.push(s.slice(u,m)),u=m+i;continue}if(S==="/"){c=m;continue}}S==="["?l++:S==="]"&&l--}const d=a.length===0?s:s.substring(u),f=d.startsWith(Ox),h=f?d.substring(1):d,g=c&&c>u?c-u:void 0;return{modifiers:a,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:g}}}function l$(e){if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t}function u$(e){return{cache:s$(e.cacheSize),splitModifiers:a$(e),...t$(e)}}const c$=/\s+/;function d$(e,t){const{splitModifiers:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=new Set;return e.trim().split(c$).map(s=>{const{modifiers:a,hasImportantModifier:l,baseClassName:u,maybePostfixModifierPosition:c}=n(s);let d=r(c?u.substring(0,c):u),f=!!c;if(!d){if(!c)return{isTailwindClass:!1,originalClassName:s};if(d=r(u),!d)return{isTailwindClass:!1,originalClassName:s};f=!1}const h=l$(a).join(":");return{isTailwindClass:!0,modifierId:l?h+Ox:h,classGroupId:d,originalClassName:s,hasPostfixModifier:f}}).reverse().filter(s=>{if(!s.isTailwindClass)return!0;const{modifierId:a,classGroupId:l,hasPostfixModifier:u}=s,c=a+l;return o.has(c)?!1:(o.add(c),i(l,u).forEach(d=>o.add(a+d)),!0)}).reverse().map(s=>s.originalClassName).join(" ")}function f$(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ax(t))&&(r&&(r+=" "),r+=n);return r}function Ax(e){if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ax(e[r]))&&(n&&(n+=" "),n+=t);return n}function h$(e,...t){let n,r,i,o=s;function s(l){const u=t.reduce((c,d)=>d(c),e());return n=u$(u),r=n.cache.get,i=n.cache.set,o=a,a(l)}function a(l){const u=r(l);if(u)return u;const c=d$(l,n);return i(l,c),c}return function(){return o(f$.apply(null,arguments))}}function pe(e){const t=n=>n[e]||[];return t.isThemeGetter=!0,t}const Ix=/^\[(?:([a-z-]+):)?(.+)\]$/i,p$=/^\d+\/\d+$/,m$=new Set(["px","full","screen"]),g$=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,v$=/\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$/,y$=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,w$=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,S$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/;function Cn(e){return di(e)||m$.has(e)||p$.test(e)}function Jn(e){return ss(e,"length",T$)}function di(e){return!!e&&!Number.isNaN(Number(e))}function $l(e){return ss(e,"number",di)}function ws(e){return!!e&&Number.isInteger(Number(e))}function x$(e){return e.endsWith("%")&&di(e.slice(0,-1))}function Y(e){return Ix.test(e)}function er(e){return g$.test(e)}const C$=new Set(["length","size","percentage"]);function _$(e){return ss(e,C$,Dx)}function b$(e){return ss(e,"position",Dx)}const P$=new Set(["image","url"]);function E$(e){return ss(e,P$,$$)}function R$(e){return ss(e,"",k$)}function Ss(){return!0}function ss(e,t,n){const r=Ix.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1}function T$(e){return v$.test(e)&&!y$.test(e)}function Dx(){return!1}function k$(e){return w$.test(e)}function $$(e){return S$.test(e)}function M$(){const e=pe("colors"),t=pe("spacing"),n=pe("blur"),r=pe("brightness"),i=pe("borderColor"),o=pe("borderRadius"),s=pe("borderSpacing"),a=pe("borderWidth"),l=pe("contrast"),u=pe("grayscale"),c=pe("hueRotate"),d=pe("invert"),f=pe("gap"),h=pe("gradientColorStops"),g=pe("gradientColorStopPositions"),m=pe("inset"),S=pe("margin"),p=pe("opacity"),v=pe("padding"),y=pe("saturate"),x=pe("scale"),_=pe("sepia"),E=pe("skew"),R=pe("space"),b=pe("translate"),T=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto",Y,t],L=()=>[Y,t],ie=()=>["",Cn,Jn],ne=()=>["auto",di,Y],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],re=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"],O=()=>["start","end","center","between","around","evenly","stretch"],V=()=>["","0",Y],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],se=()=>[di,$l],ce=()=>[di,Y];return{cacheSize:500,separator:":",theme:{colors:[Ss],spacing:[Cn,Jn],blur:["none","",er,Y],brightness:se(),borderColor:[e],borderRadius:["none","","full",er,Y],borderSpacing:L(),borderWidth:ie(),contrast:se(),grayscale:V(),hueRotate:ce(),invert:V(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[x$,Jn],inset:I(),margin:I(),opacity:se(),padding:L(),saturate:se(),scale:se(),sepia:V(),skew:ce(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[er]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"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"],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:[...J(),Y]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[m]}],"inset-x":[{"inset-x":[m]}],"inset-y":[{"inset-y":[m]}],start:[{start:[m]}],end:[{end:[m]}],top:[{top:[m]}],right:[{right:[m]}],bottom:[{bottom:[m]}],left:[{left:[m]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ws,Y]}],basis:[{basis:I()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:V()}],shrink:[{shrink:V()}],order:[{order:["first","last","none",ws,Y]}],"grid-cols":[{"grid-cols":[Ss]}],"col-start-end":[{col:["auto",{span:["full",ws,Y]},Y]}],"col-start":[{"col-start":ne()}],"col-end":[{"col-end":ne()}],"grid-rows":[{"grid-rows":[Ss]}],"row-start-end":[{row:["auto",{span:[ws,Y]},Y]}],"row-start":[{"row-start":ne()}],"row-end":[{"row-end":ne()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...O()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...O(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...O(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Y,t]}],"min-w":[{"min-w":[Y,t,"min","max","fit"]}],"max-w":[{"max-w":[Y,t,"none","full","min","max","fit","prose",{screen:[er]},er]}],h:[{h:[Y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",er,Jn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",$l]}],"font-family":[{font:[Ss]}],"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-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",di,$l]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Cn,Y]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[p]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[p]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Cn,Jn]}],"underline-offset":[{"underline-offset":["auto",Cn,Y]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[p]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),b$]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_$]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},E$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[g]}],"gradient-via-pos":[{via:[g]}],"gradient-to-pos":[{to:[g]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[p]}],"border-style":[{border:[...re(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[p]}],"divide-style":[{divide:re()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...re()]}],"outline-offset":[{"outline-offset":[Cn,Y]}],"outline-w":[{outline:[Cn,Jn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[p]}],"ring-offset-w":[{"ring-offset":[Cn,Jn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",er,R$]}],"shadow-color":[{shadow:[Ss]}],opacity:[{opacity:[p]}],"mix-blend":[{"mix-blend":q()}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",er,Y]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[d]}],saturate:[{saturate:[y]}],sepia:[{sepia:[_]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[p]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[_]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:ce()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:ce()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[ws,Y]}],"translate-x":[{"translate-x":[b]}],"translate-y":[{"translate-y":[b]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],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",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Cn,Jn,$l]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}}const O$=h$(M$);function le(...e){return O$(Tk(e))}const A$=$x("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}}),Ln=w.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},o)=>{const s=r?Dc:"button";return P.jsx(s,{className:le(A$({variant:t,size:n,className:e})),ref:o,...i})});Ln.displayName="Button";const Lx=({className:e=""})=>P.jsx("div",{className:le("size-12 animate-spin rounded-md border-4 border-primary",e)}),Fx=w.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Lc=w.createContext({}),Sm=w.createContext(null),xm=typeof document<"u",I$=xm?w.useLayoutEffect:w.useEffect,Nx=w.createContext({strict:!1}),Cm=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),D$="framerAppearId",jx="data-"+Cm(D$),L$={skipAnimations:!1,useManualTiming:!1};class Jv{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function F$(e){let t=new Jv,n=new Jv,r=0,i=!1,o=!1;const s=new WeakSet,a={schedule:(l,u=!1,c=!1)=>{const d=c&&i,f=d?t:n;return u&&s.add(l),f.add(l)&&d&&i&&(r=t.order.length),l},cancel:l=>{n.remove(l),s.delete(l)},process:l=>{if(i){o=!0;return}if(i=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let u=0;u<r;u++){const c=t.order[u];s.has(c)&&(a.schedule(c),e()),c(l)}i=!1,o&&(o=!1,a.process(l))}};return a}const Ml=["read","resolveKeyframes","update","preRender","render","postRender"],N$=40;function Vx(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=Ml.reduce((d,f)=>(d[f]=F$(()=>n=!0),d),{}),s=d=>{o[d].process(i)},a=()=>{const d=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(d-i.timestamp,N$),1),i.timestamp=d,i.isProcessing=!0,Ml.forEach(s),i.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,i.isProcessing||e(a)};return{schedule:Ml.reduce((d,f)=>{const h=o[f];return d[f]=(g,m=!1,S=!1)=>(n||l(),h.schedule(g,m,S)),d},{}),cancel:d=>Ml.forEach(f=>o[f].cancel(d)),state:i,steps:o}}const{schedule:_m,cancel:Oj}=Vx(queueMicrotask,!1);function j$(e,t,n,r){const{visualElement:i}=w.useContext(Lc),o=w.useContext(Nx),s=w.useContext(Sm),a=w.useContext(Fx).reducedMotion,l=w.useRef();r=r||o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:i,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:a}));const u=l.current;w.useInsertionEffect(()=>{u&&u.update(n,s)});const c=w.useRef(!!(n[jx]&&!window.HandoffComplete));return I$(()=>{u&&(_m.postRender(u.render),c.current&&u.animationState&&u.animationState.animateChanges())}),w.useEffect(()=>{u&&(u.updateFeatures(),!c.current&&u.animationState&&u.animationState.animateChanges(),c.current&&(c.current=!1,window.HandoffComplete=!0))}),u}function so(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function V$(e,t,n){return w.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):so(n)&&(n.current=r))},[t])}function Ea(e){return typeof e=="string"||Array.isArray(e)}function Fc(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const bm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Pm=["initial",...bm];function Nc(e){return Fc(e.animate)||Pm.some(t=>Ea(e[t]))}function zx(e){return!!(Nc(e)||e.variants)}function z$(e,t){if(Nc(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ea(n)?n:void 0,animate:Ea(r)?r:void 0}}return e.inherit!==!1?t:{}}function B$(e){const{initial:t,animate:n}=z$(e,w.useContext(Lc));return w.useMemo(()=>({initial:t,animate:n}),[ey(t),ey(n)])}function ey(e){return Array.isArray(e)?e.join(" "):e}const ty={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Ra={};for(const e in ty)Ra[e]={isEnabled:t=>ty[e].some(n=>!!t[n])};function U$(e){for(const t in e)Ra[t]={...Ra[t],...e[t]}}const Bx=w.createContext({}),Ux=w.createContext({}),H$=Symbol.for("motionComponentSymbol");function G$({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&U$(e);function o(a,l){let u;const c={...w.useContext(Fx),...a,layoutId:W$(a)},{isStatic:d}=c,f=B$(a),h=r(a,d);if(!d&&xm){f.visualElement=j$(i,h,c,t);const g=w.useContext(Ux),m=w.useContext(Nx).strict;f.visualElement&&(u=f.visualElement.loadFeatures(c,m,e,g))}return w.createElement(Lc.Provider,{value:f},u&&f.visualElement?w.createElement(u,{visualElement:f.visualElement,...c}):null,n(i,a,V$(h,f.visualElement,l),h,d,f.visualElement))}const s=w.forwardRef(o);return s[H$]=i,s}function W$({layoutId:e}){const t=w.useContext(Bx).id;return t&&e!==void 0?t+"-"+e:e}function Q$(e){function t(r,i={}){return G$(e(r,i))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,i)=>(n.has(i)||n.set(i,t(i)),n.get(i))})}const K$=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Em(e){return typeof e!="string"||e.includes("-")?!1:!!(K$.indexOf(e)>-1||/[A-Z]/u.test(e))}const Ku={};function q$(e){Object.assign(Ku,e)}const sl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ji=new Set(sl);function Hx(e,{layout:t,layoutId:n}){return ji.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Ku[e]||e==="opacity")}const Ze=e=>!!(e&&e.getVelocity),Z$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Y$=sl.length;function X$(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let o="";for(let s=0;s<Y$;s++){const a=sl[s];if(e[a]!==void 0){const l=Z$[a]||a;o+=`${l}(${e[a]}) `}}return t&&!e.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(e,r?"":o):n&&r&&(o="none"),o}const Gx=e=>t=>typeof t=="string"&&t.startsWith(e),Wx=Gx("--"),J$=Gx("var(--"),Rm=e=>J$(e)?eM.test(e.split("/*")[0].trim()):!1,eM=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,tM=(e,t)=>t&&typeof e=="number"?t.transform(e):e,zr=(e,t,n)=>n>t?t:n<e?e:n,as={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Bs={...as,transform:e=>zr(0,1,e)},Ol={...as,default:1},Us=e=>Math.round(e*1e5)/1e5,Tm=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,nM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,rM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;function al(e){return typeof e=="string"}const ll=e=>({test:t=>al(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),rr=ll("deg"),gn=ll("%"),B=ll("px"),iM=ll("vh"),oM=ll("vw"),ny={...gn,parse:e=>gn.parse(e)/100,transform:e=>gn.transform(e*100)},ry={...as,transform:Math.round},Qx={borderWidth:B,borderTopWidth:B,borderRightWidth:B,borderBottomWidth:B,borderLeftWidth:B,borderRadius:B,radius:B,borderTopLeftRadius:B,borderTopRightRadius:B,borderBottomRightRadius:B,borderBottomLeftRadius:B,width:B,maxWidth:B,height:B,maxHeight:B,size:B,top:B,right:B,bottom:B,left:B,padding:B,paddingTop:B,paddingRight:B,paddingBottom:B,paddingLeft:B,margin:B,marginTop:B,marginRight:B,marginBottom:B,marginLeft:B,rotate:rr,rotateX:rr,rotateY:rr,rotateZ:rr,scale:Ol,scaleX:Ol,scaleY:Ol,scaleZ:Ol,skew:rr,skewX:rr,skewY:rr,distance:B,translateX:B,translateY:B,translateZ:B,x:B,y:B,z:B,perspective:B,transformPerspective:B,opacity:Bs,originX:ny,originY:ny,originZ:B,zIndex:ry,backgroundPositionX:B,backgroundPositionY:B,fillOpacity:Bs,strokeOpacity:Bs,numOctaves:ry};function km(e,t,n,r){const{style:i,vars:o,transform:s,transformOrigin:a}=e;let l=!1,u=!1,c=!0;for(const d in t){const f=t[d];if(Wx(d)){o[d]=f;continue}const h=Qx[d],g=tM(f,h);if(ji.has(d)){if(l=!0,s[d]=g,!c)continue;f!==(h.default||0)&&(c=!1)}else d.startsWith("origin")?(u=!0,a[d]=g):i[d]=g}if(t.transform||(l||r?i.transform=X$(e.transform,n,c,r):i.transform&&(i.transform="none")),u){const{originX:d="50%",originY:f="50%",originZ:h=0}=a;i.transformOrigin=`${d} ${f} ${h}`}}const $m=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Kx(e,t,n){for(const r in t)!Ze(t[r])&&!Hx(r,n)&&(e[r]=t[r])}function sM({transformTemplate:e},t,n){return w.useMemo(()=>{const r=$m();return km(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function aM(e,t,n){const r=e.style||{},i={};return Kx(i,r,e),Object.assign(i,sM(e,t,n)),i}function lM(e,t,n){const r={},i=aM(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=i,r}const uM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function qu(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||uM.has(e)}let qx=e=>!qu(e);function cM(e){e&&(qx=t=>t.startsWith("on")?!qu(t):e(t))}try{cM(require("@emotion/is-prop-valid").default)}catch{}function dM(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(qx(i)||n===!0&&qu(i)||!t&&!qu(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}function iy(e,t,n){return typeof e=="string"?e:B.transform(t+n*e)}function fM(e,t,n){const r=iy(t,e.x,e.width),i=iy(n,e.y,e.height);return`${r} ${i}`}const hM={offset:"stroke-dashoffset",array:"stroke-dasharray"},pM={offset:"strokeDashoffset",array:"strokeDasharray"};function mM(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?hM:pM;e[o.offset]=B.transform(-r);const s=B.transform(t),a=B.transform(n);e[o.array]=`${s} ${a}`}function Mm(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...u},c,d,f){if(km(e,u,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:g,dimensions:m}=e;h.transform&&(m&&(g.transform=h.transform),delete h.transform),m&&(i!==void 0||o!==void 0||g.transform)&&(g.transformOrigin=fM(m,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),s!==void 0&&mM(h,s,a,l,!1)}const Zx=()=>({...$m(),attrs:{}}),Om=e=>typeof e=="string"&&e.toLowerCase()==="svg";function gM(e,t,n,r){const i=w.useMemo(()=>{const o=Zx();return Mm(o,t,{enableHardwareAcceleration:!1},Om(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Kx(o,e.style,e),i.style={...o,...i.style}}return i}function vM(e=!1){return(n,r,i,{latestValues:o},s)=>{const l=(Em(n)?gM:lM)(r,o,s,n),u=dM(r,typeof n=="string",e),c=n!==w.Fragment?{...u,...l,ref:i}:{},{children:d}=r,f=w.useMemo(()=>Ze(d)?d.get():d,[d]);return w.createElement(n,{...c,children:f})}}function Yx(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Xx=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Jx(e,t,n,r){Yx(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xx.has(i)?i:Cm(i),t.attrs[i])}function Am(e,t,n){var r;const{style:i}=e,o={};for(const s in i)(Ze(i[s])||t.style&&Ze(t.style[s])||Hx(s,e)||((r=n==null?void 0:n.getValue(s))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[s]=i[s]);return o}function eC(e,t,n){const r=Am(e,t,n);for(const i in e)if(Ze(e[i])||Ze(t[i])){const o=sl.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}function Im(e,t,n,r={},i={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,i)),t}function yM(e){const t=w.useRef(null);return t.current===null&&(t.current=e()),t.current}const Lh=e=>Array.isArray(e),wM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),SM=e=>Lh(e)?e[e.length-1]||0:e;function ou(e){const t=Ze(e)?e.get():e;return wM(t)?t.toValue():t}function xM({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,o){const s={latestValues:CM(r,i,o,e),renderState:t()};return n&&(s.mount=a=>n(r,a,s)),s}const tC=e=>(t,n)=>{const r=w.useContext(Lc),i=w.useContext(Sm),o=()=>xM(e,t,r,i);return n?o():yM(o)};function CM(e,t,n,r){const i={},o=r(e,{});for(const f in o)i[f]=ou(o[f]);let{initial:s,animate:a}=e;const l=Nc(e),u=zx(e);t&&u&&!l&&e.inherit!==!1&&(s===void 0&&(s=t.initial),a===void 0&&(a=t.animate));let c=n?n.initial===!1:!1;c=c||s===!1;const d=c?a:s;return d&&typeof d!="boolean"&&!Fc(d)&&(Array.isArray(d)?d:[d]).forEach(h=>{const g=Im(e,h);if(!g)return;const{transitionEnd:m,transition:S,...p}=g;for(const v in p){let y=p[v];if(Array.isArray(y)){const x=c?y.length-1:0;y=y[x]}y!==null&&(i[v]=y)}for(const v in m)i[v]=m[v]}),i}const Ye=e=>e,{schedule:ze,cancel:Br,state:Ne,steps:Fd}=Vx(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ye,!0),_M={useVisualState:tC({scrapeMotionValuesFromProps:eC,createRenderState:Zx,onMount:(e,t,{renderState:n,latestValues:r})=>{ze.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),ze.render(()=>{Mm(n,r,{enableHardwareAcceleration:!1},Om(t.tagName),e.transformTemplate),Jx(t,n)})}})},bM={useVisualState:tC({scrapeMotionValuesFromProps:Am,createRenderState:$m})};function PM(e,{forwardMotionProps:t=!1},n,r){return{...Em(e)?_M:bM,preloadedFeatures:n,useRender:vM(t),createVisualElement:r,Component:e}}function An(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const nC=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function jc(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const EM=e=>t=>nC(t)&&e(t,jc(t));function Fn(e,t,n,r){return An(e,t,EM(n),r)}const RM=(e,t)=>n=>t(e(n)),Nn=(...e)=>e.reduce(RM);function rC(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const oy=rC("dragHorizontal"),sy=rC("dragVertical");function iC(e){let t=!1;if(e==="y")t=sy();else if(e==="x")t=oy();else{const n=oy(),r=sy();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function oC(){const e=iC(!0);return e?(e(),!1):!0}class Zr{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ay(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),i=(o,s)=>{if(o.pointerType==="touch"||oC())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&a[r](o,s)};return Fn(e.current,n,i,{passive:!e.getProps()[r]})}class TM extends Zr{mount(){this.unmount=Nn(ay(this.node,!0),ay(this.node,!1))}unmount(){}}class kM extends Zr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Nn(An(this.node.current,"focus",()=>this.onFocus()),An(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const sC=(e,t)=>t?e===t?!0:sC(e,t.parentElement):!1;function Nd(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,jc(n))}class $M extends Zr{constructor(){super(...arguments),this.removeStartListeners=Ye,this.removeEndListeners=Ye,this.removeAccessibleListeners=Ye,this.startPointerPress=(t,n)=>{if(this.isPressing)return;this.removeEndListeners();const r=this.node.getProps(),o=Fn(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:u,onTapCancel:c,globalTapTarget:d}=this.node.getProps();!d&&!sC(this.node.current,a.target)?c&&c(a,l):u&&u(a,l)},{passive:!(r.onTap||r.onPointerUp)}),s=Fn(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Nn(o,s),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=o=>{if(o.key!=="Enter"||this.isPressing)return;const s=a=>{a.key!=="Enter"||!this.checkPressEnd()||Nd("up",(l,u)=>{const{onTap:c}=this.node.getProps();c&&c(l,u)})};this.removeEndListeners(),this.removeEndListeners=An(this.node.current,"keyup",s),Nd("down",(a,l)=>{this.startPress(a,l)})},n=An(this.node.current,"keydown",t),r=()=>{this.isPressing&&Nd("cancel",(o,s)=>this.cancelPress(o,s))},i=An(this.node.current,"blur",r);this.removeAccessibleListeners=Nn(n,i)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&r(t,n)}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!oC()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&r(t,n)}mount(){const t=this.node.getProps(),n=Fn(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=An(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Nn(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Fh=new WeakMap,jd=new WeakMap,MM=e=>{const t=Fh.get(e.target);t&&t(e)},OM=e=>{e.forEach(MM)};function AM({root:e,...t}){const n=e||document;jd.has(n)||jd.set(n,{});const r=jd.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(OM,{root:e,...t})),r[i]}function IM(e,t,n){const r=AM(t);return Fh.set(e,n),r.observe(e),()=>{Fh.delete(e),r.unobserve(e)}}const DM={some:0,all:1};class LM extends Zr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,s={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:DM[i]},a=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,o&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:c,onViewportLeave:d}=this.node.getProps(),f=u?c:d;f&&f(l)};return IM(this.node.current,s,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(FM(t,n))&&this.startObserver()}unmount(){}}function FM({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const NM={inView:{Feature:LM},tap:{Feature:$M},focus:{Feature:kM},hover:{Feature:TM}};function aC(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function jM(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function VM(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Vc(e,t,n){const r=e.getProps();return Im(r,t,n!==void 0?n:r.custom,jM(e),VM(e))}const Ar=e=>e*1e3,jn=e=>e/1e3,zM={type:"spring",stiffness:500,damping:25,restSpeed:10},BM=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),UM={type:"keyframes",duration:.8},HM={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},GM=(e,{keyframes:t})=>t.length>2?UM:ji.has(e)?e.startsWith("scale")?BM(t[1]):zM:HM;function WM({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:s,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}function Dm(e,t){return e[t]||e.default||e}const QM=e=>e!==null;function zc(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(QM),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}let su;function KM(){su=void 0}const Ir={now:()=>(su===void 0&&Ir.set(Ne.isProcessing||L$.useManualTiming?Ne.timestamp:performance.now()),su),set:e=>{su=e,queueMicrotask(KM)}},lC=e=>/^0[^.\s]+$/u.test(e);function qM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||lC(e):!0}let uC=Ye;const cC=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),ZM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function YM(e){const t=ZM.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}function dC(e,t,n=1){const[r,i]=YM(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const s=o.trim();return cC(s)?parseFloat(s):s}return Rm(i)?dC(i,t,n+1):i}const XM=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),ly=e=>e===as||e===B,uy=(e,t)=>parseFloat(e.split(", ")[t]),cy=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/u);if(i)return uy(i[1],t);{const o=r.match(/^matrix\((.+)\)$/u);return o?uy(o[1],e):0}},JM=new Set(["x","y","z"]),eO=sl.filter(e=>!JM.has(e));function dy(e){const t=[];return eO.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Jo={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:cy(4,13),y:cy(5,14)};Jo.translateX=Jo.x;Jo.translateY=Jo.y;const fC=e=>t=>t.test(e),tO={test:e=>e==="auto",parse:e=>e},hC=[as,B,gn,rr,oM,iM,tO],fy=e=>hC.find(fC(e)),Pi=new Set;let Nh=!1,jh=!1;function pC(){if(jh){const e=Array.from(Pi).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{dy(r).length&&(n.set(r,dy(r)),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render()}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}jh=!1,Nh=!1,Pi.forEach(e=>e.complete()),Pi.clear()}function mC(){Pi.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(jh=!0)})}function nO(){mC(),pC()}class Lm{constructor(t,n,r,i,o,s=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=s}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Pi.add(this),Nh||(Nh=!0,ze.read(mC),ze.resolveKeyframes(pC))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const s=i==null?void 0:i.get(),a=t[t.length-1];if(s!==void 0)t[0]=s;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),i&&s===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Pi.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Pi.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Fm=(e,t)=>n=>!!(al(n)&&rM.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),gC=(e,t,n)=>r=>{if(!al(r))return r;const[i,o,s,a]=r.match(Tm);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(s),alpha:a!==void 0?parseFloat(a):1}},rO=e=>zr(0,255,e),Vd={...as,transform:e=>Math.round(rO(e))},fi={test:Fm("rgb","red"),parse:gC("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Vd.transform(e)+", "+Vd.transform(t)+", "+Vd.transform(n)+", "+Us(Bs.transform(r))+")"};function iO(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Vh={test:Fm("#"),parse:iO,transform:fi.transform},ao={test:Fm("hsl","hue"),parse:gC("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+gn.transform(Us(t))+", "+gn.transform(Us(n))+", "+Us(Bs.transform(r))+")"},Ke={test:e=>fi.test(e)||Vh.test(e)||ao.test(e),parse:e=>fi.test(e)?fi.parse(e):ao.test(e)?ao.parse(e):Vh.parse(e),transform:e=>al(e)?e:e.hasOwnProperty("red")?fi.transform(e):ao.transform(e)};function oO(e){var t,n;return isNaN(e)&&al(e)&&(((t=e.match(Tm))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(nM))===null||n===void 0?void 0:n.length)||0)>0}const vC="number",yC="color",sO="var",aO="var(",hy="${}",lO=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Zu(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const a=t.replace(lO,l=>(Ke.test(l)?(r.color.push(o),i.push(yC),n.push(Ke.parse(l))):l.startsWith(aO)?(r.var.push(o),i.push(sO),n.push(l)):(r.number.push(o),i.push(vC),n.push(parseFloat(l))),++o,hy)).split(hy);return{values:n,split:a,indexes:r,types:i}}function wC(e){return Zu(e).values}function SC(e){const{split:t,types:n}=Zu(e),r=t.length;return i=>{let o="";for(let s=0;s<r;s++)if(o+=t[s],i[s]!==void 0){const a=n[s];a===vC?o+=Us(i[s]):a===yC?o+=Ke.transform(i[s]):o+=i[s]}return o}}const uO=e=>typeof e=="number"?0:e;function cO(e){const t=wC(e);return SC(e)(t.map(uO))}const Ur={test:oO,parse:wC,createTransformer:SC,getAnimatableNone:cO},dO=new Set(["brightness","contrast","saturate","opacity"]);function fO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Tm)||[];if(!r)return e;const i=n.replace(r,"");let o=dO.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const hO=/\b([a-z-]*)\(.*?\)/gu,zh={...Ur,getAnimatableNone:e=>{const t=e.match(hO);return t?t.map(fO).join(" "):e}},pO={...Qx,color:Ke,backgroundColor:Ke,outlineColor:Ke,fill:Ke,stroke:Ke,borderColor:Ke,borderTopColor:Ke,borderRightColor:Ke,borderBottomColor:Ke,borderLeftColor:Ke,filter:zh,WebkitFilter:zh},Nm=e=>pO[e];function xC(e,t){let n=Nm(e);return n!==zh&&(n=Ur),n.getAnimatableNone?n.getAnimatableNone(t):void 0}function mO(e,t,n){let r=0,i;for(;r<e.length&&!i;)typeof e[r]=="string"&&e[r]!=="none"&&e[r]!=="0"&&(i=e[r]),r++;if(i&&n)for(const o of t)e[o]=xC(n,i)}class CC extends Lm{constructor(t,n,r,i){super(t,n,r,i,i==null?void 0:i.owner,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){const u=t[l];if(typeof u=="string"&&Rm(u)){const c=dC(u,n.current);c!==void 0&&(t[l]=c)}}if(!XM.has(r)||t.length!==2)return this.resolveNoneKeyframes();const[i,o]=t,s=fy(i),a=fy(o);if(s!==a)if(ly(s)&&ly(a))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)qM(t[i])&&r.push(i);r.length&&mO(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jo[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const s=i.length-1,a=i[s];i[s]=Jo[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}function gO(e){let t;return()=>(t===void 0&&(t=e()),t)}const py=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ur.test(e)||e==="0")&&!e.startsWith("url("));function vO(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yO(e,t,n,r){const i=e[0];if(i===null)return!1;const o=e[e.length-1],s=py(i,t),a=py(o,t);return!s||!a?!1:vO(e)||n==="spring"&&r}class _C{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:s="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:s,...a},this.updateFinishedPromise()}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&nO(),this._resolved}onKeyframesResolved(t,n){this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:s,onComplete:a,onUpdate:l,isGenerator:u}=this.options;if(!u&&!yO(t,r,i,o))if(s)this.options.duration=0;else{l==null||l(zc(t,this.options,n)),a==null||a(),this.resolveFinishedPromise();return}const c=this.initPlayback(t,n);c!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...c},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function bC(e,t){return t?e*(1e3/t):0}const wO=5;function PC(e,t,n){const r=Math.max(t-wO,0);return bC(n-e(r),t-r)}const zd=.001,SO=.01,xO=10,CO=.05,_O=1;function bO({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,o,s=1-t;s=zr(CO,_O,s),e=zr(SO,xO,jn(e)),s<1?(i=u=>{const c=u*s,d=c*e,f=c-n,h=Bh(u,s),g=Math.exp(-d);return zd-f/h*g},o=u=>{const d=u*s*e,f=d*n+n,h=Math.pow(s,2)*Math.pow(u,2)*e,g=Math.exp(-d),m=Bh(Math.pow(u,2),s);return(-i(u)+zd>0?-1:1)*((f-h)*g)/m}):(i=u=>{const c=Math.exp(-u*e),d=(u-n)*e+1;return-zd+c*d},o=u=>{const c=Math.exp(-u*e),d=(n-u)*(e*e);return c*d});const a=5/e,l=EO(i,o,a);if(e=Ar(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const u=Math.pow(l,2)*r;return{stiffness:u,damping:s*2*Math.sqrt(r*u),duration:e}}}const PO=12;function EO(e,t,n){let r=n;for(let i=1;i<PO;i++)r=r-e(r)/t(r);return r}function Bh(e,t){return e*Math.sqrt(1-t*t)}const RO=["duration","bounce"],TO=["stiffness","damping","mass"];function my(e,t){return t.some(n=>e[n]!==void 0)}function kO(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!my(e,TO)&&my(e,RO)){const n=bO(e);t={...t,...n,mass:1},t.isResolvedFromDuration=!0}return t}function EC({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],o=e[e.length-1],s={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:d,isResolvedFromDuration:f}=kO({...r,velocity:-jn(r.velocity||0)}),h=d||0,g=l/(2*Math.sqrt(a*u)),m=o-i,S=jn(Math.sqrt(a/u)),p=Math.abs(m)<5;n||(n=p?.01:2),t||(t=p?.005:.5);let v;if(g<1){const y=Bh(S,g);v=x=>{const _=Math.exp(-g*S*x);return o-_*((h+g*S*m)/y*Math.sin(y*x)+m*Math.cos(y*x))}}else if(g===1)v=y=>o-Math.exp(-S*y)*(m+(h+S*m)*y);else{const y=S*Math.sqrt(g*g-1);v=x=>{const _=Math.exp(-g*S*x),E=Math.min(y*x,300);return o-_*((h+g*S*m)*Math.sinh(E)+y*m*Math.cosh(E))/y}}return{calculatedDuration:f&&c||null,next:y=>{const x=v(y);if(f)s.done=y>=c;else{let _=h;y!==0&&(g<1?_=PC(v,y,x):_=0);const E=Math.abs(_)<=n,R=Math.abs(o-x)<=t;s.done=E&&R}return s.value=s.done?o:x,s}}}function gy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:s,min:a,max:l,restDelta:u=.5,restSpeed:c}){const d=e[0],f={done:!1,value:d},h=b=>a!==void 0&&b<a||l!==void 0&&b>l,g=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let m=n*t;const S=d+m,p=s===void 0?S:s(S);p!==S&&(m=p-d);const v=b=>-m*Math.exp(-b/r),y=b=>p+v(b),x=b=>{const T=v(b),k=y(b);f.done=Math.abs(T)<=u,f.value=f.done?p:k};let _,E;const R=b=>{h(f.value)&&(_=b,E=EC({keyframes:[f.value,g(f.value)],velocity:PC(y,b,f.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return R(0),{calculatedDuration:null,next:b=>{let T=!1;return!E&&_===void 0&&(T=!0,x(b),R(b)),_!==void 0&&b>=_?E.next(b-_):(!T&&x(b),f)}}}const RC=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,$O=1e-7,MO=12;function OO(e,t,n,r,i){let o,s,a=0;do s=t+(n-t)/2,o=RC(s,r,i)-e,o>0?n=s:t=s;while(Math.abs(o)>$O&&++a<MO);return s}function ul(e,t,n,r){if(e===t&&n===r)return Ye;const i=o=>OO(o,0,1,e,n);return o=>o===0||o===1?o:RC(i(o),t,r)}const AO=ul(.42,0,1,1),IO=ul(0,0,.58,1),TC=ul(.42,0,.58,1),DO=e=>Array.isArray(e)&&typeof e[0]!="number",kC=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$C=e=>t=>1-e(1-t),jm=e=>1-Math.sin(Math.acos(e)),MC=$C(jm),LO=kC(jm),OC=ul(.33,1.53,.69,.99),Vm=$C(OC),FO=kC(Vm),NO=e=>(e*=2)<1?.5*Vm(e):.5*(2-Math.pow(2,-10*(e-1))),jO={linear:Ye,easeIn:AO,easeInOut:TC,easeOut:IO,circIn:jm,circInOut:LO,circOut:MC,backIn:Vm,backInOut:FO,backOut:OC,anticipate:NO},vy=e=>{if(Array.isArray(e)){uC(e.length===4);const[t,n,r,i]=e;return ul(t,n,r,i)}else if(typeof e=="string")return jO[e];return e},Ta=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Ce=(e,t,n)=>e+(t-e)*n;function Bd(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function VO({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,s=0;if(!t)i=o=s=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;i=Bd(l,a,e+1/3),o=Bd(l,a,e),s=Bd(l,a,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(s*255),alpha:r}}const Ud=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},zO=[Vh,fi,ao],BO=e=>zO.find(t=>t.test(e));function yy(e){const t=BO(e);let n=t.parse(e);return t===ao&&(n=VO(n)),n}const wy=(e,t)=>{const n=yy(e),r=yy(t),i={...n};return o=>(i.red=Ud(n.red,r.red,o),i.green=Ud(n.green,r.green,o),i.blue=Ud(n.blue,r.blue,o),i.alpha=Ce(n.alpha,r.alpha,o),fi.transform(i))};function Uh(e,t){return n=>n>0?t:e}function UO(e,t){return n=>Ce(e,t,n)}function zm(e){return typeof e=="number"?UO:typeof e=="string"?Rm(e)?Uh:Ke.test(e)?wy:WO:Array.isArray(e)?AC:typeof e=="object"?Ke.test(e)?wy:HO:Uh}function AC(e,t){const n=[...e],r=n.length,i=e.map((o,s)=>zm(o)(o,t[s]));return o=>{for(let s=0;s<r;s++)n[s]=i[s](o);return n}}function HO(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=zm(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function GO(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const s=t.types[o],a=e.indexes[s][i[s]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[o]=l,i[s]++}return r}const WO=(e,t)=>{const n=Ur.createTransformer(t),r=Zu(e),i=Zu(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Nn(AC(GO(r,i),i.values),n):Uh(e,t)};function IC(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?Ce(e,t,n):zm(e)(e,t)}function QO(e,t,n){const r=[],i=n||IC,o=e.length-1;for(let s=0;s<o;s++){let a=i(e[s],e[s+1]);if(t){const l=Array.isArray(t)?t[s]||Ye:t;a=Nn(l,a)}r.push(a)}return r}function KO(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(uC(o===t.length),o===1)return()=>t[0];if(o===2&&e[0]===e[1])return()=>t[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=QO(t,r,i),a=s.length,l=u=>{let c=0;if(a>1)for(;c<e.length-2&&!(u<e[c+1]);c++);const d=Ta(e[c],e[c+1],u);return s[c](d)};return n?u=>l(zr(e[0],e[o-1],u)):l}function qO(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=Ta(0,t,r);e.push(Ce(n,1,i))}}function ZO(e){const t=[0];return qO(t,e.length-1),t}function YO(e,t){return e.map(n=>n*t)}function XO(e,t){return e.map(()=>t||TC).splice(0,e.length-1)}function Yu({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=DO(r)?r.map(vy):vy(r),o={done:!1,value:t[0]},s=YO(n&&n.length===t.length?n:ZO(t),e),a=KO(s,t,{ease:Array.isArray(i)?i:XO(t,i)});return{calculatedDuration:e,next:l=>(o.value=a(l),o.done=l>=e,o)}}const Sy=2e4;function JO(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Sy;)t+=n,r=e.next(t);return t>=Sy?1/0:t}const eA=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ze.update(t,!0),stop:()=>Br(t),now:()=>Ne.isProcessing?Ne.timestamp:Ir.now()}},tA={decay:gy,inertia:gy,tween:Yu,keyframes:Yu,spring:EC},nA=e=>e/100;class Bm extends _C{constructor({KeyframeResolver:t=Lm,...n}){super(n),this.holdTime=null,this.startTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.state="idle";const{name:r,motionValue:i,keyframes:o}=this.options,s=(a,l)=>this.onKeyframesResolved(a,l);r&&i&&i.owner?this.resolver=i.owner.resolveKeyframes(o,s,r,i):this.resolver=new t(o,s,r,i),this.resolver.scheduleResolve()}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:s=0}=this.options,a=tA[n]||Yu;let l,u;a!==Yu&&typeof t[0]!="number"&&(l=Nn(nA,IC(t[0],t[1])),t=[0,100]);const c=a({...this.options,keyframes:t});o==="mirror"&&(u=a({...this.options,keyframes:[...t].reverse(),velocity:-s})),c.calculatedDuration===null&&(c.calculatedDuration=JO(c));const{calculatedDuration:d}=c,f=d+i,h=f*(r+1)-i;return{generator:c,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:d,resolvedDuration:f,totalDuration:h}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:b}=this.options;return{done:!0,value:b[b.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:s,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:u,totalDuration:c,resolvedDuration:d}=r;if(this.startTime===null)return o.next(0);const{delay:f,repeat:h,repeatType:g,repeatDelay:m,onUpdate:S}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-c/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const p=this.currentTime-f*(this.speed>=0?1:-1),v=this.speed>=0?p<0:p>c;this.currentTime=Math.max(p,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=c);let y=this.currentTime,x=o;if(h){const b=Math.min(this.currentTime,c)/d;let T=Math.floor(b),k=b%1;!k&&b>=1&&(k=1),k===1&&T--,T=Math.min(T,h+1),!!(T%2)&&(g==="reverse"?(k=1-k,m&&(k-=m/d)):g==="mirror"&&(x=s)),y=zr(0,1,k)*d}const _=v?{done:!1,value:l[0]}:x.next(y);a&&(_.value=a(_.value));let{done:E}=_;!v&&u!==null&&(E=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return R&&i!==void 0&&(_.value=zc(l,this.options,i)),S&&S(_.value),R&&this.finish(),_}get duration(){const{resolved:t}=this;return t?jn(t.calculatedDuration):0}get time(){return jn(this.currentTime)}set time(t){t=Ar(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=jn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=eA,onPlay:n}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:(!this.startTime||this.state==="finished")&&(this.startTime=r),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:t}=this.options;t&&t()}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const DC=e=>Array.isArray(e)&&typeof e[0]=="number";function LC(e){return!!(!e||typeof e=="string"&&FC[e]||DC(e)||Array.isArray(e)&&e.every(LC))}const ks=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,FC={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ks([0,.65,.55,1]),circOut:ks([.55,0,1,.45]),backIn:ks([.31,.01,.66,-.59]),backOut:ks([.33,1.53,.69,.99])};function NC(e){if(e)return DC(e)?ks(e):Array.isArray(e)?e.map(NC):FC[e]}function rA(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:s="loop",ease:a,times:l}={}){const u={[t]:n};l&&(u.offset=l);const c=NC(a);return Array.isArray(c)&&(u.easing=c),e.animate(u,{delay:r,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:s==="reverse"?"alternate":"normal"})}const iA=gO(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),oA=new Set(["opacity","clipPath","filter","transform"]),Xu=10,sA=2e4;function aA(e){return e.type==="spring"||e.name==="backgroundColor"||!LC(e.ease)}function lA(e,t){const n=new Bm({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<sA;)r=n.sample(o),i.push(r.value),o+=Xu;return{times:void 0,keyframes:i,duration:o-Xu,ease:"linear"}}class xy extends _C{constructor(t){super(t);const{name:n,motionValue:r,keyframes:i}=this.options;this.resolver=new CC(i,(o,s)=>this.onKeyframesResolved(o,s),n,r),this.resolver.scheduleResolve()}initPlayback(t,n){var r;let{duration:i=300,times:o,ease:s,type:a,motionValue:l,name:u}=this.options;if(!(!((r=l.owner)===null||r===void 0)&&r.current))return!1;if(aA(this.options)){const{onComplete:d,onUpdate:f,motionValue:h,...g}=this.options,m=lA(t,g);t=m.keyframes,t.length===1&&(t[1]=t[0]),i=m.duration,o=m.times,s=m.ease,a="keyframes"}const c=rA(l.owner.current,u,t,{...this.options,duration:i,times:o,ease:s});return c.startTime=Ir.now(),this.pendingTimeline?(c.timeline=this.pendingTimeline,this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:d}=this.options;l.set(zc(t,this.options,n)),d&&d(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:i,times:o,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return jn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return jn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ar(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ye;const{animation:r}=n;r.timeline=t,r.onfinish=null}return Ye}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:i,type:o,ease:s,times:a}=t;if(!(n.playState==="idle"||n.playState==="finished")){if(this.time){const{motionValue:l,onUpdate:u,onComplete:c,...d}=this.options,f=new Bm({...d,keyframes:r,duration:i,type:o,ease:s,times:a,isGenerator:!0}),h=Ar(this.time);l.setWithVelocity(f.sample(h-Xu).value,f.sample(h).value,Xu)}this.cancel()}}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:i,repeatType:o,damping:s,type:a}=t;return iA()&&r&&oA.has(r)&&n&&n.owner&&n.owner.current instanceof HTMLElement&&!n.owner.getProps().onUpdate&&!i&&o!=="mirror"&&s!==0&&a!=="inertia"}}const Um=(e,t,n,r={},i,o)=>s=>{const a=Dm(r,e)||{},l=a.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Ar(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-u,onUpdate:f=>{t.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:o?void 0:i};WM(a)||(c={...c,...GM(e,c)}),c.duration&&(c.duration=Ar(c.duration)),c.repeatDelay&&(c.repeatDelay=Ar(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let d=!1;if(c.type===!1&&(c.duration=0,c.delay===0&&(d=!0)),d&&!o&&t.get()!==void 0){const f=zc(c.keyframes,a);if(f!==void 0){ze.update(()=>{c.onUpdate(f),c.onComplete()});return}}return!o&&xy.supports(c)?new xy(c):new Bm(c)};function Ju(e){return!!(Ze(e)&&e.add)}function Hm(e,t){e.indexOf(t)===-1&&e.push(t)}function Gm(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Wm{constructor(){this.subscriptions=[]}add(t){return Hm(this.subscriptions,t),()=>Gm(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const s=this.subscriptions[o];s&&s(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Cy=30,uA=e=>!isNaN(parseFloat(e));class cA{constructor(t,n={}){this.version="11.0.24",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Ir.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.canTrackVelocity=uA(this.current),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Ir.now()}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Wm);const r=this.events[t].add(n);return t==="change"?()=>{r(),ze.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ir.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Cy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Cy);return bC(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ka(e,t){return new cA(e,t)}function dA(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ka(n))}function fA(e,t){const n=Vc(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const s in o){const a=SM(o[s]);dA(e,s,a)}}function hA({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function jC(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;const u=e.getValue("willChange");r&&(s=r);const c=[],d=i&&e.animationState&&e.animationState.getState()[i];for(const f in l){const h=e.getValue(f,(o=e.latestValues[f])!==null&&o!==void 0?o:null),g=l[f];if(g===void 0||d&&hA(d,f))continue;const m={delay:n,elapsed:0,...Dm(s||{},f)};let S=!1;if(window.HandoffAppearAnimations){const v=e.getProps()[jx];if(v){const y=window.HandoffAppearAnimations(v,f);y!==null&&(m.elapsed=y,S=!0)}}h.start(Um(f,h,g,e.shouldReduceMotion&&ji.has(f)?{type:!1}:m,e,S));const p=h.animation;p&&(Ju(u)&&(u.add(f),p.then(()=>u.remove(f))),c.push(p))}return a&&Promise.all(c).then(()=>{ze.update(()=>{a&&fA(e,a)})}),c}function Hh(e,t,n={}){var r;const i=Vc(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const s=i?()=>Promise.all(jC(e,i,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=o;return pA(e,t,c+u,d,f,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[u,c]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>c())}else return Promise.all([s(),a(n.delay)])}function pA(e,t,n=0,r=0,i=1,o){const s=[],a=(e.variantChildren.size-1)*r,l=i===1?(u=0)=>u*r:(u=0)=>a-u*r;return Array.from(e.variantChildren).sort(mA).forEach((u,c)=>{u.notify("AnimationStart",t),s.push(Hh(u,t,{...o,delay:n+l(c)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(s)}function mA(e,t){return e.sortNodePosition(t)}function gA(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>Hh(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=Hh(e,t,n);else{const i=typeof t=="function"?Vc(e,t,n.custom):t;r=Promise.all(jC(e,i,n))}return r.then(()=>{ze.postRender(()=>{e.notify("AnimationComplete",t)})})}const vA=[...bm].reverse(),yA=bm.length;function wA(e){return t=>Promise.all(t.map(({animation:n,options:r})=>gA(e,n,r)))}function SA(e){let t=wA(e);const n=CA();let r=!0;const i=l=>(u,c)=>{var d;const f=Vc(e,c,l==="exit"?(d=e.presenceContext)===null||d===void 0?void 0:d.custom:void 0);if(f){const{transition:h,transitionEnd:g,...m}=f;u={...u,...m,...g}}return u};function o(l){t=l(e)}function s(l){const u=e.getProps(),c=e.getVariantContext(!0)||{},d=[],f=new Set;let h={},g=1/0;for(let S=0;S<yA;S++){const p=vA[S],v=n[p],y=u[p]!==void 0?u[p]:c[p],x=Ea(y),_=p===l?v.isActive:null;_===!1&&(g=S);let E=y===c[p]&&y!==u[p]&&x;if(E&&r&&e.manuallyAnimateOnMount&&(E=!1),v.protectedKeys={...h},!v.isActive&&_===null||!y&&!v.prevProp||Fc(y)||typeof y=="boolean")continue;let b=xA(v.prevProp,y)||p===l&&v.isActive&&!E&&x||S>g&&x,T=!1;const k=Array.isArray(y)?y:[y];let I=k.reduce(i(p),{});_===!1&&(I={});const{prevResolvedValues:L={}}=v,ie={...L,...I},ne=J=>{b=!0,f.has(J)&&(T=!0,f.delete(J)),v.needsAnimating[J]=!0;const re=e.getValue(J);re&&(re.liveStyle=!1)};for(const J in ie){const re=I[J],q=L[J];if(h.hasOwnProperty(J))continue;let O=!1;Lh(re)&&Lh(q)?O=!aC(re,q):O=re!==q,O?re!=null?ne(J):f.add(J):re!==void 0&&f.has(J)?ne(J):v.protectedKeys[J]=!0}v.prevProp=y,v.prevResolvedValues=I,v.isActive&&(h={...h,...I}),r&&e.blockInitialAnimation&&(b=!1),b&&(!E||T)&&d.push(...k.map(J=>({animation:J,options:{type:p}})))}if(f.size){const S={};f.forEach(p=>{const v=e.getBaseTarget(p),y=e.getValue(p);y&&(y.liveStyle=!0),S[p]=v===void 0?null:v}),d.push({animation:S})}let m=!!d.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(d):Promise.resolve()}function a(l,u){var c;if(n[l].isActive===u)return Promise.resolve();(c=e.variantChildren)===null||c===void 0||c.forEach(f=>{var h;return(h=f.animationState)===null||h===void 0?void 0:h.setActive(l,u)}),n[l].isActive=u;const d=s(l);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:s,setActive:a,setAnimateFunction:o,getState:()=>n}}function xA(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!aC(t,e):!1}function ei(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function CA(){return{animate:ei(!0),whileInView:ei(),whileHover:ei(),whileTap:ei(),whileDrag:ei(),whileFocus:ei(),exit:ei()}}class _A extends Zr{constructor(t){super(t),t.animationState||(t.animationState=SA(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Fc(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let bA=0;class PA extends Zr{constructor(){super(...arguments),this.id=bA++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const EA={animation:{Feature:_A},exit:{Feature:PA}},_y=(e,t)=>Math.abs(e-t);function RA(e,t){const n=_y(e.x,t.x),r=_y(e.y,t.y);return Math.sqrt(n**2+r**2)}class VC{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Gd(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,h=RA(d.offset,{x:0,y:0})>=3;if(!f&&!h)return;const{point:g}=d,{timestamp:m}=Ne;this.history.push({...g,timestamp:m});const{onStart:S,onMove:p}=this.handlers;f||(S&&S(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),p&&p(this.lastMoveEvent,d)},this.handlePointerMove=(d,f)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Hd(f,this.transformPagePoint),ze.update(this.updatePoint,!0)},this.handlePointerUp=(d,f)=>{this.end();const{onEnd:h,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const S=Gd(d.type==="pointercancel"?this.lastMoveEventInfo:Hd(f,this.transformPagePoint),this.history);this.startEvent&&h&&h(d,S),g&&g(d,S)},!nC(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const s=jc(t),a=Hd(s,this.transformPagePoint),{point:l}=a,{timestamp:u}=Ne;this.history=[{...l,timestamp:u}];const{onSessionStart:c}=n;c&&c(t,Gd(a,this.history)),this.removeListeners=Nn(Fn(this.contextWindow,"pointermove",this.handlePointerMove),Fn(this.contextWindow,"pointerup",this.handlePointerUp),Fn(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Br(this.updatePoint)}}function Hd(e,t){return t?{point:t(e.point)}:e}function by(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Gd({point:e},t){return{point:e,delta:by(e,zC(t)),offset:by(e,TA(t)),velocity:kA(t,.1)}}function TA(e){return e[0]}function zC(e){return e[e.length-1]}function kA(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=zC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ar(t)));)n--;if(!r)return{x:0,y:0};const o=jn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const s={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function bt(e){return e.max-e.min}function Gh(e,t=0,n=.01){return Math.abs(e-t)<=n}function Py(e,t,n,r=.5){e.origin=r,e.originPoint=Ce(t.min,t.max,e.origin),e.scale=bt(n)/bt(t),(Gh(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Ce(n.min,n.max,e.origin)-e.originPoint,(Gh(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Hs(e,t,n,r){Py(e.x,t.x,n.x,r?r.originX:void 0),Py(e.y,t.y,n.y,r?r.originY:void 0)}function Ey(e,t,n){e.min=n.min+t.min,e.max=e.min+bt(t)}function $A(e,t,n){Ey(e.x,t.x,n.x),Ey(e.y,t.y,n.y)}function Ry(e,t,n){e.min=t.min-n.min,e.max=e.min+bt(t)}function Gs(e,t,n){Ry(e.x,t.x,n.x),Ry(e.y,t.y,n.y)}function MA(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?Ce(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?Ce(n,e,r.max):Math.min(e,n)),e}function Ty(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function OA(e,{top:t,left:n,bottom:r,right:i}){return{x:Ty(e.x,n,i),y:Ty(e.y,t,r)}}function ky(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function AA(e,t){return{x:ky(e.x,t.x),y:ky(e.y,t.y)}}function IA(e,t){let n=.5;const r=bt(e),i=bt(t);return i>r?n=Ta(t.min,t.max-r,e.min):r>i&&(n=Ta(e.min,e.max-i,t.min)),zr(0,1,n)}function DA(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Wh=.35;function LA(e=Wh){return e===!1?e=0:e===!0&&(e=Wh),{x:$y(e,"left","right"),y:$y(e,"top","bottom")}}function $y(e,t,n){return{min:My(e,t),max:My(e,n)}}function My(e,t){return typeof e=="number"?e:e[t]||0}const Oy=()=>({translate:0,scale:1,origin:0,originPoint:0}),lo=()=>({x:Oy(),y:Oy()}),Ay=()=>({min:0,max:0}),Te=()=>({x:Ay(),y:Ay()});function kt(e){return[e("x"),e("y")]}function BC({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function FA({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function NA(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Wd(e){return e===void 0||e===1}function Qh({scale:e,scaleX:t,scaleY:n}){return!Wd(e)||!Wd(t)||!Wd(n)}function ri(e){return Qh(e)||UC(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function UC(e){return Iy(e.x)||Iy(e.y)}function Iy(e){return e&&e!=="0%"}function ec(e,t,n){const r=e-n,i=t*r;return n+i}function Dy(e,t,n,r,i){return i!==void 0&&(e=ec(e,i,r)),ec(e,n,r)+t}function Kh(e,t=0,n=1,r,i){e.min=Dy(e.min,t,n,r,i),e.max=Dy(e.max,t,n,r,i)}function HC(e,{x:t,y:n}){Kh(e.x,t.translate,t.scale,t.originPoint),Kh(e.y,n.translate,n.scale,n.originPoint)}function jA(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,s;for(let a=0;a<i;a++){o=n[a],s=o.projectionDelta;const l=o.instance;l&&l.style&&l.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&uo(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,HC(e,s)),r&&ri(o.latestValues)&&uo(e,o.latestValues))}t.x=Ly(t.x),t.y=Ly(t.y)}function Ly(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function ar(e,t){e.min=e.min+t,e.max=e.max+t}function Fy(e,t,[n,r,i]){const o=t[i]!==void 0?t[i]:.5,s=Ce(e.min,e.max,o);Kh(e,t[n],t[r],s,t.scale)}const VA=["x","scaleX","originX"],zA=["y","scaleY","originY"];function uo(e,t){Fy(e.x,t,VA),Fy(e.y,t,zA)}function GC(e,t){return BC(NA(e.getBoundingClientRect(),t))}function BA(e,t,n){const r=GC(e,n),{scroll:i}=t;return i&&(ar(r.x,i.offset.x),ar(r.y,i.offset.y)),r}const WC=({current:e})=>e?e.ownerDocument.defaultView:null,UA=new WeakMap;class HA{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Te(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=c=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(jc(c,"page").point)},o=(c,d)=>{const{drag:f,dragPropagation:h,onDragStart:g}=this.getProps();if(f&&!h&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=iC(f),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),kt(S=>{let p=this.getAxisMotionValue(S).get()||0;if(gn.test(p)){const{projection:v}=this.visualElement;if(v&&v.layout){const y=v.layout.layoutBox[S];y&&(p=bt(y)*(parseFloat(p)/100))}}this.originPoint[S]=p}),g&&g(c,d);const{animationState:m}=this.visualElement;m&&m.setActive("whileDrag",!0)},s=(c,d)=>{const{dragPropagation:f,dragDirectionLock:h,onDirectionLock:g,onDrag:m}=this.getProps();if(!f&&!this.openGlobalLock)return;const{offset:S}=d;if(h&&this.currentDirection===null){this.currentDirection=GA(S),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",d.point,S),this.updateAxis("y",d.point,S),this.visualElement.render(),m&&m(c,d)},a=(c,d)=>this.stop(c,d),l=()=>kt(c=>{var d;return this.getAnimationState(c)==="paused"&&((d=this.getAxisMotionValue(c).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new VC(t,{onSessionStart:i,onStart:o,onMove:s,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:WC(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&o(t,n)}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Al(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let s=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(s=MA(s,this.constraints[t],this.elastic[t])),o.set(s)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&so(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=OA(i.layoutBox,n):this.constraints=!1,this.elastic=LA(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&kt(s=>{this.getAxisMotionValue(s)&&(this.constraints[s]=DA(i.layoutBox[s],this.constraints[s]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!so(t))return!1;const r=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=BA(r,i.root,this.visualElement.getTransformPagePoint());let s=AA(i.layout.layoutBox,o);if(n){const a=n(FA(s));this.hasMutatedConstraints=!!a,a&&(s=BC(a))}return s}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:s,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},u=kt(c=>{if(!Al(c,n,this.currentDirection))return;let d=l&&l[c]||{};s&&(d={min:0,max:0});const f=i?200:1e6,h=i?40:1e7,g={type:"inertia",velocity:r?t[c]:0,bounceStiffness:f,bounceDamping:h,timeConstant:750,restDelta:1,restSpeed:10,...o,...d};return this.startAxisValueAnimation(c,g)});return Promise.all(u).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return r.start(Um(t,r,0,n,this.visualElement))}stopAnimation(){kt(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){kt(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n="_drag"+t.toUpperCase(),r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){kt(n=>{const{drag:r}=this.getProps();if(!Al(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:s,max:a}=i.layout.layoutBox[n];o.set(t[n]-Ce(s,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!so(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};kt(s=>{const a=this.getAxisMotionValue(s);if(a){const l=a.get();i[s]=IA({min:l,max:l},this.constraints[s])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),kt(s=>{if(!Al(s,t,null))return;const a=this.getAxisMotionValue(s),{min:l,max:u}=this.constraints[s];a.set(Ce(l,u,i[s]))})}addListeners(){if(!this.visualElement.current)return;UA.set(this.visualElement,this);const t=this.visualElement.current,n=Fn(t,"pointerdown",l=>{const{drag:u,dragListener:c=!0}=this.getProps();u&&c&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();so(l)&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),r();const s=An(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(kt(c=>{const d=this.getAxisMotionValue(c);d&&(this.originPoint[c]+=l[c].translate,d.set(d.get()+l[c].translate))}),this.visualElement.render())});return()=>{s(),n(),o(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:s=Wh,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:s,dragMomentum:a}}}function Al(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function GA(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class WA extends Zr{constructor(t){super(t),this.removeGroupControls=Ye,this.removeListeners=Ye,this.controls=new HA(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ye}unmount(){this.removeGroupControls(),this.removeListeners()}}const Ny=e=>(t,n)=>{e&&e(t,n)};class QA extends Zr{constructor(){super(...arguments),this.removePointerDownListener=Ye}onPointerDown(t){this.session=new VC(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:WC(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:Ny(t),onStart:Ny(n),onMove:r,onEnd:(o,s)=>{delete this.session,i&&i(o,s)}}}mount(){this.removePointerDownListener=Fn(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function KA(){const e=w.useContext(Sm);if(e===null)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=w.useId();return w.useEffect(()=>r(i),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}const au={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function jy(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(B.test(e))e=parseFloat(e);else return e;const n=jy(e,t.target.x),r=jy(e,t.target.y);return`${n}% ${r}%`}},qA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ur.parse(e);if(i.length>5)return r;const o=Ur.createTransformer(e),s=typeof i[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=a,i[1+s]/=l;const u=Ce(a,l,.5);return typeof i[2+s]=="number"&&(i[2+s]/=u),typeof i[3+s]=="number"&&(i[3+s]/=u),o(i)}};class ZA extends lc.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;q$(YA),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),au.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,s=r.projection;return s&&(s.isPresent=o,i||t.layoutDependency!==n||n===void 0?s.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?s.promote():s.relegate()||ze.postRender(()=>{const a=s.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),_m.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function QC(e){const[t,n]=KA(),r=w.useContext(Bx);return lc.createElement(ZA,{...e,layoutGroup:r,switchLayoutGroup:w.useContext(Ux),isPresent:t,safeToRemove:n})}const YA={borderRadius:{...xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomLeftRadius:xs,borderBottomRightRadius:xs,boxShadow:qA},KC=["TopLeft","TopRight","BottomLeft","BottomRight"],XA=KC.length,Vy=e=>typeof e=="string"?parseFloat(e):e,zy=e=>typeof e=="number"||B.test(e);function JA(e,t,n,r,i,o){i?(e.opacity=Ce(0,n.opacity!==void 0?n.opacity:1,eI(r)),e.opacityExit=Ce(t.opacity!==void 0?t.opacity:1,0,tI(r))):o&&(e.opacity=Ce(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let s=0;s<XA;s++){const a=`border${KC[s]}Radius`;let l=By(t,a),u=By(n,a);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||zy(l)===zy(u)?(e[a]=Math.max(Ce(Vy(l),Vy(u),r),0),(gn.test(u)||gn.test(l))&&(e[a]+="%")):e[a]=u}(t.rotate||n.rotate)&&(e.rotate=Ce(t.rotate||0,n.rotate||0,r))}function By(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const eI=qC(0,.5,MC),tI=qC(.5,.95,Ye);function qC(e,t,n){return r=>r<e?0:r>t?1:n(Ta(e,t,r))}function Uy(e,t){e.min=t.min,e.max=t.max}function Tt(e,t){Uy(e.x,t.x),Uy(e.y,t.y)}function Hy(e,t,n,r,i){return e-=t,e=ec(e,1/n,r),i!==void 0&&(e=ec(e,1/i,r)),e}function nI(e,t=0,n=1,r=.5,i,o=e,s=e){if(gn.test(t)&&(t=parseFloat(t),t=Ce(s.min,s.max,t/100)-s.min),typeof t!="number")return;let a=Ce(o.min,o.max,r);e===o&&(a-=t),e.min=Hy(e.min,t,n,a,i),e.max=Hy(e.max,t,n,a,i)}function Gy(e,t,[n,r,i],o,s){nI(e,t[n],t[r],t[i],t.scale,o,s)}const rI=["x","scaleX","originX"],iI=["y","scaleY","originY"];function Wy(e,t,n,r){Gy(e.x,t,rI,n?n.x:void 0,r?r.x:void 0),Gy(e.y,t,iI,n?n.y:void 0,r?r.y:void 0)}function Qy(e){return e.translate===0&&e.scale===1}function ZC(e){return Qy(e.x)&&Qy(e.y)}function oI(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function YC(e,t){return Math.round(e.x.min)===Math.round(t.x.min)&&Math.round(e.x.max)===Math.round(t.x.max)&&Math.round(e.y.min)===Math.round(t.y.min)&&Math.round(e.y.max)===Math.round(t.y.max)}function Ky(e){return bt(e.x)/bt(e.y)}class sI{constructor(){this.members=[]}add(t){Hm(this.members,t),t.scheduleRender()}remove(t){if(Gm(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function qy(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,s=(n==null?void 0:n.z)||0;if((i||o||s)&&(r=`translate3d(${i}px, ${o}px, ${s}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:u,rotateX:c,rotateY:d,skewX:f,skewY:h}=n;u&&(r+=`rotate(${u}deg) `),c&&(r+=`rotateX(${c}deg) `),d&&(r+=`rotateY(${d}deg) `),f&&(r+=`skewX(${f}deg) `),h&&(r+=`skewY(${h}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const aI=(e,t)=>e.depth-t.depth;class lI{constructor(){this.children=[],this.isDirty=!1}add(t){Hm(this.children,t),this.isDirty=!0}remove(t){Gm(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(aI),this.isDirty=!1,this.children.forEach(t)}}function uI(e,t){const n=Ir.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Br(r),e(o-t))};return ze.read(r,!0),()=>Br(r)}function cI(e){window.MotionDebug&&window.MotionDebug.record(e)}function dI(e){return e instanceof SVGElement&&e.tagName!=="svg"}function fI(e,t,n){const r=Ze(e)?e:ka(e);return r.start(Um("",r,t,n)),r.animation}const Qd=["","X","Y","Z"],hI={visibility:"hidden"},Zy=1e3;let pI=0;const ii={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function Kd(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function XC({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(s={},a=t==null?void 0:t()){this.id=pI++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,ii.totalNodes=ii.resolvedTargetDeltas=ii.recalculatedProjection=0,this.nodes.forEach(vI),this.nodes.forEach(CI),this.nodes.forEach(_I),this.nodes.forEach(yI),cI(ii)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=s,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new lI)}addEventListener(s,a){return this.eventHandlers.has(s)||this.eventHandlers.set(s,new Wm),this.eventHandlers.get(s).add(a)}notifyListeners(s,...a){const l=this.eventHandlers.get(s);l&&l.notify(...a)}hasListeners(s){return this.eventHandlers.has(s)}mount(s,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=dI(s),this.instance=s;const{layoutId:l,layout:u,visualElement:c}=this.options;if(c&&!c.current&&c.mount(s),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(u||l)&&(this.isLayoutDirty=!0),e){let d;const f=()=>this.root.updateBlockedByResize=!1;e(s,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=uI(f,250),au.hasAnimatedSinceResize&&(au.hasAnimatedSinceResize=!1,this.nodes.forEach(Xy))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&c&&(l||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:f,hasRelativeTargetChanged:h,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||TI,{onLayoutAnimationStart:S,onLayoutAnimationComplete:p}=c.getProps(),v=!this.targetLayout||!YC(this.targetLayout,g)||h,y=!f&&h;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||y||f&&(v||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,y);const x={...Dm(m,"layout"),onPlay:S,onComplete:p};(c.shouldReduceMotion||this.options.layoutRoot)&&(x.delay=0,x.type=!1),this.startAnimation(x)}else f||Xy(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const s=this.getStack();s&&s.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Br(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(bI),this.animationId++)}getTransformTemplate(){const{visualElement:s}=this.options;return s&&s.getProps().transformTemplate}willUpdate(s=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const d=this.path[c];d.shouldResetTransform=!0,d.updateScroll("snapshot"),d.options.layoutRoot&&d.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),s&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Yy);return}this.isUpdating||this.nodes.forEach(SI),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(xI),this.nodes.forEach(mI),this.nodes.forEach(gI),this.clearAllSnapshots();const a=Ir.now();Ne.delta=zr(0,1e3/60,a-Ne.timestamp),Ne.timestamp=a,Ne.isProcessing=!0,Fd.update.process(Ne),Fd.preRender.process(Ne),Fd.render.process(Ne),Ne.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,_m.read(()=>this.update()))}clearAllSnapshots(){this.nodes.forEach(wI),this.sharedNodes.forEach(PI)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ze.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ze.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const s=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Te(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,s?s.layoutBox:void 0)}updateScroll(s="measure"){let a=!!(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===s&&(a=!1),a&&(this.scroll={animationId:this.root.animationId,phase:s,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const s=this.isLayoutDirty||this.shouldResetTransform,a=this.projectionDelta&&!ZC(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,c=u!==this.prevTransformTemplateValue;s&&(a||ri(this.latestValues)||c)&&(i(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(s=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return s&&(l=this.removeTransform(l)),kI(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:s}=this.options;if(!s)return Te();const a=s.measureViewportBox(),{scroll:l}=this.root;return l&&(ar(a.x,l.offset.x),ar(a.y,l.offset.y)),a}removeElementScroll(s){const a=Te();Tt(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l],{scroll:c,options:d}=u;if(u!==this.root&&c&&d.layoutScroll){if(c.isRoot){Tt(a,s);const{scroll:f}=this.root;f&&(ar(a.x,-f.offset.x),ar(a.y,-f.offset.y))}ar(a.x,c.offset.x),ar(a.y,c.offset.y)}}return a}applyTransform(s,a=!1){const l=Te();Tt(l,s);for(let u=0;u<this.path.length;u++){const c=this.path[u];!a&&c.options.layoutScroll&&c.scroll&&c!==c.root&&uo(l,{x:-c.scroll.offset.x,y:-c.scroll.offset.y}),ri(c.latestValues)&&uo(l,c.latestValues)}return ri(this.latestValues)&&uo(l,this.latestValues),l}removeTransform(s){const a=Te();Tt(a,s);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!ri(u.latestValues))continue;Qh(u.latestValues)&&u.updateSnapshot();const c=Te(),d=u.measurePageBox();Tt(c,d),Wy(a,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,c)}return ri(this.latestValues)&&Wy(a,this.latestValues),a}setTargetDelta(s){this.targetDelta=s,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(s){this.options={...this.options,...s,crossfade:s.crossfade!==void 0?s.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ne.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(s=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(s||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget))return;const{layout:d,layoutId:f}=this.options;if(!(!this.layout||!(d||f))){if(this.resolvedRelativeTargetAt=Ne.timestamp,!this.targetDelta&&!this.relativeTarget){const h=this.getClosestProjectingParent();h&&h.layout&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Te(),this.relativeTargetOrigin=Te(),Gs(this.relativeTargetOrigin,this.layout.layoutBox,h.layout.layoutBox),Tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Te(),this.targetWithTransforms=Te()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),$A(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):Tt(this.target,this.layout.layoutBox),HC(this.target,this.targetDelta)):Tt(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const h=this.getClosestProjectingParent();h&&!!h.resumingFrom==!!this.resumingFrom&&!h.options.layoutScroll&&h.target&&this.animationProgress!==1?(this.relativeParent=h,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Te(),this.relativeTargetOrigin=Te(),Gs(this.relativeTargetOrigin,this.target,h.target),Tt(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}ii.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Qh(this.parent.latestValues)||UC(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var s;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||!((s=this.parent)===null||s===void 0)&&s.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Ne.timestamp&&(u=!1),u)return;const{layout:c,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||d))return;Tt(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,h=this.treeScale.y;jA(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Te());const{target:g}=a;if(!g){this.projectionTransform&&(this.projectionDelta=lo(),this.projectionTransform="none",this.scheduleRender());return}this.projectionDelta||(this.projectionDelta=lo(),this.projectionDeltaWithTransform=lo());const m=this.projectionTransform;Hs(this.projectionDelta,this.layoutCorrected,g,this.latestValues),this.projectionTransform=qy(this.projectionDelta,this.treeScale),(this.projectionTransform!==m||this.treeScale.x!==f||this.treeScale.y!==h)&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",g)),ii.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(s=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),s){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(s,a=!1){const l=this.snapshot,u=l?l.latestValues:{},c={...this.latestValues},d=lo();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=Te(),h=l?l.source:void 0,g=this.layout?this.layout.source:void 0,m=h!==g,S=this.getStack(),p=!S||S.members.length<=1,v=!!(m&&!p&&this.options.crossfade===!0&&!this.path.some(RI));this.animationProgress=0;let y;this.mixTargetDelta=x=>{const _=x/1e3;Jy(d.x,s.x,_),Jy(d.y,s.y,_),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gs(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),EI(this.relativeTarget,this.relativeTargetOrigin,f,_),y&&oI(this.relativeTarget,y)&&(this.isProjectionDirty=!1),y||(y=Te()),Tt(y,this.relativeTarget)),m&&(this.animationValues=c,JA(c,u,this.latestValues,_,v,p)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=_},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(s){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Br(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{au.hasAnimatedSinceResize=!0,this.currentAnimation=fI(0,Zy,{...s,onUpdate:a=>{this.mixTargetDelta(a),s.onUpdate&&s.onUpdate(a)},onComplete:()=>{s.onComplete&&s.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const s=this.getStack();s&&s.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zy),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const s=this.getLead();let{targetWithTransforms:a,target:l,layout:u,latestValues:c}=s;if(!(!a||!l||!u)){if(this!==s&&this.layout&&u&&JC(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Te();const d=bt(this.layout.layoutBox.x);l.x.min=s.target.x.min,l.x.max=l.x.min+d;const f=bt(this.layout.layoutBox.y);l.y.min=s.target.y.min,l.y.max=l.y.min+f}Tt(a,l),uo(a,c),Hs(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(s,a){this.sharedNodes.has(s)||this.sharedNodes.set(s,new sI),this.sharedNodes.get(s).add(a);const u=a.options.initialPromotionConfig;a.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(a):void 0})}isLead(){const s=this.getStack();return s?s.lead===this:!0}getLead(){var s;const{layoutId:a}=this.options;return a?((s=this.getStack())===null||s===void 0?void 0:s.lead)||this:this}getPrevLead(){var s;const{layoutId:a}=this.options;return a?(s=this.getStack())===null||s===void 0?void 0:s.prevLead:void 0}getStack(){const{layoutId:s}=this.options;if(s)return this.root.sharedNodes.get(s)}promote({needsReset:s,transition:a,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),s&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const s=this.getStack();return s?s.relegate(this):!1}resetSkewAndRotation(){const{visualElement:s}=this.options;if(!s)return;let a=!1;const{latestValues:l}=s;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const u={};l.z&&Kd("z",s,u,this.animationValues);for(let c=0;c<Qd.length;c++)Kd(`rotate${Qd[c]}`,s,u,this.animationValues),Kd(`skew${Qd[c]}`,s,u,this.animationValues);s.render();for(const c in u)s.setStaticValue(c,u[c]),this.animationValues&&(this.animationValues[c]=u[c]);s.scheduleRender()}getProjectionStyles(s){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return hI;const u={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ou(s==null?void 0:s.pointerEvents)||"",u.transform=c?c(this.latestValues,""):"none",u;const d=this.getLead();if(!this.projectionDelta||!this.layout||!d.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=ou(s==null?void 0:s.pointerEvents)||""),this.hasProjected&&!ri(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const f=d.animationValues||d.latestValues;this.applyTransformsToTarget(),u.transform=qy(this.projectionDeltaWithTransform,this.treeScale,f),c&&(u.transform=c(f,u.transform));const{x:h,y:g}=this.projectionDelta;u.transformOrigin=`${h.origin*100}% ${g.origin*100}% 0`,d.animationValues?u.opacity=d===this?(l=(a=f.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=d===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const m in Ku){if(f[m]===void 0)continue;const{correct:S,applyTo:p}=Ku[m],v=u.transform==="none"?f[m]:S(f[m],d);if(p){const y=p.length;for(let x=0;x<y;x++)u[p[x]]=v}else u[m]=v}return this.options.layoutId&&(u.pointerEvents=d===this?ou(s==null?void 0:s.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(s=>{var a;return(a=s.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Yy),this.root.sharedNodes.clear()}}}function mI(e){e.updateLayout()}function gI(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:i}=e.layout,{animationType:o}=e.options,s=n.source!==e.layout.source;o==="size"?kt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=bt(f);f.min=r[d].min,f.max=f.min+h}):JC(o,n.layoutBox,r)&&kt(d=>{const f=s?n.measuredBox[d]:n.layoutBox[d],h=bt(r[d]);f.max=f.min+h,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+h)});const a=lo();Hs(a,r,n.layoutBox);const l=lo();s?Hs(l,e.applyTransform(i,!0),n.measuredBox):Hs(l,r,n.layoutBox);const u=!ZC(a);let c=!1;if(!e.resumeFrom){const d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:f,layout:h}=d;if(f&&h){const g=Te();Gs(g,n.layoutBox,f.layoutBox);const m=Te();Gs(m,r,h.layoutBox),YC(g,m)||(c=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:u,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function vI(e){ii.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function yI(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function wI(e){e.clearSnapshot()}function Yy(e){e.clearMeasurements()}function SI(e){e.isLayoutDirty=!1}function xI(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Xy(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function CI(e){e.resolveTargetDelta()}function _I(e){e.calcProjection()}function bI(e){e.resetSkewAndRotation()}function PI(e){e.removeLeadSnapshot()}function Jy(e,t,n){e.translate=Ce(t.translate,0,n),e.scale=Ce(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function e0(e,t,n,r){e.min=Ce(t.min,n.min,r),e.max=Ce(t.max,n.max,r)}function EI(e,t,n,r){e0(e.x,t.x,n.x,r),e0(e.y,t.y,n.y,r)}function RI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const TI={duration:.45,ease:[.4,0,.1,1]},t0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),n0=t0("applewebkit/")&&!t0("chrome/")?Math.round:Ye;function r0(e){e.min=n0(e.min),e.max=n0(e.max)}function kI(e){r0(e.x),r0(e.y)}function JC(e,t,n){return e==="position"||e==="preserve-aspect"&&!Gh(Ky(t),Ky(n),.2)}const $I=XC({attachResizeListener:(e,t)=>An(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),qd={current:void 0},e_=XC({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qd.current){const e=new $I({});e.mount(window),e.setOptions({layoutScroll:!0}),qd.current=e}return qd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),MI={pan:{Feature:QA},drag:{Feature:WA,ProjectionNode:e_,MeasureLayout:QC}},qh={current:null},t_={current:!1};function OI(){if(t_.current=!0,!!xm)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>qh.current=e.matches;e.addListener(t),t()}else qh.current=!1}function AI(e,t,n){const{willChange:r}=t;for(const i in t){const o=t[i],s=n[i];if(Ze(o))e.addValue(i,o),Ju(r)&&r.add(i);else if(Ze(s))e.addValue(i,ka(o,{owner:e})),Ju(r)&&r.remove(i);else if(s!==o)if(e.hasValue(i)){const a=e.getValue(i);a.liveStyle===!0?a.jump(o):a.hasAnimated||a.set(o)}else{const a=e.getStaticValue(i);e.addValue(i,ka(a!==void 0?a:o,{owner:e}))}}for(const i in n)t[i]===void 0&&e.removeValue(i);return t}const i0=new WeakMap,II=[...hC,Ke,Ur],DI=e=>II.find(fC(e)),n_=Object.keys(Ra),LI=n_.length,o0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],FI=Pm.length;class NI{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,visualState:s},a={}){this.resolveKeyframes=(f,h,g,m)=>new this.KeyframeResolver(f,h,g,m,this),this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Lm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>ze.render(this.render,!1,!0);const{latestValues:l,renderState:u}=s;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Nc(n),this.isVariantNode=zx(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in d){const h=d[f];l[f]!==void 0&&Ze(h)&&(h.set(l[f],!1),Ju(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n,r){return{}}mount(t){this.current=t,i0.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),t_.current||OI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:qh.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){i0.delete(this.current),this.projection&&this.projection.unmount(),Br(this.notifyUpdate),Br(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=ji.has(t),i=n.on("change",s=>{this.latestValues[t]=s,this.props.onUpdate&&ze.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{i(),o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,i,o){let s,a;for(let l=0;l<LI;l++){const u=n_[l],{isEnabled:c,Feature:d,ProjectionNode:f,MeasureLayout:h}=Ra[u];f&&(s=f),c(n)&&(!this.features[u]&&d&&(this.features[u]=new d(this)),h&&(a=h))}if((this.type==="html"||this.type==="svg")&&!this.projection&&s){this.projection=new s(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:u,drag:c,dragConstraints:d,layoutScroll:f,layoutRoot:h}=n;this.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!c||d&&so(d),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof u=="string"?u:"both",initialPromotionConfig:o,layoutScroll:f,layoutRoot:h})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Te()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<o0.length;r++){const i=o0[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o=t["on"+i];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=AI(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<FI;r++){const i=Pm[r],o=this.props[i];(Ea(o)||o===!1)&&(n[i]=o)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ka(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(cC(i)||lC(i))?i=parseFloat(i):!DI(i)&&Ur.test(n)&&(i=xC(t,n)),this.setBaseTarget(t,Ze(i)?i.get():i)),Ze(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n,r;const{initial:i}=this.props,o=typeof i=="string"||typeof i=="object"?(r=Im(this.props,i,(n=this.presenceContext)===null||n===void 0?void 0:n.custom))===null||r===void 0?void 0:r[t]:void 0;if(i&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ze(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Wm),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class r_ extends NI{constructor(){super(...arguments),this.KeyframeResolver=CC}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}}function jI(e){return window.getComputedStyle(e)}class VI extends r_{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,n){if(ji.has(n)){const r=Nm(n);return r&&r.default||0}else{const r=jI(t),i=(Wx(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return GC(t,n)}build(t,n,r,i){km(t,n,r,i.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Am(t,n,r)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ze(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,i){Yx(t,n,r,i)}}class zI extends r_{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ji.has(n)){const r=Nm(n);return r&&r.default||0}return n=Xx.has(n)?n:Cm(n),t.getAttribute(n)}measureInstanceViewportBox(){return Te()}scrapeMotionValuesFromProps(t,n){return eC(t,n,this)}build(t,n,r,i){Mm(t,n,r,this.isSVGTag,i.transformTemplate)}renderInstance(t,n,r,i){Jx(t,n,r,i)}mount(t){this.isSVGTag=Om(t.tagName),super.mount(t)}}const BI=(e,t)=>Em(e)?new zI(t,{enableHardwareAcceleration:!1}):new VI(t,{enableHardwareAcceleration:!0}),UI={layout:{ProjectionNode:e_,MeasureLayout:QC}},HI={...EA,...NM,...MI,...UI},GI=Q$((e,t)=>PM(e,t,HI,BI)),WI=({className:e,onClick:t})=>P.jsx(GI.button,{layoutId:"monoverse-logo",transition:{type:"spring",duration:.5},className:le("text-center text-6xl font-medium text-primary",e),onClick:t,children:"monoverse"}),QI=Ja("/_layout/_nested")({component:KI});function KI(){const{toggleTheme:e}=os();return P.jsxs(P.Fragment,{children:[P.jsxs("div",{className:"flex items-center justify-between",children:[P.jsx(od,{to:"/",children:P.jsx(WI,{className:"text-3xl font-bold"})}),P.jsx(Ln,{variant:"ghost",onClick:e,children:P.jsx(K2,{})})]}),P.jsxs("div",{className:"mt-10",children:[P.jsx(od,{to:"/overview",children:({isActive:t})=>P.jsx(Ln,{variant:t?"default":"secondary",children:"Overview"})}),P.jsx(od,{to:"/sync",children:({isActive:t})=>P.jsx(Ln,{variant:t?"default":"secondary",children:"Sync"})})]}),P.jsx(fc,{})]})}const Qm=({root:e,particles:t,decay:n,lifetime:r,updateParticle:i,onFinish:o})=>{const s=r;let a=0;const l=()=>{t.forEach(u=>i(u,a/s,n)),a+=1,a<s?window.requestAnimationFrame(l):(t.forEach(u=>{if(u.element.parentNode===e)return e.removeChild(u.element)}),o())};window.requestAnimationFrame(l)},{PI:lu}=Math,s0=e=>e*(lu/180),tc=(e,t)=>{const n=Math.ceil(e),r=Math.floor(t);return Math.floor(Math.random()*(r-n))+n},Km=(e,t,n,r)=>{const i=s0(e),o=s0(t),{random:s}=Math;return{x:0,y:0,z:0,height:0,wobble:s()*10,velocity:n*.5+s()*n,angle2D:-i+(.5*o-s()*o),angle3D:-(lu/4)+s()*(lu/2),tiltAngle:s()*lu,differentiator:r}},qI=e=>{const t=document.getElementById(e);return t||console.error(`Element with an ID of ${e} could not be found. Please provide a valid ID.`),t},ZI=["#A45BF1","#25C6F6","#72F753","#F76C88","#F5F770"],i_=[-.6,-.3,0,.3,.6],YI=(e,t,n,r,i,o)=>Array.from({length:t}).map((s,a)=>{const l=document.createElement("span");return l.style["background-color"]=o[a%o.length],l.style.width=`${n}px`,l.style.height=`${n}px`,l.style.position=i,l.style.zIndex=`${r}`,e.appendChild(l),{element:l,differentiator:tc(0,i_.length)}}),XI=(e,t,n)=>{const{x:r,y:i,tiltAngle:o,wobble:s,angle2D:a,angle3D:l,velocity:u,differentiator:c}=e.physics;e.physics.x+=Math.cos(a)*u,e.physics.y+=Math.sin(a)*u,e.physics.z+=Math.sin(l)*u,e.physics.wobble+=.05,e.physics.velocity*=n,e.physics.y+=3.5,e.physics.tiltAngle+=.15;const d=r+(i_[c]*t*s*s+20*(c%2?Math.sin(s/4):Math.cos(s/4))),f=i+5*Math.sin(s);e.element.style.transform=`translate3d(${d}px, ${f}px, 0) rotate3d(1, 1, 1, ${c%2?o:-1*o}rad)`,e.element.style.scale=`${1-.2*t}`,t>.5&&(e.element.style.opacity=`${2-2*t}`)},JI=(e,t,n)=>{const r=n||{},{elementCount:i=50,elementSize:o=8,colors:s=ZI,angle:a=90,spread:l=45,decay:u=.94,lifetime:c=200,startVelocity:d=35,zIndex:f=0,position:h="fixed",onAnimationComplete:g}=r,m=YI(e,i,o,f,h,s).map(({element:S,differentiator:p})=>({element:S,physics:Km(a,l,d,p)}));Qm({root:e,particles:m,decay:u,lifetime:c,updateParticle:XI,onFinish:()=>{typeof g=="function"&&g(),t()}})},e3=["🤓","😊","🥳"],o_=[-.6,-.3,0,.3,.6],t3=(e,t,n,r,i,o)=>Array.from({length:t}).map((s,a)=>{const l=document.createElement("span");return l.innerHTML=o[a%o.length],l.style.fontSize=`${n+tc(0,4)}px`,l.style.position=i,l.style.zIndex=`${r}`,e.appendChild(l),{element:l,differentiator:tc(0,o_.length)}}),n3=(e,t,n)=>{const{x:r,y:i,tiltAngle:o,angle2D:s,velocity:a,differentiator:l,wobble:u}=e.physics;e.physics.x+=Math.cos(s)*a,e.physics.y+=Math.sin(s)*a,e.physics.wobble+=0,e.physics.velocity*=n,e.physics.y+=5,e.physics.tiltAngle+=.05;const c=r+(o_[l]*t*u*u+20*Math.sin(u/4));e.element.style.transform=`translate3d(${c}px, ${i}px, 0) rotate3d(0, 0, 1, ${l%2?o:-1*o}rad)`,t>.5&&(e.element.style.opacity=`${2-2*t}`)},r3=(e,t,n)=>{const r=n||{},{elementCount:i=20,elementSize:o=25,emoji:s=e3,angle:a=90,spread:l=45,decay:u=.94,lifetime:c=200,startVelocity:d=35,zIndex:f=0,position:h="fixed",onAnimationComplete:g}=r,m=t3(e,i,o,f,h,s).map(({element:S,differentiator:p})=>({element:S,physics:Km(a,l,d,p)}));Qm({root:e,particles:m,decay:u,lifetime:c,updateParticle:n3,onFinish:()=>{typeof g=="function"&&g(),t()}})};var i3=`<svg width="100%" viewBox="0 0 976 3040" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
93
|
-
<path d="M489.693 1269.49C489.773 1378.79 410.493 1466.8 389.107 1571.11C384.147 1595.33 382.893 1620.12 386.187 1644.64C389.44 1668.83 399.28 1691.16 409.04 1713.29C419.253 1736.44 429.28 1760.11 429.453 1785.83C429.64 1812.27 416.307 1836.8 408.933 1861.59C396 1905.15 409.613 1948.88 425.213 1989.73C442.04 2033.83 461.387 2077.87 456.6 2126.17C453.92 2153.15 444.147 2179.13 434.2 2204.13C424.173 2229.35 413.72 2254.28 405.507 2280.17C389.213 2331.51 379.493 2385.83 378.267 2439.72C377.693 2464.89 380.333 2490.25 388.667 2514.11C397.053 2538.09 412.6 2558.75 424.733 2580.84C449.907 2626.64 458.453 2681 451.053 2732.52C443.853 2782.56 414.227 2825.99 408.893 2876.35C404.44 2918.39 416.733 2961.63 440.08 2996.53C450.373 3011.91 463.267 3025.44 477.867 3036.75C480.773 3039 484.88 3034.95 481.947 3032.68C446.147 3004.96 423.24 2964.2 415.907 2919.71C412.107 2896.61 413.627 2872.95 419.427 2850.35C426.053 2824.51 438.067 2800.36 446.667 2775.17C462.44 2729 463.147 2678.51 450.92 2631.45C444.733 2607.64 434.453 2585.4 421.893 2564.32C407.933 2540.91 394.307 2518.68 388.32 2491.71C382.493 2465.45 383.413 2438 385.56 2411.37C387.853 2382.85 392.467 2354.56 398.827 2326.67C405 2299.61 413.253 2273.05 423.107 2247.12C432.533 2222.27 443.533 2198.05 451.867 2172.8C459.707 2149.04 464.387 2124.29 463 2099.23C461.773 2077.19 455.64 2055.65 448.467 2034.89C433.587 1991.8 411.307 1949.77 409.413 1903.37C408.36 1877.76 417.12 1854.67 425.587 1830.97C433.68 1808.33 437.44 1786.41 432.787 1762.6C428.307 1739.63 417.333 1718.23 408.12 1696.91C397.267 1671.77 390.413 1646.41 390.013 1618.89C388.387 1509.52 469.707 1420.85 490.813 1316.72C493.973 1301.19 495.467 1285.33 495.453 1269.49C495.453 1265.77 489.693 1265.77 489.693 1269.49" stroke="#7A7E82" stroke-width="4"/>
|
|
94
|
-
<path d="M555.653 1298.41H423.52C415.173 1298.41 408.413 1305.17 408.413 1313.52C408.413 1321.85 415.173 1328.63 423.52 1328.63H555.653C564 1328.63 570.76 1321.85 570.76 1313.52C570.76 1305.17 564 1298.41 555.653 1298.41Z" fill="currentColor"/>
|
|
95
|
-
<path d="M555.653 1298.41H423.52C415.173 1298.41 408.413 1305.17 408.413 1313.52C408.413 1321.85 415.173 1328.63 423.52 1328.63H555.653C564 1328.63 570.76 1321.85 570.76 1313.52C570.76 1305.17 564 1298.41 555.653 1298.41Z" fill="black" fill-opacity="0.1"/>
|
|
96
|
-
<path d="M975.133 528.947C975.133 820.667 756.973 1255.43 487.853 1255.43C218.733 1255.43 0.559814 820.667 0.559814 528.947C0.559814 237.227 218.733 0.733359 487.853 0.733359C756.973 0.733359 975.133 237.227 975.133 528.947Z" fill="currentColor"/>
|
|
97
|
-
<path d="M549.04 1298.41C531.293 1285.91 519.893 1269.95 512.587 1254.2C504.387 1255.01 496.147 1255.43 487.853 1255.43C481.04 1255.43 474.28 1255.15 467.546 1254.6C460.226 1270.21 448.867 1286.01 431.253 1298.41H549.04Z" fill="currentColor"/>
|
|
98
|
-
<path d="M211.413 569.213C193.787 569.213 175.947 564.4 160.92 555.24C128.133 535.293 108.133 498.56 101.147 460.827C97.0133 438.533 96.9468 415.827 99.1068 393.214C120.627 308.28 168.453 234.48 233.467 183.733C246.947 173.213 261.16 163.693 276.027 155.267C280.347 152.813 284.72 150.467 289.147 148.2C291.707 147.373 294.347 146.92 297.12 146.92C301.347 146.92 305.907 147.974 311.067 150.414C332.773 160.64 334.36 192.213 323.693 213.72C313.04 235.226 294.187 251.8 283.413 273.253C262 315.88 276.48 366.707 287.347 413.147C298.213 459.6 302.427 515.373 267.8 548.187C252.707 562.48 232.227 569.213 211.413 569.213" fill="white" fill-opacity="0.2"/>
|
|
99
|
-
<path d="M785.133 110.4C863.72 204.187 911.613 328.747 911.613 465.414C911.613 757.147 693.44 1191.89 424.32 1191.89C350.973 1191.89 281.413 1159.6 219.013 1106.71C296.067 1196.16 388.48 1255.43 487.853 1255.43C756.973 1255.43 975.133 820.667 975.133 528.947C975.133 358.547 900.693 206.987 785.133 110.4Z" fill="black" fill-opacity="0.1"/>
|
|
100
|
-
</svg>`;const o3=["#A45BF1","#25C6F6","#72F753","#F76C88","#F5F770"],s_=[-.6,-.3,0,.3,.6],s3=(e,t,n)=>{t.parentNode===n&&n.removeChild(t)},a3=(e,t,n,r,i,o)=>Array.from({length:t}).map((s,a)=>{const l=document.createElement("span");return l.innerHTML=i3,l.style.width=`${n}px`,l.style.position=i,l.style.color=o[a%o.length],l.style.zIndex=`${r}`,l.addEventListener("click",u=>{s3(u,l,e)},{once:!0}),e.appendChild(l),{element:l,differentiator:tc(0,s_.length)}}),l3=(e,t,n)=>{const{x:r,y:i,tiltAngle:o,angle2D:s,velocity:a,differentiator:l,wobble:u}=e.physics;e.physics.x+=Math.cos(s)*.5*a,e.physics.y+=Math.sin(s)*.5*a,e.physics.wobble+=0,e.physics.velocity*=n,e.physics.tiltAngle+=.1;const c=r+(s_[l]*t*u*u+20*Math.sin(u));e.element.style.transform=`translate3d(${c}px, ${i}px, 0) rotate3d(0, 0, 1, ${l%2?Math.sin(o/4)/3:Math.cos(o/4)/3}rad)`,e.element.style.scale=`${1-.2*t}`,t>.5&&(e.element.style.opacity=`${2-2*t}`)},u3=(e,t,n)=>{const r=n||{},{angle:i=90,decay:o=.999,spread:s=50,startVelocity:a=3,elementCount:l=10,elementSize:u=20,lifetime:c=600,zIndex:d=0,position:f="fixed",colors:h=o3,onAnimationComplete:g}=r,m=a3(e,l,u,d,f,h).map(({element:S,differentiator:p})=>({element:S,physics:Km(i,s,a,p)}));Qm({root:e,particles:m,decay:o,lifetime:c,updateParticle:l3,onFinish:()=>{typeof g=="function"&&g(),t()}})},c3=(e,t,n)=>{const[r,i]=w.useState(!1),o=()=>{i(!1)};return{reward:w.useCallback(()=>{const s=qI(e);if(s)switch(i(!0),t){case"confetti":JI(s,o,n);break;case"emoji":r3(s,o,n);break;case"balloons":u3(s,o,n);break;default:console.error(`${t} is not a valid react-rewards type.`)}},[n,e,t]),isAnimating:r}},d3=$x("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function Zh({className:e,variant:t,...n}){return P.jsx("div",{className:le(d3({variant:t}),e),...n})}function gt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function a_(e,t=[]){let n=[];function r(o,s){const a=w.createContext(s),l=n.length;n=[...n,s];function u(d){const{scope:f,children:h,...g}=d,m=(f==null?void 0:f[e][l])||a,S=w.useMemo(()=>g,Object.values(g));return w.createElement(m.Provider,{value:S},h)}function c(d,f){const h=(f==null?void 0:f[e][l])||a,g=w.useContext(h);if(g)return g;if(s!==void 0)return s;throw new Error(`\`${d}\` must be used within \`${o}\``)}return u.displayName=o+"Provider",[u,c]}const i=()=>{const o=n.map(s=>w.createContext(s));return function(a){const l=(a==null?void 0:a[e])||o;return w.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return i.scopeName=e,[r,f3(i,...t)]}function f3(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const s=r.reduce((a,{useScope:l,scopeName:u})=>{const d=l(o)[`__scope${u}`];return{...a,...d}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}const nc=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},h3=Ub.useId||(()=>{});let p3=0;function Zd(e){const[t,n]=w.useState(h3());return nc(()=>{e||n(r=>r??String(p3++))},[e]),e||(t?`radix-${t}`:"")}function dt(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function m3({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=g3({defaultProp:t,onChange:n}),o=e!==void 0,s=o?e:r,a=dt(n),l=w.useCallback(u=>{if(o){const d=typeof u=="function"?u(e):u;d!==e&&a(d)}else i(u)},[o,e,i,a]);return[s,l]}function g3({defaultProp:e,onChange:t}){const n=w.useState(e),[r]=n,i=w.useRef(r),o=dt(t);return w.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const v3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Vt=v3.reduce((e,t)=>{const n=w.forwardRef((r,i)=>{const{asChild:o,...s}=r,a=o?Dc:t;return w.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),w.createElement(a,ee({},s,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function y3(e,t){e&&Ac.flushSync(()=>e.dispatchEvent(t))}function w3(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r),()=>t.removeEventListener("keydown",r)},[n,t])}const Yh="dismissableLayer.update",S3="dismissableLayer.pointerDownOutside",x3="dismissableLayer.focusOutside";let a0;const C3=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_3=w.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:l,...u}=e,c=w.useContext(C3),[d,f]=w.useState(null),h=(n=d==null?void 0:d.ownerDocument)!==null&&n!==void 0?n:globalThis==null?void 0:globalThis.document,[,g]=w.useState({}),m=tn(t,b=>f(b)),S=Array.from(c.layers),[p]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),v=S.indexOf(p),y=d?S.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,_=y>=v,E=b3(b=>{const T=b.target,k=[...c.branches].some(I=>I.contains(T));!_||k||(o==null||o(b),a==null||a(b),b.defaultPrevented||l==null||l())},h),R=P3(b=>{const T=b.target;[...c.branches].some(I=>I.contains(T))||(s==null||s(b),a==null||a(b),b.defaultPrevented||l==null||l())},h);return w3(b=>{y===c.layers.size-1&&(i==null||i(b),!b.defaultPrevented&&l&&(b.preventDefault(),l()))},h),w.useEffect(()=>{if(d)return r&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(a0=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),l0(),()=>{r&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=a0)}},[d,h,r,c]),w.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),l0())},[d,c]),w.useEffect(()=>{const b=()=>g({});return document.addEventListener(Yh,b),()=>document.removeEventListener(Yh,b)},[]),w.createElement(Vt.div,ee({},u,{ref:m,style:{pointerEvents:x?_?"auto":"none":void 0,...e.style},onFocusCapture:gt(e.onFocusCapture,R.onFocusCapture),onBlurCapture:gt(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:gt(e.onPointerDownCapture,E.onPointerDownCapture)}))});function b3(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const o=a=>{if(a.target&&!r.current){let u=function(){l_(S3,n,l,{discrete:!0})};const l={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function P3(e,t=globalThis==null?void 0:globalThis.document){const n=dt(e),r=w.useRef(!1);return w.useEffect(()=>{const i=o=>{o.target&&!r.current&&l_(x3,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function l0(){const e=new CustomEvent(Yh);document.dispatchEvent(e)}function l_(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?y3(i,o):i.dispatchEvent(o)}const Yd="focusScope.autoFocusOnMount",Xd="focusScope.autoFocusOnUnmount",u0={bubbles:!1,cancelable:!0},E3=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...s}=e,[a,l]=w.useState(null),u=dt(i),c=dt(o),d=w.useRef(null),f=tn(t,m=>l(m)),h=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let m=function(y){if(h.paused||!a)return;const x=y.target;a.contains(x)?d.current=x:ir(d.current,{select:!0})},S=function(y){if(h.paused||!a)return;const x=y.relatedTarget;x!==null&&(a.contains(x)||ir(d.current,{select:!0}))},p=function(y){if(document.activeElement===document.body)for(const _ of y)_.removedNodes.length>0&&ir(a)};document.addEventListener("focusin",m),document.addEventListener("focusout",S);const v=new MutationObserver(p);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",m),document.removeEventListener("focusout",S),v.disconnect()}}},[r,a,h.paused]),w.useEffect(()=>{if(a){d0.add(h);const m=document.activeElement;if(!a.contains(m)){const p=new CustomEvent(Yd,u0);a.addEventListener(Yd,u),a.dispatchEvent(p),p.defaultPrevented||(R3(O3(u_(a)),{select:!0}),document.activeElement===m&&ir(a))}return()=>{a.removeEventListener(Yd,u),setTimeout(()=>{const p=new CustomEvent(Xd,u0);a.addEventListener(Xd,c),a.dispatchEvent(p),p.defaultPrevented||ir(m??document.body,{select:!0}),a.removeEventListener(Xd,c),d0.remove(h)},0)}}},[a,u,c,h]);const g=w.useCallback(m=>{if(!n&&!r||h.paused)return;const S=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,p=document.activeElement;if(S&&p){const v=m.currentTarget,[y,x]=T3(v);y&&x?!m.shiftKey&&p===x?(m.preventDefault(),n&&ir(y,{select:!0})):m.shiftKey&&p===y&&(m.preventDefault(),n&&ir(x,{select:!0})):p===v&&m.preventDefault()}},[n,r,h.paused]);return w.createElement(Vt.div,ee({tabIndex:-1},s,{ref:f,onKeyDown:g}))});function R3(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ir(r,{select:t}),document.activeElement!==n)return}function T3(e){const t=u_(e),n=c0(t,e),r=c0(t.reverse(),e);return[n,r]}function u_(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function c0(e,t){for(const n of e)if(!k3(n,{upTo:t}))return n}function k3(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $3(e){return e instanceof HTMLInputElement&&"select"in e}function ir(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&$3(e)&&t&&e.select()}}const d0=M3();function M3(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=f0(e,t),e.unshift(t)},remove(t){var n;e=f0(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function f0(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function O3(e){return e.filter(t=>t.tagName!=="A")}const A3=w.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?pk.createPortal(w.createElement(Vt.div,ee({},i,{ref:t})),r):null});function I3(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const Yr=e=>{const{present:t,children:n}=e,r=D3(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),o=tn(r.ref,i.ref);return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:o}):null};Yr.displayName="Presence";function D3(e){const[t,n]=w.useState(),r=w.useRef({}),i=w.useRef(e),o=w.useRef("none"),s=e?"mounted":"unmounted",[a,l]=I3(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const u=Il(r.current);o.current=a==="mounted"?u:"none"},[a]),nc(()=>{const u=r.current,c=i.current;if(c!==e){const f=o.current,h=Il(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(c&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),nc(()=>{if(t){const u=d=>{const h=Il(r.current).includes(d.animationName);d.target===t&&h&&Ac.flushSync(()=>l("ANIMATION_END"))},c=d=>{d.target===t&&(o.current=Il(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:w.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Il(e){return(e==null?void 0:e.animationName)||"none"}let Jd=0;function L3(){w.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:h0()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:h0()),Jd++,()=>{Jd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),Jd--}},[])}function h0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var fn=function(){return fn=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},fn.apply(this,arguments)};function c_(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function F3(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var uu="right-scroll-bar-position",cu="width-before-scroll-bar",N3="with-scroll-bars-hidden",j3="--removed-body-scroll-bar-size";function ef(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function V3(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var z3=typeof window<"u"?w.useLayoutEffect:w.useEffect,p0=new WeakMap;function B3(e,t){var n=V3(t||null,function(r){return e.forEach(function(i){return ef(i,r)})});return z3(function(){var r=p0.get(n);if(r){var i=new Set(r),o=new Set(e),s=n.current;i.forEach(function(a){o.has(a)||ef(a,null)}),o.forEach(function(a){i.has(a)||ef(a,s)})}p0.set(n,e)},[e]),n}function U3(e){return e}function H3(e,t){t===void 0&&(t=U3);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var s=t(o,r);return n.push(s),function(){n=n.filter(function(a){return a!==s})}},assignSyncMedium:function(o){for(r=!0;n.length;){var s=n;n=[],s.forEach(o)}n={push:function(a){return o(a)},filter:function(){return n}}},assignMedium:function(o){r=!0;var s=[];if(n.length){var a=n;n=[],a.forEach(o),s=n}var l=function(){var c=s;s=[],c.forEach(o)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(c){s.push(c),u()},filter:function(c){return s=s.filter(c),n}}}};return i}function G3(e){e===void 0&&(e={});var t=H3(null);return t.options=fn({async:!0,ssr:!1},e),t}var d_=function(e){var t=e.sideCar,n=c_(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return w.createElement(r,fn({},n))};d_.isSideCarExport=!0;function W3(e,t){return e.useMedium(t),d_}var f_=G3(),tf=function(){},Bc=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:tf,onWheelCapture:tf,onTouchMoveCapture:tf}),i=r[0],o=r[1],s=e.forwardProps,a=e.children,l=e.className,u=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,h=e.noIsolation,g=e.inert,m=e.allowPinchZoom,S=e.as,p=S===void 0?"div":S,v=c_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=f,x=B3([n,t]),_=fn(fn({},v),i);return w.createElement(w.Fragment,null,c&&w.createElement(y,{sideCar:f_,removeScrollBar:u,shards:d,noIsolation:h,inert:g,setCallbacks:o,allowPinchZoom:!!m,lockRef:n}),s?w.cloneElement(w.Children.only(a),fn(fn({},_),{ref:x})):w.createElement(p,fn({},_,{className:l,ref:x}),a))});Bc.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Bc.classNames={fullWidth:cu,zeroRight:uu};var Q3=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function K3(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Q3();return t&&e.setAttribute("nonce",t),e}function q3(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Z3(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Y3=function(){var e=0,t=null;return{add:function(n){e==0&&(t=K3())&&(q3(t,n),Z3(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},X3=function(){var e=Y3();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},h_=function(){var e=X3(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},J3={left:0,top:0,right:0,gap:0},nf=function(e){return parseInt(e||"",10)||0},eD=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[nf(n),nf(r),nf(i)]},tD=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return J3;var t=eD(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},nD=h_(),yo="data-scroll-locked",rD=function(e,t,n,r){var i=e.left,o=e.top,s=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
101
|
-
.`.concat(N3,` {
|
|
102
|
-
overflow: hidden `).concat(r,`;
|
|
103
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
104
|
-
}
|
|
105
|
-
body[`).concat(yo,`] {
|
|
106
|
-
overflow: hidden `).concat(r,`;
|
|
107
|
-
overscroll-behavior: contain;
|
|
108
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
109
|
-
padding-left: `.concat(i,`px;
|
|
110
|
-
padding-top: `).concat(o,`px;
|
|
111
|
-
padding-right: `).concat(s,`px;
|
|
112
|
-
margin-left:0;
|
|
113
|
-
margin-top:0;
|
|
114
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
115
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.`).concat(uu,` {
|
|
119
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.`).concat(cu,` {
|
|
123
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
.`).concat(uu," .").concat(uu,` {
|
|
127
|
-
right: 0 `).concat(r,`;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.`).concat(cu," .").concat(cu,` {
|
|
131
|
-
margin-right: 0 `).concat(r,`;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
body[`).concat(yo,`] {
|
|
135
|
-
`).concat(j3,": ").concat(a,`px;
|
|
136
|
-
}
|
|
137
|
-
`)},m0=function(){var e=parseInt(document.body.getAttribute(yo)||"0",10);return isFinite(e)?e:0},iD=function(){w.useEffect(function(){return document.body.setAttribute(yo,(m0()+1).toString()),function(){var e=m0()-1;e<=0?document.body.removeAttribute(yo):document.body.setAttribute(yo,e.toString())}},[])},oD=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;iD();var o=w.useMemo(function(){return tD(i)},[i]);return w.createElement(nD,{styles:rD(o,!t,i,n?"":"!important")})},Xh=!1;if(typeof window<"u")try{var Dl=Object.defineProperty({},"passive",{get:function(){return Xh=!0,!0}});window.addEventListener("test",Dl,Dl),window.removeEventListener("test",Dl,Dl)}catch{Xh=!1}var Ui=Xh?{passive:!1}:!1,sD=function(e){return e.tagName==="TEXTAREA"},p_=function(e,t){var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!sD(e)&&n[t]==="visible")},aD=function(e){return p_(e,"overflowY")},lD=function(e){return p_(e,"overflowX")},g0=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=m_(e,n);if(r){var i=g_(e,n),o=i[1],s=i[2];if(o>s)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},uD=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},cD=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},m_=function(e,t){return e==="v"?aD(t):lD(t)},g_=function(e,t){return e==="v"?uD(t):cD(t)},dD=function(e,t){return e==="h"&&t==="rtl"?-1:1},fD=function(e,t,n,r,i){var o=dD(e,window.getComputedStyle(t).direction),s=o*r,a=n.target,l=t.contains(a),u=!1,c=s>0,d=0,f=0;do{var h=g_(e,a),g=h[0],m=h[1],S=h[2],p=m-S-o*g;(g||p)&&m_(e,a)&&(d+=p,f+=g),a=a.parentNode}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(c&&(i&&d===0||!i&&s>d)||!c&&(i&&f===0||!i&&-s>f))&&(u=!0),u},Ll=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},v0=function(e){return[e.deltaX,e.deltaY]},y0=function(e){return e&&"current"in e?e.current:e},hD=function(e,t){return e[0]===t[0]&&e[1]===t[1]},pD=function(e){return`
|
|
138
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
139
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
140
|
-
`)},mD=0,Hi=[];function gD(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(mD++)[0],o=w.useState(function(){return h_()})[0],s=w.useRef(e);w.useEffect(function(){s.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var m=F3([e.lockRef.current],(e.shards||[]).map(y0),!0).filter(Boolean);return m.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),m.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var a=w.useCallback(function(m,S){if("touches"in m&&m.touches.length===2)return!s.current.allowPinchZoom;var p=Ll(m),v=n.current,y="deltaX"in m?m.deltaX:v[0]-p[0],x="deltaY"in m?m.deltaY:v[1]-p[1],_,E=m.target,R=Math.abs(y)>Math.abs(x)?"h":"v";if("touches"in m&&R==="h"&&E.type==="range")return!1;var b=g0(R,E);if(!b)return!0;if(b?_=R:(_=R==="v"?"h":"v",b=g0(R,E)),!b)return!1;if(!r.current&&"changedTouches"in m&&(y||x)&&(r.current=_),!_)return!0;var T=r.current||_;return fD(T,S,m,T==="h"?y:x,!0)},[]),l=w.useCallback(function(m){var S=m;if(!(!Hi.length||Hi[Hi.length-1]!==o)){var p="deltaY"in S?v0(S):Ll(S),v=t.current.filter(function(_){return _.name===S.type&&_.target===S.target&&hD(_.delta,p)})[0];if(v&&v.should){S.cancelable&&S.preventDefault();return}if(!v){var y=(s.current.shards||[]).map(y0).filter(Boolean).filter(function(_){return _.contains(S.target)}),x=y.length>0?a(S,y[0]):!s.current.noIsolation;x&&S.cancelable&&S.preventDefault()}}},[]),u=w.useCallback(function(m,S,p,v){var y={name:m,delta:S,target:p,should:v};t.current.push(y),setTimeout(function(){t.current=t.current.filter(function(x){return x!==y})},1)},[]),c=w.useCallback(function(m){n.current=Ll(m),r.current=void 0},[]),d=w.useCallback(function(m){u(m.type,v0(m),m.target,a(m,e.lockRef.current))},[]),f=w.useCallback(function(m){u(m.type,Ll(m),m.target,a(m,e.lockRef.current))},[]);w.useEffect(function(){return Hi.push(o),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Ui),document.addEventListener("touchmove",l,Ui),document.addEventListener("touchstart",c,Ui),function(){Hi=Hi.filter(function(m){return m!==o}),document.removeEventListener("wheel",l,Ui),document.removeEventListener("touchmove",l,Ui),document.removeEventListener("touchstart",c,Ui)}},[]);var h=e.removeScrollBar,g=e.inert;return w.createElement(w.Fragment,null,g?w.createElement(o,{styles:pD(i)}):null,h?w.createElement(oD,{gapMode:"margin"}):null)}const vD=W3(f_,gD);var v_=w.forwardRef(function(e,t){return w.createElement(Bc,fn({},e,{ref:t,sideCar:vD}))});v_.classNames=Bc.classNames;const yD=v_;var wD=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gi=new WeakMap,Fl=new WeakMap,Nl={},rf=0,y_=function(e){return e&&(e.host||y_(e.parentNode))},SD=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=y_(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},xD=function(e,t,n,r){var i=SD(t,Array.isArray(e)?e:[e]);Nl[n]||(Nl[n]=new WeakMap);var o=Nl[n],s=[],a=new Set,l=new Set(i),u=function(d){!d||a.has(d)||(a.add(d),u(d.parentNode))};i.forEach(u);var c=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(a.has(f))c(f);else try{var h=f.getAttribute(r),g=h!==null&&h!=="false",m=(Gi.get(f)||0)+1,S=(o.get(f)||0)+1;Gi.set(f,m),o.set(f,S),s.push(f),m===1&&g&&Fl.set(f,!0),S===1&&f.setAttribute(n,"true"),g||f.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",f,p)}})};return c(t),a.clear(),rf++,function(){s.forEach(function(d){var f=Gi.get(d)-1,h=o.get(d)-1;Gi.set(d,f),o.set(d,h),f||(Fl.has(d)||d.removeAttribute(r),Fl.delete(d)),h||d.removeAttribute(n)}),rf--,rf||(Gi=new WeakMap,Gi=new WeakMap,Fl=new WeakMap,Nl={})}},CD=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=t||wD(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),xD(r,i,n,"aria-hidden")):function(){return null}};const w_="Dialog",[S_,Ij]=a_(w_),[_D,Sn]=S_(w_),bD=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:s=!0}=e,a=w.useRef(null),l=w.useRef(null),[u=!1,c]=m3({prop:r,defaultProp:i,onChange:o});return w.createElement(_D,{scope:t,triggerRef:a,contentRef:l,contentId:Zd(),titleId:Zd(),descriptionId:Zd(),open:u,onOpenChange:c,onOpenToggle:w.useCallback(()=>c(d=>!d),[c]),modal:s},n)},x_="DialogPortal",[PD,C_]=S_(x_,{forceMount:void 0}),ED=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Sn(x_,t);return w.createElement(PD,{scope:t,forceMount:n},w.Children.map(r,s=>w.createElement(Yr,{present:n||o.open},w.createElement(A3,{asChild:!0,container:i},s))))},Jh="DialogOverlay",RD=w.forwardRef((e,t)=>{const n=C_(Jh,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Sn(Jh,e.__scopeDialog);return o.modal?w.createElement(Yr,{present:r||o.open},w.createElement(TD,ee({},i,{ref:t}))):null}),TD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Sn(Jh,n);return w.createElement(yD,{as:Dc,allowPinchZoom:!0,shards:[i.contentRef]},w.createElement(Vt.div,ee({"data-state":b_(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),$a="DialogContent",kD=w.forwardRef((e,t)=>{const n=C_($a,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Sn($a,e.__scopeDialog);return w.createElement(Yr,{present:r||o.open},o.modal?w.createElement($D,ee({},i,{ref:t})):w.createElement(MD,ee({},i,{ref:t})))}),$D=w.forwardRef((e,t)=>{const n=Sn($a,e.__scopeDialog),r=w.useRef(null),i=tn(t,n.contentRef,r);return w.useEffect(()=>{const o=r.current;if(o)return CD(o)},[]),w.createElement(__,ee({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gt(e.onCloseAutoFocus,o=>{var s;o.preventDefault(),(s=n.triggerRef.current)===null||s===void 0||s.focus()}),onPointerDownOutside:gt(e.onPointerDownOutside,o=>{const s=o.detail.originalEvent,a=s.button===0&&s.ctrlKey===!0;(s.button===2||a)&&o.preventDefault()}),onFocusOutside:gt(e.onFocusOutside,o=>o.preventDefault())}))}),MD=w.forwardRef((e,t)=>{const n=Sn($a,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return w.createElement(__,ee({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var s;if((s=e.onCloseAutoFocus)===null||s===void 0||s.call(e,o),!o.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),o.preventDefault()}r.current=!1,i.current=!1},onInteractOutside:o=>{var s,a;(s=e.onInteractOutside)===null||s===void 0||s.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(l))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}}))}),__=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...s}=e,a=Sn($a,n),l=w.useRef(null),u=tn(t,l);return L3(),w.createElement(w.Fragment,null,w.createElement(E3,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},w.createElement(_3,ee({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":b_(a.open)},s,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)}),OD="DialogTitle",AD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Sn(OD,n);return w.createElement(Vt.h2,ee({id:i.titleId},r,{ref:t}))}),ID="DialogDescription",DD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Sn(ID,n);return w.createElement(Vt.p,ee({id:i.descriptionId},r,{ref:t}))}),LD="DialogClose",FD=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Sn(LD,n);return w.createElement(Vt.button,ee({type:"button"},r,{ref:t,onClick:gt(e.onClick,()=>i.onOpenChange(!1))}))});function b_(e){return e?"open":"closed"}const ND=bD,jD=ED,P_=RD,E_=kD,R_=AD,T_=DD,VD=FD,zD=ND,BD=jD,qm=w.forwardRef(({className:e,...t},n)=>P.jsx(P_,{ref:n,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));qm.displayName=P_.displayName;const k_=w.forwardRef(({className:e,children:t,...n},r)=>P.jsxs(BD,{children:[P.jsx(qm,{}),P.jsxs(E_,{ref:r,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,P.jsxs(VD,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[P.jsx(q2,{className:"size-4"}),P.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));k_.displayName=E_.displayName;const UD=({className:e,...t})=>P.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});UD.displayName="DialogHeader";const $_=({className:e,...t})=>P.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$_.displayName="DialogFooter";const HD=w.forwardRef(({className:e,...t},n)=>P.jsx(R_,{ref:n,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));HD.displayName=R_.displayName;const GD=w.forwardRef(({className:e,...t},n)=>P.jsx(T_,{ref:n,className:le("text-sm text-muted-foreground",e),...t}));GD.displayName=T_.displayName;/**
|
|
141
|
-
* table-core
|
|
142
|
-
*
|
|
143
|
-
* Copyright (c) TanStack
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the MIT license found in the
|
|
146
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
147
|
-
*
|
|
148
|
-
* @license MIT
|
|
149
|
-
*/function WD(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Cr(e,t){return typeof e=="function"?e(t):e}function Pt(e,t){return n=>{t.setState(r=>({...r,[e]:Cr(n,r[e])}))}}function Uc(e){return e instanceof Function}function QD(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function M_(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const s=t(o);s!=null&&s.length&&r(s)})};return r(e),n}function H(e,t,n){let r=[],i;return o=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(o);if(!(a.length!==r.length||a.some((c,d)=>r[d]!==c)))return i;r=a;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...a),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-u)*100)/100,f=d/16,h=(g,m)=>{for(g=String(g);g.length<m;)g=" "+g;return g};console.info(`%c⏱ ${h(d,5)} /${h(c,5)} ms`,`
|
|
150
|
-
font-size: .6rem;
|
|
151
|
-
font-weight: bold;
|
|
152
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function G(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function KD(e,t,n,r){const i=()=>{var s;return(s=o.getValue())!=null?s:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:H(()=>[e,n,t,o],(s,a,l,u)=>({table:s,column:a,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),G(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(o,n,t,e)},{}),o}function qD(e,t,n,r){var i,o;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let u=(i=(o=a.id)!=null?o:l?l.replace(".","_"):void 0)!=null?i:typeof a.header=="string"?a.header:void 0,c;if(a.accessorFn?c=a.accessorFn:l&&(l.includes(".")?c=f=>{let h=f;for(const m of l.split(".")){var g;h=(g=h)==null?void 0:g[m]}return h}:c=f=>f[a.accessorKey]),!u)throw new Error;let d={id:`${String(u)}`,accessorFn:c,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:H(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},G(e.options,"debugColumns")),getLeafColumns:H(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let g=d.columns.flatMap(m=>m.getLeafColumns());return f(g)}return[d]},G(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const Qe="debugHeaders";function w0(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(o),s},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(o,e)}),o}const ZD={createTable:e=>{e.getHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,s;const a=(o=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?o:[],l=(s=i==null?void 0:i.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],u=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(i!=null&&i.includes(d.id)));return jl(t,[...a,...u,...l],e)},G(e.options,Qe)),e.getCenterHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),jl(t,n,e,"center")),G(e.options,Qe)),e.getLeftHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return jl(t,o,e,"left")},G(e.options,Qe)),e.getRightHeaderGroups=H(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?i:[];return jl(t,o,e,"right")},G(e.options,Qe)),e.getFooterGroups=H(()=>[e.getHeaderGroups()],t=>[...t].reverse(),G(e.options,Qe)),e.getLeftFooterGroups=H(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),G(e.options,Qe)),e.getCenterFooterGroups=H(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),G(e.options,Qe)),e.getRightFooterGroups=H(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),G(e.options,Qe)),e.getFlatHeaders=H(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),G(e.options,Qe)),e.getLeftFlatHeaders=H(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),G(e.options,Qe)),e.getCenterFlatHeaders=H(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),G(e.options,Qe)),e.getRightFlatHeaders=H(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),G(e.options,Qe)),e.getCenterLeafHeaders=H(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),G(e.options,Qe)),e.getLeftLeafHeaders=H(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),G(e.options,Qe)),e.getRightLeafHeaders=H(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),G(e.options,Qe)),e.getLeafHeaders=H(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,s,a,l,u;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(c=>c.getLeafHeaders()).flat()},G(e.options,Qe))}};function jl(e,t,n,r){var i,o;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,h),f.filter(g=>g.getIsVisible()).forEach(g=>{var m;(m=g.columns)!=null&&m.length&&a(g.columns,h+1)},0)};a(e);let l=[];const u=(f,h)=>{const g={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},m=[];f.forEach(S=>{const p=[...m].reverse()[0],v=S.column.depth===g.depth;let y,x=!1;if(v&&S.column.parent?y=S.column.parent:(y=S.column,x=!0),p&&(p==null?void 0:p.column)===y)p.subHeaders.push(S);else{const _=w0(n,y,{id:[r,h,y.id,S==null?void 0:S.id].filter(Boolean).join("_"),isPlaceholder:x,placeholderId:x?`${m.filter(E=>E.column===y).length}`:void 0,depth:h,index:m.length});_.subHeaders.push(S),m.push(_)}g.headers.push(S),S.headerGroup=g}),l.push(g),h>0&&u(m,h-1)},c=t.map((f,h)=>w0(n,f,{depth:s,index:h}));u(c,s-1),l.reverse();const d=f=>f.filter(g=>g.column.getIsVisible()).map(g=>{let m=0,S=0,p=[0];g.subHeaders&&g.subHeaders.length?(p=[],d(g.subHeaders).forEach(y=>{let{colSpan:x,rowSpan:_}=y;m+=x,p.push(_)})):m=1;const v=Math.min(...p);return S=S+v,g.colSpan=m,g.rowSpan=S,{colSpan:m,rowSpan:S}});return d((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const O_=(e,t,n,r,i,o,s)=>{let a={id:t,index:r,original:n,depth:i,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return a._valuesCache[l]=u.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=u.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=a.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:o??[],getLeafRows:()=>M_(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],u=a;for(;;){const c=u.getParentRow();if(!c)break;l.push(c),u=c}return l.reverse()},getAllCells:H(()=>[e.getAllLeafColumns()],l=>l.map(u=>KD(e,a,u,u.id)),G(e.options,"debugRows")),_getAllCellsByColumnId:H(()=>[a.getAllCells()],l=>l.reduce((u,c)=>(u[c.column.id]=c,u),{}),G(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(a,e)}return a},YD={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},A_=(e,t,n)=>{var r;const i=n.toLowerCase();return!!(!((r=e.getValue(t))==null||(r=r.toString())==null||(r=r.toLowerCase())==null)&&r.includes(i))};A_.autoRemove=e=>Xt(e);const I_=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};I_.autoRemove=e=>Xt(e);const D_=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};D_.autoRemove=e=>Xt(e);const L_=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};L_.autoRemove=e=>Xt(e)||!(e!=null&&e.length);const F_=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});F_.autoRemove=e=>Xt(e)||!(e!=null&&e.length);const N_=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});N_.autoRemove=e=>Xt(e)||!(e!=null&&e.length);const j_=(e,t,n)=>e.getValue(t)===n;j_.autoRemove=e=>Xt(e);const V_=(e,t,n)=>e.getValue(t)==n;V_.autoRemove=e=>Xt(e);const Zm=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};Zm.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(i)?1/0:i;if(o>s){const a=o;o=s,s=a}return[o,s]};Zm.autoRemove=e=>Xt(e)||Xt(e[0])&&Xt(e[1]);const En={includesString:A_,includesStringSensitive:I_,equalsString:D_,arrIncludes:L_,arrIncludesAll:F_,arrIncludesSome:N_,equals:j_,weakEquals:V_,inNumberRange:Zm};function Xt(e){return e==null||e===""}const XD={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Pt("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?En.includesString:typeof r=="number"?En.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?En.equals:Array.isArray(r)?En.arrIncludes:En.weakEquals},e.getFilterFn=()=>{var n,r;return Uc(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:En[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r==null?void 0:r.find(c=>c.id===e.id),s=Cr(n,o?o.value:void 0);if(S0(i,s,e)){var a;return(a=r==null?void 0:r.filter(c=>c.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(o){var u;return(u=r==null?void 0:r.map(c=>c.id===e.id?l:c))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=Cr(t,i))==null?void 0:o.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(S0(l,s.value,a))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function S0(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const JD=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),eL=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},tL=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},nL=(e,t,n)=>{let r,i;return n.forEach(o=>{const s=o.getValue(e);s!=null&&(r===void 0?s>=s&&(r=i=s):(r>s&&(r=s),i<s&&(i=s)))}),[r,i]},rL=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},iL=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!QD(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,s)=>o-s);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},oL=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),sL=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,aL=(e,t)=>t.length,of={sum:JD,min:eL,max:tL,extent:nL,mean:rL,median:iL,unique:oL,uniqueCount:sL,count:aL},lL={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Pt("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return of.sum;if(Object.prototype.toString.call(r)==="[object Date]")return of.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Uc(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:of[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function uL(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(s=>s.id===o)).filter(Boolean),...r]}const cL={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Pt("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=H(n=>[Ws(t,n)],n=>n.findIndex(r=>r.id===e.id),G(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Ws(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Ws(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=H(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const s=[...t],a=[...i];for(;a.length&&s.length;){const l=s.shift(),u=a.findIndex(c=>c.id===l);u>-1&&o.push(a.splice(u,1)[0])}o=[...o,...a]}return uL(o,n,r)},G(e.options,"debugTable"))}},sf=()=>({left:[],right:[]}),dL={getInitialState:e=>({columnPinning:sf(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Pt("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,s;if(n==="right"){var a,l;return{left:((a=i==null?void 0:i.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var u,c;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((c=i==null?void 0:i.right)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((o=i==null?void 0:i.left)!=null?o:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=i==null?void 0:i.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,s;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>i==null?void 0:i.includes(a));return o?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(s=>!o.includes(s.column.id))},G(t.options,"debugRows")),e.getLeftVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),G(t.options,"debugRows")),e.getRightVisibleCells=H(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(s=>s.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),G(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?sf():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:sf())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),G(e.options,"debugColumns")),e.getRightLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),G(e.options,"debugColumns")),e.getCenterLeafColumns=H(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},G(e.options,"debugColumns"))}},Vl={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},af=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),fL={getDefaultColumnDef:()=>Vl,getInitialState:e=>({columnSizing:{},columnSizingInfo:af(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Pt("columnSizing",e),onColumnSizingInfoChange:Pt("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Vl.minSize,(r=o??e.columnDef.size)!=null?r:Vl.size),(i=e.columnDef.maxSize)!=null?i:Vl.maxSize)},e.getStart=H(n=>[n,Ws(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),G(t.options,"debugColumns")),e.getAfter=H(n=>[n,Ws(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),G(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),lf(o)&&o.touches&&o.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(p=>[p.column.id,p.column.getSize()]):[[r.id,r.getSize()]],l=lf(o)?Math.round(o.touches[0].clientX):o.clientX,u={},c=(p,v)=>{typeof v=="number"&&(t.setColumnSizingInfo(y=>{var x,_;const E=t.options.columnResizeDirection==="rtl"?-1:1,R=(v-((x=y==null?void 0:y.startOffset)!=null?x:0))*E,b=Math.max(R/((_=y==null?void 0:y.startSize)!=null?_:0),-.999999);return y.columnSizingStart.forEach(T=>{let[k,I]=T;u[k]=Math.round(Math.max(I+I*b,0)*100)/100}),{...y,deltaOffset:R,deltaPercentage:b}}),(t.options.columnResizeMode==="onChange"||p==="end")&&t.setColumnSizing(y=>({...y,...u})))},d=p=>c("move",p),f=p=>{c("end",p),t.setColumnSizingInfo(v=>({...v,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||typeof document<"u"?document:null,g={moveHandler:p=>d(p.clientX),upHandler:p=>{h==null||h.removeEventListener("mousemove",g.moveHandler),h==null||h.removeEventListener("mouseup",g.upHandler),f(p.clientX)}},m={moveHandler:p=>(p.cancelable&&(p.preventDefault(),p.stopPropagation()),d(p.touches[0].clientX),!1),upHandler:p=>{var v;h==null||h.removeEventListener("touchmove",m.moveHandler),h==null||h.removeEventListener("touchend",m.upHandler),p.cancelable&&(p.preventDefault(),p.stopPropagation()),f((v=p.touches[0])==null?void 0:v.clientX)}},S=hL()?{passive:!1}:!1;lf(o)?(h==null||h.addEventListener("touchmove",m.moveHandler,S),h==null||h.addEventListener("touchend",m.upHandler,S)):(h==null||h.addEventListener("mousemove",g.moveHandler,S),h==null||h.addEventListener("mouseup",g.upHandler,S)),t.setColumnSizingInfo(p=>({...p,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?af():(n=e.initialState.columnSizingInfo)!=null?n:af())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let zl=null;function hL(){if(typeof zl=="boolean")return zl;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return zl=e,zl}function lf(e){return e.type==="touchstart"}const pL={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Pt("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=H(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),G(t.options,"debugRows")),e.getVisibleCells=H(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],G(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>H(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),G(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Ws(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const mL={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},gL={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Pt("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>En.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Uc(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:En[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},vL={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Pt("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const s=o.split(".");r=Math.max(r,s.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(i=n)!=null?i:!o,!o&&n)return{...s,[e.id]:!0};if(o&&!n){const{[e.id]:a,...l}=s;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},ep=0,tp=10,uf=()=>({pageIndex:ep,pageSize:tp}),yL={getInitialState:e=>({...e,pagination:{...uf(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Pt("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>Cr(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?uf():(i=e.initialState.pagination)!=null?i:uf())},e.setPageIndex=r=>{e.setPagination(i=>{let o=Cr(r,i.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,s)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?ep:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:ep)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?tp:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:tp)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,Cr(r,i.pageSize)),s=i.pageSize*i.pageIndex,a=Math.floor(s/o);return{...i,pageIndex:a,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let s=Cr(r,(o=e.options.pageCount)!=null?o:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...i,pageCount:s}}),e.getPageOptions=H(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,s)=>s)),i},G(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},cf=()=>({top:[],bottom:[]}),wL={getInitialState:e=>({rowPinning:cf(),...e}),getDefaultOptions:e=>({onRowPinningChange:Pt("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],s=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],a=new Set([...s,e.id,...o]);t.setRowPinning(l=>{var u,c;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(m=>!(a!=null&&a.has(m))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)]}}if(n==="top"){var h,g;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(m=>!(a!=null&&a.has(m))),...Array.from(a)],bottom:((g=l==null?void 0:l.bottom)!=null?g:[]).filter(m=>!(a!=null&&a.has(m)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(m=>!(a!=null&&a.has(m))),bottom:((c=l==null?void 0:l.bottom)!=null?c:[]).filter(m=>!(a!=null&&a.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>i==null?void 0:i.includes(a));return o?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=t._getPinnedRows(i))==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?cf():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:cf())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=H(t=>[e.getRowModel().rows,e.getState().rowPinning[t],t],(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},G(e.options,"debugRows")),e.getTopRows=()=>e._getPinnedRows("top"),e.getBottomRows=()=>e._getPinnedRows("bottom"),e.getCenterRows=H(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},G(e.options,"debugRows"))}},SL={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Pt("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{np(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=H(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?df(e,n):{rows:[],flatRows:[],rowsById:{}},G(e.options,"debugTable")),e.getFilteredSelectedRowModel=H(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?df(e,n):{rows:[],flatRows:[],rowsById:{}},G(e.options,"debugTable")),e.getGroupedSelectedRowModel=H(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?df(e,n):{rows:[],flatRows:[],rowsById:{}},G(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var s;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const a={...o};return np(a,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ym(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return rp(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return rp(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},np=(e,t,n,r,i)=>{var o;const s=i.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=s.subRows)!=null&&o.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>np(e,a.id,n,r,i))};function df(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(s,a){return s.map(l=>{var u;const c=Ym(l,n);if(c&&(r.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:o(l.subRows)}),c)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function Ym(e,t){var n;return(n=t[e.id])!=null?n:!1}function rp(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(s=>{if(!(o&&!i)&&(s.getCanSelect()&&(Ym(s,t)?o=!0:i=!1),s.subRows&&s.subRows.length)){const a=rp(s,t);a==="all"?o=!0:(a==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const ip=/([0-9]+)/gm,xL=(e,t,n)=>z_(Hr(e.getValue(n)).toLowerCase(),Hr(t.getValue(n)).toLowerCase()),CL=(e,t,n)=>z_(Hr(e.getValue(n)),Hr(t.getValue(n))),_L=(e,t,n)=>Xm(Hr(e.getValue(n)).toLowerCase(),Hr(t.getValue(n)).toLowerCase()),bL=(e,t,n)=>Xm(Hr(e.getValue(n)),Hr(t.getValue(n))),PL=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},EL=(e,t,n)=>Xm(e.getValue(n),t.getValue(n));function Xm(e,t){return e===t?0:e>t?1:-1}function Hr(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function z_(e,t){const n=e.split(ip).filter(Boolean),r=t.split(ip).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),s=parseInt(i,10),a=parseInt(o,10),l=[s,a].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const Cs={alphanumeric:xL,alphanumericCaseSensitive:CL,text:_L,textCaseSensitive:bL,datetime:PL,basic:EL},RL={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Pt("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Cs.datetime;if(typeof o=="string"&&(r=!0,o.split(ip).length>1))return Cs.alphanumeric}return r?Cs.text:Cs.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Uc(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Cs[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(h=>h.id===e.id),l=s==null?void 0:s.findIndex(h=>h.id===e.id);let u=[],c,d=o?n:i==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?c="toggle":c="add":s!=null&&s.length&&l!==s.length-1?c="replace":a?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var f;u=[...s,{id:e.id,desc:d}],u.splice(0,u.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else c==="toggle"?u=s.map(h=>h.id===e.id?{...h,desc:d}:h):c==="remove"?u=s.filter(h=>h.id!==e.id):u=[{id:e.id,desc:d}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:s==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},TL=[ZD,pL,cL,dL,YD,XD,mL,gL,RL,lL,vL,yL,wL,SL,fL];function kL(e){var t,n;const r=[...TL,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(i)),{}),s=f=>i.options.mergeOptions?i.options.mergeOptions(o,f):{...o,...f};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const u=[];let c=!1;const d={_features:r,options:{...o,...e},initialState:l,_queue:f=>{u.push(f),c||(c=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();c=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{i.setState(i.initialState)},setOptions:f=>{const h=Cr(f,i.options);i.options=s(h)},getState:()=>i.options.state,setState:f=>{i.options.onStateChange==null||i.options.onStateChange(f)},_getRowId:(f,h,g)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(f,h,g))!=null?m:`${g?[g.id,h].join("."):h}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(f,h)=>{let g=(h?i.getPrePaginationRowModel():i.getRowModel()).rowsById[f];if(!g&&(g=i.getCoreRowModel().rowsById[f],!g))throw new Error;return g},_getDefaultColumnDef:H(()=>[i.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:g=>{const m=g.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:g=>{var m,S;return(m=(S=g.renderValue())==null||S.toString==null?void 0:S.toString())!=null?m:null},...i._features.reduce((g,m)=>Object.assign(g,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...f}},G(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:H(()=>[i._getColumnDefs()],f=>{const h=function(g,m,S){return S===void 0&&(S=0),g.map(p=>{const v=qD(i,p,S,m),y=p;return v.columns=y.columns?h(y.columns,v,S+1):[],v})};return h(f)},G(e,"debugColumns")),getAllFlatColumns:H(()=>[i.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),G(e,"debugColumns")),_getAllFlatColumnsById:H(()=>[i.getAllFlatColumns()],f=>f.reduce((h,g)=>(h[g.id]=g,h),{}),G(e,"debugColumns")),getAllLeafColumns:H(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(f,h)=>{let g=f.flatMap(m=>m.getLeafColumns());return h(g)},G(e,"debugColumns")),getColumn:f=>i._getAllFlatColumnsById()[f]};Object.assign(i,d);for(let f=0;f<i._features.length;f++){const h=i._features[f];h==null||h.createTable==null||h.createTable(i)}return i}function $L(){return e=>H(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,s){o===void 0&&(o=0);const a=[];for(let u=0;u<i.length;u++){const c=O_(e,e._getRowId(i[u],u,s),i[u],u,o,void 0,s==null?void 0:s.id);if(n.flatRows.push(c),n.rowsById[c.id]=c,a.push(c),e.options.getSubRows){var l;c.originalSubRows=e.options.getSubRows(i[u],u),(l=c.originalSubRows)!=null&&l.length&&(c.subRows=r(c.originalSubRows,o+1,c))}}return a};return n.rows=r(t),n},G(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function ML(){return e=>H(()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows],(t,n,r)=>!n.rows.length||t!==!0&&!Object.keys(t??{}).length||!r?n:OL(n),G(e.options,"debugTable"))}function OL(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function AL(){return e=>H(()=>[e.getState().grouping,e.getPreGroupedRowModel()],(t,n)=>{if(!n.rows.length||!t.length)return n;const r=t.filter(l=>e.getColumn(l)),i=[],o={},s=function(l,u,c){if(u===void 0&&(u=0),u>=r.length)return l.map(g=>(g.depth=u,i.push(g),o[g.id]=g,g.subRows&&(g.subRows=s(g.subRows,u+1,g.id)),g));const d=r[u],f=IL(l,d);return Array.from(f.entries()).map((g,m)=>{let[S,p]=g,v=`${d}:${S}`;v=c?`${c}>${v}`:v;const y=s(p,u+1,v),x=u?M_(p,E=>E.subRows):p,_=O_(e,v,x[0].original,m,u,void 0,c);return Object.assign(_,{groupingColumnId:d,groupingValue:S,subRows:y,leafRows:x,getValue:E=>{if(r.includes(E)){if(_._valuesCache.hasOwnProperty(E))return _._valuesCache[E];if(p[0]){var R;_._valuesCache[E]=(R=p[0].getValue(E))!=null?R:void 0}return _._valuesCache[E]}if(_._groupingValuesCache.hasOwnProperty(E))return _._groupingValuesCache[E];const b=e.getColumn(E),T=b==null?void 0:b.getAggregationFn();if(T)return _._groupingValuesCache[E]=T(E,x,p),_._groupingValuesCache[E]}}),y.forEach(E=>{i.push(E),o[E.id]=E}),_})},a=s(n.rows,0);return a.forEach(l=>{i.push(l),o[l.id]=l}),{rows:a,flatRows:i,rowsById:o}},G(e.options,"debugTable","getGroupedRowModel",()=>{e._queue(()=>{e._autoResetExpanded(),e._autoResetPageIndex()})}))}function IL(e,t){const n=new Map;return e.reduce((r,i)=>{const o=`${i.getGroupingValue(t)}`,s=r.get(o);return s?s.push(i):r.set(o,[i]),r},n)}/**
|
|
153
|
-
* react-table
|
|
154
|
-
*
|
|
155
|
-
* Copyright (c) TanStack
|
|
156
|
-
*
|
|
157
|
-
* This source code is licensed under the MIT license found in the
|
|
158
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
159
|
-
*
|
|
160
|
-
* @license MIT
|
|
161
|
-
*/function x0(e,t){return e?DL(e)?w.createElement(e,t):e:null}function DL(e){return LL(e)||typeof e=="function"||FL(e)}function LL(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function FL(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function NL(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=w.useState(()=>({current:kL(t)})),[r,i]=w.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:s=>{i(s),e.onStateChange==null||e.onStateChange(s)}})),n.current}var B_=typeof global=="object"&&global&&global.Object===Object&&global,jL=typeof self=="object"&&self&&self.Object===Object&&self,Kn=B_||jL||Function("return this")(),Gr=Kn.Symbol,U_=Object.prototype,VL=U_.hasOwnProperty,zL=U_.toString,_s=Gr?Gr.toStringTag:void 0;function BL(e){var t=VL.call(e,_s),n=e[_s];try{e[_s]=void 0;var r=!0}catch{}var i=zL.call(e);return r&&(t?e[_s]=n:delete e[_s]),i}var UL=Object.prototype,HL=UL.toString;function GL(e){return HL.call(e)}var WL="[object Null]",QL="[object Undefined]",C0=Gr?Gr.toStringTag:void 0;function ls(e){return e==null?e===void 0?QL:WL:C0&&C0 in Object(e)?BL(e):GL(e)}function es(e){return e!=null&&typeof e=="object"}var KL="[object Symbol]";function Jm(e){return typeof e=="symbol"||es(e)&&ls(e)==KL}function qL(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var wn=Array.isArray,ZL=1/0,_0=Gr?Gr.prototype:void 0,b0=_0?_0.toString:void 0;function H_(e){if(typeof e=="string")return e;if(wn(e))return qL(e,H_)+"";if(Jm(e))return b0?b0.call(e):"";var t=e+"";return t=="0"&&1/e==-ZL?"-0":t}function eg(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function YL(e){return e}var XL="[object AsyncFunction]",JL="[object Function]",e4="[object GeneratorFunction]",t4="[object Proxy]";function G_(e){if(!eg(e))return!1;var t=ls(e);return t==JL||t==e4||t==XL||t==t4}var ff=Kn["__core-js_shared__"],P0=function(){var e=/[^.]+$/.exec(ff&&ff.keys&&ff.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function n4(e){return!!P0&&P0 in e}var r4=Function.prototype,i4=r4.toString;function Vi(e){if(e!=null){try{return i4.call(e)}catch{}try{return e+""}catch{}}return""}var o4=/[\\^$.*+?()[\]{}|]/g,s4=/^\[object .+?Constructor\]$/,a4=Function.prototype,l4=Object.prototype,u4=a4.toString,c4=l4.hasOwnProperty,d4=RegExp("^"+u4.call(c4).replace(o4,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f4(e){if(!eg(e)||n4(e))return!1;var t=G_(e)?d4:s4;return t.test(Vi(e))}function h4(e,t){return e==null?void 0:e[t]}function zi(e,t){var n=h4(e,t);return f4(n)?n:void 0}var p4=zi(Kn,"WeakMap");const op=p4;function m4(){}var E0=function(){try{var e=zi(Object,"defineProperty");return e({},"",{}),e}catch{}}();function g4(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function v4(e){return e!==e}function y4(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function w4(e,t,n){return t===t?y4(e,t,n):g4(e,v4,n)}function S4(e,t){var n=e==null?0:e.length;return!!n&&w4(e,t,0)>-1}var x4=9007199254740991,C4=/^(?:0|[1-9]\d*)$/;function W_(e,t){var n=typeof e;return t=t??x4,!!t&&(n=="number"||n!="symbol"&&C4.test(e))&&e>-1&&e%1==0&&e<t}function _4(e,t,n){t=="__proto__"&&E0?E0(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Q_(e,t){return e===t||e!==e&&t!==t}var b4=9007199254740991;function tg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=b4}function K_(e){return e!=null&&tg(e.length)&&!G_(e)}var P4=Object.prototype;function E4(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||P4;return e===n}function R4(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var T4="[object Arguments]";function R0(e){return es(e)&&ls(e)==T4}var q_=Object.prototype,k4=q_.hasOwnProperty,$4=q_.propertyIsEnumerable,Z_=R0(function(){return arguments}())?R0:function(e){return es(e)&&k4.call(e,"callee")&&!$4.call(e,"callee")};function M4(){return!1}var Y_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,T0=Y_&&typeof module=="object"&&module&&!module.nodeType&&module,O4=T0&&T0.exports===Y_,k0=O4?Kn.Buffer:void 0,A4=k0?k0.isBuffer:void 0,sp=A4||M4,I4="[object Arguments]",D4="[object Array]",L4="[object Boolean]",F4="[object Date]",N4="[object Error]",j4="[object Function]",V4="[object Map]",z4="[object Number]",B4="[object Object]",U4="[object RegExp]",H4="[object Set]",G4="[object String]",W4="[object WeakMap]",Q4="[object ArrayBuffer]",K4="[object DataView]",q4="[object Float32Array]",Z4="[object Float64Array]",Y4="[object Int8Array]",X4="[object Int16Array]",J4="[object Int32Array]",eF="[object Uint8Array]",tF="[object Uint8ClampedArray]",nF="[object Uint16Array]",rF="[object Uint32Array]",ge={};ge[q4]=ge[Z4]=ge[Y4]=ge[X4]=ge[J4]=ge[eF]=ge[tF]=ge[nF]=ge[rF]=!0;ge[I4]=ge[D4]=ge[Q4]=ge[L4]=ge[K4]=ge[F4]=ge[N4]=ge[j4]=ge[V4]=ge[z4]=ge[B4]=ge[U4]=ge[H4]=ge[G4]=ge[W4]=!1;function iF(e){return es(e)&&tg(e.length)&&!!ge[ls(e)]}function oF(e){return function(t){return e(t)}}var X_=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Qs=X_&&typeof module=="object"&&module&&!module.nodeType&&module,sF=Qs&&Qs.exports===X_,hf=sF&&B_.process,$0=function(){try{var e=Qs&&Qs.require&&Qs.require("util").types;return e||hf&&hf.binding&&hf.binding("util")}catch{}}(),M0=$0&&$0.isTypedArray,J_=M0?oF(M0):iF,aF=Object.prototype,lF=aF.hasOwnProperty;function uF(e,t){var n=wn(e),r=!n&&Z_(e),i=!n&&!r&&sp(e),o=!n&&!r&&!i&&J_(e),s=n||r||i||o,a=s?R4(e.length,String):[],l=a.length;for(var u in e)(t||lF.call(e,u))&&!(s&&(u=="length"||i&&(u=="offset"||u=="parent")||o&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||W_(u,l)))&&a.push(u);return a}function cF(e,t){return function(n){return e(t(n))}}var dF=cF(Object.keys,Object),fF=Object.prototype,hF=fF.hasOwnProperty;function pF(e){if(!E4(e))return dF(e);var t=[];for(var n in Object(e))hF.call(e,n)&&n!="constructor"&&t.push(n);return t}function ng(e){return K_(e)?uF(e):pF(e)}var mF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,gF=/^\w*$/;function rg(e,t){if(wn(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Jm(e)?!0:gF.test(e)||!mF.test(e)||t!=null&&e in Object(t)}var Ma=zi(Object,"create");function vF(){this.__data__=Ma?Ma(null):{},this.size=0}function yF(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wF="__lodash_hash_undefined__",SF=Object.prototype,xF=SF.hasOwnProperty;function CF(e){var t=this.__data__;if(Ma){var n=t[e];return n===wF?void 0:n}return xF.call(t,e)?t[e]:void 0}var _F=Object.prototype,bF=_F.hasOwnProperty;function PF(e){var t=this.__data__;return Ma?t[e]!==void 0:bF.call(t,e)}var EF="__lodash_hash_undefined__";function RF(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ma&&t===void 0?EF:t,this}function Di(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Di.prototype.clear=vF;Di.prototype.delete=yF;Di.prototype.get=CF;Di.prototype.has=PF;Di.prototype.set=RF;function TF(){this.__data__=[],this.size=0}function Hc(e,t){for(var n=e.length;n--;)if(Q_(e[n][0],t))return n;return-1}var kF=Array.prototype,$F=kF.splice;function MF(e){var t=this.__data__,n=Hc(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():$F.call(t,n,1),--this.size,!0}function OF(e){var t=this.__data__,n=Hc(t,e);return n<0?void 0:t[n][1]}function AF(e){return Hc(this.__data__,e)>-1}function IF(e,t){var n=this.__data__,r=Hc(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function qn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}qn.prototype.clear=TF;qn.prototype.delete=MF;qn.prototype.get=OF;qn.prototype.has=AF;qn.prototype.set=IF;var Oa=zi(Kn,"Map");function DF(){this.size=0,this.__data__={hash:new Di,map:new(Oa||qn),string:new Di}}function LF(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Gc(e,t){var n=e.__data__;return LF(t)?n[typeof t=="string"?"string":"hash"]:n.map}function FF(e){var t=Gc(this,e).delete(e);return this.size-=t?1:0,t}function NF(e){return Gc(this,e).get(e)}function jF(e){return Gc(this,e).has(e)}function VF(e,t){var n=Gc(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zn.prototype.clear=DF;Zn.prototype.delete=FF;Zn.prototype.get=NF;Zn.prototype.has=jF;Zn.prototype.set=VF;var zF="Expected a function";function ig(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(zF);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(ig.Cache||Zn),n}ig.Cache=Zn;var BF=500;function UF(e){var t=ig(e,function(r){return n.size===BF&&n.clear(),r}),n=t.cache;return t}var HF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,GF=/\\(\\)?/g,WF=UF(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(HF,function(n,r,i,o){t.push(i?o.replace(GF,"$1"):r||n)}),t});function QF(e){return e==null?"":H_(e)}function eb(e,t){return wn(e)?e:rg(e,t)?[e]:WF(QF(e))}var KF=1/0;function Wc(e){if(typeof e=="string"||Jm(e))return e;var t=e+"";return t=="0"&&1/e==-KF?"-0":t}function tb(e,t){t=eb(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Wc(t[n++])];return n&&n==r?e:void 0}function qF(e,t,n){var r=e==null?void 0:tb(e,t);return r===void 0?n:r}function ZF(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function YF(){this.__data__=new qn,this.size=0}function XF(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function JF(e){return this.__data__.get(e)}function eN(e){return this.__data__.has(e)}var tN=200;function nN(e,t){var n=this.__data__;if(n instanceof qn){var r=n.__data__;if(!Oa||r.length<tN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Zn(r)}return n.set(e,t),this.size=n.size,this}function Vn(e){var t=this.__data__=new qn(e);this.size=t.size}Vn.prototype.clear=YF;Vn.prototype.delete=XF;Vn.prototype.get=JF;Vn.prototype.has=eN;Vn.prototype.set=nN;function rN(e,t){for(var n=-1,r=e==null?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function iN(){return[]}var oN=Object.prototype,sN=oN.propertyIsEnumerable,O0=Object.getOwnPropertySymbols,aN=O0?function(e){return e==null?[]:(e=Object(e),rN(O0(e),function(t){return sN.call(e,t)}))}:iN;const lN=aN;function uN(e,t,n){var r=t(e);return wn(e)?r:ZF(r,n(e))}function A0(e){return uN(e,ng,lN)}var cN=zi(Kn,"DataView");const ap=cN;var dN=zi(Kn,"Promise");const lp=dN;var wo=zi(Kn,"Set"),I0="[object Map]",fN="[object Object]",D0="[object Promise]",L0="[object Set]",F0="[object WeakMap]",N0="[object DataView]",hN=Vi(ap),pN=Vi(Oa),mN=Vi(lp),gN=Vi(wo),vN=Vi(op),oi=ls;(ap&&oi(new ap(new ArrayBuffer(1)))!=N0||Oa&&oi(new Oa)!=I0||lp&&oi(lp.resolve())!=D0||wo&&oi(new wo)!=L0||op&&oi(new op)!=F0)&&(oi=function(e){var t=ls(e),n=t==fN?e.constructor:void 0,r=n?Vi(n):"";if(r)switch(r){case hN:return N0;case pN:return I0;case mN:return D0;case gN:return L0;case vN:return F0}return t});const j0=oi;var yN=Kn.Uint8Array;const V0=yN;var wN="__lodash_hash_undefined__";function SN(e){return this.__data__.set(e,wN),this}function xN(e){return this.__data__.has(e)}function Aa(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Zn;++t<n;)this.add(e[t])}Aa.prototype.add=Aa.prototype.push=SN;Aa.prototype.has=xN;function CN(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function nb(e,t){return e.has(t)}var _N=1,bN=2;function rb(e,t,n,r,i,o){var s=n&_N,a=e.length,l=t.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var d=-1,f=!0,h=n&bN?new Aa:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var g=e[d],m=t[d];if(r)var S=s?r(m,g,d,t,e,o):r(g,m,d,e,t,o);if(S!==void 0){if(S)continue;f=!1;break}if(h){if(!CN(t,function(p,v){if(!nb(h,v)&&(g===p||i(g,p,n,r,o)))return h.push(v)})){f=!1;break}}else if(!(g===m||i(g,m,n,r,o))){f=!1;break}}return o.delete(e),o.delete(t),f}function PN(e){var t=-1,n=Array(e.size);return e.forEach(function(r,i){n[++t]=[i,r]}),n}function og(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var EN=1,RN=2,TN="[object Boolean]",kN="[object Date]",$N="[object Error]",MN="[object Map]",ON="[object Number]",AN="[object RegExp]",IN="[object Set]",DN="[object String]",LN="[object Symbol]",FN="[object ArrayBuffer]",NN="[object DataView]",z0=Gr?Gr.prototype:void 0,pf=z0?z0.valueOf:void 0;function jN(e,t,n,r,i,o,s){switch(n){case NN:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case FN:return!(e.byteLength!=t.byteLength||!o(new V0(e),new V0(t)));case TN:case kN:case ON:return Q_(+e,+t);case $N:return e.name==t.name&&e.message==t.message;case AN:case DN:return e==t+"";case MN:var a=PN;case IN:var l=r&EN;if(a||(a=og),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=RN,s.set(e,t);var c=rb(a(e),a(t),r,i,o,s);return s.delete(e),c;case LN:if(pf)return pf.call(e)==pf.call(t)}return!1}var VN=1,zN=Object.prototype,BN=zN.hasOwnProperty;function UN(e,t,n,r,i,o){var s=n&VN,a=A0(e),l=a.length,u=A0(t),c=u.length;if(l!=c&&!s)return!1;for(var d=l;d--;){var f=a[d];if(!(s?f in t:BN.call(t,f)))return!1}var h=o.get(e),g=o.get(t);if(h&&g)return h==t&&g==e;var m=!0;o.set(e,t),o.set(t,e);for(var S=s;++d<l;){f=a[d];var p=e[f],v=t[f];if(r)var y=s?r(v,p,f,t,e,o):r(p,v,f,e,t,o);if(!(y===void 0?p===v||i(p,v,n,r,o):y)){m=!1;break}S||(S=f=="constructor")}if(m&&!S){var x=e.constructor,_=t.constructor;x!=_&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof _=="function"&&_ instanceof _)&&(m=!1)}return o.delete(e),o.delete(t),m}var HN=1,B0="[object Arguments]",U0="[object Array]",Bl="[object Object]",GN=Object.prototype,H0=GN.hasOwnProperty;function WN(e,t,n,r,i,o){var s=wn(e),a=wn(t),l=s?U0:j0(e),u=a?U0:j0(t);l=l==B0?Bl:l,u=u==B0?Bl:u;var c=l==Bl,d=u==Bl,f=l==u;if(f&&sp(e)){if(!sp(t))return!1;s=!0,c=!1}if(f&&!c)return o||(o=new Vn),s||J_(e)?rb(e,t,n,r,i,o):jN(e,t,l,n,r,i,o);if(!(n&HN)){var h=c&&H0.call(e,"__wrapped__"),g=d&&H0.call(t,"__wrapped__");if(h||g){var m=h?e.value():e,S=g?t.value():t;return o||(o=new Vn),i(m,S,n,r,o)}}return f?(o||(o=new Vn),UN(e,t,n,r,i,o)):!1}function sg(e,t,n,r,i){return e===t?!0:e==null||t==null||!es(e)&&!es(t)?e!==e&&t!==t:WN(e,t,n,r,sg,i)}var QN=1,KN=2;function qN(e,t,n,r){var i=n.length,o=i,s=!r;if(e==null)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){a=n[i];var l=a[0],u=e[l],c=a[1];if(s&&a[2]){if(u===void 0&&!(l in e))return!1}else{var d=new Vn;if(r)var f=r(u,c,l,e,t,d);if(!(f===void 0?sg(c,u,QN|KN,r,d):f))return!1}}return!0}function ib(e){return e===e&&!eg(e)}function ZN(e){for(var t=ng(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ib(i)]}return t}function ob(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function YN(e){var t=ZN(e);return t.length==1&&t[0][2]?ob(t[0][0],t[0][1]):function(n){return n===e||qN(n,e,t)}}function XN(e,t){return e!=null&&t in Object(e)}function JN(e,t,n){t=eb(t,e);for(var r=-1,i=t.length,o=!1;++r<i;){var s=Wc(t[r]);if(!(o=e!=null&&n(e,s)))break;e=e[s]}return o||++r!=i?o:(i=e==null?0:e.length,!!i&&tg(i)&&W_(s,i)&&(wn(e)||Z_(e)))}function e5(e,t){return e!=null&&JN(e,t,XN)}var t5=1,n5=2;function r5(e,t){return rg(e)&&ib(t)?ob(Wc(e),t):function(n){var r=qF(n,e);return r===void 0&&r===t?e5(n,e):sg(t,r,t5|n5)}}function i5(e){return function(t){return t==null?void 0:t[e]}}function o5(e){return function(t){return tb(t,e)}}function s5(e){return rg(e)?i5(Wc(e)):o5(e)}function a5(e){return typeof e=="function"?e:e==null?YL:typeof e=="object"?wn(e)?r5(e[0],e[1]):YN(e):s5(e)}function l5(e,t,n,r){for(var i=-1,o=e==null?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function u5(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++i];if(n(o[l],l,o)===!1)break}return t}}var c5=u5();const d5=c5;function f5(e,t){return e&&d5(e,t,ng)}function h5(e,t){return function(n,r){if(n==null)return n;if(!K_(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&r(s[o],o,s)!==!1;);return n}}var p5=h5(f5);function m5(e,t,n,r){return p5(e,function(i,o,s){t(r,i,n(i),s)}),r}function g5(e,t){return function(n,r){var i=wn(n)?l5:m5,o=t?t():{};return i(n,e,a5(r),o)}}function v5(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var y5=Object.prototype,w5=y5.hasOwnProperty,S5=g5(function(e,t,n){w5.call(e,n)?e[n].push(t):_4(e,n,[t])});const x5=S5;var C5=1/0,_5=wo&&1/og(new wo([,-0]))[1]==C5?function(e){return new wo(e)}:m4,b5=200;function P5(e,t,n){var r=-1,i=S4,o=e.length,s=!0,a=[],l=a;if(n)s=!1,i=v5;else if(o>=b5){var u=t?null:_5(e);if(u)return og(u);s=!1,i=nb,l=new Aa}else l=t?[]:a;e:for(;++r<o;){var c=e[r],d=t?t(c):c;if(c=n||c!==0?c:0,s&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),a.push(c)}else i(l,d,n)||(l!==a&&l.push(d),a.push(c))}return a}function Ia(e){return e&&e.length?P5(e):[]}const mf=WD(),E5=[mf.accessor("dependencyName",{header:()=>P.jsx("div",{children:"Dependency"}),cell:e=>{const t=e.row.original.isInternalDependency;return P.jsxs("div",{className:"flex items-center gap-1",title:t?"This is a workspace within the monorepo.":void 0,children:[P.jsx(Q2,{size:16,className:le({"opacity-100":e.row.original.isInternalDependency,"pointer-events-none opacity-0":!e.row.original.isInternalDependency})}),P.jsx("span",{children:e.getValue()})]})},aggregationFn:"count"}),mf.accessor("workspaceName",{header:()=>P.jsx("div",{children:"Workspace"}),cell:e=>e.getValue(),aggregationFn:"count"}),mf.accessor("versionRange",{enableGrouping:!1,header:()=>P.jsx("div",{children:"Version"}),cell:e=>P.jsx(Zh,{variant:"outline",children:e.getValue()}),aggregatedCell:({row:e,table:t})=>{var i;const n=Ia(e.subRows.map(o=>o.original.dependencyName)).length===1,r=Ia(e.subRows.map(o=>o.original.versionRange)).length===1;if(!n)return"-";if(n&&!r){const o=(i=t.options.meta)==null?void 0:i.scheduledSyncFixes[e.original.dependencyName];return P.jsxs("div",{className:" flex flex-nowrap items-center gap-2",children:[P.jsx("div",{className:"text-nowrap",children:o?"✅ Marked fix":"⛔️ Mixed"}),P.jsx(Ln,{variant:o?"default":"destructive",className:"h-auto py-1 opacity-0 transition-opacity group-hover:opacity-100",size:"sm",onClick:()=>{var s;return(s=t.options.meta)==null?void 0:s.onSyncFix(e.original.dependencyName)},children:o?"update":"fix"})]})}}})],ag=w.forwardRef(({className:e,...t},n)=>P.jsx("div",{className:"relative w-full overflow-auto",children:P.jsx("table",{ref:n,className:le("w-full caption-bottom text-sm",e),...t})}));ag.displayName="Table";const lg=w.forwardRef(({className:e,...t},n)=>P.jsx("thead",{ref:n,className:le("[&_tr]:border-b",e),...t}));lg.displayName="TableHeader";const ug=w.forwardRef(({className:e,...t},n)=>P.jsx("tbody",{ref:n,className:le("[&_tr:last-child]:border-0",e),...t}));ug.displayName="TableBody";const R5=w.forwardRef(({className:e,...t},n)=>P.jsx("tfoot",{ref:n,className:le("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t}));R5.displayName="TableFooter";const So=w.forwardRef(({className:e,...t},n)=>P.jsx("tr",{ref:n,className:le("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...t}));So.displayName="TableRow";const Da=w.forwardRef(({className:e,...t},n)=>P.jsx("th",{ref:n,className:le("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",e),...t}));Da.displayName="TableHead";const xo=w.forwardRef(({className:e,...t},n)=>P.jsx("td",{ref:n,className:le("p-4 align-middle [&:has([role=checkbox])]:pr-0",e),...t}));xo.displayName="TableCell";const T5=w.forwardRef(({className:e,...t},n)=>P.jsx("caption",{ref:n,className:le("mt-4 text-sm text-muted-foreground",e),...t}));T5.displayName="TableCaption";function k5({columns:e,data:t,onFixSync:n,scheduledSyncFixes:r,grouping:i,setGrouping:o}){var a;const s=NL({data:t,columns:e,state:{grouping:i},columnResizeMode:"onEnd",columnResizeDirection:"ltr",enableColumnResizing:!0,onGroupingChange:o,getCoreRowModel:$L(),getExpandedRowModel:ML(),getGroupedRowModel:AL(),meta:{onSyncFix:n,scheduledSyncFixes:r}});return P.jsx("div",{className:"rounded-md border",children:P.jsxs(ag,{className:"lg:table-fixed",children:[P.jsx(lg,{children:s.getHeaderGroups().map(l=>P.jsx(So,{className:"hover:bg-transparent",children:l.headers.map(u=>{const c=le("min-w-[140px]");return u.isPlaceholder?P.jsx(Da,{className:le("h-auto p-0",c)},u.id):P.jsx(Da,{className:le("h-auto p-0 text-nowrap whitespace-nowrap",c),children:P.jsxs("div",{className:le("flex items-center gap-3 bg-secondary pl-4 text-secondary-foreground"),children:[P.jsx("button",{className:le("py-2",{"font-bold":u.column.getIsGrouped(),"cursor-default":!u.column.getCanGroup()||u.column.getIsGrouped(),"hover:opacity-80":u.column.getCanGroup()&&!u.column.getIsGrouped()}),onClick:()=>{u.column.getCanGroup()&&(s.setGrouping([]),u.column.toggleGrouping())},children:x0(u.column.columnDef.header,u.getContext())}),P.jsx("div",{className:"grow"})]})},u.id)})},l.id))}),P.jsx(ug,{children:(a=s.getRowModel().rows)!=null&&a.length?s.getRowModel().rows.map(l=>P.jsx(So,{className:"group select-none hover:bg-transparent","data-state":l.getIsSelected()&&"selected",children:l.getVisibleCells().map(u=>u.getIsPlaceholder()?P.jsx(xo,{},u.id):P.jsx(xo,{className:le("py-2",{"bg-accent cursor-pointer hover:text-opacity-50 overflow-hidden text-ellipsis":u.getIsGrouped()}),onClick:()=>{u.getIsGrouped()&&l.getToggleExpandedHandler()()},children:x0(u.getIsAggregated()?u.column.columnDef.aggregatedCell??u.column.columnDef.cell:u.column.columnDef.cell,{...u.getContext()})},u.id))},l.id)):P.jsx(So,{children:P.jsx(xo,{colSpan:e.length,className:"h-24 text-center",children:"No results."})})})]})})}const $5=w.createContext(void 0);function M5(e){const t=w.useContext($5);return e||t||"ltr"}function O5(e,[t,n]){return Math.min(n,Math.max(t,e))}function A5(e,t){return w.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const sb="ScrollArea",[ab,Dj]=a_(sb),[I5,zt]=ab(sb),D5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...s}=e,[a,l]=w.useState(null),[u,c]=w.useState(null),[d,f]=w.useState(null),[h,g]=w.useState(null),[m,S]=w.useState(null),[p,v]=w.useState(0),[y,x]=w.useState(0),[_,E]=w.useState(!1),[R,b]=w.useState(!1),T=tn(t,I=>l(I)),k=M5(i);return w.createElement(I5,{scope:n,type:r,dir:k,scrollHideDelay:o,scrollArea:a,viewport:u,onViewportChange:c,content:d,onContentChange:f,scrollbarX:h,onScrollbarXChange:g,scrollbarXEnabled:_,onScrollbarXEnabledChange:E,scrollbarY:m,onScrollbarYChange:S,scrollbarYEnabled:R,onScrollbarYEnabledChange:b,onCornerWidthChange:v,onCornerHeightChange:x},w.createElement(Vt.div,ee({dir:k},s,{ref:T,style:{position:"relative","--radix-scroll-area-corner-width":p+"px","--radix-scroll-area-corner-height":y+"px",...e.style}})))}),L5="ScrollAreaViewport",F5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,...i}=e,o=zt(L5,n),s=w.useRef(null),a=tn(t,s,o.onViewportChange);return w.createElement(w.Fragment,null,w.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),w.createElement(Vt.div,ee({"data-radix-scroll-area-viewport":""},i,{ref:a,style:{overflowX:o.scrollbarXEnabled?"scroll":"hidden",overflowY:o.scrollbarYEnabled?"scroll":"hidden",...e.style}}),w.createElement("div",{ref:o.onContentChange,style:{minWidth:"100%",display:"table"}},r)))}),Yn="ScrollAreaScrollbar",lb=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=zt(Yn,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:s}=i,a=e.orientation==="horizontal";return w.useEffect(()=>(a?o(!0):s(!0),()=>{a?o(!1):s(!1)}),[a,o,s]),i.type==="hover"?w.createElement(N5,ee({},r,{ref:t,forceMount:n})):i.type==="scroll"?w.createElement(j5,ee({},r,{ref:t,forceMount:n})):i.type==="auto"?w.createElement(ub,ee({},r,{ref:t,forceMount:n})):i.type==="always"?w.createElement(cg,ee({},r,{ref:t})):null}),N5=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=zt(Yn,e.__scopeScrollArea),[o,s]=w.useState(!1);return w.useEffect(()=>{const a=i.scrollArea;let l=0;if(a){const u=()=>{window.clearTimeout(l),s(!0)},c=()=>{l=window.setTimeout(()=>s(!1),i.scrollHideDelay)};return a.addEventListener("pointerenter",u),a.addEventListener("pointerleave",c),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",u),a.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),w.createElement(Yr,{present:n||o},w.createElement(ub,ee({"data-state":o?"visible":"hidden"},r,{ref:t})))}),j5=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=zt(Yn,e.__scopeScrollArea),o=e.orientation==="horizontal",s=Kc(()=>l("SCROLL_END"),100),[a,l]=A5("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(a==="idle"){const u=window.setTimeout(()=>l("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(u)}},[a,i.scrollHideDelay,l]),w.useEffect(()=>{const u=i.viewport,c=o?"scrollLeft":"scrollTop";if(u){let d=u[c];const f=()=>{const h=u[c];d!==h&&(l("SCROLL"),s()),d=h};return u.addEventListener("scroll",f),()=>u.removeEventListener("scroll",f)}},[i.viewport,o,l,s]),w.createElement(Yr,{present:n||a!=="hidden"},w.createElement(cg,ee({"data-state":a==="hidden"?"hidden":"visible"},r,{ref:t,onPointerEnter:gt(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:gt(e.onPointerLeave,()=>l("POINTER_LEAVE"))})))}),ub=w.forwardRef((e,t)=>{const n=zt(Yn,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,s]=w.useState(!1),a=e.orientation==="horizontal",l=Kc(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,c=n.viewport.offsetHeight<n.viewport.scrollHeight;s(a?u:c)}},10);return ts(n.viewport,l),ts(n.content,l),w.createElement(Yr,{present:r||o},w.createElement(cg,ee({"data-state":o?"visible":"hidden"},i,{ref:t})))}),cg=w.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,i=zt(Yn,e.__scopeScrollArea),o=w.useRef(null),s=w.useRef(0),[a,l]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=hb(a.viewport,a.content),c={...r,sizes:a,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:f=>o.current=f,onThumbPointerUp:()=>s.current=0,onThumbPointerDown:f=>s.current=f};function d(f,h){return Q5(f,s.current,a,h)}return n==="horizontal"?w.createElement(V5,ee({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollLeft,h=G0(f,a,i.dir);o.current.style.transform=`translate3d(${h}px, 0, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollLeft=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollLeft=d(f,i.dir))}})):n==="vertical"?w.createElement(z5,ee({},c,{ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const f=i.viewport.scrollTop,h=G0(f,a);o.current.style.transform=`translate3d(0, ${h}px, 0)`}},onWheelScroll:f=>{i.viewport&&(i.viewport.scrollTop=f)},onDragScroll:f=>{i.viewport&&(i.viewport.scrollTop=d(f))}})):null}),V5=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=zt(Yn,e.__scopeScrollArea),[s,a]=w.useState(),l=w.useRef(null),u=tn(t,l,o.onScrollbarXChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),w.createElement(db,ee({"data-orientation":"horizontal"},i,{ref:u,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Qc(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(f),mb(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:rc(s.paddingLeft),paddingEnd:rc(s.paddingRight)}})}}))}),z5=w.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=zt(Yn,e.__scopeScrollArea),[s,a]=w.useState(),l=w.useRef(null),u=tn(t,l,o.onScrollbarYChange);return w.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),w.createElement(db,ee({"data-orientation":"vertical"},i,{ref:u,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Qc(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,d)=>{if(o.viewport){const f=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(f),mb(f,d)&&c.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:rc(s.paddingTop),paddingEnd:rc(s.paddingBottom)}})}}))}),[B5,cb]=ab(Yn),db=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:s,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:c,onResize:d,...f}=e,h=zt(Yn,n),[g,m]=w.useState(null),S=tn(t,T=>m(T)),p=w.useRef(null),v=w.useRef(""),y=h.viewport,x=r.content-r.viewport,_=dt(c),E=dt(l),R=Kc(d,10);function b(T){if(p.current){const k=T.clientX-p.current.left,I=T.clientY-p.current.top;u({x:k,y:I})}}return w.useEffect(()=>{const T=k=>{const I=k.target;(g==null?void 0:g.contains(I))&&_(k,x)};return document.addEventListener("wheel",T,{passive:!1}),()=>document.removeEventListener("wheel",T,{passive:!1})},[y,g,x,_]),w.useEffect(E,[r,E]),ts(g,R),ts(h.content,R),w.createElement(B5,{scope:n,scrollbar:g,hasThumb:i,onThumbChange:dt(o),onThumbPointerUp:dt(s),onThumbPositionChange:E,onThumbPointerDown:dt(a)},w.createElement(Vt.div,ee({},f,{ref:S,style:{position:"absolute",...f.style},onPointerDown:gt(e.onPointerDown,T=>{T.button===0&&(T.target.setPointerCapture(T.pointerId),p.current=g.getBoundingClientRect(),v.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",h.viewport&&(h.viewport.style.scrollBehavior="auto"),b(T))}),onPointerMove:gt(e.onPointerMove,b),onPointerUp:gt(e.onPointerUp,T=>{const k=T.target;k.hasPointerCapture(T.pointerId)&&k.releasePointerCapture(T.pointerId),document.body.style.webkitUserSelect=v.current,h.viewport&&(h.viewport.style.scrollBehavior=""),p.current=null})})))}),up="ScrollAreaThumb",U5=w.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=cb(up,e.__scopeScrollArea);return w.createElement(Yr,{present:n||i.hasThumb},w.createElement(H5,ee({ref:t},r)))}),H5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=zt(up,n),s=cb(up,n),{onThumbPositionChange:a}=s,l=tn(t,d=>s.onThumbChange(d)),u=w.useRef(),c=Kc(()=>{u.current&&(u.current(),u.current=void 0)},100);return w.useEffect(()=>{const d=o.viewport;if(d){const f=()=>{if(c(),!u.current){const h=K5(d,a);u.current=h,a()}};return a(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[o.viewport,c,a]),w.createElement(Vt.div,ee({"data-state":s.hasThumb?"visible":"hidden"},i,{ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:gt(e.onPointerDownCapture,d=>{const h=d.target.getBoundingClientRect(),g=d.clientX-h.left,m=d.clientY-h.top;s.onThumbPointerDown({x:g,y:m})}),onPointerUp:gt(e.onPointerUp,s.onThumbPointerUp)}))}),fb="ScrollAreaCorner",G5=w.forwardRef((e,t)=>{const n=zt(fb,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?w.createElement(W5,ee({},e,{ref:t})):null}),W5=w.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=zt(fb,n),[o,s]=w.useState(0),[a,l]=w.useState(0),u=!!(o&&a);return ts(i.scrollbarX,()=>{var c;const d=((c=i.scrollbarX)===null||c===void 0?void 0:c.offsetHeight)||0;i.onCornerHeightChange(d),l(d)}),ts(i.scrollbarY,()=>{var c;const d=((c=i.scrollbarY)===null||c===void 0?void 0:c.offsetWidth)||0;i.onCornerWidthChange(d),s(d)}),u?w.createElement(Vt.div,ee({},r,{ref:t,style:{width:o,height:a,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}})):null});function rc(e){return e?parseInt(e,10):0}function hb(e,t){const n=e/t;return isNaN(n)?0:n}function Qc(e){const t=hb(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Q5(e,t,n,r="ltr"){const i=Qc(n),o=i/2,s=t||o,a=i-s,l=n.scrollbar.paddingStart+s,u=n.scrollbar.size-n.scrollbar.paddingEnd-a,c=n.content-n.viewport,d=r==="ltr"?[0,c]:[c*-1,0];return pb([l,u],d)(e)}function G0(e,t,n="ltr"){const r=Qc(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,s=t.content-t.viewport,a=o-r,l=n==="ltr"?[0,s]:[s*-1,0],u=O5(e,l);return pb([0,s],[0,a])(u)}function pb(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function mb(e,t){return e>0&&e<t}const K5=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},s=n.left!==o.left,a=n.top!==o.top;(s||a)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function Kc(e,t){const n=dt(e),r=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),w.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function ts(e,t){const n=dt(t);nc(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}const gb=D5,q5=F5,Z5=G5,vb=w.forwardRef(({className:e,children:t,...n},r)=>P.jsxs(gb,{ref:r,className:le("relative overflow-hidden",e),...n,children:[P.jsx(q5,{className:"size-full rounded-[inherit]",children:t}),P.jsx(yb,{}),P.jsx(Z5,{})]}));vb.displayName=gb.displayName;const yb=w.forwardRef(({className:e,orientation:t="vertical",...n},r)=>P.jsx(lb,{ref:r,orientation:t,className:le("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...n,children:P.jsx(U5,{className:"relative flex-1 rounded-full bg-border"})}));yb.displayName=lb.displayName;const Y5=({initialFixVersion:e,fixSyncInfo:t,onFix:n})=>{const[r,i]=w.useState(e);return t?P.jsx(P.Fragment,{children:P.jsx(k_,{className:"p-0",children:P.jsxs("div",{className:"p-8",children:[P.jsx("h2",{className:"text-xl font-bold",children:t.dependencyName}),P.jsx(vb,{children:P.jsx("div",{className:"max-h-[calc(320px)]",children:P.jsxs(ag,{className:"relative -mx-4 mt-4",children:[P.jsx(lg,{className:"sticky top-0",children:P.jsxs(So,{children:[P.jsx(Da,{children:"Workspace"}),P.jsx(Da,{children:"Version"})]})}),P.jsx(ug,{children:t.dependencies.map(o=>P.jsxs(So,{children:[P.jsx(xo,{children:o.workspaceName}),P.jsx(xo,{children:r&&r!==o.versionRange?P.jsxs("div",{className:"flex gap-2",children:[P.jsx("span",{className:"line-through opacity-60",children:o.versionRange}),P.jsx("span",{className:"text-primary",children:r})]}):o.versionRange})]},o.workspaceName))})]})})}),P.jsxs("div",{className:"my-6",children:[P.jsx("h2",{className:"text-lg font-bold",children:"Sync with below version"}),P.jsx("div",{className:"mt-4 flex flex-wrap gap-4",children:Ia(t.dependencies.map(o=>o.versionRange)).map(o=>P.jsx(Ln,{variant:"secondary",disabled:r===o,onClick:()=>i(o),children:o},o))})]}),P.jsxs($_,{children:[P.jsx(Ln,{variant:"secondary",disabled:r===void 0,onClick:()=>i(void 0),children:"Reset"}),P.jsx(Ln,{type:"button",disabled:r===e,onClick:()=>{n(r)},children:e?e===r?"No Changes":"Update":"Fix"})]})]})})}):null},X5=e=>Object.entries(x5(e,t=>t.dependencyName)).map(([t,n])=>({dependencyName:t,dependencies:n})),J5=e=>X5(e).filter(({dependencies:t})=>Ia(t.map(n=>n.versionRange)).length>1),ej=Ja("/_layout/_nested/sync/")({component:tj,beforeLoad:()=>{if(!vm.getState().projects.selected)throw Ow({to:"/"})}});function tj(){const e=os(o=>o.projects.selected);je(!!e);const{isLoading:t,error:n,data:r}=Zo.getSyncUpdates.useQuery(e,{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1});if(t)return P.jsx("div",{className:"mt-10",children:P.jsx(Lx,{})});if(n||!r)return P.jsx("div",{children:"Error loading data"});const i=r.result;return i?P.jsx("div",{className:"container grow px-0 py-10",children:P.jsx(nj,{data:i})}):P.jsx("div",{children:"No sync results found."})}const nj=({data:e})=>{const{reward:t}=c3("rewardId","confetti",{spread:360,elementCount:200}),n=Zo.useUtils(),r=os(p=>p.projects.selected);je(!!r);const{isPending:i,mutate:o}=Zo.syncDependencies.useMutation({onSuccess(){n.getSyncUpdates.invalidate(r)}}),s=w.useMemo(()=>J5(e),[e]),a=w.useMemo(()=>s.flatMap(p=>p.dependencies),[s]),[l,u]=w.useState(["dependencyName"]),[c,d]=w.useState({}),[f,h]=w.useState(),g=s.find(p=>p.dependencyName===f),m=Object.keys(c).length,S=w.useMemo(()=>P.jsxs("div",{className:"flex justify-between",children:[P.jsx("div",{children:P.jsx(Zh,{className:le({}),variant:s.length>1?"destructive":"default",children:s.length>0?P.jsxs("span",{children:[s.length," sync errors."]}):P.jsx("span",{children:"No sync errors 🚀."})})}),P.jsxs("div",{className:"flex flex-col items-end",children:[P.jsxs(Ln,{variant:m>0?"default":"outline",disabled:m===0||Nu.PROJECT_MODE==="online",className:"relative flex items-center gap-2",onClick:()=>{t(),d({});const p=vm.getState().projects.selected;p&&o({dirPath:p.value,updates:Object.entries(c).map(([v,y])=>({dependencyName:v,versionRange:y}))})},children:["Fix Sync Errors",m>0&&P.jsx(Zh,{variant:"secondary",children:m}),P.jsx("span",{id:"rewardId",onClick:t,className:"absolute left-1/2 top-1/2"})]}),Nu.PROJECT_MODE==="online"]})]}),[i,o,t,m,c,s.length]);return a.length===0?P.jsxs("div",{children:[S,P.jsx("h1",{className:"mt-8 text-center text-4xl text-foreground opacity-30",children:"No dependency sync issues found 🙌🏻"})]}):P.jsxs("div",{className:"flex h-min flex-col gap-4 overflow-auto",children:[S,P.jsx("div",{className:"overflow-auto",children:P.jsx(k5,{scheduledSyncFixes:c,grouping:l,setGrouping:u,columns:E5,data:a,onFixSync:h})}),P.jsxs(zD,{open:!!g,onOpenChange:p=>!p&&h(void 0),children:[P.jsx(qm,{className:"bg-background/90"}),P.jsx(Y5,{initialFixVersion:c[(g==null?void 0:g.dependencyName)??""],fixSyncInfo:g,onFix:p=>{g&&(p?c[g.dependencyName]=p:delete c[g.dependencyName],d({...c}),h(void 0))}},g?"true":"false")]})]})},cp=Math.PI,dp=2*cp,si=1e-6,rj=dp-si;function wb(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function ij(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return wb;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class oj{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?wb:ij(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,s){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,a=this._y1,l=r-t,u=i-n,c=s-t,d=a-n,f=c*c+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>si)if(!(Math.abs(d*l-u*c)>si)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let h=r-s,g=i-a,m=l*l+u*u,S=h*h+g*g,p=Math.sqrt(m),v=Math.sqrt(f),y=o*Math.tan((cp-Math.acos((m+f-S)/(2*p*v)))/2),x=y/v,_=y/p;Math.abs(x-1)>si&&this._append`L${t+x*c},${n+x*d}`,this._append`A${o},${o},0,0,${+(d*h>c*g)},${this._x1=t+_*l},${this._y1=n+_*u}`}}arc(t,n,r,i,o,s){if(t=+t,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),l=r*Math.sin(i),u=t+a,c=n+l,d=1^s,f=s?i-o:o-i;this._x1===null?this._append`M${u},${c}`:(Math.abs(this._x1-u)>si||Math.abs(this._y1-c)>si)&&this._append`L${u},${c}`,r&&(f<0&&(f=f%dp+dp),f>rj?this._append`A${r},${r},0,1,${d},${t-a},${n-l}A${r},${r},0,1,${d},${this._x1=u},${this._y1=c}`:f>si&&this._append`A${r},${r},0,${+(f>=cp)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function lr(e){return function(){return e}}function Sb(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new oj(t)}var sj=Array.prototype.slice;function aj(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xb(e){this._context=e}xb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function lj(e){return new xb(e)}function Cb(e){return e[0]}function _b(e){return e[1]}function uj(e,t){var n=lr(!0),r=null,i=lj,o=null,s=Sb(a);e=typeof e=="function"?e:e===void 0?Cb:lr(e),t=typeof t=="function"?t:t===void 0?_b:lr(t);function a(l){var u,c=(l=aj(l)).length,d,f=!1,h;for(r==null&&(o=i(h=s())),u=0;u<=c;++u)!(u<c&&n(d=l[u],u,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,u,l),+t(d,u,l));if(h)return o=null,h+""||null}return a.x=function(l){return arguments.length?(e=typeof l=="function"?l:lr(+l),a):e},a.y=function(l){return arguments.length?(t=typeof l=="function"?l:lr(+l),a):t},a.defined=function(l){return arguments.length?(n=typeof l=="function"?l:lr(!!l),a):n},a.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),a):i},a.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),a):r},a}class cj{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function dj(e){return new cj(e,!1)}function fj(e){return e.source}function hj(e){return e.target}function pj(e){let t=fj,n=hj,r=Cb,i=_b,o=null,s=null,a=Sb(l);function l(){let u;const c=sj.call(arguments),d=t.apply(this,c),f=n.apply(this,c);if(o==null&&(s=e(u=a())),s.lineStart(),c[0]=d,s.point(+r.apply(this,c),+i.apply(this,c)),c[0]=f,s.point(+r.apply(this,c),+i.apply(this,c)),s.lineEnd(),u)return s=null,u+""||null}return l.source=function(u){return arguments.length?(t=u,l):t},l.target=function(u){return arguments.length?(n=u,l):n},l.x=function(u){return arguments.length?(r=typeof u=="function"?u:lr(+u),l):r},l.y=function(u){return arguments.length?(i=typeof u=="function"?u:lr(+u),l):i},l.context=function(u){return arguments.length?(u==null?o=s=null:s=e(o=u),l):o},l}function mj(){return pj(dj)}function $s(e,t,n){this.k=e,this.x=t,this.y=n}$s.prototype={constructor:$s,scale:function(e){return e===1?this:new $s(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $s(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};$s.prototype;const gj=({connectorRefMap:e,selected:t,className:n,links:r})=>{const i=w.useRef(null),o=mj().x(l=>l[0]).y(l=>l[1]),s=w.useMemo(()=>{try{return r.map(l=>{var h,g;const u=((h=e.current[l.from].top.current)==null?void 0:h.offsetTop)??0,c=((g=e.current[l.to].top.current)==null?void 0:g.offsetTop)??0,d=e.current[l.from][u<c?"bottom":"top"].current,f=e.current[l.to][u<c||u===c?"top":"bottom"].current;return!d||!f?{from:[0,0],to:[0,0],type:t!=null&&t.includes(l.from)?"from":"to"}:u<c?{from:[d.offsetLeft-10,d.offsetTop-10],to:[f.offsetLeft+10,f.offsetTop+10],type:t!=null&&t.includes(l.from)?"from":"to"}:u===c?{from:[d.offsetLeft-10,d.offsetTop+10],to:[f.offsetLeft+10,f.offsetTop+10],type:t!=null&&t.includes(l.from)?"from":"to"}:{from:[d.offsetLeft-10,d.offsetTop+10],to:[f.offsetLeft+10,f.offsetTop-10],type:t!=null&&t.includes(l.from)?"from":"to"}})}catch{return[]}},[e,r,t]),{markerSize:a}={markerSize:5};return P.jsxs("svg",{ref:i,className:le("size-full",n),children:[P.jsx("defs",{children:["from","to"].map(l=>P.jsx("marker",{id:`arrow-${l}`,viewBox:`0 0 ${a} ${a}`,refX:a/2,refY:a/2,markerWidth:a,markerHeight:a,orient:"auto-start-reverse",children:P.jsx("path",{fill:`var(--link-${l})`,d:uj()([[0,0],[0,a],[a,a/2]])})},l))}),s.map((l,u)=>{const{from:c,to:d,type:f}=l,h=o({source:c,target:d});return h===null?null:P.jsxs("g",{children:[P.jsx("circle",{cx:c[0],cy:c[1],r:6,fill:`var(--link-${f})`}),P.jsx("path",{markerEnd:`url(#arrow-${f})`,d:h,style:{stroke:f==="from"?"var(--link-from)":"var(--link-to)",strokeWidth:3,fill:"none"}},u)]})})]})},vj=w.forwardRef(({children:e},t)=>{const n=w.useRef(null),r=w.useRef(null);return w.useImperativeHandle(t,()=>({top:n,bottom:r})),P.jsxs("div",{children:[P.jsx("div",{className:"flex justify-center",children:P.jsx("div",{ref:n})}),e,P.jsx("div",{className:"flex justify-center",children:P.jsx("div",{ref:r})})]})}),yj=e=>{const t=e.reduce((c,d)=>(c[d.workspaceName]=d,c),{}),n=e.filter(c=>c.type==="standalone"),r=e.filter(c=>c.type==="leaf"),i=e.filter(c=>c.type==="internal"),o=[];let s=i.map(c=>c.workspaceName),a=n;for(;a.length>0;){const c=o.length,d=[];for(const f of a.flatMap(h=>h.internalDependencies))s.includes(f)&&(d.push(t[f]),s=s.filter(h=>h!==f));if(d.length===0)break;a=d,o.push({level:c,workspaces:d})}s.length>0&&o.push({level:-1,workspaces:s.map(c=>t[c])});const l=e.flatMap(c=>c.internalDependencies.map(d=>({from:c.workspaceName,to:d})));return{overview:[{label:"Applications",workspaces:n},...o.map(({level:c,workspaces:d})=>({label:`Level ${c+1}`,workspaces:d})),{label:"Base libraries",workspaces:r}],standalone:n,leaf:r,internal:i,internalDependencyLevels:o,links:l}},wj=Ja("/_layout/_nested/overview/")({component:Sj,beforeLoad:()=>{if(!vm.getState().projects.selected)throw Ow({to:"/"})}});function Sj(){const e=os(h=>h.projects.selected),{data:t,isLoading:n,isError:r}=Zo.getOverview.useQuery(e,{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),i=w.useRef({}),[o,s]=w.useState([]),a=h=>()=>{s(g=>g.includes(h)?g.filter(m=>m!==h):[...g,h])};if(n||!t)return P.jsx("div",{className:"mt-10",children:P.jsx(Lx,{})});const{result:l}=t;if(r||!l)return P.jsx("div",{children:"Error loading data"});const{overview:u,links:c}=yj(l),d=c.filter(({from:h,to:g})=>o.includes(h)||o.includes(g)),f=Ia(d.flatMap(h=>[h.from,h.to]));return P.jsxs("div",{className:"relative mt-4 grow pb-10",children:[P.jsx("div",{className:"flex flex-col gap-5 p-5",children:u.map(({label:h,workspaces:g})=>P.jsxs("div",{className:"my-3 flex flex-col gap-4",children:[P.jsx("h2",{className:"text-center text-xl font-bold",children:h}),P.jsx("div",{className:"flex flex-wrap justify-center gap-4",children:g.map(m=>P.jsx(vj,{ref:S=>{S&&(i.current[m.workspaceName]=S)},children:P.jsx("div",{className:le("bg-accent p-4 text-accent-foreground border-2 box-border transition-all cursor-pointer hover:opacity-95",{"bg-primary text-primary-foreground":o.includes(m.workspaceName),"border-primary":f.includes(m.workspaceName)&&!o.includes(m.workspaceName),"opacity-50":o.length>0&&!o.includes(m.workspaceName)&&!f.includes(m.workspaceName)}),onClick:a(m.workspaceName),children:P.jsx("div",{children:m.workspaceName})})},m.workspaceName))})]},h))}),P.jsx(gj,{selected:o,connectorRefMap:i,className:"pointer-events-none absolute inset-0",links:d})]})}const xj=Ja("/_layout/")(),dg=U2.update({id:"/_layout",getParentRoute:()=>Rx}),Cj=xj.update({path:"/",getParentRoute:()=>dg}).lazy(()=>Rk(()=>import("./index.lazy-B2wDxrXt.js"),[]).then(e=>e.Route)),fg=QI.update({id:"/_nested",getParentRoute:()=>dg}),_j=ej.update({path:"/sync/",getParentRoute:()=>fg}),bj=wj.update({path:"/overview/",getParentRoute:()=>fg}),Pj=Rx.addChildren([dg.addChildren([fg.addChildren([bj,_j]),Cj])]),W0=new SE,Ej=Zo.createClient({links:[cR({url:Nu.API_BASE_URL})]}),Rj=WP({routeTree:Pj});mx(document.getElementById("root")).render(P.jsxs(w.StrictMode,{children:[!1,P.jsx(Zo.Provider,{client:Ej,queryClient:W0,children:P.jsx(EE,{client:W0,children:P.jsx(UP,{router:Rj})})})]}));export{Vt as $,Ln as B,zD as D,Nu as E,WI as L,ee as _,le as a,$x as b,ym as c,$j as d,Wr as e,qm as f,k_ as g,UD as h,$_ as i,P as j,je as k,w as r,os as u};
|