@isardsat/editorial-admin 6.2.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/client/assets/{authSlice-BWVz4jZT.js → authSlice-DST6tNnU.js} +1 -1
- package/build/client/assets/{dashboard-uK1JUDJC.js → dashboard-BjYHjaPP.js} +1 -1
- package/build/client/assets/{dashboard._collection-BNdxRLEC.js → dashboard._collection-U37ELAZn.js} +1 -1
- package/build/client/assets/{dashboard._collection._document-CZS2Adz-.js → dashboard._collection._document-Dt2belpf.js} +1 -1
- package/build/client/assets/{dashboard._collection.new-BEBBwujj.js → dashboard._collection.new-B-0plYyF.js} +1 -1
- package/build/client/assets/{dashboard._layout-Ce0XSLxb.js → dashboard._layout-D6uAMjWG.js} +1 -1
- package/build/client/assets/{dashboard.files-D1ph0y7T.js → dashboard.files-Bal43yfa.js} +1 -1
- package/build/client/assets/editorialApi-CqxxtYzA.js +9 -0
- package/build/client/assets/{home-D_H1PlMw.js → home-BkOGwoQz.js} +1 -1
- package/build/client/assets/{itemForm-DTE9G8eu.js → itemForm-CnzvRzeD.js} +1 -1
- package/build/client/assets/{manifest-62c94c94.js → manifest-8cebdeb7.js} +1 -1
- package/build/client/assets/root-Cuw5kjHy.js +1 -0
- package/build/client/index.html +2 -2
- package/package.json +2 -2
- package/build/client/assets/editorialApi-sCf3FFWc.js +0 -9
- package/build/client/assets/root-5pkwWV_K.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as vi}from"./tslib.es6-De9GV7Vy.js";import{r as Wa,t as Ba,v as Ha,w as Va,e as $a,x as Ga}from"./editorialApi-
|
|
1
|
+
import{a as vi}from"./tslib.es6-De9GV7Vy.js";import{r as Wa,t as Ba,v as Ha,w as Va,e as $a,x as Ga}from"./editorialApi-CqxxtYzA.js";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,a as j,x as b,w}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{c as m,f as u}from"./utils-BSDwSRl3.js";import{b as C,a as N,i as v,j as T}from"./editorialApi-
|
|
1
|
+
import{p as e,a as j,x as b,w}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{c as m,f as u}from"./utils-BSDwSRl3.js";import{b as C,a as N,i as v,j as T}from"./editorialApi-CqxxtYzA.js";import{c as y,u as D,T as R,a as L,b as x,d as k,f as p,e as A,g as H,h as I}from"./index-CQvFoK7s.js";function G({className:a,...t}){return e.jsx("div",{"data-slot":"skeleton",className:m("bg-accent animate-pulse rounded-md",a),...t})}function f({className:a,title:t,value:r,isLoading:n,...s}){return e.jsxs("div",{className:m("border border-border rounded-xl p-6",a),...s,children:[e.jsx("h3",{className:"text-xs text-muted-foreground",children:t}),n?e.jsx(G,{className:"h-[2.25rem] w-16"}):e.jsx("p",{className:"text-lg sm:text-3xl font-bold leading-none",children:r})]})}const i=y(),c=[i.accessor("id",{header(){return e.jsx("span",{className:"block w-48 max-w-48",children:"ID"})},cell(a){const t=a.getValue();return e.jsx("span",{title:t,className:"block overflow-hidden text-ellipsis w-48 max-w-48 whitespace-nowrap",children:t})}}),i.accessor("createdAt",{header:"Created",cell(a){return u(new Date(a.getValue()))}}),i.accessor("updatedAt",{header:"Updated",cell(a){return u(new Date(a.getValue()))}})];function M(){const{data:a}=C(),{data:t}=N(),r=j.useMemo(()=>!a||!t?[]:Object.entries(a).filter(([o])=>o in t).reduce((o,[d,h])=>o.concat(Object.values(h).map(g=>({...g,type:d}))),[]).toSorted((o,d)=>o.updatedAt>d.updatedAt?-1:1).slice(0,6),[a,t]),n=D({data:r,columns:c,getCoreRowModel:I()});return e.jsx("div",{className:"rounded-sm border overflow-auto",children:e.jsxs(R,{children:[e.jsx(L,{children:n.getHeaderGroups().map(s=>e.jsx(x,{className:"grid",style:{gridTemplateColumns:`repeat(${c.length}, minmax(200px, 1fr))`},children:s.headers.map(l=>e.jsx(k,{children:l.isPlaceholder?null:p(l.column.columnDef.header,l.getContext())},l.id))},s.id))}),e.jsx(A,{children:n.getRowModel().rows.map(s=>e.jsx(b,{to:`/admin/dashboard/${s.original.type}/${s.original.id}`,children:e.jsx(x,{className:"grid",style:{gridTemplateColumns:`repeat(${c.length}, minmax(200px, 1fr))`},children:s.getVisibleCells().map(l=>e.jsx(H,{className:m("p-2"),children:p(l.column.columnDef.cell,l.getContext())},l.id))},s.id)},s.original.id))})]})})}const E=w(function(){const{data:t,isLoading:r}=v(),{data:n,isLoading:s}=T();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(f,{className:"w-full sm:w-44",title:"Items",value:t,isLoading:r}),e.jsx(f,{className:"w-full sm:w-44",title:"Files",value:n,isLoading:s})]}),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:"Recently Updated"}),e.jsx(M,{})]})]})})});export{E as default};
|
package/build/client/assets/{dashboard._collection-BNdxRLEC.js → dashboard._collection-U37ELAZn.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e,a as m,x as N,w as v}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{B as k}from"./button-DjJX-cbR.js";import{k as w,b as T,l as M}from"./editorialApi-
|
|
1
|
+
import{p as e,a as m,x as N,w as v}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{B as k}from"./button-DjJX-cbR.js";import{k as w,b as T,l as M}from"./editorialApi-CqxxtYzA.js";import{c as $,u as D,T as R,a as V,b as g,d as _,f as j,e as z,g as H,h as I}from"./index-CQvFoK7s.js";import{f as P,a as S,c as B}from"./utils-BSDwSRl3.js";import{T as E}from"./trash-CYTPibS3.js";import{c as x}from"./createLucideIcon-BOhrmKcl.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as r,p as e}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{I as n}from"./itemForm-
|
|
1
|
+
import{w as r,p as e}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{I as n}from"./itemForm-CnzvRzeD.js";import{k as p,m as d}from"./editorialApi-CqxxtYzA.js";import"./button-DjJX-cbR.js";import"./utils-BSDwSRl3.js";import"./input-DA43W1bc.js";import"./index-B0NebLYn.js";import"./index-BnyqKVWo.js";import"./createLucideIcon-BOhrmKcl.js";import"./index-b1VEd5BJ.js";import"./tslib.es6-De9GV7Vy.js";const w=r(function({params:m}){const{collectionId:t,documentId:i}=m,{data:o,isFetching:a}=p(t),{data:s,isFetching:c}=d({itemType:t,id:i});return!o||!s||(a||c)?null:e.jsx("div",{className:"overflow-auto",children:e.jsx("div",{className:"flex p-4 gap-4",children:e.jsx(n,{itemType:t,fields:o.fields,data:s},`${t}-${i}`)})})});export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{w as i,p as o}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{I as s}from"./itemForm-
|
|
1
|
+
import{w as i,p as o}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{I as s}from"./itemForm-CnzvRzeD.js";import{k as m}from"./editorialApi-CqxxtYzA.js";import"./button-DjJX-cbR.js";import"./utils-BSDwSRl3.js";import"./input-DA43W1bc.js";import"./index-B0NebLYn.js";import"./index-BnyqKVWo.js";import"./createLucideIcon-BOhrmKcl.js";import"./index-b1VEd5BJ.js";import"./tslib.es6-De9GV7Vy.js";const v=i(function({params:r}){const{collectionId:t}=r,{data:e}=m(t);return e?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,isNew:!0})})}):null});export{v as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e,a as d,x as N,y as re,v as de,z as le,R as ce,w as ue,O as he}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as pe,e as z,h as xe}from"./authSlice-
|
|
1
|
+
import{p as e,a as d,x as N,y as re,v as de,z as le,R as ce,w as ue,O as he}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as pe,e as z,h as xe}from"./authSlice-DST6tNnU.js";import{a as K,b as fe,d as be,f as ge,g as me,u as je,h as ve}from"./editorialApi-CqxxtYzA.js";import{R as U,C as W,a as Q,T as X,D as Z,P as Y,O as J,b as we,c as ye,d as Ne,e as Ce,f as Se,g as _e,A as ke,u as Me,E as ze}from"./index-b1VEd5BJ.js";import{c as i}from"./utils-BSDwSRl3.js";import{c as f}from"./createLucideIcon-BOhrmKcl.js";import{B as E,S as R,c as Ee,u as Re}from"./button-DjJX-cbR.js";import{u as De,c as Oe,P as D,a as Ae,b as Pe,d as Ie}from"./index-B0NebLYn.js";import{C as $}from"./chevron-down-CYVLN3e-.js";import"./tslib.es6-De9GV7Vy.js";import"./index-BnyqKVWo.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as e,a as j,x as u,w as g}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{e as v,j as N}from"./authSlice-
|
|
1
|
+
import{p as e,a as j,x as u,w as g}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{e as v,j as N}from"./authSlice-DST6tNnU.js";import{p as k,q as w}from"./editorialApi-CqxxtYzA.js";import{c as b,b as z,a as _}from"./utils-BSDwSRl3.js";import{c as o}from"./createLucideIcon-BOhrmKcl.js";import{C as F}from"./chevron-down-CYVLN3e-.js";import{T as r}from"./trash-CYTPibS3.js";import"./tslib.es6-De9GV7Vy.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
var Yn=Object.defineProperty;var Zn=(e,t,n)=>t in e?Yn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Le=(e,t,n)=>Zn(e,typeof t!="symbol"?t+"":t,n);import{r as er,a as x}from"./chunk-EF7DTUVF-CZaHNoTs.js";function B(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 tr=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ht=tr,pt=()=>Math.random().toString(36).substring(7).split("").join("."),nr={INIT:`@@redux/INIT${pt()}`,REPLACE:`@@redux/REPLACE${pt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pt()}`},Je=nr;function fe(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 Rn(e,t,n){if(typeof e!="function")throw new Error(B(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(B(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(B(1));return n(Rn)(e,t)}let r=e,i=t,o=new Map,a=o,y=0,b=!1;function v(){a===o&&(a=new Map,o.forEach((R,h)=>{a.set(h,R)}))}function E(){if(b)throw new Error(B(3));return i}function O(R){if(typeof R!="function")throw new Error(B(4));if(b)throw new Error(B(5));let h=!0;v();const M=y++;return a.set(M,R),function(){if(h){if(b)throw new Error(B(6));h=!1,v(),a.delete(M),o=null}}}function f(R){if(!fe(R))throw new Error(B(7));if(typeof R.type>"u")throw new Error(B(8));if(typeof R.type!="string")throw new Error(B(17));if(b)throw new Error(B(9));try{b=!0,i=r(i,R)}finally{b=!1}return(o=a).forEach(M=>{M()}),R}function l(R){if(typeof R!="function")throw new Error(B(10));r=R,f({type:Je.REPLACE})}function w(){const R=O;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(B(11));function M(){const s=h;s.next&&s.next(E())}return M(),{unsubscribe:R(M)}},[Ht](){return this}}}return f({type:Je.INIT}),{dispatch:f,subscribe:O,getState:E,replaceReducer:l,[Ht]:w}}function rr(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Je.INIT})>"u")throw new Error(B(12));if(typeof n(void 0,{type:Je.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(B(13))})}function Pn(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const a=t[o];typeof e[a]=="function"&&(n[a]=e[a])}const r=Object.keys(n);let i;try{rr(n)}catch(o){i=o}return function(a={},y){if(i)throw i;let b=!1;const v={};for(let E=0;E<r.length;E++){const O=r[E],f=n[O],l=a[O],w=f(l,y);if(typeof w>"u")throw y&&y.type,new Error(B(14));v[O]=w,b=b||w!==l}return b=b||r.length!==Object.keys(a).length,b?v:a}}function Xe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function ir(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(B(15))};const a={getState:i.getState,dispatch:(b,...v)=>o(b,...v)},y=e.map(b=>b(a));return o=Xe(...y)(i.dispatch),{...i,dispatch:o}}}function On(e){return fe(e)&&"type"in e&&typeof e.type=="string"}var xt=Symbol.for("immer-nothing"),Me=Symbol.for("immer-draftable"),X=Symbol.for("immer-state");function H(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var he=Object.getPrototypeOf;function se(e){return!!e&&!!e[X]}function ne(e){var t;return e?Cn(e)||Array.isArray(e)||!!e[Me]||!!((t=e.constructor)!=null&&t[Me])||Fe(e)||Ne(e):!1}var sr=Object.prototype.constructor.toString();function Cn(e){if(!e||typeof e!="object")return!1;const t=he(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===sr}function or(e){return se(e)||H(15,e),e[X].base_}function qe(e,t){ge(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ge(e){const t=e[X];return t?t.type_:Array.isArray(e)?1:Fe(e)?2:Ne(e)?3:0}function De(e,t){return ge(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yt(e,t){return ge(e)===2?e.get(t):e[t]}function An(e,t,n){const r=ge(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function ur(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Fe(e){return e instanceof Map}function Ne(e){return e instanceof Set}function ye(e){return e.copy_||e.base_}function Ct(e,t){if(Fe(e))return new Map(e);if(Ne(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Cn(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[X];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],y=r[a];y.writable===!1&&(y.writable=!0,y.configurable=!0),(y.get||y.set)&&(r[a]={configurable:!0,writable:!0,enumerable:y.enumerable,value:e[a]})}return Object.create(he(e),r)}else{const r=he(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Ft(e,t=!1){return it(e)||se(e)||!ne(e)||(ge(e)>1&&(e.set=e.add=e.clear=e.delete=cr),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ft(r,!0))),e}function cr(){H(2)}function it(e){return Object.isFrozen(e)}var At={};function me(e){const t=At[e];return t||H(0,e),t}function ar(e,t){At[e]||(At[e]=t)}var Qe;function Mn(){return Qe}function fr(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gt(e,t){t&&(me("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mt(e){It(e),e.drafts_.forEach(lr),e.drafts_=null}function It(e){e===Qe&&(Qe=e.parent_)}function Jt(e){return Qe=fr(Qe,e)}function lr(e){const t=e[X];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xt(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[X].modified_&&(Mt(t),H(4)),ne(e)&&(e=Ye(t,e),t.parent_||Ze(t,e)),t.patches_&&me("Patches").generateReplacementPatches_(n[X].base_,e,t.patches_,t.inversePatches_)):e=Ye(t,n,[]),Mt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xt?e:void 0}function Ye(e,t,n){if(it(t))return t;const r=t[X];if(!r)return qe(t,(i,o)=>Yt(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ze(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),qe(o,(y,b)=>Yt(e,r,i,y,b,n,a)),Ze(e,i,!1),n&&e.patches_&&me("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Yt(e,t,n,r,i,o,a){if(se(i)){const y=o&&t&&t.type_!==3&&!De(t.assigned_,r)?o.concat(r):void 0,b=Ye(e,i,y);if(An(n,r,b),se(b))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ne(i)&&!it(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ye(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ze(e,i)}}function Ze(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ft(t,n)}function dr(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Mn(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Nt;n&&(i=[r],o=ke);const{revoke:a,proxy:y}=Proxy.revocable(i,o);return r.draft_=y,r.revoke_=a,y}var Nt={get(e,t){if(t===X)return e;const n=ye(e);if(!De(n,t))return pr(e,n,t);const r=n[t];return e.finalized_||!ne(r)?r:r===ht(e.base_,t)?(gt(e),e.copy_[t]=qt(r,e)):r},has(e,t){return t in ye(e)},ownKeys(e){return Reflect.ownKeys(ye(e))},set(e,t,n){const r=In(ye(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=ht(ye(e),t),o=i==null?void 0:i[X];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(ur(n,i)&&(n!==void 0||De(e.base_,t)))return!0;gt(e),Tt(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ht(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gt(e),Tt(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ye(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){H(11)},getPrototypeOf(e){return he(e.base_)},setPrototypeOf(){H(12)}},ke={};qe(Nt,(e,t)=>{ke[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ke.deleteProperty=function(e,t){return ke.set.call(this,e,t,void 0)};ke.set=function(e,t,n){return Nt.set.call(this,e[0],t,n,e[0])};function ht(e,t){const n=e[X];return(n?ye(n):e)[t]}function pr(e,t,n){var i;const r=In(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function In(e,t){if(!(t in e))return;let n=he(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=he(n)}}function Tt(e){e.modified_||(e.modified_=!0,e.parent_&&Tt(e.parent_))}function gt(e){e.copy_||(e.copy_=Ct(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var yr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(b=o,...v){return a.produce(b,E=>n.call(this,E,...v))}}typeof n!="function"&&H(6),r!==void 0&&typeof r!="function"&&H(7);let i;if(ne(t)){const o=Jt(this),a=qt(t,void 0);let y=!0;try{i=n(a),y=!1}finally{y?Mt(o):It(o)}return Gt(o,r),Xt(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===xt&&(i=void 0),this.autoFreeze_&&Ft(i,!0),r){const o=[],a=[];me("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else H(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...y)=>this.produceWithPatches(a,b=>t(b,...y));let r,i;return[this.produce(t,n,(a,y)=>{r=a,i=y}),r,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){ne(e)||H(8),se(e)&&(e=hr(e));const t=Jt(this),n=qt(e,void 0);return n[X].isManual_=!0,It(t),n}finishDraft(e,t){const n=e&&e[X];(!n||!n.isManual_)&&H(9);const{scope_:r}=n;return Gt(r,t),Xt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=me("Patches").applyPatches_;return se(e)?r(e,t):this.produce(e,i=>r(i,t))}};function qt(e,t){const n=Fe(e)?me("MapSet").proxyMap_(e,t):Ne(e)?me("MapSet").proxySet_(e,t):dr(e,t);return(t?t.scope_:Mn()).drafts_.push(n),n}function hr(e){return se(e)||H(10,e),Tn(e)}function Tn(e){if(!ne(e)||it(e))return e;const t=e[X];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ct(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ct(e,!0);return qe(n,(r,i)=>{An(n,r,Tn(i))}),t&&(t.finalized_=!1),n}function gr(){const t="replace",n="add",r="remove";function i(f,l,w,C){switch(f.type_){case 0:case 2:return a(f,l,w,C);case 1:return o(f,l,w,C);case 3:return y(f,l,w,C)}}function o(f,l,w,C){let{base_:R,assigned_:h}=f,M=f.copy_;M.length<R.length&&([R,M]=[M,R],[w,C]=[C,w]);for(let c=0;c<R.length;c++)if(h[c]&&M[c]!==R[c]){const s=l.concat([c]);w.push({op:t,path:s,value:O(M[c])}),C.push({op:t,path:s,value:O(R[c])})}for(let c=R.length;c<M.length;c++){const s=l.concat([c]);w.push({op:n,path:s,value:O(M[c])})}for(let c=M.length-1;R.length<=c;--c){const s=l.concat([c]);C.push({op:r,path:s})}}function a(f,l,w,C){const{base_:R,copy_:h}=f;qe(f.assigned_,(M,c)=>{const s=yt(R,M),u=yt(h,M),S=c?De(R,M)?t:n:r;if(s===u&&S===t)return;const A=l.concat(M);w.push(S===r?{op:S,path:A}:{op:S,path:A,value:u}),C.push(S===n?{op:r,path:A}:S===r?{op:n,path:A,value:O(s)}:{op:t,path:A,value:O(s)})})}function y(f,l,w,C){let{base_:R,copy_:h}=f,M=0;R.forEach(c=>{if(!h.has(c)){const s=l.concat([M]);w.push({op:r,path:s,value:c}),C.unshift({op:n,path:s,value:c})}M++}),M=0,h.forEach(c=>{if(!R.has(c)){const s=l.concat([M]);w.push({op:n,path:s,value:c}),C.unshift({op:r,path:s,value:c})}M++})}function b(f,l,w,C){w.push({op:t,path:[],value:l===xt?void 0:l}),C.push({op:t,path:[],value:f})}function v(f,l){return l.forEach(w=>{const{path:C,op:R}=w;let h=f;for(let u=0;u<C.length-1;u++){const S=ge(h);let A=C[u];typeof A!="string"&&typeof A!="number"&&(A=""+A),(S===0||S===1)&&(A==="__proto__"||A==="constructor")&&H(19),typeof h=="function"&&A==="prototype"&&H(19),h=yt(h,A),typeof h!="object"&&H(18,C.join("/"))}const M=ge(h),c=E(w.value),s=C[C.length-1];switch(R){case t:switch(M){case 2:return h.set(s,c);case 3:H(16);default:return h[s]=c}case n:switch(M){case 1:return s==="-"?h.push(c):h.splice(s,0,c);case 2:return h.set(s,c);case 3:return h.add(c);default:return h[s]=c}case r:switch(M){case 1:return h.splice(s,1);case 2:return h.delete(s);case 3:return h.delete(w.value);default:return delete h[s]}default:H(17,R)}}),f}function E(f){if(!ne(f))return f;if(Array.isArray(f))return f.map(E);if(Fe(f))return new Map(Array.from(f.entries()).map(([w,C])=>[w,E(C)]));if(Ne(f))return new Set(Array.from(f).map(E));const l=Object.create(he(f));for(const w in f)l[w]=E(f[w]);return De(f,Me)&&(l[Me]=f[Me]),l}function O(f){return se(f)?E(f):f}ar("Patches",{applyPatches_:v,generatePatches_:i,generateReplacementPatches_:b})}var Y=new yr,ze=Y.produce,qn=Y.produceWithPatches.bind(Y);Y.setAutoFreeze.bind(Y);Y.setUseStrictShallowCopy.bind(Y);var Zt=Y.applyPatches.bind(Y);Y.createDraft.bind(Y);Y.finishDraft.bind(Y);function mr(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function br(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function vr(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var en=e=>Array.isArray(e)?e:[e];function Sr(e){const t=Array.isArray(e[0])?e[0]:e;return vr(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function wr(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var _r=class{constructor(e){this.value=e}deref(){return this.value}},Er=typeof WeakRef<"u"?WeakRef:_r,Rr=0,tn=1;function $e(){return{s:Rr,v:void 0,o:null,p:null}}function et(e,t={}){let n=$e();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var O;let y=n;const{length:b}=arguments;for(let f=0,l=b;f<l;f++){const w=arguments[f];if(typeof w=="function"||typeof w=="object"&&w!==null){let C=y.o;C===null&&(y.o=C=new WeakMap);const R=C.get(w);R===void 0?(y=$e(),C.set(w,y)):y=R}else{let C=y.p;C===null&&(y.p=C=new Map);const R=C.get(w);R===void 0?(y=$e(),C.set(w,y)):y=R}}const v=y;let E;if(y.s===tn)E=y.v;else if(E=e.apply(null,arguments),o++,r){const f=((O=i==null?void 0:i.deref)==null?void 0:O.call(i))??i;f!=null&&r(f,E)&&(E=f,o!==0&&o--),i=typeof E=="object"&&E!==null||typeof E=="function"?new Er(E):E}return v.s=tn,v.v=E,E}return a.clearCache=()=>{n=$e(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function Pr(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,y,b={},v=i.pop();typeof v=="object"&&(b=v,v=i.pop()),mr(v,`createSelector expects an output function after the inputs, but received: [${typeof v}]`);const E={...n,...b},{memoize:O,memoizeOptions:f=[],argsMemoize:l=et,argsMemoizeOptions:w=[]}=E,C=en(f),R=en(w),h=Sr(i),M=O(function(){return o++,v.apply(null,arguments)},...C),c=l(function(){a++;const u=wr(h,arguments);return y=M.apply(null,u),y},...R);return Object.assign(c,{resultFunc:v,memoizedResultFunc:M,dependencies:h,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>y,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:O,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var zt=Pr(et),Or=Object.assign((e,t=zt)=>{br(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,y,b)=>(a[n[b]]=y,a),{}))},{withTypes:()=>Or});function Dn(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Cr=Dn(),Ar=Dn,Mr=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xe:Xe.apply(null,arguments)},Ir=e=>e&&typeof e.match=="function";function ee(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(te(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>On(r)&&r.type===e,n}var Qn=class Ae extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ae.prototype)}static get[Symbol.species](){return Ae}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ae(...t[0].concat(this)):new Ae(...t.concat(this))}};function nn(e){return ne(e)?ze(e,()=>{}):e}function We(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Tr(e){return typeof e=="boolean"}var qr=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new Qn;return n&&(Tr(n)?a.push(Cr):a.push(Ar(n.extraArgument))),a},st="RTK_autoBatch",Pe=()=>e=>({payload:e,meta:{[st]:!0}}),rn=e=>t=>{setTimeout(t,e)},Dr=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const y=new Set,b=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:rn(10):e.type==="callback"?e.queueNotification:rn(e.timeout),v=()=>{a=!1,o&&(o=!1,y.forEach(E=>E()))};return Object.assign({},r,{subscribe(E){const O=()=>i&&E(),f=r.subscribe(O);return y.add(E),()=>{f(),y.delete(E)}},dispatch(E){var O;try{return i=!((O=E==null?void 0:E.meta)!=null&&O[st]),o=!i,o&&(a||(a=!0,b(v))),r.dispatch(E)}finally{i=!0}}})},Qr=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new Qn(e);return r&&i.push(Dr(typeof r=="object"?r:void 0)),i};function cs(e){const t=qr(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{};let y;if(typeof n=="function")y=n;else if(fe(n))y=Pn(n);else throw new Error(te(1));let b;typeof r=="function"?b=r(t):b=t();let v=Xe;i&&(v=Mr({trace:!1,...typeof i=="object"&&i}));const E=ir(...b),O=Qr(E);let f=typeof a=="function"?a(O):O();const l=v(...f);return Rn(y,o,l)}function kn(e){const t={},n=[];let r;const i={addCase(o,a){const y=typeof o=="string"?o:o.type;if(!y)throw new Error(te(28));if(y in t)throw new Error(te(29));return t[y]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function kr(e){return typeof e=="function"}function jr(e,t){let[n,r,i]=kn(t),o;if(kr(e))o=()=>nn(e());else{const y=nn(e);o=()=>y}function a(y=o(),b){let v=[n[b.type],...r.filter(({matcher:E})=>E(b)).map(({reducer:E})=>E)];return v.filter(E=>!!E).length===0&&(v=[i]),v.reduce((E,O)=>{if(O)if(se(E)){const l=O(E,b);return l===void 0?E:l}else{if(ne(E))return ze(E,f=>O(f,b));{const f=O(E,b);if(f===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return E},y)}return a.getInitialState=o,a}var jn=(e,t)=>Ir(e)?e.match(t):e(t);function ce(...e){return t=>e.some(n=>jn(n,t))}function Ie(...e){return t=>e.every(n=>jn(n,t))}function ot(e,t){if(!e||!e.meta)return!1;const n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Ue(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ut(...e){return e.length===0?t=>ot(t,["pending"]):Ue(e)?ce(...e.map(t=>t.pending)):Ut()(e[0])}function Ee(...e){return e.length===0?t=>ot(t,["rejected"]):Ue(e)?ce(...e.map(t=>t.rejected)):Ee()(e[0])}function ut(...e){const t=n=>n&&n.meta&&n.meta.rejectedWithValue;return e.length===0?Ie(Ee(...e),t):Ue(e)?Ie(Ee(...e),t):ut()(e[0])}function le(...e){return e.length===0?t=>ot(t,["fulfilled"]):Ue(e)?ce(...e.map(t=>t.fulfilled)):le()(e[0])}function Dt(...e){return e.length===0?t=>ot(t,["pending","fulfilled","rejected"]):Ue(e)?ce(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Dt()(e[0])}var xr="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Lt=(e=21)=>{let t="",n=e;for(;n--;)t+=xr[Math.random()*64|0];return t},Fr=["name","message","stack","code"],mt=class{constructor(e,t){Le(this,"_type");this.payload=e,this.meta=t}},sn=class{constructor(e,t){Le(this,"_type");this.payload=e,this.meta=t}},Nr=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Fr)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},on="External signal was aborted",un=(()=>{function e(t,n,r){const i=ee(t+"/fulfilled",(b,v,E,O)=>({payload:b,meta:{...O||{},arg:E,requestId:v,requestStatus:"fulfilled"}})),o=ee(t+"/pending",(b,v,E)=>({payload:void 0,meta:{...E||{},arg:v,requestId:b,requestStatus:"pending"}})),a=ee(t+"/rejected",(b,v,E,O,f)=>({payload:O,error:(r&&r.serializeError||Nr)(b||"Rejected"),meta:{...f||{},arg:E,requestId:v,rejectedWithValue:!!O,requestStatus:"rejected",aborted:(b==null?void 0:b.name)==="AbortError",condition:(b==null?void 0:b.name)==="ConditionError"}}));function y(b,{signal:v}={}){return(E,O,f)=>{const l=r!=null&&r.idGenerator?r.idGenerator(b):Lt(),w=new AbortController;let C,R;function h(c){R=c,w.abort()}v&&(v.aborted?h(on):v.addEventListener("abort",()=>h(on),{once:!0}));const M=async function(){var u,S;let c;try{let A=(u=r==null?void 0:r.condition)==null?void 0:u.call(r,b,{getState:O,extra:f});if(Ur(A)&&(A=await A),A===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const I=new Promise((g,d)=>{C=()=>{d({name:"AbortError",message:R||"Aborted"})},w.signal.addEventListener("abort",C)});E(o(l,b,(S=r==null?void 0:r.getPendingMeta)==null?void 0:S.call(r,{requestId:l,arg:b},{getState:O,extra:f}))),c=await Promise.race([I,Promise.resolve(n(b,{dispatch:E,getState:O,extra:f,requestId:l,signal:w.signal,abort:h,rejectWithValue:(g,d)=>new mt(g,d),fulfillWithValue:(g,d)=>new sn(g,d)})).then(g=>{if(g instanceof mt)throw g;return g instanceof sn?i(g.payload,l,b,g.meta):i(g,l,b)})])}catch(A){c=A instanceof mt?a(null,l,b,A.payload,A.meta):a(A,l,b)}finally{C&&w.signal.removeEventListener("abort",C)}return r&&!r.dispatchConditionRejection&&a.match(c)&&c.meta.condition||E(c),c}();return Object.assign(M,{abort:h,requestId:l,arg:b,unwrap(){return M.then(zr)}})}}return Object.assign(y,{pending:o,rejected:a,fulfilled:i,settled:ce(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function zr(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ur(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Lr=Symbol.for("rtk-slice-createasyncthunk");function $r(e,t){return`${e}/${t}`}function Wr({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[Lr];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(te(11));const y=(typeof i.reducers=="function"?i.reducers(Kr()):i.reducers)||{},b=Object.keys(y),v={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},E={addCase(s,u){const S=typeof s=="string"?s:s.type;if(!S)throw new Error(te(12));if(S in v.sliceCaseReducersByType)throw new Error(te(13));return v.sliceCaseReducersByType[S]=u,E},addMatcher(s,u){return v.sliceMatchers.push({matcher:s,reducer:u}),E},exposeAction(s,u){return v.actionCreators[s]=u,E},exposeCaseReducer(s,u){return v.sliceCaseReducersByName[s]=u,E}};b.forEach(s=>{const u=y[s],S={reducerName:s,type:$r(o,s),createNotation:typeof i.reducers=="function"};Hr(u)?Jr(S,u,E,t):Br(S,u,E)});function O(){const[s={},u=[],S=void 0]=typeof i.extraReducers=="function"?kn(i.extraReducers):[i.extraReducers],A={...s,...v.sliceCaseReducersByType};return jr(i.initialState,I=>{for(let g in A)I.addCase(g,A[g]);for(let g of v.sliceMatchers)I.addMatcher(g.matcher,g.reducer);for(let g of u)I.addMatcher(g.matcher,g.reducer);S&&I.addDefaultCase(S)})}const f=s=>s,l=new Map,w=new WeakMap;let C;function R(s,u){return C||(C=O()),C(s,u)}function h(){return C||(C=O()),C.getInitialState()}function M(s,u=!1){function S(I){let g=I[s];return typeof g>"u"&&u&&(g=We(w,S,h)),g}function A(I=f){const g=We(l,u,()=>new WeakMap);return We(g,I,()=>{const d={};for(const[p,m]of Object.entries(i.selectors??{}))d[p]=Vr(m,I,()=>We(w,I,h),u);return d})}return{reducerPath:s,getSelectors:A,get selectors(){return A(S)},selectSlice:S}}const c={name:o,reducer:R,actions:v.actionCreators,caseReducers:v.sliceCaseReducersByName,getInitialState:h,...M(a),injectInto(s,{reducerPath:u,...S}={}){const A=u??a;return s.inject({reducerPath:A,reducer:R},S),{...c,...M(A,!0)}}};return c}}function Vr(e,t,n,r){function i(o,...a){let y=t(o);return typeof y>"u"&&r&&(y=n()),e(y,...a)}return i.unwrapped=e,i}var Se=Wr();function Kr(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Br({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Gr(r))throw new Error(te(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?ee(e,a):ee(e))}function Hr(e){return e._reducerDefinitionType==="asyncThunk"}function Gr(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Jr({type:e,reducerName:t},n,r,i){if(!i)throw new Error(te(18));const{payloadCreator:o,fulfilled:a,pending:y,rejected:b,settled:v,options:E}=n,O=i(e,o,E);r.exposeAction(t,O),a&&r.addCase(O.fulfilled,a),y&&r.addCase(O.pending,y),b&&r.addCase(O.rejected,b),v&&r.addMatcher(O.settled,v),r.exposeCaseReducer(t,{fulfilled:a||Ve,pending:y||Ve,rejected:b||Ve,settled:v||Ve})}function Ve(){}function te(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 bt={exports:{}},vt={};/**
|
|
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 cn;function Xr(){if(cn)return vt;cn=1;var e=er();function t(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,y=e.useDebugValue;return vt.useSyncExternalStoreWithSelector=function(b,v,E,O,f){var l=i(null);if(l.current===null){var w={hasValue:!1,value:null};l.current=w}else w=l.current;l=a(function(){function R(u){if(!h){if(h=!0,M=u,u=O(u),f!==void 0&&w.hasValue){var S=w.value;if(f(S,u))return c=S}return c=u}if(S=c,n(M,u))return S;var A=O(u);return f!==void 0&&f(S,A)?(M=u,S):(M=u,c=A)}var h=!1,M,c,s=E===void 0?null:E;return[function(){return R(v())},s===null?void 0:function(){return R(s())}]},[v,E,O,f]);var C=r(b,l[0],l[1]);return o(function(){w.hasValue=!0,w.value=C},[C]),y(C),C},vt}var an;function Yr(){return an||(an=1,bt.exports=Xr()),bt.exports}var Zr=Yr();function xn(e){e()}function ei(){let e=null,t=null;return{clear(){e=null,t=null},notify(){xn(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fn={notify(){},get:()=>[]};function ti(e,t){let n,r=fn,i=0,o=!1;function a(C){E();const R=r.subscribe(C);let h=!1;return()=>{h||(h=!0,R(),O())}}function y(){r.notify()}function b(){w.onStateChange&&w.onStateChange()}function v(){return o}function E(){i++,n||(n=e.subscribe(b),r=ei())}function O(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=fn)}function f(){o||(o=!0,E())}function l(){o&&(o=!1,O())}const w={addNestedSub:a,notifyNestedSubs:y,handleChangeWrapper:b,isSubscribed:v,trySubscribe:f,tryUnsubscribe:l,getListeners:()=>r};return w}var ni=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ri=ni(),ii=()=>typeof navigator<"u"&&navigator.product==="ReactNative",si=ii(),oi=()=>ri||si?x.useLayoutEffect:x.useEffect,ui=oi();function ln(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Te(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!ln(e[n[i]],t[n[i]]))return!1;return!0}var St=Symbol.for("react-redux-context"),wt=typeof globalThis<"u"?globalThis:{};function ci(){if(!x.createContext)return{};const e=wt[St]??(wt[St]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var de=ci();function ai(e){const{children:t,context:n,serverState:r,store:i}=e,o=x.useMemo(()=>{const b=ti(i);return{store:i,subscription:b,getServerState:r?()=>r:void 0}},[i,r]),a=x.useMemo(()=>i.getState(),[i]);ui(()=>{const{subscription:b}=o;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),a!==i.getState()&&b.notifyNestedSubs(),()=>{b.tryUnsubscribe(),b.onStateChange=void 0}},[o,a]);const y=n||de;return x.createElement(y.Provider,{value:o},t)}var as=ai;function $t(e=de){return function(){return x.useContext(e)}}var Fn=$t();function Nn(e=de){const t=e===de?Fn:$t(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var zn=Nn();function fi(e=de){const t=e===de?zn:Nn(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var li=fi(),di=(e,t)=>e===t;function pi(e=de){const t=e===de?Fn:$t(e),n=(r,i={})=>{const{equalityFn:o=di}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:y,subscription:b,getServerState:v}=a;x.useRef(!0);const E=x.useCallback({[r.name](f){return r(f)}}[r.name],[r]),O=Zr.useSyncExternalStoreWithSelector(b.addNestedSub,y.getState,v||y.getState,E,o);return x.useDebugValue(O),O};return Object.assign(n,{withTypes:()=>n}),n}var yi=pi(),hi=xn,gi=class extends Error{constructor(t){super(t[0].message);Le(this,"issues");this.name="SchemaError",this.issues=t}},Un=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Un||{});function dn(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var pn=fe;function Ln(e,t){if(e===t||!(pn(e)&&pn(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const a of n)o[a]=Ln(e[a],t[a]),i&&(i=e[a]===o[a]);return i?e:o}function _e(e){let t=0;for(const n in e)t++;return t}var yn=e=>[].concat(...e);function mi(e){return new RegExp("(^|:)//").test(e)}function bi(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function tt(e){return e!=null}function vi(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var Si=e=>e.replace(/\/$/,""),wi=e=>e.replace(/^\//,"");function _i(e,t){if(!e)return t;if(!t)return e;if(mi(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=Si(e),t=wi(t),`${e}${n}${t}`}function Ei(e,t,n){return e.has(t)?e.get(t):e.set(t,n).get(t)}var hn=(...e)=>fetch(...e),Ri=e=>e.status>=200&&e.status<=299,Pi=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function gn(e){if(!fe(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}function Oi({baseUrl:e,prepareHeaders:t=O=>O,fetchFn:n=hn,paramsSerializer:r,isJsonContentType:i=Pi,jsonContentType:o="application/json",jsonReplacer:a,timeout:y,responseHandler:b,validateStatus:v,...E}={}){return typeof fetch>"u"&&n===hn&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,l,w)=>{const{getState:C,extra:R,endpoint:h,forced:M,type:c}=l;let s,{url:u,headers:S=new Headers(E.headers),params:A=void 0,responseHandler:I=b??"json",validateStatus:g=v??Ri,timeout:d=y,...p}=typeof f=="string"?{url:f}:f,m,_=l.signal;d&&(m=new AbortController,l.signal.addEventListener("abort",m.abort),_=m.signal);let P={...E,signal:_,...p};S=new Headers(gn(S)),P.headers=await t(S,{getState:C,arg:f,extra:R,endpoint:h,forced:M,type:c,extraOptions:w})||S;const T=U=>typeof U=="object"&&(fe(U)||Array.isArray(U)||typeof U.toJSON=="function");if(!P.headers.has("content-type")&&T(P.body)&&P.headers.set("content-type",o),T(P.body)&&i(P.headers)&&(P.body=JSON.stringify(P.body,a)),A){const U=~u.indexOf("?")?"&":"?",k=r?r(A):new URLSearchParams(gn(A));u+=U+k}u=_i(e,u);const q=new Request(u,P);s={request:new Request(u,P)};let j,D=!1,F=m&&setTimeout(()=>{D=!0,m.abort()},d);try{j=await n(q)}catch(U){return{error:{status:D?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(U)},meta:s}}finally{F&&clearTimeout(F),m==null||m.signal.removeEventListener("abort",m.abort)}const N=j.clone();s.response=N;let L,K="";try{let U;if(await Promise.all([O(j,I).then(k=>L=k,k=>U=k),N.text().then(k=>K=k,()=>{})]),U)throw U}catch(U){return{error:{status:"PARSING_ERROR",originalStatus:j.status,data:K,error:String(U)},meta:s}}return g(j,L)?{data:L,meta:s}:{error:{status:j.status,data:L},meta:s}};async function O(f,l){if(typeof l=="function")return l(f);if(l==="content-type"&&(l=i(f.headers)?"json":"text"),l==="json"){const w=await f.text();return w.length?JSON.parse(w):null}return f.text()}}var mn=class{constructor(e,t=void 0){this.value=e,this.meta=t}},ct=ee("__rtkq/focused"),Wt=ee("__rtkq/unfocused"),at=ee("__rtkq/online"),Vt=ee("__rtkq/offline"),_t=!1;function fs(e,t){function n(){const r=()=>e(ct()),i=()=>e(Wt()),o=()=>e(at()),a=()=>e(Vt()),y=()=>{window.document.visibilityState==="visible"?r():i()};return _t||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",y,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",o,!1),window.addEventListener("offline",a,!1),_t=!0),()=>{window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",y),window.removeEventListener("online",o),window.removeEventListener("offline",a),_t=!1}}return n()}function ft(e){return e.type==="query"}function Ci(e){return e.type==="mutation"}function lt(e){return e.type==="infinitequery"}function nt(e){return ft(e)||lt(e)}function Kt(e,t,n,r,i,o){return Ai(e)?e(t,n,r,i).filter(tt).map(Qt).map(o):Array.isArray(e)?e.map(Qt).map(o):[]}function Ai(e){return typeof e=="function"}function Qt(e){return typeof e=="string"?{type:e}:e}function Mi(e,t){return e.catch(t)}var je=Symbol("forceQueryFn"),kt=e=>typeof e[je]=="function";function Ii({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o}){const a=new Map,y=new Map,{unsubscribeQueryResult:b,removeMutationResult:v,updateSubscriptionOptions:E}=i.internalActions;return{buildInitiateQuery:R,buildInitiateInfiniteQuery:h,buildInitiateMutation:M,getRunningQueryThunk:O,getRunningMutationThunk:f,getRunningQueriesThunk:l,getRunningMutationsThunk:w};function O(c,s){return u=>{var I;const S=o.endpointDefinitions[c],A=e({queryArgs:s,endpointDefinition:S,endpointName:c});return(I=a.get(u))==null?void 0:I[A]}}function f(c,s){return u=>{var S;return(S=y.get(u))==null?void 0:S[s]}}function l(){return c=>Object.values(a.get(c)||{}).filter(tt)}function w(){return c=>Object.values(y.get(c)||{}).filter(tt)}function C(c,s){const u=(S,{subscribe:A=!0,forceRefetch:I,subscriptionOptions:g,[je]:d,...p}={})=>(m,_)=>{var W;const P=e({queryArgs:S,endpointDefinition:s,endpointName:c});let T;const q={...p,type:"query",subscribe:A,forceRefetch:I,subscriptionOptions:g,endpointName:c,originalArgs:S,queryCacheKey:P,[je]:d};if(ft(s))T=t(q);else{const{direction:z,initialPageParam:J}=p;T=n({...q,direction:z,initialPageParam:J})}const Q=i.endpoints[c].select(S),j=m(T),D=Q(_()),{requestId:F,abort:N}=j,L=D.requestId!==F,K=(W=a.get(m))==null?void 0:W[P],U=()=>Q(_()),k=Object.assign(d?j.then(U):L&&!K?Promise.resolve(D):Promise.all([K,j]).then(U),{arg:S,requestId:F,subscriptionOptions:g,queryCacheKey:P,abort:N,async unwrap(){const z=await k;if(z.isError)throw z.error;return z.data},refetch:()=>m(u(S,{subscribe:!1,forceRefetch:!0})),unsubscribe(){A&&m(b({queryCacheKey:P,requestId:F}))},updateSubscriptionOptions(z){k.subscriptionOptions=z,m(E({endpointName:c,requestId:F,queryCacheKey:P,options:z}))}});if(!K&&!L&&!d){const z=Ei(a,m,{});z[P]=k,k.then(()=>{delete z[P],_e(z)||a.delete(m)})}return k};return u}function R(c,s){return C(c,s)}function h(c,s){return C(c,s)}function M(c){return(s,{track:u=!0,fixedCacheKey:S}={})=>(A,I)=>{const g=r({type:"mutation",endpointName:c,originalArgs:s,track:u,fixedCacheKey:S}),d=A(g),{requestId:p,abort:m,unwrap:_}=d,P=Mi(d.unwrap().then(j=>({data:j})),j=>({error:j})),T=()=>{A(v({requestId:p,fixedCacheKey:S}))},q=Object.assign(P,{arg:d.arg,requestId:p,abort:m,unwrap:_,reset:T}),Q=y.get(A)||{};return y.set(A,Q),Q[p]=q,q.then(()=>{delete Q[p],_e(Q)||y.delete(A)}),S&&(Q[S]=q,q.then(()=>{Q[S]===q&&(delete Q[S],_e(Q)||y.delete(A))})),q}}}var $n=class extends gi{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}};async function pe(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new $n(i.issues,t,n,r);return i.value}function Ti(e){return e}var Oe=(e={})=>({...e,[st]:!0});function qi({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:o,selectors:a,onSchemaFailure:y,catchSchemaFailure:b,skipSchemaValidation:v}){const E=(p,m,_,P)=>(T,q)=>{const Q=n[p],j=r({queryArgs:m,endpointDefinition:Q,endpointName:p});if(T(i.internalActions.queryResultPatched({queryCacheKey:j,patches:_})),!P)return;const D=i.endpoints[p].select(m)(q()),F=Kt(Q.providesTags,D.data,void 0,m,{},o);T(i.internalActions.updateProvidedBy([{queryCacheKey:j,providedTags:F}]))};function O(p,m,_=0){const P=[m,...p];return _&&P.length>_?P.slice(0,-1):P}function f(p,m,_=0){const P=[...p,m];return _&&P.length>_?P.slice(1):P}const l=(p,m,_,P=!0)=>(T,q)=>{const j=i.endpoints[p].select(m)(q()),D={patches:[],inversePatches:[],undo:()=>T(i.util.patchQueryData(p,m,D.inversePatches,P))};if(j.status==="uninitialized")return D;let F;if("data"in j)if(ne(j.data)){const[N,L,K]=qn(j.data,_);D.patches.push(...L),D.inversePatches.push(...K),F=N}else F=_(j.data),D.patches.push({op:"replace",path:[],value:F}),D.inversePatches.push({op:"replace",path:[],value:j.data});return D.patches.length===0||T(i.util.patchQueryData(p,m,D.patches,P)),D},w=(p,m,_)=>P=>P(i.endpoints[p].initiate(m,{subscribe:!1,forceRefetch:!0,[je]:()=>({data:_})})),C=(p,m)=>p.query&&p[m]?p[m]:Ti,R=async(p,{signal:m,abort:_,rejectWithValue:P,fulfillWithValue:T,dispatch:q,getState:Q,extra:j})=>{var L,K;const D=n[p.endpointName],{metaSchema:F,skipSchemaValidation:N=v}=D;try{let U=C(D,"transformResponse");const k={signal:m,abort:_,dispatch:q,getState:Q,extra:j,endpoint:p.endpointName,type:p.type,forced:p.type==="query"?h(p,Q()):void 0,queryCacheKey:p.type==="query"?p.queryCacheKey:void 0},W=p.type==="query"?p[je]:void 0;let z;const J=async(V,$,G,be)=>{if($==null&&V.pages.length)return Promise.resolve({data:V});const re={queryArg:p.originalArgs,pageParam:$},ve=await oe(re),ie=be?O:f;return{data:{pages:ie(V.pages,ve.data,G),pageParams:ie(V.pageParams,$,G)},meta:ve.meta}};async function oe(V){let $;const{extraOptions:G,argSchema:be,rawResponseSchema:re,responseSchema:ve}=D;if(be&&!N&&(V=await pe(be,V,"argSchema",{})),W?$=W():D.query?$=await t(D.query(V),k,G):$=await D.queryFn(V,k,G,Re=>t(Re,k,G)),typeof process<"u",$.error)throw new mn($.error,$.meta);let{data:ie}=$;re&&!N&&(ie=await pe(re,$.data,"rawResponseSchema",$.meta));let ae=await U(ie,$.meta,V);return ve&&!N&&(ae=await pe(ve,ae,"responseSchema",$.meta)),{...$,data:ae}}if(p.type==="query"&&"infiniteQueryOptions"in D){const{infiniteQueryOptions:V}=D,{maxPages:$=1/0}=V;let G;const be={pages:[],pageParams:[]},re=(L=a.selectQueryEntry(Q(),p.queryCacheKey))==null?void 0:L.data,ie=h(p,Q())&&!p.direction||!re?be:re;if("direction"in p&&p.direction&&ie.pages.length){const ae=p.direction==="backward",dt=(ae?Wn:jt)(V,ie,p.originalArgs);G=await J(ie,dt,$,ae)}else{const{initialPageParam:ae=V.initialPageParam}=p,Re=(re==null?void 0:re.pageParams)??[],dt=Re[0]??ae,Jn=Re.length;G=await J(ie,dt,$),W&&(G={data:G.data.pages[0]});for(let Bt=1;Bt<Jn;Bt++){const Xn=jt(V,G.data,p.originalArgs);G=await J(G.data,Xn,$)}}z=G}else z=await oe(p.originalArgs);return F&&!N&&z.meta&&(z.meta=await pe(F,z.meta,"metaSchema",z.meta)),T(z.data,Oe({fulfilledTimeStamp:Date.now(),baseQueryMeta:z.meta}))}catch(U){let k=U;if(k instanceof mn){let W=C(D,"transformErrorResponse");const{rawErrorResponseSchema:z,errorResponseSchema:J}=D;let{value:oe,meta:V}=k;try{z&&!N&&(oe=await pe(z,oe,"rawErrorResponseSchema",V)),F&&!N&&(V=await pe(F,V,"metaSchema",V));let $=await W(oe,V,p.originalArgs);return J&&!N&&($=await pe(J,$,"errorResponseSchema",V)),P($,Oe({baseQueryMeta:V}))}catch($){k=$}}try{if(k instanceof $n){const W={endpoint:p.endpointName,arg:p.originalArgs,type:p.type,queryCacheKey:p.type==="query"?p.queryCacheKey:void 0};(K=D.onSchemaFailure)==null||K.call(D,k,W),y==null||y(k,W);const{catchSchemaFailure:z=b}=D;if(z)return P(z(k,W),Oe({baseQueryMeta:k._bqMeta}))}}catch(W){k=W}throw console.error(k),k}};function h(p,m){const _=a.selectQueryEntry(m,p.queryCacheKey),P=a.selectConfig(m).refetchOnMountOrArgChange,T=_==null?void 0:_.fulfilledTimeStamp,q=p.forceRefetch??(p.subscribe&&P);return q?q===!0||(Number(new Date)-Number(T))/1e3>=q:!1}const M=()=>un(`${e}/executeQuery`,R,{getPendingMeta({arg:m}){const _=n[m.endpointName];return Oe({startedTimeStamp:Date.now(),...lt(_)?{direction:m.direction}:{}})},condition(m,{getState:_}){var N;const P=_(),T=a.selectQueryEntry(P,m.queryCacheKey),q=T==null?void 0:T.fulfilledTimeStamp,Q=m.originalArgs,j=T==null?void 0:T.originalArgs,D=n[m.endpointName],F=m.direction;return kt(m)?!0:(T==null?void 0:T.status)==="pending"?!1:h(m,P)||ft(D)&&((N=D==null?void 0:D.forceRefetch)!=null&&N.call(D,{currentArg:Q,previousArg:j,endpointState:T,state:P}))?!0:!(q&&!F)},dispatchConditionRejection:!0}),c=M(),s=M(),u=un(`${e}/executeMutation`,R,{getPendingMeta(){return Oe({startedTimeStamp:Date.now()})}}),S=p=>"force"in p,A=p=>"ifOlderThan"in p,I=(p,m,_)=>(P,T)=>{const q=S(_)&&_.force,Q=A(_)&&_.ifOlderThan,j=(F=!0)=>{const N={forceRefetch:F,isPrefetch:!0};return i.endpoints[p].initiate(m,N)},D=i.endpoints[p].select(m)(T());if(q)P(j());else if(Q){const F=D==null?void 0:D.fulfilledTimeStamp;if(!F){P(j());return}(Number(new Date)-Number(new Date(F)))/1e3>=Q&&P(j())}else P(j(!1))};function g(p){return m=>{var _,P;return((P=(_=m==null?void 0:m.meta)==null?void 0:_.arg)==null?void 0:P.endpointName)===p}}function d(p,m){return{matchPending:Ie(Ut(p),g(m)),matchFulfilled:Ie(le(p),g(m)),matchRejected:Ie(Ee(p),g(m))}}return{queryThunk:c,mutationThunk:u,infiniteQueryThunk:s,prefetch:I,updateQueryData:l,upsertQueryData:w,patchQueryData:E,buildMatchThunkActions:d}}function jt(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function Wn(e,{pages:t,pageParams:n},r){var i;return(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n,r)}function Vn(e,t,n,r){return Kt(n[e.meta.arg.endpointName][t],le(e)?e.payload:void 0,ut(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Ke(e,t,n){const r=e[t];r&&n(r)}function xe(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function bn(e,t,n){const r=e[xe(t)];r&&n(r)}var Be={};function Di({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:y},assertTagType:b,config:v}){const E=ee(`${e}/resetApiState`);function O(g,d,p,m){var _;g[_=d.queryCacheKey]??(g[_]={status:"uninitialized",endpointName:d.endpointName}),Ke(g,d.queryCacheKey,P=>{P.status="pending",P.requestId=p&&P.requestId?P.requestId:m.requestId,d.originalArgs!==void 0&&(P.originalArgs=d.originalArgs),P.startedTimeStamp=m.startedTimeStamp;const T=i[m.arg.endpointName];lt(T)&&"direction"in d&&(P.direction=d.direction)})}function f(g,d,p,m){Ke(g,d.arg.queryCacheKey,_=>{if(_.requestId!==d.requestId&&!m)return;const{merge:P}=i[d.arg.endpointName];if(_.status="fulfilled",P)if(_.data!==void 0){const{fulfilledTimeStamp:T,arg:q,baseQueryMeta:Q,requestId:j}=d;let D=ze(_.data,F=>P(F,p,{arg:q.originalArgs,baseQueryMeta:Q,fulfilledTimeStamp:T,requestId:j}));_.data=D}else _.data=p;else _.data=i[d.arg.endpointName].structuralSharing??!0?Ln(se(_.data)?or(_.data):_.data,p):p;delete _.error,_.fulfilledTimeStamp=d.fulfilledTimeStamp})}const l=Se({name:`${e}/queries`,initialState:Be,reducers:{removeQueryResult:{reducer(g,{payload:{queryCacheKey:d}}){delete g[d]},prepare:Pe()},cacheEntriesUpserted:{reducer(g,d){for(const p of d.payload){const{queryDescription:m,value:_}=p;O(g,m,!0,{arg:m,requestId:d.meta.requestId,startedTimeStamp:d.meta.timestamp}),f(g,{arg:m,requestId:d.meta.requestId,fulfilledTimeStamp:d.meta.timestamp,baseQueryMeta:{}},_,!0)}},prepare:g=>({payload:g.map(m=>{const{endpointName:_,arg:P,value:T}=m,q=i[_];return{queryDescription:{type:"query",endpointName:_,originalArgs:m.arg,queryCacheKey:r({queryArgs:P,endpointDefinition:q,endpointName:_})},value:T}}),meta:{[st]:!0,requestId:Lt(),timestamp:Date.now()}})},queryResultPatched:{reducer(g,{payload:{queryCacheKey:d,patches:p}}){Ke(g,d,m=>{m.data=Zt(m.data,p.concat())})},prepare:Pe()}},extraReducers(g){g.addCase(t.pending,(d,{meta:p,meta:{arg:m}})=>{const _=kt(m);O(d,m,_,p)}).addCase(t.fulfilled,(d,{meta:p,payload:m})=>{const _=kt(p.arg);f(d,p,m,_)}).addCase(t.rejected,(d,{meta:{condition:p,arg:m,requestId:_},error:P,payload:T})=>{Ke(d,m.queryCacheKey,q=>{if(!p){if(q.requestId!==_)return;q.status="rejected",q.error=T??P}})}).addMatcher(y,(d,p)=>{const{queries:m}=a(p);for(const[_,P]of Object.entries(m))((P==null?void 0:P.status)==="fulfilled"||(P==null?void 0:P.status)==="rejected")&&(d[_]=P)})}}),w=Se({name:`${e}/mutations`,initialState:Be,reducers:{removeMutationResult:{reducer(g,{payload:d}){const p=xe(d);p in g&&delete g[p]},prepare:Pe()}},extraReducers(g){g.addCase(n.pending,(d,{meta:p,meta:{requestId:m,arg:_,startedTimeStamp:P}})=>{_.track&&(d[xe(p)]={requestId:m,status:"pending",endpointName:_.endpointName,startedTimeStamp:P})}).addCase(n.fulfilled,(d,{payload:p,meta:m})=>{m.arg.track&&bn(d,m,_=>{_.requestId===m.requestId&&(_.status="fulfilled",_.data=p,_.fulfilledTimeStamp=m.fulfilledTimeStamp)})}).addCase(n.rejected,(d,{payload:p,error:m,meta:_})=>{_.arg.track&&bn(d,_,P=>{P.requestId===_.requestId&&(P.status="rejected",P.error=p??m)})}).addMatcher(y,(d,p)=>{const{mutations:m}=a(p);for(const[_,P]of Object.entries(m))((P==null?void 0:P.status)==="fulfilled"||(P==null?void 0:P.status)==="rejected")&&_!==(P==null?void 0:P.requestId)&&(d[_]=P)})}}),C={tags:{},keys:{}},R=Se({name:`${e}/invalidation`,initialState:C,reducers:{updateProvidedBy:{reducer(g,d){var p,m,_;for(const{queryCacheKey:P,providedTags:T}of d.payload){h(g,P);for(const{type:q,id:Q}of T){const j=(m=(p=g.tags)[q]??(p[q]={}))[_=Q||"__internal_without_id"]??(m[_]=[]);j.includes(P)||j.push(P)}g.keys[P]=T}},prepare:Pe()}},extraReducers(g){g.addCase(l.actions.removeQueryResult,(d,{payload:{queryCacheKey:p}})=>{h(d,p)}).addMatcher(y,(d,p)=>{var _,P,T;const{provided:m}=a(p);for(const[q,Q]of Object.entries(m))for(const[j,D]of Object.entries(Q)){const F=(P=(_=d.tags)[q]??(_[q]={}))[T=j||"__internal_without_id"]??(P[T]=[]);for(const N of D)F.includes(N)||F.push(N)}}).addMatcher(ce(le(t),ut(t)),(d,p)=>{M(d,[p])}).addMatcher(l.actions.cacheEntriesUpserted.match,(d,p)=>{const m=p.payload.map(({queryDescription:_,value:P})=>({type:"UNKNOWN",payload:P,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:_}}));M(d,m)})}});function h(g,d){var m;const p=g.keys[d]??[];for(const _ of p){const P=_.type,T=_.id??"__internal_without_id",q=(m=g.tags[P])==null?void 0:m[T];q&&(g.tags[P][T]=q.filter(Q=>Q!==d))}delete g.keys[d]}function M(g,d){const p=d.map(m=>{const _=Vn(m,"providesTags",i,b),{queryCacheKey:P}=m.meta.arg;return{queryCacheKey:P,providedTags:_}});R.caseReducers.updateProvidedBy(g,R.actions.updateProvidedBy(p))}const c=Se({name:`${e}/subscriptions`,initialState:Be,reducers:{updateSubscriptionOptions(g,d){},unsubscribeQueryResult(g,d){},internal_getRTKQSubscriptions(){}}}),s=Se({name:`${e}/internalSubscriptions`,initialState:Be,reducers:{subscriptionsUpdated:{reducer(g,d){return Zt(g,d.payload)},prepare:Pe()}}}),u=Se({name:`${e}/config`,initialState:{online:vi(),focused:bi(),middlewareRegistered:!1,...v},reducers:{middlewareRegistered(g,{payload:d}){g.middlewareRegistered=g.middlewareRegistered==="conflict"||o!==d?"conflict":!0}},extraReducers:g=>{g.addCase(at,d=>{d.online=!0}).addCase(Vt,d=>{d.online=!1}).addCase(ct,d=>{d.focused=!0}).addCase(Wt,d=>{d.focused=!1}).addMatcher(y,d=>({...d}))}}),S=Pn({queries:l.reducer,mutations:w.reducer,provided:R.reducer,subscriptions:s.reducer,config:u.reducer}),A=(g,d)=>S(E.match(d)?void 0:g,d),I={...u.actions,...l.actions,...c.actions,...s.actions,...w.actions,...R.actions,resetApiState:E};return{reducer:A,actions:I}}var Z=Symbol.for("RTKQ/skipToken"),Kn={status:"uninitialized"},vn=ze(Kn,()=>{}),Sn=ze(Kn,()=>{});function Qi({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=c=>vn,i=c=>Sn;return{buildQuerySelector:f,buildInfiniteQuerySelector:l,buildMutationSelector:w,selectInvalidatedBy:C,selectCachedArgsForQuery:R,selectApiState:a,selectQueries:y,selectMutations:v,selectQueryEntry:b,selectConfig:E};function o(c){return{...c,...dn(c.status)}}function a(c){return c[t]}function y(c){var s;return(s=a(c))==null?void 0:s.queries}function b(c,s){var u;return(u=y(c))==null?void 0:u[s]}function v(c){var s;return(s=a(c))==null?void 0:s.mutations}function E(c){var s;return(s=a(c))==null?void 0:s.config}function O(c,s,u){return S=>{if(S===Z)return n(r,u);const A=e({queryArgs:S,endpointDefinition:s,endpointName:c});return n(g=>b(g,A)??vn,u)}}function f(c,s){return O(c,s,o)}function l(c,s){const{infiniteQueryOptions:u}=s;function S(A){const I={...A,...dn(A.status)},{isLoading:g,isError:d,direction:p}=I,m=p==="forward",_=p==="backward";return{...I,hasNextPage:h(u,I.data,I.originalArgs),hasPreviousPage:M(u,I.data,I.originalArgs),isFetchingNextPage:g&&m,isFetchingPreviousPage:g&&_,isFetchNextPageError:d&&m,isFetchPreviousPageError:d&&_}}return O(c,s,S)}function w(){return c=>{let s;return typeof c=="object"?s=xe(c)??Z:s=c,n(s===Z?i:A=>{var I,g;return((g=(I=a(A))==null?void 0:I.mutations)==null?void 0:g[s])??Sn},o)}}function C(c,s){const u=c[t],S=new Set;for(const A of s.filter(tt).map(Qt)){const I=u.provided.tags[A.type];if(!I)continue;let g=(A.id!==void 0?I[A.id]:yn(Object.values(I)))??[];for(const d of g)S.add(d)}return yn(Array.from(S.values()).map(A=>{const I=u.queries[A];return I?[{queryCacheKey:A,endpointName:I.endpointName,originalArgs:I.originalArgs}]:[]}))}function R(c,s){return Object.values(y(c)).filter(u=>(u==null?void 0:u.endpointName)===s&&u.status!=="uninitialized").map(u=>u.originalArgs)}function h(c,s,u){return s?jt(c,s,u)!=null:!1}function M(c,s,u){return!s||!c.getPreviousPageParam?!1:Wn(c,s,u)!=null}}var we=WeakMap?new WeakMap:void 0,rt=({endpointName:e,queryArgs:t})=>{let n="";const r=we==null?void 0:we.get(t);if(typeof r=="string")n=r;else{const i=JSON.stringify(t,(o,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=fe(a)?Object.keys(a).sort().reduce((y,b)=>(y[b]=a[b],y),{}):a,a));fe(t)&&(we==null||we.set(t,i)),n=i}return`${e}(${n})`};function Bn(...e){return function(n){const r=et(v=>{var E;return(E=n.extractRehydrationInfo)==null?void 0:E.call(n,v,{reducerPath:n.reducerPath??"api"})}),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(v){let E=rt;if("serializeQueryArgs"in v.endpointDefinition){const O=v.endpointDefinition.serializeQueryArgs;E=f=>{const l=O(f);return typeof l=="string"?l:rt({...f,queryArgs:l})}}else n.serializeQueryArgs&&(E=n.serializeQueryArgs);return E(v)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(v){v()},apiUid:Lt(),extractRehydrationInfo:r,hasRehydrationInfo:et(v=>r(v)!=null)},a={injectEndpoints:b,enhanceEndpoints({addTagTypes:v,endpoints:E}){if(v)for(const O of v)i.tagTypes.includes(O)||i.tagTypes.push(O);if(E)for(const[O,f]of Object.entries(E))typeof f=="function"?f(o.endpointDefinitions[O]):Object.assign(o.endpointDefinitions[O]||{},f);return a}},y=e.map(v=>v.init(a,i,o));function b(v){const E=v.endpoints({query:O=>({...O,type:"query"}),mutation:O=>({...O,type:"mutation"}),infiniteQuery:O=>({...O,type:"infinitequery"})});for(const[O,f]of Object.entries(E)){if(v.overrideExisting!==!0&&O in o.endpointDefinitions){if(v.overrideExisting==="throw")throw new Error(te(39));continue}o.endpointDefinitions[O]=f;for(const l of y)l.injectEndpoint(O,f)}return a}return a.injectEndpoints({endpoints:n.endpoints})}}function ue(e,...t){return Object.assign(e,...t)}var ki=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,o=null;const{updateSubscriptionOptions:a,unsubscribeQueryResult:y}=e.internalActions,b=(l,w)=>{var R,h,M;if(a.match(w)){const{queryCacheKey:c,requestId:s,options:u}=w.payload;return(R=l==null?void 0:l[c])!=null&&R[s]&&(l[c][s]=u),!0}if(y.match(w)){const{queryCacheKey:c,requestId:s}=w.payload;return l[c]&&delete l[c][s],!0}if(e.internalActions.removeQueryResult.match(w))return delete l[w.payload.queryCacheKey],!0;if(t.pending.match(w)){const{meta:{arg:c,requestId:s}}=w,u=l[h=c.queryCacheKey]??(l[h]={});return u[`${s}_running`]={},c.subscribe&&(u[s]=c.subscriptionOptions??u[s]??{}),!0}let C=!1;if(t.fulfilled.match(w)||t.rejected.match(w)){const c=l[w.meta.arg.queryCacheKey]||{},s=`${w.meta.requestId}_running`;C||(C=!!c[s]),delete c[s]}if(t.rejected.match(w)){const{meta:{condition:c,arg:s,requestId:u}}=w;if(c&&s.subscribe){const S=l[M=s.queryCacheKey]??(l[M]={});S[u]=s.subscriptionOptions??S[u]??{},C=!0}}return C},v=()=>n.currentSubscriptions,f={getSubscriptions:v,getSubscriptionCount:l=>{const C=v()[l]??{};return _e(C)},isRequestSubscribed:(l,w)=>{var R;const C=v();return!!((R=C==null?void 0:C[l])!=null&&R[w])}};return(l,w)=>{if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(l))return i=n.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(l))return[!1,f];const C=b(n.currentSubscriptions,l);let R=!0;if(C){o||(o=setTimeout(()=>{const c=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,s]=qn(i,()=>c);w.next(e.internalActions.subscriptionsUpdated(s)),i=c,o=null},500));const h=typeof l.type=="string"&&!!l.type.startsWith(r),M=t.rejected.match(l)&&l.meta.condition&&!!l.meta.arg.subscribe;R=!h&&!M}return[R,!1]}};function ji(e){for(const t in e)return!1;return!0}var xi=2147483647/1e3-1,Fi=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:a}})=>{const{removeQueryResult:y,unsubscribeQueryResult:b,cacheEntriesUpserted:v}=t.internalActions,E=ce(b.match,n.fulfilled,n.rejected,v.match);function O(R){const h=i.currentSubscriptions[R];return!!h&&!ji(h)}const f={},l=(R,h,M)=>{const c=h.getState(),s=a(c);if(E(R)){let u;if(v.match(R))u=R.payload.map(S=>S.queryDescription.queryCacheKey);else{const{queryCacheKey:S}=b.match(R)?R.payload:R.meta.arg;u=[S]}w(u,h,s)}if(t.util.resetApiState.match(R))for(const[u,S]of Object.entries(f))S&&clearTimeout(S),delete f[u];if(r.hasRehydrationInfo(R)){const{queries:u}=r.extractRehydrationInfo(R);w(Object.keys(u),h,s)}};function w(R,h,M){const c=h.getState();for(const s of R){const u=o(c,s);C(s,u==null?void 0:u.endpointName,h,M)}}function C(R,h,M,c){const s=r.endpointDefinitions[h],u=(s==null?void 0:s.keepUnusedDataFor)??c.keepUnusedDataFor;if(u===1/0)return;const S=Math.max(0,Math.min(u,xi));if(!O(R)){const A=f[R];A&&clearTimeout(A),f[R]=setTimeout(()=>{O(R)||M.dispatch(y({queryCacheKey:R})),delete f[R]},S*1e3)}}return l},wn=new Error("Promise never resolved before cacheEntryRemoved."),Ni=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:a,selectApiState:y}})=>{const b=Dt(r),v=Dt(i),E=le(r,i),O={};function f(h,M,c){const s=O[h];s!=null&&s.valueResolved&&(s.valueResolved({data:M,meta:c}),delete s.valueResolved)}function l(h){const M=O[h];M&&(delete O[h],M.cacheEntryRemoved())}const w=(h,M,c)=>{const s=C(h);function u(S,A,I,g){const d=a(c,A),p=a(M.getState(),A);!d&&p&&R(S,g,A,M,I)}if(r.pending.match(h))u(h.meta.arg.endpointName,s,h.meta.requestId,h.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(h))for(const{queryDescription:S,value:A}of h.payload){const{endpointName:I,originalArgs:g,queryCacheKey:d}=S;u(I,d,h.meta.requestId,g),f(d,A,{})}else if(i.pending.match(h))M.getState()[t].mutations[s]&&R(h.meta.arg.endpointName,h.meta.arg.originalArgs,s,M,h.meta.requestId);else if(E(h))f(s,h.payload,h.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(h)||e.internalActions.removeMutationResult.match(h))l(s);else if(e.util.resetApiState.match(h))for(const S of Object.keys(O))l(S)};function C(h){return b(h)?h.meta.arg.queryCacheKey:v(h)?h.meta.arg.fixedCacheKey??h.meta.requestId:e.internalActions.removeQueryResult.match(h)?h.payload.queryCacheKey:e.internalActions.removeMutationResult.match(h)?xe(h.payload):""}function R(h,M,c,s,u){const S=n.endpointDefinitions[h],A=S==null?void 0:S.onCacheEntryAdded;if(!A)return;const I={},g=new Promise(T=>{I.cacheEntryRemoved=T}),d=Promise.race([new Promise(T=>{I.valueResolved=T}),g.then(()=>{throw wn})]);d.catch(()=>{}),O[c]=I;const p=e.endpoints[h].select(nt(S)?M:c),m=s.dispatch((T,q,Q)=>Q),_={...s,getCacheEntry:()=>p(s.getState()),requestId:u,extra:m,updateCachedData:nt(S)?T=>s.dispatch(e.util.updateQueryData(h,M,T)):void 0,cacheDataLoaded:d,cacheEntryRemoved:g},P=A(M,_);Promise.resolve(P).catch(T=>{if(T!==wn)throw T})}return w},zi=({api:e,context:{apiUid:t},reducerPath:n})=>(r,i)=>{e.util.resetApiState.match(r)&&i.dispatch(e.internalActions.middlewareRegistered(t))},Ui=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:a,refetchQuery:y,internalState:b})=>{const{removeQueryResult:v}=o.internalActions,E=ce(le(r),ut(r)),O=ce(le(r,i),Ee(r,i));let f=[];const l=(R,h)=>{E(R)?C(Vn(R,"invalidatesTags",n,a),h):O(R)?C([],h):o.util.invalidateTags.match(R)&&C(Kt(R.payload,void 0,void 0,void 0,void 0,a),h)};function w(R){var c;const{queries:h,mutations:M}=R;for(const s of[h,M])for(const u in s)if(((c=s[u])==null?void 0:c.status)==="pending")return!0;return!1}function C(R,h){const M=h.getState(),c=M[e];if(f.push(...R),c.config.invalidationBehavior==="delayed"&&w(c))return;const s=f;if(f=[],s.length===0)return;const u=o.util.selectInvalidatedBy(M,s);t.batch(()=>{const S=Array.from(u.values());for(const{queryCacheKey:A}of S){const I=c.queries[A],g=b.currentSubscriptions[A]??{};I&&(_e(g)===0?h.dispatch(v({queryCacheKey:A})):I.status!=="uninitialized"&&h.dispatch(y(I)))}})}return l},Li=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const o={},a=(f,l)=>{(n.internalActions.updateSubscriptionOptions.match(f)||n.internalActions.unsubscribeQueryResult.match(f))&&b(f.payload,l),(t.pending.match(f)||t.rejected.match(f)&&f.meta.condition)&&b(f.meta.arg,l),(t.fulfilled.match(f)||t.rejected.match(f)&&!f.meta.condition)&&y(f.meta.arg,l),n.util.resetApiState.match(f)&&E()};function y({queryCacheKey:f},l){const w=l.getState()[e],C=w.queries[f],R=i.currentSubscriptions[f];if(!C||C.status==="uninitialized")return;const{lowestPollingInterval:h,skipPollingIfUnfocused:M}=O(R);if(!Number.isFinite(h))return;const c=o[f];c!=null&&c.timeout&&(clearTimeout(c.timeout),c.timeout=void 0);const s=Date.now()+h;o[f]={nextPollTimestamp:s,pollingInterval:h,timeout:setTimeout(()=>{(w.config.focused||!M)&&l.dispatch(r(C)),y({queryCacheKey:f},l)},h)}}function b({queryCacheKey:f},l){const C=l.getState()[e].queries[f],R=i.currentSubscriptions[f];if(!C||C.status==="uninitialized")return;const{lowestPollingInterval:h}=O(R);if(!Number.isFinite(h)){v(f);return}const M=o[f],c=Date.now()+h;(!M||c<M.nextPollTimestamp)&&y({queryCacheKey:f},l)}function v(f){const l=o[f];l!=null&&l.timeout&&clearTimeout(l.timeout),delete o[f]}function E(){for(const f of Object.keys(o))v(f)}function O(f={}){let l=!1,w=Number.POSITIVE_INFINITY;for(let C in f)f[C].pollingInterval&&(w=Math.min(f[C].pollingInterval,w),l=f[C].skipPollingIfUnfocused||l);return{lowestPollingInterval:w,skipPollingIfUnfocused:l}}return a},$i=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Ut(n,r),o=Ee(n,r),a=le(n,r),y={};return(v,E)=>{var O,f;if(i(v)){const{requestId:l,arg:{endpointName:w,originalArgs:C}}=v.meta,R=t.endpointDefinitions[w],h=R==null?void 0:R.onQueryStarted;if(h){const M={},c=new Promise((A,I)=>{M.resolve=A,M.reject=I});c.catch(()=>{}),y[l]=M;const s=e.endpoints[w].select(nt(R)?C:l),u=E.dispatch((A,I,g)=>g),S={...E,getCacheEntry:()=>s(E.getState()),requestId:l,extra:u,updateCachedData:nt(R)?A=>E.dispatch(e.util.updateQueryData(w,C,A)):void 0,queryFulfilled:c};h(C,S)}}else if(a(v)){const{requestId:l,baseQueryMeta:w}=v.meta;(O=y[l])==null||O.resolve({data:v.payload,meta:w}),delete y[l]}else if(o(v)){const{requestId:l,rejectedWithValue:w,baseQueryMeta:C}=v.meta;(f=y[l])==null||f.reject({error:v.payload??v.error,isUnhandledError:!w,meta:C}),delete y[l]}}},Wi=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions,a=(b,v)=>{ct.match(b)&&y(v,"refetchOnFocus"),at.match(b)&&y(v,"refetchOnReconnect")};function y(b,v){const E=b.getState()[e],O=E.queries,f=i.currentSubscriptions;t.batch(()=>{for(const l of Object.keys(f)){const w=O[l],C=f[l];if(!C||!w)continue;(Object.values(C).some(h=>h[v]===!0)||Object.values(C).every(h=>h[v]===void 0)&&E.config[v])&&(_e(C)===0?b.dispatch(o({queryCacheKey:l})):w.status!=="uninitialized"&&b.dispatch(r(w)))}})}return a};function Vi(e){const{reducerPath:t,queryThunk:n,api:r,context:i}=e,{apiUid:o}=i,a={invalidateTags:ee(`${t}/invalidateTags`)},y=O=>O.type.startsWith(`${t}/`),b=[zi,Fi,Ui,Li,Ni,$i];return{middleware:O=>{let f=!1;const w={...e,internalState:{currentSubscriptions:{}},refetchQuery:E,isThisApiSliceAction:y},C=b.map(M=>M(w)),R=ki(w),h=Wi(w);return M=>c=>{if(!On(c))return M(c);f||(f=!0,O.dispatch(r.internalActions.middlewareRegistered(o)));const s={...O,next:M},u=O.getState(),[S,A]=R(c,s,u);let I;if(S?I=M(c):I=A,O.getState()[t]&&(h(c,s,u),y(c)||i.hasRehydrationInfo(c)))for(const g of C)g(c,s,u);return I}},actions:a};function E(O){return e.api.endpoints[O.endpointName].initiate(O.originalArgs,{subscribe:!1,forceRefetch:!0})}}var _n=Symbol(),Hn=({createSelector:e=zt}={})=>({name:_n,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:a,refetchOnMountOrArgChange:y,refetchOnFocus:b,refetchOnReconnect:v,invalidationBehavior:E,onSchemaFailure:O,catchSchemaFailure:f,skipSchemaValidation:l},w){gr();const C=k=>k;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:at,onOffline:Vt,onFocus:ct,onFocusLost:Wt},util:{}});const R=Qi({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:h,selectCachedArgsForQuery:M,buildQuerySelector:c,buildInfiniteQuerySelector:s,buildMutationSelector:u}=R;ue(t.util,{selectInvalidatedBy:h,selectCachedArgsForQuery:M});const{queryThunk:S,infiniteQueryThunk:A,mutationThunk:I,patchQueryData:g,updateQueryData:d,upsertQueryData:p,prefetch:m,buildMatchThunkActions:_}=qi({baseQuery:n,reducerPath:i,context:w,api:t,serializeQueryArgs:o,assertTagType:C,selectors:R,onSchemaFailure:O,catchSchemaFailure:f,skipSchemaValidation:l}),{reducer:P,actions:T}=Di({context:w,queryThunk:S,mutationThunk:I,serializeQueryArgs:o,reducerPath:i,assertTagType:C,config:{refetchOnFocus:b,refetchOnReconnect:v,refetchOnMountOrArgChange:y,keepUnusedDataFor:a,reducerPath:i,invalidationBehavior:E}});ue(t.util,{patchQueryData:g,updateQueryData:d,upsertQueryData:p,prefetch:m,resetApiState:T.resetApiState,upsertQueryEntries:T.cacheEntriesUpserted}),ue(t.internalActions,T);const{middleware:q,actions:Q}=Vi({reducerPath:i,context:w,queryThunk:S,mutationThunk:I,infiniteQueryThunk:A,api:t,assertTagType:C,selectors:R});ue(t.util,Q),ue(t,{reducer:P,middleware:q});const{buildInitiateQuery:j,buildInitiateInfiniteQuery:D,buildInitiateMutation:F,getRunningMutationThunk:N,getRunningMutationsThunk:L,getRunningQueriesThunk:K,getRunningQueryThunk:U}=Ii({queryThunk:S,mutationThunk:I,infiniteQueryThunk:A,api:t,serializeQueryArgs:o,context:w});return ue(t.util,{getRunningMutationThunk:N,getRunningMutationsThunk:L,getRunningQueryThunk:U,getRunningQueriesThunk:K}),{name:_n,injectEndpoint(k,W){var oe;const J=(oe=t.endpoints)[k]??(oe[k]={});ft(W)&&ue(J,{name:k,select:c(k,W),initiate:j(k,W)},_(S,k)),Ci(W)&&ue(J,{name:k,select:u(),initiate:F(k)},_(I,k)),lt(W)&&ue(J,{name:k,select:s(k,W),initiate:D(k,W)},_(S,k))}}}});Hn();function He(e){return e.replace(e[0],e[0].toUpperCase())}function Ki(e){return e.type==="query"}function Bi(e){return e.type==="mutation"}function Gn(e){return e.type==="infinitequery"}function Ce(e,...t){return Object.assign(e,...t)}var Et=Symbol();function Rt(e,t,n,r){const i=x.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}),[e,t,n,r]),o=x.useRef(i);return x.useEffect(()=>{o.current.serialized!==i.serialized&&(o.current=i)},[i]),o.current.serialized===i.serialized?o.current.queryArgs:e}function Ge(e){const t=x.useRef(e);return x.useEffect(()=>{Te(t.current,e)||(t.current=e)},[e]),Te(t.current,e)?t.current:e}var Hi=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gi=Hi(),Ji=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Xi=Ji(),Yi=()=>Gi||Xi?x.useLayoutEffect:x.useEffect,Zi=Yi(),En=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Un.pending}:e;function Pt(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var Ot=["data","status","isLoading","isSuccess","isError","error"];function es({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:a},serializeQueryArgs:y,context:b}){const v=o?s=>s():x.useEffect;return{buildQueryHooks:h,buildInfiniteQueryHooks:M,buildMutationHook:c,usePrefetch:f};function E(s,u,S){if(u!=null&&u.endpointName&&s.isUninitialized){const{endpointName:m}=u,_=b.endpointDefinitions[m];S!==Z&&y({queryArgs:u.originalArgs,endpointDefinition:_,endpointName:m})===y({queryArgs:S,endpointDefinition:_,endpointName:m})&&(u=void 0)}let A=s.isSuccess?s.data:u==null?void 0:u.data;A===void 0&&(A=s.data);const I=A!==void 0,g=s.isLoading,d=(!u||u.isLoading||u.isUninitialized)&&!I&&g,p=s.isSuccess||I&&(g&&!(u!=null&&u.isError)||s.isUninitialized);return{...s,data:A,currentData:s.data,isFetching:g,isLoading:d,isSuccess:p}}function O(s,u,S){if(u!=null&&u.endpointName&&s.isUninitialized){const{endpointName:m}=u,_=b.endpointDefinitions[m];S!==Z&&y({queryArgs:u.originalArgs,endpointDefinition:_,endpointName:m})===y({queryArgs:S,endpointDefinition:_,endpointName:m})&&(u=void 0)}let A=s.isSuccess?s.data:u==null?void 0:u.data;A===void 0&&(A=s.data);const I=A!==void 0,g=s.isLoading,d=(!u||u.isLoading||u.isUninitialized)&&!I&&g,p=s.isSuccess||g&&I;return{...s,data:A,currentData:s.data,isFetching:g,isLoading:d,isSuccess:p}}function f(s,u){const S=n(),A=Ge(u);return x.useCallback((I,g)=>S(e.util.prefetch(s,I,{...A,...g})),[s,S,A])}function l(s,u,{refetchOnReconnect:S,refetchOnFocus:A,refetchOnMountOrArgChange:I,skip:g=!1,pollingInterval:d=0,skipPollingIfUnfocused:p=!1,...m}={}){const{initiate:_}=e.endpoints[s],P=n(),T=x.useRef(void 0);if(!T.current){const k=P(e.internalActions.internal_getRTKQSubscriptions());T.current=k}const q=Rt(g?Z:u,rt,b.endpointDefinitions[s],s),Q=Ge({refetchOnReconnect:S,refetchOnFocus:A,pollingInterval:d,skipPollingIfUnfocused:p}),j=m.initialPageParam,D=Ge(j),F=x.useRef(void 0);let{queryCacheKey:N,requestId:L}=F.current||{},K=!1;N&&L&&(K=T.current.isRequestSubscribed(N,L));const U=!K&&F.current!==void 0;return v(()=>{U&&(F.current=void 0)},[U]),v(()=>{var z;const k=F.current;if(q===Z){k==null||k.unsubscribe(),F.current=void 0;return}const W=(z=F.current)==null?void 0:z.subscriptionOptions;if(!k||k.arg!==q){k==null||k.unsubscribe();const J=P(_(q,{subscriptionOptions:Q,forceRefetch:I,...Gn(b.endpointDefinitions[s])?{initialPageParam:D}:{}}));F.current=J}else Q!==W&&k.updateSubscriptionOptions(Q)},[P,_,I,q,Q,U,D,s]),[F,P,_,Q]}function w(s,u){return(A,{skip:I=!1,selectFromResult:g}={})=>{const{select:d}=e.endpoints[s],p=Rt(I?Z:A,y,b.endpointDefinitions[s],s),m=x.useRef(void 0),_=x.useMemo(()=>a([d(p),(j,D)=>D,j=>p],u,{memoizeOptions:{resultEqualityCheck:Te}}),[d,p]),P=x.useMemo(()=>g?a([_],g,{devModeChecks:{identityFunctionCheck:"never"}}):_,[_,g]),T=r(j=>P(j,m.current),Te),q=i(),Q=_(q.getState(),m.current);return Zi(()=>{m.current=Q},[Q]),T}}function C(s){x.useEffect(()=>()=>{var u,S;(S=(u=s.current)==null?void 0:u.unsubscribe)==null||S.call(u),s.current=void 0},[s])}function R(s){if(!s.current)throw new Error(te(38));return s.current.refetch()}function h(s){const u=(I,g={})=>{const[d]=l(s,I,g);return C(d),x.useMemo(()=>({refetch:()=>R(d)}),[d])},S=({refetchOnReconnect:I,refetchOnFocus:g,pollingInterval:d=0,skipPollingIfUnfocused:p=!1}={})=>{const{initiate:m}=e.endpoints[s],_=n(),[P,T]=x.useState(Et),q=x.useRef(void 0),Q=Ge({refetchOnReconnect:I,refetchOnFocus:g,pollingInterval:d,skipPollingIfUnfocused:p});v(()=>{var L,K;const N=(L=q.current)==null?void 0:L.subscriptionOptions;Q!==N&&((K=q.current)==null||K.updateSubscriptionOptions(Q))},[Q]);const j=x.useRef(Q);v(()=>{j.current=Q},[Q]);const D=x.useCallback(function(N,L=!1){let K;return t(()=>{var U;(U=q.current)==null||U.unsubscribe(),q.current=K=_(m(N,{subscriptionOptions:j.current,forceRefetch:!L})),T(N)}),K},[_,m]),F=x.useCallback(()=>{var N,L;(N=q.current)!=null&&N.queryCacheKey&&_(e.internalActions.removeQueryResult({queryCacheKey:(L=q.current)==null?void 0:L.queryCacheKey}))},[_]);return x.useEffect(()=>()=>{var N;(N=q==null?void 0:q.current)==null||N.unsubscribe()},[]),x.useEffect(()=>{P!==Et&&!q.current&&D(P,!0)},[P,D]),x.useMemo(()=>[D,P,{reset:F}],[D,P,F])},A=w(s,E);return{useQueryState:A,useQuerySubscription:u,useLazyQuerySubscription:S,useLazyQuery(I){const[g,d,{reset:p}]=S(I),m=A(d,{...I,skip:d===Et}),_=x.useMemo(()=>({lastArg:d}),[d]);return x.useMemo(()=>[g,{...m,reset:p},_],[g,m,p,_])},useQuery(I,g){const d=u(I,g),p=A(I,{selectFromResult:I===Z||g!=null&&g.skip?void 0:En,...g}),m=Pt(p,...Ot);return x.useDebugValue(m),x.useMemo(()=>({...p,...d}),[p,d])}}}function M(s){const u=(A,I={})=>{const[g,d,p,m]=l(s,A,I),_=x.useRef(m);v(()=>{_.current=m},[m]);const P=x.useCallback(function(Q,j){let D;return t(()=>{var F;(F=g.current)==null||F.unsubscribe(),g.current=D=d(p(Q,{subscriptionOptions:_.current,direction:j}))}),D},[g,d,p]);C(g);const T=Rt(I.skip?Z:A,rt,b.endpointDefinitions[s],s),q=x.useCallback(()=>R(g),[g]);return x.useMemo(()=>({trigger:P,refetch:q,fetchNextPage:()=>P(T,"forward"),fetchPreviousPage:()=>P(T,"backward")}),[q,P,T])},S=w(s,O);return{useInfiniteQueryState:S,useInfiniteQuerySubscription:u,useInfiniteQuery(A,I){const{refetch:g,fetchNextPage:d,fetchPreviousPage:p}=u(A,I),m=S(A,{selectFromResult:A===Z||I!=null&&I.skip?void 0:En,...I}),_=Pt(m,...Ot,"hasNextPage","hasPreviousPage");return x.useDebugValue(_),x.useMemo(()=>({...m,fetchNextPage:d,fetchPreviousPage:p,refetch:g}),[m,d,p,g])}}}function c(s){return({selectFromResult:u,fixedCacheKey:S}={})=>{const{select:A,initiate:I}=e.endpoints[s],g=n(),[d,p]=x.useState();x.useEffect(()=>()=>{d!=null&&d.arg.fixedCacheKey||d==null||d.reset()},[d]);const m=x.useCallback(function(N){const L=g(I(N,{fixedCacheKey:S}));return p(L),L},[g,I,S]),{requestId:_}=d||{},P=x.useMemo(()=>A({fixedCacheKey:S,requestId:d==null?void 0:d.requestId}),[S,d,A]),T=x.useMemo(()=>u?a([P],u):P,[u,P]),q=r(T,Te),Q=S==null?d==null?void 0:d.arg.originalArgs:void 0,j=x.useCallback(()=>{t(()=>{d&&p(void 0),S&&g(e.internalActions.removeMutationResult({requestId:_,fixedCacheKey:S}))})},[g,S,d,_]),D=Pt(q,...Ot,"endpointName");x.useDebugValue(D);const F=x.useMemo(()=>({...q,originalArgs:Q,reset:j}),[q,Q,j]);return x.useMemo(()=>[m,F],[m,F])}}}var ts=Symbol(),ns=({batch:e=hi,hooks:t={useDispatch:li,useSelector:yi,useStore:zn},createSelector:n=zt,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:ts,init(o,{serializeQueryArgs:a},y){const b=o,{buildQueryHooks:v,buildInfiniteQueryHooks:E,buildMutationHook:O,usePrefetch:f}=es({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:y});return Ce(b,{usePrefetch:f}),Ce(y,{batch:e}),{injectEndpoint(l,w){if(Ki(w)){const{useQuery:C,useLazyQuery:R,useLazyQuerySubscription:h,useQueryState:M,useQuerySubscription:c}=v(l);Ce(b.endpoints[l],{useQuery:C,useLazyQuery:R,useLazyQuerySubscription:h,useQueryState:M,useQuerySubscription:c}),o[`use${He(l)}Query`]=C,o[`useLazy${He(l)}Query`]=R}if(Bi(w)){const C=O(l);Ce(b.endpoints[l],{useMutation:C}),o[`use${He(l)}Mutation`]=C}else if(Gn(w)){const{useInfiniteQuery:C,useInfiniteQuerySubscription:R,useInfiniteQueryState:h}=E(l);Ce(b.endpoints[l],{useInfiniteQuery:C,useInfiniteQuerySubscription:R,useInfiniteQueryState:h}),o[`use${He(l)}InfiniteQuery`]=C}}}}}),rs=Bn(Hn(),ns());const is=async(e,t,n)=>typeof window>"u"?{data:{}}:Oi({baseUrl:"/api/v1"})(e,t,n),ss=rs({reducerPath:"editorialApi",baseQuery:is,tagTypes:["schema","data","files","config"],endpoints:e=>({getConfig:e.query({query:()=>"/config",providesTags:[{type:"config"}]}),pull:e.mutation({query:()=>({url:"/pull",method:"POST"})}),push:e.mutation({query:()=>({url:"/push",method:"POST"})}),publish:e.mutation({query:()=>({url:"/publish",method:"POST"})}),getSchema:e.query({query:()=>"/schema",providesTags:[{type:"schema"}]}),getSchemaType:e.query({query:()=>"/schema",transformResponse:(t,n,r)=>t[r]||null,providesTags:(t,n,r)=>[{type:"schema",id:r}]}),getData:e.query({query:()=>"/data",providesTags:()=>[{type:"data"}]}),getDataCount:e.query({query:()=>"/data",transformResponse(t){return Object.values(t).reduce((r,i)=>r+Object.keys(i).length,0)}}),getDataObject:e.query({query:()=>"/data",transformResponse:(t,n,{itemType:r,id:i})=>t[r][i]||null,providesTags:(t,n,{itemType:r,id:i})=>[{type:"data",id:`${r}-${i}`}]}),getFiles:e.query({query:()=>"/files",transformResponse:t=>t.files,providesTags:()=>[{type:"files"}]}),getFileCount:e.query({query:()=>"/files",transformResponse:t=>{function n(i){let o=i.type==="file"?1:0;return i.children&&i.children.length>0&&(o+=i.children.reduce((a,y)=>a+n(y),0)),o}function r(i){return i.reduce((o,a)=>o+n(a),0)}return r(t.files)}}),getFilesTotalSize:e.query({query:()=>"/files",transformResponse:t=>t.totalSize,providesTags:()=>[{type:"files"}]}),deleteFile:e.mutation({query:t=>({url:"/files",method:"DELETE",body:{path:t}}),invalidatesTags:()=>[{type:"files"}]}),updateObject:e.mutation({query:({id:t,type:n,...r})=>({url:`/data/${n}/${t}`,method:"PATCH",body:{id:t,type:n,...r}}),invalidatesTags:()=>[{type:"data"}]}),createObject:e.mutation({query:({id:t,type:n,...r})=>({url:`/data/${n}/${t}`,method:"PUT",body:{id:t,type:n,...r}}),invalidatesTags:()=>[{type:"data"}]}),deleteObject:e.mutation({query:({id:t,type:n})=>({url:`/data/${n}/${t}`,method:"DELETE"}),invalidatesTags:()=>[{type:"data"}]})})}),{useCreateObjectMutation:ls,useDeleteFileMutation:ds,useDeleteObjectMutation:ps,useGetConfigQuery:ys,useGetDataCountQuery:hs,useGetDataObjectQuery:gs,useGetDataQuery:ms,useGetFileCountQuery:bs,useGetFilesQuery:vs,useGetFilesTotalSizeQuery:Ss,useGetSchemaQuery:ws,useGetSchemaTypeQuery:_s,usePublishMutation:Es,usePullMutation:Rs,usePushMutation:Ps,useUpdateObjectMutation:Os}=ss;export{as as P,ws as a,ms as b,cs as c,Es as d,ss as e,Rs as f,Ps as g,Ss as h,hs as i,bs as j,_s as k,ps as l,gs as m,ls as n,Os as o,vs as p,ds as q,li as r,fs as s,yi as t,ys as u,zn as v,un as w,Se as x};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as oe,p as x,w as $e,v as Ve}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{B as Le}from"./button-DjJX-cbR.js";import{g as K,s as J,a as Me,u as Pe,F as ze,b as Y,c as H,d as ce,e as G,I as ue,f as Q,C as De}from"./input-DA43W1bc.js";import{c as Fe}from"./utils-BSDwSRl3.js";import{c as Se}from"./createLucideIcon-BOhrmKcl.js";import{u as Ue,e as ee,l as Be}from"./authSlice-
|
|
1
|
+
import{a as oe,p as x,w as $e,v as Ve}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{B as Le}from"./button-DjJX-cbR.js";import{g as K,s as J,a as Me,u as Pe,F as ze,b as Y,c as H,d as ce,e as G,I as ue,f as Q,C as De}from"./input-DA43W1bc.js";import{c as Fe}from"./utils-BSDwSRl3.js";import{c as Se}from"./createLucideIcon-BOhrmKcl.js";import{u as Ue,e as ee,l as Be}from"./authSlice-DST6tNnU.js";import"./index-B0NebLYn.js";import"./index-BnyqKVWo.js";import"./tslib.es6-De9GV7Vy.js";import"./editorialApi-CqxxtYzA.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var s5=Object.defineProperty;var l5=(e,t,n)=>t in e?s5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bt=(e,t,n)=>l5(e,typeof t!="symbol"?t+"":t,n);import{a as N,R as S,p as P,A as $h,B as Uc,x as a5}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as at,a as Bo,B as u5}from"./button-DjJX-cbR.js";import{h as c5,u as fu,i as d5,I as Yl,F as f5,b as sl,c as ll,d as po,e as al,j as ul,f as cl,C as h5}from"./input-DA43W1bc.js";import{n as g5,o as p5}from"./editorialApi-
|
|
1
|
+
var s5=Object.defineProperty;var l5=(e,t,n)=>t in e?s5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bt=(e,t,n)=>l5(e,typeof t!="symbol"?t+"":t,n);import{a as N,R as S,p as P,A as $h,B as Uc,x as a5}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as at,a as Bo,B as u5}from"./button-DjJX-cbR.js";import{h as c5,u as fu,i as d5,I as Yl,F as f5,b as sl,c as ll,d as po,e as al,j as ul,f as cl,C as h5}from"./input-DA43W1bc.js";import{n as g5,o as p5}from"./editorialApi-CqxxtYzA.js";import{c as m5}from"./utils-BSDwSRl3.js";import{a as zo}from"./index-BnyqKVWo.js";import{h as vs,i as Dh,u as Ki,j as hu,k as Vh,l as Hh,m as Bh,n as zh,o as jh,F as Uh,p as Wh,q as Jh,r as Kh,b as x5,R as y5,P as b5,O as v5,C as _5,T as C5,a as w5,V as k5,c as Zh,d as Gh,e as qh,f as Yh,g as Xh,A as S5,E as E5}from"./index-b1VEd5BJ.js";import{_ as Wc}from"./tslib.es6-De9GV7Vy.js";import{u as sr,c as qr,b as Qh,a as ye,P as Re,d as Pn}from"./index-B0NebLYn.js";import{c as T5}from"./createLucideIcon-BOhrmKcl.js";/**
|
|
2
2
|
* @license lucide-react v0.487.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DxhHtLqO.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-
|
|
1
|
+
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-DxhHtLqO.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasErrorBoundary":true,"module":"/assets/root-Cuw5kjHy.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/index-BnyqKVWo.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/root-DdgoqUZJ.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-BkOGwoQz.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/button-DjJX-cbR.js","/assets/input-DA43W1bc.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/authSlice-DST6tNnU.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/tslib.es6-De9GV7Vy.js","/assets/editorialApi-CqxxtYzA.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-D6uAMjWG.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-b1VEd5BJ.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/button-DjJX-cbR.js","/assets/index-B0NebLYn.js","/assets/chevron-down-CYVLN3e-.js","/assets/tslib.es6-De9GV7Vy.js","/assets/index-BnyqKVWo.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-BjYHjaPP.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/utils-BSDwSRl3.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-CQvFoK7s.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-B-0plYyF.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/itemForm-CnzvRzeD.js","/assets/editorialApi-CqxxtYzA.js","/assets/button-DjJX-cbR.js","/assets/utils-BSDwSRl3.js","/assets/input-DA43W1bc.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/index-b1VEd5BJ.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/itemForm-BVtnhZqg.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-U37ELAZn.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/button-DjJX-cbR.js","/assets/editorialApi-CqxxtYzA.js","/assets/index-CQvFoK7s.js","/assets/utils-BSDwSRl3.js","/assets/trash-CYTPibS3.js","/assets/createLucideIcon-BOhrmKcl.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-Dt2belpf.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/itemForm-CnzvRzeD.js","/assets/editorialApi-CqxxtYzA.js","/assets/button-DjJX-cbR.js","/assets/utils-BSDwSRl3.js","/assets/input-DA43W1bc.js","/assets/index-B0NebLYn.js","/assets/index-BnyqKVWo.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/index-b1VEd5BJ.js","/assets/tslib.es6-De9GV7Vy.js"],"css":["/assets/itemForm-BVtnhZqg.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-Bal43yfa.js","imports":["/assets/chunk-EF7DTUVF-CZaHNoTs.js","/assets/authSlice-DST6tNnU.js","/assets/editorialApi-CqxxtYzA.js","/assets/utils-BSDwSRl3.js","/assets/createLucideIcon-BOhrmKcl.js","/assets/chevron-down-CYVLN3e-.js","/assets/trash-CYTPibS3.js","/assets/tslib.es6-De9GV7Vy.js"],"css":[]}},"url":"/assets/manifest-8cebdeb7.js","version":"8cebdeb7"};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as c,p as e,w as m,q as h,M as x,L as p,S as j,t as b,O as g,i as y}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as E,o as w,r as v,f as N,g as S,s as l,a as F,b as R,c as z,i as A,d as L}from"./authSlice-DST6tNnU.js";import{u,c as P,s as I,e as o,P as k}from"./editorialApi-CqxxtYzA.js";import"./tslib.es6-De9GV7Vy.js";function q(){const s=E(),{data:t}=u();return c.useEffect(()=>{const a=w(z,async r=>{var i;if(r&&(t!=null&&t.firebase)){const n=(i=r.email)==null?void 0:i.replace(/[.@]/g,"_"),d=v(N,`${t.firebase.dbUsersPath}/${n}`),f=(await S(d)).val();s(l({uid:r.uid,email:r.email})),s(F(f))}else s(l(void 0));s(R(!1))});return()=>a()},[s,t]),null}function B({children:s}){const[t,a]=c.useState(!1),{data:r,error:i,isLoading:n}=u();return c.useEffect(()=>{if(!n){if(i){console.error("Failed to fetch admin config:",i);return}if(r)try{if(!r.firebase)throw new Error("Firebase configuration not found in admin config");A(r.firebase),a(!0)}catch(d){console.error("Failed to initialize Firebase:",d)}}},[r,i,n]),i?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold text-red-600 mb-2",children:"Firebase Initialization Error"}),e.jsx("p",{className:"text-gray-600",children:i instanceof Error?i.message:"Failed to fetch admin config"})]})}):n||!t?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600",children:"Initializing Firebase..."})]})}):e.jsx(e.Fragment,{children:s})}function C(){const s=P({reducer:{auth:L,[o.reducerPath]:o.reducer},middleware:t=>t().concat(o.middleware)});return I(s.dispatch),s}function D({children:s}){const t=c.useRef(null);return t.current||(t.current=C(),t.current.dispatch(o.endpoints.getConfig.initiate())),e.jsx(k,{store:t.current,children:s})}const $=()=>[];function G({}){return[{title:"Editorial Admin"}]}function K({children:s}){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(x,{}),e.jsx(p,{})]}),e.jsxs("body",{className:"h-full min-h-screen bg-background font-sans antialiased",children:[e.jsx(D,{children:e.jsxs(B,{children:[e.jsx(q,{}),s]})}),e.jsx(j,{}),e.jsx(b,{})]})]})}const Q=m(function(){return e.jsx(g,{})}),H=h(function({error:t}){let a="Oops!",r="An unexpected error occurred.",i;return y(t)&&(a=t.status===404?"404":"Error",r=t.status===404?"The requested page could not be found.":t.statusText||r),e.jsxs("main",{className:"pt-16 p-4 container mx-auto",children:[e.jsx("h1",{children:a}),e.jsx("p",{children:r}),i]})});export{H as ErrorBoundary,K as Layout,Q as default,$ as links,G as meta};
|
package/build/client/index.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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"/><link rel="modulepreload" href="/assets/manifest-
|
|
2
|
-
import * as route0 from "/assets/root-
|
|
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"/><link rel="modulepreload" href="/assets/manifest-8cebdeb7.js"/><link rel="modulepreload" href="/assets/entry.client-DxhHtLqO.js"/><link rel="modulepreload" href="/assets/chunk-EF7DTUVF-CZaHNoTs.js"/><link rel="modulepreload" href="/assets/index-BnyqKVWo.js"/><link rel="modulepreload" href="/assets/root-Cuw5kjHy.js"/><link rel="modulepreload" href="/assets/authSlice-DST6tNnU.js"/><link rel="modulepreload" href="/assets/editorialApi-CqxxtYzA.js"/><link rel="modulepreload" href="/assets/tslib.es6-De9GV7Vy.js"/><title>Editorial Admin</title><link rel="stylesheet" href="/assets/root-DdgoqUZJ.css"/></head><body class="h-full min-h-screen bg-background font-sans antialiased"><div class="flex items-center justify-center min-h-screen"><div class="text-center"><div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"></div><p class="text-gray-600">Initializing Firebase...</p></div></div><script>window.__reactRouterContext = {"basename":"/","future":{"unstable_middleware":false,"unstable_optimizeDeps":false,"unstable_splitRouteModules":false,"unstable_subResourceIntegrity":false,"unstable_viteEnvironmentApi":false},"routeDiscovery":{"mode":"initial"},"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-8cebdeb7.js";
|
|
2
|
+
import * as route0 from "/assets/root-Cuw5kjHy.js";
|
|
3
3
|
|
|
4
4
|
window.__reactRouterRouteModules = {"root":route0};
|
|
5
5
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isardsat/editorial-admin",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.3.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"tailwindcss-animate": "^1.0.7",
|
|
79
79
|
"vaul": "^1.1.2",
|
|
80
80
|
"zod": "^3",
|
|
81
|
-
"@isardsat/editorial-common": "^6.
|
|
81
|
+
"@isardsat/editorial-common": "^6.3.1"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@react-router/dev": "^7.5.3",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
var Zn=Object.defineProperty;var er=(e,t,n)=>t in e?Zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ue=(e,t,n)=>er(e,typeof t!="symbol"?t+"":t,n);import{r as tr,a as x}from"./chunk-EF7DTUVF-CZaHNoTs.js";function B(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 nr=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ht=nr,pt=()=>Math.random().toString(36).substring(7).split("").join("."),rr={INIT:`@@redux/INIT${pt()}`,REPLACE:`@@redux/REPLACE${pt()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${pt()}`},Je=rr;function fe(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 Pn(e,t,n){if(typeof e!="function")throw new Error(B(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(B(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(B(1));return n(Pn)(e,t)}let r=e,i=t,o=new Map,a=o,y=0,b=!1;function v(){a===o&&(a=new Map,o.forEach((R,h)=>{a.set(h,R)}))}function E(){if(b)throw new Error(B(3));return i}function O(R){if(typeof R!="function")throw new Error(B(4));if(b)throw new Error(B(5));let h=!0;v();const M=y++;return a.set(M,R),function(){if(h){if(b)throw new Error(B(6));h=!1,v(),a.delete(M),o=null}}}function f(R){if(!fe(R))throw new Error(B(7));if(typeof R.type>"u")throw new Error(B(8));if(typeof R.type!="string")throw new Error(B(17));if(b)throw new Error(B(9));try{b=!0,i=r(i,R)}finally{b=!1}return(o=a).forEach(M=>{M()}),R}function l(R){if(typeof R!="function")throw new Error(B(10));r=R,f({type:Je.REPLACE})}function w(){const R=O;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(B(11));function M(){const s=h;s.next&&s.next(E())}return M(),{unsubscribe:R(M)}},[Ht](){return this}}}return f({type:Je.INIT}),{dispatch:f,subscribe:O,getState:E,replaceReducer:l,[Ht]:w}}function ir(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:Je.INIT})>"u")throw new Error(B(12));if(typeof n(void 0,{type:Je.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(B(13))})}function On(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const a=t[o];typeof e[a]=="function"&&(n[a]=e[a])}const r=Object.keys(n);let i;try{ir(n)}catch(o){i=o}return function(a={},y){if(i)throw i;let b=!1;const v={};for(let E=0;E<r.length;E++){const O=r[E],f=n[O],l=a[O],w=f(l,y);if(typeof w>"u")throw y&&y.type,new Error(B(14));v[O]=w,b=b||w!==l}return b=b||r.length!==Object.keys(a).length,b?v:a}}function Xe(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function sr(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(B(15))};const a={getState:i.getState,dispatch:(b,...v)=>o(b,...v)},y=e.map(b=>b(a));return o=Xe(...y)(i.dispatch),{...i,dispatch:o}}}function Cn(e){return fe(e)&&"type"in e&&typeof e.type=="string"}var xt=Symbol.for("immer-nothing"),Me=Symbol.for("immer-draftable"),X=Symbol.for("immer-state");function H(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var he=Object.getPrototypeOf;function se(e){return!!e&&!!e[X]}function ne(e){var t;return e?An(e)||Array.isArray(e)||!!e[Me]||!!((t=e.constructor)!=null&&t[Me])||Fe(e)||Ne(e):!1}var or=Object.prototype.constructor.toString();function An(e){if(!e||typeof e!="object")return!1;const t=he(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===or}function ur(e){return se(e)||H(15,e),e[X].base_}function De(e,t){ge(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function ge(e){const t=e[X];return t?t.type_:Array.isArray(e)?1:Fe(e)?2:Ne(e)?3:0}function qe(e,t){return ge(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function yt(e,t){return ge(e)===2?e.get(t):e[t]}function Mn(e,t,n){const r=ge(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function cr(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Fe(e){return e instanceof Map}function Ne(e){return e instanceof Set}function ye(e){return e.copy_||e.base_}function Ct(e,t){if(Fe(e))return new Map(e);if(Ne(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=An(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[X];let i=Reflect.ownKeys(r);for(let o=0;o<i.length;o++){const a=i[o],y=r[a];y.writable===!1&&(y.writable=!0,y.configurable=!0),(y.get||y.set)&&(r[a]={configurable:!0,writable:!0,enumerable:y.enumerable,value:e[a]})}return Object.create(he(e),r)}else{const r=he(e);if(r!==null&&n)return{...e};const i=Object.create(r);return Object.assign(i,e)}}function Ft(e,t=!1){return it(e)||se(e)||!ne(e)||(ge(e)>1&&(e.set=e.add=e.clear=e.delete=ar),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Ft(r,!0))),e}function ar(){H(2)}function it(e){return Object.isFrozen(e)}var At={};function me(e){const t=At[e];return t||H(0,e),t}function fr(e,t){At[e]||(At[e]=t)}var Qe;function In(){return Qe}function lr(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Gt(e,t){t&&(me("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Mt(e){It(e),e.drafts_.forEach(dr),e.drafts_=null}function It(e){e===Qe&&(Qe=e.parent_)}function Jt(e){return Qe=lr(Qe,e)}function dr(e){const t=e[X];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Xt(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[X].modified_&&(Mt(t),H(4)),ne(e)&&(e=Ye(t,e),t.parent_||Ze(t,e)),t.patches_&&me("Patches").generateReplacementPatches_(n[X].base_,e,t.patches_,t.inversePatches_)):e=Ye(t,n,[]),Mt(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==xt?e:void 0}function Ye(e,t,n){if(it(t))return t;const r=t[X];if(!r)return De(t,(i,o)=>Yt(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ze(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),De(o,(y,b)=>Yt(e,r,i,y,b,n,a)),Ze(e,i,!1),n&&e.patches_&&me("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Yt(e,t,n,r,i,o,a){if(se(i)){const y=o&&t&&t.type_!==3&&!qe(t.assigned_,r)?o.concat(r):void 0,b=Ye(e,i,y);if(Mn(n,r,b),se(b))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(ne(i)&&!it(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ye(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Ze(e,i)}}function Ze(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ft(t,n)}function pr(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:In(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=Nt;n&&(i=[r],o=ke);const{revoke:a,proxy:y}=Proxy.revocable(i,o);return r.draft_=y,r.revoke_=a,y}var Nt={get(e,t){if(t===X)return e;const n=ye(e);if(!qe(n,t))return yr(e,n,t);const r=n[t];return e.finalized_||!ne(r)?r:r===ht(e.base_,t)?(gt(e),e.copy_[t]=Dt(r,e)):r},has(e,t){return t in ye(e)},ownKeys(e){return Reflect.ownKeys(ye(e))},set(e,t,n){const r=Tn(ye(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=ht(ye(e),t),o=i==null?void 0:i[X];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(cr(n,i)&&(n!==void 0||qe(e.base_,t)))return!0;gt(e),Tt(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ht(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gt(e),Tt(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=ye(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){H(11)},getPrototypeOf(e){return he(e.base_)},setPrototypeOf(){H(12)}},ke={};De(Nt,(e,t)=>{ke[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ke.deleteProperty=function(e,t){return ke.set.call(this,e,t,void 0)};ke.set=function(e,t,n){return Nt.set.call(this,e[0],t,n,e[0])};function ht(e,t){const n=e[X];return(n?ye(n):e)[t]}function yr(e,t,n){var i;const r=Tn(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function Tn(e,t){if(!(t in e))return;let n=he(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=he(n)}}function Tt(e){e.modified_||(e.modified_=!0,e.parent_&&Tt(e.parent_))}function gt(e){e.copy_||(e.copy_=Ct(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hr=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(b=o,...v){return a.produce(b,E=>n.call(this,E,...v))}}typeof n!="function"&&H(6),r!==void 0&&typeof r!="function"&&H(7);let i;if(ne(t)){const o=Jt(this),a=Dt(t,void 0);let y=!0;try{i=n(a),y=!1}finally{y?Mt(o):It(o)}return Gt(o,r),Xt(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===xt&&(i=void 0),this.autoFreeze_&&Ft(i,!0),r){const o=[],a=[];me("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else H(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...y)=>this.produceWithPatches(a,b=>t(b,...y));let r,i;return[this.produce(t,n,(a,y)=>{r=a,i=y}),r,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){ne(e)||H(8),se(e)&&(e=gr(e));const t=Jt(this),n=Dt(e,void 0);return n[X].isManual_=!0,It(t),n}finishDraft(e,t){const n=e&&e[X];(!n||!n.isManual_)&&H(9);const{scope_:r}=n;return Gt(r,t),Xt(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=me("Patches").applyPatches_;return se(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Dt(e,t){const n=Fe(e)?me("MapSet").proxyMap_(e,t):Ne(e)?me("MapSet").proxySet_(e,t):pr(e,t);return(t?t.scope_:In()).drafts_.push(n),n}function gr(e){return se(e)||H(10,e),Dn(e)}function Dn(e){if(!ne(e)||it(e))return e;const t=e[X];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ct(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ct(e,!0);return De(n,(r,i)=>{Mn(n,r,Dn(i))}),t&&(t.finalized_=!1),n}function mr(){const t="replace",n="add",r="remove";function i(f,l,w,C){switch(f.type_){case 0:case 2:return a(f,l,w,C);case 1:return o(f,l,w,C);case 3:return y(f,l,w,C)}}function o(f,l,w,C){let{base_:R,assigned_:h}=f,M=f.copy_;M.length<R.length&&([R,M]=[M,R],[w,C]=[C,w]);for(let c=0;c<R.length;c++)if(h[c]&&M[c]!==R[c]){const s=l.concat([c]);w.push({op:t,path:s,value:O(M[c])}),C.push({op:t,path:s,value:O(R[c])})}for(let c=R.length;c<M.length;c++){const s=l.concat([c]);w.push({op:n,path:s,value:O(M[c])})}for(let c=M.length-1;R.length<=c;--c){const s=l.concat([c]);C.push({op:r,path:s})}}function a(f,l,w,C){const{base_:R,copy_:h}=f;De(f.assigned_,(M,c)=>{const s=yt(R,M),u=yt(h,M),S=c?qe(R,M)?t:n:r;if(s===u&&S===t)return;const A=l.concat(M);w.push(S===r?{op:S,path:A}:{op:S,path:A,value:u}),C.push(S===n?{op:r,path:A}:S===r?{op:n,path:A,value:O(s)}:{op:t,path:A,value:O(s)})})}function y(f,l,w,C){let{base_:R,copy_:h}=f,M=0;R.forEach(c=>{if(!h.has(c)){const s=l.concat([M]);w.push({op:r,path:s,value:c}),C.unshift({op:n,path:s,value:c})}M++}),M=0,h.forEach(c=>{if(!R.has(c)){const s=l.concat([M]);w.push({op:n,path:s,value:c}),C.unshift({op:r,path:s,value:c})}M++})}function b(f,l,w,C){w.push({op:t,path:[],value:l===xt?void 0:l}),C.push({op:t,path:[],value:f})}function v(f,l){return l.forEach(w=>{const{path:C,op:R}=w;let h=f;for(let u=0;u<C.length-1;u++){const S=ge(h);let A=C[u];typeof A!="string"&&typeof A!="number"&&(A=""+A),(S===0||S===1)&&(A==="__proto__"||A==="constructor")&&H(19),typeof h=="function"&&A==="prototype"&&H(19),h=yt(h,A),typeof h!="object"&&H(18,C.join("/"))}const M=ge(h),c=E(w.value),s=C[C.length-1];switch(R){case t:switch(M){case 2:return h.set(s,c);case 3:H(16);default:return h[s]=c}case n:switch(M){case 1:return s==="-"?h.push(c):h.splice(s,0,c);case 2:return h.set(s,c);case 3:return h.add(c);default:return h[s]=c}case r:switch(M){case 1:return h.splice(s,1);case 2:return h.delete(s);case 3:return h.delete(w.value);default:return delete h[s]}default:H(17,R)}}),f}function E(f){if(!ne(f))return f;if(Array.isArray(f))return f.map(E);if(Fe(f))return new Map(Array.from(f.entries()).map(([w,C])=>[w,E(C)]));if(Ne(f))return new Set(Array.from(f).map(E));const l=Object.create(he(f));for(const w in f)l[w]=E(f[w]);return qe(f,Me)&&(l[Me]=f[Me]),l}function O(f){return se(f)?E(f):f}fr("Patches",{applyPatches_:v,generatePatches_:i,generateReplacementPatches_:b})}var Y=new hr,ze=Y.produce,qn=Y.produceWithPatches.bind(Y);Y.setAutoFreeze.bind(Y);Y.setUseStrictShallowCopy.bind(Y);var Zt=Y.applyPatches.bind(Y);Y.createDraft.bind(Y);Y.finishDraft.bind(Y);function br(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vr(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Sr(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var en=e=>Array.isArray(e)?e:[e];function wr(e){const t=Array.isArray(e[0])?e[0]:e;return Sr(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _r(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}var Er=class{constructor(e){this.value=e}deref(){return this.value}},Rr=typeof WeakRef<"u"?WeakRef:Er,Pr=0,tn=1;function $e(){return{s:Pr,v:void 0,o:null,p:null}}function et(e,t={}){let n=$e();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var O;let y=n;const{length:b}=arguments;for(let f=0,l=b;f<l;f++){const w=arguments[f];if(typeof w=="function"||typeof w=="object"&&w!==null){let C=y.o;C===null&&(y.o=C=new WeakMap);const R=C.get(w);R===void 0?(y=$e(),C.set(w,y)):y=R}else{let C=y.p;C===null&&(y.p=C=new Map);const R=C.get(w);R===void 0?(y=$e(),C.set(w,y)):y=R}}const v=y;let E;if(y.s===tn)E=y.v;else if(E=e.apply(null,arguments),o++,r){const f=((O=i==null?void 0:i.deref)==null?void 0:O.call(i))??i;f!=null&&r(f,E)&&(E=f,o!==0&&o--),i=typeof E=="object"&&E!==null||typeof E=="function"?new Rr(E):E}return v.s=tn,v.v=E,E}return a.clearCache=()=>{n=$e(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function Or(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,y,b={},v=i.pop();typeof v=="object"&&(b=v,v=i.pop()),br(v,`createSelector expects an output function after the inputs, but received: [${typeof v}]`);const E={...n,...b},{memoize:O,memoizeOptions:f=[],argsMemoize:l=et,argsMemoizeOptions:w=[]}=E,C=en(f),R=en(w),h=wr(i),M=O(function(){return o++,v.apply(null,arguments)},...C),c=l(function(){a++;const u=_r(h,arguments);return y=M.apply(null,u),y},...R);return Object.assign(c,{resultFunc:v,memoizedResultFunc:M,dependencies:h,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>y,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:O,argsMemoize:l})};return Object.assign(r,{withTypes:()=>r}),r}var zt=Or(et),Cr=Object.assign((e,t=zt)=>{vr(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,y,b)=>(a[n[b]]=y,a),{}))},{withTypes:()=>Cr});function Qn(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var Ar=Qn(),Mr=Qn,Ir=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Xe:Xe.apply(null,arguments)},Tr=e=>e&&typeof e.match=="function";function ee(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(te(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>Cn(r)&&r.type===e,n}var kn=class Ae extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ae.prototype)}static get[Symbol.species](){return Ae}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ae(...t[0].concat(this)):new Ae(...t.concat(this))}};function nn(e){return ne(e)?ze(e,()=>{}):e}function We(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function Dr(e){return typeof e=="boolean"}var qr=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new kn;return n&&(Dr(n)?a.push(Ar):a.push(Mr(n.extraArgument))),a},st="RTK_autoBatch",Pe=()=>e=>({payload:e,meta:{[st]:!0}}),rn=e=>t=>{setTimeout(t,e)},Qr=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const y=new Set,b=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:rn(10):e.type==="callback"?e.queueNotification:rn(e.timeout),v=()=>{a=!1,o&&(o=!1,y.forEach(E=>E()))};return Object.assign({},r,{subscribe(E){const O=()=>i&&E(),f=r.subscribe(O);return y.add(E),()=>{f(),y.delete(E)}},dispatch(E){var O;try{return i=!((O=E==null?void 0:E.meta)!=null&&O[st]),o=!i,o&&(a||(a=!0,b(v))),r.dispatch(E)}finally{i=!0}}})},kr=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new kn(e);return r&&i.push(Qr(typeof r=="object"?r:void 0)),i};function as(e){const t=qr(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e||{};let y;if(typeof n=="function")y=n;else if(fe(n))y=On(n);else throw new Error(te(1));let b;typeof r=="function"?b=r(t):b=t();let v=Xe;i&&(v=Ir({trace:!1,...typeof i=="object"&&i}));const E=sr(...b),O=kr(E);let f=typeof a=="function"?a(O):O();const l=v(...f);return Pn(y,o,l)}function jn(e){const t={},n=[];let r;const i={addCase(o,a){const y=typeof o=="string"?o:o.type;if(!y)throw new Error(te(28));if(y in t)throw new Error(te(29));return t[y]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function jr(e){return typeof e=="function"}function xr(e,t){let[n,r,i]=jn(t),o;if(jr(e))o=()=>nn(e());else{const y=nn(e);o=()=>y}function a(y=o(),b){let v=[n[b.type],...r.filter(({matcher:E})=>E(b)).map(({reducer:E})=>E)];return v.filter(E=>!!E).length===0&&(v=[i]),v.reduce((E,O)=>{if(O)if(se(E)){const l=O(E,b);return l===void 0?E:l}else{if(ne(E))return ze(E,f=>O(f,b));{const f=O(E,b);if(f===void 0){if(E===null)return E;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return E},y)}return a.getInitialState=o,a}var xn=(e,t)=>Tr(e)?e.match(t):e(t);function ce(...e){return t=>e.some(n=>xn(n,t))}function Ie(...e){return t=>e.every(n=>xn(n,t))}function ot(e,t){if(!e||!e.meta)return!1;const n=typeof e.meta.requestId=="string",r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Le(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Lt(...e){return e.length===0?t=>ot(t,["pending"]):Le(e)?ce(...e.map(t=>t.pending)):Lt()(e[0])}function Ee(...e){return e.length===0?t=>ot(t,["rejected"]):Le(e)?ce(...e.map(t=>t.rejected)):Ee()(e[0])}function ut(...e){const t=n=>n&&n.meta&&n.meta.rejectedWithValue;return e.length===0?Ie(Ee(...e),t):Le(e)?Ie(Ee(...e),t):ut()(e[0])}function le(...e){return e.length===0?t=>ot(t,["fulfilled"]):Le(e)?ce(...e.map(t=>t.fulfilled)):le()(e[0])}function qt(...e){return e.length===0?t=>ot(t,["pending","fulfilled","rejected"]):Le(e)?ce(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):qt()(e[0])}var Fr="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ut=(e=21)=>{let t="",n=e;for(;n--;)t+=Fr[Math.random()*64|0];return t},Nr=["name","message","stack","code"],mt=class{constructor(e,t){Ue(this,"_type");this.payload=e,this.meta=t}},sn=class{constructor(e,t){Ue(this,"_type");this.payload=e,this.meta=t}},zr=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of Nr)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},on="External signal was aborted",un=(()=>{function e(t,n,r){const i=ee(t+"/fulfilled",(b,v,E,O)=>({payload:b,meta:{...O||{},arg:E,requestId:v,requestStatus:"fulfilled"}})),o=ee(t+"/pending",(b,v,E)=>({payload:void 0,meta:{...E||{},arg:v,requestId:b,requestStatus:"pending"}})),a=ee(t+"/rejected",(b,v,E,O,f)=>({payload:O,error:(r&&r.serializeError||zr)(b||"Rejected"),meta:{...f||{},arg:E,requestId:v,rejectedWithValue:!!O,requestStatus:"rejected",aborted:(b==null?void 0:b.name)==="AbortError",condition:(b==null?void 0:b.name)==="ConditionError"}}));function y(b,{signal:v}={}){return(E,O,f)=>{const l=r!=null&&r.idGenerator?r.idGenerator(b):Ut(),w=new AbortController;let C,R;function h(c){R=c,w.abort()}v&&(v.aborted?h(on):v.addEventListener("abort",()=>h(on),{once:!0}));const M=async function(){var u,S;let c;try{let A=(u=r==null?void 0:r.condition)==null?void 0:u.call(r,b,{getState:O,extra:f});if(Ur(A)&&(A=await A),A===!1||w.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const I=new Promise((g,d)=>{C=()=>{d({name:"AbortError",message:R||"Aborted"})},w.signal.addEventListener("abort",C)});E(o(l,b,(S=r==null?void 0:r.getPendingMeta)==null?void 0:S.call(r,{requestId:l,arg:b},{getState:O,extra:f}))),c=await Promise.race([I,Promise.resolve(n(b,{dispatch:E,getState:O,extra:f,requestId:l,signal:w.signal,abort:h,rejectWithValue:(g,d)=>new mt(g,d),fulfillWithValue:(g,d)=>new sn(g,d)})).then(g=>{if(g instanceof mt)throw g;return g instanceof sn?i(g.payload,l,b,g.meta):i(g,l,b)})])}catch(A){c=A instanceof mt?a(null,l,b,A.payload,A.meta):a(A,l,b)}finally{C&&w.signal.removeEventListener("abort",C)}return r&&!r.dispatchConditionRejection&&a.match(c)&&c.meta.condition||E(c),c}();return Object.assign(M,{abort:h,requestId:l,arg:b,unwrap(){return M.then(Lr)}})}}return Object.assign(y,{pending:o,rejected:a,fulfilled:i,settled:ce(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Lr(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ur(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var $r=Symbol.for("rtk-slice-createasyncthunk");function Wr(e,t){return`${e}/${t}`}function Vr({creators:e}={}){var n;const t=(n=e==null?void 0:e.asyncThunk)==null?void 0:n[$r];return function(i){const{name:o,reducerPath:a=o}=i;if(!o)throw new Error(te(11));const y=(typeof i.reducers=="function"?i.reducers(Br()):i.reducers)||{},b=Object.keys(y),v={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},E={addCase(s,u){const S=typeof s=="string"?s:s.type;if(!S)throw new Error(te(12));if(S in v.sliceCaseReducersByType)throw new Error(te(13));return v.sliceCaseReducersByType[S]=u,E},addMatcher(s,u){return v.sliceMatchers.push({matcher:s,reducer:u}),E},exposeAction(s,u){return v.actionCreators[s]=u,E},exposeCaseReducer(s,u){return v.sliceCaseReducersByName[s]=u,E}};b.forEach(s=>{const u=y[s],S={reducerName:s,type:Wr(o,s),createNotation:typeof i.reducers=="function"};Gr(u)?Xr(S,u,E,t):Hr(S,u,E)});function O(){const[s={},u=[],S=void 0]=typeof i.extraReducers=="function"?jn(i.extraReducers):[i.extraReducers],A={...s,...v.sliceCaseReducersByType};return xr(i.initialState,I=>{for(let g in A)I.addCase(g,A[g]);for(let g of v.sliceMatchers)I.addMatcher(g.matcher,g.reducer);for(let g of u)I.addMatcher(g.matcher,g.reducer);S&&I.addDefaultCase(S)})}const f=s=>s,l=new Map,w=new WeakMap;let C;function R(s,u){return C||(C=O()),C(s,u)}function h(){return C||(C=O()),C.getInitialState()}function M(s,u=!1){function S(I){let g=I[s];return typeof g>"u"&&u&&(g=We(w,S,h)),g}function A(I=f){const g=We(l,u,()=>new WeakMap);return We(g,I,()=>{const d={};for(const[p,m]of Object.entries(i.selectors??{}))d[p]=Kr(m,I,()=>We(w,I,h),u);return d})}return{reducerPath:s,getSelectors:A,get selectors(){return A(S)},selectSlice:S}}const c={name:o,reducer:R,actions:v.actionCreators,caseReducers:v.sliceCaseReducersByName,getInitialState:h,...M(a),injectInto(s,{reducerPath:u,...S}={}){const A=u??a;return s.inject({reducerPath:A,reducer:R},S),{...c,...M(A,!0)}}};return c}}function Kr(e,t,n,r){function i(o,...a){let y=t(o);return typeof y>"u"&&r&&(y=n()),e(y,...a)}return i.unwrapped=e,i}var Se=Vr();function Br(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Hr({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Jr(r))throw new Error(te(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?ee(e,a):ee(e))}function Gr(e){return e._reducerDefinitionType==="asyncThunk"}function Jr(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Xr({type:e,reducerName:t},n,r,i){if(!i)throw new Error(te(18));const{payloadCreator:o,fulfilled:a,pending:y,rejected:b,settled:v,options:E}=n,O=i(e,o,E);r.exposeAction(t,O),a&&r.addCase(O.fulfilled,a),y&&r.addCase(O.pending,y),b&&r.addCase(O.rejected,b),v&&r.addMatcher(O.settled,v),r.exposeCaseReducer(t,{fulfilled:a||Ve,pending:y||Ve,rejected:b||Ve,settled:v||Ve})}function Ve(){}function te(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 bt={exports:{}},vt={};/**
|
|
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 cn;function Yr(){if(cn)return vt;cn=1;var e=tr();function t(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useSyncExternalStore,i=e.useRef,o=e.useEffect,a=e.useMemo,y=e.useDebugValue;return vt.useSyncExternalStoreWithSelector=function(b,v,E,O,f){var l=i(null);if(l.current===null){var w={hasValue:!1,value:null};l.current=w}else w=l.current;l=a(function(){function R(u){if(!h){if(h=!0,M=u,u=O(u),f!==void 0&&w.hasValue){var S=w.value;if(f(S,u))return c=S}return c=u}if(S=c,n(M,u))return S;var A=O(u);return f!==void 0&&f(S,A)?(M=u,S):(M=u,c=A)}var h=!1,M,c,s=E===void 0?null:E;return[function(){return R(v())},s===null?void 0:function(){return R(s())}]},[v,E,O,f]);var C=r(b,l[0],l[1]);return o(function(){w.hasValue=!0,w.value=C},[C]),y(C),C},vt}var an;function Zr(){return an||(an=1,bt.exports=Yr()),bt.exports}var ei=Zr();function Fn(e){e()}function ti(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Fn(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fn={notify(){},get:()=>[]};function ni(e,t){let n,r=fn,i=0,o=!1;function a(C){E();const R=r.subscribe(C);let h=!1;return()=>{h||(h=!0,R(),O())}}function y(){r.notify()}function b(){w.onStateChange&&w.onStateChange()}function v(){return o}function E(){i++,n||(n=e.subscribe(b),r=ti())}function O(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=fn)}function f(){o||(o=!0,E())}function l(){o&&(o=!1,O())}const w={addNestedSub:a,notifyNestedSubs:y,handleChangeWrapper:b,isSubscribed:v,trySubscribe:f,tryUnsubscribe:l,getListeners:()=>r};return w}var ri=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ii=ri(),si=()=>typeof navigator<"u"&&navigator.product==="ReactNative",oi=si(),ui=()=>ii||oi?x.useLayoutEffect:x.useEffect,ci=ui();function ln(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function Te(e,t){if(ln(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!ln(e[n[i]],t[n[i]]))return!1;return!0}var St=Symbol.for("react-redux-context"),wt=typeof globalThis<"u"?globalThis:{};function ai(){if(!x.createContext)return{};const e=wt[St]??(wt[St]=new Map);let t=e.get(x.createContext);return t||(t=x.createContext(null),e.set(x.createContext,t)),t}var de=ai();function fi(e){const{children:t,context:n,serverState:r,store:i}=e,o=x.useMemo(()=>{const b=ni(i);return{store:i,subscription:b,getServerState:r?()=>r:void 0}},[i,r]),a=x.useMemo(()=>i.getState(),[i]);ci(()=>{const{subscription:b}=o;return b.onStateChange=b.notifyNestedSubs,b.trySubscribe(),a!==i.getState()&&b.notifyNestedSubs(),()=>{b.tryUnsubscribe(),b.onStateChange=void 0}},[o,a]);const y=n||de;return x.createElement(y.Provider,{value:o},t)}var fs=fi;function $t(e=de){return function(){return x.useContext(e)}}var Nn=$t();function zn(e=de){const t=e===de?Nn:$t(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var Ln=zn();function li(e=de){const t=e===de?Ln:zn(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var di=li(),pi=(e,t)=>e===t;function yi(e=de){const t=e===de?Nn:$t(e),n=(r,i={})=>{const{equalityFn:o=pi}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:y,subscription:b,getServerState:v}=a;x.useRef(!0);const E=x.useCallback({[r.name](f){return r(f)}}[r.name],[r]),O=ei.useSyncExternalStoreWithSelector(b.addNestedSub,y.getState,v||y.getState,E,o);return x.useDebugValue(O),O};return Object.assign(n,{withTypes:()=>n}),n}var hi=yi(),gi=Fn;const dn={EDITORIAL_API_URL:"http://localhost:3001"};var mi=class extends Error{constructor(t){super(t[0].message);Ue(this,"issues");this.name="SchemaError",this.issues=t}},Un=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(Un||{});function pn(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var yn=fe;function $n(e,t){if(e===t||!(yn(e)&&yn(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let i=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const a of n)o[a]=$n(e[a],t[a]),i&&(i=e[a]===o[a]);return i?e:o}function _e(e){let t=0;for(const n in e)t++;return t}var hn=e=>[].concat(...e);function bi(e){return new RegExp("(^|:)//").test(e)}function vi(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function tt(e){return e!=null}function Si(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var wi=e=>e.replace(/\/$/,""),_i=e=>e.replace(/^\//,"");function Ei(e,t){if(!e)return t;if(!t)return e;if(bi(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=wi(e),t=_i(t),`${e}${n}${t}`}function Ri(e,t,n){return e.has(t)?e.get(t):e.set(t,n).get(t)}var gn=(...e)=>fetch(...e),Pi=e=>e.status>=200&&e.status<=299,Oi=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function mn(e){if(!fe(e))return e;const t={...e};for(const[n,r]of Object.entries(t))r===void 0&&delete t[n];return t}function Ci({baseUrl:e,prepareHeaders:t=O=>O,fetchFn:n=gn,paramsSerializer:r,isJsonContentType:i=Oi,jsonContentType:o="application/json",jsonReplacer:a,timeout:y,responseHandler:b,validateStatus:v,...E}={}){return typeof fetch>"u"&&n===gn&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,l,w)=>{const{getState:C,extra:R,endpoint:h,forced:M,type:c}=l;let s,{url:u,headers:S=new Headers(E.headers),params:A=void 0,responseHandler:I=b??"json",validateStatus:g=v??Pi,timeout:d=y,...p}=typeof f=="string"?{url:f}:f,m,_=l.signal;d&&(m=new AbortController,l.signal.addEventListener("abort",m.abort),_=m.signal);let P={...E,signal:_,...p};S=new Headers(mn(S)),P.headers=await t(S,{getState:C,arg:f,extra:R,endpoint:h,forced:M,type:c,extraOptions:w})||S;const T=L=>typeof L=="object"&&(fe(L)||Array.isArray(L)||typeof L.toJSON=="function");if(!P.headers.has("content-type")&&T(P.body)&&P.headers.set("content-type",o),T(P.body)&&i(P.headers)&&(P.body=JSON.stringify(P.body,a)),A){const L=~u.indexOf("?")?"&":"?",k=r?r(A):new URLSearchParams(mn(A));u+=L+k}u=Ei(e,u);const D=new Request(u,P);s={request:new Request(u,P)};let j,q=!1,F=m&&setTimeout(()=>{q=!0,m.abort()},d);try{j=await n(D)}catch(L){return{error:{status:q?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(L)},meta:s}}finally{F&&clearTimeout(F),m==null||m.signal.removeEventListener("abort",m.abort)}const N=j.clone();s.response=N;let U,K="";try{let L;if(await Promise.all([O(j,I).then(k=>U=k,k=>L=k),N.text().then(k=>K=k,()=>{})]),L)throw L}catch(L){return{error:{status:"PARSING_ERROR",originalStatus:j.status,data:K,error:String(L)},meta:s}}return g(j,U)?{data:U,meta:s}:{error:{status:j.status,data:U},meta:s}};async function O(f,l){if(typeof l=="function")return l(f);if(l==="content-type"&&(l=i(f.headers)?"json":"text"),l==="json"){const w=await f.text();return w.length?JSON.parse(w):null}return f.text()}}var bn=class{constructor(e,t=void 0){this.value=e,this.meta=t}},ct=ee("__rtkq/focused"),Wt=ee("__rtkq/unfocused"),at=ee("__rtkq/online"),Vt=ee("__rtkq/offline"),_t=!1;function ls(e,t){function n(){const r=()=>e(ct()),i=()=>e(Wt()),o=()=>e(at()),a=()=>e(Vt()),y=()=>{window.document.visibilityState==="visible"?r():i()};return _t||typeof window<"u"&&window.addEventListener&&(window.addEventListener("visibilitychange",y,!1),window.addEventListener("focus",r,!1),window.addEventListener("online",o,!1),window.addEventListener("offline",a,!1),_t=!0),()=>{window.removeEventListener("focus",r),window.removeEventListener("visibilitychange",y),window.removeEventListener("online",o),window.removeEventListener("offline",a),_t=!1}}return n()}function ft(e){return e.type==="query"}function Ai(e){return e.type==="mutation"}function lt(e){return e.type==="infinitequery"}function nt(e){return ft(e)||lt(e)}function Kt(e,t,n,r,i,o){return Mi(e)?e(t,n,r,i).filter(tt).map(Qt).map(o):Array.isArray(e)?e.map(Qt).map(o):[]}function Mi(e){return typeof e=="function"}function Qt(e){return typeof e=="string"?{type:e}:e}function Ii(e,t){return e.catch(t)}var je=Symbol("forceQueryFn"),kt=e=>typeof e[je]=="function";function Ti({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:n,mutationThunk:r,api:i,context:o}){const a=new Map,y=new Map,{unsubscribeQueryResult:b,removeMutationResult:v,updateSubscriptionOptions:E}=i.internalActions;return{buildInitiateQuery:R,buildInitiateInfiniteQuery:h,buildInitiateMutation:M,getRunningQueryThunk:O,getRunningMutationThunk:f,getRunningQueriesThunk:l,getRunningMutationsThunk:w};function O(c,s){return u=>{var I;const S=o.endpointDefinitions[c],A=e({queryArgs:s,endpointDefinition:S,endpointName:c});return(I=a.get(u))==null?void 0:I[A]}}function f(c,s){return u=>{var S;return(S=y.get(u))==null?void 0:S[s]}}function l(){return c=>Object.values(a.get(c)||{}).filter(tt)}function w(){return c=>Object.values(y.get(c)||{}).filter(tt)}function C(c,s){const u=(S,{subscribe:A=!0,forceRefetch:I,subscriptionOptions:g,[je]:d,...p}={})=>(m,_)=>{var W;const P=e({queryArgs:S,endpointDefinition:s,endpointName:c});let T;const D={...p,type:"query",subscribe:A,forceRefetch:I,subscriptionOptions:g,endpointName:c,originalArgs:S,queryCacheKey:P,[je]:d};if(ft(s))T=t(D);else{const{direction:z,initialPageParam:J}=p;T=n({...D,direction:z,initialPageParam:J})}const Q=i.endpoints[c].select(S),j=m(T),q=Q(_()),{requestId:F,abort:N}=j,U=q.requestId!==F,K=(W=a.get(m))==null?void 0:W[P],L=()=>Q(_()),k=Object.assign(d?j.then(L):U&&!K?Promise.resolve(q):Promise.all([K,j]).then(L),{arg:S,requestId:F,subscriptionOptions:g,queryCacheKey:P,abort:N,async unwrap(){const z=await k;if(z.isError)throw z.error;return z.data},refetch:()=>m(u(S,{subscribe:!1,forceRefetch:!0})),unsubscribe(){A&&m(b({queryCacheKey:P,requestId:F}))},updateSubscriptionOptions(z){k.subscriptionOptions=z,m(E({endpointName:c,requestId:F,queryCacheKey:P,options:z}))}});if(!K&&!U&&!d){const z=Ri(a,m,{});z[P]=k,k.then(()=>{delete z[P],_e(z)||a.delete(m)})}return k};return u}function R(c,s){return C(c,s)}function h(c,s){return C(c,s)}function M(c){return(s,{track:u=!0,fixedCacheKey:S}={})=>(A,I)=>{const g=r({type:"mutation",endpointName:c,originalArgs:s,track:u,fixedCacheKey:S}),d=A(g),{requestId:p,abort:m,unwrap:_}=d,P=Ii(d.unwrap().then(j=>({data:j})),j=>({error:j})),T=()=>{A(v({requestId:p,fixedCacheKey:S}))},D=Object.assign(P,{arg:d.arg,requestId:p,abort:m,unwrap:_,reset:T}),Q=y.get(A)||{};return y.set(A,Q),Q[p]=D,D.then(()=>{delete Q[p],_e(Q)||y.delete(A)}),S&&(Q[S]=D,D.then(()=>{Q[S]===D&&(delete Q[S],_e(Q)||y.delete(A))})),D}}}var Wn=class extends mi{constructor(e,t,n,r){super(e),this.value=t,this.schemaName=n,this._bqMeta=r}};async function pe(e,t,n,r){const i=await e["~standard"].validate(t);if(i.issues)throw new Wn(i.issues,t,n,r);return i.value}function Di(e){return e}var Oe=(e={})=>({...e,[st]:!0});function qi({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:i,assertTagType:o,selectors:a,onSchemaFailure:y,catchSchemaFailure:b,skipSchemaValidation:v}){const E=(p,m,_,P)=>(T,D)=>{const Q=n[p],j=r({queryArgs:m,endpointDefinition:Q,endpointName:p});if(T(i.internalActions.queryResultPatched({queryCacheKey:j,patches:_})),!P)return;const q=i.endpoints[p].select(m)(D()),F=Kt(Q.providesTags,q.data,void 0,m,{},o);T(i.internalActions.updateProvidedBy([{queryCacheKey:j,providedTags:F}]))};function O(p,m,_=0){const P=[m,...p];return _&&P.length>_?P.slice(0,-1):P}function f(p,m,_=0){const P=[...p,m];return _&&P.length>_?P.slice(1):P}const l=(p,m,_,P=!0)=>(T,D)=>{const j=i.endpoints[p].select(m)(D()),q={patches:[],inversePatches:[],undo:()=>T(i.util.patchQueryData(p,m,q.inversePatches,P))};if(j.status==="uninitialized")return q;let F;if("data"in j)if(ne(j.data)){const[N,U,K]=qn(j.data,_);q.patches.push(...U),q.inversePatches.push(...K),F=N}else F=_(j.data),q.patches.push({op:"replace",path:[],value:F}),q.inversePatches.push({op:"replace",path:[],value:j.data});return q.patches.length===0||T(i.util.patchQueryData(p,m,q.patches,P)),q},w=(p,m,_)=>P=>P(i.endpoints[p].initiate(m,{subscribe:!1,forceRefetch:!0,[je]:()=>({data:_})})),C=(p,m)=>p.query&&p[m]?p[m]:Di,R=async(p,{signal:m,abort:_,rejectWithValue:P,fulfillWithValue:T,dispatch:D,getState:Q,extra:j})=>{var U,K;const q=n[p.endpointName],{metaSchema:F,skipSchemaValidation:N=v}=q;try{let L=C(q,"transformResponse");const k={signal:m,abort:_,dispatch:D,getState:Q,extra:j,endpoint:p.endpointName,type:p.type,forced:p.type==="query"?h(p,Q()):void 0,queryCacheKey:p.type==="query"?p.queryCacheKey:void 0},W=p.type==="query"?p[je]:void 0;let z;const J=async(V,$,G,be)=>{if($==null&&V.pages.length)return Promise.resolve({data:V});const re={queryArg:p.originalArgs,pageParam:$},ve=await oe(re),ie=be?O:f;return{data:{pages:ie(V.pages,ve.data,G),pageParams:ie(V.pageParams,$,G)},meta:ve.meta}};async function oe(V){let $;const{extraOptions:G,argSchema:be,rawResponseSchema:re,responseSchema:ve}=q;if(be&&!N&&(V=await pe(be,V,"argSchema",{})),W?$=W():q.query?$=await t(q.query(V),k,G):$=await q.queryFn(V,k,G,Re=>t(Re,k,G)),typeof process<"u",$.error)throw new bn($.error,$.meta);let{data:ie}=$;re&&!N&&(ie=await pe(re,$.data,"rawResponseSchema",$.meta));let ae=await L(ie,$.meta,V);return ve&&!N&&(ae=await pe(ve,ae,"responseSchema",$.meta)),{...$,data:ae}}if(p.type==="query"&&"infiniteQueryOptions"in q){const{infiniteQueryOptions:V}=q,{maxPages:$=1/0}=V;let G;const be={pages:[],pageParams:[]},re=(U=a.selectQueryEntry(Q(),p.queryCacheKey))==null?void 0:U.data,ie=h(p,Q())&&!p.direction||!re?be:re;if("direction"in p&&p.direction&&ie.pages.length){const ae=p.direction==="backward",dt=(ae?Vn:jt)(V,ie,p.originalArgs);G=await J(ie,dt,$,ae)}else{const{initialPageParam:ae=V.initialPageParam}=p,Re=(re==null?void 0:re.pageParams)??[],dt=Re[0]??ae,Xn=Re.length;G=await J(ie,dt,$),W&&(G={data:G.data.pages[0]});for(let Bt=1;Bt<Xn;Bt++){const Yn=jt(V,G.data,p.originalArgs);G=await J(G.data,Yn,$)}}z=G}else z=await oe(p.originalArgs);return F&&!N&&z.meta&&(z.meta=await pe(F,z.meta,"metaSchema",z.meta)),T(z.data,Oe({fulfilledTimeStamp:Date.now(),baseQueryMeta:z.meta}))}catch(L){let k=L;if(k instanceof bn){let W=C(q,"transformErrorResponse");const{rawErrorResponseSchema:z,errorResponseSchema:J}=q;let{value:oe,meta:V}=k;try{z&&!N&&(oe=await pe(z,oe,"rawErrorResponseSchema",V)),F&&!N&&(V=await pe(F,V,"metaSchema",V));let $=await W(oe,V,p.originalArgs);return J&&!N&&($=await pe(J,$,"errorResponseSchema",V)),P($,Oe({baseQueryMeta:V}))}catch($){k=$}}try{if(k instanceof Wn){const W={endpoint:p.endpointName,arg:p.originalArgs,type:p.type,queryCacheKey:p.type==="query"?p.queryCacheKey:void 0};(K=q.onSchemaFailure)==null||K.call(q,k,W),y==null||y(k,W);const{catchSchemaFailure:z=b}=q;if(z)return P(z(k,W),Oe({baseQueryMeta:k._bqMeta}))}}catch(W){k=W}throw console.error(k),k}};function h(p,m){const _=a.selectQueryEntry(m,p.queryCacheKey),P=a.selectConfig(m).refetchOnMountOrArgChange,T=_==null?void 0:_.fulfilledTimeStamp,D=p.forceRefetch??(p.subscribe&&P);return D?D===!0||(Number(new Date)-Number(T))/1e3>=D:!1}const M=()=>un(`${e}/executeQuery`,R,{getPendingMeta({arg:m}){const _=n[m.endpointName];return Oe({startedTimeStamp:Date.now(),...lt(_)?{direction:m.direction}:{}})},condition(m,{getState:_}){var N;const P=_(),T=a.selectQueryEntry(P,m.queryCacheKey),D=T==null?void 0:T.fulfilledTimeStamp,Q=m.originalArgs,j=T==null?void 0:T.originalArgs,q=n[m.endpointName],F=m.direction;return kt(m)?!0:(T==null?void 0:T.status)==="pending"?!1:h(m,P)||ft(q)&&((N=q==null?void 0:q.forceRefetch)!=null&&N.call(q,{currentArg:Q,previousArg:j,endpointState:T,state:P}))?!0:!(D&&!F)},dispatchConditionRejection:!0}),c=M(),s=M(),u=un(`${e}/executeMutation`,R,{getPendingMeta(){return Oe({startedTimeStamp:Date.now()})}}),S=p=>"force"in p,A=p=>"ifOlderThan"in p,I=(p,m,_)=>(P,T)=>{const D=S(_)&&_.force,Q=A(_)&&_.ifOlderThan,j=(F=!0)=>{const N={forceRefetch:F,isPrefetch:!0};return i.endpoints[p].initiate(m,N)},q=i.endpoints[p].select(m)(T());if(D)P(j());else if(Q){const F=q==null?void 0:q.fulfilledTimeStamp;if(!F){P(j());return}(Number(new Date)-Number(new Date(F)))/1e3>=Q&&P(j())}else P(j(!1))};function g(p){return m=>{var _,P;return((P=(_=m==null?void 0:m.meta)==null?void 0:_.arg)==null?void 0:P.endpointName)===p}}function d(p,m){return{matchPending:Ie(Lt(p),g(m)),matchFulfilled:Ie(le(p),g(m)),matchRejected:Ie(Ee(p),g(m))}}return{queryThunk:c,mutationThunk:u,infiniteQueryThunk:s,prefetch:I,updateQueryData:l,upsertQueryData:w,patchQueryData:E,buildMatchThunkActions:d}}function jt(e,{pages:t,pageParams:n},r){const i=t.length-1;return e.getNextPageParam(t[i],t,n[i],n,r)}function Vn(e,{pages:t,pageParams:n},r){var i;return(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n,r)}function Kn(e,t,n,r){return Kt(n[e.meta.arg.endpointName][t],le(e)?e.payload:void 0,ut(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Ke(e,t,n){const r=e[t];r&&n(r)}function xe(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function vn(e,t,n){const r=e[xe(t)];r&&n(r)}var Be={};function Qi({reducerPath:e,queryThunk:t,mutationThunk:n,serializeQueryArgs:r,context:{endpointDefinitions:i,apiUid:o,extractRehydrationInfo:a,hasRehydrationInfo:y},assertTagType:b,config:v}){const E=ee(`${e}/resetApiState`);function O(g,d,p,m){var _;g[_=d.queryCacheKey]??(g[_]={status:"uninitialized",endpointName:d.endpointName}),Ke(g,d.queryCacheKey,P=>{P.status="pending",P.requestId=p&&P.requestId?P.requestId:m.requestId,d.originalArgs!==void 0&&(P.originalArgs=d.originalArgs),P.startedTimeStamp=m.startedTimeStamp;const T=i[m.arg.endpointName];lt(T)&&"direction"in d&&(P.direction=d.direction)})}function f(g,d,p,m){Ke(g,d.arg.queryCacheKey,_=>{if(_.requestId!==d.requestId&&!m)return;const{merge:P}=i[d.arg.endpointName];if(_.status="fulfilled",P)if(_.data!==void 0){const{fulfilledTimeStamp:T,arg:D,baseQueryMeta:Q,requestId:j}=d;let q=ze(_.data,F=>P(F,p,{arg:D.originalArgs,baseQueryMeta:Q,fulfilledTimeStamp:T,requestId:j}));_.data=q}else _.data=p;else _.data=i[d.arg.endpointName].structuralSharing??!0?$n(se(_.data)?ur(_.data):_.data,p):p;delete _.error,_.fulfilledTimeStamp=d.fulfilledTimeStamp})}const l=Se({name:`${e}/queries`,initialState:Be,reducers:{removeQueryResult:{reducer(g,{payload:{queryCacheKey:d}}){delete g[d]},prepare:Pe()},cacheEntriesUpserted:{reducer(g,d){for(const p of d.payload){const{queryDescription:m,value:_}=p;O(g,m,!0,{arg:m,requestId:d.meta.requestId,startedTimeStamp:d.meta.timestamp}),f(g,{arg:m,requestId:d.meta.requestId,fulfilledTimeStamp:d.meta.timestamp,baseQueryMeta:{}},_,!0)}},prepare:g=>({payload:g.map(m=>{const{endpointName:_,arg:P,value:T}=m,D=i[_];return{queryDescription:{type:"query",endpointName:_,originalArgs:m.arg,queryCacheKey:r({queryArgs:P,endpointDefinition:D,endpointName:_})},value:T}}),meta:{[st]:!0,requestId:Ut(),timestamp:Date.now()}})},queryResultPatched:{reducer(g,{payload:{queryCacheKey:d,patches:p}}){Ke(g,d,m=>{m.data=Zt(m.data,p.concat())})},prepare:Pe()}},extraReducers(g){g.addCase(t.pending,(d,{meta:p,meta:{arg:m}})=>{const _=kt(m);O(d,m,_,p)}).addCase(t.fulfilled,(d,{meta:p,payload:m})=>{const _=kt(p.arg);f(d,p,m,_)}).addCase(t.rejected,(d,{meta:{condition:p,arg:m,requestId:_},error:P,payload:T})=>{Ke(d,m.queryCacheKey,D=>{if(!p){if(D.requestId!==_)return;D.status="rejected",D.error=T??P}})}).addMatcher(y,(d,p)=>{const{queries:m}=a(p);for(const[_,P]of Object.entries(m))((P==null?void 0:P.status)==="fulfilled"||(P==null?void 0:P.status)==="rejected")&&(d[_]=P)})}}),w=Se({name:`${e}/mutations`,initialState:Be,reducers:{removeMutationResult:{reducer(g,{payload:d}){const p=xe(d);p in g&&delete g[p]},prepare:Pe()}},extraReducers(g){g.addCase(n.pending,(d,{meta:p,meta:{requestId:m,arg:_,startedTimeStamp:P}})=>{_.track&&(d[xe(p)]={requestId:m,status:"pending",endpointName:_.endpointName,startedTimeStamp:P})}).addCase(n.fulfilled,(d,{payload:p,meta:m})=>{m.arg.track&&vn(d,m,_=>{_.requestId===m.requestId&&(_.status="fulfilled",_.data=p,_.fulfilledTimeStamp=m.fulfilledTimeStamp)})}).addCase(n.rejected,(d,{payload:p,error:m,meta:_})=>{_.arg.track&&vn(d,_,P=>{P.requestId===_.requestId&&(P.status="rejected",P.error=p??m)})}).addMatcher(y,(d,p)=>{const{mutations:m}=a(p);for(const[_,P]of Object.entries(m))((P==null?void 0:P.status)==="fulfilled"||(P==null?void 0:P.status)==="rejected")&&_!==(P==null?void 0:P.requestId)&&(d[_]=P)})}}),C={tags:{},keys:{}},R=Se({name:`${e}/invalidation`,initialState:C,reducers:{updateProvidedBy:{reducer(g,d){var p,m,_;for(const{queryCacheKey:P,providedTags:T}of d.payload){h(g,P);for(const{type:D,id:Q}of T){const j=(m=(p=g.tags)[D]??(p[D]={}))[_=Q||"__internal_without_id"]??(m[_]=[]);j.includes(P)||j.push(P)}g.keys[P]=T}},prepare:Pe()}},extraReducers(g){g.addCase(l.actions.removeQueryResult,(d,{payload:{queryCacheKey:p}})=>{h(d,p)}).addMatcher(y,(d,p)=>{var _,P,T;const{provided:m}=a(p);for(const[D,Q]of Object.entries(m))for(const[j,q]of Object.entries(Q)){const F=(P=(_=d.tags)[D]??(_[D]={}))[T=j||"__internal_without_id"]??(P[T]=[]);for(const N of q)F.includes(N)||F.push(N)}}).addMatcher(ce(le(t),ut(t)),(d,p)=>{M(d,[p])}).addMatcher(l.actions.cacheEntriesUpserted.match,(d,p)=>{const m=p.payload.map(({queryDescription:_,value:P})=>({type:"UNKNOWN",payload:P,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:_}}));M(d,m)})}});function h(g,d){var m;const p=g.keys[d]??[];for(const _ of p){const P=_.type,T=_.id??"__internal_without_id",D=(m=g.tags[P])==null?void 0:m[T];D&&(g.tags[P][T]=D.filter(Q=>Q!==d))}delete g.keys[d]}function M(g,d){const p=d.map(m=>{const _=Kn(m,"providesTags",i,b),{queryCacheKey:P}=m.meta.arg;return{queryCacheKey:P,providedTags:_}});R.caseReducers.updateProvidedBy(g,R.actions.updateProvidedBy(p))}const c=Se({name:`${e}/subscriptions`,initialState:Be,reducers:{updateSubscriptionOptions(g,d){},unsubscribeQueryResult(g,d){},internal_getRTKQSubscriptions(){}}}),s=Se({name:`${e}/internalSubscriptions`,initialState:Be,reducers:{subscriptionsUpdated:{reducer(g,d){return Zt(g,d.payload)},prepare:Pe()}}}),u=Se({name:`${e}/config`,initialState:{online:Si(),focused:vi(),middlewareRegistered:!1,...v},reducers:{middlewareRegistered(g,{payload:d}){g.middlewareRegistered=g.middlewareRegistered==="conflict"||o!==d?"conflict":!0}},extraReducers:g=>{g.addCase(at,d=>{d.online=!0}).addCase(Vt,d=>{d.online=!1}).addCase(ct,d=>{d.focused=!0}).addCase(Wt,d=>{d.focused=!1}).addMatcher(y,d=>({...d}))}}),S=On({queries:l.reducer,mutations:w.reducer,provided:R.reducer,subscriptions:s.reducer,config:u.reducer}),A=(g,d)=>S(E.match(d)?void 0:g,d),I={...u.actions,...l.actions,...c.actions,...s.actions,...w.actions,...R.actions,resetApiState:E};return{reducer:A,actions:I}}var Z=Symbol.for("RTKQ/skipToken"),Bn={status:"uninitialized"},Sn=ze(Bn,()=>{}),wn=ze(Bn,()=>{});function ki({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=c=>Sn,i=c=>wn;return{buildQuerySelector:f,buildInfiniteQuerySelector:l,buildMutationSelector:w,selectInvalidatedBy:C,selectCachedArgsForQuery:R,selectApiState:a,selectQueries:y,selectMutations:v,selectQueryEntry:b,selectConfig:E};function o(c){return{...c,...pn(c.status)}}function a(c){return c[t]}function y(c){var s;return(s=a(c))==null?void 0:s.queries}function b(c,s){var u;return(u=y(c))==null?void 0:u[s]}function v(c){var s;return(s=a(c))==null?void 0:s.mutations}function E(c){var s;return(s=a(c))==null?void 0:s.config}function O(c,s,u){return S=>{if(S===Z)return n(r,u);const A=e({queryArgs:S,endpointDefinition:s,endpointName:c});return n(g=>b(g,A)??Sn,u)}}function f(c,s){return O(c,s,o)}function l(c,s){const{infiniteQueryOptions:u}=s;function S(A){const I={...A,...pn(A.status)},{isLoading:g,isError:d,direction:p}=I,m=p==="forward",_=p==="backward";return{...I,hasNextPage:h(u,I.data,I.originalArgs),hasPreviousPage:M(u,I.data,I.originalArgs),isFetchingNextPage:g&&m,isFetchingPreviousPage:g&&_,isFetchNextPageError:d&&m,isFetchPreviousPageError:d&&_}}return O(c,s,S)}function w(){return c=>{let s;return typeof c=="object"?s=xe(c)??Z:s=c,n(s===Z?i:A=>{var I,g;return((g=(I=a(A))==null?void 0:I.mutations)==null?void 0:g[s])??wn},o)}}function C(c,s){const u=c[t],S=new Set;for(const A of s.filter(tt).map(Qt)){const I=u.provided.tags[A.type];if(!I)continue;let g=(A.id!==void 0?I[A.id]:hn(Object.values(I)))??[];for(const d of g)S.add(d)}return hn(Array.from(S.values()).map(A=>{const I=u.queries[A];return I?[{queryCacheKey:A,endpointName:I.endpointName,originalArgs:I.originalArgs}]:[]}))}function R(c,s){return Object.values(y(c)).filter(u=>(u==null?void 0:u.endpointName)===s&&u.status!=="uninitialized").map(u=>u.originalArgs)}function h(c,s,u){return s?jt(c,s,u)!=null:!1}function M(c,s,u){return!s||!c.getPreviousPageParam?!1:Vn(c,s,u)!=null}}var we=WeakMap?new WeakMap:void 0,rt=({endpointName:e,queryArgs:t})=>{let n="";const r=we==null?void 0:we.get(t);if(typeof r=="string")n=r;else{const i=JSON.stringify(t,(o,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=fe(a)?Object.keys(a).sort().reduce((y,b)=>(y[b]=a[b],y),{}):a,a));fe(t)&&(we==null||we.set(t,i)),n=i}return`${e}(${n})`};function Hn(...e){return function(n){const r=et(v=>{var E;return(E=n.extractRehydrationInfo)==null?void 0:E.call(n,v,{reducerPath:n.reducerPath??"api"})}),i={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...n,extractRehydrationInfo:r,serializeQueryArgs(v){let E=rt;if("serializeQueryArgs"in v.endpointDefinition){const O=v.endpointDefinition.serializeQueryArgs;E=f=>{const l=O(f);return typeof l=="string"?l:rt({...f,queryArgs:l})}}else n.serializeQueryArgs&&(E=n.serializeQueryArgs);return E(v)},tagTypes:[...n.tagTypes||[]]},o={endpointDefinitions:{},batch(v){v()},apiUid:Ut(),extractRehydrationInfo:r,hasRehydrationInfo:et(v=>r(v)!=null)},a={injectEndpoints:b,enhanceEndpoints({addTagTypes:v,endpoints:E}){if(v)for(const O of v)i.tagTypes.includes(O)||i.tagTypes.push(O);if(E)for(const[O,f]of Object.entries(E))typeof f=="function"?f(o.endpointDefinitions[O]):Object.assign(o.endpointDefinitions[O]||{},f);return a}},y=e.map(v=>v.init(a,i,o));function b(v){const E=v.endpoints({query:O=>({...O,type:"query"}),mutation:O=>({...O,type:"mutation"}),infiniteQuery:O=>({...O,type:"infinitequery"})});for(const[O,f]of Object.entries(E)){if(v.overrideExisting!==!0&&O in o.endpointDefinitions){if(v.overrideExisting==="throw")throw new Error(te(39));continue}o.endpointDefinitions[O]=f;for(const l of y)l.injectEndpoint(O,f)}return a}return a.injectEndpoints({endpoints:n.endpoints})}}function ue(e,...t){return Object.assign(e,...t)}var ji=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let i=null,o=null;const{updateSubscriptionOptions:a,unsubscribeQueryResult:y}=e.internalActions,b=(l,w)=>{var R,h,M;if(a.match(w)){const{queryCacheKey:c,requestId:s,options:u}=w.payload;return(R=l==null?void 0:l[c])!=null&&R[s]&&(l[c][s]=u),!0}if(y.match(w)){const{queryCacheKey:c,requestId:s}=w.payload;return l[c]&&delete l[c][s],!0}if(e.internalActions.removeQueryResult.match(w))return delete l[w.payload.queryCacheKey],!0;if(t.pending.match(w)){const{meta:{arg:c,requestId:s}}=w,u=l[h=c.queryCacheKey]??(l[h]={});return u[`${s}_running`]={},c.subscribe&&(u[s]=c.subscriptionOptions??u[s]??{}),!0}let C=!1;if(t.fulfilled.match(w)||t.rejected.match(w)){const c=l[w.meta.arg.queryCacheKey]||{},s=`${w.meta.requestId}_running`;C||(C=!!c[s]),delete c[s]}if(t.rejected.match(w)){const{meta:{condition:c,arg:s,requestId:u}}=w;if(c&&s.subscribe){const S=l[M=s.queryCacheKey]??(l[M]={});S[u]=s.subscriptionOptions??S[u]??{},C=!0}}return C},v=()=>n.currentSubscriptions,f={getSubscriptions:v,getSubscriptionCount:l=>{const C=v()[l]??{};return _e(C)},isRequestSubscribed:(l,w)=>{var R;const C=v();return!!((R=C==null?void 0:C[l])!=null&&R[w])}};return(l,w)=>{if(i||(i=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(l))return i=n.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(l))return[!1,f];const C=b(n.currentSubscriptions,l);let R=!0;if(C){o||(o=setTimeout(()=>{const c=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,s]=qn(i,()=>c);w.next(e.internalActions.subscriptionsUpdated(s)),i=c,o=null},500));const h=typeof l.type=="string"&&!!l.type.startsWith(r),M=t.rejected.match(l)&&l.meta.condition&&!!l.meta.arg.subscribe;R=!h&&!M}return[R,!1]}};function xi(e){for(const t in e)return!1;return!0}var Fi=2147483647/1e3-1,Ni=({reducerPath:e,api:t,queryThunk:n,context:r,internalState:i,selectors:{selectQueryEntry:o,selectConfig:a}})=>{const{removeQueryResult:y,unsubscribeQueryResult:b,cacheEntriesUpserted:v}=t.internalActions,E=ce(b.match,n.fulfilled,n.rejected,v.match);function O(R){const h=i.currentSubscriptions[R];return!!h&&!xi(h)}const f={},l=(R,h,M)=>{const c=h.getState(),s=a(c);if(E(R)){let u;if(v.match(R))u=R.payload.map(S=>S.queryDescription.queryCacheKey);else{const{queryCacheKey:S}=b.match(R)?R.payload:R.meta.arg;u=[S]}w(u,h,s)}if(t.util.resetApiState.match(R))for(const[u,S]of Object.entries(f))S&&clearTimeout(S),delete f[u];if(r.hasRehydrationInfo(R)){const{queries:u}=r.extractRehydrationInfo(R);w(Object.keys(u),h,s)}};function w(R,h,M){const c=h.getState();for(const s of R){const u=o(c,s);C(s,u==null?void 0:u.endpointName,h,M)}}function C(R,h,M,c){const s=r.endpointDefinitions[h],u=(s==null?void 0:s.keepUnusedDataFor)??c.keepUnusedDataFor;if(u===1/0)return;const S=Math.max(0,Math.min(u,Fi));if(!O(R)){const A=f[R];A&&clearTimeout(A),f[R]=setTimeout(()=>{O(R)||M.dispatch(y({queryCacheKey:R})),delete f[R]},S*1e3)}}return l},_n=new Error("Promise never resolved before cacheEntryRemoved."),zi=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:i,internalState:o,selectors:{selectQueryEntry:a,selectApiState:y}})=>{const b=qt(r),v=qt(i),E=le(r,i),O={};function f(h,M,c){const s=O[h];s!=null&&s.valueResolved&&(s.valueResolved({data:M,meta:c}),delete s.valueResolved)}function l(h){const M=O[h];M&&(delete O[h],M.cacheEntryRemoved())}const w=(h,M,c)=>{const s=C(h);function u(S,A,I,g){const d=a(c,A),p=a(M.getState(),A);!d&&p&&R(S,g,A,M,I)}if(r.pending.match(h))u(h.meta.arg.endpointName,s,h.meta.requestId,h.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(h))for(const{queryDescription:S,value:A}of h.payload){const{endpointName:I,originalArgs:g,queryCacheKey:d}=S;u(I,d,h.meta.requestId,g),f(d,A,{})}else if(i.pending.match(h))M.getState()[t].mutations[s]&&R(h.meta.arg.endpointName,h.meta.arg.originalArgs,s,M,h.meta.requestId);else if(E(h))f(s,h.payload,h.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(h)||e.internalActions.removeMutationResult.match(h))l(s);else if(e.util.resetApiState.match(h))for(const S of Object.keys(O))l(S)};function C(h){return b(h)?h.meta.arg.queryCacheKey:v(h)?h.meta.arg.fixedCacheKey??h.meta.requestId:e.internalActions.removeQueryResult.match(h)?h.payload.queryCacheKey:e.internalActions.removeMutationResult.match(h)?xe(h.payload):""}function R(h,M,c,s,u){const S=n.endpointDefinitions[h],A=S==null?void 0:S.onCacheEntryAdded;if(!A)return;const I={},g=new Promise(T=>{I.cacheEntryRemoved=T}),d=Promise.race([new Promise(T=>{I.valueResolved=T}),g.then(()=>{throw _n})]);d.catch(()=>{}),O[c]=I;const p=e.endpoints[h].select(nt(S)?M:c),m=s.dispatch((T,D,Q)=>Q),_={...s,getCacheEntry:()=>p(s.getState()),requestId:u,extra:m,updateCachedData:nt(S)?T=>s.dispatch(e.util.updateQueryData(h,M,T)):void 0,cacheDataLoaded:d,cacheEntryRemoved:g},P=A(M,_);Promise.resolve(P).catch(T=>{if(T!==_n)throw T})}return w},Li=({api:e,context:{apiUid:t},reducerPath:n})=>(r,i)=>{e.util.resetApiState.match(r)&&i.dispatch(e.internalActions.middlewareRegistered(t))},Ui=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:i,api:o,assertTagType:a,refetchQuery:y,internalState:b})=>{const{removeQueryResult:v}=o.internalActions,E=ce(le(r),ut(r)),O=ce(le(r,i),Ee(r,i));let f=[];const l=(R,h)=>{E(R)?C(Kn(R,"invalidatesTags",n,a),h):O(R)?C([],h):o.util.invalidateTags.match(R)&&C(Kt(R.payload,void 0,void 0,void 0,void 0,a),h)};function w(R){var c;const{queries:h,mutations:M}=R;for(const s of[h,M])for(const u in s)if(((c=s[u])==null?void 0:c.status)==="pending")return!0;return!1}function C(R,h){const M=h.getState(),c=M[e];if(f.push(...R),c.config.invalidationBehavior==="delayed"&&w(c))return;const s=f;if(f=[],s.length===0)return;const u=o.util.selectInvalidatedBy(M,s);t.batch(()=>{const S=Array.from(u.values());for(const{queryCacheKey:A}of S){const I=c.queries[A],g=b.currentSubscriptions[A]??{};I&&(_e(g)===0?h.dispatch(v({queryCacheKey:A})):I.status!=="uninitialized"&&h.dispatch(y(I)))}})}return l},$i=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:i})=>{const o={},a=(f,l)=>{(n.internalActions.updateSubscriptionOptions.match(f)||n.internalActions.unsubscribeQueryResult.match(f))&&b(f.payload,l),(t.pending.match(f)||t.rejected.match(f)&&f.meta.condition)&&b(f.meta.arg,l),(t.fulfilled.match(f)||t.rejected.match(f)&&!f.meta.condition)&&y(f.meta.arg,l),n.util.resetApiState.match(f)&&E()};function y({queryCacheKey:f},l){const w=l.getState()[e],C=w.queries[f],R=i.currentSubscriptions[f];if(!C||C.status==="uninitialized")return;const{lowestPollingInterval:h,skipPollingIfUnfocused:M}=O(R);if(!Number.isFinite(h))return;const c=o[f];c!=null&&c.timeout&&(clearTimeout(c.timeout),c.timeout=void 0);const s=Date.now()+h;o[f]={nextPollTimestamp:s,pollingInterval:h,timeout:setTimeout(()=>{(w.config.focused||!M)&&l.dispatch(r(C)),y({queryCacheKey:f},l)},h)}}function b({queryCacheKey:f},l){const C=l.getState()[e].queries[f],R=i.currentSubscriptions[f];if(!C||C.status==="uninitialized")return;const{lowestPollingInterval:h}=O(R);if(!Number.isFinite(h)){v(f);return}const M=o[f],c=Date.now()+h;(!M||c<M.nextPollTimestamp)&&y({queryCacheKey:f},l)}function v(f){const l=o[f];l!=null&&l.timeout&&clearTimeout(l.timeout),delete o[f]}function E(){for(const f of Object.keys(o))v(f)}function O(f={}){let l=!1,w=Number.POSITIVE_INFINITY;for(let C in f)f[C].pollingInterval&&(w=Math.min(f[C].pollingInterval,w),l=f[C].skipPollingIfUnfocused||l);return{lowestPollingInterval:w,skipPollingIfUnfocused:l}}return a},Wi=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const i=Lt(n,r),o=Ee(n,r),a=le(n,r),y={};return(v,E)=>{var O,f;if(i(v)){const{requestId:l,arg:{endpointName:w,originalArgs:C}}=v.meta,R=t.endpointDefinitions[w],h=R==null?void 0:R.onQueryStarted;if(h){const M={},c=new Promise((A,I)=>{M.resolve=A,M.reject=I});c.catch(()=>{}),y[l]=M;const s=e.endpoints[w].select(nt(R)?C:l),u=E.dispatch((A,I,g)=>g),S={...E,getCacheEntry:()=>s(E.getState()),requestId:l,extra:u,updateCachedData:nt(R)?A=>E.dispatch(e.util.updateQueryData(w,C,A)):void 0,queryFulfilled:c};h(C,S)}}else if(a(v)){const{requestId:l,baseQueryMeta:w}=v.meta;(O=y[l])==null||O.resolve({data:v.payload,meta:w}),delete y[l]}else if(o(v)){const{requestId:l,rejectedWithValue:w,baseQueryMeta:C}=v.meta;(f=y[l])==null||f.reject({error:v.payload??v.error,isUnhandledError:!w,meta:C}),delete y[l]}}},Vi=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:i})=>{const{removeQueryResult:o}=n.internalActions,a=(b,v)=>{ct.match(b)&&y(v,"refetchOnFocus"),at.match(b)&&y(v,"refetchOnReconnect")};function y(b,v){const E=b.getState()[e],O=E.queries,f=i.currentSubscriptions;t.batch(()=>{for(const l of Object.keys(f)){const w=O[l],C=f[l];if(!C||!w)continue;(Object.values(C).some(h=>h[v]===!0)||Object.values(C).every(h=>h[v]===void 0)&&E.config[v])&&(_e(C)===0?b.dispatch(o({queryCacheKey:l})):w.status!=="uninitialized"&&b.dispatch(r(w)))}})}return a};function Ki(e){const{reducerPath:t,queryThunk:n,api:r,context:i}=e,{apiUid:o}=i,a={invalidateTags:ee(`${t}/invalidateTags`)},y=O=>O.type.startsWith(`${t}/`),b=[Li,Ni,Ui,$i,zi,Wi];return{middleware:O=>{let f=!1;const w={...e,internalState:{currentSubscriptions:{}},refetchQuery:E,isThisApiSliceAction:y},C=b.map(M=>M(w)),R=ji(w),h=Vi(w);return M=>c=>{if(!Cn(c))return M(c);f||(f=!0,O.dispatch(r.internalActions.middlewareRegistered(o)));const s={...O,next:M},u=O.getState(),[S,A]=R(c,s,u);let I;if(S?I=M(c):I=A,O.getState()[t]&&(h(c,s,u),y(c)||i.hasRehydrationInfo(c)))for(const g of C)g(c,s,u);return I}},actions:a};function E(O){return e.api.endpoints[O.endpointName].initiate(O.originalArgs,{subscribe:!1,forceRefetch:!0})}}var En=Symbol(),Gn=({createSelector:e=zt}={})=>({name:En,init(t,{baseQuery:n,tagTypes:r,reducerPath:i,serializeQueryArgs:o,keepUnusedDataFor:a,refetchOnMountOrArgChange:y,refetchOnFocus:b,refetchOnReconnect:v,invalidationBehavior:E,onSchemaFailure:O,catchSchemaFailure:f,skipSchemaValidation:l},w){mr();const C=k=>k;Object.assign(t,{reducerPath:i,endpoints:{},internalActions:{onOnline:at,onOffline:Vt,onFocus:ct,onFocusLost:Wt},util:{}});const R=ki({serializeQueryArgs:o,reducerPath:i,createSelector:e}),{selectInvalidatedBy:h,selectCachedArgsForQuery:M,buildQuerySelector:c,buildInfiniteQuerySelector:s,buildMutationSelector:u}=R;ue(t.util,{selectInvalidatedBy:h,selectCachedArgsForQuery:M});const{queryThunk:S,infiniteQueryThunk:A,mutationThunk:I,patchQueryData:g,updateQueryData:d,upsertQueryData:p,prefetch:m,buildMatchThunkActions:_}=qi({baseQuery:n,reducerPath:i,context:w,api:t,serializeQueryArgs:o,assertTagType:C,selectors:R,onSchemaFailure:O,catchSchemaFailure:f,skipSchemaValidation:l}),{reducer:P,actions:T}=Qi({context:w,queryThunk:S,mutationThunk:I,serializeQueryArgs:o,reducerPath:i,assertTagType:C,config:{refetchOnFocus:b,refetchOnReconnect:v,refetchOnMountOrArgChange:y,keepUnusedDataFor:a,reducerPath:i,invalidationBehavior:E}});ue(t.util,{patchQueryData:g,updateQueryData:d,upsertQueryData:p,prefetch:m,resetApiState:T.resetApiState,upsertQueryEntries:T.cacheEntriesUpserted}),ue(t.internalActions,T);const{middleware:D,actions:Q}=Ki({reducerPath:i,context:w,queryThunk:S,mutationThunk:I,infiniteQueryThunk:A,api:t,assertTagType:C,selectors:R});ue(t.util,Q),ue(t,{reducer:P,middleware:D});const{buildInitiateQuery:j,buildInitiateInfiniteQuery:q,buildInitiateMutation:F,getRunningMutationThunk:N,getRunningMutationsThunk:U,getRunningQueriesThunk:K,getRunningQueryThunk:L}=Ti({queryThunk:S,mutationThunk:I,infiniteQueryThunk:A,api:t,serializeQueryArgs:o,context:w});return ue(t.util,{getRunningMutationThunk:N,getRunningMutationsThunk:U,getRunningQueryThunk:L,getRunningQueriesThunk:K}),{name:En,injectEndpoint(k,W){var oe;const J=(oe=t.endpoints)[k]??(oe[k]={});ft(W)&&ue(J,{name:k,select:c(k,W),initiate:j(k,W)},_(S,k)),Ai(W)&&ue(J,{name:k,select:u(),initiate:F(k)},_(I,k)),lt(W)&&ue(J,{name:k,select:s(k,W),initiate:q(k,W)},_(S,k))}}}});Gn();function He(e){return e.replace(e[0],e[0].toUpperCase())}function Bi(e){return e.type==="query"}function Hi(e){return e.type==="mutation"}function Jn(e){return e.type==="infinitequery"}function Ce(e,...t){return Object.assign(e,...t)}var Et=Symbol();function Rt(e,t,n,r){const i=x.useMemo(()=>({queryArgs:e,serialized:typeof e=="object"?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e}),[e,t,n,r]),o=x.useRef(i);return x.useEffect(()=>{o.current.serialized!==i.serialized&&(o.current=i)},[i]),o.current.serialized===i.serialized?o.current.queryArgs:e}function Ge(e){const t=x.useRef(e);return x.useEffect(()=>{Te(t.current,e)||(t.current=e)},[e]),Te(t.current,e)?t.current:e}var Gi=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ji=Gi(),Xi=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Yi=Xi(),Zi=()=>Ji||Yi?x.useLayoutEffect:x.useEffect,es=Zi(),Rn=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:e.data===void 0,status:Un.pending}:e;function Pt(e,...t){const n={};return t.forEach(r=>{n[r]=e[r]}),n}var Ot=["data","status","isLoading","isSuccess","isError","error"];function ts({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:i},unstable__sideEffectsInRender:o,createSelector:a},serializeQueryArgs:y,context:b}){const v=o?s=>s():x.useEffect;return{buildQueryHooks:h,buildInfiniteQueryHooks:M,buildMutationHook:c,usePrefetch:f};function E(s,u,S){if(u!=null&&u.endpointName&&s.isUninitialized){const{endpointName:m}=u,_=b.endpointDefinitions[m];S!==Z&&y({queryArgs:u.originalArgs,endpointDefinition:_,endpointName:m})===y({queryArgs:S,endpointDefinition:_,endpointName:m})&&(u=void 0)}let A=s.isSuccess?s.data:u==null?void 0:u.data;A===void 0&&(A=s.data);const I=A!==void 0,g=s.isLoading,d=(!u||u.isLoading||u.isUninitialized)&&!I&&g,p=s.isSuccess||I&&(g&&!(u!=null&&u.isError)||s.isUninitialized);return{...s,data:A,currentData:s.data,isFetching:g,isLoading:d,isSuccess:p}}function O(s,u,S){if(u!=null&&u.endpointName&&s.isUninitialized){const{endpointName:m}=u,_=b.endpointDefinitions[m];S!==Z&&y({queryArgs:u.originalArgs,endpointDefinition:_,endpointName:m})===y({queryArgs:S,endpointDefinition:_,endpointName:m})&&(u=void 0)}let A=s.isSuccess?s.data:u==null?void 0:u.data;A===void 0&&(A=s.data);const I=A!==void 0,g=s.isLoading,d=(!u||u.isLoading||u.isUninitialized)&&!I&&g,p=s.isSuccess||g&&I;return{...s,data:A,currentData:s.data,isFetching:g,isLoading:d,isSuccess:p}}function f(s,u){const S=n(),A=Ge(u);return x.useCallback((I,g)=>S(e.util.prefetch(s,I,{...A,...g})),[s,S,A])}function l(s,u,{refetchOnReconnect:S,refetchOnFocus:A,refetchOnMountOrArgChange:I,skip:g=!1,pollingInterval:d=0,skipPollingIfUnfocused:p=!1,...m}={}){const{initiate:_}=e.endpoints[s],P=n(),T=x.useRef(void 0);if(!T.current){const k=P(e.internalActions.internal_getRTKQSubscriptions());T.current=k}const D=Rt(g?Z:u,rt,b.endpointDefinitions[s],s),Q=Ge({refetchOnReconnect:S,refetchOnFocus:A,pollingInterval:d,skipPollingIfUnfocused:p}),j=m.initialPageParam,q=Ge(j),F=x.useRef(void 0);let{queryCacheKey:N,requestId:U}=F.current||{},K=!1;N&&U&&(K=T.current.isRequestSubscribed(N,U));const L=!K&&F.current!==void 0;return v(()=>{L&&(F.current=void 0)},[L]),v(()=>{var z;const k=F.current;if(D===Z){k==null||k.unsubscribe(),F.current=void 0;return}const W=(z=F.current)==null?void 0:z.subscriptionOptions;if(!k||k.arg!==D){k==null||k.unsubscribe();const J=P(_(D,{subscriptionOptions:Q,forceRefetch:I,...Jn(b.endpointDefinitions[s])?{initialPageParam:q}:{}}));F.current=J}else Q!==W&&k.updateSubscriptionOptions(Q)},[P,_,I,D,Q,L,q,s]),[F,P,_,Q]}function w(s,u){return(A,{skip:I=!1,selectFromResult:g}={})=>{const{select:d}=e.endpoints[s],p=Rt(I?Z:A,y,b.endpointDefinitions[s],s),m=x.useRef(void 0),_=x.useMemo(()=>a([d(p),(j,q)=>q,j=>p],u,{memoizeOptions:{resultEqualityCheck:Te}}),[d,p]),P=x.useMemo(()=>g?a([_],g,{devModeChecks:{identityFunctionCheck:"never"}}):_,[_,g]),T=r(j=>P(j,m.current),Te),D=i(),Q=_(D.getState(),m.current);return es(()=>{m.current=Q},[Q]),T}}function C(s){x.useEffect(()=>()=>{var u,S;(S=(u=s.current)==null?void 0:u.unsubscribe)==null||S.call(u),s.current=void 0},[s])}function R(s){if(!s.current)throw new Error(te(38));return s.current.refetch()}function h(s){const u=(I,g={})=>{const[d]=l(s,I,g);return C(d),x.useMemo(()=>({refetch:()=>R(d)}),[d])},S=({refetchOnReconnect:I,refetchOnFocus:g,pollingInterval:d=0,skipPollingIfUnfocused:p=!1}={})=>{const{initiate:m}=e.endpoints[s],_=n(),[P,T]=x.useState(Et),D=x.useRef(void 0),Q=Ge({refetchOnReconnect:I,refetchOnFocus:g,pollingInterval:d,skipPollingIfUnfocused:p});v(()=>{var U,K;const N=(U=D.current)==null?void 0:U.subscriptionOptions;Q!==N&&((K=D.current)==null||K.updateSubscriptionOptions(Q))},[Q]);const j=x.useRef(Q);v(()=>{j.current=Q},[Q]);const q=x.useCallback(function(N,U=!1){let K;return t(()=>{var L;(L=D.current)==null||L.unsubscribe(),D.current=K=_(m(N,{subscriptionOptions:j.current,forceRefetch:!U})),T(N)}),K},[_,m]),F=x.useCallback(()=>{var N,U;(N=D.current)!=null&&N.queryCacheKey&&_(e.internalActions.removeQueryResult({queryCacheKey:(U=D.current)==null?void 0:U.queryCacheKey}))},[_]);return x.useEffect(()=>()=>{var N;(N=D==null?void 0:D.current)==null||N.unsubscribe()},[]),x.useEffect(()=>{P!==Et&&!D.current&&q(P,!0)},[P,q]),x.useMemo(()=>[q,P,{reset:F}],[q,P,F])},A=w(s,E);return{useQueryState:A,useQuerySubscription:u,useLazyQuerySubscription:S,useLazyQuery(I){const[g,d,{reset:p}]=S(I),m=A(d,{...I,skip:d===Et}),_=x.useMemo(()=>({lastArg:d}),[d]);return x.useMemo(()=>[g,{...m,reset:p},_],[g,m,p,_])},useQuery(I,g){const d=u(I,g),p=A(I,{selectFromResult:I===Z||g!=null&&g.skip?void 0:Rn,...g}),m=Pt(p,...Ot);return x.useDebugValue(m),x.useMemo(()=>({...p,...d}),[p,d])}}}function M(s){const u=(A,I={})=>{const[g,d,p,m]=l(s,A,I),_=x.useRef(m);v(()=>{_.current=m},[m]);const P=x.useCallback(function(Q,j){let q;return t(()=>{var F;(F=g.current)==null||F.unsubscribe(),g.current=q=d(p(Q,{subscriptionOptions:_.current,direction:j}))}),q},[g,d,p]);C(g);const T=Rt(I.skip?Z:A,rt,b.endpointDefinitions[s],s),D=x.useCallback(()=>R(g),[g]);return x.useMemo(()=>({trigger:P,refetch:D,fetchNextPage:()=>P(T,"forward"),fetchPreviousPage:()=>P(T,"backward")}),[D,P,T])},S=w(s,O);return{useInfiniteQueryState:S,useInfiniteQuerySubscription:u,useInfiniteQuery(A,I){const{refetch:g,fetchNextPage:d,fetchPreviousPage:p}=u(A,I),m=S(A,{selectFromResult:A===Z||I!=null&&I.skip?void 0:Rn,...I}),_=Pt(m,...Ot,"hasNextPage","hasPreviousPage");return x.useDebugValue(_),x.useMemo(()=>({...m,fetchNextPage:d,fetchPreviousPage:p,refetch:g}),[m,d,p,g])}}}function c(s){return({selectFromResult:u,fixedCacheKey:S}={})=>{const{select:A,initiate:I}=e.endpoints[s],g=n(),[d,p]=x.useState();x.useEffect(()=>()=>{d!=null&&d.arg.fixedCacheKey||d==null||d.reset()},[d]);const m=x.useCallback(function(N){const U=g(I(N,{fixedCacheKey:S}));return p(U),U},[g,I,S]),{requestId:_}=d||{},P=x.useMemo(()=>A({fixedCacheKey:S,requestId:d==null?void 0:d.requestId}),[S,d,A]),T=x.useMemo(()=>u?a([P],u):P,[u,P]),D=r(T,Te),Q=S==null?d==null?void 0:d.arg.originalArgs:void 0,j=x.useCallback(()=>{t(()=>{d&&p(void 0),S&&g(e.internalActions.removeMutationResult({requestId:_,fixedCacheKey:S}))})},[g,S,d,_]),q=Pt(D,...Ot,"endpointName");x.useDebugValue(q);const F=x.useMemo(()=>({...D,originalArgs:Q,reset:j}),[D,Q,j]);return x.useMemo(()=>[m,F],[m,F])}}}var ns=Symbol(),rs=({batch:e=gi,hooks:t={useDispatch:di,useSelector:hi,useStore:Ln},createSelector:n=zt,unstable__sideEffectsInRender:r=!1,...i}={})=>({name:ns,init(o,{serializeQueryArgs:a},y){const b=o,{buildQueryHooks:v,buildInfiniteQueryHooks:E,buildMutationHook:O,usePrefetch:f}=ts({api:o,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:a,context:y});return Ce(b,{usePrefetch:f}),Ce(y,{batch:e}),{injectEndpoint(l,w){if(Bi(w)){const{useQuery:C,useLazyQuery:R,useLazyQuerySubscription:h,useQueryState:M,useQuerySubscription:c}=v(l);Ce(b.endpoints[l],{useQuery:C,useLazyQuery:R,useLazyQuerySubscription:h,useQueryState:M,useQuerySubscription:c}),o[`use${He(l)}Query`]=C,o[`useLazy${He(l)}Query`]=R}if(Hi(w)){const C=O(l);Ce(b.endpoints[l],{useMutation:C}),o[`use${He(l)}Mutation`]=C}else if(Jn(w)){const{useInfiniteQuery:C,useInfiniteQuerySubscription:R,useInfiniteQueryState:h}=E(l);Ce(b.endpoints[l],{useInfiniteQuery:C,useInfiniteQuerySubscription:R,useInfiniteQueryState:h}),o[`use${He(l)}InfiniteQuery`]=C}}}}}),is=Hn(Gn(),rs());const ss=Ci({baseUrl:dn.EDITORIAL_API_URL?`${dn.EDITORIAL_API_URL}/api/v1`:"/api/v1"}),os=is({reducerPath:"editorialApi",baseQuery:ss,tagTypes:["schema","data","files","config"],endpoints:e=>({getConfig:e.query({query:()=>"/config",providesTags:[{type:"config"}]}),pull:e.mutation({query:()=>({url:"/pull",method:"POST"})}),push:e.mutation({query:()=>({url:"/push",method:"POST"})}),publish:e.mutation({query:()=>({url:"/publish",method:"POST"})}),getSchema:e.query({query:()=>"/schema",providesTags:[{type:"schema"}]}),getSchemaType:e.query({query:()=>"/schema",transformResponse:(t,n,r)=>t[r]||null,providesTags:(t,n,r)=>[{type:"schema",id:r}]}),getData:e.query({query:()=>"/data",providesTags:()=>[{type:"data"}]}),getDataCount:e.query({query:()=>"/data",transformResponse(t){return Object.values(t).reduce((r,i)=>r+Object.keys(i).length,0)}}),getDataObject:e.query({query:()=>"/data",transformResponse:(t,n,{itemType:r,id:i})=>t[r][i]||null,providesTags:(t,n,{itemType:r,id:i})=>[{type:"data",id:`${r}-${i}`}]}),getFiles:e.query({query:()=>"/files",transformResponse:t=>t.files,providesTags:()=>[{type:"files"}]}),getFileCount:e.query({query:()=>"/files",transformResponse:t=>{function n(i){let o=i.type==="file"?1:0;return i.children&&i.children.length>0&&(o+=i.children.reduce((a,y)=>a+n(y),0)),o}function r(i){return i.reduce((o,a)=>o+n(a),0)}return r(t.files)}}),getFilesTotalSize:e.query({query:()=>"/files",transformResponse:t=>t.totalSize,providesTags:()=>[{type:"files"}]}),deleteFile:e.mutation({query:t=>({url:"/files",method:"DELETE",body:{path:t}}),invalidatesTags:()=>[{type:"files"}]}),updateObject:e.mutation({query:({id:t,type:n,...r})=>({url:`/data/${n}/${t}`,method:"PATCH",body:{id:t,type:n,...r}}),invalidatesTags:()=>[{type:"data"}]}),createObject:e.mutation({query:({id:t,type:n,...r})=>({url:`/data/${n}/${t}`,method:"PUT",body:{id:t,type:n,...r}}),invalidatesTags:()=>[{type:"data"}]}),deleteObject:e.mutation({query:({id:t,type:n})=>({url:`/data/${n}/${t}`,method:"DELETE"}),invalidatesTags:()=>[{type:"data"}]})})}),{useCreateObjectMutation:ds,useDeleteFileMutation:ps,useDeleteObjectMutation:ys,useGetConfigQuery:hs,useGetDataCountQuery:gs,useGetDataObjectQuery:ms,useGetDataQuery:bs,useGetFileCountQuery:vs,useGetFilesQuery:Ss,useGetFilesTotalSizeQuery:ws,useGetSchemaQuery:_s,useGetSchemaTypeQuery:Es,usePublishMutation:Rs,usePullMutation:Ps,usePushMutation:Os,useUpdateObjectMutation:Cs}=os;export{fs as P,_s as a,bs as b,as as c,Rs as d,os as e,Ps as f,Os as g,ws as h,gs as i,vs as j,Es as k,ys as l,ms as m,ds as n,Cs as o,Ss as p,ps as q,di as r,ls as s,hi as t,hs as u,Ln as v,un as w,Se as x};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as c,p as e,w as m,q as h,M as x,L as p,S as j,t as b,O as g,i as y}from"./chunk-EF7DTUVF-CZaHNoTs.js";import{u as E,o as w,r as v,f as N,g as S,s as d,a as F,b as R,c as z,i as A,d as L}from"./authSlice-BWVz4jZT.js";import{u,c as P,s as I,e as o,P as k}from"./editorialApi-sCf3FFWc.js";import"./tslib.es6-De9GV7Vy.js";function q(){const s=E(),{data:t}=u();return c.useEffect(()=>{const a=w(z,async r=>{var i;if(r&&(t!=null&&t.firebase)){const n=(i=r.email)==null?void 0:i.replace(/[.@]/g,"_"),l=v(N,`${t.firebase.dbUsersPath}/${n}`),f=(await S(l)).val();s(d({uid:r.uid,email:r.email})),s(F(f))}else s(d(void 0));s(R(!1))});return()=>a()},[s,t]),null}function B({children:s}){const[t,a]=c.useState(!1),{data:r,error:i,isLoading:n}=u();return c.useEffect(()=>{if(!n){if(i){console.error("Failed to fetch admin config:",i);return}if(r){console.log(r);try{if(!r.firebase)throw new Error("Firebase configuration not found in admin config");A(r.firebase),a(!0)}catch(l){console.error("Failed to initialize Firebase:",l)}}}},[r,i,n]),i?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h2",{className:"text-xl font-semibold text-red-600 mb-2",children:"Firebase Initialization Error"}),e.jsx("p",{className:"text-gray-600",children:i instanceof Error?i.message:"Failed to fetch admin config"})]})}):n||!t?e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto mb-4"}),e.jsx("p",{className:"text-gray-600",children:"Initializing Firebase..."})]})}):e.jsx(e.Fragment,{children:s})}function C(){const s=P({reducer:{auth:L,[o.reducerPath]:o.reducer},middleware:t=>t().concat(o.middleware)});return I(s.dispatch),s}function D({children:s}){const t=c.useRef(null);return t.current||(t.current=C(),t.current.dispatch(o.endpoints.getConfig.initiate())),e.jsx(k,{store:t.current,children:s})}const $=()=>[];function G({}){return[{title:"Editorial Admin"}]}function K({children:s}){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(x,{}),e.jsx(p,{})]}),e.jsxs("body",{className:"h-full min-h-screen bg-background font-sans antialiased",children:[e.jsx(D,{children:e.jsxs(B,{children:[e.jsx(q,{}),s]})}),e.jsx(j,{}),e.jsx(b,{})]})]})}const Q=m(function(){return e.jsx(g,{})}),H=h(function({error:t}){let a="Oops!",r="An unexpected error occurred.",i;return y(t)&&(a=t.status===404?"404":"Error",r=t.status===404?"The requested page could not be found.":t.statusText||r),e.jsxs("main",{className:"pt-16 p-4 container mx-auto",children:[e.jsx("h1",{children:a}),e.jsx("p",{children:r}),i]})});export{H as ErrorBoundary,K as Layout,Q as default,$ as links,G as meta};
|