@swirls/looms 0.21.0 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @swirls/looms
2
2
 
3
+ ## 0.22.0
4
+
5
+ ### Minor Changes
6
+
7
+ - a651e3b: `LoomsProvider`, `preloadRunStore` and `createLoomsStore` take `fetch`, `webSocket` and `grant`, so a page on another origin than its host can read a run: `fetch` adds the host's credentials to every HTTP request, and `grant` puts a run's read grant on the requests that read the log, the WebSocket included.
8
+
3
9
  ## 0.21.0
4
10
 
5
11
  ### Minor Changes
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-DcJehTYv.js","./rolldown-runtime-CbXtAM7H.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./routes-Ch30UGik.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),Wn=(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))(Wn||{});function Gn({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 Kn(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 qn=[],Jn=0,{link:Yn,unlink:Xn,propagate:Zn,checkDirty:Qn,shallowPropagate:$n}=Gn({update(e){return e._update()},notify(e){qn[tr++]=e,e.flags&=~Wn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Wn.Mutable|Wn.Dirty,ar(e))}}),er=0,tr=0,nr,rr=0;function ir(e){try{++rr,e()}finally{--rr||or()}}function ar(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Xn(n,e)}function or(){if(!(rr>0)){for(;er<tr;){let e=qn[er];qn[er++]=void 0,e.notify()}er=0,tr=0}}function sr(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?Wn.None:Wn.Mutable,get(){return nr!==void 0&&Yn(i,nr,Jn),i._snapshot},subscribe(e){let t=Kn(e),n={current:!1},r=cr(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=nr,o=t?.compare??Object.is;if(n)nr=i,++Jn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Wn.Mutable|Wn.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{nr=a,n&&(i.flags&=~Wn.RecursedCheck),ar(i)}}};return n?(i.flags=Wn.Mutable|Wn.Dirty,i.get=function(){let e=i.flags;if(e&Wn.Dirty||e&Wn.Pending&&Qn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&$n(e)}}else e&Wn.Pending&&(i.flags=e&~Wn.Pending);return nr!==void 0&&Yn(i,nr,Jn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Zn(e),$n(e),or())}},i}function cr(e){let t=()=>{let t=nr;nr=n,++Jn,n.depsTail=void 0,n.flags=Wn.Watching|Wn.RecursedCheck;try{return e()}finally{nr=t,n.flags&=~Wn.RecursedCheck,ar(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Wn.Watching|Wn.RecursedCheck,notify(){let e=this.flags;e&Wn.Dirty||e&Wn.Pending&&Qn(this.deps,this)?t():this.flags=Wn.Watching},stop(){this.flags=Wn.None,this.depsTail=void 0,ar(this)}};return t(),n}var lr=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})),ur=t(((e,t)=>{t.exports=lr()})),dr=t((e=>{var t=r(),n=ur();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}})),fr=t(((e,t)=>{t.exports=dr()}))();function pr(e,t){return e===t}function mr(e,t,n=pr){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,fr.useSyncExternalStoreWithSelector)(r,a,a,t,n)}var hr={};function gr(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 _r(e){let t=Vn(),n=i.useContext(e.from?Un:Hn),r=e.from??n,a=t.stores.getMatchStore(r),o=gr(e,t),s=mr(a,e=>e?o(e):hr);if(s!==hr)return s;(e.shouldThrow??!0)&&se()}function vr(e){return _r({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function yr(e){let{select:t,...n}=e;return _r({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function br(e){return _r({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 xr(e){return _r({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Sr(e){let t=Vn();return i.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Cr(e){return _r({...e,select:t=>e.select?e.select(t.context):t.context})}function wr(e){let t=i.useRef(e);return x(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Tr(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Er(e,t,n){if(e?.external)return re(e.href,n)?void 0:e.href;if(!Lr(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),re(t,n)?void 0:t}catch{}}function Dr(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 Or(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=wr(e.search),_e=wr(e.params),ve=wr(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=Ir(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,S),i=Er(r,d,n.protocolAllowlist);return[r?.href,i,Dr(e,t,ve,n.basepath,he,i!==void 0)]},[ve,S,he,ye,n,d]),[xe,Se,Ce]=mr(n.stores.location,be,Tr),we=Ce?u(a,{})??Ar:kr,Te=Ce?kr:u(o,{})??kr,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){Pr(r);return}if(!(e.isIntersecting??ke===`intent`)){e.isIntersecting===!1&&Pr(r);return}if(!Ae){je();return}Nr.has(r)||Nr.set(r,setTimeout(()=>{Nr.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`&&Pr(r)};return{...E,...we,...Te,href:xe,ref:r,onClick:Fr([te,Ne]),onBlur:Fr([ne,Fe]),onFocus:Fr([re,Me]),onMouseEnter:Fr([ie,Me]),onMouseLeave:Fr([ae,Fe]),onTouchStart:Fr([oe,Pe]),disabled:!!S,target:x,...De&&{style:De},...Ee&&{className:Ee},...S&&jr,...Ce&&Mr}}var kr={},Ar={className:`active`},jr={role:`link`,"aria-disabled":!0},Mr={"data-status":`active`,"aria-current":`page`},Nr=new WeakMap,Pr=e=>{clearTimeout(Nr.get(e)),Nr.delete(e)},Fr=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Ir(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Lr(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Rr=i.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:a,...o}=Or(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)}),zr=class extends jn{constructor(e){super(e),this.useMatch=e=>_r({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Cr({...e,from:this.id}),this.useSearch=e=>xr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>br({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>yr({...e,from:this.id}),this.useLoaderData=e=>vr({...e,from:this.id}),this.useNavigate=()=>Sr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,D.jsx)(Rr,{ref:t,from:this.fullPath,...e}))}};function Br(e){return new zr(e)}var Vr=class extends Mn{constructor(e){super(e),this.useMatch=e=>_r({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Cr({...e,from:this.id}),this.useSearch=e=>xr({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>br({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>yr({...e,from:this.id}),this.useLoaderData=e=>vr({...e,from:this.id}),this.useNavigate=()=>Sr({from:this.fullPath}),this.Link=i.forwardRef((e,t)=>(0,D.jsx)(Rr,{ref:t,from:this.fullPath,...e}))}};function Hr(e){return new Vr(e)}function Ur(e){return e=>{let t=Br(e);return t.isRoot=!1,t}}function Wr(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 Gr(e){let t=Vn(),n=`not-found-${mr(t.stores.location,e=>e.pathname)}-${mr(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 Kr(){return(0,D.jsx)(`p`,{children:`Not Found`})}function qr(e){return(0,D.jsx)(D.Fragment,{children:e.children})}function Jr(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)(Kr,{})}function Yr(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,D.jsx)(n,{}):null}var Xr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Zr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Qr=i.memo(function({routeId:e}){let t=Vn();return(0,D.jsx)($r,{router:t,match:mr(t.stores.getMatchStore(e),e=>e)})});function $r({router:e,match:t}){let n=e.routesById[t.routeId],r=Yr(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=Zr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||c))?i.Suspense:qr,u=a?Fn:qr,d=s?Gr:qr;return(0,D.jsxs)(n.isRoot?n.options.shellComponent??qr:qr,{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)(ei,{match:t})}):(0,D.jsx)(ei,{match:t})})})})}),null]})}var ei=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)(ti,{})},[a,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Zr(t,r,e.ssr))return o;if(t._tx)throw t._tx[5];return Yr(t,r)}if(e.status===`notFound`)return Jr(t,r,e.error);if(e.status===`error`)throw e.error;return o}),ti=i.memo(function(){let e=Vn(),t=i.useContext(Hn),n,r,a;{let i=e.stores.getMatchStore(t);[n,r]=mr(i,e=>[!!e._notFound,e.error],Xr),a=mr(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Jr(e,e.routesById[t],r);if(!a)return null;let o=(0,D.jsx)(Qr,{routeId:a});return t===`__root__`?(0,D.jsx)(i.Suspense,{fallback:Yr(e),children:o}):o});function ni(e,t){let n=e[1];e.length=0,n?.(t)}function ri({t:e}){let t=Vn(),n=t._rendered??=[];return t.startTransition=(r,a)=>new Promise(o=>{ni(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 ii(){let e=Vn(),t=e.routesById[lt],n=Yr(e,t),r=e.ssr?qr:i.Suspense,a=(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(ri,{t:i.useState()[1]}),(0,D.jsx)(r,{fallback:n,children:(0,D.jsx)(ai,{})})]});return e.options.InnerWrap?(0,D.jsx)(e.options.InnerWrap,{children:a}):a}function ai(){let e=Vn(),t=e._rendered,n=mr(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;o(()=>{t[0]===n&&ni(t,!0)},[t,n]);let a=i?(0,D.jsx)(Qr,{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 oi=e=>({createMutableStore:sr,createReadonlyStore:sr,batch:ir}),si=e=>new ci(e),ci=class extends At{constructor(e){super(e,oi)}};function li({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 ui({router:e,...t}){return(0,D.jsx)(li,{router:e,...t,children:(0,D.jsx)(ii,{})})}var di=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}}}})),fi=t(((e,t)=>{t.exports=di()})),pi=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`})),mi=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=pi()})),hi=t((e=>{var t=fi(),n=r(),i=mi();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
  `)},$l=e=>Gl(e).map(eu).join(`
20
20
  `),eu=e=>e.cause?`${e.stack} {\n${tu(e.cause,` `)}\n}`:e.stack,tu=(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${tu(e.cause,`${t} `)}\n${t}}`),r},nu=`~effect/Fiber`,ru={_A:xi,_E:xi},iu={id:0},au=(()=>{try{return globalThis.process?.getBuiltinModule?.(`node:async_hooks`)?.AsyncResource}catch{return}})(),ou=()=>au===void 0?void 0:new au(`effect/Fiber`),su=()=>globalThis[Na],cu=class{constructor(e,t=!0){this.setContext(e),this.id=++iu.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=void 0,this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._autoYielded=!1,this._running=!1,this._deferredInterrupt=!1,this._parent=void 0,this._asyncContext=void 0,this.cache.runtimeMetrics?.recordFiberStart(this.context)}get[nu](){return ru}get currentDispatcher(){return this._dispatcher??=this.cache.scheduler.makeDispatcher()}getRef(e){return uc(this.context,e)}addObserver(e){return this._exit?(e(this._exit),Di):(this._observers===void 0?this._observers=[e]:this._observers.push(e),()=>this.removeObserver(e))}removeObserver(e){if(this._exit||this._observers===void 0)return;let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)}interruptUnsafe(e,t){if(this._exit)return;let n=zl(e);this.cache.stackFrame&&(n=Oo(n,oc(Io,this.cache.stackFrame))),t&&(n=Oo(n,t)),this._interruptedCause=this._interruptedCause?Co(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(Su(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._asyncContext!==void 0){let t=this._asyncContext;this._asyncContext=void 0;try{return t.runInAsyncScope(this.evaluate,this,e)}finally{t.emitDestroy()}}else if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===uo){this._asyncContext=ou();return}let n=fu.interruptChildren&&fu.interruptChildren(this);if(n!==void 0)return this.evaluate(cd(n,()=>t));if(this._exit=t,this.cache.runtimeMetrics?.recordFiberEnd(this.context,this._exit),this._parent&&=(this._parent._children?.delete(this),void 0),this._observers!==void 0){let e=this._observers;this._observers=void 0;for(let n=0;n<e.length;n++)e[n](t)}this._stack.length=0,this._children=void 0,this.context=ic();let r=this.cache;(r.span!==void 0||r.stackFrame!==void 0)&&(this.cache={...r,span:void 0,stackFrame:void 0})}runLoop(e){let t=globalThis[Na];globalThis[Na]=this;let n=this._running;this._running=!0;let r=!1,i=this._autoYielded;this._autoYielded=!1;let a=e;this.currentOpCount=+!!i;try{for(;;)try{this._deferredInterrupt&&(this._deferredInterrupt=!1,a=Su(this._interruptedCause)),this.currentOpCount++;let e=this.cache;if(!i&&!r&&!e.preventYield&&e.scheduler.shouldYield(this)?(r=!0,a=this.yieldNow(a,0,!0)):(i=!1,a=e.tracerContext?e.tracerContext(a,this):a[F](this)),a===uo){let e=this._yielded;if(ao in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return uo}}catch(e){if(!j(a,F))return Bo(`Fiber.runLoop: Not a valid effect: ${String(a)}`);a=Bo(e)}}finally{this._running=n,globalThis[Na]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,uu;for(;;){let t=this._stack.pop();if(!t)return;let n=t[lo];if(n!==void 0){let r=n.call(t,this);if(r)return r[e]=r,r}if(t[e])return t}}succeedWith(e){if(!(++this.currentOpCount&du-1))return Fo(e);let t=this.getCont(I);return t?t[I](e,this):this.yieldWith(Fo(e))}yieldWith(e){return this._yielded=e,uo}yieldNow(e,t=0,n=!1){let r=!1;return this.currentDispatcher.scheduleTask(()=>{r||(this._autoYielded=n,this.evaluate(e))},t),this.yieldWith(()=>{r=!0})}children(){return this._children??=new Set}pipe(){return vi(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&tc(t,e))return;let n=e.cacheRoot,r=n._fiberCache??=lu(e);this.cache?.scheduler!==r.scheduler&&(this._dispatcher=void 0),this.cache=r}get currentSpanLocal(){let e=this.cache.span;return e?._tag===`Span`?e:void 0}},lu=e=>{let t=lc(e,kl);return{scheduler:uc(e,_l),tracer:t,tracerContext:t?t.context:void 0,tracerEnabled:uc(e,Ml),span:lc(e,Ol),logLevel:uc(e,Pl),minimumLogLevel:uc(e,Fl),stackFrame:uc(e,jl),runtimeMetrics:lc(e,Al),maxOpsBeforeYield:uc(e,wl),preventYield:uc(e,Tl)}},uu={[I](e,t){return Su(t._interruptedCause)},[co](e,t){return Su(t._interruptedCause)}},du=32,fu={interruptChildren:void 0},pu=e=>{if(!e.cache.stackFrame)return;let t=new Map;return t.set(Lo.key,e.cache.stackFrame),$s(t)},mu=e=>{if(e._children!==void 0&&e._children.size!==0)return bu(e._children)},hu=e=>{let t=e;return t._exit?xu(t._exit):Iu(n=>t._exit?n(xu(t._exit)):wu(e.addObserver(e=>n(xu(e)))))},gu=e=>Iu(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(xu(r))}return a(),wu(()=>i?.())}),_u=e=>{let t=e;return t._exit?t._exit:Iu(n=>t._exit?n(t._exit):wu(e.addObserver(n)))},vu=e=>Vo(t=>yu(e,t.id)),yu=O(e=>j(e[0],nu),(e,t,n)=>Vo(r=>{let i=pu(r);return i=i&&n?mc(i,n):i??n,e.interruptUnsafe(t,i),id(hu(e))})),bu=e=>Vo(t=>{let n=pu(t),r=Ac();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return id(gu(r))}),xu=Fo,Su=Ro,Cu=zo,wu=No({op:`Sync`,[F](e){let t=this[P],n=t(),r=e.getCont(I);return r?r[I](n,e):e.yieldWith(Fo(n))}}),Tu=No({op:`Suspend`,[F](e){let t=this[P];return t()}}),Eu=No({op:`Yield`,[F](e){return e.yieldNow(vd,this[P]??0)}})(0),Du=xu(As()),Ou=e=>Tu(()=>Su(e())),ku=e=>Bo(e),Au=xu(void 0),ju=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new fp(e,`An error occurred in Effect.try`):e.catch;return Tu(()=>{try{return xu(t())}catch(e){return Cu(n(e))}})},Mu=e=>Pu(function(t,n){e(n).then(e=>t(xu(e)),e=>t(ku(e)))},e.length!==0),Nu=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new fp(e,`An error occurred in Effect.tryPromise`):e.catch;return Pu(function(e,r){let i=e=>Tu(()=>{try{return Cu(to(()=>n(e)))}catch(e){return ku(e)}});try{t(r).then(t=>e(xu(t)),t=>e(i(t)))}catch(t){e(i(t))}},t.length!==0)},Pu=function(){let e=V({op:`Async`,[F](e){let t=!1,n=!1,r=this.withSignal?new AbortController:void 0,i=this.register.call(e.cache.scheduler,r=>{t||(t=!0,n?e.evaluate(r):n=r)},r?.signal);return n===!1?(n=!0,e.yieldWith(()=>{t=!0}),r===void 0&&i===void 0||e._stack.push(Fu(()=>(t=!0,r?.abort(),i??vd))),uo):n}}),t=function(e,t){this.register=e,this.withSignal=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),Fu=No({op:`AsyncFinalizer`,[lo](e){e.interruptible&&(e.interruptible=!1,e._stack.push(Ef))},[co](e,t){return Vl(e)?cd(nf(Ro(e),this[P]()),()=>Su(e)):Su(e)}}),Iu=e=>Pu(e,e.length>=2),Lu=Iu(Di),Ru=(...e)=>{if(e.length===1){let t=e[0];return Tu(()=>Wu(t()))}let[t,n]=e;return Tu(()=>Wu(n.call(t.self)))},zu=(e,t)=>typeof e==`function`?e:t.shift().bind(e.self),Bu=(e,...t)=>{let n=zu(e,t),r=t.length===0?function(){return Tu(()=>Wu(n.apply(this,arguments)))}:function(){let e=Tu(()=>Wu(n.apply(this,arguments)));for(let n=0;n<t.length;n++)e=t[n](e,...arguments);return e};return Vu(n.length,r)},Vu=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),Hu=(e,...t)=>{let n=zu(e,t);return Vu(n.length,t.length===0?function(){return Uu(()=>n.apply(this,arguments))}:function(){let e=Uu(()=>n.apply(this,arguments));for(let n of t)e=n(e,...arguments);return e})},Uu=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return xu(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 Tu(()=>n?(n=!1,cd(r.value,e=>Wu(t,e))):Tu(()=>Wu(e())))}}}catch(e){return ku(e)}},Wu=function(){let e=V({op:`Iterator`,[I](e,t){let n=this.iterator;for(;;){let r=n.next(e);if(r.done)return xu(r.value);if(!ld(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[F](e){return this[I](this.initial,e)}}),t=function(e,t){this.iterator=e,this.initial=t};return t.prototype=e,function(e,n){return new t(e,n)}}(),Gu=O(2,(e,t)=>new qu(e,Ju,xu(t))),X=function(e){return e._stack.push(this),this[P]},Ku=V({op:`OnSuccess`,[F]:X}),qu=function(e,t,n){this[P]=e,this[I]=t,this.payload=n};qu.prototype=Ku;var Ju=function(){return this.payload},Yu=function(e,t){return t.succeedWith(this.payload)},Xu=(()=>{let e=Qa();if(e===0)return!1;let t=`~effect/Effect/stackProbe`,n={[t]:function(){return Error()}};$a(1);let r=n[t]();return $a(e),r.stack?.includes(`[as `+t+`]`)===!0})(),Zu=function(e,t){let n=this.payload;return t.succeedWith(Xu?n(e):to(()=>n(e)))},Qu=function(e){let t=this.payload;return t(e)},$u=function(e){let t=this.payload;return new qu(t(e),Yu,e)},ed=function(e){return new qu(this.payload,Yu,e)},td=e=>fd(e,js),nd=O(2,(e,t)=>new qu(e,L(t)?Ju:Qu,t)),rd=O(2,(e,t)=>new qu(e,L(t)?ed:$u,t)),id=e=>new qu(e,Ju,vd),ad=(e,t)=>Vo(n=>{let r=new Set;return vf(n,()=>r.size===0?void 0:bu(r)),Iu(i=>{let a=!1,o=0;for(let s of e){if(a)break;let e=o++,c=Rf(n,s,!0,!0,!1);r.add(c),c.addObserver(o=>{r.delete(c);let s=!a;a=!0,i(o),s&&(od(r,n),t?.onWinner?.({fiber:c,index:e,parentFiber:n}))})}})}),od=(e,t)=>{let n=pu(t);for(let r of e)r.interruptUnsafe(t.id,n)},sd=O(e=>L(e[1]),(e,t,n)=>ad([e,t],n)),cd=O(2,(e,t)=>new qu(e,Qu,t)),ld=e=>e[ao]!==void 0,ud=O(2,(e,t)=>ld(e)?e._tag===`Success`?t(e.value):e:cd(e,t)),dd=e=>cd(e,xi),fd=O(2,(e,t)=>new qu(e,Zu,t)),pd=O(2,(e,t)=>ld(e)?yd(e,t):fd(e,t)),md=e=>Ro(zl(e)),hd=e=>e._tag===`Success`,gd=e=>e._tag===`Failure`,_d=e=>e._tag===`Failure`?_c(e.cause):vc(e),vd=Fo(void 0),yd=O(2,(e,t)=>e._tag===`Success`?Fo(t(e.value)):e),bd=O(2,(e,t)=>hd(e)?t:e),Z=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?vd:Ro(bo(t))},xd=O(2,(e,t)=>Vo(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),vf(n,()=>{n.setContext(r)}),e)})),Sd=()=>Cd,Cd=Vo(e=>xu(e.context)),wd=e=>Vo(t=>e(t.context)),Td=O(2,(e,t)=>ld(e)?e:xd(e,mc(t))),Ed=function(){return arguments.length===1?O(2,(e,t)=>Dd(e,arguments[0],t)):O(3,(e,t,n)=>Dd(e,t,n)).apply(this,arguments)},Dd=(e,t,n)=>xd(e,sc(t,n)),Od=O(e=>L(e[0]),(e,t)=>Mf({while:Ci,body:Si(t?.disableYield?e:cd(e,e=>Eu)),step:Di})),kd=O(2,(e,t)=>new jd(e,t.length===1?t:e=>t(e))),Ad=V({op:`OnFailure`,[F]:X}),jd=function(e,t){this[P]=e,this[co]=t};jd.prototype=Ad;var Md=O(3,(e,t,n)=>kd(e,e=>{let r=t(e);return bc(r)?Su(r.failure):n(r.success,e)})),Nd=O(2,(e,t)=>Md(e,Y,e=>t(e))),Q=O(2,(e,t)=>Md(e,Bl,t)),Pd=O(3,(e,t,n)=>kd(e,e=>{let r=t(e);return bc(r)?Su(e):nd(n(r.success,e),Su(e))})),Fd=O(2,(e,t)=>Pd(e,K,e=>t(e))),Id=O(e=>L(e[0]),(e,t,n,r)=>kd(e,e=>{let i=Y(e);return bc(i)?Su(i.failure):t(i.success)?n(i.success):r?r(i.success):Su(e)})),Ld=O(2,(e,t)=>kd(e,e=>Su(Ul(e,t)))),Rd=e=>e===`Unhandled`?(...e)=>Vo(t=>{let n=t.getRef(Il);return n===void 0?Au:xp(n)(...e)}):xp(e===!0?void 0:e),zd=O(e=>L(e[0]),(e,t)=>{if(!t?.log)return Kd(e,{onFailure:e=>Au,onSuccess:e=>Au});let n=Rd(t.log);return Vd(e,{onFailure(e){let r=Y(e);return bc(r)?Su(r.failure):t.message===void 0?n(e):n(t.message,e)},onSuccess:e=>Au})}),Bd=O(e=>L(e[0]),(e,t)=>{if(!t?.log)return Vd(e,{onFailure:e=>Au,onSuccess:e=>Au});let n=Rd(t.log);return Vd(e,{onFailure:e=>t.message===void 0?n(e):n(t.message,e),onSuccess:e=>Au})}),Vd=O(2,(e,t)=>new Ud(e,t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),t.onFailure.length===1?t.onFailure:e=>t.onFailure(e))),Hd=V({op:`OnSuccessAndFailure`,[F]:X}),Ud=function(e,t,n){this[P]=e,this[I]=t,this[co]=n};Ud.prototype=Hd;var Wd=function(e,t){let n=this.payload;return t.succeedWith(Xu?n.onSuccess(e):to(()=>n.onSuccess(e)))},Gd=((e,t)=>{let n=V({op:e,[F]:X,[I]:Wd,[co]:t}),r=function(e,t){this[P]=e,this.payload=t};return r.prototype=n,r})(`Match`,function(e,t){let n=Y(e);if(bc(n))return Su(n.failure);let r=this.payload;return t.succeedWith(Xu?r.onFailure(n.success):to(()=>r.onFailure(n.success)))}),Kd=O(2,(e,t)=>Vd(e,{onFailure:e=>{let n=Y(e);return bc(n)?Su(n.failure):t.onFailure(n.success)},onSuccess:t.onSuccess})),qd=O(2,(e,t)=>new Gd(e,t)),Jd=e=>ld(e)?Fo(e):Yd(e),Yd=No({op:`Exit`,[F](e){return e._stack.push(this),this[P]},[I](e,t,n){return t.succeedWith(n??Fo(e))},[co](e,t,n){return t.succeedWith(n??Ro(e))}}),Xd=`~effect/Scope`,Zd=`~effect/Scope/Closeable`,Qd=Vs(`effect/Scope`),$d=(e,t)=>Vo(n=>(kf(n),ef(e,t)??Au)),ef=(e,t)=>{let n=e.state;if(n._tag===`Closed`||(e.state={_tag:`Closed`,exit:t},e.parent!==void 0&&lf(e.parent,e),n._tag===`Empty`))return;if(n.finalizer!==void 0)return tf(n.finalizer,t);let r=n.finalizers;return r.size===1?tf(r.values().next().value,t):rf(e,r,t)},tf=(e,t)=>{try{return e(t)}catch(e){return Bo(e)}},nf=(e,t)=>hd(e)?t:kd(t,t=>Su(J(So(e.cause,t)))),rf=Bu(function*(e,t,n){let r=[],i=[],a=Array.from(t),o=su();for(let t=a.length-1;t>=0;t--){let[s,c]=a[t];e.strategy===`sequential`?r.push(yield*Jd(tf(c,n))):s!==o&&i.push(Rf(o,tf(c,n),!0,!0,`inherit`))}return i.length>0&&(r=yield*gu(i)),yield*Z(r)}),af=(e,t)=>{let n=df(t,e);return e.state._tag===`Closed`?(n.state=e.state,n):(cf(e,n,e=>$d(n,e)),n)},of=(e,t)=>Tu(()=>e.state._tag===`Closed`?t(e.state.exit):(cf(e,{},t),Au)),sf=(e,t)=>of(e,Si(t)),cf=(e,t,n)=>{if(e.state._tag===`Empty`)e.state={_tag:`Open`,finalizerKey:t,finalizer:n,finalizers:void 0};else if(e.state._tag===`Open`){let r=e.state;r.finalizer===void 0?r.finalizers.set(t,n):(r.finalizers=new Map([[r.finalizerKey,r.finalizer]]),r.finalizerKey=void 0,r.finalizer=void 0,r.finalizers.set(t,n))}},lf=(e,t)=>{if(e.state._tag!==`Open`)return;let n=e.state;n.finalizerKey===t?e.state=ff:n.finalizers!==void 0&&(n.finalizers.delete(t),n.finalizers.size===0&&(e.state=ff))},uf=e=>df(e,void 0),df=(e=`sequential`,t)=>({[Zd]:Zd,[Xd]:Xd,strategy:e,parent:t,state:ff}),ff={_tag:`Empty`},pf=Qd,mf=Ed(Qd),hf=e=>cd(pf,t=>wd(n=>of(t,t=>Td(e(t),n)))),gf=function(){let e=V({op:`OnExit`,[F](e){return e._stack.push(this),this.effect},[lo](e){e.interruptible&&this.interruptible!==!0&&(e._stack.push(Ef),e.interruptible=!1)},[I](e,t,n){n??=Fo(e);let r;try{r=this.onExit(n)}catch(e){r=Bo(e)}return r?cd(r,e=>n):n},[co](e,t,n){n??=Ro(e);let r;try{r=this.onExit(n)}catch(e){r=Bo(e)}return r?cd(nf(n,r),e=>n):n}}),t=function(e,t,n){this.effect=e,this.onExit=t,this.interruptible=n};return t.prototype=e,t}(),_f=(e,t,n)=>new gf(e,t,n),vf=(e,t)=>{e._stack.push(new gf(void 0,t,void 0))},yf=O(2,_f),bf=O(2,(e,t)=>yf(e,e=>t)),xf=O(3,(e,t,n)=>yf(e,e=>{let r=t(e);return bc(r)?Au:n(r.success,e)})),Sf=O(2,(e,t)=>xf(e,_d,t)),Cf=(e,t,n)=>jf(r=>cd(e,e=>_f(Tu(()=>r(t(e))),t=>n(e,t),!0))),wf=e=>Vo(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Ef),e):e),Tf=No({op:`SetInterruptible`,[lo](e){if(e.interruptible=this[P],e._interruptedCause&&e.interruptible)return()=>Su(e._interruptedCause)}}),Ef=Tf(!0),Df=Tf(!1),Of=e=>{if(e.interruptible=!0,e._stack.push(Df),e._interruptedCause)return Su(e._interruptedCause)},kf=e=>{let t=e;t.interruptible&&(t.interruptible=!1,t._stack.push(Ef))},Af=e=>Vo(t=>t.interruptible?e:Of(t)??e),jf=e=>Vo(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Ef),e(Af)):e(xi)),Mf=No({op:`While`,[I](e,t){return this[P].step(e),this[P].while()?(t._stack.push(this),this[P].body()):vd},[F](e){return this[P].while()?(e._stack.push(this),this[P].body()):vd}}),Nf=e=>e===`unbounded`?1/0:Math.max(1,e??1),Pf=()=>e=>{let t=e.onItem,n=e.step,r=(e,t,r,a,o)=>cd(Jd(o),o=>n(e,t[r],o,r)??i(e,t,r+1,a)??Au),i=(e,i,a=0,o=i.length)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!ld(c))return r(e,i,a,o,c);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return i},Ff=e=>{let t=e.onItem,n=e.step;return(e,r,i)=>{let a=0,o=i.end??r.length,s=i.concurrency,c=!1,l,u,d,f,p,m=e=>{let t=Bo(e);return f=t,c=!0,u&&u.size>0?cd(wf(bu(Array.from(u))),()=>f??t):t},h=()=>{let i=!1;for(;!f&&a<o;a++){let o=r[a],g=p??t(e,o,a);if(ld(g)){if(f=n(e,o,g,a),f)break}else if(l){p=void 0;let t=Rf(l,g,!0,!0,`inherit`);if(t._exit){if(f=n(e,o,t._exit,a),f)break;continue}u.add(t);let r=a;if(t.addObserver(a=>{u.delete(t);try{if(f){if(a._tag===`Failure`){let e=a.cause.reasons.filter(e=>e._tag!==`Interrupt`);if(e.length>0){let t=bo(e);f=Ro(f._tag===`Failure`?J(So(f.cause,t)):t)}}}else{let t=n(e,o,a,r);t&&(f=t,h())}if(i){let e=h();e&&d(e)}else c&&u.size===0&&d(f??Au)}catch(e){d(m(e))}}),u.size<s)continue;i=!0,a++;return}else return Iu(e=>{l=su(),u=new Set,p=g,d=e;let t;try{t=h()}catch(t){return e(m(t))}return t?e(t):Tu(()=>(f??=vd,cd(u?bu(u):Au,()=>f?._tag===`Failure`?f:Au)))})}if(c=!0,f){if(u&&u.size>0){let e=pu(l);u.forEach(t=>t.interruptUnsafe(l.id,e));return}if(d||f._tag===`Failure`)return f}else if(d){if(u)u.size===0&&d(Au);else return vd}};return h()}},If=()=>e=>Ff(e),Lf=O(e=>L(e[0]),(e,t)=>Vo(n=>(Ep(),xu(Rf(n,e,t?.startImmediately,!1,t?.uninterruptible??!1))))),Rf=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new cu(a.context,o);return r||(a.children().add(s),s._parent=a),n?s.evaluate(t):(s._asyncContext=ou(),a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0)),s},zf=e=>()=>Vo(t=>t===e?Au:vu(e)),Bf=O(e=>L(e[0]),(e,t,n)=>Vo(r=>{let i=t.state._tag===`Closed`?new cu(r.context):Rf(r,e,n?.startImmediately,!0,n?.uninterruptible);return i._exit||(t.state._tag===`Closed`?i.interruptUnsafe(r.id,pu(r)):(cf(t,i,zf(i)),i.addObserver(()=>lf(t,i)))),xu(i)})),Vf=e=>(t,n)=>{let r=new cu(n?.scheduler?sc(e,_l,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},Hf=O(2,(e,t)=>e._exit?e:t.state._tag===`Closed`?(e.interruptUnsafe(e.id),e):(lf(t,e),cf(t,e,zf(e)),e.addObserver(()=>lf(t,e)),e)),Uf=Vf(ic()),Wf=e=>{let t=Vf(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},Gf=e=>{let t=Wf(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw Wl(e.cause);return e.value})},Kf=Gf(ic()),qf=(e=>{let t=Vf(e);return e=>{if(ld(e))return e;let n=new Sl(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??Bo(new up(r))}})(ic()),Jf=xu(!0),Yf=xu(!1),Xf=class{waiters=[];scheduled=void 0;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){if(this.waiters.length===0)return Jf;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=[],Jf}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](vd)};flushWaiters(){let e=this.waiters;this.waiters=[],this.flushScheduled();for(let t=0;t<e.length;t++)e[t](vd)}open=Vo(e=>this._isOpen?Yf:(this._isOpen=!0,this.scheduleUnsafe(e)));release=Vo(e=>this._isOpen?Yf:this.scheduleUnsafe(e));openUnsafe(){return!this._isOpen&&(this._isOpen=!0,this.flushWaiters(),!0)}await=Iu(e=>this._isOpen?e(Au):(this.waiters.push(e),wu(()=>{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=wu(()=>this.closeUnsafe());whenOpen=e=>cd(this.await,()=>e);isOpen(){return this._isOpen}},Zf=e=>new Xf(e??!1),Qf=e=>wu(()=>Zf(e)),$f=hc(`effect/Clock`,{defaultValue:()=>new tp}),ep=2**31-1,tp=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=wu(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return ip()}currentTimeNanos=wu(()=>this.currentTimeNanosUnsafe());monotonicTimeNanosUnsafe(){return rp()}monotonicTimeNanos=wu(()=>this.monotonicTimeNanosUnsafe());sleep(e){return this.sleepMillis(dl(e))}sleepMillis(e){return e<=0?Eu:Number.isFinite(e)?Iu(t=>{let n=e>ep?this.sleepMillis(e-ep):Au,r=setTimeout(()=>t(n),Math.min(e,ep));return wu(()=>clearTimeout(r))}):Lu}},np=BigInt(1e6),rp=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())*np;return e>t&&(t=e),t}}(),ip=function(){let e=BigInt(1e9),t;return()=>{let n=rp(),r=BigInt(Date.now())*np;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}}(),ap=e=>Vo(t=>e(t.getRef($f))),op=e=>ap(t=>t.sleep(Qc(e))),sp=`~effect/Cause/IllegalArgumentError`,cp=class extends Wo(`IllegalArgumentError`){[sp]=sp;constructor(e){super({message:e})}},lp=`~effect/Cause/AsyncFiberError`,up=class extends Wo(`AsyncFiberError`){[lp]=lp;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},dp=`~effect/Cause/UnknownError`,fp=class extends Wo(`UnknownError`){[dp]=dp;constructor(e,t){super({message:t,cause:e})}},pp=hc(`effect/Console`,{defaultValue:()=>globalThis.console}),mp=ks(Os(Ds,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}})),hp=hc(`effect/Logger/CurrentLoggers`,{defaultValue:()=>new Set([wp,Tp])}),gp=hc(`effect/Logger/LogToStderr`,{defaultValue:wi}),_p={"~effect/Logger":{_Message:xi,_Output:xi},pipe(){return vi(this,arguments)}},vp=e=>{let t=Object.create(_p);return t.log=e,t},yp=e=>e.replace(/[\s="]/g,`_`),bp=(e,t)=>`${yp(e[0])}=${t-e[1]}ms`,xp=e=>(...t)=>{let n;for(let e=0,r=t.length;e<r;e++){let r=t[e];z(r)&&(n?t.splice(e,1):t=t.slice(0,e).concat(t.slice(e+1)),n=n?bo(n.reasons.concat(r.reasons)):r,e--)}return n===void 0&&(n=wo),Vo(r=>{let i=e??r.cache.logLevel;if(mp(r.cache.minimumLogLevel,i))return Au;let a=r.getRef($f),o=r.getRef(hp);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 Au})},Sp={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};Sp.gray,Sp.blue,Sp.green,Sp.yellow,Sp.red,Sp.bgBrightRed,Sp.black;var Cp=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`)}`,wp=vp(({cause:e,date:t,fiber:n,logLevel:r,message:i})=>{let a=Array.isArray(i)?i.slice():[i];e.reasons.length>0&&a.push($l(e));let o=t.getTime(),s=n.getRef(Ll),c=``;for(let e of s)c+=` ${bp(e,o)}`;let l=n.getRef(Nl);Object.keys(l).length>0&&a.push(l);let u=n.getRef(pp);(n.getRef(gp)?u.error:u.log)(`[${Cp(t)}] ${r.toUpperCase()} (#${n.id})${c}:`,...a)}),Tp=vp(({cause:e,fiber:t,logLevel:n,message:r})=>{let i=t.getRef($f),a=t.getRef(Nl),o=t.cache.span;if(o===void 0||o._tag===`ExternalSpan`||o.status._tag===`Ended`)return;let s={};for(let[e,t]of Object.entries(a))no(s,e,t);s[`effect.fiberId`]=t.id,s[`effect.logLevel`]=n.toUpperCase(),e.reasons.length>0&&(s[`effect.cause`]=$l(e)),o.event(Ya(Array.isArray(r)&&r.length===1?r[0]:r),i.currentTimeNanosUnsafe(),s)});function Ep(){fu.interruptChildren??=mu}var Dp=ko,Op=bo,kp=Do,Ap=Hl,jp=Ul,Mp=Wl,Np=$l,Pp=Ko,Fp=Xo,Ip=cp,Lp=Fo,Rp=Ro,zp=zo,Bp=Bo,Vp=md,Hp=vd,Up=hd,Wp=gd,Gp=Z,Kp=`~effect/DateTime`,qp=`~effect/DateTime/TimeZone`,Jp={[Kp]:Kp,pipe(){return vi(this,arguments)},[qa](){return this.toString()},toJSON(){return Em(this).toJSON()}},Yp={...Jp,_tag:`Utc`,[Yi](){return na(this.epochMilliseconds)},[N](e){return am(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${Em(this).toJSON()})`}},Xp={...Jp,_tag:`Zoned`,[Yi](){return Qi(na(this.epochMilliseconds))(M(this.zone))},[N](e){return am(e)&&e._tag===`Zoned`&&this.epochMilliseconds===e.epochMilliseconds&&ma(this.zone,e.zone)},toString(){return`DateTime.Zoned(${Bm(this)})`}},Zp={[qp]:qp,[qa](){return this.toString()}},Qp={...Zp,_tag:`Named`,[Yi](){return ra(`Named:${this.resolvedId}`)},[N](e){return sm(e)&&e._tag===`Named`&&this.resolvedId===(e.resolvedId??e.id)},toString(){return`TimeZone.Named(${this.id})`},toJSON(){return{_id:`TimeZone`,_tag:`Named`,id:this.id}}},$p={...Zp,_tag:`Offset`,[Yi](){return ra(`Offset:${this.offset}`)},[N](e){return sm(e)&&e._tag===`Offset`&&this.offset===e.offset},toString(){return`TimeZone.Offset(${km(this.offset)})`},toJSON(){return{_id:`TimeZone`,_tag:`Offset`,offset:this.offset}}},em={value:void 0,enumerable:!1,writable:!0},tm=new WeakMap,nm=(e,t)=>({get(){return Object.isExtensible(this)?void 0:tm.get(this)?.[e]},set(n){if(Object.isExtensible(this)){for(let e of t)Object.defineProperty(this,e,em);this[e]=n}else{let t=tm.get(this);t===void 0&&(t={},tm.set(this,t)),t[e]=n}}}),rm=[`partsUtc`,`adjustedEpochMilliseconds`,`partsAdjusted`];Object.defineProperty(Yp,"partsUtc",nm(`partsUtc`,[`partsUtc`])),Object.defineProperties(Xp,{partsUtc:nm(`partsUtc`,rm),adjustedEpochMilliseconds:nm(`adjustedEpochMilliseconds`,rm),partsAdjusted:nm(`partsAdjusted`,rm)});var im=(e,t,n)=>{let r=Object.create(Xp);return r.epochMilliseconds=e,r.zone=t,n!==void 0&&(r.partsUtc=n),r},am=e=>j(e,Kp),om=e=>am(e[0]),sm=e=>j(e,qp),cm=e=>sm(e)&&e._tag===`Named`,lm=e=>e._tag===`Zoned`,um=e=>{let t=Object.create(Yp);return t.epochMilliseconds=e,t},dm=e=>{let t=e.getTime();if(Number.isNaN(t))throw new Ip(`Invalid date`);return um(t)},fm=e=>{if(am(e))return e;if(e instanceof Date)return dm(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return dm(new Date(e.epochMilliseconds));let t=new Date(0);return Mm(t,e),dm(t)}return typeof e==`string`&&!pm(e)?dm(new Date(e+`Z`)):dm(new Date(e))},pm=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e)||/z$|gmt$/i.test(e),mm=-864e13+432e5,hm=864e13-504e5,gm=(e,t)=>{let n=t?.timeZone;if(n===void 0&&am(e)&&lm(e))return e;let r=fm(e);if(r.epochMilliseconds<mm||r.epochMilliseconds>hm)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=Sm(new Date(r.epochMilliseconds).getTimezoneOffset()*-60*1e3);else if(sm(n))i=n;else if(typeof n==`number`)i=Sm(n);else{let e=Tm(n);if(Ms(e))throw new Ip(`Invalid time zone: ${n}`);i=e.value}return t?.adjustForTimeZone===!0?Pm(r.epochMilliseconds,i,t?.disambiguation??`compatible`):im(r.epochMilliseconds,i,r.partsUtc)},_m=()=>um(Date.now()),vm=new Map,ym={day:`numeric`,month:`numeric`,year:`numeric`,era:`short`,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`longOffset`,fractionalSecondDigits:3,hourCycle:`h23`},bm=(e,t,n=t)=>{let r=vm.get(n);if(r!==void 0)return r;let i=Object.create(Qp);return i.id=n,i.resolvedId=t,i.format=e,vm.set(n,i),i},xm=e=>{let t=vm.get(e);if(t!==void 0)return t;try{let t=new Intl.DateTimeFormat(`en-US`,{...ym,timeZone:e}),n=t.resolvedOptions().timeZone,r=bm(t,n,n.toLowerCase()===e.toLowerCase()?n:e);return vm.set(e,r),r}catch{throw new Ip(`Invalid time zone: ${e}`)}},Sm=e=>{let t=Object.create($p);return t.offset=e,t},Cm=Rs(xm),wm=/^(?:GMT)?[+-]/,Tm=e=>{if(wm.test(e)){let t=Im(e);return t===null?As():js(Sm(t))}return Cm(e)},Em=e=>new Date(e.epochMilliseconds),Dm=e=>{if(e._tag===`Utc`)return new Date(e.epochMilliseconds);if(e.zone._tag===`Offset`)return new Date(e.epochMilliseconds+e.zone.offset);if(e.adjustedEpochMilliseconds!==void 0)return new Date(e.adjustedEpochMilliseconds);let t=!1,n=e.zone.format.formatToParts(e.epochMilliseconds).filter(e=>e.type===`era`?(t=e.value===`BC`,!1):e.type!==`literal`),r=Number(n[2].value),i=new Date(0);return i.setUTCFullYear(t?1-r:r,Number(n[0].value)-1,Number(n[1].value)),i.setUTCHours(Number(n[3].value),Number(n[4].value),Number(n[5].value),n[6]?.type===`fractionalSecond`?Number(n[6].value):(e.epochMilliseconds%1e3+1e3)%1e3),e.adjustedEpochMilliseconds=i.getTime(),i},Om=e=>Dm(e).getTime()-jm(e),km=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`)}`},Am=e=>km(Om(e)),jm=e=>e.epochMilliseconds,Mm=(e,t)=>{if((t.year!==void 0||t.month!==void 0||t.day!==void 0)&&e.setUTCFullYear(t.year??e.getUTCFullYear(),t.month===void 0?e.getUTCMonth():t.month-1,t.day??e.getUTCDate()),t.weekDay!==void 0){let n=t.weekDay-e.getUTCDay();e.setUTCDate(e.getUTCDate()+n)}t.hour!==void 0&&e.setUTCHours(t.hour),t.minute!==void 0&&e.setUTCMinutes(t.minute),t.second!==void 0&&e.setUTCSeconds(t.second),t.millisecond!==void 0&&e.setUTCMilliseconds(t.millisecond)},Nm=864e5,Pm=(e,t,n)=>{if(t._tag===`Offset`)return im(e-t.offset,t);let r=Lm(e-Nm,e,t),i=Lm(e+Nm,e,t);if(r===i)return im(e-r,t);let a=r<i,o=r-i;if(a){if(Lm(e-i,e,t)===i)return im(e-i,t);let a=im(e-r,t);if(e!==Dm(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 im(e-i,t);case`compatible`:case`later`:return a}return a}if(Lm(e-r,e,t)===r){if(n===`earlier`||n===`compatible`||Lm(e-r+o,e+o,t)===r)return im(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 im(e-i,t)},Fm=/([+-])(\d{2}):?(\d{2})$/,Im=e=>{let t=Fm.exec(e);if(t===null)return null;let[,n,r,i]=t;return(n===`+`?1:-1)*(Number(r)*60+Number(i))*60*1e3},Lm=(e,t,n)=>{let r=n.format.formatToParts(e).find(e=>e.type===`timeZoneName`)?.value??``;if(r===`GMT`)return 0;let i=Im(r);return i===null?Om(im(t,n)):i},Rm=O(om,(e,t,n)=>{if(e._tag===`Utc`){let n=Em(e);return t(n),um(n.getTime())}let r=Dm(e),i=new Date(r.getTime());return t(i),Pm(i.getTime(),e.zone,n?.disambiguation??`compatible`)}),zm=e=>{let t=Dm(e);return e._tag===`Utc`?t.toISOString():`${t.toISOString().slice(0,-1)}${Am(e)}`},Bm=e=>e.zone._tag===`Offset`?zm(e):`${zm(e)}[${e.zone.id}]`,Vm=L,Hm=Mu,Um=Nu,Wm=xu,Gm=Tu,Km=wu,qm=Au,Jm=Iu,Ym=Lu,Xm=Ru,Zm=Cu,Qm=Su,$m=Ou,eh=ku,th=ju,nh=Eu,rh=cd,ih=dd,ah=nd,oh=rd,sh=Jd,ch=fd,lh=Gu,uh=Nd,dh=kd,fh=Q,ph=Id,mh=Ld,hh=Fd,gh=zd,_h=Bd,vh=op,yh=sd,bh=qd,xh=Vd,Sh=Sd,Ch=Cf,wh=hf,Th=bf,Eh=Sf,Dh=Od,Oh=Lf,kh=Bf,Ah=Uf,jh=Vf,Mh=Kf,Nh=Gf,Ph=qf,Fh=Bu,Ih=xp(`Error`),Lh=pd,Rh=ud,zh=Hu,Bh=`~effect/BigDecimal`,Vh={[Bh]:Bh,[Yi](){let e=Yh(this);return Qi(ra(String(e.value)),na(e.scale))},[N](e){return Hh(e)&&tg(this,e)===0},toString(){return`BigDecimal(${rg(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[qa](){return this.toJSON()},pipe(){return vi(this,arguments)}},Hh=e=>j(e,Bh),Uh=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(Vh);return n.value=e,n.scale=t,n},Wh=(e,t)=>{let n=Uh(e,t);return n.normalized=n,n},Gh=BigInt(0),Kh=BigInt(1),qh=BigInt(10),Jh=Wh(Gh,0),Yh=e=>{if(e.normalized===void 0){if(e.value===Gh)e.normalized=Jh;else{let t=`${e.value}`,n=Xh(t);e.normalized=Wh(BigInt(t.slice(0,t.length-n)),e.scale-n)}}return e.normalized},Xh=e=>{let t=e.length;for(;e[t-1]===`0`;)t--;return e.length-t},Zh=100,Qh=[Kh],$h=(e,t)=>e===t?0:e<t?-1:1,eg=(e,t)=>{let n=`${e.value<Gh?-e.value:e.value}`,r=`${t.value<Gh?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==Gh)return i<Gh?-1:1;let a=Math.max(n.length,r.length);return Es(n.padEnd(a,`0`),r.padEnd(a,`0`))},tg=(e,t)=>{if(e.scale===t.scale)return $h(e.value,t.value);let n=ng(e),r=ng(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>Zh)return n===-1?eg(t,e):eg(e,t);let o=Qh[a]??=qh**BigInt(a);return i>0?$h(e.value,t.value*o):$h(e.value*o,t.value)},ng=e=>e.value===Gh?0:e.value<Gh?-1:1,rg=e=>{let t=Yh(e);if(Math.abs(t.scale)>=16)return ig(t);let n=t.value<Gh,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},ig=e=>{if(ag(e))return`0e+0`;let t=Yh(e),n=`${t.value}`,r=t.value<Gh?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},ag=e=>e.value===Gh,og=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,sg=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)sg[og.charCodeAt(e)]=e;sg[61]=0;var cg=_m,lg=jm;({...Xa}),{...Xa},{...fo},Xa.toString,Xa[qa],{...fo};function ug(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}var dg=`~structural`,fg=`~sentinels`,pg=`~constructor`,mg=ki(e=>{let t=ug(e)?.identifier;return typeof t==`string`?t:e.getExpected(mg)}),$=Symbol.for(`effect/schema/parser/missing`),hg=Lp,gg=hg($),_g=Object.assign(hg($),{[$]:!0}),vg=e=>e[$]===!0,yg=e=>e===$?As():js(e),bg=e=>e._tag===`None`?gg:hg(e.value),xg=`~effect/SchemaIssue/Issue`;function Sg(e){return j(e,xg)&&e[xg]===xg}function Cg(e){return Object.hasOwn(e,`input`)}var wg=class{[xg]=xg;constructor(e,t){t?.reportInput===!0&&e!==$&&(this.input=e)}},Tg=class extends wg{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},Eg=class extends wg{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},Dg=class extends wg{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Og=class extends wg{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},kg=class extends wg{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Ag=class extends wg{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},jg=class extends wg{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Mg=class extends wg{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Ng=class extends wg{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Pg=class extends wg{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function Fg(e,t,n){if(Sg(e))return e;if(typeof e==`string`)return new Mg({message:e},t,n);let r=typeof e.issue==`string`?new Mg({message:e.issue},t,n):e.issue;return new Dg(e.path,r)}function Ig(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new Mg(void 0,t,n):Fg(e,t,n)}function Lg(e,t,n,r){return Array.isArray(t)?Oc(t)?t.length===1?Fg(t[0],n,r):new Ag(e,Mc(t,e=>Fg(e,n,r)),n,r):void 0:Ig(t,n,r)}var Rg=e=>{let t=Xg(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Ug(mg(e.ast),e);case`InvalidValue`:{let t=Hg(e);if(t!==void 0)return Ug(t,e);let n=Vg(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Vg(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Vg(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},zg=e=>Xg(e)??Xg(e.issue);function Bg(e){return t=>({issues:Gg(t,[],e?.leafHook??Rg,e?.checkHook??zg)})}function Vg(e){return Cg(e)?Ia(e.input):void 0}function Hg(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function Ug(e,t){let n=Vg(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function Wg(e,t){let n=t(e);if(n!==void 0||e.issue._tag!==`InvalidValue`)return n;let r=Hg(e.issue);return r===void 0?Ug(Kg(e.filter),e):Ug(r,e.issue)}function Gg(e,t,n,r,i){switch(e._tag){case`Filter`:return Gg(e.issue,t,n,r,i??Wg(e,r));case`Encoding`:return Gg(e.issue,t,n,r,i);case`Pointer`:return Gg(e.issue,[...t,...e.path],n,r,i);case`Composite`:case`AnyOf`:return e._tag===`Composite`||e.issues.length>0?e.issues.flatMap(e=>Gg(e,t,n,r,i)):[{path:t,message:i??Xg(e)??Ug(mg(e.ast),e)}];default:return[{path:t,message:i??n(e)}]}}function Kg(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=>Kg(e)).join(` & `)}}function qg(){return e=>Yg(e,``)}var Jg=qg();function Yg(e,t,n){let r;switch(e._tag){case`Filter`:return Yg(e.issue,t,n??Wg(e,zg));case`Encoding`:return Yg(e.issue,t,n);case`Pointer`:return Yg(e.issue,t+za(e.path),n);case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Yg(e,t,n)).join(`
22
- `);r=n??Xg(e)??Ug(mg(e.ast),e);break;default:r=n??Rg(e)}return t?`${r}\n at ${t}`:r}function Xg(e){if(e._tag===`Pointer`||e._tag===`Composite`)return;if(e._tag===`Encoding`)return Xg(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 Zg(e){let t;for(let n of e.reasons){if(!Dp(n)||!Sg(n.error))return;t??=n.error}return t}function Qg(e,t){let n=Zg(e);if(n===void 0)throw Error(t,{cause:e});return n}var $g=e=>Object.assign(Object.create(yi),e),e_=$g({_tag:`Passthrough`});function t_(){return e_}function n_(e){return $g({_tag:`Transform`,transform:e})}function r_(e){return $g({_tag:`TransformEffect`,transform:e})}function i_(e){return $g({_tag:`TransformOptional`,transform:e})}function a_(e){return $g({_tag:`TransformOptionalEffect`,transform:e})}function o_(){return i_(()=>As())}function s_(e){return a_(t=>{let n=zs(t,A);return Ns(n)?Wm(n):Lh(e,js)})}function c_(){return n_(globalThis.String)}function l_(){return n_(globalThis.Number)}function u_(e){return r_((t,n)=>th({try:()=>JSON.parse(t,e?.reviver),catch:()=>new Mg({expected:`a valid JSON string`},t,n)}))}function d_(e){return r_((t,n)=>th({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new Mg({expected:`a JSON-serializable value`},t,n)}))}var f_=Symbol.for(`~effect/Schema/content`);function p_(e,t){return Object.defineProperty(e,f_,{value:t}),e}var m_=class extends bi{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new m_(this.encode,this.decode)}},h_=`~effect/SchemaTransformation/Transformation`,g_=class extends bi{[h_]=h_;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new g_(this.encode,this.decode)}};function __(e){return j(e,h_)&&e[h_]===h_}var v_=e=>__(e)?e:new g_(e.decode,e.encode),y_=new g_(t_(),t_());function b_(){return y_}var x_=new g_(l_(),c_());function S_(e){return new g_(u_(e??{}),p_(d_(e),{mediaType:`application/json`,preserveSchema:e?.reviver===void 0&&e?.replacer===void 0}))}function C_(e){return t=>t._tag===e}var w_=C_(`Declaration`),T_=C_(`Never`),E_=C_(`Literal`),D_=C_(`UniqueSymbol`),O_=C_(`Arrays`),k_=C_(`Objects`),A_=C_(`Suspend`),j_=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},M_={},N_=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}},P_=`~effect/Schema`,F_=class{[P_]=P_;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}>`}},I_=class extends F_{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>{if(t===$)return gg;e??=this.run(this.typeParameters);try{return e(t,this,n)}catch(e){return eh(e)}}}_rebuild(e,t,n,r,i){let a=iy(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new I_(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},L_=new class extends F_{_tag=`Null`;getParser(){return by(this,null)}getExpected(){return`null`}},R_=class extends F_{_tag=`Undefined`;getParser(){return by(this,void 0)}toCodecJson(){return qv(this,[z_])}getExpected(){return`undefined`}},z_=new j_(L_,new g_(n_(()=>void 0),n_(()=>null))),B_=new R_,V_=new class extends F_{_tag=`Unknown`;getParser(){return xy(this,Gi)}getExpected(){return`unknown`}},H_=class extends F_{_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 ${Ia(e)}`);this.literal=e}getParser(){return by(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?U_(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:U_(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function U_(e){let t=globalThis.String(e.literal);return qv(e,[new j_(new H_(t),new g_(n_(()=>e.literal),n_(()=>t)))])}var W_=new class extends F_{_tag=`String`;getParser(){return xy(this,zi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&ky(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},G_=class extends F_{_tag=`Number`;getParser(){return xy(this,Bi)}matchKey(e,t){return this._match(wy,e,t)}matchPart(e,t){return this._match(Cy,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:ky(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(K_(this.checks,`effect/schema/isFinite`)||K_(this.checks,`effect/schema/isInt`))?this:qv(this,[Hv])}toCodecStringTree(){return this.toCodecJson()===this?qv(this,[Dy]):qv(this,[Oy])}getExpected(){return`number`}};function K_(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&K_(e.checks,t))}var q_=new G_,J_=new class extends F_{_tag=`Boolean`;getParser(){return xy(this,Vi)}getExpected(){return`boolean`}},Y_=class extends F_{_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(fy(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(fy(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new kg(n,t[o],i),a=new Dg([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Zm(new Ag(n,[a],t,i))}return e.issues?Zm(new Ag(n,e.issues,t,i)):hg(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:[],issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Nf(t.concurrency),f=d===1?Q_(i,e,0,u):$_(i,e,{concurrency:d,end:u});if(!f)return c(i);if(ld(f))return Rh(f,()=>c(i));let p=!0;return Gm(()=>p?(p=!1,rh(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===$)return gg;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):Zm(new jg(n,e,a))}catch(e){return eh(e)}}}_rebuild(e,t,n){let r=iy(this.elements,e),i=iy(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new Y_(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function X_(e,t,n,r){if(n._tag===`Failure`)return ev(e,e.ast,r,n);let i=vg(n)?t:n[P];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(fy(t.ast))return;let n=new Dg([r],new Og(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return zp(new Ag(e.ast,[n],e.input,e.options))}}var Z_={onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:X_},Q_=Pf()(Z_),$_=If()(Z_),ev=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Zg(r.cause);if(i===void 0)return Rp(jp(r.cause,r=>new Ag(t,[new Dg([n],r)],e.input,e.options)));let a=new Dg([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return zp(new Ag(t,[a],e.input,e.options))},tv=`[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?`;function nv(e,t,n=M_){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Sy(_y(t)))}var rv=class{name;type;constructor(e,t){this.name=e,this.type=t}};function iv(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(iv);default:return!1}}function av(e){let t=Yv(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(av);default:return!1}}function ov(e){return iv(e)&&av(e)}var sv=class{parameter;type;constructor(e,t){if(!ov(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,fy(t)||t.encoding!==void 0&&fy(_y(t)))throw Error("Cannot use `Schema.optionalKey` or `Schema.optional` with index signatures. Index signatures already allow keys to be absent; use `Schema.UndefinedOr` to allow `undefined` values.")}},cv=class extends F_{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return xy(n,Wi);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type,ownOnly:Tv(e.name)})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(Sy(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return ev(t,n,i,s)??Hp;let c=vg(s)?o:s[P];if(a!==$&&c!==$){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return Hp;no(t.out,a,c)}return Hp},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!ld(t))return rh(sh(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return ev(e,n,r,a)??Hp;let o=vg(a)?r:a[P],s=e.input[r],l=i.parserValue(s,e.options);return ld(l)?t(e,r,o,s,l):rh(sh(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return ld(a)?t(e,n,n,i,a):rh(sh(a),r=>t(e,n,n,i,r))},u=i?If()({onItem:(e,[t,n])=>n.is.parameter===W_?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return zh(function*(t,d){if(t===$)return $;if(typeof t!=`object`||!t||Array.isArray(t))return yield*Zm(new jg(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:Nf(d.concurrency),v=i&&g?n.indexSignatures.map(e=>nv(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new kg(n,f[a],d),r=new Dg([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*Zm(new Ag(n,[r],t,d))}}}if(r){let e=_===1?dv(m,a):fv(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===W_?l:c,r=v?.[e]??(t.is.parameter===W_?Object.keys(f):nv(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!ld(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Ac();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===W_?Object.keys(f):nv(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*Zm(new Ag(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return rh(sh(n),n=>{let i={...e,out:{...e.out}},o=lv(i,r,n);if(o)return o;let s=()=>hg(i.out),c=dv(i,a.slice(t+1));return c?Rh(c,s):s()})};return(e,t)=>{if(e===$)return gg;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Nf(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return Zm(new jg(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=n.ownOnly?Object.hasOwn(i,s):s in i,l=c?i[s]:$,d=n.parser(l,t);if(!ld(d))return u(o,e,d);if(vg(d)){c&&no(a,s,l);continue}let f=lv(o,n,d);if(f)return f}}catch(e){return eh(e)}return hg(a)}}_rebuild(e,t,n,r){let i=iy(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new rv(t.name,n)}),a=iy(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new sv(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new cv(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function lv(e,t,n){if(n._tag===`Failure`)return ev(e,e.ast,t.name,n);if(vg(n))return;let r=n[P];if(r!==$){no(e.out,t.name,r);return}if(delete e.out[t.name],!fy(t.type)){let n=new Dg([t.name],new Og(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return zp(new Ag(e.ast,[n],e.input,e.options))}}var uv={onItem(e,t){if(!(t.ownOnly?Object.hasOwn(e.input,t.name):t.name in e.input))return t.parser($,e.options);let n=e.input[t.name];return no(e.out,t.name,n),t.parser(n,e.options)},step:lv},dv=Pf()(uv),fv=If()(uv);function pv(e,t){return e?t?[...e,...t]:e:t}function mv(e,t,n){return new cv(Reflect.ownKeys(e).map(t=>new rv(t,e[t].ast)),[],n,t)}function hv(e){return e.ast}function gv(e,t,n){return new Ov(e.map(hv),t,void 0,n)}function _v(e){if(e.encoding)throw Error(`mutable does not support encodings`);return new Y_(!0,e.elements,e.rest,e.annotations,e.checks,void 0,e.context,e.encodingChecks)}var vv=Ai(e=>{for(;;){if(A_(e))return V_;let t=e.encoding;if(!t)return e.recur?.(vv,xi)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==xi))return V_;e=t[t.length-1].to}});function yv(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(yv)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function bv(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[fg];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!fy(t)){if(E_(t))return[{key:e.name,literal:t.literal}];if(D_(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!fy(e)){if(E_(e))return[{key:t,literal:e.literal}];if(D_(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>bv(vv(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return bv(e.thunk())}}var xv=new WeakMap,Sv=Object.freeze([]),Cv=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,wv=new Set(Reflect.ownKeys(Object.prototype)).add(`__proto__`),Tv=e=>wv.has(typeof e==`number`?globalThis.String(e):e),Ev=(e,t)=>Object.hasOwn(e,t)||t in e&&!Tv(t);function Dv(e){let t=xv.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=vv(c);if(T_(l))continue;if(E_(l)||D_(l)){a??=new Map;let e=E_(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=bv(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=yv(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??Sv);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??Sv;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Ji(e)){let n=Ev(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??Sv;if(t)return o}return Sv}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=Cv(t);if(!Ji(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=Ev(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=Ev(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=Ev(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(Cv(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return xv.set(e,t),t}var Ov=class extends F_{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===$)return gg;let i=(o??=Dv(n.types))(e,r);if(i.length===0)return Zm(new Ng(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:ld(r)?kv(n,r.cause,e,t):Av(n,r,e,t)}return jv(n,a,i,e,t)}}_rebuild(e,t,n){let r=iy(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new Ov(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=_y(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(E_);if(t.length>0)return`${Fv(n.isMutable)}[ ${t.map(t=>e(t)+Iv(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>E_(e.type));if(t.length>0)return`{ ${t.map(t=>`${Fv(t.type.context?.isMutable)}${Ra(t.name)}${Iv(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function kv(e,t,n,r){let i=Zg(t);return i?zp(new Ng(e,[i],n,r)):Rp(t)}function Av(e,t,n,r){return dh(t,t=>kv(e,t,n,r))}function jv(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Nv(a,n);if(!o)return a.out?a.out:Zm(new Ng(e,a.issues??[],r,i));if(ld(o))return Mv(o,a);let s=!0;return Gm(()=>s?(s=!1,Mv(o,a)):jv(e,t,n,r,i))}function Mv(e,t){return Rh(e,e=>t.out?vg(t.out)?Wm(t.input):t.out:Zm(new Ng(t.ast,t.issues??[],t.input,t.options)))}var Nv=Pf()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Zg(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),zp(new Pg(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return Hp}}}),Pv=new Ov([new H_(`Infinity`),new H_(`-Infinity`),new H_(`NaN`)]);function Fv(e){return e?``:`readonly `}function Iv(e){return e?`?`:``}var Lv=class extends bi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new Lv(this.run,{...this.annotations,...e},this.aborted)}abort(){return new Lv(this.run,this.annotations,!0)}and(e,t){return new Rv([this,e],t)}},Rv=class extends bi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new Rv(this.checks,{...this.annotations,...e})}and(e,t){return new Rv([this,e],t)}};function zv(e,t,n=!1){return new Lv((t,n,r)=>Lg(n,e(t,n,r),t,r),t,n)}function Bv(e){return zv(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var Vv=Qv(q_,[Bv()]),Hv=new j_(new Ov([Vv,Pv]),new g_(l_(),n_(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Uv(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return zv(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var Wv=new WeakMap;function Gv(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&Wv.set(n,Kv(e)),n}function Kv(e){let t=Wv.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return Wv.set(e,n),n}function qv(e,t){return e.encoding===t?e:Gv(e,{encoding:t})}function Jv(e,t){if(e.context===t)return e;let n=Kv(e);return n.context===t&&n.encoding===e.encoding?n:Gv(e,{context:t})}function Yv(e){return e.encoding?Yv(e.encoding[e.encoding.length-1].to):e}function Xv(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return Zv(e,Ec(e.checks.slice(0,-1),n.annotate(t)))}return Gv(e,{annotations:{...e.annotations,...t}})}function Zv(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:Gv(e,{checks:t})}function Qv(e,t){return Zv(e,pv(e.checks,t))}function $v(e,t){let n=t(e.to);return n===e.to?e:new j_(n,e.transformation)}function ey(e,t){let n=e,r=n[n.length-1],i=$v(r,t);return i===r?e:Ec(e.slice(0,e.length-1),i)}function ty(e){return t=>t.encoding?qv(t,ey(t.encoding,e)):t}function ny(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:qv(r,ey(r.encoding,n))}return e(r)}return Ai(n)}function ry(e,t,n){let r=new j_(e,t);return qv(n,n.encoding?[...n.encoding,r]:[r])}function iy(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function ay(e,t){return Jv(e,e.context?new N_(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new N_(!1,!1,void 0,t))}var oy=Ai(e=>sy(Jv(e,e.context?e.context.isOptional===!1?new N_(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new N_(!0,!1)))),sy=ty(oy),cy=ki(e=>oy(new Ov([e,B_])));function ly(e,t,n){return ry(e,n,t)}function uy(e){let t=[],n=[];function r(e){t.includes(e)||t.push(e)}function i(e){switch(e._tag){case`Literal`:Ui(e.literal)&&r(e.literal);return;case`UniqueSymbol`:r(e.symbol);return;case`Enum`:for(let[,t]of e.enums)r(t);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)i(e.types[t]);return;default:n.push(e)}}return i(e),{literals:t,parameters:n}}function dy(e,t){let{literals:n,parameters:r}=uy(e);return new cv(n.map(e=>new rv(e,t)),r.map(e=>new sv(e,t)))}function fy(e){return e.context?.isOptional??!1}function py(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(py)}function my(e){function t(e){return py(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Dc(n)?n:void 0}function hy(e){let t=!0;function n(e){return t=t&&!e.encoding&&!A_(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var gy=Ai(e=>{let t=Kv(e);if(t!==e){let n=gy(t);return n===t&&e.encoding===void 0?e:Jv(n,e.context)}let n=`recur`in e?e.recur(gy):e;return`encodingChecks`in n&&n.encodingChecks?Gv(n,{encodingChecks:void 0,checks:pv(hy(e)?n.encodingChecks:O_(n)||k_(n)||w_(n)&&n.typeParameters.length>0?my(n.encodingChecks):void 0,n.checks)}):n}),_y=Ai(e=>gy(yy(e)));function vy(e,t){let n=t,r=n.length,i=n[r-1],a=[new j_(yy(qv(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new j_(yy(n[e-1].to),n[e].transformation.flip()));let o=yy(i.to);return o.encoding?qv(o,[...o.encoding,...a]):qv(o,a)}var yy=ki(e=>{if(e.encoding)return vy(e,e.encoding);let t=Kv(e);if(t!==e){let n=yy(t);return n===t?e:Jv(n,e.context)}return`flip`in e?e.flip(yy):`recur`in e?e.recur(yy):e});function by(e,t){let n=t===0?_g:hg(t);return(r,i)=>r===$?gg:r===t?n:Zm(new jg(e,r,i))}function xy(e,t){return(n,r)=>n===$?gg:t(n)?_g:Zm(new jg(e,n,r))}var Sy=ny(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Sy)}}),Cy=new globalThis.RegExp(`^${tv}$`),wy=new globalThis.RegExp(`^(?:${tv}|Infinity|-Infinity|NaN)$`);function Ty(e){return Uv(Cy,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Cy.source}),...e})}var Ey=Qv(W_,[Ty()]),Dy=new j_(Ey,x_),Oy=new j_(new Ov([Ey,Pv]),x_);function ky(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=ky(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 Tg(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function Ay(e){if(!w_(e))return;let t=e.annotations?.[pg];return k(t)?t(e.typeParameters):void 0}function jy(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function My(e){return e===void 0||typeof e==`string`}function Ny(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 Py(e){return Ny(e,jy)}var Fy=new I_([],()=>(e,t,n)=>Py(e)?_g:Zm(new jg(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>Ly});function Iy(e){return Ny(e,My)}var Ly=new j_(new I_([],()=>(e,t,n)=>Iy(e)?_g:Zm(new jg(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),b_()),Ry=(e,t,n)=>vg(e)?n(t):Rh(e,n);function zy(e){let t=By(e);return(e,n,r)=>{try{return t(e,n,r)}catch(e){return eh(e)}}}function By(e){if(e._tag===`Middleware`)return(t,n,r)=>Vy(vg(t)?e.decode(hg(yg(n)),r):e.decode(Lh(t,yg),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>vg(e)?hg(t):e;case`Transform`:{let e=e=>e===$?gg:hg(t.transform(e));return(t,n)=>Ry(t,n,e)}case`TransformOptional`:{let e=e=>bg(t.transform(yg(e)));return(t,n)=>Ry(t,n,e)}case`TransformEffect`:return(e,n,r)=>Ry(e,n,e=>e===$?gg:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>Ry(e,n,e=>Vy(t.transform(yg(e),r)))}}var Vy=e=>Rh(e,bg),Hy=(e,t,n,r)=>dh(r,r=>$m(()=>jp(r,r=>new Eg(e,r,t,n))));function Uy(e,t){let n=zy(e.link.transformation),r;return(i,a)=>{if(i===$)return gg;if(e.isConstructed(i))return _g;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function Wy(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==$&&r!==void 0)return t(r,i);let a=n;if(ld(a)&&a._tag===`Success`){let e=t(a[P],i);return vg(e)?a:e}return Rh(Hy(e,r,i,a),e=>{let n=t(e,i);return vg(n)?hg(e):n})}}function Gy(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:Wy(e,n)}function Ky(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?Ay(e):void 0,o=a?Uy(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>zy(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);try{if(u&&!n.disableChecks){if(ld(r)){if(r._tag===`Success`){let i=vg(r)?t:r[P];if(t!==$&&i!==$){let i=ky(u,t,void 0,e,n);i&&(r=Zm(new Ag(e,i,t,n)))}}}else r=rh(r,r=>{if(t!==$&&r!==$){let r=ky(u,t,void 0,e,n);if(r)return Zm(new Ag(e,r,t,n))}return Wm(r)})}if(s&&!n.disableChecks){if(ld(r)){if(r._tag===`Success`){let i=vg(r)?t:r[P];if(i===$)return r;let a=ky(s,i,void 0,e,n);a&&(r=Zm(new Ag(e,a,i,n)))}}else r=rh(r,t=>{if(t!==$){let r=ky(s,t,void 0,e,n);if(r)return Zm(new Ag(e,r,t,n))}return Wm(t)})}return r}catch(e){return eh(e)}},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[P],o=t(a,r)):o=Rh(o,e=>{let n=t(e,r);return vg(n)?hg(e):n})}if(o._tag===`Success`){let e=o[P],t=p(e,r);return vg(t)?o:t}return o=Hy(e,n,r,o),Rh(o,e=>{let t=p(e,r);return vg(t)?hg(e):t})}:p}var qy=Symbol(),Jy=new WeakMap,Yy=e=>$y(e).parser,Xy=e=>$y(e).makeEffect,Zy=e=>Gy(e,Xy),Qy=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=Ky(this.ast,Yy)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=Ky(this.ast,Xy,Zy)}};function $y(e){let t=Jy.get(e);if(t!==void 0)return t;let n=new Qy(e);return Jy.set(e,n),n}function eb(e){let t=e.ast,n;return(e,r)=>(n??=mb(Cb,gy(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function tb(e){let t=eb(e);return(e,n)=>{let r=Ph(t(e,n));return Up(r)?js(r.value):(Qg(r.cause,`Option adapter can only return none for schema issues`),As())}}function nb(e){return bb(gy(e.ast))}function rb(e){return ab(e.ast)}function ib(e){{let t=hb(fb(e));return e=>{let n=t(e,M_);return Up(n)?!0:(Qg(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function ab(e){let t=gy(e),n=e=>(n=ib(t),n(e));return e=>n(e)}function ob(e,t){let n=fb(e.ast);return t===void 0?n:(e,r)=>n(e,ub(t,r))}function sb(e,t){return gb(ob(e,t))}var cb=sb;function lb(e,t){let n=fb(yy(e.ast));return t===void 0?n:(e,r)=>n(e,ub(t,r))}var ub=(e,t)=>t?{...e,...t}:e,db=e=>e===$?Zm(new Mg):Wm(e);function fb(e){return mb(Sb,e)}function pb(e,t){return vg(e)?Wm(t):ld(e)?e[P]===$?db($):e:Rh(e,db)}function mb(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??M_);return vg(a)?Wm(r):ld(a)?a[P]===$?db($):a:Rh(a,db)}}function hb(e){return(t,n)=>Ph(e(t,n))}function gb(e){let t=hb(e);return(e,n)=>{let r=t(e,n);return Up(r)?js(r.value):(Qg(r.cause,`Option adapter can only return none for schema issues`),As())}}function _b(e,t){let n=Ph(e);if(Up(n))return n.value;let r=Qg(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}var vb=`Constructor adapter can only throw schema issues`;function yb(e){throw Error(vb,{cause:kp(e)})}function bb(e){let t;return(n,r)=>xb(t??=$y(e),n,r)}function xb(e,t,n){let r=n?.disableChecks?n.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions??M_,i=e.make;if(i!==void 0&&t!==$){let e;try{e=i(t,r)}catch(e){yb(e)}if(e!==qy&&e!==$)return e}return _b(pb(e.makeEffect(t,r),t),vb)}var Sb=e=>$y(e).parser,Cb=e=>$y(e).makeEffect,wb=`~effect/Schema/Schema`,Tb=Symbol(),Eb={[wb]:wb,get make(){let e=nb(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=eb(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=tb(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return vi(this,arguments)},annotate(e){return this.rebuild(Xv(this.ast,e))},annotateKey(e){return this.rebuild(ay(this.ast,e))},check(...e){return this.rebuild(Qv(this.ast,e))},rebuild(e){return Db(e,this[Tb])}};function Db(e,t){function n(){}let r=Object.setPrototypeOf(n,Eb);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Tb]=t,r.ast=e,r}function Ob(e){return Up(e)?e.value:{issues:[{message:Np(e.cause)}]}}function kb(e,t){let n=ob(e),r={errors:`all`,...t?.parseOptions},i=Bg(t);return Ab(e,{validate:e=>{let t=new Sl(`sync`),a=Ah(bh(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Ob(o):new Promise(e=>{a.addObserver(t=>{e(Ob(t))})})}})}function Ab(e,t){let n={version:1,vendor:`effect`,...Object.hasOwn(e,`~standard`)?e[`~standard`]:void 0,...t},r=typeof e==`function`?Function.prototype.bind.call(e,void 0):Object.create(Object.getPrototypeOf(e));return Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(e),ast:{value:e.ast,enumerable:!0,configurable:!0},"~standard":{value:n,writable:!0,enumerable:!0,configurable:!0}})}var jb=e=>e,Mb=`~effect/Schema/SchemaError`;function Nb(e){return j(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...Xa}),{...Xa},{...Xa},{...Xa},{...Xa},{...Xa},{...Xa},{...Xa};var Pb=class extends El(`SchemaError`){[Mb]=Mb;constructor(e){let t=Qa();$a(0);try{super({issue:e})}finally{$a(t)}}get message(){return Jg(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[qa](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function Fb(e){return Nb(e)}function Ib(e){return ld(e)?Lb(e):dh(e,e=>$m(()=>jp(e,e=>new Pb(e))))}function Lb(e){return Up(e)?e:Rp(jp(e.cause,e=>new Pb(e)))}function Rb(e,t){let n;for(let r of e.reasons){if(!Dp(r)||!Fb(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 zb(e){let t=Ph(e);if(Up(t))return t.value;throw Rb(t.cause,`Sync adapter can only throw schema errors`)}function Bb(e,t){return kb(e,t)}var Vb=rb;function Hb(e,t){let n=ob(e,t);return(e,t)=>Ib(n(e,t))}var Ub=sb,Wb=cb;function Gb(e,t){let n=Hb(e,t);return(e,t)=>zb(n(e,t))}function Kb(e,t){let n=lb(e,t);return(e,t)=>Ib(n(e,t))}function qb(e,t){let n=Kb(e,t);return(e,t)=>zb(n(e,t))}var Jb=qb,Yb=Db,Xb=jb(e=>Yb(oy(e.ast),{schema:e})),Zb=jb(e=>{let t=hx(e);return Yb(cy(e.ast),{schema:t})}),Qb=jb(e=>Yb(_y(e.ast),{schema:e}));function $b(e){let t=Yb(new H_(e),{literal:e,transform(n){return t.pipe(gx($b(n),{decode:n_(()=>n),encode:n_(()=>e)}))}});return t}var ex=Yb(V_),tx=Yb(L_),nx=Yb(B_),rx=Yb(W_),ix=Yb(q_),ax=Yb(J_);function ox(e,t){return Yb(e,{fields:t,mapFields(e,t){let n=e(this.fields);return ox(mv(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function sx(e){return ox(mv(e,void 0),e)}function cx(e,t){return Yb(dy(e.ast,t.ast),{key:e,value:t})}var lx=jb(e=>Yb(new Y_(!1,[],[e.ast]),{value:e})),ux=jb(e=>Yb(_v(e.ast),{schema:e}));function dx(e,t){return Yb(e,{members:t,mapMembers(e,t){let n=e(this.members);return dx(gv(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function fx(e,t){return dx(gv(e,t,void 0),e)}function px(e){let t=e.map($b);return Yb(gv(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return fx(e(this.members))},pick(e){return px(e)},transform(e){return fx(t.map((t,n)=>t.transform(e[n])))}})}var mx=jb(e=>fx([e,tx])),hx=jb(e=>fx([e,nx]));function gx(e,t){return n=>Yb(ly(n.ast,e.ast,t?v_(t):b_()),{from:n,to:e})}function _x(e){return ld(e)&&e._tag===`Success`?e:dh(e,e=>$m(()=>jp(e,e=>e.issue)))}function vx(e,t){let n=t?.encodingStrategy===`omit`?o_():t_();return t=>Xb(Qb(t)).pipe(gx(t,{decode:s_(_x(e)),encode:n}))}var yx=zv,bx=Yb(Vv);function xx(e){return yx(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var Sx=ix.check(xx());function Cx(e,t,n){return yx(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[dg]:!0,arbitraryConstraint:{minLength:e},...n})}function wx(e){return Cx(1,1,e)}var Tx=rx.check(wx());globalThis.RegExp,globalThis.URL;var Ex=rx.annotate({expected:`a string that will be decoded as JSON`});function Dx(e,t){return Ex.pipe(gx(e,S_(t)))}globalThis.File,globalThis.URLSearchParams,globalThis.Uint8Array;var Ox=Yb(Xv(Fy,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),kx=Ub(Tx),Ax=Ub(Sx);function jx(e){let t=kx(e??``);return Ns(t)?t.value:void 0}function Mx(e){if(e===void 0)return;let t=Ax(e);if(Ns(t)&&t.value>0)return t.value;if(!zi(e))return;let n=Ax(Number.parseInt(e,10));return Ns(n)&&n.value>0?n.value:void 0}function Nx(e){return{kind:jx(e.kind),name:jx(e.name),run:jx(e.run),thread:jx(e.thread),seq:Mx(e.seq)}}var Px=`modulepreload`,Fx=function(e,t){return new URL(e,t).href},Ix={},Lx=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=Fx(t,n),t=s(t),t in Ix)return;Ix[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`:Px,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)})},Rx=Ur(`/`)({validateSearch:Nx,component:Wr(()=>Lx(()=>import(`./routes-DcJehTYv.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),zx={IndexRoute:Rx.update({id:`/`,path:`/`,getParentRoute:()=>_i})},Bx=_i._addFileChildren(zx)._addFileTypes();function Vx(){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 Hx(){return si({routeTree:Bx,basepath:Vx()})}var Ux=document.getElementById(`root`);Ux&&(0,gi.createRoot)(Ux).render((0,D.jsx)(i.StrictMode,{children:(0,D.jsx)(ui,{router:Hx()})}));export{ch as $,No as $n,su as $t,lh as A,ic as An,Rp as At,Qm as B,Ds as Bn,Mp as Bt,Bb as C,vc as Cn,vi as Cr,Rm as Ct,Ch as D,Sc as Dn,Om as Dt,lg as E,xc as En,r as Er,Tm as Et,uh as F,Ls as Fn,Hp as Ft,Dh as G,fo as Gn,md as Gt,Rh as H,Qo as Hn,td as Ht,Sh as I,Ms as In,Fp as It,Xm as J,F as Jn,hu as Jt,Oh as K,P as Kn,vd as Kt,Th as L,Ns as Ln,Op as Lt,dh as M,Fs as Mn,Wp as Mt,fh as N,Ps as Nn,Up as Nt,wh as O,_c as On,Gp as Ot,ph as P,Is as Pn,Lp as Pt,Ih as Q,mo as Qn,cd as Qt,sh as R,As as Rn,Ap as Rt,Zb as S,Cc as Sn,Oi as Sr,gm as St,cg as T,bc as Tn,Pn as Tr,Em as Tt,ih as U,es as Un,Iu as Ut,rh as V,ts as Vn,nd as Vt,Fh as W,Jo as Wn,Md as Wt,_h as X,Ro as Xn,_u as Xt,gh as Y,zo as Yn,vu as Yt,Vm as Z,Fo as Zn,Hf as Zt,Gb as _,El as _n,wi as _r,th as _t,Ox as a,mf as an,N as ar,yh as at,Vb as b,jc as bn,O as br,sm as bt,mx as c,$d as cn,M as cr,Mh as ct,sx as d,xu as dn,Vi as dr,Wm as dt,Qf as en,Vo as er,mh as et,fx as f,Du as fn,k as fr,Gm as ft,Ub as g,Au as gn,zi as gr,Um as gt,Hb as h,jf as hn,qi as hr,hh as ht,bx as i,vf as in,ma as ir,Hm as it,Jm as j,oc as jn,Vp as jt,ah as k,Vs as kn,Bp as kt,cx as l,af as ln,Yi as lr,Nh as lt,Wb as m,wu as mn,Ki as mr,oh as mt,lx as n,yf as nn,Ja as nr,Ym as nt,$b as o,pf as on,sa as or,Ah as ot,ex as p,Tu as pn,Bi as pr,Km as pt,kh as q,To as qn,bd as qt,ax as r,_f as rn,Ia as rr,Eh as rt,px as s,sf as sn,Qi as sr,jh as st,Rx as t,fd as tn,qa as tr,xh as tt,rx as u,uf as un,j as ur,vh as ut,Jb as v,Tc as vn,Di as vr,qm as vt,vx as w,yc as wn,mi as wr,Dm as wt,ux as x,kc as xn,xi as xr,cm as xt,Dx as y,Oc as yn,Si as yr,nh as yt,Zm as z,js as zn,Pp as zt};
22
+ `);r=n??Xg(e)??Ug(mg(e.ast),e);break;default:r=n??Rg(e)}return t?`${r}\n at ${t}`:r}function Xg(e){if(e._tag===`Pointer`||e._tag===`Composite`)return;if(e._tag===`Encoding`)return Xg(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 Zg(e){let t;for(let n of e.reasons){if(!Dp(n)||!Sg(n.error))return;t??=n.error}return t}function Qg(e,t){let n=Zg(e);if(n===void 0)throw Error(t,{cause:e});return n}var $g=e=>Object.assign(Object.create(yi),e),e_=$g({_tag:`Passthrough`});function t_(){return e_}function n_(e){return $g({_tag:`Transform`,transform:e})}function r_(e){return $g({_tag:`TransformEffect`,transform:e})}function i_(e){return $g({_tag:`TransformOptional`,transform:e})}function a_(e){return $g({_tag:`TransformOptionalEffect`,transform:e})}function o_(){return i_(()=>As())}function s_(e){return a_(t=>{let n=zs(t,A);return Ns(n)?Wm(n):Lh(e,js)})}function c_(){return n_(globalThis.String)}function l_(){return n_(globalThis.Number)}function u_(e){return r_((t,n)=>th({try:()=>JSON.parse(t,e?.reviver),catch:()=>new Mg({expected:`a valid JSON string`},t,n)}))}function d_(e){return r_((t,n)=>th({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new Mg({expected:`a JSON-serializable value`},t,n)}))}var f_=Symbol.for(`~effect/Schema/content`);function p_(e,t){return Object.defineProperty(e,f_,{value:t}),e}var m_=class extends bi{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new m_(this.encode,this.decode)}},h_=`~effect/SchemaTransformation/Transformation`,g_=class extends bi{[h_]=h_;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new g_(this.encode,this.decode)}};function __(e){return j(e,h_)&&e[h_]===h_}var v_=e=>__(e)?e:new g_(e.decode,e.encode),y_=new g_(t_(),t_());function b_(){return y_}var x_=new g_(l_(),c_());function S_(e){return new g_(u_(e??{}),p_(d_(e),{mediaType:`application/json`,preserveSchema:e?.reviver===void 0&&e?.replacer===void 0}))}function C_(e){return t=>t._tag===e}var w_=C_(`Declaration`),T_=C_(`Never`),E_=C_(`Literal`),D_=C_(`UniqueSymbol`),O_=C_(`Arrays`),k_=C_(`Objects`),A_=C_(`Suspend`),j_=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},M_={},N_=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}},P_=`~effect/Schema`,F_=class{[P_]=P_;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}>`}},I_=class extends F_{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>{if(t===$)return gg;e??=this.run(this.typeParameters);try{return e(t,this,n)}catch(e){return eh(e)}}}_rebuild(e,t,n,r,i){let a=iy(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new I_(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},L_=new class extends F_{_tag=`Null`;getParser(){return by(this,null)}getExpected(){return`null`}},R_=class extends F_{_tag=`Undefined`;getParser(){return by(this,void 0)}toCodecJson(){return qv(this,[z_])}getExpected(){return`undefined`}},z_=new j_(L_,new g_(n_(()=>void 0),n_(()=>null))),B_=new R_,V_=new class extends F_{_tag=`Unknown`;getParser(){return xy(this,Gi)}getExpected(){return`unknown`}},H_=class extends F_{_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 ${Ia(e)}`);this.literal=e}getParser(){return by(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?U_(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:U_(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function U_(e){let t=globalThis.String(e.literal);return qv(e,[new j_(new H_(t),new g_(n_(()=>e.literal),n_(()=>t)))])}var W_=new class extends F_{_tag=`String`;getParser(){return xy(this,zi)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&ky(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},G_=class extends F_{_tag=`Number`;getParser(){return xy(this,Bi)}matchKey(e,t){return this._match(wy,e,t)}matchPart(e,t){return this._match(Cy,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:ky(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(K_(this.checks,`effect/schema/isFinite`)||K_(this.checks,`effect/schema/isInt`))?this:qv(this,[Hv])}toCodecStringTree(){return this.toCodecJson()===this?qv(this,[Dy]):qv(this,[Oy])}getExpected(){return`number`}};function K_(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&K_(e.checks,t))}var q_=new G_,J_=new class extends F_{_tag=`Boolean`;getParser(){return xy(this,Vi)}getExpected(){return`boolean`}},Y_=class extends F_{_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(fy(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(fy(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new kg(n,t[o],i),a=new Dg([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return Zm(new Ag(n,[a],t,i))}return e.issues?Zm(new Ag(n,e.issues,t,i)):hg(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:[],issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Nf(t.concurrency),f=d===1?Q_(i,e,0,u):$_(i,e,{concurrency:d,end:u});if(!f)return c(i);if(ld(f))return Rh(f,()=>c(i));let p=!0;return Gm(()=>p?(p=!1,rh(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===$)return gg;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):Zm(new jg(n,e,a))}catch(e){return eh(e)}}}_rebuild(e,t,n){let r=iy(this.elements,e),i=iy(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new Y_(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function X_(e,t,n,r){if(n._tag===`Failure`)return ev(e,e.ast,r,n);let i=vg(n)?t:n[P];if(i!==$)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(fy(t.ast))return;let n=new Dg([r],new Og(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return zp(new Ag(e.ast,[n],e.input,e.options))}}var Z_={onItem(e,t,n){let r=n<e.len?t:$;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:X_},Q_=Pf()(Z_),$_=If()(Z_),ev=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Zg(r.cause);if(i===void 0)return Rp(jp(r.cause,r=>new Ag(t,[new Dg([n],r)],e.input,e.options)));let a=new Dg([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return zp(new Ag(t,[a],e.input,e.options))},tv=`[+-]?(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[Ee][+-]?\\d+)?`;function nv(e,t,n=M_){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Sy(_y(t)))}var rv=class{name;type;constructor(e,t){this.name=e,this.type=t}};function iv(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(iv);default:return!1}}function av(e){let t=Yv(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(av);default:return!1}}function ov(e){return iv(e)&&av(e)}var sv=class{parameter;type;constructor(e,t){if(!ov(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,fy(t)||t.encoding!==void 0&&fy(_y(t)))throw Error("Cannot use `Schema.optionalKey` or `Schema.optional` with index signatures. Index signatures already allow keys to be absent; use `Schema.UndefinedOr` to allow `undefined` values.")}},cv=class extends F_{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return xy(n,Wi);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type,ownOnly:Tv(e.name)})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(Sy(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return ev(t,n,i,s)??Hp;let c=vg(s)?o:s[P];if(a!==$&&c!==$){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return Hp;no(t.out,a,c)}return Hp},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!ld(t))return rh(sh(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return ev(e,n,r,a)??Hp;let o=vg(a)?r:a[P],s=e.input[r],l=i.parserValue(s,e.options);return ld(l)?t(e,r,o,s,l):rh(sh(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return ld(a)?t(e,n,n,i,a):rh(sh(a),r=>t(e,n,n,i,r))},u=i?If()({onItem:(e,[t,n])=>n.is.parameter===W_?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return zh(function*(t,d){if(t===$)return $;if(typeof t!=`object`||!t||Array.isArray(t))return yield*Zm(new jg(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:Nf(d.concurrency),v=i&&g?n.indexSignatures.map(e=>nv(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new kg(n,f[a],d),r=new Dg([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*Zm(new Ag(n,[r],t,d))}}}if(r){let e=_===1?dv(m,a):fv(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===W_?l:c,r=v?.[e]??(t.is.parameter===W_?Object.keys(f):nv(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!ld(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Ac();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===W_?Object.keys(f):nv(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*Zm(new Ag(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return rh(sh(n),n=>{let i={...e,out:{...e.out}},o=lv(i,r,n);if(o)return o;let s=()=>hg(i.out),c=dv(i,a.slice(t+1));return c?Rh(c,s):s()})};return(e,t)=>{if(e===$)return gg;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Nf(t.concurrency)!==1)return(l??=c())(e,t);if(typeof e!=`object`||!e||Array.isArray(e))return Zm(new jg(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=n.ownOnly?Object.hasOwn(i,s):s in i,l=c?i[s]:$,d=n.parser(l,t);if(!ld(d))return u(o,e,d);if(vg(d)){c&&no(a,s,l);continue}let f=lv(o,n,d);if(f)return f}}catch(e){return eh(e)}return hg(a)}}_rebuild(e,t,n,r){let i=iy(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new rv(t.name,n)}),a=iy(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new sv(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new cv(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function lv(e,t,n){if(n._tag===`Failure`)return ev(e,e.ast,t.name,n);if(vg(n))return;let r=n[P];if(r!==$){no(e.out,t.name,r);return}if(delete e.out[t.name],!fy(t.type)){let n=new Dg([t.name],new Og(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return zp(new Ag(e.ast,[n],e.input,e.options))}}var uv={onItem(e,t){if(!(t.ownOnly?Object.hasOwn(e.input,t.name):t.name in e.input))return t.parser($,e.options);let n=e.input[t.name];return no(e.out,t.name,n),t.parser(n,e.options)},step:lv},dv=Pf()(uv),fv=If()(uv);function pv(e,t){return e?t?[...e,...t]:e:t}function mv(e,t,n){return new cv(Reflect.ownKeys(e).map(t=>new rv(t,e[t].ast)),[],n,t)}function hv(e){return e.ast}function gv(e,t,n){return new Ov(e.map(hv),t,void 0,n)}function _v(e){if(e.encoding)throw Error(`mutable does not support encodings`);return new Y_(!0,e.elements,e.rest,e.annotations,e.checks,void 0,e.context,e.encodingChecks)}var vv=Ai(e=>{for(;;){if(A_(e))return V_;let t=e.encoding;if(!t)return e.recur?.(vv,xi)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==xi))return V_;e=t[t.length-1].to}});function yv(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(yv)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function bv(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[fg];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!fy(t)){if(E_(t))return[{key:e.name,literal:t.literal}];if(D_(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!fy(e)){if(E_(e))return[{key:t,literal:e.literal}];if(D_(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>bv(vv(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return bv(e.thunk())}}var xv=new WeakMap,Sv=Object.freeze([]),Cv=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,wv=new Set(Reflect.ownKeys(Object.prototype)).add(`__proto__`),Tv=e=>wv.has(typeof e==`number`?globalThis.String(e):e),Ev=(e,t)=>Object.hasOwn(e,t)||t in e&&!Tv(t);function Dv(e){let t=xv.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=vv(c);if(T_(l))continue;if(E_(l)||D_(l)){a??=new Map;let e=E_(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=bv(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=yv(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??Sv);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??Sv;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Ji(e)){let n=Ev(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??Sv;if(t)return o}return Sv}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=Cv(t);if(!Ji(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=Ev(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=Ev(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=Ev(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(Cv(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return xv.set(e,t),t}var Ov=class extends F_{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===$)return gg;let i=(o??=Dv(n.types))(e,r);if(i.length===0)return Zm(new Ng(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:ld(r)?kv(n,r.cause,e,t):Av(n,r,e,t)}return jv(n,a,i,e,t)}}_rebuild(e,t,n){let r=iy(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new Ov(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=_y(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(E_);if(t.length>0)return`${Fv(n.isMutable)}[ ${t.map(t=>e(t)+Iv(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>E_(e.type));if(t.length>0)return`{ ${t.map(t=>`${Fv(t.type.context?.isMutable)}${Ra(t.name)}${Iv(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function kv(e,t,n,r){let i=Zg(t);return i?zp(new Ng(e,[i],n,r)):Rp(t)}function Av(e,t,n,r){return dh(t,t=>kv(e,t,n,r))}function jv(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Nv(a,n);if(!o)return a.out?a.out:Zm(new Ng(e,a.issues??[],r,i));if(ld(o))return Mv(o,a);let s=!0;return Gm(()=>s?(s=!1,Mv(o,a)):jv(e,t,n,r,i))}function Mv(e,t){return Rh(e,e=>t.out?vg(t.out)?Wm(t.input):t.out:Zm(new Ng(t.ast,t.issues??[],t.input,t.options)))}var Nv=Pf()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Zg(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),zp(new Pg(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return Hp}}}),Pv=new Ov([new H_(`Infinity`),new H_(`-Infinity`),new H_(`NaN`)]);function Fv(e){return e?``:`readonly `}function Iv(e){return e?`?`:``}var Lv=class extends bi{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new Lv(this.run,{...this.annotations,...e},this.aborted)}abort(){return new Lv(this.run,this.annotations,!0)}and(e,t){return new Rv([this,e],t)}},Rv=class extends bi{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new Rv(this.checks,{...this.annotations,...e})}and(e,t){return new Rv([this,e],t)}};function zv(e,t,n=!1){return new Lv((t,n,r)=>Lg(n,e(t,n,r),t,r),t,n)}function Bv(e){return zv(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var Vv=Qv(q_,[Bv()]),Hv=new j_(new Ov([Vv,Pv]),new g_(l_(),n_(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Uv(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return zv(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var Wv=new WeakMap;function Gv(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&Wv.set(n,Kv(e)),n}function Kv(e){let t=Wv.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return Wv.set(e,n),n}function qv(e,t){return e.encoding===t?e:Gv(e,{encoding:t})}function Jv(e,t){if(e.context===t)return e;let n=Kv(e);return n.context===t&&n.encoding===e.encoding?n:Gv(e,{context:t})}function Yv(e){return e.encoding?Yv(e.encoding[e.encoding.length-1].to):e}function Xv(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return Zv(e,Ec(e.checks.slice(0,-1),n.annotate(t)))}return Gv(e,{annotations:{...e.annotations,...t}})}function Zv(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:Gv(e,{checks:t})}function Qv(e,t){return Zv(e,pv(e.checks,t))}function $v(e,t){let n=t(e.to);return n===e.to?e:new j_(n,e.transformation)}function ey(e,t){let n=e,r=n[n.length-1],i=$v(r,t);return i===r?e:Ec(e.slice(0,e.length-1),i)}function ty(e){return t=>t.encoding?qv(t,ey(t.encoding,e)):t}function ny(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:qv(r,ey(r.encoding,n))}return e(r)}return Ai(n)}function ry(e,t,n){let r=new j_(e,t);return qv(n,n.encoding?[...n.encoding,r]:[r])}function iy(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function ay(e,t){return Jv(e,e.context?new N_(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new N_(!1,!1,void 0,t))}var oy=Ai(e=>sy(Jv(e,e.context?e.context.isOptional===!1?new N_(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new N_(!0,!1)))),sy=ty(oy),cy=ki(e=>oy(new Ov([e,B_])));function ly(e,t,n){return ry(e,n,t)}function uy(e){let t=[],n=[];function r(e){t.includes(e)||t.push(e)}function i(e){switch(e._tag){case`Literal`:Ui(e.literal)&&r(e.literal);return;case`UniqueSymbol`:r(e.symbol);return;case`Enum`:for(let[,t]of e.enums)r(t);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)i(e.types[t]);return;default:n.push(e)}}return i(e),{literals:t,parameters:n}}function dy(e,t){let{literals:n,parameters:r}=uy(e);return new cv(n.map(e=>new rv(e,t)),r.map(e=>new sv(e,t)))}function fy(e){return e.context?.isOptional??!1}function py(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(py)}function my(e){function t(e){return py(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Dc(n)?n:void 0}function hy(e){let t=!0;function n(e){return t=t&&!e.encoding&&!A_(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var gy=Ai(e=>{let t=Kv(e);if(t!==e){let n=gy(t);return n===t&&e.encoding===void 0?e:Jv(n,e.context)}let n=`recur`in e?e.recur(gy):e;return`encodingChecks`in n&&n.encodingChecks?Gv(n,{encodingChecks:void 0,checks:pv(hy(e)?n.encodingChecks:O_(n)||k_(n)||w_(n)&&n.typeParameters.length>0?my(n.encodingChecks):void 0,n.checks)}):n}),_y=Ai(e=>gy(yy(e)));function vy(e,t){let n=t,r=n.length,i=n[r-1],a=[new j_(yy(qv(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new j_(yy(n[e-1].to),n[e].transformation.flip()));let o=yy(i.to);return o.encoding?qv(o,[...o.encoding,...a]):qv(o,a)}var yy=ki(e=>{if(e.encoding)return vy(e,e.encoding);let t=Kv(e);if(t!==e){let n=yy(t);return n===t?e:Jv(n,e.context)}return`flip`in e?e.flip(yy):`recur`in e?e.recur(yy):e});function by(e,t){let n=t===0?_g:hg(t);return(r,i)=>r===$?gg:r===t?n:Zm(new jg(e,r,i))}function xy(e,t){return(n,r)=>n===$?gg:t(n)?_g:Zm(new jg(e,n,r))}var Sy=ny(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Sy)}}),Cy=new globalThis.RegExp(`^${tv}$`),wy=new globalThis.RegExp(`^(?:${tv}|Infinity|-Infinity|NaN)$`);function Ty(e){return Uv(Cy,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Cy.source}),...e})}var Ey=Qv(W_,[Ty()]),Dy=new j_(Ey,x_),Oy=new j_(new Ov([Ey,Pv]),x_);function ky(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=ky(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 Tg(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function Ay(e){if(!w_(e))return;let t=e.annotations?.[pg];return k(t)?t(e.typeParameters):void 0}function jy(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function My(e){return e===void 0||typeof e==`string`}function Ny(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 Py(e){return Ny(e,jy)}var Fy=new I_([],()=>(e,t,n)=>Py(e)?_g:Zm(new jg(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>Ly});function Iy(e){return Ny(e,My)}var Ly=new j_(new I_([],()=>(e,t,n)=>Iy(e)?_g:Zm(new jg(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),b_()),Ry=(e,t,n)=>vg(e)?n(t):Rh(e,n);function zy(e){let t=By(e);return(e,n,r)=>{try{return t(e,n,r)}catch(e){return eh(e)}}}function By(e){if(e._tag===`Middleware`)return(t,n,r)=>Vy(vg(t)?e.decode(hg(yg(n)),r):e.decode(Lh(t,yg),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>vg(e)?hg(t):e;case`Transform`:{let e=e=>e===$?gg:hg(t.transform(e));return(t,n)=>Ry(t,n,e)}case`TransformOptional`:{let e=e=>bg(t.transform(yg(e)));return(t,n)=>Ry(t,n,e)}case`TransformEffect`:return(e,n,r)=>Ry(e,n,e=>e===$?gg:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>Ry(e,n,e=>Vy(t.transform(yg(e),r)))}}var Vy=e=>Rh(e,bg),Hy=(e,t,n,r)=>dh(r,r=>$m(()=>jp(r,r=>new Eg(e,r,t,n))));function Uy(e,t){let n=zy(e.link.transformation),r;return(i,a)=>{if(i===$)return gg;if(e.isConstructed(i))return _g;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function Wy(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==$&&r!==void 0)return t(r,i);let a=n;if(ld(a)&&a._tag===`Success`){let e=t(a[P],i);return vg(e)?a:e}return Rh(Hy(e,r,i,a),e=>{let n=t(e,i);return vg(n)?hg(e):n})}}function Gy(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:Wy(e,n)}function Ky(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?Ay(e):void 0,o=a?Uy(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>zy(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);try{if(u&&!n.disableChecks){if(ld(r)){if(r._tag===`Success`){let i=vg(r)?t:r[P];if(t!==$&&i!==$){let i=ky(u,t,void 0,e,n);i&&(r=Zm(new Ag(e,i,t,n)))}}}else r=rh(r,r=>{if(t!==$&&r!==$){let r=ky(u,t,void 0,e,n);if(r)return Zm(new Ag(e,r,t,n))}return Wm(r)})}if(s&&!n.disableChecks){if(ld(r)){if(r._tag===`Success`){let i=vg(r)?t:r[P];if(i===$)return r;let a=ky(s,i,void 0,e,n);a&&(r=Zm(new Ag(e,a,i,n)))}}else r=rh(r,t=>{if(t!==$){let r=ky(s,t,void 0,e,n);if(r)return Zm(new Ag(e,r,t,n))}return Wm(t)})}return r}catch(e){return eh(e)}},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[P],o=t(a,r)):o=Rh(o,e=>{let n=t(e,r);return vg(n)?hg(e):n})}if(o._tag===`Success`){let e=o[P],t=p(e,r);return vg(t)?o:t}return o=Hy(e,n,r,o),Rh(o,e=>{let t=p(e,r);return vg(t)?hg(e):t})}:p}var qy=Symbol(),Jy=new WeakMap,Yy=e=>$y(e).parser,Xy=e=>$y(e).makeEffect,Zy=e=>Gy(e,Xy),Qy=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=Ky(this.ast,Yy)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=Ky(this.ast,Xy,Zy)}};function $y(e){let t=Jy.get(e);if(t!==void 0)return t;let n=new Qy(e);return Jy.set(e,n),n}function eb(e){let t=e.ast,n;return(e,r)=>(n??=mb(Cb,gy(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function tb(e){let t=eb(e);return(e,n)=>{let r=Ph(t(e,n));return Up(r)?js(r.value):(Qg(r.cause,`Option adapter can only return none for schema issues`),As())}}function nb(e){return bb(gy(e.ast))}function rb(e){return ab(e.ast)}function ib(e){{let t=hb(fb(e));return e=>{let n=t(e,M_);return Up(n)?!0:(Qg(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function ab(e){let t=gy(e),n=e=>(n=ib(t),n(e));return e=>n(e)}function ob(e,t){let n=fb(e.ast);return t===void 0?n:(e,r)=>n(e,ub(t,r))}function sb(e,t){return gb(ob(e,t))}var cb=sb;function lb(e,t){let n=fb(yy(e.ast));return t===void 0?n:(e,r)=>n(e,ub(t,r))}var ub=(e,t)=>t?{...e,...t}:e,db=e=>e===$?Zm(new Mg):Wm(e);function fb(e){return mb(Sb,e)}function pb(e,t){return vg(e)?Wm(t):ld(e)?e[P]===$?db($):e:Rh(e,db)}function mb(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??M_);return vg(a)?Wm(r):ld(a)?a[P]===$?db($):a:Rh(a,db)}}function hb(e){return(t,n)=>Ph(e(t,n))}function gb(e){let t=hb(e);return(e,n)=>{let r=t(e,n);return Up(r)?js(r.value):(Qg(r.cause,`Option adapter can only return none for schema issues`),As())}}function _b(e,t){let n=Ph(e);if(Up(n))return n.value;let r=Qg(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}var vb=`Constructor adapter can only throw schema issues`;function yb(e){throw Error(vb,{cause:kp(e)})}function bb(e){let t;return(n,r)=>xb(t??=$y(e),n,r)}function xb(e,t,n){let r=n?.disableChecks?n.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions??M_,i=e.make;if(i!==void 0&&t!==$){let e;try{e=i(t,r)}catch(e){yb(e)}if(e!==qy&&e!==$)return e}return _b(pb(e.makeEffect(t,r),t),vb)}var Sb=e=>$y(e).parser,Cb=e=>$y(e).makeEffect,wb=`~effect/Schema/Schema`,Tb=Symbol(),Eb={[wb]:wb,get make(){let e=nb(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=eb(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=tb(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return vi(this,arguments)},annotate(e){return this.rebuild(Xv(this.ast,e))},annotateKey(e){return this.rebuild(ay(this.ast,e))},check(...e){return this.rebuild(Qv(this.ast,e))},rebuild(e){return Db(e,this[Tb])}};function Db(e,t){function n(){}let r=Object.setPrototypeOf(n,Eb);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Tb]=t,r.ast=e,r}function Ob(e){return Up(e)?e.value:{issues:[{message:Np(e.cause)}]}}function kb(e,t){let n=ob(e),r={errors:`all`,...t?.parseOptions},i=Bg(t);return Ab(e,{validate:e=>{let t=new Sl(`sync`),a=Ah(bh(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?Ob(o):new Promise(e=>{a.addObserver(t=>{e(Ob(t))})})}})}function Ab(e,t){let n={version:1,vendor:`effect`,...Object.hasOwn(e,`~standard`)?e[`~standard`]:void 0,...t},r=typeof e==`function`?Function.prototype.bind.call(e,void 0):Object.create(Object.getPrototypeOf(e));return Object.defineProperties(r,{...Object.getOwnPropertyDescriptors(e),ast:{value:e.ast,enumerable:!0,configurable:!0},"~standard":{value:n,writable:!0,enumerable:!0,configurable:!0}})}var jb=e=>e,Mb=`~effect/Schema/SchemaError`;function Nb(e){return j(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}({...Xa}),{...Xa},{...Xa},{...Xa},{...Xa},{...Xa},{...Xa},{...Xa};var Pb=class extends El(`SchemaError`){[Mb]=Mb;constructor(e){let t=Qa();$a(0);try{super({issue:e})}finally{$a(t)}}get message(){return Jg(this.issue)}toJSON(){return{_tag:this._tag,message:this.message}}[qa](){return this.toJSON()}toString(){return`SchemaError(${this.message})`}};function Fb(e){return Nb(e)}function Ib(e){return ld(e)?Lb(e):dh(e,e=>$m(()=>jp(e,e=>new Pb(e))))}function Lb(e){return Up(e)?e:Rp(jp(e.cause,e=>new Pb(e)))}function Rb(e,t){let n;for(let r of e.reasons){if(!Dp(r)||!Fb(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 zb(e){let t=Ph(e);if(Up(t))return t.value;throw Rb(t.cause,`Sync adapter can only throw schema errors`)}function Bb(e,t){return kb(e,t)}var Vb=rb;function Hb(e,t){let n=ob(e,t);return(e,t)=>Ib(n(e,t))}var Ub=sb,Wb=cb;function Gb(e,t){let n=Hb(e,t);return(e,t)=>zb(n(e,t))}function Kb(e,t){let n=lb(e,t);return(e,t)=>Ib(n(e,t))}function qb(e,t){let n=Kb(e,t);return(e,t)=>zb(n(e,t))}var Jb=qb,Yb=Db,Xb=jb(e=>Yb(oy(e.ast),{schema:e})),Zb=jb(e=>{let t=hx(e);return Yb(cy(e.ast),{schema:t})}),Qb=jb(e=>Yb(_y(e.ast),{schema:e}));function $b(e){let t=Yb(new H_(e),{literal:e,transform(n){return t.pipe(gx($b(n),{decode:n_(()=>n),encode:n_(()=>e)}))}});return t}var ex=Yb(V_),tx=Yb(L_),nx=Yb(B_),rx=Yb(W_),ix=Yb(q_),ax=Yb(J_);function ox(e,t){return Yb(e,{fields:t,mapFields(e,t){let n=e(this.fields);return ox(mv(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function sx(e){return ox(mv(e,void 0),e)}function cx(e,t){return Yb(dy(e.ast,t.ast),{key:e,value:t})}var lx=jb(e=>Yb(new Y_(!1,[],[e.ast]),{value:e})),ux=jb(e=>Yb(_v(e.ast),{schema:e}));function dx(e,t){return Yb(e,{members:t,mapMembers(e,t){let n=e(this.members);return dx(gv(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function fx(e,t){return dx(gv(e,t,void 0),e)}function px(e){let t=e.map($b);return Yb(gv(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return fx(e(this.members))},pick(e){return px(e)},transform(e){return fx(t.map((t,n)=>t.transform(e[n])))}})}var mx=jb(e=>fx([e,tx])),hx=jb(e=>fx([e,nx]));function gx(e,t){return n=>Yb(ly(n.ast,e.ast,t?v_(t):b_()),{from:n,to:e})}function _x(e){return ld(e)&&e._tag===`Success`?e:dh(e,e=>$m(()=>jp(e,e=>e.issue)))}function vx(e,t){let n=t?.encodingStrategy===`omit`?o_():t_();return t=>Xb(Qb(t)).pipe(gx(t,{decode:s_(_x(e)),encode:n}))}var yx=zv,bx=Yb(Vv);function xx(e){return yx(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`,minimum:globalThis.Number.MIN_SAFE_INTEGER,maximum:globalThis.Number.MAX_SAFE_INTEGER}),toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var Sx=ix.check(xx());function Cx(e,t,n){return yx(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[dg]:!0,arbitraryConstraint:{minLength:e},...n})}function wx(e){return Cx(1,1,e)}var Tx=rx.check(wx());globalThis.RegExp,globalThis.URL;var Ex=rx.annotate({expected:`a string that will be decoded as JSON`});function Dx(e,t){return Ex.pipe(gx(e,S_(t)))}globalThis.File,globalThis.URLSearchParams,globalThis.Uint8Array;var Ox=Yb(Xv(Fy,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),kx=Ub(Tx),Ax=Ub(Sx);function jx(e){let t=kx(e??``);return Ns(t)?t.value:void 0}function Mx(e){if(e===void 0)return;let t=Ax(e);if(Ns(t)&&t.value>0)return t.value;if(!zi(e))return;let n=Ax(Number.parseInt(e,10));return Ns(n)&&n.value>0?n.value:void 0}function Nx(e){return{kind:jx(e.kind),name:jx(e.name),run:jx(e.run),thread:jx(e.thread),seq:Mx(e.seq)}}var Px=`modulepreload`,Fx=function(e,t){return new URL(e,t).href},Ix={},Lx=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=Fx(t,n),t=s(t),t in Ix)return;Ix[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`:Px,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)})},Rx=Ur(`/`)({validateSearch:Nx,component:Wr(()=>Lx(()=>import(`./routes-Ch30UGik.js`),__vite__mapDeps([0,1]),import.meta.url),`component`)}),zx={IndexRoute:Rx.update({id:`/`,path:`/`,getParentRoute:()=>_i})},Bx=_i._addFileChildren(zx)._addFileTypes();function Vx(){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 Hx(){return si({routeTree:Bx,basepath:Vx()})}var Ux=document.getElementById(`root`);Ux&&(0,gi.createRoot)(Ux).render((0,D.jsx)(i.StrictMode,{children:(0,D.jsx)(ui,{router:Hx()})}));export{ch as $,No as $n,su as $t,lh as A,ic as An,Rp as At,Qm as B,Ds as Bn,Mp as Bt,Bb as C,vc as Cn,vi as Cr,Rm as Ct,Ch as D,Sc as Dn,Om as Dt,lg as E,xc as En,r as Er,Tm as Et,uh as F,Ls as Fn,Hp as Ft,Dh as G,fo as Gn,md as Gt,Rh as H,Qo as Hn,td as Ht,Sh as I,Ms as In,Fp as It,Xm as J,F as Jn,hu as Jt,Oh as K,P as Kn,vd as Kt,Th as L,Ns as Ln,Op as Lt,dh as M,Fs as Mn,Wp as Mt,fh as N,Ps as Nn,Up as Nt,wh as O,_c as On,Gp as Ot,ph as P,Is as Pn,Lp as Pt,Ih as Q,mo as Qn,cd as Qt,sh as R,As as Rn,Ap as Rt,Zb as S,Cc as Sn,Oi as Sr,gm as St,cg as T,bc as Tn,Pn as Tr,Em as Tt,ih as U,es as Un,Iu as Ut,rh as V,ts as Vn,nd as Vt,Fh as W,Jo as Wn,Md as Wt,_h as X,Ro as Xn,_u as Xt,gh as Y,zo as Yn,vu as Yt,Vm as Z,Fo as Zn,Hf as Zt,Gb as _,El as _n,wi as _r,th as _t,Ox as a,mf as an,N as ar,yh as at,Vb as b,jc as bn,O as br,sm as bt,mx as c,$d as cn,M as cr,Mh as ct,sx as d,xu as dn,Vi as dr,Wm as dt,Qf as en,Vo as er,mh as et,fx as f,Du as fn,k as fr,Gm as ft,Ub as g,Au as gn,zi as gr,Um as gt,Hb as h,jf as hn,qi as hr,hh as ht,bx as i,vf as in,ma as ir,Hm as it,Jm as j,oc as jn,Vp as jt,ah as k,Vs as kn,Bp as kt,cx as l,af as ln,Yi as lr,Nh as lt,Wb as m,wu as mn,Ki as mr,oh as mt,lx as n,yf as nn,Ja as nr,Ym as nt,$b as o,pf as on,sa as or,Ah as ot,ex as p,Tu as pn,Bi as pr,Km as pt,kh as q,To as qn,bd as qt,ax as r,_f as rn,Ia as rr,Eh as rt,px as s,sf as sn,Qi as sr,jh as st,Rx as t,fd as tn,qa as tr,xh as tt,rx as u,uf as un,j as ur,vh as ut,Jb as v,Tc as vn,Di as vr,qm as vt,vx as w,yc as wn,mi as wr,Dm as wt,ux as x,kc as xn,xi as xr,cm as xt,Dx as y,Oc as yn,Si as yr,nh as yt,Zm as z,js as zn,Pp as zt};