orqevio 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/{AccessKeyReveal-CQaxpNT4.js → AccessKeyReveal-D8iaHAmc.js} +1 -1
- package/dist/web/assets/{AccessRows-DUF0JEJN.js → AccessRows-unT7pvaN.js} +1 -1
- package/dist/web/assets/{ActivityList--gWYDhUt.js → ActivityList-5kkQfKan.js} +1 -1
- package/dist/web/assets/{AgentsPage-BmYCjLa_.js → AgentsPage-CJYPGW11.js} +1 -1
- package/dist/web/assets/Attachments-BWc36ATf.css +1 -0
- package/dist/web/assets/Attachments-W-66xscM.js +214 -0
- package/dist/web/assets/{Avatar-BM8oUZZw.js → Avatar-Ds47Du6D.js} +1 -1
- package/dist/web/assets/BoardPage-BzP18JZ2.js +1 -0
- package/dist/web/assets/{Button-Cdv5jCuw.js → Button-Btbho6sH.js} +1 -1
- package/dist/web/assets/{CardItem-DzmuD8RI.js → CardItem-DOZjD-y4.js} +1 -1
- package/dist/web/assets/{Checkbox-D7DQDOn_.js → Checkbox-DYleqiFb.js} +1 -1
- package/dist/web/assets/{ColorPicker-1A8lBK9k.js → ColorPicker-C67TVWyM.js} +1 -1
- package/dist/web/assets/{ConsentPage-C_LzKZZB.js → ConsentPage-DdmIld0a.js} +1 -1
- package/dist/web/assets/CopyButton-BSygyOA8.js +1 -0
- package/dist/web/assets/{DocPage-hcgQ0MLZ.js → DocPage-Bou9VU1o.js} +1 -1
- package/dist/web/assets/{EmptyState-DbuyD37d.js → EmptyState-BK-MD-22.js} +1 -1
- package/dist/web/assets/{Field-Clm8umDd.js → Field-BzrGz77l.js} +1 -1
- package/dist/web/assets/{HomePage-DDDKEWXr.js → HomePage-B4r2hsLa.js} +1 -1
- package/dist/web/assets/{Menu-DX34x7kE.js → Menu-B2IsRarH.js} +1 -1
- package/dist/web/assets/{PageHeader-ClyiqS7h.js → PageHeader-DQFfF3dC.js} +1 -1
- package/dist/web/assets/{Popover-5Vvrqbgv.js → Popover-CABN9JQJ.js} +1 -1
- package/dist/web/assets/{ProjectPage-amJ1RPBS.js → ProjectPage-Oz1y-22_.js} +1 -1
- package/dist/web/assets/{ProjectSettingsDialog-6QxmHLzs.js → ProjectSettingsDialog-C1CyAGKv.js} +1 -1
- package/dist/web/assets/{Segmented-BDMZD7nV.js → Segmented-CF8X5UQP.js} +1 -1
- package/dist/web/assets/{SettingsPage-WsTJXDni.js → SettingsPage-D8jrBXVO.js} +1 -1
- package/dist/web/assets/{States-BL27BexV.js → States-B9aFGoJ7.js} +1 -1
- package/dist/web/assets/{TokenCard-Rdie_fAK.js → TokenCard-Bca8a7bs.js} +1 -1
- package/dist/web/assets/{Trans-COFrPeA8.js → Trans-CZ4Nv-G9.js} +1 -1
- package/dist/web/assets/{VaultPage-E1JRTpdj.js → VaultPage-CbnaGof3.js} +1 -1
- package/dist/web/assets/{actions-CnbXVELu.js → actions-CuhPuiCb.js} +1 -1
- package/dist/web/assets/{activity-pS7JJqPR.js → activity-jMyOg6vJ.js} +1 -1
- package/dist/web/assets/{arrow-up-right-B1Q3GS2t.js → arrow-up-right-xXLe7dy5.js} +1 -1
- package/dist/web/assets/boards-BfXxNbjL.js +1 -0
- package/dist/web/assets/boards-BysuKeCh.js +1 -0
- package/dist/web/assets/boards-BzBkr2as.js +1 -0
- package/dist/web/assets/boards-C4m0VqXK.js +1 -0
- package/dist/web/assets/boards-CiHbxckf.js +1 -0
- package/dist/web/assets/boards-oiLnHcBl.js +1 -0
- package/dist/web/assets/boards-uxzlybUT.js +1 -0
- package/dist/web/assets/{bot-CWoAuwAC.js → bot-C4jQSYTS.js} +1 -1
- package/dist/web/assets/check-BE-kG6EN.js +1 -0
- package/dist/web/assets/{clock-gFOXe45w.js → clock-BRq3Eqj4.js} +1 -1
- package/dist/web/assets/common-COjNB9BR.js +1 -0
- package/dist/web/assets/common-CxTPkV7X.js +1 -0
- package/dist/web/assets/common-D-VyKjDv.js +1 -0
- package/dist/web/assets/common-D3b_OJUw.js +1 -0
- package/dist/web/assets/common-DJe5JA5c.js +1 -0
- package/dist/web/assets/common-Dr48NU46.js +1 -0
- package/dist/web/assets/{common-DpRzCGRI.js → common-Vls4DuMQ.js} +1 -1
- package/dist/web/assets/{download-DOUlwk6I.js → download-CcY7y-p1.js} +1 -1
- package/dist/web/assets/errors-Bj5m9UTT.js +1 -0
- package/dist/web/assets/errors-BjhuCALu.js +1 -0
- package/dist/web/assets/errors-CbK3TofU.js +1 -0
- package/dist/web/assets/errors-DCKVrh2b.js +1 -0
- package/dist/web/assets/errors-DTeT1QaQ.js +1 -0
- package/dist/web/assets/errors-hqibHHps.js +1 -0
- package/dist/web/assets/errors-x1B7DZKj.js +1 -0
- package/dist/web/assets/{eye-DgU86mY7.js → eye-0AAym_Rc.js} +1 -1
- package/dist/web/assets/{file-plus-BK_cMGl4.js → file-plus-dA3dSRUX.js} +1 -1
- package/dist/web/assets/{folder-open-CUvL1QmZ.js → folder-open-Ewe1HrNf.js} +1 -1
- package/dist/web/assets/{format-CNMdJ6_8.js → format-DFP4kHwY.js} +1 -1
- package/dist/web/assets/index-BwlT1VPI.css +2 -0
- package/dist/web/assets/{index-7-XNE5Rd.js → index-De_HhHxO.js} +3 -3
- package/dist/web/assets/{lock-keyhole-D62Dl9I8.js → lock-keyhole-D9nhFofN.js} +1 -1
- package/dist/web/assets/{pencil-xcVnI27R.js → pencil-BLKUFMJd.js} +1 -1
- package/dist/web/assets/plus-Bfyl1Cnf.js +1 -0
- package/dist/web/assets/{queries-B6zKoYoh.js → queries-DnrECs2M.js} +5 -5
- package/dist/web/assets/realtime-CMHYgQ_y.js +1 -0
- package/dist/web/assets/{search-BV5ZsG36.js → search-DMRKd8Cr.js} +1 -1
- package/dist/web/assets/{session-Dg2szHMi.js → session-BAxO2EgV.js} +1 -1
- package/dist/web/assets/{shield-exclamation-point-BLSX4EKo.js → shield-exclamation-point-TzY-81Bq.js} +1 -1
- package/dist/web/assets/{square-kanban-D4XKuQYH.js → square-kanban-ly6jmUnZ.js} +1 -1
- package/dist/web/assets/{trash-BtYRNn0Z.js → trash-CJAi39PH.js} +1 -1
- package/dist/web/assets/{triangle-exclamation-point-CcJCHC10.js → triangle-exclamation-point-CxY_KMDD.js} +1 -1
- package/dist/web/assets/{vault-DzWE-kQx.js → vault-C2I5wY2c.js} +1 -1
- package/dist/web/assets/{vault-BJ0YNaBV.js → vault-CnwqbS9q.js} +1 -1
- package/dist/web/assets/{vault-CjqTbMtS.js → vault-DDN2TVJW.js} +1 -1
- package/dist/web/assets/{vault-CLMnyhXX.js → vault-DGwHkhSm.js} +1 -1
- package/dist/web/assets/{vault-CQVJONUp.js → vault-DmWLOBSw.js} +1 -1
- package/dist/web/assets/{vault-ShnECcLf.js → vault-VdamUs2c.js} +1 -1
- package/dist/web/assets/{vault-Dwv3fhwH.js → vault-ds4tlkvx.js} +1 -1
- package/dist/web/assets/{workspace-TT1PqoC7.js → workspace-CUnAQ10Q.js} +1 -1
- package/dist/web/index.html +33 -33
- package/dist/worker/index.js +12263 -12177
- package/package.json +1 -1
- package/dist/web/assets/Attachments-BFs-_VlC.js +0 -212
- package/dist/web/assets/Attachments-BFwBtL8j.css +0 -1
- package/dist/web/assets/BoardPage-CixYMIX6.js +0 -1
- package/dist/web/assets/CopyButton-C-W1lxF3.js +0 -1
- package/dist/web/assets/boards-BBpjZP1x.js +0 -1
- package/dist/web/assets/boards-BTpgk9Fd.js +0 -1
- package/dist/web/assets/boards-BWeP1yma.js +0 -1
- package/dist/web/assets/boards-COhITBby.js +0 -1
- package/dist/web/assets/boards-Ctsx-Cza.js +0 -1
- package/dist/web/assets/boards-PfnbSN1s.js +0 -1
- package/dist/web/assets/boards-R_TWYEXU.js +0 -1
- package/dist/web/assets/check-DCBjJEe-.js +0 -1
- package/dist/web/assets/common-CeY0FMhM.js +0 -1
- package/dist/web/assets/common-ChyM3qEm.js +0 -1
- package/dist/web/assets/common-DSH0t9-R.js +0 -1
- package/dist/web/assets/common-SQxQWeOo.js +0 -1
- package/dist/web/assets/common-ZaFMftqj.js +0 -1
- package/dist/web/assets/common-kLH8MGZF.js +0 -1
- package/dist/web/assets/errors-BGvYEtI3.js +0 -1
- package/dist/web/assets/errors-CZ1BX441.js +0 -1
- package/dist/web/assets/errors-D6cvqHzs.js +0 -1
- package/dist/web/assets/errors-DACTZxtE.js +0 -1
- package/dist/web/assets/errors-DJVH_VFT.js +0 -1
- package/dist/web/assets/errors-_k7icfYU.js +0 -1
- package/dist/web/assets/errors-y3K623sq.js +0 -1
- package/dist/web/assets/index-BoZRT-4L.css +0 -2
- package/dist/web/assets/plus-oKcb7VoU.js +0 -1
- package/dist/web/assets/realtime-DySKdOZ5.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.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 O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function ee(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 te(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,te(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),te(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=te(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+M(a,u++),c+=te(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return te(ee(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 N(e,t,n){if(e==null)return e;var r=[],i=0;return te(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(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 re=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 ie(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,re)}catch(e){re(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function ae(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 ie(ae.bind(null,e))}var oe={map:N,forEach:function(e,t,n){N(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return N(e,function(){t++}),t},toArray:function(e){return N(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=oe,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=ae,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=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ie,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.1`})),r=t(((e,t)=>{t.exports=n()})),i=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})),a=t(((e,t)=>{t.exports=i()})),o=e(r(),1),s=a(),c=o.createContext(void 0),l=e=>{let t=o.useContext(c);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},u=({client:e,children:t})=>(o.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,s.jsx)(c.Provider,{value:e,children:t})),d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},f=new class{#e=d;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function p(e){setTimeout(e,0)}var m=typeof window>`u`||`Deno`in globalThis;function h(){}function g(e,t){return typeof e==`function`?e(t):e}function _(e){return typeof e==`number`&&e>=0&&e!==1/0}function v(e,t){return Math.max(e+(t||0)-Date.now(),0)}function y(e,t){return typeof e==`function`?e(t):e}function b(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==S(o,t.options))return!1}else if(!w(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function x(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(C(t.options.mutationKey)!==C(a))return!1}else if(!w(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function S(e,t){return(t?.queryKeyHashFn||C)(e)}function C(e){return JSON.stringify(e,(e,t)=>k(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function w(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!w(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!w(e[r],t[r]))return!1;return!0}return!1}var T=Object.prototype.hasOwnProperty;function E(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=O(e)&&O(t);if(!r&&!(k(e)&&k(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:T.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=E(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function D(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!T.call(t,n)||e[n]!==t[n])return!1;return!0}function O(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k(e){if(!A(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!A(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function A(e){return Object.prototype.toString.call(e)===`[object Object]`}function j(e){return new Promise(t=>{f.setTimeout(t,e)})}function M(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:E(e,t)}function ee(e){return e}function te(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function N(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var ne=Symbol();function re(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ne?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ie(e,t){return typeof e==`function`?e(...t):!!e}var ae=Symbol();function oe(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[ae]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var se=()=>m,ce=()=>se(),P=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},le=new class extends P{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},ue=p;function de(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=ue,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var F=de(),fe=new class extends P{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function I(e){return Math.min(1e3*2**e,3e4)}function pe(e){return(e??`online`)!==`online`||fe.isOnline()}var me=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function he(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(h);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new me(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>le.isFocused()&&(e.networkMode===`always`||fe.isOnline())&&e.canRun(),p=()=>pe(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(ce()?0:3),a=e.retryDelay??I,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?g(r):(n++,e.onFail?.(n,r),j(o).then(()=>c()||f()?void 0:_(f)).then(()=>{t?g(r):v()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?v():_(p).then(v),s)}}var ge=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_(this.gcTime)&&(this.#e=f.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ce()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(f.clearTimeout(this.#e),this.#e=void 0)}};function _e(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{oe(e,()=>t.signal,()=>n=!0,l[ae])},d=re(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?N:te;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ye:ve,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:ve(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ve(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ye(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var be=class extends ge{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=Ce(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=Ce(this.options);e.data!==void 0&&(this.setState(Se(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=M(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(h).catch(h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>y(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ne||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!v(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[ae]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=re(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?_e(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=he({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof me&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof me){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...xe(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Se(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),F.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function xe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pe(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Se(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ce(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var we=class extends P{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ee(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return De(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return De(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof y(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!D(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Oe(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||y(this.options.enabled,this.#t)!==y(t.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||y(this.options.enabled,this.#t)!==y(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return D(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}#h(e){return!ce()&&y(this.options.enabled,this.#t)!==!1&&_(e)}#g(){this.#b();let e=y(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=v(this.#r.dataUpdatedAt,e)+1;this.#u=f.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return y(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=f.setInterval(()=>{(this.options.refetchIntervalInBackground||le.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(f.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(f.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Ee(e,t),o=i&&Oe(e,n,t,r);(a||o)&&(l={...l,...xe(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=M(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=M(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=i?.error===f?i.errorUpdatedAt:Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,b=_&&g,x=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&x,isStale:ke(e,t),refetch:this.refetch,isEnabled:y(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),D(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();F.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Te(e,t){return y(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||y(t.retryOnMount,e)!==!1)}function Ee(e,t){return Te(e,t)||e.state.data!==void 0&&De(e,t,t.refetchOnMount)}function De(e,t,n){if(y(t.enabled,e)!==!1&&y(t.staleTime,e)!==`static`){let r=y(n,e);return r===`always`||r!==!1&&ke(e,t)}return!1}function Oe(e,t,n,r){return(e!==t||y(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&ke(e,n)}function ke(e,t){return y(t.enabled,e)!==!1&&e.isStaleByTime(y(t.staleTime,e))}var Ae=class extends ge{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||je(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=he({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),F.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function je(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Me=class extends P{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new Ae({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Ne(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Ne(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Ne(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Ne(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>x(t,e))}findAll(e={}){return this.getAll().filter(t=>x(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return F.batch(()=>Promise.all(e.map(e=>e.continue().catch(h))))}};function Ne(e){return e.options.scope?.id}var Pe=class extends P{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??S(r,t),a=this.get(i);return a||(a=new be({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>b(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>b(e,t)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Fe=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Pe,this.#t=e.mutationCache||new Me,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=le.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=fe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(y(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=g(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return F.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;F.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return F.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=F.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(h).catch(h)}invalidateQueries(e,t={}){return F.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=F.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(h)),r?Promise.resolve():t}));return Promise.all(r).then(h)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(y(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(h).catch(h)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(h).catch(h)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return fe.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(C(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{w(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(C(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{w(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=S(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ne&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Ie=o.createContext(!1),Le=()=>o.useContext(Ie);Ie.Provider;function Re(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ze=o.createContext(Re()),Be=()=>o.useContext(ze),Ve=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?ie(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},He=e=>{o.useEffect(()=>{e.clearReset()},[e])},Ue=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ie(n,[e.error,r])),We=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ge=(e,t)=>e?.suspense&&t.isPending,Ke=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qe(e,t,n){let r=Le(),i=Be(),a=l(n),s=a.defaultQueryOptions(e),c=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:u?`optimistic`:void 0,We(s),Ve(s,i,c),He(i);let[d]=o.useState(()=>new t(a,s)),f=d.getOptimisticResult(s);o.useEffect(()=>{d.setOptions(s)},[s,d]);let p=!r&&u;if(o.useSyncExternalStore(o.useCallback(e=>{let t=p?d.subscribe(F.batchCalls(e)):h;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Ge(s,f))throw Ke(s,d,i);if(Ue({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return s.notifyOnChangeProps?f:d.trackResult(f)}function L(e,t){return qe(e,we,t)}var Je=e=>{throw TypeError(e)},Ye=(e,t,n)=>t.has(e)||Je(`Cannot `+n),Xe=(e,t,n)=>(Ye(e,t,`read from private field`),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?Je(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),Qe=(e,t,n,r)=>(Ye(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),$e=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,et=/^[\\/]{2}/;function tt(e,t){return t+e.replace(/\\/g,`/`)}var nt=`popstate`;function rt(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function it(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return st(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:ct(t)}return ut(t,n,null,e)}function R(e,t){if(e===!1||e==null)throw Error(t)}function z(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function at(){return Math.random().toString(36).substring(2,10)}function ot(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function st(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?lt(t):t,state:n,key:t&&t.key||r||at(),mask:i}}function ct({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function lt(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ut(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=rt(e)?e:st(h.location,e,t);n&&n(r,e),l=u()+1;let d=ot(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=rt(e)?e:st(h.location,e,t);n&&n(r,e),l=u();let i=ot(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return dt(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(nt,d),c=e,()=>{i.removeEventListener(nt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function dt(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),R(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:ct(t);return i=i.replace(/ $/,`%20`),!n&&et.test(i)&&(i=r+i),new URL(i,r)}var ft,pt=class{constructor(e){if(Ze(this,ft,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Xe(this,ft).has(e))return Xe(this,ft).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){Xe(this,ft).set(e,t)}};ft=new WeakMap;var mt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function ht(e){return mt.has(e)}var gt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function _t(e){return gt.has(e)}function vt(e){return e.index===!0}function yt(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(R(e.index!==!0||!e.children,`Cannot specify children on an index route`),R(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),vt(e)){let n={...e,id:s};return r[s]=bt(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=bt(n,t(n)),e.children&&(n.children=yt(e.children,t,o,r,i)),n}})}function bt(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function xt(e,t,n=`/`){return St(e,t,n,!1)}function St(e,t,n,r,i){let a=Ht((typeof t==`string`?lt(t):t).pathname||`/`,n);if(a==null)return null;let o=i??wt(e),s=null,c=Vt(a);for(let e=0;s==null&&e<o.length;++e)s=Lt(o[e],c,r);return s}function Ct(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function wt(e){let t=Tt(e);return Dt(t),t}function Tt(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;R(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=Qt([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(R(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Tt(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Ft(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Bt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Et(e.path))a(e,t,!0,n)}),t}function Et(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Et(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Dt(e){e.sort((e,t)=>e.score===t.score?It(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Ot=/^:[\w-]+$/,kt=3,At=2,jt=1,Mt=10,Nt=-2,Pt=e=>e===`*`;function Ft(e,t){let n=e.split(`/`),r=n.length;return n.some(Pt)&&(r+=Nt),t&&(r+=At),n.filter(e=>!Pt(e)).reduce((e,t)=>e+(Ot.test(t)?kt:t===``?jt:Mt),r)}function It(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Lt(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?zt(u,l,s.matcher,s.compiledParams):Rt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Rt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:Qt([a,d.pathname]),pathnameBase:en(Qt([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=Qt([a,d.pathnameBase]))}return o}function Rt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Bt(e.path,e.caseSensitive,e.end);return zt(e,t,n,r)}function zt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=$t(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=$t(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Bt(e,t=!1,n=!0){z(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Vt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return z(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ht(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ut({basename:e,pathname:t}){return t===`/`?e:Qt([e,t])}var Wt=e=>$e.test(e);function Gt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?lt(e):e,a;return n?(n=Zt(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Kt(n.substring(1),`/`):Kt(n,t)):a=t,{pathname:a,search:tn(r),hash:nn(i)}}function Kt(e,t){let n=$t(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function qt(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Jt(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Yt(e){let t=Jt(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Xt(e,t,n,r=!1){let i;typeof e==`string`?i=lt(e):(i={...e},R(!i.pathname||!i.pathname.includes(`?`),qt(`?`,`pathname`,`search`,i)),R(!i.pathname||!i.pathname.includes(`#`),qt(`#`,`pathname`,`hash`,i)),R(!i.search||!i.search.includes(`#`),qt(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Gt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Zt=e=>e.replace(/[\\/]{2,}/g,`/`),Qt=e=>Zt(e.join(`/`));function $t(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var en=e=>$t(e).replace(/^\/*/,`/`),tn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,nn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,rn=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],an=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function on(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function sn(e){return Qt(e.map(e=>e.route.path).filter(Boolean))||`/`}var cn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ln(e,t){let n=e;if(typeof n!=`string`||!$e.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(cn)try{let e=new URL(window.location.href),r=et.test(n)?new URL(tt(n,e.protocol)):new URL(n),a=Ht(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{z(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var un=Symbol(`Uninstrumented`);function dn(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=pn(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=pn(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[un]??i,a=pn(n[e],t,(...e)=>hn(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[un]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[un]??e,r=pn(n.middleware,t,(...e)=>hn(e[0]));return r?(r[un]=t,r):e})),r}function fn(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[un]??e.navigate,r=pn(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?ct(n):`.`,...gn(e,r??{})}});r&&(r[un]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[un]??e.fetch,r=pn(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...gn(e,i??{})}});r&&(r[un]=t,e.fetch=r)}return e}function pn(e,t,n){return e.length===0?null:async(...r)=>{let i=await mn(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function mn(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=mn(e,t,n,r-1),a=await o,R(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function hn(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:_n(t),params:{...r},pattern:i,context:vn(n)}}function gn(e,t){return{currentUrl:ct(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function _n(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function vn(e){if(bn(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var yn=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function bn(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===yn}var xn=new URL(`http://localhost`);function Sn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),xn)}catch{return xn}}function Cn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function wn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function Tn(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!Cn(i,n),s=!Cn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!wn(e,i)||!Cn(i,a)))throw Error(`External navigation is not allowed`)}var En=[`POST`,`PUT`,`PATCH`,`DELETE`],Dn=new Set(En),On=[`GET`,...En],kn=new Set(On),An=new Set([301,302,303,307,308]),jn=new Set([307,308]),Mn={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Nn={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pn={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Fn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),In=`remix-router-transitions`,Ln=Symbol(`ResetLoaderData`),Rn,zn,Bn,Vn,Hn=class{constructor(e){Ze(this,Rn),Ze(this,zn),Ze(this,Bn),Ze(this,Vn),Qe(this,Rn,e),Qe(this,zn,wt(e))}get stableRoutes(){return Xe(this,Rn)}get activeRoutes(){return Xe(this,Bn)??Xe(this,Rn)}get branches(){return Xe(this,Vn)??Xe(this,zn)}get hasHMRRoutes(){return Xe(this,Bn)!=null}setRoutes(e){Qe(this,Rn,e),Qe(this,zn,wt(e))}setHmrRoutes(e){Qe(this,Bn,e),Qe(this,Vn,wt(e))}commitHmrRoutes(){Xe(this,Bn)&&(Qe(this,Rn,Xe(this,Bn)),Qe(this,zn,Xe(this,Vn)),Qe(this,Bn,void 0),Qe(this,Vn,void 0))}};Rn=new WeakMap,zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap;function Un(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;R(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Fn,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...dn(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Hn(yt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||or,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=St(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=jr(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ar(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&qe(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=qe(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Jn(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Yn(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:Mn,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,D=!1,O,k=!1,A=new Map,j=null,M=!1,ee=!1,te=new Set,N=new Map,ne=0,re=-1,ie=new Map,ae=new Set,oe=new Map,se=new Map,ce=new Set,P=new Map,le,ue=null;function de(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(le){le(),le=void 0;return}z(P.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=Ve({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{le=e});e.history.go(r*-1),Be(i,{state:`blocked`,location:n,proceed(){Be(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,Pn),I({blockers:e})}}),E?.resolve(),E=null}else return ge(t,n)}),n){ti(t,A);let e=()=>ni(t,A);t.addEventListener(`pagehide`,e),j=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||ge(`POP`,w.location,{initialHydration:!0}),C}function F(){d&&d(),j&&j(),f.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>Me(w.fetchers,t)),w.blockers.forEach((e,t)=>ze(t))}function fe(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function I(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(ce.has(t)?n.push(t):r.push(t))}),ce.forEach(e=>{!w.fetchers.has(e)&&!N.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Me(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function pe(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&Kr(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?Dr(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Pn)));let l=!M&&Ke(t,n.matches||w.matches),u=D===!0||w.navigation.formMethod!=null&&Kr(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),M||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`&&!M&&t!==w.location){let e=A.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:A.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(k){let e=A.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}I({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:Mn,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,D=!1,k=!1,M=!1,ee=!1,E?.resolve(),E=null,ue?.resolve(),ue=null}async function me(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=ri();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Kn(!1,Gn(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?lt(n.mask):{...w.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},et.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),Tn(typeof n.mask==`string`?n.mask:ct(n.mask),ct(o),e.history.createURL(`/`),`reject`)}let s=w.location,l=st(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},Tn(t==null?e.history.createHref(w.location):typeof t==`string`?t:ct(t),e.history.createHref(l.mask||l),e.history.createURL(`/`),`reject`);let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&Kr(i.formMethod)&&i.formAction===w.location.pathname+w.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=Ve({currentLocation:s,nextLocation:l,historyAction:d});m?Be(m,{state:`blocked`,location:l,proceed(){Be(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),me(t,n)},reset(){let e=new Map(w.blockers);e.set(m,Pn),I({blockers:e})}}):await ge(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function he(){ue||=ri(),De(),I({revalidation:`loading`});let e=ue.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(ge(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(ge(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:k===!0}),e)}async function ge(t,n,r){O&&O.abort(),O=null,T=t,M=(r&&r.startUninterruptedRevalidation)===!0,Ge(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,k=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:St(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!ee&&Pr(w.location,n)&&!(r&&r.submission&&Kr(r.submission.formMethod))){pe(n,{matches:a},{flushSync:o});return}let l=qe(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=He(n.pathname);pe(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;O=new AbortController;let d=xr(e.history,n,O.signal,r&&r.submission),f=e.getContext?await e.getContext():new pt,p;if(r&&r.pendingError)p=[kr(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Kr(r.submission.formMethod)){let i=await _e(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(zr(t)&&on(t.error)&&t.error.status===404){O=null,pe(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Xr(n,a,t,r.submission),o=!1,l.active=!1,d=xr(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await ve(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(O=null,pe(n,{matches:h||a,...Or(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function _e(t,n,i,l,u,d,f,p,m={}){if(De(),I({navigation:Zr(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await L(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ar(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=kr(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=He(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Jr(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:jr(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Te(t,n,fr(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Br(h)){let n;return n=m&&m.replace!=null?m.replace:br(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await we(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(zr(h)){let e=kr(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function ve(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Xr(n,i,l,p),x=p||m||Yr(b),S=!M&&!g;if(d){if(S){let e=ye(v);I({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await L(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=Ar(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=kr(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=He(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=qn(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,ee,te,ce,oe,ae,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(re=++ne,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=Ie(e);return pe(n,{matches:i,loaderData:{},errors:v&&zr(v[1])?{[v[0]]:v[1].error}:null,...Or(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=ye(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=be(E)),I(e,{flushSync:_})}E.forEach(e=>{Pe(e.key),e.controller&&N.set(e.key,e.controller)});let D=()=>E.forEach(e=>Pe(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await Ee(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>N.delete(e.key));let j=Mr(k);if(j)return await we(t,j.result,!0,{replace:h}),{shortCircuited:!0};if(j=Mr(A),j)return ae.add(j.key),await we(t,j.result,!0,{replace:h}),{shortCircuited:!0};let ie=new Map(w.fetchers),{loaderData:se,errors:P}=Er(w,i,k,v,E,A,ie);g&&w.errors&&(P={...w.errors,...P});let le=Ie(ie),ue=Le(re,ie),de=le||ue||E.length>0;return{matches:i,loaderData:se,errors:P,...de?{workingFetchers:ie}:{}}}function ye(e){if(e&&!zr(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function be(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Qr(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function xe(t,n,r,i){Pe(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=Gn(w.location,w.matches,c,r,n,i?.relative),u=St(o,l,c,!1,s.branches),d=qe(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){ke(t,n,jr(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Kn(!0,l,i);if(m){ke(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new pt,g=(i&&i.preventScrollReset)===!0;p&&Kr(p.formMethod)?await Se(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate):(oe.set(t,{routeId:n,path:f}),await Ce(t,n,f,u,h,d.active,a,g,p))}async function Se(t,n,i,l,u,d,f,p,m,h){De(),oe.delete(t),Oe(t,$r(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=xr(e.history,i,g.signal,m);if(d){let e=await L(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ke(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{ke(t,n,jr(404,{pathname:i}),{flushSync:f});return}}let v=Jr(l,i);if(!v.route.action&&!v.route.lazy){ke(t,n,jr(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}N.set(t,g);let y=ne,b=fr(a,o,_,i,l,v,r,u),x=await Te(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){N.get(t)===g&&N.delete(t);return}if(ce.has(t)){if(Br(S)||zr(S)){Oe(t,ei(void 0));return}}else{if(Br(S)){if(N.delete(t),re>y){Oe(t,ei(void 0));return}return ae.add(t),Oe(t,Qr(m)),we(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(zr(S)){ke(t,n,S.error);return}}let C=w.navigation.location||w.location,E=xr(e.history,C,g.signal),D=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:St(D,w.navigation.location,c,!1,s.branches);R(k,`Didn't find any matches after fetcher action`);let A=++ne;ie.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=qn(E,u,a,o,e.history,w,k,m,C,r,!1,ee,te,ce,oe,ae,D,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),se=Qr(m,S.data),P=new Map(w.fetchers);P.set(t,se),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=P.get(t),r=Qr(void 0,n?n.data:void 0);P.set(t,r),Pe(t),e.controller&&N.set(t,e.controller)}),I({fetchers:P});let le=()=>M.forEach(e=>Pe(e.key));g.signal.addEventListener(`abort`,le);let{loaderResults:ue,fetcherResults:de}=await Ee(j,M,E,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,le),ie.delete(t),N.delete(t),M.forEach(e=>N.delete(e.key));let F=w.fetchers.has(t),fe=e=>{if(!F)return e;let n=new Map(e.fetchers);return n.set(t,ei(S.data)),{...e,fetchers:n}},me=Mr(ue);if(me)return w=fe(w),we(E,me.result,!1,{preventScrollReset:p});if(me=Mr(de),me)return ae.add(me.key),w=fe(w),we(E,me.result,!1,{preventScrollReset:p});let he=new Map(w.fetchers);F&&he.set(t,ei(S.data));let{loaderData:ge,errors:_e}=Er(w,k,ue,void 0,M,de,he);Le(A,he),w.navigation.state===`loading`&&A>re?(R(T,`Expected pending action`),O&&O.abort(),pe(w.navigation.location,{matches:k,loaderData:ge,errors:_e,fetchers:he})):(I({errors:_e,loaderData:Dr(w.loaderData,ge,k,_e),fetchers:he}),ee=!1)}async function Ce(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);Oe(t,Qr(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=xr(e.history,i,m.signal);if(l){let e=await L(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){ke(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{ke(t,n,jr(404,{pathname:i}),{flushSync:u});return}}let g=Jr(s,i);N.set(t,m);let _=ne,v=await Te(h,i,fr(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(N.get(t)===m&&N.delete(t),!h.signal.aborted){if(ce.has(t))Oe(t,ei(void 0));else if(Br(y)){if(re>_){Oe(t,ei(void 0));return}ae.add(t),await we(h,y,!1,{preventScrollReset:d})}else zr(y)?ke(t,n,y.error):Oe(t,ei(y.data))}}async function we(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(ee=!0);let d=i.response.headers.get(`Location`);R(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=br(d,p,c,e.history),Tn(f,d,p,`allow-explicit`);let m=st(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Wt(d)){let n=dt(t,d,!0);e=n.origin!==t.location.origin||Ht(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}O=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=w.navigation;!o&&!s&&g&&_&&v&&(o=Yr(w.navigation));let y=o||s;jn.has(i.response.status)&&y&&Kr(y.formMethod)?await ge(h,m,{submission:{...y,formAction:d},preventScrollReset:l||D,enableViewTransition:a?k:void 0}):await ge(h,m,{overrideNavigation:Xr(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||D,enableViewTransition:a?k:void 0})}async function Te(e,t,n,r,i){let a,o={};try{a=await pr(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Kr(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||w.loaderData.hasOwnProperty(e.route.id)||w.errors&&w.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(Rr(r)){let i=r.result;o[t]={type:`redirect`,response:_r(i,e,t,n,c)}}else o[t]=await gr(r);return o}async function Ee(e,t,n,r,i){let a=Te(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Te(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:jr(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function De(){ee=!0,oe.forEach((e,t)=>{N.has(t)&&te.add(t),Pe(t)})}function Oe(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),I({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function ke(e,t,n,r={}){let i=kr(w.matches,t),a=new Map(w.fetchers);Me(a,e),I({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ae(e){return se.set(e,(se.get(e)||0)+1),ce.has(e)&&ce.delete(e),w.fetchers.get(e)||Nn}function je(e,t){Pe(e,t?.reason),Oe(e,ei(null))}function Me(e,t){let n=w.fetchers.get(t);N.has(t)&&!(n&&n.state===`loading`&&ie.has(t))&&Pe(t),oe.delete(t),ie.delete(t),ae.delete(t),ce.delete(t),te.delete(t),e.delete(t)}function Ne(e){let t=(se.get(e)||0)-1;t<=0?(se.delete(e),ce.add(e)):se.set(e,t),I({fetchers:new Map(w.fetchers)})}function Pe(e,t){let n=N.get(e);n&&(n.abort(t),N.delete(e))}function Fe(e,t){for(let n of e){let e=t.get(n);R(e,`Expected fetcher: ${n}`);let r=ei(e.data);t.set(n,r)}}function Ie(e){let t=[],n=!1;for(let r of ae){let i=e.get(r);R(i,`Expected fetcher: ${r}`),i.state===`loading`&&(ae.delete(r),t.push(r),n=!0)}return Fe(t,e),n}function Le(e,t){let n=[];for(let[r,i]of ie)if(i<e){let e=t.get(r);R(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Pe(r),ie.delete(r),n.push(r))}return Fe(n,t),n.length>0}function Re(e,t){let n=w.blockers.get(e)||Pn;return P.get(e)!==t&&P.set(e,t),n}function ze(e){w.blockers.delete(e),P.delete(e)}function Be(e,t){let n=w.blockers.get(e)||Pn;R(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),I({blockers:r})}function Ve({currentLocation:e,nextLocation:t,historyAction:n}){if(P.size===0)return;P.size>1&&z(!1,`A router only supports one blocker at a time`);let r=Array.from(P.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function He(e){let t=jr(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Ar(n);return{notFoundMatches:r,route:i,error:t}}function Ue(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Mn){_=!0;let e=Ke(w.location,w.matches);e!=null&&I({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function We(e,t){return h&&h(e,t.map(e=>Ct(e,w.loaderData)))||e.key}function Ge(e,t){if(m&&g){let n=We(e,t);m[n]=g()}}function Ke(e,t){if(m){let n=We(e,t),r=m[n];if(typeof r==`number`)return r}return null}function qe(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:St(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:St(n,r,c,!0,e)}}return{active:!1,matches:null}}async function L(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||$n(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=St(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=St(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&Je(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=St(s.activeRoutes,n,c,!0,u),!f||Je(l,f))return{type:`success`,matches:null};l=f}}function Je(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ye(e){o={},s.setHmrRoutes(yt(e,a,void 0,o))}function Xe(e,t,n=!1){$n(e,t,s,o,a,n),s.hasHMRRoutes||I({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:de,subscribe:fe,enableScrollRestoration:Ue,navigate:me,fetch:xe,revalidate:he,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ae,resetFetcher:je,deleteFetcher:Ne,dispose:F,getBlocker:Re,deleteBlocker:ze,patchRoutes:Xe,_internalFetchControllers:N,_internalSetRoutes:Ye,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){I(e)}},e.instrumentations&&(C=fn(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Wn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Gn(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Xt(r||`.`,Yt(o),Ht(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=qr(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Ut({basename:n,pathname:c.pathname})),ct(c)}function Kn(e,t,n){if(!n||!Wn(n))return{path:t};if(n.formMethod&&!Gr(n.formMethod))return{path:t,error:jr(405,{method:n.formMethod})};let r=()=>({path:t,error:jr(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Nr(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Kr(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
2
|
-
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Kr(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}R(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=Cr(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Cr(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=wr(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=wr(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Kr(c.formMethod))return{path:t,submission:c};let l=lt(t);return e&&l.search&&qr(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:ct(l),submission:c}}function qn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?zr(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&zr(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=sn(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Jn(s))f=!1;else if(u){let{shouldLoad:e}=Yn(s,a.loaderData,a.errors);f=e}else Xn(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return dr(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Zn(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=Qn(i,m);return dr(n,r,e,c,k,i,l,t,h,m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=St(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Jr(b,e.path),C=new AbortController,w=xr(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=fr(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=fr(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Qn(S,a)&&(T=fr(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function Jn(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Yn(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Jn(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Xn(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Zn(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Qn(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function $n(e,t,n,r,i,a){let o;if(e){let t=r[e];R(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>er(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=yt(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=yt([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function er(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>er(e,t)))??!1}var tr=new WeakMap,nr=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(R(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=tr.get(i);o||(o={},tr.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=ht(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)z(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)z(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},rr=new WeakMap;function ir(e,t,n,r,i){let a=n[e.id];if(R(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=rr.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{R(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=_t(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?z(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?z(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return rr.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=nr({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function ar(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function or(e){return e.matches.some(e=>e.route.middleware)?sr(e,()=>ar(e)):ar(e)}function sr(e,t){return cr(e,t,e=>{if(Wr(e))throw e;return e},Ir,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=kr(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function cr(e,t,n,r,i){let{matches:a,...o}=e;return await lr(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function lr(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await lr(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function ur(e,t,n,r,i){let a=nr({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=ir(r.route,Kr(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function dr(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=ur(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Qn(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Qn(a,{...l,defaultShouldRevalidate:e}):Qn(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Kr(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Kr(n.method)||!p)?mr({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function fr(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?dr(e,t,n,r,sn(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:ur(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function pr(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Sr(t,n),pattern:sn(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return sr(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function mr({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Kr(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Sr(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw jr(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw jr(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function hr(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function gr(e){let{result:t,type:n}=e;if(Hr(t)){let e;try{e=await hr(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new an(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Vr(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Fr(t),statusCode:on(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:on(t)?t.status:void 0}:Vr(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function _r(e,t,n,r,i){let a=e.headers.get(`Location`);if(R(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Wt(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Gn(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var vr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function yr(e){try{return vr.includes(new URL(e).protocol)}catch{return!1}}function br(e,t,n,r){if(Wt(e)){let r=e,i=et.test(r)?new URL(tt(r,t.protocol)):new URL(r);if(yr(i.toString()))throw Error(`Invalid redirect location`);let a=Ht(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Zt(i.pathname)+i.search+i.hash}try{if(yr(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function xr(e,t,n,r){let i=e.createURL(Nr(t)).toString(),a={signal:n};if(r&&Kr(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?Cr(r.formData):r.formData}return new Request(i,a)}function Sr(e,t){let n=new URL(e.url),r=typeof t==`string`?lt(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function Cr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function wr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Tr(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&zr(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(R(!Br(f),`Cannot handle redirect results in processLoaderData`),zr(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=kr(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Ln),c||(c=!0,s=on(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Er(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Tr(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(R(s,`Did not find corresponding fetcher result`),zr(s)){let t=kr(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Br(s))R(!1,`Unhandled fetcher revalidation redirect`);else{let e=ei(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Dr(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Ln).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function Or(e){return e?zr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function kr(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function Ar(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function jr(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new an(e||500,o,Error(s),!0)}function Mr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Br(r))return{key:n,result:r}}}function Nr(e){return ct({...typeof e==`string`?lt(e):e,hash:``})}function Pr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Fr(e){return new an(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Ir(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Lr(t))}function Lr(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Rr(e){return Hr(e.result)&&An.has(e.result.status)}function zr(e){return e.type===`error`}function Br(e){return(e&&e.type)===`redirect`}function Vr(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Hr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Ur(e){return An.has(e)}function Wr(e){return Hr(e)&&Ur(e.status)&&e.headers.has(`Location`)}function Gr(e){return kn.has(e.toUpperCase())}function Kr(e){return Dn.has(e.toUpperCase())}function qr(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Jr(e,t){let n=typeof t==`string`?lt(t).search:t.search;if(e[e.length-1].route.index&&qr(n||``))return e[e.length-1];let r=Jt(e);return r[r.length-1]}function Yr(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Xr(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Zr(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Qr(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function $r(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ei(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ti(e,t){try{let n=e.sessionStorage.getItem(In);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function ni(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(In,JSON.stringify(n))}catch(e){z(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function ri(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var ii=o.createContext(null);ii.displayName=`DataRouter`;var ai=o.createContext(null);ai.displayName=`DataRouterState`;var oi=o.createContext(!1);function si(){return o.useContext(oi)}var ci=o.createContext({isTransitioning:!1});ci.displayName=`ViewTransition`;var li=o.createContext(new Map);li.displayName=`Fetchers`;var ui=o.createContext(null);ui.displayName=`Await`;var di=o.createContext(null);di.displayName=`Navigation`;var fi=o.createContext(null);fi.displayName=`Location`;var pi=o.createContext({outlet:null,matches:[],isDataRoute:!1});pi.displayName=`Route`;var mi=o.createContext(null);mi.displayName=`RouteError`;var hi=`REACT_ROUTER_ERROR`,gi=`REDIRECT`,_i=`ROUTE_ERROR_RESPONSE`;function vi(e){if(e.startsWith(`${hi}:${gi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function yi(e){if(e.startsWith(`${hi}:${_i}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new an(t.status,t.statusText,t.data)}catch{}}function bi(e,{relative:t}={}){R(xi(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(di),{hash:i,pathname:a,search:s}=Ai(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:Qt([n,a])),r.createHref({pathname:c,search:s,hash:i})}function xi(){return o.useContext(fi)!=null}function Si(){return R(xi(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(fi).location}var Ci=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function wi(e){o.useContext(di).static||o.useLayoutEffect(e)}function Ti(){let{isDataRoute:e}=o.useContext(pi);return e?Ki():Ei()}function Ei(){R(xi(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(ii),{basename:t,navigator:n}=o.useContext(di),{matches:r}=o.useContext(pi),{pathname:i}=Si(),a=JSON.stringify(Yt(r)),s=o.useRef(!1);return wi(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(z(s.current,Ci),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=Xt(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:Qt([t,c.pathname])),Tn(typeof r==`string`?r:ct(r),n.createHref(c),Sn(n),`reject`),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}var Di=o.createContext(null);function Oi(e){let t=o.useContext(pi).outlet;return o.useMemo(()=>t&&o.createElement(Di.Provider,{value:e},t),[t,e])}function ki(){let{matches:e}=o.useContext(pi);return e[e.length-1]?.params??{}}function Ai(e,{relative:t}={}){let{matches:n}=o.useContext(pi),{pathname:r}=Si(),i=JSON.stringify(Yt(n));return o.useMemo(()=>Xt(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ji(e,t,n){R(xi(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=o.useContext(di),{matches:i}=o.useContext(pi),a=i[i.length-1],s=a?a.params:{},c=a?a.pathname:`/`,l=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;Ji(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
1
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.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 O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ee=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function te(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 ne(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,ne(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(ee,`$&/`)+`/`),ne(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ee,`$&/`)+`/`)+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+j(a,u),c+=ne(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+j(a,u++),c+=ne(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ne(te(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 M(e,t,n){if(e==null)return e;var r=[],i=0;return ne(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function re(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 ie=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 ae(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,ie)}catch(e){ie(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function oe(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 ae(oe.bind(null,e))}var se={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=se,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=oe,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=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:re}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ae,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.1`})),r=t(((e,t)=>{t.exports=n()})),i=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})),a=t(((e,t)=>{t.exports=i()})),o=e(r(),1),s=a(),c=o.createContext(void 0),l=e=>{let t=o.useContext(c);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},u=({client:e,children:t})=>(o.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,s.jsx)(c.Provider,{value:e,children:t})),d={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},f=new class{#e=d;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function p(e){setTimeout(e,0)}var m=typeof window>`u`||`Deno`in globalThis;function h(){}function g(e,t){return typeof e==`function`?e(t):e}function _(e){return typeof e==`number`&&e>=0&&e!==1/0}function v(e,t){return Math.max(e+(t||0)-Date.now(),0)}function y(e,t){return typeof e==`function`?e(t):e}function b(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==S(o,t.options))return!1}else if(!w(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function x(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(C(t.options.mutationKey)!==C(a))return!1}else if(!w(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function S(e,t){return(t?.queryKeyHashFn||C)(e)}function C(e){return JSON.stringify(e,(e,t)=>k(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function w(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!w(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!w(e[r],t[r]))return!1;return!0}return!1}var T=Object.prototype.hasOwnProperty;function E(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=O(e)&&O(t);if(!r&&!(k(e)&&k(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:T.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=E(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function D(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n of Object.keys(e))if(!T.call(t,n)||e[n]!==t[n])return!1;return!0}function O(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k(e){if(!A(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!A(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function A(e){return Object.prototype.toString.call(e)===`[object Object]`}function ee(e){return new Promise(t=>{f.setTimeout(t,e)})}function j(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:E(e,t)}function te(e){return e}function ne(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(-n):r}function M(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,n):r}var re=Symbol();function ie(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===re?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ae(e,t){return typeof e==`function`?e(...t):!!e}var oe=Symbol();function se(e,t,n,r){let i=!1,a;return Object.defineProperties(e,{[oe]:{value:r},signal:{enumerable:!0,get:()=>(a??=t(),i||(i=!0,a.aborted?n():a.addEventListener(`abort`,n,{once:!0})),a)}}),e}var ce=()=>m,le=()=>ce(),N=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ue=new class extends N{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},de=p;function fe(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=de,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var P=fe(),pe=new class extends N{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function F(e){return Math.min(1e3*2**e,3e4)}function me(e){return(e??`online`)!==`online`||pe.isOnline()}var he=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ge(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(h);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new he(t);g(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>ue.isFocused()&&(e.networkMode===`always`||pe.isOnline())&&e.canRun(),p=()=>me(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},g=e=>{c()||(r?.(),i=`rejected`,o(e))},_=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),v=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(le()?0:3),a=e.retryDelay??F,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?g(r):(n++,e.onFail?.(n,r),ee(o).then(()=>c()||f()?void 0:_(f)).then(()=>{t?g(r):v()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?v():_(p).then(v),s)}}var _e=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_(this.gcTime)&&(this.#e=f.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(le()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(f.clearTimeout(this.#e),this.#e=void 0)}};function ve(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=t,u=e=>{se(e,()=>t.signal,()=>n=!0,l[oe])},d=ie(t.options,t.fetchOptions),f=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return u(e),e})(),o=await d(a),{maxPages:s}=t.options,c=i?M:ne;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?be:ye,n={pages:a,pageParams:o};s=await f(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]===void 0?r.initialPageParam:o[0]:ye(r,s);if(c>0&&e==null)break;s=await f(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function ye(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function be(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var xe=class extends _e{#e;#t;#n;#r;#i;#a;#o;#s;#c;constructor(e){super(),this.#c=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=we(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#s,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=we(this.options);e.data!==void 0&&(this.setState(Ce(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=j(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(h).catch(h):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>y(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===re||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.state.data!==void 0&&this.getObserversCount()>0&&this.observers.some(e=>y(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!v(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#c||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a&&this.#o)return this.#a.continueRetry(),this.#o}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperties(e,{[oe]:{value:n.signal,enumerable:!0},signal:{enumerable:!0,get:()=>(this.#c=!0,n.signal)}})},i=()=>{let e=ie(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#c=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?ve(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=ge({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof he&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0}),s=(async()=>{try{let e=await o.promise;if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof he){if(e.silent){if(this.#a!==o&&this.#o)return this.#o;throw e}if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0,this.#o=void 0),this.scheduleGc()}})();return this.#o=s,o.start(),s}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Se(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ce(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),P.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Se(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:me(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ce(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function we(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Te=class extends N{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),De(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Oe(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Oe(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof y(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!D(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&ke(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||y(this.options.enabled,this.#t)!==y(t.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||y(this.options.enabled,this.#t)!==y(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return D(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch(t).then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}#h(e){return!le()&&y(this.options.enabled,this.#t)!==!1&&_(e)}#g(){this.#b();let e=y(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=v(this.#r.dataUpdatedAt,e)+1;this.#u=f.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return y(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=f.setInterval(()=>{(this.options.refetchIntervalInBackground||ue.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(f.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(f.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&De(e,t),o=i&&ke(e,n,t,r);(a||o)&&(l={...l,...Se(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=j(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=j(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=i?.error===f?i.errorUpdatedAt:Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,b=_&&g,x=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:b,isLoading:b,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!x,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&x,isStale:Ae(e,t),refetch:this.refetch,isEnabled:y(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),D(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size||this.options.throwOnError&&this.#r.error!==e.error)return!0;for(let t of n??this.#p)if(this.#r[t]!==e[t])return!0;return!1})();P.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function Ee(e,t){return y(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||y(t.retryOnMount,e)!==!1)}function De(e,t){return Ee(e,t)||e.state.data!==void 0&&Oe(e,t,t.refetchOnMount)}function Oe(e,t,n){if(y(t.enabled,e)!==!1&&y(t.staleTime,e)!==`static`){let r=y(n,e);return r===`always`||r!==!1&&Ae(e,t)}return!1}function ke(e,t,n,r){return(e!==t||y(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ae(e,n)}function Ae(e,t){return y(t.enabled,e)!==!1&&e.isStaleByTime(y(t.staleTime,e))}var je=class extends _e{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Me(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=ge({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}this.state.isPaused&&r.canStart()&&t();let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),P.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Me(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ne=class extends N{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new je({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=Pe(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=Pe(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=Pe(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=Pe(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){P.batch(()=>{let e=this.getAll();this.#e.clear(),this.#t.clear(),e.forEach(e=>{this.notify({type:`removed`,mutation:e})})})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>x(t,e))}findAll(e={}){return this.getAll().filter(t=>x(e,t))}notify(e){P.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return P.batch(()=>Promise.all(e.map(e=>e.continue().catch(h))))}};function Pe(e){return e.options.scope?.id}var Fe=class extends N{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??S(r,t),a=this.get(i);return a||(a=new xe({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){this.#e.get(e.queryHash)===e&&(e.destroy(),this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){P.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>b(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>b(e,t)):t}notify(e){P.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){P.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){P.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ie=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Fe,this.#t=e.mutationCache||new Ne,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=ue.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(y(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=g(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return P.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;P.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return P.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=P.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(h).catch(h)}invalidateQueries(e,t={}){return P.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=P.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n),r=e.state.fetchStatus===`paused`;return(!n.throwOnError||r)&&(t=t.catch(h)),r?Promise.resolve():t}));return Promise.all(r).then(h)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(y(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(y(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(h).catch(h)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(h).catch(h)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return pe.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(C(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{w(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(C(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{w(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=S(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===re&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Le=o.createContext(!1),Re=()=>o.useContext(Le);Le.Provider;function ze(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Be=o.createContext(ze()),Ve=()=>o.useContext(Be),He=(e,t,n)=>{let r=n?.state.status===`error`&&typeof e.throwOnError==`function`?ae(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},Ue=e=>{o.useEffect(()=>{e.clearReset()},[e])},We=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ae(n,[e.error,r])),Ge=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Ke=(e,t)=>e?.suspense&&t.isPending,qe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Je(e,t,n){let r=Re(),i=Ve(),a=l(n),s=a.defaultQueryOptions(e),c=a.getQueryCache().get(s.queryHash),u=e.subscribed!==!1;s._optimisticResults=r?`isRestoring`:u?`optimistic`:void 0,Ge(s),He(s,i,c),Ue(i);let[d]=o.useState(()=>new t(a,s)),f=d.getOptimisticResult(s);o.useEffect(()=>{d.setOptions(s)},[s,d]);let p=!r&&u;if(o.useSyncExternalStore(o.useCallback(e=>{let t=p?d.subscribe(P.batchCalls(e)):h;return d.updateResult(),t},[d,p]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Ke(s,f))throw qe(s,d,i);if(We({result:f,errorResetBoundary:i,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return s.notifyOnChangeProps?f:d.trackResult(f)}function I(e,t){return Je(e,Te,t)}var Ye=e=>{throw TypeError(e)},Xe=(e,t,n)=>t.has(e)||Ye(`Cannot `+n),Ze=(e,t,n)=>(Xe(e,t,`read from private field`),n?n.call(e):t.get(e)),Qe=(e,t,n)=>t.has(e)?Ye(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),$e=(e,t,n,r)=>(Xe(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),et=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,tt=/^[\\/]{2}/;function nt(e,t){return t+e.replace(/\\/g,`/`)}var rt=`popstate`;function it(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function at(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ct(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:lt(t)}return dt(t,n,null,e)}function L(e,t){if(e===!1||e==null)throw Error(t)}function R(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function ot(){return Math.random().toString(36).substring(2,10)}function st(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ct(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ut(t):t,state:n,key:t&&t.key||r||ot(),mask:i}}function lt({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function ut(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function dt(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=it(e)?e:ct(h.location,e,t);n&&n(r,e),l=u()+1;let d=st(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=it(e)?e:ct(h.location,e,t);n&&n(r,e),l=u();let i=st(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return ft(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(rt,d),c=e,()=>{i.removeEventListener(rt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function ft(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),L(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:lt(t);return i=i.replace(/ $/,`%20`),!n&&tt.test(i)&&(i=r+i),new URL(i,r)}var pt,mt=class{constructor(e){if(Qe(this,pt,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(Ze(this,pt).has(e))return Ze(this,pt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){Ze(this,pt).set(e,t)}};pt=new WeakMap;var ht=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function gt(e){return ht.has(e)}var _t=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function vt(e){return _t.has(e)}function yt(e){return e.index===!0}function bt(e,t,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(L(e.index!==!0||!e.children,`Cannot specify children on an index route`),L(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),yt(e)){let n={...e,id:s};return r[s]=xt(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=xt(n,t(n)),e.children&&(n.children=bt(e.children,t,o,r,i)),n}})}function xt(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function St(e,t,n=`/`){return Ct(e,t,n,!1)}function Ct(e,t,n,r,i){let a=Ut((typeof t==`string`?ut(t):t).pathname||`/`,n);if(a==null)return null;let o=i??Tt(e),s=null,c=Ht(a);for(let e=0;s==null&&e<o.length;++e)s=Rt(o[e],c,r);return s}function wt(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function Tt(e){let t=Et(e);return Ot(t),t}function Et(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;L(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=$t([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(L(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),Et(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:It(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Vt(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of Dt(e.path))a(e,t,!0,n)}),t}function Dt(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Dt(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Ot(e){e.sort((e,t)=>e.score===t.score?Lt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var kt=/^:[\w-]+$/,At=3,jt=2,Mt=1,Nt=10,Pt=-2,Ft=e=>e===`*`;function It(e,t){let n=e.split(`/`),r=n.length;return n.some(Ft)&&(r+=Pt),t&&(r+=jt),n.filter(e=>!Ft(e)).reduce((e,t)=>e+(kt.test(t)?At:t===``?Mt:Nt),r)}function Lt(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function Rt(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Bt(u,l,s.matcher,s.compiledParams):zt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=zt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:$t([a,d.pathname]),pathnameBase:tn($t([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=$t([a,d.pathnameBase]))}return o}function zt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Vt(e.path,e.caseSensitive,e.end);return Bt(e,t,n,r)}function Bt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=en(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=en(a.slice(0,a.length-e.length),1)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Vt(e,t=!1,n=!0){R(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Ht(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return R(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ut(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Wt({basename:e,pathname:t}){return t===`/`?e:$t([e,t])}var Gt=e=>et.test(e);function Kt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ut(e):e,a;return n?(n=Qt(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?qt(n.substring(1),`/`):qt(n,t)):a=t,{pathname:a,search:nn(r),hash:rn(i)}}function qt(e,t){let n=en(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Jt(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Yt(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Xt(e){let t=Yt(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Zt(e,t,n,r=!1){let i;typeof e==`string`?i=ut(e):(i={...e},L(!i.pathname||!i.pathname.includes(`?`),Jt(`?`,`pathname`,`search`,i)),L(!i.pathname||!i.pathname.includes(`#`),Jt(`#`,`pathname`,`hash`,i)),L(!i.search||!i.search.includes(`#`),Jt(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Kt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Qt=e=>e.replace(/[\\/]{2,}/g,`/`),$t=e=>Qt(e.join(`/`));function en(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var tn=e=>en(e).replace(/^\/*/,`/`),nn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,rn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,an=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],on=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function sn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function cn(e){return $t(e.map(e=>e.route.path).filter(Boolean))||`/`}var ln=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function un(e,t){let n=e;if(typeof n!=`string`||!et.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(ln)try{let e=new URL(window.location.href),r=tt.test(n)?new URL(nt(n,e.protocol)):new URL(n),a=Ut(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{R(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var dn=Symbol(`Uninstrumented`);function fn(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(n);for(let r of t)e[r]&&n[r].push(e[r])}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=mn(n.lazy,t.lazy,()=>void 0);e&&(r.lazy=e)}if(typeof t.lazy==`object`){let e=t.lazy;[`middleware`,`loader`,`action`].forEach(t=>{let i=e[t],a=n[`lazy.${t}`];if(typeof i==`function`&&a.length>0){let e=mn(a,i,()=>void 0);e&&(r.lazy=Object.assign(r.lazy||{},{[t]:e}))}})}return[`loader`,`action`].forEach(e=>{let i=t[e];if(typeof i==`function`&&n[e].length>0){let t=i[dn]??i,a=mn(n[e],t,(...e)=>gn(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[dn]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[dn]??e,r=mn(n.middleware,t,(...e)=>gn(e[0]));return r?(r[dn]=t,r):e})),r}function pn(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let r of t)e[r]&&n[r].push(e[r])}})),n.navigate.length>0){let t=e.navigate[dn]??e.navigate,r=mn(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?lt(n):`.`,..._n(e,r??{})}});r&&(r[dn]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[dn]??e.fetch,r=mn(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,..._n(e,i??{})}});r&&(r[dn]=t,e.fetch=r)}return e}function mn(e,t,n){return e.length===0?null:async(...r)=>{let i=await hn(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function hn(e,t,n,r){let i=e[r],a;if(i){let o,s=async()=>(o?console.error(`You cannot call instrumented handlers more than once`):o=hn(e,t,n,r-1),a=await o,L(a,`Expected a result`),a.type===`error`&&a.value instanceof Error?{status:`error`,error:a.value}:{status:`success`,error:void 0});try{await i(s,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}o||await s(),await o}else try{a={type:`success`,value:await n()}}catch(e){a={type:`error`,value:e}}return a||{type:`error`,value:Error(`No result assigned in instrumentation chain.`)}}function gn(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:vn(t),params:{...r},pattern:i,context:yn(n)}}function _n(e,t){return{currentUrl:lt(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function vn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function yn(e){if(xn(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var bn=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function xn(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join(`\0`)===bn}var Sn=new URL(`http://localhost`);function Cn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Sn)}catch{return Sn}}function wn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function Tn(e,t){if(e.startsWith(`//`))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===``||e.slice(n.length).startsWith(`//`):!1}function En(e,t,n,r){let i=null;try{i=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),o=i!=null&&!wn(i,n),s=!wn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!Tn(e,i)||!wn(i,a)))throw Error(`External navigation is not allowed`)}var Dn=[`POST`,`PUT`,`PATCH`,`DELETE`],On=new Set(Dn),kn=[`GET`,...Dn],An=new Set(kn),jn=new Set([301,302,303,307,308]),Mn=new Set([307,308]),Nn={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pn={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Fn={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},In=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ln=`remix-router-transitions`,Rn=Symbol(`ResetLoaderData`),zn,Bn,Vn,Hn,Un=class{constructor(e){Qe(this,zn),Qe(this,Bn),Qe(this,Vn),Qe(this,Hn),$e(this,zn,e),$e(this,Bn,Tt(e))}get stableRoutes(){return Ze(this,zn)}get activeRoutes(){return Ze(this,Vn)??Ze(this,zn)}get branches(){return Ze(this,Hn)??Ze(this,Bn)}get hasHMRRoutes(){return Ze(this,Vn)!=null}setRoutes(e){$e(this,zn,e),$e(this,Bn,Tt(e))}setHmrRoutes(e){$e(this,Vn,e),$e(this,Hn,Tt(e))}commitHmrRoutes(){Ze(this,Vn)&&($e(this,zn,Ze(this,Vn)),$e(this,Bn,Ze(this,Hn)),$e(this,Vn,void 0),$e(this,Hn,void 0))}};zn=new WeakMap,Bn=new WeakMap,Vn=new WeakMap,Hn=new WeakMap;function Wn(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;L(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||In,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...fn(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Un(bt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||sr,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=Ct(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=Mr(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=jr(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&Je(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=Je(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>Yn(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=Xn(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,w={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:Nn,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},T=`POP`,E=null,D=!1,O,k=!1,A=new Map,ee=null,j=!1,te=!1,ne=new Set,M=new Map,re=0,ie=-1,ae=new Map,oe=new Set,se=new Map,ce=new Map,le=new Set,N=new Map,ue,de=null;function fe(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ue){ue(),ue=void 0;return}R(N.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=He({currentLocation:w.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ue=e});e.history.go(r*-1),Ve(i,{state:`blocked`,location:n,proceed(){Ve(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(w.blockers);e.set(i,Fn),F({blockers:e})}}),E?.resolve(),E=null}else return _e(t,n)}),n){ti(t,A);let e=()=>ni(t,A);t.addEventListener(`pagehide`,e),ee=()=>t.removeEventListener(`pagehide`,e)}return w.initialized||_e(`POP`,w.location,{initialHydration:!0}),C}function P(){d&&d(),ee&&ee(),f.clear(),O&&O.abort(),w.fetchers.forEach((e,t)=>Ne(w.fetchers,t)),w.blockers.forEach((e,t)=>Be(t))}function pe(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(w,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function F(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),w={...w,...e};let n=[],r=[];w.fetchers.forEach((e,t)=>{e.state===`idle`&&(le.has(t)?n.push(t):r.push(t))}),le.forEach(e=>{!w.fetchers.has(e)&&!M.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(w,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ne(w.fetchers,e)),r.forEach(e=>w.fetchers.delete(e))}function me(t,n,{flushSync:r}={}){let i=w.actionData!=null&&w.navigation.formMethod!=null&&z(w.navigation.formMethod)&&w.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?w.actionData:null;let o=n.loaderData?Or(w.loaderData,n.loaderData,n.matches||[],n.errors):w.loaderData,c=w.blockers;c.size>0&&(c=new Map(c),c.forEach((e,t)=>c.set(t,Fn)));let l=!j&&qe(t,n.matches||w.matches),u=D===!0||w.navigation.formMethod!=null&&z(w.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),j||T===`POP`||(T===`PUSH`?e.history.push(t,t.state):T===`REPLACE`&&e.history.replace(t,t.state));let d;if(T===`POP`&&!j&&t!==w.location){let e=A.get(w.location.pathname);e&&e.has(t.pathname)?d={currentLocation:w.location,nextLocation:t}:A.has(t.pathname)&&(d={currentLocation:t,nextLocation:w.location})}else if(k){let e=A.get(w.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),A.set(w.location.pathname,e)),d={currentLocation:w.location,nextLocation:t}}F({...n,actionData:a,loaderData:o,historyAction:T,location:t,initialized:!0,renderFallback:!1,navigation:Nn,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),T=`POP`,D=!1,k=!1,j=!1,te=!1,E?.resolve(),E=null,de?.resolve(),de=null}async function he(t,n){if(E?.resolve(),E=null,typeof t==`number`){E||=ri();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=qn(!1,Kn(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?ut(n.mask):{...w.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},tt.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),En(typeof n.mask==`string`?n.mask:lt(n.mask),lt(o),e.history.createURL(`/`),`reject`)}let s=w.location,l=ct(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},En(t==null?e.history.createHref(w.location):typeof t==`string`?t:lt(t),e.history.createHref(l.mask||l),e.history.createURL(`/`),`reject`);let u=n&&n.replace!=null?n.replace:void 0,d=`PUSH`;u===!0?d=`REPLACE`:u===!1||i!=null&&z(i.formMethod)&&i.formAction===w.location.pathname+w.location.search&&(d=`REPLACE`);let f=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,p=(n&&n.flushSync)===!0,m=He({currentLocation:s,nextLocation:l,historyAction:d});m?Ve(m,{state:`blocked`,location:l,proceed(){Ve(m,{state:`proceeding`,proceed:void 0,reset:void 0,location:l}),he(t,n)},reset(){let e=new Map(w.blockers);e.set(m,Fn),F({blockers:e})}}):await _e(d,l,{submission:i,pendingError:a,preventScrollReset:f,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:p,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate})}function ge(){de||=ri(),Oe(),F({revalidation:`loading`});let e=de.promise;return w.navigation.state===`submitting`?e:w.navigation.state===`idle`?(_e(w.historyAction,w.location,{startUninterruptedRevalidation:!0}),e):(_e(T||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:k===!0}),e)}async function _e(t,n,r){O&&O.abort(),O=null,T=t,j=(r&&r.startUninterruptedRevalidation)===!0,Ke(w.location,w.matches),D=(r&&r.preventScrollReset)===!0,k=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&w.matches&&w.matches.length>0&&!y?w.matches:Ct(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!te&&Fr(w.location,n)&&!(r&&r.submission&&z(r.submission.formMethod))){me(n,{matches:a},{flushSync:o});return}let l=Je(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),!a){let{error:e,notFoundMatches:t,route:r}=Ue(n.pathname);me(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;O=new AbortController;let d=Sr(e.history,n,O.signal,r&&r.submission),f=e.getContext?await e.getContext():new mt,p;if(r&&r.pendingError)p=[Ar(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&z(r.submission.formMethod)){let i=await ve(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(Br(t)&&sn(t.error)&&t.error.status===404){O=null,me(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Xr(n,a,t,r.submission),o=!1,l.active=!1,d=Sr(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await ye(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(O=null,me(n,{matches:h||a,...kr(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function ve(t,n,i,l,u,d,f,p,m={}){if(Oe(),F({navigation:Zr(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await I(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=jr(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Ar(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=Ue(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=Jr(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:Mr(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ee(t,n,pr(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(Vr(h)){let n;return n=m&&m.replace!=null?m.replace:xr(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===w.location.pathname+w.location.search,await Te(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(Br(h)){let e=Ar(l,g.route.id);return(m&&m.replace)!==!0&&(T=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function ye(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Xr(n,i,l,p),x=p||m||Yr(b),S=!j&&!g;if(d){if(S){let e=be(v);F({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await I(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=jr(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Ar(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=Ue(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:T,revalidatingFetchers:E}=Jn(t,u,a,o,e.history,w,i,x,n,g?[]:r,g===!0,te,ne,le,se,oe,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(ie=++re,!e.dataStrategy&&!T.some(e=>e.shouldLoad)&&!T.some(e=>e.route.middleware&&e.route.middleware.length>0)&&E.length===0){let e=new Map(w.fetchers),t=Le(e);return me(n,{matches:i,loaderData:{},errors:v&&Br(v[1])?{[v[0]]:v[1].error}:null,...kr(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=be(v);t!==void 0&&(e.actionData=t)}E.length>0&&(e.fetchers=xe(E)),F(e,{flushSync:_})}E.forEach(e=>{Fe(e.key),e.controller&&M.set(e.key,e.controller)});let D=()=>E.forEach(e=>Fe(e.key));O&&O.signal.addEventListener(`abort`,D);let{loaderResults:k,fetcherResults:A}=await De(T,E,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener(`abort`,D),E.forEach(e=>M.delete(e.key));let ee=Nr(k);if(ee)return await Te(t,ee.result,!0,{replace:h}),{shortCircuited:!0};if(ee=Nr(A),ee)return oe.add(ee.key),await Te(t,ee.result,!0,{replace:h}),{shortCircuited:!0};let ae=new Map(w.fetchers),{loaderData:ce,errors:N}=Dr(w,i,k,v,E,A,ae);g&&w.errors&&(N={...w.errors,...N});let ue=Le(ae),de=Re(ie,ae),fe=ue||de||E.length>0;return{matches:i,loaderData:ce,errors:N,...fe?{workingFetchers:ae}:{}}}function be(e){if(e&&!Br(e[1]))return{[e[0]]:e[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function xe(e){let t=new Map(w.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Qr(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Se(t,n,r,i){Fe(t);let a=(i&&i.flushSync)===!0,o=s.activeRoutes,l=Kn(w.location,w.matches,c,r,n,i?.relative),u=Ct(o,l,c,!1,s.branches),d=Je(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Ae(t,n,Mr(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=qn(!0,l,i);if(m){Ae(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new mt,g=(i&&i.preventScrollReset)===!0;p&&z(p.formMethod)?await Ce(t,n,f,u,h,d.active,a,g,p,i&&i.defaultShouldRevalidate):(se.set(t,{routeId:n,path:f}),await we(t,n,f,u,h,d.active,a,g,p))}async function Ce(t,n,i,l,u,d,f,p,m,h){Oe(),se.delete(t),ke(t,$r(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Sr(e.history,i,g.signal,m);if(d){let e=await I(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ae(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Ae(t,n,Mr(404,{pathname:i}),{flushSync:f});return}}let v=Jr(l,i);if(!v.route.action&&!v.route.lazy){Ae(t,n,Mr(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}M.set(t,g);let y=re,b=pr(a,o,_,i,l,v,r,u),x=await Ee(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){M.get(t)===g&&M.delete(t);return}if(le.has(t)){if(Vr(S)||Br(S)){ke(t,ei(void 0));return}}else{if(Vr(S)){if(M.delete(t),ie>y){ke(t,ei(void 0));return}return oe.add(t),ke(t,Qr(m)),Te(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Br(S)){Ae(t,n,S.error);return}}let C=w.navigation.location||w.location,E=Sr(e.history,C,g.signal),D=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:Ct(D,w.navigation.location,c,!1,s.branches);L(k,`Didn't find any matches after fetcher action`);let A=++re;ae.set(t,A);let{dsMatches:ee,revalidatingFetchers:j}=Jn(E,u,a,o,e.history,w,k,m,C,r,!1,te,ne,le,se,oe,D,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ce=Qr(m,S.data),N=new Map(w.fetchers);N.set(t,ce),j.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=N.get(t),r=Qr(void 0,n?n.data:void 0);N.set(t,r),Fe(t),e.controller&&M.set(t,e.controller)}),F({fetchers:N});let ue=()=>j.forEach(e=>Fe(e.key));g.signal.addEventListener(`abort`,ue);let{loaderResults:de,fetcherResults:fe}=await De(ee,j,E,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,ue),ae.delete(t),M.delete(t),j.forEach(e=>M.delete(e.key));let P=w.fetchers.has(t),pe=e=>{if(!P)return e;let n=new Map(e.fetchers);return n.set(t,ei(S.data)),{...e,fetchers:n}},he=Nr(de);if(he)return w=pe(w),Te(E,he.result,!1,{preventScrollReset:p});if(he=Nr(fe),he)return oe.add(he.key),w=pe(w),Te(E,he.result,!1,{preventScrollReset:p});let ge=new Map(w.fetchers);P&&ge.set(t,ei(S.data));let{loaderData:_e,errors:ve}=Dr(w,k,de,void 0,j,fe,ge);Re(A,ge),w.navigation.state===`loading`&&A>ie?(L(T,`Expected pending action`),O&&O.abort(),me(w.navigation.location,{matches:k,loaderData:_e,errors:ve,fetchers:ge})):(F({errors:ve,loaderData:Or(w.loaderData,_e,k,ve),fetchers:ge}),te=!1)}async function we(t,n,i,s,c,l,u,d,f){let p=w.fetchers.get(t);ke(t,Qr(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Sr(e.history,i,m.signal);if(l){let e=await I(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Ae(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Ae(t,n,Mr(404,{pathname:i}),{flushSync:u});return}}let g=Jr(s,i);M.set(t,m);let _=re,v=await Ee(h,i,pr(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(M.get(t)===m&&M.delete(t),!h.signal.aborted){if(le.has(t))ke(t,ei(void 0));else if(Vr(y)){if(ie>_){ke(t,ei(void 0));return}oe.add(t),await Te(h,y,!1,{preventScrollReset:d})}else Br(y)?Ae(t,n,y.error):ke(t,ei(y.data))}}async function Te(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(E?.resolve(),E=null),i.response.headers.has(`X-Remix-Revalidate`)&&(te=!0);let d=i.response.headers.get(`Location`);L(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=xr(d,p,c,e.history),En(f,d,p,`allow-explicit`);let m=ct(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Gt(d)){let n=ft(t,d,!0);e=n.origin!==t.location.origin||Ut(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}O=null;let h=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:g,formAction:_,formEncType:v}=w.navigation;!o&&!s&&g&&_&&v&&(o=Yr(w.navigation));let y=o||s;Mn.has(i.response.status)&&y&&z(y.formMethod)?await _e(h,m,{submission:{...y,formAction:d},preventScrollReset:l||D,enableViewTransition:a?k:void 0}):await _e(h,m,{overrideNavigation:Xr(m,[],h,o),fetcherSubmission:s,preventScrollReset:l||D,enableViewTransition:a?k:void 0})}async function Ee(e,t,n,r,i){let a,o={};try{a=await mr(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!z(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;a.hasOwnProperty(e.route.id)||w.loaderData.hasOwnProperty(e.route.id)||w.errors&&w.errors.hasOwnProperty(e.route.id)||!e.shouldCallHandler()||(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(zr(r)){let i=r.result;o[t]={type:`redirect`,response:vr(i,e,t,n,c)}}else o[t]=await _r(r);return o}async function De(e,t,n,r,i){let a=Ee(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ee(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:Mr(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Oe(){te=!0,se.forEach((e,t)=>{M.has(t)&&ne.add(t),Fe(t)})}function ke(e,t,n={}){let r=new Map(w.fetchers);r.set(e,t),F({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Ae(e,t,n,r={}){let i=Ar(w.matches,t),a=new Map(w.fetchers);Ne(a,e),F({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function je(e){return ce.set(e,(ce.get(e)||0)+1),le.has(e)&&le.delete(e),w.fetchers.get(e)||Pn}function Me(e,t){Fe(e,t?.reason),ke(e,ei(null))}function Ne(e,t){let n=w.fetchers.get(t);M.has(t)&&!(n&&n.state===`loading`&&ae.has(t))&&Fe(t),se.delete(t),ae.delete(t),oe.delete(t),le.delete(t),ne.delete(t),e.delete(t)}function Pe(e){let t=(ce.get(e)||0)-1;t<=0?(ce.delete(e),le.add(e)):ce.set(e,t),F({fetchers:new Map(w.fetchers)})}function Fe(e,t){let n=M.get(e);n&&(n.abort(t),M.delete(e))}function Ie(e,t){for(let n of e){let e=t.get(n);L(e,`Expected fetcher: ${n}`);let r=ei(e.data);t.set(n,r)}}function Le(e){let t=[],n=!1;for(let r of oe){let i=e.get(r);L(i,`Expected fetcher: ${r}`),i.state===`loading`&&(oe.delete(r),t.push(r),n=!0)}return Ie(t,e),n}function Re(e,t){let n=[];for(let[r,i]of ae)if(i<e){let e=t.get(r);L(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Fe(r),ae.delete(r),n.push(r))}return Ie(n,t),n.length>0}function ze(e,t){let n=w.blockers.get(e)||Fn;return N.get(e)!==t&&N.set(e,t),n}function Be(e){w.blockers.delete(e),N.delete(e)}function Ve(e,t){let n=w.blockers.get(e)||Fn;L(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(w.blockers);r.set(e,t),F({blockers:r})}function He({currentLocation:e,nextLocation:t,historyAction:n}){if(N.size===0)return;N.size>1&&R(!1,`A router only supports one blocker at a time`);let r=Array.from(N.entries()),[i,a]=r[r.length-1],o=w.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function Ue(e){let t=Mr(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=jr(n);return{notFoundMatches:r,route:i,error:t}}function We(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Nn){_=!0;let e=qe(w.location,w.matches);e!=null&&F({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function Ge(e,t){return h&&h(e,t.map(e=>wt(e,w.loaderData)))||e.key}function Ke(e,t){if(m&&g){let n=Ge(e,t);m[n]=g()}}function qe(e,t){if(m){let n=Ge(e,t),r=m[n];if(typeof r==`number`)return r}return null}function Je(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:Ct(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:Ct(n,r,c,!0,e)}}return{active:!1,matches:null}}async function I(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||er(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=Ct(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=Ct(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&Ye(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=Ct(s.activeRoutes,n,c,!0,u),!f||Ye(l,f))return{type:`success`,matches:null};l=f}}function Ye(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Xe(e){o={},s.setHmrRoutes(bt(e,a,void 0,o))}function Ze(e,t,n=!1){er(e,t,s,o,a,n),s.hasHMRRoutes||F({})}return C={get basename(){return c},get future(){return u},get state(){return w},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:fe,subscribe:pe,enableScrollRestoration:We,navigate:he,fetch:Se,revalidate:ge,createHref:t=>e.history.createHref(t),createURL:t=>e.history.createURL(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:je,resetFetcher:Me,deleteFetcher:Pe,dispose:P,getBlocker:ze,deleteBlocker:Be,patchRoutes:Ze,_internalFetchControllers:M,_internalSetRoutes:Xe,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){F(e)}},e.instrumentations&&(C=pn(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Gn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Kn(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Zt(r||`.`,Xt(o),Ut(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=qr(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Wt({basename:n,pathname:c.pathname})),lt(c)}function qn(e,t,n){if(!n||!Gn(n))return{path:t};if(n.formMethod&&!Kr(n.formMethod))return{path:t,error:Mr(405,{method:n.formMethod})};let r=()=>({path:t,error:Mr(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Pr(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!z(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}
|
|
2
|
+
`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!z(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}L(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=wr(n.formData),s=n.formData;else if(n.body instanceof FormData)o=wr(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Tr(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Tr(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(z(c.formMethod))return{path:t,submission:c};let l=ut(t);return e&&l.search&&qr(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:lt(l),submission:c}}function Jn(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Br(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&Br(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=cn(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!Yn(s))f=!1;else if(u){let{shouldLoad:e}=Xn(s,a.loaderData,a.errors);f=e}else Zn(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return fr(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Qn(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=$n(i,m);return fr(n,r,e,c,k,i,l,t,h,m,x)}),ee=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=Ct(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;ee.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=Jr(b,e.path),C=new AbortController,w=Sr(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=pr(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=pr(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};$n(S,a)&&(T=pr(n,r,w,e.path,b,S,l,t,a))}T&&ee.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:ee}}function Yn(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Xn(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Yn(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function Zn(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Qn(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function $n(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function er(e,t,n,r,i,a){let o;if(e){let t=r[e];L(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>tr(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=bt(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=bt([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function tr(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>tr(e,t)))??!1}var nr=new WeakMap,rr=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(L(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=nr.get(i);o||(o={},nr.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=gt(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)R(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)R(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},ir=new WeakMap;function ar(e,t,n,r,i){let a=n[e.id];if(L(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=ir.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{L(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=vt(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?R(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?R(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return ir.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=rr({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function or(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function sr(e){return e.matches.some(e=>e.route.middleware)?cr(e,()=>or(e)):or(e)}function cr(e,t){return lr(e,t,e=>{if(Gr(e))throw e;return e},Lr,n);function n(t,n,r){if(r)return Promise.resolve(Object.assign(r.value,{[n]:{type:`error`,result:t}}));{let{matches:r}=e,i=Ar(r,r[Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0))].route.id).route.id;return Promise.resolve({[i]:{type:`error`,result:t}})}}}async function lr(e,t,n,r,i){let{matches:a,...o}=e;return await ur(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function ur(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await ur(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function dr(e,t,n,r,i){let a=rr({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=ar(r.route,z(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function fr(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=dr(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?$n(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?$n(a,{...l,defaultShouldRevalidate:e}):$n(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!z(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(z(n.method)||!p)?hr({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function pr(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?fr(e,t,n,r,cn(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:dr(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function mr(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Cr(t,n),pattern:cn(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return cr(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function hr({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=z(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Cr(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw Mr(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw Mr(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function gr(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function _r(e){let{result:t,type:n}=e;if(Ur(t)){let e;try{e=await gr(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new on(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Hr(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:Ir(t),statusCode:sn(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:sn(t)?t.status:void 0}:Hr(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function vr(e,t,n,r,i){let a=e.headers.get(`Location`);if(L(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Gt(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Kn(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var yr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function br(e){try{return yr.includes(new URL(e).protocol)}catch{return!1}}function xr(e,t,n,r){if(Gt(e)){let r=e,i=tt.test(r)?new URL(nt(r,t.protocol)):new URL(r);if(br(i.toString()))throw Error(`Invalid redirect location`);let a=Ut(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Qt(i.pathname)+i.search+i.hash}try{if(br(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Sr(e,t,n,r){let i=e.createURL(Pr(t)).toString(),a={signal:n};if(r&&z(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?wr(r.formData):r.formData}return new Request(i,a)}function Cr(e,t){let n=new URL(e.url),r=typeof t==`string`?ut(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);n.search=e.size?`?${e.toString()}`:``}else n.search=``;return n.hash=r.hash||``,n}function wr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Tr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Er(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Br(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(L(!Vr(f),`Cannot handle redirect results in processLoaderData`),Br(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Ar(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Rn),c||(c=!0,s=sn(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function Dr(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Er(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(L(s,`Did not find corresponding fetcher result`),Br(s)){let t=Ar(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Vr(s))L(!1,`Unhandled fetcher revalidation redirect`);else{let e=ei(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Or(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Rn).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function kr(e){return e?Br(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ar(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.hasErrorBoundary===!0)||e[0]}function jr(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function Mr(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new on(e||500,o,Error(s),!0)}function Nr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Vr(r))return{key:n,result:r}}}function Pr(e){return lt({...typeof e==`string`?ut(e):e,hash:``})}function Fr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Ir(e){return new on(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Lr(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Rr(t))}function Rr(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function zr(e){return Ur(e.result)&&jn.has(e.result.status)}function Br(e){return e.type===`error`}function Vr(e){return(e&&e.type)===`redirect`}function Hr(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Ur(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Wr(e){return jn.has(e)}function Gr(e){return Ur(e)&&Wr(e.status)&&e.headers.has(`Location`)}function Kr(e){return An.has(e.toUpperCase())}function z(e){return On.has(e.toUpperCase())}function qr(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function Jr(e,t){let n=typeof t==`string`?ut(t).search:t.search;if(e[e.length-1].route.index&&qr(n||``))return e[e.length-1];let r=Yt(e);return r[r.length-1]}function Yr(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(t&&n&&r){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Xr(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Zr(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Qr(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function $r(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ei(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function ti(e,t){try{let n=e.sessionStorage.getItem(Ln);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function ni(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Ln,JSON.stringify(n))}catch(e){R(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function ri(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var ii=o.createContext(null);ii.displayName=`DataRouter`;var ai=o.createContext(null);ai.displayName=`DataRouterState`;var oi=o.createContext(!1);function si(){return o.useContext(oi)}var ci=o.createContext({isTransitioning:!1});ci.displayName=`ViewTransition`;var li=o.createContext(new Map);li.displayName=`Fetchers`;var ui=o.createContext(null);ui.displayName=`Await`;var di=o.createContext(null);di.displayName=`Navigation`;var fi=o.createContext(null);fi.displayName=`Location`;var pi=o.createContext({outlet:null,matches:[],isDataRoute:!1});pi.displayName=`Route`;var mi=o.createContext(null);mi.displayName=`RouteError`;var hi=`REACT_ROUTER_ERROR`,gi=`REDIRECT`,_i=`ROUTE_ERROR_RESPONSE`;function vi(e){if(e.startsWith(`${hi}:${gi}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function yi(e){if(e.startsWith(`${hi}:${_i}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new on(t.status,t.statusText,t.data)}catch{}}function bi(e,{relative:t}={}){L(xi(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(di),{hash:i,pathname:a,search:s}=Ai(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:$t([n,a])),r.createHref({pathname:c,search:s,hash:i})}function xi(){return o.useContext(fi)!=null}function Si(){return L(xi(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(fi).location}var Ci=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function wi(e){o.useContext(di).static||o.useLayoutEffect(e)}function Ti(){let{isDataRoute:e}=o.useContext(pi);return e?Ki():Ei()}function Ei(){L(xi(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(ii),{basename:t,navigator:n}=o.useContext(di),{matches:r}=o.useContext(pi),{pathname:i}=Si(),a=JSON.stringify(Xt(r)),s=o.useRef(!1);return wi(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(R(s.current,Ci),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=Zt(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:$t([t,c.pathname])),En(typeof r==`string`?r:lt(r),n.createHref(c),Cn(n),`reject`),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}var Di=o.createContext(null);function Oi(e){let t=o.useContext(pi).outlet;return o.useMemo(()=>t&&o.createElement(Di.Provider,{value:e},t),[t,e])}function ki(){let{matches:e}=o.useContext(pi);return e[e.length-1]?.params??{}}function Ai(e,{relative:t}={}){let{matches:n}=o.useContext(pi),{pathname:r}=Si(),i=JSON.stringify(Xt(n));return o.useMemo(()=>Zt(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function ji(e,t,n){L(xi(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=o.useContext(di),{matches:i}=o.useContext(pi),a=i[i.length-1],s=a?a.params:{},c=a?a.pathname:`/`,l=a?a.pathnameBase:`/`,u=a&&a.route;{let e=u&&u.path||``;Ji(c,!u||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${c}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
3
|
|
|
4
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=Si(),f;if(t){let e=typeof t==`string`?lt(t):t;R(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):xt(e,{pathname:m});z(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),z(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Ri(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:Qt([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:Qt([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?o.createElement(fi.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Mi(){let e=Gi(),t=on(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o.createElement(o.Fragment,null,o.createElement(`p`,null,`💿 Hey developer 👋`),o.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,o.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),o.createElement(o.Fragment,null,o.createElement(`h2`,null,`Unexpected Application Error!`),o.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?o.createElement(`pre`,{style:i},n):null,s)}var Ni=o.createElement(Mi,null),Pi=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=yi(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(pi.Provider,{value:this.props.routeContext},o.createElement(mi.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Ii,{error:e},t):t}};Pi.contextType=oi;var Fi=new WeakMap;function Ii({children:e,error:t}){let{basename:n,navigator:r}=o.useContext(di);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=vi(t.digest);if(e){let i=Fi.get(t);if(i)throw i;let a=ln(e.location,n),s=a.absoluteURL||a.to;if(Tn(e.location,s,Sn(r),`allow-explicit`),yr(s))throw Error(`Invalid redirect location`);if(cn&&!Fi.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=s;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Fi.set(t,n),n}}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function Li({routeContext:e,match:t,children:n}){let r=o.useContext(ii);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(pi.Provider,{value:e},n)}function Ri(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);R(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:sn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Ni,s&&(c<0&&l===0?(Ji(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(Li,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o.createElement(Pi,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function zi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bi(e){let t=o.useContext(ii);return R(t,zi(e)),t}function Vi(e){let t=o.useContext(ai);return R(t,zi(e)),t}function Hi(e){let t=o.useContext(pi);return R(t,zi(e)),t}function Ui(e){let t=Hi(e),n=t.matches[t.matches.length-1];return R(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Wi(){return Ui(`useRouteId`)}function Gi(){let e=o.useContext(mi),t=Vi(`useRouteError`),n=Ui(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ki(){let{router:e}=Bi(`useNavigate`),t=Ui(`useNavigate`),n=o.useRef(!1);return wi(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{z(n.current,Ci),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var qi={};function Ji(e,t,n){!t&&!qi[e]&&(qi[e]=!0,z(!1,n))}var Yi={};function Xi(e,t){!e&&!Yi[t]&&(Yi[t]=!0,console.warn(t))}var Zi=o.useOptimistic,Qi=()=>void 0;function $i(e){return Zi?Zi(e):[e,Qi]}function ea(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&z(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:o.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&z(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:o.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&z(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ta=[`HydrateFallback`,`hydrateFallbackElement`],na=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function ra({router:e,flushSync:t,onError:n,useTransitions:r}){r=si()||r;let[i,a]=o.useState(e.state),[s,c]=$i(i),[l,u]=o.useState(),[d,f]=o.useState({isTransitioning:!1}),[p,m]=o.useState(),[h,g]=o.useState(),[_,v]=o.useState(),y=o.useRef(new Map),b=o.useCallback((i,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:sn(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),Xi(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Xi(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b)t&&d?t(()=>a(i)):r===!1?a(i):o.startTransition(()=>{r===!0&&c(e=>ia(e,i)),a(i)});else if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n))}else h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,c,n]);o.useLayoutEffect(()=>e.subscribe(b),[e,b]),o.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new na)},[d]),o.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):o.startTransition(()=>{r===!0&&c(e=>ia(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,c]),o.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),o.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=o.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=o.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return o.createElement(o.Fragment,null,o.createElement(ii.Provider,{value:C},o.createElement(ai.Provider,{value:s},o.createElement(li.Provider,{value:y.current},o.createElement(ci.Provider,{value:d},o.createElement(la,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},o.createElement(aa,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function ia(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var aa=o.memo(oa);function oa({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ji(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function sa({to:e,replace:t,state:n,relative:r}){R(xi(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=o.useContext(di);z(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:s}=o.useContext(pi),{pathname:c}=Si(),l=Ti(),u=Xt(e,Yt(s),c,r===`path`);Tn(typeof e==`string`?e:ct(e),a.createHref(u),Sn(a),`reject`);let d=JSON.stringify(u);return o.useEffect(()=>{l(JSON.parse(d),{replace:t,state:n,relative:r})},[l,d,r,t,n]),null}function ca(e){return Oi(e.context)}function la({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){R(!xi(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=o.useMemo(()=>({basename:c,navigator:i,static:a,useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=lt(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=o.useMemo(()=>{let e=Ht(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return z(g!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:o.createElement(di.Provider,{value:l},o.createElement(fi.Provider,{children:t,value:g}))}o.Component;var ua=`get`,da=`application/x-www-form-urlencoded`;function fa(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function pa(e){return fa(e)&&e.tagName.toLowerCase()===`button`}function ma(e){return fa(e)&&e.tagName.toLowerCase()===`form`}function ha(e){return fa(e)&&e.tagName.toLowerCase()===`input`}function ga(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _a(e,t){return e.button===0&&(!t||t===`_self`)&&!ga(e)}function va(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ya(e,t){let n=va(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ba=null;function xa(){if(ba===null)try{new FormData(document.createElement(`form`),0),ba=!1}catch{ba=!0}return ba}var Sa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ca(e){return e!=null&&!Sa.has(e)?(z(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${da}"`),null):e}function wa(e,t){let n,r,i,a,o;if(ma(e)){let o=e.getAttribute(`action`);r=o?Ht(o,t):null,n=e.getAttribute(`method`)||ua,i=Ca(e.getAttribute(`enctype`))||da,a=new FormData(e)}else if(pa(e)||ha(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ht(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||ua,i=Ca(e.getAttribute(`formenctype`))||Ca(o.getAttribute(`enctype`))||da,a=new FormData(o,e),!xa()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(fa(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=ua,r=null,i=da,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ta(e,t){if(e===!1||e==null)throw Error(t)}function Ea(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&Ht(i.pathname,t)===`/`?`${$t(t)}/_root.${r}`:`${$t(i.pathname)}.${r}`,i}async function Da(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Oa(e){return e!=null&&typeof e.page==`string`}function ka(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Aa(e,t,n){return Fa((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Da(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ka).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ja(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ma(e,t,{includeHydrateFallback:n}={}){return Na(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Na(e){return[...new Set(e)]}function Pa(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Fa(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Oa(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Pa(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ia(){let e=o.useContext(ii);return Ta(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function La(){let e=o.useContext(ai);return Ta(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ra=o.createContext(void 0);Ra.displayName=`FrameworkContext`;function za(){let e=o.useContext(Ra);return Ta(e,`You must render this element inside a <HydratedRouter> element`),e}function Ba(e,t){let n=o.useContext(Ra),[r,i]=o.useState(!1),[a,s]=o.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=o.useRef(null);o.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[a,p,{onFocus:Va(c,m),onBlur:Va(l,h),onMouseEnter:Va(u,m),onMouseLeave:Va(d,h),onTouchStart:Va(f,m)}]:[a,p,{}]:[!1,p,{}]}function Va(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ha({page:e,...t}){let n=si(),{nonce:r}=za(),{router:i}=Ia(),a=o.useMemo(()=>xt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?o.createElement(Wa,{page:e,matches:a,...t}):o.createElement(Ga,{page:e,matches:a,...t})):null}function Ua(e){let{manifest:t,routeModules:n}=za(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Aa(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Wa({page:e,matches:t,...n}){let r=Si(),{future:i}=za(),{basename:a}=Ia(),s=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Ea(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return o.createElement(o.Fragment,null,s.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ga({page:e,matches:t,...n}){let r=Si(),{future:i,manifest:a,routeModules:s}=za(),{basename:c}=Ia(),{loaderData:l,matches:u}=La(),d=o.useMemo(()=>ja(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>ja(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let u=Ea(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return o&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,s]),m=o.useMemo(()=>Ma(f,a),[f,a]),h=Ua(f);return o.createElement(o.Fragment,null,p.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>o.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>o.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ka(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}o.Component;var qa=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{qa&&(window.__reactRouterVersion=`7.18.5`)}catch{}function Ja(e,t){return Un({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:it({window:t?.window}),hydrationData:t?.hydrationData||Ya(),routes:e,mapRouteProperties:ea,hydrationRouteProperties:ta,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ya(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Xa(e.errors)}),e}function Xa(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new an(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&rn.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Za=o.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=o.useContext(di),y=typeof u==`string`&&$e.test(u),b=ln(u,g);u=b.to;let x=bi(u,{relative:r}),S=Si(),C=null;if(s){let e=Xt(s,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:Qt([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Ba(n,m),D=no(u,{replace:a,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=o.createElement(`a`,{...m,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ka(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?o.createElement(o.Fragment,null,A,o.createElement(Ha,{page:x})):A});Za.displayName=`Link`;var Qa=o.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=Ai(a,{relative:l.relative}),f=Si(),p=o.useContext(ai),{navigator:m,basename:h}=o.useContext(di),g=p!=null&&co(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=Ht(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return o.createElement(Za,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});Qa.displayName=`NavLink`;var $a=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=ua,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=o.useContext(di),_=oo(),v=so(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&$e.test(c);return o.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?o.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});$a.displayName=`Form`;function eo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function to(e){let t=o.useContext(ii);return R(t,eo(e)),t}function no(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Ti(),f=Si(),p=Ai(e,{relative:s});return o.useCallback(m=>{if(_a(m,t)){m.preventDefault();let t=n===void 0?ct(f)===ct(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?o.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,s,c,l,u])}function ro(e){z(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=o.useRef(va(e)),n=o.useRef(!1),r=Si(),i=o.useMemo(()=>ya(r.search,n.current?null:t.current),[r.search]),a=Ti();return[i,o.useCallback((e,t)=>{let r=va(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var io=0,ao=()=>`__${String(++io)}__`;function oo(){let{router:e}=to(`useSubmit`),{basename:t}=o.useContext(di),n=Wi(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wa(e,t);if(a.navigate===!1){let e=a.fetcherKey||ao();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function so(e,{relative:t}={}){let{basename:n}=o.useContext(di),r=o.useContext(pi);R(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ai(e||`.`,{relative:t})},s=Si();if(e==null){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:Qt([n,a.pathname])),ct(a)}function co(e,{relative:t}={}){let n=o.useContext(ci);R(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=to(`useViewTransitionState`),i=Ai(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ht(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ht(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Rt(i.pathname,s)!=null||Rt(i.pathname,a)!=null}var B=e=>typeof e==`string`,lo=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},uo=e=>e==null?``:String(e),fo=e=>B(e)&&/^[A-Za-z0-9_@.-]{1,128}$/.test(e)&&!e.includes(`..`)&&![`__proto__`,`constructor`,`prototype`].includes(e),po=e=>e?.callbackApi??e?.constructor?.callbackApi,mo=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},ho=/###/g,go=e=>e&&e.includes(`###`)?e.replace(ho,`.`):e,_o=e=>!e||B(e),vo=(e,t,n)=>{let r=B(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(_o(e))return{};let t=go(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return _o(e)?{}:{obj:e,k:go(r[i])}},yo=(e,t,n)=>{let{obj:r,k:i}=vo(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=vo(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=vo(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},bo=(e,t,n,r)=>{let{obj:i,k:a}=vo(e,t,Object);i[a]=i[a]||[],i[a].push(n)},xo=(e,t)=>{let{obj:n,k:r}=vo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},So=(e,t,n)=>{let r=xo(e,n);return r===void 0?xo(t,n):r},Co=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?B(e[r])||e[r]instanceof String||B(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Co(e[r],t[r],n):e[r]=t[r]);return e},wo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),To={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Eo=e=>B(e)?e.replace(/[&<>"'\/]/g,e=>To[e]):e,Do=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Oo=[` `,`,`,`?`,`!`,`;`],ko=new Do(20),Ao=(e,t,n)=>{t||=``,n||=``;let r=Oo.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=ko.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},jo=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],typeof t!=`function`&&a!==`__proto__`||Object.prototype.hasOwnProperty.call(i,a)||(t=void 0),t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Mo=e=>e?.replace(/_/g,`-`),No={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Po=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||No,this.options=t,this.debug=t.debug,this.seen=new Set}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}once(e,t,...n){return!this.debug||this.seen.has(e)||this.seen.size>=1e3?null:(this.seen.add(e),this[t](...n))}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>B(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),B(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Fo=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){(typeof e==`string`?e.split(` `):[e]).forEach(e=>{this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])})}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Io=new WeakSet,Lo=class extends Fo{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.logger=Po.create(`resourceStore`),this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}deprecateDottedLng(e){this.logger.once(e,`deprecate`,`${e}: a dotted language ('en.translation.key') that carries the namespace and key is removed in v27; pass language, namespace and key as separate arguments`)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?(this.deprecateDottedLng(`getResource`),o=e.split(`.`)):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):B(n)&&i?o.push(...n.split(i)):o.push(n)));let s=xo(this.data,o);return s==null&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s!=null||!a||!B(n)?s:jo(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(this.deprecateDottedLng(`addResource`),o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),yo(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(B(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(this.deprecateDottedLng(`addResourceBundle`),o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=xo(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Co(s,n,i):s={...s,...n},yo(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>{let n=t[e];return Io.has(n)?!0:!n||Object.keys(n).length===0?!1:(typeof n==`object`&&Io.add(n),!0)})}toJSON(){return this.data}},Ro={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},zo=Symbol(`i18next/PATH_KEY`);function Bo(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===zo?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Vo(e,t){let{[zo]:n}=e(Bo()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Ho=e=>!B(e)&&typeof e!=`boolean`&&typeof e!=`number`,Uo=class e extends Fo{constructor(e,t={}){super(),mo([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`,`ownPostProcessors`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Po.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Ho(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ao(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:B(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:B(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Vo(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Vo(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!B(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Ho(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(B(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||(this.logger.warn(`accessing an object - but returnObjects options is not enabled!`),this.logger.once(`returnedObject`,`deprecate`,`accessing an object without returnObjects returns a sentence about it today; from v27 t() returns the key, as for a missing key (returnedObjectHandler can keep today's text)`));let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Ho(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&B(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,p,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i,void 0,this.utils?.hasLoadedNamespace),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=B(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!B(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=B(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(o.forEach(e=>{this.logger.debug&&Ro.processors[e]&&this.ownPostProcessors&&!this.ownPostProcessors.has(e)&&this.logger.once(e,`deprecate`,`postProcess: '${e}' was registered with use() on another i18next instance; from v27 post-processors are per instance, so call use() with it on this instance too`)}),e=Ro.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return B(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Vo(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!B(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(B(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!B(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Wo=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Po.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Mo(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Mo(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(B(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}let t=this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e;return this.logger.debug&&B(e)&&this.deprecateBareCode(e,t),t}deprecateBareCode(e,t){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{return}let r=n.toLowerCase()===e.toLowerCase()?n:e.toLowerCase();this.options.lowerCaseLng&&(r=r.toLowerCase()),r!==t&&this.logger.once(e,`deprecate`,`language code '${e}' is used as '${t}'; i18next v27 gives it the canonical casing '${r}', use '${r}' in lng, fallbackLng, supportedLngs and the resources`)}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!(!e.includes(`-`)||r.includes(`-`)||e.slice(0,e.indexOf(`-`))!==r))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),B(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||B(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=B(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return B(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):B(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{let t=this.formatLanguageCode(e);l.includes(t)||u(t)}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},Go={zero:0,one:1,two:2,few:3,many:4,other:5},Ko={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},qo=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Po.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Mo(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Ko;if(!e.match(/-|_/))return Ko;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Go[e]-Go[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Jo=(e,t,n,r=`.`,i=!0)=>{let a=So(e,t,n);return a==null&&i&&B(n)&&(a=jo(e,n,r),a===void 0&&(a=jo(t,n,r))),a},Yo=class{constructor(e={}){this.logger=Po.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;if(a||s||f||m){let e=Object.entries({prefixEscaped:a,suffixEscaped:s,nestingPrefixEscaped:f,nestingSuffixEscaped:m}).filter(([,e])=>e).map(([e])=>e);this.logger.once(e.join(),`deprecate`,`interpolation.${e.join(`, interpolation.`)}: the regex-escaped delimiter options are removed in v27; pass the literal delimiters as prefix, suffix, nestingPrefix and nestingSuffix`)}this.escape=t===void 0?Eo:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?wo(i):a||`{{`,this.suffix=o?wo(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?wo(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?wo(l):``,this.nestingPrefix=d?wo(d):f||wo(`$t(`),this.nestingSuffix=p?wo(p):m||wo(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=e,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(!e.includes(this.formatSeparator)){let i=Jo(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Jo(t,c,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables,f=[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?(this.escape===Eo&&this.options?.interpolation?.escapeValue!==!1&&B(e)&&e.includes(`/`)&&this.logger.once(`/`,`deprecate`,`escapeValue renders '/' in a value as '/' today; from v27 the default escape leaves '/' as it is`),this.escape(e)):e}],p=[],m=0;return f.forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i.index-m,c=p.find(([e,t])=>n>=e&&n<t);if(c){t.regex.lastIndex=c[1]+m;continue}let f=i[1].trim();if(a=l(f),a===void 0){if(typeof u==`function`){let t=u(e,i,r);a=B(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,f))a=``;else if(d){this.logger.debug&&this.logger.once(`${s}\u0000${i[0]}`,`warn`,`missed to pass in variable ${f} for interpolating ${s}`),a=i[0];continue}else this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`),a=``}else!B(a)&&!this.useRawValueToEscape&&(a=uo(a));let h=uo(t.safeValue(a));if(e=e.slice(0,i.index)+h+e.slice(i.index+i[0].length),d?(t.regex===this.regexpUnescape?p.push([i.index,i.index+h.length]):m+=h.length-i[0].length,t.regex.lastIndex+=h.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${wo(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e},s=new RegExp(this.nestingRegexp),c=``,l=0;for(;r=s.exec(e);){let u=[];a={...n},a=a.replace&&!B(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(d!==-1&&(u=r[1].slice(d).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,d)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!B(i))return i;B(i)||(i=uo(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),u.length&&(i=u.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),c+=e.slice(l,r.index)+uo(i),l=s.lastIndex,this.regexp.lastIndex=0}return l?c+e.slice(l):e}},Xo=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Zo=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o;try{o=r+JSON.stringify(a)}catch{return e(Mo(r),i)(n)}let s=t[o];return s||(s=e(Mo(r),i),t[o]=s),s(n)}},Qo=e=>(t,n,r)=>e(Mo(n),r)(t),$o=class{constructor(e={}){this.logger=Po.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Zo:Qo;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Zo(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Xo(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},es=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ts=class extends Fo{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Po.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r),this.callbackApi=po(this.backend),this.backend&&this.callbackApi===void 0&&(this.backend.read||this.backend.create)&&this.logger.deprecate(`backend: set callbackApi to declare the calling convention (true: read(language, namespace, callback) and create(languages, namespace, key, fallbackValue, callback, options); false: both return a promise or a value); guessing it from the number of parameters is deprecated`)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:!n.reload&&this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{bo(n.loaded,[i],a),es(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&s&&r<this.maxRetries?setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i):a(o,s)},s=this.backend[n].bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&s.length===2)try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}else return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();B(e)&&(e=this.languageUtils.toResolveHierarchy(e)),B(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}noticeDevFallback(e){e===`dev`&&this.devIsDefaultFallback&&this.logger.once(`dev`,`warn`,`language 'dev' is requested because fallbackLng is not set (its default is ['dev']); i18next v27 defaults to fallbackLng: false and loads and saves missing keys in the requested language instead. Set fallbackLng to your source language, or to 'dev' to keep this behavior`)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.noticeDevFallback(r),this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{},s=this.newestCloneHasLoadedNamespace||this.services?.utils?.hasLoadedNamespace){if(s&&!s(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);else if(n!=null&&n!==``){if(this.backend?.create){e?.forEach?.(e=>this.noticeDevFallback(e));let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&c.length<6)try{let i;i=this.callbackApi===!1||c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},ns=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),B(e[1])&&(t.defaultValue=e[1]),B(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rs=e=>(B(e.ns)&&(e.ns=[e.ns]),B(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),B(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),is=()=>{},as,os=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},V=class e extends Fo{constructor(e={},t){if(super(),this.options=rs(e),this.services={ownPostProcessors:new Set},this.logger=Po,this.modules={external:[]},os(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(B(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=e.fallbackLng===void 0&&this.options.fallbackLng===void 0,r=ns();this.options={...r,...this.options,...rs(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);let i=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){as&&as!==this&&as.modules.logger!==this.modules.logger&&Po.deprecate(`init: this init() replaces the logger another i18next instance set with use(), as the logger is shared in v26; from v27 each instance keeps its own logger`),as=this.modules.logger?this:void 0,this.modules.logger?Po.init(i(this.modules.logger),this.options):Po.init(null,this.options),this.pendingWarnings?.forEach(e=>this.logger.warn(e)),this.pendingWarnings=void 0;let e;e=this.modules.formatter?this.modules.formatter:$o;let t=new Wo(this.options);this.store=new Lo(this.options.resources,this.options);let r=this.services;r.logger=Po,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new qo(t,{prepend:this.options.pluralSeparator}),e&&(r.formatter=i(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Yo(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this),reloadResources:this.reloadResources.bind(this)},r.backendConnector=new ts(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.devIsDefaultFallback=n,r.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=i(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options),r.languageDetector.async&&po(r.languageDetector)===void 0&&this.logger.deprecate(`languageDetector: set callbackApi to declare how the async detect() answers (true: detect(callback); false: detect() returns a promise); guessing it from the number of parameters is deprecated`)),this.modules.i18nFormat&&(r.i18nFormat=i(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new Uo(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=is,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=lo(),o=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),a.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=is){let n=t,r=B(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=lo();if(typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),!e){let t=Object.keys(this.services.backendConnector.state).map(e=>e.split(`|`)[0]);e=[...new Set([...this.languages||[],...t])].filter(e=>e!==`cimode`)}return t||=this.options.ns,n||=is,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);let t=t=>{if(this.modules[t]&&this.modules[t]!==e){let e=`use: this ${t} replaces the ${t} passed to an earlier use() call; only one ${t} is used per instance`;this.isInitializing||this.isInitialized?this.logger.warn(e):(this.pendingWarnings=this.pendingWarnings||[]).push(e)}this.modules[t]=e};return e.type===`backend`&&t(`backend`),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&t(`languageDetector`),e.type===`i18nFormat`&&t(`i18nFormat`),e.type===`postProcessor`&&(Ro.addPostProcessor(e),this.services.ownPostProcessors?.add(e.name)),e.type===`formatter`&&t(`formatter`),e.type===`3rdParty`&&this.modules.external.push(e),this}hydrate(e,t){return this.options.isClone?this:this.services.resourceStore?(e&&!this.initializedStoreOnce&&(this.services.resourceStore.data=e,Object.values(e).forEach(e=>{Object.keys(e).forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)})}),this.initializedStoreOnce=!0,this.isInitialized=!0),t&&!this.initializedLanguageOnce&&(this.changeLanguage(t),this.initializedLanguageOnce=!0),this):(this.logger.warn(`hydrate: call init() first, the instance has no resource store yet`),this)}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=lo();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=B(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(B(t)?[t]:t);a&&this.logger.debug&&!fo(a)&&![].concat(this.options.supportedLngs||[],this.services.languageUtils.getFallbackCodes(this.options.fallbackLng,a),this.options.preload||[]).includes(a)&&!Object.prototype.hasOwnProperty.call(this.store.data,a)&&this.logger.once(`lng:${a}`,`deprecate`,`changeLanguage: the language code '${a.slice(0,64)}' comes from lng, changeLanguage() or the language detector and is not configured; from v27 such a code is refused unless it has only letters, digits, '-', '_', '@' and '.' (no '..'), at most 128 characters. Set supportedLngs, or check the code before passing it on`),a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};if(!e&&this.services.languageDetector&&!this.services.languageDetector.async)a(this.services.languageDetector.detect());else if(!e&&this.services.languageDetector&&this.services.languageDetector.async){let e=po(this.services.languageDetector);e===!1||e===void 0&&this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a)}else a(e);return n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Vo(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Vo(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Vo(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return B(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?this.translator.translate(...e):(this.logger.warn(`t: called before init(); returning an empty string`),``)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}if(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;let{languageUtils:o}=this.services,s=t.lng?o.isSupportedCode(n)&&o.toResolveHierarchy(n,!1)[0]:n;return!(s&&!a(s,e)||r&&!a(i,e))}loadNamespaces(e,t){let n=lo();return this.options.ns?(B(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=lo();B(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`ltr`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Wo(ns());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=is){let r=t.forkResourceStore;r&&(t={...t},delete t.forkResourceStore);let i={...this.options,preload:!1,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={...a.services.utils,hasLoadedNamespace:a.hasLoadedNamespace.bind(a),reloadResources:a.reloadResources.bind(a)},r){let e=t=>{let n=Array.isArray(t)?[...t]:{...t};return Object.keys(n).forEach(t=>{n[t]&&typeof n[t]==`object`&&(n[t]=e(n[t]))}),n};a.store=new Lo(e(this.store.data),i),a.services.resourceStore=a.store}if(t.interpolation){let e={...ns().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Yo(n)}return a.translator=new Uo(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.newestCloneHasLoadedNamespace=a.hasLoadedNamespace.bind(a),a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();V.createInstance,V.dir,V.init,V.loadResources,V.reloadResources,V.use,V.changeLanguage,V.getFixedT;var ss=V.t;V.exists,V.setDefaultNamespace,V.hasLoadedNamespace,V.loadNamespaces,V.loadLanguages;var cs=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);hs(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},ls={},us=(e,t,n,r)=>{hs(n)&&ls[n]||(hs(n)&&(ls[n]=new Date),cs(e,t,n,r))},ds=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},fs=(e,t,n)=>{e.loadNamespaces(t,ds(e,n))},ps=(e,t,n,r)=>{if(hs(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fs(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ds(e,r))},ms=(e,t,n={})=>!t.languages||!t.languages.length?(us(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),hs=e=>typeof e==`string`,gs=e=>typeof e==`object`&&!!e,_s=e=>{let t=e?.services?.i18nFormat;return typeof t?.parse==`function`?t:void 0},vs={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},ys=e=>{if(!e)return e;let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=hs(r)?r.replace(/[&<>"']/g,e=>vs[e]):r}),t},bs=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xs={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":`\xA0`," ":`\xA0`,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Ss=e=>xs[e],Cs=e=>e.replace(bs,Ss),ws={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:Cs,transDefaultProps:void 0},Ts=(e={})=>{ws={...ws,...e}},Es=()=>ws,Ds,Os=e=>{Ds=e},ks=()=>Ds,As={type:`3rdParty`,init(e){Ts(e.options.react),Os(e)}},js=(0,o.createContext)(),Ms=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Ns=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ps=t(((e,t)=>{t.exports=Ns()})),Fs=Ps(),Is={t:(e,t)=>{if(hs(t))return t;if(gs(t)&&hs(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Ls=()=>()=>{},Rs=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,o.useContext)(js)||{},a=n||r||ks();a&&!a.reportNamespaces&&(a.reportNamespaces=new Ms),a||us(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let s=(0,o.useMemo)(()=>({...Es(),...a?.options?.react,...t}),[a,t]),{useSuspense:c,keyPrefix:l,bindI18n:u,bindI18nStore:d}=s,f=e||i||a?.options?.defaultNS,p=hs(f)?[f]:f||[`translation`],m=JSON.stringify(p),h=(0,o.useMemo)(()=>p,[m]);a?.reportNamespaces?.addUsedNamespaces?.(h);let g=(0,o.useRef)(0),_=(0,o.useCallback)(e=>{if(!a)return Ls;let t=()=>{g.current+=1,e()};return u&&a.on(u,t),d&&a.store.on(d,t),()=>{u&&u.split(` `).forEach(e=>a.off(e,t)),d&&d.split(` `).forEach(e=>a.store.off(e,t))}},[a,u,d]),v=(0,o.useRef)(),y=(0,o.useCallback)(()=>{if(!a)return Is;let e=!!(a.isInitialized||a.initializedStoreOnce)&&h.every(e=>ms(e,a,s)),n=t.lng||a.language,r=g.current,i=typeof l==`function`?Vo(l,{...a.options,ns:h}):l,o=v.current;if(o&&o.i18n===a&&o.ready===e&&o.lng===n&&o.namespaces===h&&o.keyPrefix===i&&o.revision===r)return o;let c={t:a.getFixedT(n,s.nsMode===`fallback`?h:h[0],l,{scopeNs:h}),i18n:a,ready:e,lng:n,namespaces:h,keyPrefix:i,revision:r};return v.current=c,c},[a,h,l,s,t.lng]),[b,x]=(0,o.useState)(0),{t:S,ready:C}=(0,Fs.useSyncExternalStore)(_,y,y),w;a&&c&&!C&&(w=new Promise(e=>{let n=()=>e();t.lng?ps(a,t.lng,h,n):fs(a,h,n)}),{t:S,ready:C}=y()),(0,o.useEffect)(()=>{if(a&&!C&&!c){let e=()=>x(e=>e+1);t.lng?ps(a,t.lng,h,e):fs(a,h,e)}},[a,t.lng,h,C,c,b]);let T=a||{},E=(0,o.useRef)(null),D=(0,o.useRef)(),O=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,k=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},A=(0,o.useMemo)(()=>{let e=T,t=e&&O(e),n=e;e&&(E.current&&E.current.__original===e&&D.current===t?n=E.current:(n=k(e),E.current=n,D.current=t));let r=!C&&!c?(...e)=>(us(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),S(...e)):S,i=[r,n,C];return i.t=r,i.i18n=n,i.ready=C,i},[S,T,C,T.resolvedLanguage,T.language,T.languages]);if(a&&c&&!C){let e=!1;try{e=!1}catch{}throw e&&us(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),w}return A},zs=(...e)=>e.filter(Boolean).join(` `),Bs=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Vs(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Bs(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Hs=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Us=e=>{let t=Hs(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ws=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Gs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Ks(e){return e!=null}function qs(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Gs.width,a=e.size??e.height??Gs.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ws(...c):Ws(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Gs[`stroke-width`])*Number(e.size??e.width??Gs.width)/Number(t.size??t.width??Gs.width):t.strokeWidth??Gs[`stroke-width`];return[`svg`,{...Object.entries(Gs).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Ks(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Ks(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Ks(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Js(e,t={}){return qs(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ys=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Xs=(0,o.createContext)({}),Zs=()=>(0,o.useContext)(Xs),Qs=(0,o.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Zs()??{},b=!!l||Ys(f),[x,S,C=[]]=Js(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:s??_,className:Ws(y,c),hasA11yProp:b,attributes:f});return(0,o.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function $s(e,t=[],n=[]){let r=typeof e==`string`?Vs(e,t,n):e,i=(0,o.forwardRef)(({className:e,...t},n)=>(0,o.createElement)(Qs,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Us(r.name)),i}var ec=[`tomato`,`amber`,`lime`,`jade`,`teal`,`cobalt`,`iris`,`rose`,`slate`],tc=[`en`,`es`,`fr`,`pt`,`it`,`de`,`nl`,`ja`],nc={en:`English`,es:`Español`,fr:`Français`,pt:`Português`,it:`Italiano`,de:`Deutsch`,nl:`Nederlands`,ja:`日本語`},rc=e=>typeof e==`string`&&tc.includes(e);function ic(e,t){for(let n of e){let e=n.trim().toLowerCase().split(/[-_]/)[0],r=t.find(t=>t===e);if(r)return r}return null}var ac={en:[`To do`,`In progress`,`Done`],es:[`Por hacer`,`En curso`,`Hecho`],fr:[`À faire`,`En cours`,`Terminé`],pt:[`A fazer`,`Em andamento`,`Concluído`],it:[`Da fare`,`In corso`,`Fatto`],de:[`Offen`,`In Arbeit`,`Erledigt`],nl:[`Te doen`,`Bezig`,`Klaar`],ja:[`未着手`,`進行中`,`完了`]};function oc(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function sc(e,t=`|`){return e.map(e=>Mc(e)).join(t)}function cc(e,t){return typeof t==`bigint`?t.toString():t}var lc=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function uc(e){return new lc(e)}function dc(e){return e==null}function fc(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function pc(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function mc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function hc(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function gc(e){return hc(e._zod.def)??e._zod.def.shape}function _c(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return mc(this,t,e),e},enumerable:!0,configurable:!0})}function vc(e,t,n){t in e?mc(e,t,n):e[t]=n}function yc(e,t,n,r){let i=gc(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?_c(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):vc(e,a,r?r(n.value,a):n.value))}}function bc(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?_c(e,n,()=>t[n]):vc(e,n,r.value))}}function xc(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Sc(e){return JSON.stringify(e)}function Cc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var wc=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Tc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ec=uc(()=>{if(xl.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Dc(e){if(Tc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Tc(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Oc(e){return Dc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var kc=new Set([`string`,`number`,`symbol`]);function Ac(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function jc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function H(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Mc(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Nc(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Pc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Fc={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ic(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return yc(i,e,Lc(e,t)),jc(e,xc(n,{shape:i,checks:[]}))}function Lc(e,t){let n=gc(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Rc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Lc(e,t)),a={};return yc(a,e,Reflect.ownKeys(gc(e)).filter(e=>!i.has(e))),jc(e,xc(n,{shape:a,checks:[]}))}function zc(e,t){if(!Dc(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=gc(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return jc(e,xc(e._zod.def,{shape:Bc(e,t)}))}function Bc(e,t){let n={};return yc(n,e,Reflect.ownKeys(gc(e))),bc(n,t),n}function Vc(e,t){if(!Dc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return jc(e,xc(e._zod.def,{shape:Bc(e,t)}))}function Hc(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return yc(n,e,Reflect.ownKeys(gc(e))),yc(n,t,Reflect.ownKeys(gc(t))),jc(e,xc(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Uc(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Lc(t,n)):void 0,o={};return yc(o,t,Reflect.ownKeys(gc(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),jc(t,xc(t._zod.def,{shape:o,checks:[]}))}function Wc(e,t,n){let r=n?new Set(Lc(t,n)):void 0,i={};return yc(i,t,Reflect.ownKeys(gc(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),jc(t,xc(t._zod.def,{shape:i}))}function Gc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Kc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function qc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Jc(e){return typeof e==`string`?e:e?.message}function Yc(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Xc(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Zc(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Jc(e.inst?._zod.def?.error?.(e))??Jc(a?.(e))??Jc(t?.error?.(e))??Jc(n.customError?.(e))??Jc(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Qc=/[\uD800-\uDBFF]/;function $c(e){let t=e.length;if(!Qc.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function el(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function tl(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function nl(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function rl(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):sl(e,n,r.value)}}function il(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function al(e,t,n){return il(e,t,n,!1)}function ol(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return il(this,n,r(this))},set(e){il(this,n,e)}})}return t}function sl(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:il(this,t,n.bind(this))},set(e){il(this,t,e)}})}function cl(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ll,ul=!1,dl={configurable:!0,get(){ul=!0}};function U(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&ll!==e._zod?ll=void 0:(ll=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,dl);let e=ul;ul=!1;try{let r=n(this);return ul?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ul||=e,r}catch(n){throw delete this[t],ul||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function fl(e,t,n,r){let i=cl(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var pl=`~constantCatch`;function ml(e){let t=()=>e;return t[pl]=!0,t}var hl,gl={value:void 0,enumerable:!1},_l=`captureStackTrace`in Error?Error:null;function vl(e){let t=_l;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return _l=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function W(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){gl.value=new a(r);try{Object.defineProperty(n,"_zod",gl)}finally{gl.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),rl(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?vl(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var yl=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},bl=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(hl=globalThis).__zod_globalConfig??(hl.__zod_globalConfig={});var xl=globalThis.__zod_globalConfig;function Sl(e){return e&&Object.assign(xl,e),xl}function Cl(){let e=this._zod;return e.message??=JSON.stringify(e.def,cc,2),e.message}function wl(e){this._zod.message=e}var Tl={get:Cl,set:wl,enumerable:!0,configurable:!0},El={value:void 0,enumerable:!1},Dl=new WeakSet([Object.prototype,Error.prototype]),Ol=W(`$ZodError`,(e,t)=>{e.name=`$ZodError`,El.value=t,Object.defineProperty(e,"issues",El),El.value=void 0,Object.defineProperty(e,"message",Tl);let n=Object.getPrototypeOf(e);Dl.has(n)||(Dl.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function kl(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Al(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?kl(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function jl(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ml(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Nl=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new yl;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Zc(e,o,Sl())));throw wc(n,a?.callee??t),n}return s.value};return t},Pl=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Zc(e,o,Sl())));throw wc(n,a?.callee??t),n}return s.value};return t},Fl=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new yl;return a.issues.length?Il(e,a.issues,i):{success:!0,data:a.value}};function Il(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Zc(e,n,Sl()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ll=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Il(e,a.issues,i):{success:!0,data:a.value}},Rl=Symbol.for(`zod.compile.invalid`),zl=Symbol.for(`zod.compile.fallback`),Bl=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Rl)return!0;if(r.definite===!0&&n===void 0)return!1}return Vl(e,t,n)});function Vl(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[zl]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new yl;return a.issues.length===0}var Hl=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Ul=e=>{let t=Nl(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ml(n,a))};return n},Wl=e=>{let t=Nl(e),n=(e,r,i,a)=>t(e,r,i,Ml(n,a));return n},Gl=e=>{let t=Pl(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ml(n,a))};return n},Kl=e=>{let t=Pl(e),n=async(e,r,i,a)=>await t(e,r,i,Ml(n,a));return n},ql=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Fl(e)(t,n,i)},Jl=e=>(t,n,r)=>Fl(e)(t,n,r),Yl=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ll(e)(t,n,i)},Xl=e=>async(t,n,r)=>Ll(e)(t,n,r),Zl=/^[cC][0-9a-z]{6,}$/,Ql=/^[0-9a-z]+$/,$l=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,eu=/^[0-9a-vA-V]{20}$/,tu=/^[A-Za-z0-9]{27}$/,nu=/^[a-zA-Z0-9_-]{21}$/;function ru(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var iu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,au=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ou=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,su=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cu=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function lu(){return new RegExp(cu,`u`)}var uu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,du=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,fu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,pu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hu=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,gu=/^https?$/,_u=/^\+[1-9]\d{6,14}$/,vu=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function yu(e){return RegExp(`^${e}$`)}var bu=yu(vu);function xu(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Su(e){return RegExp(`^${xu(e)}$`)}function Cu(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${xu({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${xu({precision:e.precision})}`:n;return RegExp(`^${vu}T(?:${r})$`)}var wu=/^[\s\S]{0,}$/,Tu=/^-?\d+$/,Eu=/^-?\d+(?:\.\d+)?$/,Du=/^(?:true|false)$/i,Ou=/^[^A-Z]*$/,ku=/^[^a-z]*$/,Au=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ju=e=>{let t=e.value;return!dc(t)&&t.length!==void 0},Mu={number:`number`,bigint:`bigint`,object:`date`},Nu=W(`$ZodCheckLessThan`,(e,t)=>{Au.init(e,t);let n=Mu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Mu[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pu=W(`$ZodCheckGreaterThan`,(e,t)=>{Au.init(e,t);let n=Mu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Mu[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fu=W(`$ZodCheckMultipleOf`,(e,t)=>{Au.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):pc(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Iu=W(`$ZodCheckNumberFormat`,(e,t)=>{Au.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Pc[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Lu=W(`$ZodCheckMaxLength`,(e,t)=>{var n;Au.init(e,t),(n=e._zod.def).when??(n.when=ju),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?$c(r):i)<=t.maximum)return;let a=el(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ru=W(`$ZodCheckMinLength`,(e,t)=>{var n;Au.init(e,t),(n=e._zod.def).when??(n.when=ju),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?$c(r):i)>=t.minimum)return;let a=el(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zu=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;Au.init(e,t),(n=e._zod.def).when??(n.when=ju),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?$c(r):i;if(a===t.length)return;let o=el(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Bu=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Au.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Vu=W(`$ZodCheckRegex`,(e,t)=>{Bu.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Hu=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ou,Bu.init(e,t)}),Uu=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ku,Bu.init(e,t)}),Wu=W(`$ZodCheckIncludes`,(e,t)=>{Au.init(e,t);let n=Ac(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Gu=W(`$ZodCheckStartsWith`,(e,t)=>{Au.init(e,t);let n=RegExp(`^${Ac(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ku=W(`$ZodCheckEndsWith`,(e,t)=>{Au.init(e,t);let n=RegExp(`.*${Ac(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),qu=W(`$ZodCheckOverwrite`,(e,t)=>{Au.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ju=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
4
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=Si(),f;if(t){let e=typeof t==`string`?ut(t):t;L(l===`/`||e.pathname?.startsWith(l),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${l}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=d;let p=f.pathname||`/`,m=p;if(l!==`/`){let e=l.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):St(e,{pathname:m});R(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),R(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=Ri(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:$t([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:$t([l,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?o.createElement(fi.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Mi(){let e=Gi(),t=sn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=o.createElement(o.Fragment,null,o.createElement(`p`,null,`💿 Hey developer 👋`),o.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,o.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,o.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),o.createElement(o.Fragment,null,o.createElement(`h2`,null,`Unexpected Application Error!`),o.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?o.createElement(`pre`,{style:i},n):null,s)}var Ni=o.createElement(Mi,null),Pi=class extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=yi(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(pi.Provider,{value:this.props.routeContext},o.createElement(mi.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Ii,{error:e},t):t}};Pi.contextType=oi;var Fi=new WeakMap;function Ii({children:e,error:t}){let{basename:n,navigator:r}=o.useContext(di);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=vi(t.digest);if(e){let i=Fi.get(t);if(i)throw i;let a=un(e.location,n),s=a.absoluteURL||a.to;if(En(e.location,s,Cn(r),`allow-explicit`),br(s))throw Error(`Invalid redirect location`);if(ln&&!Fi.get(t)){if(a.isExternal||e.reloadDocument)window.location.href=s;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Fi.set(t,n),n}}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function Li({routeContext:e,match:t,children:n}){let r=o.useContext(ii);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(pi.Provider,{value:e},n)}function Ri(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);L(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let s=!1,c=-1;if(n&&r){s=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:a}=r,o=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||o){n.isStatic&&(s=!0),i=c>=0?i.slice(0,c+1):[i[0]];break}}}}let l=n?.onError,u=r&&l?(e,t)=>{l(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:cn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,l)=>{let d,f=!1,p=null,m=null;r&&(d=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||Ni,s&&(c<0&&l===0?(Ji(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):c===l&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,l+1)),g=()=>{let t;return t=d?p:f?m:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(Li,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o.createElement(Pi,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function zi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Bi(e){let t=o.useContext(ii);return L(t,zi(e)),t}function Vi(e){let t=o.useContext(ai);return L(t,zi(e)),t}function Hi(e){let t=o.useContext(pi);return L(t,zi(e)),t}function Ui(e){let t=Hi(e),n=t.matches[t.matches.length-1];return L(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Wi(){return Ui(`useRouteId`)}function Gi(){let e=o.useContext(mi),t=Vi(`useRouteError`),n=Ui(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Ki(){let{router:e}=Bi(`useNavigate`),t=Ui(`useNavigate`),n=o.useRef(!1);return wi(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{R(n.current,Ci),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var qi={};function Ji(e,t,n){!t&&!qi[e]&&(qi[e]=!0,R(!1,n))}var Yi={};function Xi(e,t){!e&&!Yi[t]&&(Yi[t]=!0,console.warn(t))}var Zi=o.useOptimistic,Qi=()=>void 0;function $i(e){return Zi?Zi(e):[e,Qi]}function ea(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&R(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:o.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&R(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:o.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&R(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:o.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var ta=[`HydrateFallback`,`hydrateFallbackElement`],na=class{constructor(){this.status=`pending`,this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function ra({router:e,flushSync:t,onError:n,useTransitions:r}){r=si()||r;let[i,a]=o.useState(e.state),[s,c]=$i(i),[l,u]=o.useState(),[d,f]=o.useState({isTransitioning:!1}),[p,m]=o.useState(),[h,g]=o.useState(),[_,v]=o.useState(),y=o.useRef(new Map),b=o.useCallback((i,{deletedFetchers:s,newErrors:l,flushSync:d,viewTransitionOpts:_})=>{l&&n&&Object.values(l).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:cn(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),Xi(d===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let b=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Xi(_==null||b,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!_||!b)t&&d?t(()=>a(i)):r===!1?a(i):o.startTransition(()=>{r===!0&&c(e=>ia(e,i)),a(i)});else if(t&&d){t(()=>{h&&(p?.resolve(),h.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:_.currentLocation,nextLocation:_.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})})}),t(()=>g(n))}else h?(p?.resolve(),h.skipTransition(),v({state:i,currentLocation:_.currentLocation,nextLocation:_.nextLocation})):(u(i),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}))},[e.window,t,h,p,r,c,n]);o.useLayoutEffect(()=>e.subscribe(b),[e,b]),o.useEffect(()=>{d.isTransitioning&&!d.flushSync&&m(new na)},[d]),o.useEffect(()=>{if(p&&l&&e.window){let t=l,n=p.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):o.startTransition(()=>{r===!0&&c(e=>ia(e,t)),a(t)}),await n});i.finished.finally(()=>{m(void 0),g(void 0),u(void 0),f({isTransitioning:!1})}),g(i)}},[l,p,e.window,r,c]),o.useEffect(()=>{p&&l&&s.location.key===l.location.key&&p.resolve()},[p,h,s.location,l]),o.useEffect(()=>{!d.isTransitioning&&_&&(u(_.state),f({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),v(void 0))},[d.isTransitioning,_]);let x=o.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),S=e.basename||`/`,C=o.useMemo(()=>({router:e,navigator:x,static:!1,basename:S,onError:n}),[e,x,S,n]);return o.createElement(o.Fragment,null,o.createElement(ii.Provider,{value:C},o.createElement(ai.Provider,{value:s},o.createElement(li.Provider,{value:y.current},o.createElement(ci.Provider,{value:d},o.createElement(la,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},o.createElement(aa,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function ia(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var aa=o.memo(oa);function oa({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return ji(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function sa({to:e,replace:t,state:n,relative:r}){L(xi(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=o.useContext(di);R(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:s}=o.useContext(pi),{pathname:c}=Si(),l=Ti(),u=Zt(e,Xt(s),c,r===`path`);En(typeof e==`string`?e:lt(e),a.createHref(u),Cn(a),`reject`);let d=JSON.stringify(u);return o.useEffect(()=>{l(JSON.parse(d),{replace:t,state:n,relative:r})},[l,d,r,t,n]),null}function ca(e){return Oi(e.context)}function la({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){L(!xi(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let c=e.replace(/^\/*/,`/`),l=o.useMemo(()=>({basename:c,navigator:i,static:a,useTransitions:s,future:{}}),[c,i,a,s]);typeof n==`string`&&(n=ut(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=o.useMemo(()=>{let e=Ut(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m,mask:h},navigationType:r}},[c,u,d,f,p,m,r,h]);return R(g!=null,`<Router basename="${c}"> is not able to match the URL "${u}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:o.createElement(di.Provider,{value:l},o.createElement(fi.Provider,{children:t,value:g}))}o.Component;var ua=`get`,da=`application/x-www-form-urlencoded`;function fa(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function pa(e){return fa(e)&&e.tagName.toLowerCase()===`button`}function ma(e){return fa(e)&&e.tagName.toLowerCase()===`form`}function ha(e){return fa(e)&&e.tagName.toLowerCase()===`input`}function ga(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function _a(e,t){return e.button===0&&(!t||t===`_self`)&&!ga(e)}function va(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ya(e,t){let n=va(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ba=null;function xa(){if(ba===null)try{new FormData(document.createElement(`form`),0),ba=!1}catch{ba=!0}return ba}var Sa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Ca(e){return e!=null&&!Sa.has(e)?(R(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${da}"`),null):e}function wa(e,t){let n,r,i,a,o;if(ma(e)){let o=e.getAttribute(`action`);r=o?Ut(o,t):null,n=e.getAttribute(`method`)||ua,i=Ca(e.getAttribute(`enctype`))||da,a=new FormData(e)}else if(pa(e)||ha(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?Ut(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||ua,i=Ca(e.getAttribute(`formenctype`))||Ca(o.getAttribute(`enctype`))||da,a=new FormData(o,e),!xa()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(fa(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=ua,r=null,i=da,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Ta(e,t){if(e===!1||e==null)throw Error(t)}function Ea(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&Ut(i.pathname,t)===`/`?`${en(t)}/_root.${r}`:`${en(i.pathname)}.${r}`,i}async function Da(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Oa(e){return e!=null&&typeof e.page==`string`}function ka(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Aa(e,t,n){return Fa((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Da(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(ka).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function ja(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function Ma(e,t,{includeHydrateFallback:n}={}){return Na(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Na(e){return[...new Set(e)]}function Pa(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Fa(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Oa(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Pa(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ia(){let e=o.useContext(ii);return Ta(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function La(){let e=o.useContext(ai);return Ta(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ra=o.createContext(void 0);Ra.displayName=`FrameworkContext`;function za(){let e=o.useContext(Ra);return Ta(e,`You must render this element inside a <HydratedRouter> element`),e}function Ba(e,t){let n=o.useContext(Ra),[r,i]=o.useState(!1),[a,s]=o.useState(!1),{onFocus:c,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:f}=t,p=o.useRef(null);o.useEffect(()=>{if(e===`render`&&s(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{s(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),o.useEffect(()=>{if(r){let e=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),s(!1)};return n?e===`intent`?[a,p,{onFocus:Va(c,m),onBlur:Va(l,h),onMouseEnter:Va(u,m),onMouseLeave:Va(d,h),onTouchStart:Va(f,m)}]:[a,p,{}]:[!1,p,{}]}function Va(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ha({page:e,...t}){let n=si(),{nonce:r}=za(),{router:i}=Ia(),a=o.useMemo(()=>St(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?o.createElement(Wa,{page:e,matches:a,...t}):o.createElement(Ga,{page:e,matches:a,...t})):null}function Ua(e){let{manifest:t,routeModules:n}=za(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Aa(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Wa({page:e,matches:t,...n}){let r=Si(),{future:i}=za(),{basename:a}=Ia(),s=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Ea(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return o.createElement(o.Fragment,null,s.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Ga({page:e,matches:t,...n}){let r=Si(),{future:i,manifest:a,routeModules:s}=za(),{basename:c}=Ia(),{loaderData:l,matches:u}=La(),d=o.useMemo(()=>ja(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>ja(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];t&&t.hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let u=Ea(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return o&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,s]),m=o.useMemo(()=>Ma(f,a),[f,a]),h=Ua(f);return o.createElement(o.Fragment,null,p.map(e=>o.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>o.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>o.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ka(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}o.Component;var qa=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{qa&&(window.__reactRouterVersion=`7.18.5`)}catch{}function Ja(e,t){return Wn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:at({window:t?.window}),hydrationData:t?.hydrationData||Ya(),routes:e,mapRouteProperties:ea,hydrationRouteProperties:ta,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ya(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Xa(e.errors)}),e}function Xa(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new on(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&an.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Za=o.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:g,navigator:_,useTransitions:v}=o.useContext(di),y=typeof u==`string`&&et.test(u),b=un(u,g);u=b.to;let x=bi(u,{relative:r}),S=Si(),C=null;if(s){let e=Zt(s,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:$t([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Ba(n,m),D=no(u,{replace:a,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:v});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=o.createElement(`a`,{...m,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ka(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?o.createElement(o.Fragment,null,A,o.createElement(Ha,{page:x})):A});Za.displayName=`Link`;var Qa=o.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:s,children:c,...l},u){let d=Ai(a,{relative:l.relative}),f=Si(),p=o.useContext(ai),{navigator:m,basename:h}=o.useContext(di),g=p!=null&&co(d)&&s===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=Ut(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return o.createElement(Za,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});Qa.displayName=`NavLink`;var $a=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=ua,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=o.useContext(di),_=oo(),v=so(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&et.test(c);return o.createElement(`form`,{ref:h,method:y,action:v,onSubmit:r?l:e=>{if(l&&l(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,c=r?.getAttribute(`formmethod`)||s,m=()=>_(r||e.currentTarget,{fetcherKey:t,method:c,navigate:n,replace:i,state:a,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p});g&&n!==!1?o.startTransition(()=>m()):m()},...m,"data-discover":!b&&e===`render`?`true`:void 0})});$a.displayName=`Form`;function eo(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function to(e){let t=o.useContext(ii);return L(t,eo(e)),t}function no(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Ti(),f=Si(),p=Ai(e,{relative:s});return o.useCallback(m=>{if(_a(m,t)){m.preventDefault();let t=n===void 0?lt(f)===lt(p):n,h=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l});u?o.startTransition(()=>h()):h()}},[f,d,p,n,r,i,t,e,a,s,c,l,u])}function ro(e){R(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=o.useRef(va(e)),n=o.useRef(!1),r=Si(),i=o.useMemo(()=>ya(r.search,n.current?null:t.current),[r.search]),a=Ti();return[i,o.useCallback((e,t)=>{let r=va(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var io=0,ao=()=>`__${String(++io)}__`;function oo(){let{router:e}=to(`useSubmit`),{basename:t}=o.useContext(di),n=Wi(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=wa(e,t);if(a.navigate===!1){let e=a.fetcherKey||ao();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function so(e,{relative:t}={}){let{basename:n}=o.useContext(di),r=o.useContext(pi);L(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ai(e||`.`,{relative:t})},s=Si();if(e==null){a.search=s.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:$t([n,a.pathname])),lt(a)}function co(e,{relative:t}={}){let n=o.useContext(ci);L(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=to(`useViewTransitionState`),i=Ai(e,{relative:t});if(!n.isTransitioning)return!1;let a=Ut(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Ut(n.nextLocation.pathname,r)||n.nextLocation.pathname;return zt(i.pathname,s)!=null||zt(i.pathname,a)!=null}var B=e=>typeof e==`string`,lo=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},uo=e=>e==null?``:String(e),fo=e=>B(e)&&/^[A-Za-z0-9_@.-]{1,128}$/.test(e)&&!e.includes(`..`)&&![`__proto__`,`constructor`,`prototype`].includes(e),po=e=>e?.callbackApi??e?.constructor?.callbackApi,mo=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},ho=/###/g,go=e=>e&&e.includes(`###`)?e.replace(ho,`.`):e,_o=e=>!e||B(e),vo=(e,t,n)=>{let r=B(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(_o(e))return{};let t=go(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return _o(e)?{}:{obj:e,k:go(r[i])}},yo=(e,t,n)=>{let{obj:r,k:i}=vo(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=vo(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=vo(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},bo=(e,t,n,r)=>{let{obj:i,k:a}=vo(e,t,Object);i[a]=i[a]||[],i[a].push(n)},xo=(e,t)=>{let{obj:n,k:r}=vo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},So=(e,t,n)=>{let r=xo(e,n);return r===void 0?xo(t,n):r},Co=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?B(e[r])||e[r]instanceof String||B(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Co(e[r],t[r],n):e[r]=t[r]);return e},wo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),To={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Eo=e=>B(e)?e.replace(/[&<>"'\/]/g,e=>To[e]):e,Do=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Oo=[` `,`,`,`?`,`!`,`;`],ko=new Do(20),Ao=(e,t,n)=>{t||=``,n||=``;let r=Oo.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=ko.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},jo=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],typeof t!=`function`&&a!==`__proto__`||Object.prototype.hasOwnProperty.call(i,a)||(t=void 0),t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Mo=e=>e?.replace(/_/g,`-`),No={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Po=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||No,this.options=t,this.debug=t.debug,this.seen=new Set}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}once(e,t,...n){return!this.debug||this.seen.has(e)||this.seen.size>=1e3?null:(this.seen.add(e),this[t](...n))}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>B(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),B(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Fo=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){(typeof e==`string`?e.split(` `):[e]).forEach(e=>{this.observers[e]&&(t?this.observers[e].delete(t):delete this.observers[e])})}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Io=new WeakSet,Lo=class extends Fo{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.logger=Po.create(`resourceStore`),this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}deprecateDottedLng(e){this.logger.once(e,`deprecate`,`${e}: a dotted language ('en.translation.key') that carries the namespace and key is removed in v27; pass language, namespace and key as separate arguments`)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?(this.deprecateDottedLng(`getResource`),o=e.split(`.`)):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):B(n)&&i?o.push(...n.split(i)):o.push(n)));let s=xo(this.data,o);return s==null&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s!=null||!a||!B(n)?s:jo(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(this.deprecateDottedLng(`addResource`),o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),yo(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(B(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(this.deprecateDottedLng(`addResourceBundle`),o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=xo(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Co(s,n,i):s={...s,...n},yo(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>{let n=t[e];return Io.has(n)?!0:!n||Object.keys(n).length===0?!1:(typeof n==`object`&&Io.add(n),!0)})}toJSON(){return this.data}},Ro={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},zo=Symbol(`i18next/PATH_KEY`);function Bo(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===zo?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Vo(e,t){let{[zo]:n}=e(Bo()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var Ho=e=>!B(e)&&typeof e!=`boolean`&&typeof e!=`number`,Uo=class e extends Fo{constructor(e,t={}){super(),mo([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`,`ownPostProcessors`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Po.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=Ho(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ao(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:B(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:B(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=Vo(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Vo(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!B(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=Ho(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(B(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||(this.logger.warn(`accessing an object - but returnObjects options is not enabled!`),this.logger.once(`returnedObject`,`deprecate`,`accessing an object without returnObjects returns a sentence about it today; from v27 t() returns the key, as for a missing key (returnedObjectHandler can keep today's text)`));let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;t[e]=x&&!m?this.translate(r,{...i,defaultValue:Ho(T)?T[e]:void 0,joinArrays:!1,ns:c}):this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&B(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,p,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i,void 0,this.utils?.hasLoadedNamespace),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=B(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!B(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=B(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(o.forEach(e=>{this.logger.debug&&Ro.processors[e]&&this.ownPostProcessors&&!this.ownPostProcessors.has(e)&&this.logger.once(e,`deprecate`,`postProcess: '${e}' was registered with use() on another i18next instance; from v27 post-processors are per instance, so call use() with it on this instance too`)}),e=Ro.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return B(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Vo(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!B(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(B(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!B(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r={...r,count:e.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},Wo=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Po.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Mo(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Mo(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(B(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}let t=this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e;return this.logger.debug&&B(e)&&this.deprecateBareCode(e,t),t}deprecateBareCode(e,t){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{return}let r=n.toLowerCase()===e.toLowerCase()?n:e.toLowerCase();this.options.lowerCaseLng&&(r=r.toLowerCase()),r!==t&&this.logger.once(e,`deprecate`,`language code '${e}' is used as '${t}'; i18next v27 gives it the canonical casing '${r}', use '${r}' in lng, fallbackLng, supportedLngs and the resources`)}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!(!e.includes(`-`)||r.includes(`-`)||e.slice(0,e.indexOf(`-`))!==r))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),B(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.options.fallbackLng,r=Array.isArray(n)?n.join(`|`):n;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);let i=t===void 0||t===!1||B(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=B(e)&&i&&!a,s=null;if(o){let n;n=t===void 0?`undefined`:t===!1?`boolean:false`:`string:${t}`,s=`${e.length}:${e}|${n}`}if(s!==null){let e=this.resolveHierarchyCache[s];if(e!==void 0)return e.slice()}let c=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),l=[],u=e=>{e&&(this.isSupportedCode(e)?l.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return B(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&u(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&u(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&u(this.getLanguagePartFromCode(e))):B(e)&&u(this.formatLanguageCode(e)),c.forEach(e=>{let t=this.formatLanguageCode(e);l.includes(t)||u(t)}),s===null?l:(this.resolveHierarchyCache[s]=l,l.slice())}},Go={zero:0,one:1,two:2,few:3,many:4,other:5},Ko={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},qo=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Po.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Mo(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),Ko;if(!e.match(/-|_/))return Ko;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>Go[e]-Go[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},Jo=(e,t,n,r=`.`,i=!0)=>{let a=So(e,t,n);return a==null&&i&&B(n)&&(a=jo(e,n,r),a===void 0&&(a=jo(t,n,r))),a},Yo=class{constructor(e={}){this.logger=Po.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;if(a||s||f||m){let e=Object.entries({prefixEscaped:a,suffixEscaped:s,nestingPrefixEscaped:f,nestingSuffixEscaped:m}).filter(([,e])=>e).map(([e])=>e);this.logger.once(e.join(),`deprecate`,`interpolation.${e.join(`, interpolation.`)}: the regex-escaped delimiter options are removed in v27; pass the literal delimiters as prefix, suffix, nestingPrefix and nestingSuffix`)}this.escape=t===void 0?Eo:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?wo(i):a||`{{`,this.suffix=o?wo(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?wo(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?wo(l):``,this.nestingPrefix=d?wo(d):f||wo(`$t(`),this.nestingSuffix=p?wo(p):m||wo(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_!==void 0&&_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=e,c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(!e.includes(this.formatSeparator)){let i=Jo(t,c,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(Jo(t,c,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,d=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables,f=[{regex:this.regexpUnescape,safeValue:e=>e},{regex:this.regexp,safeValue:e=>this.escapeValue?(this.escape===Eo&&this.options?.interpolation?.escapeValue!==!1&&B(e)&&e.includes(`/`)&&this.logger.once(`/`,`deprecate`,`escapeValue renders '/' in a value as '/' today; from v27 the default escape leaves '/' as it is`),this.escape(e)):e}],p=[],m=0;return f.forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i.index-m,c=p.find(([e,t])=>n>=e&&n<t);if(c){t.regex.lastIndex=c[1]+m;continue}let f=i[1].trim();if(a=l(f),a===void 0){if(typeof u==`function`){let t=u(e,i,r);a=B(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,f))a=``;else if(d){this.logger.debug&&this.logger.once(`${s}\u0000${i[0]}`,`warn`,`missed to pass in variable ${f} for interpolating ${s}`),a=i[0];continue}else this.logger.warn(`missed to pass in variable ${f} for interpolating ${e}`),a=``}else!B(a)&&!this.useRawValueToEscape&&(a=uo(a));let h=uo(t.safeValue(a));if(e=e.slice(0,i.index)+h+e.slice(i.index+i[0].length),d?(t.regex===this.regexpUnescape?p.push([i.index,i.index+h.length]):m+=h.length-i[0].length,t.regex.lastIndex+=h.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${wo(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e},s=new RegExp(this.nestingRegexp),c=``,l=0;for(;r=s.exec(e);){let u=[];a={...n},a=a.replace&&!B(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let d=/{.*}/s.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(d!==-1&&(u=r[1].slice(d).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,d)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!B(i))return i;B(i)||(i=uo(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),u.length&&(i=u.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),c+=e.slice(l,r.index)+uo(i),l=s.lastIndex,this.regexp.lastIndex=0}return l?c+e.slice(l):e}},Xo=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},Zo=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o;try{o=r+JSON.stringify(a)}catch{return e(Mo(r),i)(n)}let s=t[o];return s||(s=e(Mo(r),i),t[o]=s),s(n)}},Qo=e=>(t,n,r)=>e(Mo(n),r)(t),$o=class{constructor(e={}){this.logger=Po.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?Zo:Qo;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Zo(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator),a=[];for(let e=0;e<i.length;e++){let t=i[e];for(;t.indexOf(`(`)>-1&&!t.includes(`)`)&&e+1<i.length;)t=`${t}${this.formatSeparator}${i[++e]}`;a.push(t)}return a.reduce((e,t)=>{let{formatName:i,formatOptions:a}=Xo(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${i}`),e},e)}},es=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ts=class extends Fo{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Po.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r),this.callbackApi=po(this.backend),this.backend&&this.callbackApi===void 0&&(this.backend.read||this.backend.create)&&this.logger.deprecate(`backend: set callbackApi to declare the calling convention (true: read(language, namespace, callback) and create(languages, namespace, key, fallbackValue, callback, options); false: both return a promise or a value); guessing it from the number of parameters is deprecated`)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:!n.reload&&this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{bo(n.loaded,[i],a),es(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}o&&s&&r<this.maxRetries?setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i):a(o,s)},s=this.backend[n].bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&s.length===2)try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}else return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();B(e)&&(e=this.languageUtils.toResolveHierarchy(e)),B(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}noticeDevFallback(e){e===`dev`&&this.devIsDefaultFallback&&this.logger.once(`dev`,`warn`,`language 'dev' is requested because fallbackLng is not set (its default is ['dev']); i18next v27 defaults to fallbackLng: false and loads and saves missing keys in the requested language instead. Set fallbackLng to your source language, or to 'dev' to keep this behavior`)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.noticeDevFallback(r),this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{},s=this.newestCloneHasLoadedNamespace||this.services?.utils?.hasLoadedNamespace){if(s&&!s(t))this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);else if(n!=null&&n!==``){if(this.backend?.create){e?.forEach?.(e=>this.noticeDevFallback(e));let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(this.callbackApi===!1||this.callbackApi===void 0&&c.length<6)try{let i;i=this.callbackApi===!1||c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}},ns=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),B(e[1])&&(t.defaultValue=e[1]),B(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),rs=e=>(B(e.ns)&&(e.ns=[e.ns]),B(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),B(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),is=()=>{},as,os=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},V=class e extends Fo{constructor(e={},t){if(super(),this.options=rs(e),this.services={ownPostProcessors:new Set},this.logger=Po,this.modules={external:[]},os(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(B(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=e.fallbackLng===void 0&&this.options.fallbackLng===void 0,r=ns();this.options={...r,...this.options,...rs(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);let i=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){as&&as!==this&&as.modules.logger!==this.modules.logger&&Po.deprecate(`init: this init() replaces the logger another i18next instance set with use(), as the logger is shared in v26; from v27 each instance keeps its own logger`),as=this.modules.logger?this:void 0,this.modules.logger?Po.init(i(this.modules.logger),this.options):Po.init(null,this.options),this.pendingWarnings?.forEach(e=>this.logger.warn(e)),this.pendingWarnings=void 0;let e;e=this.modules.formatter?this.modules.formatter:$o;let t=new Wo(this.options);this.store=new Lo(this.options.resources,this.options);let r=this.services;r.logger=Po,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new qo(t,{prepend:this.options.pluralSeparator}),e&&(r.formatter=i(e),r.formatter.init&&r.formatter.init(r,this.options),this.options.interpolation.format=r.formatter.format.bind(r.formatter)),r.interpolator=new Yo(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this),reloadResources:this.reloadResources.bind(this)},r.backendConnector=new ts(i(this.modules.backend),r.resourceStore,r,this.options),r.backendConnector.devIsDefaultFallback=n,r.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(r.languageDetector=i(this.modules.languageDetector),r.languageDetector.init&&r.languageDetector.init(r,this.options.detection,this.options),r.languageDetector.async&&po(r.languageDetector)===void 0&&this.logger.deprecate(`languageDetector: set callbackApi to declare how the async detect() answers (true: detect(callback); false: detect() returns a promise); guessing it from the number of parameters is deprecated`)),this.modules.i18nFormat&&(r.i18nFormat=i(this.modules.i18nFormat),r.i18nFormat.init&&r.i18nFormat.init(this)),this.translator=new Uo(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=is,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=lo(),o=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),a.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=is){let n=t,r=B(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=lo();if(typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),!e){let t=Object.keys(this.services.backendConnector.state).map(e=>e.split(`|`)[0]);e=[...new Set([...this.languages||[],...t])].filter(e=>e!==`cimode`)}return t||=this.options.ns,n||=is,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);let t=t=>{if(this.modules[t]&&this.modules[t]!==e){let e=`use: this ${t} replaces the ${t} passed to an earlier use() call; only one ${t} is used per instance`;this.isInitializing||this.isInitialized?this.logger.warn(e):(this.pendingWarnings=this.pendingWarnings||[]).push(e)}this.modules[t]=e};return e.type===`backend`&&t(`backend`),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&t(`languageDetector`),e.type===`i18nFormat`&&t(`i18nFormat`),e.type===`postProcessor`&&(Ro.addPostProcessor(e),this.services.ownPostProcessors?.add(e.name)),e.type===`formatter`&&t(`formatter`),e.type===`3rdParty`&&this.modules.external.push(e),this}hydrate(e,t){return this.options.isClone?this:this.services.resourceStore?(e&&!this.initializedStoreOnce&&(this.services.resourceStore.data=e,Object.values(e).forEach(e=>{Object.keys(e).forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)})}),this.initializedStoreOnce=!0,this.isInitialized=!0),t&&!this.initializedLanguageOnce&&(this.changeLanguage(t),this.initializedLanguageOnce=!0),this):(this.logger.warn(`hydrate: call init() first, the instance has no resource store yet`),this)}setResolvedLanguage(e){if(e&&this.languages&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=lo();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=B(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(B(t)?[t]:t);a&&this.logger.debug&&!fo(a)&&![].concat(this.options.supportedLngs||[],this.services.languageUtils.getFallbackCodes(this.options.fallbackLng,a),this.options.preload||[]).includes(a)&&!Object.prototype.hasOwnProperty.call(this.store.data,a)&&this.logger.once(`lng:${a}`,`deprecate`,`changeLanguage: the language code '${a.slice(0,64)}' comes from lng, changeLanguage() or the language detector and is not configured; from v27 such a code is refused unless it has only letters, digits, '-', '_', '@' and '.' (no '..'), at most 128 characters. Set supportedLngs, or check the code before passing it on`),a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};if(!e&&this.services.languageDetector&&!this.services.languageDetector.async)a(this.services.languageDetector.detect());else if(!e&&this.services.languageDetector&&this.services.languageDetector.async){let e=po(this.services.languageDetector);e===!1||e===void 0&&this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a)}else a(e);return n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=Vo(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Vo(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Vo(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return B(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?this.translator.translate(...e):(this.logger.warn(`t: called before init(); returning an empty string`),``)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}if(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages)return!0;let{languageUtils:o}=this.services,s=t.lng?o.isSupportedCode(n)&&o.toResolveHierarchy(n,!1)[0]:n;return!(s&&!a(s,e)||r&&!a(i,e))}loadNamespaces(e,t){let n=lo();return this.options.ns?(B(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=lo();B(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`ltr`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new Wo(ns());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=is){let r=t.forkResourceStore;r&&(t={...t},delete t.forkResourceStore);let i={...this.options,preload:!1,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={...a.services.utils,hasLoadedNamespace:a.hasLoadedNamespace.bind(a),reloadResources:a.reloadResources.bind(a)},r){let e=t=>{let n=Array.isArray(t)?[...t]:{...t};return Object.keys(n).forEach(t=>{n[t]&&typeof n[t]==`object`&&(n[t]=e(n[t]))}),n};a.store=new Lo(e(this.store.data),i),a.services.resourceStore=a.store}if(t.interpolation){let e={...ns().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new Yo(n)}return a.translator=new Uo(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.newestCloneHasLoadedNamespace=a.hasLoadedNamespace.bind(a),a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();V.createInstance,V.dir,V.init,V.loadResources,V.reloadResources,V.use,V.changeLanguage,V.getFixedT;var ss=V.t;V.exists,V.setDefaultNamespace,V.hasLoadedNamespace,V.loadNamespaces,V.loadLanguages;var cs=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);hs(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},ls={},us=(e,t,n,r)=>{hs(n)&&ls[n]||(hs(n)&&(ls[n]=new Date),cs(e,t,n,r))},ds=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},fs=(e,t,n)=>{e.loadNamespaces(t,ds(e,n))},ps=(e,t,n,r)=>{if(hs(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return fs(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ds(e,r))},ms=(e,t,n={})=>!t.languages||!t.languages.length?(us(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),hs=e=>typeof e==`string`,gs=e=>typeof e==`object`&&!!e,_s=e=>{let t=e?.services?.i18nFormat;return typeof t?.parse==`function`?t:void 0},vs={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},ys=e=>{if(!e)return e;let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=hs(r)?r.replace(/[&<>"']/g,e=>vs[e]):r}),t},bs=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,xs={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":`\xA0`," ":`\xA0`,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Ss=e=>xs[e],Cs=e=>e.replace(bs,Ss),ws={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:Cs,transDefaultProps:void 0},Ts=(e={})=>{ws={...ws,...e}},Es=()=>ws,Ds,Os=e=>{Ds=e},ks=()=>Ds,As={type:`3rdParty`,init(e){Ts(e.options.react),Os(e)}},js=(0,o.createContext)(),Ms=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Ns=t((e=>{var t=r();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:n,a=t.useState,o=t.useEffect,s=t.useLayoutEffect,c=t.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Ps=t(((e,t)=>{t.exports=Ns()})),Fs=Ps(),Is={t:(e,t)=>{if(hs(t))return t;if(gs(t)&&hs(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Ls=()=>()=>{},Rs=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,o.useContext)(js)||{},a=n||r||ks();a&&!a.reportNamespaces&&(a.reportNamespaces=new Ms),a||us(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.`);let s=(0,o.useMemo)(()=>({...Es(),...a?.options?.react,...t}),[a,t]),{useSuspense:c,keyPrefix:l,bindI18n:u,bindI18nStore:d}=s,f=e||i||a?.options?.defaultNS,p=hs(f)?[f]:f||[`translation`],m=JSON.stringify(p),h=(0,o.useMemo)(()=>p,[m]);a?.reportNamespaces?.addUsedNamespaces?.(h);let g=(0,o.useRef)(0),_=(0,o.useCallback)(e=>{if(!a)return Ls;let t=()=>{g.current+=1,e()};return u&&a.on(u,t),d&&a.store.on(d,t),()=>{u&&u.split(` `).forEach(e=>a.off(e,t)),d&&d.split(` `).forEach(e=>a.store.off(e,t))}},[a,u,d]),v=(0,o.useRef)(),y=(0,o.useCallback)(()=>{if(!a)return Is;let e=!!(a.isInitialized||a.initializedStoreOnce)&&h.every(e=>ms(e,a,s)),n=t.lng||a.language,r=g.current,i=typeof l==`function`?Vo(l,{...a.options,ns:h}):l,o=v.current;if(o&&o.i18n===a&&o.ready===e&&o.lng===n&&o.namespaces===h&&o.keyPrefix===i&&o.revision===r)return o;let c={t:a.getFixedT(n,s.nsMode===`fallback`?h:h[0],l,{scopeNs:h}),i18n:a,ready:e,lng:n,namespaces:h,keyPrefix:i,revision:r};return v.current=c,c},[a,h,l,s,t.lng]),[b,x]=(0,o.useState)(0),{t:S,ready:C}=(0,Fs.useSyncExternalStore)(_,y,y),w;a&&c&&!C&&(w=new Promise(e=>{let n=()=>e();t.lng?ps(a,t.lng,h,n):fs(a,h,n)}),{t:S,ready:C}=y()),(0,o.useEffect)(()=>{if(a&&!C&&!c){let e=()=>x(e=>e+1);t.lng?ps(a,t.lng,h,e):fs(a,h,e)}},[a,t.lng,h,C,c,b]);let T=a||{},E=(0,o.useRef)(null),D=(0,o.useRef)(),O=e=>`${e.language}|${e.resolvedLanguage}|${e.languages?.join(`,`)}`,k=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},A=(0,o.useMemo)(()=>{let e=T,t=e&&O(e),n=e;e&&(E.current&&E.current.__original===e&&D.current===t?n=E.current:(n=k(e),E.current=n,D.current=t));let r=!C&&!c?(...e)=>(us(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),S(...e)):S,i=[r,n,C];return i.t=r,i.i18n=n,i.ready=C,i},[S,T,C,T.resolvedLanguage,T.language,T.languages]);if(a&&c&&!C){let e=!1;try{e=!1}catch{}throw e&&us(a,`SUSPENDED_WHILE_LOADING`,`useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook`),w}return A},zs=(...e)=>e.filter(Boolean).join(` `),Bs=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Vs(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Bs(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Hs=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Us=e=>{let t=Hs(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ws=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Gs={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Ks(e){return e!=null}function qs(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Gs.width,a=e.size??e.height??Gs.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ws(...c):Ws(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Gs[`stroke-width`])*Number(e.size??e.width??Gs.width)/Number(t.size??t.width??Gs.width):t.strokeWidth??Gs[`stroke-width`];return[`svg`,{...Object.entries(Gs).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Ks(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Ks(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Ks(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function Js(e,t={}){return qs(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ys=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Xs=(0,o.createContext)({}),Zs=()=>(0,o.useContext)(Xs),Qs=(0,o.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:s,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=Zs()??{},b=!!l||Ys(f),[x,S,C=[]]=Js(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:s??_,className:Ws(y,c),hasA11yProp:b,attributes:f});return(0,o.createElement)(x,{ref:p,...S},[...C.map(([e,t])=>(0,o.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function $s(e,t=[],n=[]){let r=typeof e==`string`?Vs(e,t,n):e,i=(0,o.forwardRef)(({className:e,...t},n)=>(0,o.createElement)(Qs,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Us(r.name)),i}var ec=[`tomato`,`amber`,`lime`,`jade`,`teal`,`cobalt`,`iris`,`rose`,`slate`],tc=[`en`,`es`,`fr`,`pt`,`it`,`de`,`nl`,`ja`],nc={en:`English`,es:`Español`,fr:`Français`,pt:`Português`,it:`Italiano`,de:`Deutsch`,nl:`Nederlands`,ja:`日本語`},rc=e=>typeof e==`string`&&tc.includes(e);function ic(e,t){for(let n of e){let e=n.trim().toLowerCase().split(/[-_]/)[0],r=t.find(t=>t===e);if(r)return r}return null}var ac={en:[`To do`,`In progress`,`Done`],es:[`Por hacer`,`En curso`,`Hecho`],fr:[`À faire`,`En cours`,`Terminé`],pt:[`A fazer`,`Em andamento`,`Concluído`],it:[`Da fare`,`In corso`,`Fatto`],de:[`Offen`,`In Arbeit`,`Erledigt`],nl:[`Te doen`,`Bezig`,`Klaar`],ja:[`未着手`,`進行中`,`完了`]};function oc(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function sc(e,t=`|`){return e.map(e=>Mc(e)).join(t)}function cc(e,t){return typeof t==`bigint`?t.toString():t}var lc=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function uc(e){return new lc(e)}function dc(e){return e==null}function fc(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function pc(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}function mc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function hc(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function gc(e){return hc(e._zod.def)??e._zod.def.shape}function _c(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return mc(this,t,e),e},enumerable:!0,configurable:!0})}function vc(e,t,n){t in e?mc(e,t,n):e[t]=n}function yc(e,t,n,r){let i=gc(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?_c(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):vc(e,a,r?r(n.value,a):n.value))}}function bc(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?_c(e,n,()=>t[n]):vc(e,n,r.value))}}function xc(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Sc(e){return JSON.stringify(e)}function Cc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var wc=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Tc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Ec=uc(()=>{if(xl.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Dc(e){if(Tc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Tc(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Oc(e){return Dc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var kc=new Set([`string`,`number`,`symbol`]);function Ac(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function jc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function H(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Mc(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Nc(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Pc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Fc={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ic(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return yc(i,e,Lc(e,t)),jc(e,xc(n,{shape:i,checks:[]}))}function Lc(e,t){let n=gc(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Rc(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Lc(e,t)),a={};return yc(a,e,Reflect.ownKeys(gc(e)).filter(e=>!i.has(e))),jc(e,xc(n,{shape:a,checks:[]}))}function zc(e,t){if(!Dc(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=gc(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return jc(e,xc(e._zod.def,{shape:Bc(e,t)}))}function Bc(e,t){let n={};return yc(n,e,Reflect.ownKeys(gc(e))),bc(n,t),n}function Vc(e,t){if(!Dc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return jc(e,xc(e._zod.def,{shape:Bc(e,t)}))}function Hc(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return yc(n,e,Reflect.ownKeys(gc(e))),yc(n,t,Reflect.ownKeys(gc(t))),jc(e,xc(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Uc(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Lc(t,n)):void 0,o={};return yc(o,t,Reflect.ownKeys(gc(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),jc(t,xc(t._zod.def,{shape:o,checks:[]}))}function Wc(e,t,n){let r=n?new Set(Lc(t,n)):void 0,i={};return yc(i,t,Reflect.ownKeys(gc(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),jc(t,xc(t._zod.def,{shape:i}))}function Gc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Kc(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function qc(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Jc(e){return typeof e==`string`?e:e?.message}function Yc(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Xc(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Zc(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Jc(e.inst?._zod.def?.error?.(e))??Jc(a?.(e))??Jc(t?.error?.(e))??Jc(n.customError?.(e))??Jc(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t!==`inst`&&t!==`schema`&&t!==`continue`&&t!==`input`&&t!==`__proto__`&&(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Qc=/[\uD800-\uDBFF]/;function $c(e){let t=e.length;if(!Qc.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function el(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function tl(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function nl(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function rl(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):sl(e,n,r.value)}}function il(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function al(e,t,n){return il(e,t,n,!1)}function ol(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return il(this,n,r(this))},set(e){il(this,n,e)}})}return t}function sl(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:il(this,t,n.bind(this))},set(e){il(this,t,e)}})}function cl(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ll,ul=!1,dl={configurable:!0,get(){ul=!0}};function U(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&ll!==e._zod?ll=void 0:(ll=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,dl);let e=ul;ul=!1;try{let r=n(this);return ul?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),ul||=e,r}catch(n){throw delete this[t],ul||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function fl(e,t,n,r){let i=cl(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var pl=`~constantCatch`;function ml(e){let t=()=>e;return t[pl]=!0,t}var hl,gl={value:void 0,enumerable:!1},_l=`captureStackTrace`in Error?Error:null;function vl(e){let t=_l;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return _l=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function W(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){gl.value=new a(r);try{Object.defineProperty(n,"_zod",gl)}finally{gl.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),rl(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?vl(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var yl=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},bl=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(hl=globalThis).__zod_globalConfig??(hl.__zod_globalConfig={});var xl=globalThis.__zod_globalConfig;function Sl(e){return e&&Object.assign(xl,e),xl}function Cl(){let e=this._zod;return e.message??=JSON.stringify(e.def,cc,2),e.message}function wl(e){this._zod.message=e}var Tl={get:Cl,set:wl,enumerable:!0,configurable:!0},El={value:void 0,enumerable:!1},Dl=new WeakSet([Object.prototype,Error.prototype]),Ol=W(`$ZodError`,(e,t)=>{e.name=`$ZodError`,El.value=t,Object.defineProperty(e,"issues",El),El.value=void 0,Object.defineProperty(e,"message",Tl);let n=Object.getPrototypeOf(e);Dl.has(n)||(Dl.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))});function kl(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Al(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?kl(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function jl(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function Ml(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Nl=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new yl;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Zc(e,o,Sl())));throw wc(n,a?.callee??t),n}return s.value};return t},Pl=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Zc(e,o,Sl())));throw wc(n,a?.callee??t),n}return s.value};return t},Fl=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new yl;return a.issues.length?Il(e,a.issues,i):{success:!0,data:a.value}};function Il(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Zc(e,n,Sl()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ll=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Il(e,a.issues,i):{success:!0,data:a.value}},Rl=Symbol.for(`zod.compile.invalid`),zl=Symbol.for(`zod.compile.fallback`),Bl=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Rl)return!0;if(r.definite===!0&&n===void 0)return!1}return Vl(e,t,n)});function Vl(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[zl]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new yl;return a.issues.length===0}var Hl=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Ul=e=>{let t=Nl(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ml(n,a))};return n},Wl=e=>{let t=Nl(e),n=(e,r,i,a)=>t(e,r,i,Ml(n,a));return n},Gl=e=>{let t=Pl(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ml(n,a))};return n},Kl=e=>{let t=Pl(e),n=async(e,r,i,a)=>await t(e,r,i,Ml(n,a));return n},ql=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Fl(e)(t,n,i)},Jl=e=>(t,n,r)=>Fl(e)(t,n,r),Yl=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ll(e)(t,n,i)},Xl=e=>async(t,n,r)=>Ll(e)(t,n,r),Zl=/^[cC][0-9a-z]{6,}$/,Ql=/^[0-9a-z]+$/,$l=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,eu=/^[0-9a-vA-V]{20}$/,tu=/^[A-Za-z0-9]{27}$/,nu=/^[a-zA-Z0-9_-]{21}$/;function ru(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var iu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,au=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ou=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,su=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,cu=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function lu(){return new RegExp(cu,`u`)}var uu=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,du=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,fu=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,pu=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,mu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,hu=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,gu=/^https?$/,_u=/^\+[1-9]\d{6,14}$/,vu=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;function yu(e){return RegExp(`^${e}$`)}var bu=yu(vu);function xu(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Su(e){return RegExp(`^${xu(e)}$`)}function Cu(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${xu({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${xu({precision:e.precision})}`:n;return RegExp(`^${vu}T(?:${r})$`)}var wu=/^[\s\S]{0,}$/,Tu=/^-?\d+$/,Eu=/^-?\d+(?:\.\d+)?$/,Du=/^(?:true|false)$/i,Ou=/^[^A-Z]*$/,ku=/^[^a-z]*$/,Au=W(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ju=e=>{let t=e.value;return!dc(t)&&t.length!==void 0},Mu={number:`number`,bigint:`bigint`,object:`date`},Nu=W(`$ZodCheckLessThan`,(e,t)=>{Au.init(e,t);let n=Mu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Mu[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Pu=W(`$ZodCheckGreaterThan`,(e,t)=>{Au.init(e,t);let n=Mu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Mu[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fu=W(`$ZodCheckMultipleOf`,(e,t)=>{Au.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):pc(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Iu=W(`$ZodCheckNumberFormat`,(e,t)=>{Au.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Pc[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Lu=W(`$ZodCheckMaxLength`,(e,t)=>{var n;Au.init(e,t),(n=e._zod.def).when??(n.when=ju),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?$c(r):i)<=t.maximum)return;let a=el(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ru=W(`$ZodCheckMinLength`,(e,t)=>{var n;Au.init(e,t),(n=e._zod.def).when??(n.when=ju),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?$c(r):i)>=t.minimum)return;let a=el(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zu=W(`$ZodCheckLengthEquals`,(e,t)=>{var n;Au.init(e,t),(n=e._zod.def).when??(n.when=ju),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?$c(r):i;if(a===t.length)return;let o=el(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Bu=W(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Au.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Vu=W(`$ZodCheckRegex`,(e,t)=>{Bu.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Hu=W(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ou,Bu.init(e,t)}),Uu=W(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=ku,Bu.init(e,t)}),Wu=W(`$ZodCheckIncludes`,(e,t)=>{Au.init(e,t);let n=Ac(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Gu=W(`$ZodCheckStartsWith`,(e,t)=>{Au.init(e,t);let n=RegExp(`^${Ac(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Ku=W(`$ZodCheckEndsWith`,(e,t)=>{Au.init(e,t);let n=RegExp(`.*${Ac(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),qu=W(`$ZodCheckOverwrite`,(e,t)=>{Au.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Ju=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
5
5
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(`
|
|
6
6
|
`)}\n};`)(...Object.values(this.closed))}},Yu={major:4,minor:6,patch:7},G=W(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Yu;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Gc(t),a;for(let o of n){if(o._zod.def.when){if(Kc(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new yl;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Xc(t.issues,n,e),i||=Gc(t,n))});else{if(t.issues.length===n)continue;Xc(t.issues,n,e),i||=Gc(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Gc(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new yl;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new yl;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return al(this,`~standard`,Qu(this))},set"~standard"(e){il(this,`~standard`,e)}}),Xu=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Zc(e,t,Sl()))}:{value:e.value};async function Zu(e,t){let n={async:!0};return Xu(await e._zod.run({value:t,issues:[]},n),n)}function Qu(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Xu(r,n)}catch{}return Zu(e,t)},vendor:`zod`,version:1}}var $u=W(`$ZodString`,(e,t)=>{G.init(e,t),e._zod.pattern=t.pattern??wu,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),K=W(`$ZodStringFormat`,(e,t)=>{Bu.init(e,t),$u.init(e,t)}),ed=W(`$ZodGUID`,(e,t)=>{t.pattern??=au,K.init(e,t)}),td=W(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=ou(e)}else t.pattern??=ou();K.init(e,t)}),nd=W(`$ZodEmail`,(e,t)=>{t.pattern??=su,K.init(e,t)});function rd(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function id(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?rd(e)||2:ad(e,t)}function ad(e,t){if(!t.normalize&&t.protocol?.source===gu.source&&!/^https?:\/\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var od=/[\t\n\r]/g;function sd(e){return e.replace(od,``)}function cd(e,t){return t.lastIndex=0,t.test(e.hostname)}function ld(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var ud=W(`$ZodURL`,(e,t)=>{K.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=id(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=sd(r);return}t.hostname&&!cd(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!ld(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:sd(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),dd=W(`$ZodEmoji`,(e,t)=>{t.pattern??=lu(),K.init(e,t)}),fd=W(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?nu:ru(t.length),K.init(e,t)}),pd=W(`$ZodCUID`,(e,t)=>{t.pattern??=Zl,K.init(e,t)}),md=W(`$ZodCUID2`,(e,t)=>{t.pattern??=Ql,K.init(e,t)}),hd=W(`$ZodULID`,(e,t)=>{t.pattern??=$l,K.init(e,t)}),gd=W(`$ZodXID`,(e,t)=>{t.pattern??=eu,K.init(e,t)}),_d=W(`$ZodKSUID`,(e,t)=>{t.pattern??=tu,K.init(e,t)}),vd=W(`$ZodISODateTime`,(e,t)=>{t.pattern??=Cu(t),K.init(e,t)}),yd=W(`$ZodISODate`,(e,t)=>{t.pattern??=bu,K.init(e,t)}),bd=W(`$ZodISOTime`,(e,t)=>{t.pattern??=Su(t),K.init(e,t)}),xd=W(`$ZodISODuration`,(e,t)=>{t.pattern??=iu,K.init(e,t)}),Sd=W(`$ZodIPv4`,(e,t)=>{t.pattern??=uu,K.init(e,t)}),Cd=/^[0-9a-fA-F:.]+$/;function wd(e){return Cd.test(e)?rd(`http://[${e}]`):!1}var Td=W(`$ZodIPv6`,(e,t)=>{t.pattern??=du,K.init(e,t),e._zod.check=n=>{wd(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Ed=W(`$ZodCIDRv4`,(e,t)=>{t.pattern??=fu,K.init(e,t)});function Dd(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:wd(n)}var Od=W(`$ZodCIDRv6`,(e,t)=>{t.pattern??=pu,K.init(e,t),e._zod.check=n=>{Dd(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function kd(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Ad=/^[0-9a-zA-Z+/]*={0,2}$/,jd=W(`$ZodBase64`,(e,t)=>{t.pattern??=Ad,K.init(e,t),e._zod.check=n=>{kd(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Md=/^[A-Za-z0-9_-]*$/;function Nd(e){if(!Md.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return kd(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Pd=W(`$ZodBase64URL`,(e,t)=>{t.pattern??=Md,K.init(e,t),e._zod.check=n=>{Nd(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Fd=W(`$ZodE164`,(e,t)=>{t.pattern??=_u,K.init(e,t)});function Id(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Ld=W(`$ZodJWT`,(e,t)=>{K.init(e,t),e._zod.check=n=>{Id(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Rd=W(`$ZodNumber`,(e,t)=>{G.init(e,t),e._zod.pattern=Eu,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),zd=W(`$ZodNumberFormat`,(e,t)=>{Iu.init(e,t),Rd.init(e,t)}),Bd=W(`$ZodBoolean`,(e,t)=>{G.init(e,t),e._zod.pattern=Du,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Vd=W(`$ZodUnknown`,(e,t)=>{G.init(e,t),e._zod.parse=e=>e}),Hd=W(`$ZodNever`,(e,t)=>{G.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Ud(e,t){let n=Yc(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of Yc(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Xc(n.issues,t,e),n}}return i(n,a)}}var Wd=e=>Array.isArray(e)?e.length:-1;function Gd(e,t,n){e.issues.length&&t.issues.push(...qc(n,e.issues)),t.value[n]=e.value}var Kd=W(`$ZodArray`,(e,t)=>{G.init(e,t);let n=xl.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Gd(t,r,e)));else if(Gd(c,r,e),s&&c.issues.length!==0&&Gc(c))break}return o.length?Promise.all(o).then(()=>r):r},Ud(e,Wd)});function qd(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...qc(n,e.issues))}!o&&i===void 0?e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]}):e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Jd=[];function Yd(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Jd,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Nc(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Xd(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Gc(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>qd(e,n,i,t,d,f))):qd(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var Zd=W(`$ZodObject`,(e,t)=>{G.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=uc(()=>Yd(t));U(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||mc(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=Tc,o=t.catchall,s,c=xl.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Gc(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>qd(n,t,e,r,a,o))):qd(s,t,e,r,a,o)}return o?Xd(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Qd=W(`$ZodObjectJIT`,(e,t)=>{Zd.init(e,t);let n=e._zod.parse,r=uc(()=>Yd(t)),i=xl.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Ju([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`
|
|
7
7
|
let ${e}_ab = false;
|
|
@@ -55,10 +55,10 @@ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}
|
|
|
55
55
|
|
|
56
56
|
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Tc,c=!xl.jitless,l=c&&Ec.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Xd([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function $d(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Gc(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Zc(e,r,Sl())))}),t)}var ef=W(`$ZodUnion`,(e,t)=>{G.init(e,t),U(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),U(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),U(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),U(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>fc(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>$d(t,r,e,i)):$d(o,r,e,i)}}),tf=W(`$ZodIntersection`,(e,t)=>{G.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>rf(e,t,n)):rf(e,i,a)}});function nf(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Dc(e)&&Dc(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=nf(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=nf(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function rf(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=nf(t.value,n.value);if(!c.valid){if(Gc(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var af=W(`$ZodRecord`,(e,t)=>{G.init(e,t);let n=xl.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Dc(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Zc(e,i,Sl())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...qc(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...qc(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Eu.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Zc(e,i,Sl())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...qc(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...qc(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),of=W(`$ZodEnum`,(e,t)=>{G.init(e,t);let n=oc(t.entries),r=new Set(n);e._zod.values=r,U(e,`pattern`,e=>{let t=oc(e.def.entries).filter(e=>kc.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ac(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),sf=W(`$ZodLiteral`,(e,t)=>{G.init(e,t);let n=new Set(t.values);e._zod.values=n,U(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ac(e):e?Ac(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),cf=W(`$ZodTransform`,(e,t)=>{G.init(e,t),e._zod.optin=`optional`,xl.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new bl(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new yl;return n.value=i,n}});function lf(e,t){return e.value=t.issues.length?void 0:t.value,e}var uf=W(`$ZodOptional`,(e,t)=>{G.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,U(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),U(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${fc(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>lf(e,t)):lf(e,r)}return t.innerType._zod.run(e,n)}}),df=W(`$ZodExactOptional`,(e,t)=>{uf.init(e,t),U(e,`values`,e=>e.def.innerType._zod.values),U(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ff=W(`$ZodNullable`,(e,t)=>{G.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin),U(e,`optout`,e=>e.def.innerType._zod.optout),U(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${fc(t.source)}|null)$`):void 0}),U(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),pf=W(`$ZodDefault`,(e,t)=>{G.init(e,t),e._zod.optin=`defaulted`,U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>mf(e,t)):mf(r,t)}});function mf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var hf=W(`$ZodPrefault`,(e,t)=>{G.init(e,t),e._zod.optin=`defaulted`,U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),gf=W(`$ZodNonOptional`,(e,t)=>{G.init(e,t),U(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>_f(t,e)):_f(i,e)}});function _f(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function vf(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Zc(e,r,Sl()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var yf=W(`$ZodCatch`,(e,t)=>{G.init(e,t),U(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),U(e,`optout`,e=>e.def.innerType._zod.optout),U(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>vf(e,r,t,n)):vf(e,r,t,n)}}),bf=W(`$ZodPipe`,(e,t)=>{G.init(e,t),U(e,`values`,e=>e.def.in._zod.values),U(e,`optin`,e=>e.def.in._zod.optin),U(e,`optout`,e=>e.def.out._zod.optout),U(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>xf(e,t.in,n)):xf(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>xf(e,t.out,n)):xf(r,t.out,n)}});function xf(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Sf=W(`$ZodReadonly`,(e,t)=>{G.init(e,t),U(e,`propValues`,e=>e.def.innerType._zod.propValues),U(e,`values`,e=>e.def.innerType._zod.values),U(e,`optin`,e=>e.def.innerType?._zod?.optin),U(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Cf):Cf(r)}});function Cf(e){return e.memo||(e.value=Object.freeze(e.value)),e}var wf=W(`$ZodCustom`,(e,t)=>{Au.init(e,t),G.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Tf(t,n,r,e));Tf(i,n,r,e)}});function Tf(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(nl(e))}}var Ef=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Df=`~memo`,Of=[];function kf(e){return typeof e==`object`&&!!e}function Af(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var jf=new WeakMap,Mf=0,Nf=1,Pf=2;function Ff(e,t,n){let r=jf.get(e);if(r!==void 0)return r?Pf:Mf;if(t.has(e))return Pf;t.add(e);let i=Mf,a=e=>{if(i!==Pf&&e?._zod){let r=Ff(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Mf;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Nf:o.value?._zod?Ff(o.value,t,n):Mf;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=hc(c);s(e?o(e,!0):Nf),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Ff(r,t,!1):Nf);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),If(e,i)}function If(e,t){return t!==Nf&&jf.set(e,t===Pf),t}function Lf(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Rf,zf=[],Bf={alloc(e,t,n){let r=Rf;if(!r)return n;Rf=void 0;let i={value:n,issues:null};return r.set(t.value,i),zf.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Hf(n,e.value))throw new Ef;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Ff(e,new Set,!1);if(i===Mf)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Pf||r?n=!0:r=!0}let l=s.value;if(!kf(l))return t(s,c);let u=c[Df];u||(u={buckets:new WeakMap,backEdges:void 0},c[Df]=u);let d;i===c?d=a:(d=Lf(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...Af(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Rf=d;let p=zf.length,m=t(s,c);Rf=void 0;let h=zf.length>p?zf.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Af(e.issues):Of),e)):(h&&(h.issues=m.issues.length?Af(m.issues):Of),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Vf(){return Bf}function Hf(e,t){let n=e[Df]?.backEdges;return n!==void 0&&kf(t)&&n.has(t)}var Uf=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(tl(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Mc(e.values[0])}`:`Invalid option: expected one of ${sc(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${sc(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Wf(){return{localeError:Uf()}}var Gf,Kf=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function qf(){return new Kf}(Gf=globalThis).__zod_globalRegistry??(Gf.__zod_globalRegistry=qf());var Jf=globalThis.__zod_globalRegistry;function Yf(e){return e.checks&&=[...e.checks],e}function Xf(e,t){return new e(Yf({type:`string`,...H(t)}))}function Zf(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...H(t)})}function Qf(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...H(t)})}function $f(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...H(t)})}function ep(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...H(t)})}function tp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...H(t)})}function np(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...H(t)})}function rp(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...H(t)})}function ip(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...H(t)})}function ap(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...H(t)})}function op(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...H(t)})}function sp(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...H(t)})}function cp(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...H(t)})}function lp(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...H(t)})}function up(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...H(t)})}function dp(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...H(t)})}function fp(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...H(t)})}function pp(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...H(t)})}function mp(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...H(t)})}function hp(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...H(t)})}function gp(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...H(t)})}function _p(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...H(t)})}function vp(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...H(t)})}function yp(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...H(t)})}function bp(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...H(t)})}function xp(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...H(t)})}function Sp(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...H(t)})}function Cp(e,t){return new e(Yf({type:`number`,checks:[],...H(t)}))}function wp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...H(t)})}function Tp(e,t){return new e({type:`boolean`,...H(t)})}function Ep(e){return new e({type:`unknown`})}function Dp(e,t){return new e({type:`never`,...H(t)})}function Op(e,t){return new Nu({check:`less_than`,...H(t),value:e,inclusive:!1})}function kp(e,t){return new Nu({check:`less_than`,...H(t),value:e,inclusive:!0})}function Ap(e,t){return new Pu({check:`greater_than`,...H(t),value:e,inclusive:!1})}function jp(e,t){return new Pu({check:`greater_than`,...H(t),value:e,inclusive:!0})}function Mp(e,t){return new Fu({check:`multiple_of`,...H(t),value:e})}function Np(e,t){return new Lu({check:`max_length`,...H(t),maximum:e})}function Pp(e,t){return new Ru({check:`min_length`,...H(t),minimum:e})}function Fp(e,t){return new zu({check:`length_equals`,...H(t),length:e})}function Ip(e,t){return new Vu({check:`string_format`,format:`regex`,...H(t),pattern:e})}function Lp(e){return new Hu({check:`string_format`,format:`lowercase`,...H(e)})}function Rp(e){return new Uu({check:`string_format`,format:`uppercase`,...H(e)})}function zp(e,t){return new Wu({check:`string_format`,format:`includes`,...H(t),includes:e})}function Bp(e,t){return new Gu({check:`string_format`,format:`starts_with`,...H(t),prefix:e})}function Vp(e,t){return new Ku({check:`string_format`,format:`ends_with`,...H(t),suffix:e})}function Hp(e){return new qu({check:`overwrite`,tx:e})}function Up(e){return Hp(t=>t.normalize(e))}function Wp(){return Hp(e=>e.trim())}function Gp(){return Hp(e=>e.toLowerCase())}function Kp(){return Hp(e=>e.toUpperCase())}function qp(){return Hp(e=>Cc(e))}function Jp(e,t,n){return new e({type:`array`,element:t,...H(n)})}function Yp(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...H(n)})}function Xp(e,t){let n=Zp(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(nl(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(nl(r))}},e(t.value,t)),t);return n}function Zp(e,t){let n=new Au({check:`custom`,...H(t)});return n._zod.check=e,n}function Qp(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&mc(e,t,n[t]);return e}function $p(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Jf,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function em(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function q(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,q(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Qp(o.schema,c),t.io===`input`&&um(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function tm(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function nm(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${tm(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+tm(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
57
57
|
|
|
58
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function rm(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;rm(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var im=new Set([`type`,`properties`,`required`,`additionalProperties`]),am=[`oneOf`,`anyOf`];function om(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function sm(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!im.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??om(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}mc(n,r,e.length===1?e[0]:sm(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=om(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function cm(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of im)if(t in e)return;let n=t.filter(e=>am.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=sm(t);else{let e=n[0],i=am.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>sm([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Qp(e,r))}function lm(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Qp(i,s),Qp(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())rm(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])cm(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Qp(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,mc(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:fm(t,`input`,e.processors),output:fm(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function um(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return um(r.element,n);if(r.type===`set`)return um(r.valueType,n);if(r.type===`lazy`)return um(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return um(r.innerType,n);if(r.type===`intersection`)return um(r.left,n)||um(r.right,n);if(r.type===`record`||r.type===`map`)return um(r.keyType,n)||um(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:um(r.in,n)||um(r.out,n);if(r.type===`object`){for(let e in r.shape)if(um(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(um(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(um(e,n))return!0;return!!(r.rest&&um(r.rest,n))}return!1}var dm=(e,t={})=>n=>{let r=$p({...n,processors:t});return q(e,r),nm(r,e),lm(r,e)},fm=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=$p({...i??{},target:a,io:t,processors:n});return q(e,o),nm(o,e),lm(o,e)},pm=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},mm=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},hm=(e,t)=>{pm(e,`minimum`,t),mm(e,`maximum`,t)},gm=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},_m=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},vm=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ym=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},bm=(e,t)=>pm(e,`minimum`,t.minimum),xm=(e,t)=>mm(e,`maximum`,t.maximum),Sm=e=>(t,n)=>{ym(t,n.format);let[r,i]=e[n.format];pm(t,`minimum`,r),mm(t,`maximum`,i)},Cm={greater_than:(e,t)=>pm(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>mm(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>gm(e,t.value),number_format:Sm(Pc),bigint_format:Sm(Fc),min_length:bm,max_length:xm,length_equals:(e,t)=>hm(e,t.length),min_size:bm,max_size:xm,size_equals:(e,t)=>hm(e,t.size),string_format:(e,t)=>{ym(e,t.format),t.pattern&&_m(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>vm(e,t.mime)};function wm(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Cm[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&pm(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&pm(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&mm(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&mm(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&gm(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&vm(t,i.mime);for(let e of i.patterns??[])_m(t,e);return t}var Tm={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Em=new Map([[Ad,mu],[Md,hu]]),Dm=e=>Em.get(e)??e,Om=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=wm(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Tm[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Dm);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},km=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=wm(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):em(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Am=(e,t,n,r)=>{n.type=`boolean`},jm=(e,t,n,r)=>{n.not={}},Mm=(e,t,n,r)=>{let i=e._zod.def,a=oc(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Nm=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(em(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(em(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Pm=(e,t,n,r)=>{em(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Fm=(e,t,n,r)=>{em(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Im=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=wm(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=q(a.element,t,{...r,path:[...r.path,`items`]})};function Lm(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Lm(t.out):t.type===`catch`?Lm(t.innerType):e._zod.optin}var Rm=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&em(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)mc(i.properties,e,q(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Lm(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=q(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},zm=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>q(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Bm=(e,t,n,r)=>{let i=e._zod.def,a=q(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=q(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function Vm(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Vm(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Vm(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Eu:Tu).source)),p}var Hm=new WeakMap;function Um(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Hm.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Vm(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Wm=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=wm(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=q(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)mc(i.patternProperties,Dm(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=q(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Hm.get(t);n||(n=[],Hm.set(t,n),t.deferred.push(()=>Um(t))),n.push(e)}i.additionalProperties=q(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Lm(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Gm=(e,t,n,r)=>{let i=e._zod.def,a=q(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Km=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},qm=Symbol();function Jm(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(em(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),qm):JSON.parse(o)}var Ym=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Jm(i.defaultValue,e,t,n,r);o!==qm&&(n.default=o)},Xm=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Jm(i.defaultValue,e,t,n,r);o!==qm&&(n._prefault=o)},Zm=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{em(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Qm=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;q(o,t,r);let s=t.seen.get(e);s.ref=o},$m=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},eh=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},th=new WeakSet([Object.prototype,Error.prototype]);function nh(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var rh=W(`ZodError`,(e,t)=>{Ol.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);th.has(n)||(th.add(n),nh(n,`format`,e=>t=>jl(e,t)),nh(n,`flatten`,e=>t=>Al(e,t)),nh(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,cc,2)}),nh(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,cc,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),ih=Nl(rh),ah=Pl(rh),oh=Fl(rh),sh=Ll(rh),ch=Ul(rh),lh=Wl(rh),uh=Gl(rh),dh=Kl(rh),fh=ql(rh),ph=Jl(rh),mh=Yl(rh),hh=Xl(rh);function gh(){xl.localeError||Sl(Wf())}function _h(){xl.memoizer||Sl({memoizer:Vf()})}var J=W(`ZodType`,(e,t)=>(gh(),G.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(xc(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return jc(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Pg(e,t))},superRefine(e,t){return this.check(Fg(e,t))},overwrite(e){return this.check(Hp(e))},optional(){return gg(this)},exactOptional(){return vg(this)},nullable(){return bg(this)},nullish(){return gg(bg(this))},nonoptional(e){return Eg(this,e)},array(){return tg(this)},or(e){return ig([this,e])},and(e){return og(this,e)},transform(e){return Ag(this,mg(e))},default(e){return Sg(this,e)},prefault(e){return wg(this,e)},catch(e){return Og(this,e)},pipe(e){return Ag(this,e)},readonly(){return Mg(this)},describe(e){let t=this.clone();return Jf.add(t,{description:e}),t},meta(...e){if(e.length===0)return Jf.get(this);let t=this.clone();return Jf.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return al(this,`~standard`,{...Qu(this),jsonSchema:{input:fm(this,`input`),output:fm(this,`output`)}})},set"~standard"(e){il(this,`~standard`,e)},parse:function e(t,n){return ih(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ah(this,t,n,{callee:e})},safeParse(e,t){return oh(this,e,t)},async safeParseAsync(e,t){return sh(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){il(this,`spa`,e)},validate(e,t){return Bl(this,e,t)},validateAsync(e,t){return Hl(this,e,t)},encode:function e(t,n){return ch(this,t,n,{callee:e})},decode:function e(t,n){return lh(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await uh(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await dh(this,t,n,{callee:e})},safeEncode(e,t){return fh(this,e,t)},safeDecode(e,t){return ph(this,e,t)},async safeEncodeAsync(e,t){return mh(this,e,t)},async safeDecodeAsync(e,t){return hh(this,e,t)},toJSONSchema(e){return dm(this,{})(e)},get description(){return Jf.get(this)?.description},get _def(){return this._zod.def}}),vh=W(`_ZodString`,(e,t)=>{$u.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Om(e,t,n,r)},ol({format:e=>wm(e).format??null,minLength:e=>wm(e).minimum??null,maxLength:e=>wm(e).maximum??null},{regex(...e){return this.check(Ip(...e))},includes(...e){return this.check(zp(...e))},startsWith(...e){return this.check(Bp(...e))},endsWith(...e){return this.check(Vp(...e))},min(...e){return this.check(Pp(...e))},max(...e){return this.check(Np(...e))},length(...e){return this.check(Fp(...e))},nonempty(...e){return this.check(Pp(1,...e))},lowercase(e){return this.check(Lp(e))},uppercase(e){return this.check(Rp(e))},trim(){return this.check(Wp())},normalize(...e){return this.check(Up(...e))},toLowerCase(){return this.check(Gp())},toUpperCase(){return this.check(Kp())},slugify(){return this.check(qp())}})),yh=W(`ZodString`,(e,t)=>{$u.init(e,t),vh.init(e,t)},{email(e){return this.check(Zf(wh,e))},url(e){return this.check(rp(Oh,e))},jwt(e){return this.check(vp(Uh,e))},emoji(e){return this.check(ip(kh,e))},guid(e){return this.check(Qf(Th,e))},uuid(e){return this.check($f(Eh,e))},uuidv4(e){return this.check(ep(Eh,e))},uuidv6(e){return this.check(tp(Eh,e))},uuidv7(e){return this.check(np(Eh,e))},nanoid(e){return this.check(ap(Ah,e))},cuid(e){return this.check(op(jh,e))},cuid2(e){return this.check(sp(Mh,e))},ulid(e){return this.check(cp(Nh,e))},base64(e){return this.check(hp(Bh,e))},base64url(e){return this.check(gp(Vh,e))},xid(e){return this.check(lp(Ph,e))},ksuid(e){return this.check(up(Fh,e))},ipv4(e){return this.check(dp(Ih,e))},ipv6(e){return this.check(fp(Lh,e))},cidrv4(e){return this.check(pp(Rh,e))},cidrv6(e){return this.check(mp(zh,e))},e164(e){return this.check(_p(Hh,e))},datetime(e){return this.check(yp(bh,e))},date(e){return this.check(bp(xh,e))},time(e){return this.check(xp(Sh,e))},duration(e){return this.check(Sp(Ch,e))}});function Y(e){return Xf(yh,e)}var X=W(`ZodStringFormat`,(e,t)=>{K.init(e,t),vh.init(e,t)}),bh=W(`ZodISODateTime`,(e,t)=>{vd.init(e,t),X.init(e,t)}),xh=W(`ZodISODate`,(e,t)=>{yd.init(e,t),X.init(e,t)}),Sh=W(`ZodISOTime`,(e,t)=>{bd.init(e,t),X.init(e,t)}),Ch=W(`ZodISODuration`,(e,t)=>{xd.init(e,t),X.init(e,t)}),wh=W(`ZodEmail`,(e,t)=>{nd.init(e,t),X.init(e,t)}),Th=W(`ZodGUID`,(e,t)=>{ed.init(e,t),X.init(e,t)}),Eh=W(`ZodUUID`,(e,t)=>{td.init(e,t),X.init(e,t)});function Dh(e){return $f(Eh,e)}var Oh=W(`ZodURL`,(e,t)=>{ud.init(e,t),X.init(e,t)}),kh=W(`ZodEmoji`,(e,t)=>{dd.init(e,t),X.init(e,t)}),Ah=W(`ZodNanoID`,(e,t)=>{fd.init(e,t),X.init(e,t)}),jh=W(`ZodCUID`,(e,t)=>{pd.init(e,t),X.init(e,t)}),Mh=W(`ZodCUID2`,(e,t)=>{md.init(e,t),X.init(e,t)}),Nh=W(`ZodULID`,(e,t)=>{hd.init(e,t),X.init(e,t)}),Ph=W(`ZodXID`,(e,t)=>{gd.init(e,t),X.init(e,t)}),Fh=W(`ZodKSUID`,(e,t)=>{_d.init(e,t),X.init(e,t)}),Ih=W(`ZodIPv4`,(e,t)=>{Sd.init(e,t),X.init(e,t)}),Lh=W(`ZodIPv6`,(e,t)=>{Td.init(e,t),X.init(e,t)}),Rh=W(`ZodCIDRv4`,(e,t)=>{Ed.init(e,t),X.init(e,t)}),zh=W(`ZodCIDRv6`,(e,t)=>{Od.init(e,t),X.init(e,t)}),Bh=W(`ZodBase64`,(e,t)=>{jd.init(e,t),X.init(e,t)}),Vh=W(`ZodBase64URL`,(e,t)=>{Pd.init(e,t),X.init(e,t)}),Hh=W(`ZodE164`,(e,t)=>{Fd.init(e,t),X.init(e,t)}),Uh=W(`ZodJWT`,(e,t)=>{Ld.init(e,t),X.init(e,t)}),Wh=W(`ZodNumber`,(e,t)=>{Rd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>km(e,t,n,r),e.isFinite=!0},ol({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=wm(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=wm(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=wm(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>wm(e).format??null},{gt(e,t){return this.check(Ap(e,t))},gte(e,t){return this.check(jp(e,t))},min(e,t){return this.check(jp(e,t))},lt(e,t){return this.check(Op(e,t))},lte(e,t){return this.check(kp(e,t))},max(e,t){return this.check(kp(e,t))},int(e){return this.check(qh(e))},safe(e){return this.check(qh(e))},positive(e){return this.check(Ap(0,e))},nonnegative(e){return this.check(jp(0,e))},negative(e){return this.check(Op(0,e))},nonpositive(e){return this.check(kp(0,e))},multipleOf(e,t){return this.check(Mp(e,t))},step(e,t){return this.check(Mp(e,t))},finite(){return this}}));function Gh(e){return Cp(Wh,e)}var Kh=W(`ZodNumberFormat`,(e,t)=>{zd.init(e,t),Wh.init(e,t)});function qh(e){return wp(Kh,e)}var Jh=W(`ZodBoolean`,(e,t)=>{Bd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Am(e,t,n,r)});function Yh(e){return Tp(Jh,e)}var Xh=W(`ZodUnknown`,(e,t)=>{Vd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Zh(){return Ep(Xh)}var Qh=W(`ZodNever`,(e,t)=>{Hd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jm(e,t,n,r)});function $h(e){return Dp(Qh,e)}var eg=W(`ZodArray`,(e,t)=>{_h(),Kd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Im(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Pp(e,t))},nonempty(e){return this.check(Pp(1,e))},max(e,t){return this.check(Np(e,t))},length(e,t){return this.check(Fp(e,t))},unwrap(){return this.element}});function tg(e,t){return Jp(eg,e,t)}var ng=W(`ZodObject`,(e,t)=>{_h(),Qd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rm(e,t,n,r),fl(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return ug(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(xc(this._zod.def,{catchall:e}))},passthrough(){return this.clone(xc(this._zod.def,{catchall:Zh()}))},loose(){return this.clone(xc(this._zod.def,{catchall:Zh()}))},strict(){return this.clone(xc(this._zod.def,{catchall:$h()}))},strip(){return this.clone(xc(this._zod.def,{catchall:void 0}))},extend(e){return zc(this,e)},safeExtend(e){return Vc(this,e)},merge(e){return Hc(this,e)},pick(e){return Ic(this,e)},omit(e){return Rc(this,e)},partial(...e){return Uc(hg,this,e[0])},exactPartial(...e){return Uc(_g,this,e[0],`exactPartial`)},required(...e){return Wc(Tg,this,e[0])}});function Z(e,t){return new ng({type:`object`,shape:e??{},...H(t)})}var rg=W(`ZodUnion`,(e,t)=>{ef.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zm(e,t,n,r),e.options=t.options});function ig(e,t){return new rg({type:`union`,options:e,...H(t)})}var ag=W(`ZodIntersection`,(e,t)=>{tf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bm(e,t,n,r)});function og(e,t){return new ag({type:`intersection`,left:e,right:t})}var sg=W(`ZodRecord`,(e,t)=>{_h(),af.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wm(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function cg(e,t,n){return!t||!t._zod?new sg({type:`record`,keyType:Y(),valueType:e,...H(t)}):new sg({type:`record`,keyType:e,valueType:t,...H(n)})}var lg=W(`ZodEnum`,(e,t)=>{of.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mm(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new lg({...t,checks:[],...H(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new lg({...t,checks:[],...H(r),entries:i})}});function ug(e,t){return new lg({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...H(t)})}var dg=W(`ZodLiteral`,(e,t)=>{sf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nm(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fg(e,t){return new dg({type:`literal`,values:Array.isArray(e)?e:[e],...H(t)})}var pg=W(`ZodTransform`,(e,t)=>{_h(),cf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fm(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new bl(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(nl(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(nl(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function mg(e){return new pg({type:`transform`,transform:e})}var hg=W(`ZodOptional`,(e,t)=>{uf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gg(e){return new hg({type:`optional`,innerType:e})}var _g=W(`ZodExactOptional`,(e,t)=>{df.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vg(e){return new _g({type:`optional`,innerType:e})}var yg=W(`ZodNullable`,(e,t)=>{ff.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bg(e){return new yg({type:`nullable`,innerType:e})}var xg=W(`ZodDefault`,(e,t)=>{pf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ym(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Sg(e,t){return new xg({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Oc(t)}})}var Cg=W(`ZodPrefault`,(e,t)=>{hf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wg(e,t){return new Cg({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Oc(t)}})}var Tg=W(`ZodNonOptional`,(e,t)=>{gf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Km(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Eg(e,t){return new Tg({type:`nonoptional`,innerType:e,...H(t)})}var Dg=W(`ZodCatch`,(e,t)=>{yf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Og(e,t){return new Dg({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ml(t)})}var kg=W(`ZodPipe`,(e,t)=>{bf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qm(e,t,n,r),e.in=t.in,e.out=t.out});function Ag(e,t){return new kg({type:`pipe`,in:e,out:t})}var jg=W(`ZodReadonly`,(e,t)=>{Sf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$m(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mg(e){return new jg({type:`readonly`,innerType:e})}var Ng=W(`ZodCustom`,(e,t)=>{wf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pm(e,t,n,r)});function Pg(e,t={}){return Yp(Ng,e,t)}function Fg(e,t){return Xp(e,t)}function Ig(e){return yp(bh,e)}var Lg=[`tasks:read`,`tasks:write`,`docs:read`,`docs:write`];function Rg(e){let t=[];return e.tasks!==`none`&&t.push(`tasks:read`),e.tasks===`write`&&t.push(`tasks:write`),e.docs!==`none`&&t.push(`docs:read`),e.docs===`write`&&t.push(`docs:write`),t}function zg(e,t){return e.includes(`${t}:write`)?`write`:e.includes(`${t}:read`)?`read`:`none`}var Bg=Dh(),Q=(e=120)=>Y().trim().min(1,`Required`).max(e),Vg=ug(ec),Hg=Gh().int().min(0).max(1e5),Ug=Ig({offset:!0}),Wg=2e5,Gg=Y().trim().min(1,`Required`).max(256),Kg=Z({setupCode:Gg,name:Q(80),locale:ug(tc).optional()}),qg=Z({accessKey:Gg}),Jg=Z({setupCode:Gg,reason:ug([`lost`,`compromised`])});Z({currentAccessKey:Gg}),Z({accessKey:Gg}),Z({token:Y().min(40).max(200)}),Z({name:Q(80).optional(),theme:ug([`system`,`light`,`dark`]).optional(),locale:ug(tc).optional()}),Z({name:Q(60)}),Z({name:Q(80),color:Vg.default(`cobalt`),description:Y().trim().max(500).optional()}),Z({name:Q(80).optional(),color:Vg.optional(),description:Y().trim().max(500).optional()}),Z({name:Q(80),columns:tg(Q(60)).max(20).optional()}),Z({name:Q(80)}),Z({name:Q(60),index:Hg.optional()}),Z({name:Q(60).optional(),index:Hg.optional()}),Z({name:Y().trim().max(40).default(``),color:Vg}),Z({name:Y().trim().max(40).optional(),color:Vg.optional()}),Z({title:Q(300),description:Y().max(Wg).optional(),dueAt:Ug.nullable().optional(),labelIds:tg(Bg).max(20).optional(),index:Hg.optional()}),Z({title:Q(300).optional(),description:Y().max(Wg).optional(),dueAt:Ug.nullable().optional(),labelIds:tg(Bg).max(20).optional()}),Z({columnId:Bg,index:Hg}),Z({title:Q(120).default(`Checklist`)}),Z({title:Q(120)}),Z({text:Q(500)}),Z({text:Q(500).optional(),done:Yh().optional(),index:Hg.optional()}),Z({pageId:Bg}),Z({title:Y().trim().max(200).default(``),icon:Y().max(16).nullable().optional(),parentId:Bg.nullable().optional(),content:Y().max(Wg).default(``)}),Z({title:Y().trim().max(200).optional(),icon:Y().max(16).nullable().optional(),content:Y().max(Wg).optional(),baseVersion:Gh().int().min(1).optional()}),Z({parentId:Bg.nullable(),index:Hg}),Z({name:Q(60),workspaceId:Bg,scopes:tg(ug(Lg)).min(1,`Select at least one permission`),expiresInDays:ig([fg(30),fg(90),fg(365)]).nullable()});var Yg=Y().regex(/^[A-Za-z0-9+/=_-]+$/).max(4096),Xg=Z({algorithm:fg(`argon2id`),salt:Yg,memoryKiB:Gh().int().min(19456).max(1048576),iterations:Gh().int().min(2).max(20),parallelism:Gh().int().min(1).max(8)}),Zg=Y().regex(/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,`Invalid envelope`).max(4e5);Z({kdf:Xg,wrappedKey:Zg,recoveryWrappedKey:Zg}),Z({data:Zg}),Z({autoLockMinutes:ig([fg(1),fg(5),fg(15),fg(30),fg(60)])}),Z({params:cg(Y(),Y().max(4e3))}).extend({allow:Yh(),workspaceId:Y().optional(),scopes:tg(ug(Lg)).max(Lg.length).optional(),replace:Yh().optional()});var Qg=`X-File-Name`,$g={activity:{actions:{card:{created:`<actor>{{actor}}</actor> created the card <target>“{{target}}”</target>`,created_self:`<actor>{{actor}}</actor> created this card`,updated:`<actor>{{actor}}</actor> edited the card <target>“{{target}}”</target>`,updated_self:`<actor>{{actor}}</actor> edited this card`,moved:`<actor>{{actor}}</actor> moved the card <target>“{{target}}”</target>`,moved_self:`<actor>{{actor}}</actor> moved this card`,reordered:`<actor>{{actor}}</actor> reordered the card <target>“{{target}}”</target>`,reordered_self:`<actor>{{actor}}</actor> reordered this card`,archived:`<actor>{{actor}}</actor> archived the card <target>“{{target}}”</target>`,archived_self:`<actor>{{actor}}</actor> archived this card`,restored:`<actor>{{actor}}</actor> restored the card <target>“{{target}}”</target>`,restored_self:`<actor>{{actor}}</actor> restored this card`,deleted:`<actor>{{actor}}</actor> deleted the card <target>“{{target}}”</target>`,deleted_self:`<actor>{{actor}}</actor> deleted this card`,checklist:`<actor>{{actor}}</actor> updated the checklist of <target>“{{target}}”</target>`,checklist_self:`<actor>{{actor}}</actor> updated the checklist`,linked:`<actor>{{actor}}</actor> linked a document to <target>“{{target}}”</target>`,linked_self:`<actor>{{actor}}</actor> linked a document`,unlinked:`<actor>{{actor}}</actor> unlinked a document from <target>“{{target}}”</target>`,unlinked_self:`<actor>{{actor}}</actor> unlinked a document`},column:{created:`<actor>{{actor}}</actor> created the column <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> renamed the column <target>“{{target}}”</target>`,moved:`<actor>{{actor}}</actor> reordered the column <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the column <target>“{{target}}”</target>`},board:{created:`<actor>{{actor}}</actor> created the board <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> renamed the board <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the board <target>“{{target}}”</target>`},page:{created:`<actor>{{actor}}</actor> created the page <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> edited the page <target>“{{target}}”</target>`,moved:`<actor>{{actor}}</actor> moved the page <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the page <target>“{{target}}”</target>`},project:{created:`<actor>{{actor}}</actor> created the project <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> updated the project <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the project <target>“{{target}}”</target>`},label:{created:`<actor>{{actor}}</actor> created a label`,updated:`<actor>{{actor}}</actor> edited a label`,deleted:`<actor>{{actor}}</actor> deleted a label`},other:`<actor>{{actor}}</actor> made a change`},detail:{movedTo:`to {{to}}`,movedFromTo:`{{from}} → {{to}}`,createdIn:`in {{column}}`,linkedPage:`“{{page}}”`},viaMcp:`via MCP`},agents:{title:`Agents`,connect:`Connect an agent`,intro:{title:`Your agents, with clear permissions`,body:`Connect any MCP-compatible client to look up documentation, create tasks and reorganize boards. Each token belongs to a single workspace and can only do what you allow.`,endpoint:`Endpoint`,copyEndpoint:`Copy endpoint`,endpointCopied:`Endpoint copied`,oauth:`In Claude (web, desktop and mobile), add a custom connector with this endpoint. No token needed: you’ll be asked for permission here. Any client that supports OAuth works the same way.`},vault:{title:`The vault is out of their reach`,unreadable:`No token can read the vault, not even encrypted: the server rejects the request before it touches any data.`,noDeletes:`Agents can’t delete anything. They can only archive, and you can restore.`,logged:`Every action is logged, and you can watch it live in the app.`},tokens:{active:`Active connections`,emptyTitle:`You haven’t connected any agents yet`,emptyBody:`Create a token and paste the configuration into Claude Code, Cursor, VS Code or Claude Desktop.`,inactive_one:`{{count}} revoked or expired`,inactive_other:`{{count}} revoked or expired`},activity:{title:`Agent activity`,titleFor:`Activity by “{{name}}”`,showAll:`Show all`,loading:`Loading…`,empty:`When an agent works in this workspace, you’ll see it here.`},tools:{title:`MCP tools`,footnote:`Each agent only sees the tools its permissions allow.`,scopes:{read:`Read`,write:`Write`,tasksRead:`Tasks · read`,tasksWrite:`Tasks · write`,docsRead:`Documents · read`,docsWrite:`Documents · write`},descriptions:{listProjects:`Projects, boards and page outline`,search:`Search across cards and pages`,readBoards:`Columns, cards, checklists and links`,editCards:`Create, edit and move cards`,archiveCard:`Archive (restorable from the app)`,organizeBoards:`Reorganize boards`,labels:`Labels and checklists`,readPages:`Page tree and Markdown content`,writePages:`Create and update, with version control`,linkCard:`Link tasks and documents`,createProject:`Create projects`}},revoke:{action:`Revoke`,title:`Revoke “{{name}}”?`,description:`The agent loses access right away. Its past activity is kept.`,confirm:`Revoke access`,done:`Access revoked`},token:{oauth:{plain:`Connected with OAuth · returns to {{name}}`,computer:`Connected with OAuth · returns to {{name}} on this computer`,app:`Connected with OAuth · returns to the “{{name}}” app on this computer`},access:{tasks:{none:`Tasks: No access`,read:`Tasks: Read`,write:`Tasks: Read and write`},docs:{none:`Documents: No access`,read:`Documents: Read`,write:`Documents: Read and write`}},vaultNever:`Vault: never`,lastUsed:`Last used`,created:`Created`,revoked:`Revoked`,expires:`Expires`,expiresUnused:`Expires if unused`,never:`Never`,idle:`Not used for {{days}} days`,showActivity:`View its activity`},access:{levels:{none:`No access`,read:`Read`,write:`Read and write`},tasks:{label:`Tasks`,hint:`Boards, columns, cards and checklists`,group:`Access to tasks`},docs:{label:`Documents`,hint:`Pages and their Markdown content`,group:`Access to documents`},vault:{label:`Vault`,hint:`Never accessible to agents`,blocked:`Blocked`},atLeastOne:`Give read access to at least one area.`},kit:{clients:`MCP client`,terminal:`Terminal`,copy:`Copy configuration`,copied:`Configuration copied`,desktopNote:`Claude Desktop uses the mcp-remote bridge (Node.js) to send the authentication header.`,httpNote:`Streamable HTTP transport with Bearer authentication. Restart the client if it doesn’t find the server.`},create:{description:`Create a token for “{{workspace}}”. It can only reach this workspace, and only what you allow here.`,descriptionFallback:`Create a token for this workspace. It can only reach this workspace, and only what you allow here.`,name:`Agent name`,namePlaceholder:`e.g. Claude Code, Cursor, Support assistant`,expiry:`Expiration`,expiries:{30:`30 days`,90:`90 days`,365:`1 year`,never:`Never`},submit:`Create token`},created:{title:`“{{name}}” is ready`,description:`Copy the token now. For security, we only keep its fingerprint, so you won’t be able to see it again.`,copy:`Copy token`,copied:`Token copied`,done:`Done`}},auth:{hero:{title:`Organize.<br/>Document.<br/><accent>Protect.</accent>`,body:`One workspace for your projects, your knowledge and your credentials. Open to you and your AI agents, with permissions you control.`},pillars:{tasks:{title:`Tasks`,body:`Kanban boards, labels, due dates and checklists.`},docs:{title:`Docs`,body:`Nested Markdown pages, linked to your tasks.`},vault:{title:`Vault`,body:`End-to-end encrypted. Neither the server nor your agents can read it.`},agents:{title:`Agents`,body:`An MCP server with per-token permissions, so your LLMs can work alongside you.`}},orbit:{label:`Agents orbit your tasks and documents; the vault stays out of their reach`,tasks:`Tasks`,docs:`Docs`,vault:`Vault`},fields:{setupCode:{label:`Setup code`,show:`Show setup code`,hide:`Hide setup code`},newSetupCode:{label:`New setup code`,show:`Show new setup code`,hide:`Hide new setup code`},accessKey:{label:`Access key`,show:`Show access key`,hide:`Hide access key`},name:{label:`Your name`,hint:`Shown in the activity of your workspaces.`}},setup:{title:`Set up your copy`,subtitle:`This copy of Orqevio is yours alone. Enter the setup code you chose when you installed it. If you didn’t choose one, you’ll find it in the server log.`,submit:`Set up`,missingSetupCode:`Enter the setup code.`,missingName:`Enter your name.`},login:{title:`Welcome back`,subtitle:`Enter the access key for this copy of Orqevio.`,submit:`Sign in`,missingAccessKey:`Enter your access key.`,lostKey:`Lost your key?`},recovery:{intro:`Whoever manages this copy can generate a new key:`,cli:`Generate a new code from your computer and enter it here:`,button:`Change the <code>SETUP_CODE</code> secret in the Cloudflare dashboard (Workers & Pages → {{name}} → Settings → Variables and Secrets) and enter the new code here.`,cloudflare:`Change the copy’s <code>SETUP_CODE</code> secret (for example, with <code>npx wrangler secret put SETUP_CODE</code>) and enter the new code here.`,withCommand:`With this command on the server, which gives you the new key straight away (add --revoke-agents if someone else may have had the key):`,withNewCode:`With a new code: change <code>SETUP_CODE</code> in the copy’s configuration, restart it and enter the new code here.`,vaultUnaffected:`The vault isn’t affected: it stays protected by its master password.`,missingSetupCode:`Enter the new setup code.`,submit:`Recover access`,missingReason:`Choose why you’re recovering access.`,reason:{legend:`Why are you recovering access?`,lost:{label:`I lost my key`,hint:`Your agents stay connected.`},compromised:{label:`Someone else may have it`,hint:`All your agents are disconnected, Claude included. You can reconnect the ones you trust afterwards.`}}},revealed:{setup:{title:`Save your access key`,subtitle:`You’ll use it to sign in to this copy from any device. It’s shown only once, so save it in your password manager.`},recovery:{title:`Your new access key`,subtitle:`The old key no longer works, and every session has been signed out. Save this one in your password manager: it’s shown only once.`},continue:`Continue to Orqevio`,agents:{title:`Connected agents`,review:`They kept their access. If you don’t recognize one, revoke it.`,none:`No agent is connected to this copy.`,revoked:`Every agent has been disconnected. Reconnect the ones you trust from Agents.`}},keyReveal:{label:`Access key`,copied:`Key copied`,download:`Download .txt`,saved:`I’ve saved it somewhere safe, like my password manager.`},keyFile:{name:`orqevio-access-key.txt`,title:`Orqevio — Access key`,address:`Address: {{address}}`,key:`Key: {{key}}`,use:`Save it in your password manager. It signs you in to this copy of Orqevio from any device.`,lost:`If you lose it, whoever manages the copy can generate a new one. It doesn’t affect the vault’s master password.`},uninstalled:{title:`Orqevio was uninstalled`,subtitle:`This copy holds no data anymore: workspaces, documents, attachments, vault and agents are gone. Only the copy itself is left:`,cli:`Remove its Worker and its bucket from your Cloudflare account with:`,button:`In your Cloudflare and GitHub (or GitLab) accounts:`,cloudflare:`In your Cloudflare account:`,docker:`Stop it and delete its data, then delete the folder where you installed it:`,source:`Stop the server and delete its data folder (DATA_DIR, apps/server/data by default).`,steps:{worker:`Delete the Worker “{{name}}”: Workers & Pages → {{name}} → Settings → Delete.`,bucket:`Delete the R2 bucket “{{bucket}}”: R2 → {{bucket}} → Settings → Delete Bucket.`,repository:`Delete the repository the button created for this copy.`,token:`Delete its build token in My Profile → API Tokens, if nothing else uses it.`}}},boards:{actions:{delete:`Delete`,restore:`Restore`,archive:`Archive`,rename:`Rename`,back:`Back`,undo:`Undo`},board:{region:`Board {{name}}`,archived:`Archived`,actions:`Board actions`,rename:`Rename board`,nameLabel:`Name`,delete:`Delete board`,empty:{title:`This board has no columns`,body:`Create columns for the stages of your work.`},filterActive:`Filter on · dragging is turned off`,removeFilter:`Remove filter`},drag:{instructions:`To pick up an item, press Space. Use the arrow keys to move it, then press Space again to drop it. Press Escape to cancel.`,card:{picked:`You picked up the card “{{title}}”. Column “{{column}}”, position {{position}} of {{total}}.`,over:`The card “{{title}}” is in column “{{column}}”, position {{position}} of {{total}}.`,outside:`The card “{{title}}” isn’t over a valid drop area.`,dropped:`You dropped the card “{{title}}”. Column “{{column}}”, position {{position}} of {{total}}.`,droppedOutside:`You dropped the card “{{title}}”.`,cancelled:`Moving the card “{{title}}” was canceled.`},column:{picked:`You picked up the column “{{title}}”. Position {{position}} of {{total}}.`,over:`The column “{{title}}” is at position {{position}} of {{total}}.`,outside:`The column “{{title}}” isn’t over a valid drop area.`,dropped:`You dropped the column “{{title}}”. Position {{position}} of {{total}}.`,droppedOutside:`You dropped the column “{{title}}”.`,cancelled:`Moving the column “{{title}}” was canceled.`}},filter:{button:`Filter`,search:`Search by title…`,searchLabel:`Search by title`,due:`Due date`,dues:{all:`All`,overdue:`Overdue`,week:`This week`,none:`No date`},labels:`Labels`,clear:`Clear filter`},column:{region:`Column {{name}}`,roleDescription:`column`,handle:`{{name}}. Double-click to rename, press Space to move`,name:`Column name`,add:`Add column`,addCardTo:`Add card to {{name}}`,actions:`Actions for {{name}}`,addCard:`Add card`,delete:`Delete column`,cards:`Cards in {{name}}`,noMatches:`Nothing matches the filter`,dropHere:`Drop cards here`,deleteConfirm:{title:`Delete the column “{{name}}”?`,withCards_one:`Its card will be deleted too. To keep it, move it to another column first.`,withCards_other:`Its {{count}} cards will be deleted too. To keep them, move them to another column first.`,empty:`The column is empty.`}},composer:{placeholder:`What needs to be done?`,hint:`<kbd>↵</kbd> add · <kbd>esc</kbd> close`,submit:`Add`},card:{title:`Card title`,roleDescription:`card`,checklist:`Checklist`,hasDescription:`Has a description`,linkedDocs:`Linked documents`,attachments:`Attachments`,createdByName:`Created by {{name}}`},sheet:{fallbackTitle:`Card`,label:`Card details`,gone:`This card no longer exists`,archived:`Archived`,agentEditing:`{{name}} is editing`,saving:`Saving…`,saved:`Saved`,actions:`Card actions`,archivedToast:`Card archived`,deleteConfirm:{title:`Delete this card?`,description:`It’ll be deleted along with its checklists and attachments. To just hide it, archive it instead.`},labels:`Labels`,addLabels:`Add labels`,due:`Due`,noDate:`No date`,createdBy:`Created by`,unknownCreator:`Unknown`,description:`Description`,descriptionPlaceholder:`Add context, acceptance criteria or notes. Press “/” to insert.`,descriptionLabel:`Card description`,checklists:`Checklists`,addChecklist:`+ Add`,newChecklistTitle:`Checklist`,checklistsEmpty:`Break the task into steps you can check off.`,linkedDocs:`Linked documents`,attachments:`Attachments`,activity:`Activity`},checklist:{titleLabel:`Checklist title`,actions:`Checklist actions`,delete:`Delete checklist`,progress:`Progress`,item:`Item`,deleteItem:`Delete “{{text}}”`,addItem:`Add item`,newItemPlaceholder:`New item, then Enter`,newItem:`New item`},due:{today:`Today`,tomorrow:`Tomorrow`,monday:`Monday`,inAWeek:`In a week`,remove:`Remove date`},labels:{title:`Labels`,newTitle:`New label`,editTitle:`Edit label`,namePlaceholder:`Name (optional)`,nameLabel:`Label name`,empty:`This board doesn’t have any labels yet.`,unnamed:`Unnamed`,editNamed:`Edit {{name}}`,editUnnamed:`Edit label`,create:`Create label`},linked:{mentioned:`mentioned`,unlinkNamed:`Unlink {{title}}`,unlinkUntitled:`Unlink page`,link:`Link document`,search:`Search pages…`,searchLabel:`Search pages`,noResults:`No results.`,hint:`Type to search the whole workspace.`},archived:{sheetTitle:`Archived cards`,heading:`Archived`,emptyTitle:`Nothing archived`,emptyBody:`Cards that you or your agents archive show up here, and you can restore them.`,deleteConfirm:`Delete “{{title}}” permanently?`},attachments:{deleteConfirm:`Delete “{{name}}”?`,download:`Download {{name}}`,deleteNamed:`Delete {{name}}`,uploading:`Uploading…`,attach:`Attach file`}},common:{language:`Language`,skipToContent:`Skip to content`,loading:`Loading`,actions:{cancel:`Cancel`,confirm:`Confirm`,save:`Save`,close:`Close`,copy:`Copy`,view:`View`,backHome:`Back to home`},dialog:{fallbackTitle:`Dialog`,details:`Details`},copyFailed:`Couldn’t copy to the clipboard`,notFound:{title:`Nothing here`,body:`The page doesn’t exist or you don’t have access to it.`},time:{justNow:`just now`},due:{today:`Today`,tomorrow:`Tomorrow`,yesterday:`Yesterday`},greeting:{night:`Good evening`,morning:`Good morning`,afternoon:`Good afternoon`,evening:`Good evening`},color:`Color`,colors:{tomato:`Persimmon`,amber:`Amber`,lime:`Lime`,jade:`Jade`,teal:`Turquoise`,cobalt:`Cobalt`,iris:`Iris`,rose:`Pink`,slate:`Slate`},untitled:`Untitled`,quoted:`“{{text}}”`},docs:{page:{status:{saving:`Saving…`,pending:`Unsaved changes`,saved:`Saved`,error:`Not saved`},actions:`Page actions`,newSubpage:`New subpage`,move:`Move to…`,delete:`Delete page`,titleLabel:`Page title`,editedBy:`Edited by <name>{{name}}</name> · {{time}}`,agentWorking:`{{name}} is working here`,agentUpdated:`{{name}} updated this page`,linkedTasks:`Linked tasks`,conflict:{byName:`<strong>{{name}}</strong> changed this page while you were editing. Your latest changes weren’t saved.`,byOtherSession:`<strong>Another session</strong> changed this page while you were editing. Your latest changes weren’t saved.`,loadTheirs:`Load their version`,keepMine:`Keep mine`},content:`Page content`,subpages:`Subpages`,attachments:`Attachments`},editor:{placeholder:`Write, or press “/” to insert…`,headingPlaceholder:`Heading`,label:`Content`,uploading:`Uploading {{name}}…`,uploaded:`File attached`,noBlocks:`No blocks match`,mentionHint:`Type to search tasks and pages`,groups:{blocks:`Blocks`,lists:`Lists`,insert:`Insert`,tasks:`Tasks`,pages:`Pages`},slash:{p:{title:`Text`,subtitle:`Plain paragraph`,keywords:`text paragraph body`},h1:{title:`Heading 1`,subtitle:`Large heading`,keywords:`heading title h1`},h2:{title:`Heading 2`,subtitle:`Section heading`,keywords:`heading title h2`},h3:{title:`Heading 3`,subtitle:`Subsection`,keywords:`heading title h3`},ul:{title:`List`,subtitle:`Bulleted list`,keywords:`list bullet bulleted ul`},ol:{title:`Numbered list`,subtitle:`1, 2, 3…`,keywords:`list numbered ordered ol`},todo:{title:`To-do list`,subtitle:`Checkboxes to tick off`,keywords:`todo task checklist check`},quote:{title:`Quote`,subtitle:`Make a passage stand out`,keywords:`quote blockquote`},code:{title:`Code`,subtitle:`Code block`,keywords:`code snippet`},table:{title:`Table`,subtitle:`3 × 3 with a header row`,keywords:`table grid`},hr:{title:`Divider`,subtitle:`Horizontal line`,keywords:`divider separator hr line rule`},mention:{title:`Link a task or page`,subtitle:`Type @ and search`,keywords:`mention link task page`},image:{title:`Image`,subtitle:`Upload a PNG, JPG, GIF or WebP`,keywords:`image photo picture`},file:{title:`File`,subtitle:`Attach any file`,keywords:`file attachment upload`}},mention:{card:`Task · {{board}} · {{column}}`,page:`Page · {{project}}`},menu:{slash:`Insert block`,mention:`Link a task or page`,searching:`Searching…`,noMatches:`No matches`},format:{linkPlaceholder:`https://… or /doc/…`,linkLabel:`Link address`,openLink:`Open link`,editLink:`Edit link`,removeLink:`Remove link`,bold:`Bold`,italic:`Italic`,strike:`Strikethrough`,code:`Code`,link:`Link`}},icon:{change:`Change icon`,add:`Add icon`,use:`Use {{icon}}`,remove:`Remove icon`},move:{title:`Move page`,description:`Choose where to put it in the project.`,root:`project root`,moved:`Page moved`}},errors:{codes:{invalid_access_key:`The access key isn’t correct.`,invalid_setup_code:`The setup code isn’t correct.`,recovery_not_ready:`Your copy doesn’t have a new setup code yet. If you just changed it, wait a moment (sometimes a few minutes) and try again.`,already_claimed:`This copy is already set up. Sign in with your access key.`,not_claimed:`This copy isn’t set up yet.`,rate_limited:`Too many attempts. Wait a few minutes.`,network:`There’s no connection to the server.`,file_too_large:`The file is larger than the maximum allowed size.`,upload_incomplete:`The upload was interrupted. Try again.`,last_workspace:`You need to keep at least one workspace.`},notFound:`The item couldn’t be found.`,server:`Something went wrong on the server. Try again.`,unknown:`Something went wrong. Try again.`},home:{title:`Home`,greeting:`{{greeting}}, <name>{{name}}</name>.`,onboarding:{title:`Getting started`,dismiss:`Hide getting started`,progress:`{{done}} of {{total}} done`,project:{title:`Create a project`,body:`Group boards and documents together.`},page:{title:`Write a page`,body:`Document in Markdown, with “/” and “@”.`},vault:{title:`Set up the vault`,body:`End-to-end encrypted.`},agent:{title:`Connect an agent`,body:`Claude, Cursor or VS Code, over MCP.`}},due:{title:`Due soon`,empty:`Nothing is due in the next 7 days.`},recent:{title:`Recent documents`,empty:`No documents yet.`},activity:{title:`Activity`,agents:`Agent activity`,empty:`What you and your agents do will show up here.`}},oauth:{problems:{unknown_client:`Orqevio doesn’t recognize this app, or the description it publishes isn’t valid.`,bad_redirect:`The address it wants to return to doesn’t belong to this app. To keep you safe, nothing is sent there.`},problem:{title:`This app can’t be connected`,home:`Go to Orqevio`},leaving:{title:`Returning to the app…`,subtitle:{plain:`Taking you back to {{name}}.`,computer:`Taking you back to {{name}} on this computer.`,app:`Taking you back to the “{{name}}” app on this computer.`}},consent:{title:`Connect {{name}}`,subtitle:`An app wants to work in your copy of Orqevio through MCP. Choose what it can access.`,app:`App`,returnsTo:{plain:`When you’re done, you’ll return to {{name}}`,computer:`When you’re done, you’ll return to {{name}} on this computer`,app:`When you’re done, you’ll return to the “{{name}}” app on this computer`},publishedBy:`Its description is published by {{publisher}}.`,unverified:`It registered itself, so its name isn’t verified. Only continue if you just connected it yourself.`,local:`A program on this computer will receive the access.`,workspace:`Workspace`,existing:`{{name}} already has access to this workspace (last used {{when}}).`,existingUnused:`{{name}} already has access to this workspace, although it hasn’t used it yet.`,replace:`Replace the earlier access`,replaceHint:`It stops working as soon as this one is connected. Untick it if you’re connecting another {{name}} account.`,allow:`Allow access`,revokeLater:`You can revoke this access at any time in Agents.`}},projects:{edit:`Edit`,delete:`Delete project`,summary:`{{boards}} · {{pages}}`,boardCount_one:`{{count}} board`,boardCount_other:`{{count}} boards`,pageCount_one:`{{count}} page`,pageCount_other:`{{count}} pages`,boards:{title:`Boards`,new:`New board`,openCards_one:`{{count}} open card`,openCards_other:`{{count}} open cards`,empty:`Create a Kanban board to organize this project’s tasks.`},docs:{title:`Documents`,new:`New page`,subpages_one:`{{count}} subpage`,subpages_other:`{{count}} subpages`,emptyTitle:`No documents yet`,emptyAction:`Write the first page`,emptyBody:`Specs, decisions, processes or meeting notes. In Markdown and linked to your tasks.`},recent:`Recently edited`},settings:{title:`Settings`,profile:{title:`Profile`,description:`Your name appears in the workspace’s activity.`,name:`Name`,saved:`Profile updated`},appearance:{title:`Appearance`,description:`Saved in your copy and applied on all your devices.`,theme:`Theme`,themes:{system:`System`,light:`Light`,dark:`Dark`}},language:{title:`Language`,description:`The app speaks it on all your devices, and new boards get their default columns in it.`},accessKey:{title:`Access key`,description:`It’s what you use to sign in to this copy. Generating a new one signs out your other sessions. It doesn’t affect the vault’s master password.`,current:`Current key`,generate:`Generate a new key`,newTitle:`Your new access key`,newDescription:`The old key no longer works, and your other sessions have been signed out. It’s shown only once.`,done:`Done`,updated:`Access key updated`},workspace:{title:`Workspace`,description:`Agent tokens and projects belong to a specific workspace.`,name:`Workspace name`,saved:`Workspace updated`,delete:`Delete workspace`,deleteTitle:`Delete the workspace “{{name}}”?`,deleteDescription:`Its projects, boards, documents, attachments and tokens will be deleted. This can’t be undone.`,deleted:`Workspace deleted`},copy:{title:`This copy`,description:`The version of Orqevio you’re running. Your copy checks for new versions at most every 12 hours.`},version:{upToDate:`You’re up to date.`,available:`A new version is available: {{version}}`,how:{cli:`Run this on your computer:`,button:`Merge the Dependabot pull request in your copy’s repository, and it deploys itself. If you don’t see one, bump the create-orqevio version in its package.json.`,docker:`In your copy’s folder:`,source:`In the repository, then restart the server:`},copy:`Copy command`,copied:`Command copied`,kept:`Your data, access key and vault are preserved.`,releaseNotes:`See what’s new`},erase:{title:`Erase this copy`,description:`Permanently erases your workspaces, your vault and your tokens. The copy will ask for the setup code again.`,action:`Erase all my data`,confirmDescription:`This can’t be undone. Enter your access key to confirm.`,accessKey:`Access key`,confirm:`Erase permanently`,done:`Data erased`},uninstall:{title:`Uninstall Orqevio`,description:`Deletes everything for good, attachments included, and leaves this copy unusable. Then it shows how to remove the copy itself from your Cloudflare account or your server.`,action:`Uninstall Orqevio…`,confirmDescription:`This can’t be undone. You’ll lose:`,loses:{data:`Your workspaces, projects, boards and documents.`,files:`Every attachment.`,vault:`Your vault. To keep it, export an encrypted copy from the vault first.`,agents:`Your agents’ access and every session.`},afterwards:`This is step 1 of 2. In step 2 you’ll see how to remove the copy itself from your Cloudflare account or your server.`,oneCommand:`Installed it with the command? From your computer, <code>{{command}}</code> does both steps at once.`,accessKey:`Access key`,typeName:`Type “{{name}}” to confirm`,confirm:`Uninstall for good`}},shell:{nav:{label:`Main navigation`,search:`Search or jump to…`,home:`Home`,vault:`Vault`,agents:`Agents`,agentLive:`Agent active`,projects:`Projects`,newProject:`New project`,firstProject:{title:`Create your first project`,body:`Group boards and documents in one place.`},vaultLocked:`Locked`,vaultUnlocked:`Unlocked`},workspace:{fallback:`Workspace`,heading:`Workspaces`,new:`New workspace`,newDescription:`Workspaces keep contexts apart, such as personal and work. Each agent token belongs to a single workspace.`,name:`Name`,create:`Create workspace`,settings:`Settings`},project:{collapse:`Collapse {{name}}`,expand:`Expand {{name}}`,actions:`Actions for {{name}}`,newBoard:`New board`,newPage:`New page`,newPageIn:`New page in {{name}}`,rename:`Name and color`,delete:`Delete project`,empty:`Empty`},tree:{collapse:`Collapse`,expand:`Expand`,newSubpage:`New subpage`},user:{updateAvailable:`A new version of Orqevio is available`,settings:`Settings`,newVersion:`New version`,appearance:`Appearance`,theme:{system:`System`,light:`Light`,dark:`Dark`},signOut:`Sign out`},header:{hideSidebar:`Hide sidebar`,showSidebar:`Show sidebar`,toggleSidebar:`Toggle sidebar`,breadcrumb:`Breadcrumb`},newProject:{title:`New project`,description:`A project groups related boards and documents.`,name:`Name`,namePlaceholder:`e.g. Website launch`,color:`Color`,withBoard:`Create a board`,startWithBoard:`Start with a board`,boardHint:`Columns {{columns}}. You can change them at any time.`,boardName:`Tasks`,create:`Create project`},projectSettings:{title:`Project`,name:`Name`,description:`Description`,optional:`Optional`,color:`Color`},actions:{newBoard:{title:`New board`,label:`Board name`,placeholder:`e.g. Launch sprint`,confirm:`Create board`},deleteBoard:{title:`Delete “{{name}}”?`,body:`Its columns and cards will be deleted. This can’t be undone.`,confirm:`Delete board`,done:`Board deleted`},deletePage:{title:`Delete “{{name}}”?`,body:`Its subpages and attachments will be deleted too. This can’t be undone.`,confirm:`Delete page`,done:`Page deleted`},deleteProject:{title:`Delete the project “{{name}}”?`,body:`All its boards, cards, pages and attachments will be deleted. This can’t be undone.`,confirm:`Delete project`,done:`Project deleted`}},palette:{label:`Command palette`,title:`Search`,description:`Search projects, boards, pages and cards, or run an action.`,placeholder:`Search tasks, documents or actions…`,searching:`Searching…`,noResults:`No results. Try other words.`,inContent:`In the content`,navigate:`Go to`,structure:`Projects, boards and pages`,project:`Project`,actions:`Actions`,newProject:`New project`,lightTheme:`Switch to light theme`,darkTheme:`Switch to dark theme`,lockVault:`Lock the vault`,hintNavigate:`navigate`,hintOpen:`open`,keywords:{home:`Home`,vault:`Vault passwords`,agents:`Agents MCP tokens`,settings:`Settings account`,project:`project`,board:`board`,page:`page`,newProject:`New project create`,theme:`Change theme light dark appearance`,lockVault:`Lock vault`}}},vault:{title:`Vault`,back:`← Back`,reveal:{show:`Show`,hide:`Hide`},types:{login:`Login`,note:`Secure note`},untitled:{login:`Untitled`,note:`Untitled note`},master:{label:`Master password`,new:`New master password`,repeatNew:`Repeat the new password`,newTooShort:`The new password needs at least 12 characters.`,mismatch:`The passwords don’t match.`,wrong:`Wrong master password.`},unsupported:{insecureTitle:`The vault needs a secure connection`,browserTitle:`The vault doesn’t work in this browser`,blockers:{secure_context:`You opened Orqevio over an unencrypted connection (http://). Browsers only allow the vault’s encryption on secure connections: open your copy over https:// (for example, behind Caddy, Nginx, or Traefik) or, on the same computer, at http://localhost.`,webcrypto:`This browser doesn’t offer WebCrypto, which the vault uses to encrypt your data.`,workers:`This browser doesn’t support Web Workers, which the vault uses to derive your key without freezing the page.`,webassembly:`This browser doesn’t support WebAssembly, which the vault uses to derive your key with Argon2id.`},updateBrowser:`Use a current version of Chrome, Edge, Firefox, or Safari.`,restWorks:`Your tasks and documents keep working as usual.`},toolbar:{autoLockTimer:`Locks automatically after inactivity`,generator:`Generator`,options:`Vault options`,changeMaster:`Change master password`,import:`Import…`,export:`Export…`,autoLock:`Auto-lock`,autoLockMinutes_one:`After {{count}} minute of inactivity`,autoLockMinutes_other:`After {{count}} minutes of inactivity`,autoLockHours_one:`After {{count}} hour of inactivity`,autoLockHours_other:`After {{count}} hours of inactivity`,lock:`Lock`,generatorTitle:`Password generator`,generatorDescription:`Unbiased cryptographic randomness from your browser.`},list:{search:`Search the vault`,new:`New`,filter:`Filter`,filters:{all:`All`,logins:`Logins`,notes:`Notes`},label:`Vault items`,noMatches:`No matches.`,empty:`Your vault is empty.`,footer_one:`{{count}} item · decrypted only in this browser`,footer_other:`{{count}} items · decrypted only in this browser`},empty:{select:`Select an item`,first:`Save your first login`,newLogin:`New login`,body:`Everything is encrypted in your browser before it’s sent to the server. Neither the server nor your agents can read it.`},delete:{title:`Delete “{{title}}”?`,description:`It will be permanently deleted from your vault.`,confirm:`Delete`},detail:{updatedLogin:`Login · updated {{time}}`,updatedNote:`Secure note · updated {{time}}`,favorite:`Mark as favorite`,unfavorite:`Remove from favorites`,edit:`Edit`,delete:`Delete`,username:`Username`,copyUsername:`Copy username`,usernameCopied:`Username copied`,password:`Password`,showPassword:`Show password`,hidePassword:`Hide password`,copyPassword:`Copy password`,passwordCopied:`Password copied · the clipboard clears in 30 s`,website:`Website`,openWebsite:`Open website`,copyUrl:`Copy URL`,urlCopied:`URL copied`,content:`Content`,notes:`Notes`,copyNotes:`Copy notes`,notesCopied:`Copied`,clipboardClears:`When you copy something, the clipboard clears itself after 30 seconds.`},totp:{label:`Verification code`,copy:`Copy code`,copied:`Code copied · the clipboard clears in 30 s`,current:`Current verification code`,changesIn_one:`Changes in {{count}} second`,changesIn_other:`Changes in {{count}} seconds`,problems:{empty:`Enter the secret key or the otpauth:// link.`,not_totp:`Only time-based codes (TOTP) are supported.`,bad_secret:`The secret key can only contain the letters A to Z and the digits 2 to 7.`,too_short:`The secret key is too short.`,bad_parameters:`The otpauth:// link has invalid parameters.`}},editor:{editTitle:`Edit item`,newLogin:`New login`,newNote:`New secure note`,name:`Name`,namePlaceholderLogin:`e.g. Bank, GitHub, office Wi-Fi`,namePlaceholderNote:`e.g. Backup codes`,username:`Username or email`,password:`Password`,generate:`Generate password`,website:`Website`,websitePlaceholder:`example.com`,totp:`Two-step verification (TOTP)`,totpPlaceholder:`Secret key or otpauth:// link`,totpHint:`The key the service shows you next to the QR code when you turn on two-step verification.`,content:`Content`,notes:`Notes`,save:`Encrypt and save`},changeMaster:{title:`Change master password`,description:`Your items aren’t encrypted again: only the vault key is protected with the new password. Your recovery key stays valid.`,current:`Current master password`,submit:`Change`,wrongCurrent:`The current master password isn’t correct.`,done:`Master password updated`},strength:{emptyHint:`Use at least 12 characters. A phrase of several words is easy to remember and hard to guess.`,tooShort:`Too short`,tooShortHint:`You need at least 12 characters.`,fair:`Could be stronger`,fairHint:`Add more words or a wider mix of characters.`,good:`Good`,veryGood:`Very good`,rememberHint:`Remember: if you forget it, only the recovery key can open the vault.`},generator:{regenerate:`Generate another`,copied:`Copied · the clipboard clears in 30 s`,entropy:`≈ {{bits}} bits of entropy`,length:`Length`,sets:{upper:`Uppercase`,lower:`Lowercase`,digits:`Numbers`,symbols:`Symbols`},avoidAmbiguous:`Avoid ambiguous characters (I, l, 1, O, 0)`,use:`Use this password`,rating:{weak:`Weak`,fair:`Fair`,strong:`Strong`,excellent:`Excellent`}},gate:{guarantees:{encryption:`AES-256-GCM encryption in your browser`,kdf:`Key derived with Argon2id`,agents:`Agents and MCP have no access`},decryptFailed_one:`{{count}} item couldn’t be decrypted and was skipped.`,decryptFailed_other:`{{count}} items couldn’t be decrypted and were skipped.`,setup:{title:`Set up your vault`,subtitle:`Choose a master password. It’s used in your browser to encrypt your secrets and is never sent to the server.`,tooShort:`Use at least 12 characters.`,failed:`Couldn’t create the vault in this browser.`,repeat:`Repeat the master password`,busy:`Generating keys…`,submit:`Create vault`,ready:`Your vault is ready. Only you can open it.`},recoveryKey:{title:`Save your recovery key`,subtitle:`It’s the only way to recover the vault if you forget your master password. It’s shown only once.`,copied:`Recovery key copied`,download:`Download .txt`,fileName:`orqevio-recovery-key.txt`,fileText:`Orqevio — Vault recovery key
|
|
58
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0])a(n);else{if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}(e.metadataRegistry.get(n[0])?.id||r.cycle||r.count>1&&e.reused===`ref`)&&a(n)}}e.external&&(e.sharedDefsExtractedFor=e.external)}function rm(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;rm(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var im=new Set([`type`,`properties`,`required`,`additionalProperties`]),am=[`oneOf`,`anyOf`];function om(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function sm(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!im.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??om(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}mc(n,r,e.length===1?e[0]:sm(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=om(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function cm(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of im)if(t in e)return;let n=t.filter(e=>am.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=sm(t);else{let e=n[0],i=am.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>sm([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Qp(e,r))}function lm(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Qp(i,s),Qp(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())rm(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])cm(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Qp(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,mc(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:fm(t,`input`,e.processors),output:fm(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function um(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return um(r.element,n);if(r.type===`set`)return um(r.valueType,n);if(r.type===`lazy`)return um(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return um(r.innerType,n);if(r.type===`intersection`)return um(r.left,n)||um(r.right,n);if(r.type===`record`||r.type===`map`)return um(r.keyType,n)||um(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:um(r.in,n)||um(r.out,n);if(r.type===`object`){for(let e in r.shape)if(um(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(um(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(um(e,n))return!0;return!!(r.rest&&um(r.rest,n))}return!1}var dm=(e,t={})=>n=>{let r=$p({...n,processors:t});return q(e,r),nm(r,e),lm(r,e)},fm=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=$p({...i??{},target:a,io:t,processors:n});return q(e,o),nm(o,e),lm(o,e)},pm=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},mm=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},hm=(e,t)=>{pm(e,`minimum`,t),mm(e,`maximum`,t)},gm=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},_m=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},vm=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ym=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},bm=(e,t)=>pm(e,`minimum`,t.minimum),xm=(e,t)=>mm(e,`maximum`,t.maximum),Sm=e=>(t,n)=>{ym(t,n.format);let[r,i]=e[n.format];pm(t,`minimum`,r),mm(t,`maximum`,i)},Cm={greater_than:(e,t)=>pm(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>mm(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>gm(e,t.value),number_format:Sm(Pc),bigint_format:Sm(Fc),min_length:bm,max_length:xm,length_equals:(e,t)=>hm(e,t.length),min_size:bm,max_size:xm,size_equals:(e,t)=>hm(e,t.size),string_format:(e,t)=>{ym(e,t.format),t.pattern&&_m(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>vm(e,t.mime)};function wm(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Cm[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&pm(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&pm(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&mm(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&mm(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&gm(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&vm(t,i.mime);for(let e of i.patterns??[])_m(t,e);return t}var Tm={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Em=new Map([[Ad,mu],[Md,hu]]),Dm=e=>Em.get(e)??e,Om=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=wm(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Tm[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Dm);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},km=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=wm(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):em(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Am=(e,t,n,r)=>{n.type=`boolean`},jm=(e,t,n,r)=>{n.not={}},Mm=(e,t,n,r)=>{let i=e._zod.def,a=oc(i.entries);a.length===0?n.not={}:(a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a)},Nm=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(em(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(em(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Pm=(e,t,n,r)=>{em(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Fm=(e,t,n,r)=>{em(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Im=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=wm(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=q(a.element,t,{...r,path:[...r.path,`items`]})};function Lm(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Lm(t.out):t.type===`catch`?Lm(t.innerType):e._zod.optin}var Rm=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&em(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)mc(i.properties,e,q(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Lm(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=q(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},zm=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>q(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Bm=(e,t,n,r)=>{let i=e._zod.def,a=q(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=q(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)};function Vm(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=Vm(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>Vm(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i&&(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Eu:Tu).source)),p}var Hm=new WeakMap;function Um(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of Hm.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Vm(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var Wm=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=wm(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=q(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)mc(i.patternProperties,Dm(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=q(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Hm.get(t);n||(n=[],Hm.set(t,n),t.deferred.push(()=>Um(t))),n.push(e)}i.additionalProperties=q(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Lm(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},Gm=(e,t,n,r)=>{let i=e._zod.def,a=q(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Km=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},qm=Symbol();function Jm(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(em(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),qm):JSON.parse(o)}var Ym=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=Jm(i.defaultValue,e,t,n,r);o!==qm&&(n.default=o)},Xm=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=Jm(i.defaultValue,e,t,n,r);o!==qm&&(n._prefault=o)},Zm=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{em(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Qm=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;q(o,t,r);let s=t.seen.get(e);s.ref=o},$m=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},eh=(e,t,n,r)=>{let i=e._zod.def;q(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},th=new WeakSet([Object.prototype,Error.prototype]);function nh(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var rh=W(`ZodError`,(e,t)=>{Ol.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);th.has(n)||(th.add(n),nh(n,`format`,e=>t=>jl(e,t)),nh(n,`flatten`,e=>t=>Al(e,t)),nh(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,cc,2)}),nh(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,cc,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),ih=Nl(rh),ah=Pl(rh),oh=Fl(rh),sh=Ll(rh),ch=Ul(rh),lh=Wl(rh),uh=Gl(rh),dh=Kl(rh),fh=ql(rh),ph=Jl(rh),mh=Yl(rh),hh=Xl(rh);function gh(){xl.localeError||Sl(Wf())}function _h(){xl.memoizer||Sl({memoizer:Vf()})}var J=W(`ZodType`,(e,t)=>(gh(),G.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(xc(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return jc(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Pg(e,t))},superRefine(e,t){return this.check(Fg(e,t))},overwrite(e){return this.check(Hp(e))},optional(){return gg(this)},exactOptional(){return vg(this)},nullable(){return bg(this)},nullish(){return gg(bg(this))},nonoptional(e){return Eg(this,e)},array(){return tg(this)},or(e){return ig([this,e])},and(e){return og(this,e)},transform(e){return Ag(this,mg(e))},default(e){return Sg(this,e)},prefault(e){return wg(this,e)},catch(e){return Og(this,e)},pipe(e){return Ag(this,e)},readonly(){return Mg(this)},describe(e){let t=this.clone();return Jf.add(t,{description:e}),t},meta(...e){if(e.length===0)return Jf.get(this);let t=this.clone();return Jf.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return al(this,`~standard`,{...Qu(this),jsonSchema:{input:fm(this,`input`),output:fm(this,`output`)}})},set"~standard"(e){il(this,`~standard`,e)},parse:function e(t,n){return ih(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ah(this,t,n,{callee:e})},safeParse(e,t){return oh(this,e,t)},async safeParseAsync(e,t){return sh(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){il(this,`spa`,e)},validate(e,t){return Bl(this,e,t)},validateAsync(e,t){return Hl(this,e,t)},encode:function e(t,n){return ch(this,t,n,{callee:e})},decode:function e(t,n){return lh(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await uh(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await dh(this,t,n,{callee:e})},safeEncode(e,t){return fh(this,e,t)},safeDecode(e,t){return ph(this,e,t)},async safeEncodeAsync(e,t){return mh(this,e,t)},async safeDecodeAsync(e,t){return hh(this,e,t)},toJSONSchema(e){return dm(this,{})(e)},get description(){return Jf.get(this)?.description},get _def(){return this._zod.def}}),vh=W(`_ZodString`,(e,t)=>{$u.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Om(e,t,n,r)},ol({format:e=>wm(e).format??null,minLength:e=>wm(e).minimum??null,maxLength:e=>wm(e).maximum??null},{regex(...e){return this.check(Ip(...e))},includes(...e){return this.check(zp(...e))},startsWith(...e){return this.check(Bp(...e))},endsWith(...e){return this.check(Vp(...e))},min(...e){return this.check(Pp(...e))},max(...e){return this.check(Np(...e))},length(...e){return this.check(Fp(...e))},nonempty(...e){return this.check(Pp(1,...e))},lowercase(e){return this.check(Lp(e))},uppercase(e){return this.check(Rp(e))},trim(){return this.check(Wp())},normalize(...e){return this.check(Up(...e))},toLowerCase(){return this.check(Gp())},toUpperCase(){return this.check(Kp())},slugify(){return this.check(qp())}})),yh=W(`ZodString`,(e,t)=>{$u.init(e,t),vh.init(e,t)},{email(e){return this.check(Zf(wh,e))},url(e){return this.check(rp(Oh,e))},jwt(e){return this.check(vp(Uh,e))},emoji(e){return this.check(ip(kh,e))},guid(e){return this.check(Qf(Th,e))},uuid(e){return this.check($f(Eh,e))},uuidv4(e){return this.check(ep(Eh,e))},uuidv6(e){return this.check(tp(Eh,e))},uuidv7(e){return this.check(np(Eh,e))},nanoid(e){return this.check(ap(Ah,e))},cuid(e){return this.check(op(jh,e))},cuid2(e){return this.check(sp(Mh,e))},ulid(e){return this.check(cp(Nh,e))},base64(e){return this.check(hp(Bh,e))},base64url(e){return this.check(gp(Vh,e))},xid(e){return this.check(lp(Ph,e))},ksuid(e){return this.check(up(Fh,e))},ipv4(e){return this.check(dp(Ih,e))},ipv6(e){return this.check(fp(Lh,e))},cidrv4(e){return this.check(pp(Rh,e))},cidrv6(e){return this.check(mp(zh,e))},e164(e){return this.check(_p(Hh,e))},datetime(e){return this.check(yp(bh,e))},date(e){return this.check(bp(xh,e))},time(e){return this.check(xp(Sh,e))},duration(e){return this.check(Sp(Ch,e))}});function Y(e){return Xf(yh,e)}var X=W(`ZodStringFormat`,(e,t)=>{K.init(e,t),vh.init(e,t)}),bh=W(`ZodISODateTime`,(e,t)=>{vd.init(e,t),X.init(e,t)}),xh=W(`ZodISODate`,(e,t)=>{yd.init(e,t),X.init(e,t)}),Sh=W(`ZodISOTime`,(e,t)=>{bd.init(e,t),X.init(e,t)}),Ch=W(`ZodISODuration`,(e,t)=>{xd.init(e,t),X.init(e,t)}),wh=W(`ZodEmail`,(e,t)=>{nd.init(e,t),X.init(e,t)}),Th=W(`ZodGUID`,(e,t)=>{ed.init(e,t),X.init(e,t)}),Eh=W(`ZodUUID`,(e,t)=>{td.init(e,t),X.init(e,t)});function Dh(e){return $f(Eh,e)}var Oh=W(`ZodURL`,(e,t)=>{ud.init(e,t),X.init(e,t)}),kh=W(`ZodEmoji`,(e,t)=>{dd.init(e,t),X.init(e,t)}),Ah=W(`ZodNanoID`,(e,t)=>{fd.init(e,t),X.init(e,t)}),jh=W(`ZodCUID`,(e,t)=>{pd.init(e,t),X.init(e,t)}),Mh=W(`ZodCUID2`,(e,t)=>{md.init(e,t),X.init(e,t)}),Nh=W(`ZodULID`,(e,t)=>{hd.init(e,t),X.init(e,t)}),Ph=W(`ZodXID`,(e,t)=>{gd.init(e,t),X.init(e,t)}),Fh=W(`ZodKSUID`,(e,t)=>{_d.init(e,t),X.init(e,t)}),Ih=W(`ZodIPv4`,(e,t)=>{Sd.init(e,t),X.init(e,t)}),Lh=W(`ZodIPv6`,(e,t)=>{Td.init(e,t),X.init(e,t)}),Rh=W(`ZodCIDRv4`,(e,t)=>{Ed.init(e,t),X.init(e,t)}),zh=W(`ZodCIDRv6`,(e,t)=>{Od.init(e,t),X.init(e,t)}),Bh=W(`ZodBase64`,(e,t)=>{jd.init(e,t),X.init(e,t)}),Vh=W(`ZodBase64URL`,(e,t)=>{Pd.init(e,t),X.init(e,t)}),Hh=W(`ZodE164`,(e,t)=>{Fd.init(e,t),X.init(e,t)}),Uh=W(`ZodJWT`,(e,t)=>{Ld.init(e,t),X.init(e,t)}),Wh=W(`ZodNumber`,(e,t)=>{Rd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>km(e,t,n,r),e.isFinite=!0},ol({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=wm(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=wm(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=wm(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>wm(e).format??null},{gt(e,t){return this.check(Ap(e,t))},gte(e,t){return this.check(jp(e,t))},min(e,t){return this.check(jp(e,t))},lt(e,t){return this.check(Op(e,t))},lte(e,t){return this.check(kp(e,t))},max(e,t){return this.check(kp(e,t))},int(e){return this.check(qh(e))},safe(e){return this.check(qh(e))},positive(e){return this.check(Ap(0,e))},nonnegative(e){return this.check(jp(0,e))},negative(e){return this.check(Op(0,e))},nonpositive(e){return this.check(kp(0,e))},multipleOf(e,t){return this.check(Mp(e,t))},step(e,t){return this.check(Mp(e,t))},finite(){return this}}));function Gh(e){return Cp(Wh,e)}var Kh=W(`ZodNumberFormat`,(e,t)=>{zd.init(e,t),Wh.init(e,t)});function qh(e){return wp(Kh,e)}var Jh=W(`ZodBoolean`,(e,t)=>{Bd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Am(e,t,n,r)});function Yh(e){return Tp(Jh,e)}var Xh=W(`ZodUnknown`,(e,t)=>{Vd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Zh(){return Ep(Xh)}var Qh=W(`ZodNever`,(e,t)=>{Hd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jm(e,t,n,r)});function $h(e){return Dp(Qh,e)}var eg=W(`ZodArray`,(e,t)=>{_h(),Kd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Im(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Pp(e,t))},nonempty(e){return this.check(Pp(1,e))},max(e,t){return this.check(Np(e,t))},length(e,t){return this.check(Fp(e,t))},unwrap(){return this.element}});function tg(e,t){return Jp(eg,e,t)}var ng=W(`ZodObject`,(e,t)=>{_h(),Qd.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rm(e,t,n,r),fl(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return ug(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(xc(this._zod.def,{catchall:e}))},passthrough(){return this.clone(xc(this._zod.def,{catchall:Zh()}))},loose(){return this.clone(xc(this._zod.def,{catchall:Zh()}))},strict(){return this.clone(xc(this._zod.def,{catchall:$h()}))},strip(){return this.clone(xc(this._zod.def,{catchall:void 0}))},extend(e){return zc(this,e)},safeExtend(e){return Vc(this,e)},merge(e){return Hc(this,e)},pick(e){return Ic(this,e)},omit(e){return Rc(this,e)},partial(...e){return Uc(hg,this,e[0])},exactPartial(...e){return Uc(_g,this,e[0],`exactPartial`)},required(...e){return Wc(Tg,this,e[0])}});function Z(e,t){return new ng({type:`object`,shape:e??{},...H(t)})}var rg=W(`ZodUnion`,(e,t)=>{ef.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zm(e,t,n,r),e.options=t.options});function ig(e,t){return new rg({type:`union`,options:e,...H(t)})}var ag=W(`ZodIntersection`,(e,t)=>{tf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bm(e,t,n,r)});function og(e,t){return new ag({type:`intersection`,left:e,right:t})}var sg=W(`ZodRecord`,(e,t)=>{_h(),af.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wm(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function cg(e,t,n){return!t||!t._zod?new sg({type:`record`,keyType:Y(),valueType:e,...H(t)}):new sg({type:`record`,keyType:e,valueType:t,...H(n)})}var lg=W(`ZodEnum`,(e,t)=>{of.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mm(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new lg({...t,checks:[],...H(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new lg({...t,checks:[],...H(r),entries:i})}});function ug(e,t){return new lg({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...H(t)})}var dg=W(`ZodLiteral`,(e,t)=>{sf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nm(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function fg(e,t){return new dg({type:`literal`,values:Array.isArray(e)?e:[e],...H(t)})}var pg=W(`ZodTransform`,(e,t)=>{_h(),cf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fm(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new bl(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(nl(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(nl(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function mg(e){return new pg({type:`transform`,transform:e})}var hg=W(`ZodOptional`,(e,t)=>{uf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function gg(e){return new hg({type:`optional`,innerType:e})}var _g=W(`ZodExactOptional`,(e,t)=>{df.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function vg(e){return new _g({type:`optional`,innerType:e})}var yg=W(`ZodNullable`,(e,t)=>{ff.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function bg(e){return new yg({type:`nullable`,innerType:e})}var xg=W(`ZodDefault`,(e,t)=>{pf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ym(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Sg(e,t){return new xg({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Oc(t)}})}var Cg=W(`ZodPrefault`,(e,t)=>{hf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function wg(e,t){return new Cg({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Oc(t)}})}var Tg=W(`ZodNonOptional`,(e,t)=>{gf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Km(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Eg(e,t){return new Tg({type:`nonoptional`,innerType:e,...H(t)})}var Dg=W(`ZodCatch`,(e,t)=>{yf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Og(e,t){return new Dg({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ml(t)})}var kg=W(`ZodPipe`,(e,t)=>{bf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Qm(e,t,n,r),e.in=t.in,e.out=t.out});function Ag(e,t){return new kg({type:`pipe`,in:e,out:t})}var jg=W(`ZodReadonly`,(e,t)=>{Sf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$m(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Mg(e){return new jg({type:`readonly`,innerType:e})}var Ng=W(`ZodCustom`,(e,t)=>{wf.init(e,t),J.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pm(e,t,n,r)});function Pg(e,t={}){return Yp(Ng,e,t)}function Fg(e,t){return Xp(e,t)}function Ig(e){return yp(bh,e)}var Lg=[`tasks:read`,`tasks:write`,`docs:read`,`docs:write`];function Rg(e){let t=[];return e.tasks!==`none`&&t.push(`tasks:read`),e.tasks===`write`&&t.push(`tasks:write`),e.docs!==`none`&&t.push(`docs:read`),e.docs===`write`&&t.push(`docs:write`),t}function zg(e,t){return e.includes(`${t}:write`)?`write`:e.includes(`${t}:read`)?`read`:`none`}var Bg=Dh(),Q=(e=120)=>Y().trim().min(1,`Required`).max(e),Vg=ug(ec),Hg=Gh().int().min(0).max(1e5),Ug=Ig({offset:!0}),Wg=2e5,Gg=Y().trim().min(1,`Required`).max(256),Kg=Z({setupCode:Gg,name:Q(80),locale:ug(tc).optional()}),qg=Z({accessKey:Gg}),Jg=Z({setupCode:Gg,reason:ug([`lost`,`compromised`])});Z({currentAccessKey:Gg}),Z({accessKey:Gg}),Z({token:Y().min(40).max(200)}),Z({name:Q(80).optional(),theme:ug([`system`,`light`,`dark`]).optional(),locale:ug(tc).optional()}),Z({name:Q(60)}),Z({name:Q(80),color:Vg.default(`cobalt`),description:Y().trim().max(500).optional()}),Z({name:Q(80).optional(),color:Vg.optional(),description:Y().trim().max(500).optional()}),Z({name:Q(80),columns:tg(Q(60)).max(20).optional()}),Z({name:Q(80)}),Z({name:Q(60),index:Hg.optional()}),Z({name:Q(60).optional(),index:Hg.optional()}),Z({name:Y().trim().max(40).default(``),color:Vg}),Z({name:Y().trim().max(40).optional(),color:Vg.optional()}),Z({title:Q(300),description:Y().max(Wg).optional(),dueAt:Ug.nullable().optional(),labelIds:tg(Bg).max(20).optional(),index:Hg.optional()}),Z({title:Q(300).optional(),description:Y().max(Wg).optional(),baseVersion:Gh().int().min(1).optional(),dueAt:Ug.nullable().optional(),labelIds:tg(Bg).max(20).optional()}),Z({columnId:Bg,index:Hg}),Z({title:Q(120).default(`Checklist`)}),Z({title:Q(120)}),Z({text:Q(500)}),Z({text:Q(500).optional(),done:Yh().optional(),index:Hg.optional()}),Z({pageId:Bg}),Z({title:Y().trim().max(200).default(``),icon:Y().max(16).nullable().optional(),parentId:Bg.nullable().optional(),content:Y().max(Wg).default(``)}),Z({title:Y().trim().max(200).optional(),icon:Y().max(16).nullable().optional(),content:Y().max(Wg).optional(),baseVersion:Gh().int().min(1).optional()}),Z({parentId:Bg.nullable(),index:Hg}),Z({name:Q(60),workspaceId:Bg,scopes:tg(ug(Lg)).min(1,`Select at least one permission`),expiresInDays:ig([fg(30),fg(90),fg(365)]).nullable()});var Yg=Y().regex(/^[A-Za-z0-9+/=_-]+$/).max(4096),Xg=Z({algorithm:fg(`argon2id`),salt:Yg,memoryKiB:Gh().int().min(19456).max(1048576),iterations:Gh().int().min(2).max(20),parallelism:Gh().int().min(1).max(8)}),Zg=Y().regex(/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,`Invalid envelope`).max(4e5);Z({kdf:Xg,wrappedKey:Zg,recoveryWrappedKey:Zg}),Z({data:Zg}),Z({autoLockMinutes:ig([fg(1),fg(5),fg(15),fg(30),fg(60)])}),Z({params:cg(Y(),Y().max(4e3))}).extend({allow:Yh(),workspaceId:Y().optional(),scopes:tg(ug(Lg)).max(Lg.length).optional(),replace:Yh().optional()});var Qg=`X-File-Name`,$g={activity:{actions:{card:{created:`<actor>{{actor}}</actor> created the card <target>“{{target}}”</target>`,created_self:`<actor>{{actor}}</actor> created this card`,updated:`<actor>{{actor}}</actor> edited the card <target>“{{target}}”</target>`,updated_self:`<actor>{{actor}}</actor> edited this card`,moved:`<actor>{{actor}}</actor> moved the card <target>“{{target}}”</target>`,moved_self:`<actor>{{actor}}</actor> moved this card`,reordered:`<actor>{{actor}}</actor> reordered the card <target>“{{target}}”</target>`,reordered_self:`<actor>{{actor}}</actor> reordered this card`,archived:`<actor>{{actor}}</actor> archived the card <target>“{{target}}”</target>`,archived_self:`<actor>{{actor}}</actor> archived this card`,restored:`<actor>{{actor}}</actor> restored the card <target>“{{target}}”</target>`,restored_self:`<actor>{{actor}}</actor> restored this card`,deleted:`<actor>{{actor}}</actor> deleted the card <target>“{{target}}”</target>`,deleted_self:`<actor>{{actor}}</actor> deleted this card`,checklist:`<actor>{{actor}}</actor> updated the checklist of <target>“{{target}}”</target>`,checklist_self:`<actor>{{actor}}</actor> updated the checklist`,linked:`<actor>{{actor}}</actor> linked a document to <target>“{{target}}”</target>`,linked_self:`<actor>{{actor}}</actor> linked a document`,unlinked:`<actor>{{actor}}</actor> unlinked a document from <target>“{{target}}”</target>`,unlinked_self:`<actor>{{actor}}</actor> unlinked a document`},column:{created:`<actor>{{actor}}</actor> created the column <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> renamed the column <target>“{{target}}”</target>`,moved:`<actor>{{actor}}</actor> reordered the column <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the column <target>“{{target}}”</target>`},board:{created:`<actor>{{actor}}</actor> created the board <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> renamed the board <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the board <target>“{{target}}”</target>`},page:{created:`<actor>{{actor}}</actor> created the page <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> edited the page <target>“{{target}}”</target>`,moved:`<actor>{{actor}}</actor> moved the page <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the page <target>“{{target}}”</target>`},project:{created:`<actor>{{actor}}</actor> created the project <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> updated the project <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the project <target>“{{target}}”</target>`},label:{created:`<actor>{{actor}}</actor> created a label`,updated:`<actor>{{actor}}</actor> edited a label`,deleted:`<actor>{{actor}}</actor> deleted a label`},other:`<actor>{{actor}}</actor> made a change`},detail:{movedTo:`to {{to}}`,movedFromTo:`{{from}} → {{to}}`,createdIn:`in {{column}}`,linkedPage:`“{{page}}”`},viaMcp:`via MCP`},agents:{title:`Agents`,connect:`Connect an agent`,intro:{title:`Your agents, with clear permissions`,body:`Connect any MCP-compatible client to look up documentation, create tasks and reorganize boards. Each token belongs to a single workspace and can only do what you allow.`,endpoint:`Endpoint`,copyEndpoint:`Copy endpoint`,endpointCopied:`Endpoint copied`,oauth:`In Claude (web, desktop and mobile), add a custom connector with this endpoint. No token needed: you’ll be asked for permission here. Any client that supports OAuth works the same way.`},vault:{title:`The vault is out of their reach`,unreadable:`No token can read the vault, not even encrypted: the server rejects the request before it touches any data.`,noDeletes:`Agents can’t delete anything. They can only archive, and you can restore.`,logged:`Every action is logged, and you can watch it live in the app.`},tokens:{active:`Active connections`,emptyTitle:`You haven’t connected any agents yet`,emptyBody:`Create a token and paste the configuration into Claude Code, Cursor, VS Code or Claude Desktop.`,inactive_one:`{{count}} revoked or expired`,inactive_other:`{{count}} revoked or expired`},activity:{title:`Agent activity`,titleFor:`Activity by “{{name}}”`,showAll:`Show all`,loading:`Loading…`,empty:`When an agent works in this workspace, you’ll see it here.`},tools:{title:`MCP tools`,footnote:`Each agent only sees the tools its permissions allow.`,scopes:{read:`Read`,write:`Write`,tasksRead:`Tasks · read`,tasksWrite:`Tasks · write`,docsRead:`Documents · read`,docsWrite:`Documents · write`},descriptions:{listProjects:`Projects, boards and page outline`,search:`Search across cards and pages`,readBoards:`Columns, cards, checklists and links`,editCards:`Create, edit and move cards`,archiveCard:`Archive (restorable from the app)`,organizeBoards:`Reorganize boards`,labels:`Labels and checklists`,readPages:`Page tree and Markdown content`,writePages:`Create and update, with version control`,linkCard:`Link tasks and documents`,createProject:`Create projects`}},revoke:{action:`Revoke`,title:`Revoke “{{name}}”?`,description:`The agent loses access right away. Its past activity is kept.`,confirm:`Revoke access`,done:`Access revoked`},token:{oauth:{plain:`Connected with OAuth · returns to {{name}}`,computer:`Connected with OAuth · returns to {{name}} on this computer`,app:`Connected with OAuth · returns to the “{{name}}” app on this computer`},access:{tasks:{none:`Tasks: No access`,read:`Tasks: Read`,write:`Tasks: Read and write`},docs:{none:`Documents: No access`,read:`Documents: Read`,write:`Documents: Read and write`}},vaultNever:`Vault: never`,lastUsed:`Last used`,created:`Created`,revoked:`Revoked`,expires:`Expires`,expiresUnused:`Expires if unused`,never:`Never`,idle:`Not used for {{days}} days`,showActivity:`View its activity`},access:{levels:{none:`No access`,read:`Read`,write:`Read and write`},tasks:{label:`Tasks`,hint:`Boards, columns, cards and checklists`,group:`Access to tasks`},docs:{label:`Documents`,hint:`Pages and their Markdown content`,group:`Access to documents`},vault:{label:`Vault`,hint:`Never accessible to agents`,blocked:`Blocked`},atLeastOne:`Give read access to at least one area.`},kit:{clients:`MCP client`,terminal:`Terminal`,copy:`Copy configuration`,copied:`Configuration copied`,desktopNote:`Claude Desktop uses the mcp-remote bridge (Node.js) to send the authentication header.`,httpNote:`Streamable HTTP transport with Bearer authentication. Restart the client if it doesn’t find the server.`},create:{description:`Create a token for “{{workspace}}”. It can only reach this workspace, and only what you allow here.`,descriptionFallback:`Create a token for this workspace. It can only reach this workspace, and only what you allow here.`,name:`Agent name`,namePlaceholder:`e.g. Claude Code, Cursor, Support assistant`,expiry:`Expiration`,expiries:{30:`30 days`,90:`90 days`,365:`1 year`,never:`Never`},submit:`Create token`},created:{title:`“{{name}}” is ready`,description:`Copy the token now. For security, we only keep its fingerprint, so you won’t be able to see it again.`,copy:`Copy token`,copied:`Token copied`,done:`Done`}},auth:{hero:{title:`Organize.<br/>Document.<br/><accent>Protect.</accent>`,body:`One workspace for your projects, your knowledge and your credentials. Open to you and your AI agents, with permissions you control.`},pillars:{tasks:{title:`Tasks`,body:`Kanban boards, labels, due dates and checklists.`},docs:{title:`Docs`,body:`Nested Markdown pages, linked to your tasks.`},vault:{title:`Vault`,body:`End-to-end encrypted. Neither the server nor your agents can read it.`},agents:{title:`Agents`,body:`An MCP server with per-token permissions, so your LLMs can work alongside you.`}},orbit:{label:`Agents orbit your tasks and documents; the vault stays out of their reach`,tasks:`Tasks`,docs:`Docs`,vault:`Vault`},fields:{setupCode:{label:`Setup code`,show:`Show setup code`,hide:`Hide setup code`},newSetupCode:{label:`New setup code`,show:`Show new setup code`,hide:`Hide new setup code`},accessKey:{label:`Access key`,show:`Show access key`,hide:`Hide access key`},name:{label:`Your name`,hint:`Shown in the activity of your workspaces.`}},setup:{title:`Set up your copy`,subtitle:`This copy of Orqevio is yours alone. Enter the setup code you chose when you installed it. If you didn’t choose one, you’ll find it in the server log.`,submit:`Set up`,missingSetupCode:`Enter the setup code.`,missingName:`Enter your name.`},login:{title:`Welcome back`,subtitle:`Enter the access key for this copy of Orqevio.`,submit:`Sign in`,missingAccessKey:`Enter your access key.`,lostKey:`Lost your key?`},recovery:{intro:`Whoever manages this copy can generate a new key:`,cli:`Generate a new code from your computer and enter it here:`,button:`Change the <code>SETUP_CODE</code> secret in the Cloudflare dashboard (Workers & Pages → {{name}} → Settings → Variables and Secrets) and enter the new code here.`,cloudflare:`Change the copy’s <code>SETUP_CODE</code> secret (for example, with <code>npx wrangler secret put SETUP_CODE</code>) and enter the new code here.`,withCommand:`With this command on the server, which gives you the new key straight away (add --revoke-agents if someone else may have had the key):`,withNewCode:`With a new code: change <code>SETUP_CODE</code> in the copy’s configuration, restart it and enter the new code here.`,vaultUnaffected:`The vault isn’t affected: it stays protected by its master password.`,missingSetupCode:`Enter the new setup code.`,submit:`Recover access`,missingReason:`Choose why you’re recovering access.`,reason:{legend:`Why are you recovering access?`,lost:{label:`I lost my key`,hint:`Your agents stay connected.`},compromised:{label:`Someone else may have it`,hint:`All your agents are disconnected, Claude included. You can reconnect the ones you trust afterwards.`}}},revealed:{setup:{title:`Save your access key`,subtitle:`You’ll use it to sign in to this copy from any device. It’s shown only once, so save it in your password manager.`},recovery:{title:`Your new access key`,subtitle:`The old key no longer works, and every session has been signed out. Save this one in your password manager: it’s shown only once.`},continue:`Continue to Orqevio`,agents:{title:`Connected agents`,review:`They kept their access. If you don’t recognize one, revoke it.`,none:`No agent is connected to this copy.`,revoked:`Every agent has been disconnected. Reconnect the ones you trust from Agents.`}},keyReveal:{label:`Access key`,copied:`Key copied`,download:`Download .txt`,saved:`I’ve saved it somewhere safe, like my password manager.`},keyFile:{name:`orqevio-access-key.txt`,title:`Orqevio — Access key`,address:`Address: {{address}}`,key:`Key: {{key}}`,use:`Save it in your password manager. It signs you in to this copy of Orqevio from any device.`,lost:`If you lose it, whoever manages the copy can generate a new one. It doesn’t affect the vault’s master password.`},uninstalled:{title:`Orqevio was uninstalled`,subtitle:`This copy holds no data anymore: workspaces, documents, attachments, vault and agents are gone. Only the copy itself is left:`,cli:`Remove its Worker and its bucket from your Cloudflare account with:`,button:`In your Cloudflare and GitHub (or GitLab) accounts:`,cloudflare:`In your Cloudflare account:`,docker:`Stop it and delete its data, then delete the folder where you installed it:`,source:`Stop the server and delete its data folder (DATA_DIR, apps/server/data by default).`,steps:{worker:`Delete the Worker “{{name}}”: Workers & Pages → {{name}} → Settings → Delete.`,bucket:`Delete the R2 bucket “{{bucket}}”: R2 → {{bucket}} → Settings → Delete Bucket.`,repository:`Delete the repository the button created for this copy.`,token:`Delete its build token in My Profile → API Tokens, if nothing else uses it.`}}},boards:{actions:{delete:`Delete`,restore:`Restore`,archive:`Archive`,rename:`Rename`,back:`Back`,undo:`Undo`},board:{region:`Board {{name}}`,archived:`Archived`,actions:`Board actions`,rename:`Rename board`,nameLabel:`Name`,delete:`Delete board`,empty:{title:`This board has no columns`,body:`Create columns for the stages of your work.`},filterActive:`Filter on · dragging is turned off`,removeFilter:`Remove filter`},drag:{instructions:`To pick up an item, press Space. Use the arrow keys to move it, then press Space again to drop it. Press Escape to cancel.`,card:{picked:`You picked up the card “{{title}}”. Column “{{column}}”, position {{position}} of {{total}}.`,over:`The card “{{title}}” is in column “{{column}}”, position {{position}} of {{total}}.`,outside:`The card “{{title}}” isn’t over a valid drop area.`,dropped:`You dropped the card “{{title}}”. Column “{{column}}”, position {{position}} of {{total}}.`,droppedOutside:`You dropped the card “{{title}}”.`,cancelled:`Moving the card “{{title}}” was canceled.`},column:{picked:`You picked up the column “{{title}}”. Position {{position}} of {{total}}.`,over:`The column “{{title}}” is at position {{position}} of {{total}}.`,outside:`The column “{{title}}” isn’t over a valid drop area.`,dropped:`You dropped the column “{{title}}”. Position {{position}} of {{total}}.`,droppedOutside:`You dropped the column “{{title}}”.`,cancelled:`Moving the column “{{title}}” was canceled.`}},filter:{button:`Filter`,search:`Search by title…`,searchLabel:`Search by title`,due:`Due date`,dues:{all:`All`,overdue:`Overdue`,week:`This week`,none:`No date`},labels:`Labels`,clear:`Clear filter`},column:{region:`Column {{name}}`,roleDescription:`column`,handle:`{{name}}. Double-click to rename, press Space to move`,name:`Column name`,add:`Add column`,addCardTo:`Add card to {{name}}`,actions:`Actions for {{name}}`,addCard:`Add card`,delete:`Delete column`,cards:`Cards in {{name}}`,noMatches:`Nothing matches the filter`,dropHere:`Drop cards here`,deleteConfirm:{title:`Delete the column “{{name}}”?`,withCards_one:`Its card will be deleted too. To keep it, move it to another column first.`,withCards_other:`Its {{count}} cards will be deleted too. To keep them, move them to another column first.`,withArchived_one:`Its archived card will be deleted too. To keep it, restore it first from “Archived”.`,withArchived_other:`Its {{count}} archived cards will be deleted too. To keep them, restore them first from “Archived”.`,empty:`The column is empty.`}},composer:{placeholder:`What needs to be done?`,hint:`<kbd>↵</kbd> add · <kbd>esc</kbd> close`,submit:`Add`},card:{title:`Card title`,roleDescription:`card`,checklist:`Checklist`,hasDescription:`Has a description`,linkedDocs:`Linked documents`,attachments:`Attachments`,createdByName:`Created by {{name}}`},sheet:{fallbackTitle:`Card`,label:`Card details`,gone:`This card no longer exists`,archived:`Archived`,agentEditing:`{{name}} is editing`,agentUpdated:`{{name}} updated the description`,conflict:{byName:`<strong>{{name}}</strong> changed the description while you were editing. Your latest changes weren’t saved.`,byOtherSession:`<strong>Another session</strong> changed the description while you were editing. Your latest changes weren’t saved.`,loadTheirs:`Load their version`,keepMine:`Keep mine`,notSaved:`Your changes to the description weren’t saved: someone else changed it at the same time.`},saving:`Saving…`,saved:`Saved`,actions:`Card actions`,archivedToast:`Card archived`,deleteConfirm:{title:`Delete this card?`,description:`It’ll be deleted along with its checklists and attachments. To just hide it, archive it instead.`},labels:`Labels`,addLabels:`Add labels`,due:`Due`,noDate:`No date`,createdBy:`Created by`,unknownCreator:`Unknown`,description:`Description`,descriptionPlaceholder:`Add context, acceptance criteria or notes. Press “/” to insert.`,descriptionLabel:`Card description`,checklists:`Checklists`,addChecklist:`+ Add`,newChecklistTitle:`Checklist`,checklistsEmpty:`Break the task into steps you can check off.`,linkedDocs:`Linked documents`,attachments:`Attachments`,activity:`Activity`},checklist:{titleLabel:`Checklist title`,actions:`Checklist actions`,delete:`Delete checklist`,progress:`Progress`,item:`Item`,deleteItem:`Delete “{{text}}”`,addItem:`Add item`,newItemPlaceholder:`New item, then Enter`,newItem:`New item`},due:{today:`Today`,tomorrow:`Tomorrow`,monday:`Monday`,inAWeek:`In a week`,remove:`Remove date`},labels:{title:`Labels`,newTitle:`New label`,editTitle:`Edit label`,namePlaceholder:`Name (optional)`,nameLabel:`Label name`,empty:`This board doesn’t have any labels yet.`,unnamed:`Unnamed`,editNamed:`Edit {{name}}`,editUnnamed:`Edit label`,create:`Create label`},linked:{mentioned:`mentioned`,unlinkNamed:`Unlink {{title}}`,unlinkUntitled:`Unlink page`,link:`Link document`,search:`Search pages…`,searchLabel:`Search pages`,noResults:`No results.`,hint:`Type to search the whole workspace.`},archived:{sheetTitle:`Archived cards`,heading:`Archived`,emptyTitle:`Nothing archived`,emptyBody:`Cards that you or your agents archive show up here, and you can restore them.`,deleteConfirm:`Delete “{{title}}” permanently?`},attachments:{deleteConfirm:`Delete “{{name}}”?`,download:`Download {{name}}`,deleteNamed:`Delete {{name}}`,uploading:`Uploading…`,attach:`Attach file`}},common:{language:`Language`,skipToContent:`Skip to content`,loading:`Loading`,actions:{cancel:`Cancel`,confirm:`Confirm`,save:`Save`,close:`Close`,copy:`Copy`,view:`View`,backHome:`Back to home`},dialog:{fallbackTitle:`Dialog`,details:`Details`},copyFailed:`Couldn’t copy to the clipboard`,clipboard:{stillThere:`What you copied from the vault may still be in the clipboard.`,clear:`Clear it`,cleared:`Clipboard cleared`,clearFailed:`Couldn’t clear the clipboard`},notFound:{title:`Nothing here`,body:`The page doesn’t exist or you don’t have access to it.`},time:{justNow:`just now`},due:{today:`Today`,tomorrow:`Tomorrow`,yesterday:`Yesterday`},greeting:{night:`Good evening`,morning:`Good morning`,afternoon:`Good afternoon`,evening:`Good evening`},color:`Color`,colors:{tomato:`Persimmon`,amber:`Amber`,lime:`Lime`,jade:`Jade`,teal:`Turquoise`,cobalt:`Cobalt`,iris:`Iris`,rose:`Pink`,slate:`Slate`},untitled:`Untitled`,quoted:`“{{text}}”`},docs:{page:{status:{saving:`Saving…`,pending:`Unsaved changes`,saved:`Saved`,error:`Not saved`},actions:`Page actions`,newSubpage:`New subpage`,move:`Move to…`,delete:`Delete page`,titleLabel:`Page title`,editedBy:`Edited by <name>{{name}}</name> · {{time}}`,agentWorking:`{{name}} is working here`,agentUpdated:`{{name}} updated this page`,linkedTasks:`Linked tasks`,conflict:{byName:`<strong>{{name}}</strong> changed this page while you were editing. Your latest changes weren’t saved.`,byOtherSession:`<strong>Another session</strong> changed this page while you were editing. Your latest changes weren’t saved.`,loadTheirs:`Load their version`,keepMine:`Keep mine`},content:`Page content`,subpages:`Subpages`,attachments:`Attachments`},editor:{placeholder:`Write, or press “/” to insert…`,headingPlaceholder:`Heading`,label:`Content`,uploading:`Uploading {{name}}…`,uploaded:`File attached`,noBlocks:`No blocks match`,mentionHint:`Type to search tasks and pages`,groups:{blocks:`Blocks`,lists:`Lists`,insert:`Insert`,tasks:`Tasks`,pages:`Pages`},slash:{p:{title:`Text`,subtitle:`Plain paragraph`,keywords:`text paragraph body`},h1:{title:`Heading 1`,subtitle:`Large heading`,keywords:`heading title h1`},h2:{title:`Heading 2`,subtitle:`Section heading`,keywords:`heading title h2`},h3:{title:`Heading 3`,subtitle:`Subsection`,keywords:`heading title h3`},ul:{title:`List`,subtitle:`Bulleted list`,keywords:`list bullet bulleted ul`},ol:{title:`Numbered list`,subtitle:`1, 2, 3…`,keywords:`list numbered ordered ol`},todo:{title:`To-do list`,subtitle:`Checkboxes to tick off`,keywords:`todo task checklist check`},quote:{title:`Quote`,subtitle:`Make a passage stand out`,keywords:`quote blockquote`},code:{title:`Code`,subtitle:`Code block`,keywords:`code snippet`},table:{title:`Table`,subtitle:`3 × 3 with a header row`,keywords:`table grid`},hr:{title:`Divider`,subtitle:`Horizontal line`,keywords:`divider separator hr line rule`},mention:{title:`Link a task or page`,subtitle:`Type @ and search`,keywords:`mention link task page`},image:{title:`Image`,subtitle:`Upload a PNG, JPG, GIF or WebP`,keywords:`image photo picture`},file:{title:`File`,subtitle:`Attach any file`,keywords:`file attachment upload`}},mention:{card:`Task · {{board}} · {{column}}`,page:`Page · {{project}}`},menu:{slash:`Insert block`,mention:`Link a task or page`,searching:`Searching…`,noMatches:`No matches`},format:{linkPlaceholder:`https://… or /doc/…`,linkLabel:`Link address`,openLink:`Open link`,editLink:`Edit link`,removeLink:`Remove link`,bold:`Bold`,italic:`Italic`,strike:`Strikethrough`,code:`Code`,link:`Link`}},icon:{change:`Change icon`,add:`Add icon`,use:`Use {{icon}}`,remove:`Remove icon`},move:{title:`Move page`,description:`Choose where to put it in the project.`,root:`project root`,moved:`Page moved`}},errors:{codes:{invalid_access_key:`The access key isn’t correct.`,invalid_setup_code:`The setup code isn’t correct.`,setup_code_too_short:`This copy’s setup code has fewer than 12 letters A–Z or digits, so it can’t be used. Set a longer one (other characters, such as accents or other alphabets, don’t count) and try again.`,recovery_not_ready:`Your copy doesn’t have a new setup code yet. If you just changed it, wait a moment (sometimes a few minutes) and try again.`,already_claimed:`This copy is already set up. Sign in with your access key.`,not_claimed:`This copy isn’t set up yet.`,rate_limited:`Too many attempts. Wait a few minutes.`,network:`There’s no connection to the server.`,file_too_large:`The file is larger than the maximum allowed size.`,upload_incomplete:`The upload was interrupted. Try again.`,last_workspace:`You need to keep at least one workspace.`},notFound:`The item couldn’t be found.`,server:`Something went wrong on the server. Try again.`,unknown:`Something went wrong. Try again.`},home:{title:`Home`,greeting:`{{greeting}}, <name>{{name}}</name>.`,onboarding:{title:`Getting started`,dismiss:`Hide getting started`,progress:`{{done}} of {{total}} done`,project:{title:`Create a project`,body:`Group boards and documents together.`},page:{title:`Write a page`,body:`Document in Markdown, with “/” and “@”.`},vault:{title:`Set up the vault`,body:`End-to-end encrypted.`},agent:{title:`Connect an agent`,body:`Claude, Cursor or VS Code, over MCP.`}},due:{title:`Due soon`,empty:`Nothing is due in the next 7 days.`},recent:{title:`Recent documents`,empty:`No documents yet.`},activity:{title:`Activity`,agents:`Agent activity`,empty:`What you and your agents do will show up here.`}},oauth:{problems:{unknown_client:`Orqevio doesn’t recognize this app, or the description it publishes isn’t valid.`,bad_redirect:`The address it wants to return to doesn’t belong to this app. To keep you safe, nothing is sent there.`},problem:{title:`This app can’t be connected`,home:`Go to Orqevio`},leaving:{title:`Returning to the app…`,subtitle:{plain:`Taking you back to {{name}}.`,computer:`Taking you back to {{name}} on this computer.`,app:`Taking you back to the “{{name}}” app on this computer.`}},consent:{title:`Connect {{name}}`,subtitle:`An app wants to work in your copy of Orqevio through MCP. Choose what it can access.`,app:`App`,returnsTo:{plain:`When you’re done, you’ll return to {{name}}`,computer:`When you’re done, you’ll return to {{name}} on this computer`,app:`When you’re done, you’ll return to the “{{name}}” app on this computer`},publishedBy:`Its description is published by {{publisher}}.`,unverified:`It registered itself, so its name isn’t verified. Only continue if you just connected it yourself.`,local:`A program on this computer will receive the access.`,workspace:`Workspace`,existing:`{{name}} already has access to this workspace (last used {{when}}).`,existingUnused:`{{name}} already has access to this workspace, although it hasn’t used it yet.`,replace:`Replace the earlier access`,replaceHint:`It stops working as soon as this one is connected. Untick it if you’re connecting another {{name}} account.`,allow:`Allow access`,revokeLater:`You can revoke this access at any time in Agents.`}},projects:{edit:`Edit`,delete:`Delete project`,summary:`{{boards}} · {{pages}}`,boardCount_one:`{{count}} board`,boardCount_other:`{{count}} boards`,pageCount_one:`{{count}} page`,pageCount_other:`{{count}} pages`,boards:{title:`Boards`,new:`New board`,openCards_one:`{{count}} open card`,openCards_other:`{{count}} open cards`,empty:`Create a Kanban board to organize this project’s tasks.`},docs:{title:`Documents`,new:`New page`,subpages_one:`{{count}} subpage`,subpages_other:`{{count}} subpages`,emptyTitle:`No documents yet`,emptyAction:`Write the first page`,emptyBody:`Specs, decisions, processes or meeting notes. In Markdown and linked to your tasks.`},recent:`Recently edited`},settings:{title:`Settings`,profile:{title:`Profile`,description:`Your name appears in the workspace’s activity.`,name:`Name`,saved:`Profile updated`},appearance:{title:`Appearance`,description:`Saved in your copy and applied on all your devices.`,theme:`Theme`,themes:{system:`System`,light:`Light`,dark:`Dark`}},language:{title:`Language`,description:`The app speaks it on all your devices, and new boards get their default columns in it.`},accessKey:{title:`Access key`,description:`It’s what you use to sign in to this copy. Generating a new one signs out your other sessions. It doesn’t affect the vault’s master password.`,current:`Current key`,generate:`Generate a new key`,newTitle:`Your new access key`,newDescription:`The old key no longer works, and your other sessions have been signed out. It’s shown only once.`,done:`Done`,updated:`Access key updated`},workspace:{title:`Workspace`,description:`Agent tokens and projects belong to a specific workspace.`,name:`Workspace name`,saved:`Workspace updated`,delete:`Delete workspace`,deleteTitle:`Delete the workspace “{{name}}”?`,deleteDescription:`Its projects, boards, documents, attachments and tokens will be deleted. This can’t be undone.`,deleted:`Workspace deleted`},copy:{title:`This copy`,description:`The version of Orqevio you’re running. Your copy checks for new versions at most every 12 hours.`},version:{upToDate:`You’re up to date.`,available:`A new version is available: {{version}}`,how:{cli:`Run this on your computer:`,button:`Merge the Dependabot pull request in your copy’s repository, and it deploys itself. If you don’t see one, bump the create-orqevio version in its package.json.`,docker:`In your copy’s folder:`,source:`In the repository, then restart the server:`},copy:`Copy command`,copied:`Command copied`,kept:`Your data, access key and vault are preserved.`,releaseNotes:`See what’s new`},erase:{title:`Erase this copy`,description:`Permanently erases your workspaces, your vault and your tokens. The copy will ask for the setup code again.`,action:`Erase all my data`,confirmDescription:`This can’t be undone. Enter your access key to confirm.`,accessKey:`Access key`,confirm:`Erase permanently`,done:`Data erased`},uninstall:{title:`Uninstall Orqevio`,description:`Deletes everything for good, attachments included, and leaves this copy unusable. Then it shows how to remove the copy itself from your Cloudflare account or your server.`,action:`Uninstall Orqevio…`,confirmDescription:`This can’t be undone. You’ll lose:`,loses:{data:`Your workspaces, projects, boards and documents.`,files:`Every attachment.`,vault:`Your vault. To keep it, export an encrypted copy from the vault first.`,agents:`Your agents’ access and every session.`},afterwards:`This is step 1 of 2. In step 2 you’ll see how to remove the copy itself from your Cloudflare account or your server.`,oneCommand:`Installed it with the command? From your computer, <code>{{command}}</code> does both steps at once.`,accessKey:`Access key`,typeName:`Type “{{name}}” to confirm`,confirm:`Uninstall for good`}},shell:{nav:{label:`Main navigation`,search:`Search or jump to…`,home:`Home`,vault:`Vault`,agents:`Agents`,agentLive:`Agent active`,projects:`Projects`,newProject:`New project`,firstProject:{title:`Create your first project`,body:`Group boards and documents in one place.`},vaultLocked:`Locked`,vaultUnlocked:`Unlocked`},workspace:{fallback:`Workspace`,heading:`Workspaces`,new:`New workspace`,newDescription:`Workspaces keep contexts apart, such as personal and work. Each agent token belongs to a single workspace.`,name:`Name`,create:`Create workspace`,settings:`Settings`},project:{collapse:`Collapse {{name}}`,expand:`Expand {{name}}`,actions:`Actions for {{name}}`,newBoard:`New board`,newPage:`New page`,newPageIn:`New page in {{name}}`,rename:`Name and color`,delete:`Delete project`,empty:`Empty`},tree:{collapse:`Collapse`,expand:`Expand`,newSubpage:`New subpage`},user:{updateAvailable:`A new version of Orqevio is available`,settings:`Settings`,newVersion:`New version`,appearance:`Appearance`,theme:{system:`System`,light:`Light`,dark:`Dark`},signOut:`Sign out`},header:{hideSidebar:`Hide sidebar`,showSidebar:`Show sidebar`,toggleSidebar:`Toggle sidebar`,breadcrumb:`Breadcrumb`},newProject:{title:`New project`,description:`A project groups related boards and documents.`,name:`Name`,namePlaceholder:`e.g. Website launch`,color:`Color`,withBoard:`Create a board`,startWithBoard:`Start with a board`,boardHint:`Columns {{columns}}. You can change them at any time.`,boardName:`Tasks`,create:`Create project`},projectSettings:{title:`Project`,name:`Name`,description:`Description`,optional:`Optional`,color:`Color`},actions:{newBoard:{title:`New board`,label:`Board name`,placeholder:`e.g. Launch sprint`,confirm:`Create board`},deleteBoard:{title:`Delete “{{name}}”?`,body:`Its columns and cards will be deleted. This can’t be undone.`,confirm:`Delete board`,done:`Board deleted`},deletePage:{title:`Delete “{{name}}”?`,body:`Its subpages and attachments will be deleted too. This can’t be undone.`,confirm:`Delete page`,done:`Page deleted`},deleteProject:{title:`Delete the project “{{name}}”?`,body:`All its boards, cards, pages and attachments will be deleted. This can’t be undone.`,confirm:`Delete project`,done:`Project deleted`}},palette:{label:`Command palette`,title:`Search`,description:`Search projects, boards, pages and cards, or run an action.`,placeholder:`Search tasks, documents or actions…`,searching:`Searching…`,noResults:`No results. Try other words.`,inContent:`In the content`,navigate:`Go to`,structure:`Projects, boards and pages`,project:`Project`,actions:`Actions`,newProject:`New project`,lightTheme:`Switch to light theme`,darkTheme:`Switch to dark theme`,lockVault:`Lock the vault`,hintNavigate:`navigate`,hintOpen:`open`,keywords:{home:`Home`,vault:`Vault passwords`,agents:`Agents MCP tokens`,settings:`Settings account`,project:`project`,board:`board`,page:`page`,newProject:`New project create`,theme:`Change theme light dark appearance`,lockVault:`Lock vault`}}},vault:{title:`Vault`,back:`← Back`,reveal:{show:`Show`,hide:`Hide`},types:{login:`Login`,note:`Secure note`},untitled:{login:`Untitled`,note:`Untitled note`},master:{label:`Master password`,new:`New master password`,repeatNew:`Repeat the new password`,newTooShort:`The new password needs at least 12 characters.`,mismatch:`The passwords don’t match.`,wrong:`Wrong master password.`},unsupported:{insecureTitle:`The vault needs a secure connection`,browserTitle:`The vault doesn’t work in this browser`,blockers:{secure_context:`You opened Orqevio over an unencrypted connection (http://). Browsers only allow the vault’s encryption on secure connections: open your copy over https:// (for example, behind Caddy, Nginx, or Traefik) or, on the same computer, at http://localhost.`,webcrypto:`This browser doesn’t offer WebCrypto, which the vault uses to encrypt your data.`,workers:`This browser doesn’t support Web Workers, which the vault uses to derive your key without freezing the page.`,webassembly:`This browser doesn’t support WebAssembly, which the vault uses to derive your key with Argon2id.`},updateBrowser:`Use a current version of Chrome, Edge, Firefox, or Safari.`,restWorks:`Your tasks and documents keep working as usual.`},toolbar:{autoLockTimer:`Locks automatically after inactivity`,generator:`Generator`,options:`Vault options`,changeMaster:`Change master password`,import:`Import…`,export:`Export…`,autoLock:`Auto-lock`,autoLockMinutes_one:`After {{count}} minute of inactivity`,autoLockMinutes_other:`After {{count}} minutes of inactivity`,autoLockHours_one:`After {{count}} hour of inactivity`,autoLockHours_other:`After {{count}} hours of inactivity`,lock:`Lock`,generatorTitle:`Password generator`,generatorDescription:`Unbiased cryptographic randomness from your browser.`},list:{search:`Search the vault`,new:`New`,filter:`Filter`,filters:{all:`All`,logins:`Logins`,notes:`Notes`},label:`Vault items`,noMatches:`No matches.`,empty:`Your vault is empty.`,footer_one:`{{count}} item · decrypted only in this browser`,footer_other:`{{count}} items · decrypted only in this browser`},empty:{select:`Select an item`,first:`Save your first login`,newLogin:`New login`,body:`Everything is encrypted in your browser before it’s sent to the server. Neither the server nor your agents can read it.`},delete:{title:`Delete “{{title}}”?`,description:`It will be permanently deleted from your vault.`,confirm:`Delete`},detail:{updatedLogin:`Login · updated {{time}}`,updatedNote:`Secure note · updated {{time}}`,favorite:`Mark as favorite`,unfavorite:`Remove from favorites`,edit:`Edit`,delete:`Delete`,username:`Username`,copyUsername:`Copy username`,usernameCopied:`Username copied`,password:`Password`,showPassword:`Show password`,hidePassword:`Hide password`,copyPassword:`Copy password`,passwordCopied:`Password copied · cleared from the clipboard after 30 s, or you’ll be reminded`,website:`Website`,openWebsite:`Open website`,copyUrl:`Copy URL`,urlCopied:`URL copied`,content:`Content`,notes:`Notes`,copyNotes:`Copy notes`,notesCopied:`Copied`,clipboardClears:`When you copy a password, a note or a code, the clipboard is cleared after 30 seconds. If the browser doesn’t allow it, for example because you were in another tab, you can clear it with one click when you come back.`},totp:{label:`Verification code`,copy:`Copy code`,copied:`Code copied · cleared from the clipboard after 30 s, or you’ll be reminded`,current:`Current verification code`,changesIn_one:`Changes in {{count}} second`,changesIn_other:`Changes in {{count}} seconds`,problems:{empty:`Enter the secret key or the otpauth:// link.`,not_totp:`Only time-based codes (TOTP) are supported.`,bad_secret:`The secret key can only contain the letters A to Z and the digits 2 to 7.`,too_short:`The secret key is too short.`,bad_parameters:`The otpauth:// link has invalid parameters.`}},editor:{editTitle:`Edit item`,newLogin:`New login`,newNote:`New secure note`,name:`Name`,namePlaceholderLogin:`e.g. Bank, GitHub, office Wi-Fi`,namePlaceholderNote:`e.g. Backup codes`,username:`Username or email`,password:`Password`,generate:`Generate password`,website:`Website`,websitePlaceholder:`example.com`,totp:`Two-step verification (TOTP)`,totpPlaceholder:`Secret key or otpauth:// link`,totpHint:`The key the service shows you next to the QR code when you turn on two-step verification.`,content:`Content`,notes:`Notes`,save:`Encrypt and save`},changeMaster:{title:`Change master password`,description:`Your items aren’t encrypted again: only the vault key is protected with the new password. Your recovery key stays valid.`,current:`Current master password`,submit:`Change`,wrongCurrent:`The current master password isn’t correct.`,done:`Master password updated`},strength:{emptyHint:`Use at least 12 characters. A phrase of several words is easy to remember and hard to guess.`,tooShort:`Too short`,tooShortHint:`You need at least 12 characters.`,fair:`Could be stronger`,fairHint:`Add more words or a wider mix of characters.`,good:`Good`,veryGood:`Very good`,rememberHint:`Remember: if you forget it, only the recovery key can open the vault.`},generator:{regenerate:`Generate another`,copied:`Copied · cleared from the clipboard after 30 s, or you’ll be reminded`,entropy:`≈ {{bits}} bits of entropy`,length:`Length`,sets:{upper:`Uppercase`,lower:`Lowercase`,digits:`Numbers`,symbols:`Symbols`},avoidAmbiguous:`Avoid ambiguous characters (I, l, 1, O, 0)`,use:`Use this password`,rating:{weak:`Weak`,fair:`Fair`,strong:`Strong`,excellent:`Excellent`}},gate:{guarantees:{encryption:`AES-256-GCM encryption in your browser`,kdf:`Key derived with Argon2id`,agents:`Agents and MCP have no access`},decryptFailed_one:`{{count}} item couldn’t be decrypted and was skipped.`,decryptFailed_other:`{{count}} items couldn’t be decrypted and were skipped.`,setup:{title:`Set up your vault`,subtitle:`Choose a master password. It’s used in your browser to encrypt your secrets and is never sent to the server.`,tooShort:`Use at least 12 characters.`,failed:`Couldn’t create the vault in this browser.`,repeat:`Repeat the master password`,busy:`Generating keys…`,submit:`Create vault`,ready:`Your vault is ready. Only you can open it.`},recoveryKey:{title:`Save your recovery key`,subtitle:`It’s the only way to recover the vault if you forget your master password. It’s shown only once.`,copied:`Recovery key copied`,download:`Download .txt`,fileName:`orqevio-recovery-key.txt`,fileText:`Orqevio — Vault recovery key
|
|
59
59
|
|
|
60
60
|
{{recoveryKey}}
|
|
61
61
|
|
|
62
62
|
Keep it outside Orqevio (for example, printed or in another password manager).
|
|
63
63
|
It lets you reset the master password. No one else can recover it for you.
|
|
64
|
-
`,saved:`I’ve saved it somewhere safe, outside Orqevio.`,open:`Open my vault`},unlock:{title:`Vault locked`,subtitle:`Enter your master password to decrypt your logins in this browser.`,busy:`Decrypting…`,submit:`Unlock`,forgot:`Forgot your master password?`},recover:{title:`Recover the vault`,subtitle:`Use the recovery key you saved when you created the vault to choose a new master password.`,recoveryKey:`Recovery key`,recoveryKeyPlaceholder:`XXXX-XXXX-XXXX-…`,submit:`Reset and open`,noKey:`I don’t have the key`,invalidKey:`The recovery key isn’t valid.`,done:`Master password reset`},reset:{title:`Reset the vault`,description:`Without the master password or the recovery key, no one can decrypt your data, not even us. Resetting permanently deletes every item.`,accessKey:`Access key`,accessKeyHint:`Confirm it’s you with this copy’s access key (not the master password).`,submit:`Delete and reset`,done:`Vault reset. You can set it up again.`}},import:{title:`Import into the vault`,description:`The file is read and encrypted in this browser: the server only receives items that are already encrypted.`,formats:`Supports the CSV that Chrome, Edge, Firefox, and Safari export, Bitwarden’s CSV and unencrypted JSON, and encrypted Orqevio exports.`,choose:`Choose file`,fileLabel:`File to import`,tooLarge:`The file is too large (over {{size}} MB).`,problems:{empty:`The file is empty.`,unknown_format:`Orqevio doesn’t recognize this file. Use the CSV that Chrome, Edge, Firefox, or Safari export, Bitwarden’s CSV or JSON, or an Orqevio export.`,bitwarden_encrypted:`This is an encrypted Bitwarden export. Export it again as unencrypted “.json” or “.csv” and import it here.`,no_items:`The file has no logins or notes.`},encrypted_one:`This is an encrypted Orqevio export with {{count}} item. Enter the master password you had when you exported it.`,encrypted_other:`This is an encrypted Orqevio export with {{count}} items. Enter the master password you had when you exported it.`,exportPassword:`Export password`,decrypt:`Decrypt`,wrongPassword:`That’s not the password this export was made with.`,sources:{chromeOrEdge:`From Chrome or Edge:`,firefox:`From Firefox:`,safari:`From Safari:`,bitwardenCsv:`From Bitwarden (CSV):`,bitwardenJson:`From Bitwarden (JSON):`,csv:`From a CSV file:`,orqevio:`From Orqevio (encrypted):`},newLogins_one:`{{count}} new login`,newLogins_other:`{{count}} new logins`,newNotes_one:`{{count}} new note`,newNotes_other:`{{count}} new notes`,nothingNew:`Nothing new to import`,duplicates_one:`{{count}} item is already in your vault and will be skipped`,duplicates_other:`{{count}} items are already in your vault and will be skipped`,unsupported_one:`{{count}} item isn’t supported (cards or identities) and won’t be imported`,unsupported_other:`{{count}} items aren’t supported (cards or identities) and won’t be imported`,unencryptedWarning:`The file you chose isn’t encrypted: delete it from your computer when you’re done.`,chooseAnother:`Choose another`,progress:`Encrypting {{done}} of {{total}}…`,submit_one:`Import {{count}} item`,submit_other:`Import {{count}} items`,failed_one:`{{count}} item couldn’t be imported. Import the file again: items already imported will be skipped.`,failed_other:`{{count}} items couldn’t be imported. Import the file again: items already imported will be skipped.`,done_one:`{{count}} item imported`,done_other:`{{count}} items imported`,locked:`The vault locked before the import finished. Unlock it and import the file again: anything already imported will be skipped.`,untitledNote:`Note`,untitledLogin:`Untitled`,damaged:`This export is damaged and can’t be read.`},export:{title:`Export the vault`,description:`Download all your items as a file, prepared in this browser.`,kind:`Export type`,kinds:{encrypted:`Encrypted`,plain:`Unencrypted`},encryptedInfo:`Only your current master password opens it. Use it as a backup or to move your items to another copy of Orqevio.`,plainInfo:`In Bitwarden’s JSON format, which most password managers can import. Anyone who has the file can read it.`,understood:`I understand the file isn’t encrypted and that anyone who has it can read all my passwords.`,submitPlain:`Export unencrypted`,submitEncrypted:`Export encrypted`,fileNameEncrypted:`orqevio-vault-encrypted-{{date}}.json`,fileNamePlain:`orqevio-vault-unencrypted-{{date}}.json`,done_one:`{{count}} item exported`,done_other:`{{count}} items exported`,tooLarge:`The export is larger than {{size}} MB: Orqevio won’t be able to import it.`}}},e_=Object.keys($g),t_=`modulepreload`,n_=function(e){return`/`+e},r_={},i_=function(e){return e.pathname.endsWith(`.css`)},a_=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=n_(t,n);let r=s(t),i=i_(r);return a_(r_,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:t_,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},o_=Object.assign({"./locales/de/activity.json":()=>$(()=>import(`./activity-BHGI6Z2D.js`).then(e=>e.default),[]),"./locales/de/agents.json":()=>$(()=>import(`./agents-B2XabUwG.js`).then(e=>e.default),[]),"./locales/de/auth.json":()=>$(()=>import(`./auth-DXyQ1sR9.js`).then(e=>e.default),[]),"./locales/de/boards.json":()=>$(()=>import(`./boards-BTpgk9Fd.js`).then(e=>e.default),[]),"./locales/de/common.json":()=>$(()=>import(`./common-ChyM3qEm.js`).then(e=>e.default),[]),"./locales/de/docs.json":()=>$(()=>import(`./docs-lc4Fuqxy.js`).then(e=>e.default),[]),"./locales/de/errors.json":()=>$(()=>import(`./errors-DJVH_VFT.js`).then(e=>e.default),[]),"./locales/de/home.json":()=>$(()=>import(`./home-DMs617rt.js`).then(e=>e.default),[]),"./locales/de/oauth.json":()=>$(()=>import(`./oauth-BqnFE4AA.js`).then(e=>e.default),[]),"./locales/de/projects.json":()=>$(()=>import(`./projects--t9VhdYF.js`).then(e=>e.default),[]),"./locales/de/settings.json":()=>$(()=>import(`./settings-DN08srMi.js`).then(e=>e.default),[]),"./locales/de/shell.json":()=>$(()=>import(`./shell-BJfYCj5Q.js`).then(e=>e.default),[]),"./locales/de/vault.json":()=>$(()=>import(`./vault-DzWE-kQx.js`).then(e=>e.default),[]),"./locales/es/activity.json":()=>$(()=>import(`./activity-C7wpXysw.js`).then(e=>e.default),[]),"./locales/es/agents.json":()=>$(()=>import(`./agents-D_gfLGIh.js`).then(e=>e.default),[]),"./locales/es/auth.json":()=>$(()=>import(`./auth-SCXskweB.js`).then(e=>e.default),[]),"./locales/es/boards.json":()=>$(()=>import(`./boards-BWeP1yma.js`).then(e=>e.default),[]),"./locales/es/common.json":()=>$(()=>import(`./common-kLH8MGZF.js`).then(e=>e.default),[]),"./locales/es/docs.json":()=>$(()=>import(`./docs-CMM1mWDN.js`).then(e=>e.default),[]),"./locales/es/errors.json":()=>$(()=>import(`./errors-BGvYEtI3.js`).then(e=>e.default),[]),"./locales/es/home.json":()=>$(()=>import(`./home-tJQGjAOo.js`).then(e=>e.default),[]),"./locales/es/oauth.json":()=>$(()=>import(`./oauth-B5NFSQMb.js`).then(e=>e.default),[]),"./locales/es/projects.json":()=>$(()=>import(`./projects-aUO3NoCx.js`).then(e=>e.default),[]),"./locales/es/settings.json":()=>$(()=>import(`./settings-zS8H2ZNY.js`).then(e=>e.default),[]),"./locales/es/shell.json":()=>$(()=>import(`./shell-BiFljnPL.js`).then(e=>e.default),[]),"./locales/es/vault.json":()=>$(()=>import(`./vault-ShnECcLf.js`).then(e=>e.default),[]),"./locales/fr/activity.json":()=>$(()=>import(`./activity-ayIU9KmV.js`).then(e=>e.default),[]),"./locales/fr/agents.json":()=>$(()=>import(`./agents-DLrh2pf6.js`).then(e=>e.default),[]),"./locales/fr/auth.json":()=>$(()=>import(`./auth-CWjUpxax.js`).then(e=>e.default),[]),"./locales/fr/boards.json":()=>$(()=>import(`./boards-BBpjZP1x.js`).then(e=>e.default),[]),"./locales/fr/common.json":()=>$(()=>import(`./common-DSH0t9-R.js`).then(e=>e.default),[]),"./locales/fr/docs.json":()=>$(()=>import(`./docs-BrgMwu04.js`).then(e=>e.default),[]),"./locales/fr/errors.json":()=>$(()=>import(`./errors-DACTZxtE.js`).then(e=>e.default),[]),"./locales/fr/home.json":()=>$(()=>import(`./home-CaRivmXC.js`).then(e=>e.default),[]),"./locales/fr/oauth.json":()=>$(()=>import(`./oauth-DqVF11QW.js`).then(e=>e.default),[]),"./locales/fr/projects.json":()=>$(()=>import(`./projects-BVQGJc7P.js`).then(e=>e.default),[]),"./locales/fr/settings.json":()=>$(()=>import(`./settings-CAp-i3rq.js`).then(e=>e.default),[]),"./locales/fr/shell.json":()=>$(()=>import(`./shell-a4R2bNYB.js`).then(e=>e.default),[]),"./locales/fr/vault.json":()=>$(()=>import(`./vault-CjqTbMtS.js`).then(e=>e.default),[]),"./locales/it/activity.json":()=>$(()=>import(`./activity-Cp8KuBts.js`).then(e=>e.default),[]),"./locales/it/agents.json":()=>$(()=>import(`./agents-D7tpgjuk.js`).then(e=>e.default),[]),"./locales/it/auth.json":()=>$(()=>import(`./auth-CqESesWQ.js`).then(e=>e.default),[]),"./locales/it/boards.json":()=>$(()=>import(`./boards-PfnbSN1s.js`).then(e=>e.default),[]),"./locales/it/common.json":()=>$(()=>import(`./common-DpRzCGRI.js`).then(e=>e.default),[]),"./locales/it/docs.json":()=>$(()=>import(`./docs-1w1qMhXT.js`).then(e=>e.default),[]),"./locales/it/errors.json":()=>$(()=>import(`./errors-y3K623sq.js`).then(e=>e.default),[]),"./locales/it/home.json":()=>$(()=>import(`./home-taXbu6Bg.js`).then(e=>e.default),[]),"./locales/it/oauth.json":()=>$(()=>import(`./oauth-DyKo7CI7.js`).then(e=>e.default),[]),"./locales/it/projects.json":()=>$(()=>import(`./projects-CrDJIGi7.js`).then(e=>e.default),[]),"./locales/it/settings.json":()=>$(()=>import(`./settings-DOoufuYZ.js`).then(e=>e.default),[]),"./locales/it/shell.json":()=>$(()=>import(`./shell-BJoyar8n.js`).then(e=>e.default),[]),"./locales/it/vault.json":()=>$(()=>import(`./vault-CLMnyhXX.js`).then(e=>e.default),[]),"./locales/ja/activity.json":()=>$(()=>import(`./activity-CaibDu14.js`).then(e=>e.default),[]),"./locales/ja/agents.json":()=>$(()=>import(`./agents-DJ-oR1WA.js`).then(e=>e.default),[]),"./locales/ja/auth.json":()=>$(()=>import(`./auth-C58Nm5w2.js`).then(e=>e.default),[]),"./locales/ja/boards.json":()=>$(()=>import(`./boards-R_TWYEXU.js`).then(e=>e.default),[]),"./locales/ja/common.json":()=>$(()=>import(`./common-CeY0FMhM.js`).then(e=>e.default),[]),"./locales/ja/docs.json":()=>$(()=>import(`./docs-BDzOa1yl.js`).then(e=>e.default),[]),"./locales/ja/errors.json":()=>$(()=>import(`./errors-_k7icfYU.js`).then(e=>e.default),[]),"./locales/ja/home.json":()=>$(()=>import(`./home-JcVjUU4G.js`).then(e=>e.default),[]),"./locales/ja/oauth.json":()=>$(()=>import(`./oauth-Cfwu6jFm.js`).then(e=>e.default),[]),"./locales/ja/projects.json":()=>$(()=>import(`./projects-CNfl9kuI.js`).then(e=>e.default),[]),"./locales/ja/settings.json":()=>$(()=>import(`./settings-DClD_ufE.js`).then(e=>e.default),[]),"./locales/ja/shell.json":()=>$(()=>import(`./shell-FiDu6Ti9.js`).then(e=>e.default),[]),"./locales/ja/vault.json":()=>$(()=>import(`./vault-Dwv3fhwH.js`).then(e=>e.default),[]),"./locales/nl/activity.json":()=>$(()=>import(`./activity-BkftiStp.js`).then(e=>e.default),[]),"./locales/nl/agents.json":()=>$(()=>import(`./agents-COJYAQfq.js`).then(e=>e.default),[]),"./locales/nl/auth.json":()=>$(()=>import(`./auth-BINwoLLL.js`).then(e=>e.default),[]),"./locales/nl/boards.json":()=>$(()=>import(`./boards-COhITBby.js`).then(e=>e.default),[]),"./locales/nl/common.json":()=>$(()=>import(`./common-SQxQWeOo.js`).then(e=>e.default),[]),"./locales/nl/docs.json":()=>$(()=>import(`./docs-D4GytCg-.js`).then(e=>e.default),[]),"./locales/nl/errors.json":()=>$(()=>import(`./errors-CZ1BX441.js`).then(e=>e.default),[]),"./locales/nl/home.json":()=>$(()=>import(`./home-DT1m0uVZ.js`).then(e=>e.default),[]),"./locales/nl/oauth.json":()=>$(()=>import(`./oauth-BIEEGPBd.js`).then(e=>e.default),[]),"./locales/nl/projects.json":()=>$(()=>import(`./projects-D3eU-Jew.js`).then(e=>e.default),[]),"./locales/nl/settings.json":()=>$(()=>import(`./settings-BPFNhdWr.js`).then(e=>e.default),[]),"./locales/nl/shell.json":()=>$(()=>import(`./shell-CkAa8NM5.js`).then(e=>e.default),[]),"./locales/nl/vault.json":()=>$(()=>import(`./vault-CQVJONUp.js`).then(e=>e.default),[]),"./locales/pt/activity.json":()=>$(()=>import(`./activity-CFR4UTGM.js`).then(e=>e.default),[]),"./locales/pt/agents.json":()=>$(()=>import(`./agents-DMp1p8Qv.js`).then(e=>e.default),[]),"./locales/pt/auth.json":()=>$(()=>import(`./auth-ByK78s7m.js`).then(e=>e.default),[]),"./locales/pt/boards.json":()=>$(()=>import(`./boards-Ctsx-Cza.js`).then(e=>e.default),[]),"./locales/pt/common.json":()=>$(()=>import(`./common-ZaFMftqj.js`).then(e=>e.default),[]),"./locales/pt/docs.json":()=>$(()=>import(`./docs-WZJP9ehA.js`).then(e=>e.default),[]),"./locales/pt/errors.json":()=>$(()=>import(`./errors-D6cvqHzs.js`).then(e=>e.default),[]),"./locales/pt/home.json":()=>$(()=>import(`./home-VZIRoQVj.js`).then(e=>e.default),[]),"./locales/pt/oauth.json":()=>$(()=>import(`./oauth-CK3lCh9i.js`).then(e=>e.default),[]),"./locales/pt/projects.json":()=>$(()=>import(`./projects-BsY2PmjV.js`).then(e=>e.default),[]),"./locales/pt/settings.json":()=>$(()=>import(`./settings-BWaFf59A.js`).then(e=>e.default),[]),"./locales/pt/shell.json":()=>$(()=>import(`./shell-BBK5NJFB.js`).then(e=>e.default),[]),"./locales/pt/vault.json":()=>$(()=>import(`./vault-BJ0YNaBV.js`).then(e=>e.default),[])}),s_=tc.filter(e=>e===`en`||Object.keys(o_).some(t=>t.startsWith(`./locales/${e}/`))),c_=e=>rc(e)&&s_.includes(e),l_=`orqevio.locale`;function u_(){try{let e=localStorage.getItem(l_);return c_(e)?e:null}catch{return null}}function d_(){let e=navigator.languages?.length?navigator.languages:[navigator.language];return u_()??ic(e,s_)??`en`}var f_={type:`backend`,init(){},read(e,t,n){let r=o_[`./locales/${e}/${t}.json`];if(!r)return n(Error(`No "${t}" catalog for "${e}"`),!1);r().then(e=>n(null,e),e=>n(e,!1))}};async function p_(){V.on(`languageChanged`,e=>{document.documentElement.lang=e}),await V.use(f_).use(As).init({lng:d_(),fallbackLng:`en`,supportedLngs:[...s_],load:`currentOnly`,ns:e_,defaultNS:`common`,resources:{en:$g},partialBundledLanguages:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1}})}var m_=()=>rc(V.resolvedLanguage)?V.resolvedLanguage:`en`;async function h_(e){if(c_(e)){try{localStorage.setItem(l_,e)}catch{}V.resolvedLanguage!==e&&await V.changeLanguage(e)}}var g_=class extends Error{status;code;details;constructor(e,t,n,r){super(n),this.status=e,this.code=t,this.details=r}};async function __(e,t,n,r){let i={Accept:`application/json`},a={method:e,credentials:`same-origin`,signal:r,headers:i};n instanceof Blob?(a.body=n,i[`Content-Type`]=n.type||`application/octet-stream`,n instanceof File&&(i[Qg]=encodeURIComponent(n.name))):n!==void 0&&(i[`Content-Type`]=`application/json`,a.body=JSON.stringify(n));let o;try{o=await fetch(`/api${t}`,a)}catch(e){throw e.name===`AbortError`?e:new g_(0,`network`,`No connection to the server`)}if(o.status===204)return;let s=await o.text(),c=s?v_(s):null;if(!o.ok){let e=c?.error;throw new g_(o.status,e?.code??`error`,e?.message??o.statusText,e?.details)}return c}function v_(e){try{return JSON.parse(e)}catch{return null}}var y_=(e,t)=>__(`GET`,e,void 0,t),b_=(e,t={})=>__(`POST`,e,t),x_=(e,t)=>__(`PATCH`,e,t),S_=(e,t)=>__(`PUT`,e,t),C_=e=>__(`DELETE`,e),w_=[`invalid_access_key`,`invalid_setup_code`,`recovery_not_ready`,`already_claimed`,`not_claimed`,`rate_limited`,`network`,`file_too_large`,`upload_incomplete`,`last_workspace`],T_=e=>w_.includes(e);function E_(e){return e instanceof g_?T_(e.code)?ss(`errors:codes.${e.code}`):e.status===404?ss(`errors:notFound`):e.status>=500?ss(`errors:server`):e.message:ss(`errors:unknown`)}var D_=new Fe({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0,retry:(e,t)=>!(t instanceof g_&&t.status>=400&&t.status<500)&&e<2},mutations:{retry:!1}}}),O_={me:[`me`],access:[`access`],overview:e=>[`overview`,e],home:e=>[`home`,e],board:e=>[`board`,e],archived:e=>[`archived`,e],card:e=>[`card`,e],page:e=>[`page`,e],search:(e,t)=>[`search`,e,t],tokens:[`tokens`],updates:[`updates`],activity:(e,t)=>[`activity`,e,t],vault:[`vault`],vaultItems:[`vault-items`]},k_=()=>L({queryKey:O_.me,queryFn:async({signal:e})=>{let t=await y_(`/auth/session`,e);if(!t.user)throw D_.setQueryData(O_.access,t),new g_(401,`unauthorized`,`Authentication required`);return t},staleTime:6e4}),A_=()=>L({queryKey:O_.access,queryFn:({signal:e})=>y_(`/auth/session`,e),staleTime:0}),j_=e=>L({queryKey:O_.overview(e??``),queryFn:({signal:t})=>y_(`/workspaces/${e}/overview`,t),enabled:!!e}),M_=e=>L({queryKey:O_.home(e),queryFn:({signal:t})=>y_(`/workspaces/${e}/home`,t)}),N_=e=>L({queryKey:O_.board(e),queryFn:({signal:t})=>y_(`/boards/${e}`,t)}),P_=(e,t)=>L({queryKey:O_.archived(e),queryFn:({signal:t})=>y_(`/boards/${e}/archived`,t),enabled:t}),F_=e=>L({queryKey:O_.card(e??``),queryFn:({signal:t})=>y_(`/cards/${e}`,t),enabled:!!e}),I_=e=>L({queryKey:O_.page(e),queryFn:({signal:t})=>y_(`/pages/${e}`,t),staleTime:5e3}),L_=(e,t,n)=>L({queryKey:[...O_.search(e,t),n??`all`],queryFn:({signal:r})=>y_(`/workspaces/${e}/search?q=${encodeURIComponent(t)}${n?`&type=${n}`:``}`,r),enabled:t.trim().length>=2,placeholderData:ee,staleTime:1e4}),R_=()=>L({queryKey:O_.tokens,queryFn:({signal:e})=>y_(`/tokens`,e)}),z_=36e5,B_=()=>L({queryKey:O_.updates,queryFn:({signal:e})=>y_(`/updates`,e),staleTime:z_,refetchInterval:z_,refetchOnWindowFocus:!1,retry:!1}),V_=(e,t={})=>{let n=new URLSearchParams({limit:`40`});return t.agentsOnly&&n.set(`agents`,`1`),t.tokenId&&n.set(`tokenId`,t.tokenId),L({queryKey:O_.activity(e,n.toString()),queryFn:({signal:t})=>y_(`/workspaces/${e}/activity?${n}`,t)})};export{Qa as $,qg as A,js as B,s_ as C,$ as D,p_ as E,ec as F,_s as G,Es as H,$s as I,cs as J,gs as K,zs as L,Rg as M,ac as N,Kg as O,nc as P,Za as Q,Rs as R,S_ as S,m_ as T,Cs as U,ks as V,ys as W,Vo as X,us as Y,ss as Z,C_ as _,P_ as a,Ti as at,x_ as b,M_ as c,L as ct,I_ as d,a as dt,sa as et,L_ as f,r as ft,__ as g,g_ as h,V_ as i,Si as it,zg as j,Jg as k,k_ as l,u as lt,B_ as m,D_ as n,ra as nt,N_ as o,ki as ot,R_ as p,hs as q,A_ as r,Ja as rt,F_ as s,ro as st,O_ as t,ca as tt,j_ as u,l as ut,E_ as v,h_ as w,b_ as x,y_ as y,Ps as z};
|
|
64
|
+
`,saved:`I’ve saved it somewhere safe, outside Orqevio.`,open:`Open my vault`},unlock:{title:`Vault locked`,subtitle:`Enter your master password to decrypt your logins in this browser.`,busy:`Decrypting…`,submit:`Unlock`,forgot:`Forgot your master password?`},recover:{title:`Recover the vault`,subtitle:`Use the recovery key you saved when you created the vault to choose a new master password.`,recoveryKey:`Recovery key`,recoveryKeyPlaceholder:`XXXX-XXXX-XXXX-…`,submit:`Reset and open`,noKey:`I don’t have the key`,invalidKey:`The recovery key isn’t valid.`,done:`Master password reset`},reset:{title:`Reset the vault`,description:`Without the master password or the recovery key, no one can decrypt your data, not even us. Resetting permanently deletes every item.`,accessKey:`Access key`,accessKeyHint:`Confirm it’s you with this copy’s access key (not the master password).`,submit:`Delete and reset`,done:`Vault reset. You can set it up again.`}},import:{title:`Import into the vault`,description:`The file is read and encrypted in this browser: the server only receives items that are already encrypted.`,formats:`Supports the CSV that Chrome, Edge, Firefox, and Safari export, Bitwarden’s CSV and unencrypted JSON, and encrypted Orqevio exports.`,choose:`Choose file`,fileLabel:`File to import`,tooLarge:`The file is too large (over {{size}} MB).`,problems:{empty:`The file is empty.`,unknown_format:`Orqevio doesn’t recognize this file. Use the CSV that Chrome, Edge, Firefox, or Safari export, Bitwarden’s CSV or JSON, or an Orqevio export.`,bitwarden_encrypted:`This is an encrypted Bitwarden export. Export it again as unencrypted “.json” or “.csv” and import it here.`,no_items:`The file has no logins or notes.`},encrypted_one:`This is an encrypted Orqevio export with {{count}} item. Enter the master password you had when you exported it.`,encrypted_other:`This is an encrypted Orqevio export with {{count}} items. Enter the master password you had when you exported it.`,exportPassword:`Export password`,decrypt:`Decrypt`,wrongPassword:`That’s not the password this export was made with.`,sources:{chromeOrEdge:`From Chrome or Edge:`,firefox:`From Firefox:`,safari:`From Safari:`,bitwardenCsv:`From Bitwarden (CSV):`,bitwardenJson:`From Bitwarden (JSON):`,csv:`From a CSV file:`,orqevio:`From Orqevio (encrypted):`},newLogins_one:`{{count}} new login`,newLogins_other:`{{count}} new logins`,newNotes_one:`{{count}} new note`,newNotes_other:`{{count}} new notes`,nothingNew:`Nothing new to import`,duplicates_one:`{{count}} item is already in your vault and will be skipped`,duplicates_other:`{{count}} items are already in your vault and will be skipped`,unsupported_one:`{{count}} item isn’t supported (cards or identities) and won’t be imported`,unsupported_other:`{{count}} items aren’t supported (cards or identities) and won’t be imported`,unencryptedWarning:`The file you chose isn’t encrypted: delete it from your computer when you’re done.`,chooseAnother:`Choose another`,progress:`Encrypting {{done}} of {{total}}…`,submit_one:`Import {{count}} item`,submit_other:`Import {{count}} items`,failed_one:`{{count}} item couldn’t be imported. Import the file again: items already imported will be skipped.`,failed_other:`{{count}} items couldn’t be imported. Import the file again: items already imported will be skipped.`,done_one:`{{count}} item imported`,done_other:`{{count}} items imported`,locked:`The vault locked before the import finished. Unlock it and import the file again: anything already imported will be skipped.`,untitledNote:`Note`,untitledLogin:`Untitled`,damaged:`This export is damaged and can’t be read.`},export:{title:`Export the vault`,description:`Download all your items as a file, prepared in this browser.`,kind:`Export type`,kinds:{encrypted:`Encrypted`,plain:`Unencrypted`},encryptedInfo:`Only your current master password opens it. Use it as a backup or to move your items to another copy of Orqevio.`,plainInfo:`In Bitwarden’s JSON format, which most password managers can import. Anyone who has the file can read it.`,understood:`I understand the file isn’t encrypted and that anyone who has it can read all my passwords.`,submitPlain:`Export unencrypted`,submitEncrypted:`Export encrypted`,fileNameEncrypted:`orqevio-vault-encrypted-{{date}}.json`,fileNamePlain:`orqevio-vault-unencrypted-{{date}}.json`,done_one:`{{count}} item exported`,done_other:`{{count}} items exported`,tooLarge:`The export is larger than {{size}} MB: Orqevio won’t be able to import it.`}}},e_=Object.keys($g),t_=`modulepreload`,n_=function(e){return`/`+e},r_={},i_=function(e){return e.pathname.endsWith(`.css`)},a_=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},$=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=n_(t,n);let r=s(t),i=i_(r);return a_(r_,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:t_,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{let i=a=>{t.removeEventListener(`load`,i),t.removeEventListener(`error`,i),a.type===`error`?n(Error(`Unable to preload CSS for ${r}`)):e(a)};t.addEventListener(`load`,i),t.addEventListener(`error`,i)})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},o_=Object.assign({"./locales/de/activity.json":()=>$(()=>import(`./activity-BHGI6Z2D.js`).then(e=>e.default),[]),"./locales/de/agents.json":()=>$(()=>import(`./agents-B2XabUwG.js`).then(e=>e.default),[]),"./locales/de/auth.json":()=>$(()=>import(`./auth-DXyQ1sR9.js`).then(e=>e.default),[]),"./locales/de/boards.json":()=>$(()=>import(`./boards-uxzlybUT.js`).then(e=>e.default),[]),"./locales/de/common.json":()=>$(()=>import(`./common-DJe5JA5c.js`).then(e=>e.default),[]),"./locales/de/docs.json":()=>$(()=>import(`./docs-lc4Fuqxy.js`).then(e=>e.default),[]),"./locales/de/errors.json":()=>$(()=>import(`./errors-BjhuCALu.js`).then(e=>e.default),[]),"./locales/de/home.json":()=>$(()=>import(`./home-DMs617rt.js`).then(e=>e.default),[]),"./locales/de/oauth.json":()=>$(()=>import(`./oauth-BqnFE4AA.js`).then(e=>e.default),[]),"./locales/de/projects.json":()=>$(()=>import(`./projects--t9VhdYF.js`).then(e=>e.default),[]),"./locales/de/settings.json":()=>$(()=>import(`./settings-DN08srMi.js`).then(e=>e.default),[]),"./locales/de/shell.json":()=>$(()=>import(`./shell-BJfYCj5Q.js`).then(e=>e.default),[]),"./locales/de/vault.json":()=>$(()=>import(`./vault-C2I5wY2c.js`).then(e=>e.default),[]),"./locales/es/activity.json":()=>$(()=>import(`./activity-C7wpXysw.js`).then(e=>e.default),[]),"./locales/es/agents.json":()=>$(()=>import(`./agents-D_gfLGIh.js`).then(e=>e.default),[]),"./locales/es/auth.json":()=>$(()=>import(`./auth-SCXskweB.js`).then(e=>e.default),[]),"./locales/es/boards.json":()=>$(()=>import(`./boards-BfXxNbjL.js`).then(e=>e.default),[]),"./locales/es/common.json":()=>$(()=>import(`./common-Dr48NU46.js`).then(e=>e.default),[]),"./locales/es/docs.json":()=>$(()=>import(`./docs-CMM1mWDN.js`).then(e=>e.default),[]),"./locales/es/errors.json":()=>$(()=>import(`./errors-DTeT1QaQ.js`).then(e=>e.default),[]),"./locales/es/home.json":()=>$(()=>import(`./home-tJQGjAOo.js`).then(e=>e.default),[]),"./locales/es/oauth.json":()=>$(()=>import(`./oauth-B5NFSQMb.js`).then(e=>e.default),[]),"./locales/es/projects.json":()=>$(()=>import(`./projects-aUO3NoCx.js`).then(e=>e.default),[]),"./locales/es/settings.json":()=>$(()=>import(`./settings-zS8H2ZNY.js`).then(e=>e.default),[]),"./locales/es/shell.json":()=>$(()=>import(`./shell-BiFljnPL.js`).then(e=>e.default),[]),"./locales/es/vault.json":()=>$(()=>import(`./vault-VdamUs2c.js`).then(e=>e.default),[]),"./locales/fr/activity.json":()=>$(()=>import(`./activity-ayIU9KmV.js`).then(e=>e.default),[]),"./locales/fr/agents.json":()=>$(()=>import(`./agents-DLrh2pf6.js`).then(e=>e.default),[]),"./locales/fr/auth.json":()=>$(()=>import(`./auth-CWjUpxax.js`).then(e=>e.default),[]),"./locales/fr/boards.json":()=>$(()=>import(`./boards-CiHbxckf.js`).then(e=>e.default),[]),"./locales/fr/common.json":()=>$(()=>import(`./common-CxTPkV7X.js`).then(e=>e.default),[]),"./locales/fr/docs.json":()=>$(()=>import(`./docs-BrgMwu04.js`).then(e=>e.default),[]),"./locales/fr/errors.json":()=>$(()=>import(`./errors-x1B7DZKj.js`).then(e=>e.default),[]),"./locales/fr/home.json":()=>$(()=>import(`./home-CaRivmXC.js`).then(e=>e.default),[]),"./locales/fr/oauth.json":()=>$(()=>import(`./oauth-DqVF11QW.js`).then(e=>e.default),[]),"./locales/fr/projects.json":()=>$(()=>import(`./projects-BVQGJc7P.js`).then(e=>e.default),[]),"./locales/fr/settings.json":()=>$(()=>import(`./settings-CAp-i3rq.js`).then(e=>e.default),[]),"./locales/fr/shell.json":()=>$(()=>import(`./shell-a4R2bNYB.js`).then(e=>e.default),[]),"./locales/fr/vault.json":()=>$(()=>import(`./vault-DDN2TVJW.js`).then(e=>e.default),[]),"./locales/it/activity.json":()=>$(()=>import(`./activity-Cp8KuBts.js`).then(e=>e.default),[]),"./locales/it/agents.json":()=>$(()=>import(`./agents-D7tpgjuk.js`).then(e=>e.default),[]),"./locales/it/auth.json":()=>$(()=>import(`./auth-CqESesWQ.js`).then(e=>e.default),[]),"./locales/it/boards.json":()=>$(()=>import(`./boards-BysuKeCh.js`).then(e=>e.default),[]),"./locales/it/common.json":()=>$(()=>import(`./common-Vls4DuMQ.js`).then(e=>e.default),[]),"./locales/it/docs.json":()=>$(()=>import(`./docs-1w1qMhXT.js`).then(e=>e.default),[]),"./locales/it/errors.json":()=>$(()=>import(`./errors-CbK3TofU.js`).then(e=>e.default),[]),"./locales/it/home.json":()=>$(()=>import(`./home-taXbu6Bg.js`).then(e=>e.default),[]),"./locales/it/oauth.json":()=>$(()=>import(`./oauth-DyKo7CI7.js`).then(e=>e.default),[]),"./locales/it/projects.json":()=>$(()=>import(`./projects-CrDJIGi7.js`).then(e=>e.default),[]),"./locales/it/settings.json":()=>$(()=>import(`./settings-DOoufuYZ.js`).then(e=>e.default),[]),"./locales/it/shell.json":()=>$(()=>import(`./shell-BJoyar8n.js`).then(e=>e.default),[]),"./locales/it/vault.json":()=>$(()=>import(`./vault-DGwHkhSm.js`).then(e=>e.default),[]),"./locales/ja/activity.json":()=>$(()=>import(`./activity-CaibDu14.js`).then(e=>e.default),[]),"./locales/ja/agents.json":()=>$(()=>import(`./agents-DJ-oR1WA.js`).then(e=>e.default),[]),"./locales/ja/auth.json":()=>$(()=>import(`./auth-C58Nm5w2.js`).then(e=>e.default),[]),"./locales/ja/boards.json":()=>$(()=>import(`./boards-BzBkr2as.js`).then(e=>e.default),[]),"./locales/ja/common.json":()=>$(()=>import(`./common-COjNB9BR.js`).then(e=>e.default),[]),"./locales/ja/docs.json":()=>$(()=>import(`./docs-BDzOa1yl.js`).then(e=>e.default),[]),"./locales/ja/errors.json":()=>$(()=>import(`./errors-Bj5m9UTT.js`).then(e=>e.default),[]),"./locales/ja/home.json":()=>$(()=>import(`./home-JcVjUU4G.js`).then(e=>e.default),[]),"./locales/ja/oauth.json":()=>$(()=>import(`./oauth-Cfwu6jFm.js`).then(e=>e.default),[]),"./locales/ja/projects.json":()=>$(()=>import(`./projects-CNfl9kuI.js`).then(e=>e.default),[]),"./locales/ja/settings.json":()=>$(()=>import(`./settings-DClD_ufE.js`).then(e=>e.default),[]),"./locales/ja/shell.json":()=>$(()=>import(`./shell-FiDu6Ti9.js`).then(e=>e.default),[]),"./locales/ja/vault.json":()=>$(()=>import(`./vault-ds4tlkvx.js`).then(e=>e.default),[]),"./locales/nl/activity.json":()=>$(()=>import(`./activity-BkftiStp.js`).then(e=>e.default),[]),"./locales/nl/agents.json":()=>$(()=>import(`./agents-COJYAQfq.js`).then(e=>e.default),[]),"./locales/nl/auth.json":()=>$(()=>import(`./auth-BINwoLLL.js`).then(e=>e.default),[]),"./locales/nl/boards.json":()=>$(()=>import(`./boards-oiLnHcBl.js`).then(e=>e.default),[]),"./locales/nl/common.json":()=>$(()=>import(`./common-D-VyKjDv.js`).then(e=>e.default),[]),"./locales/nl/docs.json":()=>$(()=>import(`./docs-D4GytCg-.js`).then(e=>e.default),[]),"./locales/nl/errors.json":()=>$(()=>import(`./errors-hqibHHps.js`).then(e=>e.default),[]),"./locales/nl/home.json":()=>$(()=>import(`./home-DT1m0uVZ.js`).then(e=>e.default),[]),"./locales/nl/oauth.json":()=>$(()=>import(`./oauth-BIEEGPBd.js`).then(e=>e.default),[]),"./locales/nl/projects.json":()=>$(()=>import(`./projects-D3eU-Jew.js`).then(e=>e.default),[]),"./locales/nl/settings.json":()=>$(()=>import(`./settings-BPFNhdWr.js`).then(e=>e.default),[]),"./locales/nl/shell.json":()=>$(()=>import(`./shell-CkAa8NM5.js`).then(e=>e.default),[]),"./locales/nl/vault.json":()=>$(()=>import(`./vault-DmWLOBSw.js`).then(e=>e.default),[]),"./locales/pt/activity.json":()=>$(()=>import(`./activity-CFR4UTGM.js`).then(e=>e.default),[]),"./locales/pt/agents.json":()=>$(()=>import(`./agents-DMp1p8Qv.js`).then(e=>e.default),[]),"./locales/pt/auth.json":()=>$(()=>import(`./auth-ByK78s7m.js`).then(e=>e.default),[]),"./locales/pt/boards.json":()=>$(()=>import(`./boards-C4m0VqXK.js`).then(e=>e.default),[]),"./locales/pt/common.json":()=>$(()=>import(`./common-D3b_OJUw.js`).then(e=>e.default),[]),"./locales/pt/docs.json":()=>$(()=>import(`./docs-WZJP9ehA.js`).then(e=>e.default),[]),"./locales/pt/errors.json":()=>$(()=>import(`./errors-DCKVrh2b.js`).then(e=>e.default),[]),"./locales/pt/home.json":()=>$(()=>import(`./home-VZIRoQVj.js`).then(e=>e.default),[]),"./locales/pt/oauth.json":()=>$(()=>import(`./oauth-CK3lCh9i.js`).then(e=>e.default),[]),"./locales/pt/projects.json":()=>$(()=>import(`./projects-BsY2PmjV.js`).then(e=>e.default),[]),"./locales/pt/settings.json":()=>$(()=>import(`./settings-BWaFf59A.js`).then(e=>e.default),[]),"./locales/pt/shell.json":()=>$(()=>import(`./shell-BBK5NJFB.js`).then(e=>e.default),[]),"./locales/pt/vault.json":()=>$(()=>import(`./vault-CnwqbS9q.js`).then(e=>e.default),[])}),s_=tc.filter(e=>e===`en`||Object.keys(o_).some(t=>t.startsWith(`./locales/${e}/`))),c_=e=>rc(e)&&s_.includes(e),l_=`orqevio.locale`;function u_(){try{let e=localStorage.getItem(l_);return c_(e)?e:null}catch{return null}}function d_(){let e=navigator.languages?.length?navigator.languages:[navigator.language];return u_()??ic(e,s_)??`en`}var f_={type:`backend`,init(){},read(e,t,n){let r=o_[`./locales/${e}/${t}.json`];if(!r)return n(Error(`No "${t}" catalog for "${e}"`),!1);r().then(e=>n(null,e),e=>n(e,!1))}};async function p_(){V.on(`languageChanged`,e=>{document.documentElement.lang=e}),await V.use(f_).use(As).init({lng:d_(),fallbackLng:`en`,supportedLngs:[...s_],load:`currentOnly`,ns:e_,defaultNS:`common`,resources:{en:$g},partialBundledLanguages:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1}})}var m_=()=>rc(V.resolvedLanguage)?V.resolvedLanguage:`en`;async function h_(e){if(c_(e)){try{localStorage.setItem(l_,e)}catch{}V.resolvedLanguage!==e&&await V.changeLanguage(e)}}var g_=class extends Error{status;code;details;constructor(e,t,n,r){super(n),this.status=e,this.code=t,this.details=r}};async function __(e,t,n,r){let i={Accept:`application/json`},a={method:e,credentials:`same-origin`,signal:r,headers:i};n instanceof Blob?(a.body=n,i[`Content-Type`]=n.type||`application/octet-stream`,n instanceof File&&(i[Qg]=encodeURIComponent(n.name))):n!==void 0&&(i[`Content-Type`]=`application/json`,a.body=JSON.stringify(n));let o;try{o=await fetch(`/api${t}`,a)}catch(e){throw e.name===`AbortError`?e:new g_(0,`network`,`No connection to the server`)}if(o.status===204)return;let s=await o.text(),c=s?v_(s):null;if(!o.ok){let e=c?.error;throw new g_(o.status,e?.code??`error`,e?.message??o.statusText,e?.details)}return c}function v_(e){try{return JSON.parse(e)}catch{return null}}var y_=(e,t)=>__(`GET`,e,void 0,t),b_=(e,t={})=>__(`POST`,e,t),x_=(e,t)=>__(`PATCH`,e,t),S_=(e,t)=>__(`PUT`,e,t),C_=e=>__(`DELETE`,e),w_=[`invalid_access_key`,`invalid_setup_code`,`setup_code_too_short`,`recovery_not_ready`,`already_claimed`,`not_claimed`,`rate_limited`,`network`,`file_too_large`,`upload_incomplete`,`last_workspace`],T_=e=>w_.includes(e);function E_(e){return e instanceof g_?T_(e.code)?ss(`errors:codes.${e.code}`):e.status===404?ss(`errors:notFound`):e.status>=500?ss(`errors:server`):e.message:ss(`errors:unknown`)}var D_=new Ie({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0,retry:(e,t)=>!(t instanceof g_&&t.status>=400&&t.status<500)&&e<2},mutations:{retry:!1}}}),O_={me:[`me`],access:[`access`],overview:e=>[`overview`,e],home:e=>[`home`,e],board:e=>[`board`,e],archived:e=>[`archived`,e],card:e=>[`card`,e],page:e=>[`page`,e],search:(e,t)=>[`search`,e,t],tokens:[`tokens`],updates:[`updates`],activity:(e,t)=>[`activity`,e,t],vault:[`vault`],vaultItems:[`vault-items`]},k_=()=>I({queryKey:O_.me,queryFn:async({signal:e})=>{let t=await y_(`/auth/session`,e);if(!t.user)throw D_.setQueryData(O_.access,t),new g_(401,`unauthorized`,`Authentication required`);return t},staleTime:6e4}),A_=()=>I({queryKey:O_.access,queryFn:({signal:e})=>y_(`/auth/session`,e),staleTime:0}),j_=e=>I({queryKey:O_.overview(e??``),queryFn:({signal:t})=>y_(`/workspaces/${e}/overview`,t),enabled:!!e}),M_=e=>I({queryKey:O_.home(e),queryFn:({signal:t})=>y_(`/workspaces/${e}/home`,t)}),N_=e=>I({queryKey:O_.board(e),queryFn:({signal:t})=>y_(`/boards/${e}`,t)}),P_=(e,t)=>I({queryKey:O_.archived(e),queryFn:({signal:t})=>y_(`/boards/${e}/archived`,t),enabled:t}),F_=e=>I({queryKey:O_.card(e??``),queryFn:({signal:t})=>y_(`/cards/${e}`,t),enabled:!!e}),I_=e=>I({queryKey:O_.page(e),queryFn:({signal:t})=>y_(`/pages/${e}`,t),staleTime:5e3}),L_=(e,t,n)=>I({queryKey:[...O_.search(e,t),n??`all`],queryFn:({signal:r})=>y_(`/workspaces/${e}/search?q=${encodeURIComponent(t)}${n?`&type=${n}`:``}`,r),enabled:t.trim().length>=2,placeholderData:te,staleTime:1e4}),R_=()=>I({queryKey:O_.tokens,queryFn:({signal:e})=>y_(`/tokens`,e)}),z_=36e5,B_=()=>I({queryKey:O_.updates,queryFn:({signal:e})=>y_(`/updates`,e),staleTime:z_,refetchInterval:z_,refetchOnWindowFocus:!1,retry:!1}),V_=(e,t={})=>{let n=new URLSearchParams({limit:`40`});return t.agentsOnly&&n.set(`agents`,`1`),t.tokenId&&n.set(`tokenId`,t.tokenId),I({queryKey:O_.activity(e,n.toString()),queryFn:({signal:t})=>y_(`/workspaces/${e}/activity?${n}`,t)})};export{Qa as $,qg as A,js as B,s_ as C,$ as D,p_ as E,ec as F,_s as G,Es as H,$s as I,cs as J,gs as K,zs as L,Rg as M,ac as N,Kg as O,nc as P,Za as Q,Rs as R,S_ as S,m_ as T,Cs as U,ks as V,ys as W,Vo as X,us as Y,ss as Z,C_ as _,P_ as a,Ti as at,x_ as b,M_ as c,I as ct,I_ as d,a as dt,sa as et,L_ as f,r as ft,__ as g,g_ as h,V_ as i,Si as it,zg as j,Jg as k,k_ as l,u as lt,B_ as m,D_ as n,ra as nt,N_ as o,ki as ot,R_ as p,hs as q,A_ as r,Ja as rt,F_ as s,ro as st,O_ as t,ca as tt,j_ as u,l as ut,E_ as v,h_ as w,b_ as x,y_ as y,Ps as z};
|