@swirls/looms 0.11.0 → 0.11.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-CEdsN9DO.js","./rolldown-runtime-CbXtAM7H.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-FLQryDcz.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 ne(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function re(e,t){return ne(e.type,t,e.props)}function ie(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ae(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var oe=/\/+/g;function se(e,t){return typeof e==`object`&&e&&e.key!=null?ae(``+e.key):t.toString(36)}function ce(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 le(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,le(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+se(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(oe,`$&/`)+`/`),le(o,r,i,``,function(e){return e})):o!=null&&(ie(o)&&(o=re(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(oe,`$&/`)+`/`)+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+se(a,u),c+=le(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+se(a,u++),c+=le(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return le(ce(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 w(e,t,n){if(e==null)return e;var r=[],i=0;return le(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function T(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 ue=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)},de={map:w,forEach:function(e,t,n){w(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return w(e,function(){t++}),t},toArray:function(e){return w(e,function(e){return e})||[]},only:function(e){if(!ie(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=de,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 ne(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 ne(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ie,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:T}},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,ue)}catch(e){ue(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,t,n){i.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function c(e){let t=i.useRef(null);return i.useImperativeHandle(e,()=>t.current,[]),t}function l(e){return e[e.length-1]}function u(e,t){return typeof e==`function`?e(t):e}var d=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;function p(e){for(let t in e)if(d.call(e,t))return!0;return!1}var m=()=>Object.create(null),h=(e,t)=>g(e,t,m);function g(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=b(e)&&b(i);if(!a&&!(v(e)&&v(i)))return i;let o=a?e:_(e);if(!o)return i;let s=a?i:_(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),f=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],p=i[o];if(l===p){u[o]=l,(a?t<c:d.call(e,o))&&f++;continue}if(l===null||p===null||typeof l!=`object`||typeof p!=`object`){u[o]=p;continue}let m=g(l,p,n,r+1);u[o]=m,m===l&&f++}return c===l&&f===c?e:u}function _(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!f.call(e,r))return!1;t.push(r)}return t}function v(e){if(!y(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!y(n)||!n.hasOwnProperty(`isPrototypeOf`))}function y(e){return Object.prototype.toString.call(e)===`[object Object]`}function b(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function x(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!x(e[r],t[r],n))return!1;return!0}if(v(e)&&v(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!x(e[i],t[i],n))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++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!x(e[o],t[o],n)))return!1;return i===a}return!1}function S(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 ee=/[\x00-\x1f\x7f"<>`{}]/g;function C(e){return e.replace(ee,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function te(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 C(t)}var ne=[`http:`,`https:`,`mailto:`,`tel:`];function re(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function ie(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=te(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=te(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ae(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function oe(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 se(){throw Error(`Invariant failed`)}function ce(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var le=4,w=5;function T(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function ue(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=T(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=fe(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=pe(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=fe(r);e.kind=w,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=fe(r);e.kind=le,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)ue(e,t,r,c,i,a,o,s)}function de(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 fe(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function pe(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function me(e,t){let n=fe(`/`),r=new Uint16Array(6),i=[];for(let t of e)ue(!1,r,t,1,n,0,i);for(let e of i)e.sort(de);t.masksTree=n,t.flatCache=ce(1e3)}function E(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=ye(e,t.masksTree);return t.flatCache.set(e,r),r}function he(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=fe(`/`),ue(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),ye(r,o,n)}function ge(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=ye(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 _e(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function ve(e,t=!1,n){let r=fe(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;ue(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&se(),o[e.id]=e,c!==0&&e.path){let t=_e(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(de);return{processedTree:{segmentTree:r,singleCache:ce(1e3),matchCache:ce(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function ye(e,t,n=!1){let r=e.split(`/`),i=Ce(e,r,t,n);if(!i)return null;let[a]=be(e,r,i);return{route:i.node.route,rawParams:a}}function be(e,t,n){let r=Se(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===le)break;if(u.kind===w){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}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,segment:l}]}function xe(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Se(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ce(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!l(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,u=null;for(;s.length;){let n=s.pop(),{node:i,index:l,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!De(u,n))continue;if(i.parse){if(!Ee(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==le&&De(c,n)&&(c=n);let _=l===o;if(_&&(i.route&&(!a||i.kind===le||i.kind===2)&&De(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[l],y;if(_&&i.index){let n={node:i.index,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Ee(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Te(f,o))return n;De(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(l).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.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];s.push({node:n,index:l,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}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p,optionals:m+we(o,l),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}s.push({node:t,index:l+1,skipped:d,statics:f,dynamics:p+we(o,l),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:l+1,skipped:d,statics:f+we(o,l),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:l+1,skipped:d,statics:f+we(o,l),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];s.push({node:t,index:l,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(u)return u;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function we(e,t){return 2**(e-t-1)}function Te(e,t){return e===2**(t-1)-1}function Ee(e,t,n){let r,i;try{[r,i]=be(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 De(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===le)>(e.node.kind===le)||t.node.kind===le==(e.node.kind===le)&&t.node.depth>e.node.depth)))}function Oe(e){return ke(e.filter(e=>e!==void 0).join(`/`))}function ke(e){return e.replace(/\/{2,}/g,`/`)}function Ae(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function je(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Me(e){return je(Ae(e))}function Ne(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Pe(e,t,n){return Ne(e,n)===Ne(t,n)}function Fe({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=ke(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=ke(e)),o=e.split(`/`);o.length>1&&l(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&&(l(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?ke(s):s)||`/`;return a&&r&&r.set(a,c),c}function Ie(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Le(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>ze(e,n)).join(`/`):ze(r,n):r}function Re({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=T(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Le(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Le(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Le(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function ze(e,t){let n=encodeURIComponent(e);return t?.(n)??n}function Be(e){return e?.isNotFound===!0}function Ve(){try{return sessionStorage}catch{return}}var He=`tsr-scroll-restoration-v1_3`,Ue=Ve();function We(){try{return JSON.parse(Ue?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ge(){try{Ue?.setItem(He,JSON.stringify(Ke))}catch{}}var Ke=We(),qe=`data-scroll-restoration-id`,Je=e=>e.state.__TSR_key||e.href;function Ye(e){let t=e.getAttribute(qe);if(t)return`[${qe}="${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 Xe=!1,Ze=`window`;function Qe(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function $e(e){let t=new Set;for(let n of e){if(n===Ze)continue;let e=Qe(n);e&&t.add(e)}return t}function et(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Je,a=new Set,o=e=>{let t=Ke[e]||={};for(let e of a)e===document?t[Ze]={scrollX,scrollY}:e.isConnected&&(t[Ye(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Xe=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Xe||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ge()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!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.restoring&&d&&d!==u){let e=Ke[d];if(e){let t=Ke[u];for(let n in e){if(n===Ze){if(s)continue}else{let e=Qe(n);if(!e||s&&o&&(l??=$e(o),l.has(e)))continue}t||=Ke[u]={},t[n]??=e[n]}}}Xe=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=$e(o));let t=e&&i&&c,s=r.restoring?Ke[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Ze){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Qe(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{Xe=!1}}))}function tt(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function nt(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function rt(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]=nt(r):Array.isArray(t)?t.push(nt(r)):n[e]=[t,nt(r)]}return n}var it=/^(?:\s|["[{\d-]|fa|nu|tr)/,at=st(JSON.parse),ot=ct(JSON.stringify,JSON.parse);function st(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=rt(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function ct(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&&!it.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=tt(e,r);return t?`?${t}`:``}}var lt=`__root__`;function ut(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}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 dt(e){return e instanceof Response&&!!e.options}function ft(e){return{input:({url:t})=>{for(let n of e)t=mt(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ht(e[n],t);return t}}}function pt(e){let t=Me(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Oe([`/`,t,e.pathname]),e)}}function mt(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 ht(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 gt(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(()=>{oe(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 _t=`__TSR_index`,vt=`popstate`,yt=`beforeunload`;function bt(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({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=wt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};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[_t];i=xt(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[_t];i=xt(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),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[_t]!==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}}function xt(e,t){t||={};let n=Tt();return{...t,key:n,__TSR_key:n,[_t]:e}}function St(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=e?.createHref??(e=>e),c=e?.parseLocation??(()=>wt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Tt();t.history.replaceState({[_t]: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=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=wt(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[_t]-l.state[_t],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 n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),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=bt({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=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(yt,x,{capture:!0}),t.removeEventListener(vt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(yt,x,{capture:!0}),t.addEventListener(vt,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 Ct(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function wt(e,t){let n=Ct(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=Tt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[_t]:0,key:a,__TSR_key:a}}}function Tt(){return(Math.random()+1).toString(36).substring(7)}function Et(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Dt(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Ot({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function kt(e,t,n,r){for(let i of t){if(r&&e._tx!==r)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r&&e._tx!==r)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var At=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Ie(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:St()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=ce(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=gt(this.latestLocation,e),et(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=Me(a);t&&t!==`/`&&e.push(pt({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ft(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ve(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&me(this.options.routeMasks,e.processedTree),e},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,state: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:ie(e).path,external:!1,searchStr:o,search:h(t?.search,i),hash:ie(r.slice(1)).path,state:g(t?.state,a)}}let o=new URL(i,this.origin),s=mt(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ie(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:h(t?.search,c),hash:ie(s.hash.slice(1)).path,state:g(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Fe({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),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=ge(je(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=wt(t.href,{});t={...t,to:mt(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=It(t.params,o),l=this.routesByPath[je(s)],d;if(l)d=this.getRouteBranch(l);else if(s.includes(`$`))d=[];else{let[e,t,n]=this.getMatchedRoutes(s);d=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(d=[...d,this.options.notFoundRoute])}if(d.length&&p(c))for(let e of d){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let f=e.leaveParams?s:ie(Re({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,m=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};d.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Nt(t.options.validateSearch,{...e,...m}))}catch{}}),m=e}m=Pt(m,t,d,e._includeValidateSearch),m=h(a,m);let _=this.options.stringifySearch(m),v=t.hash===!0?n.hash:t.hash?u(t.hash,n.hash):void 0,y=v?`#${v}`:``,b=t.state===!0?n.state:t.state?u(t.state,n.state):{};t.state&&(b=g(n.state,b));let x=`${f}${_}${y}`,S,ee,C=!1;if(this.rewrite){let e=new URL(x,this.origin),t=ht(this.rewrite,e);S=e.href.replace(e.origin,``),t.origin===this.origin?ee=t.pathname+t.search+t.hash:(ee=t.href,C=!0)}else S=ae(x),ee=S;return{publicHref:ee,href:S,pathname:f,search:m,searchStr:_,state:b,hash:v??``,external:C,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=E(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=It(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=je(this.latestLocation.href)===je(n.href)&&x(Ot(n.state),Ot(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.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.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=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=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(re(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=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(Dt(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([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Et(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href){let t=this.buildLocation(e.options).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&re(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),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=Bt,this.preloadRoute=e=>kn(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):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=he(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!x(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?x(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ot,parseSearch:e.parseSearch??at,protocolAllowlist:e.protocolAllowlist??ne}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=xe(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:je(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},d;for(let n=0;n<a.length;n++){let i=a[n],o=c[n-1],l,f,p;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Nt(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof jt||(r=new jt(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,_=``;try{m=i.options.loaderDeps?.({search:l})??``,_=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let{interpolatedPath:v,usedParams:y}=Re({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),b=i.id+v+_,x=u(i,n),S=this._cache.get(b)??(x?.id===b?x:void 0);d=S?._strictParams??Object.assign(y,d);let ee;if(!S)try{Lt(i,d)}catch(e){if(ee=Be(e)||dt(e)?e:new Mt(e.message,{cause:e}),t?.throwOnError)throw ee}let C=x?`stay`:`enter`,te;if(S)te={...S,cause:C,search:h(x?x.search:S.search,l),_strictSearch:f,searchError:p};else{let e=Et(i)?`pending`:`success`;te={id:b,ssr:i.options.ssr,index:n,routeId:i.id,params:x?.params??d,_strictParams:d,pathname:v,updatedAt:Date.now(),search:x?h(x.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:ee,context:{},abortController:t?._controller??new AbortController,cause:C,loaderDeps:x?g(x.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let ne=s===i.id;te._notFound&&!ne&&(te.error=void 0),te._notFound=ne,c[n]=te}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?h(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=l(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),s=l(a),c={...e.search};for(let e of a)try{Object.assign(c,Nt(e.options.validateSearch,c))}catch{}let u=n&&n.routeId===s.id&&n.pathname===e.pathname,d;if(u)d=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{Lt(t,e)}catch{}d=e}let f=[a,s.fullPath,c,d];return this.lightweightCache.set(e,[r,f]),f}},jt=class extends Error{},Mt=class extends Error{};function Nt(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new jt(`Async validation not supported`);if(n.issues)throw new jt(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 Pt(e,t,n,r){let i=[];for(let e of n){let t=e.options;`search`in t?t.search?.middlewares&&i.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&i.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=Nt(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=u(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}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 lt}function It(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,u(e,n))}function Lt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Rt(e,t){return e.options[t]?.preload?.()}function zt(e,t){let n=Rt(e,`component`),r=Rt(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Bt(e,t,n){let r=()=>t===!1?void 0:t?Rt(e,t):zt(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 Vt(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}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).finally(()=>t.removeEventListener(`abort`,i))})}function Yt(e,t){return e.routesById[t.routeId]}function Xt(e,t,n){return dt(e)?[Gt,e]:Be(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=await Jt(m({...f,search:r.search,context:r.context,...e.options.additionalContext}),c);if(c.aborted)return[i,Kt];let o=hn(e,t,u,Xt(a,!1,u.id),n);if(o[0]!==Ht)return tn(e,r),[i,o];r.context={...r.context,...a}}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?Promise.resolve(p):x?sn(e,t,s,c,g,i,a):Promise.resolve([Ht,s.loaderData])).then(t=>(x&&(cn(s,t,l),t[0]===Ht&&(m&&!a[0].signal.aborted&&ln(e,s,u),n>=o&&(s.status=`pending`))),t)),te=Jt(Promise.resolve().then(()=>Bt(c,void 0,ee)),a[0].signal).then(()=>void 0,r=>t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound))?void 0:[n,Qt(e,t,c,r,a)]).then(e=>C.then(t=>(x&&!e&&t[0]===Ht&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.()),e)));if(r.push([n,C,te]),!y)return C.then(e=>un(s,e));let ne={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let re=sn(e,t,ne,c,g,i,a).then(e=>(s.isFetching=!1,cn(ne,e,!1),e));return(t[2]??=[]).push([n,re,te,ne]),re.then(e=>un(ne,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=Bt(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;if(s.reloadDocument?i[3]:i[1]>=20)return r;try{return s.href&&s.reloadDocument?(e.resolveRedirect(o),r):[Gt,o,e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0})]}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(()=>Bt(m,l===Ut?`errorComponent`:`notFoundComponent`)):Promise.all([Bt(m),Bt(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`||i._notFound||e.preload||a?.id!==e.id||a.status!==`success`||a._notFound)break;l++}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:Vt(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||!Vt(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._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Vt(n).length,s=new Map;{let t=Date.now();for(let r of[...i,...a.values()]){if(r.status!==`success`||n.some((e,t)=>e.id===r.id&&(t<o||e.status===`success`)))continue;let i=Yt(e,r);!i.options.loader||t-r.updatedAt>=(r.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||s.set(r.id,a.get(r.id)===r?r:{...r,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=s,Sn(e,n),nn(e,[...a.values(),...i],[...n,...s.values()]),kt(e,i,n,t)}async function wn(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;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.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=Dt(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=Dt(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(_).then(),y=[p,s,a,m,Date.now(),v];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 v,await wn(e,y)}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){Be(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.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=lt:this.parentRoute||se();let r=n?lt:t?.path;r&&r!==`/`&&(r=Ae(r));let i=t?.id||r,a=n?lt:Oe([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=Oe([`/`,a]));let o=a===`__root__`?`/`:Oe([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=je(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=>ut({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()})),D=Pn(),Fn=class extends i.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?i.createElement(this.props.errorComponent??In,{error:e,reset:this.reset}):this.props.children}};function In({error:e}){let[t,n]=i.useState(!1);return(0,D.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,D.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,D.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,D.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,D.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,D.jsx)(`div`,{children:(0,D.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,D.jsx)(`code`,{children:e.message}):null})}):null]})}function Ln({children:e,fallback:t=null}){return(0,D.jsx)(i.Fragment,{children:Rn()?e:t})}function Rn(){return i.useSyncExternalStore(zn,()=>!0,()=>!1)}function zn(){return()=>{}}var Bn=i.createContext(null);function Vn(e){return i.useContext(Bn)}var Hn=i.createContext(void 0),Un=i.createContext(void 0),O=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(O||{});function Wn({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 Gn(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 Kn=[],qn=0,{link:Jn,unlink:Yn,propagate:Xn,checkDirty:Zn,shallowPropagate:Qn}=Wn({update(e){return e._update()},notify(e){Kn[er++]=e,e.flags&=~O.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=O.Mutable|O.Dirty,ir(e))}}),$n=0,er=0,tr,nr=0;function rr(e){try{++nr,e()}finally{--nr||ar()}}function ir(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Yn(n,e)}function ar(){if(!(nr>0)){for(;$n<er;){let e=Kn[$n];Kn[$n++]=void 0,e.notify()}$n=0,er=0}}function or(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?O.None:O.Mutable,get(){return tr!==void 0&&Jn(i,tr,qn),i._snapshot},subscribe(e){let t=Gn(e),n={current:!1},r=sr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=tr,o=t?.compare??Object.is;if(n)tr=i,++qn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=O.Mutable|O.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{tr=a,n&&(i.flags&=~O.RecursedCheck),ir(i)}}};return n?(i.flags=O.Mutable|O.Dirty,i.get=function(){let e=i.flags;if(e&O.Dirty||e&O.Pending&&Zn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Qn(e)}}else e&O.Pending&&(i.flags=e&~O.Pending);return tr!==void 0&&Jn(i,tr,qn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Xn(e),Qn(e),ar())}},i}function sr(e){let t=()=>{let t=tr;tr=n,++qn,n.depsTail=void 0,n.flags=O.Watching|O.RecursedCheck;try{return e()}finally{tr=t,n.flags&=~O.RecursedCheck,ir(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:O.Watching|O.RecursedCheck,notify(){let e=this.flags;e&O.Dirty||e&O.Pending&&Zn(this.deps,this)?t():this.flags=O.Watching},stop(){this.flags=O.None,this.depsTail=void 0,ir(this)}};return t(),n}var cr=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})),lr=t(((e,t)=>{t.exports=cr()})),ur=t((e=>{var t=r(),n=lr();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}})),dr=t(((e,t)=>{t.exports=ur()}))();function fr(e,t){return e===t}function pr(e,t,n=fr){let r=(0,i.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,i.useCallback)(()=>e?.get(),[e]);return(0,dr.useSyncExternalStoreWithSelector)(r,a,a,t,n)}var mr={};function hr(e,t){let n=i.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=g(n.current,i):i}}function gr(e){let t=Vn(),n=i.useContext(e.from?Un:Hn),r=e.from??n,a=t.stores.getMatchStore(r),o=hr(e,t),s=pr(a,e=>e?o(e):mr);if(s!==mr)return s;(e.shouldThrow??!0)&&se()}function _r(e){return gr({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function vr(e){let{select:t,...n}=e;return gr({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function yr(e){return gr({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 br(e){return gr({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function xr(e){let t=Vn();return i.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Sr(e){return gr({...e,select:t=>e.select?e.select(t.context):t.context})}function Cr(e){let t=i.useRef(e);return x(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function wr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Tr(e,t,n){if(e?.external)return re(e.href,n)?void 0:e.href;if(!Ir(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),re(t,n)?void 0:t}catch{}}function Er(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!Pe(e.pathname,t.pathname,r))return!1}else{let n=Ne(e.pathname,r),i=Ne(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!x(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function Dr(e,t){let n=Vn(),r=c(t),{activeProps:a,inactiveProps:o,activeOptions:l,to:d,preload:f,preloadDelay:p,preloadIntentProximity:m,hashScrollIntoView:h,replace:g,startTransition:_,resetScroll:v,viewTransition:y,children:b,target:x,disabled:S,style:ee,className:C,onClick:te,onBlur:ne,onFocus:re,onMouseEnter:ie,onMouseLeave:ae,onTouchStart:oe,ignoreBlocker:se,params:ce,search:le,hash:w,state:T,mask:ue,reloadDocument:de,unsafeRelative:fe,from:pe,_fromLocation:me,...E}=e,he=Rn(),ge=Cr(e.search),_e=Cr(e.params),ve=Cr(l),ye=i.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,ge,_e,e.state,e.mask,e.unsafeRelative]),be=i.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...ye}),r=Fr(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,S),i=Tr(r,d,n.protocolAllowlist);return[r?.href,i,Er(e,t,ve,n.basepath,he,i!==void 0)]},[ve,S,he,ye,n,d]),[xe,Se,Ce]=pr(n.stores.location,be,wr),we=Ce?u(a,{})??kr:Or,Te=Ce?Or:u(o,{})??Or,Ee=[C,we.className,Te.className].filter(Boolean).join(` `),De=(ee||we.style||Te.style)&&{...ee,...we.style,...Te.style},Oe=i.useRef(!1),ke=e.reloadDocument||Se||S?!1:f??n.options.defaultPreload,Ae=p??n.options.defaultPreloadDelay??0,je=i.useCallback(()=>{n.preloadRoute(ye).catch(e=>{console.warn(e),console.warn(An)})},[n,ye]),Me=i.useCallback(e=>{if(!e){Nr(r);return}if(!(e.isIntersecting??ke===`intent`)){e.isIntersecting===!1&&Nr(r);return}if(!Ae){je();return}Mr.has(r)||Mr.set(r,setTimeout(()=>{Mr.delete(r),je()},Ae))},[je,r,ke,Ae]);s(r,Me,ke!==`viewport`),i.useEffect(()=>{Oe.current||ke===`render`&&(je(),Oe.current=!0)},[je,ke]);let Ne=e=>{let t=e.currentTarget.getAttribute(`target`),r=x===void 0?t:x;!S&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...ye,replace:g,resetScroll:v,hashScrollIntoView:h,startTransition:_,viewTransition:y,ignoreBlocker:se}))};if(Se)return{...E,ref:r,href:Se,...b&&{children:b},...x&&{target:x},...S&&{disabled:S},...ee&&{style:ee},...C&&{className:C},...te&&{onClick:te},...ne&&{onBlur:ne},...re&&{onFocus:re},...ie&&{onMouseEnter:ie},...ae&&{onMouseLeave:ae},...oe&&{onTouchStart:oe}};let Pe=()=>{ke===`intent`&&je()},Fe=()=>{ke===`intent`&&Nr(r)};return{...E,...we,...Te,href:xe,ref:r,onClick:Pr([te,Ne]),onBlur:Pr([ne,Fe]),onFocus:Pr([re,Me]),onMouseEnter:Pr([ie,Me]),onMouseLeave:Pr([ae,Fe]),onTouchStart:Pr([oe,Pe]),disabled:!!S,target:x,...De&&{style:De},...Ee&&{className:Ee},...S&&Ar,...Ce&&jr}}var Or={},kr={className:`active`},Ar={role:`link`,"aria-disabled":!0},jr={"data-status":`active`,"aria-current":`page`},Mr=new WeakMap,Nr=e=>{clearTimeout(Mr.get(e)),Mr.delete(e)},Pr=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Fr(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ir(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Lr=i.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:a,...o}=Dr(r,t),s=typeof r.children==`function`?r.children({isActive:o[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=o;return i.createElement(`a`,t,s)}return i.createElement(n,o,s)}),Rr=class extends jn{constructor(e){super(e),this.useMatch=e=>gr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Sr({...e,from:this.id}),this.useSearch=e=>br({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>yr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>vr({...e,from:this.id}),this.useLoaderData=e=>_r({...e,from:this.id}),this.useNavigate=()=>xr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,D.jsx)(Lr,{ref:t,from:this.fullPath,...e}))}};function zr(e){return new Rr(e)}var Br=class extends Mn{constructor(e){super(e),this.useMatch=e=>gr({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Sr({...e,from:this.id}),this.useSearch=e=>br({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>yr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>vr({...e,from:this.id}),this.useLoaderData=e=>_r({...e,from:this.id}),this.useNavigate=()=>xr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,D.jsx)(Lr,{ref:t,from:this.fullPath,...e}))}};function Vr(e){return new Br(e)}function Hr(e){return e=>{let t=zr(e);return t.isRoot=!1,t}}function Ur(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(S(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 Wr(e){let t=Vn(),n=`not-found-${pr(t.stores.location,e=>e.pathname)}-${pr(t.stores.status,e=>e)}`;return(0,D.jsx)(Fn,{getResetKey:()=>n,onCatch:(t,n)=>{if(Be(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Be(t))return e.fallback?.(t);throw t},children:e.children})}function Gr(){return(0,D.jsx)(`p`,{children:`Not Found`})}function Kr(e){return(0,D.jsx)(D.Fragment,{children:e.children})}function qr(e,t,n){return t.options.notFoundComponent?(0,D.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,D.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,D.jsx)(Gr,{})}function Jr(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,D.jsx)(n,{}):null}var Yr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Xr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Zr=i.memo(function({routeId:e}){let t=Vn();return(0,D.jsx)(Qr,{router:t,match:pr(t.stores.getMatchStore(e),e=>e)})});function Qr({router:e,match:t}){let n=e.routesById[t.routeId],r=Jr(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=Xr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||c))?i.Suspense:Kr,u=a?Fn:Kr,d=s?Wr:Kr;return(0,D.jsxs)(n.isRoot?n.options.shellComponent??Kr:Kr,{children:[(0,D.jsx)(Hn.Provider,{value:t.routeId,children:(0,D.jsx)(l,{fallback:r,children:(0,D.jsx)(u,{getResetKey:()=>t,errorComponent:a,onCatch:(e,n)=>{if(Be(e))throw e.routeId??=t.routeId,e;o?.(e,n)},children:(0,D.jsx)(d,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return i.createElement(s,e)},children:c?(0,D.jsx)(Ln,{fallback:r,children:(0,D.jsx)($r,{match:t})}):(0,D.jsx)($r,{match:t})})})})}),null]})}var $r=i.memo(function({match:e}){let t=Vn(),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,D.jsx)(e,{},a):(0,D.jsx)(ei,{})},[a,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Xr(t,r,e.ssr))return o;if(t._tx)throw t._tx[5];return Jr(t,r)}if(e.status===`notFound`)return qr(t,r,e.error);if(e.status===`error`)throw e.error;return o}),ei=i.memo(function(){let e=Vn(),t=i.useContext(Hn),n,r,a;{let i=e.stores.getMatchStore(t);[n,r]=pr(i,e=>[!!e._notFound,e.error],Yr),a=pr(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return qr(e,e.routesById[t],r);if(!a)return null;let o=(0,D.jsx)(Zr,{routeId:a});return t===`__root__`?(0,D.jsx)(i.Suspense,{fallback:Jr(e),children:o}):o});function ti(e,t){let n=e[1];e.length=0,n?.(t)}function ni({t:e}){let t=Vn(),n=t._rendered??=[];return t.startTransition=(r,a)=>new Promise(o=>{ti(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(je(r.publicHref)!==je(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`,...Dt(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ri(){let e=Vn(),t=e.routesById[lt],n=Jr(e,t),r=e.ssr?Kr:i.Suspense,a=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(ni,{t:i.useState()[1]}),(0,D.jsx)(r,{fallback:n,children:(0,D.jsx)(ii,{})})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:a}):a}function ii(){let e=Vn(),t=e._rendered,n=pr(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;o(()=>{t[0]===n&&ti(t,!0)},[t,n]);let a=i?(0,D.jsx)(Zr,{routeId:i}):null;return(0,D.jsx)(Hn.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,D.jsx)(Fn,{getResetKey:()=>r,onCatch:void 0,children:a})})}var ai=e=>({createMutableStore:or,createReadonlyStore:or,batch:rr}),oi=e=>new si(e),si=class extends At{constructor(e){super(e,ai)}};function ci({router:e,children:t,...n}){p(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,D.jsx)(Bn.Provider,{value:e,children:t});return e.options.Wrap?(0,D.jsx)(e.options.Wrap,{children:r}):r}function li({router:e,...t}){return(0,D.jsx)(ci,{router:e,...t,children:(0,D.jsx)(ri,{})})}var ui=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,ie());else{var t=n(l);t!==null&&se(x,t.startTime-e)}}}var S=!1,ee=-1,C=5,te=-1;function ne(){return g?!0:!(e.unstable_now()-te<C)}function re(){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&&ne());){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&&se(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ie():S=!1}}}var ie;if(typeof y==`function`)ie=function(){y(re)};else if(typeof MessageChannel<`u`){var ae=new MessageChannel,oe=ae.port2;ae.port1.onmessage=re,ie=function(){oe.postMessage(null)}}else ie=function(){_(re,0)};function se(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,se(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,ie()))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),di=t(((e,t)=>{t.exports=ui()})),fi=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`})),pi=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=fi()})),mi=t((e=>{var t=di(),n=r(),i=pi();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`),ne=Symbol.for(`react.lazy`),re=Symbol.for(`react.activity`),ie=Symbol.for(`react.memo_cache_sentinel`),ae=Symbol.iterator;function oe(e){return typeof e!=`object`||!e?null:(e=ae&&e[ae]||e[`@@iterator`],typeof e==`function`?e:null)}var se=Symbol.for(`react.client.reference`);function ce(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===se?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 re: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?ce(e.type)||`Memo`:t;case ne:t=e._payload,e=e._init;try{return ce(e(t))}catch{}}return null}var le=Array.isArray,w=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},de=[],fe=-1;function pe(e){return{current:e}}function me(e){0>fe||(e.current=de[fe],de[fe]=null,fe--)}function E(e,t){fe++,de[fe]=e.current,e.current=t}var he=pe(null),ge=pe(null),_e=pe(null),ve=pe(null);function ye(e,t){switch(E(_e,t),E(ge,e),E(he,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}}me(he),E(he,e)}function be(){me(he),me(ge),me(_e)}function xe(e){e.memoizedState!==null&&E(ve,e);var t=he.current,n=Ud(t,e.type);t!==n&&(E(ge,e),E(he,n))}function Se(e){ge.current===e&&(me(he),me(ge)),ve.current===e&&(me(ve),$f._currentValue=ue)}var Ce,we;function Te(e){if(Ce===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);Ce=t&&t[1]||``,we=-1<e.stack.indexOf(`
3
3
  at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
4
  `+Ce+e+we}var Ee=!1;function De(e,t){if(!e||Ee)return``;Ee=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
@@ -19,4 +19,4 @@ Error generating stack: `+e.message+`
19
19
  `)},Jl=e=>K(e).map(Yl).join(`
20
20
  `),Yl=e=>e.cause?`${e.stack} {\n${Xl(e.cause,` `)}\n}`:e.stack,Xl=(e,t)=>{let n=e.stack.split(`
21
21
  `),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${Xl(e.cause,`${t} `)}\n${t}}`),r},Zl=`~effect/Fiber`,Ql={_A:bi,_E:bi},$l={id:0},eu=()=>globalThis[Ma],tu=class{constructor(e,t=!0){this[Zl]=Ql,this.setContext(e),this.id=++$l.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._running=!1,this._deferredInterrupt=!1,this.runtimeMetrics?.recordFiberStart(this.context)}[Zl];id;interruptible;currentOpCount;_stack;_observers;_exit;_children;_interruptedCause;_yielded;_running;_deferredInterrupt;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(e){return kc(this.context,e)}addObserver(e){return this._exit?(e(this._exit),Ei):(this._observers.push(e),()=>{if(this._exit)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)})}interruptUnsafe(e,t){if(this._exit)return;let n=Fl(e);this.currentStackFrame&&(n=_o(n,Tc(To,this.currentStackFrame))),t&&(n=_o(n,t)),this._interruptedCause=this._interruptedCause?Vl(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(fu(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===to)return;let n=ru.interruptChildren&&ru.interruptChildren(this);if(n!==void 0)return this.evaluate(Hu(n,()=>t));this._exit=t,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let e=0;e<this._observers.length;e++)this._observers[e](t);this._observers.length=0,this._stack.length=0,this._children=void 0,this.context=Cc()}runLoop(e){let t=globalThis[Ma];globalThis[Ma]=this;let n=this._running;this._running=!0;let r=!1,i=e;this.currentOpCount=0;try{for(;;){if(this._deferredInterrupt&&(this._deferredInterrupt=!1,i=fu(this._interruptedCause)),this.currentOpCount++,!r&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){r=!0;let e=i;i=Hu(hu,()=>e)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[Za](this),i===to){let e=this._yielded;if(Ja in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return to}}}catch(e){return j(i,Za)?this.runLoop(ko(e)):ko(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{this._running=n,globalThis[Ma]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,nu;for(;;){let t=this._stack.pop();if(!t)return;let n=t[eo]&&t[eo](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,to}children(){return this._children??=new Set}pipe(){return _i(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&bc(t,e))return;let n=this.getRef(pl);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=Oc(e,Cl),this.currentLogLevel=this.getRef(Ol),this.minimumLogLevel=this.getRef(kl),this.currentStackFrame=this.getRef(El),this.maxOpsBeforeYield=this.getRef(yl),this.currentPreventYield=this.getRef(bl),this.runtimeMetrics=Oc(e,Tl);let r=Oc(e,wl);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},nu={[Qa](e,t){return fu(t._interruptedCause)},[$a](e,t){return fu(t._interruptedCause)}},ru={interruptChildren:void 0},iu=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(Eo.key,e.currentStackFrame),vc(t)},au=e=>{if(e._children!==void 0&&e._children.size!==0)return du(e._children)},ou=e=>{let t=e;return t._exit?J(t._exit):Du(n=>t._exit?n(J(t._exit)):mu(e.addObserver(e=>n(J(e)))))},su=e=>Du(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(J(r))}return a(),mu(()=>i?.())}),cu=e=>{let t=e;return t._exit?t._exit:Du(n=>t._exit?n(t._exit):mu(e.addObserver(n)))},lu=e=>Ao(t=>uu(e,t.id)),uu=k(e=>j(e[0],Zl),(e,t,n)=>Ao(r=>{let i=iu(r);return i=i&&n?Nc(i,n):i??n,e.interruptUnsafe(t,i),zu(ou(e))})),du=e=>Ao(t=>{let n=iu(t),r=Is();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return zu(su(r))}),J=z,fu=Do,pu=Oo,mu=Co({op:`Sync`,[Za](e){let t=this[F](),n=e.getCont(Qa);return n?n[Qa](t,e):e.yieldWith(z(t))}}),Y=Co({op:`Suspend`,[Za](e){return this[F]()}}),hu=Co({op:`Yield`,[Za](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(Zu)},this[F]??0),e.yieldWith(()=>{t=!0})}})(0),gu=J(ls()),_u=e=>Y(()=>fu(Ka(e))),vu=e=>ko(e),yu=e=>Y(()=>pu(Ka(e))),bu=J(void 0),xu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new Af(e,`An error occurred in Effect.try`):e.catch;return Y(()=>{try{return J(Ka(t))}catch(e){return pu(Ka(()=>n(e)))}})},Su=e=>Tu(function(t,n){Ka(()=>e(n)).then(e=>t(J(e)),e=>t(vu(e)))},e.length!==0),Cu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new Af(e,`An error occurred in Effect.tryPromise`):e.catch;return Tu(function(e,r){let i=t=>{try{e(pu(Ka(()=>n(t))))}catch(t){e(vu(t))}};try{Ka(()=>t(r)).then(t=>e(J(t)),i)}catch(e){i(e)}},t.length!==0)},wu=e=>Ao(t=>e(t.id)),Tu=Co({op:`Async`,single:!1,[Za](e){let t=Ka(()=>this[F][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[F][1]?new AbortController:void 0,a=t(t=>{n||(n=!0,r?e.evaluate(t):r=t)},i?.signal);return r===!1?(r=!0,e._yielded=()=>{n=!0},i===void 0&&a===void 0||e._stack.push(Eu(()=>(n=!0,i?.abort(),a??Zu))),to):r}}),Eu=Co({op:`AsyncFinalizer`,[eo](e){e.interruptible&&(e.interruptible=!1,e._stack.push(qd))},[$a](e,t){return zl(e)?Hu(this[F](),()=>fu(e)):fu(e)}}),Du=e=>Tu(e,e.length>=2),Ou=Du(Ei),ku=(...e)=>Y(()=>Pu(e.length===1?e[0]():e[1].call(e[0].self))),Au=(e,...t)=>{let n=t.length===0?function(){return Y(()=>Pu(e.apply(this,arguments)))}:function(){let n=Y(()=>Pu(e.apply(this,arguments)));for(let e=0;e<t.length;e++)n=t[e](n,...arguments);return n};return ju(e.length,n)},ju=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),Mu=(e,...t)=>ju(e.length,t.length===0?function(){return Nu(()=>e.apply(this,arguments))}:function(){let n=Nu(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),Nu=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return J(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 Y(()=>n?(n=!1,Hu(r.value,e=>Pu(t,e))):Y(()=>Pu(e())))}}}catch(e){return vu(e)}},Pu=Co({op:`Iterator`,single:!1,[Qa](e,t){let n=this[F][0];for(;;){let r=n.next(e);if(r.done)return J(r.value);if(!Wu(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[Za](e){return this[Qa](this[F][1],e)}}),Fu=k(2,(e,t)=>{let n=J(t);return Hu(e,e=>n)}),Iu=e=>Ku(e,us),Lu=k(2,(e,t)=>Hu(e,e=>io(t)?t:Ka(()=>t(e)))),Ru=k(2,(e,t)=>Hu(e,e=>Fu(io(t)?t:Ka(()=>t(e)),e))),zu=e=>Hu(e,e=>Zu),Bu=(e,t)=>Ao(n=>Du(r=>{let i=!1,a=new Set,o=e=>{i=!0,r(a.size===0?e:Hu(Gd(du(a)),()=>e))},s=0;for(let r of e){if(i)break;let e=s++,c=nf(n,r,!0,!0,!1);a.add(c),c.addObserver(r=>{a.delete(c);let s=!i;o(r),s&&t?.onWinner&&t.onWinner({fiber:c,index:e,parentFiber:n})})}return du(a)})),Vu=k(e=>io(e[1]),(e,t,n)=>Bu([e,t],n)),Hu=k(2,(e,t)=>{let n=Object.create(Uu);return n[F]=e,n[Qa]=t.length===1?t:e=>t(e),n}),Uu=So({op:`OnSuccess`,[Za](e){return e._stack.push(this),this[F]}}),Wu=e=>Ja in e,Gu=k(2,(e,t)=>Wu(e)?e._tag===`Success`?t(e.value):e:Hu(e,t)),X=e=>Hu(e,bi),Ku=k(2,(e,t)=>Hu(e,e=>J(Ka(()=>t(e))))),qu=k(2,(e,t)=>Wu(e)?Qu(e,t):Ku(e,t)),Ju=e=>Do(Fl(e)),Yu=e=>e._tag===`Success`,Xu=e=>e._tag===`Failure`?bs(e.cause):xs(e),Zu=z(void 0),Qu=k(2,(e,t)=>e._tag===`Success`?z(t(e.value)):e),$u=k(2,(e,t)=>Yu(e)?t:e),ed=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?Zu:Do(I(t))},td=k(2,(e,t)=>Ao(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),zd(e,()=>{n.setContext(r)}))})),nd=()=>rd,rd=Ao(e=>J(e.context)),id=e=>Ao(t=>e(t.context)),ad=k(2,(e,t)=>Wu(e)?e:td(e,Nc(t))),od=function(){return arguments.length===1?k(2,(e,t)=>sd(e,arguments[0],t)):k(3,(e,t,n)=>sd(e,t,n)).apply(this,arguments)},sd=(e,t,n)=>td(e,Ec(t,n)),cd=k(e=>io(e[0]),(e,t)=>Qd({while:Si,body:xi(t?.disableYield?e:Hu(e,e=>hu)),step:Ei})),ld=k(2,(e,t)=>{let n=Object.create(ud);return n[F]=e,n[$a]=t.length===1?t:e=>t(e),n}),ud=So({op:`OnFailure`,[Za](e){return e._stack.push(this),this[F]}}),dd=k(3,(e,t,n)=>ld(e,e=>{let r=t(e);return Cs(r)?fu(r.failure):Ka(()=>n(r.success,e))})),fd=k(2,(e,t)=>dd(e,Ll,e=>t(e))),pd=k(2,(e,t)=>dd(e,Rl,t)),md=k(e=>io(e[0]),(e,t,n,r)=>ld(e,e=>{let i=Ll(e);return Cs(i)?fu(i.failure):t(i.success)?Ka(()=>n(i.success)):r?Ka(()=>r(i.success)):fu(e)})),hd=k(2,(e,t)=>fd(e,e=>yu(()=>t(e)))),gd=k(e=>io(e[0]),(e,t)=>{if(!t?.log)return yd(e,{onFailure:e=>bu,onSuccess:e=>bu});let n=zf(t.log===!0?void 0:t.log);return _d(e,{onFailure(e){let r=Il(e);return Cs(r)?fu(r.failure):t.message===void 0?n(e):n(t.message,e)},onSuccess:e=>bu})}),_d=k(2,(e,t)=>{let n=Object.create(vd);return n[F]=e,n[Qa]=t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),n[$a]=t.onFailure.length===1?t.onFailure:e=>t.onFailure(e),n}),vd=So({op:`OnSuccessAndFailure`,[Za](e){return e._stack.push(this),this[F]}}),yd=k(2,(e,t)=>_d(e,{onFailure:e=>{let n=e.reasons.find(vo);return n?Ka(()=>t.onFailure(n.error)):fu(e)},onSuccess:t.onSuccess})),bd=k(2,(e,t)=>yd(e,{onFailure:e=>mu(()=>t.onFailure(e)),onSuccess:e=>mu(()=>t.onSuccess(e))})),Z=e=>Wu(e)?z(e):xd(e),xd=Co({op:`Exit`,[Za](e){return e._stack.push(this),this[F]},[Qa](e,t,n){return J(n??z(e))},[$a](e,t,n){return J(n??Do(e))}}),Sd=`~effect/Scope`,Cd=`~effect/Scope/Closeable`,wd=ac(`effect/Scope`),Td=(e,t)=>Y(()=>Ed(e,t)??bu),Ed=(e,t)=>{if(e.state._tag===`Closed`)return;let n={_tag:`Closed`,exit:t};if(e.state._tag===`Empty`){e.state=n;return}let r=e.state;if(e.state=n,r.finalizer!==void 0)return r.finalizer(t);let i=r.finalizers;if(i!==void 0&&i.size!==0)return i.size===1?i.values().next().value(t):Od(e,i,t)},Dd=(e,t)=>Yu(e)?t:ld(t,t=>fu(Vl(e.cause,t))),Od=Au(function*(e,t,n){let r=[],i=[],a=Array.from(t.values()),o=eu();for(let t=a.length-1;t>=0;t--){let s=a[t];e.strategy===`sequential`?r.push(yield*Z(s(n))):i.push(nf(o,s(n),!0,!0,`inherit`))}return i.length>0&&(r=yield*su(i)),yield*ed(r)}),kd=(e,t)=>{let n=Pd(t);if(e.state._tag===`Closed`)return n.state=e.state,n;let r={};return Md(e,r,e=>Td(n,e)),Md(n,r,t=>mu(()=>Nd(e,r))),n},Ad=(e,t)=>Y(()=>e.state._tag===`Closed`?t(e.state.exit):(Md(e,{},t),bu)),jd=(e,t)=>Ad(e,xi(t)),Md=(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===void 0?(r.finalizerKey=t,r.finalizer=n):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))}},Nd=(e,t)=>{if(e.state._tag===`Open`){let n=e.state;n.finalizerKey===t?(n.finalizerKey=void 0,n.finalizer=void 0):n.finalizers!==void 0&&n.finalizers.delete(t)}},Q=e=>e.state._tag===`Open`?e.state.finalizer===void 0?e.state.finalizers?.size??0:1:0,Pd=(e=`sequential`)=>({[Cd]:Cd,[Sd]:Sd,strategy:e,state:Fd}),Fd={_tag:`Empty`},Id=wd,Ld=od(wd),Rd=e=>Hu(Id,t=>id(n=>Ad(t,t=>ad(e(t),n)))),zd=Co({op:`OnExit`,single:!1,[Za](e){return e._stack.push(this),this[F][0]},[eo](e){e.interruptible&&this[F][2]!==!0&&(e._stack.push(qd),e.interruptible=!1)},[Qa](e,t,n){n??=z(e);let r=this[F][1](n);return r?Hu(r,e=>n):n},[$a](e,t,n){n??=Do(e);let r=this[F][1](n);return r?Hu(Dd(n,r),e=>n):n}}),Bd=k(2,zd),Vd=k(2,(e,t)=>Bd(e,e=>t)),Hd=k(3,(e,t,n)=>Bd(e,e=>{let r=t(e);return Cs(r)?bu:n(r.success,e)})),Ud=k(2,(e,t)=>Hd(e,Xu,t)),Wd=(e,t,n)=>Zd(r=>Hu(e,e=>zd(r(t(e)),t=>n(e,t),!0))),Gd=e=>Ao(t=>t.interruptible?(t.interruptible=!1,t._stack.push(qd),e):e),Kd=Co({op:`SetInterruptible`,[eo](e){if(e.interruptible=this[F],e._interruptedCause&&e.interruptible)return()=>fu(e._interruptedCause)}}),qd=Kd(!0),Jd=Kd(!1),Yd=e=>{if(e.interruptible=!0,e._stack.push(Jd),e._interruptedCause)return fu(e._interruptedCause)},Xd=e=>Ao(t=>t.interruptible?e:Yd(t)??e),Zd=e=>Ao(t=>t.interruptible?(t.interruptible=!1,t._stack.push(qd),e(Xd)):e(bi)),Qd=Co({op:`While`,[Qa](e,t){return this[F].step(e),this[F].while()?(t._stack.push(this),this[F].body()):Zu},[Za](e){return this[F].while()?(e._stack.push(this),this[F].body()):Zu}}),$d=e=>{let t=e.onItem,n=e.step,r=(e,i,a,o)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!Wu(c))return Hu(Z(c),t=>n(e,s,t,a)??r(e,i,a+1,o)??bu);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return(e,i,a)=>{let o=0,s=a?.end??i.length,c=a?.concurrency??1;if(c===1)return r(e,i,0,s);let l=a?.orderedStep===!0,u=!1,d,f,p,m=!1,h,g,_=o,v=l?Array(s):void 0,y=e=>{let t=ko(e);return h=t,u=!0,m=!0,f&&f.size>0?Hu(Gd(du(Array.from(f))),()=>t):t},b=(t,r,a)=>{if(!l)return n(e,t,r,a);if(h)return h;for(v[a]=r;_<s;){let t=v[_];if(t===void 0)return;v[_]=void 0;let r=_++,a=n(e,i[r],t,r);if(a)return a}},x=()=>{let n=!1;for(;!h&&o<s;o++){let r=i[o],a=g??t(e,r,o);if(Wu(a)){if(h=b(r,a,o),h)break}else if(d){g=void 0;let e=nf(d,a,!0,!0,`inherit`);if(e._exit){if(h=b(r,e._exit,o),h)break;continue}f.add(e);let t=o;if(e.addObserver(i=>{f.delete(e);try{if(h){if(!m&&i._tag===`Failure`)for(let e of i.cause.reasons)if(e._tag===`Interrupt`)continue;else h._tag===`Failure`?h.cause.reasons.push(e):h=Do(I([e]))}else{let e=b(r,i,t);e&&(h=e._tag===`Failure`?Do(I(e.cause.reasons.slice())):e,x())}if(n){let e=x();e&&p(e)}else u&&f.size===0&&p(h??bu)}catch(e){p(y(e))}}),f.size<c)continue;n=!0,o++;return}else return Du(e=>{d=eu(),f=new Set,g=a,p=e;let t;try{t=x()}catch(t){return e(y(t))}return t?e(t):Y(()=>(h=Zu,m=!0,f?du(f):bu))})}if(u=!0,h){if(f&&f.size>0){let e=iu(d);f.forEach(t=>t.interruptUnsafe(d.id,e));return}if(p||h._tag===`Failure`)return h}else if(p){if(f)f.size===0&&p(bu);else return Zu}};return x()}},ef=()=>$d,tf=k(e=>io(e[0]),(e,t)=>Ao(n=>(Wf(),J(nf(n,e,t?.startImmediately,!1,t?.uninterruptible??!1))))),nf=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new tu(a.context,o);return n?s.evaluate(t):a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0),!r&&!s._exit&&(a.children().add(s),s.addObserver(()=>a._children.delete(s))),s},rf=k(e=>io(e[0]),(e,t,n)=>Ao(r=>{let i=nf(r,e,n?.startImmediately,!0,n?.uninterruptible);if(!i._exit){if(t.state._tag!==`Closed`){let e={};Md(t,e,()=>wu(e=>e===i.id?bu:lu(i))),i.addObserver(()=>Nd(t,e))}else i.interruptUnsafe(r.id,iu(r))}return J(i)})),af=e=>(t,n)=>{let r=new tu(n?.scheduler?Ec(e,pl,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},of=k(2,(e,t)=>{if(e._exit)return e;if(t.state._tag===`Closed`)return e.interruptUnsafe(e.id),e;let n={};return Md(t,n,()=>lu(e)),e.addObserver(()=>Nd(t,n)),e}),sf=af(Cc()),cf=e=>{let t=af(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},lf=e=>{let t=cf(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw G(e.cause);return e.value})},uf=lf(Cc()),df=(e=>{let t=af(e);return e=>{if(Wu(e))return e;let n=new _l(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??ko(new Of(r))}})(Cc()),ff=J(!0),pf=J(!1),mf=class{waiters=[];scheduled=void 0;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){if(this.waiters.length===0)return ff;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=[],ff}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](Zu)};flushWaiters(){let e=this.waiters;this.waiters=[],this.flushScheduled();for(let t=0;t<e.length;t++)e[t](Zu)}open=Ao(e=>this._isOpen?pf:(this._isOpen=!0,this.scheduleUnsafe(e)));release=Ao(e=>this._isOpen?pf:this.scheduleUnsafe(e));openUnsafe(){return!this._isOpen&&(this._isOpen=!0,this.flushWaiters(),!0)}await=Du(e=>this._isOpen?e(bu):(this.waiters.push(e),mu(()=>{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=mu(()=>this.closeUnsafe());whenOpen=e=>Hu(this.await,()=>e);isOpen(){return this._isOpen}},hf=e=>new mf(e??!1),gf=e=>mu(()=>hf(e)),_f=Pc(`effect/Clock`,{defaultValue:()=>new yf}),vf=2**31-1,yf=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=mu(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return Sf()}currentTimeNanos=mu(()=>this.currentTimeNanosUnsafe());monotonicTimeNanosUnsafe(){return xf()}monotonicTimeNanos=mu(()=>this.monotonicTimeNanosUnsafe());sleep(e){return this.sleepMillis(cl(e))}sleepMillis(e){return e<=0?hu:Number.isFinite(e)?Du(t=>{let n=e>vf?this.sleepMillis(e-vf):bu,r=setTimeout(()=>t(n),Math.min(e,vf));return mu(()=>clearTimeout(r))}):Ou}},bf=BigInt(1e6),xf=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())*bf;return e>t&&(t=e),t}}(),Sf=function(){let e=BigInt(1e9),t;return()=>{let n=xf(),r=BigInt(Date.now())*bf;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}}(),Cf=e=>Ao(t=>e(t.getRef(_f))),wf=e=>Cf(t=>t.sleep(Wc(e))),Tf=`~effect/Cause/IllegalArgumentError`,Ef=class extends No(`IllegalArgumentError`){[Tf]=Tf;constructor(e){super({message:e})}},Df=`~effect/Cause/AsyncFiberError`,Of=class extends No(`AsyncFiberError`){[Df]=Df;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},kf=`~effect/Cause/UnknownError`,Af=class extends No(`UnknownError`){[kf]=kf;constructor(e,t){super({message:t,cause:e})}},jf=Pc(`effect/Console/CurrentConsole`,{defaultValue:()=>globalThis.console}),Mf=cs(ss(os,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}})),Nf=Pc(`effect/Loggers/CurrentLoggers`,{defaultValue:()=>new Set([Hf,Uf])}),Pf=Pc(`effect/Logger/LogToStderr`,{defaultValue:Ci}),Ff={"~effect/Logger":{_Message:bi,_Output:bi},pipe(){return _i(this,arguments)}},If=e=>{let t=Object.create(Ff);return t.log=e,t},Lf=e=>e.replace(/[\s="]/g,`_`),Rf=(e,t)=>`${Lf(e[0])}=${t-e[1]}ms`,zf=e=>(...t)=>{let n;for(let e=0,r=t.length;e<r;e++){let r=t[e];co(r)&&(n?t.splice(e,1):t=t.slice(0,e).concat(t.slice(e+1)),n=n?I(n.reasons.concat(r.reasons)):r,e--)}return n===void 0&&(n=ho),Ao(r=>{let i=e??r.currentLogLevel;if(Mf(r.minimumLogLevel,i))return bu;let a=r.getRef(_f),o=r.getRef(Nf);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 bu})},Bf={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};Bf.gray,Bf.blue,Bf.green,Bf.yellow,Bf.red,Bf.bgBrightRed,Bf.black;var Vf=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`)}`,Hf=If(({cause:e,date:t,fiber:n,logLevel:r,message:i})=>{let a=Array.isArray(i)?i.slice():[i];e.reasons.length>0&&a.push(Jl(e));let o=t.getTime(),s=n.getRef(Al),c=``;for(let e of s)c+=` ${Rf(e,o)}`;let l=n.getRef(Dl);Object.keys(l).length>0&&a.push(l);let u=n.getRef(jf);(n.getRef(Pf)?u.error:u.log)(`[${Vf(t)}] ${r.toUpperCase()} (#${n.id})${c}:`,...a)}),Uf=If(({cause:e,fiber:t,logLevel:n,message:r})=>{let i=t.getRef(_f),a=t.getRef(Dl),o=t.currentSpan;if(o===void 0||o._tag===`ExternalSpan`)return;let s={};for(let[e,t]of Object.entries(a))Ea(s,e,t);s[`effect.fiberId`]=t.id,s[`effect.logLevel`]=n.toUpperCase(),e.reasons.length>0&&(s[`effect.cause`]=Jl(e)),o.event(Wa(Array.isArray(r)&&r.length===1?r[0]:r),i.currentTimeNanosUnsafe(),s)});function Wf(){ru.interruptChildren??=au}var Gf=vo,Kf=I,qf=Bl,Jf=U,Yf=G,Xf=Jl,Zf=Po,Qf=Ro,$f=Ef,ep=z,tp=Do,np=Oo,rp=ko,ip=Zu,ap=Yu,op=`~effect/time/DateTime`,sp=`~effect/time/DateTime/TimeZone`,cp={[op]:op,pipe(){return _i(this,arguments)},[Ha](){return this.toString()},toJSON(){return Ip(this).toJSON()}},lp={...cp,_tag:`Utc`,[M](){return qi(this.epochMilliseconds)},[ia](e){return hp(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${Ip(this).toJSON()})`}},up={...cp,_tag:`Zoned`,[M](){return Wi(qi(this.epochMilliseconds))(N(this.zone))},[ia](e){return hp(e)&&e._tag===`Zoned`&&this.epochMilliseconds===e.epochMilliseconds&&aa(this.zone,e.zone)},toString(){return`DateTime.Zoned(${Xp(this)})`}},dp={[sp]:sp,[Ha](){return this.toString()}},fp={...dp,_tag:`Named`,[M](){return P(`Named:${this.id}`)},[ia](e){return _p(e)&&e._tag===`Named`&&this.id===e.id},toString(){return`TimeZone.Named(${this.id})`},toJSON(){return{_id:`TimeZone`,_tag:`Named`,id:this.id}}},pp={...dp,_tag:`Offset`,[M](){return P(`Offset:${this.offset}`)},[ia](e){return _p(e)&&e._tag===`Offset`&&this.offset===e.offset},toString(){return`TimeZone.Offset(${zp(this.offset)})`},toJSON(){return{_id:`TimeZone`,_tag:`Offset`,offset:this.offset}}},mp=(e,t,n)=>{let r=Object.create(up);return r.epochMilliseconds=e,r.zone=t,Object.defineProperty(r,"partsUtc",{value:n,enumerable:!1,writable:!0}),Object.defineProperty(r,"adjustedEpochMillis",{value:void 0,enumerable:!1,writable:!0}),Object.defineProperty(r,"partsAdjusted",{value:void 0,enumerable:!1,writable:!0}),r},hp=e=>j(e,op),gp=e=>hp(e[0]),_p=e=>j(e,sp),vp=e=>_p(e)&&e._tag===`Named`,yp=e=>e._tag===`Zoned`,bp=e=>{let t=Object.create(lp);return t.epochMilliseconds=e,Object.defineProperty(t,"partsUtc",{value:void 0,enumerable:!1,writable:!0}),t},xp=e=>{let t=e.getTime();if(Number.isNaN(t))throw new $f(`Invalid date`);return bp(t)},Sp=e=>{if(hp(e))return e;if(e instanceof Date)return xp(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return xp(new Date(e.epochMilliseconds));let t=new Date(0);return Hp(t,e),xp(t)}return typeof e==`string`&&!Cp(e)?xp(new Date(e+`Z`)):xp(new Date(e))},Cp=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e),wp=-864e13+432e5,Tp=864e13-504e5,Ep=(e,t)=>{let n=t?.timeZone;if(n===void 0&&hp(e)&&yp(e))return e;let r=Sp(e);if(r.epochMilliseconds<wp||r.epochMilliseconds>Tp)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=Mp(new Date(r.epochMilliseconds).getTimezoneOffset()*-60*1e3);else if(_p(n))i=n;else if(typeof n==`number`)i=Mp(n);else{let e=Fp(n);if(ds(e))throw new $f(`Invalid time zone: ${n}`);i=e.value}return t?.adjustForTimeZone===!0?Wp(r.epochMilliseconds,i,t?.disambiguation??`compatible`):mp(r.epochMilliseconds,i,r.partsUtc)},Dp=()=>bp(Date.now()),Op=new Map,kp={day:`numeric`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`longOffset`,fractionalSecondDigits:3,hourCycle:`h23`},Ap=e=>{let t=e.resolvedOptions().timeZone;if(Op.has(t))return Op.get(t);let n=Object.create(fp);return n.id=t,n.format=e,Op.set(t,n),n},jp=e=>{if(Op.has(e))return Op.get(e);try{return Ap(new Intl.DateTimeFormat(`en-US`,{...kp,timeZone:e}))}catch{throw new $f(`Invalid time zone: ${e}`)}},Mp=e=>{let t=Object.create(pp);return t.offset=e,t},Np=_s(jp),Pp=/^(?:GMT|[+-])/,Fp=e=>{if(Pp.test(e)){let t=Kp(e);return t===null?ls():us(Mp(t))}return Np(e)},Ip=e=>new Date(e.epochMilliseconds),Lp=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=e.zone.format.formatToParts(e.epochMilliseconds).filter(e=>e.type!==`literal`),n=new Date(0);return n.setUTCFullYear(Number(t[2].value),Number(t[0].value)-1,Number(t[1].value)),n.setUTCHours(Number(t[3].value),Number(t[4].value),Number(t[5].value),Number(t[6].value)),e.adjustedEpochMilliseconds=n.getTime(),n},Rp=e=>Lp(e).getTime()-Vp(e),zp=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`)}`},Bp=e=>zp(Rp(e)),Vp=e=>e.epochMilliseconds,Hp=(e,t)=>{if(t.year!==void 0&&e.setUTCFullYear(t.year),t.month!==void 0&&e.setUTCMonth(t.month-1),t.day!==void 0&&e.setUTCDate(t.day),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)},Up=864e5,Wp=(e,t,n)=>{if(t._tag===`Offset`)return mp(e-t.offset,t);let r=qp(e-Up,e,t),i=qp(e+Up,e,t);if(r===i)return mp(e-r,t);let a=r<i,o=r-i;if(a){if(qp(e-i,e,t)===i)return mp(e-i,t);let a=mp(e-r,t);if(e!==Lp(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 mp(e-i,t);case`compatible`:case`later`:return a}return a}if(qp(e-r,e,t)===r){if(n===`earlier`||n===`compatible`||qp(e-r+o,e+o,t)===r)return mp(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 mp(e-i,t)},Gp=/([+-])(\d{2}):(\d{2})$/,Kp=e=>{let t=Gp.exec(e);if(t===null)return null;let[,n,r,i]=t;return(n===`+`?1:-1)*(Number(r)*60+Number(i))*60*1e3},qp=(e,t,n)=>{let r=n.format.formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``;if(r===`GMT`)return 0;let i=Kp(r);return i===null?Rp(mp(t,n)):i},Jp=k(gp,(e,t,n)=>{if(e._tag===`Utc`){let n=Ip(e);return t(n),bp(n.getTime())}let r=Lp(e),i=new Date(r.getTime());return t(i),Wp(i.getTime(),e.zone,n?.disambiguation??`compatible`)}),Yp=e=>{let t=Lp(e);return e._tag===`Utc`?t.toISOString():`${t.toISOString().slice(0,-1)}${Bp(e)}`},Xp=e=>e.zone._tag===`Offset`?Yp(e):`${Yp(e)}[${e.zone.id}]`,Zp=io,Qp=Su,$p=Cu,em=J,tm=gu,nm=Y,rm=mu,im=bu,am=Du,om=Ou,sm=ku,cm=pu,lm=fu,um=_u,dm=vu,fm=xu,pm=hu,mm=Hu,hm=X,gm=Lu,_m=Ru,vm=Z,ym=Ku,bm=Fu,xm=fd,Sm=ld,Cm=pd,wm=md,Tm=hd,Em=gd,Dm=wf,Om=Vu,km=bd,Am=_d,jm=nd,Mm=Wd,Nm=Rd,Pm=Vd,Fm=Ud,Im=cd,Lm=tf,Rm=rf,zm=sf,Bm=af,Vm=uf,Hm=lf,Um=df,Wm=Au,Gm=zf(`Error`),Km=qu,qm=Gu,Jm=Mu;function Ym(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}var Xm=`~structural`,Zm=`~sentinels`,Qm=`~constructor`,$m=Oi(e=>{let t=Ym(e)?.identifier;return typeof t==`string`?t:e.getExpected($m)}),$=Symbol(),eh=ep,th=eh($),nh=eh($),rh=e=>e===$?ls():us(e),ih=e=>e._tag===`None`?th:eh(e.value),ah=`~effect/SchemaIssue/Issue`;function oh(e){return j(e,ah)&&e[ah]===ah}function sh(e){return Object.hasOwn(e,`input`)}var ch=class{[ah]=ah;constructor(e,t){t?.reportInput===!0&&e!==$&&(this.input=e)}},lh=class extends ch{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},uh=class extends ch{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},dh=class extends ch{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},fh=class extends ch{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},ph=class extends ch{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},mh=class extends ch{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},hh=class extends ch{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},gh=class extends ch{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},_h=class extends ch{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},vh=class extends ch{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function yh(e,t,n){if(oh(e))return e;if(typeof e==`string`)return new gh({message:e},t,n);let r=typeof e.issue==`string`?new gh({message:e.issue},t,n):e.issue;return new dh(e.path,r)}function bh(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new gh(void 0,t,n):yh(e,t,n)}function xh(e,t,n,r){return Array.isArray(t)?Ms(t)?t.length===1?yh(t[0],n,r):new mh(e,Rs(t,e=>yh(e,n,r)),n,r):void 0:bh(t,n,r)}var Sh=e=>{let t=Nh(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Dh($m(e.ast),e);case`InvalidValue`:{let t=Eh(e);if(t!==void 0)return Dh(t,e);let n=Th(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Th(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Th(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Ch=e=>Nh(e.issue)??Nh(e);function wh(e){return t=>({issues:Oh(t,[],e?.leafHook??Sh,e?.checkHook??Ch)})}function Th(e){return sh(e)?Fa(e.input):void 0}function Eh(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function Dh(e,t){let n=Th(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function Oh(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];if(e.issue._tag!==`InvalidValue`)return Oh(e.issue,t,n,r);let a=Eh(e.issue);return[{path:t,message:a===void 0?Dh(kh(e.filter),e):Dh(a,e.issue)}]}case`Encoding`:return Oh(e.issue,t,n,r);case`Pointer`:return Oh(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>Oh(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:Nh(e)??Dh($m(e.ast),e)}]:e.issues.flatMap(e=>Oh(e,t,n,r));default:return[{path:t,message:n(e)}]}}function kh(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=>kh(e)).join(` & `)}}function Ah(){return e=>Mh(e,``)}var jh=Ah();function Mh(e,t){let n;switch(e._tag){case`Filter`:{let r=Ch(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return Mh(e.issue,t);let r=Eh(e.issue);n=r===void 0?Dh(kh(e.filter),e):Dh(r,e.issue)}break}case`Encoding`:return Mh(e.issue,t);case`Pointer`:return Mh(e.issue,t+Ra(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Mh(e,t)).join(`
22
- `);n=Nh(e)??Dh($m(e.ast),e);break;default:n=Sh(e)}return t?`${n}\n at ${t}`:n}function Nh(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Nh(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 Ph(e){let t;for(let n of e.reasons){if(!Gf(n)||!oh(n.error))return;t??=n.error}return t}function Fh(e,t){let n=Ph(e);if(n===void 0)throw Error(t,{cause:e});return n}var Ih=Dp,Lh=Vp,Rh=class e extends yi{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(Km(vs(t))))}compose(t){return Bh(this)?t:Bh(t)?this:new e((e,n)=>this.run(e,n).pipe(qm(e=>t.run(e,n))))}},zh=new Rh(em);function Bh(e){return e.run===zh.run}function Vh(){return zh}function Hh(e){return new Rh((t,n)=>ds(t)?tm:e(t.value,n))}function Uh(e){return Wh(vs(e))}function Wh(e){return new Rh(t=>em(e(t)))}function Gh(){return new Rh(()=>tm)}function Kh(e){return new Rh(t=>{let n=ys(t,Ri);return fs(n)?em(n):Km(e,us)})}function qh(){return Uh(globalThis.String)}function Jh(){return Uh(globalThis.Number)}function Yh(e){return Hh((t,n)=>fm({try:()=>us(JSON.parse(t,e?.reviver)),catch:()=>new gh({expected:`a valid JSON string`},t,n)}))}function Xh(e){return Hh((t,n)=>fm({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return us(n)},catch:()=>new gh({expected:`a JSON-serializable value`},t,n)}))}var Zh=`~effect/SchemaTransformation/Transformation`,Qh=class e{[Zh]=Zh;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function $h(e){return j(e,Zh)&&e[Zh]===Zh}var eg=e=>$h(e)?e:new Qh(e.decode,e.encode),tg=new Qh(Vh(),Vh());function ng(){return tg}var rg=new Qh(Jh(),qh());function ig(e){return new Qh(Yh(e??{}),Xh(e))}function ag(e){return t=>t._tag===e}var og=ag(`Declaration`),sg=ag(`Never`),cg=ag(`Literal`),lg=ag(`UniqueSymbol`),ug=ag(`Arrays`),dg=ag(`Objects`),fg=ag(`Suspend`),pg=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},mg={},hg=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}},gg=`~effect/Schema`,_g=class{[gg]=gg;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}>`}},vg=class e extends _g{_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)=>t===$?th:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(t,n,r,i,a){let o=O_(this.typeParameters,t);return o===this.typeParameters&&n===this.checks&&r===this.encodingChecks&&i===this.run&&a===this.encodingRun?this:new e(o,i,this.annotations,n,void 0,this.context,r,a)}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>`}},yg=new class extends _g{_tag=`Null`;getParser(){return W_(this,null)}getExpected(){return`null`}},bg=class extends _g{_tag=`Undefined`;getParser(){return W_(this,void 0)}toCodecJson(){return v_(this,[xg])}getExpected(){return`undefined`}},xg=new pg(yg,new Qh(Uh(()=>void 0),Uh(()=>null))),Sg=new bg,Cg=new class extends _g{_tag=`Unknown`;getParser(){return G_(this,Bi)}getExpected(){return`unknown`}},wg=class extends _g{_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 ${Fa(e)}`);this.literal=e}getParser(){return W_(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Tg(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Tg(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Tg(e){let t=globalThis.String(e.literal);return v_(e,[new pg(new wg(t),new Qh(Uh(()=>e.literal),Uh(()=>t)))])}var Eg=new class extends _g{_tag=`String`;getParser(){return G_(this,Mi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&$_(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},Dg=class extends _g{_tag=`Number`;getParser(){return G_(this,Ni)}matchKey(e,t){return this._match(J_,e,t)}matchPart(e,t){return this._match(q_,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:$_(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(Og(this.checks,`effect/schema/isFinite`)||Og(this.checks,`effect/schema/isInt`))?this:v_(this,[p_])}toCodecStringTree(){return this.toCodecJson()===this?v_(this,[Z_]):v_(this,[Q_])}getExpected(){return`number`}};function Og(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&Og(e.checks,t))}var kg=new Dg,Ag=new class extends _g{_tag=`Boolean`;getParser(){return G_(this,Pi)}getExpected(){return`boolean`}},jg=class e extends _g{_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(I_(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(I_(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]}return Jm(function*(e,c){if(e===$)return $;if(!Array.isArray(e))return yield*cm(new hh(n,e,c));r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)})));let l=e.length,u={ast:n,getParser:s,input:e,len:l,tailThreshold:Math.max(a,l-o),output:new globalThis.Array(l),issues:void 0,options:c},d=Mg(u,e,{concurrency:Ng(c?.concurrency)?.concurrency,end:n.rest.length===0?a:Math.max(l,a+o)});if(d&&(yield*d),n.rest.length===0&&l>a)for(let t=a;t<=l-1;t++){let r=new ph(n,e[t],c),i=new dh([t],r);if(c.errors===`all`)u.issues?u.issues.push(i):u.issues=[i];else return yield*cm(new mh(n,[i],e,c))}return u.issues?yield*cm(new mh(n,u.issues,e,c)):u.output})}_rebuild(t,n,r){let i=O_(this.elements,t),a=O_(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},Mg=ef()({onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return Pg(e,e.ast,r,n);let i=n===nh?t:n[F];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(I_(t.ast))return;let n=new dh([r],new fh(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return np(new mh(e.ast,[n],e.input,e.options))}}}),Ng=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),Pg=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Ph(r.cause);if(i===void 0)return tp(Jf(r.cause,r=>new mh(t,[new dh([n],r)],e.input,e.options)));let a=new dh([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return np(new mh(t,[a],e.input,e.options))},Fg=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Ig(e,t,n=mg){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(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(K_(B_(t)))}var Lg=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Rg(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Rg);default:return!1}}function zg(e){return Rg(e)&&Rg(B_(e))}var Bg=class{parameter;type;constructor(e,t){if(!zg(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,I_(t)&&!U_(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},Vg=class e extends _g{_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;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e,t=e){let n=this,r=[];for(let e of n.propertySignatures)r.push(e.name);let i=r.length,a=n.indexSignatures.length,o=i&&a?new Set(r):void 0;if(!i&&!a)return G_(n,zi);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return Pg(e,n,t,s)??ip;let c=s===nh?a:s[F];if(r!==$&&c!==$){if(i&&(o.has(t)||o.has(r)))return ip;Ea(e.out,r,c)}return ip},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!Wu(n))return mm(vm(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return Pg(e,n,t,i)??ip;let a=i===nh?t:i[F],o=e.input[t],s=r.parserValue(o,e.options);return Wu(s)?l(e,t,a,o,s):mm(vm(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return Wu(i)?l(e,t,t,r,i):mm(vm(i),n=>l(e,t,t,r,n))},f=a?ef()({onItem:(e,[t,n])=>u(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0,p=()=>(s||(s=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),c=a?n.indexSignatures.map(n=>({is:n,parserKey:e(K_(n.parameter)),parserValue:t(n.type)})):void 0),s),m=Jm(function*(e,t){if(e===$)return $;if(typeof e!=`object`||!e||Array.isArray(e))return yield*cm(new hh(n,e,t));p();let l=e,m={},h={ast:n,input:l,out:m,issues:void 0,options:t},g=t.errors===`all`,_=t.onExcessProperty===`error`,v=t.onExcessProperty===`preserve`,y;if(!a&&(_||v)){o??=new Set(r),y=Reflect.ownKeys(l);for(let r=0;r<y.length;r++){let i=y[r];if(!o.has(i)){if(_){let r=new ph(n,l[i],t),a=new dh([i],r);if(g){h.issues?h.issues.push(a):h.issues=[a];continue}return yield*cm(new mh(n,[a],e,t))}Ea(m,i,l[i])}}}let b=Ng(t?.concurrency);if(i){let e=Ug(h,s,b);e&&(yield*e)}if(a&&!b)for(let e=0;e<a;e++){let n=c[e],r=n.is.parameter===Eg?d:u,i=n.is.parameter===Eg?Object.keys(l):Ig(l,n.is.parameter,t);for(let e=0;e<i.length;e++){let t=r(h,i[e],n);if(!Wu(t))yield*t;else if(t._tag===`Failure`)return yield*t}}else if(f){let e=Is();for(let n=0;n<a;n++){let r=c[n],i=Ig(l,r.is.parameter,t);for(let t=0;t<i.length;t++)e.push([i[t],r])}let n=f(h,e,b);n&&(yield*n)}if(h.issues)return yield*cm(new mh(n,h.issues,e,t));if(t.propertyOrder===`original`){let e=(y??Reflect.ownKeys(l)).concat(r),t={};for(let n of e)Object.hasOwn(m,n)&&Ea(t,n,m[n]);return t}return m});if(a)return m;let h=(e,t,n)=>{let r=s[t];return mm(vm(n),n=>{let i=Hg(e,r,n);if(i)return i;let a=()=>eh(e.out),o=Ug(e,s.slice(t+1));return o?qm(o,a):a()})};return(e,t)=>{if(e===$)return th;if(t.errors===`all`||t.onExcessProperty!==void 0||t.propertyOrder===`original`||t.concurrency!==void 0)return m(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return cm(new hh(n,e,t));let r=p(),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=Object.hasOwn(i,s),l=c?i[s]:$,u=n.parser(l,t);if(!Wu(u))return h(o,e,u);if(u===nh){c&&Ea(a,s,l);continue}let d=Hg(o,n,u);if(d)return d}}catch(e){return dm(e)}return eh(a)}}_rebuild(t,n,r,i){let a=O_(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new Lg(e.name,n)}),o=O_(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new Bg(r,i)});return a===this.propertySignatures&&o===this.indexSignatures&&r===this.checks&&i===this.encodingChecks?this:new e(a,o,this.annotations,r,void 0,this.context,i)}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 Hg(e,t,n){if(n._tag===`Failure`)return Pg(e,e.ast,t.name,n);if(n===nh)return;let r=n[F];if(r!==$){Ea(e.out,t.name,r);return}if(delete e.out[t.name],!I_(t.type)){let n=new dh([t.name],new fh(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return np(new mh(e.ast,[n],e.input,e.options))}}var Ug=ef()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser($,e.options);let n=e.input[t.name];return Ea(e.out,t.name,n),t.parser(n,e.options)},step:Hg});function Wg(e,t){return e?t?[...e,...t]:e:t}function Gg(e,t,n){return new Vg(Reflect.ownKeys(e).map(t=>new Lg(t,e[t].ast)),[],n,t)}function Kg(e){return e.ast}function qg(e,t,n){return new n_(e.map(Kg),t,void 0,n)}var Jg=ki(e=>{for(;;){if(fg(e))return Cg;let t=e.encoding;if(!t)return e.recur?.(Jg,bi)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==bi))return Cg;e=t[t.length-1].to}});function Yg(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(Yg)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Xg(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[Zm];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!I_(t)){if(cg(t))return[{key:e.name,literal:t.literal}];if(lg(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!I_(e)){if(cg(e))return[{key:t,literal:e.literal}];if(lg(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Xg(Jg(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Xg(e.thunk())}}var Zg=new WeakMap,Qg=Object.freeze([]);function $g(e){let t=Zg.get(e);if(t)return t;let n,r=0,i,a,o=!0;for(let t=0;t<e.length;t++){let s=e[t],c=Jg(s);if(sg(c))continue;if(o){if(cg(c)||lg(c)){a??=new Map;let e=cg(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1}let l=Xg(c);if(l.length){n??=new Map,r++;for(let{key:e,literal:r}of l){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=Yg(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??Qg;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=i;for(let[t,n]of i)a.set(t,Object.freeze(Array.from(n,t=>e[t])));t=(t,n)=>{if(A(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??Qg;if(n)return e}return Qg}}else if(n){let a;for(let e of n)(!a||e[1][0].size>a[1][0].size)&&e[1][1].size===r&&(a=e);t=(t,r)=>{let o=i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??Qg;if(!A(t))return o.map(t=>e[t]);let s=new Set(o),c;if(a){let[n,[i]]=a,l=Object.hasOwn(t,n),u=l?t[n]:void 0;if(l&&(!r||u!==void 0)){let t=i.get(u);if(!t)return o.map(t=>e[t]);for(let e of t)s.add(e);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t).map(t=>e[t])}}else t=t=>(i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??Qg).map(t=>e[t]).filter(e_(t));return Zg.set(e,t),t}function e_(e){return t=>{let n=Jg(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function t_(e,t,n=!1){return $g(t)(e,n)}var n_=class e extends _g{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e,t){let n=this;return(r,i)=>{if(r===$)return th;let a=t_(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:Wu(t)?r_(n,t.cause,r,i):Sm(t,e=>r_(n,e,r,i))}let o={ast:n,compile:e,input:r,out:void 0,successes:n.mode===`oneOf`?[]:void 0,issues:void 0,options:i},s=Ng(i?.concurrency),c=i_(o,a,s?{...s,orderedStep:!0}:void 0);return c?qm(c,e=>o.out===nh?em(r):o.out?o.out:cm(new _h(n,o.issues??[],r,i))):o.out?o.out:cm(new _h(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=O_(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}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=B_(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(cg);if(t.length>0)return`${o_(n.isMutable)}[ ${t.map(t=>e(t)+s_(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>cg(e.type));if(t.length>0)return`{ ${t.map(t=>`${o_(t.type.context?.isMutable)}${La(t.name)}${s_(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function r_(e,t,n,r){let i=Ph(t);return i?np(new _h(e,[i],n,r)):tp(t)}var i_=ef()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Ph(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(t),np(new vh(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return ip}}}),a_=new n_([new wg(`Infinity`),new wg(`-Infinity`),new wg(`NaN`)],`anyOf`);function o_(e){return e?``:`readonly `}function s_(e){return e?`?`:``}var c_=class e extends yi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new l_([this,e],t)}},l_=class e extends yi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function u_(e,t,n=!1){return new c_((t,n,r)=>xh(n,e(t,n,r),t,r),t,n)}function d_(e){return u_(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}var f_=S_(kg,[d_()]),p_=new pg(new n_([f_,a_],`anyOf`),new Qh(Jh(),Uh(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function m_(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return u_(e=>(r.lastIndex=0,r.test(e)),{expected:`a string matching the RegExp ${n}`,representation:{id:`effect/schema/isPattern`,payload:{source:n,flags:e.flags}},toJsonSchema:()=>({pattern:n}),arbitrary:{constraint:{patterns:[e.source]}},...t})}function h_(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var g_=new WeakMap;function __(e){return g_.get(e)??e}function v_(e,t){return e.encoding===t?e:h_(e,e=>{e.encoding.value=t})}function y_(e,t){if(e.context===t)return e;let n=__(e);if(n.context===t)return n;let r=h_(e,e=>{e.context.value=t});return g_.set(r,n),r}function b_(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return x_(e,ks(e.checks.slice(0,-1),n.annotate(t)))}return h_(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function x_(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:h_(e,e=>{e.checks.value=t})}function S_(e,t){return x_(e,Wg(e.checks,t))}function C_(e,t){let n=t(e.to);return n===e.to?e:new pg(n,e.transformation)}function w_(e,t){let n=e,r=n[n.length-1],i=C_(r,t);return i===r?e:ks(e.slice(0,e.length-1),i)}function T_(e){return t=>t.encoding?v_(t,w_(t.encoding,e)):t}function E_(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:v_(r,w_(r.encoding,n))}return e(r)}return ki(n)}function D_(e,t,n){let r=new pg(e,t);return v_(n,n.encoding?[...n.encoding,r]:[r])}function O_(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function k_(e,t){return y_(e,e.context?new hg(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new hg(!1,!1,void 0,t))}var A_=ki(e=>j_(y_(e,e.context?e.context.isOptional===!1?new hg(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new hg(!0,!1)))),j_=T_(A_),M_=Oi(e=>A_(new n_([e,Sg],`anyOf`)));function N_(e,t,n){return D_(e,n,t)}function P_(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Ii(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function F_(e,t){let{literals:n,parameters:r}=P_(e);return new Vg(n.map(e=>new Lg(e,t)),r.map(e=>new Bg(e,t)))}function I_(e){return e.context?.isOptional??!1}function L_(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(L_)}function R_(e){function t(e){return L_(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return js(n)?n:void 0}var z_=ki(e=>{if(e.encoding)return z_(v_(e,void 0));let t=e,n=t.recur?.(z_)??t,r=n.encodingChecks;if(r){let t=n===e?r:ug(n)||dg(n)||og(n)&&n.typeParameters.length>0?R_(r):void 0;return h_(n,e=>{e.encodingChecks.value=void 0,e.checks.value=Wg(n.checks,t)})}return n}),B_=ki(e=>z_(H_(e)));function V_(e,t){let n=t,r=n.length,i=n[r-1],a=[new pg(H_(v_(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new pg(H_(n[e-1].to),n[e].transformation.flip()));let o=H_(i.to);return o.encoding?v_(o,[...o.encoding,...a]):v_(o,a)}var H_=Oi(e=>{if(e.encoding)return V_(e,e.encoding);let t=e;return t.flip?.(H_)??t.recur?.(H_)??t});function U_(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(U_);default:return!1}}function W_(e,t){let n=eh(t);return(r,i)=>r===$?th:r===t?n:cm(new hh(e,r,i))}function G_(e,t){return(n,r)=>n===$?th:t(n)?nh:cm(new hh(e,n,r))}var K_=E_(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(K_)}}),q_=new globalThis.RegExp(`^${Fg}$`),J_=new globalThis.RegExp(`^(?:${Fg}|Infinity|-Infinity|NaN)$`);function Y_(e){return m_(q_,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:q_.source}),...e})}var X_=S_(Eg,[Y_()]),Z_=new pg(X_,rg),Q_=new pg(new n_([X_,a_],`anyOf`),rg);function $_(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=$_(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 lh(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function ev(e){if(!og(e))return;let t=e.annotations?.[Qm];return Li(t)?t(e.typeParameters):void 0}function tv(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function nv(e){return e===void 0||typeof e==`string`}function rv(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 iv(e){return rv(e,tv)}var av=new vg([],()=>(e,t,n)=>iv(e)?nh:cm(new hh(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>sv,toArbitrary:()=>e=>e.jsonValue()});function ov(e){return rv(e,nv)}var sv=new pg(new vg([],()=>(e,t,n)=>ov(e)?nh:cm(new hh(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),ng());function cv(e){let t=bv(wv,z_(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function lv(e){let t=cv(e);return(e,n)=>{let r=Um(t(e,n));return ap(r)?us(r.value):(Fh(r.cause,`Option adapter can only return none for schema issues`),ls())}}function uv(e){let t=cv(e);return(e,n)=>{let r=Um(t(e,n));if(ap(r))return r.value;let i=Fh(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function dv(e){return fv(e.ast)}function fv(e){let t=xv(yv(z_(e)));return e=>{let n=t(e,mg);return ap(n)?!0:(Fh(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}function pv(e,t){let n=yv(e.ast);return t===void 0?n:(e,r)=>n(e,_v(t,r))}function mv(e,t){return Sv(pv(e,t))}var hv=mv;function gv(e,t){let n=yv(H_(e.ast));return t===void 0?n:(e,r)=>n(e,_v(t,r))}var _v=(e,t)=>t?{...e,...t}:e,vv=e=>e===$?cm(new gh):em(e);function yv(e){return bv(Cv,e)}function bv(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??mg);return a===nh?em(r):Wu(a)?a[F]===$?vv($):a:qm(a,vv)}}function xv(e){return(t,n)=>Um(e(t,n))}function Sv(e){let t=xv(e);return(e,n)=>{let r=t(e,n);return ap(r)?us(r.value):(Fh(r.cause,`Option adapter can only return none for schema issues`),ls())}}var Cv=Oi(e=>kv(e,Cv)),wv=Oi(e=>kv(e,wv,Ev)),Tv=Oi(e=>kv(e,wv,Ev,e.context?.constructorDefault));function Ev(e){return e.context?.constructorDefault?Tv(e):wv(e)}function Dv(e,t,n,r){let i;if(Wu(e)&&e._tag===`Success`){let a=rh(e===nh?t:e[F]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(eh(a),r)}else i=n._tag===`Transformation`?qm(e,e=>n.decode.run(rh(e),r)):n.decode(Km(e,rh),r);return Wu(i)&&i._tag===`Success`?ih(i[F]):qm(i,ih)}function Ov(e,t){let n;return(r,i)=>r===$?th:e.isConstructed(r)?nh:Dv((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function kv(e,t,n,r){let i=n?ev(e):void 0,a=i?Ov(i,t):e.getParser(t,n),o=e.checks,s=r?e.encoding?[...e.encoding,r]:[r]:e.encoding,c=e.encodingChecks,l=(o?o[o.length-1].annotations:e.annotations)?.parseOptions;if(!s&&!o&&!c)return l?(e,t)=>a(e,_v(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===nh?t:r[F];if(t!==$&&i!==$){let i=$_(c,t,void 0,e,n);i&&(r=cm(new mh(e,i,t,n)))}}}else r=mm(r,r=>{if(t!==$&&r!==$){let r=$_(c,t,void 0,e,n);if(r)return cm(new mh(e,r,t,n))}return em(r)})}if(o&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===nh?t:r[F];if(i===$)return r;let a=$_(o,i,void 0,e,n);a&&(r=cm(new mh(e,a,i,n)))}}else r=mm(r,t=>{if(t!==$){let r=$_(o,t,void 0,e,n);if(r)return cm(new mh(e,r,t,n))}return em(t)})}return r};return s?(n,r)=>{l&&(r=_v(r,l));let i=u??=s.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=s.length-1;e>=0;e--)if(o=Dv(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[F],o=t(a,r)):o=qm(o,e=>{let n=t(e,r);return n===nh?eh(e):n})}if(o._tag===`Success`){let e=o[F],t=d(e,r);return t===nh?o:t}return o=Sm(o,t=>um(()=>Jf(t,t=>new uh(e,t,n,r)))),qm(o,e=>{let t=d(e,r);return t===nh?eh(e):t})}:l?(e,t)=>d(e,_v(t,l)):d}var Av=`~effect/Schema/Schema`,jv={[Av]:Av,pipe(){return _i(this,arguments)},annotate(e){return this.rebuild(b_(this.ast,e))},annotateKey(e){return this.rebuild(k_(this.ast,e))},check(...e){return this.rebuild(S_(this.ast,e))}};function Mv(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,jv),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>Mv(e,t),r.makeEffect=cv(r),r.make=uv(r),r.makeOption=lv(r),r}var Nv=e=>e,Pv=`~effect/SchemaError/SchemaError`,Fv=class extends xl(`SchemaError`){[Pv]=Pv;constructor(e){let t=Ml();Nl(0);try{super({issue:e})}finally{Nl(t)}}get message(){return jh(this.issue)}toString(){return`SchemaError(${this.message})`}};function Iv(e){return j(e,Pv)&&e[Pv]===Pv}function Lv(e){return ap(e)?e.value:{issues:[{message:Xf(e.cause)}]}}function Rv(e,t){let n=pv(e),r={errors:`all`,...t?.parseOptions},i=wh(t),a=e=>{let t=new _l(`sync`),a=zm(km(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Lv(o):new Promise(e=>{a.addObserver(t=>{e(Lv(t))})})};if(`~standard`in e){let t=e;return`validate`in t[`~standard`]||Object.assign(t[`~standard`],{validate:a}),t}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,validate:a}})}var zv=dv;function Bv(e,t){let n=pv(e,t);return(e,t)=>Vv(n(e,t))}function Vv(e){return Wu(e)?Wv(e):Sm(e,e=>um(()=>Jf(e,e=>new Fv(e))))}function Hv(e,t){let n;for(let r of e.reasons){if(!Gf(r)||!Iv(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 Uv(e){let t=Um(e);if(ap(t))return t.value;throw Hv(t.cause,`Sync adapter can only throw schema errors`)}function Wv(e){return ap(e)?e:tp(Jf(e.cause,e=>new Fv(e)))}var Gv=mv,Kv=hv;function qv(e,t){let n=Bv(e,t);return(e,t)=>Uv(n(e,t))}function Jv(e,t){let n=gv(e,t);return(e,t)=>Vv(n(e,t))}function Yv(e,t){let n=Jv(e,t);return(e,t)=>Uv(n(e,t))}var Xv=Yv,Zv=Mv,Qv=Nv(e=>Zv(A_(e.ast),{schema:e})),$v=Nv(e=>{let t=_y(e);return Zv(M_(e.ast),{schema:t})}),ey=Nv(e=>Zv(B_(e.ast),{schema:e}));function ty(e){let t=Zv(new wg(e),{literal:e,transform(n){return t.pipe(vy(ty(n),{decode:Uh(()=>n),encode:Uh(()=>e)}))}});return t}var ny=Zv(Cg),ry=Zv(yg),iy=Zv(Sg),ay=Zv(Eg),oy=Zv(kg),sy=Zv(Ag);function cy(e,t){return Zv(e,{fields:t,mapFields(e,t){let n=e(this.fields);return cy(Gg(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function ly(e){return cy(Gg(e,void 0),e)}function uy(e,t){return Zv(F_(e.ast,t.ast),{key:e,value:t})}var dy=Nv(e=>Zv(new jg(!1,[],[e.ast]),{value:e})),fy=Nv(e=>Zv(new jg(!0,e.ast.elements,e.ast.rest),{schema:e}));function py(e,t){return Zv(e,{members:t,mapMembers(e,t){let n=e(this.members);return py(qg(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function my(e,t){return py(qg(e,t?.mode??`anyOf`,void 0),e)}function hy(e){let t=e.map(ty);return Zv(qg(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return my(e(this.members))},pick(e){return hy(e)},transform(e){return my(t.map((t,n)=>t.transform(e[n])))}})}var gy=Nv(e=>my([e,ry])),_y=Nv(e=>my([e,iy]));function vy(e,t){return n=>Zv(N_(n.ast,e.ast,t?eg(t):ng()),{from:n,to:e})}function yy(e){return Sm(e,e=>um(()=>Jf(e,e=>e.issue)))}function by(e,t){let n=t?.encodingStrategy===`omit`?Gh():Vh();return t=>Qv(ey(t)).pipe(vy(t,{decode:Kh(yy(e)),encode:n}))}var xy=u_,Sy=Zv(f_);function Cy(e){return xy(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`}),toCode:()=>({runtime:`Schema.isInt()`}),arbitrary:{constraint:{integer:!0}},...e})}var wy=oy.check(Cy());function Ty(e,t){return e=Math.max(0,Math.floor(e)),xy(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:t})=>t===`array`?{minItems:e}:{minLength:e},toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[Xm]:!0,arbitrary:{constraint:{minLength:e}},...t})}function Ey(e){return Ty(1,e)}var Dy=ay.check(Ey());globalThis.RegExp,globalThis.URL;var Oy=ay.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function ky(e,t){return Oy.pipe(vy(e,ig(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams,globalThis.Uint8Array;var Ay=Zv(b_(av,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),jy=Gv(Dy),My=Gv(wy);function Ny(e){let t=jy(e??``);return fs(t)?t.value:void 0}function Py(e){if(e===void 0)return;let t=My(e);if(fs(t)&&t.value>0)return t.value;if(!Mi(e))return;let n=My(Number.parseInt(e,10));return fs(n)&&n.value>0?n.value:void 0}function Fy(e){return{kind:Ny(e.kind),name:Ny(e.name),run:Ny(e.run),thread:Ny(e.thread),seq:Py(e.seq)}}var Iy=`modulepreload`,Ly=function(e,t){return new URL(e,t).href},Ry={},zy=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=Ly(t,n),t=s(t),t in Ry)return;Ry[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`:Iy,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)})},By=Hr(`/`)({validateSearch:Fy,component:Ur(()=>zy(()=>import(`./routes-CEdsN9DO.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),Vy={IndexRoute:By.update({id:`/`,path:`/`,getParentRoute:()=>gi})},Hy=gi._addFileChildren(Vy)._addFileTypes();function Uy(){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 Wy(){return oi({routeTree:Hy,basepath:Uy()})}var Gy=document.getElementById(`root`);Gy&&(0,hi.createRoot)(Gy).render((0,D.jsx)(i.StrictMode,{children:(0,D.jsx)(li,{router:Wy()})}));export{Tm as $,j as $n,jd as $t,bm as A,fs as An,Qf as At,lm as B,Ao as Bn,Zu as Bt,Rv as C,Ts as Cn,Ip as Ct,Mm as D,hs as Dn,ap as Dt,Lh as E,ps as En,tp as Et,xm as F,no as Fn,Lu as Ft,Im as G,xa as Gn,of as Gt,qm as H,Ua as Hn,ou as Ht,jm as I,go as In,Iu as It,sm as J,ia as Jn,gf as Jt,Lm as K,Ca as Kn,Hu as Kt,Pm as L,Oo as Ln,Du as Lt,Sm as M,us as Mn,qf as Mt,Cm as N,os as Nn,Zf as Nt,Nm as O,gs as On,ep as Ot,wm as P,Io as Pn,Yf as Pt,ym as Q,M as Qn,Ld as Qt,vm as R,Do as Rn,dd as Rt,$v as S,ws as Sn,Lp as St,Ih as T,ms as Tn,rp as Tt,hm as U,Fa as Un,lu as Ut,mm as V,Ha as Vn,$u as Vt,Wm as W,wa as Wn,cu as Wt,Zp as X,Wi as Xn,Bd as Xt,Em as Y,Zi as Yn,Ku as Yt,Gm as Z,N as Zn,zd as Zt,qv as _,Ns as _n,pm as _t,Ay as a,gu as an,Mi as ar,zm as at,zv as b,Ss as bn,Ep as bt,gy as c,Zd as cn,k as cr,Hm as ct,ly as d,ac as dn,_i as dr,nm as dt,Td as en,Pi as er,Am as et,my as f,Cc as fn,pi as fr,rm as ft,Gv as g,Ls as gn,im as gt,Bv as h,Ms as hn,fm as ht,Sy as i,J as in,Hi as ir,Om as it,am as j,ls as jn,Kf as jt,gm as k,ds as kn,ip as kt,uy as l,bu as ln,bi as lr,Dm as lt,Kv as m,Os as mn,r as mr,$p as mt,dy as n,kd as nn,Ni as nr,Fm as nt,ty as o,Y as on,Ei as or,Bm as ot,ny as p,Tc as pn,Pn as pr,_m as pt,Rm as q,aa as qn,eu as qt,sy as r,Pd as rn,Vi as rr,Qp as rt,hy as s,mu as sn,xi as sr,Vm as st,By as t,Q as tn,Li as tr,om as tt,ay as u,xl as un,Di as ur,em as ut,Xv as v,Es as vn,_p as vt,by as w,bs as wn,Fp as wt,fy as x,Cs as xn,Jp as xt,ky as y,xs as yn,vp as yt,cm as z,z as zn,Ju as zt};
22
+ `);n=Nh(e)??Dh($m(e.ast),e);break;default:n=Sh(e)}return t?`${n}\n at ${t}`:n}function Nh(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Nh(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 Ph(e){let t;for(let n of e.reasons){if(!Gf(n)||!oh(n.error))return;t??=n.error}return t}function Fh(e,t){let n=Ph(e);if(n===void 0)throw Error(t,{cause:e});return n}var Ih=Dp,Lh=Vp,Rh=class e extends yi{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(Km(vs(t))))}compose(t){return Bh(this)?t:Bh(t)?this:new e((e,n)=>this.run(e,n).pipe(qm(e=>t.run(e,n))))}},zh=new Rh(em);function Bh(e){return e.run===zh.run}function Vh(){return zh}function Hh(e){return new Rh((t,n)=>ds(t)?tm:e(t.value,n))}function Uh(e){return Wh(vs(e))}function Wh(e){return new Rh(t=>em(e(t)))}function Gh(){return new Rh(()=>tm)}function Kh(e){return new Rh(t=>{let n=ys(t,Ri);return fs(n)?em(n):Km(e,us)})}function qh(){return Uh(globalThis.String)}function Jh(){return Uh(globalThis.Number)}function Yh(e){return Hh((t,n)=>fm({try:()=>us(JSON.parse(t,e?.reviver)),catch:()=>new gh({expected:`a valid JSON string`},t,n)}))}function Xh(e){return Hh((t,n)=>fm({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return us(n)},catch:()=>new gh({expected:`a JSON-serializable value`},t,n)}))}var Zh=`~effect/SchemaTransformation/Transformation`,Qh=class e{[Zh]=Zh;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function $h(e){return j(e,Zh)&&e[Zh]===Zh}var eg=e=>$h(e)?e:new Qh(e.decode,e.encode),tg=new Qh(Vh(),Vh());function ng(){return tg}var rg=new Qh(Jh(),qh());function ig(e){return new Qh(Yh(e??{}),Xh(e))}function ag(e){return t=>t._tag===e}var og=ag(`Declaration`),sg=ag(`Never`),cg=ag(`Literal`),lg=ag(`UniqueSymbol`),ug=ag(`Arrays`),dg=ag(`Objects`),fg=ag(`Suspend`),pg=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},mg={},hg=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}},gg=`~effect/Schema`,_g=class{[gg]=gg;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}>`}},vg=class e extends _g{_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)=>t===$?th:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(t,n,r,i,a){let o=O_(this.typeParameters,t);return o===this.typeParameters&&n===this.checks&&r===this.encodingChecks&&i===this.run&&a===this.encodingRun?this:new e(o,i,this.annotations,n,void 0,this.context,r,a)}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>`}},yg=new class extends _g{_tag=`Null`;getParser(){return W_(this,null)}getExpected(){return`null`}},bg=class extends _g{_tag=`Undefined`;getParser(){return W_(this,void 0)}toCodecJson(){return v_(this,[xg])}getExpected(){return`undefined`}},xg=new pg(yg,new Qh(Uh(()=>void 0),Uh(()=>null))),Sg=new bg,Cg=new class extends _g{_tag=`Unknown`;getParser(){return G_(this,Bi)}getExpected(){return`unknown`}},wg=class extends _g{_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 ${Fa(e)}`);this.literal=e}getParser(){return W_(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Tg(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Tg(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Tg(e){let t=globalThis.String(e.literal);return v_(e,[new pg(new wg(t),new Qh(Uh(()=>e.literal),Uh(()=>t)))])}var Eg=new class extends _g{_tag=`String`;getParser(){return G_(this,Mi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&$_(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},Dg=class extends _g{_tag=`Number`;getParser(){return G_(this,Ni)}matchKey(e,t){return this._match(J_,e,t)}matchPart(e,t){return this._match(q_,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:$_(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(Og(this.checks,`effect/schema/isFinite`)||Og(this.checks,`effect/schema/isInt`))?this:v_(this,[p_])}toCodecStringTree(){return this.toCodecJson()===this?v_(this,[Z_]):v_(this,[Q_])}getExpected(){return`number`}};function Og(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&Og(e.checks,t))}var kg=new Dg,Ag=new class extends _g{_tag=`Boolean`;getParser(){return G_(this,Pi)}getExpected(){return`boolean`}},jg=class e extends _g{_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(I_(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(I_(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]}return Jm(function*(e,c){if(e===$)return $;if(!Array.isArray(e))return yield*cm(new hh(n,e,c));r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)})));let l=e.length,u={ast:n,getParser:s,input:e,len:l,tailThreshold:Math.max(a,l-o),output:new globalThis.Array(l),issues:void 0,options:c},d=Mg(u,e,{concurrency:Ng(c?.concurrency)?.concurrency,end:n.rest.length===0?a:Math.max(l,a+o)});if(d&&(yield*d),n.rest.length===0&&l>a)for(let t=a;t<=l-1;t++){let r=new ph(n,e[t],c),i=new dh([t],r);if(c.errors===`all`)u.issues?u.issues.push(i):u.issues=[i];else return yield*cm(new mh(n,[i],e,c))}return u.issues?yield*cm(new mh(n,u.issues,e,c)):u.output})}_rebuild(t,n,r){let i=O_(this.elements,t),a=O_(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},Mg=ef()({onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return Pg(e,e.ast,r,n);let i=n===nh?t:n[F];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(I_(t.ast))return;let n=new dh([r],new fh(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return np(new mh(e.ast,[n],e.input,e.options))}}}),Ng=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),Pg=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Ph(r.cause);if(i===void 0)return tp(Jf(r.cause,r=>new mh(t,[new dh([n],r)],e.input,e.options)));let a=new dh([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return np(new mh(t,[a],e.input,e.options))},Fg=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Ig(e,t,n=mg){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(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(K_(B_(t)))}var Lg=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Rg(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Rg);default:return!1}}function zg(e){return Rg(e)&&Rg(B_(e))}var Bg=class{parameter;type;constructor(e,t){if(!zg(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,I_(t)&&!U_(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},Vg=class e extends _g{_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;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e,t=e){let n=this,r=[];for(let e of n.propertySignatures)r.push(e.name);let i=r.length,a=n.indexSignatures.length,o=i&&a?new Set(r):void 0;if(!i&&!a)return G_(n,zi);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return Pg(e,n,t,s)??ip;let c=s===nh?a:s[F];if(r!==$&&c!==$){if(i&&(o.has(t)||o.has(r)))return ip;Ea(e.out,r,c)}return ip},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!Wu(n))return mm(vm(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return Pg(e,n,t,i)??ip;let a=i===nh?t:i[F],o=e.input[t],s=r.parserValue(o,e.options);return Wu(s)?l(e,t,a,o,s):mm(vm(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return Wu(i)?l(e,t,t,r,i):mm(vm(i),n=>l(e,t,t,r,n))},f=a?ef()({onItem:(e,[t,n])=>u(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0,p=()=>(s||(s=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),c=a?n.indexSignatures.map(n=>({is:n,parserKey:e(K_(n.parameter)),parserValue:t(n.type)})):void 0),s),m=Jm(function*(e,t){if(e===$)return $;if(typeof e!=`object`||!e||Array.isArray(e))return yield*cm(new hh(n,e,t));p();let l=e,m={},h={ast:n,input:l,out:m,issues:void 0,options:t},g=t.errors===`all`,_=t.onExcessProperty===`error`,v=t.onExcessProperty===`preserve`,y;if(!a&&(_||v)){o??=new Set(r),y=Reflect.ownKeys(l);for(let r=0;r<y.length;r++){let i=y[r];if(!o.has(i)){if(_){let r=new ph(n,l[i],t),a=new dh([i],r);if(g){h.issues?h.issues.push(a):h.issues=[a];continue}return yield*cm(new mh(n,[a],e,t))}Ea(m,i,l[i])}}}let b=Ng(t?.concurrency);if(i){let e=Ug(h,s,b);e&&(yield*e)}if(a&&!b)for(let e=0;e<a;e++){let n=c[e],r=n.is.parameter===Eg?d:u,i=n.is.parameter===Eg?Object.keys(l):Ig(l,n.is.parameter,t);for(let e=0;e<i.length;e++){let t=r(h,i[e],n);if(!Wu(t))yield*t;else if(t._tag===`Failure`)return yield*t}}else if(f){let e=Is();for(let n=0;n<a;n++){let r=c[n],i=Ig(l,r.is.parameter,t);for(let t=0;t<i.length;t++)e.push([i[t],r])}let n=f(h,e,b);n&&(yield*n)}if(h.issues)return yield*cm(new mh(n,h.issues,e,t));if(t.propertyOrder===`original`){let e=(y??Reflect.ownKeys(l)).concat(r),t={};for(let n of e)Object.hasOwn(m,n)&&Ea(t,n,m[n]);return t}return m});if(a)return m;let h=(e,t,n)=>{let r=s[t];return mm(vm(n),n=>{let i=Hg(e,r,n);if(i)return i;let a=()=>eh(e.out),o=Ug(e,s.slice(t+1));return o?qm(o,a):a()})};return(e,t)=>{if(e===$)return th;if(t.errors===`all`||t.onExcessProperty!==void 0||t.propertyOrder===`original`||t.concurrency!==void 0)return m(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return cm(new hh(n,e,t));let r=p(),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=Object.hasOwn(i,s),l=c?i[s]:$,u=n.parser(l,t);if(!Wu(u))return h(o,e,u);if(u===nh){c&&Ea(a,s,l);continue}let d=Hg(o,n,u);if(d)return d}}catch(e){return dm(e)}return eh(a)}}_rebuild(t,n,r,i){let a=O_(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new Lg(e.name,n)}),o=O_(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new Bg(r,i)});return a===this.propertySignatures&&o===this.indexSignatures&&r===this.checks&&i===this.encodingChecks?this:new e(a,o,this.annotations,r,void 0,this.context,i)}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 Hg(e,t,n){if(n._tag===`Failure`)return Pg(e,e.ast,t.name,n);if(n===nh)return;let r=n[F];if(r!==$){Ea(e.out,t.name,r);return}if(delete e.out[t.name],!I_(t.type)){let n=new dh([t.name],new fh(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return np(new mh(e.ast,[n],e.input,e.options))}}var Ug=ef()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser($,e.options);let n=e.input[t.name];return Ea(e.out,t.name,n),t.parser(n,e.options)},step:Hg});function Wg(e,t){return e?t?[...e,...t]:e:t}function Gg(e,t,n){return new Vg(Reflect.ownKeys(e).map(t=>new Lg(t,e[t].ast)),[],n,t)}function Kg(e){return e.ast}function qg(e,t,n){return new n_(e.map(Kg),t,void 0,n)}var Jg=ki(e=>{for(;;){if(fg(e))return Cg;let t=e.encoding;if(!t)return e.recur?.(Jg,bi)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==bi))return Cg;e=t[t.length-1].to}});function Yg(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(Yg)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Xg(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[Zm];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!I_(t)){if(cg(t))return[{key:e.name,literal:t.literal}];if(lg(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!I_(e)){if(cg(e))return[{key:t,literal:e.literal}];if(lg(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Xg(Jg(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Xg(e.thunk())}}var Zg=new WeakMap,Qg=Object.freeze([]);function $g(e){let t=Zg.get(e);if(t)return t;let n,r=0,i,a,o=!0;for(let t=0;t<e.length;t++){let s=e[t],c=Jg(s);if(sg(c))continue;if(o){if(cg(c)||lg(c)){a??=new Map;let e=cg(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1}let l=Xg(c);if(l.length){n??=new Map,r++;for(let{key:e,literal:r}of l){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=Yg(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??Qg;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=i;for(let[t,n]of i)a.set(t,Object.freeze(Array.from(n,t=>e[t])));t=(t,n)=>{if(A(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??Qg;if(n)return e}return Qg}}else if(n){let a;for(let e of n)(!a||e[1][0].size>a[1][0].size)&&e[1][1].size===r&&(a=e);t=(t,r)=>{let o=i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??Qg;if(!A(t))return o.map(t=>e[t]);let s=new Set(o),c;if(a){let[n,[i]]=a,l=Object.hasOwn(t,n),u=l?t[n]:void 0;if(l&&(!r||u!==void 0)){let t=i.get(u);if(!t)return o.map(t=>e[t]);for(let e of t)s.add(e);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t).map(t=>e[t])}}else t=t=>(i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??Qg).map(t=>e[t]).filter(e_(t));return Zg.set(e,t),t}function e_(e){return t=>{let n=Jg(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function t_(e,t,n=!1){return $g(t)(e,n)}var n_=class e extends _g{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e,t){let n=this;return(r,i)=>{if(r===$)return th;let a=t_(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:Wu(t)?r_(n,t.cause,r,i):Sm(t,e=>r_(n,e,r,i))}let o={ast:n,compile:e,input:r,out:void 0,successes:n.mode===`oneOf`?[]:void 0,issues:void 0,options:i},s=Ng(i?.concurrency),c=i_(o,a,s?{...s,orderedStep:!0}:void 0);return c?qm(c,e=>o.out===nh?em(r):o.out?o.out:cm(new _h(n,o.issues??[],r,i))):o.out?o.out:cm(new _h(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=O_(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}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=B_(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(cg);if(t.length>0)return`${o_(n.isMutable)}[ ${t.map(t=>e(t)+s_(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>cg(e.type));if(t.length>0)return`{ ${t.map(t=>`${o_(t.type.context?.isMutable)}${La(t.name)}${s_(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function r_(e,t,n,r){let i=Ph(t);return i?np(new _h(e,[i],n,r)):tp(t)}var i_=ef()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Ph(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(t),np(new vh(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return ip}}}),a_=new n_([new wg(`Infinity`),new wg(`-Infinity`),new wg(`NaN`)],`anyOf`);function o_(e){return e?``:`readonly `}function s_(e){return e?`?`:``}var c_=class e extends yi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new l_([this,e],t)}},l_=class e extends yi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function u_(e,t,n=!1){return new c_((t,n,r)=>xh(n,e(t,n,r),t,r),t,n)}function d_(e){return u_(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}var f_=S_(kg,[d_()]),p_=new pg(new n_([f_,a_],`anyOf`),new Qh(Jh(),Uh(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function m_(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return u_(e=>(r.lastIndex=0,r.test(e)),{expected:`a string matching the RegExp ${n}`,representation:{id:`effect/schema/isPattern`,payload:{source:n,flags:e.flags}},toJsonSchema:()=>({pattern:n}),arbitrary:{constraint:{patterns:[e.source]}},...t})}function h_(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var g_=new WeakMap;function __(e){return g_.get(e)??e}function v_(e,t){return e.encoding===t?e:h_(e,e=>{e.encoding.value=t})}function y_(e,t){if(e.context===t)return e;let n=__(e);if(n.context===t)return n;let r=h_(e,e=>{e.context.value=t});return g_.set(r,n),r}function b_(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return x_(e,ks(e.checks.slice(0,-1),n.annotate(t)))}return h_(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function x_(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:h_(e,e=>{e.checks.value=t})}function S_(e,t){return x_(e,Wg(e.checks,t))}function C_(e,t){let n=t(e.to);return n===e.to?e:new pg(n,e.transformation)}function w_(e,t){let n=e,r=n[n.length-1],i=C_(r,t);return i===r?e:ks(e.slice(0,e.length-1),i)}function T_(e){return t=>t.encoding?v_(t,w_(t.encoding,e)):t}function E_(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:v_(r,w_(r.encoding,n))}return e(r)}return ki(n)}function D_(e,t,n){let r=new pg(e,t);return v_(n,n.encoding?[...n.encoding,r]:[r])}function O_(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function k_(e,t){return y_(e,e.context?new hg(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new hg(!1,!1,void 0,t))}var A_=ki(e=>j_(y_(e,e.context?e.context.isOptional===!1?new hg(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new hg(!0,!1)))),j_=T_(A_),M_=Oi(e=>A_(new n_([e,Sg],`anyOf`)));function N_(e,t,n){return D_(e,n,t)}function P_(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Ii(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function F_(e,t){let{literals:n,parameters:r}=P_(e);return new Vg(n.map(e=>new Lg(e,t)),r.map(e=>new Bg(e,t)))}function I_(e){return e.context?.isOptional??!1}function L_(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(L_)}function R_(e){function t(e){return L_(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return js(n)?n:void 0}var z_=ki(e=>{if(e.encoding)return z_(v_(e,void 0));let t=e,n=t.recur?.(z_)??t,r=n.encodingChecks;if(r){let t=n===e?r:ug(n)||dg(n)||og(n)&&n.typeParameters.length>0?R_(r):void 0;return h_(n,e=>{e.encodingChecks.value=void 0,e.checks.value=Wg(n.checks,t)})}return n}),B_=ki(e=>z_(H_(e)));function V_(e,t){let n=t,r=n.length,i=n[r-1],a=[new pg(H_(v_(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new pg(H_(n[e-1].to),n[e].transformation.flip()));let o=H_(i.to);return o.encoding?v_(o,[...o.encoding,...a]):v_(o,a)}var H_=Oi(e=>{if(e.encoding)return V_(e,e.encoding);let t=e;return t.flip?.(H_)??t.recur?.(H_)??t});function U_(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(U_);default:return!1}}function W_(e,t){let n=eh(t);return(r,i)=>r===$?th:r===t?n:cm(new hh(e,r,i))}function G_(e,t){return(n,r)=>n===$?th:t(n)?nh:cm(new hh(e,n,r))}var K_=E_(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(K_)}}),q_=new globalThis.RegExp(`^${Fg}$`),J_=new globalThis.RegExp(`^(?:${Fg}|Infinity|-Infinity|NaN)$`);function Y_(e){return m_(q_,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:q_.source}),...e})}var X_=S_(Eg,[Y_()]),Z_=new pg(X_,rg),Q_=new pg(new n_([X_,a_],`anyOf`),rg);function $_(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=$_(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 lh(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function ev(e){if(!og(e))return;let t=e.annotations?.[Qm];return Li(t)?t(e.typeParameters):void 0}function tv(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function nv(e){return e===void 0||typeof e==`string`}function rv(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 iv(e){return rv(e,tv)}var av=new vg([],()=>(e,t,n)=>iv(e)?nh:cm(new hh(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>sv,toArbitrary:()=>e=>e.jsonValue()});function ov(e){return rv(e,nv)}var sv=new pg(new vg([],()=>(e,t,n)=>ov(e)?nh:cm(new hh(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),ng());function cv(e){let t=bv(wv,z_(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function lv(e){let t=cv(e);return(e,n)=>{let r=Um(t(e,n));return ap(r)?us(r.value):(Fh(r.cause,`Option adapter can only return none for schema issues`),ls())}}function uv(e){let t=cv(e);return(e,n)=>{let r=Um(t(e,n));if(ap(r))return r.value;let i=Fh(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function dv(e){return fv(e.ast)}function fv(e){let t=xv(yv(z_(e)));return e=>{let n=t(e,mg);return ap(n)?!0:(Fh(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}function pv(e,t){let n=yv(e.ast);return t===void 0?n:(e,r)=>n(e,_v(t,r))}function mv(e,t){return Sv(pv(e,t))}var hv=mv;function gv(e,t){let n=yv(H_(e.ast));return t===void 0?n:(e,r)=>n(e,_v(t,r))}var _v=(e,t)=>t?{...e,...t}:e,vv=e=>e===$?cm(new gh):em(e);function yv(e){return bv(Cv,e)}function bv(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??mg);return a===nh?em(r):Wu(a)?a[F]===$?vv($):a:qm(a,vv)}}function xv(e){return(t,n)=>Um(e(t,n))}function Sv(e){let t=xv(e);return(e,n)=>{let r=t(e,n);return ap(r)?us(r.value):(Fh(r.cause,`Option adapter can only return none for schema issues`),ls())}}var Cv=Oi(e=>kv(e,Cv)),wv=Oi(e=>kv(e,wv,Ev)),Tv=Oi(e=>kv(e,wv,Ev,e.context?.constructorDefault));function Ev(e){return e.context?.constructorDefault?Tv(e):wv(e)}function Dv(e,t,n,r){let i;if(Wu(e)&&e._tag===`Success`){let a=rh(e===nh?t:e[F]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(eh(a),r)}else i=n._tag===`Transformation`?qm(e,e=>n.decode.run(rh(e),r)):n.decode(Km(e,rh),r);return Wu(i)&&i._tag===`Success`?ih(i[F]):qm(i,ih)}function Ov(e,t){let n;return(r,i)=>r===$?th:e.isConstructed(r)?nh:Dv((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function kv(e,t,n,r){let i=n?ev(e):void 0,a=i?Ov(i,t):e.getParser(t,n),o=e.checks,s=r?e.encoding?[...e.encoding,r]:[r]:e.encoding,c=e.encodingChecks,l=(o?o[o.length-1].annotations:e.annotations)?.parseOptions;if(!s&&!o&&!c)return l?(e,t)=>a(e,_v(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===nh?t:r[F];if(t!==$&&i!==$){let i=$_(c,t,void 0,e,n);i&&(r=cm(new mh(e,i,t,n)))}}}else r=mm(r,r=>{if(t!==$&&r!==$){let r=$_(c,t,void 0,e,n);if(r)return cm(new mh(e,r,t,n))}return em(r)})}if(o&&!n.disableChecks){if(Wu(r)){if(r._tag===`Success`){let i=r===nh?t:r[F];if(i===$)return r;let a=$_(o,i,void 0,e,n);a&&(r=cm(new mh(e,a,i,n)))}}else r=mm(r,t=>{if(t!==$){let r=$_(o,t,void 0,e,n);if(r)return cm(new mh(e,r,t,n))}return em(t)})}return r};return s?(n,r)=>{l&&(r=_v(r,l));let i=u??=s.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=s.length-1;e>=0;e--)if(o=Dv(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[F],o=t(a,r)):o=qm(o,e=>{let n=t(e,r);return n===nh?eh(e):n})}if(o._tag===`Success`){let e=o[F],t=d(e,r);return t===nh?o:t}return o=Sm(o,t=>um(()=>Jf(t,t=>new uh(e,t,n,r)))),qm(o,e=>{let t=d(e,r);return t===nh?eh(e):t})}:l?(e,t)=>d(e,_v(t,l)):d}var Av=`~effect/Schema/Schema`,jv={[Av]:Av,pipe(){return _i(this,arguments)},annotate(e){return this.rebuild(b_(this.ast,e))},annotateKey(e){return this.rebuild(k_(this.ast,e))},check(...e){return this.rebuild(S_(this.ast,e))}};function Mv(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,jv),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>Mv(e,t),r.makeEffect=cv(r),r.make=uv(r),r.makeOption=lv(r),r}var Nv=e=>e,Pv=`~effect/SchemaError/SchemaError`,Fv=class extends xl(`SchemaError`){[Pv]=Pv;constructor(e){let t=Ml();Nl(0);try{super({issue:e})}finally{Nl(t)}}get message(){return jh(this.issue)}toString(){return`SchemaError(${this.message})`}};function Iv(e){return j(e,Pv)&&e[Pv]===Pv}function Lv(e){return ap(e)?e.value:{issues:[{message:Xf(e.cause)}]}}function Rv(e,t){let n=pv(e),r={errors:`all`,...t?.parseOptions},i=wh(t),a=e=>{let t=new _l(`sync`),a=zm(km(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Lv(o):new Promise(e=>{a.addObserver(t=>{e(Lv(t))})})};if(`~standard`in e){let t=e;return`validate`in t[`~standard`]||Object.assign(t[`~standard`],{validate:a}),t}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,validate:a}})}var zv=dv;function Bv(e,t){let n=pv(e,t);return(e,t)=>Vv(n(e,t))}function Vv(e){return Wu(e)?Wv(e):Sm(e,e=>um(()=>Jf(e,e=>new Fv(e))))}function Hv(e,t){let n;for(let r of e.reasons){if(!Gf(r)||!Iv(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 Uv(e){let t=Um(e);if(ap(t))return t.value;throw Hv(t.cause,`Sync adapter can only throw schema errors`)}function Wv(e){return ap(e)?e:tp(Jf(e.cause,e=>new Fv(e)))}var Gv=mv,Kv=hv;function qv(e,t){let n=Bv(e,t);return(e,t)=>Uv(n(e,t))}function Jv(e,t){let n=gv(e,t);return(e,t)=>Vv(n(e,t))}function Yv(e,t){let n=Jv(e,t);return(e,t)=>Uv(n(e,t))}var Xv=Yv,Zv=Mv,Qv=Nv(e=>Zv(A_(e.ast),{schema:e})),$v=Nv(e=>{let t=_y(e);return Zv(M_(e.ast),{schema:t})}),ey=Nv(e=>Zv(B_(e.ast),{schema:e}));function ty(e){let t=Zv(new wg(e),{literal:e,transform(n){return t.pipe(vy(ty(n),{decode:Uh(()=>n),encode:Uh(()=>e)}))}});return t}var ny=Zv(Cg),ry=Zv(yg),iy=Zv(Sg),ay=Zv(Eg),oy=Zv(kg),sy=Zv(Ag);function cy(e,t){return Zv(e,{fields:t,mapFields(e,t){let n=e(this.fields);return cy(Gg(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function ly(e){return cy(Gg(e,void 0),e)}function uy(e,t){return Zv(F_(e.ast,t.ast),{key:e,value:t})}var dy=Nv(e=>Zv(new jg(!1,[],[e.ast]),{value:e})),fy=Nv(e=>Zv(new jg(!0,e.ast.elements,e.ast.rest),{schema:e}));function py(e,t){return Zv(e,{members:t,mapMembers(e,t){let n=e(this.members);return py(qg(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function my(e,t){return py(qg(e,t?.mode??`anyOf`,void 0),e)}function hy(e){let t=e.map(ty);return Zv(qg(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return my(e(this.members))},pick(e){return hy(e)},transform(e){return my(t.map((t,n)=>t.transform(e[n])))}})}var gy=Nv(e=>my([e,ry])),_y=Nv(e=>my([e,iy]));function vy(e,t){return n=>Zv(N_(n.ast,e.ast,t?eg(t):ng()),{from:n,to:e})}function yy(e){return Sm(e,e=>um(()=>Jf(e,e=>e.issue)))}function by(e,t){let n=t?.encodingStrategy===`omit`?Gh():Vh();return t=>Qv(ey(t)).pipe(vy(t,{decode:Kh(yy(e)),encode:n}))}var xy=u_,Sy=Zv(f_);function Cy(e){return xy(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`}),toCode:()=>({runtime:`Schema.isInt()`}),arbitrary:{constraint:{integer:!0}},...e})}var wy=oy.check(Cy());function Ty(e,t){return e=Math.max(0,Math.floor(e)),xy(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:t})=>t===`array`?{minItems:e}:{minLength:e},toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[Xm]:!0,arbitrary:{constraint:{minLength:e}},...t})}function Ey(e){return Ty(1,e)}var Dy=ay.check(Ey());globalThis.RegExp,globalThis.URL;var Oy=ay.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function ky(e,t){return Oy.pipe(vy(e,ig(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams,globalThis.Uint8Array;var Ay=Zv(b_(av,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),jy=Gv(Dy),My=Gv(wy);function Ny(e){let t=jy(e??``);return fs(t)?t.value:void 0}function Py(e){if(e===void 0)return;let t=My(e);if(fs(t)&&t.value>0)return t.value;if(!Mi(e))return;let n=My(Number.parseInt(e,10));return fs(n)&&n.value>0?n.value:void 0}function Fy(e){return{kind:Ny(e.kind),name:Ny(e.name),run:Ny(e.run),thread:Ny(e.thread),seq:Py(e.seq)}}var Iy=`modulepreload`,Ly=function(e,t){return new URL(e,t).href},Ry={},zy=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=Ly(t,n),t=s(t),t in Ry)return;Ry[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`:Iy,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)})},By=Hr(`/`)({validateSearch:Fy,component:Ur(()=>zy(()=>import(`./routes-FLQryDcz.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),Vy={IndexRoute:By.update({id:`/`,path:`/`,getParentRoute:()=>gi})},Hy=gi._addFileChildren(Vy)._addFileTypes();function Uy(){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 Wy(){return oi({routeTree:Hy,basepath:Uy()})}var Gy=document.getElementById(`root`);Gy&&(0,hi.createRoot)(Gy).render((0,D.jsx)(i.StrictMode,{children:(0,D.jsx)(li,{router:Wy()})}));export{Tm as $,j as $n,jd as $t,bm as A,fs as An,Qf as At,lm as B,Ao as Bn,Zu as Bt,Rv as C,Ts as Cn,Ip as Ct,Mm as D,hs as Dn,ap as Dt,Lh as E,ps as En,tp as Et,xm as F,no as Fn,Lu as Ft,Im as G,xa as Gn,of as Gt,qm as H,Ua as Hn,ou as Ht,jm as I,go as In,Iu as It,sm as J,ia as Jn,gf as Jt,Lm as K,Ca as Kn,Hu as Kt,Pm as L,Oo as Ln,Du as Lt,Sm as M,us as Mn,qf as Mt,Cm as N,os as Nn,Zf as Nt,Nm as O,gs as On,ep as Ot,wm as P,Io as Pn,Yf as Pt,ym as Q,M as Qn,Ld as Qt,vm as R,Do as Rn,dd as Rt,$v as S,ws as Sn,Lp as St,Ih as T,ms as Tn,rp as Tt,hm as U,Fa as Un,lu as Ut,mm as V,Ha as Vn,$u as Vt,Wm as W,wa as Wn,cu as Wt,Zp as X,Wi as Xn,Bd as Xt,Em as Y,Zi as Yn,Ku as Yt,Gm as Z,N as Zn,zd as Zt,qv as _,Ns as _n,pm as _t,Ay as a,gu as an,Mi as ar,zm as at,zv as b,Ss as bn,Ep as bt,gy as c,Zd as cn,k as cr,Hm as ct,ly as d,ac as dn,_i as dr,nm as dt,Td as en,Pi as er,Am as et,my as f,Cc as fn,pi as fr,rm as ft,Gv as g,Ls as gn,im as gt,Bv as h,Ms as hn,fm as ht,Sy as i,J as in,Hi as ir,Om as it,am as j,ls as jn,Kf as jt,gm as k,ds as kn,ip as kt,uy as l,bu as ln,bi as lr,Dm as lt,Kv as m,Os as mn,r as mr,$p as mt,dy as n,kd as nn,Ni as nr,Fm as nt,ty as o,Y as on,Ei as or,Bm as ot,ny as p,Tc as pn,Pn as pr,_m as pt,Rm as q,aa as qn,eu as qt,sy as r,Pd as rn,Vi as rr,Qp as rt,hy as s,mu as sn,xi as sr,Vm as st,By as t,Q as tn,Li as tr,om as tt,ay as u,xl as un,Di as ur,em as ut,Xv as v,Es as vn,_p as vt,by as w,bs as wn,Fp as wt,fy as x,Cs as xn,Jp as xt,ky as y,xs as yn,vp as yt,cm as z,z as zn,Ju as zt};