@isardsat/editorial-admin 6.10.0 → 6.11.1

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 (93) hide show
  1. package/build/client/assets/{ColorPicker-IW3vBXSN.js → ColorPicker-cMAyYT0T.js} +1 -1
  2. package/build/client/assets/FilePicker-Cl1xE7Nb.js +1 -0
  3. package/build/client/assets/Loading-BkOvB9cm.js +1 -0
  4. package/build/client/assets/URLInput-Ck27J_vV.js +1 -0
  5. package/build/client/assets/arrow-up-C0I0e1Jt.js +1 -0
  6. package/build/client/assets/authSlice-DyBWbN7g.js +18 -0
  7. package/build/client/assets/{button-CLU225WL.js → button-CAQsSeJv.js} +1 -1
  8. package/build/client/assets/calendar-Frbsxn98.js +1 -0
  9. package/build/client/assets/chevron-down-qxzqwz13.js +1 -0
  10. package/build/client/assets/chevron-right-BFlMu-RJ.js +1 -0
  11. package/build/client/assets/chunk-EPOLDU6W-CiSVlmCe.js +26 -0
  12. package/build/client/assets/circle-check-C6CxUIig.js +1 -0
  13. package/build/client/assets/clear-button-BT0-SaS2.js +1 -0
  14. package/build/client/assets/createLucideIcon-BvSqmaUO.js +1 -0
  15. package/build/client/assets/{dashboard-BwSPRYBU.js → dashboard-DADSOZ-_.js} +1 -1
  16. package/build/client/assets/dashboard._collection-CtVDeSsn.js +1 -0
  17. package/build/client/assets/dashboard._collection._document-D6oCwVGC.js +1 -0
  18. package/build/client/assets/dashboard._collection.new-CQfN_irk.js +1 -0
  19. package/build/client/assets/dashboard._layout-D1s9unut.js +1 -0
  20. package/build/client/assets/dashboard.files-xlUtjOxw.js +1 -0
  21. package/build/client/assets/date-picker-D1xkYBxv.js +1 -0
  22. package/build/client/assets/datetime-picker-IFDqN0ae.js +1 -0
  23. package/build/client/assets/entry.client-C94uvdU2.js +13 -0
  24. package/build/client/assets/external-link-ERgO2SVI.js +1 -0
  25. package/build/client/assets/files-BFmouRir.js +1 -0
  26. package/build/client/assets/home-CYNfeuaU.js +1 -0
  27. package/build/client/assets/index-B-2LEQwB.js +1 -0
  28. package/build/client/assets/index-B45LLRRA.js +1 -0
  29. package/build/client/assets/index-BuuBEQuS.js +1 -0
  30. package/build/client/assets/index-C0hImMcN.js +1 -0
  31. package/build/client/assets/index-CDZBGZah.js +4 -0
  32. package/build/client/assets/{index-BTe_3Ala.js → index-CZSVchcX.js} +1 -1
  33. package/build/client/assets/index-Cxe-PO-X.js +1 -0
  34. package/build/client/assets/index-DLIEpuwL.js +1 -0
  35. package/build/client/assets/index-DgNySWwD.js +45 -0
  36. package/build/client/assets/input-BuAmKgZ9.js +1 -0
  37. package/build/client/assets/itemForm-D719CaIj.js +8 -0
  38. package/build/client/assets/manifest-37e8fc05.js +1 -0
  39. package/build/client/assets/markdownEditor-CrmMLADy.js +100 -0
  40. package/build/client/assets/markdownEditor-Dha_UaaS.css +1 -0
  41. package/build/client/assets/root--tn719HN.css +1 -0
  42. package/build/client/assets/root-CchL-zdR.js +1 -0
  43. package/build/client/assets/schemas-DSUGmKgQ.js +40 -0
  44. package/build/client/assets/trash-UKLAaALv.js +1 -0
  45. package/build/client/assets/tslib.es6-Dm3DwgL9.js +1 -0
  46. package/build/client/assets/upload-DhJ5wU_H.js +1 -0
  47. package/build/client/assets/utils-oJIM4U5n.js +1 -0
  48. package/build/client/assets/x-D6gZWaAR.js +1 -0
  49. package/build/client/favicon.ico +0 -0
  50. package/build/client/index.html +3 -3
  51. package/package.json +2 -2
  52. package/build/client/assets/FilePicker-CH7xRnml.js +0 -1
  53. package/build/client/assets/Loading-BhRjqdjg.js +0 -6
  54. package/build/client/assets/URLInput-DY9DAWXz.js +0 -1
  55. package/build/client/assets/authSlice-d1KLksEc.js +0 -2763
  56. package/build/client/assets/calendar-DVBBYeOW.js +0 -6
  57. package/build/client/assets/chevron-down-CtNmiOMb.js +0 -6
  58. package/build/client/assets/chevron-right-haBQNeuE.js +0 -6
  59. package/build/client/assets/chunk-EF7DTUVF-CaKisB5m.js +0 -51
  60. package/build/client/assets/circle-check-94P8iWMg.js +0 -6
  61. package/build/client/assets/clear-button-CwpymKyn.js +0 -6
  62. package/build/client/assets/createLucideIcon-BweVylaW.js +0 -21
  63. package/build/client/assets/dashboard._collection-ECb0L7dZ.js +0 -21
  64. package/build/client/assets/dashboard._collection._document-C5QNRGhd.js +0 -1
  65. package/build/client/assets/dashboard._collection.new-wj-L1Zs-.js +0 -1
  66. package/build/client/assets/dashboard._layout-Bes144Yl.js +0 -46
  67. package/build/client/assets/dashboard.files-Bhpq4xHl.js +0 -1
  68. package/build/client/assets/date-picker-Bf3MUdjK.js +0 -1
  69. package/build/client/assets/datetime-picker-xfRCBls_.js +0 -1
  70. package/build/client/assets/entry.client-Be049MAC.js +0 -29
  71. package/build/client/assets/external-link-LWykkN17.js +0 -6
  72. package/build/client/assets/files-etseKA58.js +0 -26
  73. package/build/client/assets/home-Df-x8RAj.js +0 -1
  74. package/build/client/assets/index-4XG4HPxE.js +0 -1
  75. package/build/client/assets/index-8UmwgoSB.js +0 -45
  76. package/build/client/assets/index-B21y1sd-.js +0 -22
  77. package/build/client/assets/index-BJ-ODQ_I.js +0 -9
  78. package/build/client/assets/index-BeLOjj93.js +0 -1
  79. package/build/client/assets/index-BuTy8eAk.js +0 -1
  80. package/build/client/assets/index-DWHslogn.js +0 -1
  81. package/build/client/assets/index-NRYqpySi.js +0 -1
  82. package/build/client/assets/itemForm-BAe4tE4w.js +0 -15
  83. package/build/client/assets/manifest-713d5bf8.js +0 -1
  84. package/build/client/assets/markdownEditor-B3_ygKXr.js +0 -128
  85. package/build/client/assets/markdownEditor-D2iPtBtk.css +0 -1
  86. package/build/client/assets/root-BdZpxusE.css +0 -1
  87. package/build/client/assets/root-CL9mhJVP.js +0 -16
  88. package/build/client/assets/schemas-DZfv8pS7.js +0 -26
  89. package/build/client/assets/trash-BPu8wmdf.js +0 -11
  90. package/build/client/assets/tslib.es6-Dilv5nzk.js +0 -6
  91. package/build/client/assets/upload-C84AIRF5.js +0 -6
  92. package/build/client/assets/utils-CZqhhZtB.js +0 -9
  93. package/build/client/assets/x-BI8YVnoZ.js +0 -6
@@ -1,6 +0,0 @@
1
- import{c as e}from"./createLucideIcon-BweVylaW.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const t=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],a=e("calendar",t);export{a as C};
@@ -1,6 +0,0 @@
1
- import{c as o}from"./createLucideIcon-BweVylaW.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],e=o("chevron-down",n);export{e as C};
@@ -1,6 +0,0 @@
1
- import{c as o}from"./createLucideIcon-BweVylaW.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const t=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],e=o("chevron-right",t);export{e as C};
@@ -1,51 +0,0 @@
1
- function ya(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var wl=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function va(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ut={exports:{}},tt={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Ir;function ga(){if(Ir)return tt;Ir=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,o){var l=null;if(o!==void 0&&(l=""+o),a.key!==void 0&&(l=""+a.key),"key"in a){o={};for(var u in a)u!=="key"&&(o[u]=a[u])}else o=a;return a=o.ref,{$$typeof:e,type:n,key:l,ref:a!==void 0?a:null,props:o}}return tt.Fragment=t,tt.jsx=r,tt.jsxs=r,tt}var Fr;function wa(){return Fr||(Fr=1,Ut.exports=ga()),Ut.exports}var El=wa(),zt={exports:{}},B={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var jr;function Ea(){if(jr)return B;jr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),s=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),m=Symbol.iterator;function p(h){return h===null||typeof h!="object"?null:(h=m&&h[m]||h["@@iterator"],typeof h=="function"?h:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,b={};function S(h,x,N){this.props=h,this.context=x,this.refs=b,this.updater=N||w}S.prototype.isReactComponent={},S.prototype.setState=function(h,x){if(typeof h!="object"&&typeof h!="function"&&h!=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,h,x,"setState")},S.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function E(){}E.prototype=S.prototype;function _(h,x,N){this.props=h,this.context=x,this.refs=b,this.updater=N||w}var P=_.prototype=new E;P.constructor=_,R(P,S.prototype),P.isPureReactComponent=!0;var M=Array.isArray,L={H:null,A:null,T:null,S:null,V:null},y=Object.prototype.hasOwnProperty;function j(h,x,N,$,W,Z){return N=Z.ref,{$$typeof:e,type:h,key:x,ref:N!==void 0?N:null,props:Z}}function J(h,x){return j(h.type,x,void 0,void 0,void 0,h.props)}function U(h){return typeof h=="object"&&h!==null&&h.$$typeof===e}function q(h){var x={"=":"=0",":":"=2"};return"$"+h.replace(/[=:]/g,function(N){return x[N]})}var le=/\/+/g;function pe(h,x){return typeof h=="object"&&h!==null&&h.key!=null?q(""+h.key):x.toString(36)}function X(){}function Q(h){switch(h.status){case"fulfilled":return h.value;case"rejected":throw h.reason;default:switch(typeof h.status=="string"?h.then(X,X):(h.status="pending",h.then(function(x){h.status==="pending"&&(h.status="fulfilled",h.value=x)},function(x){h.status==="pending"&&(h.status="rejected",h.reason=x)})),h.status){case"fulfilled":return h.value;case"rejected":throw h.reason}}throw h}function ae(h,x,N,$,W){var Z=typeof h;(Z==="undefined"||Z==="boolean")&&(h=null);var z=!1;if(h===null)z=!0;else switch(Z){case"bigint":case"string":case"number":z=!0;break;case"object":switch(h.$$typeof){case e:case t:z=!0;break;case f:return z=h._init,ae(z(h._payload),x,N,$,W)}}if(z)return W=W(h),z=$===""?"."+pe(h,0):$,M(W)?(N="",z!=null&&(N=z.replace(le,"$&/")+"/"),ae(W,x,N,"",function($t){return $t})):W!=null&&(U(W)&&(W=J(W,N+(W.key==null||h&&h.key===W.key?"":(""+W.key).replace(le,"$&/")+"/")+z)),x.push(W)),1;z=0;var Se=$===""?".":$+":";if(M(h))for(var oe=0;oe<h.length;oe++)$=h[oe],Z=Se+pe($,oe),z+=ae($,x,N,Z,W);else if(oe=p(h),typeof oe=="function")for(h=oe.call(h),oe=0;!($=h.next()).done;)$=$.value,Z=Se+pe($,oe++),z+=ae($,x,N,Z,W);else if(Z==="object"){if(typeof h.then=="function")return ae(Q(h),x,N,$,W);throw x=String(h),Error("Objects are not valid as a React child (found: "+(x==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":x)+"). If you meant to render a collection of children, use an array instead.")}return z}function Y(h,x,N){if(h==null)return h;var $=[],W=0;return ae(h,$,"","",function(Z){return x.call(N,Z,W++)}),$}function ye(h){if(h._status===-1){var x=h._result;x=x(),x.then(function(N){(h._status===0||h._status===-1)&&(h._status=1,h._result=N)},function(N){(h._status===0||h._status===-1)&&(h._status=2,h._result=N)}),h._status===-1&&(h._status=0,h._result=x)}if(h._status===1)return h._result.default;throw h._result}var se=typeof reportError=="function"?reportError:function(h){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var x=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h),error:h});if(!window.dispatchEvent(x))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",h);return}console.error(h)};function ge(){}return B.Children={map:Y,forEach:function(h,x,N){Y(h,function(){x.apply(this,arguments)},N)},count:function(h){var x=0;return Y(h,function(){x++}),x},toArray:function(h){return Y(h,function(x){return x})||[]},only:function(h){if(!U(h))throw Error("React.Children.only expected to receive a single React element child.");return h}},B.Component=S,B.Fragment=r,B.Profiler=a,B.PureComponent=_,B.StrictMode=n,B.Suspense=i,B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=L,B.__COMPILER_RUNTIME={__proto__:null,c:function(h){return L.H.useMemoCache(h)}},B.cache=function(h){return function(){return h.apply(null,arguments)}},B.cloneElement=function(h,x,N){if(h==null)throw Error("The argument must be a React element, but you passed "+h+".");var $=R({},h.props),W=h.key,Z=void 0;if(x!=null)for(z in x.ref!==void 0&&(Z=void 0),x.key!==void 0&&(W=""+x.key),x)!y.call(x,z)||z==="key"||z==="__self"||z==="__source"||z==="ref"&&x.ref===void 0||($[z]=x[z]);var z=arguments.length-2;if(z===1)$.children=N;else if(1<z){for(var Se=Array(z),oe=0;oe<z;oe++)Se[oe]=arguments[oe+2];$.children=Se}return j(h.type,W,void 0,void 0,Z,$)},B.createContext=function(h){return h={$$typeof:l,_currentValue:h,_currentValue2:h,_threadCount:0,Provider:null,Consumer:null},h.Provider=h,h.Consumer={$$typeof:o,_context:h},h},B.createElement=function(h,x,N){var $,W={},Z=null;if(x!=null)for($ in x.key!==void 0&&(Z=""+x.key),x)y.call(x,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(W[$]=x[$]);var z=arguments.length-2;if(z===1)W.children=N;else if(1<z){for(var Se=Array(z),oe=0;oe<z;oe++)Se[oe]=arguments[oe+2];W.children=Se}if(h&&h.defaultProps)for($ in z=h.defaultProps,z)W[$]===void 0&&(W[$]=z[$]);return j(h,Z,void 0,void 0,null,W)},B.createRef=function(){return{current:null}},B.forwardRef=function(h){return{$$typeof:u,render:h}},B.isValidElement=U,B.lazy=function(h){return{$$typeof:f,_payload:{_status:-1,_result:h},_init:ye}},B.memo=function(h,x){return{$$typeof:s,type:h,compare:x===void 0?null:x}},B.startTransition=function(h){var x=L.T,N={};L.T=N;try{var $=h(),W=L.S;W!==null&&W(N,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(ge,se)}catch(Z){se(Z)}finally{L.T=x}},B.unstable_useCacheRefresh=function(){return L.H.useCacheRefresh()},B.use=function(h){return L.H.use(h)},B.useActionState=function(h,x,N){return L.H.useActionState(h,x,N)},B.useCallback=function(h,x){return L.H.useCallback(h,x)},B.useContext=function(h){return L.H.useContext(h)},B.useDebugValue=function(){},B.useDeferredValue=function(h,x){return L.H.useDeferredValue(h,x)},B.useEffect=function(h,x,N){var $=L.H;if(typeof N=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return $.useEffect(h,x)},B.useId=function(){return L.H.useId()},B.useImperativeHandle=function(h,x,N){return L.H.useImperativeHandle(h,x,N)},B.useInsertionEffect=function(h,x){return L.H.useInsertionEffect(h,x)},B.useLayoutEffect=function(h,x){return L.H.useLayoutEffect(h,x)},B.useMemo=function(h,x){return L.H.useMemo(h,x)},B.useOptimistic=function(h,x){return L.H.useOptimistic(h,x)},B.useReducer=function(h,x,N){return L.H.useReducer(h,x,N)},B.useRef=function(h){return L.H.useRef(h)},B.useState=function(h){return L.H.useState(h)},B.useSyncExternalStore=function(h,x,N){return L.H.useSyncExternalStore(h,x,N)},B.useTransition=function(){return L.H.useTransition()},B.version="19.1.0",B}var Hr;function Ra(){return Hr||(Hr=1,zt.exports=Ea()),zt.exports}var d=Ra();const ba=va(d),Rl=ya({__proto__:null,default:ba},[d]);/**
18
- * react-router v7.7.0
19
- *
20
- * Copyright (c) Remix Software Inc.
21
- *
22
- * This source code is licensed under the MIT license found in the
23
- * LICENSE.md file in the root directory of this source tree.
24
- *
25
- * @license MIT
26
- */var hn=e=>{throw TypeError(e)},Sa=(e,t,r)=>t.has(e)||hn("Cannot "+r),Bt=(e,t,r)=>(Sa(e,t,"read from private field"),r?r.call(e):t.get(e)),xa=(e,t,r)=>t.has(e)?hn("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Ur="popstate";function bl(e={}){function t(n,a){let{pathname:o,search:l,hash:u}=n.location;return ot("",{pathname:o,search:l,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(n,a){return typeof a=="string"?a:Oe(a)}return La(t,r,null,e)}function V(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ne(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ca(){return Math.random().toString(36).substring(2,10)}function zr(e,t){return{usr:e.state,key:e.key,idx:t}}function ot(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ae(t):t,state:r,key:t&&t.key||n||Ca()}}function Oe({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Ae(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function La(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,l=a.history,u="POP",i=null,s=f();s==null&&(s=0,l.replaceState({...l.state,idx:s},""));function f(){return(l.state||{idx:null}).idx}function m(){u="POP";let S=f(),E=S==null?null:S-s;s=S,i&&i({action:u,location:b.location,delta:E})}function p(S,E){u="PUSH";let _=ot(b.location,S,E);s=f()+1;let P=zr(_,s),M=b.createHref(_);try{l.pushState(P,"",M)}catch(L){if(L instanceof DOMException&&L.name==="DataCloneError")throw L;a.location.assign(M)}o&&i&&i({action:u,location:b.location,delta:1})}function w(S,E){u="REPLACE";let _=ot(b.location,S,E);s=f();let P=zr(_,s),M=b.createHref(_);l.replaceState(P,"",M),o&&i&&i({action:u,location:b.location,delta:0})}function R(S){return mn(S)}let b={get action(){return u},get location(){return e(a,l)},listen(S){if(i)throw new Error("A history only accepts one active listener");return a.addEventListener(Ur,m),i=S,()=>{a.removeEventListener(Ur,m),i=null}},createHref(S){return t(a,S)},createURL:R,encodeLocation(S){let E=R(S);return{pathname:E.pathname,search:E.search,hash:E.hash}},push:p,replace:w,go(S){return l.go(S)}};return b}function mn(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),V(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Oe(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var at,Br=class{constructor(e){if(xa(this,at,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Bt(this,at).has(e))return Bt(this,at).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Bt(this,at).set(e,t)}};at=new WeakMap;var Pa=new Set(["lazy","caseSensitive","path","id","index","children"]);function Ta(e){return Pa.has(e)}var Ma=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function _a(e){return Ma.has(e)}function Da(e){return e.index===!0}function it(e,t,r=[],n={},a=!1){return e.map((o,l)=>{let u=[...r,String(l)],i=typeof o.id=="string"?o.id:u.join("-");if(V(o.index!==!0||!o.children,"Cannot specify children on an index route"),V(a||!n[i],`Found a route id collision on id "${i}". Route id's must be globally unique within Data Router usages`),Da(o)){let s={...o,...t(o),id:i};return n[i]=s,s}else{let s={...o,...t(o),id:i,children:void 0};return n[i]=s,o.children&&(s.children=it(o.children,t,u,n,a)),s}})}function Te(e,t,r="/"){return St(e,t,r,!1)}function St(e,t,r,n){let a=typeof t=="string"?Ae(t):t,o=me(a.pathname||"/",r);if(o==null)return null;let l=yn(e);ka(l);let u=null;for(let i=0;u==null&&i<l.length;++i){let s=za(o);u=Ua(l[i],s,n)}return u}function pn(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function yn(e,t=[],r=[],n=""){let a=(o,l,u)=>{let i={relativePath:u===void 0?o.path||"":u,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};i.relativePath.startsWith("/")&&(V(i.relativePath.startsWith(n),`Absolute route path "${i.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(n.length));let s=Ce([n,i.relativePath]),f=r.concat(i);o.children&&o.children.length>0&&(V(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${s}".`),yn(o.children,t,f,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:ja(s,o.index),routesMeta:f})};return e.forEach((o,l)=>{if(o.path===""||!o.path?.includes("?"))a(o,l);else for(let u of vn(o.path))a(o,l,u)}),t}function vn(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let l=vn(n.join("/")),u=[];return u.push(...l.map(i=>i===""?o:[o,i].join("/"))),a&&u.push(...l),u.map(i=>e.startsWith("/")&&i===""?"/":i)}function ka(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ha(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var Oa=/^:[\w-]+$/,Aa=3,Na=2,$a=1,Ia=10,Fa=-2,Wr=e=>e==="*";function ja(e,t){let r=e.split("/"),n=r.length;return r.some(Wr)&&(n+=Fa),t&&(n+=Na),r.filter(a=>!Wr(a)).reduce((a,o)=>a+(Oa.test(o)?Aa:o===""?$a:Ia),n)}function Ha(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function Ua(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",l=[];for(let u=0;u<n.length;++u){let i=n[u],s=u===n.length-1,f=o==="/"?t:t.slice(o.length)||"/",m=Mt({path:i.relativePath,caseSensitive:i.caseSensitive,end:s},f),p=i.route;if(!m&&s&&r&&!n[n.length-1].route.index&&(m=Mt({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},f)),!m)return null;Object.assign(a,m.params),l.push({params:a,pathname:Ce([o,m.pathname]),pathnameBase:Va(Ce([o,m.pathnameBase])),route:p}),m.pathnameBase!=="/"&&(o=Ce([o,m.pathnameBase]))}return l}function Mt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=gn(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((s,{paramName:f,isOptional:m},p)=>{if(f==="*"){let R=u[p]||"";l=o.slice(0,o.length-R.length).replace(/(.)\/+$/,"$1")}const w=u[p];return m&&!w?s[f]=void 0:s[f]=(w||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:l,pattern:e}}function gn(e,t=!1,r=!0){ne(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 n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,u,i)=>(n.push({paramName:u,isOptional:i!=null}),i?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function za(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ne(!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 me(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Ba({basename:e,pathname:t}){return t==="/"?e:Ce([e,t])}function Wa(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Ae(e):e;return{pathname:r?r.startsWith("/")?r:Ya(r,t):t,search:Ja(n),hash:Ga(a)}}function Ya(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Wt(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function wn(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function sr(e){let t=wn(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function ur(e,t,r,n=!1){let a;typeof e=="string"?a=Ae(e):(a={...e},V(!a.pathname||!a.pathname.includes("?"),Wt("?","pathname","search",a)),V(!a.pathname||!a.pathname.includes("#"),Wt("#","pathname","hash",a)),V(!a.search||!a.search.includes("#"),Wt("#","search","hash",a)));let o=e===""||a.pathname==="",l=o?"/":a.pathname,u;if(l==null)u=r;else{let m=t.length-1;if(!n&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),m-=1;a.pathname=p.join("/")}u=m>=0?t[m]:"/"}let i=Wa(a,u),s=l&&l!=="/"&&l.endsWith("/"),f=(o||l===".")&&r.endsWith("/");return!i.pathname.endsWith("/")&&(s||f)&&(i.pathname+="/"),i}var Ce=e=>e.join("/").replace(/\/\/+/g,"/"),Va=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ja=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Ga=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,Xa=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Ka(e,t){return new Xa(e,typeof t=="number"?{status:t}:t)}var qa=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},Ue=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function ze(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var En=["POST","PUT","PATCH","DELETE"],Qa=new Set(En),Za=["GET",...En],eo=new Set(Za),to=new Set([301,302,303,307,308]),ro=new Set([307,308]),Yt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},no={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ye={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ao=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cr=e=>ao.test(e),oo=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Rn="remix-router-transitions",bn=Symbol("ResetLoaderData");function Sl(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";V(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||oo,o={},l=it(e.routes,a,void 0,o),u,i=e.basename||"/",s=e.dataStrategy||co,f={unstable_middleware:!1,...e.future},m=null,p=new Set,w=null,R=null,b=null,S=e.hydrationData!=null,E=Te(l,e.history.location,i),_=!1,P=null,M;if(E==null&&!e.patchRoutesOnNavigation){let c=Ee(404,{pathname:e.history.location.pathname}),{matches:v,route:g}=rn(l);M=!0,E=v,P={[g.id]:c}}else if(E&&!e.hydrationData&&ft(E,l,e.history.location.pathname).active&&(E=null),E)if(E.some(c=>c.route.lazy))M=!1;else if(!E.some(c=>c.route.loader))M=!0;else{let c=e.hydrationData?e.hydrationData.loaderData:null,v=e.hydrationData?e.hydrationData.errors:null;if(v){let g=E.findIndex(C=>v[C.route.id]!==void 0);M=E.slice(0,g+1).every(C=>!Qt(C.route,c,v))}else M=E.every(g=>!Qt(g.route,c,v))}else{M=!1,E=[];let c=ft(null,l,e.history.location.pathname);c.active&&c.matches&&(_=!0,E=c.matches)}let L,y={historyAction:e.history.action,location:e.history.location,matches:E,initialized:M,navigation:Yt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},j="POP",J=!1,U,q=!1,le=new Map,pe=null,X=!1,Q=!1,ae=new Set,Y=new Map,ye=0,se=-1,ge=new Map,h=new Set,x=new Map,N=new Map,$=new Set,W=new Map,Z,z=null;function Se(){if(m=e.history.listen(({action:c,location:v,delta:g})=>{if(Z){Z(),Z=void 0;return}ne(W.size===0||g!=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 C=Or({currentLocation:y.location,nextLocation:v,historyAction:c});if(C&&g!=null){let T=new Promise(k=>{Z=k});e.history.go(g*-1),dt(C,{state:"blocked",location:v,proceed(){dt(C,{state:"proceeding",proceed:void 0,reset:void 0,location:v}),T.then(()=>e.history.go(g))},reset(){let k=new Map(y.blockers);k.set(C,Ye),ue({blockers:k})}});return}return Ne(c,v)}),r){bo(t,le);let c=()=>So(t,le);t.addEventListener("pagehide",c),pe=()=>t.removeEventListener("pagehide",c)}return y.initialized||Ne("POP",y.location,{initialHydration:!0}),L}function oe(){m&&m(),pe&&pe(),p.clear(),U&&U.abort(),y.fetchers.forEach((c,v)=>Ft(v)),y.blockers.forEach((c,v)=>kr(v))}function $t(c){return p.add(c),()=>p.delete(c)}function ue(c,v={}){c.matches&&(c.matches=c.matches.map(T=>{let k=o[T.route.id],O=T.route;return O.element!==k.element||O.errorElement!==k.errorElement||O.hydrateFallbackElement!==k.hydrateFallbackElement?{...T,route:k}:T})),y={...y,...c};let g=[],C=[];y.fetchers.forEach((T,k)=>{T.state==="idle"&&($.has(k)?g.push(k):C.push(k))}),$.forEach(T=>{!y.fetchers.has(T)&&!Y.has(T)&&g.push(T)}),[...p].forEach(T=>T(y,{deletedFetchers:g,viewTransitionOpts:v.viewTransitionOpts,flushSync:v.flushSync===!0})),g.forEach(T=>Ft(T)),C.forEach(T=>y.fetchers.delete(T))}function We(c,v,{flushSync:g}={}){let C=y.actionData!=null&&y.navigation.formMethod!=null&&ve(y.navigation.formMethod)&&y.navigation.state==="loading"&&c.state?._isRedirect!==!0,T;v.actionData?Object.keys(v.actionData).length>0?T=v.actionData:T=null:C?T=y.actionData:T=null;let k=v.loaderData?en(y.loaderData,v.loaderData,v.matches||[],v.errors):y.loaderData,O=y.blockers;O.size>0&&(O=new Map(O),O.forEach((A,F)=>O.set(F,Ye)));let D=X?!1:Nr(c,v.matches||y.matches),I=J===!0||y.navigation.formMethod!=null&&ve(y.navigation.formMethod)&&c.state?._isRedirect!==!0;u&&(l=u,u=void 0),X||j==="POP"||(j==="PUSH"?e.history.push(c,c.state):j==="REPLACE"&&e.history.replace(c,c.state));let H;if(j==="POP"){let A=le.get(y.location.pathname);A&&A.has(c.pathname)?H={currentLocation:y.location,nextLocation:c}:le.has(c.pathname)&&(H={currentLocation:c,nextLocation:y.location})}else if(q){let A=le.get(y.location.pathname);A?A.add(c.pathname):(A=new Set([c.pathname]),le.set(y.location.pathname,A)),H={currentLocation:y.location,nextLocation:c}}ue({...v,actionData:T,loaderData:k,historyAction:j,location:c,initialized:!0,navigation:Yt,revalidation:"idle",restoreScrollPosition:D,preventScrollReset:I,blockers:O},{viewTransitionOpts:H,flushSync:g===!0}),j="POP",J=!1,q=!1,X=!1,Q=!1,z?.resolve(),z=null}async function Cr(c,v){if(typeof c=="number"){e.history.go(c);return}let g=qt(y.location,y.matches,i,c,v?.fromRouteId,v?.relative),{path:C,submission:T,error:k}=Yr(!1,g,v),O=y.location,D=ot(y.location,C,v&&v.state);D={...D,...e.history.encodeLocation(D)};let I=v&&v.replace!=null?v.replace:void 0,H="PUSH";I===!0?H="REPLACE":I===!1||T!=null&&ve(T.formMethod)&&T.formAction===y.location.pathname+y.location.search&&(H="REPLACE");let A=v&&"preventScrollReset"in v?v.preventScrollReset===!0:void 0,F=(v&&v.flushSync)===!0,G=Or({currentLocation:O,nextLocation:D,historyAction:H});if(G){dt(G,{state:"blocked",location:D,proceed(){dt(G,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),Cr(c,v)},reset(){let te=new Map(y.blockers);te.set(G,Ye),ue({blockers:te})}});return}await Ne(H,D,{submission:T,pendingError:k,preventScrollReset:A,replace:v&&v.replace,enableViewTransition:v&&v.viewTransition,flushSync:F})}function ra(){z||(z=xo()),It(),ue({revalidation:"loading"});let c=z.promise;return y.navigation.state==="submitting"?c:y.navigation.state==="idle"?(Ne(y.historyAction,y.location,{startUninterruptedRevalidation:!0}),c):(Ne(j||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:q===!0}),c)}async function Ne(c,v,g){U&&U.abort(),U=null,j=c,X=(g&&g.startUninterruptedRevalidation)===!0,fa(y.location,y.matches),J=(g&&g.preventScrollReset)===!0,q=(g&&g.enableViewTransition)===!0;let C=u||l,T=g&&g.overrideNavigation,k=g?.initialHydration&&y.matches&&y.matches.length>0&&!_?y.matches:Te(C,v,i),O=(g&&g.flushSync)===!0;if(k&&y.initialized&&!Q&&vo(y.location,v)&&!(g&&g.submission&&ve(g.submission.formMethod))){We(v,{matches:k},{flushSync:O});return}let D=ft(k,C,v.pathname);if(D.active&&D.matches&&(k=D.matches),!k){let{error:fe,notFoundMatches:re,route:ee}=jt(v.pathname);We(v,{matches:re,loaderData:{},errors:{[ee.id]:fe}},{flushSync:O});return}U=new AbortController;let I=Ve(e.history,v,U.signal,g&&g.submission),H=new Br(e.unstable_getContext?await e.unstable_getContext():void 0),A;if(g&&g.pendingError)A=[je(k).route.id,{type:"error",error:g.pendingError}];else if(g&&g.submission&&ve(g.submission.formMethod)){let fe=await na(I,v,g.submission,k,H,D.active,g&&g.initialHydration===!0,{replace:g.replace,flushSync:O});if(fe.shortCircuited)return;if(fe.pendingActionResult){let[re,ee]=fe.pendingActionResult;if(we(ee)&&ze(ee.error)&&ee.error.status===404){U=null,We(v,{matches:fe.matches,loaderData:{},errors:{[re]:ee.error}});return}}k=fe.matches||k,A=fe.pendingActionResult,T=Vt(v,g.submission),O=!1,D.active=!1,I=Ve(e.history,I.url,I.signal)}let{shortCircuited:F,matches:G,loaderData:te,errors:ce}=await aa(I,v,k,H,D.active,T,g&&g.submission,g&&g.fetcherSubmission,g&&g.replace,g&&g.initialHydration===!0,O,A);F||(U=null,We(v,{matches:G||k,...tn(A),loaderData:te,errors:ce}))}async function na(c,v,g,C,T,k,O,D={}){It();let I=Eo(v,g);if(ue({navigation:I},{flushSync:D.flushSync===!0}),k){let F=await ht(C,v.pathname,c.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){let G=je(F.partialMatches).route.id;return{matches:F.partialMatches,pendingActionResult:[G,{type:"error",error:F.error}]}}else if(F.matches)C=F.matches;else{let{notFoundMatches:G,error:te,route:ce}=jt(v.pathname);return{matches:G,pendingActionResult:[ce.id,{type:"error",error:te}]}}}let H,A=xt(C,v);if(!A.route.action&&!A.route.lazy)H={type:"error",error:Ee(405,{method:c.method,pathname:v.pathname,routeId:A.route.id})};else{let F=Je(a,o,c,C,A,O?[]:n,T),G=await qe(c,F,T,null);if(H=G[A.route.id],!H){for(let te of C)if(G[te.route.id]){H=G[te.route.id];break}}if(c.signal.aborted)return{shortCircuited:!0}}if(He(H)){let F;return D&&D.replace!=null?F=D.replace:F=qr(H.response.headers.get("Location"),new URL(c.url),i)===y.location.pathname+y.location.search,await $e(c,H,!0,{submission:g,replace:F}),{shortCircuited:!0}}if(we(H)){let F=je(C,A.route.id);return(D&&D.replace)!==!0&&(j="PUSH"),{matches:C,pendingActionResult:[F.route.id,H,A.route.id]}}return{matches:C,pendingActionResult:[A.route.id,H]}}async function aa(c,v,g,C,T,k,O,D,I,H,A,F){let G=k||Vt(v,O),te=O||D||nn(G),ce=!X&&!H;if(T){if(ce){let de=Lr(F);ue({navigation:G,...de!==void 0?{actionData:de}:{}},{flushSync:A})}let K=await ht(g,v.pathname,c.signal);if(K.type==="aborted")return{shortCircuited:!0};if(K.type==="error"){let de=je(K.partialMatches).route.id;return{matches:K.partialMatches,loaderData:{},errors:{[de]:K.error}}}else if(K.matches)g=K.matches;else{let{error:de,notFoundMatches:yt,route:et}=jt(v.pathname);return{matches:yt,loaderData:{},errors:{[et.id]:de}}}}let fe=u||l,{dsMatches:re,revalidatingFetchers:ee}=Vr(c,C,a,o,e.history,y,g,te,v,H?[]:n,H===!0,Q,ae,$,x,h,fe,i,e.patchRoutesOnNavigation!=null,F);if(se=++ye,!e.dataStrategy&&!re.some(K=>K.shouldLoad)&&ee.length===0){let K=_r();return We(v,{matches:g,loaderData:{},errors:F&&we(F[1])?{[F[0]]:F[1].error}:null,...tn(F),...K?{fetchers:new Map(y.fetchers)}:{}},{flushSync:A}),{shortCircuited:!0}}if(ce){let K={};if(!T){K.navigation=G;let de=Lr(F);de!==void 0&&(K.actionData=de)}ee.length>0&&(K.fetchers=oa(ee)),ue(K,{flushSync:A})}ee.forEach(K=>{_e(K.key),K.controller&&Y.set(K.key,K.controller)});let Ie=()=>ee.forEach(K=>_e(K.key));U&&U.signal.addEventListener("abort",Ie);let{loaderResults:Qe,fetcherResults:De}=await Pr(re,ee,c,C);if(c.signal.aborted)return{shortCircuited:!0};U&&U.signal.removeEventListener("abort",Ie),ee.forEach(K=>Y.delete(K.key));let xe=gt(Qe);if(xe)return await $e(c,xe.result,!0,{replace:I}),{shortCircuited:!0};if(xe=gt(De),xe)return h.add(xe.key),await $e(c,xe.result,!0,{replace:I}),{shortCircuited:!0};let{loaderData:Ht,errors:Ze}=Zr(y,g,Qe,F,ee,De);H&&y.errors&&(Ze={...y.errors,...Ze});let Fe=_r(),mt=Dr(se),pt=Fe||mt||ee.length>0;return{matches:g,loaderData:Ht,errors:Ze,...pt?{fetchers:new Map(y.fetchers)}:{}}}function Lr(c){if(c&&!we(c[1]))return{[c[0]]:c[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function oa(c){return c.forEach(v=>{let g=y.fetchers.get(v.key),C=rt(void 0,g?g.data:void 0);y.fetchers.set(v.key,C)}),new Map(y.fetchers)}async function ia(c,v,g,C){_e(c);let T=(C&&C.flushSync)===!0,k=u||l,O=qt(y.location,y.matches,i,g,v,C?.relative),D=Te(k,O,i),I=ft(D,k,O);if(I.active&&I.matches&&(D=I.matches),!D){Pe(c,v,Ee(404,{pathname:O}),{flushSync:T});return}let{path:H,submission:A,error:F}=Yr(!0,O,C);if(F){Pe(c,v,F,{flushSync:T});return}let G=new Br(e.unstable_getContext?await e.unstable_getContext():void 0),te=(C&&C.preventScrollReset)===!0;if(A&&ve(A.formMethod)){await la(c,v,H,D,G,I.active,T,te,A);return}x.set(c,{routeId:v,path:H}),await sa(c,v,H,D,G,I.active,T,te,A)}async function la(c,v,g,C,T,k,O,D,I){It(),x.delete(c);let H=y.fetchers.get(c);Me(c,Ro(I,H),{flushSync:O});let A=new AbortController,F=Ve(e.history,g,A.signal,I);if(k){let ie=await ht(C,new URL(F.url).pathname,F.signal,c);if(ie.type==="aborted")return;if(ie.type==="error"){Pe(c,v,ie.error,{flushSync:O});return}else if(ie.matches)C=ie.matches;else{Pe(c,v,Ee(404,{pathname:g}),{flushSync:O});return}}let G=xt(C,g);if(!G.route.action&&!G.route.lazy){let ie=Ee(405,{method:I.formMethod,pathname:g,routeId:v});Pe(c,v,ie,{flushSync:O});return}Y.set(c,A);let te=ye,ce=Je(a,o,F,C,G,n,T),re=(await qe(F,ce,T,c))[G.route.id];if(F.signal.aborted){Y.get(c)===A&&Y.delete(c);return}if($.has(c)){if(He(re)||we(re)){Me(c,ke(void 0));return}}else{if(He(re))if(Y.delete(c),se>te){Me(c,ke(void 0));return}else return h.add(c),Me(c,rt(I)),$e(F,re,!1,{fetcherSubmission:I,preventScrollReset:D});if(we(re)){Pe(c,v,re.error);return}}let ee=y.navigation.location||y.location,Ie=Ve(e.history,ee,A.signal),Qe=u||l,De=y.navigation.state!=="idle"?Te(Qe,y.navigation.location,i):y.matches;V(De,"Didn't find any matches after fetcher action");let xe=++ye;ge.set(c,xe);let Ht=rt(I,re.data);y.fetchers.set(c,Ht);let{dsMatches:Ze,revalidatingFetchers:Fe}=Vr(Ie,T,a,o,e.history,y,De,I,ee,n,!1,Q,ae,$,x,h,Qe,i,e.patchRoutesOnNavigation!=null,[G.route.id,re]);Fe.filter(ie=>ie.key!==c).forEach(ie=>{let vt=ie.key,$r=y.fetchers.get(vt),pa=rt(void 0,$r?$r.data:void 0);y.fetchers.set(vt,pa),_e(vt),ie.controller&&Y.set(vt,ie.controller)}),ue({fetchers:new Map(y.fetchers)});let mt=()=>Fe.forEach(ie=>_e(ie.key));A.signal.addEventListener("abort",mt);let{loaderResults:pt,fetcherResults:K}=await Pr(Ze,Fe,Ie,T);if(A.signal.aborted)return;if(A.signal.removeEventListener("abort",mt),ge.delete(c),Y.delete(c),Fe.forEach(ie=>Y.delete(ie.key)),y.fetchers.has(c)){let ie=ke(re.data);y.fetchers.set(c,ie)}let de=gt(pt);if(de)return $e(Ie,de.result,!1,{preventScrollReset:D});if(de=gt(K),de)return h.add(de.key),$e(Ie,de.result,!1,{preventScrollReset:D});let{loaderData:yt,errors:et}=Zr(y,De,pt,void 0,Fe,K);Dr(xe),y.navigation.state==="loading"&&xe>se?(V(j,"Expected pending action"),U&&U.abort(),We(y.navigation.location,{matches:De,loaderData:yt,errors:et,fetchers:new Map(y.fetchers)})):(ue({errors:et,loaderData:en(y.loaderData,yt,De,et),fetchers:new Map(y.fetchers)}),Q=!1)}async function sa(c,v,g,C,T,k,O,D,I){let H=y.fetchers.get(c);Me(c,rt(I,H?H.data:void 0),{flushSync:O});let A=new AbortController,F=Ve(e.history,g,A.signal);if(k){let ee=await ht(C,new URL(F.url).pathname,F.signal,c);if(ee.type==="aborted")return;if(ee.type==="error"){Pe(c,v,ee.error,{flushSync:O});return}else if(ee.matches)C=ee.matches;else{Pe(c,v,Ee(404,{pathname:g}),{flushSync:O});return}}let G=xt(C,g);Y.set(c,A);let te=ye,ce=Je(a,o,F,C,G,n,T),re=(await qe(F,ce,T,c))[G.route.id];if(Y.get(c)===A&&Y.delete(c),!F.signal.aborted){if($.has(c)){Me(c,ke(void 0));return}if(He(re))if(se>te){Me(c,ke(void 0));return}else{h.add(c),await $e(F,re,!1,{preventScrollReset:D});return}if(we(re)){Pe(c,v,re.error);return}Me(c,ke(re.data))}}async function $e(c,v,g,{submission:C,fetcherSubmission:T,preventScrollReset:k,replace:O}={}){v.response.headers.has("X-Remix-Revalidate")&&(Q=!0);let D=v.response.headers.get("Location");V(D,"Expected a Location header on the redirect Response"),D=qr(D,new URL(c.url),i);let I=ot(y.location,D,{_isRedirect:!0});if(r){let ce=!1;if(v.response.headers.has("X-Remix-Reload-Document"))ce=!0;else if(cr(D)){const fe=mn(D,!0);ce=fe.origin!==t.location.origin||me(fe.pathname,i)==null}if(ce){O?t.location.replace(D):t.location.assign(D);return}}U=null;let H=O===!0||v.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:A,formAction:F,formEncType:G}=y.navigation;!C&&!T&&A&&F&&G&&(C=nn(y.navigation));let te=C||T;if(ro.has(v.response.status)&&te&&ve(te.formMethod))await Ne(H,I,{submission:{...te,formAction:D},preventScrollReset:k||J,enableViewTransition:g?q:void 0});else{let ce=Vt(I,C);await Ne(H,I,{overrideNavigation:ce,fetcherSubmission:T,preventScrollReset:k||J,enableViewTransition:g?q:void 0})}}async function qe(c,v,g,C){let T,k={};try{T=await fo(s,c,v,C,g,!1)}catch(O){return v.filter(D=>D.shouldLoad).forEach(D=>{k[D.route.id]={type:"error",error:O}}),k}if(c.signal.aborted)return k;for(let[O,D]of Object.entries(T))if(go(D)){let I=D.result;k[O]={type:"redirect",response:po(I,c,O,v,i)}}else k[O]=await mo(D);return k}async function Pr(c,v,g,C){let T=qe(g,c,C,null),k=Promise.all(v.map(async I=>{if(I.matches&&I.match&&I.request&&I.controller){let A=(await qe(I.request,I.matches,C,I.key))[I.match.route.id];return{[I.key]:A}}else return Promise.resolve({[I.key]:{type:"error",error:Ee(404,{pathname:I.path})}})})),O=await T,D=(await k).reduce((I,H)=>Object.assign(I,H),{});return{loaderResults:O,fetcherResults:D}}function It(){Q=!0,x.forEach((c,v)=>{Y.has(v)&&ae.add(v),_e(v)})}function Me(c,v,g={}){y.fetchers.set(c,v),ue({fetchers:new Map(y.fetchers)},{flushSync:(g&&g.flushSync)===!0})}function Pe(c,v,g,C={}){let T=je(y.matches,v);Ft(c),ue({errors:{[T.route.id]:g},fetchers:new Map(y.fetchers)},{flushSync:(C&&C.flushSync)===!0})}function Tr(c){return N.set(c,(N.get(c)||0)+1),$.has(c)&&$.delete(c),y.fetchers.get(c)||no}function Ft(c){let v=y.fetchers.get(c);Y.has(c)&&!(v&&v.state==="loading"&&ge.has(c))&&_e(c),x.delete(c),ge.delete(c),h.delete(c),$.delete(c),ae.delete(c),y.fetchers.delete(c)}function ua(c){let v=(N.get(c)||0)-1;v<=0?(N.delete(c),$.add(c)):N.set(c,v),ue({fetchers:new Map(y.fetchers)})}function _e(c){let v=Y.get(c);v&&(v.abort(),Y.delete(c))}function Mr(c){for(let v of c){let g=Tr(v),C=ke(g.data);y.fetchers.set(v,C)}}function _r(){let c=[],v=!1;for(let g of h){let C=y.fetchers.get(g);V(C,`Expected fetcher: ${g}`),C.state==="loading"&&(h.delete(g),c.push(g),v=!0)}return Mr(c),v}function Dr(c){let v=[];for(let[g,C]of ge)if(C<c){let T=y.fetchers.get(g);V(T,`Expected fetcher: ${g}`),T.state==="loading"&&(_e(g),ge.delete(g),v.push(g))}return Mr(v),v.length>0}function ca(c,v){let g=y.blockers.get(c)||Ye;return W.get(c)!==v&&W.set(c,v),g}function kr(c){y.blockers.delete(c),W.delete(c)}function dt(c,v){let g=y.blockers.get(c)||Ye;V(g.state==="unblocked"&&v.state==="blocked"||g.state==="blocked"&&v.state==="blocked"||g.state==="blocked"&&v.state==="proceeding"||g.state==="blocked"&&v.state==="unblocked"||g.state==="proceeding"&&v.state==="unblocked",`Invalid blocker state transition: ${g.state} -> ${v.state}`);let C=new Map(y.blockers);C.set(c,v),ue({blockers:C})}function Or({currentLocation:c,nextLocation:v,historyAction:g}){if(W.size===0)return;W.size>1&&ne(!1,"A router only supports one blocker at a time");let C=Array.from(W.entries()),[T,k]=C[C.length-1],O=y.blockers.get(T);if(!(O&&O.state==="proceeding")&&k({currentLocation:c,nextLocation:v,historyAction:g}))return T}function jt(c){let v=Ee(404,{pathname:c}),g=u||l,{matches:C,route:T}=rn(g);return{notFoundMatches:C,route:T,error:v}}function da(c,v,g){if(w=c,b=v,R=g||null,!S&&y.navigation===Yt){S=!0;let C=Nr(y.location,y.matches);C!=null&&ue({restoreScrollPosition:C})}return()=>{w=null,b=null,R=null}}function Ar(c,v){return R&&R(c,v.map(C=>pn(C,y.loaderData)))||c.key}function fa(c,v){if(w&&b){let g=Ar(c,v);w[g]=b()}}function Nr(c,v){if(w){let g=Ar(c,v),C=w[g];if(typeof C=="number")return C}return null}function ft(c,v,g){if(e.patchRoutesOnNavigation)if(c){if(Object.keys(c[0].params).length>0)return{active:!0,matches:St(v,g,i,!0)}}else return{active:!0,matches:St(v,g,i,!0)||[]};return{active:!1,matches:null}}async function ht(c,v,g,C){if(!e.patchRoutesOnNavigation)return{type:"success",matches:c};let T=c;for(;;){let k=u==null,O=u||l,D=o;try{await e.patchRoutesOnNavigation({signal:g,path:v,matches:T,fetcherKey:C,patch:(A,F)=>{g.aborted||Jr(A,F,O,D,a,!1)}})}catch(A){return{type:"error",error:A,partialMatches:T}}finally{k&&!g.aborted&&(l=[...l])}if(g.aborted)return{type:"aborted"};let I=Te(O,v,i);if(I)return{type:"success",matches:I};let H=St(O,v,i,!0);if(!H||T.length===H.length&&T.every((A,F)=>A.route.id===H[F].route.id))return{type:"success",matches:null};T=H}}function ha(c){o={},u=it(c,a,void 0,o)}function ma(c,v,g=!1){let C=u==null;Jr(c,v,u||l,o,a,g),C&&(l=[...l],ue({}))}return L={get basename(){return i},get future(){return f},get state(){return y},get routes(){return l},get window(){return t},initialize:Se,subscribe:$t,enableScrollRestoration:da,navigate:Cr,fetch:ia,revalidate:ra,createHref:c=>e.history.createHref(c),encodeLocation:c=>e.history.encodeLocation(c),getFetcher:Tr,deleteFetcher:ua,dispose:oe,getBlocker:ca,deleteBlocker:kr,patchRoutes:ma,_internalFetchControllers:Y,_internalSetRoutes:ha,_internalSetStateDoNotUseOrYouWillBreakYourApp(c){ue(c)}},L}function io(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function qt(e,t,r,n,a,o){let l,u;if(a){l=[];for(let s of t)if(l.push(s),s.route.id===a){u=s;break}}else l=t,u=t[t.length-1];let i=ur(n||".",sr(l),me(e.pathname,r)||e.pathname,o==="path");if(n==null&&(i.search=e.search,i.hash=e.hash),(n==null||n===""||n===".")&&u){let s=fr(i.search);if(u.route.index&&!s)i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&s){let f=new URLSearchParams(i.search),m=f.getAll("index");f.delete("index"),m.filter(w=>w).forEach(w=>f.append("index",w));let p=f.toString();i.search=p?`?${p}`:""}}return r!=="/"&&(i.pathname=Ba({basename:r,pathname:i.pathname})),Oe(i)}function Yr(e,t,r){if(!r||!io(r))return{path:t};if(r.formMethod&&!wo(r.formMethod))return{path:t,error:Ee(405,{method:r.formMethod})};let n=()=>({path:t,error:Ee(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),l=Tn(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ve(o))return n();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,[w,R])=>`${p}${w}=${R}
27
- `,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!ve(o))return n();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return n()}}}V(typeof FormData=="function","FormData is not available in this environment");let u,i;if(r.formData)u=er(r.formData),i=r.formData;else if(r.body instanceof FormData)u=er(r.body),i=r.body;else if(r.body instanceof URLSearchParams)u=r.body,i=Qr(u);else if(r.body==null)u=new URLSearchParams,i=new FormData;else try{u=new URLSearchParams(r.body),i=Qr(u)}catch{return n()}let s={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(ve(s.formMethod))return{path:t,submission:s};let f=Ae(t);return e&&f.search&&fr(f.search)&&u.append("index",""),f.search=`?${u}`,{path:Oe(f),submission:s}}function Vr(e,t,r,n,a,o,l,u,i,s,f,m,p,w,R,b,S,E,_,P){let M=P?we(P[1])?P[1].error:P[1].data:void 0,L=a.createURL(o.location),y=a.createURL(i),j;if(f&&o.errors){let X=Object.keys(o.errors)[0];j=l.findIndex(Q=>Q.route.id===X)}else if(P&&we(P[1])){let X=P[0];j=l.findIndex(Q=>Q.route.id===X)-1}let J=P?P[1].statusCode:void 0,U=J&&J>=400,q={currentUrl:L,currentParams:o.matches[0]?.params||{},nextUrl:y,nextParams:l[0].params,...u,actionResult:M,actionStatus:J},le=l.map((X,Q)=>{let{route:ae}=X,Y=null;if(j!=null&&Q>j?Y=!1:ae.lazy?Y=!0:ae.loader==null?Y=!1:f?Y=Qt(ae,o.loaderData,o.errors):lo(o.loaderData,o.matches[Q],X)&&(Y=!0),Y!==null)return Zt(r,n,e,X,s,t,Y);let ye=U?!1:m||L.pathname+L.search===y.pathname+y.search||L.search!==y.search||so(o.matches[Q],X),se={...q,defaultShouldRevalidate:ye},ge=_t(X,se);return Zt(r,n,e,X,s,t,ge,se)}),pe=[];return R.forEach((X,Q)=>{if(f||!l.some(N=>N.route.id===X.routeId)||w.has(Q))return;let ae=o.fetchers.get(Q),Y=ae&&ae.state!=="idle"&&ae.data===void 0,ye=Te(S,X.path,E);if(!ye){if(_&&Y)return;pe.push({key:Q,routeId:X.routeId,path:X.path,matches:null,match:null,request:null,controller:null});return}if(b.has(Q))return;let se=xt(ye,X.path),ge=new AbortController,h=Ve(a,X.path,ge.signal),x=null;if(p.has(Q))p.delete(Q),x=Je(r,n,h,ye,se,s,t);else if(Y)m&&(x=Je(r,n,h,ye,se,s,t));else{let N={...q,defaultShouldRevalidate:U?!1:m};_t(se,N)&&(x=Je(r,n,h,ye,se,s,t,N))}x&&pe.push({key:Q,routeId:X.routeId,path:X.path,matches:x,match:se,request:h,controller:ge})}),{dsMatches:le,revalidatingFetchers:pe}}function Qt(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function lo(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function so(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function _t(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Jr(e,t,r,n,a,o){let l;if(e){let s=n[e];V(s,`No route found to patch children into: routeId = ${e}`),s.children||(s.children=[]),l=s.children}else l=r;let u=[],i=[];if(t.forEach(s=>{let f=l.find(m=>Sn(s,m));f?i.push({existingRoute:f,newRoute:s}):u.push(s)}),u.length>0){let s=it(u,a,[e||"_","patch",String(l?.length||"0")],n);l.push(...s)}if(o&&i.length>0)for(let s=0;s<i.length;s++){let{existingRoute:f,newRoute:m}=i[s],p=f,[w]=it([m],a,[],{},!0);Object.assign(p,{element:w.element?w.element:p.element,errorElement:w.errorElement?w.errorElement:p.errorElement,hydrateFallbackElement:w.hydrateFallbackElement?w.hydrateFallbackElement:p.hydrateFallbackElement})}}function Sn(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?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>t.children?.some(a=>Sn(r,a))):!1}var Gr=new WeakMap,xn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(V(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let l=Gr.get(a);l||(l={},Gr.set(a,l));let u=l[e];if(u)return u;let i=(async()=>{let s=Ta(e),m=a[e]!==void 0&&e!=="hasErrorBoundary";if(s)ne(!s,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(m)ne(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let p=await o();p!=null&&(Object.assign(a,{[e]:p}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(p=>p===void 0)&&(a.lazy=void 0))})();return l[e]=i,i},Xr=new WeakMap;function uo(e,t,r,n,a){let o=r[e.id];if(V(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let f=Xr.get(o);if(f)return{lazyRoutePromise:f,lazyHandlerPromise:f};let m=(async()=>{V(typeof e.lazy=="function","No lazy route function found");let p=await e.lazy(),w={};for(let R in p){let b=p[R];if(b===void 0)continue;let S=_a(R),_=o[R]!==void 0&&R!=="hasErrorBoundary";S?ne(!S,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):_?ne(!_,`Route "${o.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):w[R]=b}Object.assign(o,w),Object.assign(o,{...n(o),lazy:void 0})})();return Xr.set(o,m),m.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:m}}let l=Object.keys(e.lazy),u=[],i;for(let f of l){if(a&&a.includes(f))continue;let m=xn({key:f,route:e,manifest:r,mapRouteProperties:n});m&&(u.push(m),f===t&&(i=m))}let s=u.length>0?Promise.all(u).then(()=>{}):void 0;return s?.catch(()=>{}),i?.catch(()=>{}),{lazyRoutePromise:s,lazyHandlerPromise:i}}async function Kr(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function co(e){return e.matches.some(t=>t.route.unstable_middleware)?Cn(e,!1,()=>Kr(e),(t,r)=>({[r]:{type:"error",result:t}})):Kr(e)}async function Cn(e,t,r,n){let{matches:a,request:o,params:l,context:u}=e,i={handlerResult:void 0};try{let s=a.flatMap(m=>m.route.unstable_middleware?m.route.unstable_middleware.map(p=>[m.route.id,p]):[]),f=await Ln({request:o,params:l,context:u},s,t,i,r);return t?f:i.handlerResult}catch(s){if(!i.middlewareError)throw s;let f=await n(i.middlewareError.error,i.middlewareError.routeId);return i.handlerResult?Object.assign(i.handlerResult,f):f}}async function Ln(e,t,r,n,a,o=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason?l.signal.reason:new Error(`Request aborted without an \`AbortSignal.reason\`: ${l.method} ${l.url}`);let u=t[o];if(!u)return n.handlerResult=await a(),n.handlerResult;let[i,s]=u,f=!1,m,p=async()=>{if(f)throw new Error("You may only call `next()` once per middleware");f=!0,await Ln(e,t,r,n,a,o+1)};try{let w=await s({request:e.request,params:e.params,context:e.context},p);return f?w===void 0?m:w:p()}catch(w){throw n.middlewareError?n.middlewareError.error!==w&&(n.middlewareError={routeId:i,error:w}):n.middlewareError={routeId:i,error:w},w}}function Pn(e,t,r,n,a){let o=xn({key:"unstable_middleware",route:n.route,manifest:t,mapRouteProperties:e}),l=uo(n.route,ve(r.method)?"action":"loader",t,e,a);return{middleware:o,route:l.lazyRoutePromise,handler:l.lazyHandlerPromise}}function Zt(e,t,r,n,a,o,l,u=null){let i=!1,s=Pn(e,t,r,n,a);return{...n,_lazyPromises:s,shouldLoad:l,unstable_shouldRevalidateArgs:u,unstable_shouldCallHandler(f){return i=!0,u?typeof f=="boolean"?_t(n,{...u,defaultShouldRevalidate:f}):_t(n,u):l},resolve(f){return i||l||f&&!ve(r.method)&&(n.route.lazy||n.route.loader)?ho({request:r,match:n,lazyHandlerPromise:s?.handler,lazyRoutePromise:s?.route,handlerOverride:f,scopedContext:o}):Promise.resolve({type:"data",result:void 0})}}}function Je(e,t,r,n,a,o,l,u=null){return n.map(i=>i.route.id!==a.route.id?{...i,shouldLoad:!1,unstable_shouldRevalidateArgs:u,unstable_shouldCallHandler:()=>!1,_lazyPromises:Pn(e,t,r,i,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Zt(e,t,r,i,o,l,!0,u))}async function fo(e,t,r,n,a,o){r.some(s=>s._lazyPromises?.middleware)&&await Promise.all(r.map(s=>s._lazyPromises?.middleware));let l={request:t,params:r[0].params,context:a,matches:r},i=await e({...l,fetcherKey:n,unstable_runClientMiddleware:s=>{let f=l;return Cn(f,!1,()=>s({...f,fetcherKey:n,unstable_runClientMiddleware:()=>{throw new Error("Cannot call `unstable_runClientMiddleware()` from within an `unstable_runClientMiddleware` handler")}}),(m,p)=>({[p]:{type:"error",result:m}}))}});try{await Promise.all(r.flatMap(s=>[s._lazyPromises?.handler,s._lazyPromises?.route]))}catch{}return i}async function ho({request:e,match:t,lazyHandlerPromise:r,lazyRoutePromise:n,handlerOverride:a,scopedContext:o}){let l,u,i=ve(e.method),s=i?"action":"loader",f=m=>{let p,w=new Promise((S,E)=>p=E);u=()=>p(),e.signal.addEventListener("abort",u);let R=S=>typeof m!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${s}" [routeId: ${t.route.id}]`)):m({request:e,params:t.params,context:o},...S!==void 0?[S]:[]),b=(async()=>{try{return{type:"data",result:await(a?a(E=>R(E)):R())}}catch(S){return{type:"error",result:S}}})();return Promise.race([b,w])};try{let m=i?t.route.action:t.route.loader;if(r||n)if(m){let p,[w]=await Promise.all([f(m).catch(R=>{p=R}),r,n]);if(p!==void 0)throw p;l=w}else{await r;let p=i?t.route.action:t.route.loader;if(p)[l]=await Promise.all([f(p),n]);else if(s==="action"){let w=new URL(e.url),R=w.pathname+w.search;throw Ee(405,{method:e.method,pathname:R,routeId:t.route.id})}else return{type:"data",result:void 0}}else if(m)l=await f(m);else{let p=new URL(e.url),w=p.pathname+p.search;throw Ee(404,{pathname:w})}}catch(m){return{type:"error",result:m}}finally{u&&e.signal.removeEventListener("abort",u)}return l}async function mo(e){let{result:t,type:r}=e;if(dr(t)){let n;try{let a=t.headers.get("Content-Type");a&&/\bapplication\/json\b/.test(a)?t.body==null?n=null:n=await t.json():n=await t.text()}catch(a){return{type:"error",error:a}}return r==="error"?{type:"error",error:new Ue(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?tr(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:new Ue(t.init?.status||500,void 0,t.data),statusCode:ze(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ze(t)?t.status:void 0}:tr(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 po(e,t,r,n,a){let o=e.headers.get("Location");if(V(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!cr(o)){let l=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=qt(new URL(t.url),l,a,o),e.headers.set("Location",o)}return e}function qr(e,t,r){if(cr(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=me(a.pathname,r)!=null;if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Ve(e,t,r,n){let a=e.createURL(Tn(t)).toString(),o={signal:r};if(n&&ve(n.formMethod)){let{formMethod:l,formEncType:u}=n;o.method=l.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):u==="text/plain"?o.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?o.body=er(n.formData):o.body=n.formData}return new Request(a,o)}function er(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Qr(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function yo(e,t,r,n=!1,a=!1){let o={},l=null,u,i=!1,s={},f=r&&we(r[1])?r[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let p=m.route.id,w=t[p];if(V(!He(w),"Cannot handle redirect results in processLoaderData"),we(w)){let R=w.error;if(f!==void 0&&(R=f,f=void 0),l=l||{},a)l[p]=R;else{let b=je(e,p);l[b.route.id]==null&&(l[b.route.id]=R)}n||(o[p]=bn),i||(i=!0,u=ze(w.error)?w.error.status:500),w.headers&&(s[p]=w.headers)}else o[p]=w.data,w.statusCode&&w.statusCode!==200&&!i&&(u=w.statusCode),w.headers&&(s[p]=w.headers)}),f!==void 0&&r&&(l={[r[0]]:f},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:l,statusCode:u||200,loaderHeaders:s}}function Zr(e,t,r,n,a,o){let{loaderData:l,errors:u}=yo(t,r,n);return a.filter(i=>!i.matches||i.matches.some(s=>s.shouldLoad)).forEach(i=>{let{key:s,match:f,controller:m}=i,p=o[s];if(V(p,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(we(p)){let w=je(e.matches,f?.route.id);u&&u[w.route.id]||(u={...u,[w.route.id]:p.error}),e.fetchers.delete(s)}else if(He(p))V(!1,"Unhandled fetcher revalidation redirect");else{let w=ke(p.data);e.fetchers.set(s,w)}}),{loaderData:l,errors:u}}function en(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==bn).reduce((o,[l,u])=>(o[l]=u,o),{});for(let o of r){let l=o.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&o.route.loader&&(a[l]=e[l]),n&&n.hasOwnProperty(l))break}return a}function tn(e){return e?we(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function je(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function rn(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Ee(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let l="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(l="Bad Request",n&&t&&r?u=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(l="Forbidden",u=`Route "${r}" does not match URL "${t}"`):e===404?(l="Not Found",u=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",n&&t&&r?u=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(u=`Invalid request method "${n.toUpperCase()}"`)),new Ue(e||500,l,new Error(u),!0)}function gt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(He(a))return{key:n,result:a}}}function Tn(e){let t=typeof e=="string"?Ae(e):e;return Oe({...t,hash:""})}function vo(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function go(e){return dr(e.result)&&to.has(e.result.status)}function we(e){return e.type==="error"}function He(e){return(e&&e.type)==="redirect"}function tr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function dr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function wo(e){return eo.has(e.toUpperCase())}function ve(e){return Qa.has(e.toUpperCase())}function fr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function xt(e,t){let r=typeof t=="string"?Ae(t).search:t.search;if(e[e.length-1].route.index&&fr(r||""))return e[e.length-1];let n=wn(e);return n[n.length-1]}function nn(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:l}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:l,text:void 0}}}function Vt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Eo(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function rt(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 Ro(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 ke(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 bo(e,t){try{let r=e.sessionStorage.getItem(Rn);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function So(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(Rn,JSON.stringify(r))}catch(n){ne(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function xo(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Be=d.createContext(null);Be.displayName="DataRouter";var Ge=d.createContext(null);Ge.displayName="DataRouterState";var Co=d.createContext(!1);function Lo(){return d.useContext(Co)}var hr=d.createContext({isTransitioning:!1});hr.displayName="ViewTransition";var Mn=d.createContext(new Map);Mn.displayName="Fetchers";var Po=d.createContext(null);Po.displayName="Await";var Re=d.createContext(null);Re.displayName="Navigation";var kt=d.createContext(null);kt.displayName="Location";var be=d.createContext({outlet:null,matches:[],isDataRoute:!1});be.displayName="Route";var mr=d.createContext(null);mr.displayName="RouteError";function To(e,{relative:t}={}){V(st(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=d.useContext(Re),{hash:a,pathname:o,search:l}=ut(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:Ce([r,o])),n.createHref({pathname:u,search:l,hash:a})}function st(){return d.useContext(kt)!=null}function Le(){return V(st(),"useLocation() may be used only in the context of a <Router> component."),d.useContext(kt).location}var _n="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Dn(e){d.useContext(Re).static||d.useLayoutEffect(e)}function Mo(){let{isDataRoute:e}=d.useContext(be);return e?Bo():_o()}function _o(){V(st(),"useNavigate() may be used only in the context of a <Router> component.");let e=d.useContext(Be),{basename:t,navigator:r}=d.useContext(Re),{matches:n}=d.useContext(be),{pathname:a}=Le(),o=JSON.stringify(sr(n)),l=d.useRef(!1);return Dn(()=>{l.current=!0}),d.useCallback((i,s={})=>{if(ne(l.current,_n),!l.current)return;if(typeof i=="number"){r.go(i);return}let f=ur(i,JSON.parse(o),a,s.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:Ce([t,f.pathname])),(s.replace?r.replace:r.push)(f,s.state,s)},[t,r,o,a,e])}var Do=d.createContext(null);function ko(e){let t=d.useContext(be).outlet;return t&&d.createElement(Do.Provider,{value:e},t)}function kn(){let{matches:e}=d.useContext(be),t=e[e.length-1];return t?t.params:{}}function ut(e,{relative:t}={}){let{matches:r}=d.useContext(be),{pathname:n}=Le(),a=JSON.stringify(sr(r));return d.useMemo(()=>ur(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Oo(e,t,r,n){V(st(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=d.useContext(Re),{matches:o}=d.useContext(be),l=o[o.length-1],u=l?l.params:{},i=l?l.pathname:"/",s=l?l.pathnameBase:"/",f=l&&l.route;{let E=f&&f.path||"";$n(i,!f||E.endsWith("*")||E.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${i}" (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.
28
-
29
- Please change the parent <Route path="${E}"> to <Route path="${E==="/"?"*":`${E}/*`}">.`)}let m=Le(),p;p=m;let w=p.pathname||"/",R=w;if(s!=="/"){let E=s.replace(/^\//,"").split("/");R="/"+w.replace(/^\//,"").split("/").slice(E.length).join("/")}let b=Te(e,{pathname:R});return ne(f||b!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),ne(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.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.`),Fo(b&&b.map(E=>Object.assign({},E,{params:Object.assign({},u,E.params),pathname:Ce([s,a.encodeLocation?a.encodeLocation(E.pathname).pathname:E.pathname]),pathnameBase:E.pathnameBase==="/"?s:Ce([s,a.encodeLocation?a.encodeLocation(E.pathnameBase).pathname:E.pathnameBase])})),o,r,n)}function Ao(){let e=vr(),t=ze(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=d.createElement(d.Fragment,null,d.createElement("p",null,"💿 Hey developer 👋"),d.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",d.createElement("code",{style:o},"ErrorBoundary")," or"," ",d.createElement("code",{style:o},"errorElement")," prop on your route.")),d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},t),r?d.createElement("pre",{style:a},r):null,l)}var No=d.createElement(Ao,null),$o=class extends d.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?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?d.createElement(be.Provider,{value:this.props.routeContext},d.createElement(mr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Io({routeContext:e,match:t,children:r}){let n=d.useContext(Be);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(be.Provider,{value:e},r)}function Fo(e,t=[],r=null,n=null){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 a=e,o=r?.errors;if(o!=null){let i=a.findIndex(s=>s.route.id&&o?.[s.route.id]!==void 0);V(i>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,i+1))}let l=!1,u=-1;if(r)for(let i=0;i<a.length;i++){let s=a[i];if((s.route.HydrateFallback||s.route.hydrateFallbackElement)&&(u=i),s.route.id){let{loaderData:f,errors:m}=r,p=s.route.loader&&!f.hasOwnProperty(s.route.id)&&(!m||m[s.route.id]===void 0);if(s.route.lazy||p){l=!0,u>=0?a=a.slice(0,u+1):a=[a[0]];break}}}return a.reduceRight((i,s,f)=>{let m,p=!1,w=null,R=null;r&&(m=o&&s.route.id?o[s.route.id]:void 0,w=s.route.errorElement||No,l&&(u<0&&f===0?($n("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,R=null):u===f&&(p=!0,R=s.route.hydrateFallbackElement||null)));let b=t.concat(a.slice(0,f+1)),S=()=>{let E;return m?E=w:p?E=R:s.route.Component?E=d.createElement(s.route.Component,null):s.route.element?E=s.route.element:E=i,d.createElement(Io,{match:s,routeContext:{outlet:i,matches:b,isDataRoute:r!=null},children:E})};return r&&(s.route.ErrorBoundary||s.route.errorElement||f===0)?d.createElement($o,{location:r.location,revalidation:r.revalidation,component:w,error:m,children:S(),routeContext:{outlet:null,matches:b,isDataRoute:!0}}):S()},null)}function pr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function On(e){let t=d.useContext(Be);return V(t,pr(e)),t}function Xe(e){let t=d.useContext(Ge);return V(t,pr(e)),t}function jo(e){let t=d.useContext(be);return V(t,pr(e)),t}function ct(e){let t=jo(e),r=t.matches[t.matches.length-1];return V(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Ho(){return ct("useRouteId")}function Uo(){return Xe("useNavigation").navigation}function yr(){let{matches:e,loaderData:t}=Xe("useMatches");return d.useMemo(()=>e.map(r=>pn(r,t)),[e,t])}function An(){let e=Xe("useLoaderData"),t=ct("useLoaderData");return e.loaderData[t]}function Nn(){let e=Xe("useActionData"),t=ct("useLoaderData");return e.actionData?e.actionData[t]:void 0}function vr(){let e=d.useContext(mr),t=Xe("useRouteError"),r=ct("useRouteError");return e!==void 0?e:t.errors?.[r]}var zo=0;function xl(e){let{router:t,basename:r}=On("useBlocker"),n=Xe("useBlocker"),[a,o]=d.useState(""),l=d.useCallback(u=>{if(typeof e!="function")return!!e;if(r==="/")return e(u);let{currentLocation:i,nextLocation:s,historyAction:f}=u;return e({currentLocation:{...i,pathname:me(i.pathname,r)||i.pathname},nextLocation:{...s,pathname:me(s.pathname,r)||s.pathname},historyAction:f})},[r,e]);return d.useEffect(()=>{let u=String(++zo);return o(u),()=>t.deleteBlocker(u)},[t]),d.useEffect(()=>{a!==""&&t.getBlocker(a,l)},[t,a,l]),a&&n.blockers.has(a)?n.blockers.get(a):Ye}function Bo(){let{router:e}=On("useNavigate"),t=ct("useNavigate"),r=d.useRef(!1);return Dn(()=>{r.current=!0}),d.useCallback(async(a,o={})=>{ne(r.current,_n),r.current&&(typeof a=="number"?e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var an={};function $n(e,t,r){!t&&!an[e]&&(an[e]=!0,ne(!1,r))}var on={};function rr(e,t){!e&&!on[t]&&(on[t]=!0,console.warn(t))}function Cl(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ne(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:d.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ne(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:d.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ne(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:d.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Ll=["HydrateFallback","hydrateFallbackElement"],Wo=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function Pl({router:e,flushSync:t}){let[r,n]=d.useState(e.state),[a,o]=d.useState(),[l,u]=d.useState({isTransitioning:!1}),[i,s]=d.useState(),[f,m]=d.useState(),[p,w]=d.useState(),R=d.useRef(new Map),b=d.useCallback((P,{deletedFetchers:M,flushSync:L,viewTransitionOpts:y})=>{P.fetchers.forEach((J,U)=>{J.data!==void 0&&R.current.set(U,J.data)}),M.forEach(J=>R.current.delete(J)),rr(L===!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 j=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(rr(y==null||j,"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."),!y||!j){t&&L?t(()=>n(P)):d.startTransition(()=>n(P));return}if(t&&L){t(()=>{f&&(i&&i.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:y.currentLocation,nextLocation:y.nextLocation})});let J=e.window.document.startViewTransition(()=>{t(()=>n(P))});J.finished.finally(()=>{t(()=>{s(void 0),m(void 0),o(void 0),u({isTransitioning:!1})})}),t(()=>m(J));return}f?(i&&i.resolve(),f.skipTransition(),w({state:P,currentLocation:y.currentLocation,nextLocation:y.nextLocation})):(o(P),u({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}))},[e.window,t,f,i]);d.useLayoutEffect(()=>e.subscribe(b),[e,b]),d.useEffect(()=>{l.isTransitioning&&!l.flushSync&&s(new Wo)},[l]),d.useEffect(()=>{if(i&&a&&e.window){let P=a,M=i.promise,L=e.window.document.startViewTransition(async()=>{d.startTransition(()=>n(P)),await M});L.finished.finally(()=>{s(void 0),m(void 0),o(void 0),u({isTransitioning:!1})}),m(L)}},[a,i,e.window]),d.useEffect(()=>{i&&a&&r.location.key===a.location.key&&i.resolve()},[i,f,r.location,a]),d.useEffect(()=>{!l.isTransitioning&&p&&(o(p.state),u({isTransitioning:!0,flushSync:!1,currentLocation:p.currentLocation,nextLocation:p.nextLocation}),w(void 0))},[l.isTransitioning,p]);let S=d.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:P=>e.navigate(P),push:(P,M,L)=>e.navigate(P,{state:M,preventScrollReset:L?.preventScrollReset}),replace:(P,M,L)=>e.navigate(P,{replace:!0,state:M,preventScrollReset:L?.preventScrollReset})}),[e]),E=e.basename||"/",_=d.useMemo(()=>({router:e,navigator:S,static:!1,basename:E}),[e,S,E]);return d.createElement(d.Fragment,null,d.createElement(Be.Provider,{value:_},d.createElement(Ge.Provider,{value:r},d.createElement(Mn.Provider,{value:R.current},d.createElement(hr.Provider,{value:l},d.createElement(Jo,{basename:E,location:r.location,navigationType:r.historyAction,navigator:S},d.createElement(Yo,{routes:e.routes,future:e.future,state:r})))))),null)}var Yo=d.memo(Vo);function Vo({routes:e,future:t,state:r}){return Oo(e,void 0,r,t)}function Tl(e){return ko(e.context)}function Jo({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1}){V(!st(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),u=d.useMemo(()=>({basename:l,navigator:a,static:o,future:{}}),[l,a,o]);typeof r=="string"&&(r=Ae(r));let{pathname:i="/",search:s="",hash:f="",state:m=null,key:p="default"}=r,w=d.useMemo(()=>{let R=me(i,l);return R==null?null:{location:{pathname:R,search:s,hash:f,state:m,key:p},navigationType:n}},[l,i,s,f,m,p,n]);return ne(w!=null,`<Router basename="${l}"> is not able to match the URL "${i}${s}${f}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:d.createElement(Re.Provider,{value:u},d.createElement(kt.Provider,{children:t,value:w}))}function Go(){return{params:kn(),loaderData:An(),actionData:Nn(),matches:yr()}}function Ml(e){return function(){const r=Go();return d.createElement(e,r)}}function Xo(){return{params:kn(),loaderData:An(),actionData:Nn(),error:vr()}}function _l(e){return function(){const r=Xo();return d.createElement(e,r)}}var Ct="get",Lt="application/x-www-form-urlencoded";function Ot(e){return e!=null&&typeof e.tagName=="string"}function Ko(e){return Ot(e)&&e.tagName.toLowerCase()==="button"}function qo(e){return Ot(e)&&e.tagName.toLowerCase()==="form"}function Qo(e){return Ot(e)&&e.tagName.toLowerCase()==="input"}function Zo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ei(e,t){return e.button===0&&(!t||t==="_self")&&!Zo(e)}var wt=null;function ti(){if(wt===null)try{new FormData(document.createElement("form"),0),wt=!1}catch{wt=!0}return wt}var ri=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jt(e){return e!=null&&!ri.has(e)?(ne(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Lt}"`),null):e}function ni(e,t){let r,n,a,o,l;if(qo(e)){let u=e.getAttribute("action");n=u?me(u,t):null,r=e.getAttribute("method")||Ct,a=Jt(e.getAttribute("enctype"))||Lt,o=new FormData(e)}else if(Ko(e)||Qo(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let i=e.getAttribute("formaction")||u.getAttribute("action");if(n=i?me(i,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||Ct,a=Jt(e.getAttribute("formenctype"))||Jt(u.getAttribute("enctype"))||Lt,o=new FormData(u,e),!ti()){let{name:s,type:f,value:m}=e;if(f==="image"){let p=s?`${s}.`:"";o.append(`${p}x`,"0"),o.append(`${p}y`,"0")}else s&&o.append(s,m)}}else{if(Ot(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ct,n=null,a=Lt,l=e}return o&&a==="text/plain"&&(l=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:l}}var ai=-1,oi=-2,ii=-3,li=-4,si=-5,ui=-6,ci=-7,di="B",fi="D",In="E",hi="M",mi="N",Fn="P",pi="R",yi="S",vi="Y",gi="U",wi="Z",jn=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};function Ei(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split(`
30
- `);t=o.pop()||"";for(const l of o)n.enqueue(l)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Gt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function nr(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return ln.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,ln.call(this,n)}function ln(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const l=[[e,i=>{o=i}]];let u=[];for(;l.length>0;){const[i,s]=l.pop();switch(i){case ci:s(void 0);continue;case si:s(null);continue;case oi:s(NaN);continue;case ui:s(1/0);continue;case ii:s(-1/0);continue;case li:s(-0);continue}if(t[i]){s(t[i]);continue}const f=r[i];if(!f||typeof f!="object"){t[i]=f,s(f);continue}if(Array.isArray(f))if(typeof f[0]=="string"){const[m,p,w]=f;switch(m){case fi:s(t[i]=new Date(p));continue;case gi:s(t[i]=new URL(p));continue;case di:s(t[i]=BigInt(p));continue;case pi:s(t[i]=new RegExp(p,w));continue;case vi:s(t[i]=Symbol.for(p));continue;case yi:const R=new Set;t[i]=R;for(let M=f.length-1;M>0;M--)l.push([f[M],L=>{R.add(L)}]);s(R);continue;case hi:const b=new Map;t[i]=b;for(let M=f.length-2;M>0;M-=2){const L=[];l.push([f[M+1],y=>{L[1]=y}]),l.push([f[M],y=>{L[0]=y}]),u.push(()=>{b.set(L[0],L[1])})}s(b);continue;case mi:const S=Object.create(null);t[i]=S;for(const M of Object.keys(p).reverse()){const L=[];l.push([p[M],y=>{L[1]=y}]),l.push([Number(M.slice(1)),y=>{L[0]=y}]),u.push(()=>{S[L[0]]=L[1]})}s(S);continue;case Fn:if(t[p])s(t[i]=t[p]);else{const M=new jn;n[p]=M,s(t[i]=M.promise)}continue;case In:const[,E,_]=f;let P=_&&Gt&&Gt[_]?new Gt[_](E):new Error(E);t[i]=P,s(P);continue;case wi:s(t[i]=t[p]);continue;default:if(Array.isArray(a)){const M=[],L=f.slice(1);for(let y=0;y<L.length;y++){const j=L[y];l.push([j,J=>{M[y]=J}])}u.push(()=>{for(const y of a){const j=y(f[0],...M);if(j){s(t[i]=j.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const m=[];t[i]=m;for(let p=0;p<f.length;p++){const w=f[p];w!==ai&&l.push([w,R=>{m[p]=R}])}s(m);continue}else{const m={};t[i]=m;for(const p of Object.keys(f).reverse()){const w=[];l.push([f[p],R=>{w[1]=R}]),l.push([Number(p.slice(1)),R=>{w[0]=R}]),u.push(()=>{m[w[0]]=w[1]})}s(m);continue}}for(;u.length>0;)u.pop()();return o}async function Ri(e,t){const{plugins:r}=t??{},n=new jn,a=e.pipeThrough(Ei()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},l=await bi.call(o,a);let u=n.promise;return l.done?n.resolve():u=Si.call(o,a).then(n.resolve).catch(i=>{for(const s of Object.values(o.deferred))s.reject(i);n.reject(i)}),{done:u.then(()=>a.closed),value:l.value}}async function bi(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch{throw new SyntaxError}return{done:t.done,value:nr.call(this,r)}}async function Si(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case Fn:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const l=r.slice(n+1);let u;try{u=JSON.parse(l)}catch{throw new SyntaxError}const i=nr.call(this,u);o.resolve(i);break}case In:{const n=r.indexOf(":"),a=Number(r.slice(1,n)),o=this.deferred[a];if(!o)throw new Error(`Deferred ID ${a} not found in stream`);const l=r.slice(n+1);let u;try{u=JSON.parse(l)}catch{throw new SyntaxError}const i=nr.call(this,u);o.reject(i);break}default:throw new SyntaxError}t=await e.read()}}async function xi(e){let t={signal:e.signal};if(e.method!=="GET"){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}function sn(e){return{__html:e}}function he(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}var ar=Symbol("SingleFetchRedirect"),Hn=class extends Error{},Ci=202,Li=new Set([100,101,204,205]);function Dl(e,t,r,n,a){let o=Pi(e,l=>{let u=t.routes[l.route.id];he(u,"Route not found in manifest");let i=r[l.route.id];return{hasLoader:u.hasLoader,hasClientLoader:u.hasClientLoader,hasShouldRevalidate:!!i?.shouldRevalidate}},Ai,n,a);return async l=>l.unstable_runClientMiddleware(o)}function Pi(e,t,r,n,a,o=()=>!0){return async l=>{let{request:u,matches:i,fetcherKey:s}=l,f=e();if(u.method!=="GET")return Ti(l,r,a);let m=i.some(p=>{let{hasLoader:w,hasClientLoader:R}=t(p);return p.unstable_shouldCallHandler()&&w&&!R});return!n&&!m?Mi(l,t,r,a):s?ki(l,r,a):_i(l,f,t,r,n,a,o)}}async function Ti(e,t,r){let n=e.matches.find(l=>l.unstable_shouldCallHandler());he(n,"No action match found");let a,o=await n.resolve(async l=>await l(async()=>{let{data:i,status:s}=await t(e,r,[n.route.id]);return a=s,lt(i,n.route.id)}));return dr(o.result)||ze(o.result)||tr(o.result)?{[n.route.id]:o}:{[n.route.id]:{type:o.type,result:Ka(o.result,a)}}}async function Mi(e,t,r,n){let a=e.matches.filter(l=>l.unstable_shouldCallHandler()),o={};return await Promise.all(a.map(l=>l.resolve(async u=>{try{let{hasClientLoader:i}=t(l),s=l.route.id,f=i?await u(async()=>{let{data:m}=await r(e,n,[s]);return lt(m,s)}):await u();o[l.route.id]={type:"data",result:f}}catch(i){o[l.route.id]={type:"error",result:i}}}))),o}async function _i(e,t,r,n,a,o,l=()=>!0){let u=new Set,i=!1,s=e.matches.map(()=>un()),f=un(),m={},p=Promise.all(e.matches.map(async(R,b)=>R.resolve(async S=>{s[b].resolve();let E=R.route.id,{hasLoader:_,hasClientLoader:P,hasShouldRevalidate:M}=r(R),L=!R.unstable_shouldRevalidateArgs||R.unstable_shouldRevalidateArgs.actionStatus==null||R.unstable_shouldRevalidateArgs.actionStatus<400;if(!R.unstable_shouldCallHandler(L)){i||(i=R.unstable_shouldRevalidateArgs!=null&&_&&M===!0);return}if(l(R)&&P){_&&(i=!0);try{let j=await S(async()=>{let{data:J}=await n(e,o,[E]);return lt(J,E)});m[E]={type:"data",result:j}}catch(j){m[E]={type:"error",result:j}}return}_&&u.add(E);try{let j=await S(async()=>{let J=await f.promise;return lt(J,E)});m[E]={type:"data",result:j}}catch(j){m[E]={type:"error",result:j}}})));if(await Promise.all(s.map(R=>R.promise)),(!t.state.initialized&&t.state.navigation.state==="idle"||u.size===0)&&!window.__reactRouterHdrActive)f.resolve({routes:{}});else{let R=a&&i&&u.size>0?[...u.keys()]:void 0;try{let b=await n(e,o,R);f.resolve(b.data)}catch(b){f.reject(b)}}return await p,await Di(f.promise,e.matches,u,m),m}async function Di(e,t,r,n){try{let a,o=await e;if("routes"in o){for(let l of t)if(l.route.id in o.routes){let u=o.routes[l.route.id];if("error"in u){a=u.error;break}}}a!==void 0&&Array.from(r.values()).forEach(l=>{n[l].result instanceof Hn&&(n[l].result=a)})}catch{}}async function ki(e,t,r){let n=e.matches.find(l=>l.unstable_shouldCallHandler());he(n,"No fetcher match found");let a=n.route.id,o=await n.resolve(async l=>l(async()=>{let{data:u}=await t(e,r,[a]);return lt(u,a)}));return{[n.route.id]:o}}function Oi(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function Un(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&me(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function Ai(e,t,r){let{request:n}=e,a=Un(n.url,t,"data");n.method==="GET"&&(a=Oi(a),r&&a.searchParams.set("_routes",r.join(",")));let o=await fetch(a,await xi(n));if(o.status===404&&!o.headers.has("X-Remix-Response"))throw new Ue(404,"Not Found",!0);if(o.status===204&&o.headers.has("X-Remix-Redirect"))return{status:Ci,data:{redirect:{redirect:o.headers.get("X-Remix-Redirect"),status:Number(o.headers.get("X-Remix-Status")||"302"),revalidate:o.headers.get("X-Remix-Revalidate")==="true",reload:o.headers.get("X-Remix-Reload-Document")==="true",replace:o.headers.get("X-Remix-Replace")==="true"}}};if(Li.has(o.status)){let l={};return r&&n.method!=="GET"&&(l[r[0]]={data:void 0}),{status:o.status,data:{routes:l}}}he(o.body,"No response body to decode");try{let l=await Ni(o.body,window),u;if(n.method==="GET"){let i=l.value;ar in i?u={redirect:i[ar]}:u={routes:i}}else{let i=l.value,s=r?.[0];he(s,"No routeId found for single fetch call decoding"),"redirect"in i?u={redirect:i}:u={routes:{[s]:i}}}return{status:o.status,data:u}}catch{throw new Error("Unable to decode turbo-stream response")}}function Ni(e,t){return Ri(e,{plugins:[(r,...n)=>{if(r==="SanitizedError"){let[a,o,l]=n,u=Error;a&&a in t&&typeof t[a]=="function"&&(u=t[a]);let i=new u(o);return i.stack=l,{value:i}}if(r==="ErrorResponse"){let[a,o,l]=n;return{value:new Ue(o,l,a)}}if(r==="SingleFetchRedirect")return{value:{[ar]:n[0]}};if(r==="SingleFetchClassInstance")return{value:n[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function lt(e,t){if("redirect"in e){let{redirect:n,revalidate:a,reload:o,replace:l,status:u}=e.redirect;throw qa(n,{status:u,headers:{...a?{"X-Remix-Revalidate":"yes"}:null,...o?{"X-Remix-Reload-Document":"yes"}:null,...l?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(r==null)throw new Hn(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function un(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}async function zn(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function $i(e,t,r){let n=e.map(o=>{let l=t[o.route.id],u=r.routes[o.route.id];return[u&&u.css?u.css.map(i=>({rel:"stylesheet",href:i})):[],l?.links?.()||[]]}).flat(2),a=wr(e,r);return Vn(n,a)}function Bn(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function Ii(e){if(!e.css)return;let t=Bn(e);await Promise.all(t.map(Yn))}async function Wn(e,t){if(!e.css&&!t.links||!zi())return;let r=[];if(e.css&&r.push(...Bn(e)),t.links&&r.push(...t.links()),r.length===0)return;let n=[];for(let a of r)!gr(a)&&a.rel==="stylesheet"&&n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(Yn))}async function Yn(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return t();let r=document.createElement("link");Object.assign(r,e);function n(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function gr(e){return e!=null&&typeof e.page=="string"}function Fi(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 ji(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let l=await zn(o,r);return l.links?l.links():[]}return[]}));return Vn(n.flat(1).filter(Fi).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function cn(e,t,r,n,a,o){let l=(i,s)=>r[s]?i.route.id!==r[s].route.id:!0,u=(i,s)=>r[s].pathname!==i.pathname||r[s].route.path?.endsWith("*")&&r[s].params["*"]!==i.params["*"];return o==="assets"?t.filter((i,s)=>l(i,s)||u(i,s)):o==="data"?t.filter((i,s)=>{let f=n.routes[i.route.id];if(!f||!f.hasLoader)return!1;if(l(i,s)||u(i,s))return!0;if(i.route.shouldRevalidate){let m=i.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:i.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function wr(e,t,{includeHydrateFallback:r}={}){return Hi(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function Hi(e){return[...new Set(e)]}function Ui(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function Vn(e,t){let r=new Set,n=new Set(t);return e.reduce((a,o)=>{if(t&&!gr(o)&&o.as==="script"&&o.href&&n.has(o.href))return a;let u=JSON.stringify(Ui(o));return r.has(u)||(r.add(u),a.push({key:u,link:o})),a},[])}var Et;function zi(){if(Et!==void 0)return Et;let e=document.createElement("link");return Et=e.relList.supports("preload"),e=null,Et}function Bi(){return d.createElement(or,{title:"Loading...",renderScripts:!0},d.createElement("script",{dangerouslySetInnerHTML:{__html:`
31
- console.log(
32
- "💿 Hey developer 👋. You can provide a way better UX than this " +
33
- "when your app is loading JS modules and/or running \`clientLoader\` " +
34
- "functions. Check out https://reactrouter.com/start/framework/route-module#hydratefallback " +
35
- "for more information."
36
- );
37
- `}}))}function Jn(e){let t={};return Object.values(e).forEach(r=>{if(r){let n=r.parentId||"";t[n]||(t[n]=[]),t[n].push(r)}}),t}function Wi(e,t,r){let n=Gn(t),a=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?Bi:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>d.createElement(qn,{error:vr()}):void 0;return e.id==="root"&&t.Layout?{...n?{element:d.createElement(t.Layout,null,d.createElement(n,null))}:{Component:n},...o?{errorElement:d.createElement(t.Layout,null,d.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:d.createElement(t.Layout,null,d.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function kl(e,t,r,n,a,o){return Er(t,r,n,a,o,"",Jn(t),e)}function Rt(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let n=`You are trying to call ${e==="action"?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw console.error(n),new Ue(400,"Bad Request",new Error(n),!0)}}function Xt(e,t){let r=e==="clientAction"?"a":"an",n=`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`;throw console.error(n),new Ue(405,"Method Not Allowed",new Error(n),!0)}function Er(e,t,r,n,a,o="",l=Jn(e),u){return(l[o]||[]).map(i=>{let s=t[i.id];function f(_){return he(typeof _=="function","No single fetch function available for route handler"),_()}function m(_){return i.hasLoader?f(_):Promise.resolve(null)}function p(_){if(!i.hasAction)throw Xt("action",i.id);return f(_)}function w(_){import(_)}function R(_){_.clientActionModule&&w(_.clientActionModule),_.clientLoaderModule&&w(_.clientLoaderModule)}async function b(_){let P=t[i.id],M=P?Wn(i,P):Promise.resolve();try{return _()}finally{await M}}let S={id:i.id,index:i.index,path:i.path};if(s){Object.assign(S,{...S,...Wi(i,s,a),unstable_middleware:s.unstable_clientMiddleware,handle:s.handle,shouldRevalidate:dn(S.path,s,i,n,u)});let _=r&&r.loaderData&&i.id in r.loaderData,P=_?r?.loaderData?.[i.id]:void 0,M=r&&r.errors&&i.id in r.errors,L=M?r?.errors?.[i.id]:void 0,y=u==null&&(s.clientLoader?.hydrate===!0||!i.hasLoader);S.loader=async({request:j,params:J,context:U},q)=>{try{return await b(async()=>(he(s,"No `routeModule` available for critical-route loader"),s.clientLoader?s.clientLoader({request:j,params:J,context:U,async serverLoader(){if(Rt("loader",i),y){if(_)return P;if(M)throw L}return m(q)}}):m(q)))}finally{y=!1}},S.loader.hydrate=Ji(i.id,s.clientLoader,i.hasLoader,a),S.action=({request:j,params:J,context:U},q)=>b(async()=>{if(he(s,"No `routeModule` available for critical-route action"),!s.clientAction){if(a)throw Xt("clientAction",i.id);return p(q)}return s.clientAction({request:j,params:J,context:U,async serverAction(){return Rt("action",i),p(q)}})})}else{i.hasClientLoader||(S.loader=(M,L)=>b(()=>m(L))),i.hasClientAction||(S.action=(M,L)=>b(()=>{if(a)throw Xt("clientAction",i.id);return p(L)}));let _;async function P(){return _?await _:(_=(async()=>{(i.clientLoaderModule||i.clientActionModule)&&await new Promise(L=>setTimeout(L,0));let M=Vi(i,t);return R(i),await M})(),await _)}S.lazy={loader:i.hasClientLoader?async()=>{let{clientLoader:M}=i.clientLoaderModule?await import(i.clientLoaderModule):await P();return he(M,"No `clientLoader` export found"),(L,y)=>M({...L,async serverLoader(){return Rt("loader",i),m(y)}})}:void 0,action:i.hasClientAction?async()=>{let M=i.clientActionModule?import(i.clientActionModule):P();R(i);let{clientAction:L}=await M;return he(L,"No `clientAction` export found"),(y,j)=>L({...y,async serverAction(){return Rt("action",i),p(j)}})}:void 0,unstable_middleware:i.hasClientMiddleware?async()=>{let{unstable_clientMiddleware:M}=i.clientMiddlewareModule?await import(i.clientMiddlewareModule):await P();return he(M,"No `unstable_clientMiddleware` export found"),M}:void 0,shouldRevalidate:async()=>{let M=await P();return dn(S.path,M,i,n,u)},handle:async()=>(await P()).handle,Component:async()=>(await P()).Component,ErrorBoundary:i.hasErrorBoundary?async()=>(await P()).ErrorBoundary:void 0}}let E=Er(e,t,r,n,a,i.id,l,u);return E.length>0&&(S.children=E),S})}function dn(e,t,r,n,a){if(a)return Yi(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let o=e?gn(e)[1].map(u=>u.paramName):[];const l=u=>o.some(i=>u.currentParams[i]!==u.nextParams[i]);if(t.shouldRevalidate){let u=t.shouldRevalidate;return i=>u({...i,defaultShouldRevalidate:l(i)})}else return u=>l(u)}if(n&&t.shouldRevalidate){let o=t.shouldRevalidate;return l=>o({...l,defaultShouldRevalidate:!0})}return t.shouldRevalidate}function Yi(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}async function Vi(e,t){let r=zn(e,t),n=Ii(e),a=await r;return await Promise.all([n,Wn(e,a)]),{Component:Gn(a),ErrorBoundary:a.ErrorBoundary,unstable_clientMiddleware:a.unstable_clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}function Gn(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Ji(e,t,r,n){return n&&e!=="root"||t!=null&&(t.hydrate===!0||r!==!0)}var Pt=new Set,Gi=1e3,Dt=new Set,Xi=7680;function Rr(e,t){return e.mode==="lazy"&&t===!0}function Ki({sri:e,...t},r){let n=new Set(r.state.matches.map(u=>u.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(u=>{let i=Te(r.routes,u,r.basename);i&&i.forEach(s=>n.add(s.route.id))});let l=[...n].reduce((u,i)=>Object.assign(u,{[i]:t.routes[i]}),{});return{...t,routes:l,sri:e?!0:void 0}}function Ol(e,t,r,n,a,o){if(Rr(n,r))return async({path:l,patch:u,signal:i,fetcherKey:s})=>{Dt.has(l)||await Xn([l],s?window.location.href:l,e,t,r,a,o,n.manifestPath,u,i)}}function Al(e,t,r,n,a,o){d.useEffect(()=>{if(!Rr(a,n)||window.navigator?.connection?.saveData===!0)return;function l(f){let m=f.tagName==="FORM"?f.getAttribute("action"):f.getAttribute("href");if(!m)return;let p=f.tagName==="A"?f.pathname:new URL(m,window.location.origin).pathname;Dt.has(p)||Pt.add(p)}async function u(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(l);let f=Array.from(Pt.keys()).filter(m=>Dt.has(m)?(Pt.delete(m),!1):!0);if(f.length!==0)try{await Xn(f,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(m){console.error("Failed to fetch manifest patches",m)}}let i=Zi(u,100);u();let s=new MutationObserver(()=>i());return s.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>s.disconnect()},[n,o,t,r,e,a])}function qi(e,t){let r=e||"/__manifest";return t==null?r:`${t}${r}`.replace(/\/+/g,"/")}var Kt="react-router-manifest-version";async function Xn(e,t,r,n,a,o,l,u,i,s){let f=new URL(qi(u,l),window.location.origin);if(e.sort().forEach(b=>f.searchParams.append("p",b)),f.searchParams.set("version",r.version),f.toString().length>Xi){Pt.clear();return}let m;try{let b=await fetch(f,{signal:s});if(b.ok){if(b.status===204&&b.headers.has("X-Remix-Reload-Document")){if(!t){console.warn("Detected a manifest version mismatch during eager route discovery. The next navigation/fetch to an undiscovered route will result in a new document navigation to sync up with the latest manifest.");return}if(sessionStorage.getItem(Kt)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}sessionStorage.setItem(Kt,r.version),window.location.href=t,console.warn("Detected manifest version mismatch, reloading..."),await new Promise(()=>{})}else if(b.status>=400)throw new Error(await b.text())}else throw new Error(`${b.status} ${b.statusText}`);sessionStorage.removeItem(Kt),m=await b.json()}catch(b){if(s?.aborted)return;throw b}let p=new Set(Object.keys(r.routes)),w=Object.values(m).reduce((b,S)=>(S&&!p.has(S.id)&&(b[S.id]=S),b),{});Object.assign(r.routes,w),e.forEach(b=>Qi(b,Dt));let R=new Set;Object.values(w).forEach(b=>{b&&(!b.parentId||!w[b.parentId])&&R.add(b.parentId)}),R.forEach(b=>i(b||null,Er(w,n,null,a,o,b)))}function Qi(e,t){if(t.size>=Gi){let r=t.values().next().value;t.delete(r)}t.add(e)}function Zi(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}function br(){let e=d.useContext(Be);return he(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function At(){let e=d.useContext(Ge);return he(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Nt=d.createContext(void 0);Nt.displayName="FrameworkContext";function Ke(){let e=d.useContext(Nt);return he(e,"You must render this element inside a <HydratedRouter> element"),e}function el(e,t){let r=d.useContext(Nt),[n,a]=d.useState(!1),[o,l]=d.useState(!1),{onFocus:u,onBlur:i,onMouseEnter:s,onMouseLeave:f,onTouchStart:m}=t,p=d.useRef(null);d.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let b=E=>{E.forEach(_=>{l(_.isIntersecting)})},S=new IntersectionObserver(b,{threshold:.5});return p.current&&S.observe(p.current),()=>{S.disconnect()}}},[e]),d.useEffect(()=>{if(n){let b=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(b)}}},[n]);let w=()=>{a(!0)},R=()=>{a(!1),l(!1)};return r?e!=="intent"?[o,p,{}]:[o,p,{onFocus:nt(u,w),onBlur:nt(i,R),onMouseEnter:nt(s,w),onMouseLeave:nt(f,R),onTouchStart:nt(m,w)}]:[!1,p,{}]}function nt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Sr(e,t,r){if(r&&!Tt)return[e[0]];if(t){let n=e.findIndex(a=>t[a.route.id]!==void 0);return e.slice(0,n+1)}return e}var fn="data-react-router-critical-css";function Nl(){let{isSpaMode:e,manifest:t,routeModules:r,criticalCss:n}=Ke(),{errors:a,matches:o}=At(),l=Sr(o,a,e),u=d.useMemo(()=>$i(l,r,t),[l,r,t]);return d.createElement(d.Fragment,null,typeof n=="string"?d.createElement("style",{[fn]:"",dangerouslySetInnerHTML:{__html:n}}):null,typeof n=="object"?d.createElement("link",{[fn]:"",rel:"stylesheet",href:n.href}):null,u.map(({key:i,link:s})=>gr(s)?d.createElement(Kn,{key:i,...s}):d.createElement("link",{key:i,...s})))}function Kn({page:e,...t}){let{router:r}=br(),n=d.useMemo(()=>Te(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?d.createElement(rl,{page:e,matches:n,...t}):null}function tl(e){let{manifest:t,routeModules:r}=Ke(),[n,a]=d.useState([]);return d.useEffect(()=>{let o=!1;return ji(e,t,r).then(l=>{o||a(l)}),()=>{o=!0}},[e,t,r]),n}function rl({page:e,matches:t,...r}){let n=Le(),{manifest:a,routeModules:o}=Ke(),{basename:l}=br(),{loaderData:u,matches:i}=At(),s=d.useMemo(()=>cn(e,t,i,a,n,"data"),[e,t,i,a,n]),f=d.useMemo(()=>cn(e,t,i,a,n,"assets"),[e,t,i,a,n]),m=d.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let R=new Set,b=!1;if(t.forEach(E=>{let _=a.routes[E.route.id];!_||!_.hasLoader||(!s.some(P=>P.route.id===E.route.id)&&E.route.id in u&&o[E.route.id]?.shouldRevalidate||_.hasClientLoader?b=!0:R.add(E.route.id))}),R.size===0)return[];let S=Un(e,l,"data");return b&&R.size>0&&S.searchParams.set("_routes",t.filter(E=>R.has(E.route.id)).map(E=>E.route.id).join(",")),[S.pathname+S.search]},[l,u,n,a,s,t,e,o]),p=d.useMemo(()=>wr(f,a),[f,a]),w=tl(f);return d.createElement(d.Fragment,null,m.map(R=>d.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...r})),p.map(R=>d.createElement("link",{key:R,rel:"modulepreload",href:R,...r})),w.map(({key:R,link:b})=>d.createElement("link",{key:R,...b})))}function $l(){let{isSpaMode:e,routeModules:t}=Ke(),{errors:r,matches:n,loaderData:a}=At(),o=Le(),l=Sr(n,r,e),u=null;r&&(u=r[l[l.length-1].route.id]);let i=[],s=null,f=[];for(let m=0;m<l.length;m++){let p=l[m],w=p.route.id,R=a[w],b=p.params,S=t[w],E=[],_={id:w,data:R,meta:[],params:p.params,pathname:p.pathname,handle:p.route.handle,error:u};if(f[m]=_,S?.meta?E=typeof S.meta=="function"?S.meta({data:R,params:b,location:o,matches:f,error:u}):Array.isArray(S.meta)?[...S.meta]:S.meta:s&&(E=[...s]),E=E||[],!Array.isArray(E))throw new Error("The route at "+p.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
38
-
39
- To reference the meta function API, see https://remix.run/route/meta`);_.meta=E,f[m]=_,i=[...E],s=i}return d.createElement(d.Fragment,null,i.flat().map(m=>{if(!m)return null;if("tagName"in m){let{tagName:p,...w}=m;if(!nl(p))return console.warn(`A meta object uses an invalid tagName: ${p}. Expected either 'link' or 'meta'`),null;let R=p;return d.createElement(R,{key:JSON.stringify(w),...w})}if("title"in m)return d.createElement("title",{key:"title"},String(m.title));if("charset"in m&&(m.charSet??(m.charSet=m.charset),delete m.charset),"charSet"in m&&m.charSet!=null)return typeof m.charSet=="string"?d.createElement("meta",{key:"charSet",charSet:m.charSet}):null;if("script:ld+json"in m)try{let p=JSON.stringify(m["script:ld+json"]);return d.createElement("script",{key:`script:ld+json:${p}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:p}})}catch{return null}return d.createElement("meta",{key:JSON.stringify(m),...m})}))}function nl(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Tt=!1;function al(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:l}=Ke(),{router:u,static:i,staticContext:s}=br(),{matches:f}=At(),m=Lo(),p=Rr(o,l);a&&(a.didRenderScripts=!0);let w=Sr(f,null,n);d.useEffect(()=>{Tt=!0},[]);let R=d.useMemo(()=>{if(m)return null;let _=s?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",P=i?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${p?"":`import ${JSON.stringify(t.url)}`};
40
- ${w.map((M,L)=>{let y=`route${L}`,j=t.routes[M.route.id];he(j,`Route ${M.route.id} not found in manifest`);let{clientActionModule:J,clientLoaderModule:U,clientMiddlewareModule:q,hydrateFallbackModule:le,module:pe}=j,X=[...J?[{module:J,varName:`${y}_clientAction`}]:[],...U?[{module:U,varName:`${y}_clientLoader`}]:[],...q?[{module:q,varName:`${y}_clientMiddleware`}]:[],...le?[{module:le,varName:`${y}_HydrateFallback`}]:[],{module:pe,varName:`${y}_main`}];if(X.length===1)return`import * as ${y} from ${JSON.stringify(pe)};`;let Q=X.map(Y=>`import * as ${Y.varName} from "${Y.module}";`).join(`
41
- `),ae=`const ${y} = {${X.map(Y=>`...${Y.varName}`).join(",")}};`;return[Q,ae].join(`
42
- `)}).join(`
43
- `)}
44
- ${p?`window.__reactRouterManifest = ${JSON.stringify(Ki(t,u),null,2)};`:""}
45
- window.__reactRouterRouteModules = {${w.map((M,L)=>`${JSON.stringify(M.route.id)}:route${L}`).join(",")}};
46
-
47
- import(${JSON.stringify(t.entry.module)});`:" ";return d.createElement(d.Fragment,null,d.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:sn(_),type:void 0}),d.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:sn(P),type:"module",async:!0}))},[]),b=Tt||m?[]:ol(t.entry.imports.concat(wr(w,t,{includeHydrateFallback:!0}))),S=typeof t.sri=="object"?t.sri:{};return rr(!m,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),Tt||m?null:d.createElement(d.Fragment,null,typeof t.sri=="object"?d.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:S})}}):null,p?null:d.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:S[t.url],suppressHydrationWarning:!0}),d.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:S[t.entry.module],suppressHydrationWarning:!0}),b.map(E=>d.createElement("link",{key:E,rel:"modulepreload",href:E,crossOrigin:e.crossOrigin,integrity:S[E],suppressHydrationWarning:!0})),R)}function ol(e){return[...new Set(e)]}function il(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Il=class extends d.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?d.createElement(qn,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function qn({error:e,isOutsideRemixApp:t}){console.error(e);let r=d.createElement("script",{dangerouslySetInnerHTML:{__html:`
48
- console.log(
49
- "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."
50
- );
51
- `}});if(ze(e))return d.createElement(or,{title:"Unhandled Thrown Response!"},d.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let n;if(e instanceof Error)n=e;else{let a=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);n=new Error(a)}return d.createElement(or,{title:"Application Error!",isOutsideRemixApp:t},d.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),d.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),r)}function or({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:a}=Ke();return a.root?.Layout&&!r?n:d.createElement("html",{lang:"en"},d.createElement("head",null,d.createElement("meta",{charSet:"utf-8"}),d.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),d.createElement("title",null,e)),d.createElement("body",null,d.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?d.createElement(al,null):null)))}var Qn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Qn&&(window.__reactRouterVersion="7.7.0")}catch{}var Zn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ea=d.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:l,state:u,target:i,to:s,preventScrollReset:f,viewTransition:m,...p},w){let{basename:R}=d.useContext(Re),b=typeof s=="string"&&Zn.test(s),S,E=!1;if(typeof s=="string"&&b&&(S=s,Qn))try{let U=new URL(window.location.href),q=s.startsWith("//")?new URL(U.protocol+s):new URL(s),le=me(q.pathname,R);q.origin===U.origin&&le!=null?s=le+q.search+q.hash:E=!0}catch{ne(!1,`<Link to="${s}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let _=To(s,{relative:a}),[P,M,L]=el(n,p),y=dl(s,{replace:l,state:u,target:i,preventScrollReset:f,relative:a,viewTransition:m});function j(U){t&&t(U),U.defaultPrevented||y(U)}let J=d.createElement("a",{...p,...L,href:S||_,onClick:E||o?t:j,ref:il(w,M),target:i,"data-discover":!b&&r==="render"?"true":void 0});return P&&!b?d.createElement(d.Fragment,null,J,d.createElement(Kn,{page:_})):J});ea.displayName="Link";var ll=d.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:l,viewTransition:u,children:i,...s},f){let m=ut(l,{relative:s.relative}),p=Le(),w=d.useContext(Ge),{navigator:R,basename:b}=d.useContext(Re),S=w!=null&&gl(m)&&u===!0,E=R.encodeLocation?R.encodeLocation(m).pathname:m.pathname,_=p.pathname,P=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(_=_.toLowerCase(),P=P?P.toLowerCase():null,E=E.toLowerCase()),P&&b&&(P=me(P,b)||P);const M=E!=="/"&&E.endsWith("/")?E.length-1:E.length;let L=_===E||!a&&_.startsWith(E)&&_.charAt(M)==="/",y=P!=null&&(P===E||!a&&P.startsWith(E)&&P.charAt(E.length)==="/"),j={isActive:L,isPending:y,isTransitioning:S},J=L?t:void 0,U;typeof n=="function"?U=n(j):U=[n,L?"active":null,y?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let q=typeof o=="function"?o(j):o;return d.createElement(ea,{...s,"aria-current":J,className:U,ref:f,style:q,to:l,viewTransition:u},typeof i=="function"?i(j):i)});ll.displayName="NavLink";var sl=d.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:l=Ct,action:u,onSubmit:i,relative:s,preventScrollReset:f,viewTransition:m,...p},w)=>{let R=ml(),b=pl(u,{relative:s}),S=l.toLowerCase()==="get"?"get":"post",E=typeof u=="string"&&Zn.test(u),_=P=>{if(i&&i(P),P.defaultPrevented)return;P.preventDefault();let M=P.nativeEvent.submitter,L=M?.getAttribute("formmethod")||l;R(M||P.currentTarget,{fetcherKey:t,method:L,navigate:r,replace:a,state:o,relative:s,preventScrollReset:f,viewTransition:m})};return d.createElement("form",{ref:w,method:S,action:b,onSubmit:n?i:_,...p,"data-discover":!E&&e==="render"?"true":void 0})});sl.displayName="Form";function ul({getKey:e,storageKey:t,...r}){let n=d.useContext(Nt),{basename:a}=d.useContext(Re),o=Le(),l=yr();yl({getKey:e,storageKey:t});let u=d.useMemo(()=>{if(!n||!e)return null;let s=lr(o,l,a,e);return s!==o.key?s:null},[]);if(!n||n.isSpaMode)return null;let i=((s,f)=>{if(!window.history.state||!window.history.state.key){let m=Math.random().toString(32).slice(2);window.history.replaceState({key:m},"")}try{let p=JSON.parse(sessionStorage.getItem(s)||"{}")[f||window.history.state.key];typeof p=="number"&&window.scrollTo(0,p)}catch(m){console.error(m),sessionStorage.removeItem(s)}}).toString();return d.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${i})(${JSON.stringify(t||ir)}, ${JSON.stringify(u)})`}})}ul.displayName="ScrollRestoration";function ta(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xr(e){let t=d.useContext(Be);return V(t,ta(e)),t}function cl(e){let t=d.useContext(Ge);return V(t,ta(e)),t}function dl(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:l}={}){let u=Mo(),i=Le(),s=ut(e,{relative:o});return d.useCallback(f=>{if(ei(f,t)){f.preventDefault();let m=r!==void 0?r:Oe(i)===Oe(s);u(e,{replace:m,state:n,preventScrollReset:a,relative:o,viewTransition:l})}},[i,u,s,r,n,t,e,a,o,l])}var fl=0,hl=()=>`__${String(++fl)}__`;function ml(){let{router:e}=xr("useSubmit"),{basename:t}=d.useContext(Re),r=Ho();return d.useCallback(async(n,a={})=>{let{action:o,method:l,encType:u,formData:i,body:s}=ni(n,t);if(a.navigate===!1){let f=a.fetcherKey||hl();await e.fetch(f,r,a.action||o,{preventScrollReset:a.preventScrollReset,formData:i,body:s,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:i,body:s,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function pl(e,{relative:t}={}){let{basename:r}=d.useContext(Re),n=d.useContext(be);V(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...ut(e||".",{relative:t})},l=Le();if(e==null){o.search=l.search;let u=new URLSearchParams(o.search),i=u.getAll("index");if(i.some(f=>f==="")){u.delete("index"),i.filter(m=>m).forEach(m=>u.append("index",m));let f=u.toString();o.search=f?`?${f}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:Ce([r,o.pathname])),Oe(o)}var ir="react-router-scroll-positions",bt={};function lr(e,t,r,n){let a=null;return n&&(r!=="/"?a=n({...e,pathname:me(e.pathname,r)||e.pathname},t):a=n(e,t)),a==null&&(a=e.key),a}function yl({getKey:e,storageKey:t}={}){let{router:r}=xr("useScrollRestoration"),{restoreScrollPosition:n,preventScrollReset:a}=cl("useScrollRestoration"),{basename:o}=d.useContext(Re),l=Le(),u=yr(),i=Uo();d.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),vl(d.useCallback(()=>{if(i.state==="idle"){let s=lr(l,u,o,e);bt[s]=window.scrollY}try{sessionStorage.setItem(t||ir,JSON.stringify(bt))}catch(s){ne(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${s}).`)}window.history.scrollRestoration="auto"},[i.state,e,o,l,u,t])),typeof document<"u"&&(d.useLayoutEffect(()=>{try{let s=sessionStorage.getItem(t||ir);s&&(bt=JSON.parse(s))}catch{}},[t]),d.useLayoutEffect(()=>{let s=r?.enableScrollRestoration(bt,()=>window.scrollY,e?(f,m)=>lr(f,m,o,e):void 0);return()=>s&&s()},[r,o,e]),d.useLayoutEffect(()=>{if(n!==!1){if(typeof n=="number"){window.scrollTo(0,n);return}try{if(l.hash){let s=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(s){s.scrollIntoView();return}}}catch{ne(!1,`"${l.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}a!==!0&&window.scrollTo(0,0)}},[l,n,a]))}function vl(e,t){let{capture:r}={};d.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function gl(e,t={}){let r=d.useContext(hr);V(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=xr("useViewTransitionState"),a=ut(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=me(r.currentLocation.pathname,n)||r.currentLocation.pathname,l=me(r.nextLocation.pathname,n)||r.nextLocation.pathname;return Mt(a.pathname,l)!=null||Mt(a.pathname,o)!=null}export{xl as A,Rl as B,va as C,wl as D,Ue as E,Nt as F,Nl as L,$l as M,Li as N,Tl as O,ba as R,ul as S,d as a,V as b,Il as c,Pl as d,Ni as e,Er as f,Sl as g,Ol as h,ze as i,Dl as j,bl as k,kl as l,Te as m,Cl as n,Ll as o,El as p,_l as q,Ra as r,Ji as s,al as t,Al as u,Mo as v,Ml as w,ea as x,ll as y,Le as z};
@@ -1,6 +0,0 @@
1
- import{c}from"./createLucideIcon-BweVylaW.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],r=c("circle-check",e);export{r as C};
@@ -1,6 +0,0 @@
1
- import{R as f,a as _,p as z}from"./chunk-EF7DTUVF-CaKisB5m.js";import{b as Qe,B as sn}from"./button-CLU225WL.js";import{a as W}from"./utils-CZqhhZtB.js";import{c as cn}from"./createLucideIcon-BweVylaW.js";import{C as un}from"./chevron-right-haBQNeuE.js";import{C as dn}from"./chevron-down-CtNmiOMb.js";import{R as ln,T as fn,P as hn,C as mn}from"./index-DWHslogn.js";import{X as yn}from"./x-BI8YVnoZ.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const gn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],pn=cn("chevron-left",gn),wn={},me={};function ye(e,t){try{const r=(wn[e]||=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format)(t).split("GMT")[1]||"";return r in me?me[r]:Xe(r,r.split(":"))}catch{if(e in me)return me[e];const n=e?.match(bn);return n?Xe(e,n.slice(1)):NaN}}const bn=/([+-]\d\d):?(\d\d)?/;function Xe(e,t){const n=+t[0],r=+(t[1]||0);return me[e]=n>0?n*60+r:n*60-r}class K extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(ye(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),it(this),He(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new K(...n,t):new K(Date.now(),t)}withTimeZone(t){return new K(+this,t)}getTimezoneOffset(){return-ye(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),He(this),+this}[Symbol.for("constructDateFrom")](t){return new K(+new Date(t),this.timeZone)}}const Ve=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ve.test(e))return;const t=e.replace(Ve,"$1UTC");K.prototype[t]&&(e.startsWith("get")?K.prototype[e]=function(){return this.internal[t]()}:(K.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),kn(this),+this},K.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),He(this),+this}))});function He(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function kn(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),it(e)}function it(e){const t=ye(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=ye(e.timeZone,e),l=-new Date(+e).getTimezoneOffset()-c,u=c!==t,h=l-s;if(u&&h){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+h);const g=ye(e.timeZone,e),p=c-g;p&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+p),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p))}}class j extends K{static tz(t,...n){return n.length?new j(...n,t):new j(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t?.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Mn(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:n?.timeZone||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new j(+this,t)}[Symbol.for("constructDateFrom")](t){return new j(+new Date(t),this.timeZone)}}function Mn(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var m;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(m||(m={}));var F;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(F||(F={}));var Q;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Q||(Q={}));var R;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(R||(R={}));const ct=6048e5,Dn=864e5,Ke=Symbol.for("constructDateFrom");function B(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ke in e?e[Ke](t):e instanceof Date?new e.constructor(t):new Date(t)}function T(e,t){return B(t||e,e)}function ut(e,t,n){const r=T(e,n?.in);return isNaN(t)?B(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function dt(e,t,n){const r=T(e,n?.in);if(isNaN(t))return B(e,NaN);if(!t)return r;const o=r.getDate(),a=B(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let vn={};function we(){return vn}function de(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=T(e,t?.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function ge(e,t){return de(e,{...t,weekStartsOn:1})}function lt(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=B(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=ge(o),i=B(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=ge(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ue(e){const t=T(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 le(e,...t){const n=B.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function pe(e,t){const n=T(e,t?.in);return n.setHours(0,0,0,0),n}function ft(e,t,n){const[r,o]=le(n?.in,e,t),a=pe(r),i=pe(o),s=+a-Ue(a),c=+i-Ue(i);return Math.round((s-c)/Dn)}function On(e,t){const n=lt(e,t),r=B(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),ge(r)}function Wn(e,t,n){return ut(e,t*7,n)}function Cn(e,t,n){return dt(e,t*12,n)}function xn(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=B.bind(null,o));const a=T(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),B(r,n||NaN)}function Sn(e,t){let n,r=t?.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=B.bind(null,o));const a=T(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),B(r,n||NaN)}function Nn(e,t,n){const[r,o]=le(n?.in,e,t);return+pe(r)==+pe(o)}function ht(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function _n(e){return!(!ht(e)&&typeof e!="number"||isNaN(+T(e)))}function Tn(e,t,n){const[r,o]=le(n?.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Yn(e,t){const n=T(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function En(e,t){const[n,r]=le(e,t.start,t.end);return{start:n,end:r}}function Pn(e,t){const{start:n,end:r}=En(t?.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(B(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Fn(e,t){const n=T(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Bn(e,t){const n=T(e,t?.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function mt(e,t){const n=T(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function yt(e,t){const n=we(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,o=T(e,t?.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function In(e,t){return yt(e,{...t,weekStartsOn:1})}const Hn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jn=(e,t,n)=>{let r;const o=Hn[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Pe(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const qn={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},An={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},zn={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rn={date:Pe({formats:qn,defaultWidth:"full"}),time:Pe({formats:An,defaultWidth:"full"}),dateTime:Pe({formats:zn,defaultWidth:"full"})},$n={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Gn=(e,t,n,r)=>$n[e];function fe(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const i=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const Zn={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ln={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Qn={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xn={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Vn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Kn={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Un=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Jn={ordinalNumber:Un,era:fe({values:Zn,defaultWidth:"wide"}),quarter:fe({values:Ln,defaultWidth:"wide",argumentCallback:e=>e-1}),month:fe({values:Qn,defaultWidth:"wide"}),day:fe({values:Xn,defaultWidth:"wide"}),dayPeriod:fe({values:Vn,defaultWidth:"wide",formattingValues:Kn,defaultFormattingWidth:"wide"})};function he(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?tr(s,u=>u.test(i)):er(s,u=>u.test(i));let d;d=e.valueCallback?e.valueCallback(c):c,d=n.valueCallback?n.valueCallback(d):d;const l=t.slice(i.length);return{value:d,rest:l}}}function er(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function tr(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function nr(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const rr=/^(\d+)(th|st|nd|rd)?/i,or=/\d+/i,ar={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},sr={any:[/^b/i,/^(a|c)/i]},ir={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cr={any:[/1/i,/2/i,/3/i,/4/i]},ur={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},dr={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},lr={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},fr={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},hr={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},mr={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},yr={ordinalNumber:nr({matchPattern:rr,parsePattern:or,valueCallback:e=>parseInt(e,10)}),era:he({matchPatterns:ar,defaultMatchWidth:"wide",parsePatterns:sr,defaultParseWidth:"any"}),quarter:he({matchPatterns:ir,defaultMatchWidth:"wide",parsePatterns:cr,defaultParseWidth:"any",valueCallback:e=>e+1}),month:he({matchPatterns:ur,defaultMatchWidth:"wide",parsePatterns:dr,defaultParseWidth:"any"}),day:he({matchPatterns:lr,defaultMatchWidth:"wide",parsePatterns:fr,defaultParseWidth:"any"}),dayPeriod:he({matchPatterns:hr,defaultMatchWidth:"any",parsePatterns:mr,defaultParseWidth:"any"})},je={code:"en-US",formatDistance:jn,formatLong:Rn,formatRelative:Gn,localize:Jn,match:yr,options:{weekStartsOn:0,firstWeekContainsDate:1}};function gr(e,t){const n=T(e,t?.in);return ft(n,mt(n))+1}function gt(e,t){const n=T(e,t?.in),r=+ge(n)-+On(n);return Math.round(r/ct)+1}function pt(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=we(),a=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,i=B(t?.in||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=de(i,t),c=B(t?.in||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const d=de(c,t);return+n>=+s?r+1:+n>=+d?r:r-1}function pr(e,t){const n=we(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,o=pt(e,t),a=B(t?.in||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),de(a,t)}function wt(e,t){const n=T(e,t?.in),r=+de(n,t)-+pr(n,t);return Math.round(r/ct)+1}function N(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const oe={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return N(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):N(n+1,2)},d(e,t){return N(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return N(e.getHours()%12||12,t.length)},H(e,t){return N(e.getHours(),t.length)},m(e,t){return N(e.getMinutes(),t.length)},s(e,t){return N(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return N(o,t.length)}},ue={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Je={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return oe.y(e,t)},Y:function(e,t,n,r){const o=pt(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return N(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):N(a,t.length)},R:function(e,t){const n=lt(e);return N(n,t.length)},u:function(e,t){const n=e.getFullYear();return N(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return N(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return N(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return oe.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return N(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=wt(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):N(o,t.length)},I:function(e,t,n){const r=gt(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):N(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):oe.d(e,t)},D:function(e,t,n){const r=gr(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):N(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return N(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return N(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return N(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=ue.noon:r===0?o=ue.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=ue.evening:r>=12?o=ue.afternoon:r>=4?o=ue.morning:o=ue.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return oe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):oe.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):oe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):oe.s(e,t)},S:function(e,t){return oe.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tt(r);case"XXXX":case"XX":return ae(r);case"XXXXX":case"XXX":default:return ae(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tt(r);case"xxxx":case"xx":return ae(r);case"xxxxx":case"xxx":default:return ae(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+et(r,":");case"OOOO":default:return"GMT"+ae(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+et(r,":");case"zzzz":default:return"GMT"+ae(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return N(r,t.length)},T:function(e,t,n){return N(+e,t.length)}};function et(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+N(a,2)}function tt(e,t){return e%60===0?(e>0?"-":"+")+N(Math.abs(e)/60,2):ae(e,t)}function ae(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=N(Math.trunc(r/60),2),a=N(r%60,2);return n+o+t+a}const nt=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},bt=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},wr=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return nt(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",nt(r,t)).replace("{{time}}",bt(o,t))},br={p:bt,P:wr},kr=/^D+$/,Mr=/^Y+$/,Dr=["D","DD","YY","YYYY"];function vr(e){return kr.test(e)}function Or(e){return Mr.test(e)}function Wr(e,t,n){const r=Cr(e,t,n);if(console.warn(r),Dr.includes(e))throw new RangeError(r)}function Cr(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const xr=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Sr=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Nr=/^'([^]*?)'?$/,_r=/''/g,Tr=/[a-zA-Z]/;function Yr(e,t,n){const r=we(),o=n?.locale??r.locale??je,a=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,i=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=T(e,n?.in);if(!_n(s))throw new RangeError("Invalid time value");let c=t.match(Sr).map(l=>{const u=l[0];if(u==="p"||u==="P"){const h=br[u];return h(l,o.formatLong)}return l}).join("").match(xr).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const u=l[0];if(u==="'")return{isToken:!1,value:Er(l)};if(Je[u])return{isToken:!0,value:l};if(u.match(Tr))throw new RangeError("Format string contains an unescaped latin alphabet character `"+u+"`");return{isToken:!1,value:l}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const d={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(l=>{if(!l.isToken)return l.value;const u=l.value;(!n?.useAdditionalWeekYearTokens&&Or(u)||!n?.useAdditionalDayOfYearTokens&&vr(u))&&Wr(u,t,String(e));const h=Je[u[0]];return h(s,u,o.localize,d)}).join("")}function Er(e){const t=e.match(Nr);return t?t[1].replace(_r,"'"):e}function Pr(e,t){const n=T(e,t?.in),r=n.getFullYear(),o=n.getMonth(),a=B(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Fr(e,t){return T(e,t?.in).getMonth()}function Br(e,t){return T(e,t?.in).getFullYear()}function Ir(e,t){return+T(e)>+T(t)}function Hr(e,t){return+T(e)<+T(t)}function jr(e,t,n){const[r,o]=le(n?.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function qr(e,t,n){const[r,o]=le(n?.in,e,t);return r.getFullYear()===o.getFullYear()}function Ar(e,t,n){const r=T(e,n?.in),o=r.getFullYear(),a=r.getDate(),i=B(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Pr(i);return r.setMonth(t,Math.min(a,s)),r}function zr(e,t,n){const r=T(e,n?.in);return isNaN(+r)?B(e,NaN):(r.setFullYear(t),r)}const rt=5,Rr=4;function $r(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,rt*7-1);return t.getMonth(e)===t.getMonth(a)?rt:Rr}function kt(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-6):t.addDays(n,-1*(r-1))}function Gr(e,t){const n=kt(e,t),r=$r(e,t);return t.addDays(n,r*7-1)}class ne{constructor(t,n){this.Date=Date,this.today=()=>this.overrides?.today?this.overrides.today():this.options.timeZone?j.tz(this.options.timeZone):new this.Date,this.newDate=(r,o,a)=>this.overrides?.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new j(r,o,a,this.options.timeZone):new Date(r,o,a),this.addDays=(r,o)=>this.overrides?.addDays?this.overrides.addDays(r,o):ut(r,o),this.addMonths=(r,o)=>this.overrides?.addMonths?this.overrides.addMonths(r,o):dt(r,o),this.addWeeks=(r,o)=>this.overrides?.addWeeks?this.overrides.addWeeks(r,o):Wn(r,o),this.addYears=(r,o)=>this.overrides?.addYears?this.overrides.addYears(r,o):Cn(r,o),this.differenceInCalendarDays=(r,o)=>this.overrides?.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):ft(r,o),this.differenceInCalendarMonths=(r,o)=>this.overrides?.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Tn(r,o),this.eachMonthOfInterval=r=>this.overrides?.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Pn(r),this.endOfBroadcastWeek=r=>this.overrides?.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Gr(r,this),this.endOfISOWeek=r=>this.overrides?.endOfISOWeek?this.overrides.endOfISOWeek(r):In(r),this.endOfMonth=r=>this.overrides?.endOfMonth?this.overrides.endOfMonth(r):Yn(r),this.endOfWeek=(r,o)=>this.overrides?.endOfWeek?this.overrides.endOfWeek(r,o):yt(r,this.options),this.endOfYear=r=>this.overrides?.endOfYear?this.overrides.endOfYear(r):Bn(r),this.format=(r,o,a)=>{const i=this.overrides?.format?this.overrides.format(r,o,this.options):Yr(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>this.overrides?.getISOWeek?this.overrides.getISOWeek(r):gt(r),this.getMonth=(r,o)=>this.overrides?.getMonth?this.overrides.getMonth(r,this.options):Fr(r,this.options),this.getYear=(r,o)=>this.overrides?.getYear?this.overrides.getYear(r,this.options):Br(r,this.options),this.getWeek=(r,o)=>this.overrides?.getWeek?this.overrides.getWeek(r,this.options):wt(r,this.options),this.isAfter=(r,o)=>this.overrides?.isAfter?this.overrides.isAfter(r,o):Ir(r,o),this.isBefore=(r,o)=>this.overrides?.isBefore?this.overrides.isBefore(r,o):Hr(r,o),this.isDate=r=>this.overrides?.isDate?this.overrides.isDate(r):ht(r),this.isSameDay=(r,o)=>this.overrides?.isSameDay?this.overrides.isSameDay(r,o):Nn(r,o),this.isSameMonth=(r,o)=>this.overrides?.isSameMonth?this.overrides.isSameMonth(r,o):jr(r,o),this.isSameYear=(r,o)=>this.overrides?.isSameYear?this.overrides.isSameYear(r,o):qr(r,o),this.max=r=>this.overrides?.max?this.overrides.max(r):xn(r),this.min=r=>this.overrides?.min?this.overrides.min(r):Sn(r),this.setMonth=(r,o)=>this.overrides?.setMonth?this.overrides.setMonth(r,o):Ar(r,o),this.setYear=(r,o)=>this.overrides?.setYear?this.overrides.setYear(r,o):zr(r,o),this.startOfBroadcastWeek=(r,o)=>this.overrides?.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):kt(r,this),this.startOfDay=r=>this.overrides?.startOfDay?this.overrides.startOfDay(r):pe(r),this.startOfISOWeek=r=>this.overrides?.startOfISOWeek?this.overrides.startOfISOWeek(r):ge(r),this.startOfMonth=r=>this.overrides?.startOfMonth?this.overrides.startOfMonth(r):Fn(r),this.startOfWeek=(r,o)=>this.overrides?.startOfWeek?this.overrides.startOfWeek(r,this.options):de(r,this.options),this.startOfYear=r=>this.overrides?.startOfYear?this.overrides.startOfYear(r):mt(r),this.options={locale:je,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const U=new ne;class Mt{constructor(t,n,r=U){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Zr{constructor(t,n){this.date=t,this.weeks=n}}class Lr{constructor(t,n){this.days=n,this.weekNumber=t}}function ee(e,t,n=!1,r=U){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function Dt(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function qe(e){return!!(e&&typeof e=="object"&&"from"in e)}function vt(e){return!!(e&&typeof e=="object"&&"after"in e)}function Ot(e){return!!(e&&typeof e=="object"&&"before"in e)}function Wt(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Ct(e,t){return Array.isArray(e)&&e.every(t.isDate)}function te(e,t,n=U){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Ct(s,n))return s.includes(e);if(qe(s))return ee(s,e,!1,n);if(Wt(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(Dt(s)){const c=a(s.before,e),d=a(s.after,e),l=c>0,u=d<0;return i(s.before,s.after)?u&&l:l||u}return vt(s)?a(e,s.after)>0:Ot(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Qr(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:c,broadcastCalendar:d,today:l}=t,{isSameDay:u,isSameMonth:h,startOfMonth:g,isBefore:p,endOfMonth:O,isAfter:M}=o,v=n&&g(n),Y=r&&O(r),k={[F.focused]:[],[F.outside]:[],[F.disabled]:[],[F.hidden]:[],[F.today]:[]},P={};for(const y of e){const{date:b,displayMonth:w}=y,C=!!(w&&!h(b,w)),I=!!(v&&p(b,v)),q=!!(Y&&M(b,Y)),A=!!(a&&te(b,a,o)),$=!!(i&&te(b,i,o))||I||q||!d&&!c&&C||d&&c===!1&&C,se=u(b,l??o.today());C&&k.outside.push(y),A&&k.disabled.push(y),$&&k.hidden.push(y),se&&k.today.push(y),s&&Object.keys(s).forEach(ie=>{const ce=s?.[ie];ce&&te(b,ce,o)&&(P[ie]?P[ie].push(y):P[ie]=[y])})}return y=>{const b={[F.focused]:!1,[F.disabled]:!1,[F.hidden]:!1,[F.outside]:!1,[F.today]:!1},w={};for(const C in k){const I=k[C];b[C]=I.some(q=>q===y)}for(const C in P)w[C]=P[C].some(I=>I===y);return{...b,...w}}}function Xr(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[F[a]]?o.push(t[F[a]]):t[Q[a]]&&o.push(t[Q[a]]),o),[t[m.Day]])}function Vr(e){return f.createElement("button",{...e})}function Kr(e){return f.createElement("span",{...e})}function Ur(e){const{size:t=24,orientation:n="left",className:r}=e;return f.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&f.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&f.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&f.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&f.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Jr(e){const{day:t,modifiers:n,...r}=e;return f.createElement("td",{...r})}function eo(e){const{day:t,modifiers:n,...r}=e,o=f.useRef(null);return f.useEffect(()=>{n.focused&&o.current?.focus()},[n.focused]),f.createElement("button",{ref:o,...r})}function to(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[m.Dropdown],n].join(" "),s=t?.find(({value:c})=>c===a.value);return f.createElement("span",{"data-disabled":a.disabled,className:o[m.DropdownRoot]},f.createElement(r.Select,{className:i,...a},t?.map(({value:c,label:d,disabled:l})=>f.createElement(r.Option,{key:c,value:c,disabled:l},d))),f.createElement("span",{className:o[m.CaptionLabel],"aria-hidden":!0},s?.label,f.createElement(r.Chevron,{orientation:"down",size:18,className:o[m.Chevron]})))}function no(e){return f.createElement("div",{...e})}function ro(e){return f.createElement("div",{...e})}function oo(e){const{calendarMonth:t,displayIndex:n,...r}=e;return f.createElement("div",{...r},e.children)}function ao(e){const{calendarMonth:t,displayIndex:n,...r}=e;return f.createElement("div",{...r})}function so(e){return f.createElement("table",{...e})}function io(e){return f.createElement("div",{...e})}const xt=_.createContext(void 0);function be(){const e=_.useContext(xt);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function co(e){const{components:t}=be();return f.createElement(t.Dropdown,{...e})}function uo(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:d}}=be(),l=_.useCallback(h=>{o&&n?.(h)},[o,n]),u=_.useCallback(h=>{r&&t?.(h)},[r,t]);return f.createElement("nav",{...a},f.createElement(i.PreviousMonthButton,{type:"button",className:s[m.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:u},f.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[m.Chevron],orientation:"left"})),f.createElement(i.NextMonthButton,{type:"button",className:s[m.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":d(o),onClick:l},f.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[m.Chevron]})))}function lo(e){const{components:t}=be();return f.createElement(t.Button,{...e})}function fo(e){return f.createElement("option",{...e})}function ho(e){const{components:t}=be();return f.createElement(t.Button,{...e})}function mo(e){const{rootRef:t,...n}=e;return f.createElement("div",{...n,ref:t})}function yo(e){return f.createElement("select",{...e})}function go(e){const{week:t,...n}=e;return f.createElement("tr",{...n})}function po(e){return f.createElement("th",{...e})}function wo(e){return f.createElement("thead",{"aria-hidden":!0},f.createElement("tr",{...e}))}function bo(e){const{week:t,...n}=e;return f.createElement("th",{...n})}function ko(e){return f.createElement("th",{...e})}function Mo(e){return f.createElement("tbody",{...e})}function Do(e){const{components:t}=be();return f.createElement(t.Dropdown,{...e})}const vo=Object.freeze(Object.defineProperty({__proto__:null,Button:Vr,CaptionLabel:Kr,Chevron:Ur,Day:Jr,DayButton:eo,Dropdown:to,DropdownNav:no,Footer:ro,Month:oo,MonthCaption:ao,MonthGrid:so,Months:io,MonthsDropdown:co,Nav:uo,NextMonthButton:lo,Option:fo,PreviousMonthButton:ho,Root:mo,Select:yo,Week:go,WeekNumber:bo,WeekNumberHeader:ko,Weekday:po,Weekdays:wo,Weeks:Mo,YearsDropdown:Do},Symbol.toStringTag,{value:"Module"}));function Oo(e){return{...vo,...e}}function Wo(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Ae(){const e={};for(const t in m)e[m[t]]=`rdp-${m[t]}`;for(const t in F)e[F[t]]=`rdp-${F[t]}`;for(const t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(const t in R)e[R[t]]=`rdp-${R[t]}`;return e}function St(e,t,n){return(n??new ne(t)).format(e,"LLLL y")}const Co=St;function xo(e,t,n){return(n??new ne(t)).format(e,"d")}function So(e,t=U){return t.format(e,"LLLL")}function No(e,t=U){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function _o(){return""}function To(e,t,n){return(n??new ne(t)).format(e,"cccccc")}function Nt(e,t=U){return t.format(e,"yyyy")}const Yo=Nt,Eo=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:St,formatDay:xo,formatMonthCaption:Co,formatMonthDropdown:So,formatWeekNumber:No,formatWeekNumberHeader:_o,formatWeekdayName:To,formatYearCaption:Yo,formatYearDropdown:Nt},Symbol.toStringTag,{value:"Module"}));function Po(e){return e?.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e?.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Eo,...e}}function Fo(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:d}=o;return c({start:i(e),end:s(e)}).map(h=>{const g=r.formatMonthDropdown(h,o),p=d(h),O=t&&h<a(t)||n&&h>a(n)||!1;return{value:p,label:g,disabled:O}})}function Bo(e,t={},n={}){let r={...t?.[m.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n?.[o]}}),r}function Io(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function Ho(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:d}=r,l=o(e),u=a(t),h=[];let g=l;for(;c(g,u)||d(g,u);)h.push(g),g=i(g,1);return h.map(p=>{const O=n.formatYearDropdown(p,r);return{value:s(p),label:O,disabled:!1}})}function _t(e,t,n){return(n??new ne(t)).format(e,"LLLL y")}const jo=_t;function qo(e,t,n,r){let o=(r??new ne(n)).format(e,"PPPP");return t?.today&&(o=`Today, ${o}`),o}function Tt(e,t,n,r){let o=(r??new ne(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ao=Tt;function zo(){return""}function Ro(e){return"Choose the Month"}function $o(e){return"Go to the Next Month"}function Go(e){return"Go to the Previous Month"}function Zo(e,t,n){return(n??new ne(t)).format(e,"cccc")}function Lo(e,t){return`Week ${e}`}function Qo(e){return"Week Number"}function Xo(e){return"Choose the Year"}const Vo=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:jo,labelDay:Ao,labelDayButton:Tt,labelGrid:_t,labelGridcell:qo,labelMonthDropdown:Ro,labelNav:zo,labelNext:$o,labelPrevious:Go,labelWeekNumber:Lo,labelWeekNumberHeader:Qo,labelWeekday:Zo,labelYearDropdown:Xo},Symbol.toStringTag,{value:"Module"})),ke=e=>e instanceof HTMLElement?e:null,Fe=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Ko=e=>ke(e.querySelector("[data-animated-month]")),Be=e=>ke(e.querySelector("[data-animated-caption]")),Ie=e=>ke(e.querySelector("[data-animated-weeks]")),Uo=e=>ke(e.querySelector("[data-animated-nav]")),Jo=e=>ke(e.querySelector("[data-animated-weekdays]"));function ea(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=_.useRef(null),s=_.useRef(r),c=_.useRef(!1);_.useLayoutEffect(()=>{const d=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||d.length===0||r.length!==d.length)return;const l=a.isSameMonth(r[0].date,d[0].date),u=a.isAfter(r[0].date,d[0].date),h=u?n[R.caption_after_enter]:n[R.caption_before_enter],g=u?n[R.weeks_after_enter]:n[R.weeks_before_enter],p=i.current,O=e.current.cloneNode(!0);if(O instanceof HTMLElement?(Fe(O).forEach(k=>{if(!(k instanceof HTMLElement))return;const P=Ko(k);P&&k.contains(P)&&k.removeChild(P);const y=Be(k);y&&y.classList.remove(h);const b=Ie(k);b&&b.classList.remove(g)}),i.current=O):i.current=null,c.current||l||o)return;const M=p instanceof HTMLElement?Fe(p):[],v=Fe(e.current);if(v&&v.every(Y=>Y instanceof HTMLElement)&&M&&M.every(Y=>Y instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const Y=Uo(e.current);Y&&(Y.style.zIndex="1"),v.forEach((k,P)=>{const y=M[P];if(!y)return;k.style.position="relative",k.style.overflow="hidden";const b=Be(k);b&&b.classList.add(h);const w=Ie(k);w&&w.classList.add(g);const C=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),Y&&(Y.style.zIndex=""),b&&b.classList.remove(h),w&&w.classList.remove(g),k.style.position="",k.style.overflow="",k.contains(y)&&k.removeChild(y)};y.style.pointerEvents="none",y.style.position="absolute",y.style.overflow="hidden",y.setAttribute("aria-hidden","true");const I=Jo(y);I&&(I.style.opacity="0");const q=Be(y);q&&(q.classList.add(u?n[R.caption_before_exit]:n[R.caption_after_exit]),q.addEventListener("animationend",C));const A=Ie(y);A&&A.classList.add(u?n[R.weeks_before_exit]:n[R.weeks_after_exit]),k.insertBefore(y,k.firstChild)})}})}function ta(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:d,differenceInCalendarDays:l,differenceInCalendarMonths:u,endOfBroadcastWeek:h,endOfISOWeek:g,endOfMonth:p,endOfWeek:O,isAfter:M,startOfBroadcastWeek:v,startOfISOWeek:Y,startOfWeek:k}=r,P=c?v(o,r):i?Y(o):k(o),y=c?h(a):i?g(p(a)):O(p(a)),b=l(y,P),w=u(a,o)+1,C=[];for(let A=0;A<=b;A++){const $=d(P,A);if(t&&M($,t))break;C.push($)}const q=(c?35:42)*w;if(s&&C.length<q){const A=q-C.length;for(let $=0;$<A;$++){const se=d(C[C.length-1],1);C.push(se)}}return C}function na(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function ra(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function ot(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let c=o||a||i;const{differenceInCalendarMonths:d,addMonths:l,startOfMonth:u}=r;if(n&&d(n,c)<s-1){const h=-1*(s-1);c=l(n,h)}return t&&d(c,t)<0&&(c=t),u(c)}function oa(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:d,getWeek:l,startOfBroadcastWeek:u,startOfISOWeek:h,startOfWeek:g}=r,p=e.reduce((O,M)=>{const v=n.broadcastCalendar?u(M,r):n.ISOWeek?h(M):g(M),Y=n.broadcastCalendar?a(M):n.ISOWeek?i(s(M)):c(s(M)),k=t.filter(w=>w>=v&&w<=Y),P=n.broadcastCalendar?35:42;if(n.fixedWeeks&&k.length<P){const w=t.filter(C=>{const I=P-k.length;return C>Y&&C<=o(Y,I)});k.push(...w)}const y=k.reduce((w,C)=>{const I=n.ISOWeek?d(C):l(C),q=w.find($=>$.weekNumber===I),A=new Mt(C,M,r);return q?q.days.push(A):w.push(new Lr(I,[A])),w},[]),b=new Zr(M,y);return O.push(b),O},[]);return n.reverseMonths?p.reverse():p}function aa(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:d,newDate:l,today:u}=t,{fromYear:h,toYear:g,fromMonth:p,toMonth:O}=e;!n&&p&&(n=p),!n&&h&&(n=t.newDate(h,0,1)),!r&&O&&(r=O),!r&&g&&(r=l(g,11,31));const M=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):h?n=l(h,0,1):!n&&M&&(n=o(c(e.today??u(),-100))),r?r=s(r):g?r=l(g,11,31):!r&&M&&(r=d(e.today??u())),[n&&a(n),r&&a(r)]}function sa(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,d=o?a:1,l=i(e);if(!t)return s(l,d);if(!(c(t,e)<a))return s(l,d)}function ia(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,d=o?a??1:1,l=i(e);if(!t)return s(l,-d);if(!(c(l,t)<=0))return s(l,-d)}function ca(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function We(e,t){const[n,r]=_.useState(e);return[t===void 0?n:t,r]}function ua(e,t){const[n,r]=aa(e,t),{startOfMonth:o,endOfMonth:a}=t,i=ot(e,n,r,t),[s,c]=We(i,e.month?i:void 0);_.useEffect(()=>{const b=ot(e,n,r,t);c(b)},[e.timeZone]);const d=ra(s,r,e,t),l=ta(d,e.endMonth?a(e.endMonth):void 0,e,t),u=oa(d,l,e,t),h=ca(u),g=na(u),p=ia(s,n,e,t),O=sa(s,r,e,t),{disableNavigation:M,onMonthChange:v}=e,Y=b=>h.some(w=>w.days.some(C=>C.isEqualTo(b))),k=b=>{if(M)return;let w=o(b);n&&w<o(n)&&(w=o(n)),r&&w>o(r)&&(w=o(r)),c(w),v?.(w)};return{months:u,weeks:h,days:g,navStart:n,navEnd:r,previousMonth:p,nextMonth:O,goToMonth:k,goToDay:b=>{Y(b)||k(b.date)}}}var V;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(V||(V={}));function at(e){return!e[F.disabled]&&!e[F.hidden]&&!e[F.outside]}function da(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);at(s)&&(s[F.focused]&&a<V.FocusedModifier?(o=i,a=V.FocusedModifier):r?.isEqualTo(i)&&a<V.LastFocused?(o=i,a=V.LastFocused):n(i.date)&&a<V.Selected?(o=i,a=V.Selected):s[F.today]&&a<V.Today&&(o=i,a=V.Today))}return o||(o=e.find(i=>at(t(i)))),o}function la(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:d,addMonths:l,addWeeks:u,addYears:h,endOfBroadcastWeek:g,endOfISOWeek:p,endOfWeek:O,max:M,min:v,startOfBroadcastWeek:Y,startOfISOWeek:k,startOfWeek:P}=i;let b={day:d,week:u,month:l,year:h,startOfWeek:w=>c?Y(w,i):s?k(w):P(w),endOfWeek:w=>c?g(w):s?p(w):O(w)}[e](n,t==="after"?1:-1);return t==="before"&&r?b=M([r,b]):t==="after"&&o&&(b=v([o,b])),b}function Yt(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=la(e,t,n.date,r,o,a,i),d=!!(a.disabled&&te(c,a.disabled,i)),l=!!(a.hidden&&te(c,a.hidden,i)),u=c,h=new Mt(c,u,i);return!d&&!l?h:Yt(e,t,h,r,o,a,i,s+1)}function fa(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=_.useState(),c=da(t.days,n,r||(()=>!1),i),[d,l]=_.useState(a?c:void 0);return{isFocusTarget:O=>!!c?.isEqualTo(O),setFocused:l,focused:d,blur:()=>{s(d),l(void 0)},moveFocus:(O,M)=>{if(!d)return;const v=Yt(O,M,d,t.navStart,t.navEnd,e,o);v&&(t.goToDay(v),l(v))}}}function ha(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=We(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,d=g=>s?.some(p=>c(p,g))??!1,{min:l,max:u}=e;return{selected:s,select:(g,p,O)=>{let M=[...s??[]];if(d(g)){if(s?.length===l||r&&s?.length===1)return;M=s?.filter(v=>!c(v,g))}else s?.length===u?M=[g]:M=[...M,g];return o||i(M),o?.(M,g,p,O),M},isSelected:d}}function ma(e,t,n=0,r=0,o=!1,a=U){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:d,isBefore:l}=a;let u;if(!i&&!s)u={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?u={from:i,to:void 0}:u=void 0:l(e,i)?u={from:e,to:i}:u={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?u={from:i,to:s}:u=void 0;else if(c(i,e))u={from:i,to:n>0?void 0:e};else if(c(s,e))u={from:e,to:n>0?void 0:e};else if(l(e,i))u={from:e,to:s};else if(d(e,i))u={from:i,to:e};else if(d(e,s))u={from:i,to:e};else throw new Error("Invalid range");if(u?.from&&u?.to){const h=a.differenceInCalendarDays(u.to,u.from);r>0&&h>r?u={from:e,to:void 0}:n>1&&h<n&&(u={from:e,to:void 0})}return u}function ya(e,t,n=U){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function st(e,t,n=U){return ee(e,t.from,!1,n)||ee(e,t.to,!1,n)||ee(t,e.from,!1,n)||ee(t,e.to,!1,n)}function ga(e,t,n=U){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?ee(e,s,!1,n):Ct(s,n)?s.some(c=>ee(e,c,!1,n)):qe(s)?s.from&&s.to?st(e,{from:s.from,to:s.to},n):!1:Wt(s)?ya(e,s.dayOfWeek,n):Dt(s)?n.isAfter(s.before,s.after)?st(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):te(e.from,s,n)||te(e.to,s,n):vt(s)||Ot(s)?te(e.from,s,n)||te(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let d=0;d<=c;d++){if(i.some(l=>l(s)))return!0;s=n.addDays(s,1)}}return!1}function pa(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=We(o,i?o:void 0),d=i?o:s;return{selected:d,select:(h,g,p)=>{const{min:O,max:M}=e,v=h?ma(h,d,O,M,a,t):void 0;return r&&n&&v?.from&&v.to&&ga({from:v.from,to:v.to},n,t)&&(v.from=h,v.to=void 0),i||c(v),i?.(v,h,g,p),v},isSelected:h=>d&&ee(d,h,!1,t)}}function wa(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=We(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(u,h,g)=>{let p=u;return!r&&s&&s&&c(u,s)&&(p=void 0),o||i(p),o?.(p,u,h,g),p},isSelected:u=>s?c(s,u):!1}}function ba(e,t){const n=wa(e,t),r=ha(e,t),o=pa(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function ka(e){let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new j(t.today,t.timeZone)),t.month&&(t.month=new j(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new j(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new j(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new j(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new j(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=t.selected?.map(D=>new j(D,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new j(t.selected.from,t.timeZone):void 0,to:t.selected.to?new j(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=_.useMemo(()=>{const D={...je,...t.locale};return{dateLib:new ne({locale:D,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Oo(t.components),formatters:Po(t.formatters),labels:{...Vo,...t.labels},locale:D,classNames:{...Ae(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:c,mode:d,navLayout:l,numberOfMonths:u=1,onDayBlur:h,onDayClick:g,onDayFocus:p,onDayKeyDown:O,onDayMouseEnter:M,onDayMouseLeave:v,onNextClick:Y,onPrevClick:k,showWeekNumber:P,styles:y}=t,{formatCaption:b,formatDay:w,formatMonthDropdown:C,formatWeekNumber:I,formatWeekNumberHeader:q,formatWeekdayName:A,formatYearDropdown:$}=r,se=ua(t,a),{days:ie,months:ce,navStart:Me,navEnd:Ce,previousMonth:G,nextMonth:Z,goToMonth:J}=se,xe=Qr(ie,t,Me,Ce,a),{isSelected:Se,select:Ne,selected:De}=ba(t,a)??{},{blur:ze,focused:Re,isFocusTarget:Et,moveFocus:$e,setFocused:ve}=fa(t,se,xe,Se??(()=>!1),a),{labelDayButton:Pt,labelGridcell:Ft,labelGrid:Bt,labelMonthDropdown:It,labelNav:Ge,labelPrevious:Ht,labelNext:jt,labelWeekday:qt,labelWeekNumber:At,labelWeekNumberHeader:zt,labelYearDropdown:Rt}=o,$t=_.useMemo(()=>Io(a,t.ISOWeek),[a,t.ISOWeek]),Ze=d!==void 0||g!==void 0,_e=_.useCallback(()=>{G&&(J(G),k?.(G))},[G,J,k]),Te=_.useCallback(()=>{Z&&(J(Z),Y?.(Z))},[J,Z,Y]),Gt=_.useCallback((D,E)=>x=>{x.preventDefault(),x.stopPropagation(),ve(D),Ne?.(D.date,E,x),g?.(D.date,E,x)},[Ne,g,ve]),Zt=_.useCallback((D,E)=>x=>{ve(D),p?.(D.date,E,x)},[p,ve]),Lt=_.useCallback((D,E)=>x=>{ze(),h?.(D.date,E,x)},[ze,h]),Qt=_.useCallback((D,E)=>x=>{const re={ArrowLeft:[x.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[x.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[x.shiftKey?"year":"week","after"],ArrowUp:[x.shiftKey?"year":"week","before"],PageUp:[x.shiftKey?"year":"month","before"],PageDown:[x.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(re[x.key]){x.preventDefault(),x.stopPropagation();const[L,Oe]=re[x.key];$e(L,Oe)}O?.(D.date,E,x)},[$e,O,t.dir]),Xt=_.useCallback((D,E)=>x=>{M?.(D.date,E,x)},[M]),Vt=_.useCallback((D,E)=>x=>{v?.(D.date,E,x)},[v]),Kt=_.useCallback(D=>E=>{const x=Number(E.target.value),re=a.setMonth(a.startOfMonth(D),x);J(re)},[a,J]),Ut=_.useCallback(D=>E=>{const x=Number(E.target.value),re=a.setYear(a.startOfMonth(D),x);J(re)},[a,J]),{className:Jt,style:en}=_.useMemo(()=>({className:[s[m.Root],t.className].filter(Boolean).join(" "),style:{...y?.[m.Root],...t.style}}),[s,t.className,t.style,y]),tn=Wo(t),Le=_.useRef(null);ea(Le,!!t.animate,{classNames:s,months:ce,focused:Re,dateLib:a});const nn={dayPickerProps:t,selected:De,select:Ne,isSelected:Se,months:ce,nextMonth:Z,previousMonth:G,goToMonth:J,getModifiers:xe,components:n,classNames:s,styles:y,labels:o,formatters:r};return f.createElement(xt.Provider,{value:nn},f.createElement(n.Root,{rootRef:t.animate?Le:void 0,className:Jt,style:en,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...tn},f.createElement(n.Months,{className:s[m.Months],style:y?.[m.Months]},!t.hideNavigation&&!l&&f.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[m.Nav],style:y?.[m.Nav],"aria-label":Ge(),onPreviousClick:_e,onNextClick:Te,previousMonth:G,nextMonth:Z}),ce.map((D,E)=>{const x=Fo(D.date,Me,Ce,r,a),re=Ho(Me,Ce,r,a);return f.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[m.Month],style:y?.[m.Month],key:E,displayIndex:E,calendarMonth:D},l==="around"&&!t.hideNavigation&&E===0&&f.createElement(n.PreviousMonthButton,{type:"button",className:s[m.PreviousMonthButton],tabIndex:G?void 0:-1,"aria-disabled":G?void 0:!0,"aria-label":Ht(G),onClick:_e,"data-animated-button":t.animate?"true":void 0},f.createElement(n.Chevron,{disabled:G?void 0:!0,className:s[m.Chevron],orientation:t.dir==="rtl"?"right":"left"})),f.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[m.MonthCaption],style:y?.[m.MonthCaption],calendarMonth:D,displayIndex:E},c?.startsWith("dropdown")?f.createElement(n.DropdownNav,{className:s[m.Dropdowns],style:y?.[m.Dropdowns]},c==="dropdown"||c==="dropdown-months"?f.createElement(n.MonthsDropdown,{className:s[m.MonthsDropdown],"aria-label":It(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Kt(D.date),options:x,style:y?.[m.Dropdown],value:a.getMonth(D.date)}):f.createElement("span",null,C(D.date,a)),c==="dropdown"||c==="dropdown-years"?f.createElement(n.YearsDropdown,{className:s[m.YearsDropdown],"aria-label":Rt(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Ut(D.date),options:re,style:y?.[m.Dropdown],value:a.getYear(D.date)}):f.createElement("span",null,$(D.date,a)),f.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},b(D.date,a.options,a))):f.createElement(n.CaptionLabel,{className:s[m.CaptionLabel],role:"status","aria-live":"polite"},b(D.date,a.options,a))),l==="around"&&!t.hideNavigation&&E===u-1&&f.createElement(n.NextMonthButton,{type:"button",className:s[m.NextMonthButton],tabIndex:Z?void 0:-1,"aria-disabled":Z?void 0:!0,"aria-label":jt(Z),onClick:Te,"data-animated-button":t.animate?"true":void 0},f.createElement(n.Chevron,{disabled:Z?void 0:!0,className:s[m.Chevron],orientation:t.dir==="rtl"?"left":"right"})),E===u-1&&l==="after"&&!t.hideNavigation&&f.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[m.Nav],style:y?.[m.Nav],"aria-label":Ge(),onPreviousClick:_e,onNextClick:Te,previousMonth:G,nextMonth:Z}),f.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":d==="multiple"||d==="range","aria-label":Bt(D.date,a.options,a)||void 0,className:s[m.MonthGrid],style:y?.[m.MonthGrid]},!t.hideWeekdays&&f.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[m.Weekdays],style:y?.[m.Weekdays]},P&&f.createElement(n.WeekNumberHeader,{"aria-label":zt(a.options),className:s[m.WeekNumberHeader],style:y?.[m.WeekNumberHeader],scope:"col"},q()),$t.map((L,Oe)=>f.createElement(n.Weekday,{"aria-label":qt(L,a.options,a),className:s[m.Weekday],key:Oe,style:y?.[m.Weekday],scope:"col"},A(L,a.options,a)))),f.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[m.Weeks],style:y?.[m.Weeks]},D.weeks.map((L,Oe)=>f.createElement(n.Week,{className:s[m.Week],key:L.weekNumber,style:y?.[m.Week],week:L},P&&f.createElement(n.WeekNumber,{week:L,style:y?.[m.WeekNumber],"aria-label":At(L.weekNumber,{locale:i}),className:s[m.WeekNumber],scope:"row",role:"rowheader"},I(L.weekNumber,a)),L.days.map(H=>{const{date:X}=H,S=xe(H);if(S[F.focused]=!S.hidden&&!!Re?.isEqualTo(H),S[Q.selected]=Se?.(X)||S.selected,qe(De)){const{from:Ye,to:Ee}=De;S[Q.range_start]=!!(Ye&&Ee&&a.isSameDay(X,Ye)),S[Q.range_end]=!!(Ye&&Ee&&a.isSameDay(X,Ee)),S[Q.range_middle]=ee(De,X,!0,a)}const rn=Bo(S,y,t.modifiersStyles),on=Xr(S,s,t.modifiersClassNames),an=!Ze&&!S.hidden?Ft(X,S,a.options,a):void 0;return f.createElement(n.Day,{key:`${a.format(X,"yyyy-MM-dd")}_${a.format(H.displayMonth,"yyyy-MM")}`,day:H,modifiers:S,className:on.join(" "),style:rn,role:"gridcell","aria-selected":S.selected||void 0,"aria-label":an,"data-day":a.format(X,"yyyy-MM-dd"),"data-month":H.outside?a.format(X,"yyyy-MM"):void 0,"data-selected":S.selected||void 0,"data-disabled":S.disabled||void 0,"data-hidden":S.hidden||void 0,"data-outside":H.outside||void 0,"data-focused":S.focused||void 0,"data-today":S.today||void 0},!S.hidden&&Ze?f.createElement(n.DayButton,{className:s[m.DayButton],style:y?.[m.DayButton],type:"button",day:H,modifiers:S,disabled:S.disabled||void 0,tabIndex:Et(H)?0:-1,"aria-label":Pt(X,S,a.options,a),onClick:Gt(H,S),onBlur:Lt(H,S),onFocus:Zt(H,S),onKeyDown:Qt(H,S),onMouseEnter:Xt(H,S),onMouseLeave:Vt(H,S)},w(X,a.options,a)):!S.hidden&&w(H.date,a.options,a))}))))))})),t.footer&&f.createElement(n.Footer,{className:s[m.Footer],style:y?.[m.Footer],role:"status","aria-live":"polite"},t.footer)))}function _a({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const c=Ae();return z.jsx(ka,{showOutsideDays:n,className:W("bg-background group/calendar p-3 [--cell-size:--spacing(8)] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:d=>d.toLocaleString("default",{month:"short"}),...a},classNames:{root:W("w-fit",c.root),months:W("flex gap-4 flex-col md:flex-row relative",c.months),month:W("flex flex-col w-full gap-4",c.month),nav:W("flex items-center gap-1 w-full absolute top-0 inset-x-0 justify-between",c.nav),button_previous:W(Qe({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_previous),button_next:W(Qe({variant:o}),"size-(--cell-size) aria-disabled:opacity-50 p-0 select-none",c.button_next),month_caption:W("flex items-center justify-center h-(--cell-size) w-full px-(--cell-size)",c.month_caption),dropdowns:W("w-full flex items-center text-sm font-medium justify-center h-(--cell-size) gap-1.5",c.dropdowns),dropdown_root:W("relative has-focus:border-ring border border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] rounded-md",c.dropdown_root),dropdown:W("absolute bg-popover inset-0 opacity-0",c.dropdown),caption_label:W("select-none font-medium",r==="label"?"text-sm":"rounded-md pl-2 pr-1 flex items-center gap-1 text-sm h-8 [&>svg]:text-muted-foreground [&>svg]:size-3.5",c.caption_label),table:"w-full border-collapse",weekdays:W("flex",c.weekdays),weekday:W("text-muted-foreground rounded-md flex-1 font-normal text-[0.8rem] select-none",c.weekday),week:W("flex w-full mt-2",c.week),week_number_header:W("select-none w-(--cell-size)",c.week_number_header),week_number:W("text-[0.8rem] select-none text-muted-foreground",c.week_number),day:W("relative w-full h-full p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md group/day aspect-square select-none",c.day),range_start:W("rounded-l-md bg-accent",c.range_start),range_middle:W("rounded-none",c.range_middle),range_end:W("rounded-r-md bg-accent",c.range_end),today:W("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:W("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:W("text-muted-foreground opacity-50",c.disabled),hidden:W("invisible",c.hidden),...t},components:{Root:({className:d,rootRef:l,...u})=>z.jsx("div",{"data-slot":"calendar",ref:l,className:W(d),...u}),Chevron:({className:d,orientation:l,...u})=>l==="left"?z.jsx(pn,{className:W("size-4",d),...u}):l==="right"?z.jsx(un,{className:W("size-4",d),...u}):z.jsx(dn,{className:W("size-4",d),...u}),DayButton:Ma,WeekNumber:({children:d,...l})=>z.jsx("td",{...l,children:z.jsx("div",{className:"flex size-(--cell-size) items-center justify-center text-center",children:d})}),...i},...s})}function Ma({className:e,day:t,modifiers:n,...r}){const o=Ae(),a=_.useRef(null);return _.useEffect(()=>{n.focused&&a.current?.focus()},[n.focused]),z.jsx(sn,{ref:a,variant:"ghost",size:"icon","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:W("data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 dark:hover:text-accent-foreground flex aspect-square size-auto w-full min-w-(--cell-size) flex-col gap-1 leading-none font-normal group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:ring-[3px] data-[range-end=true]:rounded-md data-[range-end=true]:rounded-r-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md data-[range-start=true]:rounded-l-md [&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}function Ta({...e}){return z.jsx(ln,{"data-slot":"popover",...e})}function Ya({...e}){return z.jsx(fn,{"data-slot":"popover-trigger",...e})}function Ea({className:e,align:t="center",sideOffset:n=4,...r}){return z.jsx(hn,{children:z.jsx(mn,{"data-slot":"popover-content",align:t,sideOffset:n,className:W("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...r})})}const Pa=({onClear:e,visible:t=!0})=>t?z.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),e()},className:"absolute right-1 top-1/2 -translate-y-1/2 p-1 rounded",title:"Clear",children:z.jsx(yn,{className:"w-4 h-4 text-gray-500 hover:text-black"})}):null;export{Pa as C,Ta as P,Ya as a,Ea as b,_a as c,Yr as f};
@@ -1,21 +0,0 @@
1
- import{a as s}from"./chunk-EF7DTUVF-CaKisB5m.js";/**
2
- * @license lucide-react v0.487.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const d=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),w=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase()),c=e=>{const t=w(e);return t.charAt(0).toUpperCase()+t.slice(1)},l=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim();/**
7
- * @license lucide-react v0.487.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12
- * @license lucide-react v0.487.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const g=s.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...u},m)=>s.createElement("svg",{ref:m,...f,width:t,height:t,stroke:e,strokeWidth:o?Number(r)*24/Number(t):r,className:l("lucide",n),...u},[...i.map(([p,C])=>s.createElement(p,C)),...Array.isArray(a)?a:[a]]));/**
17
- * @license lucide-react v0.487.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const A=(e,t)=>{const r=s.forwardRef(({className:o,...n},a)=>s.createElement(g,{ref:a,iconNode:t,className:l(`lucide-${d(c(e))}`,`lucide-${e}`,o),...n}));return r.displayName=c(e),r};export{A as c};