@swirls/looms 0.25.0 → 0.27.0
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/CHANGELOG.md +42 -0
- package/dist/actor/cell.d.ts +3 -1
- package/dist/actor/cell.js +1 -0
- package/dist/actor/host.d.ts +3 -1
- package/dist/actor/host.js +2 -1
- package/dist/actor/routing.d.ts +6 -3
- package/dist/actor/routing.js +6 -4
- package/dist/agent/agent-session.js +2 -2
- package/dist/agent/debugger/agent-chat.js +4 -3
- package/dist/agent/definitions.d.ts +16 -4
- package/dist/agent/effects.js +20 -9
- package/dist/agent/llm.d.ts +3 -1
- package/dist/agent/threads.js +4 -1
- package/dist/ai-vercel/messages.d.ts +3 -3
- package/dist/ai-vercel/messages.js +23 -6
- package/dist/ai-vercel/vercel-llm.js +1 -1
- package/dist/approval/steps.d.ts +3 -1
- package/dist/approval/steps.js +2 -2
- package/dist/client/client.d.ts +7 -1
- package/dist/client/client.js +5 -2
- package/dist/cloudflare/durable-object.d.ts +3 -1
- package/dist/cloudflare/durable-object.js +1 -0
- package/dist/cloudflare/queue-consumer.d.ts +3 -1
- package/dist/cloudflare/queue-consumer.js +2 -1
- package/dist/cloudflare/router.d.ts +3 -1
- package/dist/cloudflare/router.js +1 -1
- package/dist/core/compose.d.ts +8 -2
- package/dist/core/compose.js +6 -3
- package/dist/core/effects.d.ts +3 -0
- package/dist/core/envelope.d.ts +2 -0
- package/dist/core/envelope.js +2 -2
- package/dist/core/event-codec.d.ts +4 -3
- package/dist/core/event-codec.js +7 -7
- package/dist/core/fold.d.ts +3 -0
- package/dist/core/fold.js +3 -1
- package/dist/core/fork.js +1 -1
- package/dist/core/ids.d.ts +70 -5
- package/dist/core/ids.js +164 -41
- package/dist/core/snapshots.d.ts +2 -0
- package/dist/core/snapshots.js +2 -1
- package/dist/core/thread.d.ts +8 -0
- package/dist/debugger/app/assets/{index-GLtrulmj.js → index-D_FKxPrN.js} +2 -2
- package/dist/debugger/app/assets/routes-CkwzFejg.js +47 -0
- package/dist/debugger/app/index.html +1 -1
- package/dist/debugger/context.d.ts +4 -1
- package/dist/debugger/context.js +4 -4
- package/dist/debugger/shell/debugger-shell.d.ts +4 -1
- package/dist/debugger/shell/debugger-shell.js +2 -2
- package/dist/debugger/shell/use-start-run.d.ts +1 -1
- package/dist/debugger/shell/use-start-run.js +1 -2
- package/dist/evaluator/steps.d.ts +2 -2
- package/dist/evaluator/steps.js +3 -3
- package/dist/react/react.d.ts +8 -3
- package/dist/react/react.js +15 -2
- package/dist/react/store.d.ts +5 -1
- package/dist/react/store.js +5 -4
- package/dist/runtime/cancellation.js +5 -5
- package/dist/runtime/deadline-transition-planner.d.ts +1 -0
- package/dist/runtime/deadline-transition-planner.js +8 -7
- package/dist/runtime/effect-admission.js +1 -0
- package/dist/runtime/helpers.d.ts +6 -5
- package/dist/runtime/helpers.js +8 -8
- package/dist/runtime/local-effect-executor.js +15 -10
- package/dist/runtime/looms.d.ts +6 -1
- package/dist/runtime/looms.js +4 -1
- package/dist/runtime/retry-policy.d.ts +2 -1
- package/dist/runtime/retry-policy.js +2 -1
- package/dist/runtime/runtime.js +10 -10
- package/dist/runtime/server/routes/runs.js +5 -5
- package/dist/runtime/types.d.ts +7 -1
- package/dist/runtime/wake-engine.js +10 -9
- package/dist/runtime/worker-callbacks.js +9 -8
- package/dist/runtime/worker-effect-dispatch.d.ts +3 -2
- package/dist/runtime/worker-effect-dispatch.js +7 -5
- package/dist/swarm/board.d.ts +51 -3
- package/dist/swarm/board.js +8 -0
- package/dist/swarm/conformance.js +54 -1
- package/dist/swarm/definitions.d.ts +15 -0
- package/dist/swarm/definitions.js +3 -0
- package/dist/swarm/effects.d.ts +1009 -31
- package/dist/swarm/effects.js +73 -18
- package/dist/swarm/ensure.d.ts +9 -2
- package/dist/swarm/ensure.js +2 -1
- package/dist/swarm/events.d.ts +51 -0
- package/dist/swarm/events.js +10 -0
- package/dist/swarm/index.d.ts +1 -0
- package/dist/swarm/index.js +1 -0
- package/dist/swarm/memory-board.js +18 -2
- package/dist/swarm/module.d.ts +2055 -115
- package/dist/swarm/module.js +3 -1
- package/dist/swarm/prompt.d.ts +5 -0
- package/dist/swarm/prompt.js +27 -2
- package/dist/swarm/scope.d.ts +80 -0
- package/dist/swarm/services.d.ts +2 -2
- package/dist/swarm/services.js +5 -2
- package/dist/swarm/steps.d.ts +3 -3
- package/dist/swarm/steps.js +5 -5
- package/dist/swarm/threads.d.ts +4 -0
- package/dist/swarm/threads.js +24 -2
- package/dist/swarm/tools.d.ts +3 -2
- package/dist/swarm/tools.js +25 -18
- package/dist/workflow/effects.js +6 -5
- package/dist/workflow/graph.d.ts +3 -3
- package/dist/workflow/graph.js +5 -5
- package/dist/workflow/module.d.ts +8 -2
- package/dist/workflow/threads.d.ts +14 -2
- package/dist/workflow/threads.js +54 -44
- package/package.json +1 -1
- package/dist/debugger/app/assets/routes-CECZJJob.js +0 -47
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-CkwzFejg.js","./rolldown-runtime-CbXtAM7H.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{n as e,t}from"./rolldown-runtime-CbXtAM7H.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();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 ee(){}var C={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function w(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ne(e,t){return w(e.type,t,e.props)}function re(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ie(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ae=/\/+/g;function oe(e,t){return typeof e==`object`&&e&&e.key!=null?ie(``+e.key):t.toString(36)}function se(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(ee,ee):(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 ce(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,ce(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+oe(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ae,`$&/`)+`/`),ce(o,r,i,``,function(e){return e})):o!=null&&(re(o)&&(o=ne(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ae,`$&/`)+`/`)+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+oe(a,u),c+=ce(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+oe(a,u++),c+=ce(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ce(se(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 T(e,t,n){if(e==null)return e;var r=[],i=0;return ce(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function E(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 le=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)},ue={map:T,forEach:function(e,t,n){T(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return T(e,function(){t++}),t},toArray:function(e){return T(e,function(e){return e})||[]},only:function(e){if(!re(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ue,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=C,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return C.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)!te.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 w(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)te.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 w(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=re,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:E}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=C.T,n={};C.T=n;try{var r=e(),i=C.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(ee,le)}catch(e){le(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),C.T=t}},e.unstable_useCacheRefresh=function(){return C.H.useCacheRefresh()},e.use=function(e){return C.H.use(e)},e.useActionState=function(e,t,n){return C.H.useActionState(e,t,n)},e.useCallback=function(e,t){return C.H.useCallback(e,t)},e.useContext=function(e){return C.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return C.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return C.H.useEffect(e,t)},e.useEffectEvent=function(e){return C.H.useEffectEvent(e)},e.useId=function(){return C.H.useId()},e.useImperativeHandle=function(e,t,n){return C.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return C.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return C.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return C.H.useMemo(e,t)},e.useOptimistic=function(e,t){return C.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return C.H.useReducer(e,t,n)},e.useRef=function(e){return C.H.useRef(e)},e.useState=function(e){return C.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return C.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return C.H.useTransition()},e.version=`19.2.8`})),r=t(((e,t)=>{t.exports=n()})),i=e(r(),1),a=i.use,o=i.useLayoutEffect;function s(e){return e[e.length-1]}function c(e,t){return typeof e==`function`?e(t):e}var l=Object.prototype.hasOwnProperty;function u(e){for(let t in e)if(l.call(e,t))return!0;return!1}var d=()=>Object.create(null),f=(e,t)=>p(e,t,!0);function p(e,t,n,r=0){if(e===t)return e;if(r++>500)return t;let i=Array.isArray(e)&&Array.isArray(t);if(!i&&!(m(e)&&m(t)))return t;let a=Object.keys(e),o=a.length,c=Object.keys(t),u=c.length;if(i?o!==e.length||u!==t.length||o&&s(a)!==`${o-1}`||u&&s(c)!==`${u-1}`:o!==Object.getOwnPropertyNames(e).length||u!==Object.getOwnPropertyNames(t).length||Object.getOwnPropertySymbols(t).length)return t;let f=0,h,g,_;if(i){for(;f<u&&(_=f,g=e[_],h=t[_],h=g===h?g:typeof g==`object`?p(g,h,n,r):h,h===g);f++);if(f===u&&o===u)return e}else{let i=o===u,s=!0;for(;f<u;f++){_=c[f],g=e[_];let o=t[_];h=g===o?g:typeof g==`object`?p(g,o,n,r):o,i&&=h===g&&(a[f]===_||l.call(e,_)),s&&=Object.is(h,o),a[f]=h}if(i)return Object.getOwnPropertySymbols(e).length?t:e;if(s)return t}let v=i?c.fill(0):n?d():{};for(let o=0;o<u;o++)_=i?o:c[o],i?(g=e[_],o>f&&(h=t[_],h=g===h?g:typeof g==`object`?p(g,h,n,r):h),v[_]=o<f?g:h):v[_]=a[o];return v}function m(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function h(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!h(a,o,n,r))return!1}return!0}if(m(e)&&m(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!h(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!h(e[a],t[a],n,r)))return!1;return i===0}return!1}function g(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var _=/[\x00-\x1f\x7f"<>`{}]/g;function v(e){return e.replace(_,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function y(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return v(t)}var b=[`http:`,`https:`,`mailto:`,`tel:`];function x(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var S=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function ee(e,t){if(!e)return!1;if(S.test(e))return!0;let n=x(e);return n?!t.has(n):!1}function C(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=y(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=y(r?e.slice(r):e)}return t}function te(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function w(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function ne(){throw Error(`Invariant failed`)}function re(e){return e.replace(/\/{2,}/g,`/`)}function ie(e){return e===`/`?e:e.replace(/^\/+/,``)}function ae(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function oe(e){return ae(ie(e))}function se(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function ce(e,t,n=`never`,r){if(t.includes(`//`)&&(t=re(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=re(e)),o=e.split(`/`);o.length>1&&s(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(s(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let c=o.join(`/`),l=(i?re(c):c)||`/`;return a&&r&&r.set(a,l),l}function T(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function E(e){return e==null||e===``}function le(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ue(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&E(f)){if(c===`/`&&!d)continue;f=``}o+=c+le(s,f,r)+(d||``)}}return o+a||`/`}function de(e){return e?.isNotFound===!0}function fe(){try{return sessionStorage}catch{return}}var pe=`tsr-scroll-restoration-v1_3`,D=fe();function me(){try{return JSON.parse(D?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var he=me(),ge=`data-scroll-restoration-id`,_e=e=>e.state.__TSR_key||e.href;function ve(e){let t=e.getAttribute(ge);if(t)return`[${ge}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var ye=!1,be=`window`;function xe(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Se(e){let t=new Set;for(let n of e){if(n===be)continue;let e=xe(n);e&&t.add(e)}return t}function Ce(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||_e,a=new Set,o=e=>{let t=he[e]||={};for(let e of a)e===document?t[be]={scrollX,scrollY}:e.isConnected&&(t[ve(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,ye=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{ye||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{D?.setItem(pe,JSON.stringify(he))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=he[d];if(e){let t=he[u];for(let n in e){if(n===be){if(s)continue}else{let e=xe(n);if(!e||s&&o&&(l??=Se(o),l.has(e)))continue}t||=he[u]={},t[n]??=e[n]}}}ye=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Se(o));let t=e&&i&&c,s=r.e?he[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===be){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=xe(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{ye=!1}}))}function we(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Te(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Ee(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=Te(r):Array.isArray(t)?t.push(Te(r)):n[e]=[t,Te(r)]}return n}var De=/^(?:\s|["[{\d-]|fa|nu|tr)/,Oe=Ae(JSON.parse),ke=je(JSON.stringify,JSON.parse);function Ae(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.slice(1));let r=Ee(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!De.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function je(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!De.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=we(e,r);return t?`?${t}`:``}}var Me=`__root__`;function Ne(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function Pe(e){return e instanceof Response&&!!e.options}function Fe(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var Ie=4,Le=5;function Re(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function ze(e,t,n){let r=e.slice(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.slice(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.slice(s,a);return[o?3:c?1:2,c||`_splat`,r.slice(0,i),e.slice(t+a+1,c?n:e.length)]}}return r}function Be(e,t,n,r,i,a){let o=n,c=t.fullPath??t.from,l=t.options,u=c.length,d=c.endsWith(`/`)?u-1:u,f=l?.caseSensitive??e,p=l?.params?.parse??l?.parseParams,m,h=a?n-1:0;if(!r||c.includes(`$`)){m=a?.slice()??[];let e=s(m);e&&typeof e!=`string`&&e[0]===2&&(m[m.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+c.substring(n-(c[n-2]===`/`?2:1),d)],h=u)}for(;o<u;){let e=o,t=c.indexOf(`/`,e),n=t===-1?u:t,a=ze(c,e,n);o=n+1;let s;if(typeof a==`string`){if(!r)continue;let e=a,t;f?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)s=n;else{let n=He(r);s=n,t.set(e,n)}}else{let t=a[0],l=a[2],g=a[3]??``;if(t===2&&(n=u,o=n+1),m&&h<n&&(h<e-1&&m.push(c.slice(h,e-1)),a[2]=`/`+l,t===2&&a[3]!==void 0&&d<u&&(a[3]=g.slice(0,-1)),m.push(a),h=n),!r)continue;let _=f&&!!(l||g);f||(l=l.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!p&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===l&&e.suffix===g);if(y)s=y;else{let e=He(r,t,_,l,g);s=e,v.push(e),v.length===2&&i?.push(v)}}r=s}m&&h<d&&m.push(c.slice(h,d));let g=m?.slice();if(!r)return g;if(p&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=He(r,Le);(r.pathless??=[]).push(e),r=e}let _=(t.path||!t.children)&&!t.isRoot;if(_&&d<u){let e=He(r,Ie);r.index=e,r=e}return r.parse=p??null,r.priority=l?.params?.priority??0,r.route||(r.data=g,_&&(r.route=t)),[r,o,g]}function Ve(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function He(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Ue(e,t){let n=He(),r=[];function i(e,t,n,a){let[o,s,c]=Be(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Ve);t.masksTree=n,t.flatCache=Fe(1e3)}function We(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Je(e,t.masksTree);return t.flatCache.set(e,r),r}function Ge(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=He(),Be(t,{from:e},1,o),i.singleCache.set(a,o)),Je(r,o,n)}function Ke(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Je(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Xe(a.route)),t.matchCache.set(r,a),a}function qe(e,t=!1){let n=He(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&ne(),i[e.id]=e,o!==0&&e.path){let t=ae(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=Be(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(Ve);return{processedTree:{segmentTree:n,singleCache:Fe(1e3),matchCache:Fe(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Je(e,t,n=!1){let r=e.split(`/`),i=Qe(e,r,t,n);if(!i)return null;let[a]=Ye(e,r,i);return{route:i.node.route,rawParams:a}}function Ye(e,t,n){let r=Ze(n.node),i=n.node.data&&Re(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===Ie)break;if(u.kind===Le){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Xe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Ze(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Qe(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!s(t),a=i&&e!==`/`,o=t.length-+!!i,c=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let n=c.pop(),{node:i,index:s,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!nt(u,n))continue;if(i.parse){if(!tt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==Ie&&nt(l,n)&&(l=n);let _=s===o;if(_&&(i.route&&(!a||i.kind===Ie||i.kind===2)&&nt(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[s],y;if(_&&i.index){let n={node:i.index,index:s,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(tt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&et(f,o))return n;nt(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(s).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}c.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];c.push({node:n,index:s,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}c.push({node:t,index:s+1,skipped:d,statics:f,dynamics:p,optionals:m+$e(o,s),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}c.push({node:t,index:s+1,skipped:d,statics:f,dynamics:p+$e(o,s),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&c.push({node:e,index:s+1,skipped:d,statics:f+$e(o,s),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&c.push({node:e,index:s+1,skipped:d,statics:f+$e(o,s),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];c.push({node:t,index:s,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function $e(e,t){return 2**(e-t-1)}function et(e,t){return e===2**(t-1)-1}function tt(e,t,n){let r,i;try{[r,i]=Ye(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function nt(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ie)>(e.node.kind===Ie)||t.node.kind===Ie==(e.node.kind===Ie)&&t.node.depth>e.node.depth)))}function rt(e,t,n){let r=oe(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=re(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>it(n,s.input({url:e})),output:({url:e})=>s.output({url:at(n,e)})}:s}function it(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function at(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ot(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{w(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var st=`__TSR_index`,ct=`popstate`,lt=`beforeunload`,ut=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function dt(e){let t=ut.exec(e);return t?`/`+e.slice(t[0].length):e}function ft(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
|
|
3
3
|
\r`.includes(e)?``:encodeURIComponent(e))),dt(e)}function pt(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async n=>{let r=n.navigateOpts?.ignoreBlocker?void 0:e.getBlockers?.();if(typeof document<`u`&&r?.length&&(n.type===`PUSH`||n.type===`REPLACE`))for(let i of r){let r=gt(n.path,n.state);if(await i.blockerFn({currentLocation:t,nextLocation:r,action:n.type})){e.onBlocked?.();return}}n.task()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[st];i=mt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[st];i=mt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[st]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function mt(e,t){let n=_t();return{...t,key:n,__TSR_key:n,[st]:e}}function ht(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>ft(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>gt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=_t();t.history.replaceState({[st]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=gt(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[st]-l.state[st],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=pt({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:s,flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(lt,x,{capture:!0}),t.removeEventListener(ct,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(lt,x,{capture:!0}),t.addEventListener(ct,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function gt(e,t){let n=ft(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=_t();t={[st]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.slice(0,r>-1?i>-1?Math.min(r,i):r:i>-1?i:n.length),hash:r>-1?n.slice(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function _t(){return(Math.random()+1).toString(36).slice(7)}function vt(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function yt(e){return e.pathname+e.search+e.hash}function bt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function xt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function St({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Ct(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function wt(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Tt=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:ht()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&oe(n)?rt(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ot(this.latestLocation,e),Ce(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=qe(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&Ue(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Fe(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:C(e),external:!1,searchStr:o,search:f(t?.search,i),hash:C(r.slice(1)),state:p(t?.state,a)}}let o=it(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:C(dt(o.pathname)),external:!!this.rewrite&&vt(o,this.origin),searchStr:c,search:f(t?.search,s),hash:C(o.hash.slice(1)),state:p(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Ke(ae(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=gt(n.href,{});n={...n,to:it(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=e._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>i??=this.matchRoutesLightweight(a()),s=n.to?`${n.to}`:`.`,c=ce(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[ae(c)],f=c.includes(`$`),p;if(l)p=l._branch??=Xe(l);else if(f)p=[];else{let[e,t,n]=this.getMatchedRoutes(c);p=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(p=[...p,this.options.notFoundRoute])}let m=f?l?._interpolation??Be(!1,{fullPath:c},0):void 0,h;for(let e of p){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(h??=At(n.params,e),!u(h))break;h===e&&(h=Object.assign(d(),h));try{Object.assign(h,t(h))}catch{}}}h??=At(n.params,jt(n.params,m)?o()[3]:Mt);let g=e.leaveParams?c:dt(C(m?ue(c,m,h,this.pathParamsDecoder):c)),_=Nt(p,e._includeValidateSearch),v=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};p.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,kt(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},y=_.length?Pt(_,v(),n):n.search===!0?v():typeof n.search==`function`?n.search(v()):n.search||Mt,b=this.options.stringifySearch(y),x=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,S=x?`#${x}`:``,ee=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Mt,w=`${g}${b}${S}`,ne,re,ie=!1;if(this.rewrite){let e=new URL(w,this.origin),t=e.origin,n=at(this.rewrite,e);ne=yt(e),vt(n,t)?(re=n.href,ie=!0):re=dt(yt(n))}else ne=te(w),re=ne;return{publicHref:re,href:ne,pathname:g,search:y,searchStr:b,state:ee,hash:x??``,external:ie,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=We(r.pathname,this.processedTree);if(t){let i=Object.assign(d(),t.rawParams),{from:a,params:o,...s}=t.route,c=At(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Et(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=ae(this.latestLocation.href)===ae(n.href)&&h(St(n.state),St(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?x(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Et(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await On(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(xt(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&bt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(S.test(n)||(r=x(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:vt(e,this.origin)||(n=yt(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=zt,this.preloadRoute=e=>kn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?ce(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Ge(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!h(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?h(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=T(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ke,parseSearch:e.parseSearch??Oe,protocolAllowlist:e.protocolAllowlist??b}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Be(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:ae(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Ft(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},m;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,h,g;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=kt(i.options.validateSearch,{...n})??void 0;l={...n,...e},h={...r,...e}}catch(e){let r=e;if(e instanceof Dt||(r=new Dt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,h={},g=r}}let _=``,v=``;try{_=i.options.loaderDeps?.({search:l})??``,v=_&&JSON.stringify(_)||``}catch(e){if(t?.throwOnError)throw e;g??=e}let y=d(),b=i._interpolation?ue(i.fullPath,i._interpolation,r,this.pathParamsDecoder,y):i.fullPath,x=i.id+b+v,S=u(i,n),ee=this._cache.get(x)??(S?.id===x?S:void 0);m=ee?._strictParams??Object.assign(y,m);let C;if(!ee)try{It(i,m)}catch(e){if(C=de(e)||Pe(e)?e:new Ot(e.message,{cause:e}),t?.throwOnError)throw C}let te=S?`stay`:`enter`,w;if(ee)w={...ee,cause:te,search:f(S?S.search:ee.search,l),_strictSearch:h,searchError:g};else{let e=bt(i)?`pending`:`success`;w={id:x,ssr:i.options.ssr,index:n,routeId:i.id,params:S?.params??m,_strictParams:m,pathname:b,updatedAt:Date.now(),search:S?f(S.search,l):l,_strictSearch:h,searchError:g,status:e,isFetching:!1,error:void 0,paramsError:C,context:{},abortController:t?._controller??new AbortController,cause:te,loaderDeps:S?p(S.loaderDeps,_):_,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let ne=s===i.id;w._notFound&&!ne&&(w.error=void 0),w._notFound=ne,c[n]=w}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?f(n.params,m):m,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=s(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),c=s(a),l={...e.search};for(let e of a)try{Object.assign(l,kt(e.options.validateSearch,l))}catch{}let u=n&&n.routeId===c.id&&n.pathname===e.pathname,d;if(u)d=n.params;else{let e=o;for(let t of a)try{It(t,e)}catch{}d=e}let f=[a,c.fullPath,l,d];return this.lightweightCache.set(e,[r,f]),f}};async function Et(e,t,{replace:n,ignoreBlocker:r}){if(!ee(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Dt=class extends Error{},Ot=class extends Error{};function kt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Dt(`Async validation not supported`);if(n.issues)throw new Dt(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function At(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function jt(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!l.call(e,t[1]))}var Mt=Object.freeze({});function Nt(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=kt(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function Pt(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=c(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Ft(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Me}function It(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Lt(e,t){return e.options[t]?.preload?.()}function Rt(e,t){let n=Lt(e,`component`),r=Lt(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function zt(e,t,n){let r=()=>t===!1?void 0:t?Lt(e,t):Rt(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Bt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function Vt(e,t,n){let r=e._tx;return t&&r?.[2]===n&&!r[3].some(e=>e.routeId===t)}var Ht=0,Ut=1,Wt=2,Gt=3,Kt=[4];function qt(e){return typeof e[0]==`number`}function Jt(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Yt(e,t){return e.routesById[t.routeId]}function Xt(e,t,n){return Pe(e)?[Gt,e]:de(e)?(e.routeId||=n,[Wt,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Ut,e]):[Ht,e]}function Zt(e,t){let n=Xt(t,!0,e.id);if(n[0]!==Ut)return n;try{e.options.onError?.(n[1])}catch(t){n=Xt(t,!0,e.id)}return n}function Qt(e,t,n,r,i){return i[0].signal.aborted?Kt:hn(e,t,n,Zt(n,r),i)}async function $t(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Yt(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return tn(e,r),[i,Qt(e,t,u,a,n)]}if(c.aborted)return[i,Kt];let p=r.paramsError??r.searchError;if(p!==void 0)return tn(e,r),[i,Qt(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{an(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?Jt(a,c):a);if(c.aborted)return[i,Kt];let s=hn(e,t,u,Xt(o,!1,u.id),n);if(s[0]!==Ht)return tn(e,r),[i,s];r.context={...r.context,...o}}catch(a){return tn(e,r),[i,Qt(e,t,u,a,n)]}finally{r.status=h,an(e,r,!1,n[0])}}i()}function en(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function tn(e,t){let n=t._flight;t._flight=void 0,en(e,t,n)?.abort()}function nn(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=en(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function rn(e){for(let t of e){let e=t._flight;e&&e[2]++}}function an(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function on(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function sn(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Kt;if(!i)return[Ht,void 0];let l=n._flight;an(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(on(e,t,n,r,s,a,!!o[3]))).then(e=>Xt(e,!1,r.id),e=>Xt(e,!0,r.id)).then(t=>(t[0]!==Ht&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Ut&&l[2]?Zt(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],hn(e,t,r,await Jt(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return tn(e,n),Kt}finally{an(e,n,!1,s)}}function cn(e,t,n){t[0]!==Gt&&(e.status=`success`,e.error=void 0,t[0]===Ht?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ln(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&tn(e,r)}function un(e,t){return t[0]===Ut||t[0]===Wt?{...e,status:t[0]===Ut?`error`:`notFound`,error:t[1],_flight:void 0}:e}function dn(e,t,n,r,i,a,o){let s=t[1][n],c=Yt(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(on(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Kt)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,tn(e,s),p=Qt(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,ee=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,en(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let C=!p&&x?sn(e,t,s,c,g,i,a).then(t=>(cn(s,t,l),t[0]===Ht&&(m&&!a[0].signal.aborted&&ln(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[Ht,s.loaderData]),te=(async()=>{try{let e=zt(c,void 0,ee);e&&await Jt(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Qt(e,t,c,r,a)]}let r=await C;x&&r[0]===Ht&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,C,te]),!y)return C.then(e=>un(s,e));let w={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ne=sn(e,t,w,c,g,i,a).then(e=>(s.isFetching=!1,cn(w,e,!1),e));return(t[2]??=[]).push([n,ne,te,w]),ne.then(e=>un(w,e))}async function fn(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Yt(e,t[n]);try{let e=zt(i,!1);e&&await Jt(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function pn(e,t){t[2]&&=(nn(e,t[2].map(e=>e[3])),void 0)}async function mn(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Gt)throw[a,t];!i&&t[0]!==Ht&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Gt)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function hn(e,t,n,r,i,a){for(;r[0]===Gt;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[Gt,t]:[Gt,t,a]}return[Gt,o,n]}catch(e){r=a?[Ut,e]:Zt(n,e),a=!0}}return r}async function gn(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Wt?fn(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Gt)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Ht&&t[0]<Gt&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Gt){let n=s[1];if(n[0]!==Gt||n[1].options.reloadDocument||n[2])return pn(e,t),n;c=!0,s=[0,[Ut,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Ut?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Yt(e,u);try{await Jt(i?Promise.resolve().then(()=>zt(m,l===Ut?`errorComponent`:`notFoundComponent`)):Promise.all([zt(m),zt(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return pn(e,t),Kt}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),pn(e,t),nn(e,o),p()):u.status=`success`}return t}async function _n(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Yt(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await Jt(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function vn(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await fn(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=dn(e,i,t,u,f,r,l)},m=await $t(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Wt){let t=await fn(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=Gt&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=gn(e,i,u,r[0],mn(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=mn(i[2],void 0,void 0,h.then(e=>qt(e)?0:Bt(n).length,()=>0))),o=await h}catch(t){if(pn(e,i),t===a&&a.aborted)return Kt;throw t}return qt(o)?o:_n(e,o,a,r[6]===n.length?r[6]:0)}function yn(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Yt(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>yn(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function bn(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function xn(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Bt(t[3]).some(e=>e.id===n[1]))return;let i;try{await Jt(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function Sn(e,t){e._committed=t,e.stores.setMatches(t)}function Cn(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=Bt(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Yt(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Ct(n);Sn(e,n),nn(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),wt(e,i,n,a,l,t)}async function wn(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Tn(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function En(e,t,n,r,i){let a=n.map(e=>({...e}));rn(a);for(let t of r)tn(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await gn(e,o,r,t[0],i)}catch(t){throw nn(e,a),t}if(qt(s)){nn(e,a),s[0]===Gt&&e._tx===t&&e._committed===n&&await Tn(e,t,s);return}if(await _n(e,s,t[0].signal),e._tx!==t||e._committed!==n){nn(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),tn(e,n))}Sn(e,a),nn(e,n,a)}async function Dn(e,t,n,r,i,a){let o=await vn(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(qt(o)){let n=o[0]===Gt&&e._tx===t;if((!n||o[1].options.reloadDocument)&&bn(e,t),nn(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){bn(e,t);return}await Tn(e,t,o);return}let s=o[1];if(e._tx===t&&await xn(e,t),e._tx!==t){bn(e,t),nn(e,s),pn(e,o);return}let c=t[2],l=xt(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await xn(e,t),e._tx!==t){bn(e,t),nn(e,s),pn(e,o);return}let n=await e.startTransition(()=>{bn(e,t),Cn(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){pn(e,o);return}u?.length&&En(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function On(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=xt(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await wn(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});rn(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){nn(e,m),await wn(e,n);return}e._preflight=void 0;let g,_=()=>Dn(e,y,f,()=>yn(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>wn(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&an(e,t,!1)}n[0].abort(),nn(e,n[3],y[3],!0)}if(e._tx!==y){nn(e,y[3]),y[3]=[],g?.(),await wn(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&yn(e,y),g?.(_()),await y[5]}async function kn(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),rn(a),o=(e._preloads??=new Map).set(i,a),s=await vn(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),nn(e,a)),i.abort()}if(!qt(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){de(e)||console.error(e);return}}}var An=`Error preloading route! ☝️`,jn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Me:this.parentRoute||ne();let r=n?Me:t?.path;r&&r!==`/`&&(r=ie(r));let i=t?.id||r,a=n?Me:re((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(i??``));r===`__root__`&&(r=`/`);let o=a===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:re(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=a,this._fullPath=o,this._to=ae(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Ne({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},Mn=class extends jn{constructor(e){super(e)}},Nn=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})),Pn=t(((e,t)=>{t.exports=Nn()})),O=Pn(),Fn=class extends i.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?i.createElement(this.props.errorComponent??In,{error:e[0],reset:this.reset}):this.props.children}};function In({error:e}){let[t,n]=i.useState(!1);return(0,O.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,O.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,O.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,O.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,O.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,O.jsx)(`div`,{children:(0,O.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,O.jsx)(`code`,{children:e.message}):null})}):null]})}var Ln=()=>!0,Rn=()=>!1;function zn({children:e,fallback:t=null}){return(0,O.jsx)(i.Fragment,{children:Bn()?e:t})}function Bn(e=!0){return i.useSyncExternalStore(Vn,Ln,e?Rn:Ln)}function Vn(){return()=>{}}var Hn=i.createContext(null);function Un(e){return i.useContext(Hn)}function Wn(e,t){let n=e.stores.location,r=new Set,i,a,o=n=>{Vt(e,t,n)||(i=n,r.forEach(e=>e()))};return[()=>i??n.get(),e=>(r.size||(i=n.get(),a=n.subscribe(o).unsubscribe),r.add(e),()=>{r.delete(e),r.size||(a(),i=void 0)})]}var Gn=i.createContext(void 0),Kn=i.createContext(void 0);function qn({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(1)}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(1)}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 Jn(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 Yn=[],Xn=0,{link:Zn,unlink:Qn,propagate:$n,checkDirty:er,shallowPropagate:tr}=qn({update(e){return e._update()},notify(e){Yn[rr++]=e,e.flags&=-3},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,sr(e))}}),nr=0,rr=0,ir,ar=0;function or(e){try{++ar,e()}finally{--ar||cr()}}function sr(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Qn(n,e)}function cr(){if(!(ar>0)){for(;nr<rr;){let e=Yn[nr];Yn[nr++]=void 0,e.notify()}nr=0,rr=0}}function lr(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,get(){return ir!==void 0&&Zn(i,ir,Xn),i._snapshot},subscribe(e){let t=Jn(e),n={current:!1},r=ur(()=>{i.get(),n.current?(ir=void 0,t.next?.(i._snapshot)):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=ir,o=t?.compare??Object.is;if(n)ir=i,++Xn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=5);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{ir=a,n&&(i.flags&=-5),sr(i)}}};return n?(i.flags=17,i.get=function(){let e=i.flags;if(e&16||e&32&&er(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&tr(e)}}else e&32&&(i.flags=e&-33);return ir!==void 0&&Zn(i,ir,Xn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&($n(e),tr(e),cr())}},i}function ur(e){let t=()=>{let t=ir;ir=n,++Xn,n.depsTail=void 0,n.flags=6;try{return e()}finally{ir=t,n.flags&=-5,sr(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){let e=this.flags;e&16||e&32&&er(this.deps,this)?t():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,sr(this)}};return t(),n}var dr=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})),fr=t(((e,t)=>{t.exports=dr()})),pr=t((e=>{var t=r(),n=fr();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}})),mr=t(((e,t)=>{t.exports=pr()}))();function hr(e,t){return e===t}function gr(e,t=e=>e,n){let r=n?.compare??hr,a=(0,i.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),o=(0,i.useCallback)(()=>e.get(),[e]);return(0,mr.useSyncExternalStoreWithSelector)(a,o,o,t,r)}var _r={};function vr(e,t){let n=i.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=p(n.current,i):i}}function yr(e){let t=Un(),n=i.useContext(e.from?Kn:Gn),r=e.from??n,a=t.stores.getMatchStore(r),o=vr(e,t),s=gr(a,e=>e?o(e):_r);if(s!==_r)return s;(e.shouldThrow??!0)&&ne()}function br(e){return yr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function xr(e){let{select:t,...n}=e;return yr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Sr(e){return yr({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 Cr(e){return yr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function wr(e){let t=Un();return i.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Tr(e){return yr({...e,select:t=>e.select?e.select(t.context):t.context})}function Er(...e){let t=i.useRef(e),n=t.current;return e.forEach((e,t)=>{h(n[t],e,!1,!0)||(n[t]=e)}),t.current}function Dr(e,t){e.preloadRoute(t).catch(e=>{console.warn(e),console.warn(An)})}function Or(e,t){let n=typeof e==`string`&&x(e);if(n)return t.has(n)?e:null}function kr(e,t,n,r){let i=se(e.pathname,r),a=se(t.pathname,r);return(n?.exact?i!==a:!i.startsWith(a)||i.length!==a.length&&i[a.length]!==`/`)||(n?.includeSearch??!0)&&!h(e.search,t.search,!n?.exact,n?.explicitUndefined)?!1:!n?.includeHash||e.hash===t.hash}function Ar(e,t,n){let r=Un(),a=i.useRef(null),o=i.useCallback(e=>{if(a.current=e,typeof t==`function`)return t(e);t&&(t.current=e)},[t]),{activeOptions:s,to:c,preload:l,preloadDelay:u,disabled:d,target:f,onClick:p,onBlur:m,onFocus:h,onMouseEnter:g,onMouseLeave:_,onTouchStart:v}=e,[y,b,S]=Er(e.search,e.params,s),ee=i.useContext(Gn),C=(r.stores._linkScopes??={})[ee]??=Wn(r,ee),[te,w,ne]=i.useMemo(()=>{let t=Or(c,r.protocolAllowlist);if(t!==void 0){let n=[t??void 0];return[e,()=>n]}let n={...e},i,a,o,s=()=>{let e=C[0]();if(e!==i){n._fromLocation=e;let t=r.buildLocation(n),o=Rr(t,r,d),s=d||o&&!x(o)?kr(e,t,S,r.basepath):void 0;(!a||a[0]!==o||a[1]!==s)&&(a=[o,s]),i=e}return a};return[n,s,S?.includeHash&&(()=>{let e=s();return e[1]?o??=[e[0],!1]:e})]},[r,C,e.from,e.hash,e.href,c,y,b,e.state,e.mask,e.unsafeRelative,S,d]),[re,ie]=i.useSyncExternalStore(C[1],w,ne||w),ae=ie===void 0&&re,oe=d||re===void 0,se=i.useRef(!1),ce=e.reloadDocument||ae||oe?!1:l??r.options.defaultPreload,T=u??r.options.defaultPreloadDelay??0,E=i.useCallback(e=>{let t=e?.isIntersecting;if(!(t??ce===`intent`)){t===!1&&Ir(a);return}if(!T){Dr(r,te);return}a.t??=setTimeout(()=>{a.t=void 0,Dr(r,te)},T)},[r,te,a,ce,T]);i.useEffect(()=>{if(!ce)return;ce===`render`&&!se.current&&(se.current=!0,Dr(r,te));let e=!0,t;return ce===`viewport`&&a.current&&typeof IntersectionObserver==`function`&&(t=new IntersectionObserver(t=>{e&&E(t.pop())},{rootMargin:`100px`}),t.observe(a.current)),()=>{e=!1,t?.disconnect(),Ir(a)}},[r,te,ce,E,a]);let le=Pr(e,n);if(le.ref=t?o:a,ae)return le.href=ae,le;let ue=t=>{let n=f??t.currentTarget.getAttribute(`target`);!oe&&!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&(!n||n===`_self`)&&t.button===0&&(t.preventDefault(),Ir(a),r.navigate({...e,_fromLocation:te._fromLocation}))},de=()=>{ce===`intent`&&Dr(r,te)},fe=()=>{ce===`intent`&&Ir(a)};return le.onClick=Lr(p,ue),le.onBlur=Lr(m,fe),le.onFocus=Lr(h,E),le.onMouseEnter=Lr(g,E),le.onMouseLeave=Lr(_,fe),le.onTouchStart=Lr(v,de),Fr(le,e,ie,re,oe,n)}var jr={},Mr={className:`active`},Nr=new Set([`to`,`params`,`search`,`hash`,`state`,`mask`,`from`,`unsafeRelative`,`reloadDocument`,`preload`,`preloadDelay`,`preloadIntentProximity`,`hashScrollIntoView`,`replace`,`startTransition`,`resetScroll`,`viewTransition`,`ignoreBlocker`,`activeProps`,`inactiveProps`,`activeOptions`,`_asChild`]);function Pr(e,t){let n={};for(let r in e)Nr.has(r)||r===`type`&&t!==void 0||r===`disabled`&&t===`a`||(n[r]=e[r]);return n}function Fr(e,t,n,r,i,a){let{activeProps:o,inactiveProps:s,className:l,style:u,target:d}=t,f=c(n?o:s,{})??(n?Mr:jr);Object.assign(e,f),e.href=r,a!==`a`&&(e.disabled=i),e.target=d;let p=f.style;(u||p)&&(e.style=u&&p?{...u,...p}:u||p);let m=f.className;return(l||m)&&(e.className=l?m?`${l} ${m}`:l:m),i&&(e.role=`link`,e[`aria-disabled`]=!0),n&&(e[`data-status`]=`active`,e[`aria-current`]=`page`),e}var Ir=e=>{clearTimeout(e.t),e.t=void 0},Lr=(e,t)=>e?n=>n.defaultPrevented||(e(n),n.defaultPrevented||t(n)):t;function Rr(e,t,n){if(n)return;let r=e.maskedLocation??e,i=r.external?r.publicHref:t.history.createHref(r.publicHref)||`/`;if(!r.external&&i===r.publicHref||!ee(i,t.protocolAllowlist))return i}var zr=i.memo(i.forwardRef((e,t)=>{let n=e._asChild||`a`,r=Ar(e,t,n),a=typeof e.children==`function`?e.children({isActive:r[`data-status`]===`active`}):e.children;return i.createElement(n,r,a)}),Br);function Br(e,t){let n=0;for(let r in t)if(n++,e[r]!==t[r]&&(!Nr.has(r)||!h(e[r],t[r],!1,!0)))return!1;for(let t in e)n--;return n===0}var Vr=class extends jn{constructor(e){super(e),this.useMatch=e=>yr({...e,from:this.id}),this.useRouteContext=e=>Tr({...e,from:this.id}),this.useSearch=e=>Cr({...e,from:this.id}),this.useParams=e=>Sr({...e,from:this.id}),this.useLoaderDeps=e=>xr({...e,from:this.id}),this.useLoaderData=e=>br({...e,from:this.id}),this.useNavigate=()=>wr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,O.jsx)(zr,{ref:t,from:this.fullPath,...e}))}};function Hr(e){return new Vr(e)}var Ur=class extends Mn{constructor(e){super(e),this.useMatch=e=>yr({...e,from:this.id}),this.useRouteContext=e=>Tr({...e,from:this.id}),this.useSearch=e=>Cr({...e,from:this.id}),this.useParams=e=>Sr({...e,from:this.id}),this.useLoaderDeps=e=>xr({...e,from:this.id}),this.useLoaderData=e=>br({...e,from:this.id}),this.useNavigate=()=>wr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,O.jsx)(zr,{ref:t,from:this.fullPath,...e}))}};function Wr(e){return new Ur(e)}function Gr(e){return e=>{let t=Hr(e);return t.isRoot=!1,t}}function Kr(e,t){let n,r,o,s=()=>(n||=(o=void 0,e().then(e=>{n=void 0,c.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,o=e})),n),c=function(e){if(o){if(g(o)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${o.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw o}if(!r){if(a)a(s());else throw s()}return i.createElement(r,e)};return c.preload=s,c}function qr(e){let t=Un(),n=`not-found-${gr(t.stores.location,e=>e.pathname)}-${gr(t.stores.status)}`;return(0,O.jsx)(Fn,{getResetKey:()=>n,onCatch:(t,n)=>{if(de(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(de(t))return e.fallback?.(t);throw t},children:e.children})}function Jr(){return(0,O.jsx)(`p`,{children:`Not Found`})}function Yr(e,t,n){return t.options.notFoundComponent?(0,O.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,O.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,O.jsx)(Jr,{})}function Xr(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,O.jsx)(n,{}):null}var Zr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Qr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,$r=i.memo(function({routeId:e}){let t=Un();return ei(t,gr(t.stores.getMatchStore(e)))});function ei(e,t){let n=e.routesById[t.routeId],r=Xr(e,n),a=n.options.errorComponent??e.options.defaultErrorComponent,o=n.options.onCatch??e.options.defaultOnCatch,s=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,c=t.ssr===!1||t.ssr===`data-only`,l=Qr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||c)),u=(0,O.jsx)(ti,{match:t});c&&(u=(0,O.jsx)(zn,{fallback:r,children:u})),s&&(u=(0,O.jsx)(qr,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return i.createElement(s,e)},children:u})),a&&(u=(0,O.jsx)(Fn,{getResetKey:()=>t,errorComponent:a,onCatch:(e,n)=>{if(de(e))throw e.routeId??=t.routeId,e;o?.(e,n)},children:u})),l&&(u=(0,O.jsx)(i.Suspense,{fallback:r,children:u}));let d=n.isRoot&&n.options.shellComponent;return d?(0,O.jsx)(Gn.Provider,{value:t.routeId,children:(0,O.jsxs)(d,{children:[u,null]})}):(0,O.jsxs)(Gn.Provider,{value:t.routeId,children:[u,null]})}var ti=i.memo(function({match:e}){let t=Un(),n=e.routeId,r=t.routesById[n],a=i.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),o=i.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,O.jsx)(e,{},a):(0,O.jsx)(ni,{})},[a,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Qr(t,r,e.ssr))return o;if(t._tx)throw t._tx[5];return Xr(t,r)}if(e.status===`notFound`)return Yr(t,r,e.error);if(e.status===`error`)throw e.error;return o}),ni=i.memo(function(){let e=Un(),t=i.useContext(Gn),n,r,a;{let i=e.stores.getMatchStore(t);[n,r]=gr(i,e=>[!!e._notFound,e.error],{compare:Zr}),a=gr(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Yr(e,e.routesById[t],r);if(!a)return null;let o=(0,O.jsx)($r,{routeId:a});return t===`__root__`?(0,O.jsx)(i.Suspense,{fallback:Xr(e),children:o}):o});function ri(e,t){let n=e[1];e.length=0,n?.(t)}function ii({t:e}){let t=Un(),n=t._rendered??=[];return t.startTransition=(r,a)=>new Promise(o=>{ri(n,!1),n.push(a,o),e(t),i.startTransition(r)}),o(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(ae(r.publicHref)!==ae(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...xt(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ai(){let e=Un(),t=e.routesById[Me],n=Xr(e,t),r=(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(ii,{t:i.useState()[1]}),e.ssr?(0,O.jsx)(oi,{}):(0,O.jsx)(i.Suspense,{fallback:n,children:(0,O.jsx)(oi,{})})]});return e.options.InnerWrap?(0,O.jsx)(e.options.InnerWrap,{children:r}):r}function oi(){let e=Un(),t=e._rendered,n=gr(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;o(()=>{t[0]===n&&ri(t,!0)},[t,n]);let a=i?(0,O.jsx)($r,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,O.jsx)(Fn,{getResetKey:()=>r,onCatch:void 0,children:a})}var si=e=>({createMutableStore:lr,createReadonlyStore:lr,batch:or}),ci=e=>new li(e),li=class extends Tt{constructor(e){super(e,si)}};function ui({router:e,children:t,...n}){u(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,O.jsx)(Hn.Provider,{value:e,children:t});return e.options.Wrap?(0,O.jsx)(e.options.Wrap,{children:r}):r}function di({router:e,...t}){return(0,O.jsx)(ui,{router:e,...t,children:(0,O.jsx)(ai,{})})}var fi=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,re());else{var t=n(l);t!==null&&oe(x,t.startTime-e)}}}var S=!1,ee=-1,C=5,te=-1;function w(){return g?!0:!(e.unstable_now()-te<C)}function ne(){if(g=!1,S){var t=e.unstable_now();te=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(ee),ee=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&w());){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&&oe(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?re():S=!1}}}var re;if(typeof y==`function`)re=function(){y(ne)};else if(typeof MessageChannel<`u`){var ie=new MessageChannel,ae=ie.port2;ie.port1.onmessage=ne,re=function(){ae.postMessage(null)}}else re=function(){_(ne,0)};function oe(t,n){ee=_(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`):C=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(ee),ee=-1):h=!0,oe(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,re()))),r},e.unstable_shouldYield=w,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),pi=t(((e,t)=>{t.exports=fi()})),mi=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.8`})),hi=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=mi()})),gi=t((e=>{var t=pi(),n=r(),i=hi();function a(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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function s(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 c(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 l(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 u(e){if(s(e)!==e)throw Error(a(188))}function d(e){var t=e.alternate;if(!t){if(t=s(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return u(i),e;if(o===r)return u(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var c=!1,l=i.child;l;){if(l===n){c=!0,n=i,r=o;break}if(l===r){c=!0,r=i,n=o;break}l=l.sibling}if(!c){for(l=o.child;l;){if(l===n){c=!0,n=o,r=i;break}if(l===r){c=!0,r=o,n=i;break}l=l.sibling}if(!c)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),b=Symbol.for(`react.consumer`),x=Symbol.for(`react.context`),S=Symbol.for(`react.forward_ref`),ee=Symbol.for(`react.suspense`),C=Symbol.for(`react.suspense_list`),te=Symbol.for(`react.memo`),w=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case ee:return`Suspense`;case C:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case x:return e.displayName||`Context`;case b:return(e._context.displayName||`Context`)+`.Consumer`;case S:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case te:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case w:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,T=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},ue=[],de=-1;function fe(e){return{current:e}}function pe(e){0>de||(e.current=ue[de],ue[de]=null,de--)}function D(e,t){de++,ue[de]=e.current,e.current=t}var me=fe(null),he=fe(null),ge=fe(null),_e=fe(null);function ve(e,t){switch(D(ge,t),D(he,e),D(me,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hd(t),e=Ud(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}pe(me),D(me,e)}function ye(){pe(me),pe(he),pe(ge)}function be(e){e.memoizedState!==null&&D(_e,e);var t=me.current,n=Ud(t,e.type);t!==n&&(D(he,e),D(me,n))}function xe(e){he.current===e&&(pe(me),pe(he)),_e.current===e&&(pe(_e),$f._currentValue=le)}var Se,Ce;function we(e){if(Se===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Se=t&&t[1]||``,Ce=-1<e.stack.indexOf(`
|
|
4
4
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
@@ -20,4 +20,4 @@ Error generating stack: `+e.message+`
|
|
|
20
20
|
`)},nu=e=>Jl(e).map(ru).join(`
|
|
21
21
|
`),ru=e=>e.cause?`${e.stack} {\n${iu(e.cause,` `)}\n}`:e.stack,iu=(e,t)=>{let n=e.stack.split(`
|
|
22
22
|
`),r=`${t}[cause]: ${n[0]}`;for(let e=1,i=n.length;e<i;e++)r+=`\n${t}${n[e]}`;return e.cause&&(r+=` {\n${iu(e.cause,`${t} `)}\n${t}}`),r},au=`~effect/Fiber`,ou={_A:Si,_E:Si},su={id:0},cu=(()=>{try{return globalThis.process?.getBuiltinModule?.(`node:async_hooks`)?.AsyncResource}catch{return}})(),lu=()=>cu===void 0?void 0:new cu(`effect/Fiber`),uu=()=>globalThis[Pa],du=class{constructor(e,t=!0){this.setContext(e),this.id=++su.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=void 0,this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._autoYielded=!1,this._running=!1,this._deferredInterrupt=!1,this._parent=void 0,this._asyncContext=void 0,this.cache.runtimeMetrics?.recordFiberStart(this.context)}get[au](){return ou}get currentDispatcher(){return this._dispatcher??=this.cache.scheduler.makeDispatcher()}getRef(e){return fc(this.context,e)}addObserver(e){return this._exit?(e(this._exit),Oi):(this._observers===void 0?this._observers=[e]:this._observers.push(e),()=>this.removeObserver(e))}removeObserver(e){if(this._exit||this._observers===void 0)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)}interruptUnsafe(e,t){if(this._exit)return;let n=G(e);this.cache.stackFrame&&(n=jo(n,cc(zo,this.cache.stackFrame))),t&&(n=jo(n,t)),this._interruptedCause=this._interruptedCause?Eo(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(wu(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._asyncContext!==void 0){let t=this._asyncContext;this._asyncContext=void 0;try{return t.runInAsyncScope(this.evaluate,this,e)}finally{t.emitDestroy()}}else if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===po){this._asyncContext=lu();return}let n=hu.interruptChildren&&hu.interruptChildren(this);if(n!==void 0)return this.evaluate(ud(n,()=>t));if(this._exit=t,this.cache.runtimeMetrics?.recordFiberEnd(this.context,this._exit),this._parent&&=(this._parent._children?.delete(this),void 0),this._observers!==void 0){let e=this._observers;this._observers=void 0;for(let n=0;n<e.length;n++)e[n](t)}this._stack.length=0,this._children=void 0,this.context=oc();let r=this.cache;(r.span!==void 0||r.stackFrame!==void 0)&&(this.cache={...r,span:void 0,stackFrame:void 0})}runLoop(e){let t=globalThis[Pa];globalThis[Pa]=this;let n=this._running;this._running=!0;let r=!1,i=this._autoYielded;this._autoYielded=!1;let a=e;this.currentOpCount=+!!i;try{for(;;)try{this._deferredInterrupt&&(this._deferredInterrupt=!1,a=wu(this._interruptedCause)),this.currentOpCount++;let e=this.cache;if(!i&&!r&&!e.preventYield&&e.scheduler.shouldYield(this)?(r=!0,a=this.yieldNow(a,0,!0)):(i=!1,a=e.tracerContext?e.tracerContext(a,this):a[I](this)),a===po){let e=this._yielded;if(oo in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return po}}catch(e){if(!M(a,I))return Uo(`Fiber.runLoop: Not a valid effect: ${String(a)}`);a=Uo(e)}}finally{this._running=n,globalThis[Pa]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,pu;for(;;){let t=this._stack.pop();if(!t)return;let n=t[fo];if(n!==void 0){let r=n.call(t,this);if(r)return r[e]=r,r}if(t[e])return t}}succeedWith(e){if(!(++this.currentOpCount&mu-1))return Ro(e);let t=this.getCont(lo);return t?t[lo](e,this):this.yieldWith(Ro(e))}yieldWith(e){return this._yielded=e,po}yieldNow(e,t=0,n=!1){let r=!1;return this.currentDispatcher.scheduleTask(()=>{r||(this._autoYielded=n,this.evaluate(e))},t),this.yieldWith(()=>{r=!0})}children(){return this._children??=new Set}pipe(){return yi(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&rc(t,e))return;let n=e.cacheRoot,r=n._fiberCache??=fu(e);this.cache?.scheduler!==r.scheduler&&(this._dispatcher=void 0),this.cache=r}get currentSpanLocal(){let e=this.cache.span;return e?._tag===`Span`?e:void 0}},fu=e=>{let t=dc(e,Ml);return{scheduler:fc(e,bl),tracer:t,tracerContext:t?t.context:void 0,tracerEnabled:fc(e,Fl),span:dc(e,jl),logLevel:fc(e,Ll),minimumLogLevel:fc(e,Rl),stackFrame:fc(e,Pl),runtimeMetrics:dc(e,Nl),maxOpsBeforeYield:fc(e,Dl),preventYield:fc(e,Ol)}},pu={[lo](e,t){return wu(t._interruptedCause)},[uo](e,t){return wu(t._interruptedCause)}},mu=32,hu={interruptChildren:void 0},gu=e=>{if(!e.cache.stackFrame)return;let t=new Map;return t.set(Bo.key,e.cache.stackFrame),tc(t)},_u=e=>{if(e._children!==void 0&&e._children.size!==0)return Cu(e._children)},vu=e=>{let t=e;return t._exit?Y(t._exit):Ru(n=>t._exit?n(Y(t._exit)):Eu(e.addObserver(e=>n(Y(e)))))},yu=e=>Ru(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(Y(r))}return a(),Eu(()=>i?.())}),bu=e=>{let t=e;return t._exit?t._exit:Ru(n=>t._exit?n(t._exit):Eu(e.addObserver(n)))},xu=e=>V(t=>Su(e,t.id)),Su=k(e=>M(e[0],au),(e,t,n)=>V(r=>{let i=gu(r);return i=i&&n?gc(i,n):i??n,e.interruptUnsafe(t,i),od(vu(e))})),Cu=e=>V(t=>{let n=gu(t),r=Mc();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return od(yu(r))}),Y=Ro,wu=Vo,Tu=Ho,Eu=Io({op:`Sync`,[I](e){let t=this[F],n=t(),r=e.getCont(lo);return r?r[lo](n,e):e.yieldWith(Ro(n))}}),Du=Io({op:`Suspend`,[I](e){let t=this[F];return t()}}),Ou=Io({op:`Yield`,[I](e){return e.yieldNow(bd,this[F]??0)}})(0),ku=Y(Ms()),Au=e=>Du(()=>wu(e())),ju=e=>Uo(e),Mu=Y(void 0),Nu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new mp(e,`An error occurred in Effect.try`):e.catch;return Du(()=>{try{return Y(t())}catch(e){return Tu(n(e))}})},Pu=e=>Iu(function(t,n){e(n).then(e=>t(Y(e)),e=>t(ju(e)))},e.length!==0),Fu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new mp(e,`An error occurred in Effect.tryPromise`):e.catch;return Iu(function(e,r){let i=e=>Du(()=>{try{return Tu(no(()=>n(e)))}catch(e){return ju(e)}});try{t(r).then(t=>e(Y(t)),t=>e(i(t)))}catch(t){e(i(t))}},t.length!==0)},Iu=function(){let e=Fo({op:`Async`,[I](e){let t=!1,n=!1,r=this.withSignal?new AbortController:void 0,i=this.register.call(e.cache.scheduler,r=>{t||(t=!0,n?e.evaluate(r):n=r)},r?.signal);return n===!1?(n=!0,e.yieldWith(()=>{t=!0}),r===void 0&&i===void 0||e._stack.push(Lu(()=>(t=!0,r?.abort(),i??bd))),po):n}}),t=function(e,t){this.register=e,this.withSignal=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),Lu=Io({op:`AsyncFinalizer`,[fo](e){e.interruptible&&(e.interruptible=!1,e._stack.push(Of))},[uo](e,t){return Wl(e)?ud(af(Vo(e),this[F]()),()=>wu(e)):wu(e)}}),Ru=e=>Iu(e,e.length>=2),zu=Ru(Oi),Bu=(...e)=>{if(e.length===1){let t=e[0];return Du(()=>X(t()))}let[t,n]=e;return Du(()=>X(n.call(t.self)))},Vu=(e,t)=>typeof e==`function`?e:t.shift().bind(e.self),Hu=(e,...t)=>{let n=Vu(e,t),r=t.length===0?function(){return Du(()=>X(n.apply(this,arguments)))}:function(){let e=Du(()=>X(n.apply(this,arguments)));for(let n=0;n<t.length;n++)e=t[n](e,...arguments);return e};return Uu(n.length,r)},Uu=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),Wu=(e,...t)=>{let n=Vu(e,t);return Uu(n.length,t.length===0?function(){return Gu(()=>n.apply(this,arguments))}:function(){let e=Gu(()=>n.apply(this,arguments));for(let n of t)e=n(e,...arguments);return e})},Gu=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return Y(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}if(i&&i._tag===`Failure`)return r.value;{let n=!0;return Du(()=>n?(n=!1,ud(r.value,e=>X(t,e))):Du(()=>X(e())))}}}catch(e){return ju(e)}},X=function(){let e=Fo({op:`Iterator`,[lo](e,t){let n=this.iterator;for(;;){let r=n.next(e);if(r.done)return Y(r.value);if(!dd(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[I](e){return this[lo](this.initial,e)}}),t=function(e,t){this.iterator=e,this.initial=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),Ku=k(2,(e,t)=>new Yu(e,Xu,Y(t))),qu=function(e){return e._stack.push(this),this[F]},Ju=Fo({op:`OnSuccess`,[I]:qu}),Yu=function(e,t,n){this[F]=e,this[lo]=t,this.payload=n};Yu.prototype=Ju;var Xu=function(){return this.payload},Zu=function(e,t){return t.succeedWith(this.payload)},Qu=(()=>{let e=$a();if(e===0)return!1;let t=`~effect/Effect/stackProbe`,n={[t]:function(){return Error()}};eo(1);let r=n[t]();return eo(e),r.stack?.includes(`[as `+t+`]`)===!0})(),$u=function(e,t){let n=this.payload;return t.succeedWith(Qu?n(e):no(()=>n(e)))},ed=function(e){let t=this.payload;return t(e)},td=function(e){let t=this.payload;return new Yu(t(e),Zu,e)},nd=function(e){return new Yu(this.payload,Zu,e)},rd=e=>md(e,Ns),id=k(2,(e,t)=>new Yu(e,ho(t)?Xu:ed,t)),ad=k(2,(e,t)=>new Yu(e,ho(t)?nd:td,t)),od=e=>new Yu(e,Xu,bd),sd=(e,t)=>V(n=>{let r=new Set;return bf(n,()=>r.size===0?void 0:Cu(r)),Ru(i=>{let a=!1,o=0;for(let s of e){if(a)break;let e=o++,c=Bf(n,s,!0,!0,!1);r.add(c),c.addObserver(o=>{r.delete(c);let s=!a;a=!0,i(o),s&&(cd(r,n),t?.onWinner?.({fiber:c,index:e,parentFiber:n}))})}})}),cd=(e,t)=>{let n=gu(t);for(let r of e)r.interruptUnsafe(t.id,n)},ld=k(e=>ho(e[1]),(e,t,n)=>sd([e,t],n)),ud=k(2,(e,t)=>new Yu(e,ed,t)),dd=e=>e[oo]!==void 0,fd=k(2,(e,t)=>dd(e)?e._tag===`Success`?t(e.value):e:ud(e,t)),pd=e=>ud(e,Si),md=k(2,(e,t)=>new Yu(e,$u,t)),hd=k(2,(e,t)=>dd(e)?Z(e,t):md(e,t)),gd=e=>Vo(G(e)),_d=e=>e._tag===`Success`,vd=e=>e._tag===`Failure`,yd=e=>e._tag===`Failure`?yc(e.cause):bc(e),bd=Ro(void 0),Z=k(2,(e,t)=>e._tag===`Success`?Ro(t(e.value)):e),xd=k(2,(e,t)=>_d(e)?t:e),Sd=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?bd:Vo(Co(t))},Cd=k(2,(e,t)=>V(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),bf(n,()=>{n.setContext(r)}),e)})),wd=()=>Td,Td=V(e=>Y(e.context)),Ed=e=>V(t=>e(t.context)),Dd=k(2,(e,t)=>dd(e)?e:Cd(e,gc(t))),Od=function(){return arguments.length===1?k(2,(e,t)=>kd(e,arguments[0],t)):k(3,(e,t,n)=>kd(e,t,n)).apply(this,arguments)},kd=(e,t,n)=>Cd(e,lc(t,n)),Ad=k(e=>ho(e[0]),(e,t)=>Pf({while:wi,body:Ci(t?.disableYield?e:ud(e,e=>Ou)),step:Oi})),jd=k(2,(e,t)=>new Nd(e,t.length===1?t:e=>t(e))),Md=Fo({op:`OnFailure`,[I]:qu}),Nd=function(e,t){this[F]=e,this[uo]=t};Nd.prototype=Md;var Q=k(3,(e,t,n)=>jd(e,e=>{let r=t(e);return Sc(r)?wu(r.failure):n(r.success,e)})),Pd=k(2,(e,t)=>Q(e,Hl,e=>t(e))),Fd=k(2,(e,t)=>Q(e,Ul,t)),Id=k(3,(e,t,n)=>jd(e,e=>{let r=t(e);return Sc(r)?wu(e):id(n(r.success,e),wu(e))})),Ld=k(2,(e,t)=>Id(e,q,e=>t(e))),Rd=k(e=>ho(e[0]),(e,t,n,r)=>jd(e,e=>{let i=Hl(e);return Sc(i)?wu(i.failure):t(i.success)?n(i.success):r?r(i.success):wu(e)})),zd=k(2,(e,t)=>jd(e,e=>wu(Kl(e,t)))),Bd=e=>e===`Unhandled`?(...e)=>V(t=>{let n=t.getRef(zl);return n===void 0?Mu:Cp(n)(...e)}):Cp(e===!0?void 0:e),Vd=k(e=>ho(e[0]),(e,t)=>{if(!t?.log)return Jd(e,{onFailure:e=>Mu,onSuccess:e=>Mu});let n=Bd(t.log);return Ud(e,{onFailure(e){let r=Hl(e);return Sc(r)?wu(r.failure):t.message===void 0?n(e):n(t.message,e)},onSuccess:e=>Mu})}),Hd=k(e=>ho(e[0]),(e,t)=>{if(!t?.log)return Ud(e,{onFailure:e=>Mu,onSuccess:e=>Mu});let n=Bd(t.log);return Ud(e,{onFailure:e=>t.message===void 0?n(e):n(t.message,e),onSuccess:e=>Mu})}),Ud=k(2,(e,t)=>new Gd(e,t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),t.onFailure.length===1?t.onFailure:e=>t.onFailure(e))),Wd=Fo({op:`OnSuccessAndFailure`,[I]:qu}),Gd=function(e,t,n){this[F]=e,this[lo]=t,this[uo]=n};Gd.prototype=Wd;var Kd=function(e,t){let n=this.payload;return t.succeedWith(Qu?n.onSuccess(e):no(()=>n.onSuccess(e)))},qd=((e,t)=>{let n=Fo({op:e,[I]:qu,[lo]:Kd,[uo]:t}),r=function(e,t){this[F]=e,this.payload=t};return r.prototype=n,r})(`Match`,function(e,t){let n=Hl(e);if(Sc(n))return wu(n.failure);let r=this.payload;return t.succeedWith(Qu?r.onFailure(n.success):no(()=>r.onFailure(n.success)))}),Jd=k(2,(e,t)=>Ud(e,{onFailure:e=>{let n=Hl(e);return Sc(n)?wu(n.failure):t.onFailure(n.success)},onSuccess:t.onSuccess})),Yd=k(2,(e,t)=>new qd(e,t)),Xd=e=>dd(e)?Ro(e):Zd(e),Zd=Io({op:`Exit`,[I](e){return e._stack.push(this),this[F]},[lo](e,t,n){return t.succeedWith(n??Ro(e))},[uo](e,t,n){return t.succeedWith(n??Vo(e))}}),Qd=`~effect/Scope`,$d=`~effect/Scope/Closeable`,ef=Us(`effect/Scope`),tf=(e,t)=>V(n=>(jf(n),nf(e,t)??Mu)),nf=(e,t)=>{let n=e.state;if(n._tag===`Closed`||(e.state={_tag:`Closed`,exit:t},e.parent!==void 0&&df(e.parent,e),n._tag===`Empty`))return;if(n.finalizer!==void 0)return rf(n.finalizer,t);let r=n.finalizers;return r.size===1?rf(r.values().next().value,t):of(e,r,t)},rf=(e,t)=>{try{return e(t)}catch(e){return Uo(e)}},af=(e,t)=>_d(e)?t:jd(t,t=>wu(Vl(To(e.cause,t)))),of=Hu(function*(e,t,n){let r=[],i=[],a=Array.from(t),o=uu();for(let t=a.length-1;t>=0;t--){let[s,c]=a[t];e.strategy===`sequential`?r.push(yield*Xd(rf(c,n))):s!==o&&i.push(Bf(o,rf(c,n),!0,!0,`inherit`))}return i.length>0&&(r=yield*yu(i)),yield*Sd(r)}),sf=(e,t)=>{let n=pf(t,e);return e.state._tag===`Closed`?(n.state=e.state,n):(uf(e,n,e=>tf(n,e)),n)},cf=(e,t)=>Du(()=>e.state._tag===`Closed`?t(e.state.exit):(uf(e,{},t),Mu)),lf=(e,t)=>cf(e,Ci(t)),uf=(e,t,n)=>{if(e.state._tag===`Empty`)e.state={_tag:`Open`,finalizerKey:t,finalizer:n,finalizers:void 0};else if(e.state._tag===`Open`){let r=e.state;r.finalizer===void 0?r.finalizers.set(t,n):(r.finalizers=new Map([[r.finalizerKey,r.finalizer]]),r.finalizerKey=void 0,r.finalizer=void 0,r.finalizers.set(t,n))}},df=(e,t)=>{if(e.state._tag!==`Open`)return;let n=e.state;n.finalizerKey===t?e.state=mf:n.finalizers!==void 0&&(n.finalizers.delete(t),n.finalizers.size===0&&(e.state=mf))},ff=e=>pf(e,void 0),pf=(e=`sequential`,t)=>({[$d]:$d,[Qd]:Qd,strategy:e,parent:t,state:mf}),mf={_tag:`Empty`},hf=ef,gf=Od(ef),_f=e=>ud(hf,t=>Ed(n=>cf(t,t=>Dd(e(t),n)))),vf=function(){let e=Fo({op:`OnExit`,[I](e){return e._stack.push(this),this.effect},[fo](e){e.interruptible&&this.interruptible!==!0&&(e._stack.push(Of),e.interruptible=!1)},[lo](e,t,n){n??=Ro(e);let r;try{r=this.onExit(n)}catch(e){r=Uo(e)}return r?ud(r,e=>n):n},[uo](e,t,n){n??=Vo(e);let r;try{r=this.onExit(n)}catch(e){r=Uo(e)}return r?ud(af(n,r),e=>n):n}}),t=function(e,t,n){this.effect=e,this.onExit=t,this.interruptible=n};return t.prototype=e,t}(),yf=(e,t,n)=>new vf(e,t,n),bf=(e,t)=>{e._stack.push(new vf(void 0,t,void 0))},xf=k(2,yf),Sf=k(2,(e,t)=>xf(e,e=>t)),Cf=k(3,(e,t,n)=>xf(e,e=>{let r=t(e);return Sc(r)?Mu:n(r.success,e)})),wf=k(2,(e,t)=>Cf(e,yd,t)),Tf=(e,t,n)=>Nf(r=>ud(e,e=>yf(Du(()=>r(t(e))),t=>n(e,t),!0))),Ef=e=>V(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Of),e):e),Df=Io({op:`SetInterruptible`,[fo](e){if(e.interruptible=this[F],e._interruptedCause&&e.interruptible)return()=>wu(e._interruptedCause)}}),Of=Df(!0),kf=Df(!1),Af=e=>{if(e.interruptible=!0,e._stack.push(kf),e._interruptedCause)return wu(e._interruptedCause)},jf=e=>{let t=e;t.interruptible&&(t.interruptible=!1,t._stack.push(Of))},Mf=e=>V(t=>t.interruptible?e:Af(t)??e),Nf=e=>V(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Of),e(Mf)):e(Si)),Pf=Io({op:`While`,[lo](e,t){return this[F].step(e),this[F].while()?(t._stack.push(this),this[F].body()):bd},[I](e){return this[F].while()?(e._stack.push(this),this[F].body()):bd}}),Ff=e=>e===`unbounded`?1/0:Math.max(1,e??1),If=()=>e=>{let t=e.onItem,n=e.step,r=(e,t,r,a,o)=>ud(Xd(o),o=>n(e,t[r],o,r)??i(e,t,r+1,a)??Mu),i=(e,i,a=0,o=i.length)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!dd(c))return r(e,i,a,o,c);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return i},Lf=e=>{let t=e.onItem,n=e.step;return(e,r,i)=>{let a=0,o=i.end??r.length,s=i.concurrency,c=!1,l,u,d,f,p,m=e=>{let t=Uo(e);return f=t,c=!0,u&&u.size>0?ud(Ef(Cu(Array.from(u))),()=>f??t):t},h=()=>{let i=!1;for(;!f&&a<o;a++){let o=r[a],g=p??t(e,o,a);if(dd(g)){if(f=n(e,o,g,a),f)break}else if(l){p=void 0;let t=Bf(l,g,!0,!0,`inherit`);if(t._exit){if(f=n(e,o,t._exit,a),f)break;continue}u.add(t);let r=a;if(t.addObserver(a=>{u.delete(t);try{if(f){if(a._tag===`Failure`){let e=a.cause.reasons.filter(e=>e._tag!==`Interrupt`);if(e.length>0){let t=Co(e);f=Vo(f._tag===`Failure`?Vl(To(f.cause,t)):t)}}}else{let t=n(e,o,a,r);t&&(f=t,h())}if(i){let e=h();e&&d(e)}else c&&u.size===0&&d(f??Mu)}catch(e){d(m(e))}}),u.size<s)continue;i=!0,a++;return}else return Ru(e=>{l=uu(),u=new Set,p=g,d=e;let t;try{t=h()}catch(t){return e(m(t))}return t?e(t):Du(()=>(f??=bd,ud(u?Cu(u):Mu,()=>f?._tag===`Failure`?f:Mu)))})}if(c=!0,f){if(u&&u.size>0){let e=gu(l);u.forEach(t=>t.interruptUnsafe(l.id,e));return}if(d||f._tag===`Failure`)return f}else if(d){if(u)u.size===0&&d(Mu);else return bd}};return h()}},Rf=()=>e=>Lf(e),zf=k(e=>ho(e[0]),(e,t)=>V(n=>(Op(),Y(Bf(n,e,t?.startImmediately,!1,t?.uninterruptible??!1))))),Bf=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new du(a.context,o);return r||(a.children().add(s),s._parent=a),n?s.evaluate(t):(s._asyncContext=lu(),a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0)),s},Vf=e=>()=>V(t=>t===e?Mu:xu(e)),Hf=k(e=>ho(e[0]),(e,t,n)=>V(r=>{let i=t.state._tag===`Closed`?new du(r.context):Bf(r,e,n?.startImmediately,!0,n?.uninterruptible);return i._exit||(t.state._tag===`Closed`?i.interruptUnsafe(r.id,gu(r)):(uf(t,i,Vf(i)),i.addObserver(()=>df(t,i)))),Y(i)})),Uf=e=>(t,n)=>{let r=new du(n?.scheduler?lc(e,bl,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal){if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}}return n?.onFiberStart&&n.onFiberStart(r),r},Wf=k(2,(e,t)=>e._exit?e:t.state._tag===`Closed`?(e.interruptUnsafe(e.id),e):(df(t,e),uf(t,e,Vf(e)),e.addObserver(()=>df(t,e)),e)),Gf=Uf(oc()),Kf=e=>{let t=Uf(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},qf=e=>{let t=Kf(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw ql(e.cause);return e.value})},Jf=qf(oc()),Yf=(e=>{let t=Uf(e);return e=>{if(dd(e))return e;let n=new Tl(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??Uo(new fp(r))}})(oc()),Xf=Y(!0),Zf=Y(!1),Qf=class{waiters=[];scheduled=void 0;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){if(this.waiters.length===0)return Xf;if(this.scheduled===void 0)this.scheduled=this.waiters,e.currentDispatcher.scheduleTask(this.flushScheduled,0);else for(let e=0;e<this.waiters.length;e++)this.scheduled.push(this.waiters[e]);return this.waiters=[],Xf}flushScheduled=()=>{if(this.scheduled===void 0)return;let e=this.scheduled;this.scheduled=void 0;for(let t=0;t<e.length;t++)e[t](bd)};flushWaiters(){let e=this.waiters;this.waiters=[],this.flushScheduled();for(let t=0;t<e.length;t++)e[t](bd)}open=V(e=>this._isOpen?Zf:(this._isOpen=!0,this.scheduleUnsafe(e)));release=V(e=>this._isOpen?Zf:this.scheduleUnsafe(e));openUnsafe(){return!this._isOpen&&(this._isOpen=!0,this.flushWaiters(),!0)}await=Ru(e=>this._isOpen?e(Mu):(this.waiters.push(e),Eu(()=>{let t=this.waiters.indexOf(e);t===-1?this.scheduled!==void 0&&(t=this.scheduled.indexOf(e),t!==-1&&this.scheduled.splice(t,1)):this.waiters.splice(t,1)})));closeUnsafe(){return this._isOpen?(this._isOpen=!1,!0):!1}close=Eu(()=>this.closeUnsafe());whenOpen=e=>ud(this.await,()=>e);isOpen(){return this._isOpen}},$f=e=>new Qf(e??!1),ep=e=>Eu(()=>$f(e)),tp=_c(`effect/Clock`,{defaultValue:()=>new rp}),np=2**31-1,rp=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=Eu(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return op()}currentTimeNanos=Eu(()=>this.currentTimeNanosUnsafe());monotonicTimeNanosUnsafe(){return ap()}monotonicTimeNanos=Eu(()=>this.monotonicTimeNanosUnsafe());sleep(e){return this.sleepMillis(ml(e))}sleepMillis(e){return e<=0?Ou:Number.isFinite(e)?Ru(t=>{let n=e>np?this.sleepMillis(e-np):Mu,r=setTimeout(()=>t(n),Math.min(e,np));return Eu(()=>clearTimeout(r))}):zu}},ip=BigInt(1e6),ap=function(){let e=globalThis.process?.hrtime;if(typeof e?.bigint==`function`)return()=>e.bigint();if(typeof performance<`u`&&typeof performance.now==`function`)return()=>BigInt(Math.round(performance.now()*1e6));let t=BigInt(0);return()=>{let e=BigInt(Date.now())*ip;return e>t&&(t=e),t}}(),op=function(){let e=BigInt(1e9),t;return()=>{let n=ap(),r=BigInt(Date.now())*ip;if(t===void 0)t=r-n;else{let i=t+n;(r>i?r-i:i-r)>e&&(t=r-n)}return t+n}}(),sp=e=>V(t=>e(t.getRef(tp))),cp=e=>sp(t=>t.sleep(el(e))),lp=`~effect/Cause/IllegalArgumentError`,up=class extends Ko(`IllegalArgumentError`){[lp]=lp;constructor(e){super({message:e})}},dp=`~effect/Cause/AsyncFiberError`,fp=class extends Ko(`AsyncFiberError`){[dp]=dp;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},pp=`~effect/Cause/UnknownError`,mp=class extends Ko(`UnknownError`){[pp]=pp;constructor(e,t){super({message:t,cause:e})}},hp=_c(`effect/Console`,{defaultValue:()=>globalThis.console}),gp=js(As(ks,e=>{switch(e){case`All`:return-(2**53-1);case`Fatal`:return 5e4;case`Error`:return 4e4;case`Warn`:return 3e4;case`Info`:return 2e4;case`Debug`:return 1e4;case`Trace`:return 0;case`None`:return 2**53-1}})),_p=_c(`effect/Logger/CurrentLoggers`,{defaultValue:()=>new Set([Ep,Dp])}),vp=_c(`effect/Logger/LogToStderr`,{defaultValue:Ti}),yp={"~effect/Logger":{_Message:Si,_Output:Si},pipe(){return yi(this,arguments)}},bp=e=>{let t=Object.create(yp);return t.log=e,t},xp=e=>e.replace(/[\s="]/g,`_`),Sp=(e,t)=>`${xp(e[0])}=${t-e[1]}ms`,Cp=e=>(...t)=>{let n;for(let e=0,r=t.length;e<r;e++){let r=t[e];_o(r)&&(n?t.splice(e,1):t=t.slice(0,e).concat(t.slice(e+1)),n=n?Co(n.reasons.concat(r.reasons)):r,e--)}return n===void 0&&(n=Do),V(r=>{let i=e??r.cache.logLevel;if(gp(r.cache.minimumLogLevel,i))return Mu;let a=r.getRef(tp),o=r.getRef(_p);if(o.size>0){let e=new Date(a.currentTimeMillisUnsafe());for(let a of o)a.log({cause:n,fiber:r,date:e,logLevel:i,message:t})}return Mu})},wp={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};wp.gray,wp.blue,wp.green,wp.yellow,wp.red,wp.bgBrightRed,wp.black;var Tp=e=>`${e.getHours().toString().padStart(2,`0`)}:${e.getMinutes().toString().padStart(2,`0`)}:${e.getSeconds().toString().padStart(2,`0`)}.${e.getMilliseconds().toString().padStart(3,`0`)}`,Ep=bp(({cause:e,date:t,fiber:n,logLevel:r,message:i})=>{let a=Array.isArray(i)?i.slice():[i];e.reasons.length>0&&a.push(nu(e));let o=t.getTime(),s=n.getRef(Bl),c=``;for(let e of s)c+=` ${Sp(e,o)}`;let l=n.getRef(Il);Object.keys(l).length>0&&a.push(l);let u=n.getRef(hp);(n.getRef(vp)?u.error:u.log)(`[${Tp(t)}] ${r.toUpperCase()} (#${n.id})${c}:`,...a)}),Dp=bp(({cause:e,fiber:t,logLevel:n,message:r})=>{let i=t.getRef(tp),a=t.getRef(Il),o=t.cache.span;if(o===void 0||o._tag===`ExternalSpan`||o.status._tag===`Ended`)return;let s={};for(let[e,t]of Object.entries(a))ro(s,e,t);s[`effect.fiberId`]=t.id,s[`effect.logLevel`]=n.toUpperCase(),e.reasons.length>0&&(s[`effect.cause`]=nu(e)),o.event(Xa(Array.isArray(r)&&r.length===1?r[0]:r),i.currentTimeNanosUnsafe(),s)});function Op(){hu.interruptChildren??=_u}var kp=Mo,Ap=Co,jp=Ao,Mp=Gl,Np=Kl,Pp=ql,Fp=nu,Ip=Jo,Lp=Qo,Rp=up,zp=Ro,Bp=Vo,Vp=Ho,Hp=Uo,Up=gd,Wp=bd,Gp=_d,Kp=vd,qp=Sd,Jp=`~effect/DateTime`,Yp=`~effect/DateTime/TimeZone`,Xp={[Jp]:Jp,pipe(){return yi(this,arguments)},[Ja](){return this.toString()},toJSON(){return Om(this).toJSON()}},Zp={...Xp,_tag:`Utc`,[Xi](){return na(this.epochMilliseconds)},[ma](e){return sm(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${Om(this).toJSON()})`}},Qp={...Xp,_tag:`Zoned`,[Xi](){return P(na(this.epochMilliseconds))(N(this.zone))},[ma](e){return sm(e)&&e._tag===`Zoned`&&this.epochMilliseconds===e.epochMilliseconds&&ha(this.zone,e.zone)},toString(){return`DateTime.Zoned(${Hm(this)})`}},$p={[Yp]:Yp,[Ja](){return this.toString()}},em={...$p,_tag:`Named`,[Xi](){return ra(`Named:${this.resolvedId}`)},[ma](e){return lm(e)&&e._tag===`Named`&&this.resolvedId===(e.resolvedId??e.id)},toString(){return`TimeZone.Named(${this.id})`},toJSON(){return{_id:`TimeZone`,_tag:`Named`,id:this.id}}},tm={...$p,_tag:`Offset`,[Xi](){return ra(`Offset:${this.offset}`)},[ma](e){return lm(e)&&e._tag===`Offset`&&this.offset===e.offset},toString(){return`TimeZone.Offset(${jm(this.offset)})`},toJSON(){return{_id:`TimeZone`,_tag:`Offset`,offset:this.offset}}},nm={value:void 0,enumerable:!1,writable:!0},rm=new WeakMap,im=(e,t)=>({get(){return Object.isExtensible(this)?void 0:rm.get(this)?.[e]},set(n){if(Object.isExtensible(this)){for(let e of t)Object.defineProperty(this,e,nm);this[e]=n}else{let t=rm.get(this);t===void 0&&(t={},rm.set(this,t)),t[e]=n}}}),am=[`partsUtc`,`adjustedEpochMilliseconds`,`partsAdjusted`];Object.defineProperty(Zp,"partsUtc",im(`partsUtc`,[`partsUtc`])),Object.defineProperties(Qp,{partsUtc:im(`partsUtc`,am),adjustedEpochMilliseconds:im(`adjustedEpochMilliseconds`,am),partsAdjusted:im(`partsAdjusted`,am)});var om=(e,t,n)=>{let r=Object.create(Qp);return r.epochMilliseconds=e,r.zone=t,n!==void 0&&(r.partsUtc=n),r},sm=e=>M(e,Jp),cm=e=>sm(e[0]),lm=e=>M(e,Yp),um=e=>lm(e)&&e._tag===`Named`,dm=e=>e._tag===`Zoned`,fm=e=>{let t=Object.create(Zp);return t.epochMilliseconds=e,t},pm=e=>{let t=e.getTime();if(Number.isNaN(t))throw new Rp(`Invalid date`);return fm(t)},mm=e=>{if(sm(e))return e;if(e instanceof Date)return pm(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return pm(new Date(e.epochMilliseconds));let t=new Date(0);return Pm(t,e),pm(t)}return typeof e==`string`&&!hm(e)?pm(new Date(e+`Z`)):pm(new Date(e))},hm=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e)||/z$|gmt$/i.test(e),gm=-864e13+432e5,_m=864e13-504e5,vm=(e,t)=>{let n=t?.timeZone;if(n===void 0&&sm(e)&&dm(e))return e;let r=mm(e);if(r.epochMilliseconds<gm||r.epochMilliseconds>_m)throw RangeError(`Epoch millis out of range: ${r.epochMilliseconds}`);n===void 0&&typeof e==`object`&&`timeZoneId`in e&&(n=e.timeZoneId);let i;if(n===void 0)i=wm(new Date(r.epochMilliseconds).getTimezoneOffset()*-60*1e3);else if(lm(n))i=n;else if(typeof n==`number`)i=wm(n);else{let e=Dm(n);if(Ps(e))throw new Rp(`Invalid time zone: ${n}`);i=e.value}return t?.adjustForTimeZone===!0?Im(r.epochMilliseconds,i,t?.disambiguation??`compatible`):om(r.epochMilliseconds,i,r.partsUtc)},ym=()=>fm(Date.now()),bm=new Map,xm={day:`numeric`,month:`numeric`,year:`numeric`,era:`short`,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`longOffset`,fractionalSecondDigits:3,hourCycle:`h23`},Sm=(e,t,n=t)=>{let r=bm.get(n);if(r!==void 0)return r;let i=Object.create(em);return i.id=n,i.resolvedId=t,i.format=e,bm.set(n,i),i},Cm=e=>{let t=bm.get(e);if(t!==void 0)return t;try{let t=new Intl.DateTimeFormat(`en-US`,{...xm,timeZone:e}),n=t.resolvedOptions().timeZone,r=Sm(t,n,n.toLowerCase()===e.toLowerCase()?n:e);return bm.set(e,r),r}catch{throw new Rp(`Invalid time zone: ${e}`)}},wm=e=>{let t=Object.create(tm);return t.offset=e,t},Tm=Bs(Cm),Em=/^(?:GMT)?[+-]/,Dm=e=>{if(Em.test(e)){let t=Rm(e);return t===null?Ms():Ns(wm(t))}return Tm(e)},Om=e=>new Date(e.epochMilliseconds),km=e=>{if(e._tag===`Utc`)return new Date(e.epochMilliseconds);if(e.zone._tag===`Offset`)return new Date(e.epochMilliseconds+e.zone.offset);if(e.adjustedEpochMilliseconds!==void 0)return new Date(e.adjustedEpochMilliseconds);let t=!1,n=e.zone.format.formatToParts(e.epochMilliseconds).filter(e=>e.type===`era`?(t=e.value===`BC`,!1):e.type!==`literal`),r=Number(n[2].value),i=new Date(0);return i.setUTCFullYear(t?1-r:r,Number(n[0].value)-1,Number(n[1].value)),i.setUTCHours(Number(n[3].value),Number(n[4].value),Number(n[5].value),n[6]?.type===`fractionalSecond`?Number(n[6].value):(e.epochMilliseconds%1e3+1e3)%1e3),e.adjustedEpochMilliseconds=i.getTime(),i},Am=e=>km(e).getTime()-Nm(e),jm=e=>{let t=Math.abs(e),n=Math.floor(t/36e5),r=Math.round(t%36e5/6e4);return r===60&&(n+=1,r=0),`${e<0?`-`:`+`}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},Mm=e=>jm(Am(e)),Nm=e=>e.epochMilliseconds,Pm=(e,t)=>{if((t.year!==void 0||t.month!==void 0||t.day!==void 0)&&e.setUTCFullYear(t.year??e.getUTCFullYear(),t.month===void 0?e.getUTCMonth():t.month-1,t.day??e.getUTCDate()),t.weekDay!==void 0){let n=t.weekDay-e.getUTCDay();e.setUTCDate(e.getUTCDate()+n)}t.hour!==void 0&&e.setUTCHours(t.hour),t.minute!==void 0&&e.setUTCMinutes(t.minute),t.second!==void 0&&e.setUTCSeconds(t.second),t.millisecond!==void 0&&e.setUTCMilliseconds(t.millisecond)},Fm=864e5,Im=(e,t,n)=>{if(t._tag===`Offset`)return om(e-t.offset,t);let r=zm(e-Fm,e,t),i=zm(e+Fm,e,t);if(r===i)return om(e-r,t);let a=r<i,o=r-i;if(a){if(zm(e-i,e,t)===i)return om(e-i,t);let a=om(e-r,t);if(e!==km(a).getTime())switch(n){case`reject`:{let n=new Date(e).toISOString();throw RangeError(`Gap time: ${n} does not exist in time zone ${t.id}`)}case`earlier`:return om(e-i,t);case`compatible`:case`later`:return a}return a}if(zm(e-r,e,t)===r){if(n===`earlier`||n===`compatible`||zm(e-r+o,e+o,t)===r)return om(e-r,t);if(n===`reject`){let n=new Date(e).toISOString();throw RangeError(`Ambiguous time: ${n} occurs twice in time zone ${t.id}`)}}return om(e-i,t)},Lm=/([+-])(\d{2}):?(\d{2})$/,Rm=e=>{let t=Lm.exec(e);if(t===null)return null;let[,n,r,i]=t;return(n===`+`?1:-1)*(Number(r)*60+Number(i))*60*1e3},zm=(e,t,n)=>{let r=n.format.formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``;if(r===`GMT`)return 0;let i=Rm(r);return i===null?Am(om(t,n)):i},Bm=k(cm,(e,t,n)=>{if(e._tag===`Utc`){let n=Om(e);return t(n),fm(n.getTime())}let r=km(e),i=new Date(r.getTime());return t(i),Im(i.getTime(),e.zone,n?.disambiguation??`compatible`)}),Vm=e=>{let t=km(e);return e._tag===`Utc`?t.toISOString():`${t.toISOString().slice(0,-1)}${Mm(e)}`},Hm=e=>e.zone._tag===`Offset`?Vm(e):`${Vm(e)}[${e.zone.id}]`,Um=ho,Wm=Pu,Gm=Fu,Km=Y,qm=Du,Jm=Eu,Ym=Mu,Xm=Ru,Zm=zu,Qm=Bu,$m=Tu,eh=wu,th=Au,nh=ju,rh=Nu,ih=Ou,ah=ud,oh=pd,sh=id,ch=ad,lh=Xd,uh=md,dh=Ku,fh=Pd,ph=jd,mh=Fd,hh=Rd,gh=zd,_h=Ld,vh=Vd,yh=Hd,bh=cp,xh=ld,Sh=Yd,Ch=Ud,wh=wd,Th=Tf,Eh=_f,Dh=Sf,Oh=wf,kh=Ad,Ah=zf,jh=Hf,Mh=Gf,Nh=Uf,Ph=Jf,Fh=qf,Ih=Yf,Lh=Hu,Rh=Cp(`Error`),zh=hd,Bh=fd,Vh=Wu,Hh=`~effect/BigDecimal`,Uh={[Hh]:Hh,[Xi](){let e=Zh(this);return P(ra(String(e.value)),na(e.scale))},[ma](e){return Wh(e)&&rg(this,e)===0},toString(){return`BigDecimal(${ag(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[Ja](){return this.toJSON()},pipe(){return yi(this,arguments)}},Wh=e=>M(e,Hh),Gh=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(Uh);return n.value=e,n.scale=t,n},Kh=(e,t)=>{let n=Gh(e,t);return n.normalized=n,n},qh=BigInt(0),Jh=BigInt(1),Yh=BigInt(10),Xh=Kh(qh,0),Zh=e=>{if(e.normalized===void 0){if(e.value===qh)e.normalized=Xh;else{let t=`${e.value}`,n=Qh(t);e.normalized=Kh(BigInt(t.slice(0,t.length-n)),e.scale-n)}}return e.normalized},Qh=e=>{let t=e.length;for(;e[t-1]===`0`;)t--;return e.length-t},$h=100,eg=[Jh],tg=(e,t)=>e===t?0:e<t?-1:1,ng=(e,t)=>{let n=`${e.value<qh?-e.value:e.value}`,r=`${t.value<qh?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==qh)return i<qh?-1:1;let a=Math.max(n.length,r.length);return Os(n.padEnd(a,`0`),r.padEnd(a,`0`))},rg=(e,t)=>{if(e.scale===t.scale)return tg(e.value,t.value);let n=ig(e),r=ig(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>$h)return n===-1?ng(t,e):ng(e,t);let o=eg[a]??=Yh**BigInt(a);return i>0?tg(e.value,t.value*o):tg(e.value*o,t.value)},ig=e=>e.value===qh?0:e.value<qh?-1:1,ag=e=>{let t=Zh(e);if(Math.abs(t.scale)>=16)return og(t);let n=t.value<qh,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},og=e=>{if(sg(e))return`0e+0`;let t=Zh(e),n=`${t.value}`,r=t.value<qh?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},sg=e=>e.value===qh,cg=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,lg=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)lg[cg.charCodeAt(e)]=e;lg[61]=0;var ug=ym,dg=Nm;({...Za}),{...Za},{...L},Za.toString,Za[Ja],{...L};function fg(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}var pg=`~structural`,mg=`~sentinels`,hg=`~constructor`,gg=Ai(e=>{let t=fg(e)?.identifier;return typeof t==`string`?t:e.getExpected(gg)}),$=Symbol.for(`effect/schema/parser/missing`),_g=zp,vg=_g($),yg=Object.assign(_g($),{[$]:!0}),bg=e=>e[$]===!0,xg=e=>e===$?Ms():Ns(e),Sg=e=>e._tag===`None`?vg:_g(e.value),Cg=`~effect/SchemaIssue/Issue`;function wg(e){return M(e,Cg)&&e[Cg]===Cg}function Tg(e){return Object.hasOwn(e,`input`)}var Eg=class{[Cg]=Cg;constructor(e,t){t?.reportInput===!0&&e!==$&&(this.input=e)}},Dg=class extends Eg{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},Og=class extends Eg{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},kg=class extends Eg{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Ag=class extends Eg{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},jg=class extends Eg{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Mg=class extends Eg{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Ng=class extends Eg{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Pg=class extends Eg{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Fg=class extends Eg{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Ig=class extends Eg{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Lg(e,t,n){if(wg(e))return e;if(typeof e==`string`)return new Pg({message:e},t,n);let r=typeof e.issue==`string`?new Pg({message:e.issue},t,n):e.issue;return new kg(e.path,r)}function Rg(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new Pg(void 0,t,n):Lg(e,t,n)}function zg(e,t,n,r){return Array.isArray(t)?Ac(t)?t.length===1?Lg(t[0],n,r):new Mg(e,Pc(t,e=>Lg(e,n,r)),n,r):void 0:Rg(t,n,r)}var Bg=e=>{let t=Qg(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Gg(gg(e.ast),e);case`InvalidValue`:{let t=Wg(e);if(t!==void 0)return Gg(t,e);let n=Ug(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Ug(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Ug(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Vg=e=>Qg(e)??Qg(e.issue);function Hg(e){return t=>({issues:qg(t,[],e?.leafHook??Bg,e?.checkHook??Vg)})}function Ug(e){return Tg(e)?La(e.input):void 0}function Wg(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function Gg(e,t){let n=Ug(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function Kg(e,t){let n=t(e);if(n!==void 0||e.issue._tag!==`InvalidValue`)return n;let r=Wg(e.issue);return r===void 0?Gg(Jg(e.filter),e):Gg(r,e.issue)}function qg(e,t,n,r,i){switch(e._tag){case`Filter`:return qg(e.issue,t,n,r,i??Kg(e,r));case`Encoding`:return qg(e.issue,t,n,r,i);case`Pointer`:return qg(e.issue,[...t,...e.path],n,r,i);case`Composite`:case`AnyOf`:return e._tag===`Composite`||e.issues.length>0?e.issues.flatMap(e=>qg(e,t,n,r,i)):[{path:t,message:i??Qg(e)??Gg(gg(e.ast),e)}];default:return[{path:t,message:i??n(e)}]}}function Jg(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>Jg(e)).join(` & `)}}function Yg(){return e=>Zg(e,``)}var Xg=Yg();function Zg(e,t,n){let r;switch(e._tag){case`Filter`:return Zg(e.issue,t,n??Kg(e,Vg));case`Encoding`:return Zg(e.issue,t,n);case`Pointer`:return Zg(e.issue,t+Ba(e.path),n);case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Zg(e,t,n)).join(`
|
|
23
|
-
`);r=n??Qg(e)??Gg(gg(e.ast),e);break;default:r=n??Bg(e)}return t?`${r}\n at ${t}`:r}function Qg(e){if(e._tag===`Pointer`||e._tag===`Composite`)return;if(e._tag===`Encoding`)return Qg(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function $g(e){let t;for(let n of e.reasons){if(!kp(n)||!wg(n.error))return;t??=n.error}return t}function e_(e,t){let n=$g(e);if(n===void 0)throw Error(t,{cause:e});return n}var t_=e=>Object.assign(Object.create(bi),e),n_=t_({_tag:`Passthrough`});function r_(){return n_}function i_(e){return t_({_tag:`Transform`,transform:e})}function a_(e){return t_({_tag:`TransformEffect`,transform:e})}function o_(e){return t_({_tag:`TransformOptional`,transform:e})}function s_(e){return t_({_tag:`TransformOptionalEffect`,transform:e})}function c_(){return o_(()=>Ms())}function l_(e){return s_(t=>{let n=Vs(t,Wi);return Fs(n)?Km(n):zh(e,Ns)})}function u_(){return i_(globalThis.String)}function d_(){return i_(globalThis.Number)}function f_(e){return a_((t,n)=>rh({try:()=>JSON.parse(t,e?.reviver),catch:()=>new Pg({expected:`a valid JSON string`},t,n)}))}function p_(e){return a_((t,n)=>rh({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new Pg({expected:`a JSON-serializable value`},t,n)}))}var m_=Symbol.for(`~effect/Schema/content`);function h_(e,t){return Object.defineProperty(e,m_,{value:t}),e}var g_=class extends xi{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new g_(this.encode,this.decode)}},__=`~effect/SchemaTransformation/Transformation`,v_=class extends xi{[__]=__;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new v_(this.encode,this.decode)}};function y_(e){return M(e,__)&&e[__]===__}var b_=e=>y_(e)?e:new v_(e.decode,e.encode),x_=new v_(r_(),r_());function S_(){return x_}var C_=new v_(d_(),u_());function w_(e){return new v_(f_(e??{}),h_(p_(e),{mediaType:`application/json`,preserveSchema:e?.reviver===void 0&&e?.replacer===void 0}))}function T_(e){return t=>t._tag===e}var E_=T_(`Declaration`),D_=T_(`Never`),O_=T_(`Literal`),k_=T_(`UniqueSymbol`),A_=T_(`Arrays`),j_=T_(`Objects`),M_=T_(`Suspend`),N_=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},P_={},F_=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},I_=`~effect/Schema`,L_=class{[I_]=I_;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},R_=class extends L_{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>{if(t===$)return vg;e??=this.run(this.typeParameters);try{return e(t,this,n)}catch(e){return nh(e)}}}_rebuild(e,t,n,r,i){let a=oy(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new R_(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},z_=new class extends L_{_tag=`Null`;getParser(){return Sy(this,null)}getExpected(){return`null`}},B_=class extends L_{_tag=`Undefined`;getParser(){return Sy(this,void 0)}toCodecJson(){return Yv(this,[V_])}getExpected(){return`undefined`}},V_=new N_(z_,new v_(i_(()=>void 0),i_(()=>null))),H_=new B_,U_=new class extends L_{_tag=`Unknown`;getParser(){return Cy(this,Ki)}getExpected(){return`unknown`}},W_=class extends L_{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${La(e)}`);this.literal=e}getParser(){return Sy(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?G_(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:G_(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function G_(e){let t=globalThis.String(e.literal);return Yv(e,[new N_(new W_(t),new v_(i_(()=>e.literal),i_(()=>t)))])}var K_=new class extends L_{_tag=`String`;getParser(){return Cy(this,Bi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&jy(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},q_=class extends L_{_tag=`Number`;getParser(){return Cy(this,Vi)}matchKey(e,t){return this._match(Ey,e,t)}matchPart(e,t){return this._match(Ty,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:jy(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(J_(this.checks,`effect/schema/isFinite`)||J_(this.checks,`effect/schema/isInt`))?this:Yv(this,[Wv])}toCodecStringTree(){return this.toCodecJson()===this?Yv(this,[ky]):Yv(this,[Ay])}getExpected(){return`number`}};function J_(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&J_(e.checks,t))}var Y_=new q_,X_=new class extends L_{_tag=`Boolean`;getParser(){return Cy(this,Hi)}getExpected(){return`boolean`}},Z_=class extends L_{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(my(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(my(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new jg(n,t[o],i),a=new kg([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return $m(new Mg(n,[a],t,i))}return e.issues?$m(new Mg(n,e.issues,t,i)):_g(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:[],issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Ff(t.concurrency),f=d===1?ev(i,e,0,u):tv(i,e,{concurrency:d,end:u});if(!f)return c(i);if(dd(f))return Bh(f,()=>c(i));let p=!0;return qm(()=>p?(p=!1,ah(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===$)return vg;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):$m(new Ng(n,e,a))}catch(e){return nh(e)}}}_rebuild(e,t,n){let r=oy(this.elements,e),i=oy(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new Z_(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function Q_(e,t,n,r){if(n._tag===`Failure`)return nv(e,e.ast,r,n);let i=bg(n)?t:n[F];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(my(t.ast))return;let n=new kg([r],new Ag(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return Vp(new Mg(e.ast,[n],e.input,e.options))}}var $_={onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:Q_},ev=If()($_),tv=Rf()($_),nv=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=$g(r.cause);if(i===void 0)return Bp(Np(r.cause,r=>new Mg(t,[new kg([n],r)],e.input,e.options)));let a=new kg([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Vp(new Mg(t,[a],e.input,e.options))},rv=`[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?`;function iv(e,t,n=P_){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(wy(yy(t)))}var av=class{name;type;constructor(e,t){this.name=e,this.type=t}};function ov(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(ov);default:return!1}}function sv(e){let t=Zv(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(sv);default:return!1}}function cv(e){return ov(e)&&sv(e)}var lv=class{parameter;type;constructor(e,t){if(!cv(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,my(t)||t.encoding!==void 0&&my(yy(t)))throw Error("Cannot use `Schema.optionalKey` or `Schema.optional` with index signatures. Index signatures already allow keys to be absent; use `Schema.UndefinedOr` to allow `undefined` values.")}},uv=class extends L_{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return Cy(n,Gi);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type,ownOnly:Dv(e.name)})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(wy(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return nv(t,n,i,s)??Wp;let c=bg(s)?o:s[F];if(a!==$&&c!==$){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return Wp;ro(t.out,a,c)}return Wp},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!dd(t))return ah(lh(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return nv(e,n,r,a)??Wp;let o=bg(a)?r:a[F],s=e.input[r],l=i.parserValue(s,e.options);return dd(l)?t(e,r,o,s,l):ah(lh(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return dd(a)?t(e,n,n,i,a):ah(lh(a),r=>t(e,n,n,i,r))},u=i?Rf()({onItem:(e,[t,n])=>n.is.parameter===K_?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return Vh(function*(t,d){if(t===$)return $;if(typeof t!=`object`||!t||Array.isArray(t))return yield*$m(new Ng(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:Ff(d.concurrency),v=i&&g?n.indexSignatures.map(e=>iv(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new jg(n,f[a],d),r=new kg([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*$m(new Mg(n,[r],t,d))}}}if(r){let e=_===1?pv(m,a):mv(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===K_?l:c,r=v?.[e]??(t.is.parameter===K_?Object.keys(f):iv(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!dd(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Mc();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===K_?Object.keys(f):iv(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*$m(new Mg(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return ah(lh(n),n=>{let i={...e,out:{...e.out}},o=dv(i,r,n);if(o)return o;let s=()=>_g(i.out),c=pv(i,a.slice(t+1));return c?Bh(c,s):s()})};return(e,t)=>{if(e===$)return vg;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Ff(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return $m(new Ng(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=n.ownOnly?Object.hasOwn(i,s):s in i,l=c?i[s]:$,d=n.parser(l,t);if(!dd(d))return u(o,e,d);if(bg(d)){c&&ro(a,s,l);continue}let f=dv(o,n,d);if(f)return f}}catch(e){return nh(e)}return _g(a)}}_rebuild(e,t,n,r){let i=oy(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new av(t.name,n)}),a=oy(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new lv(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new uv(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function dv(e,t,n){if(n._tag===`Failure`)return nv(e,e.ast,t.name,n);if(bg(n))return;let r=n[F];if(r!==$){ro(e.out,t.name,r);return}if(delete e.out[t.name],!my(t.type)){let n=new kg([t.name],new Ag(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return Vp(new Mg(e.ast,[n],e.input,e.options))}}var fv={onItem(e,t){if(!(t.ownOnly?Object.hasOwn(e.input,t.name):t.name in e.input))return t.parser($,e.options);let n=e.input[t.name];return ro(e.out,t.name,n),t.parser(n,e.options)},step:dv},pv=If()(fv),mv=Rf()(fv);function hv(e,t){return e?t?[...e,...t]:e:t}function gv(e,t,n){return new uv(Reflect.ownKeys(e).map(t=>new av(t,e[t].ast)),[],n,t)}function _v(e){return e.ast}function vv(e,t,n){return new Av(e.map(_v),t,void 0,n)}function yv(e){if(e.encoding)throw Error(`mutable does not support encodings`);return new Z_(!0,e.elements,e.rest,e.annotations,e.checks,void 0,e.context,e.encodingChecks)}var bv=ji(e=>{for(;;){if(M_(e))return U_;let t=e.encoding;if(!t)return e.recur?.(bv,Si)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==Si))return U_;e=t[t.length-1].to}});function xv(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(xv)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Sv(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[mg];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!my(t)){if(O_(t))return[{key:e.name,literal:t.literal}];if(k_(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!my(e)){if(O_(e))return[{key:t,literal:e.literal}];if(k_(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Sv(bv(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Sv(e.thunk())}}var Cv=new WeakMap,wv=Object.freeze([]),Tv=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,Ev=new Set(Reflect.ownKeys(Object.prototype)).add(`__proto__`),Dv=e=>Ev.has(typeof e==`number`?globalThis.String(e):e),Ov=(e,t)=>Object.hasOwn(e,t)||t in e&&!Dv(t);function kv(e){let t=Cv.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=bv(c);if(D_(l))continue;if(O_(l)||k_(l)){a??=new Map;let e=O_(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=Sv(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=xv(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??wv);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??wv;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Yi(e)){let n=Ov(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??wv;if(t)return o}return wv}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=Tv(t);if(!Yi(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=Ov(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=Ov(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=Ov(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(Tv(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return Cv.set(e,t),t}var Av=class extends L_{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===$)return vg;let i=(o??=kv(n.types))(e,r);if(i.length===0)return $m(new Fg(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:dd(r)?jv(n,r.cause,e,t):Mv(n,r,e,t)}return Nv(n,a,i,e,t)}}_rebuild(e,t,n){let r=oy(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new Av(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=yy(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(O_);if(t.length>0)return`${Lv(n.isMutable)}[ ${t.map(t=>e(t)+Rv(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>O_(e.type));if(t.length>0)return`{ ${t.map(t=>`${Lv(t.type.context?.isMutable)}${za(t.name)}${Rv(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function jv(e,t,n,r){let i=$g(t);return i?Vp(new Fg(e,[i],n,r)):Bp(t)}function Mv(e,t,n,r){return ph(t,t=>jv(e,t,n,r))}function Nv(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Fv(a,n);if(!o)return a.out?a.out:$m(new Fg(e,a.issues??[],r,i));if(dd(o))return Pv(o,a);let s=!0;return qm(()=>s?(s=!1,Pv(o,a)):Nv(e,t,n,r,i))}function Pv(e,t){return Bh(e,e=>t.out?bg(t.out)?Km(t.input):t.out:$m(new Fg(t.ast,t.issues??[],t.input,t.options)))}var Fv=If()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=$g(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),Vp(new Ig(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return Wp}}}),Iv=new Av([new W_(`Infinity`),new W_(`-Infinity`),new W_(`NaN`)]);function Lv(e){return e?``:`readonly `}function Rv(e){return e?`?`:``}var zv=class extends xi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new zv(this.run,{...this.annotations,...e},this.aborted)}abort(){return new zv(this.run,this.annotations,!0)}and(e,t){return new Bv([this,e],t)}},Bv=class extends xi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new Bv(this.checks,{...this.annotations,...e})}and(e,t){return new Bv([this,e],t)}};function Vv(e,t,n=!1){return new zv((t,n,r)=>zg(n,e(t,n,r),t,r),t,n)}function Hv(e){return Vv(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var Uv=ey(Y_,[Hv()]),Wv=new N_(new Av([Uv,Iv]),new v_(d_(),i_(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Gv(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return Vv(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var Kv=new WeakMap;function qv(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&Kv.set(n,Jv(e)),n}function Jv(e){let t=Kv.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return Kv.set(e,n),n}function Yv(e,t){return e.encoding===t?e:qv(e,{encoding:t})}function Xv(e,t){if(e.context===t)return e;let n=Jv(e);return n.context===t&&n.encoding===e.encoding?n:qv(e,{context:t})}function Zv(e){return e.encoding?Zv(e.encoding[e.encoding.length-1].to):e}function Qv(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return $v(e,Oc(e.checks.slice(0,-1),n.annotate(t)))}return qv(e,{annotations:{...e.annotations,...t}})}function $v(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:qv(e,{checks:t})}function ey(e,t){return $v(e,hv(e.checks,t))}function ty(e,t){let n=t(e.to);return n===e.to?e:new N_(n,e.transformation)}function ny(e,t){let n=e,r=n[n.length-1],i=ty(r,t);return i===r?e:Oc(e.slice(0,e.length-1),i)}function ry(e){return t=>t.encoding?Yv(t,ny(t.encoding,e)):t}function iy(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:Yv(r,ny(r.encoding,n))}return e(r)}return ji(n)}function ay(e,t,n){let r=new N_(e,t);return Yv(n,n.encoding?[...n.encoding,r]:[r])}function oy(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function sy(e,t){return Xv(e,e.context?new F_(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new F_(!1,!1,void 0,t))}var cy=ji(e=>ly(Xv(e,e.context?e.context.isOptional===!1?new F_(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new F_(!0,!1)))),ly=ry(cy),uy=Ai(e=>cy(new Av([e,H_])));function dy(e,t,n){return ay(e,n,t)}function fy(e){let t=[],n=[];function r(e){t.includes(e)||t.push(e)}function i(e){switch(e._tag){case`Literal`:j(e.literal)&&r(e.literal);return;case`UniqueSymbol`:r(e.symbol);return;case`Enum`:for(let[,t]of e.enums)r(t);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)i(e.types[t]);return;default:n.push(e)}}return i(e),{literals:t,parameters:n}}function py(e,t){let{literals:n,parameters:r}=fy(e);return new uv(n.map(e=>new av(e,t)),r.map(e=>new lv(e,t)))}function my(e){return e.context?.isOptional??!1}function hy(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(hy)}function gy(e){function t(e){return hy(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return kc(n)?n:void 0}function _y(e){let t=!0;function n(e){return t=t&&!e.encoding&&!M_(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var vy=ji(e=>{let t=Jv(e);if(t!==e){let n=vy(t);return n===t&&e.encoding===void 0?e:Xv(n,e.context)}let n=`recur`in e?e.recur(vy):e;return`encodingChecks`in n&&n.encodingChecks?qv(n,{encodingChecks:void 0,checks:hv(_y(e)?n.encodingChecks:A_(n)||j_(n)||E_(n)&&n.typeParameters.length>0?gy(n.encodingChecks):void 0,n.checks)}):n}),yy=ji(e=>vy(xy(e)));function by(e,t){let n=t,r=n.length,i=n[r-1],a=[new N_(xy(Yv(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new N_(xy(n[e-1].to),n[e].transformation.flip()));let o=xy(i.to);return o.encoding?Yv(o,[...o.encoding,...a]):Yv(o,a)}var xy=Ai(e=>{if(e.encoding)return by(e,e.encoding);let t=Jv(e);if(t!==e){let n=xy(t);return n===t?e:Xv(n,e.context)}return`flip`in e?e.flip(xy):`recur`in e?e.recur(xy):e});function Sy(e,t){let n=t===0?yg:_g(t);return(r,i)=>r===$?vg:r===t?n:$m(new Ng(e,r,i))}function Cy(e,t){return(n,r)=>n===$?vg:t(n)?yg:$m(new Ng(e,n,r))}var wy=iy(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(wy)}}),Ty=new globalThis.RegExp(`^${rv}$`),Ey=new globalThis.RegExp(`^(?:${rv}|Infinity|-Infinity|NaN)$`);function Dy(e){return Gv(Ty,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Ty.source}),...e})}var Oy=ey(K_,[Dy()]),ky=new N_(Oy,C_),Ay=new N_(new Av([Oy,Iv]),C_);function jy(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=jy(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Dg(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function My(e){if(!E_(e))return;let t=e.annotations?.[hg];return Ui(t)?t(e.typeParameters):void 0}function Ny(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function Py(e){return e===void 0||typeof e==`string`}function Fy(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function Iy(e){return Fy(e,Ny)}var Ly=new R_([],()=>(e,t,n)=>Iy(e)?yg:$m(new Ng(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>zy});function Ry(e){return Fy(e,Py)}var zy=new N_(new R_([],()=>(e,t,n)=>Ry(e)?yg:$m(new Ng(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),S_()),By=(e,t,n)=>bg(e)?n(t):Bh(e,n);function Vy(e){let t=Hy(e);return(e,n,r)=>{try{return t(e,n,r)}catch(e){return nh(e)}}}function Hy(e){if(e._tag===`Middleware`)return(t,n,r)=>Uy(bg(t)?e.decode(_g(xg(n)),r):e.decode(zh(t,xg),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>bg(e)?_g(t):e;case`Transform`:{let e=e=>e===$?vg:_g(t.transform(e));return(t,n)=>By(t,n,e)}case`TransformOptional`:{let e=e=>Sg(t.transform(xg(e)));return(t,n)=>By(t,n,e)}case`TransformEffect`:return(e,n,r)=>By(e,n,e=>e===$?vg:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>By(e,n,e=>Uy(t.transform(xg(e),r)))}}var Uy=e=>Bh(e,Sg),Wy=(e,t,n,r)=>ph(r,r=>th(()=>Np(r,r=>new Og(e,r,t,n))));function Gy(e,t){let n=Vy(e.link.transformation),r;return(i,a)=>{if(i===$)return vg;if(e.isConstructed(i))return yg;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function Ky(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==$&&r!==void 0)return t(r,i);let a=n;if(dd(a)&&a._tag===`Success`){let e=t(a[F],i);return bg(e)?a:e}return Bh(Wy(e,r,i,a),e=>{let n=t(e,i);return bg(n)?_g(e):n})}}function qy(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:Ky(e,n)}function Jy(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?My(e):void 0,o=a?Gy(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>Vy(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);try{if(u&&!n.disableChecks){if(dd(r)){if(r._tag===`Success`){let i=bg(r)?t:r[F];if(t!==$&&i!==$){let i=jy(u,t,void 0,e,n);i&&(r=$m(new Mg(e,i,t,n)))}}}else r=ah(r,r=>{if(t!==$&&r!==$){let r=jy(u,t,void 0,e,n);if(r)return $m(new Mg(e,r,t,n))}return Km(r)})}if(s&&!n.disableChecks){if(dd(r)){if(r._tag===`Success`){let i=bg(r)?t:r[F];if(i===$)return r;let a=jy(s,i,void 0,e,n);a&&(r=$m(new Mg(e,a,i,n)))}}else r=ah(r,t=>{if(t!==$){let r=jy(s,t,void 0,e,n);if(r)return $m(new Mg(e,r,t,n))}return Km(t)})}return r}catch(e){return nh(e)}},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[F],o=t(a,r)):o=Bh(o,e=>{let n=t(e,r);return bg(n)?_g(e):n})}if(o._tag===`Success`){let e=o[F],t=p(e,r);return bg(t)?o:t}return o=Wy(e,n,r,o),Bh(o,e=>{let t=p(e,r);return bg(t)?_g(e):t})}:p}var Yy=Symbol(),Xy=new WeakMap,Zy=e=>tb(e).parser,Qy=e=>tb(e).makeEffect,$y=e=>qy(e,Qy),eb=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=Jy(this.ast,Zy)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=Jy(this.ast,Qy,$y)}};function tb(e){let t=Xy.get(e);if(t!==void 0)return t;let n=new eb(e);return Xy.set(e,n),n}function nb(e){let t=e.ast,n;return(e,r)=>(n??=gb(Tb,vy(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function rb(e){let t=nb(e);return(e,n)=>{let r=Ih(t(e,n));return Gp(r)?Ns(r.value):(e_(r.cause,`Option adapter can only return none for schema issues`),Ms())}}function ib(e){return Sb(vy(e.ast))}function ab(e){return sb(e.ast)}function ob(e){{let t=_b(mb(e));return e=>{let n=t(e,P_);return Gp(n)?!0:(e_(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function sb(e){let t=vy(e),n=e=>(n=ob(t),n(e));return e=>n(e)}function cb(e,t){let n=mb(e.ast);return t===void 0?n:(e,r)=>n(e,fb(t,r))}function lb(e,t){return vb(cb(e,t))}var ub=lb;function db(e,t){let n=mb(xy(e.ast));return t===void 0?n:(e,r)=>n(e,fb(t,r))}var fb=(e,t)=>t?{...e,...t}:e,pb=e=>e===$?$m(new Pg):Km(e);function mb(e){return gb(wb,e)}function hb(e,t){return bg(e)?Km(t):dd(e)?e[F]===$?pb($):e:Bh(e,pb)}function gb(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??P_);return bg(a)?Km(r):dd(a)?a[F]===$?pb($):a:Bh(a,pb)}}function _b(e){return(t,n)=>Ih(e(t,n))}function vb(e){let t=_b(e);return(e,n)=>{let r=t(e,n);return Gp(r)?Ns(r.value):(e_(r.cause,`Option adapter can only return none for schema issues`),Ms())}}function yb(e,t){let n=Ih(e);if(Gp(n))return n.value;let r=e_(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}var bb=`Constructor adapter can only throw schema issues`;function xb(e){throw Error(bb,{cause:jp(e)})}function Sb(e){let t;return(n,r)=>Cb(t??=tb(e),n,r)}function Cb(e,t,n){let r=n?.disableChecks?n.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions??P_,i=e.make;if(i!==void 0&&t!==$){let e;try{e=i(t,r)}catch(e){xb(e)}if(e!==Yy&&e!==$)return e}return yb(hb(e.makeEffect(t,r),t),bb)}var wb=e=>tb(e).parser,Tb=e=>tb(e).makeEffect,Eb=`~effect/Schema/Schema`,Db=Symbol(),Ob={[Eb]:Eb,get make(){let e=ib(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=nb(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=rb(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return yi(this,arguments)},annotate(e){return this.rebuild(Qv(this.ast,e))},annotateKey(e){return this.rebuild(sy(this.ast,e))},check(...e){return this.rebuild(ey(this.ast,e))},rebuild(e){return kb(e,this[Db])}};function kb(e,t){function n(){}let r=Object.setPrototypeOf(n,Ob);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Db]=t,r.ast=e,r}function Ab(e){return Gp(e)?e.value:{issues:[{message:Fp(e.cause)}]}}function jb(e,t){let n=cb(e),r={errors:`all`,...t?.parseOptions},i=Hg(t);return Mb(e,{validate:e=>{let t=new Tl(`sync`),a=Mh(Sh(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Ab(o):new Promise(e=>{a.addObserver(t=>{e(Ab(t))})})}})}function Mb(e,t){let n={version:1,vendor:`effect`,...Object.hasOwn(e,`~standard`)?e[`~standard`]:void 0,...t},r=typeof e==`function`?Function.prototype.bind.call(e,void 0):Object.create(Object.getPrototypeOf(e));return Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(e),ast:{value:e.ast,enumerable:!0,configurable:!0},"~standard":{value:n,writable:!0,enumerable:!0,configurable:!0}})}var Nb=e=>e,Pb=`~effect/Schema/SchemaError`;function Fb(e){return M(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...Za}),{...Za},{...Za},{...Za},{...Za},{...Za},{...Za},{...Za};var Ib=class extends kl(`SchemaError`){[Pb]=Pb;constructor(e){let t=$a();eo(0);try{super({issue:e})}finally{eo(t)}}get message(){return Xg(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[Ja](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function Lb(e){return Fb(e)}function Rb(e){return dd(e)?zb(e):ph(e,e=>th(()=>Np(e,e=>new Ib(e))))}function zb(e){return Gp(e)?e:Bp(Np(e.cause,e=>new Ib(e)))}function Bb(e,t){let n;for(let r of e.reasons){if(!kp(r)||!Lb(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Vb(e){let t=Ih(e);if(Gp(t))return t.value;throw Bb(t.cause,`Sync adapter can only throw schema errors`)}function Hb(e,t){return jb(e,t)}var Ub=ab;function Wb(e,t){let n=cb(e,t);return(e,t)=>Rb(n(e,t))}var Gb=lb,Kb=ub;function qb(e,t){let n=Wb(e,t);return(e,t)=>Vb(n(e,t))}function Jb(e,t){let n=db(e,t);return(e,t)=>Rb(n(e,t))}function Yb(e,t){let n=Jb(e,t);return(e,t)=>Vb(n(e,t))}var Xb=Yb,Zb=kb,Qb=Nb(e=>Zb(cy(e.ast),{schema:e})),$b=Nb(e=>{let t=_x(e);return Zb(uy(e.ast),{schema:t})}),ex=Nb(e=>Zb(yy(e.ast),{schema:e}));function tx(e){let t=Zb(new W_(e),{literal:e,transform(n){return t.pipe(vx(tx(n),{decode:i_(()=>n),encode:i_(()=>e)}))}});return t}var nx=Zb(U_),rx=Zb(z_),ix=Zb(H_),ax=Zb(K_),ox=Zb(Y_),sx=Zb(X_);function cx(e,t){return Zb(e,{fields:t,mapFields(e,t){let n=e(this.fields);return cx(gv(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function lx(e){return cx(gv(e,void 0),e)}function ux(e,t){return Zb(py(e.ast,t.ast),{key:e,value:t})}var dx=Nb(e=>Zb(new Z_(!1,[],[e.ast]),{value:e})),fx=Nb(e=>Zb(yv(e.ast),{schema:e}));function px(e,t){return Zb(e,{members:t,mapMembers(e,t){let n=e(this.members);return px(vv(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function mx(e,t){return px(vv(e,t,void 0),e)}function hx(e){let t=e.map(tx);return Zb(vv(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return mx(e(this.members))},pick(e){return hx(e)},transform(e){return mx(t.map((t,n)=>t.transform(e[n])))}})}var gx=Nb(e=>mx([e,rx])),_x=Nb(e=>mx([e,ix]));function vx(e,t){return n=>Zb(dy(n.ast,e.ast,t?b_(t):S_()),{from:n,to:e})}function yx(e){return dd(e)&&e._tag===`Success`?e:ph(e,e=>th(()=>Np(e,e=>e.issue)))}function bx(e,t){let n=t?.encodingStrategy===`omit`?c_():r_();return t=>Qb(ex(t)).pipe(vx(t,{decode:l_(yx(e)),encode:n}))}var xx=Vv,Sx=Zb(Uv);function Cx(e){return xx(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var wx=ox.check(Cx());function Tx(e,t,n){return xx(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[pg]:!0,arbitraryConstraint:{minLength:e},...n})}function Ex(e){return Tx(1,1,e)}var Dx=ax.check(Ex());globalThis.RegExp,globalThis.URL;var Ox=ax.annotate({expected:`a string that will be decoded as JSON`});function kx(e,t){return Ox.pipe(vx(e,w_(t)))}globalThis.File,globalThis.URLSearchParams,globalThis.Uint8Array;var Ax=Zb(Qv(Ly,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),jx=Gb(Dx),Mx=Gb(wx);function Nx(e){let t=jx(e??``);return Fs(t)?t.value:void 0}function Px(e){if(e===void 0)return;let t=Mx(e);if(Fs(t)&&t.value>0)return t.value;if(!Bi(e))return;let n=Mx(Number.parseInt(e,10));return Fs(n)&&n.value>0?n.value:void 0}function Fx(e){return{kind:Nx(e.kind),name:Nx(e.name),run:Nx(e.run),thread:Nx(e.thread),seq:Px(e.seq)}}var Ix=`modulepreload`,Lx=function(e,t){return new URL(e,t).href},Rx={},zx=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}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Lx(t,n),t=s(t),t in Rx)return;Rx[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ix,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.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)})},Bx=Gr(`/`)({validateSearch:Fx,component:Kr(()=>zx(()=>import(`./routes-CECZJJob.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),Vx={IndexRoute:Bx.update({id:`/`,path:`/`,getParentRoute:()=>vi})},Hx=vi._addFileChildren(Vx)._addFileTypes();function Ux(){if(typeof document>`u`)return;let e=document.querySelector(`base`)?.getAttribute(`href`);if(!e)return;let t=e.replace(/\/+$/,``);return t.startsWith(`/`)&&t.length>1?t:void 0}function Wx(){return ci({routeTree:Hx,basepath:Ux()})}var Gx=document.getElementById(`root`);Gx&&(0,_i.createRoot)(Gx).render((0,O.jsx)(i.StrictMode,{children:(0,O.jsx)(di,{router:Wx()})}));export{uh as $,Io as $n,uu as $t,dh as A,oc as An,Bp as At,eh as B,ks as Bn,Pp as Bt,Hb as C,bc as Cn,yi as Cr,Bm as Ct,Th as D,wc as Dn,Am as Dt,dg as E,Cc as En,r as Er,Dm as Et,fh as F,zs as Fn,Wp as Ft,kh as G,L as Gn,gd as Gt,Bh as H,es as Hn,rd as Ht,wh as I,Ps as In,Lp as It,Qm as J,I as Jn,vu as Jt,Ah as K,F as Kn,bd as Kt,Dh as L,Fs as Ln,Ap as Lt,ph as M,Ls as Mn,Kp as Mt,mh as N,Is as Nn,Gp as Nt,Eh as O,yc as On,qp as Ot,hh as P,Rs as Pn,zp as Pt,Rh as Q,R as Qn,ud as Qt,lh as R,Ms as Rn,Mp as Rt,$b as S,Tc as Sn,ki as Sr,vm as St,ug as T,Sc as Tn,Pn as Tr,Om as Tt,oh as U,ns as Un,Ru as Ut,ah as V,rs as Vn,id as Vt,Lh as W,Xo as Wn,Q as Wt,yh as X,Vo as Xn,bu as Xt,vh as Y,Ho as Yn,xu as Yt,Um as Z,Ro as Zn,Wf as Zt,qb as _,kl as _n,Ti as _r,rh as _t,Ax as a,gf as an,ma as ar,xh as at,Ub as b,Nc as bn,k as br,lm as bt,gx as c,tf as cn,N as cr,Ph as ct,lx as d,Y as dn,Hi as dr,Km as dt,ep as en,V as er,gh as et,mx as f,ku as fn,Ui as fr,qm as ft,Gb as g,Mu as gn,Bi as gr,Gm as gt,Wb as h,Nf as hn,Ji as hr,_h as ht,Sx as i,bf as in,ha as ir,Wm as it,Xm as j,cc as jn,Up as jt,sh as k,Us as kn,Hp as kt,ux as l,sf as ln,Xi as lr,Fh as lt,Kb as m,Eu as mn,qi as mr,ch as mt,dx as n,xf as nn,Ya as nr,Zm as nt,tx as o,hf as on,sa as or,Mh as ot,nx as p,Du as pn,Vi as pr,Jm as pt,jh as q,Oo as qn,xd as qt,sx as r,yf as rn,La as rr,Oh as rt,hx as s,lf as sn,P as sr,Nh as st,Bx as t,md as tn,Ja as tr,Ch as tt,ax as u,ff as un,M as ur,bh as ut,Xb as v,Dc as vn,Oi as vr,Ym as vt,bx as w,xc as wn,hi as wr,km as wt,fx as x,jc as xn,Si as xr,um as xt,kx as y,Ac as yn,Ci as yr,ih as yt,$m as z,Ns as zn,Ip as zt};
|
|
23
|
+
`);r=n??Qg(e)??Gg(gg(e.ast),e);break;default:r=n??Bg(e)}return t?`${r}\n at ${t}`:r}function Qg(e){if(e._tag===`Pointer`||e._tag===`Composite`)return;if(e._tag===`Encoding`)return Qg(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function $g(e){let t;for(let n of e.reasons){if(!kp(n)||!wg(n.error))return;t??=n.error}return t}function e_(e,t){let n=$g(e);if(n===void 0)throw Error(t,{cause:e});return n}var t_=e=>Object.assign(Object.create(bi),e),n_=t_({_tag:`Passthrough`});function r_(){return n_}function i_(e){return t_({_tag:`Transform`,transform:e})}function a_(e){return t_({_tag:`TransformEffect`,transform:e})}function o_(e){return t_({_tag:`TransformOptional`,transform:e})}function s_(e){return t_({_tag:`TransformOptionalEffect`,transform:e})}function c_(){return o_(()=>Ms())}function l_(e){return s_(t=>{let n=Vs(t,Wi);return Fs(n)?Km(n):zh(e,Ns)})}function u_(){return i_(globalThis.String)}function d_(){return i_(globalThis.Number)}function f_(e){return a_((t,n)=>rh({try:()=>JSON.parse(t,e?.reviver),catch:()=>new Pg({expected:`a valid JSON string`},t,n)}))}function p_(e){return a_((t,n)=>rh({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new Pg({expected:`a JSON-serializable value`},t,n)}))}var m_=Symbol.for(`~effect/Schema/content`);function h_(e,t){return Object.defineProperty(e,m_,{value:t}),e}var g_=class extends xi{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new g_(this.encode,this.decode)}},__=`~effect/SchemaTransformation/Transformation`,v_=class extends xi{[__]=__;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new v_(this.encode,this.decode)}};function y_(e){return M(e,__)&&e[__]===__}var b_=e=>y_(e)?e:new v_(e.decode,e.encode),x_=new v_(r_(),r_());function S_(){return x_}var C_=new v_(d_(),u_());function w_(e){return new v_(f_(e??{}),h_(p_(e),{mediaType:`application/json`,preserveSchema:e?.reviver===void 0&&e?.replacer===void 0}))}function T_(e){return t=>t._tag===e}var E_=T_(`Declaration`),D_=T_(`Never`),O_=T_(`Literal`),k_=T_(`UniqueSymbol`),A_=T_(`Arrays`),j_=T_(`Objects`),M_=T_(`Suspend`),N_=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},P_={},F_=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},I_=`~effect/Schema`,L_=class{[I_]=I_;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},R_=class extends L_{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>{if(t===$)return vg;e??=this.run(this.typeParameters);try{return e(t,this,n)}catch(e){return nh(e)}}}_rebuild(e,t,n,r,i){let a=oy(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new R_(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},z_=new class extends L_{_tag=`Null`;getParser(){return Sy(this,null)}getExpected(){return`null`}},B_=class extends L_{_tag=`Undefined`;getParser(){return Sy(this,void 0)}toCodecJson(){return Yv(this,[V_])}getExpected(){return`undefined`}},V_=new N_(z_,new v_(i_(()=>void 0),i_(()=>null))),H_=new B_,U_=new class extends L_{_tag=`Unknown`;getParser(){return Cy(this,Ki)}getExpected(){return`unknown`}},W_=class extends L_{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${La(e)}`);this.literal=e}getParser(){return Sy(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?G_(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:G_(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function G_(e){let t=globalThis.String(e.literal);return Yv(e,[new N_(new W_(t),new v_(i_(()=>e.literal),i_(()=>t)))])}var K_=new class extends L_{_tag=`String`;getParser(){return Cy(this,Bi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&jy(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},q_=class extends L_{_tag=`Number`;getParser(){return Cy(this,Vi)}matchKey(e,t){return this._match(Ey,e,t)}matchPart(e,t){return this._match(Ty,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:jy(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(J_(this.checks,`effect/schema/isFinite`)||J_(this.checks,`effect/schema/isInt`))?this:Yv(this,[Wv])}toCodecStringTree(){return this.toCodecJson()===this?Yv(this,[ky]):Yv(this,[Ay])}getExpected(){return`number`}};function J_(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&J_(e.checks,t))}var Y_=new q_,X_=new class extends L_{_tag=`Boolean`;getParser(){return Cy(this,Hi)}getExpected(){return`boolean`}},Z_=class extends L_{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(my(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(my(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new jg(n,t[o],i),a=new kg([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return $m(new Mg(n,[a],t,i))}return e.issues?$m(new Mg(n,e.issues,t,i)):_g(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:[],issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Ff(t.concurrency),f=d===1?ev(i,e,0,u):tv(i,e,{concurrency:d,end:u});if(!f)return c(i);if(dd(f))return Bh(f,()=>c(i));let p=!0;return qm(()=>p?(p=!1,ah(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===$)return vg;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):$m(new Ng(n,e,a))}catch(e){return nh(e)}}}_rebuild(e,t,n){let r=oy(this.elements,e),i=oy(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new Z_(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function Q_(e,t,n,r){if(n._tag===`Failure`)return nv(e,e.ast,r,n);let i=bg(n)?t:n[F];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(my(t.ast))return;let n=new kg([r],new Ag(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return Vp(new Mg(e.ast,[n],e.input,e.options))}}var $_={onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:Q_},ev=If()($_),tv=Rf()($_),nv=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=$g(r.cause);if(i===void 0)return Bp(Np(r.cause,r=>new Mg(t,[new kg([n],r)],e.input,e.options)));let a=new kg([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Vp(new Mg(t,[a],e.input,e.options))},rv=`[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?`;function iv(e,t,n=P_){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(wy(yy(t)))}var av=class{name;type;constructor(e,t){this.name=e,this.type=t}};function ov(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(ov);default:return!1}}function sv(e){let t=Zv(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(sv);default:return!1}}function cv(e){return ov(e)&&sv(e)}var lv=class{parameter;type;constructor(e,t){if(!cv(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,my(t)||t.encoding!==void 0&&my(yy(t)))throw Error("Cannot use `Schema.optionalKey` or `Schema.optional` with index signatures. Index signatures already allow keys to be absent; use `Schema.UndefinedOr` to allow `undefined` values.")}},uv=class extends L_{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return Cy(n,Gi);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type,ownOnly:Dv(e.name)})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(wy(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return nv(t,n,i,s)??Wp;let c=bg(s)?o:s[F];if(a!==$&&c!==$){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return Wp;ro(t.out,a,c)}return Wp},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!dd(t))return ah(lh(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return nv(e,n,r,a)??Wp;let o=bg(a)?r:a[F],s=e.input[r],l=i.parserValue(s,e.options);return dd(l)?t(e,r,o,s,l):ah(lh(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return dd(a)?t(e,n,n,i,a):ah(lh(a),r=>t(e,n,n,i,r))},u=i?Rf()({onItem:(e,[t,n])=>n.is.parameter===K_?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return Vh(function*(t,d){if(t===$)return $;if(typeof t!=`object`||!t||Array.isArray(t))return yield*$m(new Ng(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:Ff(d.concurrency),v=i&&g?n.indexSignatures.map(e=>iv(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new jg(n,f[a],d),r=new kg([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*$m(new Mg(n,[r],t,d))}}}if(r){let e=_===1?pv(m,a):mv(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===K_?l:c,r=v?.[e]??(t.is.parameter===K_?Object.keys(f):iv(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!dd(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Mc();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===K_?Object.keys(f):iv(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*$m(new Mg(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return ah(lh(n),n=>{let i={...e,out:{...e.out}},o=dv(i,r,n);if(o)return o;let s=()=>_g(i.out),c=pv(i,a.slice(t+1));return c?Bh(c,s):s()})};return(e,t)=>{if(e===$)return vg;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Ff(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return $m(new Ng(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=n.ownOnly?Object.hasOwn(i,s):s in i,l=c?i[s]:$,d=n.parser(l,t);if(!dd(d))return u(o,e,d);if(bg(d)){c&&ro(a,s,l);continue}let f=dv(o,n,d);if(f)return f}}catch(e){return nh(e)}return _g(a)}}_rebuild(e,t,n,r){let i=oy(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new av(t.name,n)}),a=oy(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new lv(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new uv(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function dv(e,t,n){if(n._tag===`Failure`)return nv(e,e.ast,t.name,n);if(bg(n))return;let r=n[F];if(r!==$){ro(e.out,t.name,r);return}if(delete e.out[t.name],!my(t.type)){let n=new kg([t.name],new Ag(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return Vp(new Mg(e.ast,[n],e.input,e.options))}}var fv={onItem(e,t){if(!(t.ownOnly?Object.hasOwn(e.input,t.name):t.name in e.input))return t.parser($,e.options);let n=e.input[t.name];return ro(e.out,t.name,n),t.parser(n,e.options)},step:dv},pv=If()(fv),mv=Rf()(fv);function hv(e,t){return e?t?[...e,...t]:e:t}function gv(e,t,n){return new uv(Reflect.ownKeys(e).map(t=>new av(t,e[t].ast)),[],n,t)}function _v(e){return e.ast}function vv(e,t,n){return new Av(e.map(_v),t,void 0,n)}function yv(e){if(e.encoding)throw Error(`mutable does not support encodings`);return new Z_(!0,e.elements,e.rest,e.annotations,e.checks,void 0,e.context,e.encodingChecks)}var bv=ji(e=>{for(;;){if(M_(e))return U_;let t=e.encoding;if(!t)return e.recur?.(bv,Si)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==Si))return U_;e=t[t.length-1].to}});function xv(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(xv)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Sv(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[mg];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!my(t)){if(O_(t))return[{key:e.name,literal:t.literal}];if(k_(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!my(e)){if(O_(e))return[{key:t,literal:e.literal}];if(k_(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Sv(bv(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Sv(e.thunk())}}var Cv=new WeakMap,wv=Object.freeze([]),Tv=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,Ev=new Set(Reflect.ownKeys(Object.prototype)).add(`__proto__`),Dv=e=>Ev.has(typeof e==`number`?globalThis.String(e):e),Ov=(e,t)=>Object.hasOwn(e,t)||t in e&&!Dv(t);function kv(e){let t=Cv.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=bv(c);if(D_(l))continue;if(O_(l)||k_(l)){a??=new Map;let e=O_(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=Sv(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=xv(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??wv);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??wv;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Yi(e)){let n=Ov(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??wv;if(t)return o}return wv}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=Tv(t);if(!Yi(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=Ov(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=Ov(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=Ov(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(Tv(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return Cv.set(e,t),t}var Av=class extends L_{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===$)return vg;let i=(o??=kv(n.types))(e,r);if(i.length===0)return $m(new Fg(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:dd(r)?jv(n,r.cause,e,t):Mv(n,r,e,t)}return Nv(n,a,i,e,t)}}_rebuild(e,t,n){let r=oy(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new Av(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=yy(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(O_);if(t.length>0)return`${Lv(n.isMutable)}[ ${t.map(t=>e(t)+Rv(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>O_(e.type));if(t.length>0)return`{ ${t.map(t=>`${Lv(t.type.context?.isMutable)}${za(t.name)}${Rv(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function jv(e,t,n,r){let i=$g(t);return i?Vp(new Fg(e,[i],n,r)):Bp(t)}function Mv(e,t,n,r){return ph(t,t=>jv(e,t,n,r))}function Nv(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Fv(a,n);if(!o)return a.out?a.out:$m(new Fg(e,a.issues??[],r,i));if(dd(o))return Pv(o,a);let s=!0;return qm(()=>s?(s=!1,Pv(o,a)):Nv(e,t,n,r,i))}function Pv(e,t){return Bh(e,e=>t.out?bg(t.out)?Km(t.input):t.out:$m(new Fg(t.ast,t.issues??[],t.input,t.options)))}var Fv=If()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=$g(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),Vp(new Ig(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return Wp}}}),Iv=new Av([new W_(`Infinity`),new W_(`-Infinity`),new W_(`NaN`)]);function Lv(e){return e?``:`readonly `}function Rv(e){return e?`?`:``}var zv=class extends xi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new zv(this.run,{...this.annotations,...e},this.aborted)}abort(){return new zv(this.run,this.annotations,!0)}and(e,t){return new Bv([this,e],t)}},Bv=class extends xi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new Bv(this.checks,{...this.annotations,...e})}and(e,t){return new Bv([this,e],t)}};function Vv(e,t,n=!1){return new zv((t,n,r)=>zg(n,e(t,n,r),t,r),t,n)}function Hv(e){return Vv(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var Uv=ey(Y_,[Hv()]),Wv=new N_(new Av([Uv,Iv]),new v_(d_(),i_(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Gv(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return Vv(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var Kv=new WeakMap;function qv(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&Kv.set(n,Jv(e)),n}function Jv(e){let t=Kv.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return Kv.set(e,n),n}function Yv(e,t){return e.encoding===t?e:qv(e,{encoding:t})}function Xv(e,t){if(e.context===t)return e;let n=Jv(e);return n.context===t&&n.encoding===e.encoding?n:qv(e,{context:t})}function Zv(e){return e.encoding?Zv(e.encoding[e.encoding.length-1].to):e}function Qv(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return $v(e,Oc(e.checks.slice(0,-1),n.annotate(t)))}return qv(e,{annotations:{...e.annotations,...t}})}function $v(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:qv(e,{checks:t})}function ey(e,t){return $v(e,hv(e.checks,t))}function ty(e,t){let n=t(e.to);return n===e.to?e:new N_(n,e.transformation)}function ny(e,t){let n=e,r=n[n.length-1],i=ty(r,t);return i===r?e:Oc(e.slice(0,e.length-1),i)}function ry(e){return t=>t.encoding?Yv(t,ny(t.encoding,e)):t}function iy(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:Yv(r,ny(r.encoding,n))}return e(r)}return ji(n)}function ay(e,t,n){let r=new N_(e,t);return Yv(n,n.encoding?[...n.encoding,r]:[r])}function oy(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function sy(e,t){return Xv(e,e.context?new F_(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new F_(!1,!1,void 0,t))}var cy=ji(e=>ly(Xv(e,e.context?e.context.isOptional===!1?new F_(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new F_(!0,!1)))),ly=ry(cy),uy=Ai(e=>cy(new Av([e,H_])));function dy(e,t,n){return ay(e,n,t)}function fy(e){let t=[],n=[];function r(e){t.includes(e)||t.push(e)}function i(e){switch(e._tag){case`Literal`:j(e.literal)&&r(e.literal);return;case`UniqueSymbol`:r(e.symbol);return;case`Enum`:for(let[,t]of e.enums)r(t);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)i(e.types[t]);return;default:n.push(e)}}return i(e),{literals:t,parameters:n}}function py(e,t){let{literals:n,parameters:r}=fy(e);return new uv(n.map(e=>new av(e,t)),r.map(e=>new lv(e,t)))}function my(e){return e.context?.isOptional??!1}function hy(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(hy)}function gy(e){function t(e){return hy(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return kc(n)?n:void 0}function _y(e){let t=!0;function n(e){return t=t&&!e.encoding&&!M_(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var vy=ji(e=>{let t=Jv(e);if(t!==e){let n=vy(t);return n===t&&e.encoding===void 0?e:Xv(n,e.context)}let n=`recur`in e?e.recur(vy):e;return`encodingChecks`in n&&n.encodingChecks?qv(n,{encodingChecks:void 0,checks:hv(_y(e)?n.encodingChecks:A_(n)||j_(n)||E_(n)&&n.typeParameters.length>0?gy(n.encodingChecks):void 0,n.checks)}):n}),yy=ji(e=>vy(xy(e)));function by(e,t){let n=t,r=n.length,i=n[r-1],a=[new N_(xy(Yv(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new N_(xy(n[e-1].to),n[e].transformation.flip()));let o=xy(i.to);return o.encoding?Yv(o,[...o.encoding,...a]):Yv(o,a)}var xy=Ai(e=>{if(e.encoding)return by(e,e.encoding);let t=Jv(e);if(t!==e){let n=xy(t);return n===t?e:Xv(n,e.context)}return`flip`in e?e.flip(xy):`recur`in e?e.recur(xy):e});function Sy(e,t){let n=t===0?yg:_g(t);return(r,i)=>r===$?vg:r===t?n:$m(new Ng(e,r,i))}function Cy(e,t){return(n,r)=>n===$?vg:t(n)?yg:$m(new Ng(e,n,r))}var wy=iy(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(wy)}}),Ty=new globalThis.RegExp(`^${rv}$`),Ey=new globalThis.RegExp(`^(?:${rv}|Infinity|-Infinity|NaN)$`);function Dy(e){return Gv(Ty,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Ty.source}),...e})}var Oy=ey(K_,[Dy()]),ky=new N_(Oy,C_),Ay=new N_(new Av([Oy,Iv]),C_);function jy(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=jy(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Dg(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function My(e){if(!E_(e))return;let t=e.annotations?.[hg];return Ui(t)?t(e.typeParameters):void 0}function Ny(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function Py(e){return e===void 0||typeof e==`string`}function Fy(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function Iy(e){return Fy(e,Ny)}var Ly=new R_([],()=>(e,t,n)=>Iy(e)?yg:$m(new Ng(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>zy});function Ry(e){return Fy(e,Py)}var zy=new N_(new R_([],()=>(e,t,n)=>Ry(e)?yg:$m(new Ng(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),S_()),By=(e,t,n)=>bg(e)?n(t):Bh(e,n);function Vy(e){let t=Hy(e);return(e,n,r)=>{try{return t(e,n,r)}catch(e){return nh(e)}}}function Hy(e){if(e._tag===`Middleware`)return(t,n,r)=>Uy(bg(t)?e.decode(_g(xg(n)),r):e.decode(zh(t,xg),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>bg(e)?_g(t):e;case`Transform`:{let e=e=>e===$?vg:_g(t.transform(e));return(t,n)=>By(t,n,e)}case`TransformOptional`:{let e=e=>Sg(t.transform(xg(e)));return(t,n)=>By(t,n,e)}case`TransformEffect`:return(e,n,r)=>By(e,n,e=>e===$?vg:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>By(e,n,e=>Uy(t.transform(xg(e),r)))}}var Uy=e=>Bh(e,Sg),Wy=(e,t,n,r)=>ph(r,r=>th(()=>Np(r,r=>new Og(e,r,t,n))));function Gy(e,t){let n=Vy(e.link.transformation),r;return(i,a)=>{if(i===$)return vg;if(e.isConstructed(i))return yg;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function Ky(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==$&&r!==void 0)return t(r,i);let a=n;if(dd(a)&&a._tag===`Success`){let e=t(a[F],i);return bg(e)?a:e}return Bh(Wy(e,r,i,a),e=>{let n=t(e,i);return bg(n)?_g(e):n})}}function qy(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:Ky(e,n)}function Jy(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?My(e):void 0,o=a?Gy(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>Vy(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);try{if(u&&!n.disableChecks){if(dd(r)){if(r._tag===`Success`){let i=bg(r)?t:r[F];if(t!==$&&i!==$){let i=jy(u,t,void 0,e,n);i&&(r=$m(new Mg(e,i,t,n)))}}}else r=ah(r,r=>{if(t!==$&&r!==$){let r=jy(u,t,void 0,e,n);if(r)return $m(new Mg(e,r,t,n))}return Km(r)})}if(s&&!n.disableChecks){if(dd(r)){if(r._tag===`Success`){let i=bg(r)?t:r[F];if(i===$)return r;let a=jy(s,i,void 0,e,n);a&&(r=$m(new Mg(e,a,i,n)))}}else r=ah(r,t=>{if(t!==$){let r=jy(s,t,void 0,e,n);if(r)return $m(new Mg(e,r,t,n))}return Km(t)})}return r}catch(e){return nh(e)}},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[F],o=t(a,r)):o=Bh(o,e=>{let n=t(e,r);return bg(n)?_g(e):n})}if(o._tag===`Success`){let e=o[F],t=p(e,r);return bg(t)?o:t}return o=Wy(e,n,r,o),Bh(o,e=>{let t=p(e,r);return bg(t)?_g(e):t})}:p}var Yy=Symbol(),Xy=new WeakMap,Zy=e=>tb(e).parser,Qy=e=>tb(e).makeEffect,$y=e=>qy(e,Qy),eb=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=Jy(this.ast,Zy)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=Jy(this.ast,Qy,$y)}};function tb(e){let t=Xy.get(e);if(t!==void 0)return t;let n=new eb(e);return Xy.set(e,n),n}function nb(e){let t=e.ast,n;return(e,r)=>(n??=gb(Tb,vy(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function rb(e){let t=nb(e);return(e,n)=>{let r=Ih(t(e,n));return Gp(r)?Ns(r.value):(e_(r.cause,`Option adapter can only return none for schema issues`),Ms())}}function ib(e){return Sb(vy(e.ast))}function ab(e){return sb(e.ast)}function ob(e){{let t=_b(mb(e));return e=>{let n=t(e,P_);return Gp(n)?!0:(e_(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function sb(e){let t=vy(e),n=e=>(n=ob(t),n(e));return e=>n(e)}function cb(e,t){let n=mb(e.ast);return t===void 0?n:(e,r)=>n(e,fb(t,r))}function lb(e,t){return vb(cb(e,t))}var ub=lb;function db(e,t){let n=mb(xy(e.ast));return t===void 0?n:(e,r)=>n(e,fb(t,r))}var fb=(e,t)=>t?{...e,...t}:e,pb=e=>e===$?$m(new Pg):Km(e);function mb(e){return gb(wb,e)}function hb(e,t){return bg(e)?Km(t):dd(e)?e[F]===$?pb($):e:Bh(e,pb)}function gb(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??P_);return bg(a)?Km(r):dd(a)?a[F]===$?pb($):a:Bh(a,pb)}}function _b(e){return(t,n)=>Ih(e(t,n))}function vb(e){let t=_b(e);return(e,n)=>{let r=t(e,n);return Gp(r)?Ns(r.value):(e_(r.cause,`Option adapter can only return none for schema issues`),Ms())}}function yb(e,t){let n=Ih(e);if(Gp(n))return n.value;let r=e_(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}var bb=`Constructor adapter can only throw schema issues`;function xb(e){throw Error(bb,{cause:jp(e)})}function Sb(e){let t;return(n,r)=>Cb(t??=tb(e),n,r)}function Cb(e,t,n){let r=n?.disableChecks?n.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions??P_,i=e.make;if(i!==void 0&&t!==$){let e;try{e=i(t,r)}catch(e){xb(e)}if(e!==Yy&&e!==$)return e}return yb(hb(e.makeEffect(t,r),t),bb)}var wb=e=>tb(e).parser,Tb=e=>tb(e).makeEffect,Eb=`~effect/Schema/Schema`,Db=Symbol(),Ob={[Eb]:Eb,get make(){let e=ib(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=nb(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=rb(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return yi(this,arguments)},annotate(e){return this.rebuild(Qv(this.ast,e))},annotateKey(e){return this.rebuild(sy(this.ast,e))},check(...e){return this.rebuild(ey(this.ast,e))},rebuild(e){return kb(e,this[Db])}};function kb(e,t){function n(){}let r=Object.setPrototypeOf(n,Ob);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Db]=t,r.ast=e,r}function Ab(e){return Gp(e)?e.value:{issues:[{message:Fp(e.cause)}]}}function jb(e,t){let n=cb(e),r={errors:`all`,...t?.parseOptions},i=Hg(t);return Mb(e,{validate:e=>{let t=new Tl(`sync`),a=Mh(Sh(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Ab(o):new Promise(e=>{a.addObserver(t=>{e(Ab(t))})})}})}function Mb(e,t){let n={version:1,vendor:`effect`,...Object.hasOwn(e,`~standard`)?e[`~standard`]:void 0,...t},r=typeof e==`function`?Function.prototype.bind.call(e,void 0):Object.create(Object.getPrototypeOf(e));return Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(e),ast:{value:e.ast,enumerable:!0,configurable:!0},"~standard":{value:n,writable:!0,enumerable:!0,configurable:!0}})}var Nb=e=>e,Pb=`~effect/Schema/SchemaError`;function Fb(e){return M(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...Za}),{...Za},{...Za},{...Za},{...Za},{...Za},{...Za},{...Za};var Ib=class extends kl(`SchemaError`){[Pb]=Pb;constructor(e){let t=$a();eo(0);try{super({issue:e})}finally{eo(t)}}get message(){return Xg(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[Ja](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function Lb(e){return Fb(e)}function Rb(e){return dd(e)?zb(e):ph(e,e=>th(()=>Np(e,e=>new Ib(e))))}function zb(e){return Gp(e)?e:Bp(Np(e.cause,e=>new Ib(e)))}function Bb(e,t){let n;for(let r of e.reasons){if(!kp(r)||!Lb(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Vb(e){let t=Ih(e);if(Gp(t))return t.value;throw Bb(t.cause,`Sync adapter can only throw schema errors`)}function Hb(e,t){return jb(e,t)}var Ub=ab;function Wb(e,t){let n=cb(e,t);return(e,t)=>Rb(n(e,t))}var Gb=lb,Kb=ub;function qb(e,t){let n=Wb(e,t);return(e,t)=>Vb(n(e,t))}function Jb(e,t){let n=db(e,t);return(e,t)=>Rb(n(e,t))}function Yb(e,t){let n=Jb(e,t);return(e,t)=>Vb(n(e,t))}var Xb=Yb,Zb=kb,Qb=Nb(e=>Zb(cy(e.ast),{schema:e})),$b=Nb(e=>{let t=_x(e);return Zb(uy(e.ast),{schema:t})}),ex=Nb(e=>Zb(yy(e.ast),{schema:e}));function tx(e){let t=Zb(new W_(e),{literal:e,transform(n){return t.pipe(vx(tx(n),{decode:i_(()=>n),encode:i_(()=>e)}))}});return t}var nx=Zb(U_),rx=Zb(z_),ix=Zb(H_),ax=Zb(K_),ox=Zb(Y_),sx=Zb(X_);function cx(e,t){return Zb(e,{fields:t,mapFields(e,t){let n=e(this.fields);return cx(gv(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function lx(e){return cx(gv(e,void 0),e)}function ux(e,t){return Zb(py(e.ast,t.ast),{key:e,value:t})}var dx=Nb(e=>Zb(new Z_(!1,[],[e.ast]),{value:e})),fx=Nb(e=>Zb(yv(e.ast),{schema:e}));function px(e,t){return Zb(e,{members:t,mapMembers(e,t){let n=e(this.members);return px(vv(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function mx(e,t){return px(vv(e,t,void 0),e)}function hx(e){let t=e.map(tx);return Zb(vv(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return mx(e(this.members))},pick(e){return hx(e)},transform(e){return mx(t.map((t,n)=>t.transform(e[n])))}})}var gx=Nb(e=>mx([e,rx])),_x=Nb(e=>mx([e,ix]));function vx(e,t){return n=>Zb(dy(n.ast,e.ast,t?b_(t):S_()),{from:n,to:e})}function yx(e){return dd(e)&&e._tag===`Success`?e:ph(e,e=>th(()=>Np(e,e=>e.issue)))}function bx(e,t){let n=t?.encodingStrategy===`omit`?c_():r_();return t=>Qb(ex(t)).pipe(vx(t,{decode:l_(yx(e)),encode:n}))}var xx=Vv,Sx=Zb(Uv);function Cx(e){return xx(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var wx=ox.check(Cx());function Tx(e,t,n){return xx(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[pg]:!0,arbitraryConstraint:{minLength:e},...n})}function Ex(e){return Tx(1,1,e)}var Dx=ax.check(Ex());globalThis.RegExp,globalThis.URL;var Ox=ax.annotate({expected:`a string that will be decoded as JSON`});function kx(e,t){return Ox.pipe(vx(e,w_(t)))}globalThis.File,globalThis.URLSearchParams,globalThis.Uint8Array;var Ax=Zb(Qv(Ly,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),jx=Gb(Dx),Mx=Gb(wx);function Nx(e){let t=jx(e??``);return Fs(t)?t.value:void 0}function Px(e){if(e===void 0)return;let t=Mx(e);if(Fs(t)&&t.value>0)return t.value;if(!Bi(e))return;let n=Mx(Number.parseInt(e,10));return Fs(n)&&n.value>0?n.value:void 0}function Fx(e){return{kind:Nx(e.kind),name:Nx(e.name),run:Nx(e.run),thread:Nx(e.thread),seq:Px(e.seq)}}var Ix=`modulepreload`,Lx=function(e,t){return new URL(e,t).href},Rx={},zx=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}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Lx(t,n),t=s(t),t in Rx)return;Rx[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Ix,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.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)})},Bx=Gr(`/`)({validateSearch:Fx,component:Kr(()=>zx(()=>import(`./routes-CkwzFejg.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),Vx={IndexRoute:Bx.update({id:`/`,path:`/`,getParentRoute:()=>vi})},Hx=vi._addFileChildren(Vx)._addFileTypes();function Ux(){if(typeof document>`u`)return;let e=document.querySelector(`base`)?.getAttribute(`href`);if(!e)return;let t=e.replace(/\/+$/,``);return t.startsWith(`/`)&&t.length>1?t:void 0}function Wx(){return ci({routeTree:Hx,basepath:Ux()})}var Gx=document.getElementById(`root`);Gx&&(0,_i.createRoot)(Gx).render((0,O.jsx)(i.StrictMode,{children:(0,O.jsx)(di,{router:Wx()})}));export{uh as $,Io as $n,uu as $t,dh as A,oc as An,Bp as At,eh as B,ks as Bn,Pp as Bt,Hb as C,bc as Cn,yi as Cr,Bm as Ct,Th as D,wc as Dn,Am as Dt,dg as E,Cc as En,r as Er,Dm as Et,fh as F,zs as Fn,Wp as Ft,kh as G,L as Gn,gd as Gt,Bh as H,es as Hn,rd as Ht,wh as I,Ps as In,Lp as It,Qm as J,I as Jn,vu as Jt,Ah as K,F as Kn,bd as Kt,Dh as L,Fs as Ln,Ap as Lt,ph as M,Ls as Mn,Kp as Mt,mh as N,Is as Nn,Gp as Nt,Eh as O,yc as On,qp as Ot,hh as P,Rs as Pn,zp as Pt,Rh as Q,R as Qn,ud as Qt,lh as R,Ms as Rn,Mp as Rt,$b as S,Tc as Sn,ki as Sr,vm as St,ug as T,Sc as Tn,Pn as Tr,Om as Tt,oh as U,ns as Un,Ru as Ut,ah as V,rs as Vn,id as Vt,Lh as W,Xo as Wn,Q as Wt,yh as X,Vo as Xn,bu as Xt,vh as Y,Ho as Yn,xu as Yt,Um as Z,Ro as Zn,Wf as Zt,qb as _,kl as _n,Ti as _r,rh as _t,Ax as a,gf as an,ma as ar,xh as at,Ub as b,Nc as bn,k as br,lm as bt,gx as c,tf as cn,N as cr,Ph as ct,lx as d,Y as dn,Hi as dr,Km as dt,ep as en,V as er,gh as et,mx as f,ku as fn,Ui as fr,qm as ft,Gb as g,Mu as gn,Bi as gr,Gm as gt,Wb as h,Nf as hn,Ji as hr,_h as ht,Sx as i,bf as in,ha as ir,Wm as it,Xm as j,cc as jn,Up as jt,sh as k,Us as kn,Hp as kt,ux as l,sf as ln,Xi as lr,Fh as lt,Kb as m,Eu as mn,qi as mr,ch as mt,dx as n,xf as nn,Ya as nr,Zm as nt,tx as o,hf as on,sa as or,Mh as ot,nx as p,Du as pn,Vi as pr,Jm as pt,jh as q,Oo as qn,xd as qt,sx as r,yf as rn,La as rr,Oh as rt,hx as s,lf as sn,P as sr,Nh as st,Bx as t,md as tn,Ja as tr,Ch as tt,ax as u,ff as un,M as ur,bh as ut,Xb as v,Dc as vn,Oi as vr,Ym as vt,bx as w,xc as wn,hi as wr,km as wt,fx as x,jc as xn,Si as xr,um as xt,kx as y,Ac as yn,Ci as yr,ih as yt,$m as z,Ns as zn,Ip as zt};
|