@isardsat/editorial-admin 6.0.2 → 6.0.4

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 (40) hide show
  1. package/build/client/assets/{authSlice-KDhecIDl.js → authSlice-B3Tyl-Nw.js} +1 -1
  2. package/build/client/assets/button-Da66T3Bb.js +1 -0
  3. package/build/client/assets/chevron-down-8tTu7uK2.js +6 -0
  4. package/build/client/assets/chunk-KNED5TY2-DAA_sFzt.js +51 -0
  5. package/build/client/assets/{createLucideIcon-TQsNVzYU.js → createLucideIcon-R2-3a7hN.js} +1 -1
  6. package/build/client/assets/dashboard-BTu7-8Ba.js +1 -0
  7. package/build/client/assets/{dashboard._collection-DCypgAsP.js → dashboard._collection-MtSHvYYW.js} +4 -4
  8. package/build/client/assets/dashboard._collection._document-CRkC98aa.js +1 -0
  9. package/build/client/assets/dashboard._collection.new-BFe8yV0Z.js +1 -0
  10. package/build/client/assets/{dashboard._layout-BdJ3SrSw.js → dashboard._layout-fM4SW8Or.js} +2 -2
  11. package/build/client/assets/{dashboard.files-DVCxRHOl.js → dashboard.files-ieQA7EmW.js} +3 -3
  12. package/build/client/assets/editorialApi-fQchmMa9.js +1 -0
  13. package/build/client/assets/entry.client-BGu2H8xv.js +34 -0
  14. package/build/client/assets/home-oYP3wzz9.js +36 -0
  15. package/build/client/assets/{index-C-iH5ItK.js → index-Bd1u2_LZ.js} +1 -1
  16. package/build/client/assets/{index-B_FOxFgA.js → index-BvKqmqc2.js} +1 -1
  17. package/build/client/assets/index-C-vcF2DZ.js +9 -0
  18. package/build/client/assets/{index-DrhM6FV9.js → index-DeO5nu0f.js} +1 -1
  19. package/build/client/assets/{input-BH49oaMa.js → input-BmmdOdbj.js} +1 -1
  20. package/build/client/assets/itemForm-DlRBjBsd.js +90 -0
  21. package/build/client/assets/manifest-9974ee04.js +1 -0
  22. package/build/client/assets/react-redux-kbMjYGuQ.js +9 -0
  23. package/build/client/assets/root-wKvfXBjk.js +1 -0
  24. package/build/client/assets/{trash-B3lfbu-5.js → trash-wq_ppIxP.js} +1 -1
  25. package/build/client/index.html +4 -4
  26. package/package.json +11 -9
  27. package/build/client/assets/button-O0EDocjF.js +0 -1
  28. package/build/client/assets/chevron-down-BMtosYlL.js +0 -6
  29. package/build/client/assets/chunk-KNED5TY2-CXj9yqcQ.js +0 -51
  30. package/build/client/assets/dashboard-Binq3-uL.js +0 -1
  31. package/build/client/assets/dashboard._collection._document-B9dEIw39.js +0 -1
  32. package/build/client/assets/dashboard._collection.new-QbdwRouF.js +0 -1
  33. package/build/client/assets/editorialApi-DCnC5eM9.js +0 -1
  34. package/build/client/assets/entry.client-B5Ca3clj.js +0 -34
  35. package/build/client/assets/home-wnsWYgD_.js +0 -11
  36. package/build/client/assets/index-B7e3fQ32.js +0 -9
  37. package/build/client/assets/index-G-cqIhgh.js +0 -9
  38. package/build/client/assets/itemForm-dtoqbEoC.js +0 -90
  39. package/build/client/assets/manifest-a309df9e.js +0 -1
  40. package/build/client/assets/root-DHDQPxhg.js +0 -1
@@ -0,0 +1 @@
1
+ window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BGu2H8xv.js","imports":["/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/index-C-vcF2DZ.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-wKvfXBjk.js","imports":["/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/index-C-vcF2DZ.js","/assets/react-redux-kbMjYGuQ.js","/assets/authSlice-B3Tyl-Nw.js","/assets/editorialApi-fQchmMa9.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/root-DS7N36v7.css"]},"routes/home":{"id":"routes/home","parentId":"root","path":"/admin","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/home-oYP3wzz9.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/button-Da66T3Bb.js","/assets/input-BmmdOdbj.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/authSlice-B3Tyl-Nw.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":[]},"routes/dashboard._layout":{"id":"routes/dashboard._layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._layout-fM4SW8Or.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/chevron-down-8tTu7uK2.js","/assets/authSlice-B3Tyl-Nw.js","/assets/editorialApi-fQchmMa9.js","/assets/index-Bd1u2_LZ.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/button-Da66T3Bb.js","/assets/index-BvKqmqc2.js","/assets/tslib.es6-CDuPK5Eb.js","/assets/index-C-vcF2DZ.js"],"css":[]},"routes/dashboard":{"id":"routes/dashboard","parentId":"routes/dashboard._layout","path":"/admin/dashboard","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard-BTu7-8Ba.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/utils-DslUJpbf.js","/assets/editorialApi-fQchmMa9.js","/assets/index-DeO5nu0f.js"],"css":[]},"routes/dashboard.$collection.new":{"id":"routes/dashboard.$collection.new","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/new","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection.new-BFe8yV0Z.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/itemForm-DlRBjBsd.js","/assets/editorialApi-fQchmMa9.js","/assets/button-Da66T3Bb.js","/assets/utils-DslUJpbf.js","/assets/input-BmmdOdbj.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/index-Bd1u2_LZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.$collection":{"id":"routes/dashboard.$collection","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection-MtSHvYYW.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/button-Da66T3Bb.js","/assets/editorialApi-fQchmMa9.js","/assets/index-DeO5nu0f.js","/assets/utils-DslUJpbf.js","/assets/trash-wq_ppIxP.js","/assets/createLucideIcon-R2-3a7hN.js"],"css":[]},"routes/dashboard.$collection.$document":{"id":"routes/dashboard.$collection.$document","parentId":"routes/dashboard._layout","path":"/admin/dashboard/:collectionId/:documentId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard._collection._document-CRkC98aa.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/itemForm-DlRBjBsd.js","/assets/editorialApi-fQchmMa9.js","/assets/button-Da66T3Bb.js","/assets/utils-DslUJpbf.js","/assets/input-BmmdOdbj.js","/assets/index-BvKqmqc2.js","/assets/index-C-vcF2DZ.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/index-Bd1u2_LZ.js","/assets/tslib.es6-CDuPK5Eb.js"],"css":["/assets/itemForm-CDbHkFXh.css"]},"routes/dashboard.files":{"id":"routes/dashboard.files","parentId":"routes/dashboard._layout","path":"/admin/dashboard/files","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":false,"module":"/assets/dashboard.files-ieQA7EmW.js","imports":["/assets/react-redux-kbMjYGuQ.js","/assets/chunk-KNED5TY2-DAA_sFzt.js","/assets/chevron-down-8tTu7uK2.js","/assets/editorialApi-fQchmMa9.js","/assets/utils-DslUJpbf.js","/assets/createLucideIcon-R2-3a7hN.js","/assets/trash-wq_ppIxP.js"],"css":[]}},"url":"/assets/manifest-9974ee04.js","version":"9974ee04"};
@@ -0,0 +1,9 @@
1
+ var ot=Object.defineProperty;var ut=(e,t,r)=>t in e?ot(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ne=(e,t,r)=>ut(e,typeof t!="symbol"?t+"":t,r);import{A as ct,B as We,C as Le,D as Be,a as P,E as st,r as ft}from"./chunk-KNED5TY2-DAA_sFzt.js";function gr(e){return function(){const r={params:Be(),loaderData:Le(),actionData:We(),matches:ct()};return P.createElement(e,r)}}function vr(e){return function(){const r={params:Be(),loaderData:Le(),actionData:We(),error:st()};return P.createElement(e,r)}}function R(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var at=typeof Symbol=="function"&&Symbol.observable||"@@observable",Re=at,ie=()=>Math.random().toString(36).substring(7).split("").join("."),lt={INIT:`@@redux/INIT${ie()}`,REPLACE:`@@redux/REPLACE${ie()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ie()}`},J=lt;function ge(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Ve(e,t,r){if(typeof e!="function")throw new Error(R(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(R(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(R(1));return r(Ve)(e,t)}let n=e,i=t,o=new Map,c=o,a=0,u=!1;function d(){c===o&&(c=new Map,o.forEach((b,w)=>{c.set(w,b)}))}function f(){if(u)throw new Error(R(3));return i}function h(b){if(typeof b!="function")throw new Error(R(4));if(u)throw new Error(R(5));let w=!0;d();const _=a++;return c.set(_,b),function(){if(w){if(u)throw new Error(R(6));w=!1,d(),c.delete(_),o=null}}}function s(b){if(!ge(b))throw new Error(R(7));if(typeof b.type>"u")throw new Error(R(8));if(typeof b.type!="string")throw new Error(R(17));if(u)throw new Error(R(9));try{u=!0,i=n(i,b)}finally{u=!1}return(o=c).forEach(_=>{_()}),b}function m(b){if(typeof b!="function")throw new Error(R(10));n=b,s({type:J.REPLACE})}function y(){const b=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(R(11));function _(){const p=w;p.next&&p.next(f())}return _(),{unsubscribe:b(_)}},[Re](){return this}}}return s({type:J.INIT}),{dispatch:s,subscribe:h,getState:f,replaceReducer:m,[Re]:y}}function dt(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:J.INIT})>"u")throw new Error(R(12));if(typeof r(void 0,{type:J.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(R(13))})}function pt(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const c=t[o];typeof e[c]=="function"&&(r[c]=e[c])}const n=Object.keys(r);let i;try{dt(r)}catch(o){i=o}return function(c={},a){if(i)throw i;let u=!1;const d={};for(let f=0;f<n.length;f++){const h=n[f],s=r[h],m=c[h],y=s(m,a);if(typeof y>"u")throw a&&a.type,new Error(R(14));d[h]=y,u=u||y!==m}return u=u||n.length!==Object.keys(c).length,u?d:c}}function Y(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function ht(...e){return t=>(r,n)=>{const i=t(r,n);let o=()=>{throw new Error(R(15))};const c={getState:i.getState,dispatch:(u,...d)=>o(u,...d)},a=e.map(u=>u(c));return o=Y(...a)(i.dispatch),{...i,dispatch:o}}}function yt(e){return ge(e)&&"type"in e&&typeof e.type=="string"}var ve=Symbol.for("immer-nothing"),L=Symbol.for("immer-draftable"),A=Symbol.for("immer-state");function O(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var I=Object.getPrototypeOf;function k(e){return!!e&&!!e[A]}function M(e){var t;return e?qe(e)||Array.isArray(e)||!!e[L]||!!((t=e.constructor)!=null&&t[L])||K(e)||H(e):!1}var mt=Object.prototype.constructor.toString();function qe(e){if(!e||typeof e!="object")return!1;const t=I(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===mt}function Sr(e){return k(e)||O(15,e),e[A].base_}function V(e,t){j(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function j(e){const t=e[A];return t?t.type_:Array.isArray(e)?1:K(e)?2:H(e)?3:0}function q(e,t){return j(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function oe(e,t){return j(e)===2?e.get(t):e[t]}function Ue(e,t,r){const n=j(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function _t(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function K(e){return e instanceof Map}function H(e){return e instanceof Set}function z(e){return e.copy_||e.base_}function pe(e,t){if(K(e))return new Map(e);if(H(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=qe(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[A];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){const c=i[o],a=n[c];a.writable===!1&&(a.writable=!0,a.configurable=!0),(a.get||a.set)&&(n[c]={configurable:!0,writable:!0,enumerable:a.enumerable,value:e[c]})}return Object.create(I(e),n)}else{const n=I(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function Se(e,t=!1){return te(e)||k(e)||!M(e)||(j(e)>1&&(e.set=e.add=e.clear=e.delete=wt),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Se(n,!0))),e}function wt(){O(2)}function te(e){return Object.isFrozen(e)}var he={};function F(e){const t=he[e];return t||O(0,e),t}function bt(e,t){he[e]||(he[e]=t)}var U;function $e(){return U}function gt(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Oe(e,t){t&&(F("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ye(e){me(e),e.drafts_.forEach(vt),e.drafts_=null}function me(e){e===U&&(U=e.parent_)}function Pe(e){return U=gt(U,e)}function vt(e){const t=e[A];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Ae(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[A].modified_&&(ye(t),O(4)),M(e)&&(e=Z(t,e),t.parent_||ee(t,e)),t.patches_&&F("Patches").generateReplacementPatches_(r[A].base_,e,t.patches_,t.inversePatches_)):e=Z(t,r,[]),ye(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ve?e:void 0}function Z(e,t,r){if(te(t))return t;const n=t[A];if(!n)return V(t,(i,o)=>De(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ee(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let o=i,c=!1;n.type_===3&&(o=new Set(i),i.clear(),c=!0),V(o,(a,u)=>De(e,n,i,a,u,r,c)),ee(e,i,!1),r&&e.patches_&&F("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function De(e,t,r,n,i,o,c){if(k(i)){const a=o&&t&&t.type_!==3&&!q(t.assigned_,n)?o.concat(n):void 0,u=Z(e,i,a);if(Ue(r,n,u),k(u))e.canAutoFreeze_=!1;else return}else c&&r.add(i);if(M(i)&&!te(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Z(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&ee(e,i)}}function ee(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Se(t,r)}function St(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:$e(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,o=Ee;r&&(i=[n],o=$);const{revoke:c,proxy:a}=Proxy.revocable(i,o);return n.draft_=a,n.revoke_=c,a}var Ee={get(e,t){if(t===A)return e;const r=z(e);if(!q(r,t))return Et(e,r,t);const n=r[t];return e.finalized_||!M(n)?n:n===ue(e.base_,t)?(ce(e),e.copy_[t]=we(n,e)):n},has(e,t){return t in z(e)},ownKeys(e){return Reflect.ownKeys(z(e))},set(e,t,r){const n=Ke(z(e),t);if(n!=null&&n.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=ue(z(e),t),o=i==null?void 0:i[A];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(_t(r,i)&&(r!==void 0||q(e.base_,t)))return!0;ce(e),_e(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ue(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ce(e),_e(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=z(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){O(11)},getPrototypeOf(e){return I(e.base_)},setPrototypeOf(){O(12)}},$={};V(Ee,(e,t)=>{$[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});$.deleteProperty=function(e,t){return $.set.call(this,e,t,void 0)};$.set=function(e,t,r){return Ee.set.call(this,e[0],t,r,e[0])};function ue(e,t){const r=e[A];return(r?z(r):e)[t]}function Et(e,t,r){var i;const n=Ke(t,r);return n?"value"in n?n.value:(i=n.get)==null?void 0:i.call(e.draft_):void 0}function Ke(e,t){if(!(t in e))return;let r=I(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=I(r)}}function _e(e){e.modified_||(e.modified_=!0,e.parent_&&_e(e.parent_))}function ce(e){e.copy_||(e.copy_=pe(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Ct=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const o=r;r=t;const c=this;return function(u=o,...d){return c.produce(u,f=>r.call(this,f,...d))}}typeof r!="function"&&O(6),n!==void 0&&typeof n!="function"&&O(7);let i;if(M(t)){const o=Pe(this),c=we(t,void 0);let a=!0;try{i=r(c),a=!1}finally{a?ye(o):me(o)}return Oe(o,n),Ae(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===ve&&(i=void 0),this.autoFreeze_&&Se(i,!0),n){const o=[],c=[];F("Patches").generateReplacementPatches_(t,i,o,c),n(o,c)}return i}else O(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(c,...a)=>this.produceWithPatches(c,u=>t(u,...a));let n,i;return[this.produce(t,r,(c,a)=>{n=c,i=a}),n,i]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){M(e)||O(8),k(e)&&(e=Rt(e));const t=Pe(this),r=we(e,void 0);return r[A].isManual_=!0,me(t),r}finishDraft(e,t){const r=e&&e[A];(!r||!r.isManual_)&&O(9);const{scope_:n}=r;return Oe(n,t),Ae(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=F("Patches").applyPatches_;return k(e)?n(e,t):this.produce(e,i=>n(i,t))}};function we(e,t){const r=K(e)?F("MapSet").proxyMap_(e,t):H(e)?F("MapSet").proxySet_(e,t):St(e,t);return(t?t.scope_:$e()).drafts_.push(r),r}function Rt(e){return k(e)||O(10,e),He(e)}function He(e){if(!M(e)||te(e))return e;const t=e[A];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=pe(e,t.scope_.immer_.useStrictShallowCopy_)}else r=pe(e,!0);return V(r,(n,i)=>{Ue(r,n,He(i))}),t&&(t.finalized_=!1),r}function Er(){const t="replace",r="add",n="remove";function i(s,m,y,g){switch(s.type_){case 0:case 2:return c(s,m,y,g);case 1:return o(s,m,y,g);case 3:return a(s,m,y,g)}}function o(s,m,y,g){let{base_:b,assigned_:w}=s,_=s.copy_;_.length<b.length&&([b,_]=[_,b],[y,g]=[g,y]);for(let l=0;l<b.length;l++)if(w[l]&&_[l]!==b[l]){const p=m.concat([l]);y.push({op:t,path:p,value:h(_[l])}),g.push({op:t,path:p,value:h(b[l])})}for(let l=b.length;l<_.length;l++){const p=m.concat([l]);y.push({op:r,path:p,value:h(_[l])})}for(let l=_.length-1;b.length<=l;--l){const p=m.concat([l]);g.push({op:n,path:p})}}function c(s,m,y,g){const{base_:b,copy_:w}=s;V(s.assigned_,(_,l)=>{const p=oe(b,_),S=oe(w,_),v=l?q(b,_)?t:r:n;if(p===S&&v===t)return;const E=m.concat(_);y.push(v===n?{op:v,path:E}:{op:v,path:E,value:S}),g.push(v===r?{op:n,path:E}:v===n?{op:r,path:E,value:h(p)}:{op:t,path:E,value:h(p)})})}function a(s,m,y,g){let{base_:b,copy_:w}=s,_=0;b.forEach(l=>{if(!w.has(l)){const p=m.concat([_]);y.push({op:n,path:p,value:l}),g.unshift({op:r,path:p,value:l})}_++}),_=0,w.forEach(l=>{if(!b.has(l)){const p=m.concat([_]);y.push({op:r,path:p,value:l}),g.unshift({op:n,path:p,value:l})}_++})}function u(s,m,y,g){y.push({op:t,path:[],value:m===ve?void 0:m}),g.push({op:t,path:[],value:s})}function d(s,m){return m.forEach(y=>{const{path:g,op:b}=y;let w=s;for(let S=0;S<g.length-1;S++){const v=j(w);let E=g[S];typeof E!="string"&&typeof E!="number"&&(E=""+E),(v===0||v===1)&&(E==="__proto__"||E==="constructor")&&O(19),typeof w=="function"&&E==="prototype"&&O(19),w=oe(w,E),typeof w!="object"&&O(18,g.join("/"))}const _=j(w),l=f(y.value),p=g[g.length-1];switch(b){case t:switch(_){case 2:return w.set(p,l);case 3:O(16);default:return w[p]=l}case r:switch(_){case 1:return p==="-"?w.push(l):w.splice(p,0,l);case 2:return w.set(p,l);case 3:return w.add(l);default:return w[p]=l}case n:switch(_){case 1:return w.splice(p,1);case 2:return w.delete(p);case 3:return w.delete(y.value);default:return delete w[p]}default:O(17,b)}}),s}function f(s){if(!M(s))return s;if(Array.isArray(s))return s.map(f);if(K(s))return new Map(Array.from(s.entries()).map(([y,g])=>[y,f(g)]));if(H(s))return new Set(Array.from(s).map(f));const m=Object.create(I(s));for(const y in s)m[y]=f(s[y]);return q(s,L)&&(m[L]=s[L]),m}function h(s){return k(s)?f(s):s}bt("Patches",{applyPatches_:d,generatePatches_:i,generateReplacementPatches_:u})}var D=new Ct,Ge=D.produce,Cr=D.produceWithPatches.bind(D);D.setAutoFreeze.bind(D);D.setUseStrictShallowCopy.bind(D);var Rr=D.applyPatches.bind(D);D.createDraft.bind(D);D.finishDraft.bind(D);function Xe(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var Ot=Xe(),Pt=Xe,At=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Y:Y.apply(null,arguments)},Dt=e=>e&&typeof e.match=="function";function B(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(x(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>yt(n)&&n.type===e,r}var Qe=class W extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,W.prototype)}static get[Symbol.species](){return W}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new W(...t[0].concat(this)):new W(...t.concat(this))}};function Me(e){return M(e)?Ge(e,()=>{}):e}function xe(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Mt(e){return typeof e=="boolean"}var xt=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let c=new Qe;return r&&(Mt(r)?c.push(Ot):c.push(Pt(r.extraArgument))),c},Je="RTK_autoBatch",Or=()=>e=>({payload:e,meta:{[Je]:!0}}),ke=e=>t=>{setTimeout(t,e)},kt=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,o=!1,c=!1;const a=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:ke(10):e.type==="callback"?e.queueNotification:ke(e.timeout),d=()=>{c=!1,o&&(o=!1,a.forEach(f=>f()))};return Object.assign({},n,{subscribe(f){const h=()=>i&&f(),s=n.subscribe(h);return a.add(f),()=>{s(),a.delete(f)}},dispatch(f){var h;try{return i=!((h=f==null?void 0:f.meta)!=null&&h[Je]),o=!i,o&&(c||(c=!0,u(d))),n.dispatch(f)}finally{i=!0}}})},Nt=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new Qe(e);return n&&i.push(kt(typeof n=="object"?n:void 0)),i};function Pr(e){const t=xt(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:c=void 0}=e||{};let a;if(typeof r=="function")a=r;else if(ge(r))a=pt(r);else throw new Error(x(1));let u;typeof n=="function"?u=n(t):u=t();let d=Y;i&&(d=At({trace:!1,...typeof i=="object"&&i}));const f=ht(...u),h=Nt(f);let s=typeof c=="function"?c(h):h();const m=d(...s);return Ve(a,o,m)}function Ye(e){const t={},r=[];let n;const i={addCase(o,c){const a=typeof o=="string"?o:o.type;if(!a)throw new Error(x(28));if(a in t)throw new Error(x(29));return t[a]=c,i},addMatcher(o,c){return r.push({matcher:o,reducer:c}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function Tt(e){return typeof e=="function"}function zt(e,t){let[r,n,i]=Ye(t),o;if(Tt(e))o=()=>Me(e());else{const a=Me(e);o=()=>a}function c(a=o(),u){let d=[r[u.type],...n.filter(({matcher:f})=>f(u)).map(({reducer:f})=>f)];return d.filter(f=>!!f).length===0&&(d=[i]),d.reduce((f,h)=>{if(h)if(k(f)){const m=h(f,u);return m===void 0?f:m}else{if(M(f))return Ge(f,s=>h(s,u));{const s=h(f,u);if(s===void 0){if(f===null)return f;throw Error("A case reducer on a non-draftable value must not return undefined")}return s}}return f},a)}return c.getInitialState=o,c}var Ze=(e,t)=>Dt(e)?e.match(t):e(t);function G(...e){return t=>e.some(r=>Ze(r,t))}function Ne(...e){return t=>e.every(r=>Ze(r,t))}function re(e,t){if(!e||!e.meta)return!1;const r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function X(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function It(...e){return e.length===0?t=>re(t,["pending"]):X(e)?G(...e.map(t=>t.pending)):It()(e[0])}function be(...e){return e.length===0?t=>re(t,["rejected"]):X(e)?G(...e.map(t=>t.rejected)):be()(e[0])}function jt(...e){const t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Ne(be(...e),t):X(e)?Ne(be(...e),t):jt()(e[0])}function Ft(...e){return e.length===0?t=>re(t,["fulfilled"]):X(e)?G(...e.map(t=>t.fulfilled)):Ft()(e[0])}function Wt(...e){return e.length===0?t=>re(t,["pending","fulfilled","rejected"]):X(e)?G(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Wt()(e[0])}var Lt="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Bt=(e=21)=>{let t="",r=e;for(;r--;)t+=Lt[Math.random()*64|0];return t},Vt=["name","message","stack","code"],se=class{constructor(e,t){ne(this,"_type");this.payload=e,this.meta=t}},Te=class{constructor(e,t){ne(this,"_type");this.payload=e,this.meta=t}},qt=e=>{if(typeof e=="object"&&e!==null){const t={};for(const r of Vt)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Ar=(()=>{function e(t,r,n){const i=B(t+"/fulfilled",(u,d,f,h)=>({payload:u,meta:{...h||{},arg:f,requestId:d,requestStatus:"fulfilled"}})),o=B(t+"/pending",(u,d,f)=>({payload:void 0,meta:{...f||{},arg:d,requestId:u,requestStatus:"pending"}})),c=B(t+"/rejected",(u,d,f,h,s)=>({payload:h,error:(n&&n.serializeError||qt)(u||"Rejected"),meta:{...s||{},arg:f,requestId:d,rejectedWithValue:!!h,requestStatus:"rejected",aborted:(u==null?void 0:u.name)==="AbortError",condition:(u==null?void 0:u.name)==="ConditionError"}}));function a(u){return(d,f,h)=>{const s=n!=null&&n.idGenerator?n.idGenerator(u):Bt(),m=new AbortController;let y,g;function b(_){g=_,m.abort()}const w=async function(){var p,S;let _;try{let v=(p=n==null?void 0:n.condition)==null?void 0:p.call(n,u,{getState:f,extra:h});if($t(v)&&(v=await v),v===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,N)=>{y=()=>{N({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",y)});d(o(s,u,(S=n==null?void 0:n.getPendingMeta)==null?void 0:S.call(n,{requestId:s,arg:u},{getState:f,extra:h}))),_=await Promise.race([E,Promise.resolve(r(u,{dispatch:d,getState:f,extra:h,requestId:s,signal:m.signal,abort:b,rejectWithValue:(C,N)=>new se(C,N),fulfillWithValue:(C,N)=>new Te(C,N)})).then(C=>{if(C instanceof se)throw C;return C instanceof Te?i(C.payload,s,u,C.meta):i(C,s,u)})])}catch(v){_=v instanceof se?c(null,s,u,v.payload,v.meta):c(v,s,u)}finally{y&&m.signal.removeEventListener("abort",y)}return n&&!n.dispatchConditionRejection&&c.match(_)&&_.meta.condition||d(_),_}();return Object.assign(w,{abort:b,requestId:s,arg:u,unwrap(){return w.then(Ut)}})}}return Object.assign(a,{pending:o,rejected:c,fulfilled:i,settled:G(c,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Ut(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function $t(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Kt=Symbol.for("rtk-slice-createasyncthunk");function Ht(e,t){return`${e}/${t}`}function Gt({creators:e}={}){var r;const t=(r=e==null?void 0:e.asyncThunk)==null?void 0:r[Kt];return function(i){const{name:o,reducerPath:c=o}=i;if(!o)throw new Error(x(11));const a=(typeof i.reducers=="function"?i.reducers(Qt()):i.reducers)||{},u=Object.keys(a),d={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},f={addCase(l,p){const S=typeof l=="string"?l:l.type;if(!S)throw new Error(x(12));if(S in d.sliceCaseReducersByType)throw new Error(x(13));return d.sliceCaseReducersByType[S]=p,f},addMatcher(l,p){return d.sliceMatchers.push({matcher:l,reducer:p}),f},exposeAction(l,p){return d.actionCreators[l]=p,f},exposeCaseReducer(l,p){return d.sliceCaseReducersByName[l]=p,f}};u.forEach(l=>{const p=a[l],S={reducerName:l,type:Ht(o,l),createNotation:typeof i.reducers=="function"};Yt(p)?er(S,p,f,t):Jt(S,p,f)});function h(){const[l={},p=[],S=void 0]=typeof i.extraReducers=="function"?Ye(i.extraReducers):[i.extraReducers],v={...l,...d.sliceCaseReducersByType};return zt(i.initialState,E=>{for(let C in v)E.addCase(C,v[C]);for(let C of d.sliceMatchers)E.addMatcher(C.matcher,C.reducer);for(let C of p)E.addMatcher(C.matcher,C.reducer);S&&E.addDefaultCase(S)})}const s=l=>l,m=new Map;let y;function g(l,p){return y||(y=h()),y(l,p)}function b(){return y||(y=h()),y.getInitialState()}function w(l,p=!1){function S(E){let C=E[l];return typeof C>"u"&&p&&(C=b()),C}function v(E=s){const C=xe(m,p,()=>new WeakMap);return xe(C,E,()=>{const N={};for(const[nt,it]of Object.entries(i.selectors??{}))N[nt]=Xt(it,E,b,p);return N})}return{reducerPath:l,getSelectors:v,get selectors(){return v(S)},selectSlice:S}}const _={name:o,reducer:g,actions:d.actionCreators,caseReducers:d.sliceCaseReducersByName,getInitialState:b,...w(c),injectInto(l,{reducerPath:p,...S}={}){const v=p??c;return l.inject({reducerPath:v,reducer:g},S),{..._,...w(v,!0)}}};return _}}function Xt(e,t,r,n){function i(o,...c){let a=t(o);return typeof a>"u"&&n&&(a=r()),e(a,...c)}return i.unwrapped=e,i}var Dr=Gt();function Qt(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function Jt({type:e,reducerName:t,createNotation:r},n,i){let o,c;if("reducer"in n){if(r&&!Zt(n))throw new Error(x(17));o=n.reducer,c=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,c?B(e,c):B(e))}function Yt(e){return e._reducerDefinitionType==="asyncThunk"}function Zt(e){return e._reducerDefinitionType==="reducerWithPrepare"}function er({type:e,reducerName:t},r,n,i){if(!i)throw new Error(x(18));const{payloadCreator:o,fulfilled:c,pending:a,rejected:u,settled:d,options:f}=r,h=i(e,o,f);n.exposeAction(t,h),c&&n.addCase(h.fulfilled,c),a&&n.addCase(h.pending,a),u&&n.addCase(h.rejected,u),d&&n.addMatcher(h.settled,d),n.exposeCaseReducer(t,{fulfilled:c||Q,pending:a||Q,rejected:u||Q,settled:d||Q})}function Q(){}function x(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var fe={exports:{}},ae={};/**
2
+ * @license React
3
+ * use-sync-external-store-with-selector.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 ze;function tr(){if(ze)return ae;ze=1;var e=ft();function t(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,c=e.useMemo,a=e.useDebugValue;return ae.useSyncExternalStoreWithSelector=function(u,d,f,h,s){var m=i(null);if(m.current===null){var y={hasValue:!1,value:null};m.current=y}else y=m.current;m=c(function(){function b(S){if(!w){if(w=!0,_=S,S=h(S),s!==void 0&&y.hasValue){var v=y.value;if(s(v,S))return l=v}return l=S}if(v=l,r(_,S))return v;var E=h(S);return s!==void 0&&s(v,E)?(_=S,v):(_=S,l=E)}var w=!1,_,l,p=f===void 0?null:f;return[function(){return b(d())},p===null?void 0:function(){return b(p())}]},[d,f,h,s]);var g=n(u,m[0],m[1]);return o(function(){y.hasValue=!0,y.value=g},[g]),a(g),g},ae}var Ie;function rr(){return Ie||(Ie=1,fe.exports=tr()),fe.exports}var nr=rr();function et(e){e()}function ir(){let e=null,t=null;return{clear(){e=null,t=null},notify(){et(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var je={notify(){},get:()=>[]};function or(e,t){let r,n=je,i=0,o=!1;function c(g){f();const b=n.subscribe(g);let w=!1;return()=>{w||(w=!0,b(),h())}}function a(){n.notify()}function u(){y.onStateChange&&y.onStateChange()}function d(){return o}function f(){i++,r||(r=e.subscribe(u),n=ir())}function h(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=je)}function s(){o||(o=!0,f())}function m(){o&&(o=!1,h())}const y={addNestedSub:c,notifyNestedSubs:a,handleChangeWrapper:u,isSubscribed:d,trySubscribe:s,tryUnsubscribe:m,getListeners:()=>n};return y}var ur=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",cr=ur(),sr=()=>typeof navigator<"u"&&navigator.product==="ReactNative",fr=sr(),ar=()=>cr||fr?P.useLayoutEffect:P.useEffect,lr=ar();function Fe(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Mr(e,t){if(Fe(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let i=0;i<r.length;i++)if(!Object.prototype.hasOwnProperty.call(t,r[i])||!Fe(e[r[i]],t[r[i]]))return!1;return!0}var le=Symbol.for("react-redux-context"),de=typeof globalThis<"u"?globalThis:{};function dr(){if(!P.createContext)return{};const e=de[le]??(de[le]=new Map);let t=e.get(P.createContext);return t||(t=P.createContext(null),e.set(P.createContext,t)),t}var T=dr();function pr(e){const{children:t,context:r,serverState:n,store:i}=e,o=P.useMemo(()=>{const u=or(i);return{store:i,subscription:u,getServerState:n?()=>n:void 0}},[i,n]),c=P.useMemo(()=>i.getState(),[i]);lr(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),c!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,c]);const a=r||T;return P.createElement(a.Provider,{value:o},t)}var xr=pr;function Ce(e=T){return function(){return P.useContext(e)}}var tt=Ce();function rt(e=T){const t=e===T?tt:Ce(e),r=()=>{const{store:n}=t();return n};return Object.assign(r,{withTypes:()=>r}),r}var hr=rt();function yr(e=T){const t=e===T?hr:rt(e),r=()=>t().dispatch;return Object.assign(r,{withTypes:()=>r}),r}var kr=yr(),mr=(e,t)=>e===t;function _r(e=T){const t=e===T?tt:Ce(e),r=(n,i={})=>{const{equalityFn:o=mr}=typeof i=="function"?{equalityFn:i}:i,c=t(),{store:a,subscription:u,getServerState:d}=c;P.useRef(!0);const f=P.useCallback({[n.name](s){return n(s)}}[n.name],[n]),h=nr.useSyncExternalStoreWithSelector(u.addNestedSub,a.getState,d||a.getState,f,o);return P.useDebugValue(h),h};return Object.assign(r,{withTypes:()=>r}),r}var Nr=_r(),Tr=et;export{Wt as A,k as B,Sr as C,Tr as D,Mr as E,xr as P,Je as S,vr as a,Nr as b,Pr as c,hr as d,Ar as e,Dr as f,x as g,Er as h,ge as i,B as j,G as k,jt as l,Ft as m,Bt as n,Rr as o,Or as p,pt as q,Ge as r,Ne as s,be as t,kr as u,It as v,gr as w,M as x,Cr as y,yt as z};
@@ -0,0 +1 @@
1
+ import{c as u,P as d,w as l,a as p}from"./react-redux-kbMjYGuQ.js";import{a as i,n as e,M as h,L as m,S as f,o as x,O as j,p as E}from"./chunk-KNED5TY2-DAA_sFzt.js";import{u as g,o as w,s as o,a as S,b,c as A}from"./authSlice-B3Tyl-Nw.js";import{s as L,e as n}from"./editorialApi-fQchmMa9.js";import"./tslib.es6-CDuPK5Eb.js";function P(){const t=g();return i.useEffect(()=>{const s=w(b,r=>{t(r?o({uid:r.uid,email:r.email}):o(void 0)),t(S(!1))});return()=>s()},[t]),null}function R(){const t=u({reducer:{auth:A,[n.reducerPath]:n.reducer},middleware:s=>s().concat(n.middleware)});return L(t.dispatch),t}function v({children:t}){const s=i.useRef(null);return s.current||(s.current=R()),e.jsx(d,{store:s.current,children:t})}const C=()=>[];function M({}){return[{title:"Editorial Admin"}]}function T({children:t}){return e.jsxs("html",{lang:"en",className:"min-h-screen",children:[e.jsxs("head",{children:[e.jsx("meta",{charSet:"utf-8"}),e.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),e.jsx(h,{}),e.jsx(m,{})]}),e.jsxs("body",{className:"h-full min-h-screen bg-background font-sans antialiased",children:[e.jsxs(v,{children:[e.jsx(P,{}),t]}),e.jsx(f,{}),e.jsx(x,{})]})]})}const q=l(function(){return e.jsx(j,{})}),D=p(function({error:s}){let r="Oops!",a="An unexpected error occurred.",c;return E(s)&&(r=s.status===404?"404":"Error",a=s.status===404?"The requested page could not be found.":s.statusText||a),e.jsxs("main",{className:"pt-16 p-4 container mx-auto",children:[e.jsx("h1",{children:r}),e.jsx("p",{children:a}),c]})});export{D as ErrorBoundary,T as Layout,q as default,C as links,M as meta};
@@ -1,4 +1,4 @@
1
- import{c}from"./createLucideIcon-TQsNVzYU.js";/**
1
+ import{c}from"./createLucideIcon-R2-3a7hN.js";/**
2
2
  * @license lucide-react v0.487.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,13 +1,13 @@
1
- <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><link rel="modulepreload" href="/assets/manifest-a309df9e.js"/><link rel="modulepreload" href="/assets/entry.client-B5Ca3clj.js"/><link rel="modulepreload" href="/assets/chunk-KNED5TY2-CXj9yqcQ.js"/><link rel="modulepreload" href="/assets/index-B7e3fQ32.js"/><link rel="modulepreload" href="/assets/root-DHDQPxhg.js"/><link rel="modulepreload" href="/assets/index-G-cqIhgh.js"/><link rel="modulepreload" href="/assets/authSlice-KDhecIDl.js"/><link rel="modulepreload" href="/assets/editorialApi-DCnC5eM9.js"/><link rel="modulepreload" href="/assets/tslib.es6-CDuPK5Eb.js"/><link rel="stylesheet" href="/assets/root-DS7N36v7.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><script>
1
+ <!DOCTYPE html><html lang="en" class="min-h-screen"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><title>Editorial Admin</title><link rel="modulepreload" href="/assets/manifest-9974ee04.js"/><link rel="modulepreload" href="/assets/entry.client-BGu2H8xv.js"/><link rel="modulepreload" href="/assets/chunk-KNED5TY2-DAA_sFzt.js"/><link rel="modulepreload" href="/assets/index-C-vcF2DZ.js"/><link rel="modulepreload" href="/assets/root-wKvfXBjk.js"/><link rel="modulepreload" href="/assets/react-redux-kbMjYGuQ.js"/><link rel="modulepreload" href="/assets/authSlice-B3Tyl-Nw.js"/><link rel="modulepreload" href="/assets/editorialApi-fQchmMa9.js"/><link rel="modulepreload" href="/assets/tslib.es6-CDuPK5Eb.js"/><link rel="stylesheet" href="/assets/root-DS7N36v7.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><script>
2
2
  console.log(
3
3
  "💿 Hey developer 👋. You can provide a way better UX than this " +
4
4
  "when your app is loading JS modules and/or running `clientLoader` " +
5
5
  "functions. Check out https://remix.run/route/hydrate-fallback " +
6
6
  "for more information."
7
7
  );
8
- </script><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-a309df9e.js";
9
- import * as route0 from "/assets/root-DHDQPxhg.js";
8
+ </script><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"ssr":false,"isSpaMode":true};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());</script><script type="module" async="">import "/assets/manifest-9974ee04.js";
9
+ import * as route0 from "/assets/root-wKvfXBjk.js";
10
10
 
11
11
  window.__reactRouterRouteModules = {"root":route0};
12
12
 
13
- import("/assets/entry.client-B5Ca3clj.js");</script><!--$--><script>window.__reactRouterContext.streamController.enqueue("[{\"_1\":2,\"_4\":-5,\"_5\":-5},\"loaderData\",{\"_3\":-5},\"root\",\"actionData\",\"errors\"]\n");</script><!--$--><script>window.__reactRouterContext.streamController.close();</script><!--/$--><!--/$--></body></html>
13
+ import("/assets/entry.client-BGu2H8xv.js");</script><!--$--><script>window.__reactRouterContext.streamController.enqueue("[{\"_1\":2,\"_4\":-5,\"_5\":-5},\"loaderData\",{\"_3\":-5},\"root\",\"actionData\",\"errors\"]\n");</script><!--$--><script>window.__reactRouterContext.streamController.close();</script><!--/$--><!--/$--></body></html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-admin",
3
- "version": "6.0.2",
3
+ "version": "6.0.4",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -78,16 +78,18 @@
78
78
  "tailwindcss": "^4.1.3",
79
79
  "tailwindcss-animate": "^1.0.7",
80
80
  "vaul": "^1.1.2",
81
- "vite-plugin-babel": "^1.3.0",
82
- "zod": "^3.24.1",
83
- "@isardsat/editorial-common": "^6.0.2"
81
+ "zod": "^4.0.2",
82
+ "@isardsat/editorial-common": "^6.0.4"
84
83
  },
85
84
  "devDependencies": {
86
- "@types/node": "^20",
87
- "@types/react": "^19.0.1",
88
- "@types/react-dom": "^19.0.1",
89
- "typescript": "^5.7.2",
90
- "vite": "^5.4.11",
85
+ "@react-router/dev": "^7.5.3",
86
+ "@tailwindcss/vite": "^4.1.4",
87
+ "@types/node": "^22",
88
+ "@types/react": "^19.1.2",
89
+ "@types/react-dom": "^19.1.2",
90
+ "tailwindcss": "^4.1.4",
91
+ "typescript": "5.7.3",
92
+ "vite": "^6.3.3",
91
93
  "vite-tsconfig-paths": "^5.1.4"
92
94
  },
93
95
  "volta": {
@@ -1 +0,0 @@
1
- import{r as a,l as p}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{a as V,c as E}from"./utils-DslUJpbf.js";function b(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function x(...e){return n=>{let t=!1;const i=e.map(r=>{const o=b(r,n);return!t&&typeof o=="function"&&(t=!0),o});if(t)return()=>{for(let r=0;r<i.length;r++){const o=i[r];typeof o=="function"?o():b(e[r],null)}}}}function z(...e){return a.useCallback(x(...e),e)}function j(e){const n=_(e),t=a.forwardRef((i,r)=>{const{children:o,...u}=i,l=a.Children.toArray(o),v=l.find(R);if(v){const s=v.props.children,c=l.map(d=>d===v?a.Children.count(s)>1?a.Children.only(null):a.isValidElement(s)?s.props.children:null:d);return p.jsx(n,{...u,ref:r,children:a.isValidElement(s)?a.cloneElement(s,void 0,c):null})}return p.jsx(n,{...u,ref:r,children:o})});return t.displayName=`${e}.Slot`,t}var N=j("Slot");function _(e){const n=a.forwardRef((t,i)=>{const{children:r,...o}=t;if(a.isValidElement(r)){const u=O(r),l=w(o,r.props);return r.type!==a.Fragment&&(l.ref=i?x(i,u):u),a.cloneElement(r,l)}return a.Children.count(r)>1?a.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var C=Symbol("radix.slottable");function B(e){const n=({children:t})=>p.jsx(p.Fragment,{children:t});return n.displayName=`${e}.Slottable`,n.__radixId=C,n}function R(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===C}function w(e,n){const t={...n};for(const i in n){const r=e[i],o=n[i];/^on[A-Z]/.test(i)?r&&o?t[i]=(...l)=>{o(...l),r(...l)}:r&&(t[i]=r):i==="style"?t[i]={...r,...o}:i==="className"&&(t[i]=[r,o].filter(Boolean).join(" "))}return{...e,...t}}function O(e){var i,r;let n=(i=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:i.get,t=n&&"isReactWarning"in n&&n.isReactWarning;return t?e.ref:(n=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,t=n&&"isReactWarning"in n&&n.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const y=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,h=V,P=(e,n)=>t=>{var i;if((n==null?void 0:n.variants)==null)return h(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:r,defaultVariants:o}=n,u=Object.keys(r).map(s=>{const c=t==null?void 0:t[s],d=o==null?void 0:o[s];if(c===null)return null;const f=y(c)||y(d);return r[s][f]}),l=t&&Object.entries(t).reduce((s,c)=>{let[d,f]=c;return f===void 0||(s[d]=f),s},{}),v=n==null||(i=n.compoundVariants)===null||i===void 0?void 0:i.reduce((s,c)=>{let{class:d,className:f,...S}=c;return Object.entries(S).every(k=>{let[m,g]=k;return Array.isArray(g)?g.includes({...o,...l}[m]):{...o,...l}[m]===g})?[...s,d,f]:s},[]);return h(e,u,v,t==null?void 0:t.class,t==null?void 0:t.className)},A=P("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function T({className:e,variant:n,size:t,asChild:i=!1,...r}){const o=i?N:"button";return p.jsx(o,{"data-slot":"button",className:E(A({variant:n,size:t,className:e})),...r})}export{T as B,N as S,j as a,B as b,P as c,z as u};
@@ -1,6 +0,0 @@
1
- import{c as o}from"./createLucideIcon-TQsNVzYU.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,51 +0,0 @@
1
- var Aa=Object.defineProperty;var Na=(e,t,r)=>t in e?Aa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var vt=(e,t,r)=>Na(e,typeof t!="symbol"?t+"":t,r);function $a(e,t){for(var r=0;r<t.length;r++){const a=t[r];if(typeof a!="string"&&!Array.isArray(a)){for(const n in a)if(n!=="default"&&!(n in e)){const o=Object.getOwnPropertyDescriptor(a,n);o&&Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>a[n]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var ql=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ia(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xn={exports:{}},kt={};/**
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 Fa=Symbol.for("react.transitional.element"),ja=Symbol.for("react.fragment");function Ln(e,t,r){var a=null;if(r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),"key"in t){r={};for(var n in t)n!=="key"&&(r[n]=t[n])}else r=t;return t=r.ref,{$$typeof:Fa,type:e,key:a,ref:t!==void 0?t:null,props:r}}kt.Fragment=ja;kt.jsx=Ln;kt.jsxs=Ln;xn.exports=kt;var Ql=xn.exports,Cn={exports:{}},F={};/**
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 ir=Symbol.for("react.transitional.element"),Ua=Symbol.for("react.portal"),Ha=Symbol.for("react.fragment"),za=Symbol.for("react.strict_mode"),Ba=Symbol.for("react.profiler"),Ya=Symbol.for("react.consumer"),Wa=Symbol.for("react.context"),Va=Symbol.for("react.forward_ref"),Ja=Symbol.for("react.suspense"),Ga=Symbol.for("react.memo"),Pn=Symbol.for("react.lazy"),zr=Symbol.iterator;function Ka(e){return e===null||typeof e!="object"?null:(e=zr&&e[zr]||e["@@iterator"],typeof e=="function"?e:null)}var Tn={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Mn=Object.assign,_n={};function ze(e,t,r){this.props=e,this.context=t,this.refs=_n,this.updater=r||Tn}ze.prototype.isReactComponent={};ze.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};ze.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Dn(){}Dn.prototype=ze.prototype;function lr(e,t,r){this.props=e,this.context=t,this.refs=_n,this.updater=r||Tn}var sr=lr.prototype=new Dn;sr.constructor=lr;Mn(sr,ze.prototype);sr.isPureReactComponent=!0;var Br=Array.isArray,W={H:null,A:null,T:null,S:null},On=Object.prototype.hasOwnProperty;function ur(e,t,r,a,n,o){return r=o.ref,{$$typeof:ir,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Xa(e,t){return ur(e.type,t,void 0,void 0,void 0,e.props)}function cr(e){return typeof e=="object"&&e!==null&&e.$$typeof===ir}function qa(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var Yr=/\/+/g;function Bt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?qa(""+e.key):t.toString(36)}function Wr(){}function Qa(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Wr,Wr):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function He(e,t,r,a,n){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(o){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case ir:case Ua:l=!0;break;case Pn:return l=e._init,He(l(e._payload),t,r,a,n)}}if(l)return n=n(e),l=a===""?"."+Bt(e,0):a,Br(n)?(r="",l!=null&&(r=l.replace(Yr,"$&/")+"/"),He(n,t,r,"",function(u){return u})):n!=null&&(cr(n)&&(n=Xa(n,r+(n.key==null||e&&e.key===n.key?"":(""+n.key).replace(Yr,"$&/")+"/")+l)),t.push(n)),1;l=0;var s=a===""?".":a+":";if(Br(e))for(var i=0;i<e.length;i++)a=e[i],o=s+Bt(a,i),l+=He(a,t,r,o,n);else if(i=Ka(e),typeof i=="function")for(e=i.call(e),i=0;!(a=e.next()).done;)a=a.value,o=s+Bt(a,i++),l+=He(a,t,r,o,n);else if(o==="object"){if(typeof e.then=="function")return He(Qa(e),t,r,a,n);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function gt(e,t,r){if(e==null)return e;var a=[],n=0;return He(e,a,"","",function(o){return t.call(r,o,n++)}),a}function Za(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Vr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function eo(){}F.Children={map:gt,forEach:function(e,t,r){gt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return gt(e,function(){t++}),t},toArray:function(e){return gt(e,function(t){return t})||[]},only:function(e){if(!cr(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};F.Component=ze;F.Fragment=Ha;F.Profiler=Ba;F.PureComponent=lr;F.StrictMode=za;F.Suspense=Ja;F.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W;F.act=function(){throw Error("act(...) is not supported in production builds of React.")};F.cache=function(e){return function(){return e.apply(null,arguments)}};F.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=Mn({},e.props),n=e.key,o=void 0;if(t!=null)for(l in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(n=""+t.key),t)!On.call(t,l)||l==="key"||l==="__self"||l==="__source"||l==="ref"&&t.ref===void 0||(a[l]=t[l]);var l=arguments.length-2;if(l===1)a.children=r;else if(1<l){for(var s=Array(l),i=0;i<l;i++)s[i]=arguments[i+2];a.children=s}return ur(e.type,n,void 0,void 0,o,a)};F.createContext=function(e){return e={$$typeof:Wa,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Ya,_context:e},e};F.createElement=function(e,t,r){var a,n={},o=null;if(t!=null)for(a in t.key!==void 0&&(o=""+t.key),t)On.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(n[a]=t[a]);var l=arguments.length-2;if(l===1)n.children=r;else if(1<l){for(var s=Array(l),i=0;i<l;i++)s[i]=arguments[i+2];n.children=s}if(e&&e.defaultProps)for(a in l=e.defaultProps,l)n[a]===void 0&&(n[a]=l[a]);return ur(e,o,void 0,void 0,null,n)};F.createRef=function(){return{current:null}};F.forwardRef=function(e){return{$$typeof:Va,render:e}};F.isValidElement=cr;F.lazy=function(e){return{$$typeof:Pn,_payload:{_status:-1,_result:e},_init:Za}};F.memo=function(e,t){return{$$typeof:Ga,type:e,compare:t===void 0?null:t}};F.startTransition=function(e){var t=W.T,r={};W.T=r;try{var a=e(),n=W.S;n!==null&&n(r,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(eo,Vr)}catch(o){Vr(o)}finally{W.T=t}};F.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()};F.use=function(e){return W.H.use(e)};F.useActionState=function(e,t,r){return W.H.useActionState(e,t,r)};F.useCallback=function(e,t){return W.H.useCallback(e,t)};F.useContext=function(e){return W.H.useContext(e)};F.useDebugValue=function(){};F.useDeferredValue=function(e,t){return W.H.useDeferredValue(e,t)};F.useEffect=function(e,t){return W.H.useEffect(e,t)};F.useId=function(){return W.H.useId()};F.useImperativeHandle=function(e,t,r){return W.H.useImperativeHandle(e,t,r)};F.useInsertionEffect=function(e,t){return W.H.useInsertionEffect(e,t)};F.useLayoutEffect=function(e,t){return W.H.useLayoutEffect(e,t)};F.useMemo=function(e,t){return W.H.useMemo(e,t)};F.useOptimistic=function(e,t){return W.H.useOptimistic(e,t)};F.useReducer=function(e,t,r){return W.H.useReducer(e,t,r)};F.useRef=function(e){return W.H.useRef(e)};F.useState=function(e){return W.H.useState(e)};F.useSyncExternalStore=function(e,t,r){return W.H.useSyncExternalStore(e,t,r)};F.useTransition=function(){return W.H.useTransition()};F.version="19.0.0";Cn.exports=F;var f=Cn.exports;const to=Ia(f),Zl=$a({__proto__:null,default:to},[f]);var ro=-1,no=-2,ao=-3,oo=-4,io=-5,lo=-6,so=-7,uo="B",co="D",kn="E",fo="M",ho="N",An="P",mo="R",po="S",yo="Y",vo="U",go="Z",Nn=class{constructor(){vt(this,"promise");vt(this,"resolve");vt(this,"reject");this.promise=new Promise((t,r)=>{this.resolve=t,this.reject=r})}};function wo(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,a){const n=e.decode(r,{stream:!0}),o=(t+n).split(`
18
- `);t=o.pop()||"";for(const l of o)a.enqueue(l)},flush(r){t&&r.enqueue(t)}})}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Yt=typeof window<"u"?window:typeof globalThis<"u"?globalThis:void 0;function Qt(e){const{hydrated:t,values:r}=this;if(typeof e=="number")return Jr.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const a=r.length;for(const n of e)r.push(n);return t.length=r.length,Jr.call(this,a)}function Jr(e){const{hydrated:t,values:r,deferred:a,plugins:n}=this;let o;const l=[[e,i=>{o=i}]];let s=[];for(;l.length>0;){const[i,u]=l.pop();switch(i){case so:u(void 0);continue;case io:u(null);continue;case no:u(NaN);continue;case lo:u(1/0);continue;case ao:u(-1/0);continue;case oo:u(-0);continue}if(t[i]){u(t[i]);continue}const d=r[i];if(!d||typeof d!="object"){t[i]=d,u(d);continue}if(Array.isArray(d))if(typeof d[0]=="string"){const[m,y,g]=d;switch(m){case co:u(t[i]=new Date(y));continue;case vo:u(t[i]=new URL(y));continue;case uo:u(t[i]=BigInt(y));continue;case mo:u(t[i]=new RegExp(y,g));continue;case yo:u(t[i]=Symbol.for(y));continue;case po:const E=new Set;t[i]=E;for(let T=1;T<d.length;T++)l.push([d[T],h=>{E.add(h)}]);u(E);continue;case fo:const R=new Map;t[i]=R;for(let T=1;T<d.length;T+=2){const h=[];l.push([d[T+1],P=>{h[1]=P}]),l.push([d[T],P=>{h[0]=P}]),s.push(()=>{R.set(h[0],h[1])})}u(R);continue;case ho:const w=Object.create(null);t[i]=w;for(const T of Object.keys(y).reverse()){const h=[];l.push([y[T],P=>{h[1]=P}]),l.push([Number(T.slice(1)),P=>{h[0]=P}]),s.push(()=>{w[h[0]]=h[1]})}u(w);continue;case An:if(t[y])u(t[i]=t[y]);else{const T=new Nn;a[y]=T,u(t[i]=T.promise)}continue;case kn:const[,S,x]=d;let L=x&&Yt&&Yt[x]?new Yt[x](S):new Error(S);t[i]=L,u(L);continue;case go:u(t[i]=t[y]);continue;default:if(Array.isArray(n)){const T=[],h=d.slice(1);for(let P=0;P<h.length;P++){const A=h[P];l.push([A,D=>{T[P]=D}])}s.push(()=>{for(const P of n){const A=P(d[0],...T);if(A){u(t[i]=A.value);return}}throw new SyntaxError});continue}throw new SyntaxError}}else{const m=[];t[i]=m;for(let y=0;y<d.length;y++){const g=d[y];g!==ro&&l.push([g,E=>{m[y]=E}])}u(m);continue}else{const m={};t[i]=m;for(const y of Object.keys(d).reverse()){const g=[];l.push([d[y],E=>{g[1]=E}]),l.push([Number(y.slice(1)),E=>{g[0]=E}]),s.push(()=>{m[g[0]]=g[1]})}u(m);continue}}for(;s.length>0;)s.pop()();return o}async function Eo(e,t){const{plugins:r}=t??{},a=new Nn,n=e.pipeThrough(wo()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},l=await Ro.call(o,n);let s=a.promise;return l.done?a.resolve():s=bo.call(o,n).then(a.resolve).catch(i=>{for(const u of Object.values(o.deferred))u.reject(i);a.reject(i)}),{done:s.then(()=>n.closed),value:l.value}}async function Ro(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:Qt.call(this,r)}}async function bo(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const r=t.value;switch(r[0]){case An:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const l=r.slice(a+1);let s;try{s=JSON.parse(l)}catch{throw new SyntaxError}const i=Qt.call(this,s);o.resolve(i);break}case kn:{const a=r.indexOf(":"),n=Number(r.slice(1,a)),o=this.deferred[n];if(!o)throw new Error(`Deferred ID ${n} not found in stream`);const l=r.slice(a+1);let s;try{s=JSON.parse(l)}catch{throw new SyntaxError}const i=Qt.call(this,s);o.reject(i);break}default:throw new SyntaxError}t=await e.read()}}var dr={};Object.defineProperty(dr,"__esModule",{value:!0});dr.parse=Mo;dr.serialize=_o;const So=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,xo=/^[\u0021-\u003A\u003C-\u007E]*$/,Lo=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Co=/^[\u0020-\u003A\u003D-\u007E]*$/,Po=Object.prototype.toString,To=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function Mo(e,t){const r=new To,a=e.length;if(a<2)return r;const n=(t==null?void 0:t.decode)||Do;let o=0;do{const l=e.indexOf("=",o);if(l===-1)break;const s=e.indexOf(";",o),i=s===-1?a:s;if(l>i){o=e.lastIndexOf(";",l-1)+1;continue}const u=Gr(e,o,l),d=Kr(e,l,u),m=e.slice(u,d);if(r[m]===void 0){let y=Gr(e,l+1,i),g=Kr(e,i,y);const E=n(e.slice(y,g));r[m]=E}o=i+1}while(o<a);return r}function Gr(e,t,r){do{const a=e.charCodeAt(t);if(a!==32&&a!==9)return t}while(++t<r);return r}function Kr(e,t,r){for(;t>r;){const a=e.charCodeAt(--t);if(a!==32&&a!==9)return t+1}return r}function _o(e,t,r){const a=(r==null?void 0:r.encode)||encodeURIComponent;if(!So.test(e))throw new TypeError(`argument name is invalid: ${e}`);const n=a(t);if(!xo.test(n))throw new TypeError(`argument val is invalid: ${t}`);let o=e+"="+n;if(!r)return o;if(r.maxAge!==void 0){if(!Number.isInteger(r.maxAge))throw new TypeError(`option maxAge is invalid: ${r.maxAge}`);o+="; Max-Age="+r.maxAge}if(r.domain){if(!Lo.test(r.domain))throw new TypeError(`option domain is invalid: ${r.domain}`);o+="; Domain="+r.domain}if(r.path){if(!Co.test(r.path))throw new TypeError(`option path is invalid: ${r.path}`);o+="; Path="+r.path}if(r.expires){if(!Oo(r.expires)||!Number.isFinite(r.expires.valueOf()))throw new TypeError(`option expires is invalid: ${r.expires}`);o+="; Expires="+r.expires.toUTCString()}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.partitioned&&(o+="; Partitioned"),r.priority)switch(typeof r.priority=="string"?r.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${r.priority}`)}if(r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${r.sameSite}`)}return o}function Do(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function Oo(e){return Po.call(e)==="[object Date]"}/**
19
- * react-router v7.5.0
20
- *
21
- * Copyright (c) Remix Software Inc.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE.md file in the root directory of this source tree.
25
- *
26
- * @license MIT
27
- */var $n=e=>{throw TypeError(e)},ko=(e,t,r)=>t.has(e)||$n("Cannot "+r),Wt=(e,t,r)=>(ko(e,t,"read from private field"),r?r.call(e):t.get(e)),Ao=(e,t,r)=>t.has(e)?$n("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Xr="popstate";function ts(e={}){function t(a,n){let{pathname:o,search:l,hash:s}=a.location;return nt("",{pathname:o,search:l,hash:s},n.state&&n.state.usr||null,n.state&&n.state.key||"default")}function r(a,n){return typeof n=="string"?n:be(n)}return $o(t,r,null,e)}function j(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function G(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function No(){return Math.random().toString(36).substring(2,10)}function qr(e,t){return{usr:e.state,key:e.key,idx:t}}function nt(e,t,r=null,a){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?xe(t):t,state:r,key:t&&t.key||a||No()}}function be({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 xe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function $o(e,t,r,a={}){let{window:n=document.defaultView,v5Compat:o=!1}=a,l=n.history,s="POP",i=null,u=d();u==null&&(u=0,l.replaceState({...l.state,idx:u},""));function d(){return(l.state||{idx:null}).idx}function m(){s="POP";let w=d(),S=w==null?null:w-u;u=w,i&&i({action:s,location:R.location,delta:S})}function y(w,S){s="PUSH";let x=nt(R.location,w,S);u=d()+1;let L=qr(x,u),T=R.createHref(x);try{l.pushState(L,"",T)}catch(h){if(h instanceof DOMException&&h.name==="DataCloneError")throw h;n.location.assign(T)}o&&i&&i({action:s,location:R.location,delta:1})}function g(w,S){s="REPLACE";let x=nt(R.location,w,S);u=d();let L=qr(x,u),T=R.createHref(x);l.replaceState(L,"",T),o&&i&&i({action:s,location:R.location,delta:0})}function E(w){let S=n.location.origin!=="null"?n.location.origin:n.location.href,x=typeof w=="string"?w:be(w);return x=x.replace(/ $/,"%20"),j(S,`No window.location.(origin|href) available to create URL for href: ${x}`),new URL(x,S)}let R={get action(){return s},get location(){return e(n,l)},listen(w){if(i)throw new Error("A history only accepts one active listener");return n.addEventListener(Xr,m),i=w,()=>{n.removeEventListener(Xr,m),i=null}},createHref(w){return t(n,w)},createURL:E,encodeLocation(w){let S=E(w);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:y,replace:g,go(w){return l.go(w)}};return R}var et,Qr=class{constructor(e){if(Ao(this,et,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Wt(this,et).has(e))return Wt(this,et).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Wt(this,et).set(e,t)}};et=new WeakMap;var Io=new Set(["lazy","caseSensitive","path","id","index","children"]);function Fo(e){return Io.has(e)}var jo=new Set(["lazy","caseSensitive","path","id","index","unstable_middleware","children"]);function Uo(e){return jo.has(e)}function Ho(e){return e.index===!0}function _t(e,t,r=[],a={}){return e.map((n,o)=>{let l=[...r,String(o)],s=typeof n.id=="string"?n.id:l.join("-");if(j(n.index!==!0||!n.children,"Cannot specify children on an index route"),j(!a[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),Ho(n)){let i={...n,...t(n),id:s};return a[s]=i,i}else{let i={...n,...t(n),id:s,children:void 0};return a[s]=i,n.children&&(i.children=_t(n.children,t,l,a)),i}})}function ge(e,t,r="/"){return Lt(e,t,r,!1)}function Lt(e,t,r,a){let n=typeof t=="string"?xe(t):t,o=ie(n.pathname||"/",r);if(o==null)return null;let l=Fn(e);zo(l);let s=null;for(let i=0;s==null&&i<l.length;++i){let u=Zo(o);s=qo(l[i],u,a)}return s}function In(e,t){let{route:r,pathname:a,params:n}=e;return{id:r.id,pathname:a,params:n,data:t[r.id],handle:r.handle}}function Fn(e,t=[],r=[],a=""){let n=(o,l,s)=>{let i={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:l,route:o};i.relativePath.startsWith("/")&&(j(i.relativePath.startsWith(a),`Absolute route path "${i.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),i.relativePath=i.relativePath.slice(a.length));let u=he([a,i.relativePath]),d=r.concat(i);o.children&&o.children.length>0&&(j(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Fn(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Ko(u,o.index),routesMeta:d})};return e.forEach((o,l)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))n(o,l);else for(let i of jn(o.path))n(o,l,i)}),t}function jn(e){let t=e.split("/");if(t.length===0)return[];let[r,...a]=t,n=r.endsWith("?"),o=r.replace(/\?$/,"");if(a.length===0)return n?[o,""]:[o];let l=jn(a.join("/")),s=[];return s.push(...l.map(i=>i===""?o:[o,i].join("/"))),n&&s.push(...l),s.map(i=>e.startsWith("/")&&i===""?"/":i)}function zo(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Xo(t.routesMeta.map(a=>a.childrenIndex),r.routesMeta.map(a=>a.childrenIndex)))}var Bo=/^:[\w-]+$/,Yo=3,Wo=2,Vo=1,Jo=10,Go=-2,Zr=e=>e==="*";function Ko(e,t){let r=e.split("/"),a=r.length;return r.some(Zr)&&(a+=Go),t&&(a+=Wo),r.filter(n=>!Zr(n)).reduce((n,o)=>n+(Bo.test(o)?Yo:o===""?Vo:Jo),a)}function Xo(e,t){return e.length===t.length&&e.slice(0,-1).every((a,n)=>a===t[n])?e[e.length-1]-t[t.length-1]:0}function qo(e,t,r=!1){let{routesMeta:a}=e,n={},o="/",l=[];for(let s=0;s<a.length;++s){let i=a[s],u=s===a.length-1,d=o==="/"?t:t.slice(o.length)||"/",m=Dt({path:i.relativePath,caseSensitive:i.caseSensitive,end:u},d),y=i.route;if(!m&&u&&r&&!a[a.length-1].route.index&&(m=Dt({path:i.relativePath,caseSensitive:i.caseSensitive,end:!1},d)),!m)return null;Object.assign(n,m.params),l.push({params:n,pathname:he([o,m.pathname]),pathnameBase:ri(he([o,m.pathnameBase])),route:y}),m.pathnameBase!=="/"&&(o=he([o,m.pathnameBase]))}return l}function Dt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,a]=Qo(e.path,e.caseSensitive,e.end),n=t.match(r);if(!n)return null;let o=n[0],l=o.replace(/(.)\/+$/,"$1"),s=n.slice(1);return{params:a.reduce((u,{paramName:d,isOptional:m},y)=>{if(d==="*"){let E=s[y]||"";l=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const g=s[y];return m&&!g?u[d]=void 0:u[d]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:l,pattern:e}}function Qo(e,t=!1,r=!0){G(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 a=[],n="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,s,i)=>(a.push({paramName:s,isOptional:i!=null}),i?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(a.push({paramName:"*"}),n+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?n+="\\/*$":e!==""&&e!=="/"&&(n+="(?:(?=\\/|$))"),[new RegExp(n,t?void 0:"i"),a]}function Zo(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return G(!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 ie(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,a=e.charAt(r);return a&&a!=="/"?null:e.slice(r)||"/"}function ei(e,t="/"){let{pathname:r,search:a="",hash:n=""}=typeof e=="string"?xe(e):e;return{pathname:r?r.startsWith("/")?r:ti(r,t):t,search:ni(a),hash:ai(n)}}function ti(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(n=>{n===".."?r.length>1&&r.pop():n!=="."&&r.push(n)}),r.length>1?r.join("/"):"/"}function Vt(e,t,r,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. 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 Un(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function fr(e){let t=Un(e);return t.map((r,a)=>a===t.length-1?r.pathname:r.pathnameBase)}function hr(e,t,r,a=!1){let n;typeof e=="string"?n=xe(e):(n={...e},j(!n.pathname||!n.pathname.includes("?"),Vt("?","pathname","search",n)),j(!n.pathname||!n.pathname.includes("#"),Vt("#","pathname","hash",n)),j(!n.search||!n.search.includes("#"),Vt("#","search","hash",n)));let o=e===""||n.pathname==="",l=o?"/":n.pathname,s;if(l==null)s=r;else{let m=t.length-1;if(!a&&l.startsWith("..")){let y=l.split("/");for(;y[0]==="..";)y.shift(),m-=1;n.pathname=y.join("/")}s=m>=0?t[m]:"/"}let i=ei(n,s),u=l&&l!=="/"&&l.endsWith("/"),d=(o||l===".")&&r.endsWith("/");return!i.pathname.endsWith("/")&&(u||d)&&(i.pathname+="/"),i}var he=e=>e.join("/").replace(/\/\/+/g,"/"),ri=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),ni=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ai=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,oi=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function ii(e,t){return new oi(e,typeof t=="number"?{status:t}:t)}var li=(e,t=302)=>{let r=t;typeof r=="number"?r={status:r}:typeof r.status>"u"&&(r.status=302);let a=new Headers(r.headers);return a.set("Location",e),new Response(null,{...r,headers:a})},Se=class{constructor(e,t,r,a=!1){this.status=e,this.statusText=t||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function ke(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Hn=["POST","PUT","PATCH","DELETE"],si=new Set(Hn),ui=["GET",...Hn],ci=new Set(ui),di=new Set([301,302,303,307,308]),fi=new Set([307,308]),Jt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},hi={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qe={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},mr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mi=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),zn="remix-router-transitions",Bn=Symbol("ResetLoaderData");function rs(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";j(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.mapRouteProperties||mi,n={},o=_t(e.routes,a,void 0,n),l,s=e.basename||"/",i=e.dataStrategy||Ei,u={unstable_middleware:!1,...e.future},d=null,m=new Set,y=null,g=null,E=null,R=e.hydrationData!=null,w=ge(o,e.history.location,s),S=!1,x=null;if(w==null&&!e.patchRoutesOnNavigation){let c=le(404,{pathname:e.history.location.pathname}),{matches:p,route:v}=mn(o);w=p,x={[v.id]:c}}w&&!e.hydrationData&&ft(w,o,e.history.location.pathname).active&&(w=null);let L;if(w)if(w.some(c=>c.route.lazy))L=!1;else if(!w.some(c=>c.route.loader))L=!0;else{let c=e.hydrationData?e.hydrationData.loaderData:null,p=e.hydrationData?e.hydrationData.errors:null;if(p){let v=w.findIndex(b=>p[b.route.id]!==void 0);L=w.slice(0,v+1).every(b=>!er(b.route,c,p))}else L=w.every(v=>!er(v.route,c,p))}else{L=!1,w=[];let c=ft(null,o,e.history.location.pathname);c.active&&c.matches&&(S=!0,w=c.matches)}let T,h={historyAction:e.history.action,location:e.history.location,matches:w,initialized:L,navigation:Jt,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||x,fetchers:new Map,blockers:new Map},P="POP",A=!1,D,U=!1,z=new Map,q=null,ne=!1,te=!1,Le=new Set,Y=new Map,ut=0,We=-1,Ne=new Map,pe=new Set,$e=new Map,Ve=new Map,de=new Set,Ce=new Map,ct,Pe=null;function va(){if(d=e.history.listen(({action:c,location:p,delta:v})=>{if(ct){ct(),ct=void 0;return}G(Ce.size===0||v!=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 b=Fr({currentLocation:h.location,nextLocation:p,historyAction:c});if(b&&v!=null){let C=new Promise($=>{ct=$});e.history.go(v*-1),dt(b,{state:"blocked",location:p,proceed(){dt(b,{state:"proceeding",proceed:void 0,reset:void 0,location:p}),C.then(()=>e.history.go(v))},reset(){let $=new Map(h.blockers);$.set(b,qe),re({blockers:$})}});return}return Te(c,p)}),r){Di(t,z);let c=()=>Oi(t,z);t.addEventListener("pagehide",c),q=()=>t.removeEventListener("pagehide",c)}return h.initialized||Te("POP",h.location,{initialHydration:!0}),T}function ga(){d&&d(),q&&q(),m.clear(),D&&D.abort(),h.fetchers.forEach((c,p)=>Ut(p)),h.blockers.forEach((c,p)=>Ir(p))}function wa(c){return m.add(c),()=>m.delete(c)}function re(c,p={}){h={...h,...c};let v=[],b=[];h.fetchers.forEach((C,$)=>{C.state==="idle"&&(de.has($)?v.push($):b.push($))}),de.forEach(C=>{!h.fetchers.has(C)&&!Y.has(C)&&v.push(C)}),[...m].forEach(C=>C(h,{deletedFetchers:v,viewTransitionOpts:p.viewTransitionOpts,flushSync:p.flushSync===!0})),v.forEach(C=>Ut(C)),b.forEach(C=>h.fetchers.delete(C))}function Ie(c,p,{flushSync:v}={}){var M,O;let b=h.actionData!=null&&h.navigation.formMethod!=null&&ue(h.navigation.formMethod)&&h.navigation.state==="loading"&&((M=c.state)==null?void 0:M._isRedirect)!==!0,C;p.actionData?Object.keys(p.actionData).length>0?C=p.actionData:C=null:b?C=h.actionData:C=null;let $=p.loaderData?fn(h.loaderData,p.loaderData,p.matches||[],p.errors):h.loaderData,N=h.blockers;N.size>0&&(N=new Map(N),N.forEach((I,H)=>N.set(H,qe)));let _=A===!0||h.navigation.formMethod!=null&&ue(h.navigation.formMethod)&&((O=c.state)==null?void 0:O._isRedirect)!==!0;l&&(o=l,l=void 0),ne||P==="POP"||(P==="PUSH"?e.history.push(c,c.state):P==="REPLACE"&&e.history.replace(c,c.state));let k;if(P==="POP"){let I=z.get(h.location.pathname);I&&I.has(c.pathname)?k={currentLocation:h.location,nextLocation:c}:z.has(c.pathname)&&(k={currentLocation:c,nextLocation:h.location})}else if(U){let I=z.get(h.location.pathname);I?I.add(c.pathname):(I=new Set([c.pathname]),z.set(h.location.pathname,I)),k={currentLocation:h.location,nextLocation:c}}re({...p,actionData:C,loaderData:$,historyAction:P,location:c,initialized:!0,navigation:Jt,revalidation:"idle",restoreScrollPosition:Ur(c,p.matches||h.matches),preventScrollReset:_,blockers:N},{viewTransitionOpts:k,flushSync:v===!0}),P="POP",A=!1,U=!1,ne=!1,te=!1,Pe==null||Pe.resolve(),Pe=null}async function _r(c,p){if(typeof c=="number"){e.history.go(c);return}let v=Zt(h.location,h.matches,s,c,p==null?void 0:p.fromRouteId,p==null?void 0:p.relative),{path:b,submission:C,error:$}=en(!1,v,p),N=h.location,_=nt(h.location,b,p&&p.state);_={..._,...e.history.encodeLocation(_)};let k=p&&p.replace!=null?p.replace:void 0,M="PUSH";k===!0?M="REPLACE":k===!1||C!=null&&ue(C.formMethod)&&C.formAction===h.location.pathname+h.location.search&&(M="REPLACE");let O=p&&"preventScrollReset"in p?p.preventScrollReset===!0:void 0,I=(p&&p.flushSync)===!0,H=Fr({currentLocation:N,nextLocation:_,historyAction:M});if(H){dt(H,{state:"blocked",location:_,proceed(){dt(H,{state:"proceeding",proceed:void 0,reset:void 0,location:_}),_r(c,p)},reset(){let V=new Map(h.blockers);V.set(H,qe),re({blockers:V})}});return}await Te(M,_,{submission:C,pendingError:$,preventScrollReset:O,replace:p&&p.replace,enableViewTransition:p&&p.viewTransition,flushSync:I})}function Ea(){Pe||(Pe=ki()),jt(),re({revalidation:"loading"});let c=Pe.promise;return h.navigation.state==="submitting"?c:h.navigation.state==="idle"?(Te(h.historyAction,h.location,{startUninterruptedRevalidation:!0}),c):(Te(P||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation,enableViewTransition:U===!0}),c)}async function Te(c,p,v){D&&D.abort(),D=null,P=c,ne=(v&&v.startUninterruptedRevalidation)===!0,_a(h.location,h.matches),A=(v&&v.preventScrollReset)===!0,U=(v&&v.enableViewTransition)===!0;let b=l||o,C=v&&v.overrideNavigation,$=v!=null&&v.initialHydration&&h.matches&&h.matches.length>0&&!S?h.matches:ge(b,p,s),N=(v&&v.flushSync)===!0;if($&&h.initialized&&!te&&Ci(h.location,p)&&!(v&&v.submission&&ue(v.submission.formMethod))){Ie(p,{matches:$},{flushSync:N});return}let _=ft($,b,p.pathname);if(_.active&&_.matches&&($=_.matches),!$){let{error:K,notFoundMatches:J,route:Q}=Ht(p.pathname);Ie(p,{matches:J,loaderData:{},errors:{[Q.id]:K}},{flushSync:N});return}D=new AbortController;let k=Ue(e.history,p,D.signal,v&&v.submission),M=new Qr(e.unstable_getContext?await e.unstable_getContext():void 0),O;if(v&&v.pendingError)O=[De($).route.id,{type:"error",error:v.pendingError}];else if(v&&v.submission&&ue(v.submission.formMethod)){let K=await Ra(k,p,v.submission,$,M,_.active,{replace:v.replace,flushSync:N});if(K.shortCircuited)return;if(K.pendingActionResult){let[J,Q]=K.pendingActionResult;if(ae(Q)&&ke(Q.error)&&Q.error.status===404){D=null,Ie(p,{matches:K.matches,loaderData:{},errors:{[J]:Q.error}});return}}$=K.matches||$,O=K.pendingActionResult,C=Gt(p,v.submission),N=!1,_.active=!1,k=Ue(e.history,k.url,k.signal)}let{shortCircuited:I,matches:H,loaderData:V,errors:Z}=await ba(k,p,$,M,_.active,C,v&&v.submission,v&&v.fetcherSubmission,v&&v.replace,v&&v.initialHydration===!0,N,O);I||(D=null,Ie(p,{matches:H||$,...hn(O),loaderData:V,errors:Z}))}async function Ra(c,p,v,b,C,$,N={}){jt();let _=Mi(p,v);if(re({navigation:_},{flushSync:N.flushSync===!0}),$){let O=await ht(b,p.pathname,c.signal);if(O.type==="aborted")return{shortCircuited:!0};if(O.type==="error"){let I=De(O.partialMatches).route.id;return{matches:O.partialMatches,pendingActionResult:[I,{type:"error",error:O.error}]}}else if(O.matches)b=O.matches;else{let{notFoundMatches:I,error:H,route:V}=Ht(p.pathname);return{matches:I,pendingActionResult:[V.id,{type:"error",error:H}]}}}let k,M=rt(b,p);if(!M.route.action&&!M.route.lazy)k={type:"error",error:le(405,{method:c.method,pathname:p.pathname,routeId:M.route.id})};else{let O=await Je("action",c,[M],b,C,null);if(k=O[M.route.id],!k){for(let I of b)if(O[I.route.id]){k=O[I.route.id];break}}if(c.signal.aborted)return{shortCircuited:!0}}if(Oe(k)){let O;return N&&N.replace!=null?O=N.replace:O=un(k.response.headers.get("Location"),new URL(c.url),s)===h.location.pathname+h.location.search,await Me(c,k,!0,{submission:v,replace:O}),{shortCircuited:!0}}if(ae(k)){let O=De(b,M.route.id);return(N&&N.replace)!==!0&&(P="PUSH"),{matches:b,pendingActionResult:[O.route.id,k]}}return{matches:b,pendingActionResult:[M.route.id,k]}}async function ba(c,p,v,b,C,$,N,_,k,M,O,I){let H=$||Gt(p,N),V=N||_||yn(H),Z=!ne&&!M;if(C){if(Z){let ee=Dr(I);re({navigation:H,...ee!==void 0?{actionData:ee}:{}},{flushSync:O})}let B=await ht(v,p.pathname,c.signal);if(B.type==="aborted")return{shortCircuited:!0};if(B.type==="error"){let ee=De(B.partialMatches).route.id;return{matches:B.partialMatches,loaderData:{},errors:{[ee]:B.error}}}else if(B.matches)v=B.matches;else{let{error:ee,notFoundMatches:yt,route:Xe}=Ht(p.pathname);return{matches:yt,loaderData:{},errors:{[Xe.id]:ee}}}}let K=l||o,[J,Q]=rn(e.history,h,v,V,p,M===!0,te,Le,de,$e,pe,K,s,I);if(We=++ut,J.length===0&&Q.length===0){let B=Nr();return Ie(p,{matches:v,loaderData:{},errors:I&&ae(I[1])?{[I[0]]:I[1].error}:null,...hn(I),...B?{fetchers:new Map(h.fetchers)}:{}},{flushSync:O}),{shortCircuited:!0}}if(Z){let B={};if(!C){B.navigation=H;let ee=Dr(I);ee!==void 0&&(B.actionData=ee)}Q.length>0&&(B.fetchers=Sa(Q)),re(B,{flushSync:O})}Q.forEach(B=>{Ee(B.key),B.controller&&Y.set(B.key,B.controller)});let Fe=()=>Q.forEach(B=>Ee(B.key));D&&D.signal.addEventListener("abort",Fe);let{loaderResults:Ge,fetcherResults:ve}=await Or(v,J,Q,c,b);if(c.signal.aborted)return{shortCircuited:!0};D&&D.signal.removeEventListener("abort",Fe),Q.forEach(B=>Y.delete(B.key));let fe=wt(Ge);if(fe)return await Me(c,fe.result,!0,{replace:k}),{shortCircuited:!0};if(fe=wt(ve),fe)return pe.add(fe.key),await Me(c,fe.result,!0,{replace:k}),{shortCircuited:!0};let{loaderData:zt,errors:Ke}=dn(h,v,Ge,I,Q,ve);M&&h.errors&&(Ke={...h.errors,...Ke});let _e=Nr(),mt=$r(We),pt=_e||mt||Q.length>0;return{matches:v,loaderData:zt,errors:Ke,...pt?{fetchers:new Map(h.fetchers)}:{}}}function Dr(c){if(c&&!ae(c[1]))return{[c[0]]:c[1].data};if(h.actionData)return Object.keys(h.actionData).length===0?null:h.actionData}function Sa(c){return c.forEach(p=>{let v=h.fetchers.get(p.key),b=Qe(void 0,v?v.data:void 0);h.fetchers.set(p.key,b)}),new Map(h.fetchers)}async function xa(c,p,v,b){Ee(c);let C=(b&&b.flushSync)===!0,$=l||o,N=Zt(h.location,h.matches,s,v,p,b==null?void 0:b.relative),_=ge($,N,s),k=ft(_,$,N);if(k.active&&k.matches&&(_=k.matches),!_){ye(c,p,le(404,{pathname:N}),{flushSync:C});return}let{path:M,submission:O,error:I}=en(!0,N,b);if(I){ye(c,p,I,{flushSync:C});return}let H=rt(_,M),V=new Qr(e.unstable_getContext?await e.unstable_getContext():void 0),Z=(b&&b.preventScrollReset)===!0;if(O&&ue(O.formMethod)){await La(c,p,M,H,_,V,k.active,C,Z,O);return}$e.set(c,{routeId:p,path:M}),await Ca(c,p,M,H,_,V,k.active,C,Z,O)}async function La(c,p,v,b,C,$,N,_,k,M){jt(),$e.delete(c);function O(X){if(!X.route.action&&!X.route.lazy){let je=le(405,{method:M.formMethod,pathname:v,routeId:p});return ye(c,p,je,{flushSync:_}),!0}return!1}if(!N&&O(b))return;let I=h.fetchers.get(c);we(c,_i(M,I),{flushSync:_});let H=new AbortController,V=Ue(e.history,v,H.signal,M);if(N){let X=await ht(C,v,V.signal,c);if(X.type==="aborted")return;if(X.type==="error"){ye(c,p,X.error,{flushSync:_});return}else if(X.matches){if(C=X.matches,b=rt(C,v),O(b))return}else{ye(c,p,le(404,{pathname:v}),{flushSync:_});return}}Y.set(c,H);let Z=ut,J=(await Je("action",V,[b],C,$,c))[b.route.id];if(V.signal.aborted){Y.get(c)===H&&Y.delete(c);return}if(de.has(c)){if(Oe(J)||ae(J)){we(c,Re(void 0));return}}else{if(Oe(J))if(Y.delete(c),We>Z){we(c,Re(void 0));return}else return pe.add(c),we(c,Qe(M)),Me(V,J,!1,{fetcherSubmission:M,preventScrollReset:k});if(ae(J)){ye(c,p,J.error);return}}let Q=h.navigation.location||h.location,Fe=Ue(e.history,Q,H.signal),Ge=l||o,ve=h.navigation.state!=="idle"?ge(Ge,h.navigation.location,s):h.matches;j(ve,"Didn't find any matches after fetcher action");let fe=++ut;Ne.set(c,fe);let zt=Qe(M,J.data);h.fetchers.set(c,zt);let[Ke,_e]=rn(e.history,h,ve,M,Q,!1,te,Le,de,$e,pe,Ge,s,[b.route.id,J]);_e.filter(X=>X.key!==c).forEach(X=>{let je=X.key,Hr=h.fetchers.get(je),ka=Qe(void 0,Hr?Hr.data:void 0);h.fetchers.set(je,ka),Ee(je),X.controller&&Y.set(je,X.controller)}),re({fetchers:new Map(h.fetchers)});let mt=()=>_e.forEach(X=>Ee(X.key));H.signal.addEventListener("abort",mt);let{loaderResults:pt,fetcherResults:B}=await Or(ve,Ke,_e,Fe,$);if(H.signal.aborted)return;H.signal.removeEventListener("abort",mt),Ne.delete(c),Y.delete(c),_e.forEach(X=>Y.delete(X.key));let ee=wt(pt);if(ee)return Me(Fe,ee.result,!1,{preventScrollReset:k});if(ee=wt(B),ee)return pe.add(ee.key),Me(Fe,ee.result,!1,{preventScrollReset:k});let{loaderData:yt,errors:Xe}=dn(h,ve,pt,void 0,_e,B);if(h.fetchers.has(c)){let X=Re(J.data);h.fetchers.set(c,X)}$r(fe),h.navigation.state==="loading"&&fe>We?(j(P,"Expected pending action"),D&&D.abort(),Ie(h.navigation.location,{matches:ve,loaderData:yt,errors:Xe,fetchers:new Map(h.fetchers)})):(re({errors:Xe,loaderData:fn(h.loaderData,yt,ve,Xe),fetchers:new Map(h.fetchers)}),te=!1)}async function Ca(c,p,v,b,C,$,N,_,k,M){let O=h.fetchers.get(c);we(c,Qe(M,O?O.data:void 0),{flushSync:_});let I=new AbortController,H=Ue(e.history,v,I.signal);if(N){let J=await ht(C,v,H.signal,c);if(J.type==="aborted")return;if(J.type==="error"){ye(c,p,J.error,{flushSync:_});return}else if(J.matches)C=J.matches,b=rt(C,v);else{ye(c,p,le(404,{pathname:v}),{flushSync:_});return}}Y.set(c,I);let V=ut,K=(await Je("loader",H,[b],C,$,c))[b.route.id];if(Y.get(c)===I&&Y.delete(c),!H.signal.aborted){if(de.has(c)){we(c,Re(void 0));return}if(Oe(K))if(We>V){we(c,Re(void 0));return}else{pe.add(c),await Me(H,K,!1,{preventScrollReset:k});return}if(ae(K)){ye(c,p,K.error);return}we(c,Re(K.data))}}async function Me(c,p,v,{submission:b,fetcherSubmission:C,preventScrollReset:$,replace:N}={}){p.response.headers.has("X-Remix-Revalidate")&&(te=!0);let _=p.response.headers.get("Location");j(_,"Expected a Location header on the redirect Response"),_=un(_,new URL(c.url),s);let k=nt(h.location,_,{_isRedirect:!0});if(r){let Z=!1;if(p.response.headers.has("X-Remix-Reload-Document"))Z=!0;else if(mr.test(_)){const K=e.history.createURL(_);Z=K.origin!==t.location.origin||ie(K.pathname,s)==null}if(Z){N?t.location.replace(_):t.location.assign(_);return}}D=null;let M=N===!0||p.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:O,formAction:I,formEncType:H}=h.navigation;!b&&!C&&O&&I&&H&&(b=yn(h.navigation));let V=b||C;if(fi.has(p.response.status)&&V&&ue(V.formMethod))await Te(M,k,{submission:{...V,formAction:_},preventScrollReset:$||A,enableViewTransition:v?U:void 0});else{let Z=Gt(k,b);await Te(M,k,{overrideNavigation:Z,fetcherSubmission:C,preventScrollReset:$||A,enableViewTransition:v?U:void 0})}}async function Je(c,p,v,b,C,$){let N,_={};try{N=await Ri(i,c,p,v,b,$,n,a,C)}catch(k){return v.forEach(M=>{_[M.route.id]={type:"error",error:k}}),_}for(let[k,M]of Object.entries(N))if(Pi(M)){let O=M.result;_[k]={type:"redirect",response:xi(O,p,k,b,s)}}else _[k]=await Si(M);return _}async function Or(c,p,v,b,C){let $=Je("loader",b,p,c,C,null),N=Promise.all(v.map(async M=>{if(M.matches&&M.match&&M.controller){let I=(await Je("loader",Ue(e.history,M.path,M.controller.signal),[M.match],M.matches,C,M.key))[M.match.route.id];return{[M.key]:I}}else return Promise.resolve({[M.key]:{type:"error",error:le(404,{pathname:M.path})}})})),_=await $,k=(await N).reduce((M,O)=>Object.assign(M,O),{});return{loaderResults:_,fetcherResults:k}}function jt(){te=!0,$e.forEach((c,p)=>{Y.has(p)&&Le.add(p),Ee(p)})}function we(c,p,v={}){h.fetchers.set(c,p),re({fetchers:new Map(h.fetchers)},{flushSync:(v&&v.flushSync)===!0})}function ye(c,p,v,b={}){let C=De(h.matches,p);Ut(c),re({errors:{[C.route.id]:v},fetchers:new Map(h.fetchers)},{flushSync:(b&&b.flushSync)===!0})}function kr(c){return Ve.set(c,(Ve.get(c)||0)+1),de.has(c)&&de.delete(c),h.fetchers.get(c)||hi}function Ut(c){let p=h.fetchers.get(c);Y.has(c)&&!(p&&p.state==="loading"&&Ne.has(c))&&Ee(c),$e.delete(c),Ne.delete(c),pe.delete(c),de.delete(c),Le.delete(c),h.fetchers.delete(c)}function Pa(c){let p=(Ve.get(c)||0)-1;p<=0?(Ve.delete(c),de.add(c)):Ve.set(c,p),re({fetchers:new Map(h.fetchers)})}function Ee(c){let p=Y.get(c);p&&(p.abort(),Y.delete(c))}function Ar(c){for(let p of c){let v=kr(p),b=Re(v.data);h.fetchers.set(p,b)}}function Nr(){let c=[],p=!1;for(let v of pe){let b=h.fetchers.get(v);j(b,`Expected fetcher: ${v}`),b.state==="loading"&&(pe.delete(v),c.push(v),p=!0)}return Ar(c),p}function $r(c){let p=[];for(let[v,b]of Ne)if(b<c){let C=h.fetchers.get(v);j(C,`Expected fetcher: ${v}`),C.state==="loading"&&(Ee(v),Ne.delete(v),p.push(v))}return Ar(p),p.length>0}function Ta(c,p){let v=h.blockers.get(c)||qe;return Ce.get(c)!==p&&Ce.set(c,p),v}function Ir(c){h.blockers.delete(c),Ce.delete(c)}function dt(c,p){let v=h.blockers.get(c)||qe;j(v.state==="unblocked"&&p.state==="blocked"||v.state==="blocked"&&p.state==="blocked"||v.state==="blocked"&&p.state==="proceeding"||v.state==="blocked"&&p.state==="unblocked"||v.state==="proceeding"&&p.state==="unblocked",`Invalid blocker state transition: ${v.state} -> ${p.state}`);let b=new Map(h.blockers);b.set(c,p),re({blockers:b})}function Fr({currentLocation:c,nextLocation:p,historyAction:v}){if(Ce.size===0)return;Ce.size>1&&G(!1,"A router only supports one blocker at a time");let b=Array.from(Ce.entries()),[C,$]=b[b.length-1],N=h.blockers.get(C);if(!(N&&N.state==="proceeding")&&$({currentLocation:c,nextLocation:p,historyAction:v}))return C}function Ht(c){let p=le(404,{pathname:c}),v=l||o,{matches:b,route:C}=mn(v);return{notFoundMatches:b,route:C,error:p}}function Ma(c,p,v){if(y=c,E=p,g=v||null,!R&&h.navigation===Jt){R=!0;let b=Ur(h.location,h.matches);b!=null&&re({restoreScrollPosition:b})}return()=>{y=null,E=null,g=null}}function jr(c,p){return g&&g(c,p.map(b=>In(b,h.loaderData)))||c.key}function _a(c,p){if(y&&E){let v=jr(c,p);y[v]=E()}}function Ur(c,p){if(y){let v=jr(c,p),b=y[v];if(typeof b=="number")return b}return null}function ft(c,p,v){if(e.patchRoutesOnNavigation)if(c){if(Object.keys(c[0].params).length>0)return{active:!0,matches:Lt(p,v,s,!0)}}else return{active:!0,matches:Lt(p,v,s,!0)||[]};return{active:!1,matches:null}}async function ht(c,p,v,b){if(!e.patchRoutesOnNavigation)return{type:"success",matches:c};let C=c;for(;;){let $=l==null,N=l||o,_=n;try{await e.patchRoutesOnNavigation({signal:v,path:p,matches:C,fetcherKey:b,patch:(O,I)=>{v.aborted||an(O,I,N,_,a)}})}catch(O){return{type:"error",error:O,partialMatches:C}}finally{$&&!v.aborted&&(o=[...o])}if(v.aborted)return{type:"aborted"};let k=ge(N,p,s);if(k)return{type:"success",matches:k};let M=Lt(N,p,s,!0);if(!M||C.length===M.length&&C.every((O,I)=>O.route.id===M[I].route.id))return{type:"success",matches:null};C=M}}function Da(c){n={},l=_t(c,a,void 0,n)}function Oa(c,p){let v=l==null;an(c,p,l||o,n,a),v&&(o=[...o],re({}))}return T={get basename(){return s},get future(){return u},get state(){return h},get routes(){return o},get window(){return t},initialize:va,subscribe:wa,enableScrollRestoration:Ma,navigate:_r,fetch:xa,revalidate:Ea,createHref:c=>e.history.createHref(c),encodeLocation:c=>e.history.encodeLocation(c),getFetcher:kr,deleteFetcher:Pa,dispose:ga,getBlocker:Ta,deleteBlocker:Ir,patchRoutes:Oa,_internalFetchControllers:Y,_internalSetRoutes:Da},T}function pi(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Zt(e,t,r,a,n,o){let l,s;if(n){l=[];for(let u of t)if(l.push(u),u.route.id===n){s=u;break}}else l=t,s=t[t.length-1];let i=hr(a||".",fr(l),ie(e.pathname,r)||e.pathname,o==="path");if(a==null&&(i.search=e.search,i.hash=e.hash),(a==null||a===""||a===".")&&s){let u=yr(i.search);if(s.route.index&&!u)i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&u){let d=new URLSearchParams(i.search),m=d.getAll("index");d.delete("index"),m.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();i.search=y?`?${y}`:""}}return r!=="/"&&(i.pathname=i.pathname==="/"?r:he([r,i.pathname])),be(i)}function en(e,t,r){if(!r||!pi(r))return{path:t};if(r.formMethod&&!Ti(r.formMethod))return{path:t,error:le(405,{method:r.formMethod})};let a=()=>({path:t,error:le(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),l=Gn(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ue(o))return a();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((y,[g,E])=>`${y}${g}=${E}
28
- `,""):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(!ue(o))return a();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 a()}}}j(typeof FormData=="function","FormData is not available in this environment");let s,i;if(r.formData)s=tr(r.formData),i=r.formData;else if(r.body instanceof FormData)s=tr(r.body),i=r.body;else if(r.body instanceof URLSearchParams)s=r.body,i=cn(s);else if(r.body==null)s=new URLSearchParams,i=new FormData;else try{s=new URLSearchParams(r.body),i=cn(s)}catch{return a()}let u={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(ue(u.formMethod))return{path:t,submission:u};let d=xe(t);return e&&d.search&&yr(d.search)&&s.append("index",""),d.search=`?${s}`,{path:be(d),submission:u}}function tn(e,t,r=!1){let a=e.findIndex(n=>n.route.id===t);return a>=0?e.slice(0,r?a+1:a):e}function rn(e,t,r,a,n,o,l,s,i,u,d,m,y,g){let E=g?ae(g[1])?g[1].error:g[1].data:void 0,R=e.createURL(t.location),w=e.createURL(n),S=r;o&&t.errors?S=tn(r,Object.keys(t.errors)[0],!0):g&&ae(g[1])&&(S=tn(r,g[0]));let x=g?g[1].statusCode:void 0,L=x&&x>=400,T=S.filter((P,A)=>{let{route:D}=P;if(D.lazy)return!0;if(D.loader==null)return!1;if(o)return er(D,t.loaderData,t.errors);if(yi(t.loaderData,t.matches[A],P))return!0;let U=t.matches[A],z=P;return nn(P,{currentUrl:R,currentParams:U.params,nextUrl:w,nextParams:z.params,...a,actionResult:E,actionStatus:x,defaultShouldRevalidate:L?!1:l||R.pathname+R.search===w.pathname+w.search||R.search!==w.search||vi(U,z)})}),h=[];return u.forEach((P,A)=>{if(o||!r.some(ne=>ne.route.id===P.routeId)||i.has(A))return;let D=ge(m,P.path,y);if(!D){h.push({key:A,routeId:P.routeId,path:P.path,matches:null,match:null,controller:null});return}let U=t.fetchers.get(A),z=rt(D,P.path),q=!1;d.has(A)?q=!1:s.has(A)?(s.delete(A),q=!0):U&&U.state!=="idle"&&U.data===void 0?q=l:q=nn(z,{currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:w,nextParams:r[r.length-1].params,...a,actionResult:E,actionStatus:x,defaultShouldRevalidate:L?!1:l}),q&&h.push({key:A,routeId:P.routeId,path:P.path,matches:D,match:z,controller:new AbortController})}),[T,h]}function er(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;let a=t!=null&&t[e.id]!==void 0,n=r!=null&&r[e.id]!==void 0;return!a&&n?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!a&&!n}function yi(e,t,r){let a=!t||r.route.id!==t.route.id,n=!e.hasOwnProperty(r.route.id);return a||n}function vi(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function nn(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function an(e,t,r,a,n){let o;if(e){let i=a[e];j(i,`No route found to patch children into: routeId = ${e}`),i.children||(i.children=[]),o=i.children}else o=r;let l=t.filter(i=>!o.some(u=>Yn(i,u))),s=_t(l,n,[e||"_","patch",String((o==null?void 0:o.length)||"0")],a);o.push(...s)}function Yn(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,a)=>{var n;return(n=t.children)==null?void 0:n.some(o=>Yn(r,o))}):!1}var on=new WeakMap,Wn=({key:e,route:t,manifest:r,mapRouteProperties:a})=>{let n=r[t.id];if(j(n,"No route found in manifest"),!n.lazy||typeof n.lazy!="object")return;let o=n.lazy[e];if(!o)return;let l=on.get(n);l||(l={},on.set(n,l));let s=l[e];if(s)return s;let i=(async()=>{let u=Fo(e),m=n[e]!==void 0&&e!=="hasErrorBoundary";if(u)G(!u,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),l[e]=Promise.resolve();else if(m)G(!1,`Route "${n.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let y=await o();y!=null&&(Object.assign(n,{[e]:y}),Object.assign(n,a(n)))}typeof n.lazy=="object"&&(n.lazy[e]=void 0,Object.values(n.lazy).every(y=>y===void 0)&&(n.lazy=void 0))})();return l[e]=i,i},ln=new WeakMap;function gi(e,t,r,a){let n=r[e.id];if(j(n,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let u=ln.get(n);if(u)return{lazyRoutePromise:u,lazyHandlerPromise:u};let d=(async()=>{j(typeof e.lazy=="function","No lazy route function found");let m=await e.lazy(),y={};for(let g in m){let E=m[g];if(E===void 0)continue;let R=Uo(g),S=n[g]!==void 0&&g!=="hasErrorBoundary";R?G(!R,"Route property "+g+" is not a supported property to be returned from a lazy route function. This property will be ignored."):S?G(!S,`Route "${n.id}" has a static property "${g}" defined but its lazy function is also returning a value for this property. The lazy route property "${g}" will be ignored.`):y[g]=E}Object.assign(n,y),Object.assign(n,{...a(n),lazy:void 0})})();return ln.set(n,d),{lazyRoutePromise:d,lazyHandlerPromise:d}}let o=Object.keys(e.lazy),l=[],s;for(let u of o){let d=Wn({key:u,route:e,manifest:r,mapRouteProperties:a});d&&(l.push(d),u===t&&(s=d))}return{lazyRoutePromise:Promise.all(l).then(()=>{}),lazyHandlerPromise:s}}function Vn(e){return e!==void 0}function wi(e,t,r){let a=e.map(({route:n})=>{if(!(typeof n.lazy!="object"||!n.lazy.unstable_middleware))return Wn({key:"unstable_middleware",route:n,manifest:t,mapRouteProperties:r})}).filter(Vn);return a.length>0?Promise.all(a):void 0}async function sn(e){let t=e.matches.filter(n=>n.shouldLoad),r={};return(await Promise.all(t.map(n=>n.resolve()))).forEach((n,o)=>{r[t[o].route.id]=n}),r}async function Ei(e){return e.matches.some(t=>t.route.unstable_middleware)?tt(e,!1,()=>sn(e),(t,r)=>({[r]:{type:"error",result:t}})):sn(e)}async function tt(e,t,r,a){let{matches:n,request:o,params:l,context:s}=e,i={handlerResult:void 0};try{let u=n.flatMap(m=>m.route.unstable_middleware?m.route.unstable_middleware.map(y=>[m.route.id,y]):[]),d=await Jn({request:o,params:l,context:s},u,t,i,r);return t?d:i.handlerResult}catch(u){if(!i.middlewareError)throw u;let d=await a(i.middlewareError.error,i.middlewareError.routeId);return i.handlerResult?Object.assign(i.handlerResult,d):d}}async function Jn(e,t,r,a,n,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 s=t[o];if(!s)return a.handlerResult=await n(),a.handlerResult;let[i,u]=s,d=!1,m,y=async()=>{if(d)throw new Error("You may only call `next()` once per middleware");d=!0,await Jn(e,t,r,a,n,o+1)};try{let g=await u({request:e.request,params:e.params,context:e.context},y);return d?g===void 0?m:g:y()}catch(g){throw a.middlewareError?a.middlewareError.error!==g&&(a.middlewareError={routeId:i,error:g}):a.middlewareError={routeId:i,error:g},g}}async function Ri(e,t,r,a,n,o,l,s,i){let u=wi(n,l,s),d=n.map(E=>gi(E.route,t,l,s));u&&await u;let m=n.map((E,R)=>{let{lazyRoutePromise:w,lazyHandlerPromise:S}=d[R],x=a.some(T=>T.route.id===E.route.id);return{...E,shouldLoad:x,resolve:async T=>(T&&r.method==="GET"&&(E.route.lazy||E.route.loader)&&(x=!0),x?bi({type:t,request:r,match:E,lazyHandlerPromise:S,lazyRoutePromise:w,handlerOverride:T,scopedContext:i}):Promise.resolve({type:"data",result:void 0}))}}),y=await e({matches:m,request:r,params:n[0].params,fetcherKey:o,context:i}),g=d.flatMap(E=>Object.values(E).filter(Vn));try{await Promise.all(g)}catch{}return y}async function bi({type:e,request:t,match:r,lazyHandlerPromise:a,lazyRoutePromise:n,handlerOverride:o,scopedContext:l}){let s,i,u=d=>{let m,y=new Promise((R,w)=>m=w);i=()=>m(),t.signal.addEventListener("abort",i);let g=R=>typeof d!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${e}" [routeId: ${r.route.id}]`)):d({request:t,params:r.params,context:l},...R!==void 0?[R]:[]),E=(async()=>{try{return{type:"data",result:await(o?o(w=>g(w)):g())}}catch(R){return{type:"error",result:R}}})();return Promise.race([E,y])};try{let d=r.route[e];if(a||n)if(d){let m,[y]=await Promise.all([u(d).catch(g=>{m=g}),a,n]);if(m!==void 0)throw m;s=y}else if(await a,d=r.route[e],d)[s]=await Promise.all([u(d),n]);else if(e==="action"){let m=new URL(t.url),y=m.pathname+m.search;throw le(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:"data",result:void 0};else if(d)s=await u(d);else{let m=new URL(t.url),y=m.pathname+m.search;throw le(404,{pathname:y})}}catch(d){return{type:"error",result:d}}finally{i&&t.signal.removeEventListener("abort",i)}return s}async function Si(e){var a,n,o,l,s,i;let{result:t,type:r}=e;if(pr(t)){let u;try{let d=t.headers.get("Content-Type");d&&/\bapplication\/json\b/.test(d)?t.body==null?u=null:u=await t.json():u=await t.text()}catch(d){return{type:"error",error:d}}return r==="error"?{type:"error",error:new Se(t.status,t.statusText,u),statusCode:t.status,headers:t.headers}:{type:"data",data:u,statusCode:t.status,headers:t.headers}}return r==="error"?pn(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:(a=t.init)==null?void 0:a.status,headers:(n=t.init)!=null&&n.headers?new Headers(t.init.headers):void 0}:{type:"error",error:new Se(((o=t.init)==null?void 0:o.status)||500,void 0,t.data),statusCode:ke(t)?t.status:void 0,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ke(t)?t.status:void 0}:pn(t)?{type:"data",data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function xi(e,t,r,a,n){let o=e.headers.get("Location");if(j(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!mr.test(o)){let l=a.slice(0,a.findIndex(s=>s.route.id===r)+1);o=Zt(new URL(t.url),l,n,o),e.headers.set("Location",o)}return e}function un(e,t,r){if(mr.test(e)){let a=e,n=a.startsWith("//")?new URL(t.protocol+a):new URL(a),o=ie(n.pathname,r)!=null;if(n.origin===t.origin&&o)return n.pathname+n.search+n.hash}return e}function Ue(e,t,r,a){let n=e.createURL(Gn(t)).toString(),o={signal:r};if(a&&ue(a.formMethod)){let{formMethod:l,formEncType:s}=a;o.method=l.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(a.json)):s==="text/plain"?o.body=a.text:s==="application/x-www-form-urlencoded"&&a.formData?o.body=tr(a.formData):o.body=a.formData}return new Request(n,o)}function tr(e){let t=new URLSearchParams;for(let[r,a]of e.entries())t.append(r,typeof a=="string"?a:a.name);return t}function cn(e){let t=new FormData;for(let[r,a]of e.entries())t.append(r,a);return t}function Li(e,t,r,a=!1,n=!1){let o={},l=null,s,i=!1,u={},d=r&&ae(r[1])?r[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let y=m.route.id,g=t[y];if(j(!Oe(g),"Cannot handle redirect results in processLoaderData"),ae(g)){let E=g.error;if(d!==void 0&&(E=d,d=void 0),l=l||{},n)l[y]=E;else{let R=De(e,y);l[R.route.id]==null&&(l[R.route.id]=E)}a||(o[y]=Bn),i||(i=!0,s=ke(g.error)?g.error.status:500),g.headers&&(u[y]=g.headers)}else o[y]=g.data,g.statusCode&&g.statusCode!==200&&!i&&(s=g.statusCode),g.headers&&(u[y]=g.headers)}),d!==void 0&&r&&(l={[r[0]]:d},o[r[0]]=void 0),{loaderData:o,errors:l,statusCode:s||200,loaderHeaders:u}}function dn(e,t,r,a,n,o){let{loaderData:l,errors:s}=Li(t,r,a);return n.forEach(i=>{let{key:u,match:d,controller:m}=i,y=o[u];if(j(y,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(ae(y)){let g=De(e.matches,d==null?void 0:d.route.id);s&&s[g.route.id]||(s={...s,[g.route.id]:y.error}),e.fetchers.delete(u)}else if(Oe(y))j(!1,"Unhandled fetcher revalidation redirect");else{let g=Re(y.data);e.fetchers.set(u,g)}}),{loaderData:l,errors:s}}function fn(e,t,r,a){let n=Object.entries(t).filter(([,o])=>o!==Bn).reduce((o,[l,s])=>(o[l]=s,o),{});for(let o of r){let l=o.route.id;if(!t.hasOwnProperty(l)&&e.hasOwnProperty(l)&&o.route.loader&&(n[l]=e[l]),a&&a.hasOwnProperty(l))break}return n}function hn(e){return e?ae(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function De(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function mn(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 le(e,{pathname:t,routeId:r,method:a,type:n,message:o}={}){let l="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(l="Bad Request",a&&t&&r?s=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:n==="invalid-body"&&(s="Unable to encode submission body")):e===403?(l="Forbidden",s=`Route "${r}" does not match URL "${t}"`):e===404?(l="Not Found",s=`No route matches URL "${t}"`):e===405&&(l="Method Not Allowed",a&&t&&r?s=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:a&&(s=`Invalid request method "${a.toUpperCase()}"`)),new Se(e||500,l,new Error(s),!0)}function wt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[a,n]=t[r];if(Oe(n))return{key:a,result:n}}}function Gn(e){let t=typeof e=="string"?xe(e):e;return be({...t,hash:""})}function Ci(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Pi(e){return pr(e.result)&&di.has(e.result.status)}function ae(e){return e.type==="error"}function Oe(e){return(e&&e.type)==="redirect"}function pn(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function pr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Ti(e){return ci.has(e.toUpperCase())}function ue(e){return si.has(e.toUpperCase())}function yr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function rt(e,t){let r=typeof t=="string"?xe(t).search:t.search;if(e[e.length-1].route.index&&yr(r||""))return e[e.length-1];let a=Un(e);return a[a.length-1]}function yn(e){let{formMethod:t,formAction:r,formEncType:a,text:n,formData:o,json:l}=e;if(!(!t||!r||!a)){if(n!=null)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:void 0,text:n};if(o!=null)return{formMethod:t,formAction:r,formEncType:a,formData:o,json:void 0,text:void 0};if(l!==void 0)return{formMethod:t,formAction:r,formEncType:a,formData:void 0,json:l,text:void 0}}}function Gt(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 Mi(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 Qe(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 _i(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 Re(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 Di(e,t){try{let r=e.sessionStorage.getItem(zn);if(r){let a=JSON.parse(r);for(let[n,o]of Object.entries(a||{}))o&&Array.isArray(o)&&t.set(n,new Set(o||[]))}}catch{}}function Oi(e,t){if(t.size>0){let r={};for(let[a,n]of t)r[a]=[...n];try{e.sessionStorage.setItem(zn,JSON.stringify(r))}catch(a){G(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function ki(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var Ae=f.createContext(null);Ae.displayName="DataRouter";var Be=f.createContext(null);Be.displayName="DataRouterState";var vr=f.createContext({isTransitioning:!1});vr.displayName="ViewTransition";var Kn=f.createContext(new Map);Kn.displayName="Fetchers";var Ai=f.createContext(null);Ai.displayName="Await";var se=f.createContext(null);se.displayName="Navigation";var At=f.createContext(null);At.displayName="Location";var ce=f.createContext({outlet:null,matches:[],isDataRoute:!1});ce.displayName="Route";var gr=f.createContext(null);gr.displayName="RouteError";function Ni(e,{relative:t}={}){j(at(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:a}=f.useContext(se),{hash:n,pathname:o,search:l}=ot(e,{relative:t}),s=o;return r!=="/"&&(s=o==="/"?r:he([r,o])),a.createHref({pathname:s,search:l,hash:n})}function at(){return f.useContext(At)!=null}function me(){return j(at(),"useLocation() may be used only in the context of a <Router> component."),f.useContext(At).location}var Xn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function qn(e){f.useContext(se).static||f.useLayoutEffect(e)}function $i(){let{isDataRoute:e}=f.useContext(ce);return e?Xi():Ii()}function Ii(){j(at(),"useNavigate() may be used only in the context of a <Router> component.");let e=f.useContext(Ae),{basename:t,navigator:r}=f.useContext(se),{matches:a}=f.useContext(ce),{pathname:n}=me(),o=JSON.stringify(fr(a)),l=f.useRef(!1);return qn(()=>{l.current=!0}),f.useCallback((i,u={})=>{if(G(l.current,Xn),!l.current)return;if(typeof i=="number"){r.go(i);return}let d=hr(i,JSON.parse(o),n,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:he([t,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[t,r,o,n,e])}var Fi=f.createContext(null);function ji(e){let t=f.useContext(ce).outlet;return t&&f.createElement(Fi.Provider,{value:e},t)}function ns(){let{matches:e}=f.useContext(ce),t=e[e.length-1];return t?t.params:{}}function ot(e,{relative:t}={}){let{matches:r}=f.useContext(ce),{pathname:a}=me(),n=JSON.stringify(fr(r));return f.useMemo(()=>hr(e,JSON.parse(n),a,t==="path"),[e,n,a,t])}function Ui(e,t,r,a){j(at(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:n,static:o}=f.useContext(se),{matches:l}=f.useContext(ce),s=l[l.length-1],i=s?s.params:{},u=s?s.pathname:"/",d=s?s.pathnameBase:"/",m=s&&s.route;{let x=m&&m.path||"";ea(u,!m||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${u}" (under <Route path="${x}">) 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.
29
-
30
- Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let y=me(),g;g=y;let E=g.pathname||"/",R=E;if(d!=="/"){let x=d.replace(/^\//,"").split("/");R="/"+E.replace(/^\//,"").split("/").slice(x.length).join("/")}let w=!o&&r&&r.matches&&r.matches.length>0?r.matches:ge(e,{pathname:R});return G(m||w!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),G(w==null||w[w.length-1].route.element!==void 0||w[w.length-1].route.Component!==void 0||w[w.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.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.`),Wi(w&&w.map(x=>Object.assign({},x,{params:Object.assign({},i,x.params),pathname:he([d,n.encodeLocation?n.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?d:he([d,n.encodeLocation?n.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),l,r,a)}function Hi(){let e=Zn(),t=ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",n={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},l=null;return console.error("Error handled by React Router default ErrorBoundary:",e),l=f.createElement(f.Fragment,null,f.createElement("p",null,"💿 Hey developer 👋"),f.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",f.createElement("code",{style:o},"ErrorBoundary")," or"," ",f.createElement("code",{style:o},"errorElement")," prop on your route.")),f.createElement(f.Fragment,null,f.createElement("h2",null,"Unexpected Application Error!"),f.createElement("h3",{style:{fontStyle:"italic"}},t),r?f.createElement("pre",{style:n},r):null,l)}var zi=f.createElement(Hi,null),Bi=class extends f.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?f.createElement(ce.Provider,{value:this.props.routeContext},f.createElement(gr.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function Yi({routeContext:e,match:t,children:r}){let a=f.useContext(Ae);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),f.createElement(ce.Provider,{value:e},r)}function Wi(e,t=[],r=null,a=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 n=e,o=r==null?void 0:r.errors;if(o!=null){let i=n.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);j(i>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),n=n.slice(0,Math.min(n.length,i+1))}let l=!1,s=-1;if(r)for(let i=0;i<n.length;i++){let u=n[i];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(s=i),u.route.id){let{loaderData:d,errors:m}=r,y=u.route.loader&&!d.hasOwnProperty(u.route.id)&&(!m||m[u.route.id]===void 0);if(u.route.lazy||y){l=!0,s>=0?n=n.slice(0,s+1):n=[n[0]];break}}}return n.reduceRight((i,u,d)=>{let m,y=!1,g=null,E=null;r&&(m=o&&u.route.id?o[u.route.id]:void 0,g=u.route.errorElement||zi,l&&(s<0&&d===0?(ea("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,E=null):s===d&&(y=!0,E=u.route.hydrateFallbackElement||null)));let R=t.concat(n.slice(0,d+1)),w=()=>{let S;return m?S=g:y?S=E:u.route.Component?S=f.createElement(u.route.Component,null):u.route.element?S=u.route.element:S=i,f.createElement(Yi,{match:u,routeContext:{outlet:i,matches:R,isDataRoute:r!=null},children:S})};return r&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?f.createElement(Bi,{location:r.location,revalidation:r.revalidation,component:g,error:m,children:w(),routeContext:{outlet:null,matches:R,isDataRoute:!0}}):w()},null)}function wr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Vi(e){let t=f.useContext(Ae);return j(t,wr(e)),t}function it(e){let t=f.useContext(Be);return j(t,wr(e)),t}function Ji(e){let t=f.useContext(ce);return j(t,wr(e)),t}function lt(e){let t=Ji(e),r=t.matches[t.matches.length-1];return j(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Gi(){return lt("useRouteId")}function Ki(){return it("useNavigation").navigation}function Qn(){let{matches:e,loaderData:t}=it("useMatches");return f.useMemo(()=>e.map(r=>In(r,t)),[e,t])}function as(){let e=it("useLoaderData"),t=lt("useLoaderData");return e.loaderData[t]}function os(){let e=it("useActionData"),t=lt("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Zn(){var a;let e=f.useContext(gr),t=it("useRouteError"),r=lt("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[r]}function Xi(){let{router:e}=Vi("useNavigate"),t=lt("useNavigate"),r=f.useRef(!1);return qn(()=>{r.current=!0}),f.useCallback(async(n,o={})=>{G(r.current,Xn),r.current&&(typeof n=="number"?e.navigate(n):await e.navigate(n,{fromRouteId:t,...o}))},[e,t])}var vn={};function ea(e,t,r){!t&&!vn[e]&&(vn[e]=!0,G(!1,r))}var gn={};function wn(e,t){!e&&!gn[t]&&(gn[t]=!0,console.warn(t))}function is(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&G(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:f.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&G(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:f.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&G(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:f.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var qi=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 ls({router:e,flushSync:t}){let[r,a]=f.useState(e.state),[n,o]=f.useState(),[l,s]=f.useState({isTransitioning:!1}),[i,u]=f.useState(),[d,m]=f.useState(),[y,g]=f.useState(),E=f.useRef(new Map),R=f.useCallback((L,{deletedFetchers:T,flushSync:h,viewTransitionOpts:P})=>{L.fetchers.forEach((D,U)=>{D.data!==void 0&&E.current.set(U,D.data)}),T.forEach(D=>E.current.delete(D)),wn(h===!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 A=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(wn(P==null||A,"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."),!P||!A){t&&h?t(()=>a(L)):f.startTransition(()=>a(L));return}if(t&&h){t(()=>{d&&(i&&i.resolve(),d.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:P.currentLocation,nextLocation:P.nextLocation})});let D=e.window.document.startViewTransition(()=>{t(()=>a(L))});D.finished.finally(()=>{t(()=>{u(void 0),m(void 0),o(void 0),s({isTransitioning:!1})})}),t(()=>m(D));return}d?(i&&i.resolve(),d.skipTransition(),g({state:L,currentLocation:P.currentLocation,nextLocation:P.nextLocation})):(o(L),s({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}))},[e.window,t,d,i]);f.useLayoutEffect(()=>e.subscribe(R),[e,R]),f.useEffect(()=>{l.isTransitioning&&!l.flushSync&&u(new qi)},[l]),f.useEffect(()=>{if(i&&n&&e.window){let L=n,T=i.promise,h=e.window.document.startViewTransition(async()=>{f.startTransition(()=>a(L)),await T});h.finished.finally(()=>{u(void 0),m(void 0),o(void 0),s({isTransitioning:!1})}),m(h)}},[n,i,e.window]),f.useEffect(()=>{i&&n&&r.location.key===n.location.key&&i.resolve()},[i,d,r.location,n]),f.useEffect(()=>{!l.isTransitioning&&y&&(o(y.state),s({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),g(void 0))},[l.isTransitioning,y]);let w=f.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:L=>e.navigate(L),push:(L,T,h)=>e.navigate(L,{state:T,preventScrollReset:h==null?void 0:h.preventScrollReset}),replace:(L,T,h)=>e.navigate(L,{replace:!0,state:T,preventScrollReset:h==null?void 0:h.preventScrollReset})}),[e]),S=e.basename||"/",x=f.useMemo(()=>({router:e,navigator:w,static:!1,basename:S}),[e,w,S]);return f.createElement(f.Fragment,null,f.createElement(Ae.Provider,{value:x},f.createElement(Be.Provider,{value:r},f.createElement(Kn.Provider,{value:E.current},f.createElement(vr.Provider,{value:l},f.createElement(el,{basename:S,location:r.location,navigationType:r.historyAction,navigator:w},f.createElement(Qi,{routes:e.routes,future:e.future,state:r})))))),null)}var Qi=f.memo(Zi);function Zi({routes:e,future:t,state:r}){return Ui(e,void 0,r,t)}function ss(e){return ji(e.context)}function el({basename:e="/",children:t=null,location:r,navigationType:a="POP",navigator:n,static:o=!1}){j(!at(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=f.useMemo(()=>({basename:l,navigator:n,static:o,future:{}}),[l,n,o]);typeof r=="string"&&(r=xe(r));let{pathname:i="/",search:u="",hash:d="",state:m=null,key:y="default"}=r,g=f.useMemo(()=>{let E=ie(i,l);return E==null?null:{location:{pathname:E,search:u,hash:d,state:m,key:y},navigationType:a}},[l,i,u,d,m,y,a]);return G(g!=null,`<Router basename="${l}"> is not able to match the URL "${i}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:f.createElement(se.Provider,{value:s},f.createElement(At.Provider,{children:t,value:g}))}var Ct="get",Pt="application/x-www-form-urlencoded";function Nt(e){return e!=null&&typeof e.tagName=="string"}function tl(e){return Nt(e)&&e.tagName.toLowerCase()==="button"}function rl(e){return Nt(e)&&e.tagName.toLowerCase()==="form"}function nl(e){return Nt(e)&&e.tagName.toLowerCase()==="input"}function al(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ol(e,t){return e.button===0&&(!t||t==="_self")&&!al(e)}var Et=null;function il(){if(Et===null)try{new FormData(document.createElement("form"),0),Et=!1}catch{Et=!0}return Et}var ll=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Kt(e){return e!=null&&!ll.has(e)?(G(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pt}"`),null):e}function sl(e,t){let r,a,n,o,l;if(rl(e)){let s=e.getAttribute("action");a=s?ie(s,t):null,r=e.getAttribute("method")||Ct,n=Kt(e.getAttribute("enctype"))||Pt,o=new FormData(e)}else if(tl(e)||nl(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let i=e.getAttribute("formaction")||s.getAttribute("action");if(a=i?ie(i,t):null,r=e.getAttribute("formmethod")||s.getAttribute("method")||Ct,n=Kt(e.getAttribute("formenctype"))||Kt(s.getAttribute("enctype"))||Pt,o=new FormData(s,e),!il()){let{name:u,type:d,value:m}=e;if(d==="image"){let y=u?`${u}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else u&&o.append(u,m)}}else{if(Nt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Ct,a=null,n=Pt,l=e}return o&&n==="text/plain"&&(l=o,o=void 0),{action:a,method:r.toLowerCase(),encType:n,formData:o,body:l}}function oe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function ta(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 ul(e,t,r){let a=e.map(o=>{var i;let l=t[o.route.id],s=r.routes[o.route.id];return[s&&s.css?s.css.map(u=>({rel:"stylesheet",href:u})):[],((i=l==null?void 0:l.links)==null?void 0:i.call(l))||[]]}).flat(2),n=Rr(e,r);return oa(a,n)}function ra(e){return e.css?e.css.map(t=>({rel:"stylesheet",href:t})):[]}async function cl(e){if(!e.css)return;let t=ra(e);await Promise.all(t.map(aa))}async function na(e,t){if(!e.css&&!t.links||!pl())return;let r=[];if(e.css&&r.push(...ra(e)),t.links&&r.push(...t.links()),r.length===0)return;let a=[];for(let n of r)!Er(n)&&n.rel==="stylesheet"&&a.push({...n,rel:"preload",as:"style"});await Promise.all(a.map(aa))}async function aa(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 a(){document.head.contains(r)&&document.head.removeChild(r)}r.onload=()=>{a(),t()},r.onerror=()=>{a(),t()},document.head.appendChild(r)})}function Er(e){return e!=null&&typeof e.page=="string"}function dl(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 fl(e,t,r){let a=await Promise.all(e.map(async n=>{let o=t.routes[n.route.id];if(o){let l=await ta(o,r);return l.links?l.links():[]}return[]}));return oa(a.flat(1).filter(dl).filter(n=>n.rel==="stylesheet"||n.rel==="preload").map(n=>n.rel==="stylesheet"?{...n,rel:"prefetch",as:"style"}:{...n,rel:"prefetch"}))}function En(e,t,r,a,n,o){let l=(i,u)=>r[u]?i.route.id!==r[u].route.id:!0,s=(i,u)=>{var d;return r[u].pathname!==i.pathname||((d=r[u].route.path)==null?void 0:d.endsWith("*"))&&r[u].params["*"]!==i.params["*"]};return o==="assets"?t.filter((i,u)=>l(i,u)||s(i,u)):o==="data"?t.filter((i,u)=>{var m;let d=a.routes[i.route.id];if(!d||!d.hasLoader)return!1;if(l(i,u)||s(i,u))return!0;if(i.route.shouldRevalidate){let y=i.route.shouldRevalidate({currentUrl:new URL(n.pathname+n.search+n.hash,window.origin),currentParams:((m=r[0])==null?void 0:m.params)||{},nextUrl:new URL(e,window.origin),nextParams:i.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function Rr(e,t,{includeHydrateFallback:r}={}){return hl(e.map(a=>{let n=t.routes[a.route.id];if(!n)return[];let o=[n.module];return n.clientActionModule&&(o=o.concat(n.clientActionModule)),n.clientLoaderModule&&(o=o.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(o=o.concat(n.hydrateFallbackModule)),n.imports&&(o=o.concat(n.imports)),o}).flat(1))}function hl(e){return[...new Set(e)]}function ml(e){let t={},r=Object.keys(e).sort();for(let a of r)t[a]=e[a];return t}function oa(e,t){let r=new Set,a=new Set(t);return e.reduce((n,o)=>{if(t&&!Er(o)&&o.as==="script"&&o.href&&a.has(o.href))return n;let s=JSON.stringify(ml(o));return r.has(s)||(r.add(s),n.push({key:s,link:o})),n},[])}var Rt;function pl(){if(Rt!==void 0)return Rt;let e=document.createElement("link");return Rt=e.relList.supports("preload"),e=null,Rt}function Rn(e){return{__html:e}}async function $t(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}var ia=Symbol("SingleFetchRedirect");function bt(e,t){return{[t]:{type:"error",result:e}}}function us(e,t,r,a,n){return async o=>{let{request:l,matches:s,fetcherKey:i}=o;return l.method!=="GET"?tt(o,!1,()=>yl(l,s,a),bt):!r&&!s.some(d=>{var m,y;return d.shouldLoad&&((m=e.routes[d.route.id])==null?void 0:m.hasLoader)&&!((y=e.routes[d.route.id])!=null&&y.hasClientLoader)})?tt(o,!1,()=>vl(e,l,s,a),bt):i?tt(o,!1,()=>wl(l,s,a),bt):tt(o,!1,()=>gl(e,t,r,n(),l,s,a),bt)}}async function yl(e,t,r){let a=t.find(l=>l.shouldLoad);oe(a,"No action match found");let n,o=await a.resolve(async l=>await l(async()=>{let i=st(e.url,r),u=await $t(e),{data:d,status:m}=await xr(i,u);return n=m,rr(d,a.route.id)}));return pr(o.result)||ke(o.result)?{[a.route.id]:o}:{[a.route.id]:{type:o.type,result:ii(o.result,n)}}}async function vl(e,t,r,a){let n=r.filter(i=>i.shouldLoad),o=Sr(st(t.url,a)),l=await $t(t),s={};return await Promise.all(n.map(i=>i.resolve(async u=>{var d;try{let m=(d=e.routes[i.route.id])!=null&&d.hasClientLoader?await br(u,o,l,i.route.id):await u();s[i.route.id]={type:"data",result:m}}catch(m){s[i.route.id]={type:"error",result:m}}}))),s}async function gl(e,t,r,a,n,o,l){let s=new Set,i=!1,u=o.map(()=>bn()),d=Promise.all(u.map(w=>w.promise)),m=bn(),y=Sr(st(n.url,l)),g=await $t(n),E={},R=Promise.all(o.map(async(w,S)=>w.resolve(async x=>{u[S].resolve();let L=e.routes[w.route.id];if(!w.shouldLoad){if(!a.state.initialized)return;if(w.route.id in a.state.loaderData&&L&&w.route.shouldRevalidate){L.hasLoader&&(i=!0);return}}if(L&&L.hasClientLoader){L.hasLoader&&(i=!0);try{let T=await br(x,y,g,w.route.id);E[w.route.id]={type:"data",result:T}}catch(T){E[w.route.id]={type:"error",result:T}}return}L&&L.hasLoader&&s.add(w.route.id);try{let T=await x(async()=>{let h=await m.promise;return la(h,w.route.id)});E[w.route.id]={type:"data",result:T}}catch(T){E[w.route.id]={type:"error",result:T}}})));if(await d,(!a.state.initialized||s.size===0)&&!window.__reactRouterHdrActive)m.resolve({});else try{r&&i&&s.size>0&&y.searchParams.set("_routes",o.filter(S=>s.has(S.route.id)).map(S=>S.route.id).join(","));let w=await xr(y,g);m.resolve(w.data)}catch(w){m.reject(w)}return await R,E}async function wl(e,t,r){let a=t.find(o=>o.shouldLoad);oe(a,"No fetcher match found");let n=await a.resolve(async o=>{let l=Sr(st(e.url,r)),s=await $t(e);return br(o,l,s,a.route.id)});return{[a.route.id]:n}}function br(e,t,r,a){return e(async()=>{let n=new URL(t);n.searchParams.set("_routes",a);let{data:o}=await xr(n,r);return la(o,a)})}function Sr(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let a of t)a&&r.push(a);for(let a of r)e.searchParams.append("index",a);return e}function st(e,t){let r=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r.pathname==="/"?r.pathname="_root.data":t&&ie(r.pathname,t)==="/"?r.pathname=`${t.replace(/\/$/,"")}/_root.data`:r.pathname=`${r.pathname.replace(/\/$/,"")}.data`,r}async function xr(e,t){let r=await fetch(e,t);if(r.status===404&&!r.headers.has("X-Remix-Response"))throw new Se(404,"Not Found",!0);if(new Set([100,101,204,205]).has(r.status))return!t.method||t.method==="GET"?{status:r.status,data:{}}:{status:r.status,data:{data:void 0}};oe(r.body,"No response body to decode");try{let n=await El(r.body,window);return{status:r.status,data:n.value}}catch{throw new Error("Unable to decode turbo-stream response")}}function El(e,t){return Eo(e,{plugins:[(r,...a)=>{if(r==="SanitizedError"){let[n,o,l]=a,s=Error;n&&n in t&&typeof t[n]=="function"&&(s=t[n]);let i=new s(o);return i.stack=l,{value:i}}if(r==="ErrorResponse"){let[n,o,l]=a;return{value:new Se(o,l,n)}}if(r==="SingleFetchRedirect")return{value:{[ia]:a[0]}};if(r==="SingleFetchClassInstance")return{value:a[0]};if(r==="SingleFetchFallback")return{value:void 0}}]})}function la(e,t){let r=e[ia];return r?rr(r,t):e[t]!==void 0?rr(e[t],t):null}function rr(e,t){if("error"in e)throw e.error;if("redirect"in e){let r={};throw e.revalidate&&(r["X-Remix-Revalidate"]="yes"),e.reload&&(r["X-Remix-Reload-Document"]="yes"),e.replace&&(r["X-Remix-Replace"]="yes"),li(e.redirect,{status:e.status,headers:r})}else{if("data"in e)return e.data;throw new Error(`No response found for routeId "${t}"`)}}function bn(){let e,t,r=new Promise((a,n)=>{e=async o=>{a(o);try{await r}catch{}},t=async o=>{n(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var cs=class extends f.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?f.createElement(sa,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function sa({error:e,isOutsideRemixApp:t}){console.error(e);let r=f.createElement("script",{dangerouslySetInnerHTML:{__html:`
31
- console.log(
32
- "💿 Hey developer 👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."
33
- );
34
- `}});if(ke(e))return f.createElement(nr,{title:"Unhandled Thrown Response!"},f.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),r);let a;if(e instanceof Error)a=e;else{let n=e==null?"Unknown Error":typeof e=="object"&&"toString"in e?e.toString():JSON.stringify(e);a=new Error(n)}return f.createElement(nr,{title:"Application Error!",isOutsideRemixApp:t},f.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),f.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),r)}function nr({title:e,renderScripts:t,isOutsideRemixApp:r,children:a}){var o;let{routeModules:n}=Ye();return(o=n.root)!=null&&o.Layout&&!r?a:f.createElement("html",{lang:"en"},f.createElement("head",null,f.createElement("meta",{charSet:"utf-8"}),f.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),f.createElement("title",null,e)),f.createElement("body",null,f.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,t?f.createElement(Nl,null):null)))}function Rl(){return f.createElement(nr,{title:"Loading...",renderScripts:!0},f.createElement("script",{dangerouslySetInnerHTML:{__html:`
35
- console.log(
36
- "💿 Hey developer 👋. You can provide a way better UX than this " +
37
- "when your app is loading JS modules and/or running \`clientLoader\` " +
38
- "functions. Check out https://remix.run/route/hydrate-fallback " +
39
- "for more information."
40
- );
41
- `}}))}function ua(e){let t={};return Object.values(e).forEach(r=>{if(r){let a=r.parentId||"";t[a]||(t[a]=[]),t[a].push(r)}}),t}function bl(e,t,r){let a=ca(t),n=t.HydrateFallback&&(!r||e.id==="root")?t.HydrateFallback:e.id==="root"?Rl:void 0,o=t.ErrorBoundary?t.ErrorBoundary:e.id==="root"?()=>f.createElement(sa,{error:Zn()}):void 0;return e.id==="root"&&t.Layout?{...a?{element:f.createElement(t.Layout,null,f.createElement(a,null))}:{Component:a},...o?{errorElement:f.createElement(t.Layout,null,f.createElement(o,null))}:{ErrorBoundary:o},...n?{hydrateFallbackElement:f.createElement(t.Layout,null,f.createElement(n,null))}:{HydrateFallback:n}}:{Component:a,ErrorBoundary:o,HydrateFallback:n}}function ds(e,t,r,a,n,o){return Lr(t,r,a,n,o,"",ua(t),e)}function St(e,t){if(e==="loader"&&!t.hasLoader||e==="action"&&!t.hasAction){let a=`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(a),new Se(400,"Bad Request",new Error(a),!0)}}function Xt(e,t){let r=e==="clientAction"?"a":"an",a=`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(a),new Se(405,"Method Not Allowed",new Error(a),!0)}function Lr(e,t,r,a,n,o="",l=ua(e),s){return(l[o]||[]).map(i=>{var x,L,T;let u=t[i.id];function d(h){return oe(typeof h=="function","No single fetch function available for route handler"),h()}function m(h){return i.hasLoader?d(h):Promise.resolve(null)}function y(h){if(!i.hasAction)throw Xt("action",i.id);return d(h)}function g(h){import(h)}function E(h){h.clientActionModule&&g(h.clientActionModule),h.clientLoaderModule&&g(h.clientLoaderModule)}async function R(h){let P=t[i.id],A=P?na(i,P):Promise.resolve();try{return h()}finally{await A}}let w={id:i.id,index:i.index,path:i.path};if(u){Object.assign(w,{...w,...bl(i,u,n),unstable_middleware:u.unstable_clientMiddleware,handle:u.handle,shouldRevalidate:Sn(u,i,a,s)});let h=r&&r.loaderData&&i.id in r.loaderData,P=h?(x=r==null?void 0:r.loaderData)==null?void 0:x[i.id]:void 0,A=r&&r.errors&&i.id in r.errors,D=A?(L=r==null?void 0:r.errors)==null?void 0:L[i.id]:void 0,U=s==null&&(((T=u.clientLoader)==null?void 0:T.hydrate)===!0||!i.hasLoader);w.loader=async({request:z,params:q,context:ne},te)=>{try{return await R(async()=>(oe(u,"No `routeModule` available for critical-route loader"),u.clientLoader?u.clientLoader({request:z,params:q,context:ne,async serverLoader(){if(St("loader",i),U){if(h)return P;if(A)throw D}return m(te)}}):m(te)))}finally{U=!1}},w.loader.hydrate=Ll(i,u,n),w.action=({request:z,params:q,context:ne},te)=>R(async()=>{if(oe(u,"No `routeModule` available for critical-route action"),!u.clientAction){if(n)throw Xt("clientAction",i.id);return y(te)}return u.clientAction({request:z,params:q,context:ne,async serverAction(){return St("action",i),y(te)}})})}else{i.hasClientLoader||(w.loader=(A,D)=>R(()=>m(D))),i.hasClientAction||(w.action=(A,D)=>R(()=>{if(n)throw Xt("clientAction",i.id);return y(D)}));let h;async function P(){return h?await h:(h=(async()=>{(i.clientLoaderModule||i.clientActionModule)&&await new Promise(D=>setTimeout(D,0));let A=xl(i,t);return E(i),await A})(),await h)}w.lazy={loader:i.hasClientLoader?async()=>{let{clientLoader:A}=i.clientLoaderModule?await import(i.clientLoaderModule):await P();return oe(A,"No `clientLoader` export found"),(D,U)=>A({...D,async serverLoader(){return St("loader",i),m(U)}})}:void 0,action:i.hasClientAction?async()=>{let A=i.clientActionModule?import(i.clientActionModule):P();E(i);let{clientAction:D}=await A;return oe(D,"No `clientAction` export found"),(U,z)=>D({...U,async serverAction(){return St("action",i),y(z)}})}:void 0,unstable_middleware:i.hasClientMiddleware?async()=>{let{unstable_clientMiddleware:A}=i.clientMiddlewareModule?await import(i.clientMiddlewareModule):await P();return oe(A,"No `unstable_clientMiddleware` export found"),A}:void 0,shouldRevalidate:async()=>{let A=await P();return Sn(A,i,a,s)},handle:async()=>(await P()).handle,Component:async()=>(await P()).Component,ErrorBoundary:i.hasErrorBoundary?async()=>(await P()).ErrorBoundary:void 0}}let S=Lr(e,t,r,a,n,i.id,l,s);return S.length>0&&(w.children=S),w})}function Sn(e,t,r,a){if(a)return Sl(t.id,e.shouldRevalidate,a);if(!r&&t.hasLoader&&!t.hasClientLoader)if(e.shouldRevalidate){let n=e.shouldRevalidate;return o=>n({...o,defaultShouldRevalidate:!1})}else return()=>!1;if(r&&e.shouldRevalidate){let n=e.shouldRevalidate;return o=>n({...o,defaultShouldRevalidate:!0})}return e.shouldRevalidate}function Sl(e,t,r){let a=!1;return n=>a?t?t(n):n.defaultShouldRevalidate:(a=!0,r.has(e))}async function xl(e,t){let r=ta(e,t),a=cl(e),n=await r;return await Promise.all([a,na(e,n)]),{Component:ca(n),ErrorBoundary:n.ErrorBoundary,unstable_clientMiddleware:n.unstable_clientMiddleware,clientAction:n.clientAction,clientLoader:n.clientLoader,handle:n.handle,links:n.links,meta:n.meta,shouldRevalidate:n.shouldRevalidate}}function ca(e){if(e.default==null)return;if(!(typeof e.default=="object"&&Object.keys(e.default).length===0))return e.default}function Ll(e,t,r){return r&&e.id!=="root"||t.clientLoader!=null&&(t.clientLoader.hydrate===!0||e.hasLoader!==!0)}var Tt=new Set,Cl=1e3,Ot=new Set,Pl=7680;function Cr(e){return e===!0}function Tl({sri:e,...t},r){let a=new Set(r.state.matches.map(s=>s.route.id)),n=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(n.pop();n.length>0;)o.push(`/${n.join("/")}`),n.pop();o.forEach(s=>{let i=ge(r.routes,s,r.basename);i&&i.forEach(u=>a.add(u.route.id))});let l=[...a].reduce((s,i)=>Object.assign(s,{[i]:t.routes[i]}),{});return{...t,routes:l,sri:e?!0:void 0}}function fs(e,t,r,a,n){if(Cr(r))return async({path:o,patch:l,signal:s,fetcherKey:i})=>{Ot.has(o)||await da([o],i?window.location.href:o,e,t,r,a,n,l,s)}}function hs(e,t,r,a,n){f.useEffect(()=>{var u;if(!Cr(a)||((u=navigator.connection)==null?void 0:u.saveData)===!0)return;function o(d){let m=d.tagName==="FORM"?d.getAttribute("action"):d.getAttribute("href");if(!m)return;let y=d.tagName==="A"?d.pathname:new URL(m,window.location.origin).pathname;Ot.has(y)||Tt.add(y)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(o);let d=Array.from(Tt.keys()).filter(m=>Ot.has(m)?(Tt.delete(m),!1):!0);if(d.length!==0)try{await da(d,null,t,r,a,n,e.basename,e.patchRoutes)}catch(m){console.error("Failed to fetch manifest patches",m)}}let s=_l(l,100);l();let i=new MutationObserver(()=>s());return i.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>i.disconnect()},[a,n,t,r,e])}var qt="react-router-manifest-version";async function da(e,t,r,a,n,o,l,s,i){let u=`${l??"/"}/__manifest`.replace(/\/+/g,"/"),d=new URL(u,window.location.origin);if(e.sort().forEach(R=>d.searchParams.append("p",R)),d.searchParams.set("version",r.version),d.toString().length>Pl){Tt.clear();return}let m;try{let R=await fetch(d,{signal:i});if(R.ok){if(R.status===204&&R.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(qt)===r.version){console.error("Unable to discover routes due to manifest version mismatch.");return}throw sessionStorage.setItem(qt,r.version),window.location.href=t,new Error("Detected manifest version mismatch, reloading...")}else if(R.status>=400)throw new Error(await R.text())}else throw new Error(`${R.status} ${R.statusText}`);sessionStorage.removeItem(qt),m=await R.json()}catch(R){if(i!=null&&i.aborted)return;throw R}let y=new Set(Object.keys(r.routes)),g=Object.values(m).reduce((R,w)=>(w&&!y.has(w.id)&&(R[w.id]=w),R),{});Object.assign(r.routes,g),e.forEach(R=>Ml(R,Ot));let E=new Set;Object.values(g).forEach(R=>{R&&(!R.parentId||!g[R.parentId])&&E.add(R.parentId)}),E.forEach(R=>s(R||null,Lr(g,a,null,n,o,R)))}function Ml(e,t){if(t.size>=Cl){let r=t.values().next().value;t.delete(r)}t.add(e)}function _l(e,t){let r;return(...a)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...a),t)}}function Pr(){let e=f.useContext(Ae);return oe(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function It(){let e=f.useContext(Be);return oe(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ft=f.createContext(void 0);Ft.displayName="FrameworkContext";function Ye(){let e=f.useContext(Ft);return oe(e,"You must render this element inside a <HydratedRouter> element"),e}function Dl(e,t){let r=f.useContext(Ft),[a,n]=f.useState(!1),[o,l]=f.useState(!1),{onFocus:s,onBlur:i,onMouseEnter:u,onMouseLeave:d,onTouchStart:m}=t,y=f.useRef(null);f.useEffect(()=>{if(e==="render"&&l(!0),e==="viewport"){let R=S=>{S.forEach(x=>{l(x.isIntersecting)})},w=new IntersectionObserver(R,{threshold:.5});return y.current&&w.observe(y.current),()=>{w.disconnect()}}},[e]),f.useEffect(()=>{if(a){let R=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(R)}}},[a]);let g=()=>{n(!0)},E=()=>{n(!1),l(!1)};return r?e!=="intent"?[o,y,{}]:[o,y,{onFocus:Ze(s,g),onBlur:Ze(i,E),onMouseEnter:Ze(u,g),onMouseLeave:Ze(d,E),onTouchStart:Ze(m,g)}]:[!1,y,{}]}function Ze(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Tr(e,t,r){if(r&&!Mt)return[e[0]];if(t){let a=e.findIndex(n=>t[n.route.id]!==void 0);return e.slice(0,a+1)}return e}function ms(){let{isSpaMode:e,manifest:t,routeModules:r,criticalCss:a}=Ye(),{errors:n,matches:o}=It(),l=Tr(o,n,e),s=f.useMemo(()=>ul(l,r,t),[l,r,t]);return f.createElement(f.Fragment,null,typeof a=="string"?f.createElement("style",{dangerouslySetInnerHTML:{__html:a}}):null,typeof a=="object"?f.createElement("link",{rel:"stylesheet",href:a.href}):null,s.map(({key:i,link:u})=>Er(u)?f.createElement(fa,{key:i,...u}):f.createElement("link",{key:i,...u})))}function fa({page:e,...t}){let{router:r}=Pr(),a=f.useMemo(()=>ge(r.routes,e,r.basename),[r.routes,e,r.basename]);return a?f.createElement(kl,{page:e,matches:a,...t}):null}function Ol(e){let{manifest:t,routeModules:r}=Ye(),[a,n]=f.useState([]);return f.useEffect(()=>{let o=!1;return fl(e,t,r).then(l=>{o||n(l)}),()=>{o=!0}},[e,t,r]),a}function kl({page:e,matches:t,...r}){let a=me(),{manifest:n,routeModules:o}=Ye(),{basename:l}=Pr(),{loaderData:s,matches:i}=It(),u=f.useMemo(()=>En(e,t,i,n,a,"data"),[e,t,i,n,a]),d=f.useMemo(()=>En(e,t,i,n,a,"assets"),[e,t,i,n,a]),m=f.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let E=new Set,R=!1;if(t.forEach(S=>{var L;let x=n.routes[S.route.id];!x||!x.hasLoader||(!u.some(T=>T.route.id===S.route.id)&&S.route.id in s&&((L=o[S.route.id])!=null&&L.shouldRevalidate)||x.hasClientLoader?R=!0:E.add(S.route.id))}),E.size===0)return[];let w=st(e,l);return R&&E.size>0&&w.searchParams.set("_routes",t.filter(S=>E.has(S.route.id)).map(S=>S.route.id).join(",")),[w.pathname+w.search]},[l,s,a,n,u,t,e,o]),y=f.useMemo(()=>Rr(d,n),[d,n]),g=Ol(d);return f.createElement(f.Fragment,null,m.map(E=>f.createElement("link",{key:E,rel:"prefetch",as:"fetch",href:E,...r})),y.map(E=>f.createElement("link",{key:E,rel:"modulepreload",href:E,...r})),g.map(({key:E,link:R})=>f.createElement("link",{key:E,...R})))}function ps(){let{isSpaMode:e,routeModules:t}=Ye(),{errors:r,matches:a,loaderData:n}=It(),o=me(),l=Tr(a,r,e),s=null;r&&(s=r[l[l.length-1].route.id]);let i=[],u=null,d=[];for(let m=0;m<l.length;m++){let y=l[m],g=y.route.id,E=n[g],R=y.params,w=t[g],S=[],x={id:g,data:E,meta:[],params:y.params,pathname:y.pathname,handle:y.route.handle,error:s};if(d[m]=x,w!=null&&w.meta?S=typeof w.meta=="function"?w.meta({data:E,params:R,location:o,matches:d,error:s}):Array.isArray(w.meta)?[...w.meta]:w.meta:u&&(S=[...u]),S=S||[],!Array.isArray(S))throw new Error("The route at "+y.route.path+` returns an invalid value. All route meta functions must return an array of meta objects.
42
-
43
- To reference the meta function API, see https://remix.run/route/meta`);x.meta=S,d[m]=x,i=[...S],u=i}return f.createElement(f.Fragment,null,i.flat().map(m=>{if(!m)return null;if("tagName"in m){let{tagName:y,...g}=m;if(!Al(y))return console.warn(`A meta object uses an invalid tagName: ${y}. Expected either 'link' or 'meta'`),null;let E=y;return f.createElement(E,{key:JSON.stringify(g),...g})}if("title"in m)return f.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"?f.createElement("meta",{key:"charSet",charSet:m.charSet}):null;if("script:ld+json"in m)try{let y=JSON.stringify(m["script:ld+json"]);return f.createElement("script",{key:`script:ld+json:${y}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:y}})}catch{return null}return f.createElement("meta",{key:JSON.stringify(m),...m})}))}function Al(e){return typeof e=="string"&&/^(meta|link)$/.test(e)}var Mt=!1;function Nl(e){let{manifest:t,serverHandoffString:r,isSpaMode:a,ssr:n,renderMeta:o}=Ye(),{router:l,static:s,staticContext:i}=Pr(),{matches:u}=It(),d=Cr(n);o&&(o.didRenderScripts=!0);let m=Tr(u,null,a);f.useEffect(()=>{Mt=!0},[]);let y=f.useMemo(()=>{var x;let w=i?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",S=s?`${(x=t.hmr)!=null&&x.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${d?"":`import ${JSON.stringify(t.url)}`};
44
- ${m.map((L,T)=>{let h=`route${T}`,P=t.routes[L.route.id];oe(P,`Route ${L.route.id} not found in manifest`);let{clientActionModule:A,clientLoaderModule:D,clientMiddlewareModule:U,hydrateFallbackModule:z,module:q}=P,ne=[...A?[{module:A,varName:`${h}_clientAction`}]:[],...D?[{module:D,varName:`${h}_clientLoader`}]:[],...U?[{module:U,varName:`${h}_clientMiddleware`}]:[],...z?[{module:z,varName:`${h}_HydrateFallback`}]:[],{module:q,varName:`${h}_main`}];if(ne.length===1)return`import * as ${h} from ${JSON.stringify(q)};`;let te=ne.map(Y=>`import * as ${Y.varName} from "${Y.module}";`).join(`
45
- `),Le=`const ${h} = {${ne.map(Y=>`...${Y.varName}`).join(",")}};`;return[te,Le].join(`
46
- `)}).join(`
47
- `)}
48
- ${d?`window.__reactRouterManifest = ${JSON.stringify(Tl(t,l),null,2)};`:""}
49
- window.__reactRouterRouteModules = {${m.map((L,T)=>`${JSON.stringify(L.route.id)}:route${T}`).join(",")}};
50
-
51
- import(${JSON.stringify(t.entry.module)});`:" ";return f.createElement(f.Fragment,null,f.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Rn(w),type:void 0}),f.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:Rn(S),type:"module",async:!0}))},[]),g=Mt?[]:$l(t.entry.imports.concat(Rr(m,t,{includeHydrateFallback:!0}))),E=typeof t.sri=="object"?t.sri:{};return Mt?null:f.createElement(f.Fragment,null,typeof t.sri=="object"?f.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:E})}}):null,d?null:f.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:E[t.url],suppressHydrationWarning:!0}),f.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:E[t.entry.module],suppressHydrationWarning:!0}),g.map(R=>f.createElement("link",{key:R,rel:"modulepreload",href:R,crossOrigin:e.crossOrigin,integrity:E[R],suppressHydrationWarning:!0})),y)}function $l(e){return[...new Set(e)]}function Il(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var ha=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ha&&(window.__reactRouterVersion="7.5.0")}catch{}var ma=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pa=f.forwardRef(function({onClick:t,discover:r="render",prefetch:a="none",relative:n,reloadDocument:o,replace:l,state:s,target:i,to:u,preventScrollReset:d,viewTransition:m,...y},g){let{basename:E}=f.useContext(se),R=typeof u=="string"&&ma.test(u),w,S=!1;if(typeof u=="string"&&R&&(w=u,ha))try{let U=new URL(window.location.href),z=u.startsWith("//")?new URL(U.protocol+u):new URL(u),q=ie(z.pathname,E);z.origin===U.origin&&q!=null?u=q+z.search+z.hash:S=!0}catch{G(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=Ni(u,{relative:n}),[L,T,h]=Dl(a,y),P=zl(u,{replace:l,state:s,target:i,preventScrollReset:d,relative:n,viewTransition:m});function A(U){t&&t(U),U.defaultPrevented||P(U)}let D=f.createElement("a",{...y,...h,href:w||x,onClick:S||o?t:A,ref:Il(g,T),target:i,"data-discover":!R&&r==="render"?"true":void 0});return L&&!R?f.createElement(f.Fragment,null,D,f.createElement(fa,{page:x})):D});pa.displayName="Link";var Fl=f.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:a="",end:n=!1,style:o,to:l,viewTransition:s,children:i,...u},d){let m=ot(l,{relative:u.relative}),y=me(),g=f.useContext(Be),{navigator:E,basename:R}=f.useContext(se),w=g!=null&&Kl(m)&&s===!0,S=E.encodeLocation?E.encodeLocation(m).pathname:m.pathname,x=y.pathname,L=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(x=x.toLowerCase(),L=L?L.toLowerCase():null,S=S.toLowerCase()),L&&R&&(L=ie(L,R)||L);const T=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let h=x===S||!n&&x.startsWith(S)&&x.charAt(T)==="/",P=L!=null&&(L===S||!n&&L.startsWith(S)&&L.charAt(S.length)==="/"),A={isActive:h,isPending:P,isTransitioning:w},D=h?t:void 0,U;typeof a=="function"?U=a(A):U=[a,h?"active":null,P?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let z=typeof o=="function"?o(A):o;return f.createElement(pa,{...u,"aria-current":D,className:U,ref:d,style:z,to:l,viewTransition:s},typeof i=="function"?i(A):i)});Fl.displayName="NavLink";var jl=f.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:a,replace:n,state:o,method:l=Ct,action:s,onSubmit:i,relative:u,preventScrollReset:d,viewTransition:m,...y},g)=>{let E=Wl(),R=Vl(s,{relative:u}),w=l.toLowerCase()==="get"?"get":"post",S=typeof s=="string"&&ma.test(s),x=L=>{if(i&&i(L),L.defaultPrevented)return;L.preventDefault();let T=L.nativeEvent.submitter,h=(T==null?void 0:T.getAttribute("formmethod"))||l;E(T||L.currentTarget,{fetcherKey:t,method:h,navigate:r,replace:n,state:o,relative:u,preventScrollReset:d,viewTransition:m})};return f.createElement("form",{ref:g,method:w,action:R,onSubmit:a?i:x,...y,"data-discover":!S&&e==="render"?"true":void 0})});jl.displayName="Form";function Ul({getKey:e,storageKey:t,...r}){let a=f.useContext(Ft),{basename:n}=f.useContext(se),o=me(),l=Qn();Jl({getKey:e,storageKey:t});let s=f.useMemo(()=>{if(!a||!e)return null;let u=or(o,l,n,e);return u!==o.key?u:null},[]);if(!a||a.isSpaMode)return null;let i=((u,d)=>{if(!window.history.state||!window.history.state.key){let m=Math.random().toString(32).slice(2);window.history.replaceState({key:m},"")}try{let y=JSON.parse(sessionStorage.getItem(u)||"{}")[d||window.history.state.key];typeof y=="number"&&window.scrollTo(0,y)}catch(m){console.error(m),sessionStorage.removeItem(u)}}).toString();return f.createElement("script",{...r,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${i})(${JSON.stringify(t||ar)}, ${JSON.stringify(s)})`}})}Ul.displayName="ScrollRestoration";function ya(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mr(e){let t=f.useContext(Ae);return j(t,ya(e)),t}function Hl(e){let t=f.useContext(Be);return j(t,ya(e)),t}function zl(e,{target:t,replace:r,state:a,preventScrollReset:n,relative:o,viewTransition:l}={}){let s=$i(),i=me(),u=ot(e,{relative:o});return f.useCallback(d=>{if(ol(d,t)){d.preventDefault();let m=r!==void 0?r:be(i)===be(u);s(e,{replace:m,state:a,preventScrollReset:n,relative:o,viewTransition:l})}},[i,s,u,r,a,t,e,n,o,l])}var Bl=0,Yl=()=>`__${String(++Bl)}__`;function Wl(){let{router:e}=Mr("useSubmit"),{basename:t}=f.useContext(se),r=Gi();return f.useCallback(async(a,n={})=>{let{action:o,method:l,encType:s,formData:i,body:u}=sl(a,t);if(n.navigate===!1){let d=n.fetcherKey||Yl();await e.fetch(d,r,n.action||o,{preventScrollReset:n.preventScrollReset,formData:i,body:u,formMethod:n.method||l,formEncType:n.encType||s,flushSync:n.flushSync})}else await e.navigate(n.action||o,{preventScrollReset:n.preventScrollReset,formData:i,body:u,formMethod:n.method||l,formEncType:n.encType||s,replace:n.replace,state:n.state,fromRouteId:r,flushSync:n.flushSync,viewTransition:n.viewTransition})},[e,t,r])}function Vl(e,{relative:t}={}){let{basename:r}=f.useContext(se),a=f.useContext(ce);j(a,"useFormAction must be used inside a RouteContext");let[n]=a.matches.slice(-1),o={...ot(e||".",{relative:t})},l=me();if(e==null){o.search=l.search;let s=new URLSearchParams(o.search),i=s.getAll("index");if(i.some(d=>d==="")){s.delete("index"),i.filter(m=>m).forEach(m=>s.append("index",m));let d=s.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&n.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:he([r,o.pathname])),be(o)}var ar="react-router-scroll-positions",xt={};function or(e,t,r,a){let n=null;return a&&(r!=="/"?n=a({...e,pathname:ie(e.pathname,r)||e.pathname},t):n=a(e,t)),n==null&&(n=e.key),n}function Jl({getKey:e,storageKey:t}={}){let{router:r}=Mr("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:n}=Hl("useScrollRestoration"),{basename:o}=f.useContext(se),l=me(),s=Qn(),i=Ki();f.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),Gl(f.useCallback(()=>{if(i.state==="idle"){let u=or(l,s,o,e);xt[u]=window.scrollY}try{sessionStorage.setItem(t||ar,JSON.stringify(xt))}catch(u){G(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${u}).`)}window.history.scrollRestoration="auto"},[i.state,e,o,l,s,t])),typeof document<"u"&&(f.useLayoutEffect(()=>{try{let u=sessionStorage.getItem(t||ar);u&&(xt=JSON.parse(u))}catch{}},[t]),f.useLayoutEffect(()=>{let u=r==null?void 0:r.enableScrollRestoration(xt,()=>window.scrollY,e?(d,m)=>or(d,m,o,e):void 0);return()=>u&&u()},[r,o,e]),f.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(l.hash){let u=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(u){u.scrollIntoView();return}}n!==!0&&window.scrollTo(0,0)}},[l,a,n]))}function Gl(e,t){let{capture:r}={};f.useEffect(()=>{let a=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,r])}function Kl(e,t={}){let r=f.useContext(vr);j(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Mr("useViewTransitionState"),n=ot(e,{relative:t.relative});if(!r.isTransitioning)return!1;let o=ie(r.currentLocation.pathname,a)||r.currentLocation.pathname,l=ie(r.nextLocation.pathname,a)||r.nextLocation.pathname;return Dt(n.pathname,l)!=null||Dt(n.pathname,o)!=null}new TextEncoder;function ys(e){if(!e)return null;let t=Object.entries(e),r={};for(let[a,n]of t)if(n&&n.__type==="RouteErrorResponse")r[a]=new Se(n.status,n.statusText,n.data,n.internal===!0);else if(n&&n.__type==="Error"){if(n.__subType){let o=window[n.__subType];if(typeof o=="function")try{let l=new o(n.message);l.stack=n.stack,r[a]=l}catch{}}if(r[a]==null){let o=new Error(n.message);o.stack=n.stack,r[a]=o}}else r[a]=n;return r}export{os as A,as as B,ns as C,Zn as D,Ft as F,ms as L,ps as M,Fl as N,ss as O,cs as R,Ul as S,ls as a,ys as b,Lr as c,El as d,rs as e,us as f,fs as g,ts as h,j as i,ds as j,is as k,Ql as l,ge as m,Nl as n,ke as o,$i as p,pa as q,f as r,Ll as s,me as t,hs as u,to as v,Ia as w,Zl as x,ql as y,Qn as z};
@@ -1 +0,0 @@
1
- import{w as h}from"./index-G-cqIhgh.js";import{l as e,r as j,q as b}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{c as m}from"./utils-DslUJpbf.js";import{a as w,u as C,g as N,h as v}from"./editorialApi-DCnC5eM9.js";import{c as T,u as y,T as D,a as L,b as u,d as R,f as x,e as A,g as k,h as H}from"./index-DrhM6FV9.js";function I({className:a,...s}){return e.jsx("div",{"data-slot":"skeleton",className:m("bg-accent animate-pulse rounded-md",a),...s})}function p({className:a,title:s,value:o,isLoading:n,...t}){return e.jsxs("div",{className:m("border border-border rounded-xl p-6",a),...t,children:[e.jsx("h3",{className:"text-xs text-muted-foreground",children:s}),n?e.jsx(I,{className:"h-[2.25rem] w-16"}):e.jsx("p",{className:"text-lg sm:text-3xl font-bold leading-none",children:o})]})}const c=T(),i=[c.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(a){const s=a.getValue();return e.jsx("span",{title:s,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:s})}}),c.accessor("createdAt",{header:"Created At",cell(a){return new Date(a.getValue()).toLocaleString()}}),c.accessor("updatedAt",{header:"Updated At",cell(a){return new Date(a.getValue()).toLocaleString()}})];function S(){const{data:a}=w(),{data:s}=C(),o=j.useMemo(()=>!a||!s?[]:Object.entries(a).filter(([r])=>r in s).reduce((r,[d,f])=>r.concat(Object.values(f).map(g=>({...g,type:d}))),[]).toSorted((r,d)=>r.updatedAt>d.updatedAt?-1:1).slice(0,6),[a,s]),n=y({data:o,columns:i,getCoreRowModel:H()});return e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(D,{children:[e.jsx(L,{children:n.getHeaderGroups().map(t=>e.jsx(u,{className:"grid",style:{gridTemplateColumns:`repeat(${i.length}, minmax(200px, 1fr))`},children:t.headers.map(l=>e.jsx(R,{children:l.isPlaceholder?null:x(l.column.columnDef.header,l.getContext())},l.id))},t.id))}),e.jsx(A,{children:n.getRowModel().rows.map(t=>e.jsx(b,{to:`/admin/dashboard/${t.original.type}/${t.original.id}`,children:e.jsx(u,{className:"grid",style:{gridTemplateColumns:`repeat(${i.length}, minmax(200px, 1fr))`},children:t.getVisibleCells().map(l=>e.jsx(k,{className:m("p-2"),children:x(l.column.columnDef.cell,l.getContext())},l.id))},t.id)}))})]})})}const E=h(function(){const{data:s,isLoading:o}=N(),{data:n,isLoading:t}=v();return e.jsx("div",{className:"flex flex-1 h-full p-4 gap-4",children:e.jsxs("div",{className:"flex flex-col overflow-hidden flex-1 gap-4",children:[e.jsxs("div",{className:"flex flex-row gap-2 grid-cols-12",children:[e.jsx(p,{className:"w-full sm:w-44",title:"Items",value:s,isLoading:o}),e.jsx(p,{className:"w-full sm:w-44",title:"Files",value:n,isLoading:t})]}),e.jsxs("div",{className:"flex flex-col gap-4 last:mb-20",children:[e.jsx("h2",{className:"scroll-mt-[4.5rem] text-xl font-semibold leading-none capitalize",children:"Recent Collections"}),e.jsx(S,{})]})]})})});export{E as default};
@@ -1 +0,0 @@
1
- import{w as a}from"./index-G-cqIhgh.js";import{l as o}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{I as s}from"./itemForm-dtoqbEoC.js";import{i as p,k as c}from"./editorialApi-DCnC5eM9.js";import"./button-O0EDocjF.js";import"./utils-DslUJpbf.js";import"./input-BH49oaMa.js";import"./index-B_FOxFgA.js";import"./index-B7e3fQ32.js";import"./createLucideIcon-TQsNVzYU.js";import"./index-C-iH5ItK.js";import"./tslib.es6-CDuPK5Eb.js";const b=a(function({params:m}){const{collectionId:t,documentId:r}=m,{data:e}=p(t),{data:i}=c({itemType:t,id:r});return!e||!i?null:o.jsx("div",{className:"overflow-auto",children:o.jsx("div",{className:"flex p-4 gap-4",children:o.jsx(s,{itemType:t,fields:e.fields,data:i})})})});export{b as default};
@@ -1 +0,0 @@
1
- import{w as i}from"./index-G-cqIhgh.js";import{l as o}from"./chunk-KNED5TY2-CXj9yqcQ.js";import{I as m}from"./itemForm-dtoqbEoC.js";import{i as s}from"./editorialApi-DCnC5eM9.js";import"./button-O0EDocjF.js";import"./utils-DslUJpbf.js";import"./input-BH49oaMa.js";import"./index-B_FOxFgA.js";import"./index-B7e3fQ32.js";import"./createLucideIcon-TQsNVzYU.js";import"./index-C-iH5ItK.js";import"./tslib.es6-CDuPK5Eb.js";const y=i(function({params:e}){const{collectionId:t}=e,{data:r}=s(t);return r?o.jsx("div",{className:"overflow-auto",children:o.jsx("div",{className:"flex p-4 gap-4",children:o.jsx(m,{itemType:t,fields:r.fields,isNew:!0})})}):null});export{y as default};