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.
Files changed (191) hide show
  1. package/dist/web/assets/AccessKeyReveal-C8pr7rZt.js +2 -0
  2. package/dist/web/assets/{AccessRows-C-Jn-MrD.js → AccessRows-33_zo5aX.js} +1 -1
  3. package/dist/web/assets/ActivityList-BIkO7t1s.js +1 -0
  4. package/dist/web/assets/AgentsPage-EFClXhsD.js +1 -0
  5. package/dist/web/assets/{Attachments-w5KikYPZ.js → Attachments-BQ-d5pab.js} +31 -31
  6. package/dist/web/assets/Avatar-D0rGsnHO.js +1 -0
  7. package/dist/web/assets/BoardPage-E4Vb1Vzg.js +1 -0
  8. package/dist/web/assets/{Button-ClwM2Rw6.js → Button-BsCJGAdQ.js} +1 -1
  9. package/dist/web/assets/{CardItem-BK2PGymN.js → CardItem-CYvB_I7V.js} +2 -2
  10. package/dist/web/assets/{Checkbox-I7UAluqN.js → Checkbox-BFT-RFt3.js} +1 -1
  11. package/dist/web/assets/ColorPicker-BzIkVZmd.js +1 -0
  12. package/dist/web/assets/ConsentPage-DMBzrJ3S.js +1 -0
  13. package/dist/web/assets/CopyButton-C9OKZ9i-.js +1 -0
  14. package/dist/web/assets/DocPage-CQ0aKAqd.js +1 -0
  15. package/dist/web/assets/EmptyState-DXTzO23V.js +1 -0
  16. package/dist/web/assets/Field-R6tL5cq9.js +1 -0
  17. package/dist/web/assets/HomePage-Bu2He9yp.js +1 -0
  18. package/dist/web/assets/Menu-B-V63C8_.js +1 -0
  19. package/dist/web/assets/PageHeader-D3trjYfc.js +1 -0
  20. package/dist/web/assets/Popover-Co2GHl85.js +1 -0
  21. package/dist/web/assets/ProjectPage-D2StbdlS.js +1 -0
  22. package/dist/web/assets/ProjectSettingsDialog-Bp-VYMVG.js +1 -0
  23. package/dist/web/assets/Segmented-Dk6qWGHS.js +1 -0
  24. package/dist/web/assets/SettingsPage-BrEqLHwa.js +1 -0
  25. package/dist/web/assets/States-DqHu9GSj.js +1 -0
  26. package/dist/web/assets/TokenCard-DPhYIZLh.js +1 -0
  27. package/dist/web/assets/Trans-CnOS9ct4.js +1 -0
  28. package/dist/web/assets/TrashPage-CFeq09im.js +1 -0
  29. package/dist/web/assets/VaultPage-C6RKw617.js +9 -0
  30. package/dist/web/assets/actions-CgdLcD8k.js +1 -0
  31. package/dist/web/assets/activity-CNh3v5Mu.js +1 -0
  32. package/dist/web/assets/agents-BGMKVi6i.js +1 -0
  33. package/dist/web/assets/agents-BXU0uzTH.js +1 -0
  34. package/dist/web/assets/agents-Cibz_z-h.js +1 -0
  35. package/dist/web/assets/agents-DOYJyzdo.js +1 -0
  36. package/dist/web/assets/agents-DrakTRAt.js +1 -0
  37. package/dist/web/assets/agents-de0xSyjY.js +1 -0
  38. package/dist/web/assets/agents-kJYxGRsw.js +1 -0
  39. package/dist/web/assets/{arrow-up-right-CirWuKKd.js → arrow-up-right-ibGMG_I6.js} +1 -1
  40. package/dist/web/assets/{auth-ByK78s7m.js → auth-DU1lbddj.js} +1 -1
  41. package/dist/web/assets/{auth-CqESesWQ.js → auth-DVMJ4tS1.js} +1 -1
  42. package/dist/web/assets/{auth-DXyQ1sR9.js → auth-Dixeidaw.js} +1 -1
  43. package/dist/web/assets/{auth-CWjUpxax.js → auth-UGlCAmH-.js} +1 -1
  44. package/dist/web/assets/{auth-SCXskweB.js → auth-ayDTWSf0.js} +1 -1
  45. package/dist/web/assets/{auth-BINwoLLL.js → auth-iW7JVoPN.js} +1 -1
  46. package/dist/web/assets/{auth-C58Nm5w2.js → auth-tM9qVp-X.js} +1 -1
  47. package/dist/web/assets/{boards-BTAHuwCR.js → boards-BExvvK2C.js} +1 -1
  48. package/dist/web/assets/{boards-CeiIWYk-.js → boards-Bd-B4hhr.js} +1 -1
  49. package/dist/web/assets/{boards-DSTXu61F.js → boards-CttGasCM.js} +1 -1
  50. package/dist/web/assets/{boards-CKwJtefi.js → boards-DF_wEJNs.js} +1 -1
  51. package/dist/web/assets/{boards-mFQFxBPQ.js → boards-DM5MZ8MK.js} +1 -1
  52. package/dist/web/assets/{boards-hABacqWX.js → boards-DRXX82kC.js} +1 -1
  53. package/dist/web/assets/{boards-DkyiWQSW.js → boards-DTnFEV0A.js} +1 -1
  54. package/dist/web/assets/check-CBvAlEZm.js +1 -0
  55. package/dist/web/assets/chevron-right-DFw6KMv6.js +1 -0
  56. package/dist/web/assets/{clock-B_VxvAAa.js → clock-8LYeV_vK.js} +1 -1
  57. package/dist/web/assets/confirm-CwwEqH9-.js +41 -0
  58. package/dist/web/assets/docs-B6tXalZZ.js +1 -0
  59. package/dist/web/assets/docs-BPnASlp4.js +1 -0
  60. package/dist/web/assets/docs-BlYmrIPJ.js +1 -0
  61. package/dist/web/assets/docs-BwYy_eWc.js +1 -0
  62. package/dist/web/assets/docs-Bx1kznfx.js +1 -0
  63. package/dist/web/assets/docs-DEnWVVdL.js +1 -0
  64. package/dist/web/assets/docs-_S4ttW8g.js +1 -0
  65. package/dist/web/assets/{download-CG4Kvbuv.js → download-D-lLkEl_.js} +1 -1
  66. package/dist/web/assets/errors-7otksh_4.js +1 -0
  67. package/dist/web/assets/errors-Cmb7VSBY.js +1 -0
  68. package/dist/web/assets/errors-DIc3HG7-.js +1 -0
  69. package/dist/web/assets/errors-DjlTVQK3.js +1 -0
  70. package/dist/web/assets/errors-Dqi8AWNO.js +1 -0
  71. package/dist/web/assets/errors-Mp8QlgCo.js +1 -0
  72. package/dist/web/assets/errors-znUyR2oX.js +1 -0
  73. package/dist/web/assets/{eye-DOmrZizG.js → eye-DctV5dJt.js} +1 -1
  74. package/dist/web/assets/{file-plus-Do0kXuaQ.js → file-plus-h6mN7Cra.js} +1 -1
  75. package/dist/web/assets/{folder-open-dQd_UG6z.js → folder-open-CMi40_Qn.js} +1 -1
  76. package/dist/web/assets/format-B7quLgVq.js +64 -0
  77. package/dist/web/assets/index-C5_JoNeq.css +2 -0
  78. package/dist/web/assets/index-Cic2D9gD.js +14 -0
  79. package/dist/web/assets/{lock-keyhole-BW42UXDZ.js → lock-keyhole-CEVFyiXF.js} +1 -1
  80. package/dist/web/assets/{paperclip-Jdvar28f.js → paperclip-DGtxZG9D.js} +1 -1
  81. package/dist/web/assets/{pencil-D9DAny5h.js → pencil-BQCLTZIj.js} +1 -1
  82. package/dist/web/assets/plus-BW1bFnsm.js +1 -0
  83. package/dist/web/assets/realtime-C6pi6J5c.js +1 -0
  84. package/dist/web/assets/{rotate-ccw-CILtVOFP.js → rotate-ccw-lEgEs1OH.js} +1 -1
  85. package/dist/web/assets/{search-vXSGUzpg.js → search-CorP7WeO.js} +1 -1
  86. package/dist/web/assets/session-D4tJu2uV.js +1 -0
  87. package/dist/web/assets/settings-CZ5suLqg.js +1 -0
  88. package/dist/web/assets/settings-CcMXMgCo.js +1 -0
  89. package/dist/web/assets/settings-D88yFCM6.js +1 -0
  90. package/dist/web/assets/settings-DK2eMfka.js +1 -0
  91. package/dist/web/assets/settings-DmB3vkQI.js +1 -0
  92. package/dist/web/assets/settings-DroVpY4u.js +1 -0
  93. package/dist/web/assets/settings-XBdi63iw.js +1 -0
  94. package/dist/web/assets/{shell-DKm9aLr8.js → shell--RN8OuYs.js} +1 -1
  95. package/dist/web/assets/{shell-DKu6Snuz.js → shell-Bhcgh15N.js} +1 -1
  96. package/dist/web/assets/{shell-C6TGc8Za.js → shell-BlFKTzFJ.js} +1 -1
  97. package/dist/web/assets/{shell-DhehnO0K.js → shell-CVGGeBa9.js} +1 -1
  98. package/dist/web/assets/{shell-CFZKdSNl.js → shell-CkzevnPH.js} +1 -1
  99. package/dist/web/assets/{shell-BDp_dyvw.js → shell-DOWo5KgD.js} +1 -1
  100. package/dist/web/assets/{shell-CtEP2nnE.js → shell-dLPGAa5r.js} +1 -1
  101. package/dist/web/assets/{shield-exclamation-point-BLDMJINf.js → shield-exclamation-point-C1g5FW-Y.js} +1 -1
  102. package/dist/web/assets/{square-kanban-B3kmSSml.js → square-kanban-DPQB8HVT.js} +1 -1
  103. package/dist/web/assets/{sticky-note-BPVTTfp2.js → sticky-note-DDDireBz.js} +1 -1
  104. package/dist/web/assets/{tag-DqhP3wln.js → tag-QzCcxSZT.js} +1 -1
  105. package/dist/web/assets/trash-6g8wBk0g.js +1 -0
  106. package/dist/web/assets/{trash-DTgTEaHd.js → trash-Cwc7ak-1.js} +1 -1
  107. package/dist/web/assets/{triangle-exclamation-point-B5Cq1xJs.js → triangle-exclamation-point-DAx_yYud.js} +1 -1
  108. package/dist/web/assets/vault-BAR96ObL.js +7 -0
  109. package/dist/web/assets/vault-BO3aMEV1.js +7 -0
  110. package/dist/web/assets/vault-BsPmxozG.js +7 -0
  111. package/dist/web/assets/vault-CDLe0b9o.js +7 -0
  112. package/dist/web/assets/vault-CTJTioNK.js +7 -0
  113. package/dist/web/assets/vault-Chnxpkuh.js +7 -0
  114. package/dist/web/assets/vault-Y3hqfCEF.js +7 -0
  115. package/dist/web/assets/{workspace-CBlyhMjO.js → workspace-BC7Gkm-H.js} +1 -1
  116. package/dist/web/index.html +34 -35
  117. package/dist/worker/index.js +3404 -1008
  118. package/dist/wrangler.json +4 -0
  119. package/package.json +1 -1
  120. package/dist/web/assets/AccessKeyReveal-DBMDUyjA.js +0 -2
  121. package/dist/web/assets/ActivityList-BCthFm2C.js +0 -1
  122. package/dist/web/assets/AgentsPage-C0SAIziE.js +0 -1
  123. package/dist/web/assets/Avatar-BcMhQMeL.js +0 -1
  124. package/dist/web/assets/BoardPage-CTE1631b.js +0 -1
  125. package/dist/web/assets/ColorPicker-D3xHu4M1.js +0 -1
  126. package/dist/web/assets/ConsentPage-bIA7yHuZ.js +0 -1
  127. package/dist/web/assets/CopyButton-BjA1b29F.js +0 -1
  128. package/dist/web/assets/DocPage-DcF8R9CQ.js +0 -1
  129. package/dist/web/assets/EmptyState-DMW8GdU_.js +0 -1
  130. package/dist/web/assets/Field-oe5EHMEz.js +0 -1
  131. package/dist/web/assets/HomePage-Dlpg4r_w.js +0 -1
  132. package/dist/web/assets/Menu--S2cHUj4.js +0 -1
  133. package/dist/web/assets/PageHeader-BeJqOSzf.js +0 -1
  134. package/dist/web/assets/Popover-MlZiOWxh.js +0 -1
  135. package/dist/web/assets/ProjectPage-BAwijKJr.js +0 -1
  136. package/dist/web/assets/ProjectSettingsDialog-DSp3JA2z.js +0 -1
  137. package/dist/web/assets/Segmented-DDptqKTZ.js +0 -1
  138. package/dist/web/assets/SettingsPage-Bot3OWuP.js +0 -1
  139. package/dist/web/assets/States-ss8YCX3J.js +0 -1
  140. package/dist/web/assets/TokenCard-B9gn2tQA.js +0 -1
  141. package/dist/web/assets/Trans-Cpev0SXN.js +0 -1
  142. package/dist/web/assets/TrashPage-BQ4vCVb9.js +0 -1
  143. package/dist/web/assets/VaultPage-BlXfdUw7.js +0 -3
  144. package/dist/web/assets/actions-DTIyi0mf.js +0 -1
  145. package/dist/web/assets/activity-Yp9xRGgk.js +0 -1
  146. package/dist/web/assets/agents-3HUiV4tV.js +0 -1
  147. package/dist/web/assets/agents-CJMhiUW3.js +0 -1
  148. package/dist/web/assets/agents-CjiLfJS9.js +0 -1
  149. package/dist/web/assets/agents-DwUimfIe.js +0 -1
  150. package/dist/web/assets/agents-R0c_yDCD.js +0 -1
  151. package/dist/web/assets/agents-c6F7y9Af.js +0 -1
  152. package/dist/web/assets/agents-sA8xOJfc.js +0 -1
  153. package/dist/web/assets/check-B8DqgyOr.js +0 -1
  154. package/dist/web/assets/chevron-right-BXOWYq-U.js +0 -1
  155. package/dist/web/assets/confirm-D9CmdABH.js +0 -41
  156. package/dist/web/assets/docs-BiIxmBdC.js +0 -1
  157. package/dist/web/assets/docs-CZq019Fr.js +0 -1
  158. package/dist/web/assets/docs-CctrfBzG.js +0 -1
  159. package/dist/web/assets/docs-CxyPUV8q.js +0 -1
  160. package/dist/web/assets/docs-DvgTX1bm.js +0 -1
  161. package/dist/web/assets/docs-NO6PWaeN.js +0 -1
  162. package/dist/web/assets/docs-wmJ1fgqN.js +0 -1
  163. package/dist/web/assets/errors-CJTyAPcw.js +0 -1
  164. package/dist/web/assets/errors-DcAK3Axg.js +0 -1
  165. package/dist/web/assets/errors-DfqPLtND.js +0 -1
  166. package/dist/web/assets/errors-Dy51ouo4.js +0 -1
  167. package/dist/web/assets/errors-Z5PDTKIL.js +0 -1
  168. package/dist/web/assets/errors-ezWDkBsu.js +0 -1
  169. package/dist/web/assets/errors-tpMDhE_P.js +0 -1
  170. package/dist/web/assets/format-ClqopOxc.js +0 -1
  171. package/dist/web/assets/index-B2GZPn61.js +0 -14
  172. package/dist/web/assets/index-B6GX5zxU.css +0 -2
  173. package/dist/web/assets/plus-D07TzhmN.js +0 -1
  174. package/dist/web/assets/queries-CNpEWLps.js +0 -64
  175. package/dist/web/assets/realtime-CUI9Wfs8.js +0 -1
  176. package/dist/web/assets/session-DIDP5B07.js +0 -1
  177. package/dist/web/assets/settings-BDfqTbHE.js +0 -1
  178. package/dist/web/assets/settings-BW0zBLJn.js +0 -1
  179. package/dist/web/assets/settings-BYv1UcVK.js +0 -1
  180. package/dist/web/assets/settings-C7vmkddK.js +0 -1
  181. package/dist/web/assets/settings-CK3tlBqd.js +0 -1
  182. package/dist/web/assets/settings-CWBjLZeX.js +0 -1
  183. package/dist/web/assets/settings-R-xZf6BT.js +0 -1
  184. package/dist/web/assets/trash-CyqM_Llh.js +0 -1
  185. package/dist/web/assets/vault-C2I5wY2c.js +0 -7
  186. package/dist/web/assets/vault-CnwqbS9q.js +0 -7
  187. package/dist/web/assets/vault-DDN2TVJW.js +0 -7
  188. package/dist/web/assets/vault-DGwHkhSm.js +0 -7
  189. package/dist/web/assets/vault-DmWLOBSw.js +0 -7
  190. package/dist/web/assets/vault-VdamUs2c.js +0 -7
  191. package/dist/web/assets/vault-ds4tlkvx.js +0 -7
@@ -0,0 +1,64 @@
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 Qe(e,t){return Ze(e,De,t)}function $e(e,t){return Ze(e,Ne,t)}var et=e=>{throw TypeError(e)},tt=(e,t,n)=>t.has(e)||et(`Cannot `+n),nt=(e,t,n)=>(tt(e,t,`read from private field`),n?n.call(e):t.get(e)),rt=(e,t,n)=>t.has(e)?et(`Cannot add the same private member more than once`):t instanceof WeakSet?t.add(e):t.set(e,n),it=(e,t,n,r)=>(tt(e,t,`write to private field`),r?r.call(e,n):t.set(e,n),n),at=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,ot=/^[\\/]{2}/;function st(e,t){return t+e.replace(/\\/g,`/`)}var ct=`popstate`;function lt(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function ut(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return pt(``,{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:mt(t)}return gt(t,n,null,e)}function I(e,t){if(e===!1||e==null)throw Error(t)}function L(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function dt(){return Math.random().toString(36).substring(2,10)}function ft(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 pt(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?ht(t):t,state:n,key:t&&t.key||r||dt(),mask:i}}function mt({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 ht(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 gt(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=lt(e)?e:pt(h.location,e,t);n&&n(r,e),l=u()+1;let d=ft(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=lt(e)?e:pt(h.location,e,t);n&&n(r,e),l=u();let i=ft(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 _t(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(ct,d),c=e,()=>{i.removeEventListener(ct,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 _t(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),I(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:mt(t);return i=i.replace(/ $/,`%20`),!n&&ot.test(i)&&(i=r+i),new URL(i,r)}var vt,yt=class{constructor(e){if(rt(this,vt,new Map),e)for(let[t,n]of e)this.set(t,n)}get(e){if(nt(this,vt).has(e))return nt(this,vt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){nt(this,vt).set(e,t)}};vt=new WeakMap;var bt=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function xt(e){return bt.has(e)}var St=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function Ct(e){return St.has(e)}function wt(e){return e.index===!0}function Tt(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(I(e.index!==!0||!e.children,`Cannot specify children on an index route`),I(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),wt(e)){let n={...e,id:s};return r[s]=Et(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=Et(n,t(n)),e.children&&(n.children=Tt(e.children,t,o,r,i)),n}})}function Et(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Dt(e,t,n=`/`){return Ot(e,t,n,!1)}function Ot(e,t,n,r,i){let a=Jt((typeof t==`string`?ht(t):t).pathname||`/`,n);if(a==null)return null;let o=i??At(e),s=null,c=qt(a);for(let e=0;s==null&&e<o.length;++e)s=Ut(o[e],c,r);return s}function kt(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 At(e){let t=jt(e);return Nt(t),t}function jt(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;I(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=an([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(I(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),jt(e.children,t,u,l,o)),(e.path!=null||e.index)&&t.push({path:l,score:Vt(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Kt(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 Mt(e.path))a(e,t,!0,n)}),t}function Mt(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=Mt(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 Nt(e){e.sort((e,t)=>e.score===t.score?Ht(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var Pt=/^:[\w-]+$/,Ft=3,It=2,Lt=1,Rt=10,zt=-2,Bt=e=>e===`*`;function Vt(e,t){let n=e.split(`/`),r=n.length;return n.some(Bt)&&(r+=zt),t&&(r+=It),n.filter(e=>!Bt(e)).reduce((e,t)=>e+(Pt.test(t)?Ft:t===``?Lt:Rt),r)}function Ht(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 Ut(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?Gt(u,l,s.matcher,s.compiledParams):Wt(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Wt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:an([a,d.pathname]),pathnameBase:sn(an([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=an([a,d.pathnameBase]))}return o}function Wt(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Kt(e.path,e.caseSensitive,e.end);return Gt(e,t,n,r)}function Gt(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=on(a,1),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=on(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 Kt(e,t=!1,n=!0){L(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 qt(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return L(!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 Jt(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 Yt({basename:e,pathname:t}){return t===`/`?e:an([e,t])}var Xt=e=>at.test(e);function Zt(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?ht(e):e,a;return n?(n=rn(n),a=n.startsWith(`/`)||n.startsWith(`\\`)?Qt(n.substring(1),`/`):Qt(n,t)):a=t,{pathname:a,search:cn(r),hash:ln(i)}}function Qt(e,t){let n=on(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function $t(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 en(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function tn(e){let t=en(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function nn(e,t,n,r=!1){let i;typeof e==`string`?i=ht(e):(i={...e},I(!i.pathname||!i.pathname.includes(`?`),$t(`?`,`pathname`,`search`,i)),I(!i.pathname||!i.pathname.includes(`#`),$t(`#`,`pathname`,`hash`,i)),I(!i.search||!i.search.includes(`#`),$t(`#`,`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=Zt(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var rn=e=>e.replace(/[\\/]{2,}/g,`/`),an=e=>rn(e.join(`/`));function on(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 sn=e=>on(e).replace(/^\/*/,`/`),cn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ln=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,un=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],dn=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 fn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function pn(e){return an(e.map(e=>e.route.path).filter(Boolean))||`/`}var mn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function hn(e,t){let n=e;if(typeof n!=`string`||!at.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(mn)try{let e=new URL(window.location.href),r=ot.test(n)?new URL(st(n,e.protocol)):new URL(n),a=Jt(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{L(!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 gn=Symbol(`Uninstrumented`);function _n(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=yn(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=yn(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[gn]??i,a=yn(n[e],t,(...e)=>xn(e[0]));a&&(e===`loader`&&t.hydrate===!0&&(a.hydrate=!0),a[gn]=t,r[e]=a)}}),t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=e[gn]??e,r=yn(n.middleware,t,(...e)=>xn(e[0]));return r?(r[gn]=t,r):e})),r}function vn(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[gn]??e.navigate,r=yn(n.navigate,t,(...t)=>{let[n,r]=t;return{to:typeof n==`number`||typeof n==`string`?n:n?mt(n):`.`,...Sn(e,r??{})}});r&&(r[gn]=t,e.navigate=r)}if(n.fetch.length>0){let t=e.fetch[gn]??e.fetch,r=yn(n.fetch,t,(...t)=>{let[n,,r,i]=t;return{href:r??`.`,fetcherKey:n,...Sn(e,i??{})}});r&&(r[gn]=t,e.fetch=r)}return e}function yn(e,t,n){return e.length===0?null:async(...r)=>{let i=await bn(e,n(...r),()=>t(...r),e.length-1);if(i.type===`error`)throw i.value;return i.value}}async function bn(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=bn(e,t,n,r-1),a=await o,I(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 xn(e){let{request:t,context:n,params:r,pattern:i}=e;return{request:Cn(t),params:{...r},pattern:i,context:wn(n)}}function Sn(e,t){return{currentUrl:mt(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 Cn(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function wn(e){if(En(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var Tn=Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function En(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`)===Tn}var Dn=new URL(`http://localhost`);function On(e){if(e.createURL)return e.createURL(`/`);try{return new URL(e.createHref(`/`),Dn)}catch{return Dn}}function kn(e,t){return e.origin===t.origin&&(e.origin!==`null`||e.protocol===t.protocol&&e.host===t.host)}function An(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 jn(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&&!kn(i,n),s=!kn(a,n);if(r===`reject`){if(o||s)throw Error(`External navigation is not allowed`)}else if(s&&(i==null||!An(e,i)||!kn(i,a)))throw Error(`External navigation is not allowed`)}var Mn=[`POST`,`PUT`,`PATCH`,`DELETE`],Nn=new Set(Mn),Pn=[`GET`,...Mn],Fn=new Set(Pn),In=new Set([301,302,303,307,308]),Ln=new Set([307,308]),Rn={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},zn={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Bn={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},Vn=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Hn=`remix-router-transitions`,Un=Symbol(`ResetLoaderData`),Wn,Gn,Kn,qn,Jn=class{constructor(e){rt(this,Wn),rt(this,Gn),rt(this,Kn),rt(this,qn),it(this,Wn,e),it(this,Gn,At(e))}get stableRoutes(){return nt(this,Wn)}get activeRoutes(){return nt(this,Kn)??nt(this,Wn)}get branches(){return nt(this,qn)??nt(this,Gn)}get hasHMRRoutes(){return nt(this,Kn)!=null}setRoutes(e){it(this,Wn,e),it(this,Gn,At(e))}setHmrRoutes(e){it(this,Kn,e),it(this,qn,At(e))}commitHmrRoutes(){nt(this,Kn)&&(it(this,Wn,nt(this,Kn)),it(this,Gn,nt(this,qn)),it(this,Kn,void 0),it(this,qn,void 0))}};Wn=new WeakMap,Gn=new WeakMap,Kn=new WeakMap,qn=new WeakMap;function Yn(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;I(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties||Vn,a=i;if(e.instrumentations){let t=e.instrumentations;a=e=>({...i(e),..._n(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Jn(Tt(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||fr,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=Ot(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=Lr(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=Ir(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=>er(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=tr(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:Rn,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}L(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,Bn),F({blockers:e})}}),E?.resolve(),E=null}else return _e(t,n)}),n){si(t,A);let e=()=>ci(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&&Qr(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?Nr(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,Bn)));let l=!j&&qe(t,n.matches||w.matches),u=D===!0||w.navigation.formMethod!=null&&Qr(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:Rn,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||=li();let n=E.promise;return e.history.go(t),n}let{path:r,submission:i,error:a}=Qn(!1,Zn(w.location,w.matches,c,t,n?.fromRouteId,n?.relative),n),o;if(n?.mask){let t=typeof n.mask==`string`?ht(n.mask):{...w.location.mask,...n.mask};if(o={pathname:t.pathname??``,search:t.search??``,hash:t.hash??``},ot.test(o.pathname))throw Error(`External navigation is not allowed`);o.pathname.startsWith(`\\`)&&(o.pathname=o.pathname.replace(/^\\+/,`/`)),jn(typeof n.mask==`string`?n.mask:mt(n.mask),mt(o),e.history.createURL(`/`),`reject`)}let s=w.location,l=pt(s,r,n&&n.state,void 0,o);l={...l,...e.history.encodeLocation(l)},jn(t==null?e.history.createHref(w.location):typeof t==`string`?t:mt(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&&Qr(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,Bn),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||=li(),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:Ot(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&w.initialized&&!te&&Br(w.location,n)&&!(r&&r.submission&&Qr(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=Dr(e.history,n,O.signal,r&&r.submission),f=e.getContext?await e.getContext():new yt,p;if(r&&r.pendingError)p=[Fr(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Qr(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(Gr(t)&&fn(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=ni(n,a,t,r.submission),o=!1,l.active=!1,d=Dr(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,...Pr(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function ve(t,n,i,l,u,d,f,p,m={}){if(Oe(),F({navigation:ri(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}=Ir(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=Fr(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=ei(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:Lr(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ee(t,n,vr(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(Kr(h)){let n;return n=m&&m.replace!=null?m.replace:Er(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(Gr(h)){let e=Fr(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||ni(n,i,l,p),x=p||m||ti(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}=Ir(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=Fr(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}=$n(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&&Gr(v[1])?{[v[0]]:v[1].error}:null,...Pr(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=Rr(k);if(ee)return await Te(t,ee.result,!0,{replace:h}),{shortCircuited:!0};if(ee=Rr(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}=Mr(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&&!Gr(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=ii(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=Zn(w.location,w.matches,c,r,n,i?.relative),u=Ot(o,l,c,!1,s.branches),d=Je(u,o,l);if(d.active&&d.matches&&(u=d.matches),!u){Ae(t,n,Lr(404,{pathname:l}),{flushSync:a});return}let{path:f,submission:p,error:m}=Qn(!0,l,i);if(m){Ae(t,n,m,{flushSync:a});return}let h=e.getContext?await e.getContext():new yt,g=(i&&i.preventScrollReset)===!0;p&&Qr(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,ai(m,w.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=Dr(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,Lr(404,{pathname:i}),{flushSync:f});return}}let v=ei(l,i);if(!v.route.action&&!v.route.lazy){Ae(t,n,Lr(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}M.set(t,g);let y=re,b=vr(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(Kr(S)||Gr(S)){ke(t,oi(void 0));return}}else{if(Kr(S)){if(M.delete(t),ie>y){ke(t,oi(void 0));return}return oe.add(t),ke(t,ii(m)),Te(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(Gr(S)){Ae(t,n,S.error);return}}let C=w.navigation.location||w.location,E=Dr(e.history,C,g.signal),D=s.activeRoutes,k=w.navigation.state===`idle`?w.matches:Ot(D,w.navigation.location,c,!1,s.branches);I(k,`Didn't find any matches after fetcher action`);let A=++re;ae.set(t,A);let{dsMatches:ee,revalidatingFetchers:j}=$n(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=ii(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=ii(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,oi(S.data)),{...e,fetchers:n}},he=Rr(de);if(he)return w=pe(w),Te(E,he.result,!1,{preventScrollReset:p});if(he=Rr(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,oi(S.data));let{loaderData:_e,errors:ve}=Mr(w,k,de,void 0,j,fe,ge);Re(A,ge),w.navigation.state===`loading`&&A>ie?(I(T,`Expected pending action`),O&&O.abort(),me(w.navigation.location,{matches:k,loaderData:_e,errors:ve,fetchers:ge})):(F({errors:ve,loaderData:Nr(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,ii(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=Dr(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,Lr(404,{pathname:i}),{flushSync:u});return}}let g=ei(s,i);M.set(t,m);let _=re,v=await Ee(h,i,vr(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,oi(void 0));else if(Kr(y)){if(ie>_){ke(t,oi(void 0));return}oe.add(t),await Te(h,y,!1,{preventScrollReset:d})}else Gr(y)?Ae(t,n,y.error):ke(t,oi(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`);I(d,`Expected a Location header on the redirect Response`);let f=d,p=new URL(r.url);d=Er(d,p,c,e.history),jn(f,d,p,`allow-explicit`);let m=pt(w.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(Xt(d)){let n=_t(t,d,!0);e=n.origin!==t.location.origin||Jt(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=ti(w.navigation));let y=o||s;Ln.has(i.response.status)&&y&&Qr(y.formMethod)?await _e(h,m,{submission:{...y,formAction:d},preventScrollReset:l||D,enableViewTransition:a?k:void 0}):await _e(h,m,{overrideNavigation:ni(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 yr(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(!Qr(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(Wr(r)){let i=r.result;o[t]={type:`redirect`,response:Cr(i,e,t,n,c)}}else o[t]=await Sr(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:Lr(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=Fr(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)||zn}function Me(e,t){Fe(e,t?.reason),ke(e,oi(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);I(e,`Expected fetcher: ${n}`);let r=oi(e.data);t.set(n,r)}}function Le(e){let t=[],n=!1;for(let r of oe){let i=e.get(r);I(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);I(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)||Bn;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)||Bn;I(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&&L(!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=Lr(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=Ir(n);return{notFoundMatches:r,route:i,error:t}}function We(e,t,n){if(m=e,g=t,h=n||null,!_&&w.navigation===Rn){_=!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=>kt(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:Ot(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:Ot(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||ar(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=Ot(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=Ot(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||=Ot(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(Tt(e,a,void 0,o))}function Qe(e,t,n=!1){ar(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:Qe,_internalFetchControllers:M,_internalSetRoutes:Ze,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){F(e)}},e.instrumentations&&(C=vn(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Xn(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Zn(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=nn(r||`.`,tn(o),Jt(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=$r(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=Yt({basename:n,pathname:c.pathname})),mt(c)}function Qn(e,t,n){if(!n||!Xn(n))return{path:t};if(n.formMethod&&!Zr(n.formMethod))return{path:t,error:Lr(405,{method:n.formMethod})};let r=()=>({path:t,error:Lr(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=zr(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Qr(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(!Qr(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()}}}I(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=kr(n.formData),s=n.formData;else if(n.body instanceof FormData)o=kr(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=Ar(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=Ar(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(Qr(c.formMethod))return{path:t,submission:c};let l=ht(t);return e&&l.search&&$r(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:mt(l),submission:c}}function $n(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?Gr(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&&Gr(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=pn(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(!er(s))f=!1;else if(u){let{shouldLoad:e}=tr(s,a.loaderData,a.errors);f=e}else nr(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return _r(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?rr(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p},h=ir(i,m);return _r(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=Ot(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=ei(b,e.path),C=new AbortController,w=Dr(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=vr(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=vr(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};ir(S,a)&&(T=vr(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 er(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function tr(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!er(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 nr(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function rr(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function ir(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function ar(e,t,n,r,i,a){let o;if(e){let t=r[e];I(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=>or(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=Tt(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]=Tt([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 or(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=>or(e,t)))??!1}var sr=new WeakMap,cr=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(I(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=sr.get(i);o||(o={},sr.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=xt(e),n=i[e]!==void 0&&e!==`hasErrorBoundary`;if(t)L(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)L(!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},lr=new WeakMap;function ur(e,t,n,r,i){let a=n[e.id];if(I(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=lr.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{I(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=Ct(e),o=a[e]!==void 0&&e!==`hasErrorBoundary`;i?L(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?L(!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 lr.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=cr({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 dr(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 fr(e){return e.matches.some(e=>e.route.middleware)?pr(e,()=>dr(e)):dr(e)}function pr(e,t){return mr(e,t,e=>{if(Xr(e))throw e;return e},Hr,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=Fr(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 mr(e,t,n,r,i){let{matches:a,...o}=e;return await hr(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function hr(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 hr(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 gr(e,t,n,r,i){let a=cr({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=ur(r.route,Qr(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function _r(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=gr(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?ir(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?ir(a,{...l,defaultShouldRevalidate:e}):ir(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Qr(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Qr(n.method)||!p)?br({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 vr(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?_r(e,t,n,r,pn(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:gr(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function yr(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:Or(t,n),pattern:pn(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 pr(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 br({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Qr(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:Or(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 Lr(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 Lr(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function xr(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 Sr(e){let{result:t,type:n}=e;if(Jr(t)){let e;try{e=await xr(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new dn(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?qr(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:Vr(t),statusCode:fn(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:fn(t)?t.status:void 0}:qr(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 Cr(e,t,n,r,i){let a=e.headers.get(`Location`);if(I(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!Xt(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Zn(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var wr=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Tr(e){try{return wr.includes(new URL(e).protocol)}catch{return!1}}function Er(e,t,n,r){if(Xt(e)){let r=e,i=ot.test(r)?new URL(st(r,t.protocol)):new URL(r);if(Tr(i.toString()))throw Error(`Invalid redirect location`);let a=Jt(i.pathname,n)!=null;if(i.origin===t.origin&&a)return rn(i.pathname)+i.search+i.hash}try{if(Tr(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function Dr(e,t,n,r){let i=e.createURL(zr(t)).toString(),a={signal:n};if(r&&Qr(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?kr(r.formData):r.formData}return new Request(i,a)}function Or(e,t){let n=new URL(e.url),r=typeof t==`string`?ht(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 kr(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function Ar(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function jr(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&Gr(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(I(!Kr(f),`Cannot handle redirect results in processLoaderData`),Gr(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=Fr(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=Un),c||(c=!0,s=fn(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 Mr(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=jr(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(I(s,`Did not find corresponding fetcher result`),Gr(s)){let t=Fr(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(Kr(s))I(!1,`Unhandled fetcher revalidation redirect`);else{let e=oi(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function Nr(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==Un).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 Pr(e){return e?Gr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fr(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 Ir(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 Lr(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 dn(e||500,o,Error(s),!0)}function Rr(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(Kr(r))return{key:n,result:r}}}function zr(e){return mt({...typeof e==`string`?ht(e):e,hash:``})}function Br(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function Vr(e){return new dn(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function Hr(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&Ur(t))}function Ur(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function Wr(e){return Jr(e.result)&&In.has(e.result.status)}function Gr(e){return e.type===`error`}function Kr(e){return(e&&e.type)===`redirect`}function qr(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Jr(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function Yr(e){return In.has(e)}function Xr(e){return Jr(e)&&Yr(e.status)&&e.headers.has(`Location`)}function Zr(e){return Fn.has(e.toUpperCase())}function Qr(e){return Nn.has(e.toUpperCase())}function $r(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function ei(e,t){let n=typeof t==`string`?ht(t).search:t.search;if(e[e.length-1].route.index&&$r(n||``))return e[e.length-1];let r=en(e);return r[r.length-1]}function ti(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 ni(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 ri(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 ii(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 ai(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 oi(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 si(e,t){try{let n=e.sessionStorage.getItem(Hn);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 ci(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(Hn,JSON.stringify(n))}catch(e){L(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function li(){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 ui=o.createContext(null);ui.displayName=`DataRouter`;var di=o.createContext(null);di.displayName=`DataRouterState`;var fi=o.createContext(!1);function pi(){return o.useContext(fi)}var mi=o.createContext({isTransitioning:!1});mi.displayName=`ViewTransition`;var hi=o.createContext(new Map);hi.displayName=`Fetchers`;var gi=o.createContext(null);gi.displayName=`Await`;var _i=o.createContext(null);_i.displayName=`Navigation`;var vi=o.createContext(null);vi.displayName=`Location`;var yi=o.createContext({outlet:null,matches:[],isDataRoute:!1});yi.displayName=`Route`;var bi=o.createContext(null);bi.displayName=`RouteError`;var xi=`REACT_ROUTER_ERROR`,Si=`REDIRECT`,Ci=`ROUTE_ERROR_RESPONSE`;function wi(e){if(e.startsWith(`${xi}:${Si}:{`))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 Ti(e){if(e.startsWith(`${xi}:${Ci}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new dn(t.status,t.statusText,t.data)}catch{}}function Ei(e,{relative:t}={}){I(Di(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=o.useContext(_i),{hash:i,pathname:a,search:s}=Ii(e,{relative:t}),c=a;return n!==`/`&&(c=a===`/`?n:an([n,a])),r.createHref({pathname:c,search:s,hash:i})}function Di(){return o.useContext(vi)!=null}function Oi(){return I(Di(),`useLocation() may be used only in the context of a <Router> component.`),o.useContext(vi).location}var ki=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function Ai(e){o.useContext(_i).static||o.useLayoutEffect(e)}function ji(){let{isDataRoute:e}=o.useContext(yi);return e?ea():Mi()}function Mi(){I(Di(),`useNavigate() may be used only in the context of a <Router> component.`);let e=o.useContext(ui),{basename:t,navigator:n}=o.useContext(_i),{matches:r}=o.useContext(yi),{pathname:i}=Oi(),a=JSON.stringify(tn(r)),s=o.useRef(!1);return Ai(()=>{s.current=!0}),o.useCallback((r,o={})=>{if(L(s.current,ki),!s.current)return;if(typeof r==`number`){n.go(r);return}let c=nn(r,JSON.parse(a),i,o.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:an([t,c.pathname])),jn(typeof r==`string`?r:mt(r),n.createHref(c),On(n),`reject`),(o.replace?n.replace:n.push)(c,o.state,o)},[t,n,a,i,e])}var Ni=o.createContext(null);function Pi(e){let t=o.useContext(yi).outlet;return o.useMemo(()=>t&&o.createElement(Ni.Provider,{value:e},t),[t,e])}function Fi(){let{matches:e}=o.useContext(yi);return e[e.length-1]?.params??{}}function Ii(e,{relative:t}={}){let{matches:n}=o.useContext(yi),{pathname:r}=Oi(),i=JSON.stringify(tn(n));return o.useMemo(()=>nn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Li(e,t,n){I(Di(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=o.useContext(_i),{matches:i}=o.useContext(yi),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||``;na(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=Oi(),f;if(t){let e=typeof t==`string`?ht(t):t;I(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})):Dt(e,{pathname:m});L(u||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),L(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=Wi(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:an([l,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?l:an([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(vi.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Ri(){let e=Zi(),t=fn(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 zi=o.createElement(Ri,null),Bi=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=Ti(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:o.createElement(yi.Provider,{value:this.props.routeContext},o.createElement(bi.Provider,{value:e,children:this.props.component}));return this.context?o.createElement(Hi,{error:e},t):t}};Bi.contextType=fi;var Vi=new WeakMap;function Hi({children:e,error:t}){let{basename:n,navigator:r}=o.useContext(_i);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=wi(t.digest);if(e){let i=Vi.get(t);if(i)throw i;let a=hn(e.location,n),s=a.absoluteURL||a.to;if(jn(e.location,s,On(r),`allow-explicit`),Tr(s))throw Error(`Invalid redirect location`);if(mn&&!Vi.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 Vi.set(t,n),n}}return o.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${s}`})}}return e}function Ui({routeContext:e,match:t,children:n}){let r=o.useContext(ui);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),o.createElement(yi.Provider,{value:e},n)}function Wi(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);I(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:pn(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||zi,s&&(c<0&&l===0?(na(`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(Ui,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||l===0)?o.createElement(Bi,{location:r.location,revalidation:r.revalidation,component:p,error:d,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:u}):g()},null)}function Gi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ki(e){let t=o.useContext(ui);return I(t,Gi(e)),t}function qi(e){let t=o.useContext(di);return I(t,Gi(e)),t}function Ji(e){let t=o.useContext(yi);return I(t,Gi(e)),t}function Yi(e){let t=Ji(e),n=t.matches[t.matches.length-1];return I(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Xi(){return Yi(`useRouteId`)}function Zi(){let e=o.useContext(bi),t=qi(`useRouteError`),n=Yi(`useRouteError`);return e===void 0?t.errors?.[n]:e}var Qi=0;function $i(e){let{router:t,basename:n}=Ki(`useBlocker`),r=qi(`useBlocker`),[i,a]=o.useState(``),s=o.useCallback(t=>{if(typeof e!=`function`)return!!e;if(n===`/`)return e(t);let{currentLocation:r,nextLocation:i,historyAction:a}=t;return e({currentLocation:{...r,pathname:Jt(r.pathname,n)||r.pathname},nextLocation:{...i,pathname:Jt(i.pathname,n)||i.pathname},historyAction:a})},[n,e]);return o.useEffect(()=>{let e=String(++Qi);return a(e),()=>t.deleteBlocker(e)},[t]),o.useEffect(()=>{i!==``&&t.getBlocker(i,s)},[t,i,s]),i&&r.blockers.has(i)?r.blockers.get(i):Bn}function ea(){let{router:e}=Ki(`useNavigate`),t=Yi(`useNavigate`),n=o.useRef(!1);return Ai(()=>{n.current=!0}),o.useCallback(async(r,i={})=>{L(n.current,ki),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var ta={};function na(e,t,n){!t&&!ta[e]&&(ta[e]=!0,L(!1,n))}var ra={};function ia(e,t){!e&&!ra[t]&&(ra[t]=!0,console.warn(t))}var aa=o.useOptimistic,oa=()=>void 0;function sa(e){return aa?aa(e):[e,oa]}function ca(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&L(!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&&L(!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&&L(!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 la=[`HydrateFallback`,`hydrateFallbackElement`],ua=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 da({router:e,flushSync:t,onError:n,useTransitions:r}){r=pi()||r;let[i,a]=o.useState(e.state),[s,c]=sa(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:pn(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&y.current.set(t,e.data)}),s.forEach(e=>y.current.delete(e)),ia(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(ia(_==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=>fa(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 ua)},[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=>fa(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(ui.Provider,{value:C},o.createElement(di.Provider,{value:s},o.createElement(hi.Provider,{value:y.current},o.createElement(mi.Provider,{value:d},o.createElement(_a,{basename:S,location:s.location,navigationType:s.historyAction,navigator:x,useTransitions:r},o.createElement(pa,{routes:e.routes,manifest:e.manifest,future:e.future,state:s,isStatic:!1,onError:n})))))),null)}function fa(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 pa=o.memo(ma);function ma({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Li(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function ha({to:e,replace:t,state:n,relative:r}){I(Di(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i,navigator:a}=o.useContext(_i);L(!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(yi),{pathname:c}=Oi(),l=ji(),u=nn(e,tn(s),c,r===`path`);jn(typeof e==`string`?e:mt(e),a.createHref(u),On(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 ga(e){return Pi(e.context)}function _a({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:s}){I(!Di(),`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=ht(n));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=o.useMemo(()=>{let e=Jt(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 L(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(_i.Provider,{value:l},o.createElement(vi.Provider,{children:t,value:g}))}o.Component;var va=`get`,ya=`application/x-www-form-urlencoded`;function ba(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function xa(e){return ba(e)&&e.tagName.toLowerCase()===`button`}function Sa(e){return ba(e)&&e.tagName.toLowerCase()===`form`}function Ca(e){return ba(e)&&e.tagName.toLowerCase()===`input`}function wa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ta(e,t){return e.button===0&&(!t||t===`_self`)&&!wa(e)}function Ea(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 Da(e,t){let n=Ea(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Oa=null;function ka(){if(Oa===null)try{new FormData(document.createElement(`form`),0),Oa=!1}catch{Oa=!0}return Oa}var Aa=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ja(e){return e!=null&&!Aa.has(e)?(L(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ya}"`),null):e}function Ma(e,t){let n,r,i,a,o;if(Sa(e)){let o=e.getAttribute(`action`);r=o?Jt(o,t):null,n=e.getAttribute(`method`)||va,i=ja(e.getAttribute(`enctype`))||ya,a=new FormData(e)}else if(xa(e)||Ca(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?Jt(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||va,i=ja(e.getAttribute(`formenctype`))||ja(o.getAttribute(`enctype`))||ya,a=new FormData(o,e),!ka()){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(ba(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=va,r=null,i=ya,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 Na(e,t){if(e===!1||e==null)throw Error(t)}function Pa(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&&Jt(i.pathname,t)===`/`?`${on(t)}/_root.${r}`:`${on(i.pathname)}.${r}`,i}async function Fa(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 Ia(e){return e!=null&&typeof e.page==`string`}function La(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 Ra(e,t,n){return Ua((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Fa(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(La).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function za(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 Ba(e,t,{includeHydrateFallback:n}={}){return Va(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 Va(e){return[...new Set(e)]}function Ha(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ua(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ia(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Ha(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Wa(){let e=o.useContext(ui);return Na(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Ga(){let e=o.useContext(di);return Na(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ka=o.createContext(void 0);Ka.displayName=`FrameworkContext`;function qa(){let e=o.useContext(Ka);return Na(e,`You must render this element inside a <HydratedRouter> element`),e}function Ja(e,t){let n=o.useContext(Ka),[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:Ya(c,m),onBlur:Ya(l,h),onMouseEnter:Ya(u,m),onMouseLeave:Ya(d,h),onTouchStart:Ya(f,m)}]:[a,p,{}]:[!1,p,{}]}function Ya(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Xa({page:e,...t}){let n=pi(),{nonce:r}=qa(),{router:i}=Wa(),a=o.useMemo(()=>Dt(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?o.createElement(Qa,{page:e,matches:a,...t}):o.createElement($a,{page:e,matches:a,...t})):null}function Za(e){let{manifest:t,routeModules:n}=qa(),[r,i]=o.useState([]);return o.useEffect(()=>{let r=!1;return Ra(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Qa({page:e,matches:t,...n}){let r=Oi(),{future:i}=qa(),{basename:a}=Wa(),s=o.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Pa(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 $a({page:e,matches:t,...n}){let r=Oi(),{future:i,manifest:a,routeModules:s}=qa(),{basename:c}=Wa(),{loaderData:l,matches:u}=Ga(),d=o.useMemo(()=>za(e,t,u,a,r,`data`),[e,t,u,a,r]),f=o.useMemo(()=>za(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=Pa(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(()=>Ba(f,a),[f,a]),h=Za(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 eo(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}o.Component;var to=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{to&&(window.__reactRouterVersion=`7.18.5`)}catch{}function no(e,t){return Yn({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:ut({window:t?.window}),hydrationData:t?.hydrationData||ro(),routes:e,mapRouteProperties:ca,hydrationRouteProperties:la,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function ro(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:io(e.errors)}),e}function io(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 dn(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&un.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 ao=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(_i),y=typeof u==`string`&&at.test(u),b=hn(u,g);u=b.to;let x=Ei(u,{relative:r}),S=Oi(),C=null;if(s){let e=nn(s,[],S.mask?S.mask.pathname:`/`,!0);g!==`/`&&(e.pathname=e.pathname===`/`?g:an([g,e.pathname])),C=_.createHref(e)}let[w,T,E]=Ja(n,m),D=uo(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:eo(h,T),target:l,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?o.createElement(o.Fragment,null,A,o.createElement(Xa,{page:x})):A});ao.displayName=`Link`;var oo=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=Ii(a,{relative:l.relative}),f=Oi(),p=o.useContext(di),{navigator:m,basename:h}=o.useContext(_i),g=p!=null&&_o(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=Jt(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(ao,{...l,"aria-current":w,className:T,ref:u,style:E,to:a,viewTransition:s},typeof c==`function`?c(C):c)});oo.displayName=`NavLink`;var so=o.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:s=va,action:c,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:g}=o.useContext(_i),_=ho(),v=go(c,{relative:u}),y=s.toLowerCase()===`get`?`get`:`post`,b=typeof c==`string`&&at.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})});so.displayName=`Form`;function co(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function lo(e){let t=o.useContext(ui);return I(t,co(e)),t}function uo(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:s,viewTransition:c,defaultShouldRevalidate:l,useTransitions:u}={}){let d=ji(),f=Oi(),p=Ii(e,{relative:s});return o.useCallback(m=>{if(Ta(m,t)){m.preventDefault();let t=n===void 0?mt(f)===mt(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 fo(e){L(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(Ea(e)),n=o.useRef(!1),r=Oi(),i=o.useMemo(()=>Da(r.search,n.current?null:t.current),[r.search]),a=ji();return[i,o.useCallback((e,t)=>{let r=Ea(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var po=0,mo=()=>`__${String(++po)}__`;function ho(){let{router:e}=lo(`useSubmit`),{basename:t}=o.useContext(_i),n=Xi(),r=e.fetch,i=e.navigate;return o.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=Ma(e,t);if(a.navigate===!1){let e=a.fetcherKey||mo();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 go(e,{relative:t}={}){let{basename:n}=o.useContext(_i),r=o.useContext(yi);I(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...Ii(e||`.`,{relative:t})},s=Oi();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:an([n,a.pathname])),mt(a)}function _o(e,{relative:t}={}){let n=o.useContext(mi);I(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=lo(`useViewTransitionState`),i=Ii(e,{relative:t});if(!n.isTransitioning)return!1;let a=Jt(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Jt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Wt(i.pathname,s)!=null||Wt(i.pathname,a)!=null}var R=e=>typeof e==`string`,vo=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},yo=e=>e==null?``:String(e),bo=e=>R(e)&&/^[A-Za-z0-9_@.-]{1,128}$/.test(e)&&!e.includes(`..`)&&![`__proto__`,`constructor`,`prototype`].includes(e),xo=e=>e?.callbackApi??e?.constructor?.callbackApi,So=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},Co=/###/g,wo=e=>e&&e.includes(`###`)?e.replace(Co,`.`):e,To=e=>!e||R(e),Eo=(e,t,n)=>{let r=R(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(To(e))return{};let t=wo(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return To(e)?{}:{obj:e,k:wo(r[i])}},Do=(e,t,n)=>{let{obj:r,k:i}=Eo(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=Eo(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Eo(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Oo=(e,t,n,r)=>{let{obj:i,k:a}=Eo(e,t,Object);i[a]=i[a]||[],i[a].push(n)},ko=(e,t)=>{let{obj:n,k:r}=Eo(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Ao=(e,t,n)=>{let r=ko(e,n);return r===void 0?ko(t,n):r},jo=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(Object.prototype.hasOwnProperty.call(e,r)?R(e[r])||e[r]instanceof String||R(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):jo(e[r],t[r],n):e[r]=t[r]);return e},Mo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),No={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`,"/":`&#x2F;`},Po=e=>R(e)?e.replace(/[&<>"'\/]/g,e=>No[e]):e,Fo=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}},Io=[` `,`,`,`?`,`!`,`;`],Lo=new Fo(20),Ro=(e,t,n)=>{t||=``,n||=``;let r=Io.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Lo.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},zo=(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},Bo=e=>e?.replace(/_/g,`-`),Vo={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)}},Ho=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Vo,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=>R(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),R(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)}},Uo=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)})}},Wo=new WeakSet,Go=class extends Uo{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.logger=Ho.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):R(n)&&i?o.push(...n.split(i)):o.push(n)));let s=ko(this.data,o);return s==null&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s!=null||!a||!R(n)?s:zo(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),Do(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)(R(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=ko(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?jo(s,n,i):s={...s,...n},Do(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 Wo.has(n)?!0:!n||Object.keys(n).length===0?!1:(typeof n==`object`&&Wo.add(n),!0)})}toJSON(){return this.data}},Ko={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}},qo=Symbol(`i18next/PATH_KEY`);function Jo(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===qo?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function Yo(e,t){let{[qo]:n}=e(Jo()),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 Xo=e=>!R(e)&&typeof e!=`boolean`&&typeof e!=`number`,Zo=class e extends Uo{constructor(e,t={}){super(),So([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`,`ownPostProcessors`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Ho.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=Xo(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&&!Ro(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:R(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:R(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=Yo(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?Yo(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&&!R(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=Xo(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(R(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:Xo(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&&R(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=R(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&&!R(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=R(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(o.forEach(e=>{this.logger.debug&&Ko.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=Ko.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 R(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?Yo(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&&!R(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(R(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&&!R(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}},Qo=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ho.create(`languageUtils`),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Bo(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=Bo(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(R(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&&R(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)),R(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||R(t),a=t===void 0&&typeof this.options.fallbackLng==`function`,o=R(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 R(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))):R(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())}},$o={zero:0,one:1,two:2,few:3,many:4,other:5},es={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ts=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ho.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Bo(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!`),es;if(!e.match(/-|_/))return es;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)=>$o[e]-$o[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))}},ns=(e,t,n,r=`.`,i=!0)=>{let a=Ao(e,t,n);return a==null&&i&&R(n)&&(a=zo(e,n,r),a===void 0&&(a=zo(t,n,r))),a},rs=class{constructor(e={}){this.logger=Ho.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?Po:t,this.escapeValue=n===void 0||n,this.useRawValueToEscape=r!==void 0&&r,this.prefix=i?Mo(i):a||`{{`,this.suffix=o?Mo(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?Mo(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?Mo(l):``,this.nestingPrefix=d?Mo(d):f||Mo(`$t(`),this.nestingSuffix=p?Mo(p):m||Mo(`)`),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=ns(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(ns(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===Po&&this.options?.interpolation?.escapeValue!==!1&&R(e)&&e.includes(`/`)&&this.logger.once(`/`,`deprecate`,`escapeValue renders '/' in a value as '&#x2F;' 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=R(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!R(a)&&!this.useRawValueToEscape&&(a=yo(a));let h=yo(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(`${Mo(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&&!R(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&&!R(i))return i;R(i)||(i=yo(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)+yo(i),l=s.lastIndex,this.regexp.lastIndex=0}return l?c+e.slice(l):e}},is=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}},as=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(Bo(r),i)(n)}let s=t[o];return s||(s=e(Bo(r),i),t[o]=s),s(n)}},os=e=>(t,n,r)=>e(Bo(n),r)(t),ss=class{constructor(e={}){this.logger=Ho.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?as:os;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()]=as(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}=is(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)}},cs=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},ls=class extends Uo{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Ho.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=xo(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=>{Oo(n.loaded,[i],a),cs(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();R(e)&&(e=this.languageUtils.toResolveHierarchy(e)),R(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)}}},us=()=>({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]),R(e[1])&&(t.defaultValue=e[1]),R(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}),ds=e=>(R(e.ns)&&(e.ns=[e.ns]),R(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),R(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),fs=()=>{},ps,ms=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},z=class e extends Uo{constructor(e={},t){if(super(),this.options=ds(e),this.services={ownPostProcessors:new Set},this.logger=Ho,this.modules={external:[]},ms(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&&(R(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=us();this.options={...r,...this.options,...ds(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){ps&&ps!==this&&ps.modules.logger!==this.modules.logger&&Ho.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`),ps=this.modules.logger?this:void 0,this.modules.logger?Ho.init(i(this.modules.logger),this.options):Ho.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:ss;let t=new Qo(this.options);this.store=new Go(this.options.resources,this.options);let r=this.services;r.logger=Ho,r.resourceStore=this.store,r.languageUtils=t,r.pluralResolver=new ts(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 rs(this.options),r.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this),reloadResources:this.reloadResources.bind(this)},r.backendConnector=new ls(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&&xo(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 Zo(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||=fs,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=vo(),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=fs){let n=t,r=R(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=vo();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||=fs,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`&&(Ko.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=vo();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=R(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(R(t)?[t]:t);a&&this.logger.debug&&!bo(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=xo(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=Yo(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=Yo(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=Yo(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return R(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=vo();return this.options.ns?(R(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=vo();R(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 Qo(us());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=fs){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 Go(e(this.store.data),i),a.services.resourceStore=a.store}if(t.interpolation){let e={...us().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new rs(n)}return a.translator=new Zo(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();z.createInstance,z.dir,z.init,z.loadResources,z.reloadResources,z.use,z.changeLanguage,z.getFixedT;var hs=z.t;z.exists,z.setDefaultNamespace,z.hasLoadedNamespace,z.loadNamespaces,z.loadLanguages;var gs=(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);Cs(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},_s={},vs=(e,t,n,r)=>{Cs(n)&&_s[n]||(Cs(n)&&(_s[n]=new Date),gs(e,t,n,r))},ys=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},bs=(e,t,n)=>{e.loadNamespaces(t,ys(e,n))},xs=(e,t,n,r)=>{if(Cs(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return bs(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ys(e,r))},Ss=(e,t,n={})=>!t.languages||!t.languages.length?(vs(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}}),Cs=e=>typeof e==`string`,ws=e=>typeof e==`object`&&!!e,Ts=e=>{let t=e?.services?.i18nFormat;return typeof t?.parse==`function`?t:void 0},Es={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Ds=e=>{if(!e)return e;let t={};return Object.keys(e).forEach(n=>{let r=e[n];t[n]=Cs(r)?r.replace(/[&<>"']/g,e=>Es[e]):r}),t},Os=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,ks={"&amp;":`&`,"&#38;":`&`,"&lt;":`<`,"&#60;":`<`,"&gt;":`>`,"&#62;":`>`,"&apos;":`'`,"&#39;":`'`,"&quot;":`"`,"&#34;":`"`,"&nbsp;":`\xA0`,"&#160;":`\xA0`,"&copy;":`©`,"&#169;":`©`,"&reg;":`®`,"&#174;":`®`,"&hellip;":`…`,"&#8230;":`…`,"&#x2F;":`/`,"&#47;":`/`},As=e=>ks[e],js=e=>e.replace(Os,As),Ms={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:js,transDefaultProps:void 0},Ns=(e={})=>{Ms={...Ms,...e}},Ps=()=>Ms,Fs,Is=e=>{Fs=e},Ls=()=>Fs,Rs={type:`3rdParty`,init(e){Ns(e.options.react),Is(e)}},zs=(0,o.createContext)(),Bs=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Vs=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})),Hs=t(((e,t)=>{t.exports=Vs()})),Us=Hs(),Ws={t:(e,t)=>{if(Cs(t))return t;if(ws(t)&&Cs(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},Gs=()=>()=>{},Ks=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=(0,o.useContext)(zs)||{},a=n||r||Ls();a&&!a.reportNamespaces&&(a.reportNamespaces=new Bs),a||vs(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)(()=>({...Ps(),...a?.options?.react,...t}),[a,t]),{useSuspense:c,keyPrefix:l,bindI18n:u,bindI18nStore:d}=s,f=e||i||a?.options?.defaultNS,p=Cs(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 Gs;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 Ws;let e=!!(a.isInitialized||a.initializedStoreOnce)&&h.every(e=>Ss(e,a,s)),n=t.lng||a.language,r=g.current,i=typeof l==`function`?Yo(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,Us.useSyncExternalStore)(_,y,y),w;a&&c&&!C&&(w=new Promise(e=>{let n=()=>e();t.lng?xs(a,t.lng,h,n):bs(a,h,n)}),{t:S,ready:C}=y()),(0,o.useEffect)(()=>{if(a&&!C&&!c){let e=()=>x(e=>e+1);t.lng?xs(a,t.lng,h,e):bs(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)=>(vs(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&&vs(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},qs=(...e)=>e.filter(Boolean).join(` `),Js=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ys(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Js(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Xs=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},Zs=e=>{let t=Xs(e);return t.charAt(0).toUpperCase()+t.slice(1)},Qs=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),$s={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 ec(e){return e!=null}function tc(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??$s.width,a=e.size??e.height??$s.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?Qs(...c):Qs(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??$s[`stroke-width`])*Number(e.size??e.width??$s.width)/Number(t.size??t.width??$s.width):t.strokeWidth??$s[`stroke-width`];return[`svg`,{...Object.entries($s).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&ec(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&ec(t.width)&&{[r(`width`)]:t.width},...`height`in t&&ec(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 nc(e,t={}){return tc(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var rc=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},ic=(0,o.createContext)({}),ac=()=>(0,o.useContext)(ic),oc=(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=``}=ac()??{},b=!!l||rc(f),[x,S,C=[]]=nc(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:s??_,className:Qs(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 sc(e,t=[],n=[]){let r=typeof e==`string`?Ys(e,t,n):e,i=(0,o.forwardRef)(({className:e,...t},n)=>(0,o.createElement)(oc,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Zs(r.name)),i}var cc=[`tomato`,`amber`,`lime`,`jade`,`teal`,`cobalt`,`iris`,`rose`,`slate`],lc=[`en`,`es`,`fr`,`pt`,`it`,`de`,`nl`,`ja`],uc={en:`English`,es:`Español`,fr:`Français`,pt:`Português`,it:`Italiano`,de:`Deutsch`,nl:`Nederlands`,ja:`日本語`},dc=e=>typeof e==`string`&&lc.includes(e);function fc(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 pc={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 mc(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 hc(e,t=`|`){return e.map(e=>Bc(e)).join(t)}function gc(e,t){return typeof t==`bigint`?t.toString():t}var _c=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 vc(e){return new _c(e)}function yc(e){return e==null}function bc(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function xc(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 Sc(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Cc(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function wc(e){return Cc(e._zod.def)??e._zod.def.shape}function Tc(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return Sc(this,t,e),e},enumerable:!0,configurable:!0})}function Ec(e,t,n){t in e?Sc(e,t,n):e[t]=n}function Dc(e,t,n,r){let i=wc(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?Tc(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):Ec(e,a,r?r(n.value,a):n.value))}}function Oc(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?Tc(e,n,()=>t[n]):Ec(e,n,r.value))}}function kc(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function Ac(e){return JSON.stringify(e)}function jc(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var Mc=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function Nc(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Pc=vc(()=>{if(Al.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Fc(e){if(Nc(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return Nc(n)!==!1&&Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)!==!1}function Ic(e){return Fc(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Lc=new Set([`string`,`number`,`symbol`]);function Rc(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function zc(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function B(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 Bc(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Vc(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Hc={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Uc={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Wc(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 Dc(i,e,Gc(e,t)),zc(e,kc(n,{shape:i,checks:[]}))}function Gc(e,t){let n=wc(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 Kc(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(Gc(e,t)),a={};return Dc(a,e,Reflect.ownKeys(wc(e)).filter(e=>!i.has(e))),zc(e,kc(n,{shape:a,checks:[]}))}function qc(e,t){if(!Fc(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=wc(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 zc(e,kc(e._zod.def,{shape:Jc(e,t)}))}function Jc(e,t){let n={};return Dc(n,e,Reflect.ownKeys(wc(e))),Oc(n,t),n}function Yc(e,t){if(!Fc(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return zc(e,kc(e._zod.def,{shape:Jc(e,t)}))}function Xc(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 Dc(n,e,Reflect.ownKeys(wc(e))),Dc(n,t,Reflect.ownKeys(wc(t))),zc(e,kc(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Zc(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(Gc(t,n)):void 0,o={};return Dc(o,t,Reflect.ownKeys(wc(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),zc(t,kc(t._zod.def,{shape:o,checks:[]}))}function Qc(e,t,n){let r=n?new Set(Gc(t,n)):void 0,i={};return Dc(i,t,Reflect.ownKeys(wc(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),zc(t,kc(t._zod.def,{shape:i}))}function $c(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 el(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 tl(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function nl(e){return typeof e==`string`?e:e?.message}function rl(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 il(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function al(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:nl(e.inst?._zod.def?.error?.(e))??nl(a?.(e))??nl(t?.error?.(e))??nl(n.customError?.(e))??nl(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 ol=/[\uD800-\uDBFF]/;function sl(e){let t=e.length;if(!ol.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 cl(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function ll(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 ul(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function dl(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):hl(e,n,r.value)}}function fl(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function pl(e,t,n){return fl(e,t,n,!1)}function ml(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return fl(this,n,r(this))},set(e){fl(this,n,e)}})}return t}function hl(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:fl(this,t,n.bind(this))},set(e){fl(this,t,e)}})}function gl(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var _l,vl=!1,yl={configurable:!0,get(){vl=!0}};function V(e,t,n){let r=Object.getPrototypeOf(e._zod);t in r&&_l!==e._zod?_l=void 0:(_l=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,yl);let e=vl;vl=!1;try{let r=n(this);return vl?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),vl||=e,r}catch(n){throw delete this[t],vl||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}}))}function bl(e,t,n,r){let i=gl(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 xl=`~constantCatch`;function Sl(e){let t=()=>e;return t[xl]=!0,t}var Cl,wl=Object.freeze({status:`aborted`}),Tl={value:void 0,enumerable:!1},El=`captureStackTrace`in Error?Error:null;function Dl(e){let t=El;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return El=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function H(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){Tl.value=new a(r);try{Object.defineProperty(n,"_zod",Tl)}finally{Tl.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),dl(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?Dl(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 Ol=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},kl=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Cl=globalThis).__zod_globalConfig??(Cl.__zod_globalConfig={});var Al=globalThis.__zod_globalConfig;function jl(e){return e&&Object.assign(Al,e),Al}function Ml(){let e=this._zod;return e.message??=JSON.stringify(e.def,gc,2),e.message}function Nl(e){this._zod.message=e}var Pl={get:Ml,set:Nl,enumerable:!0,configurable:!0},Fl={value:void 0,enumerable:!1},Il=new WeakSet([Object.prototype,Error.prototype]),Ll=H(`$ZodError`,(e,t)=>{e.name=`$ZodError`,Fl.value=t,Object.defineProperty(e,"issues",Fl),Fl.value=void 0,Object.defineProperty(e,"message",Pl);let n=Object.getPrototypeOf(e);Il.has(n)||(Il.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 Rl(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 zl(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Rl(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Bl(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 Vl(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Hl=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 Ol;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>al(e,o,jl())));throw Mc(n,a?.callee??t),n}return s.value};return t},Ul=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=>al(e,o,jl())));throw Mc(n,a?.callee??t),n}return s.value};return t},Wl=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 Ol;return a.issues.length?Gl(e,a.issues,i):{success:!0,data:a.value}};function Gl(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>al(e,n,jl()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Kl=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?Gl(e,a.issues,i):{success:!0,data:a.value}},ql=Symbol.for(`zod.compile.invalid`),Jl=Symbol.for(`zod.compile.fallback`),Yl=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==ql)return!0;if(r.definite===!0&&n===void 0)return!1}return Xl(e,t,n)});function Xl(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Jl]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Ol;return a.issues.length===0}var Zl=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},Ql=e=>{let t=Hl(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Vl(n,a))};return n},$l=e=>{let t=Hl(e),n=(e,r,i,a)=>t(e,r,i,Vl(n,a));return n},eu=e=>{let t=Ul(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Vl(n,a))};return n},tu=e=>{let t=Ul(e),n=async(e,r,i,a)=>await t(e,r,i,Vl(n,a));return n},nu=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Wl(e)(t,n,i)},ru=e=>(t,n,r)=>Wl(e)(t,n,r),iu=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Kl(e)(t,n,i)},au=e=>async(t,n,r)=>Kl(e)(t,n,r),ou=/^[cC][0-9a-z]{6,}$/,su=/^[0-9a-z]+$/,cu=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,lu=/^[0-9a-vA-V]{20}$/,uu=/^[A-Za-z0-9]{27}$/,du=/^[a-zA-Z0-9_-]{21}$/;function fu(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var pu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mu=/^([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})$/,hu=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)$/,gu=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_u=`^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;function vu(){return new RegExp(_u,`u`)}var yu=/^(?:(?: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])$/,bu=/^(([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}|:))$/,xu=/^((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])$/,Su=/^(([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])$/,Cu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,wu=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Tu=/^https?$/,Eu=/^\+[1-9]\d{6,14}$/,Du=`(?:(?:\\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 Ou(e){return RegExp(`^${e}$`)}var ku=Ou(Du);function Au(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 ju(e){return RegExp(`^${Au(e)}$`)}function Mu(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Au({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Au({precision:e.precision})}`:n;return RegExp(`^${Du}T(?:${r})$`)}var Nu=/^[\s\S]{0,}$/,Pu=/^-?\d+$/,Fu=/^-?\d+(?:\.\d+)?$/,Iu=/^(?:true|false)$/i,Lu=/^[^A-Z]*$/,Ru=/^[^a-z]*$/,zu=H(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Bu=e=>{let t=e.value;return!yc(t)&&t.length!==void 0},Vu={number:`number`,bigint:`bigint`,object:`date`},Hu=H(`$ZodCheckLessThan`,(e,t)=>{zu.init(e,t);let n=Vu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Vu[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})}}),Uu=H(`$ZodCheckGreaterThan`,(e,t)=>{zu.init(e,t);let n=Vu[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Vu[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})}}),Wu=H(`$ZodCheckMultipleOf`,(e,t)=>{zu.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):xc(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})}}),Gu=H(`$ZodCheckNumberFormat`,(e,t)=>{zu.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Hc[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})}}),Ku=H(`$ZodCheckMaxLength`,(e,t)=>{var n;zu.init(e,t),(n=e._zod.def).when??(n.when=Bu),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?sl(r):i)<=t.maximum)return;let a=cl(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),qu=H(`$ZodCheckMinLength`,(e,t)=>{var n;zu.init(e,t),(n=e._zod.def).when??(n.when=Bu),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?sl(r):i)>=t.minimum)return;let a=cl(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Ju=H(`$ZodCheckLengthEquals`,(e,t)=>{var n;zu.init(e,t),(n=e._zod.def).when??(n.when=Bu),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?sl(r):i;if(a===t.length)return;let o=cl(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})}}),Yu=H(`$ZodCheckStringFormat`,(e,t)=>{var n,r;zu.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=()=>{})}),Xu=H(`$ZodCheckRegex`,(e,t)=>{Yu.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})}}),Zu=H(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Lu,Yu.init(e,t)}),Qu=H(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Ru,Yu.init(e,t)}),$u=H(`$ZodCheckIncludes`,(e,t)=>{zu.init(e,t);let n=Rc(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})}}),ed=H(`$ZodCheckStartsWith`,(e,t)=>{zu.init(e,t);let n=RegExp(`^${Rc(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})}}),td=H(`$ZodCheckEndsWith`,(e,t)=>{zu.init(e,t);let n=RegExp(`.*${Rc(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})}}),nd=H(`$ZodCheckOverwrite`,(e,t)=>{zu.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),rd=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))}},id={major:4,minor:6,patch:7},U=H(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=id;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=$c(t),a;for(let o of n){if(o._zod.def.when){if(el(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 Ol;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(il(t.issues,n,e),i||=$c(t,n))});else{if(t.issues.length===n)continue;il(t.issues,n,e),i||=$c(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if($c(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Ol;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 Ol;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return pl(this,`~standard`,sd(this))},set"~standard"(e){fl(this,`~standard`,e)}}),ad=(e,t)=>e.issues.length?{issues:e.issues.map(e=>al(e,t,jl()))}:{value:e.value};async function od(e,t){let n={async:!0};return ad(await e._zod.run({value:t,issues:[]},n),n)}function sd(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return ad(r,n)}catch{}return od(e,t)},vendor:`zod`,version:1}}var cd=H(`$ZodString`,(e,t)=>{U.init(e,t),e._zod.pattern=t.pattern??Nu,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}}),W=H(`$ZodStringFormat`,(e,t)=>{Yu.init(e,t),cd.init(e,t)}),ld=H(`$ZodGUID`,(e,t)=>{t.pattern??=mu,W.init(e,t)}),ud=H(`$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??=hu(e)}else t.pattern??=hu();W.init(e,t)}),dd=H(`$ZodEmail`,(e,t)=>{t.pattern??=gu,W.init(e,t)});function fd(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function pd(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?fd(e)||2:md(e,t)}function md(e,t){if(!t.normalize&&t.protocol?.source===Tu.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 hd=/[\t\n\r]/g;function gd(e){return e.replace(hd,``)}function _d(e,t){return t.lastIndex=0,t.test(e.hostname)}function vd(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var yd=H(`$ZodURL`,(e,t)=>{W.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=pd(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=gd(r);return}t.hostname&&!_d(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&&!vd(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:gd(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),bd=H(`$ZodEmoji`,(e,t)=>{t.pattern??=vu(),W.init(e,t)}),xd=H(`$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?du:fu(t.length),W.init(e,t)}),Sd=H(`$ZodCUID`,(e,t)=>{t.pattern??=ou,W.init(e,t)}),Cd=H(`$ZodCUID2`,(e,t)=>{t.pattern??=su,W.init(e,t)}),wd=H(`$ZodULID`,(e,t)=>{t.pattern??=cu,W.init(e,t)}),Td=H(`$ZodXID`,(e,t)=>{t.pattern??=lu,W.init(e,t)}),Ed=H(`$ZodKSUID`,(e,t)=>{t.pattern??=uu,W.init(e,t)}),Dd=H(`$ZodISODateTime`,(e,t)=>{t.pattern??=Mu(t),W.init(e,t)}),Od=H(`$ZodISODate`,(e,t)=>{t.pattern??=ku,W.init(e,t)}),kd=H(`$ZodISOTime`,(e,t)=>{t.pattern??=ju(t),W.init(e,t)}),Ad=H(`$ZodISODuration`,(e,t)=>{t.pattern??=pu,W.init(e,t)}),jd=H(`$ZodIPv4`,(e,t)=>{t.pattern??=yu,W.init(e,t)}),Md=/^[0-9a-fA-F:.]+$/;function Nd(e){return Md.test(e)?fd(`http://[${e}]`):!1}var Pd=H(`$ZodIPv6`,(e,t)=>{t.pattern??=bu,W.init(e,t),e._zod.check=n=>{Nd(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Fd=H(`$ZodCIDRv4`,(e,t)=>{t.pattern??=xu,W.init(e,t)});function Id(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:Nd(n)}var Ld=H(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Su,W.init(e,t),e._zod.check=n=>{Id(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Rd(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var zd=/^[0-9a-zA-Z+/]*={0,2}$/,Bd=H(`$ZodBase64`,(e,t)=>{t.pattern??=zd,W.init(e,t),e._zod.check=n=>{Rd(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Vd=/^[A-Za-z0-9_-]*$/;function Hd(e){if(!Vd.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Rd(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Ud=H(`$ZodBase64URL`,(e,t)=>{t.pattern??=Vd,W.init(e,t),e._zod.check=n=>{Hd(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Wd=H(`$ZodE164`,(e,t)=>{t.pattern??=Eu,W.init(e,t)});function Gd(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 Kd=H(`$ZodJWT`,(e,t)=>{W.init(e,t),e._zod.check=n=>{Gd(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),qd=H(`$ZodNumber`,(e,t)=>{U.init(e,t),e._zod.pattern=Fu,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}}),Jd=H(`$ZodNumberFormat`,(e,t)=>{Gu.init(e,t),qd.init(e,t)}),Yd=H(`$ZodBoolean`,(e,t)=>{U.init(e,t),e._zod.pattern=Iu,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}}),Xd=H(`$ZodUnknown`,(e,t)=>{U.init(e,t),e._zod.parse=e=>e}),Zd=H(`$ZodNever`,(e,t)=>{U.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Qd(e,t){let n=rl(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 rl(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,il(n.issues,t,e),n}}return i(n,a)}}var $d=e=>Array.isArray(e)?e.length:-1;function ef(e,t,n){e.issues.length&&t.issues.push(...tl(n,e.issues)),t.value[n]=e.value}var tf=H(`$ZodArray`,(e,t)=>{U.init(e,t);let n=Al.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=>ef(t,r,e)));else if(ef(c,r,e),s&&c.issues.length!==0&&$c(c))break}return o.length?Promise.all(o).then(()=>r):r},Qd(e,$d)});function nf(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(...tl(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 rf=[];function af(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:rf,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=Vc(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function of(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($c(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=>nf(e,n,i,t,d,f))):nf(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 sf=H(`$ZodObject`,(e,t)=>{U.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=vc(()=>af(t));V(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)||Sc(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=Nc,o=t.catchall,s,c=Al.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($c(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=>nf(n,t,e,r,a,o))):nf(s,t,e,r,a,o)}return o?of(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),cf=H(`$ZodObjectJIT`,(e,t)=>{sf.init(e,t);let n=e._zod.parse,r=vc(()=>af(t)),i=Al.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new rd([`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)}]`:Ac(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=Nc,c=!Al.jitless,l=c&&Pc.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?of([],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 lf(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=>!$c(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=>al(e,r,jl())))}),t)}var uf=H(`$ZodUnion`,(e,t)=>{U.init(e,t),V(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),V(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),V(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)))}),V(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=>bc(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=>lf(t,r,e,i)):lf(o,r,e,i)}}),df=H(`$ZodIntersection`,(e,t)=>{U.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])=>pf(e,t,n)):pf(e,i,a)}});function ff(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Fc(e)&&Fc(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=ff(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=ff(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 pf(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=ff(t.value,n.value);if(!c.valid){if($c(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var mf=H(`$ZodRecord`,(e,t)=>{U.init(e,t);let n=Al.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Fc(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=>al(e,i,jl())),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(...tl(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...tl(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`&&Fu.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=>al(e,i,jl())),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(...tl(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...tl(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}}),hf=H(`$ZodEnum`,(e,t)=>{U.init(e,t);let n=mc(t.entries),r=new Set(n);e._zod.values=r,V(e,`pattern`,e=>{let t=mc(e.def.entries).filter(e=>Lc.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Rc(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}}),gf=H(`$ZodLiteral`,(e,t)=>{U.init(e,t);let n=new Set(t.values);e._zod.values=n,V(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Rc(e):e?Rc(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}}),_f=H(`$ZodTransform`,(e,t)=>{U.init(e,t),e._zod.optin=`optional`,Al.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new kl(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 Ol;return n.value=i,n}});function vf(e,t){return e.value=t.issues.length?void 0:t.value,e}var yf=H(`$ZodOptional`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${bc(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=>vf(e,t)):vf(e,r)}return t.innerType._zod.run(e,n)}}),bf=H(`$ZodExactOptional`,(e,t)=>{yf.init(e,t),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),xf=H(`$ZodNullable`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${bc(t.source)}|null)$`):void 0}),V(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)}),Sf=H(`$ZodDefault`,(e,t)=>{U.init(e,t),e._zod.optin=`defaulted`,V(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=>Cf(e,t)):Cf(r,t)}});function Cf(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var wf=H(`$ZodPrefault`,(e,t)=>{U.init(e,t),e._zod.optin=`defaulted`,V(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))}),Tf=H(`$ZodNonOptional`,(e,t)=>{U.init(e,t),V(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=>Ef(t,e)):Ef(i,e)}});function Ef(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 Df(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>al(e,r,jl()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Of=H(`$ZodCatch`,(e,t)=>{U.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),V(e,`optout`,e=>e.def.innerType._zod.optout),V(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=>Df(e,r,t,n)):Df(e,r,t,n)}}),kf=H(`$ZodPipe`,(e,t)=>{U.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(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=>Af(e,t.in,n)):Af(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Af(e,t.out,n)):Af(r,t.out,n)}});function Af(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 jf=H(`$ZodReadonly`,(e,t)=>{U.init(e,t),V(e,`propValues`,e=>e.def.innerType._zod.propValues),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`optin`,e=>e.def.innerType?._zod?.optin),V(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(Mf):Mf(r)}});function Mf(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Nf=H(`$ZodCustom`,(e,t)=>{zu.init(e,t),U.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=>Pf(t,n,r,e));Pf(i,n,r,e)}});function Pf(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(ul(e))}}var Ff=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},If=`~memo`,Lf=[];function Rf(e){return typeof e==`object`&&!!e}function zf(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bf=new WeakMap,Vf=0,Hf=1,Uf=2;function Wf(e,t,n){let r=Bf.get(e);if(r!==void 0)return r?Uf:Vf;if(t.has(e))return Uf;t.add(e);let i=Vf,a=e=>{if(i!==Uf&&e?._zod){let r=Wf(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vf;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hf:o.value?._zod?Wf(o.value,t,n):Vf;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=Cc(c);s(e?o(e,!0):Hf),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?Wf(r,t,!1):Hf);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),Gf(e,i)}function Gf(e,t){return t!==Hf&&Bf.set(e,t===Uf),t}function Kf(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qf,Jf=[],Yf={alloc(e,t,n){let r=qf;if(!r)return n;qf=void 0;let i={value:n,issues:null};return r.set(t.value,i),Jf.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`&&Zf(n,e.value))throw new Ff;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=Wf(e,new Set,!1);if(i===Vf)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Uf||r?n=!0:r=!0}let l=s.value;if(!Rf(l))return t(s,c);let u=c[If];u||(u={buckets:new WeakMap,backEdges:void 0},c[If]=u);let d;i===c?d=a:(d=Kf(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(...zf(f.issues)):(s.memo=!0,u.backEdges??(u.backEdges=new WeakSet),u.backEdges.add(f.value)),s;qf=d;let p=Jf.length,m=t(s,c);qf=void 0;let h=Jf.length>p?Jf.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zf(e.issues):Lf),e)):(h&&(h.issues=m.issues.length?zf(m.issues):Lf),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xf(){return Yf}function Zf(e,t){let n=e[If]?.backEdges;return n!==void 0&&Rf(t)&&n.has(t)}var Qf=()=>{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(ll(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Bc(e.values[0])}`:`Invalid option: expected one of ${hc(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`:``}: ${hc(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 $f(){return{localeError:Qf()}}var ep,tp=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 np(){return new tp}(ep=globalThis).__zod_globalRegistry??(ep.__zod_globalRegistry=np());var rp=globalThis.__zod_globalRegistry;function ip(e){return e.checks&&=[...e.checks],e}function ap(e,t){return new e(ip({type:`string`,...B(t)}))}function op(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...B(t)})}function sp(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...B(t)})}function cp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...B(t)})}function lp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...B(t)})}function up(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...B(t)})}function dp(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...B(t)})}function fp(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...B(t)})}function pp(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...B(t)})}function mp(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...B(t)})}function hp(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...B(t)})}function gp(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...B(t)})}function _p(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...B(t)})}function vp(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...B(t)})}function yp(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...B(t)})}function bp(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...B(t)})}function xp(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...B(t)})}function Sp(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...B(t)})}function Cp(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...B(t)})}function wp(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...B(t)})}function Tp(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...B(t)})}function Ep(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...B(t)})}function Dp(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...B(t)})}function Op(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...B(t)})}function kp(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...B(t)})}function Ap(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...B(t)})}function jp(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...B(t)})}function Mp(e,t){return new e(ip({type:`number`,checks:[],...B(t)}))}function Np(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...B(t)})}function Pp(e,t){return new e({type:`boolean`,...B(t)})}function Fp(e){return new e({type:`unknown`})}function Ip(e,t){return new e({type:`never`,...B(t)})}function Lp(e,t){return new Hu({check:`less_than`,...B(t),value:e,inclusive:!1})}function Rp(e,t){return new Hu({check:`less_than`,...B(t),value:e,inclusive:!0})}function zp(e,t){return new Uu({check:`greater_than`,...B(t),value:e,inclusive:!1})}function Bp(e,t){return new Uu({check:`greater_than`,...B(t),value:e,inclusive:!0})}function Vp(e,t){return new Wu({check:`multiple_of`,...B(t),value:e})}function Hp(e,t){return new Ku({check:`max_length`,...B(t),maximum:e})}function Up(e,t){return new qu({check:`min_length`,...B(t),minimum:e})}function Wp(e,t){return new Ju({check:`length_equals`,...B(t),length:e})}function Gp(e,t){return new Xu({check:`string_format`,format:`regex`,...B(t),pattern:e})}function Kp(e){return new Zu({check:`string_format`,format:`lowercase`,...B(e)})}function qp(e){return new Qu({check:`string_format`,format:`uppercase`,...B(e)})}function Jp(e,t){return new $u({check:`string_format`,format:`includes`,...B(t),includes:e})}function Yp(e,t){return new ed({check:`string_format`,format:`starts_with`,...B(t),prefix:e})}function Xp(e,t){return new td({check:`string_format`,format:`ends_with`,...B(t),suffix:e})}function Zp(e){return new nd({check:`overwrite`,tx:e})}function Qp(e){return Zp(t=>t.normalize(e))}function $p(){return Zp(e=>e.trim())}function em(){return Zp(e=>e.toLowerCase())}function tm(){return Zp(e=>e.toUpperCase())}function nm(){return Zp(e=>jc(e))}function rm(e,t,n){return new e({type:`array`,element:t,...B(n)})}function im(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...B(n)})}function am(e,t){let n=om(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(ul(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(ul(r))}},e(t.value,t)),t);return n}function om(e,t){let n=new zu({check:`custom`,...B(t)});return n._zod.check=e,n}function sm(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Sc(e,t,n[t]);return e}function cm(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??rp,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 lm(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 G(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,G(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&sm(o.schema,c),t.io===`input`&&ym(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 um(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function dm(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}/${um(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+um(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 fm(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;fm(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 pm=new Set([`type`,`properties`,`required`,`additionalProperties`]),mm=[`oneOf`,`anyOf`];function hm(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function gm(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!pm.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]??hm(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Sc(n,r,e.length===1?e[0]:gm(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=hm(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 _m(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of pm)if(t in e)return;let n=t.filter(e=>mm.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=gm(t);else{let e=n[0],i=mm.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=>gm([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,sm(e,r))}function vm(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)):sm(i,s),sm(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())fm(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)??[])_m(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)}sm(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,Sc(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:xm(t,`input`,e.processors),output:xm(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ym(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 ym(r.element,n);if(r.type===`set`)return ym(r.valueType,n);if(r.type===`lazy`)return ym(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 ym(r.innerType,n);if(r.type===`intersection`)return ym(r.left,n)||ym(r.right,n);if(r.type===`record`||r.type===`map`)return ym(r.keyType,n)||ym(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ym(r.in,n)||ym(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ym(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ym(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ym(e,n))return!0;return!!(r.rest&&ym(r.rest,n))}return!1}var bm=(e,t={})=>n=>{let r=cm({...n,processors:t});return G(e,r),dm(r,e),vm(r,e)},xm=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=cm({...i??{},target:a,io:t,processors:n});return G(e,o),dm(o,e),vm(o,e)},Sm=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Cm=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},wm=(e,t)=>{Sm(e,`minimum`,t),Cm(e,`maximum`,t)},Tm=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},Em=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Dm=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},Om=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},km=(e,t)=>Sm(e,`minimum`,t.minimum),Am=(e,t)=>Cm(e,`maximum`,t.maximum),jm=e=>(t,n)=>{Om(t,n.format);let[r,i]=e[n.format];Sm(t,`minimum`,r),Cm(t,`maximum`,i)},Mm={greater_than:(e,t)=>Sm(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Cm(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Tm(e,t.value),number_format:jm(Hc),bigint_format:jm(Uc),min_length:km,max_length:Am,length_equals:(e,t)=>wm(e,t.length),min_size:km,max_size:Am,size_equals:(e,t)=>wm(e,t.size),string_format:(e,t)=>{Om(e,t.format),t.pattern&&Em(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)=>Dm(e,t.mime)};function Nm(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Mm[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&Sm(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&Sm(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Cm(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Cm(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Tm(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Dm(t,i.mime);for(let e of i.patterns??[])Em(t,e);return t}var Pm={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Fm=new Map([[zd,Cu],[Vd,wu]]),Im=e=>Fm.get(e)??e,Lm=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Nm(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=Pm[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(Im);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}))])}},Rm=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Nm(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)):lm(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}))])}},zm=(e,t,n,r)=>{n.type=`boolean`},Bm=(e,t,n,r)=>{n.not={}},Vm=(e,t,n,r)=>{let i=e._zod.def,a=mc(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)},Hm=(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(lm(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(lm(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}},Um=(e,t,n,r)=>{lm(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Wm=(e,t,n,r)=>{lm(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Gm=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Nm(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=G(a.element,t,{...r,path:[...r.path,`items`]})};function Km(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Km(t.out):t.type===`catch`?Km(t.innerType):e._zod.optin}var qm=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&lm(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Sc(i.properties,e,G(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`?Km(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=G(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Jm=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>G(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ym=(e,t,n,r)=>{let i=e._zod.def,a=G(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=G(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 Xm(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=Xm(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=>Xm(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`)?Fu:Pu).source)),p}var Zm=new WeakMap;function Qm(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 Zm.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=Xm(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 $m=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Nm(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=G(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Sc(i.patternProperties,Im(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=G(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=Zm.get(t);n||(n=[],Zm.set(t,n),t.deferred.push(()=>Qm(t))),n.push(e)}i.additionalProperties=G(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Km(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))}},eh=(e,t,n,r)=>{let i=e._zod.def,a=G(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`}]},th=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},nh=Symbol();function rh(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(lm(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),nh):JSON.parse(o)}var ih=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=rh(i.defaultValue,e,t,n,r);o!==nh&&(n.default=o)},ah=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=rh(i.defaultValue,e,t,n,r);o!==nh&&(n._prefault=o)},oh=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{lm(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},sh=(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;G(o,t,r);let s=t.seen.get(e);s.ref=o},ch=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},lh=(e,t,n,r)=>{let i=e._zod.def;G(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},uh=new WeakSet([Object.prototype,Error.prototype]);function dh(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 fh=H(`ZodError`,(e,t)=>{Ll.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);uh.has(n)||(uh.add(n),dh(n,`format`,e=>t=>Bl(e,t)),dh(n,`flatten`,e=>t=>zl(e,t)),dh(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,gc,2)}),dh(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,gc,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),ph=Hl(fh),mh=Ul(fh),hh=Wl(fh),gh=Kl(fh),_h=Ql(fh),vh=$l(fh),yh=eu(fh),bh=tu(fh),xh=nu(fh),Sh=ru(fh),Ch=iu(fh),wh=au(fh);function Th(){Al.localeError||jl($f())}function Eh(){Al.memoizer||jl({memoizer:Xf()})}var K=H(`ZodType`,(e,t)=>(Th(),U.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(kc(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 zc(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Ug(e,t))},superRefine(e,t){return this.check(Wg(e,t))},overwrite(e){return this.check(Zp(e))},optional(){return Tg(this)},exactOptional(){return Dg(this)},nullable(){return kg(this)},nullish(){return Tg(kg(this))},nonoptional(e){return Fg(this,e)},array(){return ug(this)},or(e){return pg([this,e])},and(e){return hg(this,e)},transform(e){return zg(this,Cg(e))},default(e){return jg(this,e)},prefault(e){return Ng(this,e)},catch(e){return Lg(this,e)},pipe(e){return zg(this,e)},readonly(){return Vg(this)},describe(e){let t=this.clone();return rp.add(t,{description:e}),t},meta(...e){if(e.length===0)return rp.get(this);let t=this.clone();return rp.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 pl(this,`~standard`,{...sd(this),jsonSchema:{input:xm(this,`input`),output:xm(this,`output`)}})},set"~standard"(e){fl(this,`~standard`,e)},parse:function e(t,n){return ph(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await mh(this,t,n,{callee:e})},safeParse(e,t){return hh(this,e,t)},async safeParseAsync(e,t){return gh(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){fl(this,`spa`,e)},validate(e,t){return Yl(this,e,t)},validateAsync(e,t){return Zl(this,e,t)},encode:function e(t,n){return _h(this,t,n,{callee:e})},decode:function e(t,n){return vh(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await yh(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await bh(this,t,n,{callee:e})},safeEncode(e,t){return xh(this,e,t)},safeDecode(e,t){return Sh(this,e,t)},async safeEncodeAsync(e,t){return Ch(this,e,t)},async safeDecodeAsync(e,t){return wh(this,e,t)},toJSONSchema(e){return bm(this,{})(e)},get description(){return rp.get(this)?.description},get _def(){return this._zod.def}}),Dh=H(`_ZodString`,(e,t)=>{cd.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lm(e,t,n,r)},ml({format:e=>Nm(e).format??null,minLength:e=>Nm(e).minimum??null,maxLength:e=>Nm(e).maximum??null},{regex(...e){return this.check(Gp(...e))},includes(...e){return this.check(Jp(...e))},startsWith(...e){return this.check(Yp(...e))},endsWith(...e){return this.check(Xp(...e))},min(...e){return this.check(Up(...e))},max(...e){return this.check(Hp(...e))},length(...e){return this.check(Wp(...e))},nonempty(...e){return this.check(Up(1,...e))},lowercase(e){return this.check(Kp(e))},uppercase(e){return this.check(qp(e))},trim(){return this.check($p())},normalize(...e){return this.check(Qp(...e))},toLowerCase(){return this.check(em())},toUpperCase(){return this.check(tm())},slugify(){return this.check(nm())}})),Oh=H(`ZodString`,(e,t)=>{cd.init(e,t),Dh.init(e,t)},{email(e){return this.check(op(Nh,e))},url(e){return this.check(fp(Lh,e))},jwt(e){return this.check(Dp(Qh,e))},emoji(e){return this.check(pp(Rh,e))},guid(e){return this.check(sp(Ph,e))},uuid(e){return this.check(cp(Fh,e))},uuidv4(e){return this.check(lp(Fh,e))},uuidv6(e){return this.check(up(Fh,e))},uuidv7(e){return this.check(dp(Fh,e))},nanoid(e){return this.check(mp(zh,e))},cuid(e){return this.check(hp(Bh,e))},cuid2(e){return this.check(gp(Vh,e))},ulid(e){return this.check(_p(Hh,e))},base64(e){return this.check(wp(Yh,e))},base64url(e){return this.check(Tp(Xh,e))},xid(e){return this.check(vp(Uh,e))},ksuid(e){return this.check(yp(Wh,e))},ipv4(e){return this.check(bp(Gh,e))},ipv6(e){return this.check(xp(Kh,e))},cidrv4(e){return this.check(Sp(qh,e))},cidrv6(e){return this.check(Cp(Jh,e))},e164(e){return this.check(Ep(Zh,e))},datetime(e){return this.check(Op(kh,e))},date(e){return this.check(kp(Ah,e))},time(e){return this.check(Ap(jh,e))},duration(e){return this.check(jp(Mh,e))}});function q(e){return ap(Oh,e)}var J=H(`ZodStringFormat`,(e,t)=>{W.init(e,t),Dh.init(e,t)}),kh=H(`ZodISODateTime`,(e,t)=>{Dd.init(e,t),J.init(e,t)}),Ah=H(`ZodISODate`,(e,t)=>{Od.init(e,t),J.init(e,t)}),jh=H(`ZodISOTime`,(e,t)=>{kd.init(e,t),J.init(e,t)}),Mh=H(`ZodISODuration`,(e,t)=>{Ad.init(e,t),J.init(e,t)}),Nh=H(`ZodEmail`,(e,t)=>{dd.init(e,t),J.init(e,t)}),Ph=H(`ZodGUID`,(e,t)=>{ld.init(e,t),J.init(e,t)}),Fh=H(`ZodUUID`,(e,t)=>{ud.init(e,t),J.init(e,t)});function Ih(e){return cp(Fh,e)}var Lh=H(`ZodURL`,(e,t)=>{yd.init(e,t),J.init(e,t)}),Rh=H(`ZodEmoji`,(e,t)=>{bd.init(e,t),J.init(e,t)}),zh=H(`ZodNanoID`,(e,t)=>{xd.init(e,t),J.init(e,t)}),Bh=H(`ZodCUID`,(e,t)=>{Sd.init(e,t),J.init(e,t)}),Vh=H(`ZodCUID2`,(e,t)=>{Cd.init(e,t),J.init(e,t)}),Hh=H(`ZodULID`,(e,t)=>{wd.init(e,t),J.init(e,t)}),Uh=H(`ZodXID`,(e,t)=>{Td.init(e,t),J.init(e,t)}),Wh=H(`ZodKSUID`,(e,t)=>{Ed.init(e,t),J.init(e,t)}),Gh=H(`ZodIPv4`,(e,t)=>{jd.init(e,t),J.init(e,t)}),Kh=H(`ZodIPv6`,(e,t)=>{Pd.init(e,t),J.init(e,t)}),qh=H(`ZodCIDRv4`,(e,t)=>{Fd.init(e,t),J.init(e,t)}),Jh=H(`ZodCIDRv6`,(e,t)=>{Ld.init(e,t),J.init(e,t)}),Yh=H(`ZodBase64`,(e,t)=>{Bd.init(e,t),J.init(e,t)}),Xh=H(`ZodBase64URL`,(e,t)=>{Ud.init(e,t),J.init(e,t)}),Zh=H(`ZodE164`,(e,t)=>{Wd.init(e,t),J.init(e,t)}),Qh=H(`ZodJWT`,(e,t)=>{Kd.init(e,t),J.init(e,t)}),$h=H(`ZodNumber`,(e,t)=>{qd.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Rm(e,t,n,r),e.isFinite=!0},ml({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Nm(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Nm(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Nm(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Nm(e).format??null},{gt(e,t){return this.check(zp(e,t))},gte(e,t){return this.check(Bp(e,t))},min(e,t){return this.check(Bp(e,t))},lt(e,t){return this.check(Lp(e,t))},lte(e,t){return this.check(Rp(e,t))},max(e,t){return this.check(Rp(e,t))},int(e){return this.check(ng(e))},safe(e){return this.check(ng(e))},positive(e){return this.check(zp(0,e))},nonnegative(e){return this.check(Bp(0,e))},negative(e){return this.check(Lp(0,e))},nonpositive(e){return this.check(Rp(0,e))},multipleOf(e,t){return this.check(Vp(e,t))},step(e,t){return this.check(Vp(e,t))},finite(){return this}}));function eg(e){return Mp($h,e)}var tg=H(`ZodNumberFormat`,(e,t)=>{Jd.init(e,t),$h.init(e,t)});function ng(e){return Np(tg,e)}var rg=H(`ZodBoolean`,(e,t)=>{Yd.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zm(e,t,n,r)});function ig(e){return Pp(rg,e)}var ag=H(`ZodUnknown`,(e,t)=>{Xd.init(e,t),K.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function og(){return Fp(ag)}var sg=H(`ZodNever`,(e,t)=>{Zd.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Bm(e,t,n,r)});function cg(e){return Ip(sg,e)}var lg=H(`ZodArray`,(e,t)=>{Eh(),tf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Gm(e,t,n,r),e.element=t.element},{min(e,t){return this.check(Up(e,t))},nonempty(e){return this.check(Up(1,e))},max(e,t){return this.check(Hp(e,t))},length(e,t){return this.check(Wp(e,t))},unwrap(){return this.element}});function ug(e,t){return rm(lg,e,t)}var dg=H(`ZodObject`,(e,t)=>{Eh(),cf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qm(e,t,n,r),bl(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return yg(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(kc(this._zod.def,{catchall:e}))},passthrough(){return this.clone(kc(this._zod.def,{catchall:og()}))},loose(){return this.clone(kc(this._zod.def,{catchall:og()}))},strict(){return this.clone(kc(this._zod.def,{catchall:cg()}))},strip(){return this.clone(kc(this._zod.def,{catchall:void 0}))},extend(e){return qc(this,e)},safeExtend(e){return Yc(this,e)},merge(e){return Xc(this,e)},pick(e){return Wc(this,e)},omit(e){return Kc(this,e)},partial(...e){return Zc(wg,this,e[0])},exactPartial(...e){return Zc(Eg,this,e[0],`exactPartial`)},required(...e){return Qc(Pg,this,e[0])}});function Y(e,t){return new dg({type:`object`,shape:e??{},...B(t)})}var fg=H(`ZodUnion`,(e,t)=>{uf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jm(e,t,n,r),e.options=t.options});function pg(e,t){return new fg({type:`union`,options:e,...B(t)})}var mg=H(`ZodIntersection`,(e,t)=>{df.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ym(e,t,n,r)});function hg(e,t){return new mg({type:`intersection`,left:e,right:t})}var gg=H(`ZodRecord`,(e,t)=>{Eh(),mf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$m(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function _g(e,t,n){return!t||!t._zod?new gg({type:`record`,keyType:q(),valueType:e,...B(t)}):new gg({type:`record`,keyType:e,valueType:t,...B(n)})}var vg=H(`ZodEnum`,(e,t)=>{hf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Vm(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 vg({...t,checks:[],...B(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 vg({...t,checks:[],...B(r),entries:i})}});function yg(e,t){return new vg({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...B(t)})}var bg=H(`ZodLiteral`,(e,t)=>{gf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Hm(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 xg(e,t){return new bg({type:`literal`,values:Array.isArray(e)?e:[e],...B(t)})}var Sg=H(`ZodTransform`,(e,t)=>{Eh(),_f.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wm(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new kl(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(ul(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(ul(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Cg(e){return new Sg({type:`transform`,transform:e})}var wg=H(`ZodOptional`,(e,t)=>{yf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Tg(e){return new wg({type:`optional`,innerType:e})}var Eg=H(`ZodExactOptional`,(e,t)=>{bf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Dg(e){return new Eg({type:`optional`,innerType:e})}var Og=H(`ZodNullable`,(e,t)=>{xf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function kg(e){return new Og({type:`nullable`,innerType:e})}var Ag=H(`ZodDefault`,(e,t)=>{Sf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ih(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function jg(e,t){return new Ag({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ic(t)}})}var Mg=H(`ZodPrefault`,(e,t)=>{wf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ah(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ng(e,t){return new Mg({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Ic(t)}})}var Pg=H(`ZodNonOptional`,(e,t)=>{Tf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>th(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Fg(e,t){return new Pg({type:`nonoptional`,innerType:e,...B(t)})}var Ig=H(`ZodCatch`,(e,t)=>{Of.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oh(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Lg(e,t){return new Ig({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Sl(t)})}var Rg=H(`ZodPipe`,(e,t)=>{kf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sh(e,t,n,r),e.in=t.in,e.out=t.out});function zg(e,t){return new Rg({type:`pipe`,in:e,out:t})}var Bg=H(`ZodReadonly`,(e,t)=>{jf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ch(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Vg(e){return new Bg({type:`readonly`,innerType:e})}var Hg=H(`ZodCustom`,(e,t)=>{Nf.init(e,t),K.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Um(e,t,n,r)});function Ug(e,t={}){return im(Hg,e,t)}function Wg(e,t){return am(e,t)}var Gg=[`tasks:read`,`tasks:write`,`docs:read`,`docs:write`,`organize`];function Kg(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 qg(e,t){return e.includes(`${t}:write`)?`write`:e.includes(`${t}:read`)?`read`:`none`}var Jg=Ih(),Yg=/[^\s\p{Cc}\p{Cf}\p{Z}\u115F\u1160\u3164\uFFA0\u2800]/u,X=(e=120)=>q().overwrite(e=>e.replace(/\p{Cc}+/gu,` `)).trim().min(1,{message:`Required`,abort:!0}).max(e).refine(e=>Yg.test(e),`Required`),Xg=yg(cc),Zg=eg().int().min(0).max(1e5),Qg={min:1900,max:2199},$g=/^(\d{4})-(\d{2})-(\d{2})(?:T(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d{1,9})?)?(?:Z|[+-](?:[01]\d|2[0-3]):?[0-5]\d)?)?$/i;function e_(e){let t=$g.exec(e.trim());if(!t)return null;let[n,r,i]=[Number(t[1]),Number(t[2]),Number(t[3])];if(n<Qg.min||n>Qg.max)return null;let a=new Date(Date.UTC(n,r-1,i,12));return a.getUTCMonth()!==r-1||a.getUTCDate()!==i?null:a.toISOString()}var t_=`a day as YYYY-MM-DD, or an ISO 8601 date-time, between ${Qg.min} and ${Qg.max}`,n_=q().transform((e,t)=>e_(e)||(t.addIssue({code:`custom`,message:`Due dates are ${t_}`}),wl)),r_=2e5,i_=q().trim().min(1,`Required`).max(256),a_=Y({setupCode:i_,name:X(80),locale:yg(lc).optional()}),o_=Y({accessKey:i_}),s_=Y({setupCode:i_,reason:yg([`lost`,`compromised`])});Y({currentAccessKey:i_}),Y({accessKey:i_}),Y({accessKey:i_,deleteBackups:ig()}),Y({token:q().min(40).max(200),deleteBackups:ig().default(!1)}),Y({accessKey:i_}),Y({name:X(80).optional(),theme:yg([`system`,`light`,`dark`]).optional(),locale:yg(lc).optional()}),Y({name:X(60)}),Y({name:X(80),color:Xg.default(`cobalt`),description:q().trim().max(500).optional()}),Y({name:X(80).optional(),color:Xg.optional(),description:q().trim().max(500).optional()}),Y({name:X(80),columns:ug(X(60)).max(20).optional()}),Y({name:X(80)}),Y({name:X(60),index:Zg.optional()}),Y({name:X(60).optional(),index:Zg.optional()}),Y({name:q().trim().max(40).default(``),color:Xg}),Y({name:q().trim().max(40).optional(),color:Xg.optional()}),Y({title:X(300),description:q().max(r_).optional(),dueAt:n_.nullable().optional(),labelIds:ug(Jg).max(20).optional(),index:Zg.optional()}),Y({title:X(300).optional(),description:q().max(r_).optional(),baseVersion:eg().int().min(1).optional(),dueAt:n_.nullable().optional(),labelIds:ug(Jg).max(20).optional()}),Y({columnId:Jg,index:Zg}),Y({title:X(120).default(`Checklist`)}),Y({title:X(120)}),Y({text:X(500)}),Y({text:X(500).optional(),done:ig().optional(),index:Zg.optional()}),Y({pageId:Jg}),Y({title:q().trim().max(200).default(``),icon:q().max(16).nullable().optional(),parentId:Jg.nullable().optional(),content:q().max(r_).default(``)}),Y({title:q().trim().max(200).optional(),icon:q().max(16).nullable().optional(),content:q().max(r_).optional(),baseVersion:eg().int().min(1).optional()}),Y({parentId:Jg.nullable(),index:Zg}),Y({cardId:Jg.optional(),pageId:Jg.optional()}).refine(e=>e.cardId===void 0!=(e.pageId===void 0),{message:`Send either cardId or pageId`}),Y({name:X(60),workspaceId:Jg,scopes:ug(yg(Gg)).min(1,`Select at least one permission`),expiresInDays:pg([xg(30),xg(90),xg(365)]).nullable()}),Y({organize:ig()});var c_=q().regex(/^[A-Za-z0-9+/=_-]+$/).max(4096),l_=Y({algorithm:xg(`argon2id`),salt:c_,memoryKiB:eg().int().min(19456).max(1048576),iterations:eg().int().min(2).max(20),parallelism:eg().int().min(1).max(8)}),u_=4e5,d_=q().regex(/^v1\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+$/,`Invalid envelope`).max(u_),f_=Y({kdf:l_,wrappedKey:d_,recoveryWrappedKey:d_}),p_=eg().int().min(0).max(2147483647);f_.extend({keyVersion:p_}),Y({data:d_,keyVersion:p_}),Y({autoLockMinutes:pg([xg(1),xg(5),xg(15),xg(30),xg(60)])}),Y({params:_g(q(),q().max(4e3))}).extend({allow:ig(),workspaceId:q().optional(),scopes:ug(yg(Gg)).max(Gg.length).optional(),replace:ig().optional()}),Y({ids:ug(Jg).min(1).max(500).optional(),since:Jg.optional(),conflicts:yg([`ask`,`skip`,`force`]).default(`ask`),dryRun:ig().default(!1)}).refine(e=>e.ids===void 0!=(e.since===void 0),{message:`Send either ids or since`});var m_=new Set([`page.content`,`card.description`]),h_=`X-File-Name`,g_={activity:{actions:{card:{created:`<actor>{{actor}}</actor> created the card <target>“{{target}}”</target>`,created_self:`<actor>{{actor}}</actor> created this card`,updated:`<actor>{{actor}}</actor> edited the card <target>“{{target}}”</target>`,updated_self:`<actor>{{actor}}</actor> edited this card`,moved:`<actor>{{actor}}</actor> moved the card <target>“{{target}}”</target>`,moved_self:`<actor>{{actor}}</actor> moved this card`,reordered:`<actor>{{actor}}</actor> reordered the card <target>“{{target}}”</target>`,reordered_self:`<actor>{{actor}}</actor> reordered this card`,archived:`<actor>{{actor}}</actor> archived the card <target>“{{target}}”</target>`,archived_self:`<actor>{{actor}}</actor> archived this card`,restored:`<actor>{{actor}}</actor> restored the card <target>“{{target}}”</target>`,restored_self:`<actor>{{actor}}</actor> restored this card`,deleted:`<actor>{{actor}}</actor> deleted the card <target>“{{target}}”</target>`,deleted_self:`<actor>{{actor}}</actor> deleted this card`,checklist:`<actor>{{actor}}</actor> updated the checklist of <target>“{{target}}”</target>`,checklist_self:`<actor>{{actor}}</actor> updated the checklist`,linked:`<actor>{{actor}}</actor> linked a document to <target>“{{target}}”</target>`,linked_self:`<actor>{{actor}}</actor> linked a document`,unlinked:`<actor>{{actor}}</actor> unlinked a document from <target>“{{target}}”</target>`,unlinked_self:`<actor>{{actor}}</actor> unlinked a document`},column:{created:`<actor>{{actor}}</actor> created the column <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> renamed the column <target>“{{target}}”</target>`,moved:`<actor>{{actor}}</actor> reordered the column <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the column <target>“{{target}}”</target>`},board:{created:`<actor>{{actor}}</actor> created the board <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> renamed the board <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the board <target>“{{target}}”</target>`},page:{created:`<actor>{{actor}}</actor> created the page <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> edited the page <target>“{{target}}”</target>`,moved:`<actor>{{actor}}</actor> moved the page <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the page <target>“{{target}}”</target>`},project:{created:`<actor>{{actor}}</actor> created the project <target>“{{target}}”</target>`,updated:`<actor>{{actor}}</actor> updated the project <target>“{{target}}”</target>`,deleted:`<actor>{{actor}}</actor> deleted the project <target>“{{target}}”</target>`},label:{created:`<actor>{{actor}}</actor> created a label`,updated:`<actor>{{actor}}</actor> edited a label`,deleted:`<actor>{{actor}}</actor> deleted a label`},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`,elsewhere:`You also have accesses in other workspaces:`,elsewhereLink:`{{name}} ({{count}})`},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`},expired:`Expired`},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.`},backups:{keptFolder:`Its backups were kept in the folder <code>{{name}}</code>. If that folder is in the data you’re about to delete, as it is by default, copy it somewhere else first.`,keptBucket:`Its backups were kept in the R2 bucket <code>{{name}}</code>: a copy installed again with the same name can restore them. When you no longer need them, empty and delete that bucket: R2 → {{name}}.`,deletedBucket:`Its backups were deleted. Delete their bucket too, empty now: R2 → {{name}} → Settings → Delete Bucket.`}}},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`,moveUp:`Move up`,moveDown:`Move down`},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?`,loadMore:`Load more`,showing:`{{shown}} of {{total}}`},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`,gone:{byName:`<strong>{{name}}</strong> deleted this page.`,byYou:`You deleted this page in another tab or session.`,withByName:`<strong>{{name}}</strong> deleted “{{title}}”, and this page with it.`,withByYou:`You deleted “{{title}}” in another tab or session, and this page with it.`,unknown:`This page was deleted.`,inTrash:`It’s in the trash.`,unsaved:`Your latest changes weren’t saved: they will be once you restore it.`,unsavedLost:`Your latest changes weren’t saved and can no longer be: copy them before you leave.`,restore:`Restore`},problem:{tooLong:`This document has {{length}} characters and the limit is {{max}}. Shorten it so it can be saved: until then, your changes aren’t saved.`,retrying:`Your latest changes couldn’t be saved. {{reason}} It will try again on its own.`,refused:`Your latest changes couldn’t be saved. {{reason}}`,retry:`Try again`},leave:{title:`Leave without saving?`,body:`Your latest changes to this page weren’t saved and will be lost.`,confirm:`Leave without saving`}},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`},taskCheckbox:`To-do: {{text}}`,taskCheckboxEmpty:`Empty to-do`},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.`,rate_limitedFor_one:`Too many attempts. Try again in {{count}} minute.`,rate_limitedFor_other:`Too many attempts. Try again in {{count}} 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.`,vault_key_changed:`The vault changed in another tab or on another device. Open it again.`,too_many_columns:`A board holds up to 20 columns.`,vault_full:`The vault holds up to 5,000 items. Delete the ones you no longer use to add more.`},notFound:`The item couldn’t be found.`,server:`Something went wrong on the server. Try again.`,unknown:`Something went wrong. Try again.`,invalid:`Some of the data isn’t valid. Check it and try again.`,forbidden:`You don’t have permission to do this.`,conflict:`It changed in the meantime. Reload it and 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`},backups:{title:`Backups`,description:`Every day this copy backs itself up: everything as it is, the encrypted vault, the trash, the history and the attachments included. The last 7 are kept, apart from its data.`,whereFolder:`They’re in the server’s folder <code>{{name}}</code>. To keep them on another disk or volume, set BACKUP_DIR.`,whereBucket:`They’re in the R2 bucket <code>{{name}}</code> of your Cloudflare account, apart from the attachments.`,off:`This copy makes no backups (BACKUPS=off).`,now:`Back up now`,made:`Backup made`,none:`No backups yet: the first one is made within the hour.`,list:`Backups kept`,kind:{daily:`Automatic`,manual:`Made by you`,"before-restore":`Made before restoring`},contents:`Cards: {{cards}} · Documents: {{pages}} · Attachments: {{files}}`,missingFiles_one:`{{count}} attachment couldn’t be copied into it.`,missingFiles_other:`{{count}} attachments couldn’t be copied into it.`,newer:`Made with Orqevio {{version}}: update this copy to restore it.`,restore:`Restore…`,keep_one:`The last daily backup is kept, and the one made before the last restore.`,keep_other:`The last {{count}} daily backups are kept, and the one made before the last restore.`,restoreTitle:`Restore this backup?`,restoreDescription:`This copy goes back to how it was on {{date}}.`,restoreLoses:`Everything goes back: workspaces, documents, cards, vault, agents, trash and history. What changed since is lost.`,restoreSafety:`First, a backup of the copy as it is now is made and kept apart, so you can come back to it.`,restoreSessions:`Every session ends. You stay signed in here, and your access key is the one you use now.`,accessKey:`Access key`,typeName:`Type “{{name}}” to confirm`,restoreConfirm:`Restore`},export:{title:`Export your data`,description:`A ZIP to read your data or take it elsewhere: the tasks of each workspace in JSON, its documents in Markdown and the attachments. Without the vault, which has its own encrypted export, nor the history or the trash.`,action:`Download a ZIP`},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`,backups:{legend:`Its backups`,keep:{label:`Keep them`,hint:`A copy installed again with the same name, or with the same backups folder, can restore them. Delete them by hand when you no longer need them.`},delete:{label:`Delete them too`,hint:`Nothing of this copy can be brought back afterwards.`}}}},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`},includeArchived:`Include archived`,archived:`Archived`}},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.`},seconds:`{{count}} s`},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.`,labelled:`{{label}}. `},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.`,unclosed_quote:`A quote opened on line {{line}} never closes, so the file is cut short or damaged. Open it in a spreadsheet, check it and save it again as CSV.`},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`,extras_one:`{{count}} item has custom fields, more addresses or older passwords: they go into its notes`,extras_other:`{{count}} items have custom fields, more addresses or older passwords: they go into their notes`,passkeys_one:`{{count}} login has a passkey, which can’t be imported; the rest of it can`,passkeys_other:`{{count}} logins have a passkey, which can’t be imported; the rest of each one can`,unsupported_one:`{{count}} item isn’t supported (cards, identities or SSH keys) and won’t be imported`,unsupported_other:`{{count}} items aren’t supported (cards, identities or SSH keys) and won’t be imported`,tooLong_one:`{{count}} item is larger than the vault can hold and won’t be imported: {{titles}}`,tooLong_other:`{{count}} items are larger than the vault can hold and won’t be imported: {{titles}}`,latin1:`The file wasn’t in UTF-8, so it was read as Windows-1252 (Latin-1), the encoding of older spreadsheets. Check that accents and special characters look right before importing.`,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.`,extra:{fields:`Custom fields:`,uris:`Other addresses:`,history:`Older passwords:`}},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.`}}},__=Object.keys(g_),v_=`modulepreload`,y_=function(e){return`/`+e},b_={},x_=function(e){return e.pathname.endsWith(`.css`)},S_=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},Z=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=y_(t,n);let r=s(t),i=x_(r);return S_(b_,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`:v_,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)})},C_=Object.assign({"./locales/de/activity.json":()=>Z(()=>import(`./activity-ZNUvkr3p.js`).then(e=>e.default),[]),"./locales/de/agents.json":()=>Z(()=>import(`./agents-DrakTRAt.js`).then(e=>e.default),[]),"./locales/de/auth.json":()=>Z(()=>import(`./auth-Dixeidaw.js`).then(e=>e.default),[]),"./locales/de/boards.json":()=>Z(()=>import(`./boards-CttGasCM.js`).then(e=>e.default),[]),"./locales/de/common.json":()=>Z(()=>import(`./common-DJe5JA5c.js`).then(e=>e.default),[]),"./locales/de/docs.json":()=>Z(()=>import(`./docs-DEnWVVdL.js`).then(e=>e.default),[]),"./locales/de/errors.json":()=>Z(()=>import(`./errors-znUyR2oX.js`).then(e=>e.default),[]),"./locales/de/history.json":()=>Z(()=>import(`./history-CBSq8sT_.js`).then(e=>e.default),[]),"./locales/de/home.json":()=>Z(()=>import(`./home-DMs617rt.js`).then(e=>e.default),[]),"./locales/de/oauth.json":()=>Z(()=>import(`./oauth-BqnFE4AA.js`).then(e=>e.default),[]),"./locales/de/projects.json":()=>Z(()=>import(`./projects--t9VhdYF.js`).then(e=>e.default),[]),"./locales/de/settings.json":()=>Z(()=>import(`./settings-XBdi63iw.js`).then(e=>e.default),[]),"./locales/de/shell.json":()=>Z(()=>import(`./shell-DOWo5KgD.js`).then(e=>e.default),[]),"./locales/de/trash.json":()=>Z(()=>import(`./trash-BJO-DupK.js`).then(e=>e.default),[]),"./locales/de/vault.json":()=>Z(()=>import(`./vault-Y3hqfCEF.js`).then(e=>e.default),[]),"./locales/es/activity.json":()=>Z(()=>import(`./activity-6zHhcitv.js`).then(e=>e.default),[]),"./locales/es/agents.json":()=>Z(()=>import(`./agents-de0xSyjY.js`).then(e=>e.default),[]),"./locales/es/auth.json":()=>Z(()=>import(`./auth-ayDTWSf0.js`).then(e=>e.default),[]),"./locales/es/boards.json":()=>Z(()=>import(`./boards-DM5MZ8MK.js`).then(e=>e.default),[]),"./locales/es/common.json":()=>Z(()=>import(`./common-Dr48NU46.js`).then(e=>e.default),[]),"./locales/es/docs.json":()=>Z(()=>import(`./docs-BwYy_eWc.js`).then(e=>e.default),[]),"./locales/es/errors.json":()=>Z(()=>import(`./errors-Cmb7VSBY.js`).then(e=>e.default),[]),"./locales/es/history.json":()=>Z(()=>import(`./history-BuXL4ZO8.js`).then(e=>e.default),[]),"./locales/es/home.json":()=>Z(()=>import(`./home-tJQGjAOo.js`).then(e=>e.default),[]),"./locales/es/oauth.json":()=>Z(()=>import(`./oauth-B5NFSQMb.js`).then(e=>e.default),[]),"./locales/es/projects.json":()=>Z(()=>import(`./projects-aUO3NoCx.js`).then(e=>e.default),[]),"./locales/es/settings.json":()=>Z(()=>import(`./settings-DmB3vkQI.js`).then(e=>e.default),[]),"./locales/es/shell.json":()=>Z(()=>import(`./shell-CkzevnPH.js`).then(e=>e.default),[]),"./locales/es/trash.json":()=>Z(()=>import(`./trash-Bxu4b7lw.js`).then(e=>e.default),[]),"./locales/es/vault.json":()=>Z(()=>import(`./vault-CTJTioNK.js`).then(e=>e.default),[]),"./locales/fr/activity.json":()=>Z(()=>import(`./activity-mAare-yB.js`).then(e=>e.default),[]),"./locales/fr/agents.json":()=>Z(()=>import(`./agents-kJYxGRsw.js`).then(e=>e.default),[]),"./locales/fr/auth.json":()=>Z(()=>import(`./auth-UGlCAmH-.js`).then(e=>e.default),[]),"./locales/fr/boards.json":()=>Z(()=>import(`./boards-Bd-B4hhr.js`).then(e=>e.default),[]),"./locales/fr/common.json":()=>Z(()=>import(`./common-CxTPkV7X.js`).then(e=>e.default),[]),"./locales/fr/docs.json":()=>Z(()=>import(`./docs-_S4ttW8g.js`).then(e=>e.default),[]),"./locales/fr/errors.json":()=>Z(()=>import(`./errors-7otksh_4.js`).then(e=>e.default),[]),"./locales/fr/history.json":()=>Z(()=>import(`./history-Cpw0AAmb.js`).then(e=>e.default),[]),"./locales/fr/home.json":()=>Z(()=>import(`./home-CaRivmXC.js`).then(e=>e.default),[]),"./locales/fr/oauth.json":()=>Z(()=>import(`./oauth-DqVF11QW.js`).then(e=>e.default),[]),"./locales/fr/projects.json":()=>Z(()=>import(`./projects-BVQGJc7P.js`).then(e=>e.default),[]),"./locales/fr/settings.json":()=>Z(()=>import(`./settings-DroVpY4u.js`).then(e=>e.default),[]),"./locales/fr/shell.json":()=>Z(()=>import(`./shell-CVGGeBa9.js`).then(e=>e.default),[]),"./locales/fr/trash.json":()=>Z(()=>import(`./trash-DFqgqLEp.js`).then(e=>e.default),[]),"./locales/fr/vault.json":()=>Z(()=>import(`./vault-BAR96ObL.js`).then(e=>e.default),[]),"./locales/it/activity.json":()=>Z(()=>import(`./activity-_4kW2ZJ_.js`).then(e=>e.default),[]),"./locales/it/agents.json":()=>Z(()=>import(`./agents-DOYJyzdo.js`).then(e=>e.default),[]),"./locales/it/auth.json":()=>Z(()=>import(`./auth-DVMJ4tS1.js`).then(e=>e.default),[]),"./locales/it/boards.json":()=>Z(()=>import(`./boards-BExvvK2C.js`).then(e=>e.default),[]),"./locales/it/common.json":()=>Z(()=>import(`./common-Vls4DuMQ.js`).then(e=>e.default),[]),"./locales/it/docs.json":()=>Z(()=>import(`./docs-BlYmrIPJ.js`).then(e=>e.default),[]),"./locales/it/errors.json":()=>Z(()=>import(`./errors-DjlTVQK3.js`).then(e=>e.default),[]),"./locales/it/history.json":()=>Z(()=>import(`./history-BR28CO2x.js`).then(e=>e.default),[]),"./locales/it/home.json":()=>Z(()=>import(`./home-taXbu6Bg.js`).then(e=>e.default),[]),"./locales/it/oauth.json":()=>Z(()=>import(`./oauth-DyKo7CI7.js`).then(e=>e.default),[]),"./locales/it/projects.json":()=>Z(()=>import(`./projects-CrDJIGi7.js`).then(e=>e.default),[]),"./locales/it/settings.json":()=>Z(()=>import(`./settings-CcMXMgCo.js`).then(e=>e.default),[]),"./locales/it/shell.json":()=>Z(()=>import(`./shell--RN8OuYs.js`).then(e=>e.default),[]),"./locales/it/trash.json":()=>Z(()=>import(`./trash-lAGOyPXd.js`).then(e=>e.default),[]),"./locales/it/vault.json":()=>Z(()=>import(`./vault-Chnxpkuh.js`).then(e=>e.default),[]),"./locales/ja/activity.json":()=>Z(()=>import(`./activity-CWpwjlzR.js`).then(e=>e.default),[]),"./locales/ja/agents.json":()=>Z(()=>import(`./agents-Cibz_z-h.js`).then(e=>e.default),[]),"./locales/ja/auth.json":()=>Z(()=>import(`./auth-tM9qVp-X.js`).then(e=>e.default),[]),"./locales/ja/boards.json":()=>Z(()=>import(`./boards-DF_wEJNs.js`).then(e=>e.default),[]),"./locales/ja/common.json":()=>Z(()=>import(`./common-COjNB9BR.js`).then(e=>e.default),[]),"./locales/ja/docs.json":()=>Z(()=>import(`./docs-B6tXalZZ.js`).then(e=>e.default),[]),"./locales/ja/errors.json":()=>Z(()=>import(`./errors-DIc3HG7-.js`).then(e=>e.default),[]),"./locales/ja/history.json":()=>Z(()=>import(`./history-CUFddWVE.js`).then(e=>e.default),[]),"./locales/ja/home.json":()=>Z(()=>import(`./home-JcVjUU4G.js`).then(e=>e.default),[]),"./locales/ja/oauth.json":()=>Z(()=>import(`./oauth-Cfwu6jFm.js`).then(e=>e.default),[]),"./locales/ja/projects.json":()=>Z(()=>import(`./projects-CNfl9kuI.js`).then(e=>e.default),[]),"./locales/ja/settings.json":()=>Z(()=>import(`./settings-D88yFCM6.js`).then(e=>e.default),[]),"./locales/ja/shell.json":()=>Z(()=>import(`./shell-Bhcgh15N.js`).then(e=>e.default),[]),"./locales/ja/trash.json":()=>Z(()=>import(`./trash-pWFmQnYh.js`).then(e=>e.default),[]),"./locales/ja/vault.json":()=>Z(()=>import(`./vault-CDLe0b9o.js`).then(e=>e.default),[]),"./locales/nl/activity.json":()=>Z(()=>import(`./activity-CdqdeoxV.js`).then(e=>e.default),[]),"./locales/nl/agents.json":()=>Z(()=>import(`./agents-BXU0uzTH.js`).then(e=>e.default),[]),"./locales/nl/auth.json":()=>Z(()=>import(`./auth-iW7JVoPN.js`).then(e=>e.default),[]),"./locales/nl/boards.json":()=>Z(()=>import(`./boards-DTnFEV0A.js`).then(e=>e.default),[]),"./locales/nl/common.json":()=>Z(()=>import(`./common-D-VyKjDv.js`).then(e=>e.default),[]),"./locales/nl/docs.json":()=>Z(()=>import(`./docs-Bx1kznfx.js`).then(e=>e.default),[]),"./locales/nl/errors.json":()=>Z(()=>import(`./errors-Dqi8AWNO.js`).then(e=>e.default),[]),"./locales/nl/history.json":()=>Z(()=>import(`./history-DpSejrKr.js`).then(e=>e.default),[]),"./locales/nl/home.json":()=>Z(()=>import(`./home-DT1m0uVZ.js`).then(e=>e.default),[]),"./locales/nl/oauth.json":()=>Z(()=>import(`./oauth-BIEEGPBd.js`).then(e=>e.default),[]),"./locales/nl/projects.json":()=>Z(()=>import(`./projects-D3eU-Jew.js`).then(e=>e.default),[]),"./locales/nl/settings.json":()=>Z(()=>import(`./settings-CZ5suLqg.js`).then(e=>e.default),[]),"./locales/nl/shell.json":()=>Z(()=>import(`./shell-BlFKTzFJ.js`).then(e=>e.default),[]),"./locales/nl/trash.json":()=>Z(()=>import(`./trash-BQQD171k.js`).then(e=>e.default),[]),"./locales/nl/vault.json":()=>Z(()=>import(`./vault-BO3aMEV1.js`).then(e=>e.default),[]),"./locales/pt/activity.json":()=>Z(()=>import(`./activity-DGUXp5QL.js`).then(e=>e.default),[]),"./locales/pt/agents.json":()=>Z(()=>import(`./agents-BGMKVi6i.js`).then(e=>e.default),[]),"./locales/pt/auth.json":()=>Z(()=>import(`./auth-DU1lbddj.js`).then(e=>e.default),[]),"./locales/pt/boards.json":()=>Z(()=>import(`./boards-DRXX82kC.js`).then(e=>e.default),[]),"./locales/pt/common.json":()=>Z(()=>import(`./common-D3b_OJUw.js`).then(e=>e.default),[]),"./locales/pt/docs.json":()=>Z(()=>import(`./docs-BPnASlp4.js`).then(e=>e.default),[]),"./locales/pt/errors.json":()=>Z(()=>import(`./errors-Mp8QlgCo.js`).then(e=>e.default),[]),"./locales/pt/history.json":()=>Z(()=>import(`./history-DXLLakuK.js`).then(e=>e.default),[]),"./locales/pt/home.json":()=>Z(()=>import(`./home-VZIRoQVj.js`).then(e=>e.default),[]),"./locales/pt/oauth.json":()=>Z(()=>import(`./oauth-CK3lCh9i.js`).then(e=>e.default),[]),"./locales/pt/projects.json":()=>Z(()=>import(`./projects-BsY2PmjV.js`).then(e=>e.default),[]),"./locales/pt/settings.json":()=>Z(()=>import(`./settings-DK2eMfka.js`).then(e=>e.default),[]),"./locales/pt/shell.json":()=>Z(()=>import(`./shell-dLPGAa5r.js`).then(e=>e.default),[]),"./locales/pt/trash.json":()=>Z(()=>import(`./trash-mj787YHq.js`).then(e=>e.default),[]),"./locales/pt/vault.json":()=>Z(()=>import(`./vault-BsPmxozG.js`).then(e=>e.default),[])}),w_=lc.filter(e=>e===`en`||Object.keys(C_).some(t=>t.startsWith(`./locales/${e}/`))),T_=e=>dc(e)&&w_.includes(e),E_=`orqevio.locale`;function D_(){try{let e=localStorage.getItem(E_);return T_(e)?e:null}catch{return null}}function O_(){let e=navigator.languages?.length?navigator.languages:[navigator.language];return D_()??fc(e,w_)??`en`}var k_={type:`backend`,init(){},read(e,t,n){let r=C_[`./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 A_(){z.on(`languageChanged`,e=>{document.documentElement.lang=e}),await z.use(k_).use(Rs).init({lng:O_(),fallbackLng:`en`,supportedLngs:[...w_],load:`currentOnly`,ns:__,defaultNS:`common`,resources:{en:g_},partialBundledLanguages:!0,interpolation:{escapeValue:!1},react:{useSuspense:!1}})}var j_=()=>dc(z.resolvedLanguage)?z.resolvedLanguage:`en`;async function M_(e){if(T_(e)){try{localStorage.setItem(E_,e)}catch{}z.resolvedLanguage!==e&&await z.changeLanguage(e)}}var N_=class extends Error{status;code;details;retryAfter;constructor(e,t,n,r,i){super(n),this.status=e,this.code=t,this.details=r,this.retryAfter=i}};function P_(e){let t=Number(e.headers.get(`retry-after`));return Number.isFinite(t)&&t>0?t:void 0}async function F_(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[h_]=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 N_(0,`network`,`No connection to the server`)}if(o.status===204)return;let s=await o.text(),c=s?I_(s):null;if(!o.ok){let e=c?.error;throw new N_(o.status,e?.code??`error`,e?.message??o.statusText,e?.details,P_(o))}return c}function I_(e){try{return JSON.parse(e)}catch{return null}}var Q=(e,t)=>F_(`GET`,e,void 0,t),L_=(e,t={})=>F_(`POST`,e,t),R_=(e,t)=>F_(`PATCH`,e,t),z_=(e,t)=>F_(`PUT`,e,t),B_=e=>F_(`DELETE`,e),V_=[`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`,`vault_key_changed`,`too_many_columns`,`vault_full`],H_=e=>V_.includes(e);function U_(e){return e instanceof N_?e.code===`rate_limited`&&e.retryAfter?hs(`errors:codes.rate_limitedFor`,{count:Math.ceil(e.retryAfter/60)}):H_(e.code)?hs(`errors:codes.${e.code}`):e.status===404?hs(`errors:notFound`):e.status>=500?hs(`errors:server`):e.code===`bad_request`&&Array.isArray(e.details)?hs(`errors:invalid`):e.status===403?hs(`errors:forbidden`):e.code===`conflict`?hs(`errors:conflict`):e.message:hs(`errors:unknown`)}var W_=new ze({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0,retry:(e,t)=>!(t instanceof N_&&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],backups:[`backups`]},G_=()=>Qe({queryKey:$.me,queryFn:async({signal:e})=>{let t=await Q(`/auth/session`,e);if(!t.user)throw W_.setQueryData($.access,t),new N_(401,`unauthorized`,`Authentication required`);return t},staleTime:6e4}),K_=()=>Qe({queryKey:$.access,queryFn:({signal:e})=>Q(`/auth/session`,e),staleTime:0}),q_=e=>Qe({queryKey:$.overview(e??``),queryFn:({signal:t})=>Q(`/workspaces/${e}/overview`,t),enabled:!!e}),J_=e=>Qe({queryKey:$.home(e),queryFn:({signal:t})=>Q(`/workspaces/${e}/home`,t)}),Y_=e=>Qe({queryKey:$.board(e),queryFn:({signal:t})=>Q(`/boards/${e}`,t)}),X_=(e,t)=>$e({queryKey:$.archived(e),queryFn:({signal:t,pageParam:n})=>Q(`/boards/${e}/archived?limit=50${n?`&before=${encodeURIComponent(n.archivedAt)}&beforeId=${n.id}`:``}`,t),initialPageParam:null,getNextPageParam:e=>e.length<50||!e.at(-1).archivedAt?void 0:{id:e.at(-1).id,archivedAt:e.at(-1).archivedAt},enabled:t}),Z_=e=>Qe({queryKey:$.card(e??``),queryFn:({signal:t})=>Q(`/cards/${e}`,t),enabled:!!e}),Q_=e=>Qe({queryKey:$.page(e),queryFn:({signal:t})=>Q(`/pages/${e}`,t),staleTime:5e3}),$_=(e,t,n,r=!1)=>Qe({queryKey:[...$.search(e,t),n??`all`,r],queryFn:({signal:i})=>Q(`/workspaces/${e}/search?q=${encodeURIComponent(t)}${n?`&type=${n}`:``}${r?`&archived=1`:``}`,i),enabled:t.trim().length>=2,placeholderData:te,staleTime:1e4}),ev=e=>Qe({queryKey:$.trash(e),queryFn:({signal:t})=>Q(`/workspaces/${e}/trash`,t)}),tv=(e,t,n)=>$e({queryKey:$.history(e,t),queryFn:({signal:n,pageParam:r})=>Q(`/${e}s/${t}/history?limit=${nv}${r?`&before=${encodeURIComponent(r.updatedAt)}&beforeId=${r.id}`:``}`,n),initialPageParam:null,getNextPageParam:e=>e.length<nv?void 0:{id:e.at(-1).id,updatedAt:e.at(-1).updatedAt},enabled:n}),nv=50,rv=(e,t,n)=>Qe({queryKey:[...$.historyEntry(e),t],queryFn:({signal:t})=>Q(`/history/${e}`,t),enabled:n,staleTime:1/0}),iv=()=>Qe({queryKey:$.tokens,queryFn:({signal:e})=>Q(`/tokens`,e)}),av=36e5,ov=()=>Qe({queryKey:$.backups,queryFn:({signal:e})=>Q(`/backups`,e)}),sv=()=>Qe({queryKey:$.updates,queryFn:({signal:e})=>Q(`/updates`,e),staleTime:av,refetchInterval:av,refetchOnWindowFocus:!1,retry:!1}),cv=(e,t={})=>{let n=new URLSearchParams({limit:`40`});return t.agentsOnly&&n.set(`agents`,`1`),t.tokenId&&n.set(`tokenId`,t.tokenId),Qe({queryKey:$.activity(e,n.toString()),queryFn:({signal:t})=>Q(`/workspaces/${e}/activity?${n}`,t)})},lv=6048e5,uv=864e5,dv=Symbol.for(`constructDateFrom`);function fv(e,t){return typeof e==`function`?e(t):e&&typeof e==`object`&&dv in e?e[dv](t):e instanceof Date?new e.constructor(t):new Date(t)}function pv(e,t){return fv(t||e,e)}function mv(e){let t=pv(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-n}function hv(e,...t){let n=fv.bind(null,e||t.find(e=>typeof e==`object`));return t.map(n)}function gv(e,t){let n=pv(e,t?.in);return n.setHours(0,0,0,0),n}function _v(e,t,n){let[r,i]=hv(n?.in,e,t),a=gv(r),o=gv(i),s=+a-mv(a),c=+o-mv(o);return Math.round((s-c)/uv)}var vv=[[`year`,31536e3],[`month`,2592e3],[`day`,86400],[`hour`,3600],[`minute`,60],[`second`,1]];function yv(e){let t=(new Date(e).getTime()-Date.now())/1e3;if(Math.abs(t)<45)return hs(`time.justNow`);let n=new Intl.RelativeTimeFormat(j_(),{numeric:`auto`}),[r,i]=vv.find(([,e])=>Math.abs(t)>=e)??[`second`,1];return n.format(Math.round(t/i),r)}function bv(e){let t=new Date(e),n=t.getFullYear()===new Date().getFullYear();return new Intl.DateTimeFormat(j_(),{day:`numeric`,month:`short`,...n?{}:{year:`numeric`}}).format(t)}function xv(e){return new Intl.DateTimeFormat(j_(),{weekday:`long`,day:`numeric`,month:`long`,year:`numeric`,hour:`2-digit`,minute:`2-digit`}).format(new Date(e))}function Sv(e=new Date){return new Intl.DateTimeFormat(j_(),{weekday:`long`,day:`numeric`,month:`long`}).format(e)}function Cv(e){let t=_v(Tv(e),new Date);return t<0?`overdue`:t===0?`today`:t<=2?`soon`:`later`}function wv(e){let t=_v(Tv(e),new Date);return t===0?hs(`due.today`):t===1?hs(`due.tomorrow`):t===-1?hs(`due.yesterday`):bv(Tv(e).toISOString())}function Tv(e){let t=new Date(e);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),12)}function Ev(e){return new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),12)).toISOString()}function Dv(e=new Date){let t=e.getHours();return hs(t<6?`greeting.night`:t<14?`greeting.morning`:t<21?`greeting.afternoon`:`greeting.evening`)}function Ov(e){let t=e.trim().split(/\s+/);return((t[0]?.[0]??``)+(t.length>1?t.at(-1)?.[0]??``:``)).toUpperCase()||`·`}function kv(e){let[t,n,r]=e<1024?[`byte`,e,0]:e<1048576?[`kilobyte`,e/1024,0]:e<1024**3?[`megabyte`,e/1024/1024,1]:[`gigabyte`,e/1024**3,1];return new Intl.NumberFormat(j_(),{style:`unit`,unit:t,unitDisplay:t===`byte`?`narrow`:`short`,maximumFractionDigits:r}).format(n)}var Av=e=>new Intl.NumberFormat(j_()).format(e),jv=e=>new Intl.ListFormat(j_(),{type:`conjunction`}).format(e);export{r_ as $,J_ as A,$i as At,B_ as B,cv as C,hs as Ct,Z_ as D,ga as Dt,Y_ as E,ha as Et,iv as F,Qe as Ft,z_ as G,Q as H,ev as I,u as It,j_ as J,w_ as K,sv as L,l as Lt,q_ as M,ji as Mt,Q_ as N,Fi as Nt,tv as O,da as Ot,$_ as P,fo as Pt,u_ as Q,N_ as R,a as Rt,K_ as S,Yo as St,ov as T,oo as Tt,R_ as U,U_ as V,L_ as W,Z as X,A_ as Y,m_ as Z,pv as _,Ts as _t,Tv as a,pc as at,$ as b,gs as bt,Dv as c,sc as ct,Sv as d,Hs as dt,a_ as et,yv as f,zs as ft,hv as g,Ds as gt,gv as h,js as ht,Cv as i,Kg as it,G_ as j,Oi as jt,rv as k,no as kt,Ov as l,qs as lt,_v as m,Ps as mt,xv as n,o_ as nt,jv as o,uc as ot,bv as p,Ls as pt,M_ as q,wv as r,qg as rt,Av as s,cc as st,kv as t,s_ as tt,Ev as u,Ks as ut,fv as v,ws as vt,X_ as w,ao as wt,W_ as x,vs as xt,lv as y,Cs as yt,F_ as z,r as zt};