orqevio 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/web/assets/AccessKeyReveal-C8pr7rZt.js +2 -0
- package/dist/web/assets/{AccessRows-C-Jn-MrD.js → AccessRows-33_zo5aX.js} +1 -1
- package/dist/web/assets/ActivityList-BIkO7t1s.js +1 -0
- package/dist/web/assets/AgentsPage-EFClXhsD.js +1 -0
- package/dist/web/assets/{Attachments-w5KikYPZ.js → Attachments-BQ-d5pab.js} +31 -31
- package/dist/web/assets/Avatar-D0rGsnHO.js +1 -0
- package/dist/web/assets/BoardPage-E4Vb1Vzg.js +1 -0
- package/dist/web/assets/{Button-ClwM2Rw6.js → Button-BsCJGAdQ.js} +1 -1
- package/dist/web/assets/{CardItem-BK2PGymN.js → CardItem-CYvB_I7V.js} +2 -2
- package/dist/web/assets/{Checkbox-I7UAluqN.js → Checkbox-BFT-RFt3.js} +1 -1
- package/dist/web/assets/ColorPicker-BzIkVZmd.js +1 -0
- package/dist/web/assets/ConsentPage-DMBzrJ3S.js +1 -0
- package/dist/web/assets/CopyButton-C9OKZ9i-.js +1 -0
- package/dist/web/assets/DocPage-CQ0aKAqd.js +1 -0
- package/dist/web/assets/EmptyState-DXTzO23V.js +1 -0
- package/dist/web/assets/Field-R6tL5cq9.js +1 -0
- package/dist/web/assets/HomePage-Bu2He9yp.js +1 -0
- package/dist/web/assets/Menu-B-V63C8_.js +1 -0
- package/dist/web/assets/PageHeader-D3trjYfc.js +1 -0
- package/dist/web/assets/Popover-Co2GHl85.js +1 -0
- package/dist/web/assets/ProjectPage-D2StbdlS.js +1 -0
- package/dist/web/assets/ProjectSettingsDialog-Bp-VYMVG.js +1 -0
- package/dist/web/assets/Segmented-Dk6qWGHS.js +1 -0
- package/dist/web/assets/SettingsPage-BrEqLHwa.js +1 -0
- package/dist/web/assets/States-DqHu9GSj.js +1 -0
- package/dist/web/assets/TokenCard-DPhYIZLh.js +1 -0
- package/dist/web/assets/Trans-CnOS9ct4.js +1 -0
- package/dist/web/assets/TrashPage-CFeq09im.js +1 -0
- package/dist/web/assets/VaultPage-C6RKw617.js +9 -0
- package/dist/web/assets/actions-CgdLcD8k.js +1 -0
- package/dist/web/assets/activity-CNh3v5Mu.js +1 -0
- package/dist/web/assets/agents-BGMKVi6i.js +1 -0
- package/dist/web/assets/agents-BXU0uzTH.js +1 -0
- package/dist/web/assets/agents-Cibz_z-h.js +1 -0
- package/dist/web/assets/agents-DOYJyzdo.js +1 -0
- package/dist/web/assets/agents-DrakTRAt.js +1 -0
- package/dist/web/assets/agents-de0xSyjY.js +1 -0
- package/dist/web/assets/agents-kJYxGRsw.js +1 -0
- package/dist/web/assets/{arrow-up-right-CirWuKKd.js → arrow-up-right-ibGMG_I6.js} +1 -1
- package/dist/web/assets/{auth-ByK78s7m.js → auth-DU1lbddj.js} +1 -1
- package/dist/web/assets/{auth-CqESesWQ.js → auth-DVMJ4tS1.js} +1 -1
- package/dist/web/assets/{auth-DXyQ1sR9.js → auth-Dixeidaw.js} +1 -1
- package/dist/web/assets/{auth-CWjUpxax.js → auth-UGlCAmH-.js} +1 -1
- package/dist/web/assets/{auth-SCXskweB.js → auth-ayDTWSf0.js} +1 -1
- package/dist/web/assets/{auth-BINwoLLL.js → auth-iW7JVoPN.js} +1 -1
- package/dist/web/assets/{auth-C58Nm5w2.js → auth-tM9qVp-X.js} +1 -1
- package/dist/web/assets/{boards-BTAHuwCR.js → boards-BExvvK2C.js} +1 -1
- package/dist/web/assets/{boards-CeiIWYk-.js → boards-Bd-B4hhr.js} +1 -1
- package/dist/web/assets/{boards-DSTXu61F.js → boards-CttGasCM.js} +1 -1
- package/dist/web/assets/{boards-CKwJtefi.js → boards-DF_wEJNs.js} +1 -1
- package/dist/web/assets/{boards-mFQFxBPQ.js → boards-DM5MZ8MK.js} +1 -1
- package/dist/web/assets/{boards-hABacqWX.js → boards-DRXX82kC.js} +1 -1
- package/dist/web/assets/{boards-DkyiWQSW.js → boards-DTnFEV0A.js} +1 -1
- package/dist/web/assets/check-CBvAlEZm.js +1 -0
- package/dist/web/assets/chevron-right-DFw6KMv6.js +1 -0
- package/dist/web/assets/{clock-B_VxvAAa.js → clock-8LYeV_vK.js} +1 -1
- package/dist/web/assets/confirm-CwwEqH9-.js +41 -0
- package/dist/web/assets/docs-B6tXalZZ.js +1 -0
- package/dist/web/assets/docs-BPnASlp4.js +1 -0
- package/dist/web/assets/docs-BlYmrIPJ.js +1 -0
- package/dist/web/assets/docs-BwYy_eWc.js +1 -0
- package/dist/web/assets/docs-Bx1kznfx.js +1 -0
- package/dist/web/assets/docs-DEnWVVdL.js +1 -0
- package/dist/web/assets/docs-_S4ttW8g.js +1 -0
- package/dist/web/assets/{download-CG4Kvbuv.js → download-D-lLkEl_.js} +1 -1
- package/dist/web/assets/errors-7otksh_4.js +1 -0
- package/dist/web/assets/errors-Cmb7VSBY.js +1 -0
- package/dist/web/assets/errors-DIc3HG7-.js +1 -0
- package/dist/web/assets/errors-DjlTVQK3.js +1 -0
- package/dist/web/assets/errors-Dqi8AWNO.js +1 -0
- package/dist/web/assets/errors-Mp8QlgCo.js +1 -0
- package/dist/web/assets/errors-znUyR2oX.js +1 -0
- package/dist/web/assets/{eye-DOmrZizG.js → eye-DctV5dJt.js} +1 -1
- package/dist/web/assets/{file-plus-Do0kXuaQ.js → file-plus-h6mN7Cra.js} +1 -1
- package/dist/web/assets/{folder-open-dQd_UG6z.js → folder-open-CMi40_Qn.js} +1 -1
- package/dist/web/assets/format-B7quLgVq.js +64 -0
- package/dist/web/assets/index-C5_JoNeq.css +2 -0
- package/dist/web/assets/index-Cic2D9gD.js +14 -0
- package/dist/web/assets/{lock-keyhole-BW42UXDZ.js → lock-keyhole-CEVFyiXF.js} +1 -1
- package/dist/web/assets/{paperclip-Jdvar28f.js → paperclip-DGtxZG9D.js} +1 -1
- package/dist/web/assets/{pencil-D9DAny5h.js → pencil-BQCLTZIj.js} +1 -1
- package/dist/web/assets/plus-BW1bFnsm.js +1 -0
- package/dist/web/assets/realtime-C6pi6J5c.js +1 -0
- package/dist/web/assets/{rotate-ccw-CILtVOFP.js → rotate-ccw-lEgEs1OH.js} +1 -1
- package/dist/web/assets/{search-vXSGUzpg.js → search-CorP7WeO.js} +1 -1
- package/dist/web/assets/session-D4tJu2uV.js +1 -0
- package/dist/web/assets/settings-CZ5suLqg.js +1 -0
- package/dist/web/assets/settings-CcMXMgCo.js +1 -0
- package/dist/web/assets/settings-D88yFCM6.js +1 -0
- package/dist/web/assets/settings-DK2eMfka.js +1 -0
- package/dist/web/assets/settings-DmB3vkQI.js +1 -0
- package/dist/web/assets/settings-DroVpY4u.js +1 -0
- package/dist/web/assets/settings-XBdi63iw.js +1 -0
- package/dist/web/assets/{shell-DKm9aLr8.js → shell--RN8OuYs.js} +1 -1
- package/dist/web/assets/{shell-DKu6Snuz.js → shell-Bhcgh15N.js} +1 -1
- package/dist/web/assets/{shell-C6TGc8Za.js → shell-BlFKTzFJ.js} +1 -1
- package/dist/web/assets/{shell-DhehnO0K.js → shell-CVGGeBa9.js} +1 -1
- package/dist/web/assets/{shell-CFZKdSNl.js → shell-CkzevnPH.js} +1 -1
- package/dist/web/assets/{shell-BDp_dyvw.js → shell-DOWo5KgD.js} +1 -1
- package/dist/web/assets/{shell-CtEP2nnE.js → shell-dLPGAa5r.js} +1 -1
- package/dist/web/assets/{shield-exclamation-point-BLDMJINf.js → shield-exclamation-point-C1g5FW-Y.js} +1 -1
- package/dist/web/assets/{square-kanban-B3kmSSml.js → square-kanban-DPQB8HVT.js} +1 -1
- package/dist/web/assets/{sticky-note-BPVTTfp2.js → sticky-note-DDDireBz.js} +1 -1
- package/dist/web/assets/{tag-DqhP3wln.js → tag-QzCcxSZT.js} +1 -1
- package/dist/web/assets/trash-6g8wBk0g.js +1 -0
- package/dist/web/assets/{trash-DTgTEaHd.js → trash-Cwc7ak-1.js} +1 -1
- package/dist/web/assets/{triangle-exclamation-point-B5Cq1xJs.js → triangle-exclamation-point-DAx_yYud.js} +1 -1
- package/dist/web/assets/vault-BAR96ObL.js +7 -0
- package/dist/web/assets/vault-BO3aMEV1.js +7 -0
- package/dist/web/assets/vault-BsPmxozG.js +7 -0
- package/dist/web/assets/vault-CDLe0b9o.js +7 -0
- package/dist/web/assets/vault-CTJTioNK.js +7 -0
- package/dist/web/assets/vault-Chnxpkuh.js +7 -0
- package/dist/web/assets/vault-Y3hqfCEF.js +7 -0
- package/dist/web/assets/{workspace-CBlyhMjO.js → workspace-BC7Gkm-H.js} +1 -1
- package/dist/web/index.html +34 -35
- package/dist/worker/index.js +3404 -1008
- package/dist/wrangler.json +4 -0
- package/package.json +1 -1
- package/dist/web/assets/AccessKeyReveal-DBMDUyjA.js +0 -2
- package/dist/web/assets/ActivityList-BCthFm2C.js +0 -1
- package/dist/web/assets/AgentsPage-C0SAIziE.js +0 -1
- package/dist/web/assets/Avatar-BcMhQMeL.js +0 -1
- package/dist/web/assets/BoardPage-CTE1631b.js +0 -1
- package/dist/web/assets/ColorPicker-D3xHu4M1.js +0 -1
- package/dist/web/assets/ConsentPage-bIA7yHuZ.js +0 -1
- package/dist/web/assets/CopyButton-BjA1b29F.js +0 -1
- package/dist/web/assets/DocPage-DcF8R9CQ.js +0 -1
- package/dist/web/assets/EmptyState-DMW8GdU_.js +0 -1
- package/dist/web/assets/Field-oe5EHMEz.js +0 -1
- package/dist/web/assets/HomePage-Dlpg4r_w.js +0 -1
- package/dist/web/assets/Menu--S2cHUj4.js +0 -1
- package/dist/web/assets/PageHeader-BeJqOSzf.js +0 -1
- package/dist/web/assets/Popover-MlZiOWxh.js +0 -1
- package/dist/web/assets/ProjectPage-BAwijKJr.js +0 -1
- package/dist/web/assets/ProjectSettingsDialog-DSp3JA2z.js +0 -1
- package/dist/web/assets/Segmented-DDptqKTZ.js +0 -1
- package/dist/web/assets/SettingsPage-Bot3OWuP.js +0 -1
- package/dist/web/assets/States-ss8YCX3J.js +0 -1
- package/dist/web/assets/TokenCard-B9gn2tQA.js +0 -1
- package/dist/web/assets/Trans-Cpev0SXN.js +0 -1
- package/dist/web/assets/TrashPage-BQ4vCVb9.js +0 -1
- package/dist/web/assets/VaultPage-BlXfdUw7.js +0 -3
- package/dist/web/assets/actions-DTIyi0mf.js +0 -1
- package/dist/web/assets/activity-Yp9xRGgk.js +0 -1
- package/dist/web/assets/agents-3HUiV4tV.js +0 -1
- package/dist/web/assets/agents-CJMhiUW3.js +0 -1
- package/dist/web/assets/agents-CjiLfJS9.js +0 -1
- package/dist/web/assets/agents-DwUimfIe.js +0 -1
- package/dist/web/assets/agents-R0c_yDCD.js +0 -1
- package/dist/web/assets/agents-c6F7y9Af.js +0 -1
- package/dist/web/assets/agents-sA8xOJfc.js +0 -1
- package/dist/web/assets/check-B8DqgyOr.js +0 -1
- package/dist/web/assets/chevron-right-BXOWYq-U.js +0 -1
- package/dist/web/assets/confirm-D9CmdABH.js +0 -41
- package/dist/web/assets/docs-BiIxmBdC.js +0 -1
- package/dist/web/assets/docs-CZq019Fr.js +0 -1
- package/dist/web/assets/docs-CctrfBzG.js +0 -1
- package/dist/web/assets/docs-CxyPUV8q.js +0 -1
- package/dist/web/assets/docs-DvgTX1bm.js +0 -1
- package/dist/web/assets/docs-NO6PWaeN.js +0 -1
- package/dist/web/assets/docs-wmJ1fgqN.js +0 -1
- package/dist/web/assets/errors-CJTyAPcw.js +0 -1
- package/dist/web/assets/errors-DcAK3Axg.js +0 -1
- package/dist/web/assets/errors-DfqPLtND.js +0 -1
- package/dist/web/assets/errors-Dy51ouo4.js +0 -1
- package/dist/web/assets/errors-Z5PDTKIL.js +0 -1
- package/dist/web/assets/errors-ezWDkBsu.js +0 -1
- package/dist/web/assets/errors-tpMDhE_P.js +0 -1
- package/dist/web/assets/format-ClqopOxc.js +0 -1
- package/dist/web/assets/index-B2GZPn61.js +0 -14
- package/dist/web/assets/index-B6GX5zxU.css +0 -2
- package/dist/web/assets/plus-D07TzhmN.js +0 -1
- package/dist/web/assets/queries-CNpEWLps.js +0 -64
- package/dist/web/assets/realtime-CUI9Wfs8.js +0 -1
- package/dist/web/assets/session-DIDP5B07.js +0 -1
- package/dist/web/assets/settings-BDfqTbHE.js +0 -1
- package/dist/web/assets/settings-BW0zBLJn.js +0 -1
- package/dist/web/assets/settings-BYv1UcVK.js +0 -1
- package/dist/web/assets/settings-C7vmkddK.js +0 -1
- package/dist/web/assets/settings-CK3tlBqd.js +0 -1
- package/dist/web/assets/settings-CWBjLZeX.js +0 -1
- package/dist/web/assets/settings-R-xZf6BT.js +0 -1
- package/dist/web/assets/trash-CyqM_Llh.js +0 -1
- package/dist/web/assets/vault-C2I5wY2c.js +0 -7
- package/dist/web/assets/vault-CnwqbS9q.js +0 -7
- package/dist/web/assets/vault-DDN2TVJW.js +0 -7
- package/dist/web/assets/vault-DGwHkhSm.js +0 -7
- package/dist/web/assets/vault-DmWLOBSw.js +0 -7
- package/dist/web/assets/vault-VdamUs2c.js +0 -7
- package/dist/web/assets/vault-ds4tlkvx.js +0 -7
|
@@ -1,64 +0,0 @@
|
|
|
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}function xe(e,t){return t?ye(e,t)!=null:!1}function Se(e,t){return!t||!e.getPreviousPageParam?!1:be(e,t)!=null}var Ce=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=Ee(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=Ee(this.options);e.data!==void 0&&(this.setState(Te(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,...we(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Te(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 we(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:me(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Te(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Ee(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 De=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),ke(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ae(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ae(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&&je(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&&ke(e,t),o=i&&je(e,n,t,r);(a||o)&&(l={...l,...we(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:Me(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 Oe(e,t){return y(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||y(t.retryOnMount,e)!==!1)}function ke(e,t){return Oe(e,t)||e.state.data!==void 0&&Ae(e,t,t.refetchOnMount)}function Ae(e,t,n){if(y(t.enabled,e)!==!1&&y(t.staleTime,e)!==`static`){let r=y(n,e);return r===`always`||r!==!1&&Me(e,t)}return!1}function je(e,t,n,r){return(e!==t||y(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Me(e,n)}function Me(e,t){return y(t.enabled,e)!==!1&&e.isStaleByTime(y(t.staleTime,e))}var Ne=class extends De{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:xe(t,n.data),hasPreviousPage:Se(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Pe=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||Fe(),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 Fe(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ie=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 Pe({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=Le(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=Le(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=Le(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=Le(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 Le(e){return e.options.scope?.id}var Re=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 Ce({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()})})}},ze=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Re,this.#t=e.mutationCache||new Ie,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()}},Be=o.createContext(!1),Ve=()=>o.useContext(Be);Be.Provider;function He(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ue=o.createContext(He()),We=()=>o.useContext(Ue),Ge=(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))},Ke=e=>{o.useEffect(()=>{e.clearReset()},[e])},qe=({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])),Je=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))}},Ye=(e,t)=>e?.suspense&&t.isPending,Xe=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Ze(e,t,n){let r=Ve(),i=We(),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,Je(s),Ge(s,i,c),Ke(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()),Ye(s,f))throw Xe(s,d,i);if(qe({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 Ze(e,De,t)}function Qe(e,t){return Ze(e,Ne,t)}var $e=e=>{throw TypeError(e)},et=(e,t,n)=>t.has(e)||$e(`Cannot `+n),tt=(e,t,n)=>(et(e,t,`read from private field`),n?n.call(e):t.get(e)),nt=(e,t,n)=>t.has(e)?$e(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),rt=(e,t,n,r)=>(et(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),it=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,at=/^[\\/]{2}/;function ot(e,t){return t+e.replace(/\\/g,`/`)}var st=`popstate`;function ct(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function lt(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return ft(``,{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:pt(t)}return ht(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 ut(){return Math.random().toString(36).substring(2,10)}function dt(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 ft(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?mt(t):t,state:n,key:t&&t.key||r||ut(),mask:i}}function pt({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 mt(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 ht(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=ct(e)?e:ft(h.location,e,t);n&&n(r,e),l=u()+1;let d=dt(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=ct(e)?e:ft(h.location,e,t);n&&n(r,e),l=u();let i=dt(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 gt(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(st,d),c=e,()=>{i.removeEventListener(st,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 gt(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:pt(t);return i=i.replace(/ $/,`%20`),!n&&at.test(i)&&(i=r+i),new URL(i,r)}var _t,vt=class{constructor(e){if(nt(this,_t,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(tt(this,_t).has(e))return tt(this,_t).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){tt(this,_t).set(e,t)}};_t=new WeakMap;var yt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function bt(e){return yt.has(e)}var xt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function St(e){return xt.has(e)}function Ct(e){return e.index===!0}function wt(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`),Ct(e)){let n={...e,id:s};return r[s]=Tt(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=Tt(n,t(n)),e.children&&(n.children=wt(e.children,t,o,r,i)),n}})}function Tt(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Et(e,t,n=`/`){return Dt(e,t,n,!1)}function Dt(e,t,n,r,i){let a=qt((typeof t==`string`?mt(t):t).pathname||`/`,n);if(a==null)return null;let o=i??kt(e),s=null,c=Kt(a);for(let e=0;s==null&&e<o.length;++e)s=Ht(o[e],c,r);return s}function Ot(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 kt(e){let t=At(e);return Mt(t),t}function At(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=rn([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}".`),At(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Bt(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Gt(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 jt(e.path))a(e,t,!0,n)}),t}function jt(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=jt(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 Mt(e){e.sort((e,t)=>e.score===t.score?Vt(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Nt=/^:[\w-]+$/,Pt=3,Ft=2,It=1,Lt=10,Rt=-2,zt=e=>e===`*`;function Bt(e,t){let n=e.split(`/`),r=n.length;return n.some(zt)&&(r+=Rt),t&&(r+=Ft),n.filter(e=>!zt(e)).reduce((e,t)=>e+(Nt.test(t)?Pt:t===``?It:Lt),r)}function Vt(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 Ht(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?Wt(u,l,s.matcher,s.compiledParams):Ut(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Ut({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:rn([a,d.pathname]),pathnameBase:on(rn([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=rn([a,d.pathnameBase]))}return o}function Ut(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Gt(e.path,e.caseSensitive,e.end);return Wt(e,t,n,r)}function Wt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=an(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=an(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 Gt(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 Kt(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 qt(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 Jt({basename:e,pathname:t}){return t===`/`?e:rn([e,t])}var Yt=e=>it.test(e);function Xt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?mt(e):e,a;return n?(n=nn(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Zt(n.substring(1),`/`):Zt(n,t)):a=t,{pathname:a,search:sn(r),hash:cn(i)}}function Zt(e,t){let n=an(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 $t(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function en(e){let t=$t(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function tn(e,t,n,r=!1){let i;typeof e==`string`?i=mt(e):(i={...e},L(!i.pathname||!i.pathname.includes(`?`),Qt(`?`,`pathname`,`search`,i)),L(!i.pathname||!i.pathname.includes(`#`),Qt(`#`,`pathname`,`hash`,i)),L(!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=Xt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var nn=e=>e.replace(/[\\/]{2,}/g,`/`),rn=e=>nn(e.join(`/`));function an(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 on=e=>an(e).replace(/^\/*/,`/`),sn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,cn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,ln=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],un=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 dn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function fn(e){return rn(e.map(e=>e.route.path).filter(Boolean))||`/`}var pn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function mn(e,t){let n=e;if(typeof n!=`string`||!it.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(pn)try{let e=new URL(window.location.href),r=at.test(n)?new URL(ot(n,e.protocol)):new URL(n),a=qt(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 hn=Symbol(`Uninstrumented`);function gn(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=vn(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=vn(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[hn]??i,a=vn(n[e],t,(...e)=>bn(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[hn]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[hn]??e,r=vn(n.middleware,t,(...e)=>bn(e[0]));return r?(r[hn]=t,r):e})),r}function _n(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[hn]??e.navigate,r=vn(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?pt(n):`.`,...xn(e,r??{})}});r&&(r[hn]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[hn]??e.fetch,r=vn(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...xn(e,i??{})}});r&&(r[hn]=t,e.fetch=r)}return e}function vn(e,t,n){return e.length===0?null:async(...r)=>{let i=await yn(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function yn(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=yn(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 bn(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Sn(t),params:{...r},pattern:i,context:Cn(n)}}function xn(e,t){return{currentUrl:pt(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 Sn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Cn(e){if(Tn(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var wn=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Tn(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`)===wn}var En=new URL(`http://localhost`);function Dn(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),En)}catch{return En}}function On(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function kn(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 An(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&&!On(i,n),s=!On(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!kn(e,i)||!On(i,a)))throw Error(`External navigation is not allowed`)}var jn=[`POST`,`PUT`,`PATCH`,`DELETE`],Mn=new Set(jn),Nn=[`GET`,...jn],Pn=new Set(Nn),Fn=new Set([301,302,303,307,308]),In=new Set([307,308]),Ln={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},Rn={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},zn={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Bn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Vn=`remix-router-transitions`,Hn=Symbol(`ResetLoaderData`),Un,Wn,Gn,Kn,qn=class{constructor(e){nt(this,Un),nt(this,Wn),nt(this,Gn),nt(this,Kn),rt(this,Un,e),rt(this,Wn,kt(e))}get stableRoutes(){return tt(this,Un)}get activeRoutes(){return tt(this,Gn)??tt(this,Un)}get branches(){return tt(this,Kn)??tt(this,Wn)}get hasHMRRoutes(){return tt(this,Gn)!=null}setRoutes(e){rt(this,Un,e),rt(this,Wn,kt(e))}setHmrRoutes(e){rt(this,Gn,e),rt(this,Kn,kt(e))}commitHmrRoutes(){tt(this,Gn)&&(rt(this,Un,tt(this,Gn)),rt(this,Wn,tt(this,Kn)),rt(this,Gn,void 0),rt(this,Kn,void 0))}};Un=new WeakMap,Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakMap;function Jn(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||Bn,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),...gn(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new qn(wt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||dr,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=Dt(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=Ir(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Fr(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=>$n(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=er(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:Ln,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,zn),F({blockers:e})}}),E?.resolve(),E=null}else return _e(t,n)}),n){oi(t,A);let e=()=>si(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&&Zr(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?Mr(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,zn)));let l=!j&&qe(t,n.matches||w.matches),u=D===!0||w.navigation.formMethod!=null&&Zr(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:Ln,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||=ci();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Zn(!1,Xn(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?mt(n.mask):{...w.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},at.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),An(typeof n.mask==`string`?n.mask:pt(n.mask),pt(o),e.history.createURL(`/`),`reject`)}let s=w.location,l=ft(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},An(t==null?e.history.createHref(w.location):typeof t==`string`?t:pt(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&&Zr(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,zn),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||=ci(),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:Dt(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!te&&zr(w.location,n)&&!(r&&r.submission&&Zr(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=Er(e.history,n,O.signal,r&&r.submission),f=e.getContext?await e.getContext():new vt,p;if(r&&r.pendingError)p=[Pr(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Zr(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(Wr(t)&&dn(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=ti(n,a,t,r.submission),o=!1,l.active=!1,d=Er(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,...Nr(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function ve(t,n,i,l,u,d,f,p,m={}){if(Oe(),F({navigation:ni(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await Ye(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}=Fr(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Pr(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=$r(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:Ir(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ee(t,n,_r(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(Gr(h)){let n;return n=m&&m.replace!=null?m.replace:Tr(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(Wr(h)){let e=Pr(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||ti(n,i,l,p),x=p||m||ei(b),S=!j&&!g;if(d){if(S){let e=be(v);F({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await Ye(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}=Fr(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Pr(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}=Qn(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&&Wr(v[1])?{[v[0]]:v[1].error}:null,...Nr(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=Lr(k);if(ee)return await Te(t,ee.result,!0,{replace:h}),{shortCircuited:!0};if(ee=Lr(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}=jr(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&&!Wr(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=ri(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=Xn(w.location,w.matches,c,r,n,i?.relative),u=Dt(o,l,c,!1,s.branches),d=Je(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Ae(t,n,Ir(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Zn(!0,l,i);if(m){Ae(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new vt,g=(i&&i.preventScrollReset)===!0;p&&Zr(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,ii(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Er(e.history,i,g.signal,m);if(d){let e=await Ye(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,Ir(404,{pathname:i}),{flushSync:f});return}}let v=$r(l,i);if(!v.route.action&&!v.route.lazy){Ae(t,n,Ir(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}M.set(t,g);let y=re,b=_r(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(Gr(S)||Wr(S)){ke(t,ai(void 0));return}}else{if(Gr(S)){if(M.delete(t),ie>y){ke(t,ai(void 0));return}return oe.add(t),ke(t,ri(m)),Te(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Wr(S)){Ae(t,n,S.error);return}}let C=w.navigation.location||w.location,E=Er(e.history,C,g.signal),D=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:Dt(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}=Qn(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=ri(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=ri(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,ai(S.data)),{...e,fetchers:n}},he=Lr(de);if(he)return w=pe(w),Te(E,he.result,!1,{preventScrollReset:p});if(he=Lr(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,ai(S.data));let{loaderData:_e,errors:ve}=jr(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:Mr(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,ri(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Er(e.history,i,m.signal);if(l){let e=await Ye(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,Ir(404,{pathname:i}),{flushSync:u});return}}let g=$r(s,i);M.set(t,m);let _=re,v=await Ee(h,i,_r(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,ai(void 0));else if(Gr(y)){if(ie>_){ke(t,ai(void 0));return}oe.add(t),await Te(h,y,!1,{preventScrollReset:d})}else Wr(y)?Ae(t,n,y.error):ke(t,ai(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=Tr(d,p,c,e.history),An(f,d,p,`allow-explicit`);let m=ft(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Yt(d)){let n=gt(t,d,!0);e=n.origin!==t.location.origin||qt(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=ei(w.navigation));let y=o||s;In.has(i.response.status)&&y&&Zr(y.formMethod)?await _e(h,m,{submission:{...y,formAction:d},preventScrollReset:l||D,enableViewTransition:a?k:void 0}):await _e(h,m,{overrideNavigation:ti(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 vr(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(!Zr(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(Ur(r)){let i=r.result;o[t]={type:`redirect`,response:Sr(i,e,t,n,c)}}else o[t]=await xr(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:Ir(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=Pr(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)||Rn}function Me(e,t){Fe(e,t?.reason),ke(e,ai(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=ai(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)||zn;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)||zn;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=Ir(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Fr(n);return{notFoundMatches:r,route:i,error:t}}function We(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Ln){_=!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=>Ot(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:Dt(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:Dt(n,r,c,!0,e)}}return{active:!1,matches:null}}async function Ye(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||ir(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=Dt(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=Dt(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&Xe(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=Dt(s.activeRoutes,n,c,!0,u),!f||Xe(l,f))return{type:`success`,matches:null};l=f}}function Xe(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function Ze(e){o={},s.setHmrRoutes(wt(e,a,void 0,o))}function I(e,t,n=!1){ir(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:I,_internalFetchControllers:M,_internalSetRoutes:Ze,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){F(e)}},e.instrumentations&&(C=_n(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Yn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Xn(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=tn(r||`.`,en(o),qt(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=Jt({basename:n,pathname:c.pathname})),pt(c)}function Zn(e,t,n){if(!n||!Yn(n))return{path:t};if(n.formMethod&&!Xr(n.formMethod))return{path:t,error:Ir(405,{method:n.formMethod})};let r=()=>({path:t,error:Ir(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=Rr(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Zr(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(!Zr(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=Or(n.formData),s=n.formData;else if(n.body instanceof FormData)o=Or(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=kr(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=kr(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(Zr(c.formMethod))return{path:t,submission:c};let l=mt(t);return e&&l.search&&Qr(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:pt(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?Wr(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&&Wr(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=fn(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(!$n(s))f=!1;else if(u){let{shouldLoad:e}=er(s,a.loaderData,a.errors);f=e}else tr(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return gr(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?nr(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=rr(i,m);return gr(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=Dt(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=$r(b,e.path),C=new AbortController,w=Er(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=_r(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=_r(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};rr(S,a)&&(T=_r(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 $n(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function er(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!$n(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 tr(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function nr(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function rr(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function ir(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=>ar(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=wt(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]=wt([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 ar(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=>ar(e,t)))??!1}var or=new WeakMap,sr=({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=or.get(i);o||(o={},or.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=bt(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},cr=new WeakMap;function lr(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=cr.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=St(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 cr.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=sr({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 ur(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 dr(e){return e.matches.some(e=>e.route.middleware)?fr(e,()=>ur(e)):ur(e)}function fr(e,t){return pr(e,t,e=>{if(Yr(e))throw e;return e},Vr,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=Pr(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 pr(e,t,n,r,i){let{matches:a,...o}=e;return await mr(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function mr(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 mr(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 hr(e,t,n,r,i){let a=sr({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=lr(r.route,Zr(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function gr(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=hr(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?rr(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?rr(a,{...l,defaultShouldRevalidate:e}):rr(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Zr(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Zr(n.method)||!p)?yr({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 _r(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?gr(e,t,n,r,fn(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:hr(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function vr(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:Dr(t,n),pattern:fn(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 fr(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 yr({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Zr(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:Dr(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 Ir(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 Ir(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function br(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 xr(e){let{result:t,type:n}=e;if(qr(t)){let e;try{e=await br(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new un(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Kr(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:Br(t),statusCode:dn(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:dn(t)?t.status:void 0}:Kr(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 Sr(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`),!Yt(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Xn(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var Cr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function wr(e){try{return Cr.includes(new URL(e).protocol)}catch{return!1}}function Tr(e,t,n,r){if(Yt(e)){let r=e,i=at.test(r)?new URL(ot(r,t.protocol)):new URL(r);if(wr(i.toString()))throw Error(`Invalid redirect location`);let a=qt(i.pathname,n)!=null;if(i.origin===t.origin&&a)return nn(i.pathname)+i.search+i.hash}try{if(wr(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Er(e,t,n,r){let i=e.createURL(Rr(t)).toString(),a={signal:n};if(r&&Zr(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?Or(r.formData):r.formData}return new Request(i,a)}function Dr(e,t){let n=new URL(e.url),r=typeof t==`string`?mt(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 Or(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function kr(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Ar(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Wr(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(!Gr(f),`Cannot handle redirect results in processLoaderData`),Wr(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Pr(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Hn),c||(c=!0,s=dn(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 jr(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=Ar(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`),Wr(s)){let t=Pr(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Gr(s))L(!1,`Unhandled fetcher revalidation redirect`);else{let e=ai(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Mr(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Hn).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 Nr(e){return e?Wr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Pr(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 Fr(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 Ir(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 un(e||500,o,Error(s),!0)}function Lr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Gr(r))return{key:n,result:r}}}function Rr(e){return pt({...typeof e==`string`?mt(e):e,hash:``})}function zr(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Br(e){return new un(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Vr(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Hr(t))}function Hr(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Ur(e){return qr(e.result)&&Fn.has(e.result.status)}function Wr(e){return e.type===`error`}function Gr(e){return(e&&e.type)===`redirect`}function Kr(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function qr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Jr(e){return Fn.has(e)}function Yr(e){return qr(e)&&Jr(e.status)&&e.headers.has(`Location`)}function Xr(e){return Pn.has(e.toUpperCase())}function Zr(e){return Mn.has(e.toUpperCase())}function Qr(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function $r(e,t){let n=typeof t==`string`?mt(t).search:t.search;if(e[e.length-1].route.index&&Qr(n||``))return e[e.length-1];let r=$t(e);return r[r.length-1]}function ei(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 ti(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 ni(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 ri(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 ii(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 ai(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 oi(e,t){try{let n=e.sessionStorage.getItem(Vn);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 si(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Vn,JSON.stringify(n))}catch(e){R(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function ci(){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 li=o.createContext(null);li.displayName=`DataRouter`;var ui=o.createContext(null);ui.displayName=`DataRouterState`;var di=o.createContext(!1);function fi(){return o.useContext(di)}var pi=o.createContext({isTransitioning:!1});pi.displayName=`ViewTransition`;var mi=o.createContext(new Map);mi.displayName=`Fetchers`;var hi=o.createContext(null);hi.displayName=`Await`;var gi=o.createContext(null);gi.displayName=`Navigation`;var _i=o.createContext(null);_i.displayName=`Location`;var vi=o.createContext({outlet:null,matches:[],isDataRoute:!1});vi.displayName=`Route`;var yi=o.createContext(null);yi.displayName=`RouteError`;var bi=`REACT_ROUTER_ERROR`,xi=`REDIRECT`,Si=`ROUTE_ERROR_RESPONSE`;function Ci(e){if(e.startsWith(`${bi}:${xi}:{`))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 wi(e){if(e.startsWith(`${bi}:${Si}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new un(t.status,t.statusText,t.data)}catch{}}function Ti(e,{relative:t}={}){L(Ei(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(gi),{hash:i,pathname:a,search:s}=Fi(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:rn([n,a])),r.createHref({pathname:c,search:s,hash:i})}function Ei(){return o.useContext(_i)!=null}function Di(){return L(Ei(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(_i).location}var Oi=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function ki(e){o.useContext(gi).static||o.useLayoutEffect(e)}function Ai(){let{isDataRoute:e}=o.useContext(vi);return e?Zi():ji()}function ji(){L(Ei(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(li),{basename:t,navigator:n}=o.useContext(gi),{matches:r}=o.useContext(vi),{pathname:i}=Di(),a=JSON.stringify(en(r)),s=o.useRef(!1);return ki(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(R(s.current,Oi),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=tn(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:rn([t,c.pathname])),An(typeof r==`string`?r:pt(r),n.createHref(c),Dn(n),`reject`),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}var Mi=o.createContext(null);function Ni(e){let t=o.useContext(vi).outlet;return o.useMemo(()=>t&&o.createElement(Mi.Provider,{value:e},t),[t,e])}function Pi(){let{matches:e}=o.useContext(vi);return e[e.length-1]?.params??{}}function Fi(e,{relative:t}={}){let{matches:n}=o.useContext(vi),{pathname:r}=Di(),i=JSON.stringify(en(n));return o.useMemo(()=>tn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Ii(e,t,n){L(Ei(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=o.useContext(gi),{matches:i}=o.useContext(vi),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||``;$i(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
|
-
|
|
4
|
-
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let d=Di(),f;if(t){let e=typeof t==`string`?mt(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})):Et(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=Ui(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:rn([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:rn([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(_i.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Li(){let e=Xi(),t=dn(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 Ri=o.createElement(Li,null),zi=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=wi(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(vi.Provider,{value:this.props.routeContext},o.createElement(yi.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Vi,{error:e},t):t}};zi.contextType=di;var Bi=new WeakMap;function Vi({children:e,error:t}){let{basename:n,navigator:r}=o.useContext(gi);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ci(t.digest);if(e){let i=Bi.get(t);if(i)throw i;let a=mn(e.location,n),s=a.absoluteURL||a.to;if(An(e.location,s,Dn(r),`allow-explicit`),wr(s))throw Error(`Invalid redirect location`);if(pn&&!Bi.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 Bi.set(t,n),n}}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function Hi({routeContext:e,match:t,children:n}){let r=o.useContext(li);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(vi.Provider,{value:e},n)}function Ui(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:fn(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||Ri,s&&(c<0&&l===0?($i(`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(Hi,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o.createElement(zi,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Wi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Gi(e){let t=o.useContext(li);return L(t,Wi(e)),t}function Ki(e){let t=o.useContext(ui);return L(t,Wi(e)),t}function qi(e){let t=o.useContext(vi);return L(t,Wi(e)),t}function Ji(e){let t=qi(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 Yi(){return Ji(`useRouteId`)}function Xi(){let e=o.useContext(yi),t=Ki(`useRouteError`),n=Ji(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Zi(){let{router:e}=Gi(`useNavigate`),t=Ji(`useNavigate`),n=o.useRef(!1);return ki(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{R(n.current,Oi),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Qi={};function $i(e,t,n){!t&&!Qi[e]&&(Qi[e]=!0,R(!1,n))}var ea={};function ta(e,t){!e&&!ea[t]&&(ea[t]=!0,console.warn(t))}var na=o.useOptimistic,ra=()=>void 0;function ia(e){return na?na(e):[e,ra]}function aa(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 oa=[`HydrateFallback`,`hydrateFallbackElement`],sa=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 ca({router:e,flushSync:t,onError:n,useTransitions:r}){r=fi()||r;let[i,a]=o.useState(e.state),[s,c]=ia(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:fn(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),ta(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(ta(_==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=>la(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 sa)},[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=>la(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(li.Provider,{value:C},o.createElement(ui.Provider,{value:s},o.createElement(mi.Provider,{value:y.current},o.createElement(pi.Provider,{value:d},o.createElement(ma,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},o.createElement(ua,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function la(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 ua=o.memo(da);function da({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ii(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function fa({to:e,replace:t,state:n,relative:r}){L(Ei(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=o.useContext(gi);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(vi),{pathname:c}=Di(),l=Ai(),u=tn(e,en(s),c,r===`path`);An(typeof e==`string`?e:pt(e),a.createHref(u),Dn(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 pa(e){return Ni(e.context)}function ma({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){L(!Ei(),`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=mt(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=o.useMemo(()=>{let e=qt(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(gi.Provider,{value:l},o.createElement(_i.Provider,{children:t,value:g}))}o.Component;var ha=`get`,ga=`application/x-www-form-urlencoded`;function _a(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function va(e){return _a(e)&&e.tagName.toLowerCase()===`button`}function ya(e){return _a(e)&&e.tagName.toLowerCase()===`form`}function ba(e){return _a(e)&&e.tagName.toLowerCase()===`input`}function xa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Sa(e,t){return e.button===0&&(!t||t===`_self`)&&!xa(e)}function Ca(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 wa(e,t){let n=Ca(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Ta=null;function Ea(){if(Ta===null)try{new FormData(document.createElement(`form`),0),Ta=!1}catch{Ta=!0}return Ta}var Da=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function Oa(e){return e!=null&&!Da.has(e)?(R(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ga}"`),null):e}function ka(e,t){let n,r,i,a,o;if(ya(e)){let o=e.getAttribute(`action`);r=o?qt(o,t):null,n=e.getAttribute(`method`)||ha,i=Oa(e.getAttribute(`enctype`))||ga,a=new FormData(e)}else if(va(e)||ba(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?qt(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||ha,i=Oa(e.getAttribute(`formenctype`))||Oa(o.getAttribute(`enctype`))||ga,a=new FormData(o,e),!Ea()){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(_a(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=ha,r=null,i=ga,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 Aa(e,t){if(e===!1||e==null)throw Error(t)}function ja(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&&qt(i.pathname,t)===`/`?`${an(t)}/_root.${r}`:`${an(i.pathname)}.${r}`,i}async function Ma(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 Na(e){return e!=null&&typeof e.page==`string`}function Pa(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 Fa(e,t,n){return Ba((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Ma(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(Pa).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Ia(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 La(e,t,{includeHydrateFallback:n}={}){return Ra(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 Ra(e){return[...new Set(e)]}function za(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ba(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Na(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(za(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Va(){let e=o.useContext(li);return Aa(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ha(){let e=o.useContext(ui);return Aa(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ua=o.createContext(void 0);Ua.displayName=`FrameworkContext`;function Wa(){let e=o.useContext(Ua);return Aa(e,`You must render this element inside a <HydratedRouter> element`),e}function Ga(e,t){let n=o.useContext(Ua),[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:Ka(c,m),onBlur:Ka(l,h),onMouseEnter:Ka(u,m),onMouseLeave:Ka(d,h),onTouchStart:Ka(f,m)}]:[a,p,{}]:[!1,p,{}]}function Ka(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function qa({page:e,...t}){let n=fi(),{nonce:r}=Wa(),{router:i}=Va(),a=o.useMemo(()=>Et(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?o.createElement(Ya,{page:e,matches:a,...t}):o.createElement(Xa,{page:e,matches:a,...t})):null}function Ja(e){let{manifest:t,routeModules:n}=Wa(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Fa(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Ya({page:e,matches:t,...n}){let r=Di(),{future:i}=Wa(),{basename:a}=Va(),s=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ja(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 Xa({page:e,matches:t,...n}){let r=Di(),{future:i,manifest:a,routeModules:s}=Wa(),{basename:c}=Va(),{loaderData:l,matches:u}=Ha(),d=o.useMemo(()=>Ia(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>Ia(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=ja(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(()=>La(f,a),[f,a]),h=Ja(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 Za(...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 $a(e,t){return Jn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:lt({window:t?.window}),hydrationData:t?.hydrationData||eo(),routes:e,mapRouteProperties:aa,hydrationRouteProperties:oa,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function eo(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:to(e.errors)}),e}function to(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 un(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&ln.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 no=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(gi),y=typeof u==`string`&&it.test(u),b=mn(u,g);u=b.to;let x=Ti(u,{relative:r}),S=Di(),C=null;if(s){let e=tn(s,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:rn([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Ga(n,m),D=so(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:Za(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?o.createElement(o.Fragment,null,A,o.createElement(qa,{page:x})):A});no.displayName=`Link`;var ro=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=Fi(a,{relative:l.relative}),f=Di(),p=o.useContext(ui),{navigator:m,basename:h}=o.useContext(gi),g=p!=null&&mo(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=qt(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(no,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});ro.displayName=`NavLink`;var io=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=ha,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=o.useContext(gi),_=fo(),v=po(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&it.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})});io.displayName=`Form`;function ao(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function oo(e){let t=o.useContext(li);return L(t,ao(e)),t}function so(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=Ai(),f=Di(),p=Fi(e,{relative:s});return o.useCallback(m=>{if(Sa(m,t)){m.preventDefault();let t=n===void 0?pt(f)===pt(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 co(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(Ca(e)),n=o.useRef(!1),r=Di(),i=o.useMemo(()=>wa(r.search,n.current?null:t.current),[r.search]),a=Ai();return[i,o.useCallback((e,t)=>{let r=Ca(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var lo=0,uo=()=>`__${String(++lo)}__`;function fo(){let{router:e}=oo(`useSubmit`),{basename:t}=o.useContext(gi),n=Yi(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ka(e,t);if(a.navigate===!1){let e=a.fetcherKey||uo();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 po(e,{relative:t}={}){let{basename:n}=o.useContext(gi),r=o.useContext(vi);L(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Fi(e||`.`,{relative:t})},s=Di();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:rn([n,a.pathname])),pt(a)}function mo(e,{relative:t}={}){let n=o.useContext(pi);L(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=oo(`useViewTransitionState`),i=Fi(e,{relative:t});if(!n.isTransitioning)return!1;let a=qt(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=qt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ut(i.pathname,s)!=null||Ut(i.pathname,a)!=null}var z=e=>typeof e==`string`,ho=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},go=e=>e==null?``:String(e),_o=e=>z(e)&&/^[A-Za-z0-9_@.-]{1,128}$/.test(e)&&!e.includes(`..`)&&![`__proto__`,`constructor`,`prototype`].includes(e),vo=e=>e?.callbackApi??e?.constructor?.callbackApi,yo=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},bo=/###/g,xo=e=>e&&e.includes(`###`)?e.replace(bo,`.`):e,So=e=>!e||z(e),Co=(e,t,n)=>{let r=z(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(So(e))return{};let t=xo(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return So(e)?{}:{obj:e,k:xo(r[i])}},wo=(e,t,n)=>{let{obj:r,k:i}=Co(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=Co(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Co(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},To=(e,t,n,r)=>{let{obj:i,k:a}=Co(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Eo=(e,t)=>{let{obj:n,k:r}=Co(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Do=(e,t,n)=>{let r=Eo(e,n);return r===void 0?Eo(t,n):r},Oo=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?z(e[r])||e[r]instanceof String||z(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):Oo(e[r],t[r],n):e[r]=t[r]);return e},ko=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Ao={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},jo=e=>z(e)?e.replace(/[&<>"'\/]/g,e=>Ao[e]):e,Mo=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}},No=[` `,`,`,`?`,`!`,`;`],Po=new Mo(20),Fo=(e,t,n)=>{t||=``,n||=``;let r=No.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Po.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},Io=(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},Lo=e=>e?.replace(/_/g,`-`),Ro={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)}},zo=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Ro,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=>z(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),z(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)}},Bo=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)})}},Vo=new WeakSet,Ho=class extends Bo{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.logger=zo.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):z(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Eo(this.data,o);return s==null&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s!=null||!a||!z(n)?s:Io(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),wo(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)(z(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=Eo(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?Oo(s,n,i):s={...s,...n},wo(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 Vo.has(n)?!0:!n||Object.keys(n).length===0?!1:(typeof n==`object`&&Vo.add(n),!0)})}toJSON(){return this.data}},Uo={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}},Wo=Symbol(`i18next/PATH_KEY`);function Go(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===Wo?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Ko(e,t){let{[Wo]:n}=e(Go()),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 qo=e=>!z(e)&&typeof e!=`boolean`&&typeof e!=`number`,Jo=class e extends Bo{constructor(e,t={}){super(),yo([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`,`ownPostProcessors`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=zo.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=qo(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&&!Fo(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:z(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:z(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=Ko(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Ko(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&&!z(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=qo(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(z(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:qo(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&&z(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=z(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&&!z(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=z(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(o.forEach(e=>{this.logger.debug&&Uo.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=Uo.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 z(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Ko(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&&!z(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(z(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&&!z(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}},Yo=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=zo.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Lo(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=Lo(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(z(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&&z(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)),z(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||z(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=z(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 z(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))):z(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())}},Xo={zero:0,one:1,two:2,few:3,many:4,other:5},Zo={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},Qo=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=zo.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Lo(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!`),Zo;if(!e.match(/-|_/))return Zo;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)=>Xo[e]-Xo[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))}},$o=(e,t,n,r=`.`,i=!0)=>{let a=Do(e,t,n);return a==null&&i&&z(n)&&(a=Io(e,n,r),a===void 0&&(a=Io(t,n,r))),a},es=class{constructor(e={}){this.logger=zo.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?jo:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?ko(i):a||`{{`,this.suffix=o?ko(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?ko(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?ko(l):``,this.nestingPrefix=d?ko(d):f||ko(`$t(`),this.nestingSuffix=p?ko(p):m||ko(`)`),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=$o(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($o(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===jo&&this.options?.interpolation?.escapeValue!==!1&&z(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=z(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!z(a)&&!this.useRawValueToEscape&&(a=go(a));let h=go(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(`${ko(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&&!z(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&&!z(i))return i;z(i)||(i=go(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)+go(i),l=s.lastIndex,this.regexp.lastIndex=0}return l?c+e.slice(l):e}},ts=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}},ns=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(Lo(r),i)(n)}let s=t[o];return s||(s=e(Lo(r),i),t[o]=s),s(n)}},rs=e=>(t,n,r)=>e(Lo(n),r)(t),is=class{constructor(e={}){this.logger=zo.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?ns:rs;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()]=ns(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}=ts(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)}},as=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},os=class extends Bo{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=zo.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=vo(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=>{To(n.loaded,[i],a),as(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();z(e)&&(e=this.languageUtils.toResolveHierarchy(e)),z(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)}}},ss=()=>({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]),z(e[1])&&(t.defaultValue=e[1]),z(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}),cs=e=>(z(e.ns)&&(e.ns=[e.ns]),z(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),z(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ls=()=>{},us,ds=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},B=class e extends Bo{constructor(e={},t){if(super(),this.options=cs(e),this.services={ownPostProcessors:new Set},this.logger=zo,this.modules={external:[]},ds(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&&(z(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=ss();this.options={...r,...this.options,...cs(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){us&&us!==this&&us.modules.logger!==this.modules.logger&&zo.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`),us=this.modules.logger?this:void 0,this.modules.logger?zo.init(i(this.modules.logger),this.options):zo.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:is;let t=new Yo(this.options);this.store=new Ho(this.options.resources,this.options);let r=this.services;r.logger=zo,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 es(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this),reloadResources:this.reloadResources.bind(this)},r.backendConnector=new os(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&&vo(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 Jo(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||=ls,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=ho(),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=ls){let n=t,r=z(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=ho();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||=ls,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`&&(Uo.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=ho();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=z(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(z(t)?[t]:t);a&&this.logger.debug&&!_o(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=vo(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=Ko(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Ko(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Ko(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return z(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=ho();return this.options.ns?(z(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=ho();z(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 Yo(ss());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=ls){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 Ho(e(this.store.data),i),a.services.resourceStore=a.store}if(t.interpolation){let e={...ss().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new es(n)}return a.translator=new Jo(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();B.createInstance,B.dir,B.init,B.loadResources,B.reloadResources,B.use,B.changeLanguage,B.getFixedT;var fs=B.t;B.exists,B.setDefaultNamespace,B.hasLoadedNamespace,B.loadNamespaces,B.loadLanguages;var ps=(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);bs(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},ms={},hs=(e,t,n,r)=>{bs(n)&&ms[n]||(bs(n)&&(ms[n]=new Date),ps(e,t,n,r))},gs=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},_s=(e,t,n)=>{e.loadNamespaces(t,gs(e,n))},vs=(e,t,n,r)=>{if(bs(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return _s(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,gs(e,r))},ys=(e,t,n={})=>!t.languages||!t.languages.length?(hs(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}}),bs=e=>typeof e==`string`,xs=e=>typeof e==`object`&&!!e,Ss=e=>{let t=e?.services?.i18nFormat;return typeof t?.parse==`function`?t:void 0},Cs={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},ws=e=>{if(!e)return e;let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=bs(r)?r.replace(/[&<>"']/g,e=>Cs[e]):r}),t},Ts=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Es={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":`\xA0`," ":`\xA0`,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Ds=e=>Es[e],Os=e=>e.replace(Ts,Ds),ks={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:Os,transDefaultProps:void 0},As=(e={})=>{ks={...ks,...e}},js=()=>ks,Ms,Ns=e=>{Ms=e},Ps=()=>Ms,Fs={type:`3rdParty`,init(e){As(e.options.react),Ns(e)}},Is=(0,o.createContext)(),Ls=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Rs=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})),zs=t(((e,t)=>{t.exports=Rs()})),Bs=zs(),Vs={t:(e,t)=>{if(bs(t))return t;if(xs(t)&&bs(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},Hs=()=>()=>{},Us=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,o.useContext)(Is)||{},a=n||r||Ps();a&&!a.reportNamespaces&&(a.reportNamespaces=new Ls),a||hs(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)(()=>({...js(),...a?.options?.react,...t}),[a,t]),{useSuspense:c,keyPrefix:l,bindI18n:u,bindI18nStore:d}=s,f=e||i||a?.options?.defaultNS,p=bs(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 Hs;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 Vs;let e=!!(a.isInitialized||a.initializedStoreOnce)&&h.every(e=>ys(e,a,s)),n=t.lng||a.language,r=g.current,i=typeof l==`function`?Ko(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,Bs.useSyncExternalStore)(_,y,y),w;a&&c&&!C&&(w=new Promise(e=>{let n=()=>e();t.lng?vs(a,t.lng,h,n):_s(a,h,n)}),{t:S,ready:C}=y()),(0,o.useEffect)(()=>{if(a&&!C&&!c){let e=()=>x(e=>e+1);t.lng?vs(a,t.lng,h,e):_s(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)=>(hs(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&&hs(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},Ws=(...e)=>e.filter(Boolean).join(` `),Gs=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ks(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Gs(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var qs=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},Js=e=>{let t=qs(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ys=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Xs={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 Zs(e){return e!=null}function Qs(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Xs.width,a=e.size??e.height??Xs.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?Ys(...c):Ys(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Xs[`stroke-width`])*Number(e.size??e.width??Xs.width)/Number(t.size??t.width??Xs.width):t.strokeWidth??Xs[`stroke-width`];return[`svg`,{...Object.entries(Xs).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Zs(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Zs(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Zs(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 $s(e,t={}){return Qs(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var ec=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},tc=(0,o.createContext)({}),nc=()=>(0,o.useContext)(tc),rc=(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=``}=nc()??{},b=!!l||ec(f),[x,S,C=[]]=$s(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:s??_,className:Ys(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 ic(e,t=[],n=[]){let r=typeof e==`string`?Ks(e,t,n):e,i=(0,o.forwardRef)(({className:e,...t},n)=>(0,o.createElement)(rc,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Js(r.name)),i}var ac=[`tomato`,`amber`,`lime`,`jade`,`teal`,`cobalt`,`iris`,`rose`,`slate`],oc=[`en`,`es`,`fr`,`pt`,`it`,`de`,`nl`,`ja`],sc={en:`English`,es:`Español`,fr:`Français`,pt:`Português`,it:`Italiano`,de:`Deutsch`,nl:`Nederlands`,ja:`日本語`},cc=e=>typeof e==`string`&&oc.includes(e);function lc(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 uc={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 dc(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 fc(e,t=`|`){return e.map(e=>Lc(e)).join(t)}function pc(e,t){return typeof t==`bigint`?t.toString():t}var mc=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 hc(e){return new mc(e)}function gc(e){return e==null}function _c(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function vc(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 yc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function bc(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function xc(e){return bc(e._zod.def)??e._zod.def.shape}function Sc(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return yc(this,t,e),e},enumerable:!0,configurable:!0})}function Cc(e,t,n){t in e?yc(e,t,n):e[t]=n}function wc(e,t,n,r){let i=xc(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Sc(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Cc(e,a,r?r(n.value,a):n.value))}}function Tc(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Sc(e,n,()=>t[n]):Cc(e,n,r.value))}}function Ec(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Dc(e){return JSON.stringify(e)}function Oc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var kc=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Ac(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var jc=hc(()=>{if(El.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Mc(e){if(Ac(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Ac(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Nc(e){return Mc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Pc=new Set([`string`,`number`,`symbol`]);function Fc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Ic(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function V(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 Lc(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Rc(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var zc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Bc={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Vc(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 wc(i,e,Hc(e,t)),Ic(e,Ec(n,{shape:i,checks:[]}))}function Hc(e,t){let n=xc(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 Uc(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(Hc(e,t)),a={};return wc(a,e,Reflect.ownKeys(xc(e)).filter(e=>!i.has(e))),Ic(e,Ec(n,{shape:a,checks:[]}))}function Wc(e,t){if(!Mc(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=xc(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 Ic(e,Ec(e._zod.def,{shape:Gc(e,t)}))}function Gc(e,t){let n={};return wc(n,e,Reflect.ownKeys(xc(e))),Tc(n,t),n}function Kc(e,t){if(!Mc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ic(e,Ec(e._zod.def,{shape:Gc(e,t)}))}function qc(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 wc(n,e,Reflect.ownKeys(xc(e))),wc(n,t,Reflect.ownKeys(xc(t))),Ic(e,Ec(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Jc(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(Hc(t,n)):void 0,o={};return wc(o,t,Reflect.ownKeys(xc(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),Ic(t,Ec(t._zod.def,{shape:o,checks:[]}))}function Yc(e,t,n){let r=n?new Set(Hc(t,n)):void 0,i={};return wc(i,t,Reflect.ownKeys(xc(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),Ic(t,Ec(t._zod.def,{shape:i}))}function Xc(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 Zc(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 $c(e){return typeof e==`string`?e:e?.message}function el(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 tl(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function nl(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:$c(e.inst?._zod.def?.error?.(e))??$c(a?.(e))??$c(t?.error?.(e))??$c(n.customError?.(e))??$c(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 rl=/[\uD800-\uDBFF]/;function il(e){let t=e.length;if(!rl.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 al(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ol(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 sl(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function cl(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):fl(e,n,r.value)}}function ll(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function ul(e,t,n){return ll(e,t,n,!1)}function dl(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return ll(this,n,r(this))},set(e){ll(this,n,e)}})}return t}function fl(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:ll(this,t,n.bind(this))},set(e){ll(this,t,e)}})}function pl(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var ml,hl=!1,gl={configurable:!0,get(){hl=!0}};function H(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&ml!==e._zod?ml=void 0:(ml=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,gl);let e=hl;hl=!1;try{let r=n(this);return hl?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),hl||=e,r}catch(n){throw delete this[t],hl||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function _l(e,t,n,r){let i=pl(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 vl=`~constantCatch`;function yl(e){let t=()=>e;return t[vl]=!0,t}var bl,xl={value:void 0,enumerable:!1},Sl=`captureStackTrace`in Error?Error:null;function Cl(e){let t=Sl;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Sl=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(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){xl.value=new a(r);try{Object.defineProperty(n,"_zod",xl)}finally{xl.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),cl(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?Cl(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 wl=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Tl=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(bl=globalThis).__zod_globalConfig??(bl.__zod_globalConfig={});var El=globalThis.__zod_globalConfig;function Dl(e){return e&&Object.assign(El,e),El}function Ol(){let e=this._zod;return e.message??=JSON.stringify(e.def,pc,2),e.message}function kl(e){this._zod.message=e}var Al={get:Ol,set:kl,enumerable:!0,configurable:!0},jl={value:void 0,enumerable:!1},Ml=new WeakSet([Object.prototype,Error.prototype]),Nl=U(`$ZodError`,(e,t)=>{e.name=`$ZodError`,jl.value=t,Object.defineProperty(e,"issues",jl),jl.value=void 0,Object.defineProperty(e,"message",Al);let n=Object.getPrototypeOf(e);Ml.has(n)||(Ml.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 Pl(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 Fl(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Pl(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Il(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 Ll(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Rl=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 wl;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>nl(e,o,Dl())));throw kc(n,a?.callee??t),n}return s.value};return t},zl=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=>nl(e,o,Dl())));throw kc(n,a?.callee??t),n}return s.value};return t},Bl=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 wl;return a.issues.length?Vl(e,a.issues,i):{success:!0,data:a.value}};function Vl(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>nl(e,n,Dl()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Hl=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?Vl(e,a.issues,i):{success:!0,data:a.value}},Ul=Symbol.for(`zod.compile.invalid`),Wl=Symbol.for(`zod.compile.fallback`),Gl=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==Ul)return!0;if(r.definite===!0&&n===void 0)return!1}return Kl(e,t,n)});function Kl(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Wl]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new wl;return a.issues.length===0}var ql=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},Jl=e=>{let t=Rl(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Ll(n,a))};return n},Yl=e=>{let t=Rl(e),n=(e,r,i,a)=>t(e,r,i,Ll(n,a));return n},Xl=e=>{let t=zl(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Ll(n,a))};return n},Zl=e=>{let t=zl(e),n=async(e,r,i,a)=>await t(e,r,i,Ll(n,a));return n},Ql=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Bl(e)(t,n,i)},$l=e=>(t,n,r)=>Bl(e)(t,n,r),eu=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Hl(e)(t,n,i)},tu=e=>async(t,n,r)=>Hl(e)(t,n,r),nu=/^[cC][0-9a-z]{6,}$/,ru=/^[0-9a-z]+$/,iu=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,au=/^[0-9a-vA-V]{20}$/,ou=/^[A-Za-z0-9]{27}$/,su=/^[a-zA-Z0-9_-]{21}$/;function cu(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var lu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,uu=/^([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})$/,du=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)$/,fu=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pu=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function mu(){return new RegExp(pu,`u`)}var hu=/^(?:(?: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])$/,gu=/^(([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}|:))$/,_u=/^((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])$/,vu=/^(([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])$/,yu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bu=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,xu=/^https?$/,Su=/^\+[1-9]\d{6,14}$/,Cu=`(?:(?:\\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 wu(e){return RegExp(`^${e}$`)}var Tu=wu(Cu);function Eu(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 Du(e){return RegExp(`^${Eu(e)}$`)}function Ou(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Eu({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Eu({precision:e.precision})}`:n;return RegExp(`^${Cu}T(?:${r})$`)}var ku=/^[\s\S]{0,}$/,Au=/^-?\d+$/,ju=/^-?\d+(?:\.\d+)?$/,Mu=/^(?:true|false)$/i,Nu=/^[^A-Z]*$/,Pu=/^[^a-z]*$/,Fu=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Iu=e=>{let t=e.value;return!gc(t)&&t.length!==void 0},Lu={number:`number`,bigint:`bigint`,object:`date`},Ru=U(`$ZodCheckLessThan`,(e,t)=>{Fu.init(e,t);let n=Lu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Lu[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})}}),zu=U(`$ZodCheckGreaterThan`,(e,t)=>{Fu.init(e,t);let n=Lu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Lu[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})}}),Bu=U(`$ZodCheckMultipleOf`,(e,t)=>{Fu.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):vc(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})}}),Vu=U(`$ZodCheckNumberFormat`,(e,t)=>{Fu.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=zc[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})}}),Hu=U(`$ZodCheckMaxLength`,(e,t)=>{var n;Fu.init(e,t),(n=e._zod.def).when??(n.when=Iu),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?il(r):i)<=t.maximum)return;let a=al(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Uu=U(`$ZodCheckMinLength`,(e,t)=>{var n;Fu.init(e,t),(n=e._zod.def).when??(n.when=Iu),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?il(r):i)>=t.minimum)return;let a=al(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Wu=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;Fu.init(e,t),(n=e._zod.def).when??(n.when=Iu),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?il(r):i;if(a===t.length)return;let o=al(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})}}),Gu=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Fu.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=()=>{})}),Ku=U(`$ZodCheckRegex`,(e,t)=>{Gu.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})}}),qu=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Nu,Gu.init(e,t)}),Ju=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Pu,Gu.init(e,t)}),Yu=U(`$ZodCheckIncludes`,(e,t)=>{Fu.init(e,t);let n=Fc(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})}}),Xu=U(`$ZodCheckStartsWith`,(e,t)=>{Fu.init(e,t);let n=RegExp(`^${Fc(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})}}),Zu=U(`$ZodCheckEndsWith`,(e,t)=>{Fu.init(e,t);let n=RegExp(`.*${Fc(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=U(`$ZodCheckOverwrite`,(e,t)=>{Fu.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),$u=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
|
-
`).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
|
-
`)}\n};`)(...Object.values(this.closed))}},ed={major:4,minor:6,patch:7},W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=ed;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=Xc(t),a;for(let o of n){if(o._zod.def.when){if(Zc(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 wl;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(tl(t.issues,n,e),i||=Xc(t,n))});else{if(t.issues.length===n)continue;tl(t.issues,n,e),i||=Xc(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Xc(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new wl;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 wl;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return ul(this,`~standard`,rd(this))},set"~standard"(e){ll(this,`~standard`,e)}}),td=(e,t)=>e.issues.length?{issues:e.issues.map(e=>nl(e,t,Dl()))}:{value:e.value};async function nd(e,t){let n={async:!0};return td(await e._zod.run({value:t,issues:[]},n),n)}function rd(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return td(r,n)}catch{}return nd(e,t)},vendor:`zod`,version:1}}var id=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=t.pattern??ku,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}}),G=U(`$ZodStringFormat`,(e,t)=>{Gu.init(e,t),id.init(e,t)}),ad=U(`$ZodGUID`,(e,t)=>{t.pattern??=uu,G.init(e,t)}),od=U(`$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??=du(e)}else t.pattern??=du();G.init(e,t)}),sd=U(`$ZodEmail`,(e,t)=>{t.pattern??=fu,G.init(e,t)});function cd(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function ld(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?cd(e)||2:ud(e,t)}function ud(e,t){if(!t.normalize&&t.protocol?.source===xu.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 dd=/[\t\n\r]/g;function fd(e){return e.replace(dd,``)}function pd(e,t){return t.lastIndex=0,t.test(e.hostname)}function md(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var hd=U(`$ZodURL`,(e,t)=>{G.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=ld(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=fd(r);return}t.hostname&&!pd(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&&!md(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:fd(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),gd=U(`$ZodEmoji`,(e,t)=>{t.pattern??=mu(),G.init(e,t)}),_d=U(`$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?su:cu(t.length),G.init(e,t)}),vd=U(`$ZodCUID`,(e,t)=>{t.pattern??=nu,G.init(e,t)}),yd=U(`$ZodCUID2`,(e,t)=>{t.pattern??=ru,G.init(e,t)}),bd=U(`$ZodULID`,(e,t)=>{t.pattern??=iu,G.init(e,t)}),xd=U(`$ZodXID`,(e,t)=>{t.pattern??=au,G.init(e,t)}),Sd=U(`$ZodKSUID`,(e,t)=>{t.pattern??=ou,G.init(e,t)}),Cd=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Ou(t),G.init(e,t)}),wd=U(`$ZodISODate`,(e,t)=>{t.pattern??=Tu,G.init(e,t)}),Td=U(`$ZodISOTime`,(e,t)=>{t.pattern??=Du(t),G.init(e,t)}),Ed=U(`$ZodISODuration`,(e,t)=>{t.pattern??=lu,G.init(e,t)}),Dd=U(`$ZodIPv4`,(e,t)=>{t.pattern??=hu,G.init(e,t)}),Od=/^[0-9a-fA-F:.]+$/;function kd(e){return Od.test(e)?cd(`http://[${e}]`):!1}var Ad=U(`$ZodIPv6`,(e,t)=>{t.pattern??=gu,G.init(e,t),e._zod.check=n=>{kd(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),jd=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=_u,G.init(e,t)});function Md(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:kd(n)}var Nd=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=vu,G.init(e,t),e._zod.check=n=>{Md(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Pd(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Fd=/^[0-9a-zA-Z+/]*={0,2}$/,Id=U(`$ZodBase64`,(e,t)=>{t.pattern??=Fd,G.init(e,t),e._zod.check=n=>{Pd(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Ld=/^[A-Za-z0-9_-]*$/;function Rd(e){if(!Ld.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Pd(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var zd=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Ld,G.init(e,t),e._zod.check=n=>{Rd(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Bd=U(`$ZodE164`,(e,t)=>{t.pattern??=Su,G.init(e,t)});function Vd(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 Hd=U(`$ZodJWT`,(e,t)=>{G.init(e,t),e._zod.check=n=>{Vd(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Ud=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=ju,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}}),Wd=U(`$ZodNumberFormat`,(e,t)=>{Vu.init(e,t),Ud.init(e,t)}),Gd=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=Mu,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}}),Kd=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),qd=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Jd(e,t){let n=el(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 el(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,tl(n.issues,t,e),n}}return i(n,a)}}var Yd=e=>Array.isArray(e)?e.length:-1;function Xd(e,t,n){e.issues.length&&t.issues.push(...Qc(n,e.issues)),t.value[n]=e.value}var Zd=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=El.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=>Xd(t,r,e)));else if(Xd(c,r,e),s&&c.issues.length!==0&&Xc(c))break}return o.length?Promise.all(o).then(()=>r):r},Jd(e,Yd)});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 $d=[];function ef(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:$d,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=Rc(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function tf(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(Xc(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 nf=U(`$ZodObject`,(e,t)=>{W.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=hc(()=>ef(t));H(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)||yc(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=Ac,o=t.catchall,s,c=El.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(Xc(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?tf(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),rf=U(`$ZodObjectJIT`,(e,t)=>{nf.init(e,t);let n=e._zod.parse,r=hc(()=>ef(t)),i=El.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new $u([`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
|
-
let ${e}_ab = false;
|
|
8
|
-
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
9
|
-
const iss = ${e}.issues[i];
|
|
10
|
-
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
11
|
-
payload.issues.push(iss);
|
|
12
|
-
if (iss.continue !== true) ${e}_ab = true;
|
|
13
|
-
}
|
|
14
|
-
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
15
|
-
payload.value = newResult;
|
|
16
|
-
return payload;
|
|
17
|
-
}`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Dc(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`
|
|
18
|
-
const ${n}_present = ${i};
|
|
19
|
-
if (!${n}.issues.length || ${n}_present) {
|
|
20
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (${e}) {
|
|
24
|
-
newResult[${r}] = ${n}.value;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
`)}else f?(o.write(`
|
|
29
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
30
|
-
}
|
|
31
|
-
`),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`
|
|
32
|
-
if (${n}.value !== undefined || ${i}) {
|
|
33
|
-
newResult[${r}] = ${n}.value;
|
|
34
|
-
}
|
|
35
|
-
`)):o.write(`
|
|
36
|
-
const ${n}_present = ${i};
|
|
37
|
-
if (${n}.issues.length) {${c(n,r)}
|
|
38
|
-
}
|
|
39
|
-
if (!${n}_present && !${n}.issues.length) {
|
|
40
|
-
payload.issues.push({
|
|
41
|
-
code: "invalid_type",
|
|
42
|
-
expected: "nonoptional",
|
|
43
|
-
input: undefined,
|
|
44
|
-
path: [${r}]
|
|
45
|
-
});
|
|
46
|
-
if (ctx && ctx.abortEarly) {
|
|
47
|
-
payload.value = newResult;
|
|
48
|
-
return payload;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (${n}_present) {
|
|
53
|
-
newResult[${r}] = ${n}.value;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
`)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ac,c=!El.jitless,l=c&&jc.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?tf([],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 af(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=>!Xc(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=>nl(e,r,Dl())))}),t)}var of=U(`$ZodUnion`,(e,t)=>{W.init(e,t),H(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),H(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),H(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)))}),H(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=>_c(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=>af(t,r,e,i)):af(o,r,e,i)}}),sf=U(`$ZodIntersection`,(e,t)=>{W.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])=>lf(e,t,n)):lf(e,i,a)}});function cf(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Mc(e)&&Mc(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=cf(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=cf(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 lf(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=cf(t.value,n.value);if(!c.valid){if(Xc(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var uf=U(`$ZodRecord`,(e,t)=>{W.init(e,t);let n=El.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Mc(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=>nl(e,i,Dl())),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`&&ju.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=>nl(e,i,Dl())),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}}),df=U(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=dc(t.entries),r=new Set(n);e._zod.values=r,H(e,`pattern`,e=>{let t=dc(e.def.entries).filter(e=>Pc.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Fc(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}}),ff=U(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,H(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Fc(e):e?Fc(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}}),pf=U(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,El.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Tl(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 wl;return n.value=i,n}});function mf(e,t){return e.value=t.issues.length?void 0:t.value,e}var hf=U(`$ZodOptional`,(e,t)=>{W.init(e,t),H(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,H(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),H(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${_c(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=>mf(e,t)):mf(e,r)}return t.innerType._zod.run(e,n)}}),gf=U(`$ZodExactOptional`,(e,t)=>{hf.init(e,t),H(e,`values`,e=>e.def.innerType._zod.values),H(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),_f=U(`$ZodNullable`,(e,t)=>{W.init(e,t),H(e,`optin`,e=>e.def.innerType._zod.optin),H(e,`optout`,e=>e.def.innerType._zod.optout),H(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${_c(t.source)}|null)$`):void 0}),H(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)}),vf=U(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,H(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=>yf(e,t)):yf(r,t)}});function yf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var bf=U(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,H(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))}),xf=U(`$ZodNonOptional`,(e,t)=>{W.init(e,t),H(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=>Sf(t,e)):Sf(i,e)}});function Sf(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 Cf(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>nl(e,r,Dl()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var wf=U(`$ZodCatch`,(e,t)=>{W.init(e,t),H(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),H(e,`optout`,e=>e.def.innerType._zod.optout),H(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=>Cf(e,r,t,n)):Cf(e,r,t,n)}}),Tf=U(`$ZodPipe`,(e,t)=>{W.init(e,t),H(e,`values`,e=>e.def.in._zod.values),H(e,`optin`,e=>e.def.in._zod.optin),H(e,`optout`,e=>e.def.out._zod.optout),H(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=>Ef(e,t.in,n)):Ef(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Ef(e,t.out,n)):Ef(r,t.out,n)}});function Ef(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 Df=U(`$ZodReadonly`,(e,t)=>{W.init(e,t),H(e,`propValues`,e=>e.def.innerType._zod.propValues),H(e,`values`,e=>e.def.innerType._zod.values),H(e,`optin`,e=>e.def.innerType?._zod?.optin),H(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(Of):Of(r)}});function Of(e){return e.memo||(e.value=Object.freeze(e.value)),e}var kf=U(`$ZodCustom`,(e,t)=>{Fu.init(e,t),W.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=>Af(t,n,r,e));Af(i,n,r,e)}});function Af(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(sl(e))}}var jf=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Mf=`~memo`,Nf=[];function Pf(e){return typeof e==`object`&&!!e}function Ff(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var If=new WeakMap,Lf=0,Rf=1,zf=2;function Bf(e,t,n){let r=If.get(e);if(r!==void 0)return r?zf:Lf;if(t.has(e))return zf;t.add(e);let i=Lf,a=e=>{if(i!==zf&&e?._zod){let r=Bf(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Lf;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Rf:o.value?._zod?Bf(o.value,t,n):Lf;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=bc(c);s(e?o(e,!0):Rf),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?Bf(r,t,!1):Rf);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),Vf(e,i)}function Vf(e,t){return t!==Rf&&If.set(e,t===zf),t}function Hf(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var Uf,Wf=[],Gf={alloc(e,t,n){let r=Uf;if(!r)return n;Uf=void 0;let i={value:n,issues:null};return r.set(t.value,i),Wf.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`&&qf(n,e.value))throw new jf;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=Bf(e,new Set,!1);if(i===Lf)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===zf||r?n=!0:r=!0}let l=s.value;if(!Pf(l))return t(s,c);let u=c[Mf];u||(u={buckets:new WeakMap,backEdges:void 0},c[Mf]=u);let d;i===c?d=a:(d=Hf(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(...Ff(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;Uf=d;let p=Wf.length,m=t(s,c);Uf=void 0;let h=Wf.length>p?Wf.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?Ff(e.issues):Nf),e)):(h&&(h.issues=m.issues.length?Ff(m.issues):Nf),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Kf(){return Gf}function qf(e,t){let n=e[Mf]?.backEdges;return n!==void 0&&Pf(t)&&n.has(t)}var Jf=()=>{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(ol(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Lc(e.values[0])}`:`Invalid option: expected one of ${fc(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`:``}: ${fc(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 Yf(){return{localeError:Jf()}}var Xf,Zf=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 Zf}(Xf=globalThis).__zod_globalRegistry??(Xf.__zod_globalRegistry=Qf());var $f=globalThis.__zod_globalRegistry;function ep(e){return e.checks&&=[...e.checks],e}function tp(e,t){return new e(ep({type:`string`,...V(t)}))}function np(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...V(t)})}function rp(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...V(t)})}function ip(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...V(t)})}function ap(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...V(t)})}function op(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...V(t)})}function sp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...V(t)})}function cp(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...V(t)})}function lp(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...V(t)})}function up(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...V(t)})}function dp(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...V(t)})}function fp(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...V(t)})}function pp(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...V(t)})}function mp(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...V(t)})}function hp(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...V(t)})}function gp(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...V(t)})}function _p(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...V(t)})}function vp(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...V(t)})}function yp(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...V(t)})}function bp(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...V(t)})}function xp(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...V(t)})}function Sp(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...V(t)})}function Cp(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...V(t)})}function wp(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...V(t)})}function Tp(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...V(t)})}function Ep(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...V(t)})}function Dp(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...V(t)})}function Op(e,t){return new e(ep({type:`number`,checks:[],...V(t)}))}function kp(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...V(t)})}function Ap(e,t){return new e({type:`boolean`,...V(t)})}function jp(e){return new e({type:`unknown`})}function Mp(e,t){return new e({type:`never`,...V(t)})}function Np(e,t){return new Ru({check:`less_than`,...V(t),value:e,inclusive:!1})}function Pp(e,t){return new Ru({check:`less_than`,...V(t),value:e,inclusive:!0})}function Fp(e,t){return new zu({check:`greater_than`,...V(t),value:e,inclusive:!1})}function Ip(e,t){return new zu({check:`greater_than`,...V(t),value:e,inclusive:!0})}function Lp(e,t){return new Bu({check:`multiple_of`,...V(t),value:e})}function Rp(e,t){return new Hu({check:`max_length`,...V(t),maximum:e})}function zp(e,t){return new Uu({check:`min_length`,...V(t),minimum:e})}function Bp(e,t){return new Wu({check:`length_equals`,...V(t),length:e})}function Vp(e,t){return new Ku({check:`string_format`,format:`regex`,...V(t),pattern:e})}function Hp(e){return new qu({check:`string_format`,format:`lowercase`,...V(e)})}function Up(e){return new Ju({check:`string_format`,format:`uppercase`,...V(e)})}function Wp(e,t){return new Yu({check:`string_format`,format:`includes`,...V(t),includes:e})}function Gp(e,t){return new Xu({check:`string_format`,format:`starts_with`,...V(t),prefix:e})}function Kp(e,t){return new Zu({check:`string_format`,format:`ends_with`,...V(t),suffix:e})}function qp(e){return new Qu({check:`overwrite`,tx:e})}function Jp(e){return qp(t=>t.normalize(e))}function Yp(){return qp(e=>e.trim())}function Xp(){return qp(e=>e.toLowerCase())}function Zp(){return qp(e=>e.toUpperCase())}function Qp(){return qp(e=>Oc(e))}function $p(e,t,n){return new e({type:`array`,element:t,...V(n)})}function em(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...V(n)})}function tm(e,t){let n=nm(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(sl(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(sl(r))}},e(t.value,t)),t);return n}function nm(e,t){let n=new Fu({check:`custom`,...V(t)});return n._zod.check=e,n}function rm(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&yc(e,t,n[t]);return e}function im(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??$f,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 am(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 K(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,K(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&rm(o.schema,c),t.io===`input`&&hm(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 om(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function sm(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}/${om(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+om(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
|
-
|
|
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 cm(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;cm(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 lm=new Set([`type`,`properties`,`required`,`additionalProperties`]),um=[`oneOf`,`anyOf`];function dm(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function fm(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!lm.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]??dm(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}yc(n,r,e.length===1?e[0]:fm(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=dm(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 pm(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of lm)if(t in e)return;let n=t.filter(e=>um.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=fm(t);else{let e=n[0],i=um.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=>fm([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,rm(e,r))}function mm(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)):rm(i,s),rm(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())cm(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)??[])pm(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)}rm(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,yc(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:_m(t,`input`,e.processors),output:_m(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function hm(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 hm(r.element,n);if(r.type===`set`)return hm(r.valueType,n);if(r.type===`lazy`)return hm(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 hm(r.innerType,n);if(r.type===`intersection`)return hm(r.left,n)||hm(r.right,n);if(r.type===`record`||r.type===`map`)return hm(r.keyType,n)||hm(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:hm(r.in,n)||hm(r.out,n);if(r.type===`object`){for(let e in r.shape)if(hm(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(hm(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(hm(e,n))return!0;return!!(r.rest&&hm(r.rest,n))}return!1}var gm=(e,t={})=>n=>{let r=im({...n,processors:t});return K(e,r),sm(r,e),mm(r,e)},_m=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=im({...i??{},target:a,io:t,processors:n});return K(e,o),sm(o,e),mm(o,e)},vm=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},ym=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},bm=(e,t)=>{vm(e,`minimum`,t),ym(e,`maximum`,t)},xm=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Sm=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Cm=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},wm=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Tm=(e,t)=>vm(e,`minimum`,t.minimum),Em=(e,t)=>ym(e,`maximum`,t.maximum),Dm=e=>(t,n)=>{wm(t,n.format);let[r,i]=e[n.format];vm(t,`minimum`,r),ym(t,`maximum`,i)},Om={greater_than:(e,t)=>vm(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>ym(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>xm(e,t.value),number_format:Dm(zc),bigint_format:Dm(Bc),min_length:Tm,max_length:Em,length_equals:(e,t)=>bm(e,t.length),min_size:Tm,max_size:Em,size_equals:(e,t)=>bm(e,t.size),string_format:(e,t)=>{wm(e,t.format),t.pattern&&Sm(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)=>Cm(e,t.mime)};function km(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Om[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&vm(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&vm(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&ym(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&ym(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&xm(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Cm(t,i.mime);for(let e of i.patterns??[])Sm(t,e);return t}var Am={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},jm=new Map([[Fd,yu],[Ld,bu]]),Mm=e=>jm.get(e)??e,Nm=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=km(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Am[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(Mm);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}))])}},Pm=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=km(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)):am(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}))])}},Fm=(e,t,n,r)=>{n.type=`boolean`},Im=(e,t,n,r)=>{n.not={}},Lm=(e,t,n,r)=>{let i=e._zod.def,a=dc(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)},Rm=(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(am(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(am(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}},zm=(e,t,n,r)=>{am(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Bm=(e,t,n,r)=>{am(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Vm=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=km(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=K(a.element,t,{...r,path:[...r.path,`items`]})};function Hm(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Hm(t.out):t.type===`catch`?Hm(t.innerType):e._zod.optin}var Um=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&am(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)yc(i.properties,e,K(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`?Hm(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=K(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Wm=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>K(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Gm=(e,t,n,r)=>{let i=e._zod.def,a=K(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=K(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 Km(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=Km(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=>Km(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`)?ju:Au).source)),p}var qm=new WeakMap;function Jm(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 qm.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Km(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 Ym=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=km(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=K(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)yc(i.patternProperties,Mm(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=K(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=qm.get(t);n||(n=[],qm.set(t,n),t.deferred.push(()=>Jm(t))),n.push(e)}i.additionalProperties=K(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Hm(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))}},Xm=(e,t,n,r)=>{let i=e._zod.def,a=K(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`}]},Zm=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Qm=Symbol();function $m(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(am(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Qm):JSON.parse(o)}var eh=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=$m(i.defaultValue,e,t,n,r);o!==Qm&&(n.default=o)},th=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=$m(i.defaultValue,e,t,n,r);o!==Qm&&(n._prefault=o)},nh=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{am(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},rh=(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;K(o,t,r);let s=t.seen.get(e);s.ref=o},ih=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},ah=(e,t,n,r)=>{let i=e._zod.def;K(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},oh=new WeakSet([Object.prototype,Error.prototype]);function sh(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 ch=U(`ZodError`,(e,t)=>{Nl.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);oh.has(n)||(oh.add(n),sh(n,`format`,e=>t=>Il(e,t)),sh(n,`flatten`,e=>t=>Fl(e,t)),sh(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,pc,2)}),sh(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,pc,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),lh=Rl(ch),uh=zl(ch),dh=Bl(ch),fh=Hl(ch),ph=Jl(ch),mh=Yl(ch),hh=Xl(ch),gh=Zl(ch),_h=Ql(ch),vh=$l(ch),yh=eu(ch),bh=tu(ch);function xh(){El.localeError||Dl(Yf())}function Sh(){El.memoizer||Dl({memoizer:Kf()})}var q=U(`ZodType`,(e,t)=>(xh(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Ec(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 Ic(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(zg(e,t))},superRefine(e,t){return this.check(Bg(e,t))},overwrite(e){return this.check(qp(e))},optional(){return xg(this)},exactOptional(){return Cg(this)},nullable(){return Tg(this)},nullish(){return xg(Tg(this))},nonoptional(e){return jg(this,e)},array(){return og(this)},or(e){return lg([this,e])},and(e){return dg(this,e)},transform(e){return Fg(this,yg(e))},default(e){return Dg(this,e)},prefault(e){return kg(this,e)},catch(e){return Ng(this,e)},pipe(e){return Fg(this,e)},readonly(){return Lg(this)},describe(e){let t=this.clone();return $f.add(t,{description:e}),t},meta(...e){if(e.length===0)return $f.get(this);let t=this.clone();return $f.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 ul(this,`~standard`,{...rd(this),jsonSchema:{input:_m(this,`input`),output:_m(this,`output`)}})},set"~standard"(e){ll(this,`~standard`,e)},parse:function e(t,n){return lh(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await uh(this,t,n,{callee:e})},safeParse(e,t){return dh(this,e,t)},async safeParseAsync(e,t){return fh(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ll(this,`spa`,e)},validate(e,t){return Gl(this,e,t)},validateAsync(e,t){return ql(this,e,t)},encode:function e(t,n){return ph(this,t,n,{callee:e})},decode:function e(t,n){return mh(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await hh(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await gh(this,t,n,{callee:e})},safeEncode(e,t){return _h(this,e,t)},safeDecode(e,t){return vh(this,e,t)},async safeEncodeAsync(e,t){return yh(this,e,t)},async safeDecodeAsync(e,t){return bh(this,e,t)},toJSONSchema(e){return gm(this,{})(e)},get description(){return $f.get(this)?.description},get _def(){return this._zod.def}}),Ch=U(`_ZodString`,(e,t)=>{id.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Nm(e,t,n,r)},dl({format:e=>km(e).format??null,minLength:e=>km(e).minimum??null,maxLength:e=>km(e).maximum??null},{regex(...e){return this.check(Vp(...e))},includes(...e){return this.check(Wp(...e))},startsWith(...e){return this.check(Gp(...e))},endsWith(...e){return this.check(Kp(...e))},min(...e){return this.check(zp(...e))},max(...e){return this.check(Rp(...e))},length(...e){return this.check(Bp(...e))},nonempty(...e){return this.check(zp(1,...e))},lowercase(e){return this.check(Hp(e))},uppercase(e){return this.check(Up(e))},trim(){return this.check(Yp())},normalize(...e){return this.check(Jp(...e))},toLowerCase(){return this.check(Xp())},toUpperCase(){return this.check(Zp())},slugify(){return this.check(Qp())}})),wh=U(`ZodString`,(e,t)=>{id.init(e,t),Ch.init(e,t)},{email(e){return this.check(np(kh,e))},url(e){return this.check(cp(Nh,e))},jwt(e){return this.check(Cp(Jh,e))},emoji(e){return this.check(lp(Ph,e))},guid(e){return this.check(rp(Ah,e))},uuid(e){return this.check(ip(jh,e))},uuidv4(e){return this.check(ap(jh,e))},uuidv6(e){return this.check(op(jh,e))},uuidv7(e){return this.check(sp(jh,e))},nanoid(e){return this.check(up(Fh,e))},cuid(e){return this.check(dp(Ih,e))},cuid2(e){return this.check(fp(Lh,e))},ulid(e){return this.check(pp(Rh,e))},base64(e){return this.check(bp(Gh,e))},base64url(e){return this.check(xp(Kh,e))},xid(e){return this.check(mp(zh,e))},ksuid(e){return this.check(hp(Bh,e))},ipv4(e){return this.check(gp(Vh,e))},ipv6(e){return this.check(_p(Hh,e))},cidrv4(e){return this.check(vp(Uh,e))},cidrv6(e){return this.check(yp(Wh,e))},e164(e){return this.check(Sp(qh,e))},datetime(e){return this.check(wp(Th,e))},date(e){return this.check(Tp(Eh,e))},time(e){return this.check(Ep(Dh,e))},duration(e){return this.check(Dp(Oh,e))}});function J(e){return tp(wh,e)}var Y=U(`ZodStringFormat`,(e,t)=>{G.init(e,t),Ch.init(e,t)}),Th=U(`ZodISODateTime`,(e,t)=>{Cd.init(e,t),Y.init(e,t)}),Eh=U(`ZodISODate`,(e,t)=>{wd.init(e,t),Y.init(e,t)}),Dh=U(`ZodISOTime`,(e,t)=>{Td.init(e,t),Y.init(e,t)}),Oh=U(`ZodISODuration`,(e,t)=>{Ed.init(e,t),Y.init(e,t)}),kh=U(`ZodEmail`,(e,t)=>{sd.init(e,t),Y.init(e,t)}),Ah=U(`ZodGUID`,(e,t)=>{ad.init(e,t),Y.init(e,t)}),jh=U(`ZodUUID`,(e,t)=>{od.init(e,t),Y.init(e,t)});function Mh(e){return ip(jh,e)}var Nh=U(`ZodURL`,(e,t)=>{hd.init(e,t),Y.init(e,t)}),Ph=U(`ZodEmoji`,(e,t)=>{gd.init(e,t),Y.init(e,t)}),Fh=U(`ZodNanoID`,(e,t)=>{_d.init(e,t),Y.init(e,t)}),Ih=U(`ZodCUID`,(e,t)=>{vd.init(e,t),Y.init(e,t)}),Lh=U(`ZodCUID2`,(e,t)=>{yd.init(e,t),Y.init(e,t)}),Rh=U(`ZodULID`,(e,t)=>{bd.init(e,t),Y.init(e,t)}),zh=U(`ZodXID`,(e,t)=>{xd.init(e,t),Y.init(e,t)}),Bh=U(`ZodKSUID`,(e,t)=>{Sd.init(e,t),Y.init(e,t)}),Vh=U(`ZodIPv4`,(e,t)=>{Dd.init(e,t),Y.init(e,t)}),Hh=U(`ZodIPv6`,(e,t)=>{Ad.init(e,t),Y.init(e,t)}),Uh=U(`ZodCIDRv4`,(e,t)=>{jd.init(e,t),Y.init(e,t)}),Wh=U(`ZodCIDRv6`,(e,t)=>{Nd.init(e,t),Y.init(e,t)}),Gh=U(`ZodBase64`,(e,t)=>{Id.init(e,t),Y.init(e,t)}),Kh=U(`ZodBase64URL`,(e,t)=>{zd.init(e,t),Y.init(e,t)}),qh=U(`ZodE164`,(e,t)=>{Bd.init(e,t),Y.init(e,t)}),Jh=U(`ZodJWT`,(e,t)=>{Hd.init(e,t),Y.init(e,t)}),Yh=U(`ZodNumber`,(e,t)=>{Ud.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Pm(e,t,n,r),e.isFinite=!0},dl({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=km(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=km(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=km(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>km(e).format??null},{gt(e,t){return this.check(Fp(e,t))},gte(e,t){return this.check(Ip(e,t))},min(e,t){return this.check(Ip(e,t))},lt(e,t){return this.check(Np(e,t))},lte(e,t){return this.check(Pp(e,t))},max(e,t){return this.check(Pp(e,t))},int(e){return this.check(Qh(e))},safe(e){return this.check(Qh(e))},positive(e){return this.check(Fp(0,e))},nonnegative(e){return this.check(Ip(0,e))},negative(e){return this.check(Np(0,e))},nonpositive(e){return this.check(Pp(0,e))},multipleOf(e,t){return this.check(Lp(e,t))},step(e,t){return this.check(Lp(e,t))},finite(){return this}}));function Xh(e){return Op(Yh,e)}var Zh=U(`ZodNumberFormat`,(e,t)=>{Wd.init(e,t),Yh.init(e,t)});function Qh(e){return kp(Zh,e)}var $h=U(`ZodBoolean`,(e,t)=>{Gd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Fm(e,t,n,r)});function eg(e){return Ap($h,e)}var tg=U(`ZodUnknown`,(e,t)=>{Kd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function ng(){return jp(tg)}var rg=U(`ZodNever`,(e,t)=>{qd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Im(e,t,n,r)});function ig(e){return Mp(rg,e)}var ag=U(`ZodArray`,(e,t)=>{Sh(),Zd.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vm(e,t,n,r),e.element=t.element},{min(e,t){return this.check(zp(e,t))},nonempty(e){return this.check(zp(1,e))},max(e,t){return this.check(Rp(e,t))},length(e,t){return this.check(Bp(e,t))},unwrap(){return this.element}});function og(e,t){return $p(ag,e,t)}var sg=U(`ZodObject`,(e,t)=>{Sh(),rf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Um(e,t,n,r),_l(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return hg(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(Ec(this._zod.def,{catchall:e}))},passthrough(){return this.clone(Ec(this._zod.def,{catchall:ng()}))},loose(){return this.clone(Ec(this._zod.def,{catchall:ng()}))},strict(){return this.clone(Ec(this._zod.def,{catchall:ig()}))},strip(){return this.clone(Ec(this._zod.def,{catchall:void 0}))},extend(e){return Wc(this,e)},safeExtend(e){return Kc(this,e)},merge(e){return qc(this,e)},pick(e){return Vc(this,e)},omit(e){return Uc(this,e)},partial(...e){return Jc(bg,this,e[0])},exactPartial(...e){return Jc(Sg,this,e[0],`exactPartial`)},required(...e){return Yc(Ag,this,e[0])}});function X(e,t){return new sg({type:`object`,shape:e??{},...V(t)})}var cg=U(`ZodUnion`,(e,t)=>{of.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wm(e,t,n,r),e.options=t.options});function lg(e,t){return new cg({type:`union`,options:e,...V(t)})}var ug=U(`ZodIntersection`,(e,t)=>{sf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gm(e,t,n,r)});function dg(e,t){return new ug({type:`intersection`,left:e,right:t})}var fg=U(`ZodRecord`,(e,t)=>{Sh(),uf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ym(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function pg(e,t,n){return!t||!t._zod?new fg({type:`record`,keyType:J(),valueType:e,...V(t)}):new fg({type:`record`,keyType:e,valueType:t,...V(n)})}var mg=U(`ZodEnum`,(e,t)=>{df.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lm(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 mg({...t,checks:[],...V(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 mg({...t,checks:[],...V(r),entries:i})}});function hg(e,t){return new mg({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...V(t)})}var gg=U(`ZodLiteral`,(e,t)=>{ff.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rm(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 _g(e,t){return new gg({type:`literal`,values:Array.isArray(e)?e:[e],...V(t)})}var vg=U(`ZodTransform`,(e,t)=>{Sh(),pf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bm(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Tl(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(sl(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(sl(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function yg(e){return new vg({type:`transform`,transform:e})}var bg=U(`ZodOptional`,(e,t)=>{hf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ah(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function xg(e){return new bg({type:`optional`,innerType:e})}var Sg=U(`ZodExactOptional`,(e,t)=>{gf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ah(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Cg(e){return new Sg({type:`optional`,innerType:e})}var wg=U(`ZodNullable`,(e,t)=>{_f.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tg(e){return new wg({type:`nullable`,innerType:e})}var Eg=U(`ZodDefault`,(e,t)=>{vf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Dg(e,t){return new Eg({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Nc(t)}})}var Og=U(`ZodPrefault`,(e,t)=>{bf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>th(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kg(e,t){return new Og({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Nc(t)}})}var Ag=U(`ZodNonOptional`,(e,t)=>{xf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zm(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function jg(e,t){return new Ag({type:`nonoptional`,innerType:e,...V(t)})}var Mg=U(`ZodCatch`,(e,t)=>{wf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ng(e,t){return new Mg({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:yl(t)})}var Pg=U(`ZodPipe`,(e,t)=>{Tf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rh(e,t,n,r),e.in=t.in,e.out=t.out});function Fg(e,t){return new Pg({type:`pipe`,in:e,out:t})}var Ig=U(`ZodReadonly`,(e,t)=>{Df.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ih(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Lg(e){return new Ig({type:`readonly`,innerType:e})}var Rg=U(`ZodCustom`,(e,t)=>{kf.init(e,t),q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zm(e,t,n,r)});function zg(e,t={}){return em(Rg,e,t)}function Bg(e,t){return tm(e,t)}function Vg(e){return wp(Th,e)}var Hg=[`tasks:read`,`tasks:write`,`docs:read`,`docs:write`,`organize`];function Ug(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`),e.organize&&(e.tasks===`write`||e.docs===`write`)&&t.push(`organize`),t}function Wg(e,t){return e.includes(`${t}:write`)?`write`:e.includes(`${t}:read`)?`read`:`none`}var Gg=Mh(),Z=(e=120)=>J().trim().min(1,`Required`).max(e),Kg=hg(ac),qg=Xh().int().min(0).max(1e5),Jg=Vg({offset:!0}),Yg=2e5,Xg=J().trim().min(1,`Required`).max(256),Zg=X({setupCode:Xg,name:Z(80),locale:hg(oc).optional()}),Qg=X({accessKey:Xg}),$g=X({setupCode:Xg,reason:hg([`lost`,`compromised`])});X({currentAccessKey:Xg}),X({accessKey:Xg}),X({token:J().min(40).max(200)}),X({name:Z(80).optional(),theme:hg([`system`,`light`,`dark`]).optional(),locale:hg(oc).optional()}),X({name:Z(60)}),X({name:Z(80),color:Kg.default(`cobalt`),description:J().trim().max(500).optional()}),X({name:Z(80).optional(),color:Kg.optional(),description:J().trim().max(500).optional()}),X({name:Z(80),columns:og(Z(60)).max(20).optional()}),X({name:Z(80)}),X({name:Z(60),index:qg.optional()}),X({name:Z(60).optional(),index:qg.optional()}),X({name:J().trim().max(40).default(``),color:Kg}),X({name:J().trim().max(40).optional(),color:Kg.optional()}),X({title:Z(300),description:J().max(Yg).optional(),dueAt:Jg.nullable().optional(),labelIds:og(Gg).max(20).optional(),index:qg.optional()}),X({title:Z(300).optional(),description:J().max(Yg).optional(),baseVersion:Xh().int().min(1).optional(),dueAt:Jg.nullable().optional(),labelIds:og(Gg).max(20).optional()}),X({columnId:Gg,index:qg}),X({title:Z(120).default(`Checklist`)}),X({title:Z(120)}),X({text:Z(500)}),X({text:Z(500).optional(),done:eg().optional(),index:qg.optional()}),X({pageId:Gg}),X({title:J().trim().max(200).default(``),icon:J().max(16).nullable().optional(),parentId:Gg.nullable().optional(),content:J().max(Yg).default(``)}),X({title:J().trim().max(200).optional(),icon:J().max(16).nullable().optional(),content:J().max(Yg).optional(),baseVersion:Xh().int().min(1).optional()}),X({parentId:Gg.nullable(),index:qg}),X({cardId:Gg.optional(),pageId:Gg.optional()}).refine(e=>e.cardId===void 0!=(e.pageId===void 0),{message:`Send either cardId or pageId`}),X({name:Z(60),workspaceId:Gg,scopes:og(hg(Hg)).min(1,`Select at least one permission`),expiresInDays:lg([_g(30),_g(90),_g(365)]).nullable()}),X({organize:eg()});var e_=J().regex(/^[A-Za-z0-9+/=_-]+$/).max(4096),t_=X({algorithm:_g(`argon2id`),salt:e_,memoryKiB:Xh().int().min(19456).max(1048576),iterations:Xh().int().min(2).max(20),parallelism:Xh().int().min(1).max(8)}),n_=J().regex(/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,`Invalid envelope`).max(4e5);X({kdf:t_,wrappedKey:n_,recoveryWrappedKey:n_}),X({data:n_}),X({autoLockMinutes:lg([_g(1),_g(5),_g(15),_g(30),_g(60)])}),X({params:pg(J(),J().max(4e3))}).extend({allow:eg(),workspaceId:J().optional(),scopes:og(hg(Hg)).max(Hg.length).optional(),replace:eg().optional()}),X({ids:og(Gg).min(1).max(500).optional(),since:Gg.optional(),conflicts:hg([`ask`,`skip`,`force`]).default(`ask`),dryRun:eg().default(!1)}).refine(e=>e.ids===void 0!=(e.since===void 0),{message:`Send either ids or since`});var r_=`X-File-Name`,i_={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`},trash:{restored:`<actor>{{actor}}</actor> restored <target>“{{target}}”</target> from the trash`,purged:`<actor>{{actor}}</actor> deleted <target>“{{target}}”</target> for good`},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:`What agents delete goes to the trash: only you empty it, and you can undo any change from the history.`,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`,organize:{pill:`Delete and move`,hint:`To the trash; you decide whether it comes back.`,on:`{{name}} can now delete and move`,off:`{{name}} can no longer delete or move`}},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.`,organize:{label:`Can delete and move`,hint:`What it deletes goes to the trash, where you can bring it back. Moving includes cards to another board and attachments to another card or page.`,needsWrite:`Needs read and write access to an 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}}”?`,empty:`The column is empty.`,withCards_one:`Its card goes to the trash with it.`,withCards_other:`Its {{count}} cards go to the trash with it.`,withArchived_one:`Its archived card goes to the trash with it.`,withArchived_other:`Its {{count}} archived cards go to the trash with it.`},deleted:`Column “{{name}}” moved to the trash`},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 goes to the trash 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`,deleted:`Card moved to the trash`,history:`History`},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`,deleted:`Checklist “{{name}}” moved to the trash`,itemDeleted:`“{{text}}” moved to the trash`},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`,deleted:`Label “{{name}}” moved to the trash`},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.`,unlinked:`Link moved to the trash`},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:`Move “{{title}}” to the trash?`},attachments:{deleteConfirm:`Delete “{{name}}”?`,download:`Download {{name}}`,deleteNamed:`Delete {{name}}`,uploading:`Uploading…`,attach:`Attach file`,deleted:`“{{name}}” moved to the trash`}},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`,history:`History`},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.`,restore_place_in_trash:`Restore what this belongs to first: it’s in the trash too.`,restore_place_gone:`The place it belonged to no longer exists, and there’s nowhere else to put it.`},notFound:`The item couldn’t be found.`,server:`Something went wrong on the server. Try again.`,unknown:`Something went wrong. Try again.`},history:{title:`History of “{{name}}”`,intro_one:`Every change from the last {{count}} day, with who made it.`,intro_other:`Every change from the last {{count}} days, with who made it.`,empty_one:`No changes in the last {{count}} day.`,empty_other:`No changes in the last {{count}} days.`,list:`Changes`,entry:`{{name}}, {{when}}`,older:`Show older changes`,showChanges:`See what changed`,hideChanges:`Hide what changed`,lines:`Lines added: {{added}}. Lines removed: {{removed}}.`,loadFailed:`What changed couldn’t be loaded. Try again.`,diff:`What changed, line by line`,added:`Added: `,removed:`Removed: `,unchanged_one:`{{count}} line without changes`,unchanged_other:`{{count}} lines without changes`,noLineChanges:`No line changed.`,movedTo:`Its place was gone, so it went to {{place}}`,quoted:`“{{name}}”`,kinds:{page:{created:`<actor>{{actor}}</actor> created this page`,title:`<actor>{{actor}}</actor> renamed it from “{{before}}” to “{{after}}”`,iconSet:`<actor>{{actor}}</actor> changed the icon to {{icon}}`,iconRemoved:`<actor>{{actor}}</actor> removed the icon`,content:`<actor>{{actor}}</actor> edited the content`,movedInto:`<actor>{{actor}}</actor> moved it into “{{to}}”`,movedTop:`<actor>{{actor}}</actor> moved it to the top of the project`,deleted:`<actor>{{actor}}</actor> moved it to the trash`,restored:`<actor>{{actor}}</actor> brought it back from the trash`},card:{created:`<actor>{{actor}}</actor> created this card in “{{column}}”`,title:`<actor>{{actor}}</actor> renamed it from “{{before}}” to “{{after}}”`,description:`<actor>{{actor}}</actor> edited the description`,dueSet:`<actor>{{actor}}</actor> set the due date to {{date}}`,dueRemoved:`<actor>{{actor}}</actor> removed the due date`,labelsAdded_one:`<actor>{{actor}}</actor> added the label {{added}}`,labelsAdded_other:`<actor>{{actor}}</actor> added the labels {{added}}`,labelsRemoved_one:`<actor>{{actor}}</actor> removed the label {{removed}}`,labelsRemoved_other:`<actor>{{actor}}</actor> removed the labels {{removed}}`,labelsChanged:`<actor>{{actor}}</actor> added {{added}} and removed {{removed}}`,moved:`<actor>{{actor}}</actor> moved it from “{{from}}” to “{{to}}”`,archived:`<actor>{{actor}}</actor> archived it`,unarchived:`<actor>{{actor}}</actor> took it out of the archive`,deleted:`<actor>{{actor}}</actor> moved it to the trash`,restored:`<actor>{{actor}}</actor> brought it back from the trash`,linked:`<actor>{{actor}}</actor> linked it to the page “{{page}}”`,unlinked:`<actor>{{actor}}</actor> removed its link to the page “{{page}}”`,movedWithoutLabels_one:`<actor>{{actor}}</actor> moved it from “{{from}}” to “{{to}}” and took off the label {{removed}}, which belonged to the other board`,movedWithoutLabels_other:`<actor>{{actor}}</actor> moved it from “{{from}}” to “{{to}}” and took off the labels {{removed}}, which belonged to the other board`},checklist:{created:`<actor>{{actor}}</actor> added the checklist “{{title}}”`,title:`<actor>{{actor}}</actor> renamed the checklist “{{before}}” to “{{after}}”`,deleted:`<actor>{{actor}}</actor> moved the checklist “{{title}}” to the trash`,restored:`<actor>{{actor}}</actor> brought back the checklist “{{title}}”`},item:{created:`<actor>{{actor}}</actor> added “{{text}}” to “{{checklist}}”`,text:`<actor>{{actor}}</actor> changed the item “{{before}}” to “{{after}}”`,done:`<actor>{{actor}}</actor> checked “{{text}}”`,undone:`<actor>{{actor}}</actor> unchecked “{{text}}”`,deleted:`<actor>{{actor}}</actor> moved the item “{{text}}” to the trash`,restored:`<actor>{{actor}}</actor> brought back the item “{{text}}”`},attachment:{created:`<actor>{{actor}}</actor> attached “{{name}}”`,deleted:`<actor>{{actor}}</actor> moved the file “{{name}}” to the trash`,restored:`<actor>{{actor}}</actor> brought back the file “{{name}}”`,moved:`<actor>{{actor}}</actor> moved the file “{{name}}” from “{{from}}” to “{{to}}”`}},actions:{undo:`Undo`,undoSince:`Undo everything {{name}} did from here`,restore:`Restore this version`},note:{undoOf:`undoing an earlier change`,restoredFrom:`restoring an earlier version`},undo:{done_one:`Change undone`,done_other:`{{count}} changes undone`,nothing:`It was already as before.`,skipped_one:`{{count}} change that was touched since was skipped.`,skipped_other:`{{count}} changes that were touched since were skipped.`,failed_one:`{{count}} change couldn’t be undone.`,failed_other:`{{count}} changes couldn’t be undone.`,versionRestored:`Version restored`,impossible:{gone:`“{{title}}” no longer exists.`,place_gone:`Where “{{title}}” was no longer exists.`,trash_gone:`“{{title}}” was deleted for good from the trash.`,refused:`“{{title}}” couldn’t be undone.`},one:{title:`Someone changed this since`,body:`{{name}} changed it after this change. Undoing it now discards what they did.`,bodyUnknown:`It changed after this change. Undoing it now discards what changed since.`,current:`Now: “{{value}}”`,confirm:`Undo anyway`},bulk:{title_one:`Undo {{count}} change by {{name}}?`,title_other:`Undo {{count}} changes by {{name}}?`,body:`Each thing goes back to how it was before its change, newest first. Undoing is recorded in the history too.`,nothing:`There’s nothing left to undo`,conflicts_one:`{{count}} was changed since by someone else:`,conflicts_other:`{{count}} were changed since by someone else:`,conflictsList:`Changed since`,conflict:`“{{title}}”: changed since by {{name}}`,conflictUnknown:`“{{title}}”: changed since`,impossible_one:`{{count}} can’t be undone:`,impossible_other:`{{count}} can’t be undone:`,skip_one:`Undo {{count}}, skip the rest`,skip_other:`Undo {{count}}, skip the rest`,force:`Undo them all anyway`,confirm_one:`Undo {{count}} change`,confirm_other:`Undo {{count}} changes`}}},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, trash 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`,trash:`Trash`},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 go to the trash with it.`,confirm:`Delete board`,done:`Board moved to the trash`},deletePage:{title:`Delete “{{name}}”?`,body:`Its subpages and attachments go to the trash with it.`,confirm:`Delete page`,done:`Page moved to the trash`},deleteProject:{title:`Delete the project “{{name}}”?`,body:`All its boards, cards, pages and attachments go to the trash with it.`,confirm:`Delete project`,done:`Project moved to the trash`}},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`,trash:`trash bin deleted restore`}}},trash:{title:`Trash`,intro_one:`What you delete waits here for {{count}} day, with everything it held. Restore it whenever you like; after that, it’s deleted for good.`,intro_other:`What you delete waits here for {{count}} days, with everything it held. Restore it whenever you like; after that, it’s deleted for good.`,empty:{title:`The trash is empty`,body_one:`When you delete something, it waits here for {{count}} day in case you change your mind.`,body_other:`When you delete something, it waits here for {{count}} days in case you change your mind.`},note_one:`You can bring it back from the trash for {{count}} day.`,note_other:`You can bring it back from the trash for {{count}} days.`,kind:{project:`Project`,board:`Board`,column:`Column`,card:`Card`,page:`Page`,attachment:`Attachment`,label:`Label`,checklist:`Checklist`,checklist_item:`Checklist item`,link:`Link to a page`},contents:{boards_one:`{{count}} board`,boards_other:`{{count}} boards`,columns_one:`{{count}} column`,columns_other:`{{count}} columns`,cards_one:`{{count}} card`,cards_other:`{{count}} cards`,pages_one:`{{count}} page`,pages_other:`{{count}} pages`,checklists_one:`{{count}} checklist`,checklists_other:`{{count}} checklists`,items_one:`{{count}} checklist item`,items_other:`{{count}} checklist items`,labels_one:`{{count}} label`,labels_other:`{{count}} labels`,attachments_one:`{{count}} attachment`,attachments_other:`{{count}} attachments`},deletedBy:`Deleted by {{name}} {{when}}`,expires:`Deleted for good {{when}}`,restore:`Restore`,open:`Open`,restored:`“{{name}}” is back`,restoredElsewhere:`Its place no longer exists, so it’s now in {{place}}.`,restoreFirst:`Restore “{{name}}” first: what this belongs to is in the trash too.`,purge:{action:`Delete for good`,named:`Delete “{{name}}” for good`,title:`Delete “{{name}}” for good?`,body:`It can’t be brought back afterwards.`,confirm:`Delete for good`,done:`“{{name}}” deleted for good`},toast:{description:`It’s in the trash, in case you change your mind.`,undo:`Undo`}},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
|
-
|
|
60
|
-
{{recoveryKey}}
|
|
61
|
-
|
|
62
|
-
Keep it outside Orqevio (for example, printed or in another password manager).
|
|
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.`}}},a_=Object.keys(i_),o_=`modulepreload`,s_=function(e){return`/`+e},c_={},l_=function(e){return e.pathname.endsWith(`.css`)},u_=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},Q=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=s_(t,n);let r=s(t),i=l_(r);return u_(c_,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`:o_,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)})},d_=Object.assign({"./locales/de/activity.json":()=>Q(()=>import(`./activity-ZNUvkr3p.js`).then(e=>e.default),[]),"./locales/de/agents.json":()=>Q(()=>import(`./agents-3HUiV4tV.js`).then(e=>e.default),[]),"./locales/de/auth.json":()=>Q(()=>import(`./auth-DXyQ1sR9.js`).then(e=>e.default),[]),"./locales/de/boards.json":()=>Q(()=>import(`./boards-DSTXu61F.js`).then(e=>e.default),[]),"./locales/de/common.json":()=>Q(()=>import(`./common-DJe5JA5c.js`).then(e=>e.default),[]),"./locales/de/docs.json":()=>Q(()=>import(`./docs-CZq019Fr.js`).then(e=>e.default),[]),"./locales/de/errors.json":()=>Q(()=>import(`./errors-CJTyAPcw.js`).then(e=>e.default),[]),"./locales/de/history.json":()=>Q(()=>import(`./history-CBSq8sT_.js`).then(e=>e.default),[]),"./locales/de/home.json":()=>Q(()=>import(`./home-DMs617rt.js`).then(e=>e.default),[]),"./locales/de/oauth.json":()=>Q(()=>import(`./oauth-BqnFE4AA.js`).then(e=>e.default),[]),"./locales/de/projects.json":()=>Q(()=>import(`./projects--t9VhdYF.js`).then(e=>e.default),[]),"./locales/de/settings.json":()=>Q(()=>import(`./settings-CWBjLZeX.js`).then(e=>e.default),[]),"./locales/de/shell.json":()=>Q(()=>import(`./shell-BDp_dyvw.js`).then(e=>e.default),[]),"./locales/de/trash.json":()=>Q(()=>import(`./trash-BJO-DupK.js`).then(e=>e.default),[]),"./locales/de/vault.json":()=>Q(()=>import(`./vault-C2I5wY2c.js`).then(e=>e.default),[]),"./locales/es/activity.json":()=>Q(()=>import(`./activity-6zHhcitv.js`).then(e=>e.default),[]),"./locales/es/agents.json":()=>Q(()=>import(`./agents-CJMhiUW3.js`).then(e=>e.default),[]),"./locales/es/auth.json":()=>Q(()=>import(`./auth-SCXskweB.js`).then(e=>e.default),[]),"./locales/es/boards.json":()=>Q(()=>import(`./boards-mFQFxBPQ.js`).then(e=>e.default),[]),"./locales/es/common.json":()=>Q(()=>import(`./common-Dr48NU46.js`).then(e=>e.default),[]),"./locales/es/docs.json":()=>Q(()=>import(`./docs-NO6PWaeN.js`).then(e=>e.default),[]),"./locales/es/errors.json":()=>Q(()=>import(`./errors-Z5PDTKIL.js`).then(e=>e.default),[]),"./locales/es/history.json":()=>Q(()=>import(`./history-BuXL4ZO8.js`).then(e=>e.default),[]),"./locales/es/home.json":()=>Q(()=>import(`./home-tJQGjAOo.js`).then(e=>e.default),[]),"./locales/es/oauth.json":()=>Q(()=>import(`./oauth-B5NFSQMb.js`).then(e=>e.default),[]),"./locales/es/projects.json":()=>Q(()=>import(`./projects-aUO3NoCx.js`).then(e=>e.default),[]),"./locales/es/settings.json":()=>Q(()=>import(`./settings-C7vmkddK.js`).then(e=>e.default),[]),"./locales/es/shell.json":()=>Q(()=>import(`./shell-CFZKdSNl.js`).then(e=>e.default),[]),"./locales/es/trash.json":()=>Q(()=>import(`./trash-Bxu4b7lw.js`).then(e=>e.default),[]),"./locales/es/vault.json":()=>Q(()=>import(`./vault-VdamUs2c.js`).then(e=>e.default),[]),"./locales/fr/activity.json":()=>Q(()=>import(`./activity-mAare-yB.js`).then(e=>e.default),[]),"./locales/fr/agents.json":()=>Q(()=>import(`./agents-CjiLfJS9.js`).then(e=>e.default),[]),"./locales/fr/auth.json":()=>Q(()=>import(`./auth-CWjUpxax.js`).then(e=>e.default),[]),"./locales/fr/boards.json":()=>Q(()=>import(`./boards-CeiIWYk-.js`).then(e=>e.default),[]),"./locales/fr/common.json":()=>Q(()=>import(`./common-CxTPkV7X.js`).then(e=>e.default),[]),"./locales/fr/docs.json":()=>Q(()=>import(`./docs-wmJ1fgqN.js`).then(e=>e.default),[]),"./locales/fr/errors.json":()=>Q(()=>import(`./errors-Dy51ouo4.js`).then(e=>e.default),[]),"./locales/fr/history.json":()=>Q(()=>import(`./history-Cpw0AAmb.js`).then(e=>e.default),[]),"./locales/fr/home.json":()=>Q(()=>import(`./home-CaRivmXC.js`).then(e=>e.default),[]),"./locales/fr/oauth.json":()=>Q(()=>import(`./oauth-DqVF11QW.js`).then(e=>e.default),[]),"./locales/fr/projects.json":()=>Q(()=>import(`./projects-BVQGJc7P.js`).then(e=>e.default),[]),"./locales/fr/settings.json":()=>Q(()=>import(`./settings-BW0zBLJn.js`).then(e=>e.default),[]),"./locales/fr/shell.json":()=>Q(()=>import(`./shell-DhehnO0K.js`).then(e=>e.default),[]),"./locales/fr/trash.json":()=>Q(()=>import(`./trash-DFqgqLEp.js`).then(e=>e.default),[]),"./locales/fr/vault.json":()=>Q(()=>import(`./vault-DDN2TVJW.js`).then(e=>e.default),[]),"./locales/it/activity.json":()=>Q(()=>import(`./activity-_4kW2ZJ_.js`).then(e=>e.default),[]),"./locales/it/agents.json":()=>Q(()=>import(`./agents-sA8xOJfc.js`).then(e=>e.default),[]),"./locales/it/auth.json":()=>Q(()=>import(`./auth-CqESesWQ.js`).then(e=>e.default),[]),"./locales/it/boards.json":()=>Q(()=>import(`./boards-BTAHuwCR.js`).then(e=>e.default),[]),"./locales/it/common.json":()=>Q(()=>import(`./common-Vls4DuMQ.js`).then(e=>e.default),[]),"./locales/it/docs.json":()=>Q(()=>import(`./docs-DvgTX1bm.js`).then(e=>e.default),[]),"./locales/it/errors.json":()=>Q(()=>import(`./errors-tpMDhE_P.js`).then(e=>e.default),[]),"./locales/it/history.json":()=>Q(()=>import(`./history-BR28CO2x.js`).then(e=>e.default),[]),"./locales/it/home.json":()=>Q(()=>import(`./home-taXbu6Bg.js`).then(e=>e.default),[]),"./locales/it/oauth.json":()=>Q(()=>import(`./oauth-DyKo7CI7.js`).then(e=>e.default),[]),"./locales/it/projects.json":()=>Q(()=>import(`./projects-CrDJIGi7.js`).then(e=>e.default),[]),"./locales/it/settings.json":()=>Q(()=>import(`./settings-CK3tlBqd.js`).then(e=>e.default),[]),"./locales/it/shell.json":()=>Q(()=>import(`./shell-DKm9aLr8.js`).then(e=>e.default),[]),"./locales/it/trash.json":()=>Q(()=>import(`./trash-lAGOyPXd.js`).then(e=>e.default),[]),"./locales/it/vault.json":()=>Q(()=>import(`./vault-DGwHkhSm.js`).then(e=>e.default),[]),"./locales/ja/activity.json":()=>Q(()=>import(`./activity-CWpwjlzR.js`).then(e=>e.default),[]),"./locales/ja/agents.json":()=>Q(()=>import(`./agents-R0c_yDCD.js`).then(e=>e.default),[]),"./locales/ja/auth.json":()=>Q(()=>import(`./auth-C58Nm5w2.js`).then(e=>e.default),[]),"./locales/ja/boards.json":()=>Q(()=>import(`./boards-CKwJtefi.js`).then(e=>e.default),[]),"./locales/ja/common.json":()=>Q(()=>import(`./common-COjNB9BR.js`).then(e=>e.default),[]),"./locales/ja/docs.json":()=>Q(()=>import(`./docs-BiIxmBdC.js`).then(e=>e.default),[]),"./locales/ja/errors.json":()=>Q(()=>import(`./errors-DcAK3Axg.js`).then(e=>e.default),[]),"./locales/ja/history.json":()=>Q(()=>import(`./history-CUFddWVE.js`).then(e=>e.default),[]),"./locales/ja/home.json":()=>Q(()=>import(`./home-JcVjUU4G.js`).then(e=>e.default),[]),"./locales/ja/oauth.json":()=>Q(()=>import(`./oauth-Cfwu6jFm.js`).then(e=>e.default),[]),"./locales/ja/projects.json":()=>Q(()=>import(`./projects-CNfl9kuI.js`).then(e=>e.default),[]),"./locales/ja/settings.json":()=>Q(()=>import(`./settings-BDfqTbHE.js`).then(e=>e.default),[]),"./locales/ja/shell.json":()=>Q(()=>import(`./shell-DKu6Snuz.js`).then(e=>e.default),[]),"./locales/ja/trash.json":()=>Q(()=>import(`./trash-pWFmQnYh.js`).then(e=>e.default),[]),"./locales/ja/vault.json":()=>Q(()=>import(`./vault-ds4tlkvx.js`).then(e=>e.default),[]),"./locales/nl/activity.json":()=>Q(()=>import(`./activity-CdqdeoxV.js`).then(e=>e.default),[]),"./locales/nl/agents.json":()=>Q(()=>import(`./agents-c6F7y9Af.js`).then(e=>e.default),[]),"./locales/nl/auth.json":()=>Q(()=>import(`./auth-BINwoLLL.js`).then(e=>e.default),[]),"./locales/nl/boards.json":()=>Q(()=>import(`./boards-DkyiWQSW.js`).then(e=>e.default),[]),"./locales/nl/common.json":()=>Q(()=>import(`./common-D-VyKjDv.js`).then(e=>e.default),[]),"./locales/nl/docs.json":()=>Q(()=>import(`./docs-CxyPUV8q.js`).then(e=>e.default),[]),"./locales/nl/errors.json":()=>Q(()=>import(`./errors-ezWDkBsu.js`).then(e=>e.default),[]),"./locales/nl/history.json":()=>Q(()=>import(`./history-DpSejrKr.js`).then(e=>e.default),[]),"./locales/nl/home.json":()=>Q(()=>import(`./home-DT1m0uVZ.js`).then(e=>e.default),[]),"./locales/nl/oauth.json":()=>Q(()=>import(`./oauth-BIEEGPBd.js`).then(e=>e.default),[]),"./locales/nl/projects.json":()=>Q(()=>import(`./projects-D3eU-Jew.js`).then(e=>e.default),[]),"./locales/nl/settings.json":()=>Q(()=>import(`./settings-R-xZf6BT.js`).then(e=>e.default),[]),"./locales/nl/shell.json":()=>Q(()=>import(`./shell-C6TGc8Za.js`).then(e=>e.default),[]),"./locales/nl/trash.json":()=>Q(()=>import(`./trash-BQQD171k.js`).then(e=>e.default),[]),"./locales/nl/vault.json":()=>Q(()=>import(`./vault-DmWLOBSw.js`).then(e=>e.default),[]),"./locales/pt/activity.json":()=>Q(()=>import(`./activity-DGUXp5QL.js`).then(e=>e.default),[]),"./locales/pt/agents.json":()=>Q(()=>import(`./agents-DwUimfIe.js`).then(e=>e.default),[]),"./locales/pt/auth.json":()=>Q(()=>import(`./auth-ByK78s7m.js`).then(e=>e.default),[]),"./locales/pt/boards.json":()=>Q(()=>import(`./boards-hABacqWX.js`).then(e=>e.default),[]),"./locales/pt/common.json":()=>Q(()=>import(`./common-D3b_OJUw.js`).then(e=>e.default),[]),"./locales/pt/docs.json":()=>Q(()=>import(`./docs-CctrfBzG.js`).then(e=>e.default),[]),"./locales/pt/errors.json":()=>Q(()=>import(`./errors-DfqPLtND.js`).then(e=>e.default),[]),"./locales/pt/history.json":()=>Q(()=>import(`./history-DXLLakuK.js`).then(e=>e.default),[]),"./locales/pt/home.json":()=>Q(()=>import(`./home-VZIRoQVj.js`).then(e=>e.default),[]),"./locales/pt/oauth.json":()=>Q(()=>import(`./oauth-CK3lCh9i.js`).then(e=>e.default),[]),"./locales/pt/projects.json":()=>Q(()=>import(`./projects-BsY2PmjV.js`).then(e=>e.default),[]),"./locales/pt/settings.json":()=>Q(()=>import(`./settings-BYv1UcVK.js`).then(e=>e.default),[]),"./locales/pt/shell.json":()=>Q(()=>import(`./shell-CtEP2nnE.js`).then(e=>e.default),[]),"./locales/pt/trash.json":()=>Q(()=>import(`./trash-mj787YHq.js`).then(e=>e.default),[]),"./locales/pt/vault.json":()=>Q(()=>import(`./vault-CnwqbS9q.js`).then(e=>e.default),[])}),f_=oc.filter(e=>e===`en`||Object.keys(d_).some(t=>t.startsWith(`./locales/${e}/`))),p_=e=>cc(e)&&f_.includes(e),m_=`orqevio.locale`;function h_(){try{let e=localStorage.getItem(m_);return p_(e)?e:null}catch{return null}}function g_(){let e=navigator.languages?.length?navigator.languages:[navigator.language];return h_()??lc(e,f_)??`en`}var __={type:`backend`,init(){},read(e,t,n){let r=d_[`./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 v_(){B.on(`languageChanged`,e=>{document.documentElement.lang=e}),await B.use(__).use(Fs).init({lng:g_(),fallbackLng:`en`,supportedLngs:[...f_],load:`currentOnly`,ns:a_,defaultNS:`common`,resources:{en:i_},partialBundledLanguages:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1}})}var y_=()=>cc(B.resolvedLanguage)?B.resolvedLanguage:`en`;async function b_(e){if(p_(e)){try{localStorage.setItem(m_,e)}catch{}B.resolvedLanguage!==e&&await B.changeLanguage(e)}}var x_=class extends Error{status;code;details;constructor(e,t,n,r){super(n),this.status=e,this.code=t,this.details=r}};async function S_(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[r_]=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 x_(0,`network`,`No connection to the server`)}if(o.status===204)return;let s=await o.text(),c=s?C_(s):null;if(!o.ok){let e=c?.error;throw new x_(o.status,e?.code??`error`,e?.message??o.statusText,e?.details)}return c}function C_(e){try{return JSON.parse(e)}catch{return null}}var w_=(e,t)=>S_(`GET`,e,void 0,t),T_=(e,t={})=>S_(`POST`,e,t),E_=(e,t)=>S_(`PATCH`,e,t),D_=(e,t)=>S_(`PUT`,e,t),O_=e=>S_(`DELETE`,e),k_=[`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`,`restore_place_in_trash`,`restore_place_gone`],A_=e=>k_.includes(e);function j_(e){return e instanceof x_?A_(e.code)?fs(`errors:codes.${e.code}`):e.status===404?fs(`errors:notFound`):e.status>=500?fs(`errors:server`):e.message:fs(`errors:unknown`)}var M_=new ze({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0,retry:(e,t)=>!(t instanceof x_&&t.status>=400&&t.status<500)&&e<2},mutations:{retry:!1}}}),$={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`],trash:e=>[`trash`,e],history:(e,t)=>[`history`,e,t],historyEntry:e=>[`history-entry`,e]},N_=()=>I({queryKey:$.me,queryFn:async({signal:e})=>{let t=await w_(`/auth/session`,e);if(!t.user)throw M_.setQueryData($.access,t),new x_(401,`unauthorized`,`Authentication required`);return t},staleTime:6e4}),P_=()=>I({queryKey:$.access,queryFn:({signal:e})=>w_(`/auth/session`,e),staleTime:0}),F_=e=>I({queryKey:$.overview(e??``),queryFn:({signal:t})=>w_(`/workspaces/${e}/overview`,t),enabled:!!e}),I_=e=>I({queryKey:$.home(e),queryFn:({signal:t})=>w_(`/workspaces/${e}/home`,t)}),L_=e=>I({queryKey:$.board(e),queryFn:({signal:t})=>w_(`/boards/${e}`,t)}),R_=(e,t)=>I({queryKey:$.archived(e),queryFn:({signal:t})=>w_(`/boards/${e}/archived`,t),enabled:t}),z_=e=>I({queryKey:$.card(e??``),queryFn:({signal:t})=>w_(`/cards/${e}`,t),enabled:!!e}),B_=e=>I({queryKey:$.page(e),queryFn:({signal:t})=>w_(`/pages/${e}`,t),staleTime:5e3}),V_=(e,t,n)=>I({queryKey:[...$.search(e,t),n??`all`],queryFn:({signal:r})=>w_(`/workspaces/${e}/search?q=${encodeURIComponent(t)}${n?`&type=${n}`:``}`,r),enabled:t.trim().length>=2,placeholderData:te,staleTime:1e4}),H_=e=>I({queryKey:$.trash(e),queryFn:({signal:t})=>w_(`/workspaces/${e}/trash`,t)}),U_=(e,t,n)=>Qe({queryKey:$.history(e,t),queryFn:({signal:n,pageParam:r})=>w_(`/${e}s/${t}/history?limit=${W_}${r?`&before=${encodeURIComponent(r.updatedAt)}&beforeId=${r.id}`:``}`,n),initialPageParam:null,getNextPageParam:e=>e.length<W_?void 0:{id:e.at(-1).id,updatedAt:e.at(-1).updatedAt},enabled:n}),W_=50,G_=(e,t,n)=>I({queryKey:[...$.historyEntry(e),t],queryFn:({signal:t})=>w_(`/history/${e}`,t),enabled:n,staleTime:1/0}),K_=()=>I({queryKey:$.tokens,queryFn:({signal:e})=>w_(`/tokens`,e)}),q_=36e5,J_=()=>I({queryKey:$.updates,queryFn:({signal:e})=>w_(`/updates`,e),staleTime:q_,refetchInterval:q_,refetchOnWindowFocus:!1,retry:!1}),Y_=(e,t={})=>{let n=new URLSearchParams({limit:`40`});return t.agentsOnly&&n.set(`agents`,`1`),t.tokenId&&n.set(`tokenId`,t.tokenId),I({queryKey:$.activity(e,n.toString()),queryFn:({signal:t})=>w_(`/workspaces/${e}/activity?${n}`,t)})};export{Ko as $,Q as A,Ws as B,E_ as C,b_ as D,f_ as E,Ug as F,js as G,zs as H,uc as I,Ss as J,Os as K,sc as L,$g as M,Qg as N,y_ as O,Wg as P,hs as Q,ac as R,w_ as S,D_ as T,Is as U,Us as V,Ps as W,bs as X,xs as Y,ps as Z,J_ as _,R_ as a,ca as at,O_ as b,U_ as c,Ai as ct,N_ as d,I as dt,fs as et,F_ as f,u as ft,H_ as g,K_ as h,r as ht,Y_ as i,pa as it,Zg as j,v_ as k,G_ as l,Pi as lt,V_ as m,a as mt,M_ as n,ro as nt,L_ as o,$a as ot,B_ as p,l as pt,ws as q,P_ as r,fa as rt,z_ as s,Di as st,$ as t,no as tt,I_ as u,co as ut,x_ as v,T_ as w,j_ as x,S_ as y,ic as z};
|