@alivault/pico 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/{index-BMJXPFQq.js → index-CksX3NW4.js} +3 -3
- package/.output/public/assets/{routes-BPkTKiWN.js → routes-VohBsBcC.js} +3 -3
- package/.output/public/assets/styles-ej_ltn_F.css +2 -0
- package/.output/server/_ssr/{router-DB3DegnY.mjs → router-Di8B08B6.mjs} +3 -3
- package/.output/server/_ssr/{routes-C2DKvBRY.mjs → routes-B99MXwvx.mjs} +2 -2
- package/.output/server/_ssr/{routes-RV18btaL.mjs → routes-CRDrPu8Q.mjs} +5 -5
- package/.output/server/_ssr/ssr.mjs +2 -2
- package/.output/server/{_tanstack-start-manifest_v-K79umiqV.mjs → _tanstack-start-manifest_v-DK9pZs2A.mjs} +4 -4
- package/.output/server/index.mjs +513 -513
- package/package.json +1 -1
- package/.output/public/assets/styles-BteSJJZQ.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-VohBsBcC.js","assets/rolldown-runtime-S-ySWqyJ.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e,t}from"./rolldown-runtime-S-ySWqyJ.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ee(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ee}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),r=t(((e,t)=>{t.exports=n()})),i=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,k());else{var t=n(l);t!==null&&M(x,t.startTime-e)}}var S=!1,C=-1,w=5,E=-1;function D(){return g?!0:!(e.unstable_now()-E<w)}function O(){if(g=!1,S){var t=e.unstable_now();E=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&M(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?k():S=!1}}}var k;if(typeof y==`function`)k=function(){y(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){_(O,0)};function M(t,n){C=_(function(){t(e.unstable_now())},n)}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(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,M(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,k()))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),a=t(((e,t)=>{t.exports=i()})),o=t((e=>{var t=r();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function i(){}var a={d:{f:i,r:function(){throw Error(n(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.5`})),s=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=o()})),c=t((e=>{var t=a(),n=r(),i=s();function o(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;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.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(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 u(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 d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(o(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(o(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=a;break}if(c===r){s=!0,r=i,n=a;break}c=c.sibling}if(!s){for(c=a.child;c;){if(c===n){s=!0,n=a,r=i;break}if(c===r){s=!0,r=a,n=i;break}c=c.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(n.tag!==3)throw Error(o(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),E=Symbol.for(`react.suspense`),D=Symbol.for(`react.suspense_list`),O=Symbol.for(`react.memo`),k=Symbol.for(`react.lazy`),A=Symbol.for(`react.activity`),j=Symbol.for(`react.memo_cache_sentinel`),M=Symbol.iterator;function N(e){return typeof e!=`object`||!e?null:(e=M&&e[M]||e[`@@iterator`],typeof e==`function`?e:null)}var P=Symbol.for(`react.client.reference`);function F(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case E:return`Suspense`;case D:return`SuspenseList`;case A:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case O:return t=e.displayName||null,t===null?F(e.type)||`Memo`:t;case k:t=e._payload,e=e._init;try{return F(e(t))}catch{}}return null}var ee=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},ne=[],re=-1;function R(e){return{current:e}}function z(e){0>re||(e.current=ne[re],ne[re]=null,re--)}function B(e,t){re++,ne[re]=e.current,e.current=t}var V=R(null),ie=R(null),ae=R(null),oe=R(null);function se(e,t){switch(B(ae,t),B(ie,e),B(V,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?qd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=qd(t),e=Jd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}z(V),B(V,e)}function ce(){z(V),z(ie),z(ae)}function le(e){e.memoizedState!==null&&B(oe,e);var t=V.current,n=Jd(t,e.type);t!==n&&(B(ie,e),B(V,n))}function ue(e){ie.current===e&&(z(V),z(ie)),oe.current===e&&(z(oe),ip._currentValue=te)}var de,fe;function pe(e){if(de===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);de=t&&t[1]||``,fe=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+de+e+fe}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
@@ -12,7 +12,7 @@ Error generating stack: `+e.message+`
|
|
|
12
12
|
`;case`\\r`:return`\r`;case`\\b`:return`\b`;case`\\t`:return` `;case`\\f`:return`\f`;case`\\x3C`:return`<`;case`\\u2028`:return`\u2028`;case`\\u2029`:return`\u2029`;default:return e}}function Wn(e){return e.replace(/(\\\\|\\"|\\n|\\r|\\b|\\t|\\f|\\u2028|\\u2029|\\x3C)/g,Un)}var Gn=`__SEROVAL_REFS__`,Kn=new Map,qn=new Map;function Jn(e){return Kn.has(e)}function Yn(e){return qn.has(e)}function Xn(e){if(Jn(e))return Kn.get(e);throw new Rr(e)}function Zn(e){if(Yn(e))return qn.get(e);throw new zr(e)}typeof globalThis<`u`?Object.defineProperty(globalThis,Gn,{value:qn,configurable:!0,writable:!1,enumerable:!1}):typeof window<`u`?Object.defineProperty(window,Gn,{value:qn,configurable:!0,writable:!1,enumerable:!1}):typeof self<`u`?Object.defineProperty(self,Gn,{value:qn,configurable:!0,writable:!1,enumerable:!1}):typeof global<`u`&&Object.defineProperty(global,Gn,{value:qn,configurable:!0,writable:!1,enumerable:!1});function Qn(e){return e instanceof EvalError?1:e instanceof RangeError?2:e instanceof ReferenceError?3:e instanceof SyntaxError?4:e instanceof TypeError?5:e instanceof URIError?6:0}function $n(e){let t=kn[Qn(e)];return e.name===t?e.constructor.name===t?{}:{name:e.constructor.name}:{name:e.name}}function er(e,t){let n=$n(e),r=Object.getOwnPropertyNames(e);for(let i=0,a=r.length,o;i<a;i++)o=r[i],o!==`name`&&o!==`message`&&(o===`stack`?t&4&&(n||={},n[o]=e[o]):(n||={},n[o]=e[o]));return n}function tr(e){return Object.isFrozen(e)?3:Object.isSealed(e)?2:+!Object.isExtensible(e)}function nr(e){switch(e){case 1/0:return Rn;case-1/0:return zn}return e===e?Object.is(e,-0)?Ln:jn(0,H,e,H,H,H,H,H,H,H,H,H):Bn}function rr(e){return jn(1,H,Hn(e),H,H,H,H,H,H,H,H,H)}function ir(e){return jn(3,H,``+e,H,H,H,H,H,H,H,H,H)}function ar(e){return jn(4,e,H,H,H,H,H,H,H,H,H,H)}function or(e,t){let n=t.valueOf();return jn(5,e,n===n?t.toISOString():``,H,H,H,H,H,H,H,H,H)}function sr(e,t){return jn(6,e,H,Hn(t.source),t.flags,H,H,H,H,H,H,H)}function cr(e,t){return jn(17,e,En[t],H,H,H,H,H,H,H,H,H)}function lr(e,t){return jn(18,e,Hn(Xn(t)),H,H,H,H,H,H,H,H,H)}function ur(e,t,n){return jn(25,e,n,Hn(t),H,H,H,H,H,H,H,H)}function dr(e,t,n){return jn(9,e,H,H,H,H,H,n,H,H,tr(t),H)}function fr(e,t){return jn(21,e,H,H,H,H,H,H,t,H,H,H)}function pr(e,t,n){return jn(15,e,H,t.constructor.name,H,H,H,H,n,t.byteOffset,H,t.length)}function mr(e,t,n){return jn(16,e,H,t.constructor.name,H,H,H,H,n,t.byteOffset,H,t.byteLength)}function hr(e,t,n){return jn(20,e,H,H,H,H,H,H,n,t.byteOffset,H,t.byteLength)}function gr(e,t,n){return jn(13,e,Qn(t),H,Hn(t.message),n,H,H,H,H,H,H)}function _r(e,t,n){return jn(14,e,Qn(t),H,Hn(t.message),n,H,H,H,H,H,H)}function vr(e,t){return jn(7,e,H,H,H,H,H,t,H,H,H,H)}function yr(e,t){return jn(28,H,H,H,H,H,H,[e,t],H,H,H,H)}function br(e,t){return jn(30,H,H,H,H,H,H,[e,t],H,H,H,H)}function xr(e,t,n){return jn(31,e,H,H,H,H,H,n,t,H,H,H)}function Sr(e,t){return jn(32,e,H,H,H,H,H,H,t,H,H,H)}function Cr(e,t){return jn(33,e,H,H,H,H,H,H,t,H,H,H)}function wr(e,t){return jn(34,e,H,H,H,H,H,H,t,H,H,H)}function Tr(e,t,n,r){return jn(35,e,n,H,H,H,H,t,H,H,H,r)}var{toString:Er}=Object.prototype,Dr={parsing:1,serialization:2,deserialization:3};function Or(e){return`Seroval Error (step: ${Dr[e]})`}var kr=(e,t)=>Or(e),Ar=class extends Error{constructor(e,t){super(kr(e,t)),this.cause=t}},jr=class extends Ar{constructor(e){super(`parsing`,e)}},Mr=class extends Ar{constructor(e){super(`deserialization`,e)}};function Nr(e){return`Seroval Error (specific: ${e})`}var Pr=class extends Error{constructor(e){super(Nr(1)),this.value=e}},Fr=class extends Error{constructor(e){super(Nr(2))}},Ir=class extends Error{constructor(e){super(Nr(3))}},Lr=class extends Error{constructor(e){super(Nr(4))}},Rr=class extends Error{constructor(e){super(Nr(5)),this.value=e}},zr=class extends Error{constructor(e){super(Nr(6))}},Br=class extends Error{constructor(e){super(Nr(7))}},Vr=class extends Error{constructor(e){super(Nr(8))}},Hr=class extends Error{constructor(e){super(Nr(9))}},Ur=class{constructor(e,t){this.value=e,this.replacement=t}},Wr=()=>{let e={p:0,s:0,f:0};return e.p=new Promise((t,n)=>{e.s=t,e.f=n}),e};Wr.toString(),((e,t)=>{e.s(t),e.p.s=1,e.p.v=t}).toString(),((e,t)=>{e.f(t),e.p.s=2,e.p.v=t}).toString();var Gr=()=>{let e=[],t=[],n=!0,r=!1,i=0,a=(e,n,r)=>{for(r=0;r<i;r++)t[r]&&t[r][n](e)},o=(t,i,a,o)=>{for(i=0,a=e.length;i<a;i++)o=e[i],!n&&i===a-1?t[r?`return`:`throw`](o):t.next(o)},s=(e,r)=>(n&&(r=i++,t[r]=e),o(e),()=>{n&&(t[r]=t[i],t[i--]=void 0)});return{__SEROVAL_STREAM__:!0,on:e=>s(e),next:t=>{n&&(e.push(t),a(t,`next`))},throw:i=>{n&&(e.push(i),a(i,`throw`),n=!1,r=!1,t.length=0)},return:i=>{n&&(e.push(i),a(i,`return`),n=!1,r=!0,t.length=0)}}};Gr.toString();var Kr=e=>t=>()=>{let n=0,r={[e]:()=>r,next:()=>{if(n>t.d)return{done:!0,value:void 0};let e=n++,r=t.v[e];if(e===t.t)throw r;return{done:e===t.d,value:r}}};return r};Kr.toString();var qr=(e,t)=>n=>()=>{let r=0,i=-1,a=!1,o=[],s=[],c=(e=0,t=s.length)=>{for(;e<t;e++)s[e].s({done:!0,value:void 0})};n.on({next:e=>{let t=s.shift();t&&t.s({done:!1,value:e}),o.push(e)},throw:e=>{let t=s.shift();t&&t.f(e),c(),i=o.length,a=!0,o.push(e)},return:e=>{let t=s.shift();t&&t.s({done:!0,value:e}),c(),i=o.length,o.push(e)}});let l={[e]:()=>l,next:()=>{if(i===-1){let e=r++;if(e>=o.length){let e=t();return s.push(e),e.p}return{done:!1,value:o[e]}}if(r>i)return{done:!0,value:void 0};let e=r++,n=o[e];if(e!==i)return{done:!1,value:n};if(a)throw n;return{done:!0,value:n}}};return l};qr.toString();var Jr=e=>{let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer};Jr.toString();function Yr(e){return`__SEROVAL_SEQUENCE__`in e}function Xr(e,t,n){return{__SEROVAL_SEQUENCE__:!0,v:e,t,d:n}}function Zr(e){let t=[],n=-1,r=-1,i=e[gn]();for(;;)try{let e=i.next();if(t.push(e.value),e.done){r=t.length-1;break}}catch(e){n=t.length,t.push(e)}return Xr(t,n,r)}var Qr=Kr(gn);function $r(e){return Qr(e)}var ei={},ti={},ni={0:{},1:{},2:{},3:{},4:{},5:{}};function ri(e){return`__SEROVAL_STREAM__`in e}function ii(){return Gr()}function ai(e){let t=ii(),n=e[pn]();async function r(){try{let e=await n.next();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var oi=qr(pn,Wr);function si(e){return oi(e)}async function ci(e){try{return[1,await e]}catch(e){return[0,e]}}function li(e,t){return{plugins:t.plugins,mode:e,marked:new Set,features:63^(t.disabledFeatures||0),refs:t.refs||new Map,depthLimit:t.depthLimit||1e3}}function ui(e,t){e.marked.add(t)}function di(e,t){let n=e.refs.size;return e.refs.set(t,n),n}function fi(e,t){let n=e.refs.get(t);return n==null?{type:0,value:di(e,t)}:(ui(e,n),{type:1,value:ar(n)})}function pi(e,t){let n=fi(e,t);return n.type===1?n:Jn(t)?{type:2,value:lr(n.value,t)}:n}function mi(e,t){let n=pi(e,t);if(n.type!==0)return n.value;if(t in En)return cr(n.value,t);throw new Pr(t)}function hi(e,t){let n=fi(e,ni[t]);return n.type===1?n.value:jn(26,n.value,t,H,H,H,H,H,H,H,H,H)}function gi(e){let t=fi(e,ei);return t.type===1?t.value:jn(27,t.value,H,H,H,H,H,H,mi(e,gn),H,H,H)}function _i(e){let t=fi(e,ti);return t.type===1?t.value:jn(29,t.value,H,H,H,H,H,[hi(e,1),mi(e,pn)],H,H,H,H)}function vi(e,t,n,r){return jn(n?11:10,e,H,H,H,r,H,H,H,H,tr(t),H)}function yi(e,t,n,r){return jn(8,t,H,H,H,H,{k:n,v:r},H,hi(e,0),H,H,H)}function bi(e,t,n){let r=new Uint8Array(n),i=``;for(let e=0,t=r.length;e<t;e++)i+=String.fromCharCode(r[e]);return jn(19,t,Hn(btoa(i)),H,H,H,H,H,hi(e,5),H,H,H)}function xi(e,t){return{base:li(e,t),child:void 0}}var Si=class{constructor(e,t){this._p=e,this.depth=t}parse(e){return Hi(this._p,this.depth,e)}};async function Ci(e,t,n){let r=[];for(let i=0,a=n.length;i<a;i++)i in n?r[i]=await Hi(e,t,n[i]):r[i]=0;return r}async function wi(e,t,n,r){return dr(n,r,await Ci(e,t,r))}async function Ti(e,t,n){let r=Object.entries(n),i=[],a=[];for(let n=0,o=r.length;n<o;n++)i.push(Hn(r[n][0])),a.push(await Hi(e,t,r[n][1]));return gn in n&&(i.push(mi(e.base,gn)),a.push(yr(gi(e.base),await Hi(e,t,Zr(n))))),pn in n&&(i.push(mi(e.base,pn)),a.push(br(_i(e.base),await Hi(e,t,ai(n))))),wn in n&&(i.push(mi(e.base,wn)),a.push(rr(n[wn]))),hn in n&&(i.push(mi(e.base,hn)),a.push(n[hn]?Nn:Pn)),{k:i,v:a}}async function Ei(e,t,n,r,i){return vi(n,r,i,await Ti(e,t,r))}async function Di(e,t,n,r){return fr(n,await Hi(e,t,r.valueOf()))}async function Oi(e,t,n,r){return pr(n,r,await Hi(e,t,r.buffer))}async function ki(e,t,n,r){return mr(n,r,await Hi(e,t,r.buffer))}async function Ai(e,t,n,r){return hr(n,r,await Hi(e,t,r.buffer))}async function ji(e,t,n,r){let i=er(r,e.base.features);return gr(n,r,i?await Ti(e,t,i):H)}async function Mi(e,t,n,r){let i=er(r,e.base.features);return _r(n,r,i?await Ti(e,t,i):H)}async function Ni(e,t,n,r){let i=[],a=[];for(let[n,o]of r.entries())i.push(await Hi(e,t,n)),a.push(await Hi(e,t,o));return yi(e.base,n,i,a)}async function Pi(e,t,n,r){let i=[];for(let n of r.keys())i.push(await Hi(e,t,n));return vr(n,i)}async function Fi(e,t,n,r){let i=e.base.plugins;if(i)for(let a=0,o=i.length;a<o;a++){let o=i[a];if(o.parse.async&&o.test(r))return ur(n,o.tag,await o.parse.async(r,new Si(e,t),{id:n}))}return H}async function Ii(e,t,n,r){let[i,a]=await ci(r);return jn(12,n,i,H,H,H,H,H,await Hi(e,t,a),H,H,H)}function Li(e,t,n,r,i){let a=[],o=n.on({next:n=>{ui(this.base,t),Hi(this,e,n).then(e=>{a.push(Sr(t,e))},e=>{i(e),o()})},throw:n=>{ui(this.base,t),Hi(this,e,n).then(e=>{a.push(Cr(t,e)),r(a),o()},e=>{i(e),o()})},return:n=>{ui(this.base,t),Hi(this,e,n).then(e=>{a.push(wr(t,e)),r(a),o()},e=>{i(e),o()})}})}async function Ri(e,t,n,r){return xr(n,hi(e.base,4),await new Promise(Li.bind(e,t,n,r)))}async function zi(e,t,n,r){let i=[];for(let n=0,a=r.v.length;n<a;n++)i[n]=await Hi(e,t,r.v[n]);return Tr(n,i,r.t,r.d)}async function Bi(e,t,n,r){if(Array.isArray(r))return wi(e,t,n,r);if(ri(r))return Ri(e,t,n,r);if(Yr(r))return zi(e,t,n,r);let i=r.constructor;if(i===Ur)return Hi(e,t,r.replacement);let a=await Fi(e,t,n,r);if(a)return a;switch(i){case Object:return Ei(e,t,n,r,!1);case H:return Ei(e,t,n,r,!0);case Date:return or(n,r);case Error:case EvalError:case RangeError:case ReferenceError:case SyntaxError:case TypeError:case URIError:return ji(e,t,n,r);case Number:case Boolean:case String:case BigInt:return Di(e,t,n,r);case ArrayBuffer:return bi(e.base,n,r);case Int8Array:case Int16Array:case Int32Array:case Uint8Array:case Uint16Array:case Uint32Array:case Uint8ClampedArray:case Float32Array:case Float64Array:return Oi(e,t,n,r);case DataView:return Ai(e,t,n,r);case Map:return Ni(e,t,n,r);case Set:return Pi(e,t,n,r);default:break}if(i===Promise||r instanceof Promise)return Ii(e,t,n,r);let o=e.base.features;if(o&32&&i===RegExp)return sr(n,r);if(o&16)switch(i){case BigInt64Array:case BigUint64Array:return ki(e,t,n,r);default:break}if(o&1&&typeof AggregateError<`u`&&(i===AggregateError||r instanceof AggregateError))return Mi(e,t,n,r);if(r instanceof Error)return ji(e,t,n,r);if(gn in r||pn in r)return Ei(e,t,n,r,!!i);throw new Pr(r)}async function Vi(e,t,n){let r=pi(e.base,n);if(r.type!==0)return r.value;let i=await Fi(e,t,r.value,n);if(i)return i;throw new Pr(n)}async function Hi(e,t,n){switch(typeof n){case`boolean`:return n?Nn:Pn;case`undefined`:return Fn;case`string`:return rr(n);case`number`:return nr(n);case`bigint`:return ir(n);case`object`:if(n){let r=pi(e.base,n);return r.type===0?await Bi(e,t+1,r.value,n):r.value}return In;case`symbol`:return mi(e.base,n);case`function`:return Vi(e,t,n);default:throw new Pr(n)}}async function Ui(e,t){try{return await Hi(e,0,t)}catch(e){throw e instanceof jr?e:new jr(e)}}var Wi=(e=>(e[e.Vanilla=1]=`Vanilla`,e[e.Cross=2]=`Cross`,e))(Wi||{});function Gi(e){return e}function Ki(e,t){for(let n=0,r=t.length;n<r;n++){let r=t[n];e.has(r)||(e.add(r),r.extends&&Ki(e,r.extends))}}function qi(e){if(e){let t=new Set;return Ki(t,e),[...t]}}function Ji(e){switch(e){case`Int8Array`:return Int8Array;case`Int16Array`:return Int16Array;case`Int32Array`:return Int32Array;case`Uint8Array`:return Uint8Array;case`Uint16Array`:return Uint16Array;case`Uint32Array`:return Uint32Array;case`Uint8ClampedArray`:return Uint8ClampedArray;case`Float32Array`:return Float32Array;case`Float64Array`:return Float64Array;case`BigInt64Array`:return BigInt64Array;case`BigUint64Array`:return BigUint64Array;default:throw new Br(e)}}var Yi=1e6,Xi=1e4,Zi=2e4;function Qi(e,t){switch(t){case 3:return Object.freeze(e);case 1:return Object.preventExtensions(e);case 2:return Object.seal(e);default:return e}}var $i=1e3;function ea(e,t){return{mode:e,plugins:t.plugins,refs:t.refs||new Map,features:t.features??63^(t.disabledFeatures||0),depthLimit:t.depthLimit||$i}}function ta(e){return{mode:2,base:ea(2,e),child:H}}var na=class{constructor(e,t){this._p=e,this.depth=t}deserialize(e){return Va(this._p,this.depth,e)}};function ra(e,t){if(t<0||!Number.isFinite(t)||!Number.isInteger(t))throw new Vr({t:4,i:t});if(e.refs.has(t))throw Error(`Conflicted ref id: `+t)}function ia(e,t,n){return ra(e.base,t),e.state.marked.has(t)&&e.base.refs.set(t,n),n}function aa(e,t,n){return ra(e.base,t),e.base.refs.set(t,n),n}function oa(e,t,n){return e.mode===1?ia(e,t,n):aa(e,t,n)}function sa(e,t,n){if(Object.hasOwn(t,n))return t[n];throw new Vr(e)}function ca(e,t){return oa(e,t.i,Zn(Wn(t.s)))}function la(e,t,n){let r=n.a,i=r.length,a=oa(e,n.i,Array(i));for(let n=0,o;n<i;n++)o=r[n],o&&(a[n]=Va(e,t,o));return Qi(a,n.o),a}function ua(e){switch(e){case`constructor`:case`__proto__`:case`prototype`:case`__defineGetter__`:case`__defineSetter__`:case`__lookupGetter__`:case`__lookupSetter__`:return!1;default:return!0}}function da(e){switch(e){case pn:case hn:case wn:case gn:return!0;default:return!1}}function fa(e,t,n){ua(t)?e[t]=n:Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!0,writable:!0})}function pa(e,t,n,r,i){if(typeof r==`string`)fa(n,Wn(r),Va(e,t,i));else{let a=Va(e,t,r);switch(typeof a){case`string`:fa(n,a,Va(e,t,i));break;case`symbol`:da(a)&&(n[a]=Va(e,t,i));break;default:throw new Vr(r)}}}function ma(e,t,n,r){let i=n.k;if(i.length>0)for(let a=0,o=n.v,s=i.length;a<s;a++)pa(e,t,r,i[a],o[a]);return r}function ha(e,t,n){let r=oa(e,n.i,n.t===10?{}:Object.create(null));return ma(e,t,n.p,r),Qi(r,n.o),r}function ga(e,t){return oa(e,t.i,new Date(t.s))}function _a(e,t){if(e.base.features&32){let n=Wn(t.c);if(n.length>Zi)throw new Vr(t);return oa(e,t.i,new RegExp(n,t.m))}throw new Fr(t)}function va(e,t,n){let r=oa(e,n.i,new Set);for(let i=0,a=n.a,o=a.length;i<o;i++)r.add(Va(e,t,a[i]));return r}function ya(e,t,n){let r=oa(e,n.i,new Map);for(let i=0,a=n.e.k,o=n.e.v,s=a.length;i<s;i++)r.set(Va(e,t,a[i]),Va(e,t,o[i]));return r}function ba(e,t){if(t.s.length>Yi)throw new Vr(t);return oa(e,t.i,Jr(Wn(t.s)))}function xa(e,t,n){let r=Ji(n.c),i=Va(e,t,n.f),a=n.b??0;if(a<0||a>i.byteLength)throw new Vr(n);return oa(e,n.i,new r(i,a,n.l))}function Sa(e,t,n){let r=Va(e,t,n.f),i=n.b??0;if(i<0||i>r.byteLength)throw new Vr(n);return oa(e,n.i,new DataView(r,i,n.l))}function Ca(e,t,n,r){if(n.p){let i=ma(e,t,n.p,{});Object.defineProperties(r,Object.getOwnPropertyDescriptors(i))}return r}function wa(e,t,n){return Ca(e,t,n,oa(e,n.i,AggregateError([],Wn(n.m))))}function Ta(e,t,n){let r=sa(n,An,n.s);return Ca(e,t,n,oa(e,n.i,new r(Wn(n.m))))}function Ea(e,t,n){let r=Wr(),i=oa(e,n.i,r.p),a=Va(e,t,n.f);return n.s?r.s(a):r.f(a),i}function Da(e,t,n){return oa(e,n.i,Object(Va(e,t,n.f)))}function Oa(e,t,n){let r=e.base.plugins;if(r){let i=Wn(n.c);for(let a=0,o=r.length;a<o;a++){let o=r[a];if(o.tag===i)return oa(e,n.i,o.deserialize(n.s,new na(e,t),{id:n.i}))}}throw new Ir(n.c)}function ka(e,t){return oa(e,t.i,oa(e,t.s,Wr()).p)}function Aa(e,t,n){let r=e.base.refs.get(n.i);if(r)return r.s(Va(e,t,n.a[1])),H;throw new Lr(`Promise`)}function ja(e,t,n){let r=e.base.refs.get(n.i);if(r)return r.f(Va(e,t,n.a[1])),H;throw new Lr(`Promise`)}function Ma(e,t,n){return Va(e,t,n.a[0]),$r(Va(e,t,n.a[1]))}function Na(e,t,n){return Va(e,t,n.a[0]),si(Va(e,t,n.a[1]))}function Pa(e,t,n){let r=oa(e,n.i,ii()),i=n.a,a=i.length;if(a)for(let n=0;n<a;n++)Va(e,t,i[n]);return r}function Fa(e,t,n){let r=e.base.refs.get(n.i);if(r&&ri(r))return r.next(Va(e,t,n.f)),H;throw new Lr(`Stream`)}function Ia(e,t,n){let r=e.base.refs.get(n.i);if(r&&ri(r))return r.throw(Va(e,t,n.f)),H;throw new Lr(`Stream`)}function La(e,t,n){let r=e.base.refs.get(n.i);if(r&&ri(r))return r.return(Va(e,t,n.f)),H;throw new Lr(`Stream`)}function Ra(e,t,n){return Va(e,t,n.f),H}function za(e,t,n){return Va(e,t,n.a[1]),H}function Ba(e,t,n){let r=oa(e,n.i,Xr([],n.s,n.l));for(let i=0,a=n.a.length;i<a;i++)r.v[i]=Va(e,t,n.a[i]);return r}function Va(e,t,n){if(t>e.base.depthLimit)throw new Hr(e.base.depthLimit);switch(t+=1,n.t){case 2:return sa(n,On,n.s);case 0:return Number(n.s);case 1:return Wn(String(n.s));case 3:if(String(n.s).length>Xi)throw new Vr(n);return BigInt(n.s);case 4:return e.base.refs.get(n.i);case 18:return ca(e,n);case 9:return la(e,t,n);case 10:case 11:return ha(e,t,n);case 5:return ga(e,n);case 6:return _a(e,n);case 7:return va(e,t,n);case 8:return ya(e,t,n);case 19:return ba(e,n);case 16:case 15:return xa(e,t,n);case 20:return Sa(e,t,n);case 14:return wa(e,t,n);case 13:return Ta(e,t,n);case 12:return Ea(e,t,n);case 17:return sa(n,Dn,n.s);case 21:return Da(e,t,n);case 25:return Oa(e,t,n);case 22:return ka(e,n);case 23:return Aa(e,t,n);case 24:return ja(e,t,n);case 28:return Ma(e,t,n);case 30:return Na(e,t,n);case 31:return Pa(e,t,n);case 32:return Fa(e,t,n);case 33:return Ia(e,t,n);case 34:return La(e,t,n);case 27:return Ra(e,t,n);case 29:return za(e,t,n);case 35:return Ba(e,t,n);default:throw new Fr(n)}}function Ha(e,t){try{return Va(e,0,t)}catch(e){throw new Mr(e)}}var Ua=(()=>T).toString();/=>/.test(Ua);function Wa(e,t){return Ha(ta({plugins:qi(t.plugins),refs:t.refs,features:t.features,disabledFeatures:t.disabledFeatures,depthLimit:t.depthLimit}),e)}async function Ga(e,t={}){let n=xi(1,{plugins:qi(t.plugins),disabledFeatures:t.disabledFeatures});return{t:await Ui(n,e),f:n.base.features,m:Array.from(n.base.marked)}}function Ka(e){return e}function qa(e){return Gi({tag:`$TSR/t/`+e.key,test:e.test,parse:{sync(t,n,r){return{v:n.parse(e.toSerializable(t))}},async async(t,n,r){return{v:await n.parse(e.toSerializable(t))}},stream(t,n,r){return{v:n.parse(e.toSerializable(t))}}},serialize:void 0,deserialize(t,n,r){return e.fromSerializable(n.deserialize(t.v))}})}var Ja=class{constructor(e,t){this.stream=e,this.hint=t?.hint??`binary`}},Ya=globalThis.Buffer,Xa=!!Ya&&typeof Ya.from==`function`;function Za(e){if(e.length===0)return``;if(Xa)return Ya.from(e).toString(`base64`);let t=32768,n=[];for(let r=0;r<e.length;r+=t){let i=e.subarray(r,r+t);n.push(String.fromCharCode.apply(null,i))}return btoa(n.join(``))}function Qa(e){if(e.length===0)return new Uint8Array;if(Xa){let t=Ya.from(e,`base64`);return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var $a=Object.create(null),eo=Object.create(null),to=e=>new ReadableStream({start(t){e.on({next(e){try{t.enqueue(Qa(e))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),no=new TextEncoder,ro=e=>new ReadableStream({start(t){e.on({next(e){try{typeof e==`string`?t.enqueue(no.encode(e)):t.enqueue(Qa(e.$b64))}catch{}},throw(e){t.error(e)},return(){try{t.close()}catch{}}})}}),io=`(s=>new ReadableStream({start(c){s.on({next(b){try{const d=atob(b),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}catch(_){}},throw(e){c.error(e)},return(){try{c.close()}catch(_){}}})}}))`,ao=`(s=>{const e=new TextEncoder();return new ReadableStream({start(c){s.on({next(v){try{if(typeof v==='string'){c.enqueue(e.encode(v))}else{const d=atob(v.$b64),a=new Uint8Array(d.length);for(let i=0;i<d.length;i++)a[i]=d.charCodeAt(i);c.enqueue(a)}}catch(_){}},throw(x){c.error(x)},return(){try{c.close()}catch(_){}}})}})})`;function oo(e){let t=ii(),n=e.getReader();return(async()=>{try{for(;;){let{done:e,value:r}=await n.read();if(e){t.return(void 0);break}t.next(Za(r))}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}function so(e){let t=ii(),n=e.getReader(),r=new TextDecoder(`utf-8`,{fatal:!0});return(async()=>{try{for(;;){let{done:e,value:i}=await n.read();if(e){try{let e=r.decode();e.length>0&&t.next(e)}catch{}t.return(void 0);break}try{let e=r.decode(i,{stream:!0});e.length>0&&t.next(e)}catch{t.next({$b64:Za(i)})}}}catch(e){t.throw(e)}finally{n.releaseLock()}})(),t}var co=Gi({tag:`tss/RawStream`,extends:[Gi({tag:`tss/RawStreamFactory`,test(e){return e===$a},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return io},deserialize(e,t,n){return $a}}),Gi({tag:`tss/RawStreamFactoryText`,test(e){return e===eo},parse:{sync(e,t,n){return{}},async async(e,t,n){return{}},stream(e,t,n){return{}}},serialize(e,t,n){return ao},deserialize(e,t,n){return eo}})],test(e){return e instanceof Ja},parse:{sync(e,t,n){let r=e.hint===`text`?eo:$a;return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(ii())}},async async(e,t,n){let r=e.hint===`text`?eo:$a,i=e.hint===`text`?so(e.stream):oo(e.stream);return{hint:await t.parse(e.hint),factory:await t.parse(r),stream:await t.parse(i)}},stream(e,t,n){let r=e.hint===`text`?eo:$a,i=e.hint===`text`?so(e.stream):oo(e.stream);return{hint:t.parse(e.hint),factory:t.parse(r),stream:t.parse(i)}}},serialize(e,t,n){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t,n){let r=t.deserialize(e.stream);return t.deserialize(e.hint)===`text`?ro(r):to(r)}});function lo(e){return Gi({tag:`tss/RawStream`,test:()=>!1,parse:{},serialize(){throw Error(`RawStreamDeserializePlugin.serialize should not be called. Client only deserializes.`)},deserialize(t,n,r){return e(typeof n?.deserialize==`function`?n.deserialize(t.streamId):t.streamId)}})}var uo=Gi({tag:`$TSR/Error`,test(e){return e instanceof Error},parse:{sync(e,t){return{message:t.parse(e.message)}},async async(e,t){return{message:await t.parse(e.message)}},stream(e,t){return{message:t.parse(e.message)}}},serialize(e,t){return`new Error(`+t.serialize(e.message)+`)`},deserialize(e,t){return Error(t.deserialize(e.message))}}),U={},fo=e=>new ReadableStream({start:t=>{e.on({next:e=>{try{t.enqueue(e)}catch{}},throw:e=>{t.error(e)},return:()=>{try{t.close()}catch{}}})}}),po=Gi({tag:`seroval-plugins/web/ReadableStreamFactory`,test(e){return e===U},parse:{sync(){return U},async async(){return await Promise.resolve(U)},stream(){return U}},serialize(){return fo.toString()},deserialize(){return U}});function mo(e){let t=ii(),n=e.getReader();async function r(){try{let e=await n.read();e.done?t.return(e.value):(t.next(e.value),await r())}catch(e){t.throw(e)}}return r().catch(()=>{}),t}var ho=[uo,co,Gi({tag:`seroval/plugins/web/ReadableStream`,extends:[po],test(e){return typeof ReadableStream>`u`?!1:e instanceof ReadableStream},parse:{sync(e,t){return{factory:t.parse(U),stream:t.parse(ii())}},async async(e,t){return{factory:await t.parse(U),stream:await t.parse(mo(e))}},stream(e,t){return{factory:t.parse(U),stream:t.parse(mo(e))}}},serialize(e,t){return`(`+t.serialize(e.factory)+`)(`+t.serialize(e.stream)+`)`},deserialize(e,t){return fo(t.deserialize(e.stream))}})];function go(){return[...(_()?.serializationAdapters)?.map(qa)??[],...ho]}var _o=new TextDecoder,vo=new Uint8Array,yo=16*1024*1024,bo=32*1024*1024,xo=1024,So=1e5;function Co(e){let t=new Map,n=new Map,r=new Set,i=!1,a=null,o=0,s,c=new ReadableStream({start(e){s=e},cancel(){i=!0;try{a?.cancel()}catch{}t.forEach(e=>{try{e.error(Error(`Framed response cancelled`))}catch{}}),t.clear(),n.clear(),r.clear()}});function l(e){let i=n.get(e);if(i)return i;if(r.has(e))return new ReadableStream({start(e){e.close()}});if(n.size>=xo)throw Error(`Too many raw streams in framed response (max ${xo})`);let a=new ReadableStream({start(n){t.set(e,n)},cancel(){r.add(e),t.delete(e),n.delete(e)}});return n.set(e,a),a}function u(e){return l(e),t.get(e)}return(async()=>{let n=e.getReader();a=n;let c=[],l=0;function d(){if(l<9)return null;let e=c[0];if(e.length>=9)return{type:e[0],streamId:(e[1]<<24|e[2]<<16|e[3]<<8|e[4])>>>0,length:(e[5]<<24|e[6]<<16|e[7]<<8|e[8])>>>0};let t=new Uint8Array(9),n=0,r=9;for(let e=0;e<c.length&&r>0;e++){let i=c[e],a=Math.min(i.length,r);t.set(i.subarray(0,a),n),n+=a,r-=a}return{type:t[0],streamId:(t[1]<<24|t[2]<<16|t[3]<<8|t[4])>>>0,length:(t[5]<<24|t[6]<<16|t[7]<<8|t[8])>>>0}}function f(e){if(e===0)return vo;let t=new Uint8Array(e),n=0,r=e;for(;r>0&&c.length>0;){let e=c[0];if(!e)break;let i=Math.min(e.length,r);t.set(e.subarray(0,i),n),n+=i,r-=i,i===e.length?c.shift():c[0]=e.subarray(i)}return l-=e,t}try{for(;;){let{done:e,value:a}=await n.read();if(i||e)break;if(a){if(l+a.length>bo)throw Error(`Framed response buffer exceeded ${bo} bytes`);for(c.push(a),l+=a.length;;){let e=d();if(!e)break;let{type:n,streamId:i,length:a}=e;if(n!==p.JSON&&n!==p.CHUNK&&n!==p.END&&n!==p.ERROR)throw Error(`Unknown frame type: ${n}`);if(n===p.JSON){if(i!==0)throw Error(`Invalid JSON frame streamId (expected 0)`)}else if(i===0)throw Error(`Invalid raw frame streamId (expected non-zero)`);if(a>yo)throw Error(`Frame payload too large: ${a} bytes (max ${yo})`);let c=9+a;if(l<c)break;if(++o>So)throw Error(`Too many frames in framed response (max ${So})`);f(9);let m=f(a);switch(n){case p.JSON:try{s.enqueue(_o.decode(m))}catch{}break;case p.CHUNK:{let e=u(i);e&&e.enqueue(m);break}case p.END:{let e=u(i);if(r.add(i),e){try{e.close()}catch{}t.delete(i)}break}case p.ERROR:{let e=u(i);if(r.add(i),e){let n=_o.decode(m);e.error(Error(n)),t.delete(i)}break}}}}}if(l!==0)throw Error(`Incomplete frame at end of framed response`);try{s.close()}catch{}t.forEach(e=>{try{e.close()}catch{}}),t.clear()}catch(e){try{s.error(e)}catch{}t.forEach(t=>{try{t.error(e)}catch{}}),t.clear()}finally{try{n.releaseLock()}catch{}a=null}})(),{getOrCreateStream:l,jsonChunks:c}}var wo=null;async function To(e){e.length>0&&await Promise.allSettled(e)}var Eo=Object.prototype.hasOwnProperty;function Do(e){for(let t in e)if(Eo.call(e,t))return!0;return!1}async function Oo(e,t,n){wo||=go();let r=t[0],i=r.fetch??n,a=r.data instanceof FormData?`formData`:`payload`,o=r.headers?new Headers(r.headers):new Headers;if(o.set(`x-tsr-serverFn`,`true`),a===`payload`&&o.set(`accept`,`${f}, application/x-ndjson, application/json`),r.method===`GET`){if(a===`formData`)throw Error(`FormData is not supported with GET requests`);let t=await ko(r);if(t!==void 0){let n=Xe({payload:t});e.includes(`?`)?e+=`&${n}`:e+=`?${n}`}}let s;if(r.method===`POST`){let e=await jo(r);e?.contentType&&o.set(`content-type`,e.contentType),s=e?.body}return await Mo(async()=>i(e,{method:r.method,headers:o,signal:r.signal,body:s}))}async function ko(e){let t=!1,n={};if(e.data!==void 0&&(t=!0,n.data=e.data),e.context&&Do(e.context)&&(t=!0,n.context=e.context),t)return Ao(n)}async function Ao(e){return JSON.stringify(await Promise.resolve(Ga(e,{plugins:wo})))}async function jo(e){if(e.data instanceof FormData){let t;return e.context&&Do(e.context)&&(t=await Ao(e.context)),t!==void 0&&e.data.set(u,t),{body:e.data}}let t=await ko(e);if(t)return{body:t,contentType:`application/json`}}async function Mo(e){let t;try{t=await e()}catch(e){if(e instanceof Response)t=e;else throw console.log(e),e}if(t.headers.get(`x-tss-raw`)===`true`)return t;let n=t.headers.get(`content-type`);if(n||V(),t.headers.get(`x-tss-serialized`)){let e;if(n.includes(`application/x-tss-framed`)){if(g(n),!t.body)throw Error(`No response body for framed response`);let{getOrCreateStream:r,jsonChunks:i}=Co(t.body),a=[lo(r),...wo||[]],o=new Map;e=await No({jsonStream:i,onMessage:e=>Wa(e,{refs:o,plugins:a}),onError(e,t){console.error(e,t)}})}else if(n.includes(`application/json`)){let n=await t.json(),r=[];try{e=Wa(n,{plugins:wo})}finally{}await To(r)}if(e||V(),e instanceof Error)throw e;return e}if(n.includes(`application/json`)){let e=await t.json(),n=ot(e);if(n)throw n;if(ze(e))throw e;return e}if(!t.ok)throw Error(await t.text());return t}async function No({jsonStream:e,onMessage:t,onError:n}){let r=e.getReader(),{value:i,done:a}=await r.read();if(a||!i)throw Error(`Stream ended before first object`);let o=JSON.parse(i),s=!1,c=(async()=>{try{for(;;){let{value:e,done:i}=await r.read();if(i)break;if(e)try{let n=[];try{t(JSON.parse(e))}finally{}await To(n)}catch(t){n?.(`Invalid JSON: ${e}`,t)}}}catch(e){s||n?.(`Stream processing error:`,e)}})(),l,u=[];try{l=t(o)}catch(e){throw s=!0,r.cancel().catch(()=>{}),e}return await To(u),Promise.resolve(l).catch(()=>{s=!0,r.cancel().catch(()=>{})}),c.finally(()=>{try{r.releaseLock()}catch{}}),l}function Po(e){let t=`/_serverFn/`+e;return Object.assign((...e)=>{let n=_()?.serverFns?.fetch;return Oo(t,e,n??fetch)},{url:t,serverFnMeta:{id:e},[d]:!0})}var Fo=Ka({key:`$TSS/serverfn`,test:e=>typeof e!=`function`||!(d in e)?!1:!!e[d],toSerializable:({serverFnMeta:e})=>({functionId:e.id}),fromSerializable:({functionId:e})=>Po(e)});function Io(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`)}function Lo(e,t){e.id=t.i,e.__beforeLoadContext=t.b,e.loaderData=t.l,e.status=t.s,e.ssr=t.ssr,e.updatedAt=t.u,e.error=t.e,t.g!==void 0&&(e.globalNotFound=t.g)}async function Ro(e){window.$_TSR||V();let t=e.options.serializationAdapters;if(t?.length){let e=new Map;t.forEach(t=>{e.set(t.key,t.fromSerializable)}),window.$_TSR.t=e,window.$_TSR.buffer.forEach(e=>e())}window.$_TSR.initialized=!0,window.$_TSR.router||V();let n=window.$_TSR.router;n.matches.forEach(e=>{e.i=Io(e.i)}),n.lastMatchId&&=Io(n.lastMatchId);let{manifest:r,dehydratedData:i,lastMatchId:a}=n;e.ssr={manifest:r};let o=document.querySelector(`meta[property="csp-nonce"]`)?.content;e.options.ssr={nonce:o};let s=e.matchRoutes(e.stores.location.get()),c=Promise.all(s.map(t=>e.loadRouteChunk(e.looseRoutesById[t.routeId])));function l(t){let n=e.looseRoutesById[t.routeId].options.pendingMinMs??e.options.defaultPendingMinMs;if(n){let r=M();t._nonReactive.minPendingPromise=r,t._forcePending=!0,setTimeout(()=>{r.resolve(),e.updateMatch(t.id,e=>(e._nonReactive.minPendingPromise=void 0,{...e,_forcePending:void 0}))},n)}}function u(t){let n=e.looseRoutesById[t.routeId];n&&(n.options.ssr=t.ssr)}let d;s.forEach(e=>{let t=n.matches.find(t=>t.i===e.id);if(!t){e._nonReactive.dehydrated=!1,e.ssr=!1,u(e);return}Lo(e,t),u(e),e._nonReactive.dehydrated=e.ssr!==!1,(e.ssr===`data-only`||e.ssr===!1)&&d===void 0&&(d=e.index,l(e))}),e.stores.setMatches(s),await e.options.hydrate?.(i);let f=e.stores.matches.get(),p=e.stores.location.get();await Promise.all(f.map(async t=>{try{let n=e.looseRoutesById[t.routeId],r=f[t.index-1]?.context??e.options.context;if(n.options.context){let i={deps:t.loaderDeps,params:t.params,context:r??{},location:p,navigate:t=>e.navigate({...t,_fromLocation:p}),buildLocation:e.buildLocation,cause:t.cause,abortController:t.abortController,preload:!1,matches:s,routeId:n.id};t.__routeContext=n.options.context(i)??void 0}t.context={...r,...t.__routeContext,...t.__beforeLoadContext};let i={ssr:e.options.ssr,matches:f,match:t,params:t.params,loaderData:t.loaderData},a=await n.options.head?.(i),o=await n.options.scripts?.(i);t.meta=a?.meta,t.links=a?.links,t.headScripts=a?.scripts,t.styles=a?.styles,t.scripts=o}catch(e){if(ze(e))t.error={isNotFound:!0},console.error(`NotFound error during hydration for routeId: ${t.routeId}`,e);else throw t.error=e,console.error(`Error during hydration for route ${t.routeId}:`,e),e}}));let m=s[s.length-1].id!==a;if(!s.some(e=>e.ssr===!1)&&!m)return s.forEach(e=>{e._nonReactive.dehydrated=void 0}),e.stores.resolvedLocation.set(e.stores.location.get()),c;let h=Promise.resolve().then(()=>e.load()).catch(e=>{console.error(`Error during router hydration:`,e)});if(m){let t=s[1];t||V(),l(t),t._displayPending=!0,t._nonReactive.displayPendingPromise=h,h.then(()=>{e.batch(()=>{e.stores.status.get()===`pending`&&(e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())),e.updateMatch(t.id,e=>({...e,_displayPending:void 0,displayPendingPromise:void 0}))})})}return c}var zo=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(){}},Bo=new class extends zo{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},Vo={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ho=new class{#e=Vo;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Uo(e){setTimeout(e,0)}var Wo=typeof window>`u`||`Deno`in globalThis;function Go(){}function Ko(e,t){return typeof e==`function`?e(t):e}function qo(e){return typeof e==`number`&&e>=0&&e!==1/0}function Jo(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Yo(e,t){return typeof e==`function`?e(t):e}function Xo(e,t){return typeof e==`function`?e(t):e}function Zo(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==$o(o,t.options))return!1}else if(!ts(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Qo(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(es(t.options.mutationKey)!==es(a))return!1}else if(!ts(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function $o(e,t){return(t?.queryKeyHashFn||es)(e)}function es(e){return JSON.stringify(e,(e,t)=>os(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function ts(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>ts(e[n],t[n])):!1}var ns=Object.prototype.hasOwnProperty;function rs(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=as(e)&&as(t);if(!r&&!(os(e)&&os(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ns.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=rs(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function is(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function as(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function os(e){if(!ss(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!ss(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function ss(e){return Object.prototype.toString.call(e)===`[object Object]`}function cs(e){return new Promise(t=>{Ho.setTimeout(t,e)})}function ls(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:rs(e,t)}function us(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function ds(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var fs=Symbol();function ps(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===fs?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ms(e,t){return typeof e==`function`?e(...t):!!e}function hs(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var gs=(()=>{let e=()=>Wo;return{isServer(){return e()},setIsServer(t){e=t}}})();function _s(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}function vs(e){let t;if(e.then(e=>(t=e,e),Go)?.catch(Go),t!==void 0)return{data:t}}function ys(e){return e}function bs(e,t,n){if(typeof t!=`object`||!t)return;let r=e.getMutationCache(),i=e.getQueryCache(),a=n?.defaultOptions?.deserializeData??e.getDefaultOptions().hydrate?.deserializeData??ys,o=t.mutations||[],s=t.queries||[];o.forEach(({state:t,...i})=>{r.build(e,{...e.getDefaultOptions().hydrate?.mutations,...n?.defaultOptions?.mutations,...i},t)}),s.forEach(({queryKey:t,state:r,queryHash:o,meta:s,promise:c,dehydratedAt:l})=>{let u=c?vs(c):void 0,d=r.data===void 0?u?.data:r.data,f=d===void 0?d:a(d),p=i.get(o),m=p?.state.status===`pending`,h=p?.state.fetchStatus===`fetching`;if(p){let e=u&&l!==void 0&&l>p.state.dataUpdatedAt;if(r.dataUpdatedAt>p.state.dataUpdatedAt||e){let{fetchStatus:e,...t}=r;p.setState({...t,data:f})}}else p=i.build(e,{...e.getDefaultOptions().hydrate?.queries,...n?.defaultOptions?.queries,queryKey:t,queryHash:o,meta:s},{...r,data:f,fetchStatus:`idle`,status:f===void 0?r.status:`success`});c&&!m&&!h&&(l===void 0||l>p.state.dataUpdatedAt)&&p.fetch(void 0,{initialPromise:Promise.resolve(c).then(a)}).catch(Go)})}var xs=Uo;function Ss(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=xs,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var Cs=Ss(),ws=new class extends zo{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function Ts(e){return Math.min(1e3*2**e,3e4)}function Es(e){return(e??`online`)===`online`?ws.isOnline():!0}var Ds=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Os(e){let t=!1,n=0,r,i=_s(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Ds(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Bo.isFocused()&&(e.networkMode===`always`||ws.isOnline())&&e.canRun(),u=()=>Es(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(gs.isServer()?0:3),o=e.retryDelay??Ts,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),cs(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var ks=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qo(this.gcTime)&&(this.#e=Ho.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(gs.isServer()?1/0:300*1e3))}clearGcTimeout(){this.#e!==void 0&&(Ho.clearTimeout(this.#e),this.#e=void 0)}},As=class extends ks{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ns(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ns(this.options);e.data!==void 0&&(this.setState(Ms(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=ls(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#c({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(Go).catch(Go):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#e}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Xo(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fs||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Yo(e.options.staleTime,this)===`static`):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!Jo(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o||this.#s()?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#s(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=ps(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Os({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Ds&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Ds){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...js(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ms(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),Cs.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function js(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Es(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ms(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ns(e){let 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`}}function Ps(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{hs(e,()=>t.signal,()=>n=!0)},u=ps(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=await u((()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})()),{maxPages:o}=t.options,s=i?ds:us;return{pages:s(e.pages,a,o),pageParams:s(e.pageParams,r,o)}};if(i&&a.length){let e=i===`backward`,t=e?Is:Fs,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Fs(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.options.persister?t.fetchFn=()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function Fs(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Is(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ls=class extends ks{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Rs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Os({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),Cs.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Rs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var zs=class extends zo{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ls({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Bs(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Bs(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Bs(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}else return!0}runNext(e){let t=Bs(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Cs.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Qo(t,e))}findAll(e={}){return this.getAll().filter(t=>Qo(e,t))}notify(e){Cs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Cs.batch(()=>Promise.all(e.map(e=>e.continue().catch(Go))))}};function Bs(e){return e.options.scope?.id}var Vs=class extends zo{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??$o(r,t),a=this.get(i);return a||(a=new As({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Cs.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Zo(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>Zo(e,t)):t}notify(e){Cs.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Cs.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Cs.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Hs=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Vs,this.#t=e.mutationCache||new zs,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Bo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=ws.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Yo(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=Ko(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Cs.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Cs.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Cs.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Cs.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Go).catch(Go)}invalidateQueries(e,t={}){return Cs.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Cs.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Go)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Go)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Yo(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Go).catch(Go)}fetchInfiniteQuery(e){return e.behavior=Ps(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Go).catch(Go)}ensureInfiniteQueryData(e){return e.behavior=Ps(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return ws.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(es(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{ts(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(es(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{ts(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=$o(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.queryFn===fs&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Us=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Ws=t(((e,t)=>{t.exports=Us()})),W=e(r(),1),G=Ws(),Gs=W.createContext(void 0),Ks=e=>{let t=W.useContext(Gs);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},qs=({client:e,children:t})=>(W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(Gs.Provider,{value:e,children:t})),Js=W.use,Ys=typeof window<`u`?W.useLayoutEffect:W.useEffect;function Xs(e){let t=W.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Zs(e,t,n={},r={}){W.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function Qs(e){let t=W.useRef(null);return W.useImperativeHandle(e,()=>t.current,[]),t}function $s({promise:e}){if(Js)return Js(e);let t=an(e);if(t[rn].status===`pending`)throw t;if(t[rn].status===`error`)throw t[rn].error;return t[rn].data}function ec(e){let t=(0,G.jsx)(tc,{...e});return e.fallback?(0,G.jsx)(W.Suspense,{fallback:e.fallback,children:t}):t}function tc(e){let t=$s(e);return e.children(t)}function nc(e){let t=e.errorComponent??ic;return(0,G.jsx)(rc,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?W.createElement(t,{error:n,reset:r}):e.children})}var rc=class extends W.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function ic({error:e}){let[t,n]=W.useState(!1);return(0,G.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,G.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,G.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,G.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,G.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,G.jsx)(`div`,{children:(0,G.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,G.jsx)(`code`,{children:e.message}):null})}):null]})}function ac({children:e,fallback:t=null}){return oc()?(0,G.jsx)(W.Fragment,{children:e}):(0,G.jsx)(W.Fragment,{children:t})}function oc(){return W.useSyncExternalStore(sc,()=>!0,()=>!1)}function sc(){return()=>{}}var cc=W.createContext(null);function lc(e){return W.useContext(cc)}var uc=W.createContext(void 0),dc=W.createContext(void 0),fc=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(fc||{});function pc({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function mc(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var hc=[],gc=0,{link:_c,unlink:vc,propagate:yc,checkDirty:bc,shallowPropagate:xc}=pc({update(e){return e._update()},notify(e){hc[Cc++]=e,e.flags&=~fc.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=fc.Mutable|fc.Dirty,Dc(e))}}),Sc=0,Cc=0,wc,Tc=0;function Ec(e){try{++Tc,e()}finally{--Tc||Oc()}}function Dc(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=vc(n,e)}function Oc(){if(!(Tc>0)){for(;Sc<Cc;){let e=hc[Sc];hc[Sc++]=void 0,e.notify()}Sc=0,Cc=0}}function kc(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?fc.None:fc.Mutable,get(){return wc!==void 0&&_c(i,wc,gc),i._snapshot},subscribe(e){let t=mc(e),n={current:!1},r=Ac(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=wc,o=t?.compare??Object.is;if(n)wc=i,++gc,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=fc.Mutable|fc.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{wc=a,n&&(i.flags&=~fc.RecursedCheck),Dc(i)}}};return n?(i.flags=fc.Mutable|fc.Dirty,i.get=function(){let e=i.flags;if(e&fc.Dirty||e&fc.Pending&&bc(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&xc(e)}}else e&fc.Pending&&(i.flags=e&~fc.Pending);return wc!==void 0&&_c(i,wc,gc),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(yc(e),xc(e),Oc())}},i}function Ac(e){let t=()=>{let t=wc;wc=n,++gc,n.depsTail=void 0,n.flags=fc.Watching|fc.RecursedCheck;try{return e()}finally{wc=t,n.flags&=~fc.RecursedCheck,Dc(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:fc.Watching|fc.RecursedCheck,notify(){let e=this.flags;e&fc.Dirty||e&fc.Pending&&bc(this.deps,this)?t():this.flags=fc.Watching},stop(){this.flags=fc.None,this.depsTail=void 0,Dc(this)}};return t(),n}var jc=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Mc=t(((e,t)=>{t.exports=jc()})),Nc=t((e=>{var t=r(),n=Mc();function i(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var a=typeof Object.is==`function`?Object.is:i,o=n.useSyncExternalStore,s=t.useRef,c=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=s(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!o){if(o=!0,s=e,e=r(e),i!==void 0&&f.hasValue){var t=f.value;if(i(t,e))return c=t}return c=e}if(t=c,a(s,e))return t;var n=r(e);return i!==void 0&&i(t,n)?(s=e,t):(s=e,c=n)}var o=!1,s,c,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,i]);var p=o(e,d[0],d[1]);return c(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),Pc=t(((e,t)=>{t.exports=Nc()})),Fc=Pc();function Ic(e,t){return e===t}function K(e,t,n=Ic){let r=(0,W.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,W.useCallback)(()=>e?.get(),[e]);return(0,Fc.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Lc={get:()=>void 0,subscribe:()=>({unsubscribe:()=>{}})};function Rc(e){let t=lc(),n=W.useContext(e.from?dc:uc),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,a=W.useRef(void 0);return K(i??Lc,n=>{if((e.shouldThrow??!0)&&!n&&V(),n===void 0)return;let r=e.select?e.select(n):n;if(e.structuralSharing??t.options.defaultStructuralSharing){let e=E(a.current,r);return a.current=e,e}return r})}function zc(e){return Rc({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Bc(e){let{select:t,...n}=e;return Rc({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Vc(e){return Rc({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Hc(e){return Rc({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Uc(e){let t=lc();return W.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Wc(e){return Rc({...e,select:t=>e.select?e.select(t.context):t.context})}var Gc=e(s(),1);function Kc(e,t){let n=lc(),r=Qs(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:x,onClick:S,onBlur:C,onFocus:w,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:k,params:A,search:M,hash:N,state:P,mask:F,reloadDocument:ee,unsafeRelative:I,from:te,_fromLocation:ne,...re}=e,R=oc(),z=W.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),B=K(n.stores.location,e=>e,(e,t)=>e.href===t.href),V=W.useMemo(()=>{let e={_fromLocation:B,...z};return n.buildLocation(e)},[n,B,z]),ie=V.maskedLocation?V.maskedLocation.publicHref:V.publicHref,ae=V.maskedLocation?V.maskedLocation.external:V.external,oe=W.useMemo(()=>tl(ie,ae,n.history,v),[v,ae,ie,n.history]),se=W.useMemo(()=>{if(oe?.external)return L(oe.href,n.protocolAllowlist)?void 0:oe.href;if(!nl(s)&&!(typeof s!=`string`||s.indexOf(`:`)===-1))try{return new URL(s),L(s,n.protocolAllowlist)?void 0:s}catch{}},[s,oe,n.protocolAllowlist]),ce=W.useMemo(()=>{if(se)return!1;if(o?.exact){if(!Ne(B.pathname,V.pathname,n.basepath))return!1}else{let e=Me(B.pathname,n.basepath),t=Me(V.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!j(B.search,V.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?R&&B.hash===V.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,B,se,R,V.hash,V.pathname,V.search,n.basepath]),le=ce?b(i,{})??Jc:qc,ue=ce?qc:b(a,{})??qc,de=[x,le.className,ue.className].filter(Boolean).join(` `),fe=(y||le.style||ue.style)&&{...y,...le.style,...ue.style},[pe,me]=W.useState(!1),he=W.useRef(!1),ge=e.reloadDocument||se?!1:c??n.options.defaultPreload,_e=l??n.options.defaultPreloadDelay??0,ve=W.useCallback(()=>{n.preloadRoute({...z,_builtLocation:V}).catch(e=>{console.warn(e),console.warn(on)})},[n,z,V]);Zs(r,W.useCallback(e=>{e?.isIntersecting&&ve()},[ve]),$c,{disabled:!!v||ge!==`viewport`}),W.useEffect(()=>{he.current||!v&&ge===`render`&&(ve(),he.current=!0)},[v,ve,ge]);let ye=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;if(!v&&!il(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Gc.flushSync)(()=>{me(!0)});let t=n.subscribe(`onResolved`,()=>{t(),me(!1)});n.navigate({...z,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:k})}};if(se)return{...re,ref:r,href:se,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...x&&{className:x},...S&&{onClick:S},...C&&{onBlur:C},...w&&{onFocus:w},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let be=e=>{if(v||ge!==`intent`)return;if(!_e){ve();return}let t=e.currentTarget;if(Qc.has(t))return;let n=setTimeout(()=>{Qc.delete(t),ve()},_e);Qc.set(t,n)},xe=e=>{v||ge!==`intent`||ve()},Se=e=>{if(v||!ge||!_e)return;let t=e.currentTarget,n=Qc.get(t);n&&(clearTimeout(n),Qc.delete(t))};return{...re,...le,...ue,href:oe?.href,ref:r,onClick:el([S,ye]),onBlur:el([C,Se]),onFocus:el([w,be]),onMouseEnter:el([E,be]),onMouseLeave:el([D,Se]),onTouchStart:el([O,xe]),disabled:!!v,target:_,...fe&&{style:fe},...de&&{className:de},...v&&Yc,...ce&&Xc,...R&&pe&&Zc}}var qc={},Jc={className:`active`},Yc={role:`link`,"aria-disabled":!0},Xc={"data-status":`active`,"aria-current":`page`},Zc={"data-transitioning":`transitioning`},Qc=new WeakMap,$c={rootMargin:`100px`},el=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function tl(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function nl(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var rl=W.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Kc(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return W.createElement(`a`,t,o)}return W.createElement(n,a,o)});function il(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var al=class extends ln{constructor(e){super(e),this.useMatch=e=>Rc({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Wc({...e,from:this.id}),this.useSearch=e=>Hc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Vc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Bc({...e,from:this.id}),this.useLoaderData=e=>zc({...e,from:this.id}),this.useNavigate=()=>Uc({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(rl,{ref:t,from:this.fullPath,...e}))}};function ol(e){return new al(e)}var sl=class extends un{constructor(e){super(e),this.useMatch=e=>Rc({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Wc({...e,from:this.id}),this.useSearch=e=>Hc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Vc({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Bc({...e,from:this.id}),this.useLoaderData=e=>zc({...e,from:this.id}),this.useNavigate=()=>Uc({from:this.fullPath}),this.Link=W.forwardRef((e,t)=>(0,G.jsx)(rl,{ref:t,from:this.fullPath,...e}))}};function cl(e){return new sl(e)}function ll(e){return new ul(e,{silent:!0}).createRoute}var ul=class{constructor(e,t){this.path=e,this.createRoute=e=>{let t=ol(e);return t.isRoot=!1,t},this.silent=t?.silent}};function dl(e,t){let n,r,i,a,o=()=>(n||=e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{if(i=e,N(i)&&i instanceof Error&&typeof window<`u`&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;sessionStorage.getItem(e)||(sessionStorage.setItem(e,`1`),a=!0)}}),n),s=function(e){if(a)throw window.location.reload(),new Promise(()=>{});if(i)throw i;if(!r)if(Js)Js(o());else throw o();return W.createElement(r,e)};return s.preload=o,s}function fl(e){let t=lc(),n=`not-found-${K(t.stores.location,e=>e.pathname)}-${K(t.stores.status,e=>e)}`;return(0,G.jsx)(nc,{getResetKey:()=>n,onCatch:(t,n)=>{if(ze(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(ze(t))return e.fallback?.(t);throw t},children:e.children})}function pl(){return(0,G.jsx)(`p`,{children:`Not Found`})}function ml(e){return(0,G.jsx)(G.Fragment,{children:e.children})}function hl(e,t,n){return t.options.notFoundComponent?(0,G.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,G.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,G.jsx)(pl,{})}var gl=W.memo(function({matchId:e}){let t=lc(),n=t.stores.matchStores.get(e);n||V();let r=K(t.stores.loadedAt,e=>e),i=K(n,e=>e);return(0,G.jsx)(_l,{router:t,matchId:e,resetKey:r,matchState:W.useMemo(()=>{let e=i.routeId,n=t.routesById[e].parentRoute?.id;return{routeId:e,ssr:i.ssr,_displayPending:i._displayPending,parentRouteId:n}},[i._displayPending,i.routeId,i.ssr,t.routesById])})});function _l({router:e,matchId:t,resetKey:n,matchState:r}){let i=e.routesById[r.routeId],a=i.options.pendingComponent??e.options.defaultPendingComponent,o=a?(0,G.jsx)(a,{}):null,s=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,l=i.isRoot?i.options.notFoundComponent??e.options.notFoundRoute?.options.component:i.options.notFoundComponent,u=r.ssr===!1||r.ssr===`data-only`,d=(!i.isRoot||i.options.wrapInSuspense||u)&&(i.options.wrapInSuspense??a??(i.options.errorComponent?.preload||u))?W.Suspense:ml,f=s?nc:ml,p=l?fl:ml;return(0,G.jsxs)(i.isRoot?i.options.shellComponent??ml:ml,{children:[(0,G.jsx)(uc.Provider,{value:t,children:(0,G.jsx)(d,{fallback:o,children:(0,G.jsx)(f,{getResetKey:()=>n,errorComponent:s||ic,onCatch:(e,t)=>{if(ze(e))throw e.routeId??=r.routeId,e;c?.(e,t)},children:(0,G.jsx)(p,{fallback:e=>{if(e.routeId??=r.routeId,!l||e.routeId&&e.routeId!==r.routeId||!e.routeId&&!i.isRoot)throw e;return W.createElement(l,e)},children:u||r._displayPending?(0,G.jsx)(ac,{fallback:o,children:(0,G.jsx)(yl,{matchId:t})}):(0,G.jsx)(yl,{matchId:t})})})})}),r.parentRouteId===`__root__`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(vl,{resetKey:n}),(e.options.scrollRestoration,null)]}):null]})}function vl({resetKey:e}){let t=lc(),n=W.useRef(void 0);return Ys(()=>{let e=t.latestLocation.href;(n.current===void 0||n.current!==e)&&(t.emit({type:`onRendered`,...Kt(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=e)},[t.latestLocation.state.__TSR_key,e,t]),null}var yl=W.memo(function({matchId:e}){let t=lc(),n=(e,n)=>t.getMatch(e.id)?._nonReactive[n]??e._nonReactive[n],r=t.stores.matchStores.get(e);r||V();let i=K(r,e=>e),a=i.routeId,o=t.routesById[a],s=W.useMemo(()=>{let e=(t.routesById[a].options.remountDeps??t.options.defaultRemountDeps)?.({routeId:a,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return e?JSON.stringify(e):void 0},[a,i.loaderDeps,i._strictParams,i._strictSearch,t.options.defaultRemountDeps,t.routesById]),c=W.useMemo(()=>{let e=o.options.component??t.options.defaultComponent;return e?(0,G.jsx)(e,{},s):(0,G.jsx)(bl,{})},[s,o.options.component,t.options.defaultComponent]);if(i._displayPending)throw n(i,`displayPendingPromise`);if(i._forcePending)throw n(i,`minPendingPromise`);if(i.status===`pending`){let e=o.options.pendingMinMs??t.options.defaultPendingMinMs;if(e){let n=t.getMatch(i.id);if(n&&!n._nonReactive.minPendingPromise){let t=M();n._nonReactive.minPendingPromise=t,setTimeout(()=>{t.resolve(),n._nonReactive.minPendingPromise=void 0},e)}}throw n(i,`loadPromise`)}if(i.status===`notFound`)return ze(i.error)||V(),hl(t,o,i.error);if(i.status===`redirected`)throw at(i.error)||V(),n(i,`loadPromise`);if(i.status===`error`)throw i.error;return c}),bl=W.memo(function(){let e=lc(),t=W.useContext(uc),n,r=!1,i;{let a=t?e.stores.matchStores.get(t):void 0;[n,r]=K(a,e=>[e?.routeId,e?.globalNotFound??!1]),i=K(e.stores.matchesId,e=>e[e.findIndex(e=>e===t)+1])}let a=n?e.routesById[n]:void 0,o=e.options.defaultPendingComponent?(0,G.jsx)(e.options.defaultPendingComponent,{}):null;if(r)return a||V(),hl(e,a,void 0);if(!i)return null;let s=(0,G.jsx)(gl,{matchId:i});return n===`__root__`?(0,G.jsx)(W.Suspense,{fallback:o,children:s}):s});function xl(){let e=lc(),t=W.useRef({router:e,mounted:!1}),[n,r]=W.useState(!1),i=K(e.stores.isLoading,e=>e),a=K(e.stores.hasPending,e=>e),o=Xs(i),s=i||n||a,c=Xs(s),l=i||a,u=Xs(l);return e.startTransition=e=>{r(!0),W.startTransition(()=>{e(),r(!1)})},W.useEffect(()=>{let t=e.history.subscribe(e.load),n=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ae(e.latestLocation.publicHref)!==Ae(n.publicHref)&&e.commitLocation({...n,replace:!0}),()=>{t()}},[e,e.history]),Ys(()=>{typeof window<`u`&&e.ssr||t.current.router===e&&t.current.mounted||(t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(e){console.error(e)}})())},[e]),Ys(()=>{o&&!i&&e.emit({type:`onLoad`,...Kt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[o,e,i]),Ys(()=>{u&&!l&&e.emit({type:`onBeforeRouteMount`,...Kt(e.stores.location.get(),e.stores.resolvedLocation.get())})},[l,u,e]),Ys(()=>{if(c&&!s){let t=Kt(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:`onResolved`,...t}),Ec(()=>{e.stores.status.set(`idle`),e.stores.resolvedLocation.set(e.stores.location.get())}),t.hrefChanged&&dn(e)}},[s,c,e]),null}function Sl(){let e=lc(),t=e.routesById.__root__.options.pendingComponent??e.options.defaultPendingComponent,n=t?(0,G.jsx)(t,{}):null,r=(0,G.jsxs)(typeof document<`u`&&e.ssr?ml:W.Suspense,{fallback:n,children:[(0,G.jsx)(xl,{}),(0,G.jsx)(Cl,{})]});return e.options.InnerWrap?(0,G.jsx)(e.options.InnerWrap,{children:r}):r}function Cl(){let e=lc(),t=K(e.stores.firstId,e=>e),n=K(e.stores.loadedAt,e=>e),r=t?(0,G.jsx)(gl,{matchId:t}):null;return(0,G.jsx)(uc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:(0,G.jsx)(nc,{getResetKey:()=>n,errorComponent:ic,onCatch:void 0,children:r})})}var wl=e=>({createMutableStore:kc,createReadonlyStore:kc,batch:Ec}),Tl=e=>new El(e),El=class extends qt{constructor(e){super(e,wl)}};function Dl({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,G.jsx)(cc.Provider,{value:e,children:t});return e.options.Wrap?(0,G.jsx)(e.options.Wrap,{children:r}):r}function Ol({router:e,...t}){return(0,G.jsx)(Dl,{router:e,...t,children:(0,G.jsx)(Sl,{})})}function kl({tag:e,attrs:t,children:n,nonce:r}){switch(e){case`title`:return(0,G.jsx)(`title`,{...t,suppressHydrationWarning:!0,children:n});case`meta`:return(0,G.jsx)(`meta`,{...t,suppressHydrationWarning:!0});case`link`:return(0,G.jsx)(`link`,{...t,precedence:t?.precedence??(t?.rel===`stylesheet`?`default`:void 0),nonce:r,suppressHydrationWarning:!0});case`style`:return(0,G.jsx)(`style`,{...t,dangerouslySetInnerHTML:{__html:n},nonce:r});case`script`:return(0,G.jsx)(Al,{attrs:t,children:n});default:return null}}function Al({attrs:e,children:t}){lc();let n=oc(),r=typeof e?.type==`string`&&e.type!==``&&e.type!==`text/javascript`&&e.type!==`module`;if(W.useEffect(()=>{if(!r){if(e?.src){let t=(()=>{try{let t=document.baseURI||window.location.href;return new URL(e.src,t).href}catch{return e.src}})();if(Array.from(document.querySelectorAll(`script[src]`)).find(e=>e.src===t))return;let n=document.createElement(`script`);for(let[t,r]of Object.entries(e))t!==`suppressHydrationWarning`&&r!==void 0&&r!==!1&&n.setAttribute(t,typeof r==`boolean`?``:String(r));return document.head.appendChild(n),()=>{n.parentNode&&n.parentNode.removeChild(n)}}if(typeof t==`string`){let n=typeof e?.type==`string`?e.type:`text/javascript`,r=typeof e?.nonce==`string`?e.nonce:void 0;if(Array.from(document.querySelectorAll(`script:not([src])`)).find(e=>{if(!(e instanceof HTMLScriptElement))return!1;let i=e.getAttribute(`type`)??`text/javascript`,a=e.getAttribute(`nonce`)??void 0;return e.textContent===t&&i===n&&a===r}))return;let i=document.createElement(`script`);if(i.textContent=t,e)for(let[t,n]of Object.entries(e))t!==`suppressHydrationWarning`&&n!==void 0&&n!==!1&&i.setAttribute(t,typeof n==`boolean`?``:String(n));return document.head.appendChild(i),()=>{i.parentNode&&i.parentNode.removeChild(i)}}}},[e,t,r]),r&&typeof t==`string`)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:t}});if(!n){if(e?.src)return(0,G.jsx)(`script`,{...e,suppressHydrationWarning:!0});if(typeof t==`string`)return(0,G.jsx)(`script`,{...e,dangerouslySetInnerHTML:{__html:t},suppressHydrationWarning:!0})}return null}var jl=e=>{let t=lc(),n=t.options.ssr?.nonce,r=K(t.stores.matches,e=>e.map(e=>e.meta).filter(Boolean),j),i=W.useMemo(()=>{let e=[],t={},i;for(let a=r.length-1;a>=0;a--){let o=r[a];for(let r=o.length-1;r>=0;r--){let a=o[r];if(a)if(a.title)i||={tag:`title`,children:a.title};else if(`script:ld+json`in a)try{let t=JSON.stringify(a[`script:ld+json`]);e.push({tag:`script`,attrs:{type:`application/ld+json`},children:re(t)})}catch{}else{let r=a.name??a.property;if(r){if(t[r])continue;t[r]=!0}e.push({tag:`meta`,attrs:{...a,nonce:n}})}}}return i&&e.push(i),n&&e.push({tag:`meta`,attrs:{property:`csp-nonce`,content:n}}),e.reverse(),e},[r,n]),a=K(t.stores.matches,r=>{let i=r.map(e=>e.links).filter(Boolean).flat(1).map(e=>({tag:`link`,attrs:{...e,nonce:n}})),a=t.ssr?.manifest,o=r.map(e=>a?.routes[e.routeId]?.assets??[]).filter(Boolean).flat(1).filter(e=>e.tag===`link`).map(t=>({tag:`link`,attrs:{...t.attrs,crossOrigin:sn(e,`stylesheet`)??t.attrs?.crossOrigin,suppressHydrationWarning:!0,nonce:n}}));return[...i,...o]},j),o=K(t.stores.matches,r=>{let i=[];return r.map(e=>t.looseRoutesById[e.routeId]).forEach(r=>t.ssr?.manifest?.routes[r.id]?.preloads?.filter(Boolean).forEach(t=>{let r=cn(t);i.push({tag:`link`,attrs:{rel:`modulepreload`,href:r.href,crossOrigin:sn(e,`modulepreload`)??r.crossOrigin,nonce:n}})})),i},j),s=K(t.stores.matches,e=>e.map(e=>e.styles).flat(1).filter(Boolean).map(({children:e,...t})=>({tag:`style`,attrs:{...t,nonce:n},children:e})),j),c=K(t.stores.matches,e=>e.map(e=>e.headScripts).flat(1).filter(Boolean).map(({children:e,...t})=>({tag:`script`,attrs:{...t,nonce:n},children:e})),j);return Ml([...i,...o,...a,...s,...c],e=>JSON.stringify(e))};function Ml(e,t){let n=new Set;return e.filter(e=>{let r=t(e);return n.has(r)?!1:(n.add(r),!0)})}function Nl(e){let t=jl(e.assetCrossOrigin),n=lc().options.ssr?.nonce;return(0,G.jsx)(G.Fragment,{children:t.map(e=>(0,W.createElement)(kl,{...e,key:`tsr-meta-${JSON.stringify(e)}`,nonce:n}))})}var Pl=()=>{let e=lc(),t=e.options.ssr?.nonce,n=n=>{let r=[],i=e.ssr?.manifest;return i?(n.map(t=>e.looseRoutesById[t.routeId]).forEach(e=>i.routes[e.id]?.assets?.filter(e=>e.tag===`script`).forEach(e=>{r.push({tag:`script`,attrs:{...e.attrs,nonce:t},children:e.children})})),r):[]},r=e=>e.map(e=>e.scripts).flat(1).filter(Boolean).map(({children:e,...n})=>({tag:`script`,attrs:{...n,suppressHydrationWarning:!0,nonce:t},children:e})),i=K(e.stores.matches,n,j);return Fl(e,K(e.stores.matches,r,j),i)};function Fl(e,t,n){let r;e.serverSsr&&(r=e.serverSsr.takeBufferedScripts());let i=[...t,...n];return r&&i.unshift(r),(0,G.jsx)(G.Fragment,{children:i.map((e,t)=>(0,W.createElement)(kl,{...e,key:`tsr-scripts-${e.tag}-${t}`}))})}function Il({router:e,queryClient:t,handleRedirects:n=!0}){let r=e.options.hydrate;if(e.options.dehydrate,e.options.hydrate=async e=>{await r?.(e),e.dehydratedQueryClient&&bs(t,e.dehydratedQueryClient);let n=e.queryStream.getReader();n.read().then(async function e({done:r,value:i}){if(bs(t,i),!r)return e(await n.read())}).catch(e=>{console.error(`Error reading query stream:`,e)})},n){let n=t.getMutationCache().config;t.getMutationCache().config={...n,onError:(t,...r)=>at(t)?(t.options._fromLocation=e.stores.location.get(),e.navigate(e.resolveRedirect(t).options)):n.onError?.(t,...r)};let r=t.getQueryCache().config;t.getQueryCache().config={...r,onError:(t,...n)=>at(t)?(t.options._fromLocation=e.stores.location.get(),e.navigate(e.resolveRedirect(t).options)):r.onError?.(t,...n)}}}function Ll(e){if(Il(e),e.wrapQueryClient===!1)return;let t=e.router.options.Wrap||W.Fragment;e.router.options.Wrap=({children:n})=>(0,G.jsx)(qs,{client:e.queryClient,children:(0,G.jsx)(t,{children:n})})}var Rl=t((e=>{var t=r().__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;e.c=function(e){return t.H.useMemoCache(e)}})),zl=t(((e,t)=>{t.exports=Rl()})),Bl=(0,W.createContext)(null),q={};function Vl({children:e,defaultOptions:t=q}){let n=(0,W.useMemo)(()=>({defaultOptions:t}),[t]);return W.createElement(Bl.Provider,{value:n},e)}function Hl(){return(0,W.useContext)(Bl)?.defaultOptions??{}}var Ul=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},Wl=[`light`,`dark`],Gl=`(prefers-color-scheme: dark)`,Kl=typeof window>`u`,ql=W.createContext(void 0),Jl={setTheme:e=>{},themes:[]},Yl=()=>W.useContext(ql)??Jl,Xl=e=>W.useContext(ql)?W.createElement(W.Fragment,null,e.children):W.createElement(Ql,{...e}),Zl=[`light`,`dark`],Ql=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i=`theme`,themes:a=Zl,defaultTheme:o=n?`system`:`light`,attribute:s=`data-theme`,value:c,children:l,nonce:u,scriptProps:d})=>{let[f,p]=W.useState(()=>eu(i,o)),[m,h]=W.useState(()=>f===`system`?nu():f),g=c?Object.values(c):a,_=W.useCallback(e=>{let i=e;if(!i)return;e===`system`&&n&&(i=nu());let a=c?c[i]:i,l=t?tu(u):null,d=document.documentElement,f=e=>{e===`class`?(d.classList.remove(...g),a&&d.classList.add(a)):e.startsWith(`data-`)&&(a?d.setAttribute(e,a):d.removeAttribute(e))};if(Array.isArray(s)?s.forEach(f):f(s),r){let e=Wl.includes(o)?o:null,t=Wl.includes(i)?i:e;d.style.colorScheme=t}l?.()},[u]),v=W.useCallback(e=>{let t=typeof e==`function`?e(f):e;p(t);try{localStorage.setItem(i,t)}catch{}},[f]),y=W.useCallback(t=>{h(nu(t)),f===`system`&&n&&!e&&_(`system`)},[f,e]);W.useEffect(()=>{let e=window.matchMedia(Gl);return e.addListener(y),y(e),()=>e.removeListener(y)},[y]),W.useEffect(()=>{let e=e=>{e.key===i&&(e.newValue?p(e.newValue):v(o))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[v]),W.useEffect(()=>{_(e??f)},[e,f]);let b=W.useMemo(()=>({theme:f,setTheme:v,forcedTheme:e,resolvedTheme:f===`system`?m:f,themes:n?[...a,`system`]:a,systemTheme:n?m:void 0}),[f,v,e,m,n,a]);return W.createElement(ql.Provider,{value:b},W.createElement($l,{forcedTheme:e,storageKey:i,attribute:s,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:a,nonce:u,scriptProps:d}),l)},$l=W.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return W.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${Ul.toString()})(${u})`}})}),eu=(e,t)=>{if(Kl)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},tu=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},nu=e=>(e||=window.matchMedia(Gl),e.matches?`dark`:`light`),ru={};function iu(e,t){let n=W.useRef(ru);return n.current===ru&&(n.current=e(t)),n}var au=[],ou=void 0;function su(){return ou}function cu(e){au.push(e)}function lu(e){let t=(t,n)=>{let r=iu(du).current,i;try{ou=r;for(let e of au)e.before(r);i=e(t,n);for(let e of au)e.after(r);r.didInitialize=!0}finally{ou=void 0}return i};return t.displayName=e.displayName||e.name,t}function uu(e){return W.forwardRef(lu(e))}function du(){return{didInitialize:!1}}function fu(e){let t=W.useRef(!0);t.current&&(t.current=!1,e())}var pu=typeof document<`u`?W.useLayoutEffect:()=>{};function mu(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var hu=mu(`https://base-ui.com/production-error`,`Base UI`),gu=W.createContext(void 0);function _u(e){let t=W.useContext(gu);if(t===void 0&&!e)throw Error(hu(72));return t}var vu=[];function yu(e){W.useEffect(e,vu)}var bu=0,xu=class e{static create(){return new e}currentId=bu;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=bu,t()},e)}isStarted(){return this.currentId!==bu}clear=()=>{this.currentId!==bu&&(clearTimeout(this.currentId),this.currentId=bu)};disposeEffect=()=>this.clear};function Su(){let e=iu(xu.create).current;return yu(e.disposeEffect),e}var Cu=typeof navigator<`u`,wu=Nu(),Tu=Fu(),Eu=Pu(),Du=typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter:none`),Ou=wu.platform===`MacIntel`&&wu.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(wu.platform);Cu&&/firefox/i.test(Eu);var ku=Cu&&/apple/i.test(navigator.vendor);Cu&&/Edg/i.test(Eu);var Au=Cu&&/android/i.test(Tu)||/android/i.test(Eu),ju=Cu&&Tu.toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints,Mu=Eu.includes(`jsdom/`);function Nu(){if(!Cu)return{platform:``,maxTouchPoints:-1};let e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??-1}}function Pu(){if(!Cu)return``;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(` `):navigator.userAgent}function Fu(){if(!Cu)return``;let e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??``}function Iu(e){e.preventDefault(),e.stopPropagation()}function Lu(e){return`nativeEvent`in e}function Ru(e){return e.pointerType===``&&e.isTrusted?!0:Au&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function zu(e){return Mu?!1:!Au&&e.width===0&&e.height===0||Au&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function Bu(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function Vu(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function Hu(e,t){return t!=null&&!Bu(t)?0:typeof e==`function`?e():e}function Uu(e,t,n){let r=Hu(e,n);return typeof r==`number`?r:r?.[t]}function Wu(e){return typeof e==`function`?e():e}function Gu(e,t){return t||e===`click`||e===`mousedown`}function Ku(){}var qu=Object.freeze([]),Ju=Object.freeze({}),Yu={style:{transition:`none`}},Xu=`data-base-ui-click-trigger`,Zu={fallbackAxisSide:`none`},Qu={fallbackAxisSide:`end`},$u={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},ed=`none`,td=`trigger-press`,nd=`trigger-hover`,rd=`trigger-focus`,id=`outside-press`,ad=`item-press`,od=`close-press`,sd=`focus-out`,cd=`escape-key`,ld=`list-navigation`,ud=`cancel-open`,dd=`sibling-open`,fd=`disabled`,pd=`imperative-action`;function md(e,t,n,r){let i=!1,a=!1,o=r??Ju;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}var hd=W.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new xu,currentIdRef:{current:null},currentContextRef:{current:null}});function gd(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=W.useRef(n),a=W.useRef(n),o=W.useRef(null),s=W.useRef(null),c=Su();return(0,G.jsx)(hd.Provider,{value:W.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function _d(e,t={open:!1}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`floatingId`),{open:i}=t,{currentIdRef:a,delayRef:o,timeoutMs:s,initialDelayRef:c,currentContextRef:l,hasProvider:u,timeout:d}=W.useContext(hd),[f,p]=W.useState(!1);return pu(()=>{function e(){p(!1),l.current?.setIsInstantPhase(!1),a.current=null,l.current=null,o.current=c.current}if(a.current&&!i&&a.current===r){if(p(!1),s){let t=r;return d.start(s,()=>{n.select(`open`)||a.current&&a.current!==t||e()}),()=>{d.clear()}}e()}},[i,r,a,o,s,c,l,d,n]),pu(()=>{if(!i)return;let e=l.current,t=a.current;d.clear(),l.current={onOpenChange:n.setOpen,setIsInstantPhase:p},a.current=r,o.current={open:0,close:Uu(c.current,`close`)},t!==null&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,md(ed))):(p(!1),e?.setIsInstantPhase(!1))},[i,r,n,a,o,s,c,l,d]),pu(()=>()=>{l.current=null},[l]),W.useMemo(()=>({hasProvider:u,delayRef:o,isInstantPhase:f}),[u,o,f])}function vd(){return typeof window<`u`}function yd(e){return Sd(e)?(e.nodeName||``).toLowerCase():`#document`}function bd(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xd(e){return((Sd(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Sd(e){return vd()?e instanceof Node||e instanceof bd(e).Node:!1}function Cd(e){return vd()?e instanceof Element||e instanceof bd(e).Element:!1}function wd(e){return vd()?e instanceof HTMLElement||e instanceof bd(e).HTMLElement:!1}function J(e){return!vd()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof bd(e).ShadowRoot}function Td(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Id(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Ed(e){return/^(table|td|th)$/.test(yd(e))}function Dd(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Od=/transform|translate|scale|rotate|perspective|filter/,kd=/paint|layout|strict|content/,Ad=e=>!!e&&e!==`none`,jd;function Md(e){let t=Cd(e)?Id(e):e;return Ad(t.transform)||Ad(t.translate)||Ad(t.scale)||Ad(t.rotate)||Ad(t.perspective)||!Pd()&&(Ad(t.backdropFilter)||Ad(t.filter))||Od.test(t.willChange||``)||kd.test(t.contain||``)}function Nd(e){let t=Rd(e);for(;wd(t)&&!Fd(t);){if(Md(t))return t;if(Dd(t))return null;t=Rd(t)}return null}function Pd(){return jd??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),jd}function Fd(e){return/^(html|body|#document)$/.test(yd(e))}function Id(e){return bd(e).getComputedStyle(e)}function Ld(e){return Cd(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rd(e){if(yd(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||J(e)&&e.host||xd(e);return J(t)?t.host:t}function zd(e){let t=Rd(e);return Fd(t)?e.ownerDocument?e.ownerDocument.body:e.body:wd(t)&&Td(t)?t:zd(t)}function Bd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=zd(e),i=r===e.ownerDocument?.body,a=bd(r);if(i){let e=Vd(a);return t.concat(a,a.visualViewport||[],Td(r)?r:[],e&&n?Bd(e):[])}else return t.concat(r,Bd(r,[],n))}function Vd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Hd(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ud(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function Wd(e,t,n,r){let i=iu(Kd).current;return qd(i,e,t,n,r)&&Yd(i,[e,t,n,r]),i.callback}function Gd(e){let t=iu(Kd).current;return Jd(t,e)&&Yd(t,e),t.callback}function Kd(){return{callback:null,cleanup:null,refs:[]}}function qd(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Jd(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Yd(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n;break;default:}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null;break;default:}}}}}}function Xd(e){let t=iu(Zd,e).current;return t.next=e,pu(t.effect),t}function Zd(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Qd=W[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],$d=Qd&&Qd!==W.useLayoutEffect?Qd:e=>e();function ef(e){let t=iu(tf).current;return t.next=e,$d(t.effect),t.trampoline}function tf(){let e={next:void 0,callback:nf,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function nf(){}var rf=null;globalThis.requestAnimationFrame;var af=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,--this.callbacksCount)}},of=class e{static create(){return new e}static request(e){return af.request(e)}static cancel(e){return af.cancel(e)}currentId=rf;request(e){this.cancel(),this.currentId=af.request(()=>{this.currentId=rf,e()})}cancel=()=>{this.currentId!==rf&&(af.cancel(this.currentId),this.currentId=rf)};disposeEffect=()=>this.cancel};function sf(){let e=iu(of.create).current;return yu(e.disposeEffect),e}function cf(e){return e?.ownerDocument||document}var lf={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},uf={...lf,position:`fixed`,top:0,left:0};({...lf});var df=W.forwardRef(function(e,t){let[n,r]=W.useState();pu(()=>{ku&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:uf,"aria-hidden":n?void 0:!0,...i,"data-base-ui-focus-guard":``})}),ff=`data-base-ui-focusable`,pf=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,mf=`ArrowLeft`,hf=`ArrowRight`,gf=`ArrowUp`,_f=`ArrowDown`;function vf(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function yf(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&J(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function bf(e){return`composedPath`in e?e.composedPath()[0]:e.target}function xf(e,t){if(!Cd(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(`data-trigger-disabled`);for(let[,e]of t.entries())if(yf(e,n))return!e.hasAttribute(`data-trigger-disabled`);return!1}function Sf(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Cf(e){return e.matches(`html,body`)}function wf(e){return wd(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function Tf(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${pf}`)!=null}function Ef(e){return e?e.getAttribute(`role`)===`combobox`&&wf(e):!1}function Df(e){if(!e||Mu)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function Of(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}var kf=[`top`,`right`,`bottom`,`left`],Af=Math.min,jf=Math.max,Mf=Math.round,Nf=Math.floor,Pf=e=>({x:e,y:e}),Ff={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function If(e,t,n){return jf(e,Af(t,n))}function Lf(e,t){return typeof e==`function`?e(t):e}function Rf(e){return e.split(`-`)[0]}function zf(e){return e.split(`-`)[1]}function Bf(e){return e===`x`?`y`:`x`}function Vf(e){return e===`y`?`height`:`width`}function Hf(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Uf(e){return Bf(Hf(e))}function Wf(e,t,n){n===void 0&&(n=!1);let r=zf(e),i=Uf(e),a=Vf(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=$f(o)),[o,$f(o)]}function Gf(e){let t=$f(e);return[Kf(e),t,Kf(t)]}function Kf(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var qf=[`left`,`right`],Jf=[`right`,`left`],Yf=[`top`,`bottom`],Xf=[`bottom`,`top`];function Zf(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Jf:qf:t?qf:Jf;case`left`:case`right`:return t?Yf:Xf;default:return[]}}function Qf(e,t,n,r){let i=zf(e),a=Zf(Rf(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Kf)))),a}function $f(e){let t=Rf(e);return Ff[t]+e.slice(t.length)}function ep(e){return{top:0,right:0,bottom:0,left:0,...e}}function tp(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:ep(e)}function np(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function rp(e,t,n){return Math.floor(e/t)!==n}function ip(e,t){return t<0||t>=e.length}function ap(e,t){return sp(e.current,{disabledIndices:t})}function op(e,t){return sp(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function sp(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&fp(e,a,r));return a}function cp(e,{event:t,orientation:n,loopFocus:r,onLoop:i,rtl:a,cols:o,disabledIndices:s,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u,p;if(t.key===`ArrowUp`?p=`up`:t.key===`ArrowDown`&&(p=`down`),p){let n=[],a=[],m=!1,h=0;{let t=null,r=-1;e.forEach((e,i)=>{if(e==null)return;h+=1;let o=e.closest(`[role="row"]`);o&&(m=!0),(o!==t||r===-1)&&(t=o,r+=1,n[r]=[]),n[r].push(i),a[i]=r})}let g=!1,_=0;if(m)for(let e of n){let t=e.length;t>_&&(_=t),t!==o&&(g=!0)}let v=g&&h<e.length,y=_||o,b=o=>{if(!g||u===-1)return;let c=a[u];if(c==null)return;let l=n[c].indexOf(u),d=o===`up`?-1:1;for(let o=c+d,f=0;f<n.length;f+=1,o+=d){if(o<0||o>=n.length){if(!r||v)return;if(o=o<0?n.length-1:0,i){let e=Math.min(l,n[o].length-1);o=a[i(t,u,n[o][e]??n[o][0])]??o}}let c=n[o];for(let t=Math.min(l,c.length-1);t>=0;--t){let n=c[t];if(!fp(e,n,s))return n}}},x=t=>{if(!v||u===-1)return;let n=u%y,i=t===`up`?-y:y,a=l-l%y,o=Nf(l/y)+1;for(let t=u-n+i,c=0;c<o;c+=1,t+=i){if(t<0||t>l){if(!r)return;t=t<0?a:0}let i=Math.min(t+y-1,l);for(let r=Math.min(t+n,i);r>=t;--r)if(!fp(e,r,s))return r}};d&&Iu(t);let S=b(p)??x(p);if(S!==void 0)f=S;else if(u===-1)f=p===`up`?l:c;else if(f=sp(e,{startingIndex:u,amount:y,decrement:p===`up`,disabledIndices:s}),r){if(p===`up`&&(u-y<c||f<0)){let e=u%y,n=l%y,r=l-(n-e);f=n===e?l:n>e?r:r-y,i&&(f=i(t,u,f))}p===`down`&&u+y>l&&(f=sp(e,{startingIndex:u%y-y,amount:y,disabledIndices:s}),i&&(f=i(t,u,f)))}ip(e,f)&&(f=u)}if(n===`both`){let n=Nf(u/o);t.key===(a?`ArrowLeft`:`ArrowRight`)&&(d&&Iu(t),u%o===o-1?r&&(f=sp(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):(f=sp(e,{startingIndex:u,disabledIndices:s}),r&&rp(f,o,n)&&(f=sp(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f)))),rp(f,o,n)&&(f=u)),t.key===(a?`ArrowRight`:`ArrowLeft`)&&(d&&Iu(t),u%o===0?r&&(f=sp(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f))):(f=sp(e,{startingIndex:u,decrement:!0,disabledIndices:s}),r&&rp(f,o,n)&&(f=sp(e,{startingIndex:u+(o-u%o),decrement:!0,disabledIndices:s}),i&&(f=i(t,u,f)))),rp(f,o,n)&&(f=u));let c=Nf(l/o)===n;ip(e,f)&&(r&&c?(f=t.key===(a?`ArrowRight`:`ArrowLeft`)?l:sp(e,{startingIndex:u-u%o-1,disabledIndices:s}),i&&(f=i(t,u,f))):f=u)}return f}function lp(e,t,n){let r=[],i=0;return e.forEach(({width:e,height:a},o)=>{let s=!1;for(n&&(i=0);!s;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<a;e+=1)n.push(i+r+e*t);i%t+e<=t&&n.every(e=>r[e]==null)?(n.forEach(e=>{r[e]=o}),s=!0):i+=1}}),[...r]}function up(e,t,n,r,i){if(e===-1)return-1;let a=n.indexOf(e),o=t[e];switch(i){case`tl`:return a;case`tr`:return o?a+o.width-1:a;case`bl`:return o?a+(o.height-1)*r:a;case`br`:return n.lastIndexOf(e);default:return-1}}function dp(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function fp(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?pp(r)?!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!0:!1}function pp(e){return typeof e.checkVisibility==`function`?e.checkVisibility():Id(e).display!==`none`}var mp=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function hp(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return J(n)?n.host:null}function gp(e){for(let t of Array.from(e.children))if(yd(t)===`summary`)return t;return null}function _p(e,t){let n=gp(t);return!!n&&(e===n||yf(n,e))}function vp(e){let t=e?yd(e):``;return e!=null&&e.matches(mp)&&(t!==`summary`||e.parentElement!=null&&yd(e.parentElement)===`details`&&gp(e.parentElement)===e)&&(t!==`details`||gp(e)==null)&&(t!==`input`||e.type!==`hidden`)}function yp(e){if(!vp(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=hp(t)){let n=yd(t)===`slot`;if(t.hasAttribute(`inert`)||t!==e&&yd(t)===`details`&&!t.open&&!_p(e,t)||t.hasAttribute(`hidden`)||!n&&!pp(t))return!1}return!0}function bp(e){let t=e.tabIndex;if(t<0){let t=yd(e);if(t===`details`||t===`audio`||t===`video`||wd(e)&&e.isContentEditable)return 0}return t}function xp(e){if(yd(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Sp(e,t){let n=xp(e);if(!n)return!0;let r=t.find(e=>{let t=xp(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=xp(e);return t?.name===n.name&&t.form===n.form})===n}function Cp(e){if(wd(e)&&yd(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return wd(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function wp(e,t){Cp(e).forEach(e=>{vp(e)&&t.push(e),wp(e,t)})}function Tp(e,t,n){Cp(e).forEach(e=>{wd(e)&&e.matches(t)&&n.push(e),Tp(e,t,n)})}function Ep(e){return yp(e)&&bp(e)>=0}function Dp(e){let t=[];return wp(e,t),t.filter(yp)}function Op(e){let t=Dp(e);return t.filter(e=>bp(e)>=0&&Sp(e,t))}function kp(e,t){let n=Op(e),r=n.length;if(r===0)return;let i=vf(cf(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ap(e){return kp(cf(e).body,1)||e}function jp(e){return kp(cf(e).body,-1)||e}function Mp(e,t){if(!e)return null;let n=Op(cf(e).body),r=n.length;if(r===0)return null;let i=n.indexOf(e);return i===-1?null:n[(i+t+r)%r]}function Np(e){return Mp(e,1)}function Pp(e){return Mp(e,-1)}function Fp(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!yf(n,r)}function Ip(e){Op(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Lp(e){let t=[];Tp(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Rp(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Rp(e,t.id,n)])}function zp(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Bp(e){return`data-base-ui-${e}`}var Vp={...W},Hp=0;function Up(e,t=`mui`){let[n,r]=W.useState(e),i=e||n;return W.useEffect(()=>{n??(Hp+=1,r(`${t}-${Hp}`))},[n,t]),i}var Wp=Vp.useId;function Gp(e,t){if(Wp!==void 0){let n=Wp();return e??(t?`${t}-${n}`:n)}return Up(e,t)}var Kp=19;function qp(e){return Kp>=e}function Jp(e){if(!W.isValidElement(e))return null;let t=e,n=t.props;return(qp(19)?n?.ref:t.ref)??null}function Yp(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Xp(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Zp(e,t){return typeof e==`function`?e(t):e}function Qp(e,t){return typeof e==`function`?e(t):e}var $p={};function em(e,t,n,r,i){if(!n&&!r&&!i&&!e)return nm(t);let a=nm(e);return t&&(a=rm(a,t)),n&&(a=rm(a,n)),r&&(a=rm(a,r)),i&&(a=rm(a,i)),a}function tm(e){if(e.length===0)return $p;if(e.length===1)return nm(e[0]);let t=nm(e[0]);for(let n=1;n<e.length;n+=1)t=rm(t,e[n]);return t}function nm(e){return sm(e)?{...cm(e,$p)}:im(e)}function rm(e,t){return sm(t)?cm(t,e):am(e,t)}function im(e){let t={...e};for(let e in t){let n=t[e];om(e,n)&&(t[e]=um(n))}return t}function am(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Yp(e.style,r);break;case`className`:e[n]=fm(e.className,r);break;default:om(n,r)?e[n]=lm(e[n],r):e[n]=r}}return e}function om(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function sm(e){return typeof e==`function`}function cm(e,t){return sm(e)?e(t):e??$p}function lm(e,t){return t?e?n=>{if(pm(n)){let r=n;dm(r);let i=t(r);return r.baseUIHandlerPrevented||e?.(r),i}let r=t(n);return e?.(n),r}:um(t):e}function um(e){return e&&(t=>(pm(t)&&dm(t),e(t)))}function dm(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function fm(e,t){return t?e?t+` `+e:t:e}function pm(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function mm(e,t,n={}){let r=t.render,i=hm(t,n);return n.enabled===!1?null:vm(e,r,i,n.state??Ju)}function hm(e,t={}){let{className:n,style:r,render:i}=e,{state:a=Ju,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Zp(n,a):void 0,d=l?Qp(r,a):void 0,f=l?Xp(a,c):Ju,p=l&&s?gm(s):void 0,m=l?Yp(f,p)??{}:Ju;return typeof document<`u`&&(l?Array.isArray(o)?m.ref=Gd([m.ref,Jp(i),...o]):m.ref=Wd(m.ref,Jp(i),o):Wd(null,null)),l?(u!==void 0&&(m.className=fm(m.className,u)),d!==void 0&&(m.style=Yp(m.style,d)),m):Ju}function gm(e){return Array.isArray(e)?tm(e):em(void 0,e)}var _m=Symbol.for(`react.lazy`);function vm(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=em(n,t.props);e.ref=n.ref;let i=t;return i?.$$typeof===_m&&(i=W.Children.toArray(t)[0]),W.cloneElement(i,e)}if(e&&typeof e==`string`)return ym(e,n);throw Error(hu(8))}function ym(e,t){return e===`button`?(0,W.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,W.createElement)(`img`,{alt:``,...t,key:t.key}):W.createElement(e,t)}var bm=W.createContext(null),xm=()=>W.useContext(bm),Sm=Bp(`portal`);function Cm(e={}){let{ref:t,container:n,componentProps:r=Ju,elementProps:i}=e,a=Gp(),o=xm()?.portalNode,[s,c]=W.useState(null),[l,u]=W.useState(null),d=ef(e=>{e!==null&&u(e)}),f=W.useRef(null);pu(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}if(a==null)return;let e=(n&&(Sd(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o,a]);let p=mm(`div`,r,{ref:[t,d],props:[{id:a,[Sm]:``},i]});return{portalNode:l,portalSubtree:s&&p?Gc.createPortal(p,s):null}}var wm=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,renderGuards:o,style:s,...c}=e,{portalNode:l,portalSubtree:u}=Cm({container:r,ref:t,componentProps:e,elementProps:c}),d=W.useRef(null),f=W.useRef(null),p=W.useRef(null),m=W.useRef(null),[h,g]=W.useState(null),_=W.useRef(!1),v=h?.modal,y=h?.open,b=typeof o==`boolean`?o:!!h&&!h.modal&&h.open&&!!l;W.useEffect(()=>{if(!l||v)return;function e(e){l&&e.relatedTarget&&Fp(e)&&(e.type===`focusin`?_.current&&=(Lp(l),!1):(Ip(l),_.current=!0))}return Ud(Hd(l,`focusin`,e,!0),Hd(l,`focusout`,e,!0))},[l,v]),W.useEffect(()=>{!l||y!==!1||(Lp(l),_.current=!1)},[y,l]);let x=W.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:m,portalNode:l,setFocusManagerState:g}),[l]);return(0,G.jsxs)(W.Fragment,{children:[u,(0,G.jsxs)(bm.Provider,{value:x,children:[b&&l&&(0,G.jsx)(df,{"data-type":`outside`,ref:d,onFocus:e=>{Fp(e,l)?p.current?.focus():jp(h?h.domReference:null)?.focus()}}),b&&l&&(0,G.jsx)(`span`,{"aria-owns":l.id,style:$u}),l&&Gc.createPortal(n,l),b&&l&&(0,G.jsx)(df,{"data-type":`outside`,ref:f,onFocus:e=>{Fp(e,l)?m.current?.focus():(Ap(h?h.domReference:null)?.focus(),h?.closeOnFocusOut&&h?.onOpenChange(!1,md(`focus-out`,e.nativeEvent)))}})]})]})});function Tm(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var Em=class{nodesRef={current:[]};events=Tm();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},Dm=W.createContext(null),Om=W.createContext(null),km=()=>W.useContext(Dm)?.id||null,Am=e=>{let t=W.useContext(Om);return e??t};function jm(e){let t=Gp(),n=Am(e),r=km();return pu(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function Mm(e){let{children:t,id:n}=e,r=km();return(0,G.jsx)(Dm.Provider,{value:W.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Nm(e){let{children:t,externalTree:n}=e,r=iu(()=>n??new Em).current;return(0,G.jsx)(Om.Provider,{value:r,children:t})}function Pm(e){return e==null?e:`current`in e?e.current:e}function Fm(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=a.width,u=a.height,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,l=0,u=0,!i||c?(l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f):i&&!c&&(u=t.axis===`x`?a.height:u,l=t.axis===`y`?a.width:l),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function Im(e){return e!=null&&e.clientX!=null}function Lm(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),o=n.context.dataRef,{enabled:s=!0,axis:c=`both`}=t,l=W.useRef(!1),u=W.useRef(null),[d,f]=W.useState(),[p,m]=W.useState([]),h=ef((e,t,r)=>{l.current||o.current.openEvent&&!Im(o.current.openEvent)||n.set(`positionReference`,Fm(r??a,{x:e,y:t,axis:c,dataRef:o,pointerType:d}))}),g=ef(e=>{r?u.current||m([]):h(e.clientX,e.clientY,e.currentTarget)}),_=Bu(d)?i:r,v=W.useCallback(()=>{if(!_||!s)return;let e=bd(i);function t(e){yf(i,bf(e))?(u.current?.(),u.current=null):h(e.clientX,e.clientY)}if(!o.current.openEvent||Im(o.current.openEvent))return u.current=Hd(e,`mousemove`,t),()=>{u.current?.(),u.current=null};n.set(`positionReference`,a)},[_,s,i,o,a,n,h]);W.useEffect(()=>v(),[v,p]),W.useEffect(()=>{s&&!i&&(l.current=!1)},[s,i]),W.useEffect(()=>{!s&&r&&(l.current=!0)},[s,r]);let y=W.useMemo(()=>{function e(e){f(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return W.useMemo(()=>s?{reference:y,trigger:y}:{},[s,y])}var Rm={intentional:`onClick`,sloppy:`onPointerDown`};function zm(){return!1}function Bm(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function Vm(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),{dataRef:a}=n.context,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`sloppy`,referencePress:u=zm,referencePressEvent:d=`sloppy`,bubbles:f,externalTree:p}=t,m=Am(p),h=ef(typeof c==`function`?c:()=>!1),g=typeof c==`function`?h:c,_=g!==!1,v=ef(()=>l),y=W.useRef(!1),b=W.useRef(!1),x=W.useRef(!1),{escapeKey:S,outsidePress:C}=Bm(f),w=W.useRef(null),E=Su(),D=Su(),O=ef(()=>{D.clear(),a.current.insideReactTree=!1}),k=W.useRef(!1),A=W.useRef(``),j=ef(u),M=ef(e=>{if(!r||!o||!s||e.key!==`Escape`||k.current)return;let t=a.current.floatingContext?.nodeId,i=m?Rp(m.nodesRef.current,t):[];if(!S&&i.length>0){let e=!0;if(i.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}let c=md(cd,Lu(e)?e.nativeEvent:e);n.setOpen(!1,c),!S&&!c.isPropagationAllowed&&e.stopPropagation()}),N=ef(()=>{a.current.insideReactTree=!0,D.start(0,O)});W.useEffect(()=>{if(!r||!o)return;a.current.__escapeKeyBubbles=S,a.current.__outsidePressBubbles=C;let e=new xu,t=new xu;function c(){e.clear(),k.current=!0}function l(){e.start(Pd()?5:0,()=>{k.current=!1})}function u(){x.current=!0,t.start(0,()=>{x.current=!1})}function d(){y.current=!1,b.current=!1}function f(){let e=A.current,t=e===`pen`||!e?`mouse`:e,n=v(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function p(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function h(e){let t=a.current.floatingContext?.nodeId,r=m&&Rp(m.nodesRef.current,t).some(t=>Sf(e,t.context?.elements.floating));return Sf(e,n.select(`floatingElement`))||Sf(e,n.select(`domReferenceElement`))||r}function D(e){if(p(e)){O();return}if(a.current.insideReactTree){O();return}let r=bf(e),i=`[${Bp(`inert`)}]`,o=Cd(r)?r.getRootNode():null,s=Array.from((J(o)?o:cf(n.select(`floatingElement`))).querySelectorAll(i)),c=n.context.triggerElements;if(r&&(c.hasElement(r)||c.hasMatchingElement(e=>yf(e,r))))return;let l=Cd(r)?r:null;for(;l&&!Fd(l);){let e=Rd(l);if(Fd(e)||!Cd(e))break;l=e}if(s.length&&Cd(r)&&!Cf(r)&&!yf(r,n.select(`floatingElement`))&&s.every(e=>!yf(l,e)))return;if(wd(r)&&!(`touches`in e)){let t=Fd(r),n=Id(r),i=/auto|scroll/,a=t||i.test(n.overflowX),o=t||i.test(n.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=s&&e.offsetY>r.clientHeight;if(u||d)return}if(h(e))return;if(f()===`intentional`&&x.current){t.clear(),x.current=!1;return}if(typeof g==`function`&&!g(e))return;let u=a.current.floatingContext?.nodeId,d=m?Rp(m.nodesRef.current,u):[];if(d.length>0){let e=!0;if(d.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,md(id,e)),O()}function j(e){f()!==`sloppy`||e.pointerType===`touch`||!n.select(`open`)||!o||Sf(e,n.select(`floatingElement`))||Sf(e,n.select(`domReferenceElement`))||D(e)}function N(e){if(f()!==`sloppy`||!n.select(`open`)||!o||Sf(e,n.select(`floatingElement`))||Sf(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];t&&(w.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},E.start(1e3,()=>{w.current&&(w.current.dismissOnTouchEnd=!1,w.current.dismissOnMouseDown=!1)}))}function P(e,t){let n=bf(e);if(!n)return;let r=Hd(n,e.type,()=>{t(e),r()})}function F(e){A.current=`touch`,P(e,N)}function ee(e){E.clear(),e.type===`pointerdown`&&(A.current=e.pointerType),!(e.type===`mousedown`&&w.current&&!w.current.dismissOnMouseDown)&&P(e,e=>{e.type===`pointerdown`?j(e):D(e)})}function I(e){if(!y.current)return;let n=b.current;if(d(),f()===`intentional`){if(e.type===`pointercancel`){n&&u();return}if(!h(e)){if(n){u();return}typeof g==`function`&&!g(e)||(t.clear(),x.current=!0,O())}}}function L(e){if(f()!==`sloppy`||!w.current||Sf(e,n.select(`floatingElement`))||Sf(e,n.select(`domReferenceElement`)))return;let t=e.touches[0];if(!t)return;let r=Math.abs(t.clientX-w.current.startX),i=Math.abs(t.clientY-w.current.startY),a=Math.sqrt(r*r+i*i);a>5&&(w.current.dismissOnTouchEnd=!0),a>10&&(D(e),E.clear(),w.current=null)}function te(e){P(e,L)}function ne(e){f()!==`sloppy`||!w.current||Sf(e,n.select(`floatingElement`))||Sf(e,n.select(`domReferenceElement`))||(w.current.dismissOnTouchEnd&&D(e),E.clear(),w.current=null)}function re(e){P(e,ne)}let R=cf(i),z=Ud(s&&Ud(Hd(R,`keydown`,M),Hd(R,`compositionstart`,c),Hd(R,`compositionend`,l)),_&&Ud(Hd(R,`click`,ee,!0),Hd(R,`pointerdown`,ee,!0),Hd(R,`pointerup`,I,!0),Hd(R,`pointercancel`,I,!0),Hd(R,`mousedown`,ee,!0),Hd(R,`mouseup`,I,!0),Hd(R,`touchstart`,F,!0),Hd(R,`touchmove`,te,!0),Hd(R,`touchend`,re,!0)));return()=>{z(),e.clear(),t.clear(),d(),x.current=!1}},[a,i,s,_,g,r,o,S,C,M,O,v,m,n,E]),W.useEffect(O,[g,O]);let P=W.useMemo(()=>({onKeyDown:M,[Rm[d]]:e=>{j()&&n.setOpen(!1,md(td,e.nativeEvent))},...d!==`intentional`&&{onClick(e){j()&&n.setOpen(!1,md(`trigger-press`,e.nativeEvent))}}}),[M,n,d,j]),F=ef(e=>{if(!r||!o||e.button!==0)return;let t=bf(e.nativeEvent);yf(n.select(`floatingElement`),t)&&(y.current||(y.current=!0,b.current=!1))}),ee=ef(e=>{!r||!o||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&y.current&&(b.current=!0)}),I=W.useMemo(()=>({onKeyDown:M,onPointerDown:ee,onMouseDown:ee,onClickCapture:N,onMouseDownCapture(e){N(),F(e)},onPointerDownCapture(e){N(),F(e)},onMouseUpCapture:N,onTouchEndCapture:N,onTouchMoveCapture:N}),[M,N,F,ee]);return W.useMemo(()=>o?{reference:P,floating:I,trigger:P}:{},[o,P,I])}function Hm(e,t,n){let{reference:r,floating:i}=e,a=Hf(t),o=Uf(t),s=Vf(o),c=Rf(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(zf(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function Um(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Lf(t,e),p=tp(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=np(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=np(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Wm=50,Gm=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Um},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Hm(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Wm&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Hm(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Km=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Lf(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Rf(r),_=Hf(o),v=Rf(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[$f(o)]:Gf(o)),x=p!==`none`;!d&&x&&b.push(...Qf(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],E=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Wf(r,a,y);w.push(C[e[0]],C[e[1]])}if(E=[...E,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==Hf(t))||E.every(e=>Hf(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:E},reset:{placement:t}};let n=E.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=E.filter(e=>{if(x){let t=Hf(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function qm(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Jm(e){return kf.some(t=>e[t]>=0)}var Ym=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Lf(e,t);switch(i){case`referenceHidden`:{let e=qm(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Jm(e)}}}case`escaped`:{let e=qm(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Jm(e)}}}default:return{}}}}},Xm=new Set([`left`,`top`]);async function Zm(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Rf(n),s=zf(n),c=Hf(n)===`y`,l=Xm.has(o)?-1:1,u=a&&c?-1:1,d=Lf(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Qm=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Zm(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},$m=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Lf(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Hf(Rf(i)),p=Bf(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=If(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=If(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},eh=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Lf(e,t),u={x:n,y:r},d=Hf(i),f=Bf(d),p=u[f],m=u[d],h=Lf(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Xm.has(Rf(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},th=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Lf(e,t),u=await o.detectOverflow(t,l),d=Rf(i),f=zf(i),p=Hf(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Af(h-u[g],v),x=Af(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=jf(u.left,0),t=jf(u.right,0),n=jf(u.top,0),r=jf(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:jf(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:jf(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let E=await o.getDimensions(s.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function nh(e){let t=Id(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=wd(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=Mf(n)!==a||Mf(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function rh(e){return Cd(e)?e:e.contextElement}function ih(e){let t=rh(e);if(!wd(t))return Pf(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=nh(t),o=(a?Mf(n.width):n.width)/r,s=(a?Mf(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var ah=Pf(0);function oh(e){let t=bd(e);return!Pd()||!t.visualViewport?ah:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==bd(e)?!1:t}function ch(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=rh(e),o=Pf(1);t&&(r?Cd(r)&&(o=ih(r)):o=ih(e));let s=sh(a,n,r)?oh(a):Pf(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=bd(a),t=r&&Cd(r)?bd(r):r,n=e,i=Vd(n);for(;i&&r&&t!==n;){let e=ih(i),t=i.getBoundingClientRect(),r=Id(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=bd(i),i=Vd(n)}}return np({width:u,height:d,x:c,y:l})}function lh(e,t){let n=Ld(e).scrollLeft;return t?t.left+n:ch(xd(e)).left+n}function uh(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-lh(e,n),y:n.top+t.scrollTop}}function dh(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=xd(r),s=t?Dd(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Pf(1),u=Pf(0),d=wd(r);if((d||!d&&!a)&&((yd(r)!==`body`||Td(o))&&(c=Ld(r)),d)){let e=ch(r);l=ih(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?uh(o,c):Pf(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function fh(e){return Array.from(e.getClientRects())}function ph(e){let t=xd(e),n=Ld(e),r=e.ownerDocument.body,i=jf(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=jf(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+lh(e),s=-n.scrollTop;return Id(r).direction===`rtl`&&(o+=jf(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var mh=25;function hh(e,t){let n=bd(e),r=xd(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Pd();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=lh(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=mh&&(a-=o)}else l<=mh&&(a+=l);return{width:a,height:o,x:s,y:c}}function gh(e,t){let n=ch(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=wd(e)?ih(e):Pf(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function _h(e,t,n){let r;if(t===`viewport`)r=hh(e,n);else if(t===`document`)r=ph(xd(e));else if(Cd(t))r=gh(t,n);else{let n=oh(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return np(r)}function vh(e,t){let n=Rd(e);return n===t||!Cd(n)||Fd(n)?!1:Id(n).position===`fixed`||vh(n,t)}function yh(e,t){let n=t.get(e);if(n)return n;let r=Bd(e,[],!1).filter(e=>Cd(e)&&yd(e)!==`body`),i=null,a=Id(e).position===`fixed`,o=a?Rd(e):e;for(;Cd(o)&&!Fd(o);){let t=Id(o),n=Md(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||Td(o)&&!n&&vh(e,o))?r=r.filter(e=>e!==o):i=t,o=Rd(o)}return t.set(e,r),r}function bh(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Dd(t)?[]:yh(t,this._c):[].concat(n),r],o=_h(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=_h(t,a[e],i);s=jf(n.top,s),c=Af(n.right,c),l=Af(n.bottom,l),u=jf(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function xh(e){let{width:t,height:n}=nh(e);return{width:t,height:n}}function Sh(e,t,n){let r=wd(t),i=xd(t),a=n===`fixed`,o=ch(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Pf(0);function l(){c.x=lh(i)}if(r||!r&&!a)if((yd(t)!==`body`||Td(i))&&(s=Ld(t)),r){let e=ch(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?uh(i,s):Pf(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Ch(e){return Id(e).position===`static`}function wh(e,t){if(!wd(e)||Id(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return xd(e)===n&&(n=n.ownerDocument.body),n}function Th(e,t){let n=bd(e);if(Dd(e))return n;if(!wd(e)){let t=Rd(e);for(;t&&!Fd(t);){if(Cd(t)&&!Ch(t))return t;t=Rd(t)}return n}let r=wh(e,t);for(;r&&Ed(r)&&Ch(r);)r=wh(r,t);return r&&Fd(r)&&Ch(r)&&!Md(r)?n:r||Nd(e)||n}var Eh=async function(e){let t=this.getOffsetParent||Th,n=this.getDimensions,r=await n(e.floating);return{reference:Sh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dh(e){return Id(e).direction===`rtl`}var Oh={convertOffsetParentRelativeRectToViewportRelativeRect:dh,getDocumentElement:xd,getClippingRect:bh,getOffsetParent:Th,getElementRects:Eh,getClientRects:fh,getDimensions:xh,getScale:ih,isElement:Cd,isRTL:Dh};function kh(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ah(e,t){let n=null,r,i=xd(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Nf(d),h=Nf(i.clientWidth-(u+f)),g=Nf(i.clientHeight-(d+p)),_=Nf(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:jf(0,Af(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!kh(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function jh(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=rh(e),u=i||a?[...l?Bd(l):[],...t?Bd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ah(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ch(e):null;c&&g();function g(){let t=ch(e);h&&!kh(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Mh=Qm,Nh=$m,Ph=Km,Fh=th,Ih=Ym,Lh=eh,Rh=(e,t,n)=>{let r=new Map,i={platform:Oh,...n},a={...i.platform,_c:r};return Gm(e,t,{...i,platform:a})},zh=typeof document<`u`?W.useLayoutEffect:function(){};function Bh(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Bh(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Bh(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Vh(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Hh(e,t){let n=Vh(e);return Math.round(t*n)/n}function Uh(e){let t=W.useRef(e);return zh(()=>{t.current=e}),t}function Wh(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);Bh(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),E=c!=null,D=Uh(c),O=Uh(i),k=Uh(l),A=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),Rh(S.current,C.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!Bh(w.current,t)&&(w.current=t,Gc.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);zh(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=W.useRef(!1);zh(()=>(j.current=!0,()=>{j.current=!1}),[]),zh(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(D.current)return D.current(b,x,A);A()}},[b,x,A,D,E]);let M=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),N=W.useMemo(()=>({reference:b,floating:x}),[b,x]),P=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=Hh(N.floating,u.x),r=Hh(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Vh(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:P}),[u,A,M,N,P])}var Gh=(e,t)=>{let n=Mh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Kh=(e,t)=>{let n=Nh(e);return{name:n.name,fn:n.fn,options:[e,t]}},qh=(e,t)=>({fn:Lh(e).fn,options:[e,t]}),Jh=(e,t)=>{let n=Ph(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yh=(e,t)=>{let n=Fh(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xh=(e,t)=>{let n=Ih(e);return{name:n.name,fn:n.fn,options:[e,t]}},Zh=(e,t,n,r,i,a,...o)=>{if(o.length>0)throw Error(hu(1));let s;if(e&&t&&n&&r&&i&&a)s=(o,s,c,l)=>a(e(o,s,c,l),t(o,s,c,l),n(o,s,c,l),r(o,s,c,l),i(o,s,c,l),s,c,l);else if(e&&t&&n&&r&&i)s=(a,o,s,c)=>i(e(a,o,s,c),t(a,o,s,c),n(a,o,s,c),r(a,o,s,c),o,s,c);else if(e&&t&&n&&r)s=(i,a,o,s)=>r(e(i,a,o,s),t(i,a,o,s),n(i,a,o,s),a,o,s);else if(e&&t&&n)s=(r,i,a,o)=>n(e(r,i,a,o),t(r,i,a,o),i,a,o);else if(e&&t)s=(n,r,i,a)=>t(e(n,r,i,a),r,i,a);else if(e)s=e;else throw Error(`Missing arguments`);return s},Qh=Mc(),$h=qp(19)?ng:rg;function eg(e,t,n,r,i){return $h(e,t,n,r,i)}function tg(e,t,n,r,i){let a=W.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,Qh.useSyncExternalStore)(e.subscribe,a,a)}cu({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,Qh.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function ng(e,t,n,r,i){let a=su();if(!a)return tg(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.didChange=!0)):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},a.syncHooks.push(s)),s.value}function rg(e,t,n,r,i){return(0,Fc.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var ig=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return eg(this,e,t,n,r)}},ag=class extends ig{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){W.useDebugValue(e),pu(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){let n=this;pu(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;pu(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){W.useDebugValue(e);let n=t!==void 0;pu(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return W.useDebugValue(e),eg(this,this.selectors[e],t,n,r)}useContextCallback(e,t){W.useDebugValue(e);let n=ef(t??Ku);this.context[e]=n}useStateSetter(e){let t=W.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},og={open:Zh(e=>e.open),transitionStatus:Zh(e=>e.transitionStatus),domReferenceElement:Zh(e=>e.domReferenceElement),referenceElement:Zh(e=>e.positionReference??e.referenceElement),floatingElement:Zh(e=>e.floatingElement),floatingId:Zh(e=>e.floatingId)},sg=class extends ag{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Tm(),nested:n,triggerElements:i},og),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&Vu(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function cg(e,t=!1,n=!1){let[r,i]=W.useState(e&&t?`idle`:void 0),[a,o]=W.useState(e);return e&&!a&&(o(!0),i(`starting`)),!e&&a&&r!==`ending`&&!n&&i(`ending`),!e&&!a&&r===`ending`&&i(void 0),pu(()=>{if(!e&&a&&r!==`ending`&&n){let e=of.request(()=>{i(`ending`)});return()=>{of.cancel(e)}}},[e,a,r,n]),pu(()=>{if(!e||t)return;let n=of.request(()=>{i(void 0)});return()=>{of.cancel(n)}},[t,e]),pu(()=>{if(!e||!t)return;e&&a&&r!==`idle`&&i(`starting`);let n=of.request(()=>{i(`idle`)});return()=>{of.cancel(n)}},[t,e,a,r]),{mounted:a,setMounted:o,transitionStatus:r}}var lg=function(e){return e.startingStyle=`data-starting-style`,e.endingStyle=`data-ending-style`,e}({}),ug={[lg.startingStyle]:``},dg={[lg.endingStyle]:``},fg={transitionStatus(e){return e===`starting`?ug:e===`ending`?dg:null}};function pg(e,t=!1,n=!0){let r=sf();return ef((i,a=null)=>{r.cancel();let o=Pm(e);if(o==null)return;let s=o,c=()=>{Gc.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(s.getAnimations().map(e=>e.finished)).then(()=>{a?.aborted||c()}).catch(()=>{if(n){a?.aborted||c();return}let e=s.getAnimations();!a?.aborted&&e.length>0&&e.some(e=>e.pending||e.playState!==`finished`)&&l()})}if(t){let e=lg.startingStyle;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function mg(e){let{enabled:t=!0,open:n,ref:r,onComplete:i}=e,a=ef(i),o=pg(r,n,!1);W.useEffect(()=>{if(!t)return;let e=new AbortController;return o(a,e.signal),()=>{e.abort()}},[t,n,a,o])}function hg(e,t){let n=W.useRef(null),r=W.useRef(null);return W.useCallback(i=>{if(e!==void 0){if(n.current!==null){let e=n.current,i=r.current,a=t.context.triggerElements.getById(e);i&&a===i&&t.context.triggerElements.delete(e),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function gg(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=hg(e,n),o=ef(t=>{if(a(t),!t||!n.select(`open`))return;let i=n.select(`activeTriggerId`);if(i===e){n.update({activeTriggerElement:t,...r});return}i??n.update({activeTriggerId:e,activeTriggerElement:t,...r})});return pu(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:o,isMountedByThisTrigger:i}}function _g(e){let t=e.useState(`open`);pu(()=>{if(t&&!e.select(`activeTriggerId`)&&e.context.triggerElements.size===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function vg(e,t,n){let{mounted:r,setMounted:i,transitionStatus:a}=cg(e);t.useSyncedValues({mounted:r,transitionStatus:a});let o=ef(()=>{i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return mg({enabled:!t.useState(`preventUnmountingOnClose`),open:e,ref:t.context.popupRef,onComplete(){e||o()}}),{forceUnmount:o,transitionStatus:a}}var yg=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){let n=this.idMap.get(e);n!==t&&(n!==void 0&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){let t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(let t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function bg(){return new sg({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new yg,floatingId:``,syncOnly:!1,nested:!1,onOpenChange:void 0})}function xg(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:bg(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ju,inactiveTriggerProps:Ju,popupProps:Ju}}var Sg=Zh(e=>e.triggerIdProp??e.activeTriggerId),Cg={open:Zh(e=>e.openProp??e.open),mounted:Zh(e=>e.mounted),transitionStatus:Zh(e=>e.transitionStatus),floatingRootContext:Zh(e=>e.floatingRootContext),preventUnmountingOnClose:Zh(e=>e.preventUnmountingOnClose),payload:Zh(e=>e.payload),activeTriggerId:Sg,activeTriggerElement:Zh(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Zh((e,t)=>t!==void 0&&Sg(e)===t),isOpenedByTrigger:Zh((e,t)=>t!==void 0&&Sg(e)===t&&e.open),isMountedByTrigger:Zh((e,t)=>t!==void 0&&Sg(e)===t&&e.mounted),triggerProps:Zh((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Zh(e=>e.popupProps),popupElement:Zh(e=>e.popupElement),positionerElement:Zh(e=>e.positionerElement)};function wg(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Gp(),a=km()!=null,o=iu(()=>new sg({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new yg,floatingId:i,syncOnly:!1,nested:a})).current;return pu(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=Cd(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}function Tg(e={}){let{nodeId:t,externalTree:n}=e,r=wg(e),i=e.rootContext||r,a={reference:i.useState(`referenceElement`),floating:i.useState(`floatingElement`),domReference:i.useState(`domReferenceElement`)},[o,s]=W.useState(null),c=W.useRef(null),l=Am(n);pu(()=>{a.domReference&&(c.current=a.domReference)},[a.domReference]);let u=Wh({...e,elements:{...a,...o&&{reference:o}}}),d=W.useCallback(e=>{let t=Cd(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;s(t),u.refs.setReference(t)},[u.refs]),[f,p]=W.useState(void 0),[m,h]=W.useState(null);i.useSyncedValue(`referenceElement`,f??null);let g=Cd(f)?f:null;i.useSyncedValue(`domReferenceElement`,f===void 0?a.domReference:g),i.useSyncedValue(`floatingElement`,m);let _=W.useCallback(e=>{(Cd(e)||e===null)&&(c.current=e,p(e)),(Cd(u.refs.reference.current)||u.refs.reference.current===null||e!==null&&!Cd(e))&&u.refs.setReference(e)},[u.refs,p]),v=W.useCallback(e=>{h(e),u.refs.setFloating(e)},[u.refs]),y=W.useMemo(()=>({...u.refs,setReference:_,setFloating:v,setPositionReference:d,domReference:c}),[u.refs,_,v,d]),b=W.useMemo(()=>({...u.elements,domReference:a.domReference}),[u.elements,a.domReference]),x=i.useState(`open`),S=i.useState(`floatingId`),C=W.useMemo(()=>({...u,dataRef:i.context.dataRef,open:x,onOpenChange:i.setOpen,events:i.context.events,floatingId:S,refs:y,elements:b,nodeId:t,rootStore:i}),[u,y,b,t,i,x,S]);return pu(()=>{i.context.dataRef.current.floatingContext=C;let e=l?.nodesRef.current.find(e=>e.id===t);e&&(e.context=C)}),W.useMemo(()=>({...u,context:C,refs:y,elements:b,rootStore:i}),[u,y,b,C,i])}function Eg(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,i=Gp(),a=km()!=null,o=t.useState(`open`),s=t.useState(`activeTriggerElement`),c=t.useState(n?`popupElement`:`positionerElement`),l=t.context.triggerElements,u=iu(()=>new sg({open:o,transitionStatus:void 0,referenceElement:s,floatingElement:c,triggerElements:l,onOpenChange:r,floatingId:i,syncOnly:!0,nested:a})).current;return pu(()=>{let e={open:o,floatingId:i,referenceElement:s,floatingElement:c};Cd(s)&&(e.domReferenceElement=s),u.state.positionReference===u.state.referenceElement&&(e.positionReference=s),u.update(e)},[o,i,s,c,u]),u.context.onOpenChange=r,u.context.nested=a,u}var Dg=ju&&ku;function Og(e,t={}){let n=`rootStore`in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:a=!0,delay:o}=t,s=W.useRef(!1),c=W.useRef(null),l=Su(),u=W.useRef(!0);W.useEffect(()=>{let e=n.select(`domReferenceElement`);if(!a)return;let t=bd(e);function r(){let e=n.select(`domReferenceElement`);!n.select(`open`)&&wd(e)&&e===vf(cf(e))&&(s.current=!0)}function i(){u.current=!0}function o(){u.current=!1}return Ud(Hd(t,`blur`,r),Dg&&Hd(t,`keydown`,i,!0),Dg&&Hd(t,`pointerdown`,o,!0))},[n,a]),W.useEffect(()=>{if(!a)return;function e(e){if(e.reason===`trigger-press`||e.reason===`escape-key`){let e=n.select(`domReferenceElement`);Cd(e)&&(c.current=e,s.current=!0)}}return r.on(`openchange`,e),()=>{r.off(`openchange`,e)}},[r,a,n]);let d=W.useMemo(()=>({onMouseLeave(){s.current=!1,c.current=null},onFocus(e){let t=e.currentTarget;if(s.current){if(c.current===t)return;s.current=!1,c.current=null}let r=bf(e.nativeEvent);if(Cd(r)){if(Dg&&!e.relatedTarget){if(!u.current&&!wf(r))return}else if(!Df(r))return}let i=xf(e.relatedTarget,n.context.triggerElements),{nativeEvent:a,currentTarget:d}=e,f=typeof o==`function`?o():o;if(n.select(`open`)&&i||f===0||f===void 0){n.setOpen(!0,md(rd,a,d));return}l.start(f,()=>{s.current||n.setOpen(!0,md(rd,a,d))})},onBlur(e){s.current=!1,c.current=null;let t=e.relatedTarget,r=e.nativeEvent,a=Cd(t)&&t.hasAttribute(Bp(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let e=n.select(`domReferenceElement`),o=vf(cf(e));!t&&o===e||yf(i.current.floatingContext?.refs.floating.current,o)||yf(e,o)||a||xf(t??o,n.context.triggerElements)||n.setOpen(!1,md(rd,r))})}}),[i,n,l,o]);return W.useMemo(()=>a?{reference:d,trigger:d}:{},[a,d])}var kg=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new xu,this.restTimeout=new xu,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Ag=new WeakMap;function jg(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&Ag.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),Ag.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Mg(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=Ag.get(n);a&&a!==e&&jg(a),jg(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,Ag.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function Ng(e){let t=iu(kg.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||=t,yu(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Pg(e,t={}){let n=`rootStore`in e?e.rootStore:e,r=n.useState(`open`),i=n.useState(`floatingElement`),a=n.useState(`domReferenceElement`),{dataRef:o}=n.context,{enabled:s=!0,closeDelay:c=0,nodeId:l}=t,u=Ng(n),d=Am(),f=km(),p=ef(()=>Gu(o.current.openEvent?.type,u.interactedInside)),m=ef(()=>{let e=o.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`}),h=ef(e=>xf(e,n.context.triggerElements)),g=W.useCallback(e=>{let t=Uu(c,`close`,u.pointerType),r=()=>{n.setOpen(!1,md(nd,e)),d?.events.emit(`floating.closed`,e)};t?u.openChangeTimeout.start(t,r):(u.openChangeTimeout.clear(),r())},[c,n,u,d]),_=ef(()=>{jg(u)}),v=ef(e=>{let t=bf(e);if(!Tf(t)){u.interactedInside=!1;return}u.interactedInside=t?.closest(`[aria-haspopup]`)!=null});pu(()=>{r||(u.pointerType=void 0,u.restTimeoutPending=!1,u.interactedInside=!1,_())},[r,u,_]),W.useEffect(()=>_,[_]),pu(()=>{if(s&&r&&u.handleCloseOptions?.blockPointerEvents&&m()&&Cd(a)&&i){let e=a,t=i,n=cf(i),r=d?.nodesRef.current.find(e=>e.id===f)?.context?.elements.floating;return r&&(r.style.pointerEvents=``),Mg(u,{scopeElement:u.handleCloseOptions?.getScope?.()??u.pointerEventsScopeElement??r??e.closest(`[data-rootownerid]`)??n.body,referenceElement:e,floatingElement:t}),()=>{_()}}},[s,r,a,i,u,m,d,f,_]);let y=Su();W.useEffect(()=>{if(!s)return;function e(){u.openChangeTimeout.clear(),y.clear(),d?.events.off(`floating.closed`,r),_()}function t(e){if(d&&f&&Rp(d.nodesRef.current,f).length>0){d.events.on(`floating.closed`,r);return}if(h(e.relatedTarget))return;let t=o.current.floatingContext?.nodeId??l,n=e.relatedTarget;if(!(d&&t&&Cd(n)&&Rp(d.nodesRef.current,t,!1).some(e=>yf(e.context?.elements.floating,n)))){if(u.handler){u.handler(e);return}_(),p()||g(e)}}function r(e){!d||!f||Rp(d.nodesRef.current,f).length>0||y.start(0,()=>{d.events.off(`floating.closed`,r),n.setOpen(!1,md(nd,e)),d.events.emit(`floating.closed`,e)})}let a=i;return Ud(a&&Hd(a,`mouseenter`,e),a&&Hd(a,`mouseleave`,t),a&&Hd(a,`pointerdown`,v,!0),()=>{d?.events.off(`floating.closed`,r)})},[s,i,n,o,l,p,h,g,_,v,u,d,f,y])}var Fg={current:null};function Ig(e,t={}){let n=`rootStore`in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:a=!0,delay:o=0,handleClose:s=null,mouseOnly:c=!1,restMs:l=0,move:u=!0,triggerElementRef:d=Fg,externalTree:f,isActiveTrigger:p=!0,getHandleCloseContext:m,isClosing:h}=t,g=Am(f),_=Ng(n),v=W.useRef(!1),y=Xd(s),b=Xd(o),x=Xd(l),S=Xd(a),C=Xd(h);p&&(_.handleCloseOptions=y.current?.__options);let w=ef(()=>Gu(r.current.openEvent?.type,_.interactedInside)),E=ef(e=>xf(e,n.context.triggerElements)),D=ef((e,t,r)=>{let i=n.context.triggerElements;if(i.hasElement(t))return!e||!yf(e,t);if(!Cd(r))return!1;let a=r;return i.hasMatchingElement(e=>yf(e,a))&&(!e||!yf(e,a))}),O=ef((e,t=!0)=>{let r=Uu(b.current,`close`,_.pointerType);r?_.openChangeTimeout.start(r,()=>{n.setOpen(!1,md(nd,e)),g?.events.emit(`floating.closed`,e)}):t&&(_.openChangeTimeout.clear(),n.setOpen(!1,md(nd,e)),g?.events.emit(`floating.closed`,e))}),k=ef(()=>{_.handler&&=(cf(n.select(`domReferenceElement`)).removeEventListener(`mousemove`,_.handler),void 0)}),A=ef(()=>{jg(_)});return W.useEffect(()=>k,[k]),W.useEffect(()=>{if(!a)return;function e(e){e.open?v.current=!1:(v.current=e.reason===nd,k(),_.openChangeTimeout.clear(),_.restTimeout.clear(),_.blockMouseMove=!0,_.restTimeoutPending=!1)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[a,i,_,k]),W.useEffect(()=>{if(!a)return;let e=d.current??(p?n.select(`domReferenceElement`):null);if(!Cd(e))return;function t(e){if(_.openChangeTimeout.clear(),_.blockMouseMove=!1,c&&!Bu(_.pointerType))return;let t=Wu(x.current),r=Uu(b.current,`open`,_.pointerType),i=bf(e),a=e.currentTarget??null,o=n.select(`domReferenceElement`),s=a;if(Cd(i)&&!n.context.triggerElements.hasElement(i)){for(let e of n.context.triggerElements.elements())if(yf(e,i)){s=e;break}}Cd(a)&&Cd(o)&&!n.context.triggerElements.hasElement(a)&&yf(a,o)&&(s=o);let l=s==null?!1:D(o,s,i),u=n.select(`open`),d=C.current?.()??n.select(`transitionStatus`)===`ending`,f=!u&&d&&v.current,p=!l&&Cd(s)&&Cd(o)&&yf(o,s)&&f,m=t>0&&!r,h=l&&(u||f)||p,g=!u||l;if(h){n.setOpen(!0,md(nd,e,s));return}m||(r?_.openChangeTimeout.start(r,()=>{g&&n.setOpen(!0,md(nd,e,s))}):g&&n.setOpen(!0,md(nd,e,s)))}function i(e){if(w()){A();return}k();let t=cf(n.select(`domReferenceElement`));_.restTimeout.clear(),_.restTimeoutPending=!1;let i=r.current.floatingContext??m?.();if(!E(e.relatedTarget)){if(y.current&&i){n.select(`open`)||_.openChangeTimeout.clear();let r=d.current;_.handler=y.current({...i,tree:g,x:e.clientX,y:e.clientY,onClose(){A(),k(),S.current&&!w()&&r===n.select(`domReferenceElement`)&&O(e,!0)}}),t.addEventListener(`mousemove`,_.handler),_.handler(e);return}(_.pointerType!==`touch`||!yf(n.select(`floatingElement`),e.relatedTarget))&&O(e)}}return u?Ud(Hd(e,`mousemove`,t,{once:!0}),Hd(e,`mouseenter`,t),Hd(e,`mouseleave`,i)):Ud(Hd(e,`mouseenter`,t),Hd(e,`mouseleave`,i))},[k,A,r,b,O,n,a,y,_,p,D,w,E,c,u,x,d,g,S,m,C]),W.useMemo(()=>{if(!a)return;function e(e){_.pointerType=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e,r=e.currentTarget,i=n.select(`domReferenceElement`),a=n.select(`open`),o=D(i,r,e.target);if(c&&!Bu(_.pointerType))return;if(a&&o&&_.handleCloseOptions?.blockPointerEvents){let e=n.select(`floatingElement`);e&&Mg(_,{scopeElement:_.handleCloseOptions?.getScope?.()??r.ownerDocument.body,referenceElement:r,floatingElement:e})}let s=Wu(x.current);if(a&&!o||s===0||!o&&_.restTimeoutPending&&e.movementX**2+e.movementY**2<2)return;_.restTimeout.clear();function l(){if(_.restTimeoutPending=!1,w())return;let e=n.select(`open`);!_.blockMouseMove&&(!e||o)&&n.setOpen(!0,md(nd,t,r))}_.pointerType===`touch`?Gc.flushSync(()=>{l()}):o&&a?l():(_.restTimeoutPending=!0,_.restTimeout.start(s,l))}}},[a,_,w,D,c,n,x])}function Lg(e=[]){let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=e.map(e=>e?.trigger),a=W.useCallback(t=>Rg(t,e,`reference`),t),o=W.useCallback(t=>Rg(t,e,`floating`),n),s=W.useCallback(t=>Rg(t,e,`item`),r),c=W.useCallback(t=>Rg(t,e,`trigger`),i);return W.useMemo(()=>({getReferenceProps:a,getFloatingProps:o,getItemProps:s,getTriggerProps:c}),[a,o,s,c])}function Rg(e,t,n){let r=new Map,i=n===`item`,a={};n===`floating`&&(a.tabIndex=-1,a[ff]=``);for(let t in e)i&&e&&(t===`active`||t===`selected`)||(a[t]=e[t]);for(let o=0;o<t.length;o+=1){let s,c=t[o]?.[n];s=typeof c==`function`?e?c(e):null:c,s&&zg(a,s,i,r)}return zg(a,e,i,r),a}function zg(e,t,n,r){for(let i in t){let a=t[i];n&&(i===`active`||i===`selected`)||(i.startsWith(`on`)?(r.has(i)||r.set(i,[]),typeof a==`function`&&(r.get(i)?.push(a),e[i]=(...e)=>r.get(i)?.map(t=>t(...e)).find(e=>e!==void 0))):e[i]=a)}}var Bg=.1,Vg=Bg*Bg,Hg=.5;function Ug(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function Wg(e,t,n,r,i,a,o,s,c,l){let u=!1;return Ug(e,t,n,r,i,a)&&(u=!u),Ug(e,t,i,a,o,s)&&(u=!u),Ug(e,t,o,s,c,l)&&(u=!u),Ug(e,t,c,l,n,r)&&(u=!u),u}function Gg(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Kg(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function qg(e={}){let{blockPointerEvents:t=!1}=e,n=new xu,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*Vg;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=bf(r),g=r.type===`mouseleave`,_=yf(u,h),v=yf(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&Cd(r.relatedTarget)&&yf(u,r.relatedTarget))return;function y(){return!!(s&&Rp(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,E=S.width>x.width,D=S.height>x.height,O=(E?x:S).left,k=(E?x:S).right,A=(D?x:S).top,j=(D?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let M=!1;switch(c){case`top`:M=Kg(d,f,O,x.top+1,k,S.bottom-1);break;case`bottom`:M=Kg(d,f,O,S.top+1,k,x.bottom-1);break;case`left`:M=Kg(d,f,S.right-1,j,x.left+1,A);break;case`right`:M=Kg(d,f,x.right-1,j,S.left+1,A);break;default:}if(M)return;if(l&&!Gg(d,f,x)){b();return}if(!g&&p(d,f)){b();return}let N=!1;switch(c){case`top`:{let n=E?Hg/2:Hg*4,r=E||C?e+n:e-n,i=E?e-n:C?e+n:e-n,a=t+Hg+1,o=C||E?S.bottom-Hg:S.top,s=C?E?S.bottom-Hg:S.top:S.bottom-Hg;N=Wg(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=E?Hg/2:Hg*4,r=E||C?e+n:e-n,i=E?e-n:C?e+n:e-n,a=t-Hg,o=C||E?S.top+Hg:S.bottom,s=C?E?S.top+Hg:S.bottom:S.top+Hg;N=Wg(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=D?Hg/2:Hg*4,r=D||w?t+n:t-n,i=D?t-n:w?t+n:t-n,a=e+Hg+1,o=w||D?S.right-Hg:S.left,s=w?D?S.right-Hg:S.left:S.right-Hg;N=Wg(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=D?Hg/2:Hg*4,r=D||w?t+n:t-n,i=D?t-n:w?t+n:t-n,a=e-Hg,o=w||D?S.left+Hg:S.right,s=w?D?S.left+Hg:S.right:S.left+Hg;N=Wg(d,f,a,r,a,i,o,S.top,s,S.bottom);break}default:}N?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}var Jg={...Cg,disabled:Zh(e=>e.disabled),instantType:Zh(e=>e.instantType),isInstantPhase:Zh(e=>e.isInstantPhase),trackCursorAxis:Zh(e=>e.trackCursorAxis),disableHoverablePopup:Zh(e=>e.disableHoverablePopup),lastOpenChangeReason:Zh(e=>e.openChangeReason),closeOnClick:Zh(e=>e.closeOnClick),closeDelay:Zh(e=>e.closeDelay),hasViewport:Zh(e=>e.hasViewport)},Yg=class e extends ag{constructor(e){super({...Xg(),...e},{popupRef:W.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new yg},Jg)}setOpen=(e,t)=>{let n=t.reason,r=n===nd,i=e&&n===`trigger-focus`,a=!e&&(n===`trigger-press`||n===`escape-key`);if(t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let o=()=>{let r={open:e,openChangeReason:n};i?r.instantType=`focus`:a?r.instantType=`dismiss`:n===`trigger-hover`&&(r.instantType=void 0);let o=t.trigger?.id??null;(o||e)&&(r.activeTriggerId=o,r.activeTriggerElement=t.trigger??null),this.update(r)};r?Gc.flushSync(o):o()};static useStore(t,n){let r=iu(()=>new e(n)).current,i=t??r,a=Eg({popupStore:i,onOpenChange:i.setOpen});return i.state.floatingRootContext=a,i}};function Xg(){return{...xg(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}var Zg=lu(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Yg.useStore(l?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});fu(()=>{r===void 0&&p.state.open===!1&&n===!0&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i}),pu(()=>{m&&t&&p.setOpen(!1,md(fd))},[m,t,p]),p.useSyncedValue(`disabled`,t),_g(p);let{forceUnmount:v,transitionStatus:y}=vg(h,p),b=p.select(`floatingRootContext`),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=W.useRef(null);pu(()=>{y===`ending`&&C===`none`||y!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[y,x,C,S,p]),pu(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]);let E=W.useCallback(()=>{p.setOpen(!1,Qg(p,pd))},[p]);W.useImperativeHandle(o,()=>({unmount:v,close:E}),[v,E]);let{getReferenceProps:D,getFloatingProps:O,getTriggerProps:k}=Lg([Vm(b,{enabled:!t,referencePress:()=>p.select(`closeOnClick`)}),Lm(b,{enabled:!t&&a!==`none`,axis:a===`none`?void 0:a})]),A=W.useMemo(()=>D(),[D]),j=W.useMemo(()=>k(),[k]),M=W.useMemo(()=>O(),[O]);return p.useSyncedValues({activeTriggerProps:A,inactiveTriggerProps:j,popupProps:M}),(0,G.jsx)(gu.Provider,{value:p,children:typeof f==`function`?f({payload:_}):f})});function Qg(e,t){let n=md(t);return n.preventUnmountOnClose=()=>{e.set(`preventUnmountingOnClose`,!0)},n}var $g=function(e){return e.open=`data-open`,e.closed=`data-closed`,e[e.startingStyle=lg.startingStyle]=`startingStyle`,e[e.endingStyle=lg.endingStyle]=`endingStyle`,e.anchorHidden=`data-anchor-hidden`,e.side=`data-side`,e.align=`data-align`,e}({}),e_=function(e){return e.popupOpen=`data-popup-open`,e.pressed=`data-pressed`,e}({}),t_={[e_.popupOpen]:``},n_={[e_.popupOpen]:``,[e_.pressed]:``},r_={[$g.open]:``},i_={[$g.closed]:``},a_={[$g.anchorHidden]:``},o_={open(e){return e?t_:null}},s_={open(e){return e?n_:null}},c_={open(e){return e?r_:i_},anchorHidden(e){return e?a_:null}};function l_(e){return Gp(e,`base-ui`)}var u_=W.createContext(void 0);function d_(){return W.useContext(u_)}var f_=function(e){return e[e.popupOpen=e_.popupOpen]=`popupOpen`,e.triggerDisabled=`data-trigger-disabled`,e}({}),p_=uu(function(e,t){let{className:n,render:r,handle:i,payload:a,disabled:o,delay:s,closeOnClick:c=!0,closeDelay:l,id:u,style:d,...f}=e,p=_u(!0),m=i?.store??p;if(!m)throw Error(hu(82));let h=l_(u),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=W.useRef(null),b=s??600,x=l??0,{registerTrigger:S,isMountedByThisTrigger:C}=gg(h,y,m,{payload:a,closeOnClick:c,closeDelay:x}),w=d_(),{delayRef:E,isInstantPhase:D,hasProvider:O}=_d(v,{open:_});m.useSyncedValue(`isInstantPhase`,D);let k=m.useState(`disabled`),A=o??k,j=m.useState(`trackCursorAxis`),M=m.useState(`disableHoverablePopup`),N=Ig(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!M&&j!==`both`?qg():null,restMs(){let e=w?.delay,t=typeof E.current==`object`?E.current.open:void 0,n=b;return O&&(n=t===0?0:s??e??b),n},delay(){let e=typeof E.current==`object`?E.current.close:void 0,t=x;return l==null&&O&&(t=e),{close:t}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`}),P=Og(v,{enabled:!A}).reference,F={open:_},ee=m.useState(`triggerProps`,C);return mm(`button`,e,{state:F,ref:[t,S,y],props:[N,P,ee,{onPointerDown(){m.set(`closeOnClick`,c)},id:h,[f_.triggerDisabled]:A?``:void 0},f],stateAttributesMapping:o_})}),m_=W.createContext(void 0);function h_(){let e=W.useContext(m_);if(e===void 0)throw Error(hu(70));return e}var g_=W.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{portalNode:c,portalSubtree:l}=Cm({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,G.jsxs)(W.Fragment,{children:[l,c&&Gc.createPortal(n,c)]})}),__=W.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return _u().useState(`mounted`)||n?(0,G.jsx)(m_.Provider,{value:n,children:(0,G.jsx)(g_,{ref:t,...r})}):null}),v_=W.createContext(void 0);function y_(){let e=W.useContext(v_);if(e===void 0)throw Error(hu(71));return e}var b_=W.createContext(void 0);function x_(){return W.useContext(b_)?.direction??`ltr`}var S_=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0,offsetParent:d=`real`}=Lf(e,t)||{};if(l==null)return{};let f=tp(u),p={x:n,y:r},m=Uf(i),h=Vf(m),g=await o.getDimensions(l),_=m===`y`,v=_?`top`:`left`,y=_?`bottom`:`right`,b=_?`clientHeight`:`clientWidth`,x=a.reference[h]+a.reference[m]-p[m]-a.floating[h],S=p[m]-a.reference[m],C=d===`real`?await o.getOffsetParent?.(l):s.floating,w=s.floating[b]||a.floating[h];(!w||!await o.isElement?.(C))&&(w=s.floating[b]||a.floating[h]);let E=x/2-S/2,D=w/2-g[h]/2-1,O=Math.min(f[v],D),k=Math.min(f[y],D),A=O,j=w-g[h]-k,M=w/2-g[h]/2+E,N=If(A,M,j),P=!c.arrow&&zf(i)!=null&&M!==N&&a.reference[h]/2-(M<A?O:k)-g[h]/2<0,F=P?M<A?M-A:M-j:0;return{[m]:p[m]+F,data:{[m]:N,centerOffset:M-N-F,...P&&{alignmentOffset:F}},reset:P}}}),C_=(e,t)=>({...S_(e),options:[e,t]}),w_={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:(await Xh().fn(e)).data?.referenceHidden||a}}}},T_={sideX:`left`,sideY:`top`},E_={name:`adaptiveOrigin`,async fn(e){let{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:a,strategy:o,placement:s}=e,c=bd(i),l=c.getComputedStyle(i);if(!(l.transitionDuration!==`0s`&&l.transitionDuration!==``))return{x:t,y:n,data:T_};let u=await a.getOffsetParent?.(i),d={width:0,height:0};if(o===`fixed`&&c?.visualViewport)d={width:c.visualViewport.width,height:c.visualViewport.height};else if(u===c){let e=cf(i);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await a.isElement?.(u)&&(d=await a.getDimensions(u));let f=Rf(s),p=t,m=n;f===`left`&&(p=d.width-(t+r.width)),f===`top`&&(m=d.height-(n+r.height));let h=f===`left`?`right`:T_.sideX,g=f===`top`?`bottom`:T_.sideY;return{x:p,y:m,data:{sideX:h,sideY:g}}}};function D_(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function O_(e,t,n){let{rects:r,placement:i}=e;return{side:D_(t,Rf(i),n),align:zf(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function k_(e){let{anchor:t,positionMethod:n=`absolute`,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,collisionBoundary:s,collisionPadding:c=5,sticky:l=!1,arrowPadding:u=5,disableAnchorTracking:d=!1,keepMounted:f=!1,floatingRootContext:p,mounted:m,collisionAvoidance:h,shiftCrossAxis:g=!1,nodeId:_,adaptiveOrigin:v,lazyFlip:y=!1,externalTree:b}=e,[x,S]=W.useState(null);!m&&x!==null&&S(null);let C=h.side||`flip`,w=h.align||`flip`,E=h.fallbackAxisSide||`end`,D=typeof t==`function`?t:void 0,O=ef(D),k=D?O:t,A=Xd(t),j=Xd(m),M=x_()===`rtl`,N=x||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":M?`left`:`right`,"inline-start":M?`right`:`left`}[r],P=a===`center`?N:`${N}-${a}`,F=c,ee=+(r===`bottom`),I=+(r===`top`),L=+(r===`right`),te=+(r===`left`);typeof F==`number`?F={top:F+ee,right:F+te,bottom:F+I,left:F+L}:F&&={top:(F.top||0)+ee,right:(F.right||0)+te,bottom:(F.bottom||0)+I,left:(F.left||0)+L};let ne={boundary:s===`clipping-ancestors`?`clippingAncestors`:s,padding:F},re=W.useRef(null),R=Xd(i),z=Xd(o),B=[Gh(e=>{let t=O_(e,r,M),n=typeof R.current==`function`?R.current(t):R.current,i=typeof z.current==`function`?z.current(t):z.current;return{mainAxis:n,crossAxis:i,alignmentAxis:i}},[typeof i==`function`?0:i,typeof o==`function`?0:o,M,r])],V=w===`none`&&C!==`shift`,ie=!V&&(l||g||C===`shift`),ae=C===`none`?null:Jh({...ne,padding:{top:F.top+1,right:F.right+1,bottom:F.bottom+1,left:F.left+1},mainAxis:!g&&C===`flip`,crossAxis:w===`flip`?`alignment`:!1,fallbackAxisSideDirection:E}),oe=V?null:Kh(e=>{let t=cf(e.elements.floating).documentElement;return{...ne,rootBoundary:g?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:w!==`none`,crossAxis:ie,limiter:l||g?void 0:qh(e=>{if(!re.current)return{};let{width:t,height:n}=re.current.getBoundingClientRect(),r=Hf(Rf(e.placement)),i=r===`y`?t:n,a=r===`y`?F.left+F.right:F.top+F.bottom;return{offset:i/2+a/2}})}},[ne,l,g,F,w]);C===`shift`||w===`shift`||a===`center`?B.push(oe,ae):B.push(ae,oe),B.push(Yh({...ne,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!j.current)return;let i=e.style;i.setProperty(`--available-width`,`${t}px`),i.setProperty(`--available-height`,`${n}px`);let a=bd(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(`--anchor-width`,`${u}px`),i.setProperty(`--anchor-height`,`${d}px`)}}),C_(()=>({element:re.current||cf(re.current).createElement(`div`),padding:u,offsetParent:`floating`}),[u]),{name:`transformOrigin`,fn(e){let{elements:t,middlewareData:n,placement:a,rects:o,y:s}=e,c=Rf(a),l=Hf(c),u=re.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=u?.clientWidth||0,m=u?.clientHeight||0,h=d+p/2,g=f+m/2,_=Math.abs(n.shift?.y||0),v=o.reference.height/2,y=typeof i==`function`?i(O_(e,r,M)):i,b=_>y,x={top:`${h}px calc(100% + ${y}px)`,bottom:`${h}px ${-y}px`,left:`calc(100% + ${y}px) ${g}px`,right:`${-y}px ${g}px`}[c],S=`${h}px ${o.reference.y+v-s}px`;return t.floating.style.setProperty(`--transform-origin`,ie&&l===`y`&&b?S:x),{}}},w_,v),pu(()=>{!m&&p&&p.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,p]);let se=W.useMemo(()=>({elementResize:!d&&typeof ResizeObserver<`u`,layoutShift:!d&&typeof IntersectionObserver<`u`}),[d]),{refs:ce,elements:le,x:ue,y:de,middlewareData:fe,update:pe,placement:me,context:he,isPositioned:ge,floatingStyles:_e}=Tg({rootContext:p,open:f?m:void 0,placement:P,middleware:B,strategy:n,whileElementsMounted:f?void 0:(...e)=>jh(...e,se),nodeId:_,externalTree:b}),{sideX:ve,sideY:ye}=fe.adaptiveOrigin||T_,be=ge?n:`fixed`,xe=W.useMemo(()=>{let e=v?{position:be,[ve]:ue,[ye]:de}:{position:be,..._e};return ge||(e.opacity=0),e},[v,be,ve,ue,ye,de,_e,ge]),Se=W.useRef(null);pu(()=>{if(!m)return;let e=A.current,t=typeof e==`function`?e():e,n=(A_(t)?t.current:t)||null;n!==Se.current&&(ce.setPositionReference(n),Se.current=n)},[m,ce,k,A]),W.useEffect(()=>{if(!m)return;let e=A.current;typeof e!=`function`&&A_(e)&&e.current!==Se.current&&(ce.setPositionReference(e.current),Se.current=e.current)},[m,ce,k,A]),W.useEffect(()=>{if(f&&m&&le.domReference&&le.floating)return jh(le.domReference,le.floating,pe,se)},[f,m,le,pe,se]);let Ce=Rf(me),we=D_(r,Ce,M),Te=zf(me)||`center`,Ee=!!fe.hide?.referenceHidden;pu(()=>{y&&m&&ge&&S(Ce)},[y,m,ge,Ce]);let De=W.useMemo(()=>({position:`absolute`,top:fe.arrow?.y,left:fe.arrow?.x}),[fe.arrow]),Oe=fe.arrow?.centerOffset!==0;return W.useMemo(()=>({positionerStyles:xe,arrowStyles:De,arrowRef:re,arrowUncentered:Oe,side:we,align:Te,physicalSide:Ce,anchorHidden:Ee,refs:ce,context:he,isPositioned:ge,update:pe}),[xe,De,re,Oe,we,Te,Ce,Ee,ce,he,ge,pe])}function A_(e){return e!=null&&`current`in e}function j_(e){return e===`starting`?Yu:Ju}function M_(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),mm(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},j_(r),i],stateAttributesMapping:c_})}var N_=W.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=Qu,style:g,..._}=e,v=_u(),y=h_(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),E=v.useState(`instantType`),D=v.useState(`transitionStatus`),O=k_({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`hasViewport`)?E_:void 0}),k=M_(e,W.useMemo(()=>({open:b,side:O.side,align:O.align,anchorHidden:O.anchorHidden,instant:S===`none`?E:`tracking-cursor`}),[b,O.side,O.align,O.anchorHidden,S,E]),{styles:O.positionerStyles,transitionStatus:D,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,G.jsx)(v_.Provider,{value:O,children:k})}),P_={...c_,...fg},F_=W.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,o=_u(),{side:s,align:c}=y_(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`);mg({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}});let m=o.useState(`disabled`),h=o.useState(`closeDelay`);return Pg(p,{enabled:!m,closeDelay:h}),mm(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,o.useStateSetter(`popupElement`)],props:[f,j_(d),a],stateAttributesMapping:P_})}),I_=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=W.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),a=W.useMemo(()=>({open:t,close:n}),[t,n]);return(0,G.jsx)(u_.Provider,{value:i,children:(0,G.jsx)(gd,{delay:a,timeoutMs:r,children:e.children})})};function L_(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=L_(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function R_(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=L_(e))&&(r&&(r+=` `),r+=t);return r}var z_=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},B_=(e,t)=>({classGroupId:e,validator:t}),V_=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),H_=`-`,U_=[],W_=`arbitrary..`,G_=e=>{let t=J_(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return q_(e);let n=e.split(H_);return K_(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?z_(i,t):t:i||U_}return n[e]||U_}}},K_=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=K_(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(H_):e.slice(t).join(H_),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},q_=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?W_+r:void 0})(),J_=e=>{let{theme:t,classGroups:n}=e;return Y_(n,t)},Y_=(e,t)=>{let n=V_();for(let r in e){let i=e[r];X_(i,n,r,t)}return n},X_=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Z_(i,t,n,r)}},Z_=(e,t,n,r)=>{if(typeof e==`string`){Q_(e,t,n);return}if(typeof e==`function`){$_(e,t,n,r);return}ev(e,t,n,r)},Q_=(e,t,n)=>{let r=e===``?t:tv(t,e);r.classGroupId=n},$_=(e,t,n,r)=>{if(nv(e)){X_(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(B_(n,e))},ev=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];X_(o,tv(t,a),n,r)}},tv=(e,t)=>{let n=e,r=t.split(H_),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=V_(),n.nextPart.set(t,i)),n=i}return n},nv=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,rv=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},iv=`!`,av=`:`,ov=[],sv=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),cv=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===av){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(iv)?(c=s.slice(0,-1),l=!0):s.startsWith(iv)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return sv(t,l,c,u)};if(t){let e=t+av,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):sv(ov,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},lv=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},uv=e=>({cache:rv(e.cacheSize),parseClassName:cv(e),sortModifiers:lv(e),...G_(e)}),dv=/\s+/,fv=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(dv),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+iv:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},pv=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=mv(n))&&(i&&(i+=` `),i+=r);return i},mv=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=mv(e[r]))&&(n&&(n+=` `),n+=t);return n},hv=(e,...t)=>{let n,r,i,a,o=o=>(n=uv(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=fv(e,n);return i(e,a),a};return a=o,(...e)=>a(pv(...e))},gv=[],_v=e=>{let t=t=>t[e]||gv;return t.isThemeGetter=!0,t},vv=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,yv=/^\((?:(\w[\w-]*):)?(.+)\)$/i,bv=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,xv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Sv=/\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$/,Cv=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,wv=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Tv=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ev=e=>bv.test(e),Y=e=>!!e&&!Number.isNaN(Number(e)),Dv=e=>!!e&&Number.isInteger(Number(e)),Ov=e=>e.endsWith(`%`)&&Y(e.slice(0,-1)),kv=e=>xv.test(e),Av=()=>!0,jv=e=>Sv.test(e)&&!Cv.test(e),Mv=()=>!1,Nv=e=>wv.test(e),Pv=e=>Tv.test(e),Fv=e=>!X(e)&&!Z(e),Iv=e=>Zv(e,ty,Mv),X=e=>vv.test(e),Lv=e=>Zv(e,ny,jv),Rv=e=>Zv(e,ry,Y),zv=e=>Zv(e,ay,Av),Bv=e=>Zv(e,iy,Mv),Vv=e=>Zv(e,$v,Mv),Hv=e=>Zv(e,ey,Pv),Uv=e=>Zv(e,oy,Nv),Z=e=>yv.test(e),Wv=e=>Qv(e,ny),Gv=e=>Qv(e,iy),Kv=e=>Qv(e,$v),qv=e=>Qv(e,ty),Jv=e=>Qv(e,ey),Yv=e=>Qv(e,oy,!0),Xv=e=>Qv(e,ay,!0),Zv=(e,t,n)=>{let r=vv.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Qv=(e,t,n=!1)=>{let r=yv.exec(e);return r?r[1]?t(r[1]):n:!1},$v=e=>e===`position`||e===`percentage`,ey=e=>e===`image`||e===`url`,ty=e=>e===`length`||e===`size`||e===`bg-size`,ny=e=>e===`length`,ry=e=>e===`number`,iy=e=>e===`family-name`,ay=e=>e===`number`||e===`weight`,oy=e=>e===`shadow`,sy=hv(()=>{let e=_v(`color`),t=_v(`font`),n=_v(`text`),r=_v(`font-weight`),i=_v(`tracking`),a=_v(`leading`),o=_v(`breakpoint`),s=_v(`container`),c=_v(`spacing`),l=_v(`radius`),u=_v(`shadow`),d=_v(`inset-shadow`),f=_v(`text-shadow`),p=_v(`drop-shadow`),m=_v(`blur`),h=_v(`perspective`),g=_v(`aspect`),_=_v(`ease`),v=_v(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),Z,X],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[Z,X,c],E=()=>[Ev,`full`,`auto`,...w()],D=()=>[Dv,`none`,`subgrid`,Z,X],O=()=>[`auto`,{span:[`full`,Dv,Z,X]},Dv,Z,X],k=()=>[Dv,`auto`,Z,X],A=()=>[`auto`,`min`,`max`,`fr`,Z,X],j=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],M=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],N=()=>[`auto`,...w()],P=()=>[Ev,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],F=()=>[Ev,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],ee=()=>[Ev,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,Z,X],L=()=>[...b(),Kv,Vv,{position:[Z,X]}],te=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ne=()=>[`auto`,`cover`,`contain`,qv,Iv,{size:[Z,X]}],re=()=>[Ov,Wv,Lv],R=()=>[``,`none`,`full`,l,Z,X],z=()=>[``,Y,Wv,Lv],B=()=>[`solid`,`dashed`,`dotted`,`double`],V=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ie=()=>[Y,Ov,Kv,Vv],ae=()=>[``,`none`,m,Z,X],oe=()=>[`none`,Y,Z,X],se=()=>[`none`,Y,Z,X],ce=()=>[Y,Z,X],le=()=>[Ev,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[kv],breakpoint:[kv],color:[Av],container:[kv],"drop-shadow":[kv],ease:[`in`,`out`,`in-out`],font:[Fv],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[kv],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[kv],shadow:[kv],spacing:[`px`,Y],text:[kv],"text-shadow":[kv],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Ev,X,Z,g]}],container:[`container`],columns:[{columns:[Y,X,Z,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:E()}],"inset-x":[{"inset-x":E()}],"inset-y":[{"inset-y":E()}],start:[{"inset-s":E(),start:E()}],end:[{"inset-e":E(),end:E()}],"inset-bs":[{"inset-bs":E()}],"inset-be":[{"inset-be":E()}],top:[{top:E()}],right:[{right:E()}],bottom:[{bottom:E()}],left:[{left:E()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[Dv,`auto`,Z,X]}],basis:[{basis:[Ev,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[Y,Ev,`auto`,`initial`,`none`,X]}],grow:[{grow:[``,Y,Z,X]}],shrink:[{shrink:[``,Y,Z,X]}],order:[{order:[Dv,`first`,`last`,`none`,Z,X]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:O()}],"col-start":[{"col-start":k()}],"col-end":[{"col-end":k()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:O()}],"row-start":[{"row-start":k()}],"row-end":[{"row-end":k()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...j(),`normal`]}],"justify-items":[{"justify-items":[...M(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...M()]}],"align-content":[{content:[`normal`,...j()]}],"align-items":[{items:[...M(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...M(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":j()}],"place-items":[{"place-items":[...M(),`baseline`]}],"place-self":[{"place-self":[`auto`,...M()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:P()}],"inline-size":[{inline:[`auto`,...F()]}],"min-inline-size":[{"min-inline":[`auto`,...F()]}],"max-inline-size":[{"max-inline":[`none`,...F()]}],"block-size":[{block:[`auto`,...ee()]}],"min-block-size":[{"min-block":[`auto`,...ee()]}],"max-block-size":[{"max-block":[`none`,...ee()]}],w:[{w:[s,`screen`,...P()]}],"min-w":[{"min-w":[s,`screen`,`none`,...P()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...P()]}],h:[{h:[`screen`,`lh`,...P()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...P()]}],"max-h":[{"max-h":[`screen`,`lh`,...P()]}],"font-size":[{text:[`base`,n,Wv,Lv]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,Xv,zv]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,Ov,X]}],"font-family":[{font:[Gv,Bv,t]}],"font-features":[{"font-features":[X]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,Z,X]}],"line-clamp":[{"line-clamp":[Y,`none`,Z,Rv]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,Z,X]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,Z,X]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...B(),`wavy`]}],"text-decoration-thickness":[{decoration:[Y,`from-font`,`auto`,Z,Lv]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Y,`auto`,Z,X]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,Z,X]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,Z,X]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:ne()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},Dv,Z,X],radial:[``,Z,X],conic:[Dv,Z,X]},Jv,Hv]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-bs":[{"border-bs":z()}],"border-w-be":[{"border-be":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":z()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...B(),`hidden`,`none`]}],"divide-style":[{divide:[...B(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":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:[...B(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[Y,Z,X]}],"outline-w":[{outline:[``,Y,Wv,Lv]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Yv,Uv]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Yv,Uv]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:z()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Y,Lv]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Yv,Uv]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Y,Z,X]}],"mix-blend":[{"mix-blend":[...V(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":V()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[Y]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Z,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Y]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:ne()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,Z,X]}],filter:[{filter:[``,`none`,Z,X]}],blur:[{blur:ae()}],brightness:[{brightness:[Y,Z,X]}],contrast:[{contrast:[Y,Z,X]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Yv,Uv]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,Y,Z,X]}],"hue-rotate":[{"hue-rotate":[Y,Z,X]}],invert:[{invert:[``,Y,Z,X]}],saturate:[{saturate:[Y,Z,X]}],sepia:[{sepia:[``,Y,Z,X]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,Z,X]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[Y,Z,X]}],"backdrop-contrast":[{"backdrop-contrast":[Y,Z,X]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,Y,Z,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Y,Z,X]}],"backdrop-invert":[{"backdrop-invert":[``,Y,Z,X]}],"backdrop-opacity":[{"backdrop-opacity":[Y,Z,X]}],"backdrop-saturate":[{"backdrop-saturate":[Y,Z,X]}],"backdrop-sepia":[{"backdrop-sepia":[``,Y,Z,X]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,Z,X]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[Y,`initial`,Z,X]}],ease:[{ease:[`linear`,`initial`,_,Z,X]}],delay:[{delay:[Y,Z,X]}],animate:[{animate:[`none`,v,Z,X]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,Z,X]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:oe()}],"rotate-x":[{"rotate-x":oe()}],"rotate-y":[{"rotate-y":oe()}],"rotate-z":[{"rotate-z":oe()}],scale:[{scale:se()}],"scale-x":[{"scale-x":se()}],"scale-y":[{"scale-y":se()}],"scale-z":[{"scale-z":se()}],"scale-3d":[`scale-3d`],skew:[{skew:ce()}],"skew-x":[{"skew-x":ce()}],"skew-y":[{"skew-y":ce()}],transform:[{transform:[Z,X,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:le()}],"translate-x":[{"translate-x":le()}],"translate-y":[{"translate-y":le()}],"translate-z":[{"translate-z":le()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,Z,X]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,Z,X]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[Y,Wv,Lv,Rv]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function cy(...e){return sy(R_(e))}var ly=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),uy=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),dy=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),fy=e=>{let t=dy(e);return t.charAt(0).toUpperCase()+t.slice(1)},py={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`},my=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},hy=(0,W.createContext)({}),gy=()=>(0,W.useContext)(hy),_y=(0,W.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=gy()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,W.createElement)(`svg`,{ref:c,...py,width:t??l??py.width,height:t??l??py.height,stroke:e??f,strokeWidth:m,className:ly(`lucide`,p,i),...!a&&!my(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,W.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),vy=(e,t)=>{let n=(0,W.forwardRef)(({className:n,...r},i)=>(0,W.createElement)(_y,{ref:i,iconNode:t,className:ly(`lucide-${uy(fy(e))}`,`lucide-${e}`,n),...r}));return n.displayName=fy(e),n},yy=vy(`arrow-big-up`,[[`path`,{d:`M9 19a1 1 0 0 0 1 1h4a1 1 0 0 0 1-1v-6a1 1 0 0 1 1-1h3.293a.707.707 0 0 0 .5-1.207l-7.086-7.086a1 1 0 0 0-1.414 0l-7.086 7.086a.707.707 0 0 0 .5 1.207H8a1 1 0 0 1 1 1z`,key:`106j91`}]]),by=vy(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),xy=vy(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),Sy=vy(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Cy=vy(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),wy=vy(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Ty=vy(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Ey=vy(`command`,[[`path`,{d:`M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3`,key:`11bfej`}]]),Dy=vy(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),Oy=vy(`octagon-x`,[[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z`,key:`2d38gg`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ky=vy(`option`,[[`path`,{d:`M3 3h6l6 18h6`,key:`ph9rgk`}],[`path`,{d:`M14 3h7`,key:`16f0ms`}]]),Ay=vy(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),jy=zl(),My=/(Shift|Control|Ctrl|Command|Cmd|Meta|Alt|Option|⇧|⌃|⌘|⌥|↑|↓|←|→|\s+|\/|\+)/gi,Ny={command:`Command`,control:`Control`,option:`Option`,shift:`Shift`},Py={down:`Arrow down`,left:`Arrow left`,right:`Arrow right`,up:`Arrow up`};function Fy(e){let t=e.toLowerCase();return e===`⌘`||t===`command`||t===`cmd`||t===`meta`?`command`:e===`⌃`||t===`control`||t===`ctrl`?`control`:e===`⌥`||t===`option`||t===`alt`?`option`:e===`⇧`||t===`shift`?`shift`:null}function Iy(e){return e===`↑`?`up`:e===`↓`?`down`:e===`←`?`left`:e===`→`?`right`:null}function Ly(e){let t=e.split(My).filter(e=>e.length>0),n=[];for(let e=0;e<t.length;e+=1){let r=t[e],i=Fy(r),a=Iy(r);if(i){n.push({type:`modifier`,modifier:i,label:Ny[i]});continue}if(a){n.push({type:`arrow`,arrow:a,label:Py[a]});continue}if(r===`/`){n.push({type:`separator`,value:r});continue}if(r===`+`){let n=Fy(t[e-1]??``),r=Fy(t[e+1]??``);if(n||r)continue}r.trim().length!==0&&n.push({type:`text`,value:r})}return n}function Ry(e){let t=(0,jy.c)(4),{modifier:n}=e;if(n===`shift`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(yy,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[0]=e):e=t[0],e}if(n===`control`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(wy,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[1]=e):e=t[1],e}if(n===`command`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Ey,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[2]=e):e=t[2],e}let r;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(ky,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[3]=r):r=t[3],r}function zy(e){let t=(0,jy.c)(4),{arrow:n}=e;if(n===`up`){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(Cy,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[0]=e):e=t[0],e}if(n===`down`){let e;return t[1]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(by,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[1]=e):e=t[1],e}if(n===`left`){let e;return t[2]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,G.jsx)(xy,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[2]=e):e=t[2],e}let r;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsx)(Sy,{"aria-hidden":`true`,className:`size-[10px] shrink-0 stroke-[2.4]`}),t[3]=r):r=t[3],r}function By({value:e}){let t=Ly(e);return t.length===0?null:t.map((e,t)=>e.type===`modifier`?(0,G.jsxs)(W.Fragment,{children:[(0,G.jsx)(Ry,{modifier:e.modifier}),(0,G.jsx)(`span`,{className:`sr-only`,children:e.label})]},`${e.modifier}-${t}`):e.type===`arrow`?(0,G.jsxs)(W.Fragment,{children:[(0,G.jsx)(zy,{arrow:e.arrow}),(0,G.jsx)(`span`,{className:`sr-only`,children:e.label})]},`${e.arrow}-${t}`):e.type===`separator`?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`mx-0.5`,children:e.value},`separator-${t}`):(0,G.jsx)(`span`,{children:e.value},`text-${t}`))}function Vy(e){let t=(0,jy.c)(7),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=cy(`inline-flex items-center gap-1 align-middle leading-none`,r),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=W.Children.map(n,Hy),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,G.jsx)(`span`,{className:i,children:a}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Hy(e){return typeof e==`string`||typeof e==`number`?(0,G.jsx)(By,{value:String(e)}):e}function Uy(e){let t=(0,jy.c)(12),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:r,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a;t[4]===r?a=t[5]:(a=cy(`inline-flex items-center rounded border border-border/70 bg-muted/40 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground data-[active=true]:border-primary/40 data-[active=true]:bg-primary data-[active=true]:text-primary-foreground`,r),t[4]=r,t[5]=a);let o;t[6]===n?o=t[7]:(o=(0,G.jsx)(Vy,{children:n}),t[6]=n,t[7]=o);let s;return t[8]!==i||t[9]!==a||t[10]!==o?(s=(0,G.jsx)(`kbd`,{className:a,...i,children:o}),t[8]=i,t[9]=a,t[10]=o,t[11]=s):s=t[11],s}function Wy(e){let t=(0,jy.c)(6),n,r;t[0]===e?(n=t[1],r=t[2]):({delay:r,...n}=e,t[0]=e,t[1]=n,t[2]=r);let i=r===void 0?0:r,a;return t[3]!==i||t[4]!==n?(a=(0,G.jsx)(I_,{"data-slot":`tooltip-provider`,delay:i,...n}),t[3]=i,t[4]=n,t[5]=a):a=t[5],a}function Gy(e){let t=(0,jy.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(Zg,{"data-slot":`tooltip`,...n}),t[2]=n,t[3]=r),r}function Ky(e){let t=(0,jy.c)(4),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let r;return t[2]===n?r=t[3]:(r=(0,G.jsx)(p_,{"data-slot":`tooltip-trigger`,...n}),t[2]=n,t[3]=r),r}function qy(e){let t=(0,jy.c)(20),n,r,i,a,o,s,c;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7]):({className:r,side:a,sideOffset:o,align:s,alignOffset:c,children:n,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c);let l=a===void 0?`top`:a,u=o===void 0?4:o,d=s===void 0?`center`:s,f=c===void 0?0:c,p;t[8]===r?p=t[9]:(p=cy(`z-50 flex max-h-[min(24rem,calc(100vh-2rem))] max-w-[min(42rem,calc(100vw-2rem))] min-w-0 origin-(--transform-origin) items-center gap-1.5 overflow-x-hidden overflow-y-auto rounded-md bg-secondary px-3 py-1.5 text-xs [overflow-wrap:anywhere] whitespace-pre-wrap text-secondary-foreground has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,r),t[8]=r,t[9]=p);let m;t[10]!==n||t[11]!==i||t[12]!==p?(m=(0,G.jsx)(F_,{"data-slot":`tooltip-content`,className:p,...i,children:n}),t[10]=n,t[11]=i,t[12]=p,t[13]=m):m=t[13];let h;return t[14]!==d||t[15]!==f||t[16]!==l||t[17]!==u||t[18]!==m?(h=(0,G.jsx)(__,{children:(0,G.jsx)(N_,{align:d,alignOffset:f,side:l,sideOffset:u,className:`isolate z-50`,children:m})}),t[14]=d,t[15]=f,t[16]=l,t[17]=u,t[18]=m,t[19]=h):h=t[19],h}function Jy(e){let t=(0,jy.c)(15),{title:n,children:r,kbd:i,rows:a,side:o,align:s,sideOffset:c,className:l}=e;if(!n)return r;let u;t[0]===r?u=t[1]:(u=(0,G.jsx)(Ky,{render:r}),t[0]=r,t[1]=u);let d;t[2]!==i||t[3]!==a||t[4]!==n?(d=a?(0,G.jsx)(`span`,{className:`flex flex-col gap-1`,children:a.map(Yy)}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`min-w-0`,children:n}),i?(0,G.jsx)(Uy,{"data-slot":`kbd`,children:i}):null]}),t[2]=i,t[3]=a,t[4]=n,t[5]=d):d=t[5];let f;t[6]!==s||t[7]!==l||t[8]!==o||t[9]!==c||t[10]!==d?(f=(0,G.jsx)(qy,{side:o,align:s,sideOffset:c,className:l,children:d}),t[6]=s,t[7]=l,t[8]=o,t[9]=c,t[10]=d,t[11]=f):f=t[11];let p;return t[12]!==u||t[13]!==f?(p=(0,G.jsxs)(Gy,{children:[u,f]}),t[12]=u,t[13]=f,t[14]=p):p=t[14],p}function Yy(e,t){return(0,G.jsxs)(`span`,{className:`flex items-center justify-between gap-3`,children:[(0,G.jsx)(`span`,{className:`min-w-0`,children:e.title}),e.kbd?(0,G.jsx)(Uy,{"data-slot":`kbd`,children:e.kbd}):null]},t)}function Xy(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var Zy=e=>{switch(e){case`success`:return eb;case`info`:return nb;case`warning`:return tb;case`error`:return rb;default:return null}},Qy=Array(12).fill(0),$y=({visible:e,className:t})=>W.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},W.createElement(`div`,{className:`sonner-spinner`},Qy.map((e,t)=>W.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),eb=W.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},W.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),tb=W.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},W.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),nb=W.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},W.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),rb=W.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},W.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ib=W.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},W.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),W.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ab=()=>{let[e,t]=W.useState(document.hidden);return W.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},ob=1,sb=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:ob++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],W.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(lb(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!W.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!W.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!W.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!W.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||ob++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},cb=(e,t)=>{let n=t?.id||ob++;return sb.addToast({title:e,...t,id:n}),n},lb=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ub=Object.assign(cb,{success:sb.success,info:sb.info,warning:sb.warning,error:sb.error,custom:sb.custom,message:sb.message,promise:sb.promise,dismiss:sb.dismiss,loading:sb.loading},{getHistory:()=>sb.toasts,getToasts:()=>sb.getActiveToasts()});Xy(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function db(e){return e.label!==void 0}var fb=3,pb=`24px`,mb=`16px`,hb=4e3,gb=356,_b=14,vb=45,yb=200;function bb(...e){return e.filter(Boolean).join(` `)}function xb(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Sb=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:E=`Close toast`}=e,[D,O]=W.useState(null),[k,A]=W.useState(null),[j,M]=W.useState(!1),[N,P]=W.useState(!1),[F,ee]=W.useState(!1),[I,L]=W.useState(!1),[te,ne]=W.useState(!1),[re,R]=W.useState(0),[z,B]=W.useState(0),V=W.useRef(n.duration||y||hb),ie=W.useRef(null),ae=W.useRef(null),oe=c===0,se=c+1<=o,ce=n.type,le=n.dismissible!==!1,ue=n.className||``,de=n.descriptionClassName||``,fe=W.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),pe=W.useMemo(()=>n.closeButton??p,[n.closeButton,p]),me=W.useMemo(()=>n.duration||y||hb,[n.duration,y]),he=W.useRef(0),ge=W.useRef(0),_e=W.useRef(0),ve=W.useRef(null),[ye,be]=b.split(`-`),xe=W.useMemo(()=>s.reduce((e,t,n)=>n>=fe?e:e+t.height,0),[s,fe]),Se=ab(),Ce=n.invert||t,we=ce===`loading`;ge.current=W.useMemo(()=>fe*x+xe,[fe,xe]),W.useEffect(()=>{V.current=me},[me]),W.useEffect(()=>{M(!0)},[]),W.useEffect(()=>{let e=ae.current;if(e){let t=e.getBoundingClientRect().height;return B(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),W.useLayoutEffect(()=>{if(!j)return;let e=ae.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,B(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[j,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Te=W.useCallback(()=>{P(!0),R(ge.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},yb)},[n,d,a,ge]);W.useEffect(()=>{if(n.promise&&ce===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Se?(()=>{if(_e.current<he.current){let e=new Date().getTime()-he.current;V.current-=e}_e.current=new Date().getTime()})():V.current!==1/0&&(he.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Te()},V.current)),()=>clearTimeout(e)},[u,i,n,ce,Se,Te]),W.useEffect(()=>{n.delete&&(Te(),n.onDismiss==null||n.onDismiss.call(n,n))},[Te,n.delete]);function Ee(){return w?.loading?W.createElement(`div`,{className:bb(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":ce===`loading`},w.loading):W.createElement($y,{className:bb(C?.loader,n?.classNames?.loader),visible:ce===`loading`})}let De=n.icon||w?.[ce]||Zy(ce);return W.createElement(`li`,{tabIndex:0,ref:ae,className:bb(_,ue,C?.toast,n?.classNames?.toast,C?.default,C?.[ce],n?.classNames?.[ce]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":j,"data-promise":!!n.promise,"data-swiped":te,"data-removed":N,"data-visible":se,"data-y-position":ye,"data-x-position":be,"data-index":c,"data-front":oe,"data-swiping":F,"data-dismissible":le,"data-type":ce,"data-invert":Ce,"data-swipe-out":I,"data-swipe-direction":k,"data-expanded":!!(u||S&&j),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${N?re:ge.current}px`,"--initial-height":S?`auto`:`${z}px`,...m,...n.style},onDragEnd:()=>{ee(!1),O(null),ve.current=null},onPointerDown:e=>{e.button!==2&&(we||!le||(ie.current=new Date,R(ge.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(ee(!0),ve.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(I||!le)return;ve.current=null;let e=Number(ae.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(ae.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-ie.current?.getTime(),i=D===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=vb||a>.11){R(ge.current),n.onDismiss==null||n.onDismiss.call(n,n),A(D===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Te(),L(!0);return}else{var o,s;(o=ae.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=ae.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}ne(!1),ee(!1),O(null)},onPointerMove:t=>{var n,r;if(!ve.current||!le||window.getSelection()?.toString().length>0)return;let i=t.clientY-ve.current.y,a=t.clientX-ve.current.x,o=e.swipeDirections??xb(b);!D&&(Math.abs(a)>1||Math.abs(i)>1)&&O(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(D===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(D===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&ne(!0),(n=ae.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=ae.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},pe&&!n.jsx&&ce!==`loading`?W.createElement(`button`,{"aria-label":E,"data-disabled":we,"data-close-button":!0,onClick:we||!le?()=>{}:()=>{Te(),n.onDismiss==null||n.onDismiss.call(n,n)},className:bb(C?.closeButton,n?.classNames?.closeButton)},w?.close??ib):null,(ce||n.icon||n.promise)&&n.icon!==null&&(w?.[ce]!==null||n.icon)?W.createElement(`div`,{"data-icon":``,className:bb(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Ee():null,n.type===`loading`?null:De):null,W.createElement(`div`,{"data-content":``,className:bb(C?.content,n?.classNames?.content)},W.createElement(`div`,{"data-title":``,className:bb(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?W.createElement(`div`,{"data-description":``,className:bb(v,de,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),W.isValidElement(n.cancel)?n.cancel:n.cancel&&db(n.cancel)?W.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{db(n.cancel)&&le&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Te())},className:bb(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,W.isValidElement(n.action)?n.action:n.action&&db(n.action)?W.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{db(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Te())},className:bb(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Cb(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function wb(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?mb:pb;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Tb=W.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=fb,toastOptions:g,dir:_=Cb(),gap:v=_b,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=W.useState([]),C=W.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=W.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[E,D]=W.useState([]),[O,k]=W.useState(!1),[A,j]=W.useState(!1),[M,N]=W.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=W.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),ee=W.useRef(null),I=W.useRef(!1),L=W.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||sb.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return W.useEffect(()=>sb.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{Gc.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),W.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),W.useEffect(()=>{x.length<=1&&k(!1)},[x]),W.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),W.useEffect(()=>{if(P.current)return()=>{ee.current&&(ee.current.focus({preventScroll:!0}),ee.current=null,I.current=!1)}},[P.current]),W.createElement(`section`,{ref:t,"aria-label":`${b} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?W.createElement(`ol`,{key:t,dir:_===`auto`?Cb():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${gb}px`,"--gap":`${v}px`,...m,...wb(l,u)},onBlur:e=>{I.current&&!e.currentTarget.contains(e.relatedTarget)&&(I.current=!1,ee.current&&=(ee.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||I.current||(I.current=!0,ee.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>W.createElement(Sb,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:L,toasts:C.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),Eb=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function Db(e){let t=(0,jy.c)(15),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({className:n,"aria-label":i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let a=i===void 0?`Loading`:i,[o,s]=W.useState(0),c,l;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(c=()=>{if(window.matchMedia(`(prefers-reduced-motion: reduce)`).matches)return;let e=window.setInterval(()=>{s(Ob)},80);return()=>window.clearInterval(e)},l=[],t[4]=c,t[5]=l):(c=t[4],l=t[5]),W.useEffect(c,l);let u;t[6]===n?u=t[7]:(u=cy(`pointer-events-none inline-flex size-4 shrink-0 items-center justify-center font-mono leading-none text-primary select-none`,n),t[6]=n,t[7]=u);let d=Eb[o],f;t[8]===d?f=t[9]:(f=(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`leading-none`,children:d}),t[8]=d,t[9]=f);let p;return t[10]!==a||t[11]!==r||t[12]!==u||t[13]!==f?(p=(0,G.jsx)(`span`,{role:`status`,"aria-label":a,className:u,...r,children:f}),t[10]=a,t[11]=r,t[12]=u,t[13]=f,t[14]=p):p=t[14],p}function Ob(e){return(e+1)%Eb.length}var kb=e=>{let t=(0,jy.c)(8),n;t[0]===e?n=t[1]:({...n}=e,t[0]=e,t[1]=n);let{theme:r}=Yl(),i=r===void 0?`system`:r,a,o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a={success:(0,G.jsx)(Ty,{className:`size-4`}),info:(0,G.jsx)(Dy,{className:`size-4`}),warning:(0,G.jsx)(Ay,{className:`size-4`}),error:(0,G.jsx)(Oy,{className:`size-4`}),loading:(0,G.jsx)(Db,{className:`size-4`})},o={"--normal-bg":`var(--popover)`,"--normal-text":`var(--popover-foreground)`,"--normal-border":`var(--border)`,"--border-radius":`var(--radius)`},t[2]=a,t[3]=o):(a=t[2],o=t[3]);let s;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(s={classNames:{toast:`cn-toast`}},t[4]=s):s=t[4];let c;return t[5]!==n||t[6]!==i?(c=(0,G.jsx)(Tb,{theme:i,className:`toaster group`,icons:a,style:o,toastOptions:s,...n}),t[5]=n,t[6]=i,t[7]=c):c=t[7],c},Ab=`pico-theme`,jb=`pico-draft-directory`,Mb=`pico-sidebar-directories`,Nb=`pico-collapsed-directories`,Pb=`pico-pinned-sessions`,Fb=`pico-recent-directories`,Ib=`pico-session-done-sound`,Lb=`pico-session-done-desktop-notifications`,Rb=`pico-hide-tools`,zb=`pico-center-messages`,Bb=`pico-auto-scroll`,Vb=`pico-right-sidebar-open`,Hb=`pico-right-sidebar-active-tab`,Ub=`pico-right-sidebar-widths`,Wb=`pico-right-sidebar-file-tree-width`,Gb=`pico-right-sidebar-history-height`,Kb=`pico-prompt-drafts`,qb=`pico-context-id`;function Jb(){return typeof crypto<`u`&&typeof crypto.randomUUID==`function`?`ctx-${crypto.randomUUID()}`:`ctx-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function Yb(e){try{return window.localStorage.getItem(e)}catch{return null}}function Xb(e,t){try{return window.localStorage.setItem(e,t),!0}catch{return!1}}function Zb(e){try{return window.sessionStorage.getItem(e)}catch{return null}}function Qb(e,t){try{return window.sessionStorage.setItem(e,t),!0}catch{return!1}}function $b(e){if(!Array.isArray(e))return[];let t=[],n=new Set;for(let r of e){let e=typeof r==`string`?r.trim():``;!e||n.has(e)||(n.add(e),t.push(e))}return t}function ex(e={}){return e.path?`path:${e.path}`:e.id?`id:${e.id}`:``}function tx(e){if(!Array.isArray(e))return[];let t=[],n=new Set;for(let r of e){let e=typeof r==`string`?r.trim():``;!e||n.has(e)||(n.add(e),t.push(e))}return t}function nx(e={}){return e.sessionId?`session:${e.sessionId}`:e.sessionFile?`file:${e.sessionFile}`:`draft:${e.cwd?.trim()||`default`}`}function rx(){try{let e=Zb(Kb);if(!e)return{};let t=JSON.parse(e);return t&&typeof t==`object`?t:{}}catch{return{}}}function ix(e={}){let t=rx()[nx(e)];return typeof t==`string`?t:void 0}function ax(e={},t=``){let n=nx(e),r=rx(),i=typeof t==`string`?t:``;return i?r[n]=i:delete r[n],Qb(Kb,JSON.stringify(r))}function ox(){try{let e=Yb(Mb);return e==null?{directories:[],hasStoredValue:!1}:{directories:$b(JSON.parse(e)),hasStoredValue:!0}}catch{return{directories:[],hasStoredValue:!1}}}function sx(){try{let e=Yb(Pb);return e?tx(JSON.parse(e)):[]}catch{return[]}}function cx(){try{let e=Yb(Nb);if(!e)return{};let t=JSON.parse(e);return!t||typeof t!=`object`?{}:Object.fromEntries(Object.entries(t).map(([e,t])=>[e.trim(),!!t]).filter(([e])=>!!e))}catch{return{}}}function lx(){return(Yb(`pico-draft-directory`)??``).trim()}function ux(){try{let e=Yb(Fb);return e?$b(JSON.parse(e)):[]}catch{return[]}}function dx(e){return e===`light`||e===`dark`||e===`system`?e:`system`}function fx(){return Yb(Rb)===`1`}function px(){return Yb(zb)===`1`}function mx(){let e=Yb(Bb);return e==null?!0:e!==`0`}function hx(){return Yb(Vb)===`1`}function gx(){let e=Yb(Ib);return e==null?!0:e!==`0`}function _x(){let e=Yb(Lb);return e==null?!0:e!==`0`}var vx=new Set([`read`,`grep`,`glob`,`find`,`ls`,`list`,`rg`]),yx=new Set([`find`,`grep`,`ls`,`rg`]),bx=new Set([`cd`,`export`,`pwd`,`set`]),xx=new Set([`command`,`env`,`noglob`,`sudo`,`time`]);function Sx(e){if(e){if(typeof e==`object`)return e;if(typeof e==`string`)try{let t=JSON.parse(e);return t&&typeof t==`object`?t:void 0}catch{return}}}function Cx(e,t){let n=e?.[t];return typeof n==`string`&&n.trim()?n.trim():``}function wx(e){if(typeof e==`string`&&e.trim())return e.trim();let t=Sx(e);return Cx(t,`description`)||Cx(t,`command`)||Cx(t,`path`)||Cx(t,`filePath`)}function Tx(e,t){if(e!==`bash`)return``;if(typeof t==`string`){let e=t.trim();if(!e)return``;try{let t=JSON.parse(e);if(t&&typeof t==`object`&&`command`in t){let n=t.command;return typeof n==`string`?n.trim():e}}catch{return e}return e}return Cx(Sx(t),`command`)||wx(t)}function Ex(e){let t=e.replace(/\\/g,`/`).trim();if(!t)return``;let n=t.split(`/`);return n[n.length-1]||t}function Dx(e){let t=e.trim();for(;t;){let e=t.match(/^(?:env\s+)?[A-Za-z_][A-Za-z0-9_]*=(?:"[^"]*"|'[^']*'|\S*)\s*/);if(e){t=t.slice(e[0].length).trimStart();continue}let n=t.match(/^([./A-Za-z0-9_-]+)\b/);if(!n)return``;let r=n[1]||``,i=Ex(r);if(!xx.has(i))return i;t=t.slice(r.length).trimStart()}return``}function Ox(e,t){if(e!==`bash`)return``;let n=Tx(e,t).split(/(?:&&|\|\||;)/);for(let e of n){let t=Dx(e);if(!(!t||bx.has(t)))return yx.has(t)?t:``}return``}function kx(e,t){return vx.has(e||``)||Ox(e,t)?`explore`:void 0}function Ax(e){return`data:${e.mimeType};base64,${e.data}`}function jx(e){if(!e||typeof e!=`object`)return null;let t=typeof e.mimeType==`string`?e.mimeType.trim():``,n=typeof e.data==`string`?e.data.trim():``;if(!n)return null;let r=n.match(/^data:([^;,]+);base64,(.+)$/i);return r&&(t||=r[1]??t,n=r[2]??``),!t||!/^image\//i.test(t)||!n?null:{type:`image`,mimeType:t,data:n,previewUrl:Ax({mimeType:t,data:n})}}function Mx(e){return typeof e?.content==`string`?e.content:Array.isArray(e?.content)?e.content.filter(e=>e?.type===`text`).map(e=>e.text||``).join(`
|
|
13
13
|
`):``}function Nx(e){return Array.isArray(e?.content)?e.content.filter(e=>e?.type===`image`).map(e=>jx(e)).filter(e=>!!e):[]}function Px(e){return e===`steer`||e===`followUp`?e:void 0}function Fx(e){return e==null?``:typeof e==`object`?Array.isArray(e)?`[${e.map(e=>Fx(e)).join(`,`)}]`:`{${Object.keys(e).sort().map(t=>`${JSON.stringify(t)}:${Fx(e[t])}`).join(`,`)}}`:JSON.stringify(e)}function Ix(e,t){return Fx(e)===Fx(t)}function Lx(e=[],t=[]){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1){let r=e[n],i=t[n];if(!r||!i||r.mimeType!==i.mimeType||r.data!==i.data||r.previewUrl!==i.previewUrl)return!1}return!0}function Rx(e,t){return e.text===t.text&&Lx(e.images,t.images)&&!!e.queued==!!t.queued&&e.streamingBehavior===t.streamingBehavior}function zx(e,t){return(e.itemKey||``)===(t.itemKey||``)&&Rx(e,t)}function Bx(e,t){if(!e||!t||e.type!==t.type)return!1;switch(e.type){case`text`:return t.type===`text`&&e.text===t.text&&!!e.isError==!!t.isError;case`thinking`:return t.type===`thinking`&&e.text===t.text&&(e.summaryLabel||``)===(t.summaryLabel||``);case`tool`:return t.type===`tool`&&(e.callId||``)===(t.callId||``)&&(e.name||``)===(t.name||``)&&Fx(e.args)===Fx(t.args)&&e.output===t.output&&Fx(e.details)===Fx(t.details)&&!!e.isError==!!t.isError&&!!e.running==!!t.running;case`compaction`:return t.type===`compaction`&&e.summary===t.summary&&e.tokensBefore===t.tokensBefore;default:return!1}}function Vx(e,t){return(e.blockKey||``)===(t.blockKey||``)&&Bx(e,t)}function Hx(e,t){return e===t?!0:!e||!t?!1:e.id===t.id&&(e.provider||``)===(t.provider||``)&&(e.name||``)===(t.name||``)&&!!e.reasoning==!!t.reasoning}function Ux(e,t){return Hx(e.model,t.model)&&e.done===!1==(t.done===!1)}function Wx(e,t){if(!e||!t||e.kind!==t.kind||(e.itemKey||``)!==(t.itemKey||``))return!1;if(e.kind===`user`&&t.kind===`user`)return(e.pendingId||``)===(t.pendingId||``)&&zx(e,t);if(e.kind!==`assistant`||t.kind!==`assistant`||!!e.streaming!=!!t.streaming||!Ux(e,t)||e.blocks.length!==t.blocks.length)return!1;for(let n=0;n<e.blocks.length;n+=1)if(!Vx(e.blocks[n],t.blocks[n]))return!1;return!0}function Gx(e,t){if(t)return e.find(e=>e.blockKey===t)}function Kx(e){return e?.renderKey||e?.blockKey||``}function qx(e,t){let n=Kx(t);return!n||e.renderKey===n?e:{...e,renderKey:n}}function Jx(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!Bx(e[n],t[n]))return!1;return!0}function Yx(e,t){let n=e.length!==t.length,r=[];for(let i=0;i<t.length;i+=1){let a=t[i],o=Gx(e,a.blockKey)||e[i];if(o&&Vx(o,a)){r.push(o);continue}if(n=!0,o?.type===a.type&&((o.blockKey||``)===(a.blockKey||``)||Bx(o,a))){r.push(qx(a,o));continue}r.push(a)}return n?r:e}function Xx(e){return e?.renderKey||e?.itemKey||``}function Zx(e,t){let n=Xx(t);return!n||e.renderKey===n?e:{...e,renderKey:n}}function Qx(e,t){if(e.length===0)return t;let n=new Map,r=new Map;for(let t of e){t.itemKey&&!n.has(t.itemKey)&&n.set(t.itemKey,t);let e=Xx(t);e&&!r.has(e)&&r.set(e,t)}let i=e.length!==t.length,a=[];for(let o=0;o<t.length;o+=1){let s=t[o],c=Xx(s),l=(s.itemKey?n.get(s.itemKey):void 0)||(c?r.get(c):void 0)||e[o];if(!l||l.kind!==s.kind){i=!0,a.push(s);continue}if(Wx(l,s)){a.push(l);continue}if(l.kind===`user`&&s.kind===`user`&&Rx(l,s)){i=!0,a.push(Zx(s,l));continue}if(l.kind===`assistant`&&s.kind===`assistant`){let e=Yx(l.blocks,s.blocks),t=(l.itemKey||``)===(s.itemKey||``),n=Xx(l)===Xx(s),r=!!l.streaming&&!s.streaming&&Jx(l.blocks,s.blocks),o=t||n||r?Zx(s,l):s;if(t&&e===l.blocks&&!!l.streaming==!!s.streaming&&Ux(l,s)){a.push(l);continue}i=!0,a.push(e===o.blocks?o:{...o,blocks:e});continue}i=!0,a.push(s)}return i?a:e}function $x(e){let t=typeof e?.stopReason==`string`?e.stopReason:``,n=typeof e?.errorMessage==`string`?e.errorMessage.trim():``;return t===`aborted`?n&&n!==`Request was aborted`?n:`Operation aborted`:t===`error`?`Error: ${n||`Unknown error`}`:``}function eS(e){let t=typeof e?.stopReason==`string`?e.stopReason:``;return t===`aborted`||t===`error`}function tS(e){let t=typeof e?.model==`string`?e.model.trim():``;if(!t)return;let n=typeof e?.provider==`string`?e.provider.trim():``;return{id:t,...n?{provider:n}:{}}}function nS(e){let t=tS(e);return t?{model:t}:{}}function rS(e,t){let n=!1,r=e.map(e=>e.type!==`tool`||e.output.trim()?e:(n=!0,{...e,output:t,isError:!0,running:!1}));return n?r:e}function iS(e,t=`assistant`){let n=[],r=new Map,i=Array.isArray(e?.content)?e.content:[],a=$x(e),o=eS(e);for(let e=0;e<i.length;e+=1){let a=i[e],o=`${t}:part:${e}`;if(a?.type===`text`&&n.push({type:`text`,blockKey:`${o}:text`,text:a.text||``}),a?.type===`thinking`){let e=a.thinking||``;e.trim()&&n.push({type:`thinking`,blockKey:`${o}:thinking`,text:e,...typeof a.summaryLabel==`string`?{summaryLabel:a.summaryLabel}:{}})}if(a?.type===`toolCall`){let e=typeof a.id==`string`?a.id.trim():``,i=typeof a.name==`string`?a.name:void 0,s=kx(i,a.arguments),c={type:`tool`,blockKey:e?`${t}:tool:${e}`:`${o}:tool`,...e?{callId:e}:{},...i?{name:i}:{},...s?{category:s}:{},args:a.arguments,output:``,details:void 0,isError:!1,running:!0},l=e?r.get(e):void 0,u=l===void 0?void 0:n[l];if(l!==void 0&&u?.type===`tool`){n[l]={...u,...c.name?{name:c.name}:{},...c.category||u.category?{category:c.category||u.category}:{},args:c.args,running:!0};continue}e&&r.set(e,n.length),n.push(c)}}return a&&(n.some(e=>e.type===`tool`)?n=rS(n,a):n.push({type:`text`,blockKey:`${t}:stop`,text:a,...o?{isError:!0}:{}})),n}function aS(e,t,n=`compaction`){return{kind:`assistant`,itemKey:n,blocks:[{type:`compaction`,blockKey:`${n}:compaction`,summary:typeof e==`string`?e:``,tokensBefore:Number.isFinite(Number(t))?Number(t):0}],streaming:!1}}function oS(e,t,n){if(t)for(let r=e.length-1;r>=0;--r){let i=e[r];if(i?.kind!==`assistant`)continue;let a=i.blocks.find(e=>e.type===`tool`&&e.callId===t);if(a){n(a);return}}}function sS(e,t){return!t||e.output===t.output&&e.details===t.details&&e.isError===t.isError&&!e.running?e:{...e,output:t.output,details:t.details,isError:t.isError,running:!1}}function cS(e,t){if(t.size===0)return e;let n=!1,r=e.map(e=>{if(e.type!==`tool`||!e.callId)return e;let r=sS(e,t.get(e.callId));return r!==e&&(n=!0),r});return n?r:e}function lS(e){let t=e.previousBlocks??[],n=t=>e.toolResultsByCallId?cS(t,e.toolResultsByCallId):t;if(t.length===0)return n(e.nextBlocks);let r=new Map;t.forEach(e=>{e.type===`tool`&&e.callId&&r.set(e.callId,e)});let i=new Set,a=e.nextBlocks.map((n,a)=>{if(n.type===`tool`&&n.callId){i.add(n.callId);let e=r.get(n.callId);if(e)return{...n,renderKey:Kx(e),category:n.category||e.category,output:e.output||n.output,details:e.details??n.details,isError:e.isError||n.isError,running:e.running===!1?!1:n.running}}let o=e.preserveBlockRenderKeysByIndex?t[a]:void 0;return o?.type===n.type?qx(n,o):n});if(!e.preserveMissingTools)return n(a);let o=t.map((e,t)=>({block:e,index:t})).filter(e=>e.block.type===`tool`&&!!e.block.callId&&!i.has(e.block.callId||``));if(o.length===0)return n(a);let s=[],c=0;for(let e=0;e<a.length;e+=1){for(;c<o.length&&o[c].index<=e;)s.push(o[c].block),c+=1;s.push(a[e])}for(;c<o.length;)s.push(o[c].block),c+=1;return n(s)}function uS(e){return lS({previousBlocks:e.previousStreamingItem?.blocks,nextBlocks:e.nextBlocks,toolResultsByCallId:e.toolResultsByCallId,preserveMissingTools:!0})}function dS(e,t){return e.push(t),t}function fS(e){for(let t=e.length-1;t>=0;--t){let n=e[t];if(n?.kind===`assistant`&&n.streaming)return n}return null}function pS(e){return e.kind===`user`&&(!!e.pendingId||e.itemKey?.startsWith(`pending:`))}function mS(e){return e.kind===`user`&&!!e.pendingId?.startsWith(`optimistic:`)}function hS(e,t){return e.text===t.text&&Lx(e.images,t.images)}function gS(e,t,n){let r=Math.max(0,n);for(let n=r;n<t.length;n+=1){let r=t[n];if(r?.kind===`user`&&hS(e,r))return!0}return!1}function _S(e){if(!e.preserveOptimisticItems)return[];let t=[];for(let n of yS(e.previousItems)){let r=e.previousItems.indexOf(n);gS(n,e.committedItems,r)||t.push(n)}return t}function vS(e){return e.filter(e=>pS(e)||bS(e)?!1:!(e.kind===`assistant`&&e.streaming))}function yS(e){return e.filter(e=>e.kind===`user`&&mS(e)&&!e.queued)}function bS(e){return e.kind===`user`&&!!e.queued}function xS(e){let t=e.itemKey?.match(/^message:(\d+)$/);return t?Number(t[1]):-1}function SS(e){let t=-1;for(let n of e)t=Math.max(t,xS(n));return t+1}function CS(e,t){let n=new Set(t.map(e=>Xx(e)).filter(Boolean));if(!n.has(e))return e;let r=1;for(;n.has(`${e}:streaming:${r}`);)r+=1;return`${e}:streaming:${r}`}function wS(e){let t=Xx(e.previousStreamingItem||void 0);if(t&&!e.items.some(e=>Xx(e)===t))return t;let n=e.items.filter(e=>e.kind===`user`&&mS(e)).length,r=(e.hasMessages?e.messages.length:SS(e.items))+n;return CS(`message:${Math.max(0,r)}`,e.items)}function TS(e){let t=e?.metadata&&typeof e.metadata==`object`?e.metadata:void 0;return!!(e.queued||t?.queued)}function ES(e){return Array.isArray(e.items)?e.items.filter(e=>!pS(e)&&!bS(e)):null}function DS(e,t=[]){let n=ES(e),r=Array.isArray(n),i=Array.isArray(e.messages),a=Array.isArray(e.pendingUserMessages),o=Object.prototype.hasOwnProperty.call(e,`streamingMessage`),s=typeof e.streaming==`boolean`||o;if(!r&&!i&&!a&&!s)return{items:t,currentAssistantItem:fS(t)};if(n){let r=n.filter(e=>e.kind===`assistant`&&e.streaming),i=n.filter(e=>!(e.kind===`assistant`&&e.streaming)),a=!!e.draft||r.length>0||!!e.streaming;i.push(..._S({previousItems:t,committedItems:i,preserveOptimisticItems:a})),i.push(...r);let o=Qx(t,i);return{items:o,currentAssistantItem:fS(o)}}let c=i?[]:vS(t),l=new Map,u=Array.isArray(e.messages)?e.messages:[];for(let e=0;e<u.length;e+=1){let t=u[e],n=`message:${e}`;if(t.role===`user`){if(TS(t))continue;c.push({kind:`user`,itemKey:n,text:Mx(t),images:Nx(t),streamingBehavior:Px(t.streamingBehavior??t.deliverAs??t?.metadata?.streamingBehavior??t?.metadata?.deliverAs)});continue}if(t.role===`assistant`){dS(c,{kind:`assistant`,itemKey:n,blocks:iS(t,n),streaming:!1,...nS(t)});continue}if(t.role===`compactionSummary`){c.push(aS(t.summary,t.tokensBefore,n));continue}if(t.role===`toolResult`){let e=typeof t.toolCallId==`string`?t.toolCallId.trim():``,n={output:Mx(t),details:t.details,isError:!!t.isError};e&&l.set(e,n),oS(c,e,e=>{e.output=n.output,e.details=n.details,e.isError=n.isError,e.running=!1})}}let d=fS(t),f=typeof e.streaming==`boolean`?e.streaming:e.streamingMessage==null?!!d:!0;if(f)for(let e=c.length-1;e>=0;--e){let t=c[e];if(t?.kind===`assistant`){c[e]={...t,done:!1};break}}let p=_S({previousItems:t,committedItems:c,preserveOptimisticItems:!!e.draft||f});if(c.push(...p),f)if(e.streamingMessage?.role===`assistant`){let t=wS({hasMessages:i,messages:u,items:c,previousStreamingItem:d});c.push({kind:`assistant`,itemKey:`streaming`,renderKey:t,blocks:uS({previousStreamingItem:d,nextBlocks:iS(e.streamingMessage,t),toolResultsByCallId:l}),streaming:!0,done:!1,...nS(e.streamingMessage)})}else if(d&&!o){let e=cS(d.blocks,l);c.push(e===d.blocks?d:{...d,blocks:e})}else{let e=wS({hasMessages:i,messages:u,items:c,previousStreamingItem:d});c.push({kind:`assistant`,itemKey:`streaming`,renderKey:e,blocks:uS({previousStreamingItem:d,nextBlocks:[],toolResultsByCallId:l}),streaming:!0,done:!1})}let m=Qx(t,c);return{items:m,currentAssistantItem:fS(m)}}function OS(e){if(typeof e!=`string`)return``;let t=e.replace(/\r\n?/g,`
|
|
14
14
|
`);return t=t.replace(/!\[([^\]]*)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,(e,t)=>t||`image`),t=t.replace(/\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)/g,`$1`),t=t.replace(/```([\s\S]*?)```/g,`$1`),t=t.replace(/`([^`]+)`/g,`$1`),t=t.replace(/\*\*([^*]+)\*\*/g,`$1`),t=t.replace(/__([^_]+)__/g,`$1`),t=t.replace(/\*([^*\n]+)\*/g,`$1`),t=t.replace(/_([^_\n]+)_/g,`$1`),t=t.replace(/^\s{0,3}#{1,6}\s+/gm,``),t=t.replace(/^\s*>\s?/gm,``),t=t.replace(/^\s*[-*+]\s+/gm,``),t=t.replace(/^\s*\d+\.\s+/gm,``),t=t.replace(/\/var\/folders\/[^\s)]*\/pi-clipboard-[A-Za-z0-9-]+\.(?:png|jpe?g|gif|webp)\b/gi,`pasted image`),t=t.replace(/\s+/g,` `).trim(),t}function kS(e){if(typeof e!=`string`)return``;let t=e.replace(/\r\n?/g,`
|
|
15
|
-
`),n=t.split(/\n\s*\n+/).map(e=>OS(e)).filter(Boolean);return n.length?n[0]||``:OS(t)}function AS(e){let t=OS(e);return t&&t!==`Thinking...`&&t!==`Thinking`?t:void 0}function jS(e,t=140){let n=e.replace(/\s+/g,` `).trim();return n?n.length<=t?n:`${n.slice(0,Math.max(0,t-1)).trimEnd()}…`:``}function MS(e,t={}){let n=AS(e?.summaryLabel);if(n)return jS(n);let r=kS(e?.text);return r?jS(r):t.allowPlaceholder?`Thinking…`:``}function NS(){return{connected:!1,replaying:!1,streaming:!1,compacting:!1,draft:!0,messages:[],items:[],historyOffset:0,historyTotalCount:0,firstMessage:``,thinkingLevel:`off`,availableThinkingLevels:[`off`],availableModels:[],availableSkills:[],hideThinkingBlock:!1,contextUsage:void 0,uiState:{statuses:{},editorText:``}}}function PS(e){let t=[];function n(e,r){let i=e.entry,a=i.message?.role,o=e.label,s=[o,a?`${a}:`:``,i.message?.text,i.summary,i.text,i.message?.command,i.modelId,i.thinkingLevel,i.name,i.label,...i.message?.toolCalls?.map(e=>e.preview||e.name||``)??[]];t.push({id:i.id,parentId:i.parentId,depth:r,label:o,labelTimestamp:e.labelTimestamp,streaming:!!e.streaming,timestamp:i.timestamp,type:i.type,role:a,text:s.filter(Boolean).join(` `).trim(),node:e});for(let t of e.children||[])n(t,r+1)}for(let t of e)n(t,0);return t}function FS(e){return e?.title?.trim()?e.title.trim():e?.name?.trim()?e.name.trim():`New session`}function IS(e){let t=(0,jy.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={hotkey:{preventDefault:!1,stopPropagation:!1,ignoreInputs:!1}},t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(kb,{richColors:!0,position:`top-right`,offset:{top:`calc(2.75rem + 0.75rem)`},mobileOffset:{top:`calc(2.75rem + 0.75rem)`}}),t[1]=i):i=t[1];let a;return t[2]===n?a=t[3]:(a=(0,G.jsx)(Vl,{defaultOptions:r,children:(0,G.jsx)(Xl,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:Ab,children:(0,G.jsxs)(Wy,{delay:150,children:[n,i]})})}),t[2]=n,t[3]=a),a}var LS=`/assets/styles-BteSJJZQ.css`,RS=`tanstack_devtools_settings`,zS=`pico-tanstack-devtools-defaults-v1`,BS={position:`bottom-right`,openHotkey:[`Control`,"`"],triggerHidden:!0},VS=cl({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`Pico`}],links:[{rel:`stylesheet`,href:LS},{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`},{rel:`alternate icon`,type:`image/png`,href:`/favicon.png`},{rel:`apple-touch-icon`,href:`/apple-touch-icon.png`},{rel:`manifest`,href:`/manifest.json`}]}),shellComponent:US,notFoundComponent:HS});function HS(){let e=(0,jy.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(`main`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,G.jsxs)(`div`,{className:`space-y-2 text-center`,children:[(0,G.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Page not found`}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The page you requested does not exist.`})]})}),e[0]=t):t=e[0],t}function US(e){let t=(0,jy.c)(7),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsxs)(`head`,{children:[(0,G.jsx)(Nl,{}),null]}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(WS,{}),t[1]=i):i=t[1];let a;t[2]===n?a=t[3]:(a=(0,G.jsxs)(IS,{children:[n,i]}),t[2]=n,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,G.jsx)(Pl,{}),t[4]=o):o=t[4];let s;return t[5]===a?s=t[6]:(s=(0,G.jsxs)(`html`,{lang:`en`,suppressHydrationWarning:!0,children:[r,(0,G.jsxs)(`body`,{className:`h-svh overflow-hidden bg-background text-foreground antialiased`,children:[a,o]})]}),t[5]=a,t[6]=s),s}function WS(){let[e,t]=W.useState(!1);if(W.useEffect(()=>{try{if(window.localStorage.getItem(zS)!==`true`){let e=window.localStorage.getItem(RS),t=e?JSON.parse(e):void 0,n=t&&typeof t==`object`&&!Array.isArray(t)?t:{};window.localStorage.setItem(RS,JSON.stringify({...n,openHotkey:BS.openHotkey,triggerHidden:BS.triggerHidden})),window.localStorage.setItem(zS,`true`)}}catch{}t(!0)},[]),!e)return null}Object.freeze({status:`aborted`});function Q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var GS=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},KS=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},qS={};function JS(e){return e&&Object.assign(qS,e),qS}function YS(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function XS(e,t){return typeof t==`bigint`?t.toString():t}function ZS(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function QS(e){return e==null}function $S(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var eC=Symbol(`evaluating`);function tC(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==eC)return r===void 0&&(r=eC,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function nC(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rC(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function iC(e){return JSON.stringify(e)}function aC(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var oC=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function sC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var cC=ZS(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function lC(e){if(sC(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(sC(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function uC(e){return lC(e)?{...e}:Array.isArray(e)?[...e]:e}var dC=new Set([`string`,`number`,`symbol`]);function fC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pC(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function mC(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function hC(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pC(e,rC(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return nC(this,`shape`,e),e},checks:[]}))}function gC(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pC(e,rC(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return nC(this,`shape`,r),r},checks:[]}))}function _C(e,t){if(!lC(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pC(e,rC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return nC(this,`shape`,n),n}}))}function vC(e,t){if(!lC(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pC(e,rC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return nC(this,`shape`,n),n}}))}function yC(e,t){return pC(e,rC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return nC(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function bC(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return pC(t,rC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return nC(this,`shape`,i),i},checks:[]}))}function xC(e,t,n){return pC(t,rC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return nC(this,`shape`,i),i}}))}function SC(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function CC(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function wC(e){return typeof e==`string`?e:e?.message}function TC(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=wC(e.inst?._zod.def?.error?.(e))??wC(t?.error?.(e))??wC(n.customError?.(e))??wC(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function EC(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function DC(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var OC=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,XS,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},kC=Q(`$ZodError`,OC),AC=Q(`$ZodError`,OC,{Parent:Error});function jC(e,t=e=>e.message){let n={},r=[];for(let i of e.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}}function MC(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var NC=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new GS;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>TC(e,a,JS())));throw oC(t,i?.callee),t}return o.value},PC=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>TC(e,a,JS())));throw oC(t,i?.callee),t}return o.value},FC=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new GS;return a.issues.length?{success:!1,error:new(e??kC)(a.issues.map(e=>TC(e,i,JS())))}:{success:!0,data:a.value}},IC=FC(AC),LC=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>TC(e,i,JS())))}:{success:!0,data:a.value}},RC=LC(AC),zC=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return NC(e)(t,n,i)},BC=e=>(t,n,r)=>NC(e)(t,n,r),VC=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return PC(e)(t,n,i)},HC=e=>async(t,n,r)=>PC(e)(t,n,r),UC=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return FC(e)(t,n,i)},WC=e=>(t,n,r)=>FC(e)(t,n,r),GC=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return LC(e)(t,n,i)},KC=e=>async(t,n,r)=>LC(e)(t,n,r),qC=/^[cC][^\s-]{8,}$/,JC=/^[0-9a-z]+$/,YC=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,XC=/^[0-9a-vA-V]{20}$/,ZC=/^[A-Za-z0-9]{27}$/,QC=/^[a-zA-Z0-9_-]{21}$/,$C=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ew=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tw=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rw=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function iw(){return new RegExp(rw,`u`)}var aw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ow=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uw=/^[A-Za-z0-9_-]*$/,dw=/^\+[1-9]\d{6,14}$/,fw=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,pw=RegExp(`^${fw}$`);function mw(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function hw(e){return RegExp(`^${mw(e)}$`)}function gw(e){let t=mw({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${fw}T(?:${r})$`)}var _w=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},vw=/^[^A-Z]*$/,yw=/^[^a-z]*$/,bw=Q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xw=Q(`$ZodCheckMaxLength`,(e,t)=>{var n;bw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!QS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=EC(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sw=Q(`$ZodCheckMinLength`,(e,t)=>{var n;bw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!QS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=EC(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cw=Q(`$ZodCheckLengthEquals`,(e,t)=>{var n;bw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!QS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=EC(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ww=Q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;bw.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tw=Q(`$ZodCheckRegex`,(e,t)=>{ww.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ew=Q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=vw,ww.init(e,t)}),Dw=Q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=yw,ww.init(e,t)}),Ow=Q(`$ZodCheckIncludes`,(e,t)=>{bw.init(e,t);let n=fC(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kw=Q(`$ZodCheckStartsWith`,(e,t)=>{bw.init(e,t);let n=RegExp(`^${fC(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Aw=Q(`$ZodCheckEndsWith`,(e,t)=>{bw.init(e,t);let n=RegExp(`.*${fC(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),jw=Q(`$ZodCheckOverwrite`,(e,t)=>{bw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Mw=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
15
|
+
`),n=t.split(/\n\s*\n+/).map(e=>OS(e)).filter(Boolean);return n.length?n[0]||``:OS(t)}function AS(e){let t=OS(e);return t&&t!==`Thinking...`&&t!==`Thinking`?t:void 0}function jS(e,t=140){let n=e.replace(/\s+/g,` `).trim();return n?n.length<=t?n:`${n.slice(0,Math.max(0,t-1)).trimEnd()}…`:``}function MS(e,t={}){let n=AS(e?.summaryLabel);if(n)return jS(n);let r=kS(e?.text);return r?jS(r):t.allowPlaceholder?`Thinking…`:``}function NS(){return{connected:!1,replaying:!1,streaming:!1,compacting:!1,draft:!0,messages:[],items:[],historyOffset:0,historyTotalCount:0,firstMessage:``,thinkingLevel:`off`,availableThinkingLevels:[`off`],availableModels:[],availableSkills:[],hideThinkingBlock:!1,contextUsage:void 0,uiState:{statuses:{},editorText:``}}}function PS(e){let t=[];function n(e,r){let i=e.entry,a=i.message?.role,o=e.label,s=[o,a?`${a}:`:``,i.message?.text,i.summary,i.text,i.message?.command,i.modelId,i.thinkingLevel,i.name,i.label,...i.message?.toolCalls?.map(e=>e.preview||e.name||``)??[]];t.push({id:i.id,parentId:i.parentId,depth:r,label:o,labelTimestamp:e.labelTimestamp,streaming:!!e.streaming,timestamp:i.timestamp,type:i.type,role:a,text:s.filter(Boolean).join(` `).trim(),node:e});for(let t of e.children||[])n(t,r+1)}for(let t of e)n(t,0);return t}function FS(e){return e?.title?.trim()?e.title.trim():e?.name?.trim()?e.name.trim():`New session`}function IS(e){let t=(0,jy.c)(4),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r={hotkey:{preventDefault:!1,stopPropagation:!1,ignoreInputs:!1}},t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(kb,{richColors:!0,position:`top-right`,offset:{top:`calc(2.75rem + 0.75rem)`},mobileOffset:{top:`calc(2.75rem + 0.75rem)`}}),t[1]=i):i=t[1];let a;return t[2]===n?a=t[3]:(a=(0,G.jsx)(Vl,{defaultOptions:r,children:(0,G.jsx)(Xl,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,storageKey:Ab,children:(0,G.jsxs)(Wy,{delay:150,children:[n,i]})})}),t[2]=n,t[3]=a),a}var LS=`/assets/styles-ej_ltn_F.css`,RS=`tanstack_devtools_settings`,zS=`pico-tanstack-devtools-defaults-v1`,BS={position:`bottom-right`,openHotkey:[`Control`,"`"],triggerHidden:!0},VS=cl({head:()=>({meta:[{charSet:`utf-8`},{name:`viewport`,content:`width=device-width, initial-scale=1`},{title:`Pico`}],links:[{rel:`stylesheet`,href:LS},{rel:`icon`,type:`image/svg+xml`,href:`/favicon.svg`},{rel:`alternate icon`,type:`image/png`,href:`/favicon.png`},{rel:`apple-touch-icon`,href:`/apple-touch-icon.png`},{rel:`manifest`,href:`/manifest.json`}]}),shellComponent:US,notFoundComponent:HS});function HS(){let e=(0,jy.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,G.jsx)(`main`,{className:`flex min-h-svh items-center justify-center p-6`,children:(0,G.jsxs)(`div`,{className:`space-y-2 text-center`,children:[(0,G.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Page not found`}),(0,G.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The page you requested does not exist.`})]})}),e[0]=t):t=e[0],t}function US(e){let t=(0,jy.c)(7),{children:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,G.jsxs)(`head`,{children:[(0,G.jsx)(Nl,{}),null]}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,G.jsx)(WS,{}),t[1]=i):i=t[1];let a;t[2]===n?a=t[3]:(a=(0,G.jsxs)(IS,{children:[n,i]}),t[2]=n,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,G.jsx)(Pl,{}),t[4]=o):o=t[4];let s;return t[5]===a?s=t[6]:(s=(0,G.jsxs)(`html`,{lang:`en`,suppressHydrationWarning:!0,children:[r,(0,G.jsxs)(`body`,{className:`h-svh overflow-hidden bg-background text-foreground antialiased`,children:[a,o]})]}),t[5]=a,t[6]=s),s}function WS(){let[e,t]=W.useState(!1);if(W.useEffect(()=>{try{if(window.localStorage.getItem(zS)!==`true`){let e=window.localStorage.getItem(RS),t=e?JSON.parse(e):void 0,n=t&&typeof t==`object`&&!Array.isArray(t)?t:{};window.localStorage.setItem(RS,JSON.stringify({...n,openHotkey:BS.openHotkey,triggerHidden:BS.triggerHidden})),window.localStorage.setItem(zS,`true`)}}catch{}t(!0)},[]),!e)return null}Object.freeze({status:`aborted`});function Q(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var GS=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},KS=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},qS={};function JS(e){return e&&Object.assign(qS,e),qS}function YS(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function XS(e,t){return typeof t==`bigint`?t.toString():t}function ZS(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function QS(e){return e==null}function $S(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}var eC=Symbol(`evaluating`);function tC(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==eC)return r===void 0&&(r=eC,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function nC(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function rC(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function iC(e){return JSON.stringify(e)}function aC(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var oC=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function sC(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var cC=ZS(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function lC(e){if(sC(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(sC(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function uC(e){return lC(e)?{...e}:Array.isArray(e)?[...e]:e}var dC=new Set([`string`,`number`,`symbol`]);function fC(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function pC(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function $(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function mC(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}-Number.MAX_VALUE,Number.MAX_VALUE;function hC(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return pC(e,rC(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return nC(this,`shape`,e),e},checks:[]}))}function gC(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return pC(e,rC(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return nC(this,`shape`,r),r},checks:[]}))}function _C(e,t){if(!lC(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return pC(e,rC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return nC(this,`shape`,n),n}}))}function vC(e,t){if(!lC(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return pC(e,rC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return nC(this,`shape`,n),n}}))}function yC(e,t){return pC(e,rC(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return nC(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function bC(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return pC(t,rC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return nC(this,`shape`,i),i},checks:[]}))}function xC(e,t,n){return pC(t,rC(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return nC(this,`shape`,i),i}}))}function SC(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function CC(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function wC(e){return typeof e==`string`?e:e?.message}function TC(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=wC(e.inst?._zod.def?.error?.(e))??wC(t?.error?.(e))??wC(n.customError?.(e))??wC(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function EC(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function DC(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var OC=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,XS,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},kC=Q(`$ZodError`,OC),AC=Q(`$ZodError`,OC,{Parent:Error});function jC(e,t=e=>e.message){let n={},r=[];for(let i of e.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}}function MC(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var NC=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new GS;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>TC(e,a,JS())));throw oC(t,i?.callee),t}return o.value},PC=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>TC(e,a,JS())));throw oC(t,i?.callee),t}return o.value},FC=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new GS;return a.issues.length?{success:!1,error:new(e??kC)(a.issues.map(e=>TC(e,i,JS())))}:{success:!0,data:a.value}},IC=FC(AC),LC=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>TC(e,i,JS())))}:{success:!0,data:a.value}},RC=LC(AC),zC=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return NC(e)(t,n,i)},BC=e=>(t,n,r)=>NC(e)(t,n,r),VC=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return PC(e)(t,n,i)},HC=e=>async(t,n,r)=>PC(e)(t,n,r),UC=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return FC(e)(t,n,i)},WC=e=>(t,n,r)=>FC(e)(t,n,r),GC=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return LC(e)(t,n,i)},KC=e=>async(t,n,r)=>LC(e)(t,n,r),qC=/^[cC][^\s-]{8,}$/,JC=/^[0-9a-z]+$/,YC=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,XC=/^[0-9a-vA-V]{20}$/,ZC=/^[A-Za-z0-9]{27}$/,QC=/^[a-zA-Z0-9_-]{21}$/,$C=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,ew=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tw=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,nw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,rw=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function iw(){return new RegExp(rw,`u`)}var aw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ow=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,cw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,lw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,uw=/^[A-Za-z0-9_-]*$/,dw=/^\+[1-9]\d{6,14}$/,fw=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,pw=RegExp(`^${fw}$`);function mw(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function hw(e){return RegExp(`^${mw(e)}$`)}function gw(e){let t=mw({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${fw}T(?:${r})$`)}var _w=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},vw=/^[^A-Z]*$/,yw=/^[^a-z]*$/,bw=Q(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),xw=Q(`$ZodCheckMaxLength`,(e,t)=>{var n;bw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!QS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=EC(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Sw=Q(`$ZodCheckMinLength`,(e,t)=>{var n;bw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!QS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=EC(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cw=Q(`$ZodCheckLengthEquals`,(e,t)=>{var n;bw.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!QS(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=EC(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ww=Q(`$ZodCheckStringFormat`,(e,t)=>{var n,r;bw.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Tw=Q(`$ZodCheckRegex`,(e,t)=>{ww.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ew=Q(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=vw,ww.init(e,t)}),Dw=Q(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=yw,ww.init(e,t)}),Ow=Q(`$ZodCheckIncludes`,(e,t)=>{bw.init(e,t);let n=fC(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),kw=Q(`$ZodCheckStartsWith`,(e,t)=>{bw.init(e,t);let n=RegExp(`^${fC(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Aw=Q(`$ZodCheckEndsWith`,(e,t)=>{bw.init(e,t);let n=RegExp(`.*${fC(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),jw=Q(`$ZodCheckOverwrite`,(e,t)=>{bw.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Mw=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
16
16
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
17
17
|
`))}},Nw={major:4,minor:3,patch:6},Pw=Q(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Nw;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=SC(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new GS;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=SC(e,t))});else{if(e.issues.length===t)continue;r||=SC(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(SC(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new GS;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new GS;return o.then(e=>t(e,r,a))}return t(o,r,a)}}tC(e,`~standard`,()=>({validate:t=>{try{let n=IC(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return RC(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Fw=Q(`$ZodString`,(e,t)=>{Pw.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??_w(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),Iw=Q(`$ZodStringFormat`,(e,t)=>{ww.init(e,t),Fw.init(e,t)}),Lw=Q(`$ZodGUID`,(e,t)=>{t.pattern??=ew,Iw.init(e,t)}),Rw=Q(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=tw(e)}else t.pattern??=tw();Iw.init(e,t)}),zw=Q(`$ZodEmail`,(e,t)=>{t.pattern??=nw,Iw.init(e,t)}),Bw=Q(`$ZodURL`,(e,t)=>{Iw.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Vw=Q(`$ZodEmoji`,(e,t)=>{t.pattern??=iw(),Iw.init(e,t)}),Hw=Q(`$ZodNanoID`,(e,t)=>{t.pattern??=QC,Iw.init(e,t)}),Uw=Q(`$ZodCUID`,(e,t)=>{t.pattern??=qC,Iw.init(e,t)}),Ww=Q(`$ZodCUID2`,(e,t)=>{t.pattern??=JC,Iw.init(e,t)}),Gw=Q(`$ZodULID`,(e,t)=>{t.pattern??=YC,Iw.init(e,t)}),Kw=Q(`$ZodXID`,(e,t)=>{t.pattern??=XC,Iw.init(e,t)}),qw=Q(`$ZodKSUID`,(e,t)=>{t.pattern??=ZC,Iw.init(e,t)}),Jw=Q(`$ZodISODateTime`,(e,t)=>{t.pattern??=gw(t),Iw.init(e,t)}),Yw=Q(`$ZodISODate`,(e,t)=>{t.pattern??=pw,Iw.init(e,t)}),Xw=Q(`$ZodISOTime`,(e,t)=>{t.pattern??=hw(t),Iw.init(e,t)}),Zw=Q(`$ZodISODuration`,(e,t)=>{t.pattern??=$C,Iw.init(e,t)}),Qw=Q(`$ZodIPv4`,(e,t)=>{t.pattern??=aw,Iw.init(e,t),e._zod.bag.format=`ipv4`}),$w=Q(`$ZodIPv6`,(e,t)=>{t.pattern??=ow,Iw.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),eT=Q(`$ZodCIDRv4`,(e,t)=>{t.pattern??=sw,Iw.init(e,t)}),tT=Q(`$ZodCIDRv6`,(e,t)=>{t.pattern??=cw,Iw.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function nT(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var rT=Q(`$ZodBase64`,(e,t)=>{t.pattern??=lw,Iw.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{nT(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function iT(e){if(!uw.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return nT(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var aT=Q(`$ZodBase64URL`,(e,t)=>{t.pattern??=uw,Iw.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{iT(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),oT=Q(`$ZodE164`,(e,t)=>{t.pattern??=dw,Iw.init(e,t)});function sT(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var cT=Q(`$ZodJWT`,(e,t)=>{Iw.init(e,t),e._zod.check=n=>{sT(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),lT=Q(`$ZodUnknown`,(e,t)=>{Pw.init(e,t),e._zod.parse=e=>e}),uT=Q(`$ZodNever`,(e,t)=>{Pw.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function dT(e,t,n){e.issues.length&&t.issues.push(...CC(n,e.issues)),t.value[n]=e.value}var fT=Q(`$ZodArray`,(e,t)=>{Pw.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>dT(t,n,e))):dT(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function pT(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...CC(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function mT(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=mC(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function hT(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>pT(e,n,i,t,u))):pT(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var gT=Q(`$ZodObject`,(e,t)=>{if(Pw.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=ZS(()=>mT(t));tC(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=sC,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>pT(n,t,e,s,r))):pT(i,t,e,s,r)}return i?hT(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),_T=Q(`$ZodObjectJIT`,(e,t)=>{gT.init(e,t);let n=e._zod.parse,r=ZS(()=>mT(t)),i=e=>{let t=new Mw([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=iC(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=iC(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
18
18
|
if (${n}.issues.length) {
|
|
@@ -50,4 +50,4 @@ Error generating stack: `+e.message+`
|
|
|
50
50
|
|
|
51
51
|
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=sC,s=!qS.jitless,c=s&&cC.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?hT([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function vT(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!SC(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>TC(e,r,JS())))}),t)}var yT=Q(`$ZodUnion`,(e,t)=>{Pw.init(e,t),tC(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),tC(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),tC(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),tC(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>$S(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>vT(t,i,e,a)):vT(s,i,e,a)}}),bT=Q(`$ZodIntersection`,(e,t)=>{Pw.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ST(e,t,n)):ST(e,i,a)}});function xT(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lC(e)&&lC(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=xT(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=xT(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ST(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),SC(e))return e;let o=xT(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var CT=Q(`$ZodEnum`,(e,t)=>{Pw.init(e,t);let n=YS(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>dC.has(typeof e)).map(e=>typeof e==`string`?fC(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),wT=Q(`$ZodTransform`,(e,t)=>{Pw.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new KS(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new GS;return n.value=i,n}});function TT(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var ET=Q(`$ZodOptional`,(e,t)=>{Pw.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,tC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),tC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${$S(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>TT(t,e.value)):TT(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),DT=Q(`$ZodExactOptional`,(e,t)=>{ET.init(e,t),tC(e._zod,`values`,()=>t.innerType._zod.values),tC(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),OT=Q(`$ZodNullable`,(e,t)=>{Pw.init(e,t),tC(e._zod,`optin`,()=>t.innerType._zod.optin),tC(e._zod,`optout`,()=>t.innerType._zod.optout),tC(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${$S(e.source)}|null)$`):void 0}),tC(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),kT=Q(`$ZodDefault`,(e,t)=>{Pw.init(e,t),e._zod.optin=`optional`,tC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>AT(e,t)):AT(r,t)}});function AT(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var jT=Q(`$ZodPrefault`,(e,t)=>{Pw.init(e,t),e._zod.optin=`optional`,tC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),MT=Q(`$ZodNonOptional`,(e,t)=>{Pw.init(e,t),tC(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>NT(t,e)):NT(i,e)}});function NT(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var PT=Q(`$ZodCatch`,(e,t)=>{Pw.init(e,t),tC(e._zod,`optin`,()=>t.innerType._zod.optin),tC(e._zod,`optout`,()=>t.innerType._zod.optout),tC(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>TC(e,n,JS()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>TC(e,n,JS()))},input:e.value}),e.issues=[]),e)}}),FT=Q(`$ZodPipe`,(e,t)=>{Pw.init(e,t),tC(e._zod,`values`,()=>t.in._zod.values),tC(e._zod,`optin`,()=>t.in._zod.optin),tC(e._zod,`optout`,()=>t.out._zod.optout),tC(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>IT(e,t.in,n)):IT(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>IT(e,t.out,n)):IT(r,t.out,n)}});function IT(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var LT=Q(`$ZodReadonly`,(e,t)=>{Pw.init(e,t),tC(e._zod,`propValues`,()=>t.innerType._zod.propValues),tC(e._zod,`values`,()=>t.innerType._zod.values),tC(e._zod,`optin`,()=>t.innerType?._zod?.optin),tC(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(RT):RT(r)}});function RT(e){return e.value=Object.freeze(e.value),e}var zT=Q(`$ZodCustom`,(e,t)=>{bw.init(e,t),Pw.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>BT(t,n,r,e));BT(i,n,r,e)}});function BT(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(DC(e))}}var VT,HT=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function UT(){return new HT}(VT=globalThis).__zod_globalRegistry??(VT.__zod_globalRegistry=UT());var WT=globalThis.__zod_globalRegistry;function GT(e,t){return new e({type:`string`,...$(t)})}function KT(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...$(t)})}function qT(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...$(t)})}function JT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...$(t)})}function YT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...$(t)})}function XT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...$(t)})}function ZT(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...$(t)})}function QT(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...$(t)})}function $T(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...$(t)})}function eE(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...$(t)})}function tE(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...$(t)})}function nE(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...$(t)})}function rE(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...$(t)})}function iE(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...$(t)})}function aE(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...$(t)})}function oE(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...$(t)})}function sE(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...$(t)})}function cE(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...$(t)})}function lE(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...$(t)})}function uE(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...$(t)})}function dE(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...$(t)})}function fE(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...$(t)})}function pE(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...$(t)})}function mE(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...$(t)})}function hE(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...$(t)})}function gE(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...$(t)})}function _E(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...$(t)})}function vE(e){return new e({type:`unknown`})}function yE(e,t){return new e({type:`never`,...$(t)})}function bE(e,t){return new xw({check:`max_length`,...$(t),maximum:e})}function xE(e,t){return new Sw({check:`min_length`,...$(t),minimum:e})}function SE(e,t){return new Cw({check:`length_equals`,...$(t),length:e})}function CE(e,t){return new Tw({check:`string_format`,format:`regex`,...$(t),pattern:e})}function wE(e){return new Ew({check:`string_format`,format:`lowercase`,...$(e)})}function TE(e){return new Dw({check:`string_format`,format:`uppercase`,...$(e)})}function EE(e,t){return new Ow({check:`string_format`,format:`includes`,...$(t),includes:e})}function DE(e,t){return new kw({check:`string_format`,format:`starts_with`,...$(t),prefix:e})}function OE(e,t){return new Aw({check:`string_format`,format:`ends_with`,...$(t),suffix:e})}function kE(e){return new jw({check:`overwrite`,tx:e})}function AE(e){return kE(t=>t.normalize(e))}function jE(){return kE(e=>e.trim())}function ME(){return kE(e=>e.toLowerCase())}function NE(){return kE(e=>e.toUpperCase())}function PE(){return kE(e=>aC(e))}function FE(e,t,n){return new e({type:`array`,element:t,...$(n)})}function IE(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...$(n)})}function LE(e){let t=RE(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(DC(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(DC(r))}},e(n.value,n)));return t}function RE(e,t){let n=new bw({check:`custom`,...$(t)});return n._zod.check=e,n}function zE(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??WT,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function BE(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,BE(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&UE(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function VE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
52
52
|
|
|
53
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function HE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:GE(t,`input`,e.processors),output:GE(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function UE(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return UE(r.element,n);if(r.type===`set`)return UE(r.valueType,n);if(r.type===`lazy`)return UE(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return UE(r.innerType,n);if(r.type===`intersection`)return UE(r.left,n)||UE(r.right,n);if(r.type===`record`||r.type===`map`)return UE(r.keyType,n)||UE(r.valueType,n);if(r.type===`pipe`)return UE(r.in,n)||UE(r.out,n);if(r.type===`object`){for(let e in r.shape)if(UE(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(UE(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(UE(e,n))return!0;return!!(r.rest&&UE(r.rest,n))}return!1}var WE=(e,t={})=>n=>{let r=zE({...n,processors:t});return BE(e,r),VE(r,e),HE(r,e)},GE=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=zE({...i??{},target:a,io:t,processors:n});return BE(e,o),VE(o,e),HE(o,e)},KE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},qE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=KE[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},JE=(e,t,n,r)=>{n.not={}},YE=(e,t,n,r)=>{let i=e._zod.def,a=YS(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},XE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ZE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},QE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=BE(a.element,t,{...r,path:[...r.path,`items`]})},$E=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=BE(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=BE(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},eD=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>BE(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},tD=(e,t,n,r)=>{let i=e._zod.def,a=BE(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=BE(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},nD=(e,t,n,r)=>{let i=e._zod.def,a=BE(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},rD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},iD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},aD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},oD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},sD=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;BE(a,t,r);let o=t.seen.get(e);o.ref=a},cD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},uD=Q(`ZodISODateTime`,(e,t)=>{Jw.init(e,t),ID.init(e,t)});function dD(e){return mE(uD,e)}var fD=Q(`ZodISODate`,(e,t)=>{Yw.init(e,t),ID.init(e,t)});function pD(e){return hE(fD,e)}var mD=Q(`ZodISOTime`,(e,t)=>{Xw.init(e,t),ID.init(e,t)});function hD(e){return gE(mD,e)}var gD=Q(`ZodISODuration`,(e,t)=>{Zw.init(e,t),ID.init(e,t)});function _D(e){return _E(gD,e)}var vD=(e,t)=>{kC.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>MC(e,t)},flatten:{value:t=>jC(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,XS,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,XS,2)}},isEmpty:{get(){return e.issues.length===0}}})};Q(`ZodError`,vD);var yD=Q(`ZodError`,vD,{Parent:Error}),bD=NC(yD),xD=PC(yD),SD=FC(yD),CD=LC(yD),wD=zC(yD),TD=BC(yD),ED=VC(yD),DD=HC(yD),OD=UC(yD),kD=WC(yD),AD=GC(yD),jD=KC(yD),MD=Q(`ZodType`,(e,t)=>(Pw.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:GE(e,`input`),output:GE(e,`output`)}}),e.toJSONSchema=WE(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(rC(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>pC(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>bD(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>SD(e,t,n),e.parseAsync=async(t,n)=>xD(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>CD(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>wD(e,t,n),e.decode=(t,n)=>TD(e,t,n),e.encodeAsync=async(t,n)=>ED(e,t,n),e.decodeAsync=async(t,n)=>DD(e,t,n),e.safeEncode=(t,n)=>OD(e,t,n),e.safeDecode=(t,n)=>kD(e,t,n),e.safeEncodeAsync=async(t,n)=>AD(e,t,n),e.safeDecodeAsync=async(t,n)=>jD(e,t,n),e.refine=(t,n)=>e.check(LO(t,n)),e.superRefine=t=>e.check(RO(t)),e.overwrite=t=>e.check(kE(t)),e.optional=()=>yO(e),e.exactOptional=()=>xO(e),e.nullable=()=>CO(e),e.nullish=()=>yO(CO(e)),e.nonoptional=t=>kO(e,t),e.array=()=>sO(e),e.or=t=>dO([e,t]),e.and=t=>pO(e,t),e.transform=t=>NO(e,_O(t)),e.default=t=>TO(e,t),e.prefault=t=>DO(e,t),e.catch=t=>jO(e,t),e.pipe=t=>NO(e,t),e.readonly=()=>FO(e),e.describe=t=>{let n=e.clone();return WT.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return WT.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return WT.get(e);let n=e.clone();return WT.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),ND=Q(`_ZodString`,(e,t)=>{Fw.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qE(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(CE(...t)),e.includes=(...t)=>e.check(EE(...t)),e.startsWith=(...t)=>e.check(DE(...t)),e.endsWith=(...t)=>e.check(OE(...t)),e.min=(...t)=>e.check(xE(...t)),e.max=(...t)=>e.check(bE(...t)),e.length=(...t)=>e.check(SE(...t)),e.nonempty=(...t)=>e.check(xE(1,...t)),e.lowercase=t=>e.check(wE(t)),e.uppercase=t=>e.check(TE(t)),e.trim=()=>e.check(jE()),e.normalize=(...t)=>e.check(AE(...t)),e.toLowerCase=()=>e.check(ME()),e.toUpperCase=()=>e.check(NE()),e.slugify=()=>e.check(PE())}),PD=Q(`ZodString`,(e,t)=>{Fw.init(e,t),ND.init(e,t),e.email=t=>e.check(KT(LD,t)),e.url=t=>e.check(QT(BD,t)),e.jwt=t=>e.check(pE(tO,t)),e.emoji=t=>e.check($T(VD,t)),e.guid=t=>e.check(qT(RD,t)),e.uuid=t=>e.check(JT(zD,t)),e.uuidv4=t=>e.check(YT(zD,t)),e.uuidv6=t=>e.check(XT(zD,t)),e.uuidv7=t=>e.check(ZT(zD,t)),e.nanoid=t=>e.check(eE(HD,t)),e.guid=t=>e.check(qT(RD,t)),e.cuid=t=>e.check(tE(UD,t)),e.cuid2=t=>e.check(nE(WD,t)),e.ulid=t=>e.check(rE(GD,t)),e.base64=t=>e.check(uE(QD,t)),e.base64url=t=>e.check(dE($D,t)),e.xid=t=>e.check(iE(KD,t)),e.ksuid=t=>e.check(aE(qD,t)),e.ipv4=t=>e.check(oE(JD,t)),e.ipv6=t=>e.check(sE(YD,t)),e.cidrv4=t=>e.check(cE(XD,t)),e.cidrv6=t=>e.check(lE(ZD,t)),e.e164=t=>e.check(fE(eO,t)),e.datetime=t=>e.check(dD(t)),e.date=t=>e.check(pD(t)),e.time=t=>e.check(hD(t)),e.duration=t=>e.check(_D(t))});function FD(e){return GT(PD,e)}var ID=Q(`ZodStringFormat`,(e,t)=>{Iw.init(e,t),ND.init(e,t)}),LD=Q(`ZodEmail`,(e,t)=>{zw.init(e,t),ID.init(e,t)}),RD=Q(`ZodGUID`,(e,t)=>{Lw.init(e,t),ID.init(e,t)}),zD=Q(`ZodUUID`,(e,t)=>{Rw.init(e,t),ID.init(e,t)}),BD=Q(`ZodURL`,(e,t)=>{Bw.init(e,t),ID.init(e,t)}),VD=Q(`ZodEmoji`,(e,t)=>{Vw.init(e,t),ID.init(e,t)}),HD=Q(`ZodNanoID`,(e,t)=>{Hw.init(e,t),ID.init(e,t)}),UD=Q(`ZodCUID`,(e,t)=>{Uw.init(e,t),ID.init(e,t)}),WD=Q(`ZodCUID2`,(e,t)=>{Ww.init(e,t),ID.init(e,t)}),GD=Q(`ZodULID`,(e,t)=>{Gw.init(e,t),ID.init(e,t)}),KD=Q(`ZodXID`,(e,t)=>{Kw.init(e,t),ID.init(e,t)}),qD=Q(`ZodKSUID`,(e,t)=>{qw.init(e,t),ID.init(e,t)}),JD=Q(`ZodIPv4`,(e,t)=>{Qw.init(e,t),ID.init(e,t)}),YD=Q(`ZodIPv6`,(e,t)=>{$w.init(e,t),ID.init(e,t)}),XD=Q(`ZodCIDRv4`,(e,t)=>{eT.init(e,t),ID.init(e,t)}),ZD=Q(`ZodCIDRv6`,(e,t)=>{tT.init(e,t),ID.init(e,t)}),QD=Q(`ZodBase64`,(e,t)=>{rT.init(e,t),ID.init(e,t)}),$D=Q(`ZodBase64URL`,(e,t)=>{aT.init(e,t),ID.init(e,t)}),eO=Q(`ZodE164`,(e,t)=>{oT.init(e,t),ID.init(e,t)}),tO=Q(`ZodJWT`,(e,t)=>{cT.init(e,t),ID.init(e,t)}),nO=Q(`ZodUnknown`,(e,t)=>{lT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function rO(){return vE(nO)}var iO=Q(`ZodNever`,(e,t)=>{uT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JE(e,t,n,r)});function aO(e){return yE(iO,e)}var oO=Q(`ZodArray`,(e,t)=>{fT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QE(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(xE(t,n)),e.nonempty=t=>e.check(xE(1,t)),e.max=(t,n)=>e.check(bE(t,n)),e.length=(t,n)=>e.check(SE(t,n)),e.unwrap=()=>e.element});function sO(e,t){return FE(oO,e,t)}var cO=Q(`ZodObject`,(e,t)=>{_T.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$E(e,t,n,r),tC(e,`shape`,()=>t.shape),e.keyof=()=>hO(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:rO()}),e.loose=()=>e.clone({...e._zod.def,catchall:rO()}),e.strict=()=>e.clone({...e._zod.def,catchall:aO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>_C(e,t),e.safeExtend=t=>vC(e,t),e.merge=t=>yC(e,t),e.pick=t=>hC(e,t),e.omit=t=>gC(e,t),e.partial=(...t)=>bC(vO,e,t[0]),e.required=(...t)=>xC(OO,e,t[0])});function lO(e,t){return new cO({type:`object`,shape:e??{},...$(t)})}var uO=Q(`ZodUnion`,(e,t)=>{yT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eD(e,t,n,r),e.options=t.options});function dO(e,t){return new uO({type:`union`,options:e,...$(t)})}var fO=Q(`ZodIntersection`,(e,t)=>{bT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tD(e,t,n,r)});function pO(e,t){return new fO({type:`intersection`,left:e,right:t})}var mO=Q(`ZodEnum`,(e,t)=>{CT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YE(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new mO({...t,checks:[],...$(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new mO({...t,checks:[],...$(r),entries:i})}});function hO(e,t){return new mO({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...$(t)})}var gO=Q(`ZodTransform`,(e,t)=>{wT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new KS(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(DC(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(DC(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function _O(e){return new gO({type:`transform`,transform:e})}var vO=Q(`ZodOptional`,(e,t)=>{ET.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yO(e){return new vO({type:`optional`,innerType:e})}var bO=Q(`ZodExactOptional`,(e,t)=>{DT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xO(e){return new bO({type:`optional`,innerType:e})}var SO=Q(`ZodNullable`,(e,t)=>{OT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CO(e){return new SO({type:`nullable`,innerType:e})}var wO=Q(`ZodDefault`,(e,t)=>{kT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function TO(e,t){return new wO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():uC(t)}})}var EO=Q(`ZodPrefault`,(e,t)=>{jT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function DO(e,t){return new EO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():uC(t)}})}var OO=Q(`ZodNonOptional`,(e,t)=>{MT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kO(e,t){return new OO({type:`nonoptional`,innerType:e,...$(t)})}var AO=Q(`ZodCatch`,(e,t)=>{PT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jO(e,t){return new AO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var MO=Q(`ZodPipe`,(e,t)=>{FT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sD(e,t,n,r),e.in=t.in,e.out=t.out});function NO(e,t){return new MO({type:`pipe`,in:e,out:t})}var PO=Q(`ZodReadonly`,(e,t)=>{LT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FO(e){return new PO({type:`readonly`,innerType:e})}var IO=Q(`ZodCustom`,(e,t)=>{zT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XE(e,t,n,r)});function LO(e,t={}){return IE(IO,e,t)}function RO(e){return LE(e)}var zO=`modulepreload`,BO=function(e){return`/`+e},VO={},HO=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=BO(t,n),t in VO)return;VO[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:zO,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},UO=()=>HO(()=>import(`./routes-BPkTKiWN.js`),__vite__mapDeps([0,1])),WO=lO({session:FD().optional()}),GO=ll(`/`)({validateSearch:WO,component:dl(UO,`component`)}),KO={IndexRoute:GO.update({id:`/`,path:`/`,getParentRoute:()=>VS})},qO=VS._addFileChildren(KO);function JO(){let e=new Hs({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0}}}),t=Tl({routeTree:qO,scrollRestoration:!0,defaultPreload:`intent`,defaultPreloadStaleTime:0});return Ll({router:t,queryClient:e}),t}async function YO(){let e=await JO(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Fo),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Ro(e),e}async function XO(){let e=await YO();return window.$_TSR?.h(),e}var ZO;function QO(){return ZO||=XO(),(0,G.jsx)(ec,{promise:ZO,children:e=>(0,G.jsx)(Ol,{router:e})})}var $O=l();(0,W.startTransition)(()=>{(0,$O.hydrateRoot)(document,(0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(QO,{})}))});export{Ky as $,cd as $n,Jo as $r,em as $t,dx as A,mf as An,lu as Ar,_g as At,hx as B,Ud as Bn,js as Br,Zh as Bt,Lb as C,Of as Cn,Du as Cr,Ig as Ct,Jb as D,yf as Dn,hu as Dr,xg as Dt,qb as E,vf as En,yu as Er,Eg as Et,lx as F,of as Fn,zl as Fr,pg as Ft,Yb as G,Cd as Gn,qo as Gr,jm as Gt,gx as H,yd as Hn,_s as Hr,Pm as Ht,fx as I,sf as In,Pc as Ir,lg as It,Db as J,Td as Jn,rs as Jr,Em as Jt,Xb as K,wd as Kn,Go as Kr,km as Kt,sx as L,ef as Ln,Ks as Lr,fg as Lt,mx as M,gf as Mn,iu as Mr,gg as Mt,px as N,df as Nn,Yl as Nr,hg as Nt,tx as O,bf as On,pu as Or,Cg as Ot,cx as P,cf as Pn,Hl as Pr,mg as Pt,qy as Q,od as Qn,ms as Qr,dm as Qt,ix as R,Xd as Rn,Ws as Rr,cg as Rt,Ub as S,fp as Sn,ju as Sr,Lg as St,Mb as T,wf as Tn,Su as Tr,Og as Tt,ox as U,Rd as Un,gs as Ur,Mm as Ut,_x as V,Hd as Vn,Cs as Vr,Vm as Vt,ax as W,bd as Wn,es as Wr,Nm as Wt,Jy as X,md as Xn,Yo as Xr,xm as Xt,ub as Y,J as Yn,Xo as Yr,wm as Yt,Gy as Z,ud as Zn,is as Zr,mm as Zt,Fb as _,cp as _n,Bu as _r,$g as _t,DS as a,Dp as an,id as ar,Cy as at,Gb as b,pp as bn,Iu as br,o_ as bt,Ax as c,Np as cn,nd as cr,vy as ct,Bb as d,Ep as dn,Zu as dr,M_ as dt,Ho as ei,qp as en,sd as er,Uy as et,zb as f,Op as fn,Qu as fr,j_ as ft,Pb as g,dp as gn,Vu as gr,l_ as gt,Rb as h,up as hn,Ku as hr,x_ as ht,PS as i,r as ii,Rp as in,ed as ir,wy as it,nx as j,hf as jn,uu as jr,vg as jt,$b as k,_f as kn,fu as kr,yg as kt,Ix as l,Pp as ln,td as lr,cy as lt,jb as m,sp as mn,Ju as mr,E_ as mt,HO as n,zo as ni,Bp as nn,ad as nr,Oy as nt,NS as o,Ap as on,dd as or,xy as ot,Nb as p,lp as pn,qu as pr,k_ as pt,ex as q,Fd as qn,ls as qr,Am as qt,FS as r,s as ri,zp as rn,ld as rr,Ey as rt,jx as s,jp as sn,rd as sr,by as st,GO as t,Bo as ti,Gp as tn,pd as tr,Vy as tt,MS as u,Fp as un,Xu as ur,R_ as ut,Hb as v,op as vn,Ru as vr,c_ as vt,Ib as w,Ef as wn,xu as wr,Pg as wt,Vb as x,ip as xn,Ou as xr,qg as xt,Wb as y,ap as yn,zu as yr,s_ as yt,ux as z,Wd as zn,Rs as zr,ag as zt};
|
|
53
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function HE(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:GE(t,`input`,e.processors),output:GE(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function UE(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return UE(r.element,n);if(r.type===`set`)return UE(r.valueType,n);if(r.type===`lazy`)return UE(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return UE(r.innerType,n);if(r.type===`intersection`)return UE(r.left,n)||UE(r.right,n);if(r.type===`record`||r.type===`map`)return UE(r.keyType,n)||UE(r.valueType,n);if(r.type===`pipe`)return UE(r.in,n)||UE(r.out,n);if(r.type===`object`){for(let e in r.shape)if(UE(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(UE(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(UE(e,n))return!0;return!!(r.rest&&UE(r.rest,n))}return!1}var WE=(e,t={})=>n=>{let r=zE({...n,processors:t});return BE(e,r),VE(r,e),HE(r,e)},GE=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=zE({...i??{},target:a,io:t,processors:n});return BE(e,o),VE(o,e),HE(o,e)},KE={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},qE=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=KE[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},JE=(e,t,n,r)=>{n.not={}},YE=(e,t,n,r)=>{let i=e._zod.def,a=YS(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},XE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},ZE=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},QE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=BE(a.element,t,{...r,path:[...r.path,`items`]})},$E=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=BE(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=BE(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},eD=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>BE(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},tD=(e,t,n,r)=>{let i=e._zod.def,a=BE(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=BE(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},nD=(e,t,n,r)=>{let i=e._zod.def,a=BE(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},rD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},iD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},aD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},oD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},sD=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;BE(a,t,r);let o=t.seen.get(e);o.ref=a},cD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lD=(e,t,n,r)=>{let i=e._zod.def;BE(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},uD=Q(`ZodISODateTime`,(e,t)=>{Jw.init(e,t),ID.init(e,t)});function dD(e){return mE(uD,e)}var fD=Q(`ZodISODate`,(e,t)=>{Yw.init(e,t),ID.init(e,t)});function pD(e){return hE(fD,e)}var mD=Q(`ZodISOTime`,(e,t)=>{Xw.init(e,t),ID.init(e,t)});function hD(e){return gE(mD,e)}var gD=Q(`ZodISODuration`,(e,t)=>{Zw.init(e,t),ID.init(e,t)});function _D(e){return _E(gD,e)}var vD=(e,t)=>{kC.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>MC(e,t)},flatten:{value:t=>jC(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,XS,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,XS,2)}},isEmpty:{get(){return e.issues.length===0}}})};Q(`ZodError`,vD);var yD=Q(`ZodError`,vD,{Parent:Error}),bD=NC(yD),xD=PC(yD),SD=FC(yD),CD=LC(yD),wD=zC(yD),TD=BC(yD),ED=VC(yD),DD=HC(yD),OD=UC(yD),kD=WC(yD),AD=GC(yD),jD=KC(yD),MD=Q(`ZodType`,(e,t)=>(Pw.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:GE(e,`input`),output:GE(e,`output`)}}),e.toJSONSchema=WE(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(rC(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>pC(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>bD(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>SD(e,t,n),e.parseAsync=async(t,n)=>xD(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>CD(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>wD(e,t,n),e.decode=(t,n)=>TD(e,t,n),e.encodeAsync=async(t,n)=>ED(e,t,n),e.decodeAsync=async(t,n)=>DD(e,t,n),e.safeEncode=(t,n)=>OD(e,t,n),e.safeDecode=(t,n)=>kD(e,t,n),e.safeEncodeAsync=async(t,n)=>AD(e,t,n),e.safeDecodeAsync=async(t,n)=>jD(e,t,n),e.refine=(t,n)=>e.check(LO(t,n)),e.superRefine=t=>e.check(RO(t)),e.overwrite=t=>e.check(kE(t)),e.optional=()=>yO(e),e.exactOptional=()=>xO(e),e.nullable=()=>CO(e),e.nullish=()=>yO(CO(e)),e.nonoptional=t=>kO(e,t),e.array=()=>sO(e),e.or=t=>dO([e,t]),e.and=t=>pO(e,t),e.transform=t=>NO(e,_O(t)),e.default=t=>TO(e,t),e.prefault=t=>DO(e,t),e.catch=t=>jO(e,t),e.pipe=t=>NO(e,t),e.readonly=()=>FO(e),e.describe=t=>{let n=e.clone();return WT.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return WT.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return WT.get(e);let n=e.clone();return WT.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),ND=Q(`_ZodString`,(e,t)=>{Fw.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qE(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(CE(...t)),e.includes=(...t)=>e.check(EE(...t)),e.startsWith=(...t)=>e.check(DE(...t)),e.endsWith=(...t)=>e.check(OE(...t)),e.min=(...t)=>e.check(xE(...t)),e.max=(...t)=>e.check(bE(...t)),e.length=(...t)=>e.check(SE(...t)),e.nonempty=(...t)=>e.check(xE(1,...t)),e.lowercase=t=>e.check(wE(t)),e.uppercase=t=>e.check(TE(t)),e.trim=()=>e.check(jE()),e.normalize=(...t)=>e.check(AE(...t)),e.toLowerCase=()=>e.check(ME()),e.toUpperCase=()=>e.check(NE()),e.slugify=()=>e.check(PE())}),PD=Q(`ZodString`,(e,t)=>{Fw.init(e,t),ND.init(e,t),e.email=t=>e.check(KT(LD,t)),e.url=t=>e.check(QT(BD,t)),e.jwt=t=>e.check(pE(tO,t)),e.emoji=t=>e.check($T(VD,t)),e.guid=t=>e.check(qT(RD,t)),e.uuid=t=>e.check(JT(zD,t)),e.uuidv4=t=>e.check(YT(zD,t)),e.uuidv6=t=>e.check(XT(zD,t)),e.uuidv7=t=>e.check(ZT(zD,t)),e.nanoid=t=>e.check(eE(HD,t)),e.guid=t=>e.check(qT(RD,t)),e.cuid=t=>e.check(tE(UD,t)),e.cuid2=t=>e.check(nE(WD,t)),e.ulid=t=>e.check(rE(GD,t)),e.base64=t=>e.check(uE(QD,t)),e.base64url=t=>e.check(dE($D,t)),e.xid=t=>e.check(iE(KD,t)),e.ksuid=t=>e.check(aE(qD,t)),e.ipv4=t=>e.check(oE(JD,t)),e.ipv6=t=>e.check(sE(YD,t)),e.cidrv4=t=>e.check(cE(XD,t)),e.cidrv6=t=>e.check(lE(ZD,t)),e.e164=t=>e.check(fE(eO,t)),e.datetime=t=>e.check(dD(t)),e.date=t=>e.check(pD(t)),e.time=t=>e.check(hD(t)),e.duration=t=>e.check(_D(t))});function FD(e){return GT(PD,e)}var ID=Q(`ZodStringFormat`,(e,t)=>{Iw.init(e,t),ND.init(e,t)}),LD=Q(`ZodEmail`,(e,t)=>{zw.init(e,t),ID.init(e,t)}),RD=Q(`ZodGUID`,(e,t)=>{Lw.init(e,t),ID.init(e,t)}),zD=Q(`ZodUUID`,(e,t)=>{Rw.init(e,t),ID.init(e,t)}),BD=Q(`ZodURL`,(e,t)=>{Bw.init(e,t),ID.init(e,t)}),VD=Q(`ZodEmoji`,(e,t)=>{Vw.init(e,t),ID.init(e,t)}),HD=Q(`ZodNanoID`,(e,t)=>{Hw.init(e,t),ID.init(e,t)}),UD=Q(`ZodCUID`,(e,t)=>{Uw.init(e,t),ID.init(e,t)}),WD=Q(`ZodCUID2`,(e,t)=>{Ww.init(e,t),ID.init(e,t)}),GD=Q(`ZodULID`,(e,t)=>{Gw.init(e,t),ID.init(e,t)}),KD=Q(`ZodXID`,(e,t)=>{Kw.init(e,t),ID.init(e,t)}),qD=Q(`ZodKSUID`,(e,t)=>{qw.init(e,t),ID.init(e,t)}),JD=Q(`ZodIPv4`,(e,t)=>{Qw.init(e,t),ID.init(e,t)}),YD=Q(`ZodIPv6`,(e,t)=>{$w.init(e,t),ID.init(e,t)}),XD=Q(`ZodCIDRv4`,(e,t)=>{eT.init(e,t),ID.init(e,t)}),ZD=Q(`ZodCIDRv6`,(e,t)=>{tT.init(e,t),ID.init(e,t)}),QD=Q(`ZodBase64`,(e,t)=>{rT.init(e,t),ID.init(e,t)}),$D=Q(`ZodBase64URL`,(e,t)=>{aT.init(e,t),ID.init(e,t)}),eO=Q(`ZodE164`,(e,t)=>{oT.init(e,t),ID.init(e,t)}),tO=Q(`ZodJWT`,(e,t)=>{cT.init(e,t),ID.init(e,t)}),nO=Q(`ZodUnknown`,(e,t)=>{lT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function rO(){return vE(nO)}var iO=Q(`ZodNever`,(e,t)=>{uT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JE(e,t,n,r)});function aO(e){return yE(iO,e)}var oO=Q(`ZodArray`,(e,t)=>{fT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QE(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(xE(t,n)),e.nonempty=t=>e.check(xE(1,t)),e.max=(t,n)=>e.check(bE(t,n)),e.length=(t,n)=>e.check(SE(t,n)),e.unwrap=()=>e.element});function sO(e,t){return FE(oO,e,t)}var cO=Q(`ZodObject`,(e,t)=>{_T.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$E(e,t,n,r),tC(e,`shape`,()=>t.shape),e.keyof=()=>hO(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:rO()}),e.loose=()=>e.clone({...e._zod.def,catchall:rO()}),e.strict=()=>e.clone({...e._zod.def,catchall:aO()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>_C(e,t),e.safeExtend=t=>vC(e,t),e.merge=t=>yC(e,t),e.pick=t=>hC(e,t),e.omit=t=>gC(e,t),e.partial=(...t)=>bC(vO,e,t[0]),e.required=(...t)=>xC(OO,e,t[0])});function lO(e,t){return new cO({type:`object`,shape:e??{},...$(t)})}var uO=Q(`ZodUnion`,(e,t)=>{yT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eD(e,t,n,r),e.options=t.options});function dO(e,t){return new uO({type:`union`,options:e,...$(t)})}var fO=Q(`ZodIntersection`,(e,t)=>{bT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tD(e,t,n,r)});function pO(e,t){return new fO({type:`intersection`,left:e,right:t})}var mO=Q(`ZodEnum`,(e,t)=>{CT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YE(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new mO({...t,checks:[],...$(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new mO({...t,checks:[],...$(r),entries:i})}});function hO(e,t){return new mO({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...$(t)})}var gO=Q(`ZodTransform`,(e,t)=>{wT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new KS(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(DC(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(DC(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function _O(e){return new gO({type:`transform`,transform:e})}var vO=Q(`ZodOptional`,(e,t)=>{ET.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function yO(e){return new vO({type:`optional`,innerType:e})}var bO=Q(`ZodExactOptional`,(e,t)=>{DT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xO(e){return new bO({type:`optional`,innerType:e})}var SO=Q(`ZodNullable`,(e,t)=>{OT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function CO(e){return new SO({type:`nullable`,innerType:e})}var wO=Q(`ZodDefault`,(e,t)=>{kT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function TO(e,t){return new wO({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():uC(t)}})}var EO=Q(`ZodPrefault`,(e,t)=>{jT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function DO(e,t){return new EO({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():uC(t)}})}var OO=Q(`ZodNonOptional`,(e,t)=>{MT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kO(e,t){return new OO({type:`nonoptional`,innerType:e,...$(t)})}var AO=Q(`ZodCatch`,(e,t)=>{PT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function jO(e,t){return new AO({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var MO=Q(`ZodPipe`,(e,t)=>{FT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sD(e,t,n,r),e.in=t.in,e.out=t.out});function NO(e,t){return new MO({type:`pipe`,in:e,out:t})}var PO=Q(`ZodReadonly`,(e,t)=>{LT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cD(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function FO(e){return new PO({type:`readonly`,innerType:e})}var IO=Q(`ZodCustom`,(e,t)=>{zT.init(e,t),MD.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XE(e,t,n,r)});function LO(e,t={}){return IE(IO,e,t)}function RO(e){return LE(e)}var zO=`modulepreload`,BO=function(e){return`/`+e},VO={},HO=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=BO(t,n),t in VO)return;VO[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:zO,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},UO=()=>HO(()=>import(`./routes-VohBsBcC.js`),__vite__mapDeps([0,1])),WO=lO({session:FD().optional()}),GO=ll(`/`)({validateSearch:WO,component:dl(UO,`component`)}),KO={IndexRoute:GO.update({id:`/`,path:`/`,getParentRoute:()=>VS})},qO=VS._addFileChildren(KO);function JO(){let e=new Hs({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!0}}}),t=Tl({routeTree:qO,scrollRestoration:!0,defaultPreload:`intent`,defaultPreloadStaleTime:0});return Ll({router:t,queryClient:e}),t}async function YO(){let e=await JO(),t=[];return window.__TSS_START_OPTIONS__={serializationAdapters:t},t.push(Fo),e.options.serializationAdapters&&t.push(...e.options.serializationAdapters),e.update({basepath:``,serializationAdapters:t}),e.stores.matchesId.get().length||await Ro(e),e}async function XO(){let e=await YO();return window.$_TSR?.h(),e}var ZO;function QO(){return ZO||=XO(),(0,G.jsx)(ec,{promise:ZO,children:e=>(0,G.jsx)(Ol,{router:e})})}var $O=l();(0,W.startTransition)(()=>{(0,$O.hydrateRoot)(document,(0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(QO,{})}))});export{Ky as $,cd as $n,Jo as $r,em as $t,dx as A,mf as An,lu as Ar,_g as At,hx as B,Ud as Bn,js as Br,Zh as Bt,Lb as C,Of as Cn,Du as Cr,Ig as Ct,Jb as D,yf as Dn,hu as Dr,xg as Dt,qb as E,vf as En,yu as Er,Eg as Et,lx as F,of as Fn,zl as Fr,pg as Ft,Yb as G,Cd as Gn,qo as Gr,jm as Gt,gx as H,yd as Hn,_s as Hr,Pm as Ht,fx as I,sf as In,Pc as Ir,lg as It,Db as J,Td as Jn,rs as Jr,Em as Jt,Xb as K,wd as Kn,Go as Kr,km as Kt,sx as L,ef as Ln,Ks as Lr,fg as Lt,mx as M,gf as Mn,iu as Mr,gg as Mt,px as N,df as Nn,Yl as Nr,hg as Nt,tx as O,bf as On,pu as Or,Cg as Ot,cx as P,cf as Pn,Hl as Pr,mg as Pt,qy as Q,od as Qn,ms as Qr,dm as Qt,ix as R,Xd as Rn,Ws as Rr,cg as Rt,Ub as S,fp as Sn,ju as Sr,Lg as St,Mb as T,wf as Tn,Su as Tr,Og as Tt,ox as U,Rd as Un,gs as Ur,Mm as Ut,_x as V,Hd as Vn,Cs as Vr,Vm as Vt,ax as W,bd as Wn,es as Wr,Nm as Wt,Jy as X,md as Xn,Yo as Xr,xm as Xt,ub as Y,J as Yn,Xo as Yr,wm as Yt,Gy as Z,ud as Zn,is as Zr,mm as Zt,Fb as _,cp as _n,Bu as _r,$g as _t,DS as a,Dp as an,id as ar,Cy as at,Gb as b,pp as bn,Iu as br,o_ as bt,Ax as c,Np as cn,nd as cr,vy as ct,Bb as d,Ep as dn,Zu as dr,M_ as dt,Ho as ei,qp as en,sd as er,Uy as et,zb as f,Op as fn,Qu as fr,j_ as ft,Pb as g,dp as gn,Vu as gr,l_ as gt,Rb as h,up as hn,Ku as hr,x_ as ht,PS as i,r as ii,Rp as in,ed as ir,wy as it,nx as j,hf as jn,uu as jr,vg as jt,$b as k,_f as kn,fu as kr,yg as kt,Ix as l,Pp as ln,td as lr,cy as lt,jb as m,sp as mn,Ju as mr,E_ as mt,HO as n,zo as ni,Bp as nn,ad as nr,Oy as nt,NS as o,Ap as on,dd as or,xy as ot,Nb as p,lp as pn,qu as pr,k_ as pt,ex as q,Fd as qn,ls as qr,Am as qt,FS as r,s as ri,zp as rn,ld as rr,Ey as rt,jx as s,jp as sn,rd as sr,by as st,GO as t,Bo as ti,Gp as tn,pd as tr,Vy as tt,MS as u,Fp as un,Xu as ur,R_ as ut,Hb as v,op as vn,Ru as vr,c_ as vt,Ib as w,Ef as wn,xu as wr,Pg as wt,Vb as x,ip as xn,Ou as xr,qg as xt,Wb as y,ap as yn,zu as yr,s_ as yt,ux as z,Wd as zn,Rs as zr,ag as zt};
|