@tempoxyz/id 0.0.0-pr-233.sha-cb5fd3d → 0.0.0-pr-228.sha-356bcc7

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.
@@ -290,8 +290,8 @@
290
290
  "file": "assets/convert-BIC8n32x.js",
291
291
  "name": "convert"
292
292
  },
293
- "_cookie-C2SUWI9R.js": {
294
- "file": "assets/cookie-C2SUWI9R.js",
293
+ "_cookie-CStT7Z5O.js": {
294
+ "file": "assets/cookie-CStT7Z5O.js",
295
295
  "name": "cookie",
296
296
  "imports": [
297
297
  "_rolldown-runtime-B0Z9INg1.js",
@@ -474,13 +474,13 @@
474
474
  "src": "components/icons/wYLDS.svg"
475
475
  },
476
476
  "router.tsx": {
477
- "file": "assets/router--hr181W2.js",
477
+ "file": "assets/router-Di5rVehM.js",
478
478
  "name": "router",
479
479
  "src": "router.tsx",
480
480
  "isDynamicEntry": true,
481
481
  "imports": [
482
482
  "_rolldown-runtime-B0Z9INg1.js",
483
- "_cookie-C2SUWI9R.js",
483
+ "_cookie-CStT7Z5O.js",
484
484
  "_accessKey-9uVGRYSI.js"
485
485
  ],
486
486
  "css": [
@@ -512,7 +512,7 @@
512
512
  "isEntry": true,
513
513
  "imports": [
514
514
  "_rolldown-runtime-B0Z9INg1.js",
515
- "_cookie-C2SUWI9R.js",
515
+ "_cookie-CStT7Z5O.js",
516
516
  "_accessKey-9uVGRYSI.js",
517
517
  "_call-B7d3e1NI.js",
518
518
  "_utils-C4ZXZIZW.js",
@@ -0,0 +1,3 @@
1
+ import{a as e,t}from"./rolldown-runtime-B0Z9INg1.js";import{$ as n,$n as r,$t as i,An as a,Bn as o,Bt as s,Cn as c,Dn as l,Fn as u,Ft as d,Gt as f,Hn as p,Ht as m,In as h,It as g,J as _,Jn as v,Jt as y,K as b,Kt as x,Ln as S,Lt as C,M as w,Nn as T,On as E,Pn as D,Q as ee,Qt as te,Rn as ne,Rt as re,S as ie,Sn as ae,U as oe,Ut as se,Vn as ce,Vt as le,Wn as ue,Wt as de,X as fe,Xn as pe,Xt as me,Yn as he,Yt as ge,Z as _e,Zn as ve,Zt as ye,an as be,b as xe,en as Se,f as Ce,h as we,jt as O,n as Te,nn as Ee,nr as De,on as Oe,q as ke,qt as Ae,r as je,rn as Me,sn as Ne,tn as Pe,tt as Fe,v as Ie,wn as Le,xn as Re,y as ze,zn as Be}from"./accessKey-9uVGRYSI.js";import{An as Ve,Dn as He,Dt as Ue,Fn as k,J as We,M as Ge,Mn as A,Mt as Ke,N as qe,Nn as j,Nt as Je,Ot as Ye,Rn as Xe,S as Ze,Tn as M,Tt as Qe,Vn as $e,_t as et,b as tt,bn as nt,bt as rt,c as it,ct as at,d as ot,f as st,g as ct,h as lt,i as ut,jn as dt,jt as ft,l as pt,p as mt,st as ht,t as gt,tn as _t,v as vt,wt as yt,x as bt,xn as xt}from"./call-B7d3e1NI.js";import{t as St}from"./secp256k1-buM5g4AL.js";import{a as Ct}from"./schemas-C2lCYmR5.js";import{AsyncLocalStorage as wt}from"node:async_hooks";var Tt=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.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.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`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return D(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(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 oe(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,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(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 se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var le=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ue(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,le)}catch(e){le(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function de(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ue(de.bind(null,e))}var fe={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=fe,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=de,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=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ue,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),Et=t(((e,t)=>{t.exports=Tt()}));function N(e){return e?.isNotFound===!0}var Dt=`__root__`;function Ot(e){e.statusCode=e.statusCode||e.code||307;let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function kt(e){return e instanceof Response&&!!e.options}function At(e){return e[e.length-1]}function jt(e,t){return typeof e==`function`?e(t):e}var Mt=Object.prototype.hasOwnProperty;function Nt(e){for(let t in e)if(Mt.call(e,t))return!0;return!1}var Pt=()=>Object.create(null),Ft=(e,t)=>It(e,t,!0);function It(e,t,n,r=0){return t}function Lt(e){return!e||typeof e!=`object`?!1:(Object.getPrototypeOf(e)?.constructor??Object)===Object}function Rt(e,t,n,r){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let i=0,a=e.length;i<a;i++){let a=e[i],o=t[i];if(a!==o&&!Rt(a,o,n,r))return!1}return!0}if(Lt(e)&&Lt(t)){if(n){for(let i in t)if((r||t[i]!==void 0)&&!Rt(e[i],t[i],n,r))return!1;return!0}let i=0;if(r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;for(let a in t)if((r||t[a]!==void 0)&&(i--===0||!Rt(e[a],t[a],n,r)))return!1;return i===0}return!1}function zt(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}var Bt=/[\x00-\x1f\x7f"<>`{}]/g;function Vt(e){return e.replace(Bt,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Ht(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 Vt(t)}var Ut=[`http:`,`https:`,`mailto:`,`tel:`];function Wt(e){if(e[0]!==`/`&&e.includes(`:`))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(e)?.[1]?.replace(/[\t\n\r]/g,``).toLowerCase()}var Gt=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Kt(e,t){if(!e)return!1;if(Gt.test(e))return!0;let n=Wt(e);return n?!t.has(n):!1}var qt={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},Jt=/[&><\u2028\u2029]/g;function Yt(e){return e.replace(Jt,e=>qt[e])}function Xt(e){if(!e)return e;let t=e;if(/[%\\\x00-\x1f\x7f]/.test(e)){let n=/%25|%5C/gi,r=0,i;for(t=``;(i=n.exec(e))!==null;)t+=Ht(e.slice(r,i.index))+i[0],r=n.lastIndex;t+=Ht(r?e.slice(r):e)}return t}function Zt(e){return/[\s\u0080-\uFFFF]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Qt(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 $t(e){return e.replace(/\/{2,}/g,`/`)}function en(e){return e===`/`?e:e.replace(/^\/+/,``)}function tn(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/+$/,``):e}function nn(e){return tn(en(e))}function rn(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function an(e,t,n=`never`,r){if(t.includes(`//`)&&(t=$t(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=$t(e)),o=e.split(`/`);o.length>1&&At(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&&(At(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?$t(s):s)||`/`;return a&&r&&r.set(a,c),c}function on(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=new RegExp([...t.keys()].join(`|`).replace(/[.*()]/g,`\\$&`),`g`);return e=>e.replace(n,e=>t.get(e)??e)}function sn(e){return e==null||e===``}function cn(e,t,n){if(typeof t!=`string`)return``+(t??void 0);let r=e===`_splat`;if(r&&(!t||/^[a-zA-Z0-9\-._~!/]*$/.test(t)))return t;let i=encodeURIComponent(t);return r&&(i=i.replaceAll(`%2F`,`/`)),n?n(i):i}function ln(e,t,n,r,i){let a=e.endsWith(`/`)?`/`:``,o=``;for(let e of t){if(typeof e==`string`){o+=e;continue}let[t,s,c,l]=e,u=t===2,d=u&&l!==void 0?l+a:l,f=n[s];if(t!==3||f!=null){if(i&&(i[s]=f,u&&(i[`*`]=f)),u&&sn(f)){if(c===`/`&&!d)continue;f=``}o+=c+cn(s,f,r)+(d||``)}}return o+a||`/`}function un(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}function dn(){throw Error(`Invariant failed`)}var P=4,fn=5;function pn(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function mn(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.substring(s,a);return[o?3:c?1:2,c||`_splat`,r.substring(0,i),e.substring(t+a+1,c?n:e.length)]}}return r}function hn(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=At(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=mn(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=F(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.substring(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=F(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.substring(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=F(r,fn);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=F(r,P);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function gn(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 F(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function _n(e,t){let n=F(),r=[];function i(e,t,n,a){let[o,s,c]=hn(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(gn);t.masksTree=n,t.flatCache=un(1e3)}function vn(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Sn(e,t.masksTree);return t.flatCache.set(e,r),r}function yn(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=F(),hn(t,{from:e},1,o),i.singleCache.set(a,o)),Sn(r,o,n)}function bn(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=Sn(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=wn(a.route)),t.matchCache.set(r,a),a}function xn(e,t=!1){let n=F(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&dn(),i[e.id]=e,o!==0&&e.path){let t=tn(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[u,d,f]=hn(t,e,n,c,r,l);if(e._interpolation=f,e.children)for(let t of e.children)s(t,d,u,f)}s(e,1,n);for(let e of r)e.sort(gn);return{processedTree:{segmentTree:n,singleCache:un(1e3),matchCache:un(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Sn(e,t,n=!1){let r=e.split(`/`),i=En(e,r,t,n);if(!i)return null;let[a]=Cn(e,r,i);return{route:i.node.route,rawParams:a}}function Cn(e,t,n){let r=Tn(n.node),i=n.node.data&&pn(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===P)break;if(u.kind===fn){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function wn(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Tn(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function En(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!At(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!An(l,n))continue;if(i.parse){if(!kn(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==P&&An(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===P||i.kind===2)&&An(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(kn(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&On(f,o))return n;An(l,n)&&(l=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(u).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:u,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:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Dn(o,u),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:u+1,skipped:d,statics:f,dynamics:p+Dn(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Dn(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Dn(o,u),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:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;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 Dn(e,t){return 2**(e-t-1)}function On(e,t){return e===2**(t-1)-1}function kn(e,t,n){let r,i;try{[r,i]=Cn(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 An(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===P)>(e.node.kind===P)||t.node.kind===P==(e.node.kind===P)&&t.node.depth>e.node.depth)))}function jn(){try{return sessionStorage}catch{return}}jn();function Mn(e,t=String){let n;for(let r in e){let i=e[r];i!==void 0&&(n||=new URLSearchParams).set(r,t(i))}return n?n.toString():``}function Nn(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function Pn(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]=Nn(r):Array.isArray(t)?t.push(Nn(r)):n[e]=[t,Nn(r)]}return n}var Fn=/^(?:\s|["[{\d-]|fa|nu|tr)/,In=Rn(JSON.parse),Ln=zn(JSON.stringify,JSON.parse);function Rn(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=Pn(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!Fn.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function zn(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&&!Fn.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Mn(e,r);return t?`?${t}`:``}}function Bn(e,t,n){let r=nn(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=$t(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>Vn(n,s.input({url:e})),output:({url:e})=>s.output({url:Hn(n,e)})}:s}function Vn(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 Hn(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 Un(e){let t=e;return{get(){return t},set(e){t=jt(e,t)}}}function Wn(e){return{get(){return e()}}}function Gn(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(()=>{Qt(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 Kn=`__TSR_index`,qn=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Jn(e){let t=qn.exec(e);return t?`/`+e.slice(t[0].length):e}function Yn(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
2
+ \r`.includes(e)?``:encodeURIComponent(e))),Jn(e)}var Xn=()=>{},Zn=class{constructor(e){this.location=e}get length(){return 1}get subscribers(){return this._subscribers??=new Set}subscribe(){return Xn}push(){}replace(){}go(){}back(){}forward(){}canGoBack(){return!1}createHref(e){return Yn(e)}block(){return Xn}flush(){}destroy(){}notify(){}_getBlockers(){return[]}};function Qn(e){return new Zn($n(e,void 0))}function $n(e,t){let n=Yn(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=er();t={[Kn]:0,key:e,__TSR_key:e}}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}}function er(){return(Math.random()+1).toString(36).substring(7)}function tr(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function nr(e){return e.pathname+e.search+e.hash}function rr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function ir(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function ar(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function or(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var sr=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!0??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&this.options.history&&(this.history=this.options.history),this.origin=this.options.origin,this.origin||=`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&nn(n)?Bn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||t?.caseSensitive!==this.options.caseSensitive){this.routeTree=this.options.routeTree;let e;globalThis.__TSR_CACHE__&&globalThis.__TSR_CACHE__.routeTree===this.routeTree&&globalThis.__TSR_CACHE__.caseSensitive===this.options.caseSensitive?e=globalThis.__TSR_CACHE__.processRouteTreeResult:(e=this.buildRouteTree(),globalThis.__TSR_CACHE__===void 0&&(globalThis.__TSR_CACHE__={routeTree:this.routeTree,caseSensitive:this.options.caseSensitive,processRouteTreeResult:e})),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Gn(this.latestLocation,e)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=xn(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&_n(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:un(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:Xt(e),external:!1,searchStr:o,search:Ft(t?.search,i),hash:Xt(r.slice(1)),state:It(t?.state,a)}}let o=Vn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),c=this.options.stringifySearch(s);return o.search=c,{href:o.href.replace(o.origin,``),publicHref:i,pathname:Xt(Jn(o.pathname)),external:!!this.rewrite&&tr(o,this.origin),searchStr:c,search:Ft(t?.search,s),hash:Xt(o.hash.slice(1)),state:It(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=bn(tn(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=$n(t.href,{});t={...t,to:Vn(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,i=()=>n,a=()=>r??=this.matchRoutesLightweight(n),o=t.to?`${t.to}`:`.`,s=an(o[0]===`/`?``:t.unsafeRelative===`path`?i().pathname:t.from??a()[1],o,this.options.trailingSlash,this.resolvePathCache),c=this.routesByPath[tn(s)],l=s.includes(`$`),u;if(c)u=c._branch??=wn(c);else if(l)u=[];else{let[e,t,n]=this.getMatchedRoutes(s);u=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(u=[...u,this.options.notFoundRoute])}let d=l?c?._interpolation??hn(!1,{fullPath:s},0):void 0,f;for(let e of u){let n=e.options.params?.stringify??e.options.stringifyParams;if(n){let e=a()[3];if(f??=dr(t.params,e),!Nt(f))break;f===e&&(f=Object.assign(Pt(),f));try{Object.assign(f,n(f))}catch{}}}f??=dr(t.params,fr(t.params,d)?a()[3]:pr);let p=e.leaveParams?s:Jn(Xt(d?ln(s,d,f,this.pathParamsDecoder):s)),m=mr(u,e._includeValidateSearch),h=()=>{let t=a()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};u.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,ur(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},g=m.length?hr(m,h(),t):t.search===!0?h():typeof t.search==`function`?t.search(h()):t.search||pr,_=this.options.stringifySearch(g),v=t.hash===!0?i().hash:typeof t.hash==`function`?t.hash(i().hash):t.hash||void 0,y=v?`#${v}`:``,b=t.state?t.state===!0?i().state:typeof t.state==`function`?t.state(i().state):t.state:pr,x=`${p}${_}${y}`,S,C,w=!1;if(this.rewrite){let e=new URL(x,this.origin),t=e.origin,n=Hn(this.rewrite,e);S=nr(e),tr(n,t)?(C=n.href,w=!0):C=Jn(nr(n))}else S=Zt(x),C=S;return{publicHref:C,href:S,pathname:p,search:g,searchStr:_,state:b,hash:v??``,external:w,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=vn(n.pathname,this.processedTree);if(r){let i=Object.assign(Pt(),r.rawParams),{from:a,params:o,...s}=r.route,c=dr(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>Promise.resolve(),this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{},this.load=async e=>hi(this,e),this.startViewTransition=e=>(this.shouldViewTransition??this.options.defaultViewTransition,this.shouldViewTransition=void 0,e()),this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&rr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(Gt.test(n)||(r=Wt(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:tr(e,this.origin)||(n=nr(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=I,this.preloadRoute=e=>qr(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?an(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=yn(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!Rt(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?Rt(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=on(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??Ln,parseSearch:e.parseSearch??In,protocolAllowlist:e.protocolAllowlist??Ut})}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=hn(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:tn(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?gr(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=ur(i.options.validateSearch,{...n})??void 0;l={...n,...e},f={...r,...e}}catch(e){let r=e;if(e instanceof cr||(r=new cr(e.message,{cause:e})),t?.throwOnError)throw r;l=n,f={},p=r}}let m=``,h=``;try{m=i.options.loaderDeps?.({search:l})??``,h=m&&JSON.stringify(m)||``}catch(e){if(t?.throwOnError)throw e;p??=e}let g=Pt(),_=i._interpolation?ln(i.fullPath,i._interpolation,r,this.pathParamsDecoder,g):i.fullPath,v=i.id+_+h,y=u(i,n),b=this._cache.get(v)??(y?.id===v?y:void 0);d=b?._strictParams??Object.assign(g,d);let x;if(!b)try{_r(i,d)}catch(e){if(x=N(e)||kt(e)?e:new lr(e.message,{cause:e}),t?.throwOnError)throw x}let S=y?`stay`:`enter`,C;if(b)C={...b,cause:S,search:Ft(y?y.search:b.search,l),_strictSearch:f,searchError:p};else{let e=rr(i)?`pending`:`success`;C={id:v,ssr:void 0,index:n,routeId:i.id,params:y?.params??d,_strictParams:d,pathname:_,updatedAt:Date.now(),search:y?Ft(y.search,l):l,_strictSearch:f,searchError:p,status:e,isFetching:!1,error:void 0,paramsError:x,context:{},abortController:t?._controller??new AbortController,cause:S,loaderDeps:y?It(y.loaderDeps,m):m,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let w=s===i.id;C._notFound&&!w&&(C.error=void 0),C._notFound=w,c[n]=C}for(let e=0;e<c.length;e++){let n=c[e];n.params=n.cause===`stay`?Ft(n.params,d):d,t?._controller&&(n.context={})}return c}matchRoutesLightweight(e){let t=At(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=At(a),c={...e.search};for(let e of a)try{Object.assign(c,ur(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{_r(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}},cr=class extends Error{},lr=class extends Error{};function ur(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new cr(`Async validation not supported`);if(n.issues)throw new cr(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 dr(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function fr(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!Mt.call(e,t[1]))}var pr=Object.freeze({});function mr(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=ur(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function hr(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=jt(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function gr(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 Dt}function _r(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function vr(e,t){return e.options[t]?.preload?.()}function yr(e,t){let n=vr(e,`component`),r=vr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function I(e,t,n){let r=()=>t===!1?void 0:t?vr(e,t):yr(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 br(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function xr(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0)t=Math.min(t,Math.max(n+1,r._assetEnd));else if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var L=0,R=1,Sr=2,z=3,B=[4];function Cr(e){return typeof e[0]==`number`}function wr(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Tr(e,t){return e.routesById[t.routeId]}function Er(e,t,n){return kt(e)?[z,e]:N(e)?(e.routeId||=n,[Sr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[R,e]):[L,e]}function Dr(e,t){let n=Er(t,!0,e.id);if(n[0]!==R)return n;try{e.options.onError?.(n[1])}catch(t){n=Er(t,!0,e.id)}return n}function Or(e,t,n,r,i){return i[0].signal.aborted?B:Ur(e,t,n,Dr(n,r),i)}async function kr(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=Tr(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 V(e,r),[i,Or(e,t,u,a,n)]}if(c.aborted)return[i,B];let p=r.paramsError??r.searchError;if(p!==void 0)return V(e,r),[i,Or(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{Nr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?wr(a,c):a);if(c.aborted)return[i,B];let s=Ur(e,t,u,Er(o,!1,u.id),n);if(s[0]!==L)return V(e,r),[i,s];r.context={...r.context,...o}}catch(a){return V(e,r),[i,Or(e,t,u,a,n)]}finally{r.status=h,Nr(e,r,!1,n[0])}}i()}function Ar(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 V(e,t){let n=t._flight;t._flight=void 0,Ar(e,t,n)?.abort()}function jr(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=Ar(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Mr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function Nr(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 Pr(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 Fr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return B;if(!i)return[L,void 0];let l=n._flight;Nr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Pr(e,t,n,r,s,a,!!o[3]))).then(e=>Er(e,!1,r.id),e=>Er(e,!0,r.id)).then(t=>(t[0]!==L&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===R&&l[2]?Dr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Ur(e,t,r,await wr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return V(e,n),B}finally{Nr(e,n,!1,s)}}function Ir(e,t,n){t[0]!==z&&(e.status=`success`,e.error=void 0,t[0]===L?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function Lr(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&&V(e,r)}function Rr(e,t){return t[0]===R||t[0]===Sr?{...e,status:t[0]===R?`error`:`notFound`,error:t[1],_flight:void 0}:e}function zr(e,t,n,r,i,a,o){let s=t[1][n],c=Tr(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(Pr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=B)),!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,V(e,s),p=Or(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,C=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,Ar(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?Fr(e,t,s,c,g,i,a).then(t=>(Ir(s,t,l),t[0]===L&&(m&&!a[0].signal.aborted&&Lr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[L,s.loaderData]),T=(async()=>{try{let e=I(c,void 0,C);e&&await wr(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,Or(e,t,c,r,a)]}let r=await w;x&&r[0]===L&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>Rr(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=Fr(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,Ir(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>Rr(E,e))}async function Br(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=Tr(e,t[n]);try{let e=I(i,!1);e&&await wr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function Vr(e,t){t[2]&&=(jr(e,t[2].map(e=>e[3])),void 0)}async function Hr(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]>=z)throw[a,t];!i&&t[0]!==L&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===z)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Ur(e,t,n,r,i,a){for(;r[0]===z;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[z,t]:[z,t,a]}return[z,o,n]}catch(e){r=a?[R,e]:Dr(n,e),a=!0}}return r}async function Wr(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]===Sr?Br(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=z)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]!==L&&t[0]<z&&!(`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)>=z){let n=s[1];if(n[0]!==z||n[1].options.reloadDocument||n[2])return Vr(e,t),n;c=!0,s=[0,[R,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===R?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=Tr(e,u);try{await wr(i?Promise.resolve().then(()=>I(m,l===R?`errorComponent`:`notFoundComponent`)):Promise.all([I(m),I(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return Vr(e,t),B}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),Vr(e,t),jr(e,o),p()):u.status=`success`}return t}async function Gr(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=Tr(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 wr(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 Kr(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 Br(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=zr(e,i,t,u,f,r,l)},m=await kr(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===Sr){let t=await Br(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=z&&(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=Wr(e,i,u,r[0],Hr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=Hr(i[2],void 0,void 0,h.then(e=>Cr(e)?0:br(n).length,()=>0))),o=await h}catch(t){if(Vr(e,i),t===a&&a.aborted)return B;throw t}return Cr(o)?o:Gr(e,o,a,r[6]===n.length?r[6]:0)}async function qr(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}),Mr(a),o=(e._preloads??=new Map).set(i,a),s=await Kr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),jr(e,a)),i.abort()}if(!Cr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){N(e)||console.error(e);return}}}function Jr(e,t){if(e)try{let n=e(t);n!==void 0&&Promise.resolve(n).catch(()=>{})}catch{}}function Yr(e,t,n,r){let i=Promise.resolve(e);return t.aborted?(i.then(e=>Jr(n,e),e=>Jr(r,e)),Promise.reject(t.reason)):new Promise((e,a)=>{let o=()=>a(t.reason);t.addEventListener(`abort`,o,{once:!0}),i.then(r=>{t.removeEventListener(`abort`,o),t.aborted?Jr(n,r):e(r)},e=>{t.removeEventListener(`abort`,o),t.aborted?Jr(r,e):a(e)})})}var Xr=0,H=1,U=2,W=3,Zr=4,Qr=Object.freeze({name:`AbortError`,message:`TanStack Router aborted this server match because it settled.`}),$r=Object.freeze({name:`AbortError`,message:`TanStack Router aborted this server match because of a redirect.`});function G(e,t){return e.routesById[t.routeId]}function ei(e,t){return kt(e)?[W,e]:N(e)?[U,e]:(t&&typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),t?[H,e]:[Xr,e])}function K(e,t,n,r,i,a=!0){i?.throwIfAborted();let o=ei(r,!0);if(o[0]!==H)return ti(e,t,n,o,i,a);try{n.options.onError?.(o[1])}catch(e){o=ei(e,!0)}return i?.throwIfAborted(),ti(e,t,n,o,i,a)}function ti(e,t,n,r,i,a=!0){if(r[0]!==W)return r;i?.throwIfAborted();try{return r[1].options._fromLocation=t.location,e.resolveRedirect(r[1]),i?.throwIfAborted(),r}catch(r){return i?.throwIfAborted(),a?K(e,t,n,r,i,!1):[H,r]}}function ni(e,t){return t===void 0?{status:`success`,value:e}:{status:`error`,error:t}}function ri(e,t){return n=>e.navigate({...n,_fromLocation:t})}function ii(e,t){return t?Yr(e,t):e}function ai(e,t,n){let r=t.matches[n],i=G(e,r),a=t.matches[n-1]?.ssr;if(e.isShell())return i.id===Dt;if(a===!1)return!1;let o=e=>e===!0&&a===`data-only`?`data-only`:e,s=e.options.defaultSsr??!0,c=o(s);r.ssr=c;let l=i.options.ssr;if(l===void 0)return c;if(typeof l!=`function`)return o(l);let u={search:ni(r.search,r.searchError),params:ni(r.params,r.paramsError),location:t.location,matches:t.matches.map(e=>({index:e.index,pathname:e.pathname,fullPath:e.fullPath,staticData:e.staticData,id:e.id,routeId:e.routeId,search:ni(e.search,e.searchError),params:ni(e.params,e.paramsError),ssr:e.ssr}))};try{return Promise.resolve(l(u)).then(e=>o(e??s))}catch(e){return Promise.reject(e)}}function q(e,t){return t[0]===U&&!t[1].routeId&&(t[1].routeId=e.routeId),t}async function oi(e,t,n){let r=t.matches.findIndex(e=>e._notFound),i=r<0?t.matches.length:r+1,a,o={...e.options.context??{}};for(let r=0;r<i;r++){let s=t.matches[r],c=G(e,s);try{let n=ai(e,t,r);s.ssr=n instanceof Promise?await n:n}catch(o){n?.throwIfAborted(),a=[r,q(s,K(e,t,c,o,n))],i=r}if(n?.throwIfAborted(),a?.[1][0]===W)break;s.__beforeLoadContext=void 0;let l=o;try{let n;if(c.options.context){let r={deps:s.loaderDeps,params:s.params,context:o,location:t.location,navigate:ri(e,t.location),buildLocation:e.buildLocation,cause:s.cause,abortController:s.abortController,preload:!1,matches:t.matches,routeId:c.id};n=c.options.context(r)??void 0}l={...o,...n},s.context=l}catch(o){n?.throwIfAborted(),a||=[r,q(s,K(e,t,c,o,n))],i=r;break}if(n?.throwIfAborted(),a)break;let u=s.paramsError??s.searchError;if(u!==void 0){a=[r,q(s,K(e,t,c,u,n))],i=r;break}if(n?.throwIfAborted(),s.ssr===!1||!c.options.beforeLoad){o=l;continue}let d=s.abortController,f={search:s.search,abortController:d,params:s.params,preload:!1,context:l,location:t.location,navigate:ri(e,t.location),buildLocation:e.buildLocation,cause:s.cause,matches:t.matches,routeId:c.id,...e.options.additionalContext};try{let u=await c.options.beforeLoad(f);n?.throwIfAborted();let d=q(s,ti(e,t,c,ei(u,!1),n));if(d[0]!==Xr){a=[r,d],i=r;break}s.__beforeLoadContext=u,s.context={...l,...u},o=s.context}catch(o){n?.throwIfAborted(),a=[r,q(s,K(e,t,c,o,n))],i=r;break}}return{location:t.location,matches:t.matches,end:i,failure:a}}function si(e,t,n,r,i,a){return{params:n.params,deps:n.loaderDeps,preload:!1,parentMatchPromise:a[i-1]?.match,abortController:n.abortController,context:n.context,location:t.location,navigate:ri(e,t.location),cause:n.cause,route:r,...e.options.additionalContext}}function ci(e,t,n,r,i){let a=t.matches[n],o=G(e,a),s;if(a.ssr===!1)s=Promise.resolve([Zr]);else{let c=o.options.loader,l=typeof c==`function`?c:c?.handler;s=l?Promise.resolve().then(()=>l(si(e,t,a,o,n,r))).then(e=>ei(e,!1),e=>ei(e,!0)).then(n=>i?.aborted||a.abortController.signal.reason===$r?[Zr]:(n=n[0]===H?K(e,t,o,n[1],i):ti(e,t,o,n,i),q(a,n))):Promise.resolve([Xr,void 0])}let c=s.then(e=>{let t={...a};return e[0]===Xr?(t.loaderData=e[1],t.status=`success`,t.error=void 0,t.invalid=!1,t.isFetching=!1):e[0]===H?(t.status=`error`,t.error=e[1]):e[0]===U&&(t.status=`notFound`,t.error=e[1]),t});return{index:n,outcome:s,match:c}}async function li(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=G(e,t[n]);try{let e=I(i,!1);e&&await e}catch{r?.throwIfAborted()}if(r?.throwIfAborted(),i.options.notFoundComponent)return n}return a?.routeId?o:i}function ui(e,t=0,n=Qr){for(let r=t;r<e.length;r++)e[r].abortController.abort(n)}async function di(e,t,n,r){if(!n){let e=t.matches.findIndex(e=>e._notFound);return e>=0?(ui(t.matches,e+1),{status:404,boundary:e,kind:U}):{status:200}}let[i,a]=n;if(a[0]===H){let e=t.matches[i];return e._notFound=void 0,e.status=`error`,e.error=a[1],e.isFetching=!1,ui(t.matches,i+1),{status:500,boundary:i,kind:H}}let o=n[2]??await li(e,t.matches,n,r),s=t.matches[o],c=a[1];return c.routeId=s.routeId,s._notFound=void 0,s.routeId===e.routeTree.id?(s.status=`success`,s._notFound=!0,s.error=c):(s.status=`notFound`,s.error=c),s.isFetching=!1,ui(t.matches,o+1),{status:404,boundary:o,kind:U}}async function fi(e,t,n,r){let i=[];for(let a=0;a<t.matches.length;a++){let o=t.matches[a];if(a>=n||o.ssr!==!0||o.status!==`success`)continue;let s=G(e,o);try{let n=I(s);if(n){let c=n.then(()=>{r?.throwIfAborted()},n=>(r?.throwIfAborted(),[a,q(o,K(e,t,s,n,r))]));c.catch(()=>{}),i.push(c)}}catch(n){r?.throwIfAborted(),i.push([a,q(o,K(e,t,s,n,r))])}}for(let e of i){let t=Array.isArray(e)?e:await e;if(t)return t}}async function pi(e,t,n){for(let r of t.matches){let i=G(e,r).options;if(i.head||i.scripts||i.headers){let a={ssr:e.options.ssr,matches:t.matches,match:r,params:r.params,loaderData:r.loaderData};try{let[e,t,o]=await Promise.all([i.head?.(a),i.scripts?.(a),i.headers?.(a)]);n?.throwIfAborted(),r.meta=e?.meta,r.links=e?.links,r.headScripts=e?.scripts,r.styles=e?.styles,r.scripts=t,r.headers=o}catch(e){n?.throwIfAborted(),console.error(e)}}if(r.ssr===!1||r.status!==`success`||r._notFound)break}}async function mi(e,t,n,r){let i={location:t,matches:n.map(e=>({...e,__beforeLoadContext:void 0,context:{},isFetching:!1,abortController:new AbortController}))},a=()=>ui(i.matches,0,r?.reason??Qr);r?.aborted&&(a(),r.throwIfAborted()),r?.addEventListener(`abort`,a,{once:!0});try{let t=i.matches.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&t>=0){let n=await li(e,i.matches,void 0,r,t);n!==t&&(i.matches[t]._notFound=void 0,i.matches[n]._notFound=!0)}let n=await oi(e,i,r);r?.throwIfAborted();let o=n.end;n.failure?.[1][0]===W?o=0:n.failure?.[1][0]===U&&(n.failure[2]=await li(e,n.matches,n.failure,r),o=Math.min(o,n.failure[2]+1));let s=[];for(let t=0;t<o;t++){let i=ci(e,n,t,s,r);s.push(i)}let c,l=n.failure?.[1][0]===W?n.failure:void 0;try{await Promise.all(s.map(e=>e.outcome.then(t=>{let r=n.matches[e.index],i=t;if(i[0]===Xr)r.loaderData=i[1],r.status=`success`,r.error=void 0,r.invalid=!1,r.isFetching=!1,r.updatedAt=Date.now();else if(i[0]===W)throw l=[e.index,i],l;else r.ssr!==!1&&(r.status=`success`,r.error=void 0,r.invalid=!0,r.isFetching=!1),!c&&i[0]!==Zr&&(c=[e.index,i])})))}catch(e){if(!Array.isArray(e))throw e;l=e}if(r?.throwIfAborted(),l?.[1][0]===W)return ui(n.matches,0,$r),{type:`redirect`,redirect:l[1][1]};let u=n.failure??c,d=n.matches.findIndex(e=>e._notFound),f;if(u){let t=u[2]??=u[1][0]===U?await li(e,n.matches,u,r):u[0];for(let i of s){if(i.index>=t)break;let a=await i.outcome;if(a[0]!==Xr&&a[0]<W&&!(`loaderData`in n.matches[i.index])){u=[i.index,a],u[2]=a[0]===U?await li(e,n.matches,u,r):i.index;break}}f=u[2]}else f=d<0?n.matches.length:d;let p=await fi(e,n,f,r);if(r?.throwIfAborted(),p){if(p[1][0]===W)return ui(n.matches,0,$r),{type:`redirect`,redirect:p[1][1]};u=p}let m=await di(e,n,u,r);if(m.boundary!==void 0){let t=n.matches[m.boundary];if(t.ssr===!0){let n=G(e,t);try{m.kind===H?await I(n,`errorComponent`):t._notFound?await Promise.all([I(n),I(n,`notFoundComponent`)]):await I(n,`notFoundComponent`)}catch{}r?.throwIfAborted()}}return r?.throwIfAborted(),await pi(e,{location:n.location,matches:n.matches},r),r?.throwIfAborted(),e.serverSsr?.onCleanup(e=>{e||a()}),{type:`render`,status:m.status,matches:n.matches}}finally{r?.removeEventListener(`abort`,a)}}async function hi(e,t){e.updateLatestLocation();let n=e.latestLocation,r=e._committed,i=e._lifecycleEnd,a;try{let r=e.buildLocation({to:n.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(n.publicHref!==r.publicHref)throw Ot({href:r.publicHref||`/`});let i=ir(n,e.stores.resolvedLocation.get());e.emit({type:`onBeforeNavigate`,...i}),e.emit({type:`onBeforeLoad`,...i}),t?._signal?.throwIfAborted(),a=await ii(mi(e,n,e.matchRoutes(n),t?._signal),t?._signal),t?._signal?.throwIfAborted()}catch(r){if(t?._signal?.throwIfAborted(),!kt(r))throw r;r.options._fromLocation=n,a={type:`redirect`,redirect:e.resolveRedirect(r)}}e._serverResult=a;let o=0;e.batch(()=>{e.stores.location.set(n),e.stores.status.set(`idle`),a.type===`render`&&(e._committed=a.matches,o=e._lifecycleEnd=ar(a.matches),e.stores.setMatches(a.matches),e.stores.resolvedLocation.set(n))}),a.type===`render`&&or(e,r,a.matches,i,o),e._commitPromise?.resolve(),e._commitPromise=void 0}function gi(e,t){if(e)return typeof e==`string`?e:e[t]}function _i(e){return e?.scriptFormat??`module`}function vi(e,t,n){let r=yi(t),i=gi(n,`script`)??r.crossOrigin;return{..._i(e)===`iife`?{rel:`preload`,as:`script`}:{rel:`modulepreload`},href:r.href,...i?{crossOrigin:i}:{}}}function yi(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function bi(e,t){if(t.length===0)return;if(t.length===1){e.push(t[0]);return}let n=new Set;for(let r of t){let t=JSON.stringify(r);n.has(t)||(n.add(t),e.push(r))}}function xi(e){return Si(e).href}function Si(e){return typeof e==`string`?{href:e,crossOrigin:void 0}:e}function Ci(e){return{attrs:{suppressHydrationWarning:!0},children:e}}function wi(){return{attrs:{suppressHydrationWarning:!0}}}var Ti=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})),Ei=t(((e,t)=>{t.exports=Ti()})),J=e(Et(),1),Y=Ei(),Di=class extends J.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?J.createElement(this.props.errorComponent??Oi,{error:e[0],reset:this.reset}):this.props.children}};function Oi({error:e}){let[t,n]=J.useState(!1);return(0,Y.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,Y.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,Y.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,Y.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,Y.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,Y.jsx)(`div`,{children:(0,Y.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,Y.jsx)(`code`,{children:e.message}):null})}):null]})}var ki=()=>!0,Ai=()=>!1;function ji({children:e,fallback:t=null}){return(0,Y.jsx)(J.Fragment,{children:Mi()?e:t})}function Mi(e=!0){return J.useSyncExternalStore(Ni,ki,e?Ai:ki)}function Ni(){return()=>{}}var Pi=J.createContext(null);function Fi(e){return J.useContext(Pi)}var Ii=J.createContext(void 0),Li=J.createContext(void 0),Ri=t((e=>{var t=Et();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),zi=t(((e,t)=>{t.exports=Ri()})),Bi=t((e=>{var t=Et(),n=zi();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Vi=t(((e,t)=>{t.exports=Bi()})),Hi=Vi();function Ui(e,t){return e===t}function Wi(e,t=e=>e,n){let r=n?.compare??Ui,i=(0,J.useCallback)(t=>{let{unsubscribe:n}=e.subscribe(t);return n},[e]),a=(0,J.useCallback)(()=>e.get(),[e]);return(0,Hi.useSyncExternalStoreWithSelector)(i,a,a,t,r)}function Gi(e){let t=Fi();{let n=`not-found-${t.stores.location.get().pathname}-${t.stores.status.get()}`;return(0,Y.jsx)(Di,{getResetKey:()=>n,onCatch:(t,n)=>{if(N(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(N(t))return e.fallback?.(t);throw t},children:e.children})}}function Ki(){return(0,Y.jsx)(`p`,{children:`Not Found`})}function qi({children:e}){let t=Fi();return(0,Y.jsx)(`script`,{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+`;document.currentScript.remove()`}})}function Ji(e,t,n){return t.options.notFoundComponent?(0,Y.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,Y.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,Y.jsx)(Ki,{})}function Yi(e){return null}function Xi(){let e=Yi(Fi());return e?(0,Y.jsx)(qi,{children:e}):null}function Zi(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,Y.jsx)(n,{}):null}var Qi=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!1,$i=J.memo(function({routeId:e}){let t=Fi();return(0,Y.jsx)(ea,{router:t,match:t.stores.byRoute.get(e).get()})});function ea({router:e,match:t}){let n=e.routesById[t.routeId],r=Zi(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Qi(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,Y.jsx)(ta,{match:t});s&&(l=(0,Y.jsx)(ji,{fallback:r,children:l})),o&&(l=(0,Y.jsx)(Gi,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return J.createElement(o,e)},children:l})),i&&(l=(0,Y.jsx)(Di,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(N(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,Y.jsx)(J.Suspense,{fallback:r,children:l}));let u=n.parentRoute?.id===`__root__`&&e.options.scrollRestoration?(0,Y.jsx)(Xi,{}):null,d=n.isRoot?n.options.shellComponent:void 0;return(0,Y.jsx)(Ii.Provider,{value:t.routeId,children:d?(0,Y.jsxs)(d,{children:[l,u]}):(0,Y.jsxs)(Y.Fragment,{children:[l,u]})})}var ta=J.memo(function({match:e}){let t=Fi(),n=e.routeId,r=t.routesById[n],i=J.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]),a=J.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,Y.jsx)(e,{},i):(0,Y.jsx)(na,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Qi(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Zi(t,r)}return e.status===`notFound`?Ji(t,r,e.error):e.status===`error`?(0,Y.jsx)((r.options.errorComponent??t.options.defaultErrorComponent)||Oi,{error:e.error,reset:void 0,info:{componentStack:``}}):a}),na=J.memo(function(){let e=Fi(),t=J.useContext(Ii),n,r,i;{let a=e.stores.matches.get(),o=a.findIndex(e=>e.routeId===t),s=a[o];n=!!s._notFound,r=s.error,i=a[o+1]?.routeId}if(n)return Ji(e,e.routesById[t],r);if(!i)return null;let a=(0,Y.jsx)($i,{routeId:i});return t===`__root__`?(0,Y.jsx)(J.Suspense,{fallback:Zi(e),children:a}):a}),ra=t((e=>{var t=Et();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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(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=i,e.browser=function(e){return{$$typeof:o,_reason:e}},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 c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.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,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,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=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.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=u(n,t.crossOrigin);i.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=u(t.as,t.crossOrigin);i.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,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),ia=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=ra()})),aa=Symbol.for(`tanstack-start:start-storage-context`),oa=globalThis;oa[aa]||(oa[aa]=new wt);var sa=oa[aa];async function ca(e,t){return sa.run(e,t)}function la(e){let t=sa.getStore();if(!t&&e?.throwIfNotFound!==!1)throw Error(`No Start context found in AsyncLocalStorage. Make sure you are using the function within the server runtime.`);return t}var ua=e=>{let t=e.split(`/`);return t[0]===``&&t.shift(),t},da=e=>{let{groups:t,path:n}=fa(e);return pa(ua(n),t)},fa=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(e,n)=>{let r=`@${n}`;return t.push([r,e]),r}),{groups:t,path:e}},pa=(e,t)=>{for(let n=t.length-1;n>=0;n--){let[r]=t[n];for(let i=e.length-1;i>=0;i--)if(e[i].includes(r)){e[i]=e[i].replace(r,t[n][1]);break}}return e},ma={},ha=(e,t)=>{if(e===`*`)return`*`;let n=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(n){let r=`${e}#${t}`;return ma[r]||(ma[r]=n[2]?t&&t[0]!==`:`&&t[0]!==`*`?[r,n[1],RegExp(`^${n[2]}(?=/${t})`)]:[e,n[1],RegExp(`^${n[2]}$`)]:[e,n[1],!0]),ma[r]}return null},ga=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,e=>{try{return t(e)}catch{return e}})}},_a=e=>ga(e,decodeURI),va=e=>{let t=e.url,n=t.indexOf(`/`,t.indexOf(`:`)+4),r=n;for(;r<t.length;r++){let e=t.charCodeAt(r);if(e===37){let e=t.indexOf(`?`,r),i=t.indexOf(`#`,r),a=e===-1?i===-1?void 0:i:i===-1?e:Math.min(e,i),o=t.slice(n,a);return _a(o.includes(`%25`)?o.replace(/%25/g,`%2525`):o)}if(e===63||e===35)break}return t.slice(n,r)},ya=e=>{let t=va(e);return t.length>1&&t.at(-1)===`/`?t.slice(0,-1):t},ba=(e,t,...n)=>(n.length&&(t=ba(t,...n)),`${e?.[0]===`/`?``:`/`}${e}${t===`/`?``:`${e?.at(-1)===`/`?``:`/`}${t?.[0]===`/`?t.slice(1):t}`}`),xa=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(`:`))return null;let t=e.split(`/`),n=[],r=``;return t.forEach(e=>{if(e!==``&&!/\:/.test(e))r+=`/`+e;else if(/\:/.test(e)){if(e.charCodeAt(e.length-1)===63){n.length===0&&r===``?n.push(`/`):n.push(r);let t=e.slice(0,-1);r+=`/`+t,n.push(r)}else r+=`/`+e}}),n.filter((e,t,n)=>n.indexOf(e)===t)},Sa=e=>e.indexOf(`%`)===-1?e:ga(e,Da),Ca=e=>(e.indexOf(`+`)!==-1&&(e=e.replace(/\+/g,` `)),Sa(e)),wa=(e,t,n)=>{let r=e.indexOf(`#`,8);r!==-1&&(e=e.slice(0,r));let i;if(!n&&t&&t.indexOf(`%`)===-1&&t.indexOf(`+`)===-1){let n=e.indexOf(`?`,8);if(n===-1)return;for(e.startsWith(t,n+1)||(n=e.indexOf(`&${t}`,n+1));n!==-1;){let r=e.charCodeAt(n+t.length+1);if(r===61){let r=n+t.length+2,i=e.indexOf(`&`,r);return Ca(e.slice(r,i===-1?void 0:i))}if(r==38||isNaN(r))return``;n=e.indexOf(`&${t}`,n+1)}if(i=/[%+]/.test(e),!i)return}let a=Object.create(null);i??=/[%+]/.test(e);let o=e.indexOf(`?`,8);for(;o!==-1;){let t=e.indexOf(`&`,o+1),r=e.indexOf(`=`,o);r>t&&t!==-1&&(r=-1);let s=e.slice(o+1,r===-1?t===-1?void 0:t:r);if(i&&(s=Ca(s)),o=t,s===``)continue;let c;r===-1?c=``:(c=e.slice(r+1,t===-1?void 0:t),i&&(c=Ca(c))),n?(a[s]&&Array.isArray(a[s])||(a[s]=[]),a[s].push(c)):a[s]??=c}return t?a[t]:a},Ta=wa,Ea=(e,t)=>wa(e,t,!0),Da=decodeURIComponent;function Oa(e,t={}){return typeof e.chainId==`string`?ka(e):{...e,...t.signature}}function ka(e){let{address:t,chainId:n,nonce:r}=e,i=D(e);return{address:t,chainId:Number(n),nonce:BigInt(r),...i}}function Aa(e){return e.map(ka)}function ja(e){let{address:t,chainId:n,nonce:r,...i}=e;return{address:t,chainId:M(n),nonce:M(r),...S(i)}}function Ma(e){return e.map(ja)}function Na(e,t){return typeof e==`string`?e:M(e,t)}var Pa={default:0,sender:2,verify:1},Fa={approveExecution:2,approveExecutionAndPayment:3,approvePayment:1,atomicBatch:4,none:0};function Ia(e){let{data:t=`0x`,executionGas:n=0n,flags:r=0,mode:i=0,stateGas:a=0n,value:o=0n}=e,s=typeof i==`string`?Pa[i]:i;if(!Number.isInteger(s)||s<0||s>2)throw new X(`mode must be a supported name or 0, 1, or 2.`);let c=typeof r==`string`?Fa[r]:r;if(!Number.isInteger(c)||c<0||c>7)throw new X(`flags must be a supported name or an integer from 0 to 7.`);if(c&Fa.atomicBatch){if(s===Pa.verify)throw new X(`VERIFY frames cannot belong to an atomic batch.`);if(c&Fa.approveExecutionAndPayment)throw new X(`Atomic batch frames cannot approve execution or payment.`)}e.to!==void 0&&ue(e.to,{strict:!1});for(let[e,t]of[[`executionGas`,n],[`stateGas`,a]])if(typeof t!=`bigint`||t<0n||t>=2n**64n)throw new X(`${e} must be an unsigned 64-bit integer.`);if(n+a>=2n**64n)throw new X(`Combined frame gas must be less than 2^64.`);if(typeof o!=`bigint`||o<0n||o>=2n**256n)throw new X(`value must be an unsigned 256-bit integer.`);if(s!==Pa.sender&&o!==0n)throw new X(`Only SENDER frames can transfer value.`);if(nt(t,{strict:!0}),t.length%2!=0)throw new X(`data must contain whole bytes.`)}function La(e){return Ia(e),{...e}}function Ra(e){return La({data:e.data,executionGas:j(e.executionGas),flags:k(e.flags),mode:k(e.mode),stateGas:j(e.stateGas),...e.target==null?{}:{to:e.target},value:j(e.value)})}function za(e){let{flags:t=0,mode:n=0}=e;return{data:e.data??`0x`,executionGas:Na(e.executionGas??0n),flags:M(typeof t==`string`?Fa[t]:t),mode:M(typeof n==`string`?Pa[n]:n),stateGas:Na(e.stateGas??0n),...e.to===void 0?{}:{target:e.to},value:Na(e.value??0n)}}var X=class extends $e{constructor(e){super(`Invalid frame.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`Frame.InvalidError`})}},Ba=115792089210356248762697446949407573529996955224135760342422259061068512044369n,Va=115792089237316195423570985008687907852837564279074904382605163141518161494337n,Ha={arbitrary:0,p256:2,secp256k1:1};function Ua(e,t={}){let n=typeof e.scheme==`string`?Ha[e.scheme]:e.scheme;if(!Number.isInteger(n)||n<0||n>2)throw new Z(`Unsupported signature scheme.`);if(n===0&&e.signer!==void 0)throw new Z(`Arbitrary signatures cannot specify a signer.`);e.signer!==void 0&&ue(e.signer,{strict:!1});let r=e.payload??`0x`;if(nt(r,{strict:!0}),r!==`0x`&&(r.length!==66||j(r)===0n))throw new Z(`payload must be empty or a nonzero 32-byte digest.`);switch(e.scheme){case 0:case`arbitrary`:if(nt(e.signature,{strict:!0}),e.signature.length%2!=0)throw new Z(`signature must contain whole bytes.`);return}if(e.scheme===2||e.scheme===`p256`){if(e.publicKey!==void 0){pe(e.publicKey,{compressed:!1});for(let t of[e.publicKey.x,e.publicKey.y])if(typeof t!=`bigint`||t<0n||t>=2n**256n)throw new Z(`Public key coordinates must fit in 32 bytes.`)}if(e.signature!==void 0&&e.signature!==`0x`&&e.publicKey===void 0)throw new Z(`P-256 signatures require a public key.`)}if(e.signature===void 0||e.signature===`0x`){if(t.signed)throw new Z(`Signature is required.`);return}typeof e.signature==`string`&&nt(e.signature,{strict:!0});let i=typeof e.signature==`string`?u(e.signature):e.signature;if(typeof i.r!=`bigint`||typeof i.s!=`bigint`)throw new Z(`Signature scalars must be bigint.`);if((n===1||i.yParity!==void 0)&&i.yParity!==0&&i.yParity!==1)throw new Z(`Signature parity must be 0 or 1.`);T(i,{recovered:n===1});let a=i.r,o=i.s,s=n===1?Va:Ba;if(a===0n||a>=s||o===0n||o>=s||n===1&&o>s/2n)throw new Z(`Signature scalars must be in range; secp256k1 requires low-s.`)}function Wa(e){let t=typeof e==`string`?{payload:`0x`,scheme:`arbitrary`,signature:e}:{...e,payload:e.payload??`0x`,scheme:e.scheme??`arbitrary`};return Ua(t),t}function Ga(e){return qa([e.scheme===`0x0`?`0x`:M(k(e.scheme),{size:1}),e.signer??`0x`,e.msg??`0x`,e.signature??`0x`])}function Ka(e){let[t,n,r,i]=Ja(e);return{msg:r,scheme:t===`0x`?`0x0`:M(k(t)),...i===`0x`&&t!==`0x`?{}:{signature:i},...n===`0x`?{}:{signer:n}}}function qa(e){if(!Array.isArray(e)||e.length!==4)throw new Z(`Expected [scheme, signer, payload, signature].`);let[t,n,r,i]=e;if(nt(n,{strict:!0}),nt(i,{strict:!0}),i.length%2!=0)throw new Z(`signature must contain whole bytes.`);if(t!==`0x`&&t!==`0x01`&&t!==`0x02`)throw new Z(`Expected a canonical scheme encoding: empty bytes, 0x01, or 0x02.`);let a={...n===`0x`?{}:{signer:n},payload:r};if(t===`0x`){if(n!==`0x`)throw new Z(`Arbitrary signatures cannot specify a signer.`);return Wa({payload:r,scheme:`arbitrary`,signature:i})}if(i===`0x`)return Wa(t===`0x01`?{...a,scheme:`secp256k1`}:{...a,scheme:`p256`});if(dt(i)!==(t===`0x01`?65:128))throw new Z(`Invalid protocol signature length.`);if(t===`0x01`){if(k(A(i,0,1))>1)throw new Z(`Recovery parity must be 0 or 1.`);return Wa({...a,scheme:`secp256k1`,signature:{r:j(A(i,1,33)),s:j(A(i,33,65)),yParity:k(A(i,0,1))}})}let o=j(A(i,32,64));if(o>115792089210356248762697446949407573529996955224135760342422259061068512044369n/2n)throw new Z(`P-256 wire signatures require low-s.`);return Wa({...a,publicKey:{prefix:4,x:j(A(i,64,96)),y:j(A(i,96,128))},scheme:`p256`,signature:{r:j(A(i,0,32)),s:o}})}function Ja(e){Ua(e);let t=typeof e.scheme==`string`?Ha[e.scheme]:e.scheme,n=(()=>{switch(e.scheme){case 0:case`arbitrary`:return e.signature;case 1:case`secp256k1`:{if(e.signature===void 0||e.signature===`0x`)return`0x`;let t=typeof e.signature==`string`?u(e.signature):e.signature;return xt(M(t.yParity,{size:1}),M(t.r,{size:32}),M(t.s,{size:32}))}case 2:case`p256`:{if(e.signature===void 0||e.signature===`0x`)return`0x`;let t=e.publicKey,n=typeof e.signature==`string`?u(e.signature):e.signature,r=n.s;return xt(M(n.r,{size:32}),M(r>115792089210356248762697446949407573529996955224135760342422259061068512044369n/2n?Ba-r:r,{size:32}),M(t.x,{size:32}),M(t.y,{size:32}))}}})();return[t?M(t,{size:1}):`0x`,e.signer??`0x`,e.payload??`0x`,n]}var Z=class extends $e{constructor(e){super(`Invalid frame signature.`,{details:e}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`FrameSignature.InvalidError`})}};function Ya(e,t){if(!Array.isArray(e)||e.length<1||e.length>16)throw new Q(`Expected between 1 and 16 nonce keys.`);for(let[t,n]of e.entries()){if(typeof n!=`bigint`||n<0n||n>=2n**256n)throw new Q(`Nonce keys must be unsigned 256-bit integers.`);if(t>0&&n<=e[t-1])throw new Q(`Nonce keys must be strictly increasing.`)}if(e.length>1&&e[0]===0n)throw new Q(`The zero nonce key cannot be combined with other keys.`);if(t!==void 0&&(typeof t!=`bigint`||t<0n||t>=2n**64n-1n))throw new Q(`Nonce must be less than 2^64 - 1 and nonnegative.`)}function Xa(e,t){if(!Array.isArray(e))throw new Q(`Expected a nonce key list.`);let n=e=>{if(typeof e!=`string`||!/^0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)$/.test(e))throw new Q(`Expected a canonical RPC nonce quantity.`);return j(e)},r=e.map(n);return Ya(r,t===void 0?void 0:n(t)),r}function Za(e,t){if(!Array.isArray(e))throw new Q(`Expected a nonce key list.`);let n=e.map(e=>Na(e));return Xa(n,t===void 0?void 0:Na(t)),n}var Q=class extends $e{constructor(){super(...arguments),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`FrameNonce.InvalidError`})}},Qa={legacy:`0x0`,eip2930:`0x1`,eip1559:`0x2`,eip4844:`0x3`,eip7702:`0x4`,eip8141:`0x6`},$a={"0x0":`legacy`,"0x1":`eip2930`,"0x2":`eip1559`,"0x3":`eip4844`,"0x4":`eip7702`,"0x6":`eip8141`};function eo(e,t={}){if(!e)return null;let n=e.type===`0x6`?void 0:D(e),r={...e,...n};if(r.blockNumber=e.blockNumber?BigInt(e.blockNumber):null,`blockTimestamp`in e&&(r.blockTimestamp=e.blockTimestamp?BigInt(e.blockTimestamp):e.blockTimestamp===null?null:void 0),r.data=e.input,r.gas=BigInt(e.gas??0n),r.nonce=BigInt(e.nonce??0n),r.transactionIndex=e.transactionIndex?Number(e.transactionIndex):null,r.value=BigInt(e.value??0n),e.type===`0x6`&&e.nonceKeys!==void 0){if(e.nonce===void 0)throw new Q(`A keyed transaction result requires nonce.`);r.nonceKeys=Xa(e.nonceKeys,e.nonce)}return e.frames&&(r.frames=e.frames.map(Ra)),e.signatures&&(r.signatures=e.signatures.map(Ga)),e.authorizationList&&(r.authorizationList=Aa(e.authorizationList)),e.chainId&&(r.chainId=e.type===`0x6`&&BigInt(e.chainId)>BigInt(2**53-1)?BigInt(e.chainId):Number(e.chainId)),e.gasPrice&&(r.gasPrice=BigInt(e.gasPrice)),e.maxFeePerBlobGas&&(r.maxFeePerBlobGas=BigInt(e.maxFeePerBlobGas)),e.maxFeePerGas&&(r.maxFeePerGas=BigInt(e.maxFeePerGas)),e.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=BigInt(e.maxPriorityFeePerGas)),e.type&&(r.type=$a[e.type]??e.type),n&&(r.v=ne(n.yParity)),r}function to(e){let{executionGas:t,stateGas:n,...r}=za(e);return{...r,...e.executionGas===void 0?{}:{executionGas:t},...e.stateGas===void 0?{}:{stateGas:n}}}function no(e){let t={};return e.accessList!==void 0&&(t.accessList=e.accessList),e.authorizationList!==void 0&&(t.authorizationList=Ma(e.authorizationList)),e.blobVersionedHashes!==void 0&&(t.blobVersionedHashes=e.blobVersionedHashes),e.blobs!==void 0&&(t.blobs=e.blobs),e.chainId!==void 0&&(t.chainId=M(e.chainId)),e.data===void 0?e.input!==void 0&&(t.data=e.input,t.input=e.input):(t.data=e.data,t.input=e.data),e.from!==void 0&&(t.from=e.from),e.frames&&(t.frames=e.frames.map(to)),e.signatures&&(t.signatures=e.signatures.map(Ka)),e.gas!==void 0&&(t.gas=M(e.gas)),e.gasPrice!==void 0&&(t.gasPrice=M(e.gasPrice)),e.maxFeePerBlobGas!==void 0&&(t.maxFeePerBlobGas=M(e.maxFeePerBlobGas)),e.maxFeePerGas!==void 0&&(t.maxFeePerGas=M(e.maxFeePerGas)),e.maxPriorityFeePerGas!==void 0&&(t.maxPriorityFeePerGas=M(e.maxPriorityFeePerGas)),e.maxPriorityFeePerGas!==void 0&&(t.maxPriorityFeePerGas=M(e.maxPriorityFeePerGas)),e.nonce!==void 0&&(t.nonce=M(e.nonce)),e.nonceKeys!==void 0&&(t.nonceKeys=Za(e.nonceKeys,e.nonce)),e.to!==void 0&&(t.to=e.to),e.type!==void 0&&(t.type=Qa[e.type]||e.type),e.value!==void 0&&(t.value=M(e.value)),t}function ro(e){let{attestationObject:t,clientDataJSON:n,id:i,publicKey:a,raw:o}=e,s={};for(let e of Le){let t=o.response,n=t[e];if(!(n instanceof ArrayBuffer)){let r=t[`get${e[0].toUpperCase()}${e.slice(1)}`];typeof r==`function`&&(n=r.call(t))}n instanceof ArrayBuffer&&(s[e]=E(new Uint8Array(n),Re))}if(!s.authenticatorData){let e=l(new Uint8Array(t));e.authData&&(s.authenticatorData=E(e.authData,Re))}return{attestationObject:E(new Uint8Array(t),Re),clientDataJSON:E(new Uint8Array(n),Re),id:i,publicKey:r(a),raw:{id:o.id,type:o.type,authenticatorAttachment:o.authenticatorAttachment,rawId:E(ae(o.rawId),Re),response:s}}}function io(e){let{attestationObject:t,clientDataJSON:n,id:r,publicKey:i,raw:o}=e,s=Object.create(null);for(let e of Le){let t=o.response[e];t&&(s[e]=c(a(t)))}return{attestationObject:c(a(t)),clientDataJSON:c(a(n)),id:r,publicKey:ve(i),raw:{id:o.id,type:o.type,authenticatorAttachment:o.authenticatorAttachment,rawId:c(a(o.rawId)),response:s,getClientExtensionResults:()=>({})}}}function ao(e){let{account:t,config:n}=e,r=e.type===`transaction`?C(d(e.transaction)):f(se(e.keyAuthorization));return Me({account:t,config:n,payload:r})}function oo(e){try{let t=Pe(e.config);if(typeof t.threshold!=`number`||t.owners.some(e=>typeof e.weight!=`number`))throw new $({reason:`config threshold and owner weights must be numbers`});let n={...e,config:t};if(co(n,t),n.type===`transaction`)lo(n);else if(n.type===`keyAuthorization`)uo(n,t);else throw new $({reason:`unknown operation type`});return n}catch(e){throw e instanceof $?e:new $({cause:e})}}function so(e){try{let t=e.config?.version;if(typeof t!=`string`||!Xe(t))throw new $({reason:`config.version must be a hexadecimal quantity`});let n=j(t);if(M(n)!==t)throw new $({reason:`config.version must use canonical quantity encoding`});return oo({...e,config:Ee(e.config)})}catch(e){throw e instanceof $?e:new $({cause:e})}}function co(e,t){if(!he(e.account))throw new $({reason:`account is invalid`});if(j(e.account)===0n)throw new $({reason:`account cannot be zero`});if(!De(e.hash))throw new $({reason:`hash is invalid`});if(go(e.createdAt,`createdAt`),go(e.updatedAt,`updatedAt`),e.updatedAt<e.createdAt)throw new $({reason:`updatedAt cannot precede createdAt`});if(go(e.signatureCount,`signatureCount`),go(e.threshold,`threshold`),go(e.weight,`weight`),e.threshold!==Number(t.threshold))throw new $({reason:`threshold must equal config.threshold`});if(e.weight>255)throw new $({reason:`weight exceeds u8 max`});if(e.signatureCount>8)throw new $({reason:`too many selected signatures`});if(!Array.isArray(e.approvals))throw new $({reason:`approvals must be an array`});if(e.approvals.length>t.owners.length)throw new $({reason:`too many retained approvals`});if(e.signatureCount>e.approvals.length)throw new $({reason:`signatureCount exceeds retained approvals`});if(e.signatureCount===0!=(e.weight===0))throw new $({reason:`signatureCount and weight must both be zero or nonzero`});let n=new Map(t.owners.map(e=>[e.owner.toLowerCase(),Number(e.weight)])),r=[],i=new Set;for(let a of e.approvals){if(typeof a!=`string`||!Xe(a,{strict:!0}))throw new $({reason:`approval is invalid`});let o=fo(e.account,a,t),s=ye({payload:e.hash,signature:o}).toLowerCase(),c=n.get(s);if(c===void 0)throw new $({reason:`approval is from a non-owner`});if(i.has(s))throw new $({reason:e.type===`keyAuthorization`?`key authorization contains duplicate owner approvals`:`duplicate owner approval`});i.add(s),r.push(c)}if(!mo(r,e.signatureCount,e.weight))throw new $({reason:`weight is not reachable by signatureCount retained owner approvals`})}function lo(e){if(`keyAuthorization`in e&&e.keyAuthorization!==void 0)throw new $({reason:`transaction operations cannot contain keyAuthorization`});let t=e.expiresAt,n=e.submissionId,r=e.transactionHash;if(e.status===`pending`){if(t!==void 0||n!==void 0||r!==void 0)throw new $({reason:`pending transactions cannot contain submission fields`})}else if(e.status===`submitting`){if(go(t,`expiresAt`),!De(n??``))throw new $({reason:`submissionId is invalid`});if(n.toLowerCase()===e.hash.toLowerCase())throw new $({reason:`submissionId must differ from the operation hash`});if(r!==void 0)throw new $({reason:`submitting transactions cannot contain transactionHash`})}else if(e.status===`success`){if(!De(r??``))throw new $({reason:`transactionHash is invalid`});if(t!==void 0||n!==void 0)throw new $({reason:`successful transactions cannot contain submission fields`})}else throw new $({reason:`invalid transaction status`});if(e.status!==`pending`&&(e.weight<e.threshold||e.signatureCount===0))throw new $({reason:`submitted transactions must have quorum`});if(typeof e.transaction!=`string`)throw new $({reason:`transaction is invalid`});let i=d(e.transaction);if(i.signature)throw new $({reason:`transaction must not contain an outer sender signature`});if(i.from&&i.from.toLowerCase()!==e.account.toLowerCase())throw new $({reason:`transaction sender does not match the operation account`});ho(e,C(i));let a=e.transaction.startsWith(g);if(re(i,a?i.from?{format:`feePayer`,sender:i.from}:{format:`feePayer`}:{}).toLowerCase()!==e.transaction.toLowerCase())throw new $({reason:`transaction is not canonically serialized`})}function uo(e,t){let n=e;if(n.expiresAt!==void 0||n.submissionId!==void 0||n.transaction!==void 0||n.transactionHash!==void 0)throw new $({reason:`key authorization operations cannot contain transaction fields`});if(e.status!==`pending`&&e.status!==`success`)throw new $({reason:`invalid key authorization status`});if(e.status===`success`&&(e.weight<e.threshold||e.signatureCount===0))throw new $({reason:`successful key authorizations must have quorum`});if(e.status===`pending`&&e.weight>=e.threshold)throw new $({reason:`pending key authorizations cannot have quorum`});if(typeof e.keyAuthorization!=`string`)throw new $({reason:`keyAuthorization is invalid`});let r=se(e.keyAuthorization);if(!r.account||r.account.toLowerCase()!==e.account.toLowerCase())throw new $({reason:`key authorization account does not match the operation account`});let i=r.signature;if(e.status===`pending`&&i)throw new $({reason:`pending key authorizations must be unsigned`});if(e.status===`success`){if(i?.type!==`configurable`)throw new $({reason:`successful key authorizations require a configurable account signature`});if(i.account.toLowerCase()!==e.account.toLowerCase())throw new $({reason:`key authorization signature account does not match`});if(i.signatures.length!==e.signatureCount)throw new $({reason:`key authorization signatureCount does not match its signature`});if(po(e,i.signatures,r),!_o(i.config,t))throw new $({reason:`key authorization config does not match`})}if(ho(e,f(r)),x(r).toLowerCase()!==e.keyAuthorization.toLowerCase())throw new $({reason:`keyAuthorization is not canonically serialized`})}function fo(e,t,n){let r=me(t);if(r.type===`keychain`||r.type===`configurable`)throw new $({reason:`only primitive owner approvals are allowed`});if(ge({account:e,config:n,signatures:[r],type:`configurable`}),i(r).toLowerCase()!==t.toLowerCase())throw new $({reason:`approval is not canonical`});return r}function po(e,t,n){let r=e.approvals.map(e=>me(e));for(let e of t){let t=r.findIndex(t=>i(t).toLowerCase()===i(e).toLowerCase());if(t===-1)throw new $({reason:`key authorization signature is not a retained approval`});r.splice(t,1)}let a=Me({account:e.account,config:e.config,payload:f(n)}),o=t.map(e=>ye({payload:a,signature:e}));for(let e=1;e<o.length;e++){let t=j(o[e-1]),n=j(o[e]);if(t===n)throw new $({reason:`key authorization contains duplicate owner approvals`});if(t>n)throw new $({reason:`key authorization approvals are not canonically ordered`})}}function mo(e,t,n){let r=Array.from({length:t+1},()=>new Set);r[0].add(0);for(let n of e)for(let e=t;e>0;e--)for(let t of r[e-1])r[e].add(t+n);return r[t].has(n)}function ho(e,t){if(Me({account:e.account,config:e.config,payload:t}).toLowerCase()!==e.hash.toLowerCase())throw new $({reason:`hash does not match the operation payload`})}function go(e,t){if(typeof e!=`number`||!Number.isSafeInteger(e)||e<0)throw new $({reason:`${t} must be a nonnegative safe integer`})}function _o(e,t){let n=Pe(e),r=Pe(t);return He(n.salt??Ne,r.salt??Ne)&&n.threshold===r.threshold&&n.version===r.version&&n.owners.length===r.owners.length&&n.owners.every((e,t)=>{let n=r.owners[t];return v(e.owner,n.owner)&&e.weight===n.weight})}var $=class extends $e{constructor(e={}){super(e.reason?`Invalid account operation: ${e.reason}.`:`Invalid account operation.`,{cause:e.cause}),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`AccountOperation.InvalidOperationError`})}};function vo(e){let{approvals:t,config:n}=e;return yo(t),{approvals:t.map(({keyData:e,keyType:t,owner:n})=>({...e===void 0?{}:{keyData:xo(e)},...t===void 0?{}:{keyType:t},owner:n})),config:bo(n)}}function yo(e){if(e.some(e=>typeof e!=`object`||!e||`spec`in e||`type`in e))throw new So({reason:`only untagged primitive owner approvals are allowed`});if(e.length>8)throw new So({reason:`approval count exceeds 8`})}function bo(e){return Be(be(e))}function xo(e){let t=dt(e);return t<=4?e:M(t,{size:2})}var So=class extends $e{constructor(e){super(`Invalid account simulation: ${e.reason}.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`AccountSimulation.InvalidSimulationError`})}},Co={...Qa,tempo:`0x76`},wo={...$a,"0x76":`tempo`};function To(e,t={}){if(!e)return null;let n=eo(e);return n.type=wo[e.type],e.aaAuthorizationList&&(n.authorizationList=le(e.aaAuthorizationList),delete n.aaAuthorizationList),e.calls&&(n.calls=e.calls.map(e=>({to:e.to,value:e.value&&e.value!==`0x`?BigInt(e.value):void 0,data:e.input||e.data||`0x`}))),e.feeToken&&(n.feeToken=e.feeToken),e.nonceKey&&(n.nonceKey=BigInt(e.nonceKey)),e.signature&&(n.signature=te(e.signature)),e.validAfter&&(n.validAfter=Number(e.validAfter)),e.validBefore&&(n.validBefore=Number(e.validBefore)),e.keyAuthorization&&(n.keyAuthorization=de(e.keyAuthorization)),e.feePayerSignature&&(n.feePayerSignature=h(e.feePayerSignature),n.feePayerSignature.v=ne(n.feePayerSignature.yParity)),n}function Eo(e){let t=no({...e,authorizationList:void 0});e.authorizationList&&(t.authorizationList=m(e.authorizationList)),e.calls?t.calls=e.calls.map(e=>({to:e.to?y(e.to):e.to,value:e.value?M(e.value):`0x`,data:e.data??`0x`})):(e.to||e.data||e.value)&&(t.calls=[{to:e.to?y(e.to):void 0,value:e.value?M(e.value):`0x`,data:e.data??`0x`}]),e.feeToken!==void 0&&(t.feeToken=s(e.feeToken)),e.keyAuthorization&&(t.keyAuthorization=Ae(e.keyAuthorization)),e.keyAuthorizationSimulation&&(t.keyAuthorizationSimulation=vo(e.keyAuthorizationSimulation)),e.accountSimulation&&(t.multisigSimulation=vo(e.accountSimulation)),e.validBefore!==void 0&&(t.validBefore=M(e.validBefore)),e.validAfter!==void 0&&(t.validAfter=M(e.validAfter));let n=(()=>{if(e.nonceKey===`random`)return Ve(6);if(typeof e.nonceKey==`bigint`)return M(e.nonceKey)})();return n&&(t.nonceKey=n),(e.accountSimulation!==void 0||e.calls!==void 0||e.feePayer!==void 0||e.feeToken!==void 0||e.keyAuthorization!==void 0||e.nonceKey!==void 0||e.validBefore!==void 0||e.validAfter!==void 0||e.type===`tempo`)&&(t.type=Co.tempo,delete t.data,delete t.input,delete t.to,delete t.value),t}var Do={"0x0":`reverted`,"0x1":`success`};function Oo(e,t){let n={...e,blockNumber:e.blockNumber?BigInt(e.blockNumber):null,contractAddress:e.contractAddress?e.contractAddress:null,cumulativeGasUsed:e.cumulativeGasUsed?BigInt(e.cumulativeGasUsed):null,effectiveGasPrice:e.effectiveGasPrice?BigInt(e.effectiveGasPrice):null,gasUsed:e.gasUsed?BigInt(e.gasUsed):null,logs:e.logs?e.logs.map(e=>_(e)):null,to:e.to?e.to:null,transactionIndex:e.transactionIndex?Je(e.transactionIndex):null,status:e.status?Do[e.status]:null,type:e.type?ee[e.type]||e.type:null};return e.blobGasPrice&&(n.blobGasPrice=BigInt(e.blobGasPrice)),e.blobGasUsed&&(n.blobGasUsed=BigInt(e.blobGasUsed)),n}var ko=Ze(`transactionReceipt`,Oo);async function Ao(e,{address:t,blockHash:n,blockNumber:r,blockTag:i=`latest`,requireCanonical:a}){let o=ct({blockHash:n,blockNumber:r,blockTag:i,requireCanonical:a}),s=await e.request({method:`eth_getCode`,params:[t,o]},{dedupe:typeof r==`bigint`||n!==void 0});if(s!==`0x`)return s}async function jo({address:e,authorization:t,signature:r}){return lt(rt(e),await n({authorization:t,signature:r}))}function Mo(e){let t={formatters:void 0,fees:void 0,serializers:void 0,...e};function n(e){return t=>{let r=typeof t==`function`?t(e):t,i={...e,...r};return Object.assign(i,{extend:n(i)})}}return Object.assign(t,{extend:n(t)})}function No(){return{}}var Po=p(`(uint256 chainId, address delegation, uint256 nonce, uint8 yParity, uint256 r, uint256 s), address to, bytes data`);function Fo(e){if(typeof e==`string`){if(A(e,-32)!==`0x8010801080108010801080108010801080108010801080108010801080108010`)throw new Ro(e)}else T(e.authorization)}function Io(e){Fo(e);let t=k(A(e,-64,-32)),n=A(e,-t-64,-64),r=A(e,0,-t-64),[i,a,s]=o(Po,n);return{authorization:Oa({address:i.delegation,chainId:Number(i.chainId),nonce:i.nonce,yParity:i.yParity,r:i.r,s:i.s}),signature:r,...s&&s!==`0x`?{data:s,to:a}:{}}}function Lo(e){try{return Fo(e),!0}catch{return!1}}var Ro=class extends $e{constructor(e){super(`Value \`${e}\` is an invalid ERC-8010 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`SignatureErc8010.InvalidWrappedSignatureError`})}};async function zo(e,{blockHash:t,blockNumber:n,blockTag:r,hash:i,index:a,sender:o,nonce:s}){let c=r||`latest`,l=n===void 0?void 0:Ye(n),u=null;if(i?u=await e.request({method:`eth_getTransactionByHash`,params:[i]},{dedupe:!0}):t?u=await e.request({method:`eth_getTransactionByBlockHashAndIndex`,params:[t,Ye(a)]},{dedupe:!0}):(l||c)&&typeof a==`number`?u=await e.request({method:`eth_getTransactionByBlockNumberAndIndex`,params:[l||c,Ye(a)]},{dedupe:!!l}):o&&typeof s==`number`&&(u=await e.request({method:`eth_getTransactionBySenderAndNonce`,params:[o,Ye(s)]},{dedupe:!0})),!u)throw new We({blockHash:t,blockNumber:n,blockTag:c,hash:i,index:a});return(e.chain?.formatters?.transaction?.format||_e)(u,`getTransaction`)}var Bo=`0x6492649264926492649264926492649264926492649264926492649264926492`;function Vo(e){if(A(e,-32)!==`0x6492649264926492649264926492649264926492649264926492649264926492`)throw new Wo(e)}function Ho(e){let{data:t,signature:n,to:r}=e;return xt(ce(p(`address, bytes, bytes`),[r,t,n]),Bo)}function Uo(e){try{return Vo(e),!0}catch{return!1}}var Wo=class extends $e{constructor(e){super(`Value \`${e}\` is an invalid ERC-6492 wrapped signature.`),Object.defineProperty(this,"name",{enumerable:!0,configurable:!0,writable:!0,value:`SignatureErc6492.InvalidWrappedSignatureError`})}};function Go({r:e,s:t,to:n=`hex`,v:r,yParity:i}){let a=(()=>{if(i===0||i===1)return i;if(r&&(r===27n||r===28n||r>=35n))return+(r%2n==0n);throw Error("Invalid `v` or `yParity` value")})(),o=`0x${new St.Signature(ft(e),ft(t)).toCompactHex()}${a===0?`1b`:`1c`}`;return n===`hex`?o:Qe(o)}async function Ko(e,t){let{address:n,chain:r=e.chain,hash:i,erc6492VerifierAddress:a=t.universalSignatureVerifierAddress??r?.contracts?.erc6492Verifier?.address,multicallAddress:o=t.multicallAddress??r?.contracts?.multicall3?.address,mode:s=`auto`}=t;if(r?.verifyHash)return await r.verifyHash(e,t);let c=(()=>{let e=t.signature;return _t(e)?e:typeof e==`object`&&`r`in e&&`s`in e?Go(e):Ue(e)})();try{if(s===`eoa`)try{if(lt(rt(n),await Fe({hash:i,signature:c})))return!0}catch{}return Lo(c)?await qo(e,{...t,multicallAddress:o,signature:c}):await Jo(e,{...t,verifierAddress:a,signature:c})}catch(e){if(s!==`eoa`)try{if(lt(rt(n),await Fe({hash:i,signature:c})))return!0}catch{}if(e instanceof Xo)return!1;throw e}}async function qo(e,t){let{address:n,blockHash:r,blockNumber:i,blockTag:a,hash:o,multicallAddress:s,requireCanonical:c}=t,{authorization:l,data:u,signature:d,to:f}=Io(t.signature);if(await Ao(e,{address:n,blockHash:r,blockNumber:i,blockTag:a,requireCanonical:c})===et([`0xef0100`,l.address]))return await Yo(e,{...t,signature:d});let p={address:l.address,chainId:Number(l.chainId),nonce:Number(l.nonce),r:Ye(l.r,{size:32}),s:Ye(l.s,{size:32}),yParity:l.yParity};if(!await jo({address:n,authorization:p}))throw new Xo;let m=await O(e,b,`readContract`)({...s?{address:s}:{code:pt},authorizationList:[p],abi:mt,blockHash:r,blockNumber:i,blockTag:`pending`,functionName:`aggregate3`,requireCanonical:c,args:[[...u?[{allowFailure:!0,target:f??n,callData:u}]:[],{allowFailure:!0,target:n,callData:ht({abi:ot,functionName:`isValidSignature`,args:[o,d]})}]]});if((m[m.length-1]?.returnData)?.startsWith(`0x1626ba7e`))return!0;throw new Xo}async function Jo(e,t){let{address:n,factory:r,factoryData:i,hash:a,signature:o,verifierAddress:s,...c}=t,l=await(async()=>!r&&!i||Uo(o)?o:Ho({data:i,signature:o,to:r}))(),u=s?{to:s,data:ht({abi:st,functionName:`isValidSig`,args:[n,a,l]}),...c}:{data:ut({abi:st,args:[n,a,l],bytecode:it}),...c},{data:d}=await O(e,gt,`call`)(u).catch(e=>{throw e instanceof Ge?new Xo:e});if(Ke(d??`0x0`))return!0;throw new Xo}async function Yo(e,t){let{address:n,blockHash:r,blockNumber:i,blockTag:a,hash:o,requireCanonical:s,signature:c}=t;if((await O(e,b,`readContract`)({address:n,abi:ot,args:[o,c],blockHash:r,blockNumber:i,blockTag:a,functionName:`isValidSignature`,requireCanonical:s}).catch(e=>{throw e instanceof qe?new Xo:e})).startsWith(`0x1626ba7e`))return!0;throw new Xo}var Xo=class extends Error{};async function Zo(e,t){let n=await e.request({method:`account_getConfig`,params:[{address:t.address}]});return n?Ee(n):null}async function Qo(e,t){let{account:n,...r}=t;return Ce(b)(e,{...r,...Qo.call({account:n})})}(function(e){function t(e){return je({address:ie,abi:w,args:[e.account],functionName:`getConfigCommitment`})}e.call=t})(Qo||={});async function $o(e,t){return $o.inner(oe,e,t)}(function(e){async function t(t,n,r){let{account:i,currentConfig:a,nextConfig:o,...s}=r,c=i??n.account,l=(()=>{if(typeof c==`object`&&c.source===`configurable`)return c})(),u=(()=>{if(a)return a;if(l?.config)return l.config})(),d=(()=>{if(l)return l.address;if(typeof c==`string`)return c;if(c)return c.address})(),f=await(async()=>{if(u)return Pe(u);if(!d)throw Error(`A configurable account address or current config is required.`);let e=await Zo(n,{address:d});if(!e)throw Error(`No current account config is cached for account ${d}. Provide the current config.`);return e})(),p=(()=>{if(l)return{...l,config:f};if(typeof c==`object`)return c;if(d)return we({address:d,...f})})();return await Ce(t)(n,{...s,...p?{account:p}:{},...e.call({currentConfig:f,nextConfig:o})})}e.inner=t;function n(e){let t=Pe(e.currentConfig),n=Oe(t,e.nextConfig);return je({address:ie,abi:w,args:[t,n.threshold,n.owners],functionName:`updateConfig`})}e.call=n;function r(e){let[t]=ke({abi:w,logs:e,eventName:`MultisigConfigUpdated`,strict:!0});if(!t)throw Error("`MultisigConfigUpdated` event not found.");return t}e.extractEvent=r})($o||={});function es(e){if(!ze(e))return _e(e);let t=e.blockTimestamp==null?void 0:BigInt(e.blockTimestamp),n=e.operation,{feePayerSignature:r,gasPrice:i,nonce:a,...o}=To(e);return{...o,accessList:o.accessList,...t!==void 0&&{blockTimestamp:t},feePayerSignature:r?{r:M(r.r,{size:32}),s:M(r.s,{size:32}),v:BigInt(r.v??27),yParity:r.yParity}:void 0,nonce:Number(a),operation:ns(n),typeHex:Co[o.type],type:o.type}}function ts(e){return{...Oo(e),operation:ns(e.operation),...e.status===`pending`?{status:`pending`,type:`tempo`}:{}}}function ns(e){if(!e)return;let t=so(e);if(t.type!==`transaction`)throw Error(`Expected an account transaction operation.`);return t}function rs(e,t){let n=e,r=n.account?at(n.account):void 0,i=n.owner?at(n.owner):void 0;if(i?.type===`json-rpc`)throw Error(`A local owner account is required to approve a configurable account transaction.`);if(!ze(n))return bt(e,t);t&&(n.calls=n.calls??[{to:e.to||(!e.data||e.data===`0x`?`0x0000000000000000000000000000000000000000`:void 0),value:e.value,data:e.data}]),n.feePayer===!0&&!n.feePayerSignature&&delete n.feeToken;let{owner:a,signatures:o,...s}=n,c=Eo({...s,type:`tempo`});t===`estimateGas`&&(c.maxFeePerGas=void 0,c.maxPriorityFeePerGas=void 0),c.to=void 0,c.data=void 0,c.value=void 0;let l=i??r,[u,d]=(()=>{let e=l&&`keyType`in l?l.keyType:l?.source;return e?e===`webAuthn`?[`webAuthn`,`0x0578`]:[`p256`,`secp256k1`].includes(e)?[e,void 0]:[n.keyType,is(n.keyData)]:[n.keyType,is(n.keyData)]})(),f=l&&`accessKeyAddress`in l?l.accessKeyAddress:n.keyId;return r&&(c.from=r.address),{...c,...n.capabilities?{capabilities:n.capabilities}:{},...d?{keyData:d}:{},...f?{keyId:f}:{},...u?{keyType:u}:{},...n.accountSimulation?{accountSimulation:void 0}:{},...n.owner?{owner:void 0}:{},...n.feePayer===void 0?{}:{feePayer:typeof n.feePayer==`object`?at(n.feePayer):n.feePayer},...`feePayerSignature`in n&&n.feePayerSignature!==void 0?{feePayerSignature:n.feePayerSignature}:{}}}function is(e){if(!e)return e;let t=(e.length-2)/2;return t<=4?e:M(t,{size:2})}var as=new Map;async function os(e){as.set(e,(as.get(e)??0)+1),await Promise.resolve();let t=(as.get(e)??0)>1;return queueMicrotask(()=>{let t=as.get(e)??0;t<=1?as.delete(e):as.set(e,t-1)}),t}var ss=25,cs=((e,t)=>xe(e,t)),ls={blockTime:1e3,extendSchema:No(),formatters:{transaction:fe({exclude:[`aaAuthorizationList`],format:es}),transactionReceipt:ko({format:ts}),transactionRequest:tt({format:rs})},prepareTransactionRequest:[async(e,{client:t,phase:n})=>{let r=e;if(r.hash){if(!r.account||typeof r.account==`string`||r.account.source!==`configurable`)throw Error(`A local configurable account is required to approve a stored configurable account transaction.`);if(!r.owner||typeof r.owner==`string`)throw Error(`A local owner account is required to approve a stored configurable account transaction.`);if(r.owner.source!==`root`)throw Error(`A Tempo owner account is required to approve a stored configurable account transaction.`);let e=await O(t,zo,`getTransaction`)({hash:r.hash}),n=`operation`in e?e.operation:void 0;if(!n)throw Error(`Expected an account operation transaction.`);if(!lt(n.account,r.account.address))throw Error(`Account operation account does not match the requested account.`);let i=Ie(n.transaction);if(ao({account:n.account,config:n.config,transaction:n.transaction,type:`transaction`}).toLowerCase()!==r.hash.toLowerCase())throw Error(`Account operation hash does not match transaction.`);return{...i,gas:i.gas??0n,maxFeePerGas:i.maxFeePerGas??0n,maxPriorityFeePerGas:i.maxPriorityFeePerGas??0n,account:r.account,from:n.account,accountSimulation:us({config:n.config,local:r.account}),owner:r.owner}}if(n===`afterFillParameters`)return r.gas!==void 0&&r.feePayer&&!r.feePayerSignature&&(r.keyAuthorization?.signature.type===`webAuthn`?r.gas=(r.gas??0n)+20000n:r.account?.source===`accessKey`&&(r.gas=(r.gas??0n)+10000n)),r;let i=(()=>{if(r.account?.source===`configurable`)return{account:r.account.address,config:r.account.config,local:r.account}})();if(r.owner&&!i)throw Error(`A configurable account is required when an owner is provided.`);if(r.owner&&typeof r.owner==`string`)throw Error(`A local owner account is required to approve a configurable account transaction.`);if(r.owner&&r.owner.source!==`root`)throw Error(`A Tempo owner account is required to approve a configurable account transaction.`);let a=!!i&&!!r.owner&&t.transport.accounts===!0;if(i){let{account:e,local:n}=i;if(!e)throw Error(`A configurable account address is required with a current config.`);let o=await(async()=>{if(i.config)return i.config;if(!a)return;let n=await O(t,Zo,`getConfig`)({address:e});if(!n)throw Error(`No current account config is cached for account ${e}. Provide the current config.`);return n})();if(!o)throw Error(`An account config is required to prepare a transaction.`);r.from=e,r.accountSimulation=us({config:o,local:n})}let o=await(async()=>{if(r.nonceKey===`expiring`||r.nonceKey===vt)return!0;if(r.nonceKey!==void 0||i)return!1;if(r.feePayer&&r.nonceKey===void 0)return!0;let e=r.account,t=typeof e==`string`?e:e?.address;return t&&r.nonceKey===void 0?await os(t.toLowerCase()):!1})();if(a&&r.nonceKey===void 0?(r.nonceKey=j(Ve(31))+1n,r.nonce=0):o?(r.nonceKey=vt,r.nonce??=0,r.validAfter===void 0&&(r.validAfter=fs()),r.validBefore===void 0&&(r.validBefore=Math.floor(Date.now()/1e3)+ss)):r.nonceKey!==void 0&&(r.nonce=typeof r.nonce==`number`?r.nonce:0),!r.keyAuthorization&&r.account?.source===`accessKey`){let e=r.account.keyAuthorizationManager;if(e){let n=r.chainId??r.chain?.id;if(n!==void 0){let i=r.account.address,a=r.account.accessKeyAddress,o={address:i,accessKey:a,chainId:n},s=await e.get(o);if(s){let n=BigInt(Math.floor(Date.now()/1e3));if(s.expiry!=null&&BigInt(s.expiry)<=n)await e.remove(o);else{let c=await O(t,Te,`getMetadata`)({account:i,accessKey:a});lt(c.address,a)&&!c.isRevoked&&c.expiry>n?await e.remove(o):r.keyAuthorization=s}}}}}return!r.feeToken&&r.chain?.feeToken&&(r.feeToken=r.chain.feeToken),r},{runAt:[`beforeFillTransaction`,`afterFillParameters`]}],serializers:{transaction:cs,async transactionEnvelope({serializedTransaction:e,transaction:t}){let n=t;if(!n.accountSimulation)return e;try{me(e)}catch{if(Ie(e).signature?.type===`configurable`)return e;throw Error(`A Tempo owner account is required to approve a configurable account transaction.`)}return await cs({...n,signatures:[...n.signatures??[],e]})}},async verifyHash(e,t){let{address:n,hash:r,signature:i,mode:a}=t,o=(()=>{if(typeof i==`string`)try{return me(i)}catch{return}})();if(o){if(o?.type===`keychain`&&a===`allowAccessKey`){let i=o.version===`v2`?yt(xt(`0x04`,r,n)):r,a=(()=>{try{return ye({payload:i,signature:o.inner})}catch{return}})();if(!a)return!1;let s=await Te(e,{account:n,accessKey:a,blockHash:t.blockHash,blockNumber:t.blockNumber,blockTag:t.blockTag,requireCanonical:t.requireCanonical});return s.isRevoked||s.expiry<=BigInt(Math.floor(Date.now()/1e3))?!1:Se(o.inner,{address:a,payload:i})}if(o.type===`p256`||o.type===`webAuthn`){let i=await Ao(e,{address:n,blockHash:t.blockHash,blockNumber:t.blockNumber,blockTag:t.blockTag,requireCanonical:t.requireCanonical});if(!i||i===`0xef01007702c00000000000000000000000000000000000`)return Se(o,{address:n,payload:r})}}return await O(e,Ko,`verifyHash`)({...t,chain:null})}};function us(e){let{config:t,local:n}=e;return{approvals:ps(t).map(e=>{let t=n?.owners.find(t=>lt(t.address,e.owner));return{...ds(t),owner:e.owner}}),config:t}}function ds(e){let t=(()=>{if(e&&typeof e==`object`&&`keyType`in e&&typeof e.keyType==`string`)return e.keyType})();return!t||t===`webAuthn`?{keyData:`0x0578`,keyType:`webAuthn`}:t===`p256`||t===`secp256k1`?{keyType:t}:{keyData:`0x0578`,keyType:`webAuthn`}}function fs(){let e=BigInt(Math.floor(Date.now()/1e3))-60n;return e<=0n?0:Number(BigInt(Ve(8))%e)}function ps(e){let t=[...e.owners].sort((e,t)=>Number(t.weight)-Number(e.weight)||e.owner.toLowerCase().localeCompare(t.owner.toLowerCase())),n=[],r=0;for(let i of t.slice(0,8)){if(r>=Number(e.threshold))break;n.push(i),r+=Number(i.weight)}return n.sort((e,t)=>e.owner.toLowerCase().localeCompare(t.owner.toLowerCase()))}var ms=Mo({...ls,id:4217,blockExplorers:{default:{name:`Tempo Explorer`,url:`https://explore.tempo.xyz`}},contracts:{earnFactory:{address:`0x3085A8003f340CD51C72D9e1a1298CDafB171B02`},erc4626EngineFactory:{address:`0xd43D00981222a8db444A528E69f19E3cE5A7D2Ff`}},name:`Tempo Mainnet`,nativeCurrency:{name:`USD`,symbol:`USD`,decimals:6},rpcUrls:{default:{http:[`https://rpc.tempo.xyz`],webSocket:[`wss://rpc.tempo.xyz`]}}}),hs=Mo({...ls,id:42431,hardfork:`t5`,blockExplorers:{default:{name:`Tempo Explorer`,url:`https://explore.testnet.tempo.xyz`}},contracts:{earnFactory:{address:`0x1de6B233984583F4d936ae4265f3b60282b70cc6`},erc4626EngineFactory:{address:`0x0d57c10249eb3a92b7d81bBA6221F80F2865448A`}},name:`Tempo Testnet (Moderato)`,nativeCurrency:{name:`USD`,symbol:`USD`,decimals:6},rpcUrls:{default:{http:[`https://rpc.moderato.tempo.xyz`],webSocket:[`wss://rpc.moderato.tempo.xyz`]}},testnet:!0}),gs={mainnet:ms.id,testnet:hs.id},_s=Ct([`mainnet`,`testnet`]),vs={name:`HMAC`,hash:`SHA-256`},ys=async e=>{let t=typeof e==`string`?new TextEncoder().encode(e):e;return await crypto.subtle.importKey(`raw`,t,vs,!1,[`sign`,`verify`])},bs=async(e,t,n)=>{try{let r=atob(e),i=new Uint8Array(r.length);for(let e=0,t=r.length;e<t;e++)i[e]=r.charCodeAt(e);return await crypto.subtle.verify(vs,n,i,new TextEncoder().encode(t))}catch{return!1}},xs=/^[\w!#$%&'*.^`|~+-]+$/,Ss=/^[!#-:<>-[\]-~]+$/,Cs=/^[ !#-:<-[\]-~]*$/,ws=e=>{let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==32&&n!==9)break;t++}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==32&&t!==9)break;n--}return t===0&&n===e.length?e:e.slice(t,n)},Ts=(e,t)=>{if(t&&e.indexOf(t)===-1)return{};let n=e.split(`;`),r=Object.create(null);for(let e of n){let n=e.indexOf(`=`);if(n===-1)continue;let i=ws(e.substring(0,n));if(t&&t!==i||!Ss.test(i)||i in r)continue;let a=ws(e.substring(n+1));if(a.startsWith(`"`)&&a.endsWith(`"`)&&(a=a.slice(1,-1)),Cs.test(a)&&(r[i]=Sa(a),t))break}return r},Es=async(e,t,n)=>{let r=Object.create(null),i=await ys(t);for(let[t,a]of Object.entries(Ts(e,n))){let e=a.lastIndexOf(`.`);if(e<0)continue;let n=a.substring(0,e),o=a.substring(e+1);o.length===44&&o.endsWith(`=`)&&(r[t]=await bs(o,n,i)?n:!1)}return r},Ds=(e,t,n={})=>{if(!xs.test(e))throw Error(`Invalid cookie name`);let r=`${e}=${t}`;if(e.startsWith(`__Secure-`)&&!n.secure)throw Error(`__Secure- Cookie must have Secure attributes`);if(e.startsWith(`__Host-`)){if(!n.secure)throw Error(`__Host- Cookie must have Secure attributes`);if(n.path!==`/`)throw Error(`__Host- Cookie must have Path attributes with "/"`);if(n.domain)throw Error(`__Host- Cookie must not have Domain attributes`)}for(let e of[`domain`,`path`,`sameSite`,`priority`])if(n[e]&&/[;\r\n]/.test(n[e]))throw Error(`${e} must not contain ";", "\\r", or "\\n"`);if(n&&typeof n.maxAge==`number`&&n.maxAge>=0){if(n.maxAge>3456e4)throw Error(`Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.`);r+=`; Max-Age=${n.maxAge|0}`}if(n.domain&&n.prefix!==`host`&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw Error(`Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.`);r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+=`; HttpOnly`),n.secure&&(r+=`; Secure`),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.priority&&(r+=`; Priority=${n.priority.charAt(0).toUpperCase()+n.priority.slice(1)}`),n.partitioned){if(!n.secure)throw Error(`Partitioned Cookie must have Secure attributes`);r+=`; Partitioned`}return r},Os=(e,t,n)=>(t=encodeURIComponent(t),Ds(e,t,n));export{Un as $,Vi as A,wi as B,la as C,na as D,$i as E,Pi as F,yi as G,gi as H,Mi as I,xr as J,Si as K,Di as L,Li as M,Ii as N,Zi as O,Fi as P,Qn as Q,Ei as R,Sa as S,Et as St,ia as T,vi as U,Ci as V,xi as W,sr as X,br as Y,ir as Z,Ta as _,It as _t,_s as a,rn as at,ua as b,Dt as bt,ls as c,Xt as ct,io as d,jt as dt,Wn as et,ro as f,Wt as ft,ha as g,zt as gt,ya as h,Kt as ht,gs as i,$t as it,zi as j,Wi as k,Go as l,Rt as lt,va as m,Mt as mt,Es as n,dn as nt,hs as o,en as ot,xa as p,Nt as pt,Yr as q,Os as r,un as rt,ms as s,tn as st,Ts as t,Vn as tt,Mo as u,Yt as ut,Ea as v,kt as vt,ca as w,da as x,N as xt,ba as y,Ot as yt,bi as z};
3
+ //# sourceMappingURL=cookie-CStT7Z5O.js.map